@duckdb/duckdb-wasm 0.1.13-dev26.0 → 0.1.13-dev29.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.
@@ -1,21 +1,21 @@
1
- var duckdb=(()=>{var y1=Object.create;var ys=Object.defineProperty,_1=Object.defineProperties,m1=Object.getOwnPropertyDescriptor,b1=Object.getOwnPropertyDescriptors,g1=Object.getOwnPropertyNames,Yy=Object.getOwnPropertySymbols,v1=Object.getPrototypeOf,Gy=Object.prototype.hasOwnProperty,w1=Object.prototype.propertyIsEnumerable;var Ky=(i,e,t)=>e in i?ys(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Rr=(i,e)=>{for(var t in e||(e={}))Gy.call(e,t)&&Ky(i,t,e[t]);if(Yy)for(var t of Yy(e))w1.call(e,t)&&Ky(i,t,e[t]);return i},mo=(i,e)=>_1(i,b1(e)),$y=i=>ys(i,"__esModule",{value:!0});var j1=(i=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(i,{get:(e,t)=>(typeof require!="undefined"?require:e)[t]}):i)(function(i){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+i+'" is not supported')});var R=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),I1=(i,e)=>{$y(i);for(var t in e)ys(i,t,{get:e[t],enumerable:!0})},T1=(i,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of g1(e))!Gy.call(i,r)&&r!=="default"&&ys(i,r,{get:()=>e[r],enumerable:!(t=m1(e,r))||t.enumerable});return i},ni=i=>T1($y(ys(i!=null?y1(v1(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);var si=(i,e,t)=>new Promise((r,n)=>{var s=v=>{try{_(t.next(v))}catch(B){n(B)}},c=v=>{try{_(t.throw(v))}catch(B){n(B)}},_=v=>v.done?r(v.value):Promise.resolve(v.value).then(s,c);_((t=t.apply(i,e)).next())});var dt=R((mU,vo)=>{var Jy,Qy,Zy,Xy,e_,t_,i_,r_,n_,bo,Eu,s_,o_,a_,un,u_,c_,l_,d_,f_,h_,p_,y_,go;(function(i){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(r){i(t(e,t(r)))}):typeof vo=="object"&&typeof vo.exports=="object"?i(t(e,t(vo.exports))):i(t(e));function t(r,n){return r!==e&&(typeof Object.create=="function"?Object.defineProperty(r,"__esModule",{value:!0}):r.__esModule=!0),function(s,c){return r[s]=n?n(s,c):c}}})(function(i){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])};Jy=function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(r,n);function s(){this.constructor=r}r.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)},Qy=Object.assign||function(r){for(var n,s=1,c=arguments.length;s<c;s++){n=arguments[s];for(var _ in n)Object.prototype.hasOwnProperty.call(n,_)&&(r[_]=n[_])}return r},Zy=function(r,n){var s={};for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&n.indexOf(c)<0&&(s[c]=r[c]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _=0,c=Object.getOwnPropertySymbols(r);_<c.length;_++)n.indexOf(c[_])<0&&Object.prototype.propertyIsEnumerable.call(r,c[_])&&(s[c[_]]=r[c[_]]);return s},Xy=function(r,n,s,c){var _=arguments.length,v=_<3?n:c===null?c=Object.getOwnPropertyDescriptor(n,s):c,B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,n,s,c);else for(var O=r.length-1;O>=0;O--)(B=r[O])&&(v=(_<3?B(v):_>3?B(n,s,v):B(n,s))||v);return _>3&&v&&Object.defineProperty(n,s,v),v},e_=function(r,n){return function(s,c){n(s,c,r)}},t_=function(r,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,n)},i_=function(r,n,s,c){function _(v){return v instanceof s?v:new s(function(B){B(v)})}return new(s||(s=Promise))(function(v,B){function O(J){try{q(c.next(J))}catch(ke){B(ke)}}function N(J){try{q(c.throw(J))}catch(ke){B(ke)}}function q(J){J.done?v(J.value):_(J.value).then(O,N)}q((c=c.apply(r,n||[])).next())})},r_=function(r,n){var s={label:0,sent:function(){if(v[0]&1)throw v[1];return v[1]},trys:[],ops:[]},c,_,v,B;return B={next:O(0),throw:O(1),return:O(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function O(q){return function(J){return N([q,J])}}function N(q){if(c)throw new TypeError("Generator is already executing.");for(;s;)try{if(c=1,_&&(v=q[0]&2?_.return:q[0]?_.throw||((v=_.return)&&v.call(_),0):_.next)&&!(v=v.call(_,q[1])).done)return v;switch(_=0,v&&(q=[q[0]&2,v.value]),q[0]){case 0:case 1:v=q;break;case 4:return s.label++,{value:q[1],done:!1};case 5:s.label++,_=q[1],q=[0];continue;case 7:q=s.ops.pop(),s.trys.pop();continue;default:if(v=s.trys,!(v=v.length>0&&v[v.length-1])&&(q[0]===6||q[0]===2)){s=0;continue}if(q[0]===3&&(!v||q[1]>v[0]&&q[1]<v[3])){s.label=q[1];break}if(q[0]===6&&s.label<v[1]){s.label=v[1],v=q;break}if(v&&s.label<v[2]){s.label=v[2],s.ops.push(q);break}v[2]&&s.ops.pop(),s.trys.pop();continue}q=n.call(r,s)}catch(J){q=[6,J],_=0}finally{c=v=0}if(q[0]&5)throw q[1];return{value:q[0]?q[1]:void 0,done:!0}}},n_=function(r,n){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(n,s)&&go(n,r,s)},go=Object.create?function(r,n,s,c){c===void 0&&(c=s),Object.defineProperty(r,c,{enumerable:!0,get:function(){return n[s]}})}:function(r,n,s,c){c===void 0&&(c=s),r[c]=n[s]},bo=function(r){var n=typeof Symbol=="function"&&Symbol.iterator,s=n&&r[n],c=0;if(s)return s.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&c>=r.length&&(r=void 0),{value:r&&r[c++],done:!r}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Eu=function(r,n){var s=typeof Symbol=="function"&&r[Symbol.iterator];if(!s)return r;var c=s.call(r),_,v=[],B;try{for(;(n===void 0||n-- >0)&&!(_=c.next()).done;)v.push(_.value)}catch(O){B={error:O}}finally{try{_&&!_.done&&(s=c.return)&&s.call(c)}finally{if(B)throw B.error}}return v},s_=function(){for(var r=[],n=0;n<arguments.length;n++)r=r.concat(Eu(arguments[n]));return r},o_=function(){for(var r=0,n=0,s=arguments.length;n<s;n++)r+=arguments[n].length;for(var c=Array(r),_=0,n=0;n<s;n++)for(var v=arguments[n],B=0,O=v.length;B<O;B++,_++)c[_]=v[B];return c},a_=function(r,n,s){if(s||arguments.length===2)for(var c=0,_=n.length,v;c<_;c++)(v||!(c in n))&&(v||(v=Array.prototype.slice.call(n,0,c)),v[c]=n[c]);return r.concat(v||Array.prototype.slice.call(n))},un=function(r){return this instanceof un?(this.v=r,this):new un(r)},u_=function(r,n,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=s.apply(r,n||[]),_,v=[];return _={},B("next"),B("throw"),B("return"),_[Symbol.asyncIterator]=function(){return this},_;function B(Oe){c[Oe]&&(_[Oe]=function(Ht){return new Promise(function(pt,le){v.push([Oe,Ht,pt,le])>1||O(Oe,Ht)})})}function O(Oe,Ht){try{N(c[Oe](Ht))}catch(pt){ke(v[0][3],pt)}}function N(Oe){Oe.value instanceof un?Promise.resolve(Oe.value.v).then(q,J):ke(v[0][2],Oe)}function q(Oe){O("next",Oe)}function J(Oe){O("throw",Oe)}function ke(Oe,Ht){Oe(Ht),v.shift(),v.length&&O(v[0][0],v[0][1])}},c_=function(r){var n,s;return n={},c("next"),c("throw",function(_){throw _}),c("return"),n[Symbol.iterator]=function(){return this},n;function c(_,v){n[_]=r[_]?function(B){return(s=!s)?{value:un(r[_](B)),done:_==="return"}:v?v(B):B}:v}},l_=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r[Symbol.asyncIterator],s;return n?n.call(r):(r=typeof bo=="function"?bo(r):r[Symbol.iterator](),s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s);function c(v){s[v]=r[v]&&function(B){return new Promise(function(O,N){B=r[v](B),_(O,N,B.done,B.value)})}}function _(v,B,O,N){Promise.resolve(N).then(function(q){v({value:q,done:O})},B)}},d_=function(r,n){return Object.defineProperty?Object.defineProperty(r,"raw",{value:n}):r.raw=n,r};var t=Object.create?function(r,n){Object.defineProperty(r,"default",{enumerable:!0,value:n})}:function(r,n){r.default=n};f_=function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var s in r)s!=="default"&&Object.prototype.hasOwnProperty.call(r,s)&&go(n,r,s);return t(n,r),n},h_=function(r){return r&&r.__esModule?r:{default:r}},p_=function(r,n,s,c){if(s==="a"&&!c)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?r!==n||!c:!n.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?c:s==="a"?c.call(r):c?c.value:n.get(r)},y_=function(r,n,s,c,_){if(c==="m")throw new TypeError("Private method is not writable");if(c==="a"&&!_)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?r!==n||!_:!n.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return c==="a"?_.call(r,s):_?_.value=s:n.set(r,s),s},i("__extends",Jy),i("__assign",Qy),i("__rest",Zy),i("__decorate",Xy),i("__param",e_),i("__metadata",t_),i("__awaiter",i_),i("__generator",r_),i("__exportStar",n_),i("__createBinding",go),i("__values",bo),i("__read",Eu),i("__spread",s_),i("__spreadArrays",o_),i("__spreadArray",a_),i("__await",un),i("__asyncGenerator",u_),i("__asyncDelegator",c_),i("__asyncValues",l_),i("__makeTemplateObject",d_),i("__importStar",f_),i("__importDefault",h_),i("__classPrivateFieldGet",p_),i("__classPrivateFieldSet",y_)})});var Oi=R(__=>{var D={};D.Offset;D.Table;D.SIZEOF_SHORT=2;D.SIZEOF_INT=4;D.FILE_IDENTIFIER_LENGTH=4;D.SIZE_PREFIX_LENGTH=4;D.Encoding={UTF8_BYTES:1,UTF16_STRING:2};D.int32=new Int32Array(2);D.float32=new Float32Array(D.int32.buffer);D.float64=new Float64Array(D.int32.buffer);D.isLittleEndian=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;D.Long=function(i,e){this.low=i|0,this.high=e|0};D.Long.create=function(i,e){return i==0&&e==0?D.Long.ZERO:new D.Long(i,e)};D.Long.prototype.toFloat64=function(){return(this.low>>>0)+this.high*4294967296};D.Long.prototype.equals=function(i){return this.low==i.low&&this.high==i.high};D.Long.ZERO=new D.Long(0,0);D.Builder=function(i){if(i)var e=i;else var e=1024;this.bb=D.ByteBuffer.allocate(e),this.space=e,this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1};D.Builder.prototype.clear=function(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1};D.Builder.prototype.forceDefaults=function(i){this.force_defaults=i};D.Builder.prototype.dataBuffer=function(){return this.bb};D.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())};D.Builder.prototype.prep=function(i,e){i>this.minalign&&(this.minalign=i);for(var t=~(this.bb.capacity()-this.space+e)+1&i-1;this.space<t+i+e;){var r=this.bb.capacity();this.bb=D.Builder.growByteBuffer(this.bb),this.space+=this.bb.capacity()-r}this.pad(t)};D.Builder.prototype.pad=function(i){for(var e=0;e<i;e++)this.bb.writeInt8(--this.space,0)};D.Builder.prototype.writeInt8=function(i){this.bb.writeInt8(this.space-=1,i)};D.Builder.prototype.writeInt16=function(i){this.bb.writeInt16(this.space-=2,i)};D.Builder.prototype.writeInt32=function(i){this.bb.writeInt32(this.space-=4,i)};D.Builder.prototype.writeInt64=function(i){this.bb.writeInt64(this.space-=8,i)};D.Builder.prototype.writeFloat32=function(i){this.bb.writeFloat32(this.space-=4,i)};D.Builder.prototype.writeFloat64=function(i){this.bb.writeFloat64(this.space-=8,i)};D.Builder.prototype.addInt8=function(i){this.prep(1,0),this.writeInt8(i)};D.Builder.prototype.addInt16=function(i){this.prep(2,0),this.writeInt16(i)};D.Builder.prototype.addInt32=function(i){this.prep(4,0),this.writeInt32(i)};D.Builder.prototype.addInt64=function(i){this.prep(8,0),this.writeInt64(i)};D.Builder.prototype.addFloat32=function(i){this.prep(4,0),this.writeFloat32(i)};D.Builder.prototype.addFloat64=function(i){this.prep(8,0),this.writeFloat64(i)};D.Builder.prototype.addFieldInt8=function(i,e,t){(this.force_defaults||e!=t)&&(this.addInt8(e),this.slot(i))};D.Builder.prototype.addFieldInt16=function(i,e,t){(this.force_defaults||e!=t)&&(this.addInt16(e),this.slot(i))};D.Builder.prototype.addFieldInt32=function(i,e,t){(this.force_defaults||e!=t)&&(this.addInt32(e),this.slot(i))};D.Builder.prototype.addFieldInt64=function(i,e,t){(this.force_defaults||!e.equals(t))&&(this.addInt64(e),this.slot(i))};D.Builder.prototype.addFieldFloat32=function(i,e,t){(this.force_defaults||e!=t)&&(this.addFloat32(e),this.slot(i))};D.Builder.prototype.addFieldFloat64=function(i,e,t){(this.force_defaults||e!=t)&&(this.addFloat64(e),this.slot(i))};D.Builder.prototype.addFieldOffset=function(i,e,t){(this.force_defaults||e!=t)&&(this.addOffset(e),this.slot(i))};D.Builder.prototype.addFieldStruct=function(i,e,t){e!=t&&(this.nested(e),this.slot(i))};D.Builder.prototype.nested=function(i){if(i!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")};D.Builder.prototype.notNested=function(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")};D.Builder.prototype.slot=function(i){this.vtable[i]=this.offset()};D.Builder.prototype.offset=function(){return this.bb.capacity()-this.space};D.Builder.growByteBuffer=function(i){var e=i.capacity();if(e&3221225472)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");var t=e<<1,r=D.ByteBuffer.allocate(t);return r.setPosition(t-e),r.bytes().set(i.bytes(),t-e),r};D.Builder.prototype.addOffset=function(i){this.prep(D.SIZEOF_INT,0),this.writeInt32(this.offset()-i+D.SIZEOF_INT)};D.Builder.prototype.startObject=function(i){this.notNested(),this.vtable==null&&(this.vtable=[]),this.vtable_in_use=i;for(var e=0;e<i;e++)this.vtable[e]=0;this.isNested=!0,this.object_start=this.offset()};D.Builder.prototype.endObject=function(){if(this.vtable==null||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);for(var i=this.offset(),e=this.vtable_in_use-1;e>=0&&this.vtable[e]==0;e--);for(var t=e+1;e>=0;e--)this.addInt16(this.vtable[e]!=0?i-this.vtable[e]:0);var r=2;this.addInt16(i-this.object_start);var n=(t+r)*D.SIZEOF_SHORT;this.addInt16(n);var s=0,c=this.space;e:for(e=0;e<this.vtables.length;e++){var _=this.bb.capacity()-this.vtables[e];if(n==this.bb.readInt16(_)){for(var v=D.SIZEOF_SHORT;v<n;v+=D.SIZEOF_SHORT)if(this.bb.readInt16(c+v)!=this.bb.readInt16(_+v))continue e;s=this.vtables[e];break}}return s?(this.space=this.bb.capacity()-i,this.bb.writeInt32(this.space,s-i)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-i,this.offset()-i)),this.isNested=!1,i};D.Builder.prototype.finish=function(i,e,t){var r=t?D.SIZE_PREFIX_LENGTH:0;if(e){var n=e;if(this.prep(this.minalign,D.SIZEOF_INT+D.FILE_IDENTIFIER_LENGTH+r),n.length!=D.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+D.FILE_IDENTIFIER_LENGTH);for(var s=D.FILE_IDENTIFIER_LENGTH-1;s>=0;s--)this.writeInt8(n.charCodeAt(s))}this.prep(this.minalign,D.SIZEOF_INT+r),this.addOffset(i),r&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)};D.Builder.prototype.finishSizePrefixed=function(i,e){this.finish(i,e,!0)};D.Builder.prototype.requiredField=function(i,e){var t=this.bb.capacity()-i,r=t-this.bb.readInt32(t),n=this.bb.readInt16(r+e)!=0;if(!n)throw new Error("FlatBuffers: field "+e+" must be set")};D.Builder.prototype.startVector=function(i,e,t){this.notNested(),this.vector_num_elems=e,this.prep(D.SIZEOF_INT,i*e),this.prep(t,i*e)};D.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()};D.Builder.prototype.createString=function(i){if(i instanceof Uint8Array)var e=i;else for(var e=[],t=0;t<i.length;){var r,n=i.charCodeAt(t++);if(n<55296||n>=56320)r=n;else{var s=i.charCodeAt(t++);r=(n<<10)+s+(65536-(55296<<10)-56320)}r<128?e.push(r):(r<2048?e.push(r>>6&31|192):(r<65536?e.push(r>>12&15|224):e.push(r>>18&7|240,r>>12&63|128),e.push(r>>6&63|128)),e.push(r&63|128))}this.addInt8(0),this.startVector(1,e.length,1),this.bb.setPosition(this.space-=e.length);for(var t=0,c=this.space,_=this.bb.bytes();t<e.length;t++)_[c++]=e[t];return this.endVector()};D.Builder.prototype.createLong=function(i,e){return D.Long.create(i,e)};D.ByteBuffer=function(i){this.bytes_=i,this.position_=0};D.ByteBuffer.allocate=function(i){return new D.ByteBuffer(new Uint8Array(i))};D.ByteBuffer.prototype.clear=function(){this.position_=0};D.ByteBuffer.prototype.bytes=function(){return this.bytes_};D.ByteBuffer.prototype.position=function(){return this.position_};D.ByteBuffer.prototype.setPosition=function(i){this.position_=i};D.ByteBuffer.prototype.capacity=function(){return this.bytes_.length};D.ByteBuffer.prototype.readInt8=function(i){return this.readUint8(i)<<24>>24};D.ByteBuffer.prototype.readUint8=function(i){return this.bytes_[i]};D.ByteBuffer.prototype.readInt16=function(i){return this.readUint16(i)<<16>>16};D.ByteBuffer.prototype.readUint16=function(i){return this.bytes_[i]|this.bytes_[i+1]<<8};D.ByteBuffer.prototype.readInt32=function(i){return this.bytes_[i]|this.bytes_[i+1]<<8|this.bytes_[i+2]<<16|this.bytes_[i+3]<<24};D.ByteBuffer.prototype.readUint32=function(i){return this.readInt32(i)>>>0};D.ByteBuffer.prototype.readInt64=function(i){return new D.Long(this.readInt32(i),this.readInt32(i+4))};D.ByteBuffer.prototype.readUint64=function(i){return new D.Long(this.readUint32(i),this.readUint32(i+4))};D.ByteBuffer.prototype.readFloat32=function(i){return D.int32[0]=this.readInt32(i),D.float32[0]};D.ByteBuffer.prototype.readFloat64=function(i){return D.int32[D.isLittleEndian?0:1]=this.readInt32(i),D.int32[D.isLittleEndian?1:0]=this.readInt32(i+4),D.float64[0]};D.ByteBuffer.prototype.writeInt8=function(i,e){this.bytes_[i]=e};D.ByteBuffer.prototype.writeUint8=function(i,e){this.bytes_[i]=e};D.ByteBuffer.prototype.writeInt16=function(i,e){this.bytes_[i]=e,this.bytes_[i+1]=e>>8};D.ByteBuffer.prototype.writeUint16=function(i,e){this.bytes_[i]=e,this.bytes_[i+1]=e>>8};D.ByteBuffer.prototype.writeInt32=function(i,e){this.bytes_[i]=e,this.bytes_[i+1]=e>>8,this.bytes_[i+2]=e>>16,this.bytes_[i+3]=e>>24};D.ByteBuffer.prototype.writeUint32=function(i,e){this.bytes_[i]=e,this.bytes_[i+1]=e>>8,this.bytes_[i+2]=e>>16,this.bytes_[i+3]=e>>24};D.ByteBuffer.prototype.writeInt64=function(i,e){this.writeInt32(i,e.low),this.writeInt32(i+4,e.high)};D.ByteBuffer.prototype.writeUint64=function(i,e){this.writeUint32(i,e.low),this.writeUint32(i+4,e.high)};D.ByteBuffer.prototype.writeFloat32=function(i,e){D.float32[0]=e,this.writeInt32(i,D.int32[0])};D.ByteBuffer.prototype.writeFloat64=function(i,e){D.float64[0]=e,this.writeInt32(i,D.int32[D.isLittleEndian?0:1]),this.writeInt32(i+4,D.int32[D.isLittleEndian?1:0])};D.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length<this.position_+D.SIZEOF_INT+D.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");for(var i="",e=0;e<D.FILE_IDENTIFIER_LENGTH;e++)i+=String.fromCharCode(this.readInt8(this.position_+D.SIZEOF_INT+e));return i};D.ByteBuffer.prototype.__offset=function(i,e){var t=i-this.readInt32(i);return e<this.readInt16(t)?this.readInt16(t+e):0};D.ByteBuffer.prototype.__union=function(i,e){return i.bb_pos=e+this.readInt32(e),i.bb=this,i};D.ByteBuffer.prototype.__string=function(i,e){i+=this.readInt32(i);var t=this.readInt32(i),r="",n=0;if(i+=D.SIZEOF_INT,e===D.Encoding.UTF8_BYTES)return this.bytes_.subarray(i,i+t);for(;n<t;){var s,c=this.readUint8(i+n++);if(c<192)s=c;else{var _=this.readUint8(i+n++);if(c<224)s=(c&31)<<6|_&63;else{var v=this.readUint8(i+n++);if(c<240)s=(c&15)<<12|(_&63)<<6|v&63;else{var B=this.readUint8(i+n++);s=(c&7)<<18|(_&63)<<12|(v&63)<<6|B&63}}}s<65536?r+=String.fromCharCode(s):(s-=65536,r+=String.fromCharCode((s>>10)+55296,(s&(1<<10)-1)+56320))}return r};D.ByteBuffer.prototype.__indirect=function(i){return i+this.readInt32(i)};D.ByteBuffer.prototype.__vector=function(i){return i+this.readInt32(i)+D.SIZEOF_INT};D.ByteBuffer.prototype.__vector_len=function(i){return this.readInt32(i+this.readInt32(i))};D.ByteBuffer.prototype.__has_identifier=function(i){if(i.length!=D.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+D.FILE_IDENTIFIER_LENGTH);for(var e=0;e<D.FILE_IDENTIFIER_LENGTH;e++)if(i.charCodeAt(e)!=this.readInt8(this.position_+D.SIZEOF_INT+e))return!1;return!0};D.ByteBuffer.prototype.createLong=function(i,e){return D.Long.create(i,e)};__.flatbuffers=D});var Cr=R(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.encodeUtf8=cn.decodeUtf8=void 0;var B1=new TextDecoder("utf-8");cn.decodeUtf8=i=>B1.decode(i);var S1=new TextEncoder;cn.encodeUtf8=i=>S1.encode(i)});var ln=R(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.AsyncQueue=vt.ReadableInterop=vt.ArrowJSON=vt.ITERATOR_DONE=void 0;var _s=dt(),m_=ms();vt.ITERATOR_DONE=Object.freeze({done:!0,value:void 0});var b_=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}};vt.ArrowJSON=b_;var Ru=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())}};vt.ReadableInterop=Ru;var g_=class extends Ru{constructor(){super();this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return _s.__awaiter(this,void 0,void 0,function*(){yield this.return(e)})}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){let{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(vt.ITERATOR_DONE);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return m_.default.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return m_.default.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return _s.__awaiter(this,void 0,void 0,function*(){return yield this.abort(e),vt.ITERATOR_DONE})}return(e){return _s.__awaiter(this,void 0,void 0,function*(){return yield this.close(),vt.ITERATOR_DONE})}read(e){return _s.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return _s.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((t,r)=>{this.resolvers.push({resolve:t,reject:r})}):Promise.resolve(vt.ITERATOR_DONE)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}};vt.AsyncQueue=g_});var ft=R(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.isReadableNodeStream=z.isWritableNodeStream=z.isReadableDOMStream=z.isWritableDOMStream=z.isFetchResponse=z.isFSReadStream=z.isFileHandle=z.isUnderlyingSink=z.isIteratorResult=z.isArrayLike=z.isArrowJSON=z.isAsyncIterable=z.isIterable=z.isObservable=z.isPromise=z.isObject=z.BigUint64ArrayAvailable=z.BigUint64Array=z.BigInt64ArrayAvailable=z.BigInt64Array=z.BigIntAvailable=z.BigInt=void 0;var wo=ln(),[A1,O1]=(()=>{let i=()=>{throw new Error("BigInt is not available in this environment")};function e(){throw i()}return e.asIntN=()=>{throw i()},e.asUintN=()=>{throw i()},typeof BigInt!="undefined"?[BigInt,!0]:[e,!1]})();z.BigInt=A1;z.BigIntAvailable=O1;var[D1,F1]=(()=>{let i=()=>{throw new Error("BigInt64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw i()}static from(){throw i()}constructor(){throw i()}}return typeof BigInt64Array!="undefined"?[BigInt64Array,!0]:[e,!1]})();z.BigInt64Array=D1;z.BigInt64ArrayAvailable=F1;var[E1,R1]=(()=>{let i=()=>{throw new Error("BigUint64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw i()}static from(){throw i()}constructor(){throw i()}}return typeof BigUint64Array!="undefined"?[BigUint64Array,!0]:[e,!1]})();z.BigUint64Array=E1;z.BigUint64ArrayAvailable=R1;var Cu=i=>typeof i=="number",v_=i=>typeof i=="boolean",at=i=>typeof i=="function";z.isObject=i=>i!=null&&Object(i)===i;z.isPromise=i=>z.isObject(i)&&at(i.then);z.isObservable=i=>z.isObject(i)&&at(i.subscribe);z.isIterable=i=>z.isObject(i)&&at(i[Symbol.iterator]);z.isAsyncIterable=i=>z.isObject(i)&&at(i[Symbol.asyncIterator]);z.isArrowJSON=i=>z.isObject(i)&&z.isObject(i.schema);z.isArrayLike=i=>z.isObject(i)&&Cu(i.length);z.isIteratorResult=i=>z.isObject(i)&&"done"in i&&"value"in i;z.isUnderlyingSink=i=>z.isObject(i)&&at(i.abort)&&at(i.close)&&at(i.start)&&at(i.write);z.isFileHandle=i=>z.isObject(i)&&at(i.stat)&&Cu(i.fd);z.isFSReadStream=i=>z.isReadableNodeStream(i)&&Cu(i.bytesRead);z.isFetchResponse=i=>z.isObject(i)&&z.isReadableDOMStream(i.body);z.isWritableDOMStream=i=>z.isObject(i)&&at(i.abort)&&at(i.getWriter)&&!(i instanceof wo.ReadableInterop);z.isReadableDOMStream=i=>z.isObject(i)&&at(i.cancel)&&at(i.getReader)&&!(i instanceof wo.ReadableInterop);z.isWritableNodeStream=i=>z.isObject(i)&&at(i.end)&&at(i.write)&&v_(i.writable)&&!(i instanceof wo.ReadableInterop);z.isReadableNodeStream=i=>z.isObject(i)&&at(i.read)&&at(i.pipe)&&v_(i.readable)&&!(i instanceof wo.ReadableInterop)});var Ze=R(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.compareArrayLike=L.rebaseValueOffsets=L.toUint8ClampedArrayAsyncIterator=L.toFloat64ArrayAsyncIterator=L.toFloat32ArrayAsyncIterator=L.toUint32ArrayAsyncIterator=L.toUint16ArrayAsyncIterator=L.toUint8ArrayAsyncIterator=L.toInt32ArrayAsyncIterator=L.toInt16ArrayAsyncIterator=L.toInt8ArrayAsyncIterator=L.toArrayBufferViewAsyncIterator=L.toUint8ClampedArrayIterator=L.toFloat64ArrayIterator=L.toFloat32ArrayIterator=L.toUint32ArrayIterator=L.toUint16ArrayIterator=L.toUint8ArrayIterator=L.toInt32ArrayIterator=L.toInt16ArrayIterator=L.toInt8ArrayIterator=L.toArrayBufferViewIterator=L.toUint8ClampedArray=L.toFloat64Array=L.toFloat32Array=L.toBigUint64Array=L.toUint32Array=L.toUint16Array=L.toUint8Array=L.toBigInt64Array=L.toInt32Array=L.toInt16Array=L.toInt8Array=L.toArrayBufferView=L.joinUint8Arrays=L.memcpy=void 0;var Ge=dt(),C1=Oi(),U1=Cr(),k1=C1.flatbuffers.ByteBuffer,Ur=ft(),Uu=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:ArrayBuffer;function M1(i){let e=i[0]?[i[0]]:[],t,r,n,s;for(let c,_,v=0,B=0,O=i.length;++v<O;){if(c=e[B],_=i[v],!c||!_||c.buffer!==_.buffer||_.byteOffset<c.byteOffset){_&&(e[++B]=_);continue}if({byteOffset:t,byteLength:n}=c,{byteOffset:r,byteLength:s}=_,t+n<r||r+s<t){_&&(e[++B]=_);continue}e[B]=new Uint8Array(c.buffer,t,r-t+s)}return e}function ku(i,e,t=0,r=e.byteLength){let n=i.byteLength,s=new Uint8Array(i.buffer,i.byteOffset,n),c=new Uint8Array(e.buffer,e.byteOffset,Math.min(r,n));return s.set(c,t),i}L.memcpy=ku;function P1(i,e){let t=M1(i),r=t.reduce((O,N)=>O+N.byteLength,0),n,s,c,_=0,v=-1,B=Math.min(e||1/0,r);for(let O=t.length;++v<O;){if(n=t[v],s=n.subarray(0,Math.min(n.length,B-_)),B<=_+s.length){s.length<n.length?t[v]=n.subarray(s.length):s.length===n.length&&v++,c?ku(c,s,_):c=s;break}ku(c||(c=new Uint8Array(B)),s,_),_+=s.length}return[c||new Uint8Array(0),t.slice(v),r-(c?c.byteLength:0)]}L.joinUint8Arrays=P1;function _t(i,e){let t=Ur.isIteratorResult(e)?e.value:e;return t instanceof i?i===Uint8Array?new i(t.buffer,t.byteOffset,t.byteLength):t:t?(typeof t=="string"&&(t=U1.encodeUtf8(t)),t instanceof ArrayBuffer?new i(t):t instanceof Uu?new i(t):t instanceof k1?_t(i,t.bytes()):ArrayBuffer.isView(t)?t.byteLength<=0?new i(0):new i(t.buffer,t.byteOffset,t.byteLength/i.BYTES_PER_ELEMENT):i.from(t)):new i(0)}L.toArrayBufferView=_t;L.toInt8Array=i=>_t(Int8Array,i);L.toInt16Array=i=>_t(Int16Array,i);L.toInt32Array=i=>_t(Int32Array,i);L.toBigInt64Array=i=>_t(Ur.BigInt64Array,i);L.toUint8Array=i=>_t(Uint8Array,i);L.toUint16Array=i=>_t(Uint16Array,i);L.toUint32Array=i=>_t(Uint32Array,i);L.toBigUint64Array=i=>_t(Ur.BigUint64Array,i);L.toFloat32Array=i=>_t(Float32Array,i);L.toFloat64Array=i=>_t(Float64Array,i);L.toUint8ClampedArray=i=>_t(Uint8ClampedArray,i);var Mu=i=>(i.next(),i);function*oi(i,e){let t=function*(n){yield n},r=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Uu?t(e):Ur.isIterable(e)?e:t(e);return yield*Mu(function*(n){let s=null;do s=n.next(yield _t(i,s));while(!s.done)}(r[Symbol.iterator]())),new i}L.toArrayBufferViewIterator=oi;L.toInt8ArrayIterator=i=>oi(Int8Array,i);L.toInt16ArrayIterator=i=>oi(Int16Array,i);L.toInt32ArrayIterator=i=>oi(Int32Array,i);L.toUint8ArrayIterator=i=>oi(Uint8Array,i);L.toUint16ArrayIterator=i=>oi(Uint16Array,i);L.toUint32ArrayIterator=i=>oi(Uint32Array,i);L.toFloat32ArrayIterator=i=>oi(Float32Array,i);L.toFloat64ArrayIterator=i=>oi(Float64Array,i);L.toUint8ClampedArrayIterator=i=>oi(Uint8ClampedArray,i);function Gt(i,e){return Ge.__asyncGenerator(this,arguments,function*(){if(Ur.isPromise(e))return yield Ge.__await(yield Ge.__await(yield*Ge.__asyncDelegator(Ge.__asyncValues(Gt(i,yield Ge.__await(e))))));let r=function(c){return Ge.__asyncGenerator(this,arguments,function*(){yield yield Ge.__await(yield Ge.__await(c))})},n=function(c){return Ge.__asyncGenerator(this,arguments,function*(){yield Ge.__await(yield*Ge.__asyncDelegator(Ge.__asyncValues(Mu(function*(_){let v=null;do v=_.next(yield v==null?void 0:v.value);while(!v.done)}(c[Symbol.iterator]())))))})},s=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Uu?r(e):Ur.isIterable(e)?n(e):Ur.isAsyncIterable(e)?e:r(e);return yield Ge.__await(yield*Ge.__asyncDelegator(Ge.__asyncValues(Mu(function(c){return Ge.__asyncGenerator(this,arguments,function*(){let _=null;do _=yield Ge.__await(c.next(yield yield Ge.__await(_t(i,_))));while(!_.done)})}(s[Symbol.asyncIterator]()))))),yield Ge.__await(new i)})}L.toArrayBufferViewAsyncIterator=Gt;L.toInt8ArrayAsyncIterator=i=>Gt(Int8Array,i);L.toInt16ArrayAsyncIterator=i=>Gt(Int16Array,i);L.toInt32ArrayAsyncIterator=i=>Gt(Int32Array,i);L.toUint8ArrayAsyncIterator=i=>Gt(Uint8Array,i);L.toUint16ArrayAsyncIterator=i=>Gt(Uint16Array,i);L.toUint32ArrayAsyncIterator=i=>Gt(Uint32Array,i);L.toFloat32ArrayAsyncIterator=i=>Gt(Float32Array,i);L.toFloat64ArrayAsyncIterator=i=>Gt(Float64Array,i);L.toUint8ClampedArrayAsyncIterator=i=>Gt(Uint8ClampedArray,i);function V1(i,e,t){if(i!==0){t=t.slice(0,e+1);for(let r=-1;++r<=e;)t[r]+=i}return t}L.rebaseValueOffsets=V1;function N1(i,e){let t=0,r=i.length;if(r!==e.length)return!1;if(r>0)do if(i[t]!==e[t])return!1;while(++t<r);return!0}L.compareArrayLike=N1});var ms=R(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});var je=dt(),mt=Ze();Vu.default={fromIterable(i){return jo(L1(i))},fromAsyncIterable(i){return jo(x1(i))},fromDOMStream(i){return jo(q1(i))},fromNodeStream(i){return jo(W1(i))},toDOMStream(i,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(i,e){throw new Error('"toNodeStream" not available in this environment')}};var jo=i=>(i.next(),i);function*L1(i){let e,t=!1,r=[],n,s,c,_=0;function v(){return s==="peek"?mt.joinUint8Arrays(r,c)[0]:([n,r,_]=mt.joinUint8Arrays(r,c),n)}({cmd:s,size:c}=yield null);let B=mt.toUint8ArrayIterator(i)[Symbol.iterator]();try{do if({done:e,value:n}=isNaN(c-_)?B.next(void 0):B.next(c-_),!e&&n.byteLength>0&&(r.push(n),_+=n.byteLength),e||c<=_)do({cmd:s,size:c}=yield v());while(c<_);while(!e)}catch(O){(t=!0)&&typeof B.throw=="function"&&B.throw(O)}finally{t===!1&&typeof B.return=="function"&&B.return(null)}return null}function x1(i){return je.__asyncGenerator(this,arguments,function*(){let t,r=!1,n=[],s,c,_,v=0;function B(){return c==="peek"?mt.joinUint8Arrays(n,_)[0]:([s,n,v]=mt.joinUint8Arrays(n,_),s)}({cmd:c,size:_}=yield yield je.__await(null));let O=mt.toUint8ArrayAsyncIterator(i)[Symbol.asyncIterator]();try{do if({done:t,value:s}=isNaN(_-v)?yield je.__await(O.next(void 0)):yield je.__await(O.next(_-v)),!t&&s.byteLength>0&&(n.push(s),v+=s.byteLength),t||_<=v)do({cmd:c,size:_}=yield yield je.__await(B()));while(_<v);while(!t)}catch(N){(r=!0)&&typeof O.throw=="function"&&(yield je.__await(O.throw(N)))}finally{r===!1&&typeof O.return=="function"&&(yield je.__await(O.return(new Uint8Array(0))))}return yield je.__await(null)})}function q1(i){return je.__asyncGenerator(this,arguments,function*(){let t=!1,r=!1,n=[],s,c,_,v=0;function B(){return c==="peek"?mt.joinUint8Arrays(n,_)[0]:([s,n,v]=mt.joinUint8Arrays(n,_),s)}({cmd:c,size:_}=yield yield je.__await(null));let O=new w_(i);try{do if({done:t,value:s}=isNaN(_-v)?yield je.__await(O.read(void 0)):yield je.__await(O.read(_-v)),!t&&s.byteLength>0&&(n.push(mt.toUint8Array(s)),v+=s.byteLength),t||_<=v)do({cmd:c,size:_}=yield yield je.__await(B()));while(_<v);while(!t)}catch(N){(r=!0)&&(yield je.__await(O.cancel(N)))}finally{r===!1?yield je.__await(O.cancel()):i.locked&&O.releaseLock()}return yield je.__await(null)})}var w_=class{constructor(e){this.source=e,this.byobReader=null,this.defaultReader=null;try{this.supportsBYOB=!!(this.reader=this.getBYOBReader())}catch(t){this.supportsBYOB=!(this.reader=this.getDefaultReader())}}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=this.byobReader=this.defaultReader=null}cancel(e){return je.__awaiter(this,void 0,void 0,function*(){let{reader:t,source:r}=this;t&&(yield t.cancel(e).catch(()=>{})),r&&r.locked&&this.releaseLock()})}read(e){return je.__awaiter(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};let t=!this.supportsBYOB||typeof e!="number"?yield this.getDefaultReader().read():yield this.readFromBYOBReader(e);return!t.done&&(t.value=mt.toUint8Array(t)),t})}getDefaultReader(){return this.byobReader&&this.releaseLock(),this.defaultReader||(this.defaultReader=this.source.getReader(),this.defaultReader.closed.catch(()=>{})),this.reader=this.defaultReader}getBYOBReader(){return this.defaultReader&&this.releaseLock(),this.byobReader||(this.byobReader=this.source.getReader({mode:"byob"}),this.byobReader.closed.catch(()=>{})),this.reader=this.byobReader}readFromBYOBReader(e){return je.__awaiter(this,void 0,void 0,function*(){return yield j_(this.getBYOBReader(),new ArrayBuffer(e),0,e)})}};function j_(i,e,t,r){return je.__awaiter(this,void 0,void 0,function*(){if(t>=r)return{done:!1,value:new Uint8Array(e,0,r)};let{done:n,value:s}=yield i.read(new Uint8Array(e,t,r-t));return(t+=s.byteLength)<r&&!n?yield j_(i,s.buffer,t,r):{done:n,value:new Uint8Array(s.buffer,0,t)}})}var Pu=(i,e)=>{let t=n=>r([e,n]),r;return[e,t,new Promise(n=>(r=n)&&i.once(e,t))]};function W1(i){return je.__asyncGenerator(this,arguments,function*(){let t=[],r="error",n=!1,s=null,c,_,v=0,B=[],O;function N(){return c==="peek"?mt.joinUint8Arrays(B,_)[0]:([O,B,v]=mt.joinUint8Arrays(B,_),O)}if({cmd:c,size:_}=yield yield je.__await(null),i.isTTY)return yield yield je.__await(new Uint8Array(0)),yield je.__await(null);try{t[0]=Pu(i,"end"),t[1]=Pu(i,"error");do{if(t[2]=Pu(i,"readable"),[r,s]=yield je.__await(Promise.race(t.map(J=>J[2]))),r==="error")break;if((n=r==="end")||(isFinite(_-v)?(O=mt.toUint8Array(i.read(_-v)),O.byteLength<_-v&&(O=mt.toUint8Array(i.read(void 0)))):O=mt.toUint8Array(i.read(void 0)),O.byteLength>0&&(B.push(O),v+=O.byteLength)),n||_<=v)do({cmd:c,size:_}=yield yield je.__await(N()));while(_<v)}while(!n)}finally{yield je.__await(q(t,r==="error"?s:null))}return yield je.__await(null);function q(J,ke){return O=B=null,new Promise((Oe,Ht)=>{for(let[pt,le]of J)i.off(pt,le);try{let pt=i.destroy;pt&&pt.call(i,ke),ke=void 0}catch(pt){ke=pt||ke}finally{ke!=null?Ht(ke):Oe()}})}})}});var qe=R(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.Vector=dn.AbstractVector=void 0;var Io=class{};dn.AbstractVector=Io;dn.Vector=Io;Io.prototype.data=null});var Zi=R(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.Schema=V.Buffer=V.Field=V.DictionaryEncoding=V.KeyValue=V.Duration=V.Interval=V.Timestamp=V.Time=V.Date=V.Decimal=V.Bool=V.FixedSizeBinary=V.LargeBinary=V.LargeUtf8=V.Binary=V.Utf8=V.FloatingPoint=V.Int=V.Union=V.Map=V.FixedSizeList=V.LargeList=V.List=V.Struct_=V.Null=V.Endianness=V.DictionaryKind=V.Type=V.IntervalUnit=V.TimeUnit=V.DateUnit=V.Precision=V.UnionMode=V.Feature=V.MetadataVersion=void 0;var De=Oi(),z1;(function(i){i[i.V1=0]="V1",i[i.V2=1]="V2",i[i.V3=2]="V3",i[i.V4=3]="V4",i[i.V5=4]="V5"})(z1=V.MetadataVersion||(V.MetadataVersion={}));var H1;(function(i){i[i.UNUSED=0]="UNUSED",i[i.DICTIONARY_REPLACEMENT=1]="DICTIONARY_REPLACEMENT",i[i.COMPRESSED_BODY=2]="COMPRESSED_BODY"})(H1=V.Feature||(V.Feature={}));var Nu;(function(i){i[i.Sparse=0]="Sparse",i[i.Dense=1]="Dense"})(Nu=V.UnionMode||(V.UnionMode={}));var Lu;(function(i){i[i.HALF=0]="HALF",i[i.SINGLE=1]="SINGLE",i[i.DOUBLE=2]="DOUBLE"})(Lu=V.Precision||(V.Precision={}));var xu;(function(i){i[i.DAY=0]="DAY",i[i.MILLISECOND=1]="MILLISECOND"})(xu=V.DateUnit||(V.DateUnit={}));var kr;(function(i){i[i.SECOND=0]="SECOND",i[i.MILLISECOND=1]="MILLISECOND",i[i.MICROSECOND=2]="MICROSECOND",i[i.NANOSECOND=3]="NANOSECOND"})(kr=V.TimeUnit||(V.TimeUnit={}));var qu;(function(i){i[i.YEAR_MONTH=0]="YEAR_MONTH",i[i.DAY_TIME=1]="DAY_TIME"})(qu=V.IntervalUnit||(V.IntervalUnit={}));var Wu;(function(i){i[i.NONE=0]="NONE",i[i.Null=1]="Null",i[i.Int=2]="Int",i[i.FloatingPoint=3]="FloatingPoint",i[i.Binary=4]="Binary",i[i.Utf8=5]="Utf8",i[i.Bool=6]="Bool",i[i.Decimal=7]="Decimal",i[i.Date=8]="Date",i[i.Time=9]="Time",i[i.Timestamp=10]="Timestamp",i[i.Interval=11]="Interval",i[i.List=12]="List",i[i.Struct_=13]="Struct_",i[i.Union=14]="Union",i[i.FixedSizeBinary=15]="FixedSizeBinary",i[i.FixedSizeList=16]="FixedSizeList",i[i.Map=17]="Map",i[i.Duration=18]="Duration",i[i.LargeBinary=19]="LargeBinary",i[i.LargeUtf8=20]="LargeUtf8",i[i.LargeList=21]="LargeList"})(Wu=V.Type||(V.Type={}));var zu;(function(i){i[i.DenseArray=0]="DenseArray"})(zu=V.DictionaryKind||(V.DictionaryKind={}));var Hu;(function(i){i[i.Little=0]="Little",i[i.Big=1]="Big"})(Hu=V.Endianness||(V.Endianness={}));var Mr=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 Mr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Mr).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return Mr.startNull(e),Mr.endNull(e)}};V.Null=Mr;var Pr=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 Pr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Pr).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return Pr.startStruct_(e),Pr.endStruct_(e)}};V.Struct_=Pr;var Vr=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 Vr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Vr).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return Vr.startList(e),Vr.endList(e)}};V.List=Vr;var Nr=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 Nr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeList(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Nr).__init(e.readInt32(e.position())+e.position(),e)}static startLargeList(e){e.startObject(0)}static endLargeList(e){return e.endObject()}static createLargeList(e){return Nr.startLargeList(e),Nr.endLargeList(e)}};V.LargeList=Nr;var Hi=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 Hi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Hi).__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 Hi.startFixedSizeList(e),Hi.addListSize(e,t),Hi.endFixedSizeList(e)}};V.FixedSizeList=Hi;var Yi=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 Yi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Yi).__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 Yi.startMap(e),Yi.addKeysSorted(e,t),Yi.endMap(e)}};V.Map=Yi;var Di=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUnion(e,t){return(t||new Di).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Di).__init(e.readInt32(e.position())+e.position(),e)}mode(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Nu.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,Nu.Sparse)}static addTypeIds(e,t){e.addFieldOffset(1,t,0)}static createTypeIdsVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addInt32(t[r]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(e,t,r){return Di.startUnion(e),Di.addMode(e,t),Di.addTypeIds(e,r),Di.endUnion(e)}};V.Union=Di;var ai=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 ai).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ai).__init(e.readInt32(e.position())+e.position(),e)}bitWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startInt(e){e.startObject(2)}static addBitWidth(e,t){e.addFieldInt32(0,t,0)}static addIsSigned(e,t){e.addFieldInt8(1,+t,0)}static endInt(e){return e.endObject()}static createInt(e,t,r){return ai.startInt(e),ai.addBitWidth(e,t),ai.addIsSigned(e,r),ai.endInt(e)}};V.Int=ai;var Gi=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 Gi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Gi).__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):Lu.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,Lu.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,t){return Gi.startFloatingPoint(e),Gi.addPrecision(e,t),Gi.endFloatingPoint(e)}};V.FloatingPoint=Gi;var Lr=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 Lr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Lr).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return Lr.startUtf8(e),Lr.endUtf8(e)}};V.Utf8=Lr;var xr=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 xr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new xr).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return xr.startBinary(e),xr.endBinary(e)}};V.Binary=xr;var qr=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 qr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new qr).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return qr.startLargeUtf8(e),qr.endLargeUtf8(e)}};V.LargeUtf8=qr;var Wr=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 Wr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Wr).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return Wr.startLargeBinary(e),Wr.endLargeBinary(e)}};V.LargeBinary=Wr;var Ki=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 Ki).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ki).__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 Ki.startFixedSizeBinary(e),Ki.addByteWidth(e,t),Ki.endFixedSizeBinary(e)}};V.FixedSizeBinary=Ki;var zr=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 zr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new zr).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return zr.startBool(e),zr.endBool(e)}};V.Bool=zr;var ui=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 ui).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ui).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,t){e.addFieldInt32(0,t,0)}static addScale(e,t){e.addFieldInt32(1,t,0)}static addBitWidth(e,t){e.addFieldInt32(2,t,128)}static endDecimal(e){return e.endObject()}static createDecimal(e,t,r,n){return ui.startDecimal(e),ui.addPrecision(e,t),ui.addScale(e,r),ui.addBitWidth(e,n),ui.endDecimal(e)}};V.Decimal=ui;var $i=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 $i).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new $i).__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):xu.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,xu.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,t){return $i.startDate(e),$i.addUnit(e,t),$i.endDate(e)}};V.Date=$i;var Fi=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 Fi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Fi).__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):kr.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,kr.MILLISECOND)}static addBitWidth(e,t){e.addFieldInt32(1,t,32)}static endTime(e){return e.endObject()}static createTime(e,t,r){return Fi.startTime(e),Fi.addUnit(e,t),Fi.addBitWidth(e,r),Fi.endTime(e)}};V.Time=Fi;var Ei=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 Ei).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ei).__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):kr.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,kr.SECOND)}static addTimezone(e,t){e.addFieldOffset(1,t,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,t,r){return Ei.startTimestamp(e),Ei.addUnit(e,t),Ei.addTimezone(e,r),Ei.endTimestamp(e)}};V.Timestamp=Ei;var Ji=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 Ji).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ji).__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):qu.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,qu.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,t){return Ji.startInterval(e),Ji.addUnit(e,t),Ji.endInterval(e)}};V.Interval=Ji;var Qi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDuration(e,t){return(t||new Qi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Qi).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):kr.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,kr.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(e,t){return Qi.startDuration(e),Qi.addUnit(e,t),Qi.endDuration(e)}};V.Duration=Qi;var Kt=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 Kt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Kt).__init(e.readInt32(e.position())+e.position(),e)}key(e){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}value(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startKeyValue(e){e.startObject(2)}static addKey(e,t){e.addFieldOffset(0,t,0)}static addValue(e,t){e.addFieldOffset(1,t,0)}static endKeyValue(e){return e.endObject()}static createKeyValue(e,t,r){return Kt.startKeyValue(e),Kt.addKey(e,t),Kt.addValue(e,r),Kt.endKeyValue(e)}};V.KeyValue=Kt;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()+De.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 ai).__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):zu.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,zu.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}static createDictionaryEncoding(e,t,r,n,s){return Bt.startDictionaryEncoding(e),Bt.addId(e,t),Bt.addIndexType(e,r),Bt.addIsOrdered(e,n),Bt.addDictionaryKind(e,s),Bt.endDictionaryEncoding(e)}};V.DictionaryEncoding=Bt;var ht=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 ht).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ht).__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):Wu.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 r=this.bb.__offset(this.bb_pos,14);return r?(t||new ht).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}childrenLength(){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let r=this.bb.__offset(this.bb_pos,16);return r?(t||new Kt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,t){e.addFieldOffset(0,t,0)}static addNullable(e,t){e.addFieldInt8(1,+t,0)}static addTypeType(e,t){e.addFieldInt8(2,t,Wu.NONE)}static addType(e,t){e.addFieldOffset(3,t,0)}static addDictionary(e,t){e.addFieldOffset(4,t,0)}static addChildren(e,t){e.addFieldOffset(5,t,0)}static createChildrenVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startChildrenVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(6,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}static createField(e,t,r,n,s,c,_,v){return ht.startField(e),ht.addName(e,t),ht.addNullable(e,r),ht.addTypeType(e,n),ht.addType(e,s),ht.addDictionary(e,c),ht.addChildren(e,_),ht.addCustomMetadata(e,v),ht.endField(e)}};V.Field=ht;var I_=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static createBuffer(e,t,r){return e.prep(8,16),e.writeInt64(r),e.writeInt64(t),e.offset()}};V.Buffer=I_;var $t=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(e,t){return(t||new $t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new $t).__init(e.readInt32(e.position())+e.position(),e)}endianness(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Hu.Little}fields(e,t){let r=this.bb.__offset(this.bb_pos,6);return r?(t||new ht).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}fieldsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let r=this.bb.__offset(this.bb_pos,8);return r?(t||new Kt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+e*8):this.bb.createLong(0,0)}featuresLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,Hu.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let r=t.length-1;r>=0;r--)e.addInt64(t[r]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(e,t,r,n,s){return $t.startSchema(e),$t.addEndianness(e,t),$t.addFields(e,r),$t.addCustomMetadata(e,n),$t.addFeatures(e,s),$t.endSchema(e)}};V.Schema=$t});var So=R(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.Message=We.DictionaryBatch=We.RecordBatch=We.BodyCompression=We.FieldNode=We.MessageHeader=We.BodyCompressionMethod=We.CompressionType=void 0;var To=Oi(),Bo=Zi(),Yu;(function(i){i[i.LZ4_FRAME=0]="LZ4_FRAME",i[i.ZSTD=1]="ZSTD"})(Yu=We.CompressionType||(We.CompressionType={}));var Gu;(function(i){i[i.BUFFER=0]="BUFFER"})(Gu=We.BodyCompressionMethod||(We.BodyCompressionMethod={}));var Ku;(function(i){i[i.NONE=0]="NONE",i[i.Schema=1]="Schema",i[i.DictionaryBatch=2]="DictionaryBatch",i[i.RecordBatch=3]="RecordBatch",i[i.Tensor=4]="Tensor",i[i.SparseTensor=5]="SparseTensor"})(Ku=We.MessageHeader||(We.MessageHeader={}));var $u=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static createFieldNode(e,t,r){return e.prep(8,16),e.writeInt64(r),e.writeInt64(t),e.offset()}};We.FieldNode=$u;var ci=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 ci).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,t){return e.setPosition(e.position()+To.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ci).__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):Yu.LZ4_FRAME}method(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):Gu.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,Yu.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,Gu.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,t,r){return ci.startBodyCompression(e),ci.addCodec(e,t),ci.addMethod(e,r),ci.endBodyCompression(e)}};We.BodyCompression=ci;var St=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 St).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,t){return e.setPosition(e.position()+To.flatbuffers.SIZE_PREFIX_LENGTH),(t||new St).__init(e.readInt32(e.position())+e.position(),e)}length(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}nodes(e,t){let r=this.bb.__offset(this.bb_pos,6);return r?(t||new $u).__init(this.bb.__vector(this.bb_pos+r)+e*16,this.bb):null}nodesLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,t){let r=this.bb.__offset(this.bb_pos,8);return r?(t||new Bo.Buffer).__init(this.bb.__vector(this.bb_pos+r)+e*16,this.bb):null}buffersLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){let t=this.bb.__offset(this.bb_pos,10);return t?(e||new ci).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addNodes(e,t){e.addFieldOffset(1,t,0)}static startNodesVector(e,t){e.startVector(16,t,8)}static addBuffers(e,t){e.addFieldOffset(2,t,0)}static startBuffersVector(e,t){e.startVector(16,t,8)}static addCompression(e,t){e.addFieldOffset(3,t,0)}static endRecordBatch(e){return e.endObject()}static createRecordBatch(e,t,r,n,s){return St.startRecordBatch(e),St.addLength(e,t),St.addNodes(e,r),St.addBuffers(e,n),St.addCompression(e,s),St.endRecordBatch(e)}};We.RecordBatch=St;var li=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 li).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,t){return e.setPosition(e.position()+To.flatbuffers.SIZE_PREFIX_LENGTH),(t||new li).__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 St).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isDelta(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startDictionaryBatch(e){e.startObject(3)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addData(e,t){e.addFieldOffset(1,t,0)}static addIsDelta(e,t){e.addFieldInt8(2,+t,0)}static endDictionaryBatch(e){return e.endObject()}static createDictionaryBatch(e,t,r,n){return li.startDictionaryBatch(e),li.addId(e,t),li.addData(e,r),li.addIsDelta(e,n),li.endDictionaryBatch(e)}};We.DictionaryBatch=li;var At=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 At).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+To.flatbuffers.SIZE_PREFIX_LENGTH),(t||new At).__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):Bo.MetadataVersion.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):Ku.NONE}header(e){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}customMetadata(e,t){let r=this.bb.__offset(this.bb_pos,12);return r?(t||new Bo.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,Bo.MetadataVersion.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,Ku.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,e.createLong(0,0))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(e,t,r,n,s,c){return At.startMessage(e),At.addVersion(e,t),At.addHeaderType(e,r),At.addHeader(e,n),At.addBodyLength(e,s),At.addCustomMetadata(e,c),At.endMessage(e)}};We.Message=At});var Se=R(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 fn=Zi();Object.defineProperty(Me,"DateUnit",{enumerable:!0,get:function(){return fn.DateUnit}});Object.defineProperty(Me,"TimeUnit",{enumerable:!0,get:function(){return fn.TimeUnit}});Object.defineProperty(Me,"Precision",{enumerable:!0,get:function(){return fn.Precision}});Object.defineProperty(Me,"UnionMode",{enumerable:!0,get:function(){return fn.UnionMode}});Object.defineProperty(Me,"IntervalUnit",{enumerable:!0,get:function(){return fn.IntervalUnit}});Object.defineProperty(Me,"MetadataVersion",{enumerable:!0,get:function(){return fn.MetadataVersion}});var Y1=So();Object.defineProperty(Me,"MessageHeader",{enumerable:!0,get:function(){return Y1.MessageHeader}});var G1;(function(i){i[i.NONE=0]="NONE",i[i.Null=1]="Null",i[i.Int=2]="Int",i[i.Float=3]="Float",i[i.Binary=4]="Binary",i[i.Utf8=5]="Utf8",i[i.Bool=6]="Bool",i[i.Decimal=7]="Decimal",i[i.Date=8]="Date",i[i.Time=9]="Time",i[i.Timestamp=10]="Timestamp",i[i.Interval=11]="Interval",i[i.List=12]="List",i[i.Struct=13]="Struct",i[i.Union=14]="Union",i[i.FixedSizeBinary=15]="FixedSizeBinary",i[i.FixedSizeList=16]="FixedSizeList",i[i.Map=17]="Map",i[i.Dictionary=-1]="Dictionary",i[i.Int8=-2]="Int8",i[i.Int16=-3]="Int16",i[i.Int32=-4]="Int32",i[i.Int64=-5]="Int64",i[i.Uint8=-6]="Uint8",i[i.Uint16=-7]="Uint16",i[i.Uint32=-8]="Uint32",i[i.Uint64=-9]="Uint64",i[i.Float16=-10]="Float16",i[i.Float32=-11]="Float32",i[i.Float64=-12]="Float64",i[i.DateDay=-13]="DateDay",i[i.DateMillisecond=-14]="DateMillisecond",i[i.TimestampSecond=-15]="TimestampSecond",i[i.TimestampMillisecond=-16]="TimestampMillisecond",i[i.TimestampMicrosecond=-17]="TimestampMicrosecond",i[i.TimestampNanosecond=-18]="TimestampNanosecond",i[i.TimeSecond=-19]="TimeSecond",i[i.TimeMillisecond=-20]="TimeMillisecond",i[i.TimeMicrosecond=-21]="TimeMicrosecond",i[i.TimeNanosecond=-22]="TimeNanosecond",i[i.DenseUnion=-23]="DenseUnion",i[i.SparseUnion=-24]="SparseUnion",i[i.IntervalDayTime=-25]="IntervalDayTime",i[i.IntervalYearMonth=-26]="IntervalYearMonth"})(G1=Me.Type||(Me.Type={}));var K1;(function(i){i[i.OFFSET=0]="OFFSET",i[i.DATA=1]="DATA",i[i.VALIDITY=2]="VALIDITY",i[i.TYPE=3]="TYPE"})(K1=Me.BufferType||(Me.BufferType={}))});var di=R(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.popcnt_uint32=Ke.popcnt_array=Ke.popcnt_bit_range=Ke.BitIterator=Ke.packBools=Ke.truncateBitmap=Ke.setBool=Ke.getBit=Ke.getBool=void 0;function T_(i,e,t,r){return(t&1<<r)!=0}Ke.getBool=T_;function B_(i,e,t,r){return(t&1<<r)>>r}Ke.getBit=B_;function $1(i,e,t){return t?!!(i[e>>3]|=1<<e%8)||!0:!(i[e>>3]&=~(1<<e%8))&&!1}Ke.setBool=$1;function J1(i,e,t){let r=t.byteLength+7&~7;if(i>0||t.byteLength<r){let n=new Uint8Array(r);return n.set(i%8==0?t.subarray(i>>3):S_(new Ao(t,i,e,null,T_)).subarray(0,r)),n}return t}Ke.truncateBitmap=J1;function S_(i){let e=[],t=0,r=0,n=0;for(let c of i)c&&(n|=1<<r),++r==8&&(e[t++]=n,n=r=0);(t===0||r>0)&&(e[t++]=n);let s=new Uint8Array(e.length+7&~7);return s.set(e),s}Ke.packBools=S_;var Ao=class{constructor(e,t,r,n,s){this.bytes=e,this.length=r,this.context=n,this.get=s,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index<this.length?(this.bit===8&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}};Ke.BitIterator=Ao;function Ju(i,e,t){if(t-e<=0)return 0;if(t-e<8){let s=0;for(let c of new Ao(i,e,t-e,i,B_))s+=c;return s}let r=t>>3<<3,n=e+(e%8==0?0:8-e%8);return Ju(i,e,n)+Ju(i,r,t)+A_(i,n>>3,r-n>>3)}Ke.popcnt_bit_range=Ju;function A_(i,e,t){let r=0,n=e|0,s=new DataView(i.buffer,i.byteOffset,i.byteLength),c=t===void 0?i.byteLength:n+t;for(;c-n>=4;)r+=Oo(s.getUint32(n)),n+=4;for(;c-n>=2;)r+=Oo(s.getUint16(n)),n+=2;for(;c-n>=1;)r+=Oo(s.getUint8(n)),n+=1;return r}Ke.popcnt_array=A_;function Oo(i){let e=i|0;return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}Ke.popcnt_uint32=Oo});var ve=R(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 x=Se(),Pe=class{static isNull(e){return(e==null?void 0:e.typeId)===x.Type.Null}static isInt(e){return(e==null?void 0:e.typeId)===x.Type.Int}static isFloat(e){return(e==null?void 0:e.typeId)===x.Type.Float}static isBinary(e){return(e==null?void 0:e.typeId)===x.Type.Binary}static isUtf8(e){return(e==null?void 0:e.typeId)===x.Type.Utf8}static isBool(e){return(e==null?void 0:e.typeId)===x.Type.Bool}static isDecimal(e){return(e==null?void 0:e.typeId)===x.Type.Decimal}static isDate(e){return(e==null?void 0:e.typeId)===x.Type.Date}static isTime(e){return(e==null?void 0:e.typeId)===x.Type.Time}static isTimestamp(e){return(e==null?void 0:e.typeId)===x.Type.Timestamp}static isInterval(e){return(e==null?void 0:e.typeId)===x.Type.Interval}static isList(e){return(e==null?void 0:e.typeId)===x.Type.List}static isStruct(e){return(e==null?void 0:e.typeId)===x.Type.Struct}static isUnion(e){return(e==null?void 0:e.typeId)===x.Type.Union}static isFixedSizeBinary(e){return(e==null?void 0:e.typeId)===x.Type.FixedSizeBinary}static isFixedSizeList(e){return(e==null?void 0:e.typeId)===x.Type.FixedSizeList}static isMap(e){return(e==null?void 0:e.typeId)===x.Type.Map}static isDictionary(e){return(e==null?void 0:e.typeId)===x.Type.Dictionary}get typeId(){return x.Type.NONE}};k.DataType=Pe;Pe[Symbol.toStringTag]=(i=>(i.children=null,i.ArrayType=Array,i[Symbol.toStringTag]="DataType"))(Pe.prototype);var Do=class extends Pe{toString(){return"Null"}get typeId(){return x.Type.Null}};k.Null=Do;Do[Symbol.toStringTag]=(i=>i[Symbol.toStringTag]="Null")(Do.prototype);var Ot=class extends Pe{constructor(e,t){super();this.isSigned=e,this.bitWidth=t}get typeId(){return x.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=Ot;Ot[Symbol.toStringTag]=(i=>(i.isSigned=null,i.bitWidth=null,i[Symbol.toStringTag]="Int"))(Ot.prototype);var Qu=class extends Ot{constructor(){super(!0,8)}};k.Int8=Qu;var Zu=class extends Ot{constructor(){super(!0,16)}};k.Int16=Zu;var Xu=class extends Ot{constructor(){super(!0,32)}};k.Int32=Xu;var ec=class extends Ot{constructor(){super(!0,64)}};k.Int64=ec;var tc=class extends Ot{constructor(){super(!1,8)}};k.Uint8=tc;var ic=class extends Ot{constructor(){super(!1,16)}};k.Uint16=ic;var rc=class extends Ot{constructor(){super(!1,32)}};k.Uint32=rc;var nc=class extends Ot{constructor(){super(!1,64)}};k.Uint64=nc;Object.defineProperty(Qu.prototype,"ArrayType",{value:Int8Array});Object.defineProperty(Zu.prototype,"ArrayType",{value:Int16Array});Object.defineProperty(Xu.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(ec.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(tc.prototype,"ArrayType",{value:Uint8Array});Object.defineProperty(ic.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(rc.prototype,"ArrayType",{value:Uint32Array});Object.defineProperty(nc.prototype,"ArrayType",{value:Uint32Array});var Hr=class extends Pe{constructor(e){super();this.precision=e}get typeId(){return x.Type.Float}get ArrayType(){switch(this.precision){case x.Precision.HALF:return Uint16Array;case x.Precision.SINGLE:return Float32Array;case x.Precision.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};k.Float=Hr;Hr[Symbol.toStringTag]=(i=>(i.precision=null,i[Symbol.toStringTag]="Float"))(Hr.prototype);var sc=class extends Hr{constructor(){super(x.Precision.HALF)}};k.Float16=sc;var oc=class extends Hr{constructor(){super(x.Precision.SINGLE)}};k.Float32=oc;var ac=class extends Hr{constructor(){super(x.Precision.DOUBLE)}};k.Float64=ac;Object.defineProperty(sc.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(oc.prototype,"ArrayType",{value:Float32Array});Object.defineProperty(ac.prototype,"ArrayType",{value:Float64Array});var Fo=class extends Pe{constructor(){super()}get typeId(){return x.Type.Binary}toString(){return"Binary"}};k.Binary=Fo;Fo[Symbol.toStringTag]=(i=>(i.ArrayType=Uint8Array,i[Symbol.toStringTag]="Binary"))(Fo.prototype);var Eo=class extends Pe{constructor(){super()}get typeId(){return x.Type.Utf8}toString(){return"Utf8"}};k.Utf8=Eo;Eo[Symbol.toStringTag]=(i=>(i.ArrayType=Uint8Array,i[Symbol.toStringTag]="Utf8"))(Eo.prototype);var Ro=class extends Pe{constructor(){super()}get typeId(){return x.Type.Bool}toString(){return"Bool"}};k.Bool=Ro;Ro[Symbol.toStringTag]=(i=>(i.ArrayType=Uint8Array,i[Symbol.toStringTag]="Bool"))(Ro.prototype);var Co=class extends Pe{constructor(e,t){super();this.scale=e,this.precision=t}get typeId(){return x.Type.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};k.Decimal=Co;Co[Symbol.toStringTag]=(i=>(i.scale=null,i.precision=null,i.ArrayType=Uint32Array,i[Symbol.toStringTag]="Decimal"))(Co.prototype);var hn=class extends Pe{constructor(e){super();this.unit=e}get typeId(){return x.Type.Date}toString(){return`Date${(this.unit+1)*32}<${x.DateUnit[this.unit]}>`}};k.Date_=hn;hn[Symbol.toStringTag]=(i=>(i.unit=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Date"))(hn.prototype);var O_=class extends hn{constructor(){super(x.DateUnit.DAY)}};k.DateDay=O_;var D_=class extends hn{constructor(){super(x.DateUnit.MILLISECOND)}};k.DateMillisecond=D_;var Xi=class extends Pe{constructor(e,t){super();this.unit=e,this.bitWidth=t}get typeId(){return x.Type.Time}toString(){return`Time${this.bitWidth}<${x.TimeUnit[this.unit]}>`}};k.Time=Xi;Xi[Symbol.toStringTag]=(i=>(i.unit=null,i.bitWidth=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Time"))(Xi.prototype);var F_=class extends Xi{constructor(){super(x.TimeUnit.SECOND,32)}};k.TimeSecond=F_;var E_=class extends Xi{constructor(){super(x.TimeUnit.MILLISECOND,32)}};k.TimeMillisecond=E_;var R_=class extends Xi{constructor(){super(x.TimeUnit.MICROSECOND,64)}};k.TimeMicrosecond=R_;var C_=class extends Xi{constructor(){super(x.TimeUnit.NANOSECOND,64)}};k.TimeNanosecond=C_;var er=class extends Pe{constructor(e,t){super();this.unit=e,this.timezone=t}get typeId(){return x.Type.Timestamp}toString(){return`Timestamp<${x.TimeUnit[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};k.Timestamp=er;er[Symbol.toStringTag]=(i=>(i.unit=null,i.timezone=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Timestamp"))(er.prototype);var U_=class extends er{constructor(e){super(x.TimeUnit.SECOND,e)}};k.TimestampSecond=U_;var k_=class extends er{constructor(e){super(x.TimeUnit.MILLISECOND,e)}};k.TimestampMillisecond=k_;var M_=class extends er{constructor(e){super(x.TimeUnit.MICROSECOND,e)}};k.TimestampMicrosecond=M_;var P_=class extends er{constructor(e){super(x.TimeUnit.NANOSECOND,e)}};k.TimestampNanosecond=P_;var pn=class extends Pe{constructor(e){super();this.unit=e}get typeId(){return x.Type.Interval}toString(){return`Interval<${x.IntervalUnit[this.unit]}>`}};k.Interval=pn;pn[Symbol.toStringTag]=(i=>(i.unit=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Interval"))(pn.prototype);var V_=class extends pn{constructor(){super(x.IntervalUnit.DAY_TIME)}};k.IntervalDayTime=V_;var N_=class extends pn{constructor(){super(x.IntervalUnit.YEAR_MONTH)}};k.IntervalYearMonth=N_;var Uo=class extends Pe{constructor(e){super();this.children=[e]}get typeId(){return x.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=Uo;Uo[Symbol.toStringTag]=(i=>(i.children=null,i[Symbol.toStringTag]="List"))(Uo.prototype);var ko=class extends Pe{constructor(e){super();this.children=e}get typeId(){return x.Type.Struct}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};k.Struct=ko;ko[Symbol.toStringTag]=(i=>(i.children=null,i[Symbol.toStringTag]="Struct"))(ko.prototype);var yn=class extends Pe{constructor(e,t,r){super();this.mode=e,this.children=r,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((n,s,c)=>(n[s]=c)&&n||n,Object.create(null))}get typeId(){return x.Type.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}};k.Union=yn;yn[Symbol.toStringTag]=(i=>(i.mode=null,i.typeIds=null,i.children=null,i.typeIdToChildIndex=null,i.ArrayType=Int8Array,i[Symbol.toStringTag]="Union"))(yn.prototype);var L_=class extends yn{constructor(e,t){super(x.UnionMode.Dense,e,t)}};k.DenseUnion=L_;var x_=class extends yn{constructor(e,t){super(x.UnionMode.Sparse,e,t)}};k.SparseUnion=x_;var Mo=class extends Pe{constructor(e){super();this.byteWidth=e}get typeId(){return x.Type.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};k.FixedSizeBinary=Mo;Mo[Symbol.toStringTag]=(i=>(i.byteWidth=null,i.ArrayType=Uint8Array,i[Symbol.toStringTag]="FixedSizeBinary"))(Mo.prototype);var Po=class extends Pe{constructor(e,t){super();this.listSize=e,this.children=[t]}get typeId(){return x.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=Po;Po[Symbol.toStringTag]=(i=>(i.children=null,i.listSize=null,i[Symbol.toStringTag]="FixedSizeList"))(Po.prototype);var Vo=class extends Pe{constructor(e,t=!1){super();this.children=[e],this.keysSorted=t}get typeId(){return x.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_=Vo;Vo[Symbol.toStringTag]=(i=>(i.children=null,i.keysSorted=null,i[Symbol.toStringTag]="Map_"))(Vo.prototype);var Q1=(i=>()=>++i)(-1),No=class extends Pe{constructor(e,t,r,n){super();this.indices=t,this.dictionary=e,this.isOrdered=n||!1,this.id=r==null?Q1():typeof r=="number"?r:r.low}get typeId(){return x.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=No;No[Symbol.toStringTag]=(i=>(i.id=null,i.indices=null,i.isOrdered=null,i.dictionary=null,i[Symbol.toStringTag]="Dictionary"))(No.prototype);function Z1(i){let e=i;switch(i.typeId){case x.Type.Decimal:return 4;case x.Type.Timestamp:return 2;case x.Type.Date:return 1+e.unit;case x.Type.Interval:return 1+e.unit;case x.Type.Int:return 1+ +(e.bitWidth>32);case x.Type.Time:return 1+ +(e.bitWidth>32);case x.Type.FixedSizeList:return e.listSize;case x.Type.FixedSizeBinary:return e.byteWidth;default:return 1}}k.strideForType=Z1});var Jt=R(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.Data=Yr.kUnknownNullCount=void 0;var X1=di(),eA=di(),H=Se(),tA=ve(),pe=Ze();Yr.kUnknownNullCount=-1;var re=class{constructor(e,t,r,n,s,c,_){this.type=e,this.dictionary=_,this.offset=Math.floor(Math.max(t||0,0)),this.length=Math.floor(Math.max(r||0,0)),this._nullCount=Math.floor(Math.max(n||0,-1)),this.childData=(c||[]).map(B=>B instanceof re?B:B.data);let v;s instanceof re?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=tA.strideForType(e),s&&((v=s[0])&&(this.valueOffsets=v),(v=s[1])&&(this.values=v),(v=s[2])&&(this.nullBitmap=v),(v=s[3])&&(this.typeIds=v)))}get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get byteLength(){let e=0,{valueOffsets:t,values:r,nullBitmap:n,typeIds:s}=this;return t&&(e+=t.byteLength),r&&(e+=r.byteLength),n&&(e+=n.byteLength),s&&(e+=s.byteLength),this.childData.reduce((c,_)=>c+_.byteLength,e)}get nullCount(){let e=this._nullCount,t;return e<=Yr.kUnknownNullCount&&(t=this.nullBitmap)&&(this._nullCount=e=this.length-eA.popcnt_bit_range(t,this.offset,this.offset+this.length)),e}clone(e,t=this.offset,r=this.length,n=this._nullCount,s=this,c=this.childData){return new re(e,t,r,n,s,c,this.dictionary)}slice(e,t){let{stride:r,typeId:n,childData:s}=this,c=+(this._nullCount===0)-1,_=n===16?r:1,v=this._sliceBuffers(e,t,r,n);return this.clone(this.type,this.offset+e,t,c,v,!s.length||this.valueOffsets?s:this._sliceChildren(s,_*e,_*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===H.Type.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:r}=this,n=new Uint8Array((e+63&~63)>>3).fill(255,0,t>>3);n[t>>3]=(1<<t-(t&~7))-1,r>0&&n.set(X1.truncateBitmap(this.offset,t,this.nullBitmap),0);let s=this.buffers;return s[H.BufferType.VALIDITY]=n,this.clone(this.type,0,e,r+(e-t),s)}_sliceBuffers(e,t,r,n){let s,{buffers:c}=this;return(s=c[H.BufferType.TYPE])&&(c[H.BufferType.TYPE]=s.subarray(e,e+t)),(s=c[H.BufferType.OFFSET])&&(c[H.BufferType.OFFSET]=s.subarray(e,e+t+1))||(s=c[H.BufferType.DATA])&&(c[H.BufferType.DATA]=n===6?s:s.subarray(r*e,r*(e+t))),c}_sliceChildren(e,t,r){return e.map(n=>n.slice(t,r))}static new(e,t,r,n,s,c,_){switch(s instanceof re?s=s.buffers:s||(s=[]),e.typeId){case H.Type.Null:return re.Null(e,t,r);case H.Type.Int:return re.Int(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.Dictionary:return re.Dictionary(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[],_);case H.Type.Float:return re.Float(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.Bool:return re.Bool(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.Decimal:return re.Decimal(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.Date:return re.Date(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.Time:return re.Time(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.Timestamp:return re.Timestamp(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.Interval:return re.Interval(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.FixedSizeBinary:return re.FixedSizeBinary(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.Binary:return re.Binary(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.OFFSET]||[],s[H.BufferType.DATA]||[]);case H.Type.Utf8:return re.Utf8(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.OFFSET]||[],s[H.BufferType.DATA]||[]);case H.Type.List:return re.List(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.OFFSET]||[],(c||[])[0]);case H.Type.FixedSizeList:return re.FixedSizeList(e,t,r,n||0,s[H.BufferType.VALIDITY],(c||[])[0]);case H.Type.Struct:return re.Struct(e,t,r,n||0,s[H.BufferType.VALIDITY],c||[]);case H.Type.Map:return re.Map(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.OFFSET]||[],(c||[])[0]);case H.Type.Union:return re.Union(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.TYPE]||[],s[H.BufferType.OFFSET]||c,c)}throw new Error(`Unrecognized typeId ${e.typeId}`)}static Null(e,t,r){return new re(e,t,r,0)}static Int(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static Dictionary(e,t,r,n,s,c,_){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.indices.ArrayType,c),pe.toUint8Array(s)],[],_)}static Float(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static Bool(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static Decimal(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static Date(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static Time(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static Timestamp(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static Interval(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static FixedSizeBinary(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static Binary(e,t,r,n,s,c,_){return new re(e,t,r,n,[pe.toInt32Array(c),pe.toUint8Array(_),pe.toUint8Array(s)])}static Utf8(e,t,r,n,s,c,_){return new re(e,t,r,n,[pe.toInt32Array(c),pe.toUint8Array(_),pe.toUint8Array(s)])}static List(e,t,r,n,s,c,_){return new re(e,t,r,n,[pe.toInt32Array(c),void 0,pe.toUint8Array(s)],_?[_]:[])}static FixedSizeList(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,void 0,pe.toUint8Array(s)],c?[c]:[])}static Struct(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,void 0,pe.toUint8Array(s)],c)}static Map(e,t,r,n,s,c,_){return new re(e,t,r,n,[pe.toInt32Array(c),void 0,pe.toUint8Array(s)],_?[_]:[])}static Union(e,t,r,n,s,c,_,v){let B=[void 0,void 0,pe.toUint8Array(s),pe.toArrayBufferView(e.ArrayType,c)];return e.mode===H.UnionMode.Sparse?new re(e,t,r,n,B,_):(B[H.BufferType.OFFSET]=pe.toInt32Array(_),new re(e,t,r,n,B,v))}};Yr.Data=re;re.prototype.childData=Object.freeze([])});var uc=R(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.valueToString=void 0;var iA=void 0;function rA(i){if(i===null)return"null";if(i===iA)return"undefined";switch(typeof i){case"number":return`${i}`;case"bigint":return`${i}`;case"string":return`"${i}"`}return typeof i[Symbol.toPrimitive]=="function"?i[Symbol.toPrimitive]("string"):ArrayBuffer.isView(i)?`[${i}]`:JSON.stringify(i)}Lo.valueToString=rA});var q_=R(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.createIsValidFunction=void 0;var cc=uc(),nA=ft();function sA(i){if(!i||i.length<=0)return function(n){return!0};let e="",t=i.filter(r=>r===r);return t.length>0&&(e=`
1
+ var duckdb=(()=>{var d1=Object.create;var ps=Object.defineProperty,f1=Object.defineProperties,h1=Object.getOwnPropertyDescriptor,p1=Object.getOwnPropertyDescriptors,y1=Object.getOwnPropertyNames,qy=Object.getOwnPropertySymbols,_1=Object.getPrototypeOf,Wy=Object.prototype.hasOwnProperty,m1=Object.prototype.propertyIsEnumerable;var zy=(i,e,t)=>e in i?ps(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Er=(i,e)=>{for(var t in e||(e={}))Wy.call(e,t)&&zy(i,t,e[t]);if(qy)for(var t of qy(e))m1.call(e,t)&&zy(i,t,e[t]);return i},_o=(i,e)=>f1(i,p1(e)),Hy=i=>ps(i,"__esModule",{value:!0});var b1=(i=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(i,{get:(e,t)=>(typeof require!="undefined"?require:e)[t]}):i)(function(i){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+i+'" is not supported')});var R=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),g1=(i,e)=>{Hy(i);for(var t in e)ps(i,t,{get:e[t],enumerable:!0})},v1=(i,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of y1(e))!Wy.call(i,r)&&r!=="default"&&ps(i,r,{get:()=>e[r],enumerable:!(t=h1(e,r))||t.enumerable});return i},Si=i=>v1(Hy(ps(i!=null?d1(_1(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);var dt=R((pU,go)=>{var Yy,Gy,Ky,$y,Jy,Qy,Zy,Xy,e_,mo,Du,t_,i_,r_,an,n_,s_,o_,a_,u_,c_,l_,d_,bo;(function(i){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(r){i(t(e,t(r)))}):typeof go=="object"&&typeof go.exports=="object"?i(t(e,t(go.exports))):i(t(e));function t(r,n){return r!==e&&(typeof Object.create=="function"?Object.defineProperty(r,"__esModule",{value:!0}):r.__esModule=!0),function(s,c){return r[s]=n?n(s,c):c}}})(function(i){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])};Yy=function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(r,n);function s(){this.constructor=r}r.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)},Gy=Object.assign||function(r){for(var n,s=1,c=arguments.length;s<c;s++){n=arguments[s];for(var _ in n)Object.prototype.hasOwnProperty.call(n,_)&&(r[_]=n[_])}return r},Ky=function(r,n){var s={};for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&n.indexOf(c)<0&&(s[c]=r[c]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _=0,c=Object.getOwnPropertySymbols(r);_<c.length;_++)n.indexOf(c[_])<0&&Object.prototype.propertyIsEnumerable.call(r,c[_])&&(s[c[_]]=r[c[_]]);return s},$y=function(r,n,s,c){var _=arguments.length,v=_<3?n:c===null?c=Object.getOwnPropertyDescriptor(n,s):c,B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,n,s,c);else for(var O=r.length-1;O>=0;O--)(B=r[O])&&(v=(_<3?B(v):_>3?B(n,s,v):B(n,s))||v);return _>3&&v&&Object.defineProperty(n,s,v),v},Jy=function(r,n){return function(s,c){n(s,c,r)}},Qy=function(r,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,n)},Zy=function(r,n,s,c){function _(v){return v instanceof s?v:new s(function(B){B(v)})}return new(s||(s=Promise))(function(v,B){function O(J){try{q(c.next(J))}catch(ke){B(ke)}}function N(J){try{q(c.throw(J))}catch(ke){B(ke)}}function q(J){J.done?v(J.value):_(J.value).then(O,N)}q((c=c.apply(r,n||[])).next())})},Xy=function(r,n){var s={label:0,sent:function(){if(v[0]&1)throw v[1];return v[1]},trys:[],ops:[]},c,_,v,B;return B={next:O(0),throw:O(1),return:O(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function O(q){return function(J){return N([q,J])}}function N(q){if(c)throw new TypeError("Generator is already executing.");for(;s;)try{if(c=1,_&&(v=q[0]&2?_.return:q[0]?_.throw||((v=_.return)&&v.call(_),0):_.next)&&!(v=v.call(_,q[1])).done)return v;switch(_=0,v&&(q=[q[0]&2,v.value]),q[0]){case 0:case 1:v=q;break;case 4:return s.label++,{value:q[1],done:!1};case 5:s.label++,_=q[1],q=[0];continue;case 7:q=s.ops.pop(),s.trys.pop();continue;default:if(v=s.trys,!(v=v.length>0&&v[v.length-1])&&(q[0]===6||q[0]===2)){s=0;continue}if(q[0]===3&&(!v||q[1]>v[0]&&q[1]<v[3])){s.label=q[1];break}if(q[0]===6&&s.label<v[1]){s.label=v[1],v=q;break}if(v&&s.label<v[2]){s.label=v[2],s.ops.push(q);break}v[2]&&s.ops.pop(),s.trys.pop();continue}q=n.call(r,s)}catch(J){q=[6,J],_=0}finally{c=v=0}if(q[0]&5)throw q[1];return{value:q[0]?q[1]:void 0,done:!0}}},e_=function(r,n){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(n,s)&&bo(n,r,s)},bo=Object.create?function(r,n,s,c){c===void 0&&(c=s),Object.defineProperty(r,c,{enumerable:!0,get:function(){return n[s]}})}:function(r,n,s,c){c===void 0&&(c=s),r[c]=n[s]},mo=function(r){var n=typeof Symbol=="function"&&Symbol.iterator,s=n&&r[n],c=0;if(s)return s.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&c>=r.length&&(r=void 0),{value:r&&r[c++],done:!r}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Du=function(r,n){var s=typeof Symbol=="function"&&r[Symbol.iterator];if(!s)return r;var c=s.call(r),_,v=[],B;try{for(;(n===void 0||n-- >0)&&!(_=c.next()).done;)v.push(_.value)}catch(O){B={error:O}}finally{try{_&&!_.done&&(s=c.return)&&s.call(c)}finally{if(B)throw B.error}}return v},t_=function(){for(var r=[],n=0;n<arguments.length;n++)r=r.concat(Du(arguments[n]));return r},i_=function(){for(var r=0,n=0,s=arguments.length;n<s;n++)r+=arguments[n].length;for(var c=Array(r),_=0,n=0;n<s;n++)for(var v=arguments[n],B=0,O=v.length;B<O;B++,_++)c[_]=v[B];return c},r_=function(r,n,s){if(s||arguments.length===2)for(var c=0,_=n.length,v;c<_;c++)(v||!(c in n))&&(v||(v=Array.prototype.slice.call(n,0,c)),v[c]=n[c]);return r.concat(v||Array.prototype.slice.call(n))},an=function(r){return this instanceof an?(this.v=r,this):new an(r)},n_=function(r,n,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=s.apply(r,n||[]),_,v=[];return _={},B("next"),B("throw"),B("return"),_[Symbol.asyncIterator]=function(){return this},_;function B(Oe){c[Oe]&&(_[Oe]=function(Yt){return new Promise(function(pt,le){v.push([Oe,Yt,pt,le])>1||O(Oe,Yt)})})}function O(Oe,Yt){try{N(c[Oe](Yt))}catch(pt){ke(v[0][3],pt)}}function N(Oe){Oe.value instanceof an?Promise.resolve(Oe.value.v).then(q,J):ke(v[0][2],Oe)}function q(Oe){O("next",Oe)}function J(Oe){O("throw",Oe)}function ke(Oe,Yt){Oe(Yt),v.shift(),v.length&&O(v[0][0],v[0][1])}},s_=function(r){var n,s;return n={},c("next"),c("throw",function(_){throw _}),c("return"),n[Symbol.iterator]=function(){return this},n;function c(_,v){n[_]=r[_]?function(B){return(s=!s)?{value:an(r[_](B)),done:_==="return"}:v?v(B):B}:v}},o_=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r[Symbol.asyncIterator],s;return n?n.call(r):(r=typeof mo=="function"?mo(r):r[Symbol.iterator](),s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s);function c(v){s[v]=r[v]&&function(B){return new Promise(function(O,N){B=r[v](B),_(O,N,B.done,B.value)})}}function _(v,B,O,N){Promise.resolve(N).then(function(q){v({value:q,done:O})},B)}},a_=function(r,n){return Object.defineProperty?Object.defineProperty(r,"raw",{value:n}):r.raw=n,r};var t=Object.create?function(r,n){Object.defineProperty(r,"default",{enumerable:!0,value:n})}:function(r,n){r.default=n};u_=function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var s in r)s!=="default"&&Object.prototype.hasOwnProperty.call(r,s)&&bo(n,r,s);return t(n,r),n},c_=function(r){return r&&r.__esModule?r:{default:r}},l_=function(r,n,s,c){if(s==="a"&&!c)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?r!==n||!c:!n.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?c:s==="a"?c.call(r):c?c.value:n.get(r)},d_=function(r,n,s,c,_){if(c==="m")throw new TypeError("Private method is not writable");if(c==="a"&&!_)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?r!==n||!_:!n.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return c==="a"?_.call(r,s):_?_.value=s:n.set(r,s),s},i("__extends",Yy),i("__assign",Gy),i("__rest",Ky),i("__decorate",$y),i("__param",Jy),i("__metadata",Qy),i("__awaiter",Zy),i("__generator",Xy),i("__exportStar",e_),i("__createBinding",bo),i("__values",mo),i("__read",Du),i("__spread",t_),i("__spreadArrays",i_),i("__spreadArray",r_),i("__await",an),i("__asyncGenerator",n_),i("__asyncDelegator",s_),i("__asyncValues",o_),i("__makeTemplateObject",a_),i("__importStar",u_),i("__importDefault",c_),i("__classPrivateFieldGet",l_),i("__classPrivateFieldSet",d_)})});var Ai=R(f_=>{var D={};D.Offset;D.Table;D.SIZEOF_SHORT=2;D.SIZEOF_INT=4;D.FILE_IDENTIFIER_LENGTH=4;D.SIZE_PREFIX_LENGTH=4;D.Encoding={UTF8_BYTES:1,UTF16_STRING:2};D.int32=new Int32Array(2);D.float32=new Float32Array(D.int32.buffer);D.float64=new Float64Array(D.int32.buffer);D.isLittleEndian=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;D.Long=function(i,e){this.low=i|0,this.high=e|0};D.Long.create=function(i,e){return i==0&&e==0?D.Long.ZERO:new D.Long(i,e)};D.Long.prototype.toFloat64=function(){return(this.low>>>0)+this.high*4294967296};D.Long.prototype.equals=function(i){return this.low==i.low&&this.high==i.high};D.Long.ZERO=new D.Long(0,0);D.Builder=function(i){if(i)var e=i;else var e=1024;this.bb=D.ByteBuffer.allocate(e),this.space=e,this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1};D.Builder.prototype.clear=function(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1};D.Builder.prototype.forceDefaults=function(i){this.force_defaults=i};D.Builder.prototype.dataBuffer=function(){return this.bb};D.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())};D.Builder.prototype.prep=function(i,e){i>this.minalign&&(this.minalign=i);for(var t=~(this.bb.capacity()-this.space+e)+1&i-1;this.space<t+i+e;){var r=this.bb.capacity();this.bb=D.Builder.growByteBuffer(this.bb),this.space+=this.bb.capacity()-r}this.pad(t)};D.Builder.prototype.pad=function(i){for(var e=0;e<i;e++)this.bb.writeInt8(--this.space,0)};D.Builder.prototype.writeInt8=function(i){this.bb.writeInt8(this.space-=1,i)};D.Builder.prototype.writeInt16=function(i){this.bb.writeInt16(this.space-=2,i)};D.Builder.prototype.writeInt32=function(i){this.bb.writeInt32(this.space-=4,i)};D.Builder.prototype.writeInt64=function(i){this.bb.writeInt64(this.space-=8,i)};D.Builder.prototype.writeFloat32=function(i){this.bb.writeFloat32(this.space-=4,i)};D.Builder.prototype.writeFloat64=function(i){this.bb.writeFloat64(this.space-=8,i)};D.Builder.prototype.addInt8=function(i){this.prep(1,0),this.writeInt8(i)};D.Builder.prototype.addInt16=function(i){this.prep(2,0),this.writeInt16(i)};D.Builder.prototype.addInt32=function(i){this.prep(4,0),this.writeInt32(i)};D.Builder.prototype.addInt64=function(i){this.prep(8,0),this.writeInt64(i)};D.Builder.prototype.addFloat32=function(i){this.prep(4,0),this.writeFloat32(i)};D.Builder.prototype.addFloat64=function(i){this.prep(8,0),this.writeFloat64(i)};D.Builder.prototype.addFieldInt8=function(i,e,t){(this.force_defaults||e!=t)&&(this.addInt8(e),this.slot(i))};D.Builder.prototype.addFieldInt16=function(i,e,t){(this.force_defaults||e!=t)&&(this.addInt16(e),this.slot(i))};D.Builder.prototype.addFieldInt32=function(i,e,t){(this.force_defaults||e!=t)&&(this.addInt32(e),this.slot(i))};D.Builder.prototype.addFieldInt64=function(i,e,t){(this.force_defaults||!e.equals(t))&&(this.addInt64(e),this.slot(i))};D.Builder.prototype.addFieldFloat32=function(i,e,t){(this.force_defaults||e!=t)&&(this.addFloat32(e),this.slot(i))};D.Builder.prototype.addFieldFloat64=function(i,e,t){(this.force_defaults||e!=t)&&(this.addFloat64(e),this.slot(i))};D.Builder.prototype.addFieldOffset=function(i,e,t){(this.force_defaults||e!=t)&&(this.addOffset(e),this.slot(i))};D.Builder.prototype.addFieldStruct=function(i,e,t){e!=t&&(this.nested(e),this.slot(i))};D.Builder.prototype.nested=function(i){if(i!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")};D.Builder.prototype.notNested=function(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")};D.Builder.prototype.slot=function(i){this.vtable[i]=this.offset()};D.Builder.prototype.offset=function(){return this.bb.capacity()-this.space};D.Builder.growByteBuffer=function(i){var e=i.capacity();if(e&3221225472)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");var t=e<<1,r=D.ByteBuffer.allocate(t);return r.setPosition(t-e),r.bytes().set(i.bytes(),t-e),r};D.Builder.prototype.addOffset=function(i){this.prep(D.SIZEOF_INT,0),this.writeInt32(this.offset()-i+D.SIZEOF_INT)};D.Builder.prototype.startObject=function(i){this.notNested(),this.vtable==null&&(this.vtable=[]),this.vtable_in_use=i;for(var e=0;e<i;e++)this.vtable[e]=0;this.isNested=!0,this.object_start=this.offset()};D.Builder.prototype.endObject=function(){if(this.vtable==null||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);for(var i=this.offset(),e=this.vtable_in_use-1;e>=0&&this.vtable[e]==0;e--);for(var t=e+1;e>=0;e--)this.addInt16(this.vtable[e]!=0?i-this.vtable[e]:0);var r=2;this.addInt16(i-this.object_start);var n=(t+r)*D.SIZEOF_SHORT;this.addInt16(n);var s=0,c=this.space;e:for(e=0;e<this.vtables.length;e++){var _=this.bb.capacity()-this.vtables[e];if(n==this.bb.readInt16(_)){for(var v=D.SIZEOF_SHORT;v<n;v+=D.SIZEOF_SHORT)if(this.bb.readInt16(c+v)!=this.bb.readInt16(_+v))continue e;s=this.vtables[e];break}}return s?(this.space=this.bb.capacity()-i,this.bb.writeInt32(this.space,s-i)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-i,this.offset()-i)),this.isNested=!1,i};D.Builder.prototype.finish=function(i,e,t){var r=t?D.SIZE_PREFIX_LENGTH:0;if(e){var n=e;if(this.prep(this.minalign,D.SIZEOF_INT+D.FILE_IDENTIFIER_LENGTH+r),n.length!=D.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+D.FILE_IDENTIFIER_LENGTH);for(var s=D.FILE_IDENTIFIER_LENGTH-1;s>=0;s--)this.writeInt8(n.charCodeAt(s))}this.prep(this.minalign,D.SIZEOF_INT+r),this.addOffset(i),r&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)};D.Builder.prototype.finishSizePrefixed=function(i,e){this.finish(i,e,!0)};D.Builder.prototype.requiredField=function(i,e){var t=this.bb.capacity()-i,r=t-this.bb.readInt32(t),n=this.bb.readInt16(r+e)!=0;if(!n)throw new Error("FlatBuffers: field "+e+" must be set")};D.Builder.prototype.startVector=function(i,e,t){this.notNested(),this.vector_num_elems=e,this.prep(D.SIZEOF_INT,i*e),this.prep(t,i*e)};D.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()};D.Builder.prototype.createString=function(i){if(i instanceof Uint8Array)var e=i;else for(var e=[],t=0;t<i.length;){var r,n=i.charCodeAt(t++);if(n<55296||n>=56320)r=n;else{var s=i.charCodeAt(t++);r=(n<<10)+s+(65536-(55296<<10)-56320)}r<128?e.push(r):(r<2048?e.push(r>>6&31|192):(r<65536?e.push(r>>12&15|224):e.push(r>>18&7|240,r>>12&63|128),e.push(r>>6&63|128)),e.push(r&63|128))}this.addInt8(0),this.startVector(1,e.length,1),this.bb.setPosition(this.space-=e.length);for(var t=0,c=this.space,_=this.bb.bytes();t<e.length;t++)_[c++]=e[t];return this.endVector()};D.Builder.prototype.createLong=function(i,e){return D.Long.create(i,e)};D.ByteBuffer=function(i){this.bytes_=i,this.position_=0};D.ByteBuffer.allocate=function(i){return new D.ByteBuffer(new Uint8Array(i))};D.ByteBuffer.prototype.clear=function(){this.position_=0};D.ByteBuffer.prototype.bytes=function(){return this.bytes_};D.ByteBuffer.prototype.position=function(){return this.position_};D.ByteBuffer.prototype.setPosition=function(i){this.position_=i};D.ByteBuffer.prototype.capacity=function(){return this.bytes_.length};D.ByteBuffer.prototype.readInt8=function(i){return this.readUint8(i)<<24>>24};D.ByteBuffer.prototype.readUint8=function(i){return this.bytes_[i]};D.ByteBuffer.prototype.readInt16=function(i){return this.readUint16(i)<<16>>16};D.ByteBuffer.prototype.readUint16=function(i){return this.bytes_[i]|this.bytes_[i+1]<<8};D.ByteBuffer.prototype.readInt32=function(i){return this.bytes_[i]|this.bytes_[i+1]<<8|this.bytes_[i+2]<<16|this.bytes_[i+3]<<24};D.ByteBuffer.prototype.readUint32=function(i){return this.readInt32(i)>>>0};D.ByteBuffer.prototype.readInt64=function(i){return new D.Long(this.readInt32(i),this.readInt32(i+4))};D.ByteBuffer.prototype.readUint64=function(i){return new D.Long(this.readUint32(i),this.readUint32(i+4))};D.ByteBuffer.prototype.readFloat32=function(i){return D.int32[0]=this.readInt32(i),D.float32[0]};D.ByteBuffer.prototype.readFloat64=function(i){return D.int32[D.isLittleEndian?0:1]=this.readInt32(i),D.int32[D.isLittleEndian?1:0]=this.readInt32(i+4),D.float64[0]};D.ByteBuffer.prototype.writeInt8=function(i,e){this.bytes_[i]=e};D.ByteBuffer.prototype.writeUint8=function(i,e){this.bytes_[i]=e};D.ByteBuffer.prototype.writeInt16=function(i,e){this.bytes_[i]=e,this.bytes_[i+1]=e>>8};D.ByteBuffer.prototype.writeUint16=function(i,e){this.bytes_[i]=e,this.bytes_[i+1]=e>>8};D.ByteBuffer.prototype.writeInt32=function(i,e){this.bytes_[i]=e,this.bytes_[i+1]=e>>8,this.bytes_[i+2]=e>>16,this.bytes_[i+3]=e>>24};D.ByteBuffer.prototype.writeUint32=function(i,e){this.bytes_[i]=e,this.bytes_[i+1]=e>>8,this.bytes_[i+2]=e>>16,this.bytes_[i+3]=e>>24};D.ByteBuffer.prototype.writeInt64=function(i,e){this.writeInt32(i,e.low),this.writeInt32(i+4,e.high)};D.ByteBuffer.prototype.writeUint64=function(i,e){this.writeUint32(i,e.low),this.writeUint32(i+4,e.high)};D.ByteBuffer.prototype.writeFloat32=function(i,e){D.float32[0]=e,this.writeInt32(i,D.int32[0])};D.ByteBuffer.prototype.writeFloat64=function(i,e){D.float64[0]=e,this.writeInt32(i,D.int32[D.isLittleEndian?0:1]),this.writeInt32(i+4,D.int32[D.isLittleEndian?1:0])};D.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length<this.position_+D.SIZEOF_INT+D.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");for(var i="",e=0;e<D.FILE_IDENTIFIER_LENGTH;e++)i+=String.fromCharCode(this.readInt8(this.position_+D.SIZEOF_INT+e));return i};D.ByteBuffer.prototype.__offset=function(i,e){var t=i-this.readInt32(i);return e<this.readInt16(t)?this.readInt16(t+e):0};D.ByteBuffer.prototype.__union=function(i,e){return i.bb_pos=e+this.readInt32(e),i.bb=this,i};D.ByteBuffer.prototype.__string=function(i,e){i+=this.readInt32(i);var t=this.readInt32(i),r="",n=0;if(i+=D.SIZEOF_INT,e===D.Encoding.UTF8_BYTES)return this.bytes_.subarray(i,i+t);for(;n<t;){var s,c=this.readUint8(i+n++);if(c<192)s=c;else{var _=this.readUint8(i+n++);if(c<224)s=(c&31)<<6|_&63;else{var v=this.readUint8(i+n++);if(c<240)s=(c&15)<<12|(_&63)<<6|v&63;else{var B=this.readUint8(i+n++);s=(c&7)<<18|(_&63)<<12|(v&63)<<6|B&63}}}s<65536?r+=String.fromCharCode(s):(s-=65536,r+=String.fromCharCode((s>>10)+55296,(s&(1<<10)-1)+56320))}return r};D.ByteBuffer.prototype.__indirect=function(i){return i+this.readInt32(i)};D.ByteBuffer.prototype.__vector=function(i){return i+this.readInt32(i)+D.SIZEOF_INT};D.ByteBuffer.prototype.__vector_len=function(i){return this.readInt32(i+this.readInt32(i))};D.ByteBuffer.prototype.__has_identifier=function(i){if(i.length!=D.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+D.FILE_IDENTIFIER_LENGTH);for(var e=0;e<D.FILE_IDENTIFIER_LENGTH;e++)if(i.charCodeAt(e)!=this.readInt8(this.position_+D.SIZEOF_INT+e))return!1;return!0};D.ByteBuffer.prototype.createLong=function(i,e){return D.Long.create(i,e)};f_.flatbuffers=D});var Rr=R(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.encodeUtf8=un.decodeUtf8=void 0;var w1=new TextDecoder("utf-8");un.decodeUtf8=i=>w1.decode(i);var j1=new TextEncoder;un.encodeUtf8=i=>j1.encode(i)});var cn=R(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.AsyncQueue=vt.ReadableInterop=vt.ArrowJSON=vt.ITERATOR_DONE=void 0;var ys=dt(),h_=_s();vt.ITERATOR_DONE=Object.freeze({done:!0,value:void 0});var p_=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}};vt.ArrowJSON=p_;var Fu=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())}};vt.ReadableInterop=Fu;var y_=class extends Fu{constructor(){super();this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return ys.__awaiter(this,void 0,void 0,function*(){yield this.return(e)})}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){let{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(vt.ITERATOR_DONE);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return h_.default.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return h_.default.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return ys.__awaiter(this,void 0,void 0,function*(){return yield this.abort(e),vt.ITERATOR_DONE})}return(e){return ys.__awaiter(this,void 0,void 0,function*(){return yield this.close(),vt.ITERATOR_DONE})}read(e){return ys.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return ys.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((t,r)=>{this.resolvers.push({resolve:t,reject:r})}):Promise.resolve(vt.ITERATOR_DONE)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}};vt.AsyncQueue=y_});var ft=R(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.isReadableNodeStream=z.isWritableNodeStream=z.isReadableDOMStream=z.isWritableDOMStream=z.isFetchResponse=z.isFSReadStream=z.isFileHandle=z.isUnderlyingSink=z.isIteratorResult=z.isArrayLike=z.isArrowJSON=z.isAsyncIterable=z.isIterable=z.isObservable=z.isPromise=z.isObject=z.BigUint64ArrayAvailable=z.BigUint64Array=z.BigInt64ArrayAvailable=z.BigInt64Array=z.BigIntAvailable=z.BigInt=void 0;var vo=cn(),[I1,T1]=(()=>{let i=()=>{throw new Error("BigInt is not available in this environment")};function e(){throw i()}return e.asIntN=()=>{throw i()},e.asUintN=()=>{throw i()},typeof BigInt!="undefined"?[BigInt,!0]:[e,!1]})();z.BigInt=I1;z.BigIntAvailable=T1;var[B1,S1]=(()=>{let i=()=>{throw new Error("BigInt64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw i()}static from(){throw i()}constructor(){throw i()}}return typeof BigInt64Array!="undefined"?[BigInt64Array,!0]:[e,!1]})();z.BigInt64Array=B1;z.BigInt64ArrayAvailable=S1;var[A1,O1]=(()=>{let i=()=>{throw new Error("BigUint64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw i()}static from(){throw i()}constructor(){throw i()}}return typeof BigUint64Array!="undefined"?[BigUint64Array,!0]:[e,!1]})();z.BigUint64Array=A1;z.BigUint64ArrayAvailable=O1;var Eu=i=>typeof i=="number",__=i=>typeof i=="boolean",at=i=>typeof i=="function";z.isObject=i=>i!=null&&Object(i)===i;z.isPromise=i=>z.isObject(i)&&at(i.then);z.isObservable=i=>z.isObject(i)&&at(i.subscribe);z.isIterable=i=>z.isObject(i)&&at(i[Symbol.iterator]);z.isAsyncIterable=i=>z.isObject(i)&&at(i[Symbol.asyncIterator]);z.isArrowJSON=i=>z.isObject(i)&&z.isObject(i.schema);z.isArrayLike=i=>z.isObject(i)&&Eu(i.length);z.isIteratorResult=i=>z.isObject(i)&&"done"in i&&"value"in i;z.isUnderlyingSink=i=>z.isObject(i)&&at(i.abort)&&at(i.close)&&at(i.start)&&at(i.write);z.isFileHandle=i=>z.isObject(i)&&at(i.stat)&&Eu(i.fd);z.isFSReadStream=i=>z.isReadableNodeStream(i)&&Eu(i.bytesRead);z.isFetchResponse=i=>z.isObject(i)&&z.isReadableDOMStream(i.body);z.isWritableDOMStream=i=>z.isObject(i)&&at(i.abort)&&at(i.getWriter)&&!(i instanceof vo.ReadableInterop);z.isReadableDOMStream=i=>z.isObject(i)&&at(i.cancel)&&at(i.getReader)&&!(i instanceof vo.ReadableInterop);z.isWritableNodeStream=i=>z.isObject(i)&&at(i.end)&&at(i.write)&&__(i.writable)&&!(i instanceof vo.ReadableInterop);z.isReadableNodeStream=i=>z.isObject(i)&&at(i.read)&&at(i.pipe)&&__(i.readable)&&!(i instanceof vo.ReadableInterop)});var Ze=R(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.compareArrayLike=L.rebaseValueOffsets=L.toUint8ClampedArrayAsyncIterator=L.toFloat64ArrayAsyncIterator=L.toFloat32ArrayAsyncIterator=L.toUint32ArrayAsyncIterator=L.toUint16ArrayAsyncIterator=L.toUint8ArrayAsyncIterator=L.toInt32ArrayAsyncIterator=L.toInt16ArrayAsyncIterator=L.toInt8ArrayAsyncIterator=L.toArrayBufferViewAsyncIterator=L.toUint8ClampedArrayIterator=L.toFloat64ArrayIterator=L.toFloat32ArrayIterator=L.toUint32ArrayIterator=L.toUint16ArrayIterator=L.toUint8ArrayIterator=L.toInt32ArrayIterator=L.toInt16ArrayIterator=L.toInt8ArrayIterator=L.toArrayBufferViewIterator=L.toUint8ClampedArray=L.toFloat64Array=L.toFloat32Array=L.toBigUint64Array=L.toUint32Array=L.toUint16Array=L.toUint8Array=L.toBigInt64Array=L.toInt32Array=L.toInt16Array=L.toInt8Array=L.toArrayBufferView=L.joinUint8Arrays=L.memcpy=void 0;var Ge=dt(),D1=Ai(),F1=Rr(),E1=D1.flatbuffers.ByteBuffer,Cr=ft(),Ru=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:ArrayBuffer;function R1(i){let e=i[0]?[i[0]]:[],t,r,n,s;for(let c,_,v=0,B=0,O=i.length;++v<O;){if(c=e[B],_=i[v],!c||!_||c.buffer!==_.buffer||_.byteOffset<c.byteOffset){_&&(e[++B]=_);continue}if({byteOffset:t,byteLength:n}=c,{byteOffset:r,byteLength:s}=_,t+n<r||r+s<t){_&&(e[++B]=_);continue}e[B]=new Uint8Array(c.buffer,t,r-t+s)}return e}function Cu(i,e,t=0,r=e.byteLength){let n=i.byteLength,s=new Uint8Array(i.buffer,i.byteOffset,n),c=new Uint8Array(e.buffer,e.byteOffset,Math.min(r,n));return s.set(c,t),i}L.memcpy=Cu;function C1(i,e){let t=R1(i),r=t.reduce((O,N)=>O+N.byteLength,0),n,s,c,_=0,v=-1,B=Math.min(e||1/0,r);for(let O=t.length;++v<O;){if(n=t[v],s=n.subarray(0,Math.min(n.length,B-_)),B<=_+s.length){s.length<n.length?t[v]=n.subarray(s.length):s.length===n.length&&v++,c?Cu(c,s,_):c=s;break}Cu(c||(c=new Uint8Array(B)),s,_),_+=s.length}return[c||new Uint8Array(0),t.slice(v),r-(c?c.byteLength:0)]}L.joinUint8Arrays=C1;function _t(i,e){let t=Cr.isIteratorResult(e)?e.value:e;return t instanceof i?i===Uint8Array?new i(t.buffer,t.byteOffset,t.byteLength):t:t?(typeof t=="string"&&(t=F1.encodeUtf8(t)),t instanceof ArrayBuffer?new i(t):t instanceof Ru?new i(t):t instanceof E1?_t(i,t.bytes()):ArrayBuffer.isView(t)?t.byteLength<=0?new i(0):new i(t.buffer,t.byteOffset,t.byteLength/i.BYTES_PER_ELEMENT):i.from(t)):new i(0)}L.toArrayBufferView=_t;L.toInt8Array=i=>_t(Int8Array,i);L.toInt16Array=i=>_t(Int16Array,i);L.toInt32Array=i=>_t(Int32Array,i);L.toBigInt64Array=i=>_t(Cr.BigInt64Array,i);L.toUint8Array=i=>_t(Uint8Array,i);L.toUint16Array=i=>_t(Uint16Array,i);L.toUint32Array=i=>_t(Uint32Array,i);L.toBigUint64Array=i=>_t(Cr.BigUint64Array,i);L.toFloat32Array=i=>_t(Float32Array,i);L.toFloat64Array=i=>_t(Float64Array,i);L.toUint8ClampedArray=i=>_t(Uint8ClampedArray,i);var Uu=i=>(i.next(),i);function*ni(i,e){let t=function*(n){yield n},r=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Ru?t(e):Cr.isIterable(e)?e:t(e);return yield*Uu(function*(n){let s=null;do s=n.next(yield _t(i,s));while(!s.done)}(r[Symbol.iterator]())),new i}L.toArrayBufferViewIterator=ni;L.toInt8ArrayIterator=i=>ni(Int8Array,i);L.toInt16ArrayIterator=i=>ni(Int16Array,i);L.toInt32ArrayIterator=i=>ni(Int32Array,i);L.toUint8ArrayIterator=i=>ni(Uint8Array,i);L.toUint16ArrayIterator=i=>ni(Uint16Array,i);L.toUint32ArrayIterator=i=>ni(Uint32Array,i);L.toFloat32ArrayIterator=i=>ni(Float32Array,i);L.toFloat64ArrayIterator=i=>ni(Float64Array,i);L.toUint8ClampedArrayIterator=i=>ni(Uint8ClampedArray,i);function Gt(i,e){return Ge.__asyncGenerator(this,arguments,function*(){if(Cr.isPromise(e))return yield Ge.__await(yield Ge.__await(yield*Ge.__asyncDelegator(Ge.__asyncValues(Gt(i,yield Ge.__await(e))))));let r=function(c){return Ge.__asyncGenerator(this,arguments,function*(){yield yield Ge.__await(yield Ge.__await(c))})},n=function(c){return Ge.__asyncGenerator(this,arguments,function*(){yield Ge.__await(yield*Ge.__asyncDelegator(Ge.__asyncValues(Uu(function*(_){let v=null;do v=_.next(yield v==null?void 0:v.value);while(!v.done)}(c[Symbol.iterator]())))))})},s=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Ru?r(e):Cr.isIterable(e)?n(e):Cr.isAsyncIterable(e)?e:r(e);return yield Ge.__await(yield*Ge.__asyncDelegator(Ge.__asyncValues(Uu(function(c){return Ge.__asyncGenerator(this,arguments,function*(){let _=null;do _=yield Ge.__await(c.next(yield yield Ge.__await(_t(i,_))));while(!_.done)})}(s[Symbol.asyncIterator]()))))),yield Ge.__await(new i)})}L.toArrayBufferViewAsyncIterator=Gt;L.toInt8ArrayAsyncIterator=i=>Gt(Int8Array,i);L.toInt16ArrayAsyncIterator=i=>Gt(Int16Array,i);L.toInt32ArrayAsyncIterator=i=>Gt(Int32Array,i);L.toUint8ArrayAsyncIterator=i=>Gt(Uint8Array,i);L.toUint16ArrayAsyncIterator=i=>Gt(Uint16Array,i);L.toUint32ArrayAsyncIterator=i=>Gt(Uint32Array,i);L.toFloat32ArrayAsyncIterator=i=>Gt(Float32Array,i);L.toFloat64ArrayAsyncIterator=i=>Gt(Float64Array,i);L.toUint8ClampedArrayAsyncIterator=i=>Gt(Uint8ClampedArray,i);function U1(i,e,t){if(i!==0){t=t.slice(0,e+1);for(let r=-1;++r<=e;)t[r]+=i}return t}L.rebaseValueOffsets=U1;function k1(i,e){let t=0,r=i.length;if(r!==e.length)return!1;if(r>0)do if(i[t]!==e[t])return!1;while(++t<r);return!0}L.compareArrayLike=k1});var _s=R(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});var je=dt(),mt=Ze();Mu.default={fromIterable(i){return wo(M1(i))},fromAsyncIterable(i){return wo(P1(i))},fromDOMStream(i){return wo(V1(i))},fromNodeStream(i){return wo(N1(i))},toDOMStream(i,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(i,e){throw new Error('"toNodeStream" not available in this environment')}};var wo=i=>(i.next(),i);function*M1(i){let e,t=!1,r=[],n,s,c,_=0;function v(){return s==="peek"?mt.joinUint8Arrays(r,c)[0]:([n,r,_]=mt.joinUint8Arrays(r,c),n)}({cmd:s,size:c}=yield null);let B=mt.toUint8ArrayIterator(i)[Symbol.iterator]();try{do if({done:e,value:n}=isNaN(c-_)?B.next(void 0):B.next(c-_),!e&&n.byteLength>0&&(r.push(n),_+=n.byteLength),e||c<=_)do({cmd:s,size:c}=yield v());while(c<_);while(!e)}catch(O){(t=!0)&&typeof B.throw=="function"&&B.throw(O)}finally{t===!1&&typeof B.return=="function"&&B.return(null)}return null}function P1(i){return je.__asyncGenerator(this,arguments,function*(){let t,r=!1,n=[],s,c,_,v=0;function B(){return c==="peek"?mt.joinUint8Arrays(n,_)[0]:([s,n,v]=mt.joinUint8Arrays(n,_),s)}({cmd:c,size:_}=yield yield je.__await(null));let O=mt.toUint8ArrayAsyncIterator(i)[Symbol.asyncIterator]();try{do if({done:t,value:s}=isNaN(_-v)?yield je.__await(O.next(void 0)):yield je.__await(O.next(_-v)),!t&&s.byteLength>0&&(n.push(s),v+=s.byteLength),t||_<=v)do({cmd:c,size:_}=yield yield je.__await(B()));while(_<v);while(!t)}catch(N){(r=!0)&&typeof O.throw=="function"&&(yield je.__await(O.throw(N)))}finally{r===!1&&typeof O.return=="function"&&(yield je.__await(O.return(new Uint8Array(0))))}return yield je.__await(null)})}function V1(i){return je.__asyncGenerator(this,arguments,function*(){let t=!1,r=!1,n=[],s,c,_,v=0;function B(){return c==="peek"?mt.joinUint8Arrays(n,_)[0]:([s,n,v]=mt.joinUint8Arrays(n,_),s)}({cmd:c,size:_}=yield yield je.__await(null));let O=new m_(i);try{do if({done:t,value:s}=isNaN(_-v)?yield je.__await(O.read(void 0)):yield je.__await(O.read(_-v)),!t&&s.byteLength>0&&(n.push(mt.toUint8Array(s)),v+=s.byteLength),t||_<=v)do({cmd:c,size:_}=yield yield je.__await(B()));while(_<v);while(!t)}catch(N){(r=!0)&&(yield je.__await(O.cancel(N)))}finally{r===!1?yield je.__await(O.cancel()):i.locked&&O.releaseLock()}return yield je.__await(null)})}var m_=class{constructor(e){this.source=e,this.byobReader=null,this.defaultReader=null;try{this.supportsBYOB=!!(this.reader=this.getBYOBReader())}catch(t){this.supportsBYOB=!(this.reader=this.getDefaultReader())}}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=this.byobReader=this.defaultReader=null}cancel(e){return je.__awaiter(this,void 0,void 0,function*(){let{reader:t,source:r}=this;t&&(yield t.cancel(e).catch(()=>{})),r&&r.locked&&this.releaseLock()})}read(e){return je.__awaiter(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};let t=!this.supportsBYOB||typeof e!="number"?yield this.getDefaultReader().read():yield this.readFromBYOBReader(e);return!t.done&&(t.value=mt.toUint8Array(t)),t})}getDefaultReader(){return this.byobReader&&this.releaseLock(),this.defaultReader||(this.defaultReader=this.source.getReader(),this.defaultReader.closed.catch(()=>{})),this.reader=this.defaultReader}getBYOBReader(){return this.defaultReader&&this.releaseLock(),this.byobReader||(this.byobReader=this.source.getReader({mode:"byob"}),this.byobReader.closed.catch(()=>{})),this.reader=this.byobReader}readFromBYOBReader(e){return je.__awaiter(this,void 0,void 0,function*(){return yield b_(this.getBYOBReader(),new ArrayBuffer(e),0,e)})}};function b_(i,e,t,r){return je.__awaiter(this,void 0,void 0,function*(){if(t>=r)return{done:!1,value:new Uint8Array(e,0,r)};let{done:n,value:s}=yield i.read(new Uint8Array(e,t,r-t));return(t+=s.byteLength)<r&&!n?yield b_(i,s.buffer,t,r):{done:n,value:new Uint8Array(s.buffer,0,t)}})}var ku=(i,e)=>{let t=n=>r([e,n]),r;return[e,t,new Promise(n=>(r=n)&&i.once(e,t))]};function N1(i){return je.__asyncGenerator(this,arguments,function*(){let t=[],r="error",n=!1,s=null,c,_,v=0,B=[],O;function N(){return c==="peek"?mt.joinUint8Arrays(B,_)[0]:([O,B,v]=mt.joinUint8Arrays(B,_),O)}if({cmd:c,size:_}=yield yield je.__await(null),i.isTTY)return yield yield je.__await(new Uint8Array(0)),yield je.__await(null);try{t[0]=ku(i,"end"),t[1]=ku(i,"error");do{if(t[2]=ku(i,"readable"),[r,s]=yield je.__await(Promise.race(t.map(J=>J[2]))),r==="error")break;if((n=r==="end")||(isFinite(_-v)?(O=mt.toUint8Array(i.read(_-v)),O.byteLength<_-v&&(O=mt.toUint8Array(i.read(void 0)))):O=mt.toUint8Array(i.read(void 0)),O.byteLength>0&&(B.push(O),v+=O.byteLength)),n||_<=v)do({cmd:c,size:_}=yield yield je.__await(N()));while(_<v)}while(!n)}finally{yield je.__await(q(t,r==="error"?s:null))}return yield je.__await(null);function q(J,ke){return O=B=null,new Promise((Oe,Yt)=>{for(let[pt,le]of J)i.off(pt,le);try{let pt=i.destroy;pt&&pt.call(i,ke),ke=void 0}catch(pt){ke=pt||ke}finally{ke!=null?Yt(ke):Oe()}})}})}});var qe=R(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.Vector=ln.AbstractVector=void 0;var jo=class{};ln.AbstractVector=jo;ln.Vector=jo;jo.prototype.data=null});var Qi=R(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.Schema=V.Buffer=V.Field=V.DictionaryEncoding=V.KeyValue=V.Duration=V.Interval=V.Timestamp=V.Time=V.Date=V.Decimal=V.Bool=V.FixedSizeBinary=V.LargeBinary=V.LargeUtf8=V.Binary=V.Utf8=V.FloatingPoint=V.Int=V.Union=V.Map=V.FixedSizeList=V.LargeList=V.List=V.Struct_=V.Null=V.Endianness=V.DictionaryKind=V.Type=V.IntervalUnit=V.TimeUnit=V.DateUnit=V.Precision=V.UnionMode=V.Feature=V.MetadataVersion=void 0;var De=Ai(),L1;(function(i){i[i.V1=0]="V1",i[i.V2=1]="V2",i[i.V3=2]="V3",i[i.V4=3]="V4",i[i.V5=4]="V5"})(L1=V.MetadataVersion||(V.MetadataVersion={}));var x1;(function(i){i[i.UNUSED=0]="UNUSED",i[i.DICTIONARY_REPLACEMENT=1]="DICTIONARY_REPLACEMENT",i[i.COMPRESSED_BODY=2]="COMPRESSED_BODY"})(x1=V.Feature||(V.Feature={}));var Pu;(function(i){i[i.Sparse=0]="Sparse",i[i.Dense=1]="Dense"})(Pu=V.UnionMode||(V.UnionMode={}));var Vu;(function(i){i[i.HALF=0]="HALF",i[i.SINGLE=1]="SINGLE",i[i.DOUBLE=2]="DOUBLE"})(Vu=V.Precision||(V.Precision={}));var Nu;(function(i){i[i.DAY=0]="DAY",i[i.MILLISECOND=1]="MILLISECOND"})(Nu=V.DateUnit||(V.DateUnit={}));var Ur;(function(i){i[i.SECOND=0]="SECOND",i[i.MILLISECOND=1]="MILLISECOND",i[i.MICROSECOND=2]="MICROSECOND",i[i.NANOSECOND=3]="NANOSECOND"})(Ur=V.TimeUnit||(V.TimeUnit={}));var Lu;(function(i){i[i.YEAR_MONTH=0]="YEAR_MONTH",i[i.DAY_TIME=1]="DAY_TIME"})(Lu=V.IntervalUnit||(V.IntervalUnit={}));var xu;(function(i){i[i.NONE=0]="NONE",i[i.Null=1]="Null",i[i.Int=2]="Int",i[i.FloatingPoint=3]="FloatingPoint",i[i.Binary=4]="Binary",i[i.Utf8=5]="Utf8",i[i.Bool=6]="Bool",i[i.Decimal=7]="Decimal",i[i.Date=8]="Date",i[i.Time=9]="Time",i[i.Timestamp=10]="Timestamp",i[i.Interval=11]="Interval",i[i.List=12]="List",i[i.Struct_=13]="Struct_",i[i.Union=14]="Union",i[i.FixedSizeBinary=15]="FixedSizeBinary",i[i.FixedSizeList=16]="FixedSizeList",i[i.Map=17]="Map",i[i.Duration=18]="Duration",i[i.LargeBinary=19]="LargeBinary",i[i.LargeUtf8=20]="LargeUtf8",i[i.LargeList=21]="LargeList"})(xu=V.Type||(V.Type={}));var qu;(function(i){i[i.DenseArray=0]="DenseArray"})(qu=V.DictionaryKind||(V.DictionaryKind={}));var Wu;(function(i){i[i.Little=0]="Little",i[i.Big=1]="Big"})(Wu=V.Endianness||(V.Endianness={}));var kr=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 kr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new kr).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return kr.startNull(e),kr.endNull(e)}};V.Null=kr;var Mr=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 Mr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Mr).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return Mr.startStruct_(e),Mr.endStruct_(e)}};V.Struct_=Mr;var Pr=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 Pr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Pr).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return Pr.startList(e),Pr.endList(e)}};V.List=Pr;var Vr=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 Vr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeList(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Vr).__init(e.readInt32(e.position())+e.position(),e)}static startLargeList(e){e.startObject(0)}static endLargeList(e){return e.endObject()}static createLargeList(e){return Vr.startLargeList(e),Vr.endLargeList(e)}};V.LargeList=Vr;var zi=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 zi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new zi).__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 zi.startFixedSizeList(e),zi.addListSize(e,t),zi.endFixedSizeList(e)}};V.FixedSizeList=zi;var Hi=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 Hi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Hi).__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 Hi.startMap(e),Hi.addKeysSorted(e,t),Hi.endMap(e)}};V.Map=Hi;var Oi=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 Oi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Oi).__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):Pu.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,Pu.Sparse)}static addTypeIds(e,t){e.addFieldOffset(1,t,0)}static createTypeIdsVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addInt32(t[r]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(e,t,r){return Oi.startUnion(e),Oi.addMode(e,t),Oi.addTypeIds(e,r),Oi.endUnion(e)}};V.Union=Oi;var si=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 si).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new si).__init(e.readInt32(e.position())+e.position(),e)}bitWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startInt(e){e.startObject(2)}static addBitWidth(e,t){e.addFieldInt32(0,t,0)}static addIsSigned(e,t){e.addFieldInt8(1,+t,0)}static endInt(e){return e.endObject()}static createInt(e,t,r){return si.startInt(e),si.addBitWidth(e,t),si.addIsSigned(e,r),si.endInt(e)}};V.Int=si;var Yi=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 Yi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Yi).__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):Vu.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,Vu.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,t){return Yi.startFloatingPoint(e),Yi.addPrecision(e,t),Yi.endFloatingPoint(e)}};V.FloatingPoint=Yi;var Nr=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 Nr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Nr).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return Nr.startUtf8(e),Nr.endUtf8(e)}};V.Utf8=Nr;var Lr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBinary(e,t){return(t||new Lr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Lr).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return Lr.startBinary(e),Lr.endBinary(e)}};V.Binary=Lr;var xr=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 xr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new xr).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return xr.startLargeUtf8(e),xr.endLargeUtf8(e)}};V.LargeUtf8=xr;var qr=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 qr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new qr).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return qr.startLargeBinary(e),qr.endLargeBinary(e)}};V.LargeBinary=qr;var Gi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeBinary(e,t){return(t||new Gi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Gi).__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 Gi.startFixedSizeBinary(e),Gi.addByteWidth(e,t),Gi.endFixedSizeBinary(e)}};V.FixedSizeBinary=Gi;var Wr=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 Wr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Wr).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return Wr.startBool(e),Wr.endBool(e)}};V.Bool=Wr;var oi=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 oi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new oi).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,t){e.addFieldInt32(0,t,0)}static addScale(e,t){e.addFieldInt32(1,t,0)}static addBitWidth(e,t){e.addFieldInt32(2,t,128)}static endDecimal(e){return e.endObject()}static createDecimal(e,t,r,n){return oi.startDecimal(e),oi.addPrecision(e,t),oi.addScale(e,r),oi.addBitWidth(e,n),oi.endDecimal(e)}};V.Decimal=oi;var Ki=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 Ki).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ki).__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):Nu.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Nu.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,t){return Ki.startDate(e),Ki.addUnit(e,t),Ki.endDate(e)}};V.Date=Ki;var Di=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 Di).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Di).__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):Ur.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,Ur.MILLISECOND)}static addBitWidth(e,t){e.addFieldInt32(1,t,32)}static endTime(e){return e.endObject()}static createTime(e,t,r){return Di.startTime(e),Di.addUnit(e,t),Di.addBitWidth(e,r),Di.endTime(e)}};V.Time=Di;var Fi=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 Fi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Fi).__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):Ur.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,Ur.SECOND)}static addTimezone(e,t){e.addFieldOffset(1,t,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,t,r){return Fi.startTimestamp(e),Fi.addUnit(e,t),Fi.addTimezone(e,r),Fi.endTimestamp(e)}};V.Timestamp=Fi;var $i=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 $i).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new $i).__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):Lu.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Lu.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,t){return $i.startInterval(e),$i.addUnit(e,t),$i.endInterval(e)}};V.Interval=$i;var Ji=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 Ji).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ji).__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):Ur.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Ur.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(e,t){return Ji.startDuration(e),Ji.addUnit(e,t),Ji.endDuration(e)}};V.Duration=Ji;var Kt=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 Kt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Kt).__init(e.readInt32(e.position())+e.position(),e)}key(e){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}value(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startKeyValue(e){e.startObject(2)}static addKey(e,t){e.addFieldOffset(0,t,0)}static addValue(e,t){e.addFieldOffset(1,t,0)}static endKeyValue(e){return e.endObject()}static createKeyValue(e,t,r){return Kt.startKeyValue(e),Kt.addKey(e,t),Kt.addValue(e,r),Kt.endKeyValue(e)}};V.KeyValue=Kt;var St=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 St).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new St).__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 si).__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):qu.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,qu.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}static createDictionaryEncoding(e,t,r,n,s){return St.startDictionaryEncoding(e),St.addId(e,t),St.addIndexType(e,r),St.addIsOrdered(e,n),St.addDictionaryKind(e,s),St.endDictionaryEncoding(e)}};V.DictionaryEncoding=St;var ht=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 ht).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ht).__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):xu.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 St).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(e,t){let r=this.bb.__offset(this.bb_pos,14);return r?(t||new ht).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}childrenLength(){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let r=this.bb.__offset(this.bb_pos,16);return r?(t||new Kt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,t){e.addFieldOffset(0,t,0)}static addNullable(e,t){e.addFieldInt8(1,+t,0)}static addTypeType(e,t){e.addFieldInt8(2,t,xu.NONE)}static addType(e,t){e.addFieldOffset(3,t,0)}static addDictionary(e,t){e.addFieldOffset(4,t,0)}static addChildren(e,t){e.addFieldOffset(5,t,0)}static createChildrenVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startChildrenVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(6,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}static createField(e,t,r,n,s,c,_,v){return ht.startField(e),ht.addName(e,t),ht.addNullable(e,r),ht.addTypeType(e,n),ht.addType(e,s),ht.addDictionary(e,c),ht.addChildren(e,_),ht.addCustomMetadata(e,v),ht.endField(e)}};V.Field=ht;var g_=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static createBuffer(e,t,r){return e.prep(8,16),e.writeInt64(r),e.writeInt64(t),e.offset()}};V.Buffer=g_;var $t=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(e,t){return(t||new $t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new $t).__init(e.readInt32(e.position())+e.position(),e)}endianness(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Wu.Little}fields(e,t){let r=this.bb.__offset(this.bb_pos,6);return r?(t||new ht).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}fieldsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let r=this.bb.__offset(this.bb_pos,8);return r?(t||new Kt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+e*8):this.bb.createLong(0,0)}featuresLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,Wu.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let r=t.length-1;r>=0;r--)e.addInt64(t[r]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(e,t,r,n,s){return $t.startSchema(e),$t.addEndianness(e,t),$t.addFields(e,r),$t.addCustomMetadata(e,n),$t.addFeatures(e,s),$t.endSchema(e)}};V.Schema=$t});var Bo=R(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.Message=We.DictionaryBatch=We.RecordBatch=We.BodyCompression=We.FieldNode=We.MessageHeader=We.BodyCompressionMethod=We.CompressionType=void 0;var Io=Ai(),To=Qi(),zu;(function(i){i[i.LZ4_FRAME=0]="LZ4_FRAME",i[i.ZSTD=1]="ZSTD"})(zu=We.CompressionType||(We.CompressionType={}));var Hu;(function(i){i[i.BUFFER=0]="BUFFER"})(Hu=We.BodyCompressionMethod||(We.BodyCompressionMethod={}));var Yu;(function(i){i[i.NONE=0]="NONE",i[i.Schema=1]="Schema",i[i.DictionaryBatch=2]="DictionaryBatch",i[i.RecordBatch=3]="RecordBatch",i[i.Tensor=4]="Tensor",i[i.SparseTensor=5]="SparseTensor"})(Yu=We.MessageHeader||(We.MessageHeader={}));var Gu=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static createFieldNode(e,t,r){return e.prep(8,16),e.writeInt64(r),e.writeInt64(t),e.offset()}};We.FieldNode=Gu;var ai=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 ai).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,t){return e.setPosition(e.position()+Io.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ai).__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):zu.LZ4_FRAME}method(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):Hu.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,zu.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,Hu.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,t,r){return ai.startBodyCompression(e),ai.addCodec(e,t),ai.addMethod(e,r),ai.endBodyCompression(e)}};We.BodyCompression=ai;var At=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsRecordBatch(e,t){return(t||new At).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,t){return e.setPosition(e.position()+Io.flatbuffers.SIZE_PREFIX_LENGTH),(t||new At).__init(e.readInt32(e.position())+e.position(),e)}length(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}nodes(e,t){let r=this.bb.__offset(this.bb_pos,6);return r?(t||new Gu).__init(this.bb.__vector(this.bb_pos+r)+e*16,this.bb):null}nodesLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,t){let r=this.bb.__offset(this.bb_pos,8);return r?(t||new To.Buffer).__init(this.bb.__vector(this.bb_pos+r)+e*16,this.bb):null}buffersLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){let t=this.bb.__offset(this.bb_pos,10);return t?(e||new ai).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addNodes(e,t){e.addFieldOffset(1,t,0)}static startNodesVector(e,t){e.startVector(16,t,8)}static addBuffers(e,t){e.addFieldOffset(2,t,0)}static startBuffersVector(e,t){e.startVector(16,t,8)}static addCompression(e,t){e.addFieldOffset(3,t,0)}static endRecordBatch(e){return e.endObject()}static createRecordBatch(e,t,r,n,s){return At.startRecordBatch(e),At.addLength(e,t),At.addNodes(e,r),At.addBuffers(e,n),At.addCompression(e,s),At.endRecordBatch(e)}};We.RecordBatch=At;var ui=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 ui).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,t){return e.setPosition(e.position()+Io.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ui).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}data(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new At).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isDelta(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startDictionaryBatch(e){e.startObject(3)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addData(e,t){e.addFieldOffset(1,t,0)}static addIsDelta(e,t){e.addFieldInt8(2,+t,0)}static endDictionaryBatch(e){return e.endObject()}static createDictionaryBatch(e,t,r,n){return ui.startDictionaryBatch(e),ui.addId(e,t),ui.addData(e,r),ui.addIsDelta(e,n),ui.endDictionaryBatch(e)}};We.DictionaryBatch=ui;var Ot=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 Ot).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+Io.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):To.MetadataVersion.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):Yu.NONE}header(e){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}customMetadata(e,t){let r=this.bb.__offset(this.bb_pos,12);return r?(t||new To.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,To.MetadataVersion.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,Yu.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,e.createLong(0,0))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(e,t,r,n,s,c){return Ot.startMessage(e),Ot.addVersion(e,t),Ot.addHeaderType(e,r),Ot.addHeader(e,n),Ot.addBodyLength(e,s),Ot.addCustomMetadata(e,c),Ot.endMessage(e)}};We.Message=Ot});var Se=R(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 dn=Qi();Object.defineProperty(Me,"DateUnit",{enumerable:!0,get:function(){return dn.DateUnit}});Object.defineProperty(Me,"TimeUnit",{enumerable:!0,get:function(){return dn.TimeUnit}});Object.defineProperty(Me,"Precision",{enumerable:!0,get:function(){return dn.Precision}});Object.defineProperty(Me,"UnionMode",{enumerable:!0,get:function(){return dn.UnionMode}});Object.defineProperty(Me,"IntervalUnit",{enumerable:!0,get:function(){return dn.IntervalUnit}});Object.defineProperty(Me,"MetadataVersion",{enumerable:!0,get:function(){return dn.MetadataVersion}});var q1=Bo();Object.defineProperty(Me,"MessageHeader",{enumerable:!0,get:function(){return q1.MessageHeader}});var W1;(function(i){i[i.NONE=0]="NONE",i[i.Null=1]="Null",i[i.Int=2]="Int",i[i.Float=3]="Float",i[i.Binary=4]="Binary",i[i.Utf8=5]="Utf8",i[i.Bool=6]="Bool",i[i.Decimal=7]="Decimal",i[i.Date=8]="Date",i[i.Time=9]="Time",i[i.Timestamp=10]="Timestamp",i[i.Interval=11]="Interval",i[i.List=12]="List",i[i.Struct=13]="Struct",i[i.Union=14]="Union",i[i.FixedSizeBinary=15]="FixedSizeBinary",i[i.FixedSizeList=16]="FixedSizeList",i[i.Map=17]="Map",i[i.Dictionary=-1]="Dictionary",i[i.Int8=-2]="Int8",i[i.Int16=-3]="Int16",i[i.Int32=-4]="Int32",i[i.Int64=-5]="Int64",i[i.Uint8=-6]="Uint8",i[i.Uint16=-7]="Uint16",i[i.Uint32=-8]="Uint32",i[i.Uint64=-9]="Uint64",i[i.Float16=-10]="Float16",i[i.Float32=-11]="Float32",i[i.Float64=-12]="Float64",i[i.DateDay=-13]="DateDay",i[i.DateMillisecond=-14]="DateMillisecond",i[i.TimestampSecond=-15]="TimestampSecond",i[i.TimestampMillisecond=-16]="TimestampMillisecond",i[i.TimestampMicrosecond=-17]="TimestampMicrosecond",i[i.TimestampNanosecond=-18]="TimestampNanosecond",i[i.TimeSecond=-19]="TimeSecond",i[i.TimeMillisecond=-20]="TimeMillisecond",i[i.TimeMicrosecond=-21]="TimeMicrosecond",i[i.TimeNanosecond=-22]="TimeNanosecond",i[i.DenseUnion=-23]="DenseUnion",i[i.SparseUnion=-24]="SparseUnion",i[i.IntervalDayTime=-25]="IntervalDayTime",i[i.IntervalYearMonth=-26]="IntervalYearMonth"})(W1=Me.Type||(Me.Type={}));var z1;(function(i){i[i.OFFSET=0]="OFFSET",i[i.DATA=1]="DATA",i[i.VALIDITY=2]="VALIDITY",i[i.TYPE=3]="TYPE"})(z1=Me.BufferType||(Me.BufferType={}))});var ci=R(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.popcnt_uint32=Ke.popcnt_array=Ke.popcnt_bit_range=Ke.BitIterator=Ke.packBools=Ke.truncateBitmap=Ke.setBool=Ke.getBit=Ke.getBool=void 0;function v_(i,e,t,r){return(t&1<<r)!=0}Ke.getBool=v_;function w_(i,e,t,r){return(t&1<<r)>>r}Ke.getBit=w_;function H1(i,e,t){return t?!!(i[e>>3]|=1<<e%8)||!0:!(i[e>>3]&=~(1<<e%8))&&!1}Ke.setBool=H1;function Y1(i,e,t){let r=t.byteLength+7&~7;if(i>0||t.byteLength<r){let n=new Uint8Array(r);return n.set(i%8==0?t.subarray(i>>3):j_(new So(t,i,e,null,v_)).subarray(0,r)),n}return t}Ke.truncateBitmap=Y1;function j_(i){let e=[],t=0,r=0,n=0;for(let c of i)c&&(n|=1<<r),++r==8&&(e[t++]=n,n=r=0);(t===0||r>0)&&(e[t++]=n);let s=new Uint8Array(e.length+7&~7);return s.set(e),s}Ke.packBools=j_;var So=class{constructor(e,t,r,n,s){this.bytes=e,this.length=r,this.context=n,this.get=s,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index<this.length?(this.bit===8&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}};Ke.BitIterator=So;function Ku(i,e,t){if(t-e<=0)return 0;if(t-e<8){let s=0;for(let c of new So(i,e,t-e,i,w_))s+=c;return s}let r=t>>3<<3,n=e+(e%8==0?0:8-e%8);return Ku(i,e,n)+Ku(i,r,t)+I_(i,n>>3,r-n>>3)}Ke.popcnt_bit_range=Ku;function I_(i,e,t){let r=0,n=e|0,s=new DataView(i.buffer,i.byteOffset,i.byteLength),c=t===void 0?i.byteLength:n+t;for(;c-n>=4;)r+=Ao(s.getUint32(n)),n+=4;for(;c-n>=2;)r+=Ao(s.getUint16(n)),n+=2;for(;c-n>=1;)r+=Ao(s.getUint8(n)),n+=1;return r}Ke.popcnt_array=I_;function Ao(i){let e=i|0;return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}Ke.popcnt_uint32=Ao});var ve=R(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 x=Se(),Pe=class{static isNull(e){return(e==null?void 0:e.typeId)===x.Type.Null}static isInt(e){return(e==null?void 0:e.typeId)===x.Type.Int}static isFloat(e){return(e==null?void 0:e.typeId)===x.Type.Float}static isBinary(e){return(e==null?void 0:e.typeId)===x.Type.Binary}static isUtf8(e){return(e==null?void 0:e.typeId)===x.Type.Utf8}static isBool(e){return(e==null?void 0:e.typeId)===x.Type.Bool}static isDecimal(e){return(e==null?void 0:e.typeId)===x.Type.Decimal}static isDate(e){return(e==null?void 0:e.typeId)===x.Type.Date}static isTime(e){return(e==null?void 0:e.typeId)===x.Type.Time}static isTimestamp(e){return(e==null?void 0:e.typeId)===x.Type.Timestamp}static isInterval(e){return(e==null?void 0:e.typeId)===x.Type.Interval}static isList(e){return(e==null?void 0:e.typeId)===x.Type.List}static isStruct(e){return(e==null?void 0:e.typeId)===x.Type.Struct}static isUnion(e){return(e==null?void 0:e.typeId)===x.Type.Union}static isFixedSizeBinary(e){return(e==null?void 0:e.typeId)===x.Type.FixedSizeBinary}static isFixedSizeList(e){return(e==null?void 0:e.typeId)===x.Type.FixedSizeList}static isMap(e){return(e==null?void 0:e.typeId)===x.Type.Map}static isDictionary(e){return(e==null?void 0:e.typeId)===x.Type.Dictionary}get typeId(){return x.Type.NONE}};k.DataType=Pe;Pe[Symbol.toStringTag]=(i=>(i.children=null,i.ArrayType=Array,i[Symbol.toStringTag]="DataType"))(Pe.prototype);var Oo=class extends Pe{toString(){return"Null"}get typeId(){return x.Type.Null}};k.Null=Oo;Oo[Symbol.toStringTag]=(i=>i[Symbol.toStringTag]="Null")(Oo.prototype);var Dt=class extends Pe{constructor(e,t){super();this.isSigned=e,this.bitWidth=t}get typeId(){return x.Type.Int}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?Int32Array:Uint32Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}};k.Int=Dt;Dt[Symbol.toStringTag]=(i=>(i.isSigned=null,i.bitWidth=null,i[Symbol.toStringTag]="Int"))(Dt.prototype);var $u=class extends Dt{constructor(){super(!0,8)}};k.Int8=$u;var Ju=class extends Dt{constructor(){super(!0,16)}};k.Int16=Ju;var Qu=class extends Dt{constructor(){super(!0,32)}};k.Int32=Qu;var Zu=class extends Dt{constructor(){super(!0,64)}};k.Int64=Zu;var Xu=class extends Dt{constructor(){super(!1,8)}};k.Uint8=Xu;var ec=class extends Dt{constructor(){super(!1,16)}};k.Uint16=ec;var tc=class extends Dt{constructor(){super(!1,32)}};k.Uint32=tc;var ic=class extends Dt{constructor(){super(!1,64)}};k.Uint64=ic;Object.defineProperty($u.prototype,"ArrayType",{value:Int8Array});Object.defineProperty(Ju.prototype,"ArrayType",{value:Int16Array});Object.defineProperty(Qu.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(Zu.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(Xu.prototype,"ArrayType",{value:Uint8Array});Object.defineProperty(ec.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(tc.prototype,"ArrayType",{value:Uint32Array});Object.defineProperty(ic.prototype,"ArrayType",{value:Uint32Array});var zr=class extends Pe{constructor(e){super();this.precision=e}get typeId(){return x.Type.Float}get ArrayType(){switch(this.precision){case x.Precision.HALF:return Uint16Array;case x.Precision.SINGLE:return Float32Array;case x.Precision.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};k.Float=zr;zr[Symbol.toStringTag]=(i=>(i.precision=null,i[Symbol.toStringTag]="Float"))(zr.prototype);var rc=class extends zr{constructor(){super(x.Precision.HALF)}};k.Float16=rc;var nc=class extends zr{constructor(){super(x.Precision.SINGLE)}};k.Float32=nc;var sc=class extends zr{constructor(){super(x.Precision.DOUBLE)}};k.Float64=sc;Object.defineProperty(rc.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(nc.prototype,"ArrayType",{value:Float32Array});Object.defineProperty(sc.prototype,"ArrayType",{value:Float64Array});var Do=class extends Pe{constructor(){super()}get typeId(){return x.Type.Binary}toString(){return"Binary"}};k.Binary=Do;Do[Symbol.toStringTag]=(i=>(i.ArrayType=Uint8Array,i[Symbol.toStringTag]="Binary"))(Do.prototype);var Fo=class extends Pe{constructor(){super()}get typeId(){return x.Type.Utf8}toString(){return"Utf8"}};k.Utf8=Fo;Fo[Symbol.toStringTag]=(i=>(i.ArrayType=Uint8Array,i[Symbol.toStringTag]="Utf8"))(Fo.prototype);var Eo=class extends Pe{constructor(){super()}get typeId(){return x.Type.Bool}toString(){return"Bool"}};k.Bool=Eo;Eo[Symbol.toStringTag]=(i=>(i.ArrayType=Uint8Array,i[Symbol.toStringTag]="Bool"))(Eo.prototype);var Ro=class extends Pe{constructor(e,t){super();this.scale=e,this.precision=t}get typeId(){return x.Type.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};k.Decimal=Ro;Ro[Symbol.toStringTag]=(i=>(i.scale=null,i.precision=null,i.ArrayType=Uint32Array,i[Symbol.toStringTag]="Decimal"))(Ro.prototype);var fn=class extends Pe{constructor(e){super();this.unit=e}get typeId(){return x.Type.Date}toString(){return`Date${(this.unit+1)*32}<${x.DateUnit[this.unit]}>`}};k.Date_=fn;fn[Symbol.toStringTag]=(i=>(i.unit=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Date"))(fn.prototype);var T_=class extends fn{constructor(){super(x.DateUnit.DAY)}};k.DateDay=T_;var B_=class extends fn{constructor(){super(x.DateUnit.MILLISECOND)}};k.DateMillisecond=B_;var Zi=class extends Pe{constructor(e,t){super();this.unit=e,this.bitWidth=t}get typeId(){return x.Type.Time}toString(){return`Time${this.bitWidth}<${x.TimeUnit[this.unit]}>`}};k.Time=Zi;Zi[Symbol.toStringTag]=(i=>(i.unit=null,i.bitWidth=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Time"))(Zi.prototype);var S_=class extends Zi{constructor(){super(x.TimeUnit.SECOND,32)}};k.TimeSecond=S_;var A_=class extends Zi{constructor(){super(x.TimeUnit.MILLISECOND,32)}};k.TimeMillisecond=A_;var O_=class extends Zi{constructor(){super(x.TimeUnit.MICROSECOND,64)}};k.TimeMicrosecond=O_;var D_=class extends Zi{constructor(){super(x.TimeUnit.NANOSECOND,64)}};k.TimeNanosecond=D_;var Xi=class extends Pe{constructor(e,t){super();this.unit=e,this.timezone=t}get typeId(){return x.Type.Timestamp}toString(){return`Timestamp<${x.TimeUnit[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};k.Timestamp=Xi;Xi[Symbol.toStringTag]=(i=>(i.unit=null,i.timezone=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Timestamp"))(Xi.prototype);var F_=class extends Xi{constructor(e){super(x.TimeUnit.SECOND,e)}};k.TimestampSecond=F_;var E_=class extends Xi{constructor(e){super(x.TimeUnit.MILLISECOND,e)}};k.TimestampMillisecond=E_;var R_=class extends Xi{constructor(e){super(x.TimeUnit.MICROSECOND,e)}};k.TimestampMicrosecond=R_;var C_=class extends Xi{constructor(e){super(x.TimeUnit.NANOSECOND,e)}};k.TimestampNanosecond=C_;var hn=class extends Pe{constructor(e){super();this.unit=e}get typeId(){return x.Type.Interval}toString(){return`Interval<${x.IntervalUnit[this.unit]}>`}};k.Interval=hn;hn[Symbol.toStringTag]=(i=>(i.unit=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Interval"))(hn.prototype);var U_=class extends hn{constructor(){super(x.IntervalUnit.DAY_TIME)}};k.IntervalDayTime=U_;var k_=class extends hn{constructor(){super(x.IntervalUnit.YEAR_MONTH)}};k.IntervalYearMonth=k_;var Co=class extends Pe{constructor(e){super();this.children=[e]}get typeId(){return x.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=Co;Co[Symbol.toStringTag]=(i=>(i.children=null,i[Symbol.toStringTag]="List"))(Co.prototype);var Uo=class extends Pe{constructor(e){super();this.children=e}get typeId(){return x.Type.Struct}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};k.Struct=Uo;Uo[Symbol.toStringTag]=(i=>(i.children=null,i[Symbol.toStringTag]="Struct"))(Uo.prototype);var pn=class extends Pe{constructor(e,t,r){super();this.mode=e,this.children=r,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((n,s,c)=>(n[s]=c)&&n||n,Object.create(null))}get typeId(){return x.Type.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}};k.Union=pn;pn[Symbol.toStringTag]=(i=>(i.mode=null,i.typeIds=null,i.children=null,i.typeIdToChildIndex=null,i.ArrayType=Int8Array,i[Symbol.toStringTag]="Union"))(pn.prototype);var M_=class extends pn{constructor(e,t){super(x.UnionMode.Dense,e,t)}};k.DenseUnion=M_;var P_=class extends pn{constructor(e,t){super(x.UnionMode.Sparse,e,t)}};k.SparseUnion=P_;var ko=class extends Pe{constructor(e){super();this.byteWidth=e}get typeId(){return x.Type.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};k.FixedSizeBinary=ko;ko[Symbol.toStringTag]=(i=>(i.byteWidth=null,i.ArrayType=Uint8Array,i[Symbol.toStringTag]="FixedSizeBinary"))(ko.prototype);var Mo=class extends Pe{constructor(e,t){super();this.listSize=e,this.children=[t]}get typeId(){return x.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=Mo;Mo[Symbol.toStringTag]=(i=>(i.children=null,i.listSize=null,i[Symbol.toStringTag]="FixedSizeList"))(Mo.prototype);var Po=class extends Pe{constructor(e,t=!1){super();this.children=[e],this.keysSorted=t}get typeId(){return x.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_=Po;Po[Symbol.toStringTag]=(i=>(i.children=null,i.keysSorted=null,i[Symbol.toStringTag]="Map_"))(Po.prototype);var G1=(i=>()=>++i)(-1),Vo=class extends Pe{constructor(e,t,r,n){super();this.indices=t,this.dictionary=e,this.isOrdered=n||!1,this.id=r==null?G1():typeof r=="number"?r:r.low}get typeId(){return x.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=Vo;Vo[Symbol.toStringTag]=(i=>(i.id=null,i.indices=null,i.isOrdered=null,i.dictionary=null,i[Symbol.toStringTag]="Dictionary"))(Vo.prototype);function K1(i){let e=i;switch(i.typeId){case x.Type.Decimal:return 4;case x.Type.Timestamp:return 2;case x.Type.Date:return 1+e.unit;case x.Type.Interval:return 1+e.unit;case x.Type.Int:return 1+ +(e.bitWidth>32);case x.Type.Time:return 1+ +(e.bitWidth>32);case x.Type.FixedSizeList:return e.listSize;case x.Type.FixedSizeBinary:return e.byteWidth;default:return 1}}k.strideForType=K1});var Jt=R(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.Data=Hr.kUnknownNullCount=void 0;var $1=ci(),J1=ci(),H=Se(),Q1=ve(),pe=Ze();Hr.kUnknownNullCount=-1;var re=class{constructor(e,t,r,n,s,c,_){this.type=e,this.dictionary=_,this.offset=Math.floor(Math.max(t||0,0)),this.length=Math.floor(Math.max(r||0,0)),this._nullCount=Math.floor(Math.max(n||0,-1)),this.childData=(c||[]).map(B=>B instanceof re?B:B.data);let v;s instanceof re?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=Q1.strideForType(e),s&&((v=s[0])&&(this.valueOffsets=v),(v=s[1])&&(this.values=v),(v=s[2])&&(this.nullBitmap=v),(v=s[3])&&(this.typeIds=v)))}get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get byteLength(){let e=0,{valueOffsets:t,values:r,nullBitmap:n,typeIds:s}=this;return t&&(e+=t.byteLength),r&&(e+=r.byteLength),n&&(e+=n.byteLength),s&&(e+=s.byteLength),this.childData.reduce((c,_)=>c+_.byteLength,e)}get nullCount(){let e=this._nullCount,t;return e<=Hr.kUnknownNullCount&&(t=this.nullBitmap)&&(this._nullCount=e=this.length-J1.popcnt_bit_range(t,this.offset,this.offset+this.length)),e}clone(e,t=this.offset,r=this.length,n=this._nullCount,s=this,c=this.childData){return new re(e,t,r,n,s,c,this.dictionary)}slice(e,t){let{stride:r,typeId:n,childData:s}=this,c=+(this._nullCount===0)-1,_=n===16?r:1,v=this._sliceBuffers(e,t,r,n);return this.clone(this.type,this.offset+e,t,c,v,!s.length||this.valueOffsets?s:this._sliceChildren(s,_*e,_*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===H.Type.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:r}=this,n=new Uint8Array((e+63&~63)>>3).fill(255,0,t>>3);n[t>>3]=(1<<t-(t&~7))-1,r>0&&n.set($1.truncateBitmap(this.offset,t,this.nullBitmap),0);let s=this.buffers;return s[H.BufferType.VALIDITY]=n,this.clone(this.type,0,e,r+(e-t),s)}_sliceBuffers(e,t,r,n){let s,{buffers:c}=this;return(s=c[H.BufferType.TYPE])&&(c[H.BufferType.TYPE]=s.subarray(e,e+t)),(s=c[H.BufferType.OFFSET])&&(c[H.BufferType.OFFSET]=s.subarray(e,e+t+1))||(s=c[H.BufferType.DATA])&&(c[H.BufferType.DATA]=n===6?s:s.subarray(r*e,r*(e+t))),c}_sliceChildren(e,t,r){return e.map(n=>n.slice(t,r))}static new(e,t,r,n,s,c,_){switch(s instanceof re?s=s.buffers:s||(s=[]),e.typeId){case H.Type.Null:return re.Null(e,t,r);case H.Type.Int:return re.Int(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.Dictionary:return re.Dictionary(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[],_);case H.Type.Float:return re.Float(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.Bool:return re.Bool(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.Decimal:return re.Decimal(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.Date:return re.Date(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.Time:return re.Time(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.Timestamp:return re.Timestamp(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.Interval:return re.Interval(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.FixedSizeBinary:return re.FixedSizeBinary(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.DATA]||[]);case H.Type.Binary:return re.Binary(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.OFFSET]||[],s[H.BufferType.DATA]||[]);case H.Type.Utf8:return re.Utf8(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.OFFSET]||[],s[H.BufferType.DATA]||[]);case H.Type.List:return re.List(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.OFFSET]||[],(c||[])[0]);case H.Type.FixedSizeList:return re.FixedSizeList(e,t,r,n||0,s[H.BufferType.VALIDITY],(c||[])[0]);case H.Type.Struct:return re.Struct(e,t,r,n||0,s[H.BufferType.VALIDITY],c||[]);case H.Type.Map:return re.Map(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.OFFSET]||[],(c||[])[0]);case H.Type.Union:return re.Union(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.TYPE]||[],s[H.BufferType.OFFSET]||c,c)}throw new Error(`Unrecognized typeId ${e.typeId}`)}static Null(e,t,r){return new re(e,t,r,0)}static Int(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static Dictionary(e,t,r,n,s,c,_){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.indices.ArrayType,c),pe.toUint8Array(s)],[],_)}static Float(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static Bool(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static Decimal(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static Date(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static Time(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static Timestamp(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static Interval(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static FixedSizeBinary(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,c),pe.toUint8Array(s)])}static Binary(e,t,r,n,s,c,_){return new re(e,t,r,n,[pe.toInt32Array(c),pe.toUint8Array(_),pe.toUint8Array(s)])}static Utf8(e,t,r,n,s,c,_){return new re(e,t,r,n,[pe.toInt32Array(c),pe.toUint8Array(_),pe.toUint8Array(s)])}static List(e,t,r,n,s,c,_){return new re(e,t,r,n,[pe.toInt32Array(c),void 0,pe.toUint8Array(s)],_?[_]:[])}static FixedSizeList(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,void 0,pe.toUint8Array(s)],c?[c]:[])}static Struct(e,t,r,n,s,c){return new re(e,t,r,n,[void 0,void 0,pe.toUint8Array(s)],c)}static Map(e,t,r,n,s,c,_){return new re(e,t,r,n,[pe.toInt32Array(c),void 0,pe.toUint8Array(s)],_?[_]:[])}static Union(e,t,r,n,s,c,_,v){let B=[void 0,void 0,pe.toUint8Array(s),pe.toArrayBufferView(e.ArrayType,c)];return e.mode===H.UnionMode.Sparse?new re(e,t,r,n,B,_):(B[H.BufferType.OFFSET]=pe.toInt32Array(_),new re(e,t,r,n,B,v))}};Hr.Data=re;re.prototype.childData=Object.freeze([])});var oc=R(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.valueToString=void 0;var Z1=void 0;function X1(i){if(i===null)return"null";if(i===Z1)return"undefined";switch(typeof i){case"number":return`${i}`;case"bigint":return`${i}`;case"string":return`"${i}"`}return typeof i[Symbol.toPrimitive]=="function"?i[Symbol.toPrimitive]("string"):ArrayBuffer.isView(i)?`[${i}]`:JSON.stringify(i)}No.valueToString=X1});var V_=R(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.createIsValidFunction=void 0;var ac=oc(),eA=ft();function tA(i){if(!i||i.length<=0)return function(n){return!0};let e="",t=i.filter(r=>r===r);return t.length>0&&(e=`
2
2
  switch (x) {${t.map(r=>`
3
- case ${oA(r)}:`).join("")}
3
+ case ${iA(r)}:`).join("")}
4
4
  return false;
5
5
  }`),i.length!==t.length&&(e=`if (x !== x) return false;
6
6
  ${e}`),new Function("x",`${e}
7
- return true;`)}xo.createIsValidFunction=sA;function oA(i){return typeof i!="bigint"?cc.valueToString(i):nA.BigIntAvailable?`${cc.valueToString(i)}n`:`"${cc.valueToString(i)}"`}});var tr=R(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.WideBufferBuilder=Dt.OffsetsBufferBuilder=Dt.BitmapBufferBuilder=Dt.DataBufferBuilder=Dt.BufferBuilder=void 0;var W_=Ze(),lc=ft(),dc=(i,e)=>(i*e+63&~63||64)/e,aA=(i,e=0)=>i.length>=e?i.subarray(0,e):W_.memcpy(new i.constructor(e),i,0),bs=class{constructor(e,t=1){this.buffer=e,this.stride=t,this.BYTES_PER_ELEMENT=e.BYTES_PER_ELEMENT,this.ArrayType=e.constructor,this._resize(this.length=e.length/t|0)}get byteLength(){return this.length*this.stride*this.BYTES_PER_ELEMENT|0}get reservedLength(){return this.buffer.length/this.stride}get reservedByteLength(){return this.buffer.byteLength}set(e,t){return this}append(e){return this.set(this.length,e)}reserve(e){if(e>0){this.length+=e;let t=this.stride,r=this.length*t,n=this.buffer.length;r>=n&&this._resize(n===0?dc(r*1,this.BYTES_PER_ELEMENT):dc(r*2,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=dc(e*this.stride,this.BYTES_PER_ELEMENT);let t=aA(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this._resize(0),this}_resize(e){return this.buffer=W_.memcpy(new this.ArrayType(e),this.buffer)}};Dt.BufferBuilder=bs;bs.prototype.offset=0;var qo=class extends bs{last(){return this.get(this.length-1)}get(e){return this.buffer[e]}set(e,t){return this.reserve(e-this.length+1),this.buffer[e*this.stride]=t,this}};Dt.DataBufferBuilder=qo;var z_=class extends qo{constructor(e=new Uint8Array(0)){super(e,1/8);this.numValid=0}get numInvalid(){return this.length-this.numValid}get(e){return this.buffer[e>>3]>>e%8&1}set(e,t){let{buffer:r}=this.reserve(e-this.length+1),n=e>>3,s=e%8,c=r[n]>>s&1;return t?c===0&&(r[n]|=1<<s,++this.numValid):c===1&&(r[n]&=~(1<<s),--this.numValid),this}clear(){return this.numValid=0,super.clear()}};Dt.BitmapBufferBuilder=z_;var H_=class extends qo{constructor(e=new Int32Array(1)){super(e,1)}append(e){return this.set(this.length-1,e)}set(e,t){let r=this.length-1,n=this.reserve(e-r+1).buffer;return r<e++&&n.fill(n[r],r,e),n[e]=n[e-1]+t,this}flush(e=this.length-1){return e>this.length&&this.set(e-1,0),super.flush(e+1)}};Dt.OffsetsBufferBuilder=H_;var Y_=class extends bs{get ArrayType64(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?lc.BigInt64Array:lc.BigUint64Array)}set(e,t){switch(this.reserve(e-this.length+1),typeof t){case"bigint":this.buffer64[e]=t;break;case"number":this.buffer[e*this.stride]=t;break;default:this.buffer.set(t,e*this.stride)}return this}_resize(e){let t=super._resize(e),r=t.byteLength/(this.BYTES_PER_ELEMENT*this.stride);return lc.BigIntAvailable&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,r)),t}};Dt.WideBufferBuilder=Y_});var Ve=R(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.VariableWidthBuilder=ir.FixedWidthBuilder=ir.Builder=void 0;var _n=dt(),uA=qe(),mn=Se(),cA=Jt(),lA=q_(),fc=tr(),dA=ve(),Ft=class{constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=dA.strideForType(e),this._nulls=new fc.BitmapBufferBuilder,t&&t.length>0&&(this._isValid=lA.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 fA(e)}static throughAsyncIterable(e){return hA(e)}toVector(){return uA.Vector.new(this.flush())}get ArrayType(){return this.type.ArrayType}get nullCount(){return this._nulls.numInvalid}get numChildren(){return this.children.length}get byteLength(){let e=0;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),this._typeIds&&(e+=this._typeIds.byteLength),this.children.reduce((t,r)=>t+r.byteLength,e)}get reservedLength(){return this._nulls.reservedLength}get reservedByteLength(){let e=0;return this._offsets&&(e+=this._offsets.reservedByteLength),this._values&&(e+=this._values.reservedByteLength),this._nulls&&(e+=this._nulls.reservedByteLength),this._typeIds&&(e+=this._typeIds.reservedByteLength),this.children.reduce((t,r)=>t+r.reservedByteLength,e)}get valueOffsets(){return this._offsets?this._offsets.buffer:null}get values(){return this._values?this._values.buffer:null}get nullBitmap(){return this._nulls?this._nulls.buffer:null}get typeIds(){return this._typeIds?this._typeIds.buffer:null}append(e){return this.set(this.length,e)}isValid(e){return this._isValid(e)}set(e,t){return this.setValid(e,this.isValid(t))&&this.setValue(e,t),this}setValue(e,t){this._setValue(this,e,t)}setValid(e,t){return this.length=this._nulls.set(e,+t).length,t}addChild(e,t=`${this.numChildren}`){throw new Error(`Cannot append children to non-nested type "${this.type}"`)}getChildAt(e){return this.children[e]||null}flush(){let e=[],t=this._values,r=this._offsets,n=this._typeIds,{length:s,nullCount:c}=this;n?(e[mn.BufferType.TYPE]=n.flush(s),r&&(e[mn.BufferType.OFFSET]=r.flush(s))):r?(t&&(e[mn.BufferType.DATA]=t.flush(r.last())),e[mn.BufferType.OFFSET]=r.flush(s)):t&&(e[mn.BufferType.DATA]=t.flush(s)),c>0&&(e[mn.BufferType.VALIDITY]=this._nulls.flush(s));let _=cA.Data.new(this.type,0,s,c,e,this.children.map(v=>v.flush()));return this.clear(),_}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}};ir.Builder=Ft;Ft.prototype.length=1;Ft.prototype.stride=1;Ft.prototype.children=null;Ft.prototype.finished=!1;Ft.prototype.nullValues=null;Ft.prototype._isValid=()=>!0;var G_=class extends Ft{constructor(e){super(e);this._values=new fc.DataBufferBuilder(new this.ArrayType(0),this.stride)}setValue(e,t){let r=this._values;return r.reserve(e-r.length+1),super.setValue(e,t)}};ir.FixedWidthBuilder=G_;var K_=class extends Ft{constructor(e){super(e);this._pendingLength=0,this._offsets=new fc.OffsetsBufferBuilder}setValue(e,t){let r=this._pending||(this._pending=new Map),n=r.get(e);n&&(this._pendingLength-=n.length),this._pendingLength+=t.length,r.set(e,t)}setValid(e,t){return super.setValid(e,t)?!0:((this._pending||(this._pending=new Map)).set(e,void 0),!1)}clear(){return this._pendingLength=0,this._pending=void 0,super.clear()}flush(){return this._flush(),super.flush()}finish(){return this._flush(),super.finish()}_flush(){let e=this._pending,t=this._pendingLength;return this._pendingLength=0,this._pending=void 0,e&&e.size>0&&this._flushPending(e,t),this}};ir.VariableWidthBuilder=K_;function fA(i){let{["queueingStrategy"]:e="count"}=i,{["highWaterMark"]:t=e!=="bytes"?1e3:Math.pow(2,14)}=i,r=e!=="bytes"?"length":"byteLength";return function*(n){let s=0,c=Ft.new(i);for(let _ of n)c.append(_)[r]>=t&&++s&&(yield c.toVector());(c.finish().length>0||s===0)&&(yield c.toVector())}}function hA(i){let{["queueingStrategy"]:e="count"}=i,{["highWaterMark"]:t=e!=="bytes"?1e3:Math.pow(2,14)}=i,r=e!=="bytes"?"length":"byteLength";return function(n){return _n.__asyncGenerator(this,arguments,function*(){var s,c;let _=0,v=Ft.new(i);try{for(var B=_n.__asyncValues(n),O;O=yield _n.__await(B.next()),!O.done;){let N=O.value;v.append(N)[r]>=t&&++_&&(yield yield _n.__await(v.toVector()))}}catch(N){s={error:N}}finally{try{O&&!O.done&&(c=B.return)&&(yield _n.__await(c.call(B)))}finally{if(s)throw s.error}}(v.finish().length>0||_===0)&&(yield yield _n.__await(v.toVector()))})}}});var hc=R(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.BoolBuilder=void 0;var pA=tr(),yA=Ve(),$_=class extends yA.Builder{constructor(e){super(e);this._values=new pA.BitmapBufferBuilder}setValue(e,t){this._values.set(e,+t)}};Wo.BoolBuilder=$_});var pc=R(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.NullBuilder=void 0;var _A=Ve(),J_=class extends _A.Builder{setValue(e,t){}setValid(e,t){return this.length=Math.max(e+1,this.length),t}};zo.NullBuilder=J_});var yc=R(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.DateMillisecondBuilder=rr.DateDayBuilder=rr.DateBuilder=void 0;var mA=Ve(),Ho=class extends mA.FixedWidthBuilder{};rr.DateBuilder=Ho;var Q_=class extends Ho{};rr.DateDayBuilder=Q_;var Z_=class extends Ho{};rr.DateMillisecondBuilder=Z_});var _c=R(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.DecimalBuilder=void 0;var bA=Ve(),X_=class extends bA.FixedWidthBuilder{};Yo.DecimalBuilder=X_});var bc=R(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.DictionaryBuilder=void 0;var gA=ve(),mc=Ve(),em=class extends mc.Builder{constructor({type:e,nullValues:t,dictionaryHashFunction:r}){super({type:new gA.Dictionary(e.dictionary,e.indices,e.id,e.isOrdered)});this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=mc.Builder.new({type:this.type.indices,nullValues:t}),this.dictionary=mc.Builder.new({type:this.type.dictionary,nullValues:null}),typeof r=="function"&&(this.valueToKey=r)}get values(){return this.indices.values}get nullCount(){return this.indices.nullCount}get nullBitmap(){return this.indices.nullBitmap}get byteLength(){return this.indices.byteLength+this.dictionary.byteLength}get reservedLength(){return this.indices.reservedLength+this.dictionary.reservedLength}get reservedByteLength(){return this.indices.reservedByteLength+this.dictionary.reservedByteLength}isValid(e){return this.indices.isValid(e)}setValid(e,t){let r=this.indices;return t=r.setValid(e,t),this.length=r.length,t}setValue(e,t){let r=this._keysToIndices,n=this.valueToKey(t),s=r[n];return s===void 0&&(r[n]=s=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,s)}flush(){let e=this.type,t=this._dictionary,r=this.dictionary.toVector(),n=this.indices.flush().clone(e);return n.dictionary=t?t.concat(r):r,this.finished||(this._dictionaryOffset+=r.length),this._dictionary=n.dictionary,this.clear(),n}finish(){return this.indices.finish(),this.dictionary.finish(),this._dictionaryOffset=0,this._keysToIndices=Object.create(null),super.finish()}clear(){return this.indices.clear(),this.dictionary.clear(),super.clear()}valueToKey(e){return typeof e=="string"?e:`${e}`}};Go.DictionaryBuilder=em});var gc=R(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.FixedSizeBinaryBuilder=void 0;var vA=Ve(),tm=class extends vA.FixedWidthBuilder{};Ko.FixedSizeBinaryBuilder=tm});var gs=R(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.float64ToUint16=gn.uint16ToFloat64=void 0;var im=new Float64Array(1),bn=new Uint32Array(im.buffer);function wA(i){let e=(i&31744)>>10,t=(i&1023)/1024,r=Math.pow(-1,(i&32768)>>15);switch(e){case 31:return r*(t?NaN:1/0);case 0:return r*(t?6103515625e-14*t:0)}return r*Math.pow(2,e-15)*(1+t)}gn.uint16ToFloat64=wA;function jA(i){if(i!==i)return 32256;im[0]=i;let e=(bn[1]&2147483648)>>16&65535,t=bn[1]&2146435072,r=0;return t>=1089470464?bn[0]>0?t=31744:(t=(t&2080374784)>>16,r=(bn[1]&1048575)>>10):t<=1056964608?(r=1048576+(bn[1]&1048575),r=1048576+(r<<(t>>20)-998)>>21,t=0):(t=t-1056964608>>10,r=(bn[1]&1048575)+512>>10),e|t|r&65535}gn.float64ToUint16=jA});var vc=R(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.Float64Builder=fi.Float32Builder=fi.Float16Builder=fi.FloatBuilder=void 0;var IA=gs(),TA=Ve(),vs=class extends TA.FixedWidthBuilder{};fi.FloatBuilder=vs;var rm=class extends vs{setValue(e,t){this._values.set(e,IA.float64ToUint16(t))}};fi.Float16Builder=rm;var nm=class extends vs{setValue(e,t){this._values.set(e,t)}};fi.Float32Builder=nm;var sm=class extends vs{setValue(e,t){this._values.set(e,t)}};fi.Float64Builder=sm});var Is=R(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.BN=Xe.bignumToBigInt=Xe.bignumToString=Xe.isArrowBigNumSymbol=void 0;var BA=Ze(),ws=ft();Xe.isArrowBigNumSymbol=Symbol.for("isArrowBigNum");function Qt(i,...e){return e.length===0?Object.setPrototypeOf(BA.toArrayBufferView(this.TypedArray,i),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(i,...e),this.constructor.prototype)}Qt.prototype[Xe.isArrowBigNumSymbol]=!0;Qt.prototype.toJSON=function(){return`"${Xe.bignumToString(this)}"`};Qt.prototype.valueOf=function(){return om(this)};Qt.prototype.toString=function(){return Xe.bignumToString(this)};Qt.prototype[Symbol.toPrimitive]=function(i="default"){switch(i){case"number":return om(this);case"string":return Xe.bignumToString(this);case"default":return Xe.bignumToBigInt(this)}return Xe.bignumToString(this)};function vn(...i){return Qt.apply(this,i)}function wn(...i){return Qt.apply(this,i)}function js(...i){return Qt.apply(this,i)}Object.setPrototypeOf(vn.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(wn.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(js.prototype,Object.create(Uint32Array.prototype));Object.assign(vn.prototype,Qt.prototype,{constructor:vn,signed:!0,TypedArray:Int32Array,BigIntArray:ws.BigInt64Array});Object.assign(wn.prototype,Qt.prototype,{constructor:wn,signed:!1,TypedArray:Uint32Array,BigIntArray:ws.BigUint64Array});Object.assign(js.prototype,Qt.prototype,{constructor:js,signed:!0,TypedArray:Uint32Array,BigIntArray:ws.BigUint64Array});function om(i){let{buffer:e,byteOffset:t,length:r,signed:n}=i,s=new Int32Array(e,t,r),c=0,_=0,v=s.length,B,O;for(;_<v;)O=s[_++],B=s[_++],n||(B=B>>>0),c+=(O>>>0)+B*Math.pow(_,32);return c}ws.BigIntAvailable?(Xe.bignumToBigInt=i=>i.byteLength===8?new i.BigIntArray(i.buffer,i.byteOffset,1)[0]:wc(i),Xe.bignumToString=i=>i.byteLength===8?`${new i.BigIntArray(i.buffer,i.byteOffset,1)[0]}`:wc(i)):(Xe.bignumToString=wc,Xe.bignumToBigInt=Xe.bignumToString);function wc(i){let e="",t=new Uint32Array(2),r=new Uint16Array(i.buffer,i.byteOffset,i.byteLength/2),n=new Uint32Array((r=new Uint16Array(r).reverse()).buffer),s=-1,c=r.length-1;do{for(t[0]=r[s=0];s<c;)r[s++]=t[1]=t[0]/10,t[0]=(t[0]-t[1]*10<<16)+r[s];r[s]=t[1]=t[0]/10,t[0]=t[0]-t[1]*10,e=`${t[0]}${e}`}while(n[0]||n[1]||n[2]||n[3]);return e||"0"}var $o=class{static new(e,t){switch(t){case!0:return new vn(e);case!1:return new wn(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case ws.BigInt64Array:return new vn(e)}return e.byteLength===16?new js(e):new wn(e)}static signed(e){return new vn(e)}static unsigned(e){return new wn(e)}static decimal(e){return new js(e)}constructor(e,t){return $o.new(e,t)}};Xe.BN=$o});var jc=R($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.Uint64Builder=$e.Uint32Builder=$e.Uint16Builder=$e.Uint8Builder=$e.Int64Builder=$e.Int32Builder=$e.Int16Builder=$e.Int8Builder=$e.IntBuilder=void 0;var SA=Is(),am=tr(),AA=ft(),OA=Ve(),hi=class extends OA.FixedWidthBuilder{setValue(e,t){this._values.set(e,t)}};$e.IntBuilder=hi;var um=class extends hi{};$e.Int8Builder=um;var cm=class extends hi{};$e.Int16Builder=cm;var lm=class extends hi{};$e.Int32Builder=lm;var dm=class extends hi{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(Jo));super(e);this._values=new am.WideBufferBuilder(new Int32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(Jo(e))}};$e.Int64Builder=dm;var fm=class extends hi{};$e.Uint8Builder=fm;var hm=class extends hi{};$e.Uint16Builder=hm;var pm=class extends hi{};$e.Uint32Builder=pm;var ym=class extends hi{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(Jo));super(e);this._values=new am.WideBufferBuilder(new Uint32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(Jo(e))}};$e.Uint64Builder=ym;var Jo=(i=>e=>(ArrayBuffer.isView(e)&&(i.buffer=e.buffer,i.byteOffset=e.byteOffset,i.byteLength=e.byteLength,e=SA.bignumToBigInt(i),i.buffer=null),e))({BigIntArray:AA.BigInt64Array})});var Ic=R(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.TimeNanosecondBuilder=Et.TimeMicrosecondBuilder=Et.TimeMillisecondBuilder=Et.TimeSecondBuilder=Et.TimeBuilder=void 0;var DA=Ve(),jn=class extends DA.FixedWidthBuilder{};Et.TimeBuilder=jn;var _m=class extends jn{};Et.TimeSecondBuilder=_m;var mm=class extends jn{};Et.TimeMillisecondBuilder=mm;var bm=class extends jn{};Et.TimeMicrosecondBuilder=bm;var gm=class extends jn{};Et.TimeNanosecondBuilder=gm});var Tc=R(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.TimestampNanosecondBuilder=Rt.TimestampMicrosecondBuilder=Rt.TimestampMillisecondBuilder=Rt.TimestampSecondBuilder=Rt.TimestampBuilder=void 0;var FA=Ve(),In=class extends FA.FixedWidthBuilder{};Rt.TimestampBuilder=In;var vm=class extends In{};Rt.TimestampSecondBuilder=vm;var wm=class extends In{};Rt.TimestampMillisecondBuilder=wm;var jm=class extends In{};Rt.TimestampMicrosecondBuilder=jm;var Im=class extends In{};Rt.TimestampNanosecondBuilder=Im});var Bc=R(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.IntervalYearMonthBuilder=nr.IntervalDayTimeBuilder=nr.IntervalBuilder=void 0;var EA=Ve(),Qo=class extends EA.FixedWidthBuilder{};nr.IntervalBuilder=Qo;var Tm=class extends Qo{};nr.IntervalDayTimeBuilder=Tm;var Bm=class extends Qo{};nr.IntervalYearMonthBuilder=Bm});var Xo=R(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.BinaryBuilder=void 0;var RA=Ze(),CA=tr(),UA=Ve(),Sm=class extends UA.VariableWidthBuilder{constructor(e){super(e);this._values=new CA.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,RA.toUint8Array(t))}_flushPending(e,t){let r=this._offsets,n=this._values.reserve(t).buffer,s=0,c=0,_=0,v;for([s,v]of e)v===void 0?r.set(s,0):(c=v.length,n.set(v,_),r.set(s,c),_+=c)}};Zo.BinaryBuilder=Sm});var ta=R(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.Utf8Builder=void 0;var kA=Cr(),MA=Xo(),PA=tr(),VA=Ve(),Sc=class extends VA.VariableWidthBuilder{constructor(e){super(e);this._values=new PA.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,kA.encodeUtf8(t))}_flushPending(e,t){}};ea.Utf8Builder=Sc;Sc.prototype._flushPending=MA.BinaryBuilder.prototype._flushPending});var Ac=R(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.Run=void 0;var NA=qe(),Am=class{get length(){return this._values.length}get(e){return this._values[e]}clear(){return this._values=null,this}bind(e){return e instanceof NA.Vector?e:(this._values=e,this)}};ia.Run=Am});var rt=R(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.Field=Tn.Schema=void 0;var LA=ve(),Ct=class{constructor(e=[],t,r){this.fields=e||[],this.metadata=t||new Map,r||(r=Oc(e)),this.dictionaries=r}get[Symbol.toStringTag](){return"Schema"}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(", ")} }>`}select(...e){let t=e.reduce((r,n)=>(r[n]=!0)&&r,Object.create(null));return new Ct(this.fields.filter(r=>t[r.name]),this.metadata)}selectAt(...e){return new Ct(e.map(t=>this.fields[t]).filter(Boolean),this.metadata)}assign(...e){let t=e[0]instanceof Ct?e[0]:Array.isArray(e[0])?new Ct(e[0]):new Ct(e),r=[...this.fields],n=ra(ra(new Map,this.metadata),t.metadata),s=t.fields.filter(_=>{let v=r.findIndex(B=>B.name===_.name);return~v?(r[v]=_.clone({metadata:ra(ra(new Map,r[v].metadata),_.metadata)}))&&!1:!0}),c=Oc(s,new Map);return new Ct([...r,...s],n,new Map([...this.dictionaries,...c]))}};Tn.Schema=Ct;var Ri=class{constructor(e,t,r=!1,n){this.name=e,this.type=t,this.nullable=r,this.metadata=n||new Map}static new(...e){let[t,r,n,s]=e;return e[0]&&typeof e[0]=="object"&&({name:t}=e[0],r===void 0&&(r=e[0].type),n===void 0&&(n=e[0].nullable),s===void 0&&(s=e[0].metadata)),new Ri(`${t}`,r,n,s)}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[t,r,n,s]=e;return!e[0]||typeof e[0]!="object"?[t=this.name,r=this.type,n=this.nullable,s=this.metadata]=e:{name:t=this.name,type:r=this.type,nullable:n=this.nullable,metadata:s=this.metadata}=e[0],Ri.new(t,r,n,s)}};Tn.Field=Ri;function ra(i,e){return new Map([...i||new Map,...e||new Map])}function Oc(i,e=new Map){for(let t=-1,r=i.length;++t<r;){let s=i[t].type;if(LA.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&&Oc(s.children,e)}return e}Ct.prototype.fields=null;Ct.prototype.metadata=null;Ct.prototype.dictionaries=null;Ri.prototype.type=null;Ri.prototype.name=null;Ri.prototype.nullable=null;Ri.prototype.metadata=null});var Dc=R(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.ListBuilder=void 0;var xA=Ac(),qA=rt(),WA=ve(),zA=tr(),HA=Ve(),Om=class extends HA.VariableWidthBuilder{constructor(e){super(e);this._run=new xA.Run,this._offsets=new zA.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 WA.List(new qA.Field(t,e.type,!0)),this.numChildren-1}clear(){return this._run.clear(),super.clear()}_flushPending(e){let t=this._run,r=this._offsets,n=this._setValue,s=0,c;for([s,c]of e)c===void 0?r.set(s,0):(r.set(s,c.length),n(this,s,t.bind(c)))}};na.ListBuilder=Om});var Fc=R(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.FixedSizeListBuilder=void 0;var YA=Ac(),GA=rt(),KA=Ve(),$A=ve(),Dm=class extends KA.Builder{constructor(){super(...arguments);this._run=new YA.Run}setValue(e,t){super.setValue(e,this._run.bind(t))}addChild(e,t="0"){if(this.numChildren>0)throw new Error("FixedSizeListBuilder can only have one child.");let r=this.children.push(e);return this.type=new $A.FixedSizeList(this.type.listSize,new GA.Field(t,e.type,!0)),r}clear(){return this._run.clear(),super.clear()}};sa.FixedSizeListBuilder=Dm});var Ec=R(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.MapBuilder=void 0;var JA=rt(),QA=ve(),ZA=Ve(),Fm=class extends ZA.VariableWidthBuilder{set(e,t){return super.set(e,t)}setValue(e,t){t=t instanceof Map?t:new Map(Object.entries(t));let r=this._pending||(this._pending=new Map),n=r.get(e);n&&(this._pendingLength-=n.size),this._pendingLength+=t.size,r.set(e,t)}addChild(e,t=`${this.numChildren}`){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new QA.Map_(new JA.Field(t,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){let t=this._offsets,r=this._setValue;e.forEach((n,s)=>{n===void 0?t.set(s,0):(t.set(s,n.size),r(this,s,n))})}};oa.MapBuilder=Fm});var Rc=R(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.StructBuilder=void 0;var XA=rt(),eO=Ve(),tO=ve(),Em=class extends eO.Builder{addChild(e,t=`${this.numChildren}`){let r=this.children.push(e);return this.type=new tO.Struct([...this.type.children,new XA.Field(t,e.type,!0)]),r}};aa.StructBuilder=Em});var Cc=R(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.DenseUnionBuilder=sr.SparseUnionBuilder=sr.UnionBuilder=void 0;var iO=rt(),Rm=tr(),rO=Ve(),nO=ve(),ua=class extends rO.Builder{constructor(e){super(e);this._typeIds=new Rm.DataBufferBuilder(new Int8Array(0),1),typeof e.valueToChildTypeId=="function"&&(this._valueToChildTypeId=e.valueToChildTypeId)}get typeIdToChildIndex(){return this.type.typeIdToChildIndex}append(e,t){return this.set(this.length,e,t)}set(e,t,r){return r===void 0&&(r=this._valueToChildTypeId(this,t,e)),this.setValid(e,this.isValid(t))&&this.setValue(e,t,r),this}setValue(e,t,r){this._typeIds.set(e,r),super.setValue(e,t)}addChild(e,t=`${this.children.length}`){let r=this.children.push(e),{type:{children:n,mode:s,typeIds:c}}=this,_=[...n,new iO.Field(t,e.type)];return this.type=new nO.Union(s,[...c,r],_),r}_valueToChildTypeId(e,t,r){throw new Error("Cannot map UnionBuilder value to child typeId. Pass the `childTypeId` as the second argument to unionBuilder.append(), or supply a `valueToChildTypeId` function as part of the UnionBuilder constructor options.")}};sr.UnionBuilder=ua;var Cm=class extends ua{};sr.SparseUnionBuilder=Cm;var Um=class extends ua{constructor(e){super(e);this._offsets=new Rm.DataBufferBuilder(new Int32Array(0))}setValue(e,t,r){let n=this.type.typeIdToChildIndex[r];return this._offsets.set(e,this.getChildAt(n).length),super.setValue(e,t,r)}};sr.DenseUnionBuilder=Um});var ut=R(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.Visitor=void 0;var sO=Jt(),oO=qe(),F=Se(),aO=ve(),Te=class{visitMany(e,...t){return e.map((r,n)=>this.visit(r,...t.map(s=>s[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return uO(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}};ca.Visitor=Te;function uO(i,e,t=!0){let r=null,n=F.Type.NONE;switch(e instanceof sO.Data||e instanceof oO.Vector?n=Uc(e.type):e instanceof aO.DataType?n=Uc(e):typeof(n=e)!="number"&&(n=F.Type[e]),n){case F.Type.Null:r=i.visitNull;break;case F.Type.Bool:r=i.visitBool;break;case F.Type.Int:r=i.visitInt;break;case F.Type.Int8:r=i.visitInt8||i.visitInt;break;case F.Type.Int16:r=i.visitInt16||i.visitInt;break;case F.Type.Int32:r=i.visitInt32||i.visitInt;break;case F.Type.Int64:r=i.visitInt64||i.visitInt;break;case F.Type.Uint8:r=i.visitUint8||i.visitInt;break;case F.Type.Uint16:r=i.visitUint16||i.visitInt;break;case F.Type.Uint32:r=i.visitUint32||i.visitInt;break;case F.Type.Uint64:r=i.visitUint64||i.visitInt;break;case F.Type.Float:r=i.visitFloat;break;case F.Type.Float16:r=i.visitFloat16||i.visitFloat;break;case F.Type.Float32:r=i.visitFloat32||i.visitFloat;break;case F.Type.Float64:r=i.visitFloat64||i.visitFloat;break;case F.Type.Utf8:r=i.visitUtf8;break;case F.Type.Binary:r=i.visitBinary;break;case F.Type.FixedSizeBinary:r=i.visitFixedSizeBinary;break;case F.Type.Date:r=i.visitDate;break;case F.Type.DateDay:r=i.visitDateDay||i.visitDate;break;case F.Type.DateMillisecond:r=i.visitDateMillisecond||i.visitDate;break;case F.Type.Timestamp:r=i.visitTimestamp;break;case F.Type.TimestampSecond:r=i.visitTimestampSecond||i.visitTimestamp;break;case F.Type.TimestampMillisecond:r=i.visitTimestampMillisecond||i.visitTimestamp;break;case F.Type.TimestampMicrosecond:r=i.visitTimestampMicrosecond||i.visitTimestamp;break;case F.Type.TimestampNanosecond:r=i.visitTimestampNanosecond||i.visitTimestamp;break;case F.Type.Time:r=i.visitTime;break;case F.Type.TimeSecond:r=i.visitTimeSecond||i.visitTime;break;case F.Type.TimeMillisecond:r=i.visitTimeMillisecond||i.visitTime;break;case F.Type.TimeMicrosecond:r=i.visitTimeMicrosecond||i.visitTime;break;case F.Type.TimeNanosecond:r=i.visitTimeNanosecond||i.visitTime;break;case F.Type.Decimal:r=i.visitDecimal;break;case F.Type.List:r=i.visitList;break;case F.Type.Struct:r=i.visitStruct;break;case F.Type.Union:r=i.visitUnion;break;case F.Type.DenseUnion:r=i.visitDenseUnion||i.visitUnion;break;case F.Type.SparseUnion:r=i.visitSparseUnion||i.visitUnion;break;case F.Type.Dictionary:r=i.visitDictionary;break;case F.Type.Interval:r=i.visitInterval;break;case F.Type.IntervalDayTime:r=i.visitIntervalDayTime||i.visitInterval;break;case F.Type.IntervalYearMonth:r=i.visitIntervalYearMonth||i.visitInterval;break;case F.Type.FixedSizeList:r=i.visitFixedSizeList;break;case F.Type.Map:r=i.visitMap;break}if(typeof r=="function")return r;if(!t)return()=>null;throw new Error(`Unrecognized type '${F.Type[n]}'`)}function Uc(i){switch(i.typeId){case F.Type.Null:return F.Type.Null;case F.Type.Int:{let{bitWidth:e,isSigned:t}=i;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(i.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(i.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(i.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(i.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(i.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(i.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[i.typeId]}'`)}Te.prototype.visitInt8=null;Te.prototype.visitInt16=null;Te.prototype.visitInt32=null;Te.prototype.visitInt64=null;Te.prototype.visitUint8=null;Te.prototype.visitUint16=null;Te.prototype.visitUint32=null;Te.prototype.visitUint64=null;Te.prototype.visitFloat16=null;Te.prototype.visitFloat32=null;Te.prototype.visitFloat64=null;Te.prototype.visitDateDay=null;Te.prototype.visitDateMillisecond=null;Te.prototype.visitTimestampSecond=null;Te.prototype.visitTimestampMillisecond=null;Te.prototype.visitTimestampMicrosecond=null;Te.prototype.visitTimestampNanosecond=null;Te.prototype.visitTimeSecond=null;Te.prototype.visitTimeMillisecond=null;Te.prototype.visitTimeMicrosecond=null;Te.prototype.visitTimeNanosecond=null;Te.prototype.visitDenseUnion=null;Te.prototype.visitSparseUnion=null;Te.prototype.visitIntervalDayTime=null;Te.prototype.visitIntervalYearMonth=null});var Pc=R(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.instance=Bn.SetVisitor=void 0;var cO=qe(),lO=ut(),dO=Cr(),fO=gs(),hO=Ze(),Ut=Se(),ne=class extends lO.Visitor{};Bn.SetVisitor=ne;var pO=(i,e,t)=>{i[e]=t/864e5|0},kc=(i,e,t)=>{i[e]=t%4294967296|0,i[e+1]=t/4294967296|0},yO=(i,e,t)=>{i[e]=t*1e3%4294967296|0,i[e+1]=t*1e3/4294967296|0},_O=(i,e,t)=>{i[e]=t*1e6%4294967296|0,i[e+1]=t*1e6/4294967296|0},km=(i,e,t,r)=>{let{[t]:n,[t+1]:s}=e;n!=null&&s!=null&&i.set(r.subarray(0,s-n),n)},mO=({offset:i,values:e},t,r)=>{let n=i+t;r?e[n>>3]|=1<<n%8:e[n>>3]&=~(1<<n%8)},Mm=({values:i},e,t)=>{pO(i,e,t.valueOf())},Pm=({values:i},e,t)=>{kc(i,e*2,t.valueOf())},pi=({stride:i,values:e},t,r)=>{e[i*t]=r},Vm=({stride:i,values:e},t,r)=>{e[i*t]=fO.float64ToUint16(r)},Mc=(i,e,t)=>{switch(typeof t){case"bigint":i.values64[e]=t;break;case"number":i.values[e*i.stride]=t;break;default:{let r=t,{stride:n,ArrayType:s}=i,c=hO.toArrayBufferView(s,r);i.values.set(c.subarray(0,n),n*e)}}},bO=({stride:i,values:e},t,r)=>{e.set(r.subarray(0,i),i*t)},gO=({values:i,valueOffsets:e},t,r)=>km(i,e,t,r),vO=({values:i,valueOffsets:e},t,r)=>{km(i,e,t,dO.encodeUtf8(r))},wO=(i,e,t)=>{i.type.bitWidth<64?pi(i,e,t):Mc(i,e,t)},jO=(i,e,t)=>{i.type.precision!==Ut.Precision.HALF?pi(i,e,t):Vm(i,e,t)},IO=(i,e,t)=>{i.type.unit===Ut.DateUnit.DAY?Mm(i,e,t):Pm(i,e,t)},Nm=({values:i},e,t)=>kc(i,e*2,t/1e3),Lm=({values:i},e,t)=>kc(i,e*2,t),xm=({values:i},e,t)=>yO(i,e*2,t),qm=({values:i},e,t)=>_O(i,e*2,t),TO=(i,e,t)=>{switch(i.type.unit){case Ut.TimeUnit.SECOND:return Nm(i,e,t);case Ut.TimeUnit.MILLISECOND:return Lm(i,e,t);case Ut.TimeUnit.MICROSECOND:return xm(i,e,t);case Ut.TimeUnit.NANOSECOND:return qm(i,e,t)}},Wm=({values:i,stride:e},t,r)=>{i[e*t]=r},zm=({values:i,stride:e},t,r)=>{i[e*t]=r},Hm=({values:i},e,t)=>{i.set(t.subarray(0,2),2*e)},Ym=({values:i},e,t)=>{i.set(t.subarray(0,2),2*e)},BO=(i,e,t)=>{switch(i.type.unit){case Ut.TimeUnit.SECOND:return Wm(i,e,t);case Ut.TimeUnit.MILLISECOND:return zm(i,e,t);case Ut.TimeUnit.MICROSECOND:return Hm(i,e,t);case Ut.TimeUnit.NANOSECOND:return Ym(i,e,t)}},SO=({values:i},e,t)=>{i.set(t.subarray(0,4),4*e)},AO=(i,e,t)=>{let r=i.getChildAt(0),n=i.valueOffsets;for(let s=-1,c=n[e],_=n[e+1];c<_;)r.set(c++,t.get(++s))},OO=(i,e,t)=>{let r=i.getChildAt(0),n=i.valueOffsets,s=t instanceof Map?[...t]:Object.entries(t);for(let c=-1,_=n[e],v=n[e+1];_<v;)r.set(_++,s[++c])},DO=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e[n]),FO=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e.get(n)),EO=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e.get(r.name)),RO=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e[r.name]),CO=(i,e,t)=>{let r=t instanceof Map?EO(e,t):t instanceof cO.Vector?FO(e,t):Array.isArray(t)?DO(e,t):RO(e,t);i.type.children.forEach((n,s)=>r(i.getChildAt(s),n,s))},UO=(i,e,t)=>{i.type.mode===Ut.UnionMode.Dense?Gm(i,e,t):Km(i,e,t)},Gm=(i,e,t)=>{let r=i.typeIdToChildIndex[i.typeIds[e]],n=i.getChildAt(r);n&&n.set(i.valueOffsets[e],t)},Km=(i,e,t)=>{let r=i.typeIdToChildIndex[i.typeIds[e]],n=i.getChildAt(r);n&&n.set(e,t)},kO=(i,e,t)=>{let r=i.getKey(e);r!==null&&i.setValue(r,t)},MO=(i,e,t)=>{i.type.unit===Ut.IntervalUnit.DAY_TIME?$m(i,e,t):Jm(i,e,t)},$m=({values:i},e,t)=>{i.set(t.subarray(0,2),2*e)},Jm=({values:i},e,t)=>{i[e]=t[0]*12+t[1]%12},PO=(i,e,t)=>{let r=i.getChildAt(0),{stride:n}=i;for(let s=-1,c=e*n;++s<n;)r.set(c+s,t.get(s))};ne.prototype.visitBool=mO;ne.prototype.visitInt=wO;ne.prototype.visitInt8=pi;ne.prototype.visitInt16=pi;ne.prototype.visitInt32=pi;ne.prototype.visitInt64=Mc;ne.prototype.visitUint8=pi;ne.prototype.visitUint16=pi;ne.prototype.visitUint32=pi;ne.prototype.visitUint64=Mc;ne.prototype.visitFloat=jO;ne.prototype.visitFloat16=Vm;ne.prototype.visitFloat32=pi;ne.prototype.visitFloat64=pi;ne.prototype.visitUtf8=vO;ne.prototype.visitBinary=gO;ne.prototype.visitFixedSizeBinary=bO;ne.prototype.visitDate=IO;ne.prototype.visitDateDay=Mm;ne.prototype.visitDateMillisecond=Pm;ne.prototype.visitTimestamp=TO;ne.prototype.visitTimestampSecond=Nm;ne.prototype.visitTimestampMillisecond=Lm;ne.prototype.visitTimestampMicrosecond=xm;ne.prototype.visitTimestampNanosecond=qm;ne.prototype.visitTime=BO;ne.prototype.visitTimeSecond=Wm;ne.prototype.visitTimeMillisecond=zm;ne.prototype.visitTimeMicrosecond=Hm;ne.prototype.visitTimeNanosecond=Ym;ne.prototype.visitDecimal=SO;ne.prototype.visitList=AO;ne.prototype.visitStruct=CO;ne.prototype.visitUnion=UO;ne.prototype.visitDenseUnion=Gm;ne.prototype.visitSparseUnion=Km;ne.prototype.visitDictionary=kO;ne.prototype.visitInterval=MO;ne.prototype.visitIntervalDayTime=$m;ne.prototype.visitIntervalYearMonth=Jm;ne.prototype.visitFixedSizeList=PO;ne.prototype.visitMap=OO;Bn.instance=new ne});var Qm=R(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.instance=Sn.GetBuilderCtor=void 0;var VO=ut(),NO=Xo(),LO=hc(),Vc=yc(),xO=_c(),qO=bc(),WO=gc(),zO=Fc(),la=vc(),Nc=Bc(),Ci=jc(),HO=Dc(),YO=Ec(),GO=pc(),KO=Rc(),Ts=Tc(),Bs=Ic(),Lc=Cc(),$O=ta(),xc=class extends VO.Visitor{visitNull(){return GO.NullBuilder}visitBool(){return LO.BoolBuilder}visitInt(){return Ci.IntBuilder}visitInt8(){return Ci.Int8Builder}visitInt16(){return Ci.Int16Builder}visitInt32(){return Ci.Int32Builder}visitInt64(){return Ci.Int64Builder}visitUint8(){return Ci.Uint8Builder}visitUint16(){return Ci.Uint16Builder}visitUint32(){return Ci.Uint32Builder}visitUint64(){return Ci.Uint64Builder}visitFloat(){return la.FloatBuilder}visitFloat16(){return la.Float16Builder}visitFloat32(){return la.Float32Builder}visitFloat64(){return la.Float64Builder}visitUtf8(){return $O.Utf8Builder}visitBinary(){return NO.BinaryBuilder}visitFixedSizeBinary(){return WO.FixedSizeBinaryBuilder}visitDate(){return Vc.DateBuilder}visitDateDay(){return Vc.DateDayBuilder}visitDateMillisecond(){return Vc.DateMillisecondBuilder}visitTimestamp(){return Ts.TimestampBuilder}visitTimestampSecond(){return Ts.TimestampSecondBuilder}visitTimestampMillisecond(){return Ts.TimestampMillisecondBuilder}visitTimestampMicrosecond(){return Ts.TimestampMicrosecondBuilder}visitTimestampNanosecond(){return Ts.TimestampNanosecondBuilder}visitTime(){return Bs.TimeBuilder}visitTimeSecond(){return Bs.TimeSecondBuilder}visitTimeMillisecond(){return Bs.TimeMillisecondBuilder}visitTimeMicrosecond(){return Bs.TimeMicrosecondBuilder}visitTimeNanosecond(){return Bs.TimeNanosecondBuilder}visitDecimal(){return xO.DecimalBuilder}visitList(){return HO.ListBuilder}visitStruct(){return KO.StructBuilder}visitUnion(){return Lc.UnionBuilder}visitDenseUnion(){return Lc.DenseUnionBuilder}visitSparseUnion(){return Lc.SparseUnionBuilder}visitDictionary(){return qO.DictionaryBuilder}visitInterval(){return Nc.IntervalBuilder}visitIntervalDayTime(){return Nc.IntervalDayTimeBuilder}visitIntervalYearMonth(){return Nc.IntervalYearMonthBuilder}visitFixedSizeList(){return zO.FixedSizeListBuilder}visitMap(){return YO.MapBuilder}};Sn.GetBuilderCtor=xc;Sn.instance=new xc});var fa=R(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.DenseUnionBuilder=M.SparseUnionBuilder=M.UnionBuilder=M.StructBuilder=M.MapBuilder=M.FixedSizeListBuilder=M.ListBuilder=M.BinaryBuilder=M.Utf8Builder=M.IntervalYearMonthBuilder=M.IntervalDayTimeBuilder=M.IntervalBuilder=M.TimestampNanosecondBuilder=M.TimestampMicrosecondBuilder=M.TimestampMillisecondBuilder=M.TimestampSecondBuilder=M.TimestampBuilder=M.TimeNanosecondBuilder=M.TimeMicrosecondBuilder=M.TimeMillisecondBuilder=M.TimeSecondBuilder=M.TimeBuilder=M.Uint64Builder=M.Uint32Builder=M.Uint16Builder=M.Uint8Builder=M.Int64Builder=M.Int32Builder=M.Int16Builder=M.Int8Builder=M.IntBuilder=M.Float64Builder=M.Float32Builder=M.Float16Builder=M.FloatBuilder=M.FixedSizeBinaryBuilder=M.DictionaryBuilder=M.DecimalBuilder=M.DateMillisecondBuilder=M.DateDayBuilder=M.DateBuilder=M.NullBuilder=M.BoolBuilder=M.Builder=void 0;var JO=Ve();Object.defineProperty(M,"Builder",{enumerable:!0,get:function(){return JO.Builder}});var QO=hc();Object.defineProperty(M,"BoolBuilder",{enumerable:!0,get:function(){return QO.BoolBuilder}});var ZO=pc();Object.defineProperty(M,"NullBuilder",{enumerable:!0,get:function(){return ZO.NullBuilder}});var qc=yc();Object.defineProperty(M,"DateBuilder",{enumerable:!0,get:function(){return qc.DateBuilder}});Object.defineProperty(M,"DateDayBuilder",{enumerable:!0,get:function(){return qc.DateDayBuilder}});Object.defineProperty(M,"DateMillisecondBuilder",{enumerable:!0,get:function(){return qc.DateMillisecondBuilder}});var XO=_c();Object.defineProperty(M,"DecimalBuilder",{enumerable:!0,get:function(){return XO.DecimalBuilder}});var eD=bc();Object.defineProperty(M,"DictionaryBuilder",{enumerable:!0,get:function(){return eD.DictionaryBuilder}});var tD=gc();Object.defineProperty(M,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return tD.FixedSizeBinaryBuilder}});var da=vc();Object.defineProperty(M,"FloatBuilder",{enumerable:!0,get:function(){return da.FloatBuilder}});Object.defineProperty(M,"Float16Builder",{enumerable:!0,get:function(){return da.Float16Builder}});Object.defineProperty(M,"Float32Builder",{enumerable:!0,get:function(){return da.Float32Builder}});Object.defineProperty(M,"Float64Builder",{enumerable:!0,get:function(){return da.Float64Builder}});var Ui=jc();Object.defineProperty(M,"IntBuilder",{enumerable:!0,get:function(){return Ui.IntBuilder}});Object.defineProperty(M,"Int8Builder",{enumerable:!0,get:function(){return Ui.Int8Builder}});Object.defineProperty(M,"Int16Builder",{enumerable:!0,get:function(){return Ui.Int16Builder}});Object.defineProperty(M,"Int32Builder",{enumerable:!0,get:function(){return Ui.Int32Builder}});Object.defineProperty(M,"Int64Builder",{enumerable:!0,get:function(){return Ui.Int64Builder}});Object.defineProperty(M,"Uint8Builder",{enumerable:!0,get:function(){return Ui.Uint8Builder}});Object.defineProperty(M,"Uint16Builder",{enumerable:!0,get:function(){return Ui.Uint16Builder}});Object.defineProperty(M,"Uint32Builder",{enumerable:!0,get:function(){return Ui.Uint32Builder}});Object.defineProperty(M,"Uint64Builder",{enumerable:!0,get:function(){return Ui.Uint64Builder}});var Ss=Ic();Object.defineProperty(M,"TimeBuilder",{enumerable:!0,get:function(){return Ss.TimeBuilder}});Object.defineProperty(M,"TimeSecondBuilder",{enumerable:!0,get:function(){return Ss.TimeSecondBuilder}});Object.defineProperty(M,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return Ss.TimeMillisecondBuilder}});Object.defineProperty(M,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return Ss.TimeMicrosecondBuilder}});Object.defineProperty(M,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return Ss.TimeNanosecondBuilder}});var As=Tc();Object.defineProperty(M,"TimestampBuilder",{enumerable:!0,get:function(){return As.TimestampBuilder}});Object.defineProperty(M,"TimestampSecondBuilder",{enumerable:!0,get:function(){return As.TimestampSecondBuilder}});Object.defineProperty(M,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return As.TimestampMillisecondBuilder}});Object.defineProperty(M,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return As.TimestampMicrosecondBuilder}});Object.defineProperty(M,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return As.TimestampNanosecondBuilder}});var Wc=Bc();Object.defineProperty(M,"IntervalBuilder",{enumerable:!0,get:function(){return Wc.IntervalBuilder}});Object.defineProperty(M,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return Wc.IntervalDayTimeBuilder}});Object.defineProperty(M,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return Wc.IntervalYearMonthBuilder}});var iD=ta();Object.defineProperty(M,"Utf8Builder",{enumerable:!0,get:function(){return iD.Utf8Builder}});var rD=Xo();Object.defineProperty(M,"BinaryBuilder",{enumerable:!0,get:function(){return rD.BinaryBuilder}});var nD=Dc();Object.defineProperty(M,"ListBuilder",{enumerable:!0,get:function(){return nD.ListBuilder}});var sD=Fc();Object.defineProperty(M,"FixedSizeListBuilder",{enumerable:!0,get:function(){return sD.FixedSizeListBuilder}});var oD=Ec();Object.defineProperty(M,"MapBuilder",{enumerable:!0,get:function(){return oD.MapBuilder}});var aD=Rc();Object.defineProperty(M,"StructBuilder",{enumerable:!0,get:function(){return aD.StructBuilder}});var zc=Cc();Object.defineProperty(M,"UnionBuilder",{enumerable:!0,get:function(){return zc.UnionBuilder}});Object.defineProperty(M,"SparseUnionBuilder",{enumerable:!0,get:function(){return zc.SparseUnionBuilder}});Object.defineProperty(M,"DenseUnionBuilder",{enumerable:!0,get:function(){return zc.DenseUnionBuilder}});var Hc=Se(),uD=ta(),cD=Ve(),Zm=Pc(),Xm=Qm();cD.Builder.new=eb;function eb(i){let e=i.type,t=new(Xm.instance.getVisitFn(e)())(i);if(e.children&&e.children.length>0){let r=i.children||[],n={nullValues:i.nullValues},s=Array.isArray(r)?(c,_)=>r[_]||n:({name:c})=>r[c]||n;e.children.forEach((c,_)=>{let{type:v}=c,B=s(c,_);t.children.push(eb(Object.assign(Object.assign({},B),{type:v})))})}return t}Object.keys(Hc.Type).map(i=>Hc.Type[i]).filter(i=>typeof i=="number"&&i!==Hc.Type.NONE).forEach(i=>{let e=Xm.instance.visit(i);e.prototype._setValue=Zm.instance.getVisitFn(i)});uD.Utf8Builder.prototype._setValue=Zm.instance.visitBinary});var tb=R(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.Block=An.Footer=void 0;var lD=Oi(),ha=Zi(),kt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFooter(e,t){return(t||new kt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,t){return e.setPosition(e.position()+lD.flatbuffers.SIZE_PREFIX_LENGTH),(t||new kt).__init(e.readInt32(e.position())+e.position(),e)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):ha.MetadataVersion.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new ha.Schema).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){let r=this.bb.__offset(this.bb_pos,8);return r?(t||new pa).__init(this.bb.__vector(this.bb_pos+r)+e*24,this.bb):null}dictionariesLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,t){let r=this.bb.__offset(this.bb_pos,10);return r?(t||new pa).__init(this.bb.__vector(this.bb_pos+r)+e*24,this.bb):null}recordBatchesLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let r=this.bb.__offset(this.bb_pos,12);return r?(t||new ha.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,ha.MetadataVersion.V1)}static addSchema(e,t){e.addFieldOffset(1,t,0)}static addDictionaries(e,t){e.addFieldOffset(2,t,0)}static startDictionariesVector(e,t){e.startVector(24,t,8)}static addRecordBatches(e,t){e.addFieldOffset(3,t,0)}static startRecordBatchesVector(e,t){e.startVector(24,t,8)}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,t){e.finish(t)}static finishSizePrefixedFooterBuffer(e,t){e.finish(t,void 0,!0)}static createFooter(e,t,r,n,s,c){return kt.startFooter(e),kt.addVersion(e,t),kt.addSchema(e,r),kt.addDictionaries(e,n),kt.addRecordBatches(e,s),kt.addCustomMetadata(e,c),kt.endFooter(e)}};An.Footer=kt;var pa=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static createBlock(e,t,r,n){return e.prep(8,24),e.writeInt64(n),e.pad(4),e.writeInt32(r),e.writeInt64(t),e.offset()}};An.Block=pa});var Kc=R(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.FileBlock=On.Footer=void 0;var Zt=tb(),Yc=Oi(),ib=Yc.flatbuffers.Long,dD=Yc.flatbuffers.Builder,fD=Yc.flatbuffers.ByteBuffer,rb=rt(),nb=Se(),hD=Ze(),Gc=class{constructor(e,t=nb.MetadataVersion.V4,r,n){this.schema=e,this.version=t,r&&(this._recordBatches=r),n&&(this._dictionaryBatches=n)}static decode(e){e=new fD(hD.toUint8Array(e));let t=Zt.Footer.getRootAsFooter(e),r=rb.Schema.decode(t.schema());return new sb(r,t)}static encode(e){let t=new dD,r=rb.Schema.encode(t,e.schema);Zt.Footer.startRecordBatchesVector(t,e.numRecordBatches),[...e.recordBatches()].slice().reverse().forEach(c=>or.encode(t,c));let n=t.endVector();Zt.Footer.startDictionariesVector(t,e.numDictionaries),[...e.dictionaryBatches()].slice().reverse().forEach(c=>or.encode(t,c));let s=t.endVector();return Zt.Footer.startFooter(t),Zt.Footer.addSchema(t,r),Zt.Footer.addVersion(t,nb.MetadataVersion.V4),Zt.Footer.addRecordBatches(t,n),Zt.Footer.addDictionaries(t,s),Zt.Footer.finishFooterBuffer(t,Zt.Footer.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}*recordBatches(){for(let e,t=-1,r=this.numRecordBatches;++t<r;)(e=this.getRecordBatch(t))&&(yield e)}*dictionaryBatches(){for(let e,t=-1,r=this.numDictionaries;++t<r;)(e=this.getDictionaryBatch(t))&&(yield e)}getRecordBatch(e){return e>=0&&e<this.numRecordBatches&&this._recordBatches[e]||null}getDictionaryBatch(e){return e>=0&&e<this.numDictionaries&&this._dictionaryBatches[e]||null}};On.Footer=Gc;var sb=class extends Gc{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 or.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){let t=this._footer.dictionaries(e);if(t)return or.decode(t)}return null}},or=class{constructor(e,t,r){this.metaDataLength=e,this.offset=typeof r=="number"?r:r.low,this.bodyLength=typeof t=="number"?t:t.low}static decode(e){return new or(e.metaDataLength(),e.bodyLength(),e.offset())}static encode(e,t){let{metaDataLength:r}=t,n=new ib(t.offset,0),s=new ib(t.bodyLength,0);return Zt.Block.createBlock(e,n,r,s)}};On.FileBlock=or});var dr=R(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.AsyncByteStream=lr.ByteStream=lr.AsyncByteQueue=void 0;var ar=dt(),ur=ms(),ob=Cr(),Os=ln(),$c=Ze(),Dn=ft(),Jc=class extends Os.AsyncQueue{write(e){if((e=$c.toUint8Array(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?ob.decodeUtf8(this.toUint8Array(!0)):this.toUint8Array(!1).then(ob.decodeUtf8)}toUint8Array(e=!1){return e?$c.joinUint8Arrays(this._values)[0]:(()=>ar.__awaiter(this,void 0,void 0,function*(){var t,r;let n=[],s=0;try{for(var c=ar.__asyncValues(this),_;_=yield c.next(),!_.done;){let v=_.value;n.push(v),s+=v.byteLength}}catch(v){t={error:v}}finally{try{_&&!_.done&&(r=c.return)&&(yield r.call(c))}finally{if(t)throw t.error}}return $c.joinUint8Arrays(n,s)[0]}))()}};lr.AsyncByteQueue=Jc;var ab=class{constructor(e){e&&(this.source=new ub(ur.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)}};lr.ByteStream=ab;var ya=class{constructor(e){e instanceof ya?this.source=e.source:e instanceof Jc?this.source=new cr(ur.default.fromAsyncIterable(e)):Dn.isReadableNodeStream(e)?this.source=new cr(ur.default.fromNodeStream(e)):Dn.isReadableDOMStream(e)?this.source=new cr(ur.default.fromDOMStream(e)):Dn.isFetchResponse(e)?this.source=new cr(ur.default.fromDOMStream(e.body)):Dn.isIterable(e)?this.source=new cr(ur.default.fromIterable(e)):Dn.isPromise(e)?this.source=new cr(ur.default.fromAsyncIterable(e)):Dn.isAsyncIterable(e)&&(this.source=new cr(ur.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)}};lr.AsyncByteStream=ya;var ub=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)||Os.ITERATOR_DONE)}return(e){return Object.create(this.source.return&&this.source.return(e)||Os.ITERATOR_DONE)}},cr=class{constructor(e){this.source=e,this._closedPromise=new Promise(t=>this._closedPromiseResolve=t)}cancel(e){return ar.__awaiter(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return ar.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return ar.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(e,t="read"){return ar.__awaiter(this,void 0,void 0,function*(){return yield this.source.next({cmd:t,size:e})})}throw(e){return ar.__awaiter(this,void 0,void 0,function*(){let t=this.source.throw&&(yield this.source.throw(e))||Os.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return ar.__awaiter(this,void 0,void 0,function*(){let t=this.source.return&&(yield this.source.return(e))||Os.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}}});var Qc=R(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.AsyncRandomAccessFile=Fn.RandomAccessFile=void 0;var fr=dt(),cb=dr(),pD=Ze(),lb=class extends cb.ByteStream{constructor(e,t){super();this.position=0,this.buffer=pD.toUint8Array(e),this.size=typeof t=="undefined"?this.buffer.byteLength:t}readInt32(e){let{buffer:t,byteOffset:r}=this.readAt(e,4);return new DataView(t,r).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e<this.size}read(e){let{buffer:t,size:r,position:n}=this;return t&&n<r?(typeof e!="number"&&(e=1/0),this.position=Math.min(r,n+Math.min(r-n,e)),t.subarray(n,this.position)):null}readAt(e,t){let r=this.buffer,n=Math.min(this.size,e+t);return r?r.subarray(e,n):new Uint8Array(t)}close(){this.buffer&&(this.buffer=null)}throw(e){return this.close(),{done:!0,value:e}}return(e){return this.close(),{done:!0,value:e}}};Fn.RandomAccessFile=lb;var db=class extends cb.AsyncByteStream{constructor(e,t){super();this.position=0,this._handle=e,typeof t=="number"?this.size=t:this._pending=(()=>fr.__awaiter(this,void 0,void 0,function*(){this.size=(yield e.stat()).size,delete this._pending}))()}readInt32(e){return fr.__awaiter(this,void 0,void 0,function*(){let{buffer:t,byteOffset:r}=yield this.readAt(e,4);return new DataView(t,r).getInt32(0,!0)})}seek(e){return fr.__awaiter(this,void 0,void 0,function*(){return this._pending&&(yield this._pending),this.position=Math.min(e,this.size),e<this.size})}read(e){return fr.__awaiter(this,void 0,void 0,function*(){this._pending&&(yield this._pending);let{_handle:t,size:r,position:n}=this;if(t&&n<r){typeof e!="number"&&(e=1/0);let s=n,c=0,_=0,v=Math.min(r,s+Math.min(r-s,e)),B=new Uint8Array(Math.max(0,(this.position=v)-s));for(;(s+=_)<v&&(c+=_)<B.byteLength;)({bytesRead:_}=yield t.read(B,c,B.byteLength-c,s));return B}return null})}readAt(e,t){return fr.__awaiter(this,void 0,void 0,function*(){this._pending&&(yield this._pending);let{_handle:r,size:n}=this;if(r&&e+t<n){let s=Math.min(n,e+t),c=new Uint8Array(s-e);return(yield r.read(c,0,t,e)).buffer}return new Uint8Array(t)})}close(){return fr.__awaiter(this,void 0,void 0,function*(){let e=this._handle;this._handle=null,e&&(yield e.close())})}throw(e){return fr.__awaiter(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}return(e){return fr.__awaiter(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}};Fn.AsyncRandomAccessFile=db});var Xc=R(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.Int128=yi.Int64=yi.Uint64=yi.BaseInt64=void 0;var yD=1<<16;function En(i){return i<0&&(i=4294967295+i+1),`0x${i.toString(16)}`}var Rn=8,Zc=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],_a=class{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){let t=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),r=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),n=t[3]*r[3];this.buffer[0]=n&65535;let s=n>>>16;return n=t[2]*r[3],s+=n,n=t[3]*r[2]>>>0,s+=n,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0<n?yD:0,this.buffer[1]+=s>>>16,this.buffer[1]+=t[1]*r[3]+t[2]*r[2]+t[3]*r[1],this.buffer[1]+=t[0]*r[3]+t[1]*r[2]+t[2]*r[1]+t[3]*r[0]<<16,this}_plus(e){let t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]<e.buffer[1]||this.buffer[1]===e.buffer[1]&&this.buffer[0]<e.buffer[0]}equals(e){return this.buffer[1]===e.buffer[1]&&this.buffer[0]==e.buffer[0]}greaterThan(e){return e.lessThan(this)}hex(){return`${En(this.buffer[1])} ${En(this.buffer[0])}`}};yi.BaseInt64=_a;var we=class extends _a{times(e){return this._times(e),this}plus(e){return this._plus(e),this}static from(e,t=new Uint32Array(2)){return we.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return we.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let r=e.length,n=new we(t);for(let s=0;s<r;){let c=Rn<r-s?Rn:r-s,_=new we(new Uint32Array([parseInt(e.substr(s,c),10),0])),v=new we(new Uint32Array([Zc[c],0]));n.times(v),n.plus(_),s+=c}return n}static convertArray(e){let t=new Uint32Array(e.length*2);for(let r=-1,n=e.length;++r<n;)we.from(e[r],new Uint32Array(t.buffer,t.byteOffset+2*r*4,2));return t}static multiply(e,t){return new we(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new we(new Uint32Array(e.buffer)).plus(t)}};yi.Uint64=we;var jt=class extends _a{negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[0]==0&&++this.buffer[1],this}times(e){return this._times(e),this}plus(e){return this._plus(e),this}lessThan(e){let t=this.buffer[1]<<0,r=e.buffer[1]<<0;return t<r||t===r&&this.buffer[0]<e.buffer[0]}static from(e,t=new Uint32Array(2)){return jt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return jt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let r=e.startsWith("-"),n=e.length,s=new jt(t);for(let c=r?1:0;c<n;){let _=Rn<n-c?Rn:n-c,v=new jt(new Uint32Array([parseInt(e.substr(c,_),10),0])),B=new jt(new Uint32Array([Zc[_],0]));s.times(B),s.plus(v),c+=_}return r?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*2);for(let r=-1,n=e.length;++r<n;)jt.from(e[r],new Uint32Array(t.buffer,t.byteOffset+2*r*4,2));return t}static multiply(e,t){return new jt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new jt(new Uint32Array(e.buffer)).plus(t)}};yi.Int64=jt;var Xt=class{constructor(e){this.buffer=e}high(){return new jt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new jt(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 we(new Uint32Array([this.buffer[3],0])),r=new we(new Uint32Array([this.buffer[2],0])),n=new we(new Uint32Array([this.buffer[1],0])),s=new we(new Uint32Array([this.buffer[0],0])),c=new we(new Uint32Array([e.buffer[3],0])),_=new we(new Uint32Array([e.buffer[2],0])),v=new we(new Uint32Array([e.buffer[1],0])),B=new we(new Uint32Array([e.buffer[0],0])),O=we.multiply(s,B);this.buffer[0]=O.low();let N=new we(new Uint32Array([O.high(),0]));return O=we.multiply(n,B),N.plus(O),O=we.multiply(s,v),N.plus(O),this.buffer[1]=N.low(),this.buffer[3]=N.lessThan(O)?1:0,this.buffer[2]=N.high(),new we(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(we.multiply(r,B)).plus(we.multiply(n,v)).plus(we.multiply(s,_)),this.buffer[3]+=we.multiply(t,B).plus(we.multiply(r,v)).plus(we.multiply(n,_)).plus(we.multiply(s,c)).low(),this}plus(e){let t=new Uint32Array(4);return t[3]=this.buffer[3]+e.buffer[3]>>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]<this.buffer[0]>>>0&&++t[1],t[1]<this.buffer[1]>>>0&&++t[2],t[2]<this.buffer[2]>>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${En(this.buffer[3])} ${En(this.buffer[2])} ${En(this.buffer[1])} ${En(this.buffer[0])}`}static multiply(e,t){return new Xt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new Xt(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return Xt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return Xt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){let r=e.startsWith("-"),n=e.length,s=new Xt(t);for(let c=r?1:0;c<n;){let _=Rn<n-c?Rn:n-c,v=new Xt(new Uint32Array([parseInt(e.substr(c,_),10),0,0,0])),B=new Xt(new Uint32Array([Zc[_],0,0,0]));s.times(B),s.plus(v),c+=_}return r?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*4);for(let r=-1,n=e.length;++r<n;)Xt.from(e[r],new Uint32Array(t.buffer,t.byteOffset+4*4*r,4));return t}};yi.Int128=Xt});var yb=R(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.JSONVectorLoader=Cn.VectorLoader=void 0;var et=Jt(),_D=rt(),ki=ve(),mD=ut(),fb=di(),bD=Cr(),ma=Xc(),hb=Se(),_i=Ze(),el=class extends mD.Visitor{constructor(e,t,r,n){super();this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=t,this.buffers=r,this.dictionaries=n}visit(e){return super.visit(e instanceof _D.Field?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return et.Data.Null(e,0,t)}visitBool(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Bool(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitInt(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Int(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitFloat(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Float(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitUtf8(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Utf8(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.readData(e))}visitBinary(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Binary(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.readData(e))}visitFixedSizeBinary(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.FixedSizeBinary(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitDate(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Date(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitTimestamp(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Timestamp(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitTime(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Time(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitDecimal(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Decimal(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitList(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.List(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.visit(e.children[0]))}visitStruct(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Struct(e,0,t,r,this.readNullBitmap(e,r),this.visitMany(e.children))}visitUnion(e){return e.mode===hb.UnionMode.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}visitDenseUnion(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Union(e,0,t,r,this.readNullBitmap(e,r),this.readTypeIds(e),this.readOffsets(e),this.visitMany(e.children))}visitSparseUnion(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Union(e,0,t,r,this.readNullBitmap(e,r),this.readTypeIds(e),this.visitMany(e.children))}visitDictionary(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Dictionary(e,0,t,r,this.readNullBitmap(e,r),this.readData(e.indices),this.readDictionary(e))}visitInterval(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Interval(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitFixedSizeList(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.FixedSizeList(e,0,t,r,this.readNullBitmap(e,r),this.visit(e.children[0]))}visitMap(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Map(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.visit(e.children[0]))}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(e,t,r=this.nextBufferRange()){return t>0&&this.readData(e,r)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:r}=this.nextBufferRange()){return this.bytes.subarray(r,r+t)}readDictionary(e){return this.dictionaries.get(e.id)}};Cn.VectorLoader=el;var pb=class extends el{constructor(e,t,r,n){super(new Uint8Array(0),t,r,n);this.sources=e}readNullBitmap(e,t,{offset:r}=this.nextBufferRange()){return t<=0?new Uint8Array(0):fb.packBools(this.sources[r])}readOffsets(e,{offset:t}=this.nextBufferRange()){return _i.toArrayBufferView(Uint8Array,_i.toArrayBufferView(Int32Array,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return _i.toArrayBufferView(Uint8Array,_i.toArrayBufferView(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:r}=this;return ki.DataType.isTimestamp(e)||(ki.DataType.isInt(e)||ki.DataType.isTime(e))&&e.bitWidth===64||ki.DataType.isDate(e)&&e.unit===hb.DateUnit.MILLISECOND?_i.toArrayBufferView(Uint8Array,ma.Int64.convertArray(r[t])):ki.DataType.isDecimal(e)?_i.toArrayBufferView(Uint8Array,ma.Int128.convertArray(r[t])):ki.DataType.isBinary(e)||ki.DataType.isFixedSizeBinary(e)?gD(r[t]):ki.DataType.isBool(e)?fb.packBools(r[t]):ki.DataType.isUtf8(e)?bD.encodeUtf8(r[t].join("")):_i.toArrayBufferView(Uint8Array,_i.toArrayBufferView(e.ArrayType,r[t].map(n=>+n)))}};Cn.JSONVectorLoader=pb;function gD(i){let e=i.join(""),t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2)t[r>>1]=parseInt(e.substr(r,2),16);return t}});var Ds=R(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.StructRow=kn.MapRow=void 0;var _b=uc(),ct=Symbol.for("parent"),Un=Symbol.for("rowIndex"),It=Symbol.for("keyToIdx"),Tt=Symbol.for("idxToVal"),tl=Symbol.for("nodejs.util.inspect.custom"),mi=class{constructor(e,t){this[ct]=e,this.size=t}entries(){return this[Symbol.iterator]()}has(e){return this.get(e)!==void 0}get(e){let t;if(e!=null){let r=this[It]||(this[It]=new Map),n=r.get(e);if(n!==void 0){let s=this[Tt]||(this[Tt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}else if((n=this.getIndex(e))>-1){r.set(e,n);let s=this[Tt]||(this[Tt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}}return t}set(e,t){if(e!=null){let r=this[It]||(this[It]=new Map),n=r.get(e);if(n===void 0&&r.set(e,n=this.getIndex(e)),n>-1){let s=this[Tt]||(this[Tt]=new Array(this.size));s[n]=this.setValue(n,t)}}return this}clear(){throw new Error(`Clearing ${this[Symbol.toStringTag]} not supported.`)}delete(e){throw new Error(`Deleting ${this[Symbol.toStringTag]} values not supported.`)}*[Symbol.iterator](){let e=this.keys(),t=this.values(),r=this[It]||(this[It]=new Map),n=this[Tt]||(this[Tt]=new Array(this.size));for(let s,c,_=0,v,B;!((v=e.next()).done||(B=t.next()).done);++_)s=v.value,c=B.value,n[_]=c,r.has(s)||r.set(s,_),yield[s,c]}forEach(e,t){let r=this.keys(),n=this.values(),s=t===void 0?e:(v,B,O)=>e.call(t,v,B,O),c=this[It]||(this[It]=new Map),_=this[Tt]||(this[Tt]=new Array(this.size));for(let v,B,O=0,N,q;!((N=r.next()).done||(q=n.next()).done);++O)v=N.value,B=q.value,_[O]=B,c.has(v)||c.set(v,O),s(B,v,this)}toArray(){return[...this.values()]}toJSON(){let e={};return this.forEach((t,r)=>e[r]=t),e}inspect(){return this.toString()}[tl](){return this.toString()}toString(){let e=[];return this.forEach((t,r)=>{r=_b.valueToString(r),t=_b.valueToString(t),e.push(`${r}: ${t}`)}),`{ ${e.join(", ")} }`}};mi[Symbol.toStringTag]=(i=>(Object.defineProperties(i,{size:{writable:!0,enumerable:!1,configurable:!1,value:0},[ct]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Un]:{writable:!0,enumerable:!1,configurable:!1,value:-1}}),i[Symbol.toStringTag]="Row"))(mi.prototype);var mb=class extends mi{constructor(e){super(e,e.length);return vD(this)}keys(){return this[ct].getChildAt(0)[Symbol.iterator]()}values(){return this[ct].getChildAt(1)[Symbol.iterator]()}getKey(e){return this[ct].getChildAt(0).get(e)}getIndex(e){return this[ct].getChildAt(0).indexOf(e)}getValue(e){return this[ct].getChildAt(1).get(e)}setValue(e,t){this[ct].getChildAt(1).set(e,t)}};kn.MapRow=mb;var bb=class extends mi{constructor(e){super(e,e.type.children.length);return gb(this)}*keys(){for(let e of this[ct].type.children)yield e.name}*values(){for(let e of this[ct].type.children)yield this[e.name]}getKey(e){return this[ct].type.children[e].name}getIndex(e){return this[ct].type.children.findIndex(t=>t.name===e)}getValue(e){return this[ct].getChildAt(e).get(this[Un])}setValue(e,t){return this[ct].getChildAt(e).set(this[Un],t)}};kn.StructRow=bb;Object.setPrototypeOf(mi.prototype,Map.prototype);var gb=(()=>{let i={enumerable:!0,configurable:!1,get:null,set:null};return e=>{let t=-1,r=e[It]||(e[It]=new Map),n=c=>function(){return this.get(c)},s=c=>function(_){return this.set(c,_)};for(let c of e.keys())r.set(c,++t),i.get=n(c),i.set=s(c),Object.prototype.hasOwnProperty.call(e,c)||(i.enumerable=!0,Object.defineProperty(e,c,i)),Object.prototype.hasOwnProperty.call(e,t)||(i.enumerable=!1,Object.defineProperty(e,t,i));return i.get=i.set=null,e}})(),vD=(()=>{if(typeof Proxy=="undefined")return gb;let i=mi.prototype.has,e=mi.prototype.get,t=mi.prototype.set,r=mi.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 ct:case Un:case Tt:case It:case tl:return!0}return typeof c=="number"&&!s.has(c)&&(c=s.getKey(c)),s.has(c)},get(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 ct:case Un:case Tt:case It:case tl:return Reflect.get(s,c,_)}return typeof c=="number"&&!i.call(_,c)&&(c=r.call(_,c)),e.call(_,c)},set(s,c,_,v){switch(c){case ct:case Un:case Tt:case It:return Reflect.set(s,c,_,v);case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:return!1}return typeof c=="number"&&!i.call(v,c)&&(c=r.call(v,c)),i.call(v,c)?!!t.call(v,c,_):!1}};return s=>new Proxy(s,n)})()});var Es=R(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.createElementComparator=hr.clampRange=hr.clampIndex=void 0;var vb=qe(),wb=Ds(),wD=Ze(),jb=ft();function jD(i,e,t){let r=i.length,n=e>-1?e:r+e%r;return t?t(i,n):n}hr.clampIndex=jD;var Ib;function ID(i,e,t,r){let{length:n=0}=i,s=typeof e!="number"?0:e,c=typeof t!="number"?n:t;return s<0&&(s=(s%n+n)%n),c<0&&(c=(c%n+n)%n),c<s&&(Ib=s,s=c,c=Ib),c>n&&(c=n),r?r(i,s,c):[s,c]}hr.clampRange=ID;var TD=jb.BigIntAvailable?jb.BigInt(0):0,Tb=i=>i!==i;function Fs(i){let e=typeof i;if(e!=="object"||i===null)return Tb(i)?Tb:e!=="bigint"?t=>t===i:t=>TD+t===i;if(i instanceof Date){let t=i.valueOf();return r=>r instanceof Date?r.valueOf()===t:!1}return ArrayBuffer.isView(i)?t=>t?wD.compareArrayLike(i,t):!1:i instanceof Map?SD(i):Array.isArray(i)?BD(i):i instanceof vb.Vector?AD(i):OD(i)}hr.createElementComparator=Fs;function BD(i){let e=[];for(let t=-1,r=i.length;++t<r;)e[t]=Fs(i[t]);return ba(e)}function SD(i){let e=-1,t=[];return i.forEach(r=>t[++e]=Fs(r)),ba(t)}function AD(i){let e=[];for(let t=-1,r=i.length;++t<r;)e[t]=Fs(i.get(t));return ba(e)}function OD(i){let e=Object.keys(i);if(e.length===0)return()=>!1;let t=[];for(let r=-1,n=e.length;++r<n;)t[r]=Fs(i[e[r]]);return ba(t,e)}function ba(i,e){return t=>{if(!t||typeof t!="object")return!1;switch(t.constructor){case Array:return DD(i,t);case Map:case wb.MapRow:case wb.StructRow:return Bb(i,t,t.keys());case Object:case void 0:return Bb(i,t,e||Object.keys(t))}return t instanceof vb.Vector?FD(i,t):!1}}function DD(i,e){let t=i.length;if(e.length!==t)return!1;for(let r=-1;++r<t;)if(!i[r](e[r]))return!1;return!0}function FD(i,e){let t=i.length;if(e.length!==t)return!1;for(let r=-1;++r<t;)if(!i[r](e.get(r)))return!1;return!0}function Bb(i,e,t){let r=t[Symbol.iterator](),n=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),s=e instanceof Map?e.values():Object.values(e)[Symbol.iterator](),c=0,_=i.length,v=s.next(),B=r.next(),O=n.next();for(;c<_&&!B.done&&!O.done&&!v.done&&!(B.value!==O.value||!i[c](v.value));++c,B=r.next(),O=n.next(),v=s.next());return c===_&&B.done&&O.done&&v.done?!0:(r.return&&r.return(),n.return&&n.return(),s.return&&s.return(),!1)}});var Gr=R(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.selectColumnChildrenArgs=nt.selectVectorChildrenArgs=nt.selectChunkArgs=nt.selectFieldArgs=nt.selectColumnArgs=nt.selectArgs=nt.arrayTypeToDataType=nt.isTypedArray=void 0;var il=Jt(),Sb=rt(),Mi=Pn(),Mn=qe(),Mt=ve(),ED=yr(),pr=Array.isArray;function rl(i){return ArrayBuffer.isView(i)&&"BYTES_PER_ELEMENT"in i}nt.isTypedArray=rl;function Ab(i){switch(i){case Int8Array:return Mt.Int8;case Int16Array:return Mt.Int16;case Int32Array:return Mt.Int32;case BigInt64Array:return Mt.Int64;case Uint8Array:return Mt.Uint8;case Uint16Array:return Mt.Uint16;case Uint32Array:return Mt.Uint32;case BigUint64Array:return Mt.Uint64;case Float32Array:return Mt.Float32;case Float64Array:return Mt.Float64;default:return null}}nt.arrayTypeToDataType=Ab;function RD(i){let e=Ab(i.constructor);if(!e)throw new TypeError("Unrecognized Array input");let t=new e,r=il.Data.new(t,0,i.length,0,[void 0,i]);return Mn.Vector.new(r)}nt.selectArgs=(i,e)=>ga(i,e,[],0);nt.selectColumnArgs=i=>{let[e,t]=sl(i,[[],[]]);return t.map((r,n)=>r instanceof Mi.Column?Mi.Column.new(r.field.clone(e[n]),r):r instanceof Mn.Vector?Mi.Column.new(e[n],r):rl(r)?Mi.Column.new(e[n],RD(r)):Mi.Column.new(e[n],[]))};nt.selectFieldArgs=i=>sl(i,[[],[]]);nt.selectChunkArgs=(i,e)=>nl(i,e,[],0);nt.selectVectorChildrenArgs=(i,e)=>Ob(i,e,[],0);nt.selectColumnChildrenArgs=(i,e)=>Db(i,e,[],0);function ga(i,e,t,r){let n,s=r,c=-1,_=e.length;for(;++c<_;)pr(n=e[c])?s=ga(i,n,t,s).length:n instanceof i&&(t[s++]=n);return t}function nl(i,e,t,r){let n,s=r,c=-1,_=e.length;for(;++c<_;)pr(n=e[c])?s=nl(i,n,t,s).length:n instanceof ED.Chunked?s=nl(i,n.chunks,t,s).length:n instanceof i&&(t[s++]=n);return t}function Ob(i,e,t,r){let n,s=r,c=-1,_=e.length;for(;++c<_;)pr(n=e[c])?s=Ob(i,n,t,s).length:n instanceof i?s=ga(Mn.Vector,n.schema.fields.map((v,B)=>n.getChildAt(B)),t,s).length:n instanceof Mn.Vector&&(t[s++]=n);return t}function Db(i,e,t,r){let n,s=r,c=-1,_=e.length;for(;++c<_;)pr(n=e[c])?s=Db(i,n,t,s).length:n instanceof i?s=ga(Mi.Column,n.schema.fields.map((v,B)=>Mi.Column.new(v,n.getChildAt(B))),t,s).length:n instanceof Mi.Column&&(t[s++]=n);return t}var CD=(i,[e,t],r)=>(i[0][r]=e,i[1][r]=t,i);function sl(i,e){let t,r;switch(r=i.length){case 0:return e;case 1:if(t=e[0],!i[0])return e;if(pr(i[0]))return sl(i[0],e);i[0]instanceof il.Data||i[0]instanceof Mn.Vector||rl(i[0])||i[0]instanceof Mt.DataType||([t,i]=Object.entries(i[0]).reduce(CD,e));break;default:pr(t=i[r-1])?i=pr(i[0])?i[0]:i.slice(0,r-1):(i=pr(i[0])?i[0]:i,t=[])}let n=-1,s=-1,c=-1,_=i.length,v,B,[O,N]=e;for(;++c<_;)B=i[c],B instanceof Mi.Column&&(N[++s]=B)?O[++n]=B.field.clone(t[c],B.type,!0):({[c]:v=c}=t,B instanceof Mt.DataType&&(N[++s]=B)?O[++n]=Sb.Field.new(v,B,!0):(B==null?void 0:B.type)&&(N[++s]=B)&&(B instanceof il.Data&&(N[s]=B=Mn.Vector.new(B)),O[++n]=Sb.Field.new(v,B.type,!0)));return e}});var yr=R(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.Chunked=void 0;var UD=Es(),Fb=ve(),kD=Gr(),Eb=qe(),Rb=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}},Pi=class extends Eb.AbstractVector{constructor(e,t=[],r=MD(t)){super();this._nullCount=-1,this._type=e,this._chunks=t,this._chunkOffsets=r,this._length=r[r.length-1],this._numChildren=(this._type.children||[]).length}static flatten(...e){return kD.selectChunkArgs(Eb.Vector,e)}static concat(...e){let t=Pi.flatten(...e);return new Pi(t[0].type,t)}get type(){return this._type}get length(){return this._length}get chunks(){return this._chunks}get typeId(){return this._type.typeId}get VectorName(){return`Chunked<${this._type}>`}get data(){return this._chunks[0]?this._chunks[0].data:null}get ArrayType(){return this._type.ArrayType}get numChildren(){return this._numChildren}get stride(){return this._chunks[0]?this._chunks[0].stride:1}get byteLength(){return this._chunks.reduce((e,t)=>e+t.byteLength,0)}get nullCount(){let e=this._nullCount;return e<0&&(this._nullCount=e=this._chunks.reduce((t,{nullCount:r})=>t+r,0)),e}get indices(){if(Fb.DataType.isDictionary(this._type)){if(!this._indices){let e=this._chunks;this._indices=e.length===1?e[0].indices:Pi.concat(...e.map(t=>t.indices))}return this._indices}return null}get dictionary(){return Fb.DataType.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}[Symbol.iterator](){return new Rb(this._chunks)}clone(e=this._chunks){return new Pi(this._type,e)}concat(...e){return this.clone(Pi.flatten(this,...e))}slice(e,t){return UD.clampRange(this,e,t,this._sliceInternal)}getChildAt(e){if(e<0||e>=this._numChildren)return null;let t=this._children||(this._children=[]),r,n,s;return(r=t[e])?r:(n=(this._type.children||[])[e])&&(s=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),s.length>0)?t[e]=new Pi(n.type,s):null}search(e,t){let r=e,n=this._chunkOffsets,s=n.length-1;if(r<0||r>=n[s])return null;if(s<=1)return t?t(this,0,r):[0,r];let c=0,_=0,v=0;do{if(c+1===s)return t?t(this,c,r-_):[c,r-_];v=c+(s-c)/2|0,r>=n[v]?c=v:s=v}while(r<n[s]&&r>=(_=n[c]));return null}isValid(e){return!!this.search(e,this.isValidInternal)}get(e){return this.search(e,this.getInternal)}set(e,t){this.search(e,({chunks:r},n,s)=>r[n].set(s,t))}indexOf(e,t){return t&&typeof t=="number"?this.search(t,(r,n,s)=>this.indexOfInternal(r,n,s,e)):this.indexOfInternal(this,0,Math.max(0,t||0),e)}toArray(){let{chunks:e}=this,t=e.length,r=this._type.ArrayType;if(t<=0)return new r(0);if(t<=1)return e[0].toArray();let n=0,s=new Array(t);for(let v=-1;++v<t;)n+=(s[v]=e[v].toArray()).length;r!==s[0].constructor&&(r=s[0].constructor);let c=new r(n),_=r===Array?VD:PD;for(let v=-1,B=0;++v<t;)B=_(s[v],c,B);return c}getInternal({_chunks:e},t,r){return e[t].get(r)}isValidInternal({_chunks:e},t,r){return e[t].isValid(r)}indexOfInternal({_chunks:e},t,r,n){let s=t-1,c=e.length,_=r,v=0,B=-1;for(;++s<c;){if(~(B=e[s].indexOf(n,_)))return v+B;_=0,v+=e[s].length}return-1}_sliceInternal(e,t,r){let n=[],{chunks:s,_chunkOffsets:c}=e;for(let _=-1,v=s.length;++_<v;){let B=s[_],O=B.length,N=c[_];if(N>=r)break;if(t>=N+O)continue;if(N>=t&&N+O<=r){n.push(B);continue}let q=Math.max(0,t-N),J=Math.min(r-N,O);n.push(B.slice(q,J))}return e.clone(n)}};va.Chunked=Pi;function MD(i){let e=new Uint32Array((i||[]).length+1),t=e[0]=0,r=e.length;for(let n=0;++n<r;)e[n]=t+=i[n-1].length;return e}var PD=(i,e,t)=>(e.set(i,t),t+i.length),VD=(i,e,t)=>{let r=t;for(let n=-1,s=i.length;++n<s;)e[r++]=i[n];return r}});var Pn=R(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.Column=void 0;var Cb=rt(),Ub=qe(),ol=yr(),Kr=class extends ol.Chunked{constructor(e,t=[],r){t=ol.Chunked.flatten(...t);super(e.type,t,r);if(this._field=e,t.length===1&&!(this instanceof al))return new al(e,t[0],this._chunkOffsets)}static new(...e){let[t,r,...n]=e;typeof t!="string"&&!(t instanceof Cb.Field)&&(r=t,t="");let s=ol.Chunked.flatten(Array.isArray(r)?[...r,...n]:r instanceof Ub.Vector?[r,...n]:[Ub.Vector.new(r,...n)]);if(typeof t=="string"){let c=s[0].data.type;t=new Cb.Field(t,c,!0)}else!t.nullable&&s.some(({nullCount:c})=>c>0)&&(t=t.clone({nullable:!0}));return new Kr(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 Kr(this._field,e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t=this._children||(this._children=[]),r,n,s;return(r=t[e])?r:(n=(this.type.children||[])[e])&&(s=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),s.length>0)?t[e]=new Kr(n,s):null}};wa.Column=Kr;var al=class extends Kr{constructor(e,t,r){super(e,[t],r);this._chunk=t}search(e,t){return t?t(this,0,e):[0,e]}isValid(e){return this._chunk.isValid(e)}get(e){return this._chunk.get(e)}set(e,t){this._chunk.set(e,t)}indexOf(e,t){return this._chunk.indexOf(e,t)}}});var kb=R(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.instance=Vn.TypeAssembler=void 0;var ND=Oi(),LD=ND.flatbuffers.Long,xD=ut(),K=Zi(),ul=class extends xD.Visitor{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return K.Null.startNull(t),K.Null.endNull(t)}visitInt(e,t){return K.Int.startInt(t),K.Int.addBitWidth(t,e.bitWidth),K.Int.addIsSigned(t,e.isSigned),K.Int.endInt(t)}visitFloat(e,t){return K.FloatingPoint.startFloatingPoint(t),K.FloatingPoint.addPrecision(t,e.precision),K.FloatingPoint.endFloatingPoint(t)}visitBinary(e,t){return K.Binary.startBinary(t),K.Binary.endBinary(t)}visitBool(e,t){return K.Bool.startBool(t),K.Bool.endBool(t)}visitUtf8(e,t){return K.Utf8.startUtf8(t),K.Utf8.endUtf8(t)}visitDecimal(e,t){return K.Decimal.startDecimal(t),K.Decimal.addScale(t,e.scale),K.Decimal.addPrecision(t,e.precision),K.Decimal.endDecimal(t)}visitDate(e,t){return K.Date.startDate(t),K.Date.addUnit(t,e.unit),K.Date.endDate(t)}visitTime(e,t){return K.Time.startTime(t),K.Time.addUnit(t,e.unit),K.Time.addBitWidth(t,e.bitWidth),K.Time.endTime(t)}visitTimestamp(e,t){let r=e.timezone&&t.createString(e.timezone)||void 0;return K.Timestamp.startTimestamp(t),K.Timestamp.addUnit(t,e.unit),r!==void 0&&K.Timestamp.addTimezone(t,r),K.Timestamp.endTimestamp(t)}visitInterval(e,t){return K.Interval.startInterval(t),K.Interval.addUnit(t,e.unit),K.Interval.endInterval(t)}visitList(e,t){return K.List.startList(t),K.List.endList(t)}visitStruct(e,t){return K.Struct_.startStruct_(t),K.Struct_.endStruct_(t)}visitUnion(e,t){K.Union.startTypeIdsVector(t,e.typeIds.length);let r=K.Union.createTypeIdsVector(t,e.typeIds);return K.Union.startUnion(t),K.Union.addMode(t,e.mode),K.Union.addTypeIds(t,r),K.Union.endUnion(t)}visitDictionary(e,t){let r=this.visit(e.indices,t);return K.DictionaryEncoding.startDictionaryEncoding(t),K.DictionaryEncoding.addId(t,new LD(e.id,0)),K.DictionaryEncoding.addIsOrdered(t,e.isOrdered),r!==void 0&&K.DictionaryEncoding.addIndexType(t,r),K.DictionaryEncoding.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return K.FixedSizeBinary.startFixedSizeBinary(t),K.FixedSizeBinary.addByteWidth(t,e.byteWidth),K.FixedSizeBinary.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return K.FixedSizeList.startFixedSizeList(t),K.FixedSizeList.addListSize(t,e.listSize),K.FixedSizeList.endFixedSizeList(t)}visitMap(e,t){return K.Map.startMap(t),K.Map.addKeysSorted(t,e.keysSorted),K.Map.endMap(t)}};Vn.TypeAssembler=ul;Vn.instance=new ul});var qb=R(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.fieldFromJSON=bi.dictionaryBatchFromJSON=bi.recordBatchFromJSON=bi.schemaFromJSON=void 0;var Nn=rt(),Ee=ve(),$r=Jr(),Ln=Se();function qD(i,e=new Map){return new Nn.Schema(zD(i,e),ja(i.customMetadata),e)}bi.schemaFromJSON=qD;function Mb(i){return new $r.RecordBatch(i.count,Vb(i.columns),Nb(i.columns))}bi.recordBatchFromJSON=Mb;function WD(i){return new $r.DictionaryBatch(Mb(i.data),i.id,i.isDelta)}bi.dictionaryBatchFromJSON=WD;function zD(i,e){return(i.fields||[]).filter(Boolean).map(t=>Nn.Field.fromJSON(t,e))}function Pb(i,e){return(i.children||[]).filter(Boolean).map(t=>Nn.Field.fromJSON(t,e))}function Vb(i){return(i||[]).reduce((e,t)=>[...e,new $r.FieldNode(t.count,HD(t.VALIDITY)),...Vb(t.children)],[])}function Nb(i,e=[]){for(let t=-1,r=(i||[]).length;++t<r;){let n=i[t];n.VALIDITY&&e.push(new $r.BufferRegion(e.length,n.VALIDITY.length)),n.TYPE&&e.push(new $r.BufferRegion(e.length,n.TYPE.length)),n.OFFSET&&e.push(new $r.BufferRegion(e.length,n.OFFSET.length)),n.DATA&&e.push(new $r.BufferRegion(e.length,n.DATA.length)),e=Nb(n.children,e)}return e}function HD(i){return(i||[]).reduce((e,t)=>e+ +(t===0),0)}function YD(i,e){let t,r,n,s,c,_;return!e||!(s=i.dictionary)?(c=xb(i,Pb(i,e)),n=new Nn.Field(i.name,c,i.nullable,ja(i.customMetadata))):e.has(t=s.id)?(r=(r=s.indexType)?Lb(r):new Ee.Int32,_=new Ee.Dictionary(e.get(t),r,t,s.isOrdered),n=new Nn.Field(i.name,_,i.nullable,ja(i.customMetadata))):(r=(r=s.indexType)?Lb(r):new Ee.Int32,e.set(t,c=xb(i,Pb(i,e))),_=new Ee.Dictionary(c,r,t,s.isOrdered),n=new Nn.Field(i.name,_,i.nullable,ja(i.customMetadata))),n||null}bi.fieldFromJSON=YD;function ja(i){return new Map(Object.entries(i||{}))}function Lb(i){return new Ee.Int(i.isSigned,i.bitWidth)}function xb(i,e){let t=i.type.name;switch(t){case"NONE":return new Ee.Null;case"null":return new Ee.Null;case"binary":return new Ee.Binary;case"utf8":return new Ee.Utf8;case"bool":return new Ee.Bool;case"list":return new Ee.List((e||[])[0]);case"struct":return new Ee.Struct(e||[]);case"struct_":return new Ee.Struct(e||[])}switch(t){case"int":{let r=i.type;return new Ee.Int(r.isSigned,r.bitWidth)}case"floatingpoint":{let r=i.type;return new Ee.Float(Ln.Precision[r.precision])}case"decimal":{let r=i.type;return new Ee.Decimal(r.scale,r.precision)}case"date":{let r=i.type;return new Ee.Date_(Ln.DateUnit[r.unit])}case"time":{let r=i.type;return new Ee.Time(Ln.TimeUnit[r.unit],r.bitWidth)}case"timestamp":{let r=i.type;return new Ee.Timestamp(Ln.TimeUnit[r.unit],r.timezone)}case"interval":{let r=i.type;return new Ee.Interval(Ln.IntervalUnit[r.unit])}case"union":{let r=i.type;return new Ee.Union(Ln.UnionMode[r.mode],r.typeIds||[],e||[])}case"fixedsizebinary":{let r=i.type;return new Ee.FixedSizeBinary(r.byteWidth)}case"fixedsizelist":{let r=i.type;return new Ee.FixedSizeList(r.listSize,(e||[])[0])}case"map":{let r=i.type;return new Ee.Map_((e||[])[0],r.keysSorted)}}throw new Error(`Unrecognized type: "${t}"`)}});var Jr=R(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.FieldNode=Vt.BufferRegion=Vt.DictionaryBatch=Vt.RecordBatch=Vt.Message=void 0;var cl=Oi(),Y=Zi(),Ue=So(),st=rt(),GD=Ze(),Ne=Se(),ll=kb(),Ia=qb(),Qr=cl.flatbuffers.Long,KD=cl.flatbuffers.Builder,$D=cl.flatbuffers.ByteBuffer,Re=ve(),_r=class{constructor(e,t,r,n){this._version=t,this._headerType=r,this.body=new Uint8Array(0),n&&(this._createHeader=()=>n),this._bodyLength=typeof e=="number"?e:e.low}static fromJSON(e,t){let r=new _r(0,Ne.MetadataVersion.V4,t);return r._createHeader=JD(e,t),r}static decode(e){e=new $D(GD.toUint8Array(e));let t=Ue.Message.getRootAsMessage(e),r=t.bodyLength(),n=t.version(),s=t.headerType(),c=new _r(r,n,s);return c._createHeader=QD(t,s),c}static encode(e){let t=new KD,r=-1;return e.isSchema()?r=st.Schema.encode(t,e.header()):e.isRecordBatch()?r=Pt.encode(t,e.header()):e.isDictionaryBatch()&&(r=gi.encode(t,e.header())),Ue.Message.startMessage(t),Ue.Message.addVersion(t,Ne.MetadataVersion.V4),Ue.Message.addHeader(t,r),Ue.Message.addHeaderType(t,e.headerType),Ue.Message.addBodyLength(t,new Qr(e.bodyLength,0)),Ue.Message.finishMessageBuffer(t,Ue.Message.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof st.Schema)return new _r(0,Ne.MetadataVersion.V4,Ne.MessageHeader.Schema,e);if(e instanceof Pt)return new _r(t,Ne.MetadataVersion.V4,Ne.MessageHeader.RecordBatch,e);if(e instanceof gi)return new _r(t,Ne.MetadataVersion.V4,Ne.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===Ne.MessageHeader.Schema}isRecordBatch(){return this.headerType===Ne.MessageHeader.RecordBatch}isDictionaryBatch(){return this.headerType===Ne.MessageHeader.DictionaryBatch}};Vt.Message=_r;var Pt=class{constructor(e,t,r){this._nodes=t,this._buffers=r,this._length=typeof e=="number"?e:e.low}get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}};Vt.RecordBatch=Pt;var gi=class{constructor(e,t,r=!1){this._data=e,this._isDelta=r,this._id=typeof t=="number"?t:t.low}get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}};Vt.DictionaryBatch=gi;var Zr=class{constructor(e,t){this.offset=typeof e=="number"?e:e.low,this.length=typeof t=="number"?t:t.low}};Vt.BufferRegion=Zr;var Xr=class{constructor(e,t){this.length=typeof e=="number"?e:e.low,this.nullCount=typeof t=="number"?t:t.low}};Vt.FieldNode=Xr;function JD(i,e){return()=>{switch(e){case Ne.MessageHeader.Schema:return st.Schema.fromJSON(i);case Ne.MessageHeader.RecordBatch:return Pt.fromJSON(i);case Ne.MessageHeader.DictionaryBatch:return gi.fromJSON(i)}throw new Error(`Unrecognized Message type: { name: ${Ne.MessageHeader[e]}, type: ${e} }`)}}function QD(i,e){return()=>{switch(e){case Ne.MessageHeader.Schema:return st.Schema.decode(i.header(new Y.Schema));case Ne.MessageHeader.RecordBatch:return Pt.decode(i.header(new Ue.RecordBatch),i.version());case Ne.MessageHeader.DictionaryBatch:return gi.decode(i.header(new Ue.DictionaryBatch),i.version())}throw new Error(`Unrecognized Message type: { name: ${Ne.MessageHeader[e]}, type: ${e} }`)}}st.Field.encode=uF;st.Field.decode=oF;st.Field.fromJSON=Ia.fieldFromJSON;st.Schema.encode=aF;st.Schema.decode=ZD;st.Schema.fromJSON=Ia.schemaFromJSON;Pt.encode=cF;Pt.decode=XD;Pt.fromJSON=Ia.recordBatchFromJSON;gi.encode=lF;gi.decode=eF;gi.fromJSON=Ia.dictionaryBatchFromJSON;Xr.encode=dF;Xr.decode=iF;Zr.encode=fF;Zr.decode=tF;function ZD(i,e=new Map){let t=sF(i,e);return new st.Schema(t,Ta(i),e)}function XD(i,e=Ne.MetadataVersion.V4){return new Pt(i.length(),rF(i),nF(i,e))}function eF(i,e=Ne.MetadataVersion.V4){return new gi(Pt.decode(i.data(),e),i.id(),i.isDelta())}function tF(i){return new Zr(i.offset(),i.length())}function iF(i){return new Xr(i.length(),i.nullCount())}function rF(i){let e=[];for(let t,r=-1,n=-1,s=i.nodesLength();++r<s;)(t=i.nodes(r))&&(e[++n]=Xr.decode(t));return e}function nF(i,e){let t=[];for(let r,n=-1,s=-1,c=i.buffersLength();++n<c;)(r=i.buffers(n))&&(e<Ne.MetadataVersion.V4&&(r.bb_pos+=8*(n+1)),t[++s]=Zr.decode(r));return t}function sF(i,e){let t=[];for(let r,n=-1,s=-1,c=i.fieldsLength();++n<c;)(r=i.fields(n))&&(t[++s]=st.Field.decode(r,e));return t}function Wb(i,e){let t=[];for(let r,n=-1,s=-1,c=i.childrenLength();++n<c;)(r=i.children(n))&&(t[++s]=st.Field.decode(r,e));return t}function oF(i,e){let t,r,n,s,c,_;return!e||!(_=i.dictionary())?(n=Hb(i,Wb(i,e)),r=new st.Field(i.name(),n,i.nullable(),Ta(i))):e.has(t=_.id().low)?(s=(s=_.indexType())?zb(s):new Re.Int32,c=new Re.Dictionary(e.get(t),s,t,_.isOrdered()),r=new st.Field(i.name(),c,i.nullable(),Ta(i))):(s=(s=_.indexType())?zb(s):new Re.Int32,e.set(t,n=Hb(i,Wb(i,e))),c=new Re.Dictionary(n,s,t,_.isOrdered()),r=new st.Field(i.name(),c,i.nullable(),Ta(i))),r||null}function Ta(i){let e=new Map;if(i)for(let t,r,n=-1,s=i.customMetadataLength()|0;++n<s;)(t=i.customMetadata(n))&&(r=t.key())!=null&&e.set(r,t.value());return e}function zb(i){return new Re.Int(i.isSigned(),i.bitWidth())}function Hb(i,e){let t=i.typeType();switch(t){case Y.Type.NONE:return new Re.Null;case Y.Type.Null:return new Re.Null;case Y.Type.Binary:return new Re.Binary;case Y.Type.Utf8:return new Re.Utf8;case Y.Type.Bool:return new Re.Bool;case Y.Type.List:return new Re.List((e||[])[0]);case Y.Type.Struct_:return new Re.Struct(e||[])}switch(t){case Y.Type.Int:{let r=i.type(new Y.Int);return new Re.Int(r.isSigned(),r.bitWidth())}case Y.Type.FloatingPoint:{let r=i.type(new Y.FloatingPoint);return new Re.Float(r.precision())}case Y.Type.Decimal:{let r=i.type(new Y.Decimal);return new Re.Decimal(r.scale(),r.precision())}case Y.Type.Date:{let r=i.type(new Y.Date);return new Re.Date_(r.unit())}case Y.Type.Time:{let r=i.type(new Y.Time);return new Re.Time(r.unit(),r.bitWidth())}case Y.Type.Timestamp:{let r=i.type(new Y.Timestamp);return new Re.Timestamp(r.unit(),r.timezone())}case Y.Type.Interval:{let r=i.type(new Y.Interval);return new Re.Interval(r.unit())}case Y.Type.Union:{let r=i.type(new Y.Union);return new Re.Union(r.mode(),r.typeIdsArray()||[],e||[])}case Y.Type.FixedSizeBinary:{let r=i.type(new Y.FixedSizeBinary);return new Re.FixedSizeBinary(r.byteWidth())}case Y.Type.FixedSizeList:{let r=i.type(new Y.FixedSizeList);return new Re.FixedSizeList(r.listSize(),(e||[])[0])}case Y.Type.Map:{let r=i.type(new Y.Map);return new Re.Map_((e||[])[0],r.keysSorted())}}throw new Error(`Unrecognized type: "${Y.Type[t]}" (${t})`)}function aF(i,e){let t=e.fields.map(s=>st.Field.encode(i,s));Y.Schema.startFieldsVector(i,t.length);let r=Y.Schema.createFieldsVector(i,t),n=e.metadata&&e.metadata.size>0?Y.Schema.createCustomMetadataVector(i,[...e.metadata].map(([s,c])=>{let _=i.createString(`${s}`),v=i.createString(`${c}`);return Y.KeyValue.startKeyValue(i),Y.KeyValue.addKey(i,_),Y.KeyValue.addValue(i,v),Y.KeyValue.endKeyValue(i)})):-1;return Y.Schema.startSchema(i),Y.Schema.addFields(i,r),Y.Schema.addEndianness(i,hF?Y.Endianness.Little:Y.Endianness.Big),n!==-1&&Y.Schema.addCustomMetadata(i,n),Y.Schema.endSchema(i)}function uF(i,e){let t=-1,r=-1,n=-1,s=e.type,c=e.typeId;Re.DataType.isDictionary(s)?(c=s.dictionary.typeId,n=ll.instance.visit(s,i),r=ll.instance.visit(s.dictionary,i)):r=ll.instance.visit(s,i);let _=(s.children||[]).map(O=>st.Field.encode(i,O)),v=Y.Field.createChildrenVector(i,_),B=e.metadata&&e.metadata.size>0?Y.Field.createCustomMetadataVector(i,[...e.metadata].map(([O,N])=>{let q=i.createString(`${O}`),J=i.createString(`${N}`);return Y.KeyValue.startKeyValue(i),Y.KeyValue.addKey(i,q),Y.KeyValue.addValue(i,J),Y.KeyValue.endKeyValue(i)})):-1;return e.name&&(t=i.createString(e.name)),Y.Field.startField(i),Y.Field.addType(i,r),Y.Field.addTypeType(i,c),Y.Field.addChildren(i,v),Y.Field.addNullable(i,!!e.nullable),t!==-1&&Y.Field.addName(i,t),n!==-1&&Y.Field.addDictionary(i,n),B!==-1&&Y.Field.addCustomMetadata(i,B),Y.Field.endField(i)}function cF(i,e){let t=e.nodes||[],r=e.buffers||[];Ue.RecordBatch.startNodesVector(i,t.length),t.slice().reverse().forEach(c=>Xr.encode(i,c));let n=i.endVector();Ue.RecordBatch.startBuffersVector(i,r.length),r.slice().reverse().forEach(c=>Zr.encode(i,c));let s=i.endVector();return Ue.RecordBatch.startRecordBatch(i),Ue.RecordBatch.addLength(i,new Qr(e.length,0)),Ue.RecordBatch.addNodes(i,n),Ue.RecordBatch.addBuffers(i,s),Ue.RecordBatch.endRecordBatch(i)}function lF(i,e){let t=Pt.encode(i,e.data);return Ue.DictionaryBatch.startDictionaryBatch(i),Ue.DictionaryBatch.addId(i,new Qr(e.id,0)),Ue.DictionaryBatch.addIsDelta(i,e.isDelta),Ue.DictionaryBatch.addData(i,t),Ue.DictionaryBatch.endDictionaryBatch(i)}function dF(i,e){return Ue.FieldNode.createFieldNode(i,new Qr(e.length,0),new Qr(e.nullCount,0))}function fF(i,e){return Y.Buffer.createBuffer(i,new Qr(e.offset,0),new Qr(e.length,0))}var hF=function(){let i=new ArrayBuffer(2);return new DataView(i).setInt16(0,256,!0),new Int16Array(i)[0]===256}()});var Sa=R(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.magicX2AndPadding=ye.magicAndPadding=ye.magicLength=ye.checkForMagicArrowString=ye.MAGIC=ye.MAGIC_STR=ye.PADDING=ye.JSONMessageReader=ye.AsyncMessageReader=ye.MessageReader=void 0;var mr=dt(),br=Se(),pF=Oi(),Yb=pF.flatbuffers.ByteBuffer,Rs=Jr(),yF=ft(),_F=Qc(),Gb=Ze(),Ba=dr(),ei=ln(),dl=i=>`Expected ${br.MessageHeader[i]} Message in stream, but was null or length 0.`,fl=i=>`Header pointer of flatbuffer-encoded ${br.MessageHeader[i]} Message is null or length 0.`,Kb=(i,e)=>`Expected to read ${i} metadata bytes, but only read ${e}.`,$b=(i,e)=>`Expected to read ${i} bytes for message body, but only read ${e}.`,hl=class{constructor(e){this.source=e instanceof Ba.ByteStream?e:new Ba.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?ei.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(dl(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=Gb.toUint8Array(this.source.read(e));if(t.byteLength<e)throw new Error($b(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){let t=br.MessageHeader.Schema,r=this.readMessage(t),n=r==null?void 0:r.header();if(e&&!n)throw new Error(fl(t));return n}readMetadataLength(){let e=this.source.read(ye.PADDING),t=e&&new Yb(e),r=(t==null?void 0:t.readInt32(0))||0;return{done:r===0,value:r}}readMetadata(e){let t=this.source.read(e);if(!t)return ei.ITERATOR_DONE;if(t.byteLength<e)throw new Error(Kb(e,t.byteLength));return{done:!1,value:Rs.Message.decode(t)}}};ye.MessageReader=hl;var Jb=class{constructor(e,t){this.source=e instanceof Ba.AsyncByteStream?e:yF.isFileHandle(e)?new _F.AsyncRandomAccessFile(e,t):new Ba.AsyncByteStream(e)}[Symbol.asyncIterator](){return this}next(){return mr.__awaiter(this,void 0,void 0,function*(){let e;return(e=yield this.readMetadataLength()).done||e.value===-1&&(e=yield this.readMetadataLength()).done||(e=yield this.readMetadata(e.value)).done?ei.ITERATOR_DONE:e})}throw(e){return mr.__awaiter(this,void 0,void 0,function*(){return yield this.source.throw(e)})}return(e){return mr.__awaiter(this,void 0,void 0,function*(){return yield this.source.return(e)})}readMessage(e){return mr.__awaiter(this,void 0,void 0,function*(){let t;if((t=yield this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(dl(e));return t.value})}readMessageBody(e){return mr.__awaiter(this,void 0,void 0,function*(){if(e<=0)return new Uint8Array(0);let t=Gb.toUint8Array(yield this.source.read(e));if(t.byteLength<e)throw new Error($b(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()})}readSchema(e=!1){return mr.__awaiter(this,void 0,void 0,function*(){let t=br.MessageHeader.Schema,r=yield this.readMessage(t),n=r==null?void 0:r.header();if(e&&!n)throw new Error(fl(t));return n})}readMetadataLength(){return mr.__awaiter(this,void 0,void 0,function*(){let e=yield this.source.read(ye.PADDING),t=e&&new Yb(e),r=(t==null?void 0:t.readInt32(0))||0;return{done:r===0,value:r}})}readMetadata(e){return mr.__awaiter(this,void 0,void 0,function*(){let t=yield this.source.read(e);if(!t)return ei.ITERATOR_DONE;if(t.byteLength<e)throw new Error(Kb(e,t.byteLength));return{done:!1,value:Rs.Message.decode(t)}})}};ye.AsyncMessageReader=Jb;var Qb=class extends hl{constructor(e){super(new Uint8Array(0));this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof ei.ArrowJSON?e:new ei.ArrowJSON(e)}next(){let{_json:e}=this;if(!this._schema){this._schema=!0;let t=Rs.Message.fromJSON(e.schema,br.MessageHeader.Schema);return{done:!1,value:t}}if(this._dictionaryIndex<e.dictionaries.length){let t=e.dictionaries[this._dictionaryIndex++];this._body=t.data.columns;let r=Rs.Message.fromJSON(t,br.MessageHeader.DictionaryBatch);return{done:!1,value:r}}if(this._batchIndex<e.batches.length){let t=e.batches[this._batchIndex++];this._body=t.columns;let r=Rs.Message.fromJSON(t,br.MessageHeader.RecordBatch);return{done:!1,value:r}}return this._body=[],ei.ITERATOR_DONE}readMessageBody(e){return t(this._body);function t(r){return(r||[]).reduce((n,s)=>[...n,...s.VALIDITY&&[s.VALIDITY]||[],...s.TYPE&&[s.TYPE]||[],...s.OFFSET&&[s.OFFSET]||[],...s.DATA&&[s.DATA]||[],...t(s.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(dl(e));return t.value}readSchema(){let e=br.MessageHeader.Schema,t=this.readMessage(e),r=t==null?void 0:t.header();if(!t||!r)throw new Error(fl(e));return r}};ye.JSONMessageReader=Qb;ye.PADDING=4;ye.MAGIC_STR="ARROW1";ye.MAGIC=new Uint8Array(ye.MAGIC_STR.length);for(let i=0;i<ye.MAGIC_STR.length;i+=1|0)ye.MAGIC[i]=ye.MAGIC_STR.charCodeAt(i);function mF(i,e=0){for(let t=-1,r=ye.MAGIC.length;++t<r;)if(ye.MAGIC[t]!==i[e+t])return!1;return!0}ye.checkForMagicArrowString=mF;ye.magicLength=ye.MAGIC.length;ye.magicAndPadding=ye.magicLength+ye.PADDING;ye.magicX2AndPadding=ye.magicLength*2+ye.PADDING});var ml=R(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.compareTypes=Le.compareFields=Le.compareSchemas=Le.instance=Le.TypeComparator=void 0;var bF=ut(),Q=class extends bF.Visitor{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((r,n)=>this.compareFields(r,t[n]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}};Le.TypeComparator=Q;function wt(i,e){return e instanceof i.constructor}function Cs(i,e){return i===e||wt(i,e)}function Vi(i,e){return i===e||wt(i,e)&&i.bitWidth===e.bitWidth&&i.isSigned===e.isSigned}function Aa(i,e){return i===e||wt(i,e)&&i.precision===e.precision}function gF(i,e){return i===e||wt(i,e)&&i.byteWidth===e.byteWidth}function pl(i,e){return i===e||wt(i,e)&&i.unit===e.unit}function Us(i,e){return i===e||wt(i,e)&&i.unit===e.unit&&i.timezone===e.timezone}function ks(i,e){return i===e||wt(i,e)&&i.unit===e.unit&&i.bitWidth===e.bitWidth}function vF(i,e){return i===e||wt(i,e)&&i.children.length===e.children.length&&Le.instance.compareManyFields(i.children,e.children)}function wF(i,e){return i===e||wt(i,e)&&i.children.length===e.children.length&&Le.instance.compareManyFields(i.children,e.children)}function yl(i,e){return i===e||wt(i,e)&&i.mode===e.mode&&i.typeIds.every((t,r)=>t===e.typeIds[r])&&Le.instance.compareManyFields(i.children,e.children)}function jF(i,e){return i===e||wt(i,e)&&i.id===e.id&&i.isOrdered===e.isOrdered&&Le.instance.visit(i.indices,e.indices)&&Le.instance.visit(i.dictionary,e.dictionary)}function _l(i,e){return i===e||wt(i,e)&&i.unit===e.unit}function IF(i,e){return i===e||wt(i,e)&&i.listSize===e.listSize&&i.children.length===e.children.length&&Le.instance.compareManyFields(i.children,e.children)}function TF(i,e){return i===e||wt(i,e)&&i.keysSorted===e.keysSorted&&i.children.length===e.children.length&&Le.instance.compareManyFields(i.children,e.children)}Q.prototype.visitNull=Cs;Q.prototype.visitBool=Cs;Q.prototype.visitInt=Vi;Q.prototype.visitInt8=Vi;Q.prototype.visitInt16=Vi;Q.prototype.visitInt32=Vi;Q.prototype.visitInt64=Vi;Q.prototype.visitUint8=Vi;Q.prototype.visitUint16=Vi;Q.prototype.visitUint32=Vi;Q.prototype.visitUint64=Vi;Q.prototype.visitFloat=Aa;Q.prototype.visitFloat16=Aa;Q.prototype.visitFloat32=Aa;Q.prototype.visitFloat64=Aa;Q.prototype.visitUtf8=Cs;Q.prototype.visitBinary=Cs;Q.prototype.visitFixedSizeBinary=gF;Q.prototype.visitDate=pl;Q.prototype.visitDateDay=pl;Q.prototype.visitDateMillisecond=pl;Q.prototype.visitTimestamp=Us;Q.prototype.visitTimestampSecond=Us;Q.prototype.visitTimestampMillisecond=Us;Q.prototype.visitTimestampMicrosecond=Us;Q.prototype.visitTimestampNanosecond=Us;Q.prototype.visitTime=ks;Q.prototype.visitTimeSecond=ks;Q.prototype.visitTimeMillisecond=ks;Q.prototype.visitTimeMicrosecond=ks;Q.prototype.visitTimeNanosecond=ks;Q.prototype.visitDecimal=Cs;Q.prototype.visitList=vF;Q.prototype.visitStruct=wF;Q.prototype.visitUnion=yl;Q.prototype.visitDenseUnion=yl;Q.prototype.visitSparseUnion=yl;Q.prototype.visitDictionary=jF;Q.prototype.visitInterval=_l;Q.prototype.visitIntervalDayTime=_l;Q.prototype.visitIntervalYearMonth=_l;Q.prototype.visitFixedSizeList=IF;Q.prototype.visitMap=TF;Le.instance=new Q;function BF(i,e){return Le.instance.compareSchemas(i,e)}Le.compareSchemas=BF;function SF(i,e){return Le.instance.compareFields(i,e)}Le.compareFields=SF;function AF(i,e){return Le.instance.visit(i,e)}Le.compareTypes=AF});var ig=R(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.VectorAssembler=void 0;var OF=ut(),Zb=Se(),DF=Ni(),bl=Ze(),gl=di(),FF=Gr(),Xb=Jr(),eg=ve(),Je=class extends OF.Visitor{constructor(){super();this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(...e){let t=new Je,r=FF.selectVectorChildrenArgs(DF.RecordBatch,e),[n=t]=t.visitMany(r);return n}visit(e){if(!eg.DataType.isDictionary(e.type)){let{data:t,length:r,nullCount:n}=e;if(r>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");eg.DataType.isNull(e.type)||ti.call(this,n<=0?new Uint8Array(0):gl.truncateBitmap(t.offset,r,t.nullBitmap)),this.nodes.push(new Xb.FieldNode(r,n))}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.indices)}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}};Oa.VectorAssembler=Je;function ti(i){let e=i.byteLength+7&~7;return this.buffers.push(i),this.bufferRegions.push(new Xb.BufferRegion(this._byteLength,e)),this._byteLength+=e,this}function EF(i){let{type:e,length:t,typeIds:r,valueOffsets:n}=i;if(ti.call(this,r),e.mode===Zb.UnionMode.Sparse)return wl.call(this,i);if(e.mode===Zb.UnionMode.Dense){if(i.offset<=0)return ti.call(this,n),wl.call(this,i);{let s=r.reduce((O,N)=>Math.max(O,N),r[0]),c=new Int32Array(s+1),_=new Int32Array(s+1).fill(-1),v=new Int32Array(t),B=bl.rebaseValueOffsets(-n[0],t,n);for(let O,N,q=-1;++q<t;)(N=_[O=r[q]])===-1&&(N=_[O]=B[O]),v[q]=B[q]-N,++c[O];ti.call(this,v);for(let O,N=-1,q=e.children.length;++N<q;)if(O=i.getChildAt(N)){let J=e.typeIds[N],ke=Math.min(t,c[J]);this.visit(O.slice(_[J],ke))}}}return this}function RF(i){let e;return i.nullCount>=i.length?ti.call(this,new Uint8Array(0)):(e=i.values)instanceof Uint8Array?ti.call(this,gl.truncateBitmap(i.offset,i.length,e)):ti.call(this,gl.packBools(i))}function gr(i){return ti.call(this,i.values.subarray(0,i.length*i.stride))}function tg(i){let{length:e,values:t,valueOffsets:r}=i,n=r[0],s=r[e],c=Math.min(s-n,t.byteLength-n);return ti.call(this,bl.rebaseValueOffsets(-r[0],e,r)),ti.call(this,t.subarray(n,n+c)),this}function vl(i){let{length:e,valueOffsets:t}=i;return t&&ti.call(this,bl.rebaseValueOffsets(t[0],e,t)),this.visit(i.getChildAt(0))}function wl(i){return this.visitMany(i.type.children.map((e,t)=>i.getChildAt(t)).filter(Boolean))[0]}Je.prototype.visitBool=RF;Je.prototype.visitInt=gr;Je.prototype.visitFloat=gr;Je.prototype.visitUtf8=tg;Je.prototype.visitBinary=tg;Je.prototype.visitFixedSizeBinary=gr;Je.prototype.visitDate=gr;Je.prototype.visitTimestamp=gr;Je.prototype.visitTime=gr;Je.prototype.visitDecimal=gr;Je.prototype.visitList=vl;Je.prototype.visitStruct=wl;Je.prototype.visitUnion=EF;Je.prototype.visitInterval=gr;Je.prototype.visitFixedSizeList=vl;Je.prototype.visitMap=vl});var ng=R(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.JSONTypeAssembler=void 0;var CF=ut(),lt=Zi(),xn=Se(),rg=class extends CF.Visitor{visit(e){return e==null?void 0:super.visit(e)}visitNull({typeId:e}){return{name:lt.Type[e].toLowerCase()}}visitInt({typeId:e,bitWidth:t,isSigned:r}){return{name:lt.Type[e].toLowerCase(),bitWidth:t,isSigned:r}}visitFloat({typeId:e,precision:t}){return{name:lt.Type[e].toLowerCase(),precision:xn.Precision[t]}}visitBinary({typeId:e}){return{name:lt.Type[e].toLowerCase()}}visitBool({typeId:e}){return{name:lt.Type[e].toLowerCase()}}visitUtf8({typeId:e}){return{name:lt.Type[e].toLowerCase()}}visitDecimal({typeId:e,scale:t,precision:r}){return{name:lt.Type[e].toLowerCase(),scale:t,precision:r}}visitDate({typeId:e,unit:t}){return{name:lt.Type[e].toLowerCase(),unit:xn.DateUnit[t]}}visitTime({typeId:e,unit:t,bitWidth:r}){return{name:lt.Type[e].toLowerCase(),unit:xn.TimeUnit[t],bitWidth:r}}visitTimestamp({typeId:e,timezone:t,unit:r}){return{name:lt.Type[e].toLowerCase(),unit:xn.TimeUnit[r],timezone:t}}visitInterval({typeId:e,unit:t}){return{name:lt.Type[e].toLowerCase(),unit:xn.IntervalUnit[t]}}visitList({typeId:e}){return{name:lt.Type[e].toLowerCase()}}visitStruct({typeId:e}){return{name:lt.Type[e].toLowerCase()}}visitUnion({typeId:e,mode:t,typeIds:r}){return{name:lt.Type[e].toLowerCase(),mode:xn.UnionMode[t],typeIds:[...r]}}visitDictionary(e){return this.visit(e.dictionary)}visitFixedSizeBinary({typeId:e,byteWidth:t}){return{name:lt.Type[e].toLowerCase(),byteWidth:t}}visitFixedSizeList({typeId:e,listSize:t}){return{name:lt.Type[e].toLowerCase(),listSize:t}}visitMap({typeId:e,keysSorted:t}){return{name:lt.Type[e].toLowerCase(),keysSorted:t}}};Da.JSONTypeAssembler=rg});var ag=R(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.JSONVectorAssembler=void 0;var UF=Is(),Ms=Pn(),kF=qe(),MF=ut(),PF=Se(),VF=Ni(),jl=Se(),Fa=di(),NF=Gr(),sg=ve(),Ea=class extends MF.Visitor{static assemble(...e){return new Ea().visitMany(NF.selectColumnChildrenArgs(VF.RecordBatch,e))}visit(e){let{data:t,name:r,length:n}=e,{offset:s,nullCount:c,nullBitmap:_}=t,v=sg.DataType.isDictionary(e.type)?e.type.indices:e.type,B=Object.assign([],t.buffers,{[PF.BufferType.VALIDITY]:void 0});return Object.assign({name:r,count:n,VALIDITY:sg.DataType.isNull(v)?void 0:c<=0?Array.from({length:n},()=>1):[...new Fa.BitIterator(_,s,n,null,Fa.getBit)]},super.visit(kF.Vector.new(t.clone(v,s,n,0,B))))}visitNull(){return{}}visitBool({values:e,offset:t,length:r}){return{DATA:[...new Fa.BitIterator(e,t,r,null,Fa.getBool)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[...Ps(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...e],OFFSET:[...e.valueOffsets]}}visitBinary(e){return{DATA:[...og(e)],OFFSET:[...e.valueOffsets]}}visitFixedSizeBinary(e){return{DATA:[...og(e)]}}visitDate(e){return{DATA:e.type.unit===jl.DateUnit.DAY?[...e.values]:[...Ps(e.values,2)]}}visitTimestamp(e){return{DATA:[...Ps(e.values,2)]}}visitTime(e){return{DATA:e.type.unit<jl.TimeUnit.MICROSECOND?[...e.values]:[...Ps(e.values,2)]}}visitDecimal(e){return{DATA:[...Ps(e.values,4)]}}visitList(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,r)=>this.visit(new Ms.Column(t,[e.getChildAt(r)])))}}visitStruct(e){return{children:e.type.children.map((t,r)=>this.visit(new Ms.Column(t,[e.getChildAt(r)])))}}visitUnion(e){return{TYPE:[...e.typeIds],OFFSET:e.type.mode===jl.UnionMode.Dense?[...e.valueOffsets]:void 0,children:e.type.children.map((t,r)=>this.visit(new Ms.Column(t,[e.getChildAt(r)])))}}visitInterval(e){return{DATA:[...e.values]}}visitFixedSizeList(e){return{children:e.type.children.map((t,r)=>this.visit(new Ms.Column(t,[e.getChildAt(r)])))}}visitMap(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,r)=>this.visit(new Ms.Column(t,[e.getChildAt(r)])))}}};Ra.JSONVectorAssembler=Ea;function*og(i){for(let e of i)yield e.reduce((t,r)=>`${t}${("0"+(r&255).toString(16)).slice(-2)}`,"").toUpperCase()}function*Ps(i,e){for(let t=-1,r=i.length/e;++t<r;)yield`${UF.BN.new(i.subarray((t+0)*e,(t+1)*e),!1)}`}});var Pa=R(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.RecordBatchJSONWriter=wi.RecordBatchFileWriter=wi.RecordBatchStreamWriter=wi.RecordBatchWriter=void 0;var ug=dt(),Il=Ns(),LF=Sa(),xF=Pn(),qF=ve(),WF=rt(),Ca=Jr(),Tl=Jr(),qn=Kc(),Bl=Se(),cg=ml(),Sl=dr(),lg=ig(),zF=ng(),dg=ag(),HF=Ze(),Al=Ni(),YF=ln(),vi=ft(),Vs=class extends YF.ReadableInterop{constructor(e){super();this._position=0,this._started=!1,this._sink=new Sl.AsyncByteQueue,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,vi.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 vi.isPromise(e)?e.then(t=>this.writeAll(t)):vi.isAsyncIterable(e)?Dl(this,e):Ol(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 Sl.AsyncByteQueue?this._sink=e:(this._sink=new Sl.AsyncByteQueue,e&&vi.isWritableDOMStream(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&vi.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||!cg.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 Il.Table&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof Al.RecordBatch&&!(t=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(t&&!cg.compareSchemas(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof Al.RecordBatch?e instanceof Al._InternalEmptyPlaceholderRecordBatch||this._writeRecordBatch(e):e instanceof Il.Table?this.writeAll(e.chunks):vi.isIterable(e)&&this.writeAll(e)}_writeMessage(e,t=8){let r=t-1,n=Ca.Message.encode(e),s=n.byteLength,c=this._writeLegacyIpcFormat?4:8,_=s+c+r&~r,v=_-s-c;return e.headerType===Bl.MessageHeader.RecordBatch?this._recordBatchBlocks.push(new qn.FileBlock(_,e.bodyLength,this._position)):e.headerType===Bl.MessageHeader.DictionaryBatch&&this._dictionaryBlocks.push(new qn.FileBlock(_,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(_-c)),s>0&&this._write(n),this._writePadding(v)}_write(e){if(this._started){let t=HF.toUint8Array(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(Ca.Message.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(LF.MAGIC)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:r,bufferRegions:n,buffers:s}=lg.VectorAssembler.assemble(e),c=new Tl.RecordBatch(e.length,r,n),_=Ca.Message.from(c,t);return this._writeDictionaries(e)._writeMessage(_)._writeBodyBuffers(s)}_writeDictionaryBatch(e,t,r=!1){this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));let{byteLength:n,nodes:s,bufferRegions:c,buffers:_}=lg.VectorAssembler.assemble(e),v=new Tl.RecordBatch(e.length,s,c),B=new Tl.DictionaryBatch(v,t,r),O=Ca.Message.from(B,n);return this._writeMessage(O)._writeBodyBuffers(_)}_writeBodyBuffers(e){let t,r,n;for(let s=-1,c=e.length;++s<c;)(t=e[s])&&(r=t.byteLength)>0&&(this._write(t),(n=(r+7&~7)-r)>0&&this._writePadding(n));return this}_writeDictionaries(e){for(let[t,r]of e.dictionaries){let n=this._dictionaryDeltaOffsets.get(t)||0;if(n===0||(r=r.slice(n)).length>0){let s="chunks"in r?r.chunks:[r];for(let c of s)this._writeDictionaryBatch(c,t,n>0),n+=c.length}}return this}};wi.RecordBatchWriter=Vs;var Ua=class extends Vs{static writeAll(e,t){let r=new Ua(t);return vi.isPromise(e)?e.then(n=>r.writeAll(n)):vi.isAsyncIterable(e)?Dl(r,e):Ol(r,e)}};wi.RecordBatchStreamWriter=Ua;var ka=class extends Vs{static writeAll(e){let t=new ka;return vi.isPromise(e)?e.then(r=>t.writeAll(r)):vi.isAsyncIterable(e)?Dl(t,e):Ol(t,e)}constructor(){super();this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){let t=qn.Footer.encode(new qn.Footer(e,Bl.MetadataVersion.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};wi.RecordBatchFileWriter=ka;var Ma=class extends Vs{constructor(){super();this._autoDestroy=!0,this._recordBatches=[],this._dictionaries=[]}static writeAll(e){return new Ma().writeAll(e)}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write(`{
8
- "schema": ${JSON.stringify({fields:e.fields.map(fg)},null,2)}`)}_writeDictionaries(e){return e.dictionaries.size>0&&this._dictionaries.push(e),this}_writeDictionaryBatch(e,t,r=!1){return this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0)),this._write(this._dictionaryBlocks.length===0?" ":`,
9
- `),this._write(`${GF(e,t,r)}`),this._dictionaryBlocks.push(new qn.FileBlock(0,0,0)),this}_writeRecordBatch(e){return this._writeDictionaries(e),this._recordBatches.push(e),this}close(){if(this._dictionaries.length>0){this._write(`,
7
+ return true;`)}Lo.createIsValidFunction=tA;function iA(i){return typeof i!="bigint"?ac.valueToString(i):eA.BigIntAvailable?`${ac.valueToString(i)}n`:`"${ac.valueToString(i)}"`}});var er=R(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.WideBufferBuilder=Ft.OffsetsBufferBuilder=Ft.BitmapBufferBuilder=Ft.DataBufferBuilder=Ft.BufferBuilder=void 0;var N_=Ze(),uc=ft(),cc=(i,e)=>(i*e+63&~63||64)/e,rA=(i,e=0)=>i.length>=e?i.subarray(0,e):N_.memcpy(new i.constructor(e),i,0),ms=class{constructor(e,t=1){this.buffer=e,this.stride=t,this.BYTES_PER_ELEMENT=e.BYTES_PER_ELEMENT,this.ArrayType=e.constructor,this._resize(this.length=e.length/t|0)}get byteLength(){return this.length*this.stride*this.BYTES_PER_ELEMENT|0}get reservedLength(){return this.buffer.length/this.stride}get reservedByteLength(){return this.buffer.byteLength}set(e,t){return this}append(e){return this.set(this.length,e)}reserve(e){if(e>0){this.length+=e;let t=this.stride,r=this.length*t,n=this.buffer.length;r>=n&&this._resize(n===0?cc(r*1,this.BYTES_PER_ELEMENT):cc(r*2,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=cc(e*this.stride,this.BYTES_PER_ELEMENT);let t=rA(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this._resize(0),this}_resize(e){return this.buffer=N_.memcpy(new this.ArrayType(e),this.buffer)}};Ft.BufferBuilder=ms;ms.prototype.offset=0;var xo=class extends ms{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}};Ft.DataBufferBuilder=xo;var L_=class extends xo{constructor(e=new Uint8Array(0)){super(e,1/8);this.numValid=0}get numInvalid(){return this.length-this.numValid}get(e){return this.buffer[e>>3]>>e%8&1}set(e,t){let{buffer:r}=this.reserve(e-this.length+1),n=e>>3,s=e%8,c=r[n]>>s&1;return t?c===0&&(r[n]|=1<<s,++this.numValid):c===1&&(r[n]&=~(1<<s),--this.numValid),this}clear(){return this.numValid=0,super.clear()}};Ft.BitmapBufferBuilder=L_;var x_=class extends xo{constructor(e=new Int32Array(1)){super(e,1)}append(e){return this.set(this.length-1,e)}set(e,t){let r=this.length-1,n=this.reserve(e-r+1).buffer;return r<e++&&n.fill(n[r],r,e),n[e]=n[e-1]+t,this}flush(e=this.length-1){return e>this.length&&this.set(e-1,0),super.flush(e+1)}};Ft.OffsetsBufferBuilder=x_;var q_=class extends ms{get ArrayType64(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?uc.BigInt64Array:uc.BigUint64Array)}set(e,t){switch(this.reserve(e-this.length+1),typeof t){case"bigint":this.buffer64[e]=t;break;case"number":this.buffer[e*this.stride]=t;break;default:this.buffer.set(t,e*this.stride)}return this}_resize(e){let t=super._resize(e),r=t.byteLength/(this.BYTES_PER_ELEMENT*this.stride);return uc.BigIntAvailable&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,r)),t}};Ft.WideBufferBuilder=q_});var Ve=R(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.VariableWidthBuilder=tr.FixedWidthBuilder=tr.Builder=void 0;var yn=dt(),nA=qe(),_n=Se(),sA=Jt(),oA=V_(),lc=er(),aA=ve(),Et=class{constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=aA.strideForType(e),this._nulls=new lc.BitmapBufferBuilder,t&&t.length>0&&(this._isValid=oA.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 uA(e)}static throughAsyncIterable(e){return cA(e)}toVector(){return nA.Vector.new(this.flush())}get ArrayType(){return this.type.ArrayType}get nullCount(){return this._nulls.numInvalid}get numChildren(){return this.children.length}get byteLength(){let e=0;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),this._typeIds&&(e+=this._typeIds.byteLength),this.children.reduce((t,r)=>t+r.byteLength,e)}get reservedLength(){return this._nulls.reservedLength}get reservedByteLength(){let e=0;return this._offsets&&(e+=this._offsets.reservedByteLength),this._values&&(e+=this._values.reservedByteLength),this._nulls&&(e+=this._nulls.reservedByteLength),this._typeIds&&(e+=this._typeIds.reservedByteLength),this.children.reduce((t,r)=>t+r.reservedByteLength,e)}get valueOffsets(){return this._offsets?this._offsets.buffer:null}get values(){return this._values?this._values.buffer:null}get nullBitmap(){return this._nulls?this._nulls.buffer:null}get typeIds(){return this._typeIds?this._typeIds.buffer:null}append(e){return this.set(this.length,e)}isValid(e){return this._isValid(e)}set(e,t){return this.setValid(e,this.isValid(t))&&this.setValue(e,t),this}setValue(e,t){this._setValue(this,e,t)}setValid(e,t){return this.length=this._nulls.set(e,+t).length,t}addChild(e,t=`${this.numChildren}`){throw new Error(`Cannot append children to non-nested type "${this.type}"`)}getChildAt(e){return this.children[e]||null}flush(){let e=[],t=this._values,r=this._offsets,n=this._typeIds,{length:s,nullCount:c}=this;n?(e[_n.BufferType.TYPE]=n.flush(s),r&&(e[_n.BufferType.OFFSET]=r.flush(s))):r?(t&&(e[_n.BufferType.DATA]=t.flush(r.last())),e[_n.BufferType.OFFSET]=r.flush(s)):t&&(e[_n.BufferType.DATA]=t.flush(s)),c>0&&(e[_n.BufferType.VALIDITY]=this._nulls.flush(s));let _=sA.Data.new(this.type,0,s,c,e,this.children.map(v=>v.flush()));return this.clear(),_}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}};tr.Builder=Et;Et.prototype.length=1;Et.prototype.stride=1;Et.prototype.children=null;Et.prototype.finished=!1;Et.prototype.nullValues=null;Et.prototype._isValid=()=>!0;var W_=class extends Et{constructor(e){super(e);this._values=new lc.DataBufferBuilder(new this.ArrayType(0),this.stride)}setValue(e,t){let r=this._values;return r.reserve(e-r.length+1),super.setValue(e,t)}};tr.FixedWidthBuilder=W_;var z_=class extends Et{constructor(e){super(e);this._pendingLength=0,this._offsets=new lc.OffsetsBufferBuilder}setValue(e,t){let r=this._pending||(this._pending=new Map),n=r.get(e);n&&(this._pendingLength-=n.length),this._pendingLength+=t.length,r.set(e,t)}setValid(e,t){return super.setValid(e,t)?!0:((this._pending||(this._pending=new Map)).set(e,void 0),!1)}clear(){return this._pendingLength=0,this._pending=void 0,super.clear()}flush(){return this._flush(),super.flush()}finish(){return this._flush(),super.finish()}_flush(){let e=this._pending,t=this._pendingLength;return this._pendingLength=0,this._pending=void 0,e&&e.size>0&&this._flushPending(e,t),this}};tr.VariableWidthBuilder=z_;function uA(i){let{["queueingStrategy"]:e="count"}=i,{["highWaterMark"]:t=e!=="bytes"?1e3:Math.pow(2,14)}=i,r=e!=="bytes"?"length":"byteLength";return function*(n){let s=0,c=Et.new(i);for(let _ of n)c.append(_)[r]>=t&&++s&&(yield c.toVector());(c.finish().length>0||s===0)&&(yield c.toVector())}}function cA(i){let{["queueingStrategy"]:e="count"}=i,{["highWaterMark"]:t=e!=="bytes"?1e3:Math.pow(2,14)}=i,r=e!=="bytes"?"length":"byteLength";return function(n){return yn.__asyncGenerator(this,arguments,function*(){var s,c;let _=0,v=Et.new(i);try{for(var B=yn.__asyncValues(n),O;O=yield yn.__await(B.next()),!O.done;){let N=O.value;v.append(N)[r]>=t&&++_&&(yield yield yn.__await(v.toVector()))}}catch(N){s={error:N}}finally{try{O&&!O.done&&(c=B.return)&&(yield yn.__await(c.call(B)))}finally{if(s)throw s.error}}(v.finish().length>0||_===0)&&(yield yield yn.__await(v.toVector()))})}}});var dc=R(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.BoolBuilder=void 0;var lA=er(),dA=Ve(),H_=class extends dA.Builder{constructor(e){super(e);this._values=new lA.BitmapBufferBuilder}setValue(e,t){this._values.set(e,+t)}};qo.BoolBuilder=H_});var fc=R(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.NullBuilder=void 0;var fA=Ve(),Y_=class extends fA.Builder{setValue(e,t){}setValid(e,t){return this.length=Math.max(e+1,this.length),t}};Wo.NullBuilder=Y_});var hc=R(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.DateMillisecondBuilder=ir.DateDayBuilder=ir.DateBuilder=void 0;var hA=Ve(),zo=class extends hA.FixedWidthBuilder{};ir.DateBuilder=zo;var G_=class extends zo{};ir.DateDayBuilder=G_;var K_=class extends zo{};ir.DateMillisecondBuilder=K_});var pc=R(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.DecimalBuilder=void 0;var pA=Ve(),$_=class extends pA.FixedWidthBuilder{};Ho.DecimalBuilder=$_});var _c=R(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.DictionaryBuilder=void 0;var yA=ve(),yc=Ve(),J_=class extends yc.Builder{constructor({type:e,nullValues:t,dictionaryHashFunction:r}){super({type:new yA.Dictionary(e.dictionary,e.indices,e.id,e.isOrdered)});this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=yc.Builder.new({type:this.type.indices,nullValues:t}),this.dictionary=yc.Builder.new({type:this.type.dictionary,nullValues:null}),typeof r=="function"&&(this.valueToKey=r)}get values(){return this.indices.values}get nullCount(){return this.indices.nullCount}get nullBitmap(){return this.indices.nullBitmap}get byteLength(){return this.indices.byteLength+this.dictionary.byteLength}get reservedLength(){return this.indices.reservedLength+this.dictionary.reservedLength}get reservedByteLength(){return this.indices.reservedByteLength+this.dictionary.reservedByteLength}isValid(e){return this.indices.isValid(e)}setValid(e,t){let r=this.indices;return t=r.setValid(e,t),this.length=r.length,t}setValue(e,t){let r=this._keysToIndices,n=this.valueToKey(t),s=r[n];return s===void 0&&(r[n]=s=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,s)}flush(){let e=this.type,t=this._dictionary,r=this.dictionary.toVector(),n=this.indices.flush().clone(e);return n.dictionary=t?t.concat(r):r,this.finished||(this._dictionaryOffset+=r.length),this._dictionary=n.dictionary,this.clear(),n}finish(){return this.indices.finish(),this.dictionary.finish(),this._dictionaryOffset=0,this._keysToIndices=Object.create(null),super.finish()}clear(){return this.indices.clear(),this.dictionary.clear(),super.clear()}valueToKey(e){return typeof e=="string"?e:`${e}`}};Yo.DictionaryBuilder=J_});var mc=R(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.FixedSizeBinaryBuilder=void 0;var _A=Ve(),Q_=class extends _A.FixedWidthBuilder{};Go.FixedSizeBinaryBuilder=Q_});var bs=R(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.float64ToUint16=bn.uint16ToFloat64=void 0;var Z_=new Float64Array(1),mn=new Uint32Array(Z_.buffer);function mA(i){let e=(i&31744)>>10,t=(i&1023)/1024,r=Math.pow(-1,(i&32768)>>15);switch(e){case 31:return r*(t?NaN:1/0);case 0:return r*(t?6103515625e-14*t:0)}return r*Math.pow(2,e-15)*(1+t)}bn.uint16ToFloat64=mA;function bA(i){if(i!==i)return 32256;Z_[0]=i;let e=(mn[1]&2147483648)>>16&65535,t=mn[1]&2146435072,r=0;return t>=1089470464?mn[0]>0?t=31744:(t=(t&2080374784)>>16,r=(mn[1]&1048575)>>10):t<=1056964608?(r=1048576+(mn[1]&1048575),r=1048576+(r<<(t>>20)-998)>>21,t=0):(t=t-1056964608>>10,r=(mn[1]&1048575)+512>>10),e|t|r&65535}bn.float64ToUint16=bA});var bc=R(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.Float64Builder=li.Float32Builder=li.Float16Builder=li.FloatBuilder=void 0;var gA=bs(),vA=Ve(),gs=class extends vA.FixedWidthBuilder{};li.FloatBuilder=gs;var X_=class extends gs{setValue(e,t){this._values.set(e,gA.float64ToUint16(t))}};li.Float16Builder=X_;var em=class extends gs{setValue(e,t){this._values.set(e,t)}};li.Float32Builder=em;var tm=class extends gs{setValue(e,t){this._values.set(e,t)}};li.Float64Builder=tm});var js=R(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.BN=Xe.bignumToBigInt=Xe.bignumToString=Xe.isArrowBigNumSymbol=void 0;var wA=Ze(),vs=ft();Xe.isArrowBigNumSymbol=Symbol.for("isArrowBigNum");function Qt(i,...e){return e.length===0?Object.setPrototypeOf(wA.toArrayBufferView(this.TypedArray,i),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(i,...e),this.constructor.prototype)}Qt.prototype[Xe.isArrowBigNumSymbol]=!0;Qt.prototype.toJSON=function(){return`"${Xe.bignumToString(this)}"`};Qt.prototype.valueOf=function(){return im(this)};Qt.prototype.toString=function(){return Xe.bignumToString(this)};Qt.prototype[Symbol.toPrimitive]=function(i="default"){switch(i){case"number":return im(this);case"string":return Xe.bignumToString(this);case"default":return Xe.bignumToBigInt(this)}return Xe.bignumToString(this)};function gn(...i){return Qt.apply(this,i)}function vn(...i){return Qt.apply(this,i)}function ws(...i){return Qt.apply(this,i)}Object.setPrototypeOf(gn.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(vn.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(ws.prototype,Object.create(Uint32Array.prototype));Object.assign(gn.prototype,Qt.prototype,{constructor:gn,signed:!0,TypedArray:Int32Array,BigIntArray:vs.BigInt64Array});Object.assign(vn.prototype,Qt.prototype,{constructor:vn,signed:!1,TypedArray:Uint32Array,BigIntArray:vs.BigUint64Array});Object.assign(ws.prototype,Qt.prototype,{constructor:ws,signed:!0,TypedArray:Uint32Array,BigIntArray:vs.BigUint64Array});function im(i){let{buffer:e,byteOffset:t,length:r,signed:n}=i,s=new Int32Array(e,t,r),c=0,_=0,v=s.length,B,O;for(;_<v;)O=s[_++],B=s[_++],n||(B=B>>>0),c+=(O>>>0)+B*Math.pow(_,32);return c}vs.BigIntAvailable?(Xe.bignumToBigInt=i=>i.byteLength===8?new i.BigIntArray(i.buffer,i.byteOffset,1)[0]:gc(i),Xe.bignumToString=i=>i.byteLength===8?`${new i.BigIntArray(i.buffer,i.byteOffset,1)[0]}`:gc(i)):(Xe.bignumToString=gc,Xe.bignumToBigInt=Xe.bignumToString);function gc(i){let e="",t=new Uint32Array(2),r=new Uint16Array(i.buffer,i.byteOffset,i.byteLength/2),n=new Uint32Array((r=new Uint16Array(r).reverse()).buffer),s=-1,c=r.length-1;do{for(t[0]=r[s=0];s<c;)r[s++]=t[1]=t[0]/10,t[0]=(t[0]-t[1]*10<<16)+r[s];r[s]=t[1]=t[0]/10,t[0]=t[0]-t[1]*10,e=`${t[0]}${e}`}while(n[0]||n[1]||n[2]||n[3]);return e||"0"}var Ko=class{static new(e,t){switch(t){case!0:return new gn(e);case!1:return new vn(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case vs.BigInt64Array:return new gn(e)}return e.byteLength===16?new ws(e):new vn(e)}static signed(e){return new gn(e)}static unsigned(e){return new vn(e)}static decimal(e){return new ws(e)}constructor(e,t){return Ko.new(e,t)}};Xe.BN=Ko});var vc=R($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.Uint64Builder=$e.Uint32Builder=$e.Uint16Builder=$e.Uint8Builder=$e.Int64Builder=$e.Int32Builder=$e.Int16Builder=$e.Int8Builder=$e.IntBuilder=void 0;var jA=js(),rm=er(),IA=ft(),TA=Ve(),di=class extends TA.FixedWidthBuilder{setValue(e,t){this._values.set(e,t)}};$e.IntBuilder=di;var nm=class extends di{};$e.Int8Builder=nm;var sm=class extends di{};$e.Int16Builder=sm;var om=class extends di{};$e.Int32Builder=om;var am=class extends di{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map($o));super(e);this._values=new rm.WideBufferBuilder(new Int32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid($o(e))}};$e.Int64Builder=am;var um=class extends di{};$e.Uint8Builder=um;var cm=class extends di{};$e.Uint16Builder=cm;var lm=class extends di{};$e.Uint32Builder=lm;var dm=class extends di{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map($o));super(e);this._values=new rm.WideBufferBuilder(new Uint32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid($o(e))}};$e.Uint64Builder=dm;var $o=(i=>e=>(ArrayBuffer.isView(e)&&(i.buffer=e.buffer,i.byteOffset=e.byteOffset,i.byteLength=e.byteLength,e=jA.bignumToBigInt(i),i.buffer=null),e))({BigIntArray:IA.BigInt64Array})});var wc=R(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.TimeNanosecondBuilder=Rt.TimeMicrosecondBuilder=Rt.TimeMillisecondBuilder=Rt.TimeSecondBuilder=Rt.TimeBuilder=void 0;var BA=Ve(),wn=class extends BA.FixedWidthBuilder{};Rt.TimeBuilder=wn;var fm=class extends wn{};Rt.TimeSecondBuilder=fm;var hm=class extends wn{};Rt.TimeMillisecondBuilder=hm;var pm=class extends wn{};Rt.TimeMicrosecondBuilder=pm;var ym=class extends wn{};Rt.TimeNanosecondBuilder=ym});var jc=R(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.TimestampNanosecondBuilder=Ct.TimestampMicrosecondBuilder=Ct.TimestampMillisecondBuilder=Ct.TimestampSecondBuilder=Ct.TimestampBuilder=void 0;var SA=Ve(),jn=class extends SA.FixedWidthBuilder{};Ct.TimestampBuilder=jn;var _m=class extends jn{};Ct.TimestampSecondBuilder=_m;var mm=class extends jn{};Ct.TimestampMillisecondBuilder=mm;var bm=class extends jn{};Ct.TimestampMicrosecondBuilder=bm;var gm=class extends jn{};Ct.TimestampNanosecondBuilder=gm});var Ic=R(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.IntervalYearMonthBuilder=rr.IntervalDayTimeBuilder=rr.IntervalBuilder=void 0;var AA=Ve(),Jo=class extends AA.FixedWidthBuilder{};rr.IntervalBuilder=Jo;var vm=class extends Jo{};rr.IntervalDayTimeBuilder=vm;var wm=class extends Jo{};rr.IntervalYearMonthBuilder=wm});var Zo=R(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.BinaryBuilder=void 0;var OA=Ze(),DA=er(),FA=Ve(),jm=class extends FA.VariableWidthBuilder{constructor(e){super(e);this._values=new DA.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,OA.toUint8Array(t))}_flushPending(e,t){let r=this._offsets,n=this._values.reserve(t).buffer,s=0,c=0,_=0,v;for([s,v]of e)v===void 0?r.set(s,0):(c=v.length,n.set(v,_),r.set(s,c),_+=c)}};Qo.BinaryBuilder=jm});var ea=R(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.Utf8Builder=void 0;var EA=Rr(),RA=Zo(),CA=er(),UA=Ve(),Tc=class extends UA.VariableWidthBuilder{constructor(e){super(e);this._values=new CA.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,EA.encodeUtf8(t))}_flushPending(e,t){}};Xo.Utf8Builder=Tc;Tc.prototype._flushPending=RA.BinaryBuilder.prototype._flushPending});var Bc=R(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.Run=void 0;var kA=qe(),Im=class{get length(){return this._values.length}get(e){return this._values[e]}clear(){return this._values=null,this}bind(e){return e instanceof kA.Vector?e:(this._values=e,this)}};ta.Run=Im});var rt=R(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.Field=In.Schema=void 0;var MA=ve(),Ut=class{constructor(e=[],t,r){this.fields=e||[],this.metadata=t||new Map,r||(r=Sc(e)),this.dictionaries=r}get[Symbol.toStringTag](){return"Schema"}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(", ")} }>`}select(...e){let t=e.reduce((r,n)=>(r[n]=!0)&&r,Object.create(null));return new Ut(this.fields.filter(r=>t[r.name]),this.metadata)}selectAt(...e){return new Ut(e.map(t=>this.fields[t]).filter(Boolean),this.metadata)}assign(...e){let t=e[0]instanceof Ut?e[0]:Array.isArray(e[0])?new Ut(e[0]):new Ut(e),r=[...this.fields],n=ia(ia(new Map,this.metadata),t.metadata),s=t.fields.filter(_=>{let v=r.findIndex(B=>B.name===_.name);return~v?(r[v]=_.clone({metadata:ia(ia(new Map,r[v].metadata),_.metadata)}))&&!1:!0}),c=Sc(s,new Map);return new Ut([...r,...s],n,new Map([...this.dictionaries,...c]))}};In.Schema=Ut;var Ei=class{constructor(e,t,r=!1,n){this.name=e,this.type=t,this.nullable=r,this.metadata=n||new Map}static new(...e){let[t,r,n,s]=e;return e[0]&&typeof e[0]=="object"&&({name:t}=e[0],r===void 0&&(r=e[0].type),n===void 0&&(n=e[0].nullable),s===void 0&&(s=e[0].metadata)),new Ei(`${t}`,r,n,s)}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[t,r,n,s]=e;return!e[0]||typeof e[0]!="object"?[t=this.name,r=this.type,n=this.nullable,s=this.metadata]=e:{name:t=this.name,type:r=this.type,nullable:n=this.nullable,metadata:s=this.metadata}=e[0],Ei.new(t,r,n,s)}};In.Field=Ei;function ia(i,e){return new Map([...i||new Map,...e||new Map])}function Sc(i,e=new Map){for(let t=-1,r=i.length;++t<r;){let s=i[t].type;if(MA.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&&Sc(s.children,e)}return e}Ut.prototype.fields=null;Ut.prototype.metadata=null;Ut.prototype.dictionaries=null;Ei.prototype.type=null;Ei.prototype.name=null;Ei.prototype.nullable=null;Ei.prototype.metadata=null});var Ac=R(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.ListBuilder=void 0;var PA=Bc(),VA=rt(),NA=ve(),LA=er(),xA=Ve(),Tm=class extends xA.VariableWidthBuilder{constructor(e){super(e);this._run=new PA.Run,this._offsets=new LA.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 NA.List(new VA.Field(t,e.type,!0)),this.numChildren-1}clear(){return this._run.clear(),super.clear()}_flushPending(e){let t=this._run,r=this._offsets,n=this._setValue,s=0,c;for([s,c]of e)c===void 0?r.set(s,0):(r.set(s,c.length),n(this,s,t.bind(c)))}};ra.ListBuilder=Tm});var Oc=R(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.FixedSizeListBuilder=void 0;var qA=Bc(),WA=rt(),zA=Ve(),HA=ve(),Bm=class extends zA.Builder{constructor(){super(...arguments);this._run=new qA.Run}setValue(e,t){super.setValue(e,this._run.bind(t))}addChild(e,t="0"){if(this.numChildren>0)throw new Error("FixedSizeListBuilder can only have one child.");let r=this.children.push(e);return this.type=new HA.FixedSizeList(this.type.listSize,new WA.Field(t,e.type,!0)),r}clear(){return this._run.clear(),super.clear()}};na.FixedSizeListBuilder=Bm});var Dc=R(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.MapBuilder=void 0;var YA=rt(),GA=ve(),KA=Ve(),Sm=class extends KA.VariableWidthBuilder{set(e,t){return super.set(e,t)}setValue(e,t){t=t instanceof Map?t:new Map(Object.entries(t));let r=this._pending||(this._pending=new Map),n=r.get(e);n&&(this._pendingLength-=n.size),this._pendingLength+=t.size,r.set(e,t)}addChild(e,t=`${this.numChildren}`){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new GA.Map_(new YA.Field(t,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){let t=this._offsets,r=this._setValue;e.forEach((n,s)=>{n===void 0?t.set(s,0):(t.set(s,n.size),r(this,s,n))})}};sa.MapBuilder=Sm});var Fc=R(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.StructBuilder=void 0;var $A=rt(),JA=Ve(),QA=ve(),Am=class extends JA.Builder{addChild(e,t=`${this.numChildren}`){let r=this.children.push(e);return this.type=new QA.Struct([...this.type.children,new $A.Field(t,e.type,!0)]),r}};oa.StructBuilder=Am});var Ec=R(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.DenseUnionBuilder=nr.SparseUnionBuilder=nr.UnionBuilder=void 0;var ZA=rt(),Om=er(),XA=Ve(),eO=ve(),aa=class extends XA.Builder{constructor(e){super(e);this._typeIds=new Om.DataBufferBuilder(new Int8Array(0),1),typeof e.valueToChildTypeId=="function"&&(this._valueToChildTypeId=e.valueToChildTypeId)}get typeIdToChildIndex(){return this.type.typeIdToChildIndex}append(e,t){return this.set(this.length,e,t)}set(e,t,r){return r===void 0&&(r=this._valueToChildTypeId(this,t,e)),this.setValid(e,this.isValid(t))&&this.setValue(e,t,r),this}setValue(e,t,r){this._typeIds.set(e,r),super.setValue(e,t)}addChild(e,t=`${this.children.length}`){let r=this.children.push(e),{type:{children:n,mode:s,typeIds:c}}=this,_=[...n,new ZA.Field(t,e.type)];return this.type=new eO.Union(s,[...c,r],_),r}_valueToChildTypeId(e,t,r){throw new Error("Cannot map UnionBuilder value to child typeId. Pass the `childTypeId` as the second argument to unionBuilder.append(), or supply a `valueToChildTypeId` function as part of the UnionBuilder constructor options.")}};nr.UnionBuilder=aa;var Dm=class extends aa{};nr.SparseUnionBuilder=Dm;var Fm=class extends aa{constructor(e){super(e);this._offsets=new Om.DataBufferBuilder(new Int32Array(0))}setValue(e,t,r){let n=this.type.typeIdToChildIndex[r];return this._offsets.set(e,this.getChildAt(n).length),super.setValue(e,t,r)}};nr.DenseUnionBuilder=Fm});var ut=R(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});ua.Visitor=void 0;var tO=Jt(),iO=qe(),F=Se(),rO=ve(),Te=class{visitMany(e,...t){return e.map((r,n)=>this.visit(r,...t.map(s=>s[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return nO(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}};ua.Visitor=Te;function nO(i,e,t=!0){let r=null,n=F.Type.NONE;switch(e instanceof tO.Data||e instanceof iO.Vector?n=Rc(e.type):e instanceof rO.DataType?n=Rc(e):typeof(n=e)!="number"&&(n=F.Type[e]),n){case F.Type.Null:r=i.visitNull;break;case F.Type.Bool:r=i.visitBool;break;case F.Type.Int:r=i.visitInt;break;case F.Type.Int8:r=i.visitInt8||i.visitInt;break;case F.Type.Int16:r=i.visitInt16||i.visitInt;break;case F.Type.Int32:r=i.visitInt32||i.visitInt;break;case F.Type.Int64:r=i.visitInt64||i.visitInt;break;case F.Type.Uint8:r=i.visitUint8||i.visitInt;break;case F.Type.Uint16:r=i.visitUint16||i.visitInt;break;case F.Type.Uint32:r=i.visitUint32||i.visitInt;break;case F.Type.Uint64:r=i.visitUint64||i.visitInt;break;case F.Type.Float:r=i.visitFloat;break;case F.Type.Float16:r=i.visitFloat16||i.visitFloat;break;case F.Type.Float32:r=i.visitFloat32||i.visitFloat;break;case F.Type.Float64:r=i.visitFloat64||i.visitFloat;break;case F.Type.Utf8:r=i.visitUtf8;break;case F.Type.Binary:r=i.visitBinary;break;case F.Type.FixedSizeBinary:r=i.visitFixedSizeBinary;break;case F.Type.Date:r=i.visitDate;break;case F.Type.DateDay:r=i.visitDateDay||i.visitDate;break;case F.Type.DateMillisecond:r=i.visitDateMillisecond||i.visitDate;break;case F.Type.Timestamp:r=i.visitTimestamp;break;case F.Type.TimestampSecond:r=i.visitTimestampSecond||i.visitTimestamp;break;case F.Type.TimestampMillisecond:r=i.visitTimestampMillisecond||i.visitTimestamp;break;case F.Type.TimestampMicrosecond:r=i.visitTimestampMicrosecond||i.visitTimestamp;break;case F.Type.TimestampNanosecond:r=i.visitTimestampNanosecond||i.visitTimestamp;break;case F.Type.Time:r=i.visitTime;break;case F.Type.TimeSecond:r=i.visitTimeSecond||i.visitTime;break;case F.Type.TimeMillisecond:r=i.visitTimeMillisecond||i.visitTime;break;case F.Type.TimeMicrosecond:r=i.visitTimeMicrosecond||i.visitTime;break;case F.Type.TimeNanosecond:r=i.visitTimeNanosecond||i.visitTime;break;case F.Type.Decimal:r=i.visitDecimal;break;case F.Type.List:r=i.visitList;break;case F.Type.Struct:r=i.visitStruct;break;case F.Type.Union:r=i.visitUnion;break;case F.Type.DenseUnion:r=i.visitDenseUnion||i.visitUnion;break;case F.Type.SparseUnion:r=i.visitSparseUnion||i.visitUnion;break;case F.Type.Dictionary:r=i.visitDictionary;break;case F.Type.Interval:r=i.visitInterval;break;case F.Type.IntervalDayTime:r=i.visitIntervalDayTime||i.visitInterval;break;case F.Type.IntervalYearMonth:r=i.visitIntervalYearMonth||i.visitInterval;break;case F.Type.FixedSizeList:r=i.visitFixedSizeList;break;case F.Type.Map:r=i.visitMap;break}if(typeof r=="function")return r;if(!t)return()=>null;throw new Error(`Unrecognized type '${F.Type[n]}'`)}function Rc(i){switch(i.typeId){case F.Type.Null:return F.Type.Null;case F.Type.Int:{let{bitWidth:e,isSigned:t}=i;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(i.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(i.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(i.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(i.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(i.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(i.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[i.typeId]}'`)}Te.prototype.visitInt8=null;Te.prototype.visitInt16=null;Te.prototype.visitInt32=null;Te.prototype.visitInt64=null;Te.prototype.visitUint8=null;Te.prototype.visitUint16=null;Te.prototype.visitUint32=null;Te.prototype.visitUint64=null;Te.prototype.visitFloat16=null;Te.prototype.visitFloat32=null;Te.prototype.visitFloat64=null;Te.prototype.visitDateDay=null;Te.prototype.visitDateMillisecond=null;Te.prototype.visitTimestampSecond=null;Te.prototype.visitTimestampMillisecond=null;Te.prototype.visitTimestampMicrosecond=null;Te.prototype.visitTimestampNanosecond=null;Te.prototype.visitTimeSecond=null;Te.prototype.visitTimeMillisecond=null;Te.prototype.visitTimeMicrosecond=null;Te.prototype.visitTimeNanosecond=null;Te.prototype.visitDenseUnion=null;Te.prototype.visitSparseUnion=null;Te.prototype.visitIntervalDayTime=null;Te.prototype.visitIntervalYearMonth=null});var kc=R(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.instance=Tn.SetVisitor=void 0;var sO=qe(),oO=ut(),aO=Rr(),uO=bs(),cO=Ze(),kt=Se(),ne=class extends oO.Visitor{};Tn.SetVisitor=ne;var lO=(i,e,t)=>{i[e]=t/864e5|0},Cc=(i,e,t)=>{i[e]=t%4294967296|0,i[e+1]=t/4294967296|0},dO=(i,e,t)=>{i[e]=t*1e3%4294967296|0,i[e+1]=t*1e3/4294967296|0},fO=(i,e,t)=>{i[e]=t*1e6%4294967296|0,i[e+1]=t*1e6/4294967296|0},Em=(i,e,t,r)=>{let{[t]:n,[t+1]:s}=e;n!=null&&s!=null&&i.set(r.subarray(0,s-n),n)},hO=({offset:i,values:e},t,r)=>{let n=i+t;r?e[n>>3]|=1<<n%8:e[n>>3]&=~(1<<n%8)},Rm=({values:i},e,t)=>{lO(i,e,t.valueOf())},Cm=({values:i},e,t)=>{Cc(i,e*2,t.valueOf())},fi=({stride:i,values:e},t,r)=>{e[i*t]=r},Um=({stride:i,values:e},t,r)=>{e[i*t]=uO.float64ToUint16(r)},Uc=(i,e,t)=>{switch(typeof t){case"bigint":i.values64[e]=t;break;case"number":i.values[e*i.stride]=t;break;default:{let r=t,{stride:n,ArrayType:s}=i,c=cO.toArrayBufferView(s,r);i.values.set(c.subarray(0,n),n*e)}}},pO=({stride:i,values:e},t,r)=>{e.set(r.subarray(0,i),i*t)},yO=({values:i,valueOffsets:e},t,r)=>Em(i,e,t,r),_O=({values:i,valueOffsets:e},t,r)=>{Em(i,e,t,aO.encodeUtf8(r))},mO=(i,e,t)=>{i.type.bitWidth<64?fi(i,e,t):Uc(i,e,t)},bO=(i,e,t)=>{i.type.precision!==kt.Precision.HALF?fi(i,e,t):Um(i,e,t)},gO=(i,e,t)=>{i.type.unit===kt.DateUnit.DAY?Rm(i,e,t):Cm(i,e,t)},km=({values:i},e,t)=>Cc(i,e*2,t/1e3),Mm=({values:i},e,t)=>Cc(i,e*2,t),Pm=({values:i},e,t)=>dO(i,e*2,t),Vm=({values:i},e,t)=>fO(i,e*2,t),vO=(i,e,t)=>{switch(i.type.unit){case kt.TimeUnit.SECOND:return km(i,e,t);case kt.TimeUnit.MILLISECOND:return Mm(i,e,t);case kt.TimeUnit.MICROSECOND:return Pm(i,e,t);case kt.TimeUnit.NANOSECOND:return Vm(i,e,t)}},Nm=({values:i,stride:e},t,r)=>{i[e*t]=r},Lm=({values:i,stride:e},t,r)=>{i[e*t]=r},xm=({values:i},e,t)=>{i.set(t.subarray(0,2),2*e)},qm=({values:i},e,t)=>{i.set(t.subarray(0,2),2*e)},wO=(i,e,t)=>{switch(i.type.unit){case kt.TimeUnit.SECOND:return Nm(i,e,t);case kt.TimeUnit.MILLISECOND:return Lm(i,e,t);case kt.TimeUnit.MICROSECOND:return xm(i,e,t);case kt.TimeUnit.NANOSECOND:return qm(i,e,t)}},jO=({values:i},e,t)=>{i.set(t.subarray(0,4),4*e)},IO=(i,e,t)=>{let r=i.getChildAt(0),n=i.valueOffsets;for(let s=-1,c=n[e],_=n[e+1];c<_;)r.set(c++,t.get(++s))},TO=(i,e,t)=>{let r=i.getChildAt(0),n=i.valueOffsets,s=t instanceof Map?[...t]:Object.entries(t);for(let c=-1,_=n[e],v=n[e+1];_<v;)r.set(_++,s[++c])},BO=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e[n]),SO=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e.get(n)),AO=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e.get(r.name)),OO=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e[r.name]),DO=(i,e,t)=>{let r=t instanceof Map?AO(e,t):t instanceof sO.Vector?SO(e,t):Array.isArray(t)?BO(e,t):OO(e,t);i.type.children.forEach((n,s)=>r(i.getChildAt(s),n,s))},FO=(i,e,t)=>{i.type.mode===kt.UnionMode.Dense?Wm(i,e,t):zm(i,e,t)},Wm=(i,e,t)=>{let r=i.typeIdToChildIndex[i.typeIds[e]],n=i.getChildAt(r);n&&n.set(i.valueOffsets[e],t)},zm=(i,e,t)=>{let r=i.typeIdToChildIndex[i.typeIds[e]],n=i.getChildAt(r);n&&n.set(e,t)},EO=(i,e,t)=>{let r=i.getKey(e);r!==null&&i.setValue(r,t)},RO=(i,e,t)=>{i.type.unit===kt.IntervalUnit.DAY_TIME?Hm(i,e,t):Ym(i,e,t)},Hm=({values:i},e,t)=>{i.set(t.subarray(0,2),2*e)},Ym=({values:i},e,t)=>{i[e]=t[0]*12+t[1]%12},CO=(i,e,t)=>{let r=i.getChildAt(0),{stride:n}=i;for(let s=-1,c=e*n;++s<n;)r.set(c+s,t.get(s))};ne.prototype.visitBool=hO;ne.prototype.visitInt=mO;ne.prototype.visitInt8=fi;ne.prototype.visitInt16=fi;ne.prototype.visitInt32=fi;ne.prototype.visitInt64=Uc;ne.prototype.visitUint8=fi;ne.prototype.visitUint16=fi;ne.prototype.visitUint32=fi;ne.prototype.visitUint64=Uc;ne.prototype.visitFloat=bO;ne.prototype.visitFloat16=Um;ne.prototype.visitFloat32=fi;ne.prototype.visitFloat64=fi;ne.prototype.visitUtf8=_O;ne.prototype.visitBinary=yO;ne.prototype.visitFixedSizeBinary=pO;ne.prototype.visitDate=gO;ne.prototype.visitDateDay=Rm;ne.prototype.visitDateMillisecond=Cm;ne.prototype.visitTimestamp=vO;ne.prototype.visitTimestampSecond=km;ne.prototype.visitTimestampMillisecond=Mm;ne.prototype.visitTimestampMicrosecond=Pm;ne.prototype.visitTimestampNanosecond=Vm;ne.prototype.visitTime=wO;ne.prototype.visitTimeSecond=Nm;ne.prototype.visitTimeMillisecond=Lm;ne.prototype.visitTimeMicrosecond=xm;ne.prototype.visitTimeNanosecond=qm;ne.prototype.visitDecimal=jO;ne.prototype.visitList=IO;ne.prototype.visitStruct=DO;ne.prototype.visitUnion=FO;ne.prototype.visitDenseUnion=Wm;ne.prototype.visitSparseUnion=zm;ne.prototype.visitDictionary=EO;ne.prototype.visitInterval=RO;ne.prototype.visitIntervalDayTime=Hm;ne.prototype.visitIntervalYearMonth=Ym;ne.prototype.visitFixedSizeList=CO;ne.prototype.visitMap=TO;Tn.instance=new ne});var Gm=R(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.instance=Bn.GetBuilderCtor=void 0;var UO=ut(),kO=Zo(),MO=dc(),Mc=hc(),PO=pc(),VO=_c(),NO=mc(),LO=Oc(),ca=bc(),Pc=Ic(),Ri=vc(),xO=Ac(),qO=Dc(),WO=fc(),zO=Fc(),Is=jc(),Ts=wc(),Vc=Ec(),HO=ea(),Nc=class extends UO.Visitor{visitNull(){return WO.NullBuilder}visitBool(){return MO.BoolBuilder}visitInt(){return Ri.IntBuilder}visitInt8(){return Ri.Int8Builder}visitInt16(){return Ri.Int16Builder}visitInt32(){return Ri.Int32Builder}visitInt64(){return Ri.Int64Builder}visitUint8(){return Ri.Uint8Builder}visitUint16(){return Ri.Uint16Builder}visitUint32(){return Ri.Uint32Builder}visitUint64(){return Ri.Uint64Builder}visitFloat(){return ca.FloatBuilder}visitFloat16(){return ca.Float16Builder}visitFloat32(){return ca.Float32Builder}visitFloat64(){return ca.Float64Builder}visitUtf8(){return HO.Utf8Builder}visitBinary(){return kO.BinaryBuilder}visitFixedSizeBinary(){return NO.FixedSizeBinaryBuilder}visitDate(){return Mc.DateBuilder}visitDateDay(){return Mc.DateDayBuilder}visitDateMillisecond(){return Mc.DateMillisecondBuilder}visitTimestamp(){return Is.TimestampBuilder}visitTimestampSecond(){return Is.TimestampSecondBuilder}visitTimestampMillisecond(){return Is.TimestampMillisecondBuilder}visitTimestampMicrosecond(){return Is.TimestampMicrosecondBuilder}visitTimestampNanosecond(){return Is.TimestampNanosecondBuilder}visitTime(){return Ts.TimeBuilder}visitTimeSecond(){return Ts.TimeSecondBuilder}visitTimeMillisecond(){return Ts.TimeMillisecondBuilder}visitTimeMicrosecond(){return Ts.TimeMicrosecondBuilder}visitTimeNanosecond(){return Ts.TimeNanosecondBuilder}visitDecimal(){return PO.DecimalBuilder}visitList(){return xO.ListBuilder}visitStruct(){return zO.StructBuilder}visitUnion(){return Vc.UnionBuilder}visitDenseUnion(){return Vc.DenseUnionBuilder}visitSparseUnion(){return Vc.SparseUnionBuilder}visitDictionary(){return VO.DictionaryBuilder}visitInterval(){return Pc.IntervalBuilder}visitIntervalDayTime(){return Pc.IntervalDayTimeBuilder}visitIntervalYearMonth(){return Pc.IntervalYearMonthBuilder}visitFixedSizeList(){return LO.FixedSizeListBuilder}visitMap(){return qO.MapBuilder}};Bn.GetBuilderCtor=Nc;Bn.instance=new Nc});var da=R(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.DenseUnionBuilder=M.SparseUnionBuilder=M.UnionBuilder=M.StructBuilder=M.MapBuilder=M.FixedSizeListBuilder=M.ListBuilder=M.BinaryBuilder=M.Utf8Builder=M.IntervalYearMonthBuilder=M.IntervalDayTimeBuilder=M.IntervalBuilder=M.TimestampNanosecondBuilder=M.TimestampMicrosecondBuilder=M.TimestampMillisecondBuilder=M.TimestampSecondBuilder=M.TimestampBuilder=M.TimeNanosecondBuilder=M.TimeMicrosecondBuilder=M.TimeMillisecondBuilder=M.TimeSecondBuilder=M.TimeBuilder=M.Uint64Builder=M.Uint32Builder=M.Uint16Builder=M.Uint8Builder=M.Int64Builder=M.Int32Builder=M.Int16Builder=M.Int8Builder=M.IntBuilder=M.Float64Builder=M.Float32Builder=M.Float16Builder=M.FloatBuilder=M.FixedSizeBinaryBuilder=M.DictionaryBuilder=M.DecimalBuilder=M.DateMillisecondBuilder=M.DateDayBuilder=M.DateBuilder=M.NullBuilder=M.BoolBuilder=M.Builder=void 0;var YO=Ve();Object.defineProperty(M,"Builder",{enumerable:!0,get:function(){return YO.Builder}});var GO=dc();Object.defineProperty(M,"BoolBuilder",{enumerable:!0,get:function(){return GO.BoolBuilder}});var KO=fc();Object.defineProperty(M,"NullBuilder",{enumerable:!0,get:function(){return KO.NullBuilder}});var Lc=hc();Object.defineProperty(M,"DateBuilder",{enumerable:!0,get:function(){return Lc.DateBuilder}});Object.defineProperty(M,"DateDayBuilder",{enumerable:!0,get:function(){return Lc.DateDayBuilder}});Object.defineProperty(M,"DateMillisecondBuilder",{enumerable:!0,get:function(){return Lc.DateMillisecondBuilder}});var $O=pc();Object.defineProperty(M,"DecimalBuilder",{enumerable:!0,get:function(){return $O.DecimalBuilder}});var JO=_c();Object.defineProperty(M,"DictionaryBuilder",{enumerable:!0,get:function(){return JO.DictionaryBuilder}});var QO=mc();Object.defineProperty(M,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return QO.FixedSizeBinaryBuilder}});var la=bc();Object.defineProperty(M,"FloatBuilder",{enumerable:!0,get:function(){return la.FloatBuilder}});Object.defineProperty(M,"Float16Builder",{enumerable:!0,get:function(){return la.Float16Builder}});Object.defineProperty(M,"Float32Builder",{enumerable:!0,get:function(){return la.Float32Builder}});Object.defineProperty(M,"Float64Builder",{enumerable:!0,get:function(){return la.Float64Builder}});var Ci=vc();Object.defineProperty(M,"IntBuilder",{enumerable:!0,get:function(){return Ci.IntBuilder}});Object.defineProperty(M,"Int8Builder",{enumerable:!0,get:function(){return Ci.Int8Builder}});Object.defineProperty(M,"Int16Builder",{enumerable:!0,get:function(){return Ci.Int16Builder}});Object.defineProperty(M,"Int32Builder",{enumerable:!0,get:function(){return Ci.Int32Builder}});Object.defineProperty(M,"Int64Builder",{enumerable:!0,get:function(){return Ci.Int64Builder}});Object.defineProperty(M,"Uint8Builder",{enumerable:!0,get:function(){return Ci.Uint8Builder}});Object.defineProperty(M,"Uint16Builder",{enumerable:!0,get:function(){return Ci.Uint16Builder}});Object.defineProperty(M,"Uint32Builder",{enumerable:!0,get:function(){return Ci.Uint32Builder}});Object.defineProperty(M,"Uint64Builder",{enumerable:!0,get:function(){return Ci.Uint64Builder}});var Bs=wc();Object.defineProperty(M,"TimeBuilder",{enumerable:!0,get:function(){return Bs.TimeBuilder}});Object.defineProperty(M,"TimeSecondBuilder",{enumerable:!0,get:function(){return Bs.TimeSecondBuilder}});Object.defineProperty(M,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return Bs.TimeMillisecondBuilder}});Object.defineProperty(M,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return Bs.TimeMicrosecondBuilder}});Object.defineProperty(M,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return Bs.TimeNanosecondBuilder}});var Ss=jc();Object.defineProperty(M,"TimestampBuilder",{enumerable:!0,get:function(){return Ss.TimestampBuilder}});Object.defineProperty(M,"TimestampSecondBuilder",{enumerable:!0,get:function(){return Ss.TimestampSecondBuilder}});Object.defineProperty(M,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return Ss.TimestampMillisecondBuilder}});Object.defineProperty(M,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return Ss.TimestampMicrosecondBuilder}});Object.defineProperty(M,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return Ss.TimestampNanosecondBuilder}});var xc=Ic();Object.defineProperty(M,"IntervalBuilder",{enumerable:!0,get:function(){return xc.IntervalBuilder}});Object.defineProperty(M,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return xc.IntervalDayTimeBuilder}});Object.defineProperty(M,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return xc.IntervalYearMonthBuilder}});var ZO=ea();Object.defineProperty(M,"Utf8Builder",{enumerable:!0,get:function(){return ZO.Utf8Builder}});var XO=Zo();Object.defineProperty(M,"BinaryBuilder",{enumerable:!0,get:function(){return XO.BinaryBuilder}});var eD=Ac();Object.defineProperty(M,"ListBuilder",{enumerable:!0,get:function(){return eD.ListBuilder}});var tD=Oc();Object.defineProperty(M,"FixedSizeListBuilder",{enumerable:!0,get:function(){return tD.FixedSizeListBuilder}});var iD=Dc();Object.defineProperty(M,"MapBuilder",{enumerable:!0,get:function(){return iD.MapBuilder}});var rD=Fc();Object.defineProperty(M,"StructBuilder",{enumerable:!0,get:function(){return rD.StructBuilder}});var qc=Ec();Object.defineProperty(M,"UnionBuilder",{enumerable:!0,get:function(){return qc.UnionBuilder}});Object.defineProperty(M,"SparseUnionBuilder",{enumerable:!0,get:function(){return qc.SparseUnionBuilder}});Object.defineProperty(M,"DenseUnionBuilder",{enumerable:!0,get:function(){return qc.DenseUnionBuilder}});var Wc=Se(),nD=ea(),sD=Ve(),Km=kc(),$m=Gm();sD.Builder.new=Jm;function Jm(i){let e=i.type,t=new($m.instance.getVisitFn(e)())(i);if(e.children&&e.children.length>0){let r=i.children||[],n={nullValues:i.nullValues},s=Array.isArray(r)?(c,_)=>r[_]||n:({name:c})=>r[c]||n;e.children.forEach((c,_)=>{let{type:v}=c,B=s(c,_);t.children.push(Jm(Object.assign(Object.assign({},B),{type:v})))})}return t}Object.keys(Wc.Type).map(i=>Wc.Type[i]).filter(i=>typeof i=="number"&&i!==Wc.Type.NONE).forEach(i=>{let e=$m.instance.visit(i);e.prototype._setValue=Km.instance.getVisitFn(i)});nD.Utf8Builder.prototype._setValue=Km.instance.visitBinary});var Qm=R(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.Block=Sn.Footer=void 0;var oD=Ai(),fa=Qi(),Mt=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 Mt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,t){return e.setPosition(e.position()+oD.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Mt).__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):fa.MetadataVersion.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new fa.Schema).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){let r=this.bb.__offset(this.bb_pos,8);return r?(t||new ha).__init(this.bb.__vector(this.bb_pos+r)+e*24,this.bb):null}dictionariesLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,t){let r=this.bb.__offset(this.bb_pos,10);return r?(t||new ha).__init(this.bb.__vector(this.bb_pos+r)+e*24,this.bb):null}recordBatchesLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let r=this.bb.__offset(this.bb_pos,12);return r?(t||new fa.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,fa.MetadataVersion.V1)}static addSchema(e,t){e.addFieldOffset(1,t,0)}static addDictionaries(e,t){e.addFieldOffset(2,t,0)}static startDictionariesVector(e,t){e.startVector(24,t,8)}static addRecordBatches(e,t){e.addFieldOffset(3,t,0)}static startRecordBatchesVector(e,t){e.startVector(24,t,8)}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,t){e.finish(t)}static finishSizePrefixedFooterBuffer(e,t){e.finish(t,void 0,!0)}static createFooter(e,t,r,n,s,c){return Mt.startFooter(e),Mt.addVersion(e,t),Mt.addSchema(e,r),Mt.addDictionaries(e,n),Mt.addRecordBatches(e,s),Mt.addCustomMetadata(e,c),Mt.endFooter(e)}};Sn.Footer=Mt;var ha=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static createBlock(e,t,r,n){return e.prep(8,24),e.writeInt64(n),e.pad(4),e.writeInt32(r),e.writeInt64(t),e.offset()}};Sn.Block=ha});var Yc=R(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.FileBlock=An.Footer=void 0;var Zt=Qm(),zc=Ai(),Zm=zc.flatbuffers.Long,aD=zc.flatbuffers.Builder,uD=zc.flatbuffers.ByteBuffer,Xm=rt(),eb=Se(),cD=Ze(),Hc=class{constructor(e,t=eb.MetadataVersion.V4,r,n){this.schema=e,this.version=t,r&&(this._recordBatches=r),n&&(this._dictionaryBatches=n)}static decode(e){e=new uD(cD.toUint8Array(e));let t=Zt.Footer.getRootAsFooter(e),r=Xm.Schema.decode(t.schema());return new tb(r,t)}static encode(e){let t=new aD,r=Xm.Schema.encode(t,e.schema);Zt.Footer.startRecordBatchesVector(t,e.numRecordBatches),[...e.recordBatches()].slice().reverse().forEach(c=>sr.encode(t,c));let n=t.endVector();Zt.Footer.startDictionariesVector(t,e.numDictionaries),[...e.dictionaryBatches()].slice().reverse().forEach(c=>sr.encode(t,c));let s=t.endVector();return Zt.Footer.startFooter(t),Zt.Footer.addSchema(t,r),Zt.Footer.addVersion(t,eb.MetadataVersion.V4),Zt.Footer.addRecordBatches(t,n),Zt.Footer.addDictionaries(t,s),Zt.Footer.finishFooterBuffer(t,Zt.Footer.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}*recordBatches(){for(let e,t=-1,r=this.numRecordBatches;++t<r;)(e=this.getRecordBatch(t))&&(yield e)}*dictionaryBatches(){for(let e,t=-1,r=this.numDictionaries;++t<r;)(e=this.getDictionaryBatch(t))&&(yield e)}getRecordBatch(e){return e>=0&&e<this.numRecordBatches&&this._recordBatches[e]||null}getDictionaryBatch(e){return e>=0&&e<this.numDictionaries&&this._dictionaryBatches[e]||null}};An.Footer=Hc;var tb=class extends Hc{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 sr.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){let t=this._footer.dictionaries(e);if(t)return sr.decode(t)}return null}},sr=class{constructor(e,t,r){this.metaDataLength=e,this.offset=typeof r=="number"?r:r.low,this.bodyLength=typeof t=="number"?t:t.low}static decode(e){return new sr(e.metaDataLength(),e.bodyLength(),e.offset())}static encode(e,t){let{metaDataLength:r}=t,n=new Zm(t.offset,0),s=new Zm(t.bodyLength,0);return Zt.Block.createBlock(e,n,r,s)}};An.FileBlock=sr});var lr=R(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.AsyncByteStream=cr.ByteStream=cr.AsyncByteQueue=void 0;var or=dt(),ar=_s(),ib=Rr(),As=cn(),Gc=Ze(),On=ft(),Kc=class extends As.AsyncQueue{write(e){if((e=Gc.toUint8Array(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?ib.decodeUtf8(this.toUint8Array(!0)):this.toUint8Array(!1).then(ib.decodeUtf8)}toUint8Array(e=!1){return e?Gc.joinUint8Arrays(this._values)[0]:(()=>or.__awaiter(this,void 0,void 0,function*(){var t,r;let n=[],s=0;try{for(var c=or.__asyncValues(this),_;_=yield c.next(),!_.done;){let v=_.value;n.push(v),s+=v.byteLength}}catch(v){t={error:v}}finally{try{_&&!_.done&&(r=c.return)&&(yield r.call(c))}finally{if(t)throw t.error}}return Gc.joinUint8Arrays(n,s)[0]}))()}};cr.AsyncByteQueue=Kc;var rb=class{constructor(e){e&&(this.source=new nb(ar.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)}};cr.ByteStream=rb;var pa=class{constructor(e){e instanceof pa?this.source=e.source:e instanceof Kc?this.source=new ur(ar.default.fromAsyncIterable(e)):On.isReadableNodeStream(e)?this.source=new ur(ar.default.fromNodeStream(e)):On.isReadableDOMStream(e)?this.source=new ur(ar.default.fromDOMStream(e)):On.isFetchResponse(e)?this.source=new ur(ar.default.fromDOMStream(e.body)):On.isIterable(e)?this.source=new ur(ar.default.fromIterable(e)):On.isPromise(e)?this.source=new ur(ar.default.fromAsyncIterable(e)):On.isAsyncIterable(e)&&(this.source=new ur(ar.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)}};cr.AsyncByteStream=pa;var nb=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)||As.ITERATOR_DONE)}return(e){return Object.create(this.source.return&&this.source.return(e)||As.ITERATOR_DONE)}},ur=class{constructor(e){this.source=e,this._closedPromise=new Promise(t=>this._closedPromiseResolve=t)}cancel(e){return or.__awaiter(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return or.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return or.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(e,t="read"){return or.__awaiter(this,void 0,void 0,function*(){return yield this.source.next({cmd:t,size:e})})}throw(e){return or.__awaiter(this,void 0,void 0,function*(){let t=this.source.throw&&(yield this.source.throw(e))||As.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return or.__awaiter(this,void 0,void 0,function*(){let t=this.source.return&&(yield this.source.return(e))||As.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}}});var $c=R(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.AsyncRandomAccessFile=Dn.RandomAccessFile=void 0;var dr=dt(),sb=lr(),lD=Ze(),ob=class extends sb.ByteStream{constructor(e,t){super();this.position=0,this.buffer=lD.toUint8Array(e),this.size=typeof t=="undefined"?this.buffer.byteLength:t}readInt32(e){let{buffer:t,byteOffset:r}=this.readAt(e,4);return new DataView(t,r).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e<this.size}read(e){let{buffer:t,size:r,position:n}=this;return t&&n<r?(typeof e!="number"&&(e=1/0),this.position=Math.min(r,n+Math.min(r-n,e)),t.subarray(n,this.position)):null}readAt(e,t){let r=this.buffer,n=Math.min(this.size,e+t);return r?r.subarray(e,n):new Uint8Array(t)}close(){this.buffer&&(this.buffer=null)}throw(e){return this.close(),{done:!0,value:e}}return(e){return this.close(),{done:!0,value:e}}};Dn.RandomAccessFile=ob;var ab=class extends sb.AsyncByteStream{constructor(e,t){super();this.position=0,this._handle=e,typeof t=="number"?this.size=t:this._pending=(()=>dr.__awaiter(this,void 0,void 0,function*(){this.size=(yield e.stat()).size,delete this._pending}))()}readInt32(e){return dr.__awaiter(this,void 0,void 0,function*(){let{buffer:t,byteOffset:r}=yield this.readAt(e,4);return new DataView(t,r).getInt32(0,!0)})}seek(e){return dr.__awaiter(this,void 0,void 0,function*(){return this._pending&&(yield this._pending),this.position=Math.min(e,this.size),e<this.size})}read(e){return dr.__awaiter(this,void 0,void 0,function*(){this._pending&&(yield this._pending);let{_handle:t,size:r,position:n}=this;if(t&&n<r){typeof e!="number"&&(e=1/0);let s=n,c=0,_=0,v=Math.min(r,s+Math.min(r-s,e)),B=new Uint8Array(Math.max(0,(this.position=v)-s));for(;(s+=_)<v&&(c+=_)<B.byteLength;)({bytesRead:_}=yield t.read(B,c,B.byteLength-c,s));return B}return null})}readAt(e,t){return dr.__awaiter(this,void 0,void 0,function*(){this._pending&&(yield this._pending);let{_handle:r,size:n}=this;if(r&&e+t<n){let s=Math.min(n,e+t),c=new Uint8Array(s-e);return(yield r.read(c,0,t,e)).buffer}return new Uint8Array(t)})}close(){return dr.__awaiter(this,void 0,void 0,function*(){let e=this._handle;this._handle=null,e&&(yield e.close())})}throw(e){return dr.__awaiter(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}return(e){return dr.__awaiter(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}};Dn.AsyncRandomAccessFile=ab});var Qc=R(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.Int128=hi.Int64=hi.Uint64=hi.BaseInt64=void 0;var dD=1<<16;function Fn(i){return i<0&&(i=4294967295+i+1),`0x${i.toString(16)}`}var En=8,Jc=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],ya=class{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){let t=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),r=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),n=t[3]*r[3];this.buffer[0]=n&65535;let s=n>>>16;return n=t[2]*r[3],s+=n,n=t[3]*r[2]>>>0,s+=n,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0<n?dD:0,this.buffer[1]+=s>>>16,this.buffer[1]+=t[1]*r[3]+t[2]*r[2]+t[3]*r[1],this.buffer[1]+=t[0]*r[3]+t[1]*r[2]+t[2]*r[1]+t[3]*r[0]<<16,this}_plus(e){let t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]<e.buffer[1]||this.buffer[1]===e.buffer[1]&&this.buffer[0]<e.buffer[0]}equals(e){return this.buffer[1]===e.buffer[1]&&this.buffer[0]==e.buffer[0]}greaterThan(e){return e.lessThan(this)}hex(){return`${Fn(this.buffer[1])} ${Fn(this.buffer[0])}`}};hi.BaseInt64=ya;var we=class extends ya{times(e){return this._times(e),this}plus(e){return this._plus(e),this}static from(e,t=new Uint32Array(2)){return we.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return we.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let r=e.length,n=new we(t);for(let s=0;s<r;){let c=En<r-s?En:r-s,_=new we(new Uint32Array([parseInt(e.substr(s,c),10),0])),v=new we(new Uint32Array([Jc[c],0]));n.times(v),n.plus(_),s+=c}return n}static convertArray(e){let t=new Uint32Array(e.length*2);for(let r=-1,n=e.length;++r<n;)we.from(e[r],new Uint32Array(t.buffer,t.byteOffset+2*r*4,2));return t}static multiply(e,t){return new we(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new we(new Uint32Array(e.buffer)).plus(t)}};hi.Uint64=we;var jt=class extends ya{negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[0]==0&&++this.buffer[1],this}times(e){return this._times(e),this}plus(e){return this._plus(e),this}lessThan(e){let t=this.buffer[1]<<0,r=e.buffer[1]<<0;return t<r||t===r&&this.buffer[0]<e.buffer[0]}static from(e,t=new Uint32Array(2)){return jt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return jt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let r=e.startsWith("-"),n=e.length,s=new jt(t);for(let c=r?1:0;c<n;){let _=En<n-c?En:n-c,v=new jt(new Uint32Array([parseInt(e.substr(c,_),10),0])),B=new jt(new Uint32Array([Jc[_],0]));s.times(B),s.plus(v),c+=_}return r?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*2);for(let r=-1,n=e.length;++r<n;)jt.from(e[r],new Uint32Array(t.buffer,t.byteOffset+2*r*4,2));return t}static multiply(e,t){return new jt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new jt(new Uint32Array(e.buffer)).plus(t)}};hi.Int64=jt;var Xt=class{constructor(e){this.buffer=e}high(){return new jt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new jt(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 we(new Uint32Array([this.buffer[3],0])),r=new we(new Uint32Array([this.buffer[2],0])),n=new we(new Uint32Array([this.buffer[1],0])),s=new we(new Uint32Array([this.buffer[0],0])),c=new we(new Uint32Array([e.buffer[3],0])),_=new we(new Uint32Array([e.buffer[2],0])),v=new we(new Uint32Array([e.buffer[1],0])),B=new we(new Uint32Array([e.buffer[0],0])),O=we.multiply(s,B);this.buffer[0]=O.low();let N=new we(new Uint32Array([O.high(),0]));return O=we.multiply(n,B),N.plus(O),O=we.multiply(s,v),N.plus(O),this.buffer[1]=N.low(),this.buffer[3]=N.lessThan(O)?1:0,this.buffer[2]=N.high(),new we(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(we.multiply(r,B)).plus(we.multiply(n,v)).plus(we.multiply(s,_)),this.buffer[3]+=we.multiply(t,B).plus(we.multiply(r,v)).plus(we.multiply(n,_)).plus(we.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`${Fn(this.buffer[3])} ${Fn(this.buffer[2])} ${Fn(this.buffer[1])} ${Fn(this.buffer[0])}`}static multiply(e,t){return new Xt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new Xt(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return Xt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return Xt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){let r=e.startsWith("-"),n=e.length,s=new Xt(t);for(let c=r?1:0;c<n;){let _=En<n-c?En:n-c,v=new Xt(new Uint32Array([parseInt(e.substr(c,_),10),0,0,0])),B=new Xt(new Uint32Array([Jc[_],0,0,0]));s.times(B),s.plus(v),c+=_}return r?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*4);for(let r=-1,n=e.length;++r<n;)Xt.from(e[r],new Uint32Array(t.buffer,t.byteOffset+4*4*r,4));return t}};hi.Int128=Xt});var db=R(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.JSONVectorLoader=Rn.VectorLoader=void 0;var et=Jt(),fD=rt(),Ui=ve(),hD=ut(),ub=ci(),pD=Rr(),_a=Qc(),cb=Se(),pi=Ze(),Zc=class extends hD.Visitor{constructor(e,t,r,n){super();this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=t,this.buffers=r,this.dictionaries=n}visit(e){return super.visit(e instanceof fD.Field?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return et.Data.Null(e,0,t)}visitBool(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Bool(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitInt(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Int(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitFloat(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Float(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitUtf8(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Utf8(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.readData(e))}visitBinary(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Binary(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.readData(e))}visitFixedSizeBinary(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.FixedSizeBinary(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitDate(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Date(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitTimestamp(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Timestamp(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitTime(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Time(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitDecimal(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Decimal(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitList(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.List(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.visit(e.children[0]))}visitStruct(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Struct(e,0,t,r,this.readNullBitmap(e,r),this.visitMany(e.children))}visitUnion(e){return e.mode===cb.UnionMode.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}visitDenseUnion(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Union(e,0,t,r,this.readNullBitmap(e,r),this.readTypeIds(e),this.readOffsets(e),this.visitMany(e.children))}visitSparseUnion(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Union(e,0,t,r,this.readNullBitmap(e,r),this.readTypeIds(e),this.visitMany(e.children))}visitDictionary(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Dictionary(e,0,t,r,this.readNullBitmap(e,r),this.readData(e.indices),this.readDictionary(e))}visitInterval(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Interval(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitFixedSizeList(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.FixedSizeList(e,0,t,r,this.readNullBitmap(e,r),this.visit(e.children[0]))}visitMap(e,{length:t,nullCount:r}=this.nextFieldNode()){return et.Data.Map(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.visit(e.children[0]))}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(e,t,r=this.nextBufferRange()){return t>0&&this.readData(e,r)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:r}=this.nextBufferRange()){return this.bytes.subarray(r,r+t)}readDictionary(e){return this.dictionaries.get(e.id)}};Rn.VectorLoader=Zc;var lb=class extends Zc{constructor(e,t,r,n){super(new Uint8Array(0),t,r,n);this.sources=e}readNullBitmap(e,t,{offset:r}=this.nextBufferRange()){return t<=0?new Uint8Array(0):ub.packBools(this.sources[r])}readOffsets(e,{offset:t}=this.nextBufferRange()){return pi.toArrayBufferView(Uint8Array,pi.toArrayBufferView(Int32Array,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return pi.toArrayBufferView(Uint8Array,pi.toArrayBufferView(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:r}=this;return Ui.DataType.isTimestamp(e)||(Ui.DataType.isInt(e)||Ui.DataType.isTime(e))&&e.bitWidth===64||Ui.DataType.isDate(e)&&e.unit===cb.DateUnit.MILLISECOND?pi.toArrayBufferView(Uint8Array,_a.Int64.convertArray(r[t])):Ui.DataType.isDecimal(e)?pi.toArrayBufferView(Uint8Array,_a.Int128.convertArray(r[t])):Ui.DataType.isBinary(e)||Ui.DataType.isFixedSizeBinary(e)?yD(r[t]):Ui.DataType.isBool(e)?ub.packBools(r[t]):Ui.DataType.isUtf8(e)?pD.encodeUtf8(r[t].join("")):pi.toArrayBufferView(Uint8Array,pi.toArrayBufferView(e.ArrayType,r[t].map(n=>+n)))}};Rn.JSONVectorLoader=lb;function yD(i){let e=i.join(""),t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2)t[r>>1]=parseInt(e.substr(r,2),16);return t}});var Os=R(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.StructRow=Un.MapRow=void 0;var fb=oc(),ct=Symbol.for("parent"),Cn=Symbol.for("rowIndex"),It=Symbol.for("keyToIdx"),Tt=Symbol.for("idxToVal"),Xc=Symbol.for("nodejs.util.inspect.custom"),yi=class{constructor(e,t){this[ct]=e,this.size=t}entries(){return this[Symbol.iterator]()}has(e){return this.get(e)!==void 0}get(e){let t;if(e!=null){let r=this[It]||(this[It]=new Map),n=r.get(e);if(n!==void 0){let s=this[Tt]||(this[Tt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}else if((n=this.getIndex(e))>-1){r.set(e,n);let s=this[Tt]||(this[Tt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}}return t}set(e,t){if(e!=null){let r=this[It]||(this[It]=new Map),n=r.get(e);if(n===void 0&&r.set(e,n=this.getIndex(e)),n>-1){let s=this[Tt]||(this[Tt]=new Array(this.size));s[n]=this.setValue(n,t)}}return this}clear(){throw new Error(`Clearing ${this[Symbol.toStringTag]} not supported.`)}delete(e){throw new Error(`Deleting ${this[Symbol.toStringTag]} values not supported.`)}*[Symbol.iterator](){let e=this.keys(),t=this.values(),r=this[It]||(this[It]=new Map),n=this[Tt]||(this[Tt]=new Array(this.size));for(let s,c,_=0,v,B;!((v=e.next()).done||(B=t.next()).done);++_)s=v.value,c=B.value,n[_]=c,r.has(s)||r.set(s,_),yield[s,c]}forEach(e,t){let r=this.keys(),n=this.values(),s=t===void 0?e:(v,B,O)=>e.call(t,v,B,O),c=this[It]||(this[It]=new Map),_=this[Tt]||(this[Tt]=new Array(this.size));for(let v,B,O=0,N,q;!((N=r.next()).done||(q=n.next()).done);++O)v=N.value,B=q.value,_[O]=B,c.has(v)||c.set(v,O),s(B,v,this)}toArray(){return[...this.values()]}toJSON(){let e={};return this.forEach((t,r)=>e[r]=t),e}inspect(){return this.toString()}[Xc](){return this.toString()}toString(){let e=[];return this.forEach((t,r)=>{r=fb.valueToString(r),t=fb.valueToString(t),e.push(`${r}: ${t}`)}),`{ ${e.join(", ")} }`}};yi[Symbol.toStringTag]=(i=>(Object.defineProperties(i,{size:{writable:!0,enumerable:!1,configurable:!1,value:0},[ct]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Cn]:{writable:!0,enumerable:!1,configurable:!1,value:-1}}),i[Symbol.toStringTag]="Row"))(yi.prototype);var hb=class extends yi{constructor(e){super(e,e.length);return _D(this)}keys(){return this[ct].getChildAt(0)[Symbol.iterator]()}values(){return this[ct].getChildAt(1)[Symbol.iterator]()}getKey(e){return this[ct].getChildAt(0).get(e)}getIndex(e){return this[ct].getChildAt(0).indexOf(e)}getValue(e){return this[ct].getChildAt(1).get(e)}setValue(e,t){this[ct].getChildAt(1).set(e,t)}};Un.MapRow=hb;var pb=class extends yi{constructor(e){super(e,e.type.children.length);return yb(this)}*keys(){for(let e of this[ct].type.children)yield e.name}*values(){for(let e of this[ct].type.children)yield this[e.name]}getKey(e){return this[ct].type.children[e].name}getIndex(e){return this[ct].type.children.findIndex(t=>t.name===e)}getValue(e){return this[ct].getChildAt(e).get(this[Cn])}setValue(e,t){return this[ct].getChildAt(e).set(this[Cn],t)}};Un.StructRow=pb;Object.setPrototypeOf(yi.prototype,Map.prototype);var yb=(()=>{let i={enumerable:!0,configurable:!1,get:null,set:null};return e=>{let t=-1,r=e[It]||(e[It]=new Map),n=c=>function(){return this.get(c)},s=c=>function(_){return this.set(c,_)};for(let c of e.keys())r.set(c,++t),i.get=n(c),i.set=s(c),Object.prototype.hasOwnProperty.call(e,c)||(i.enumerable=!0,Object.defineProperty(e,c,i)),Object.prototype.hasOwnProperty.call(e,t)||(i.enumerable=!1,Object.defineProperty(e,t,i));return i.get=i.set=null,e}})(),_D=(()=>{if(typeof Proxy=="undefined")return yb;let i=yi.prototype.has,e=yi.prototype.get,t=yi.prototype.set,r=yi.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 ct:case Cn:case Tt:case It:case Xc:return!0}return typeof c=="number"&&!s.has(c)&&(c=s.getKey(c)),s.has(c)},get(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 ct:case Cn:case Tt:case It:case Xc:return Reflect.get(s,c,_)}return typeof c=="number"&&!i.call(_,c)&&(c=r.call(_,c)),e.call(_,c)},set(s,c,_,v){switch(c){case ct:case Cn:case Tt:case It:return Reflect.set(s,c,_,v);case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:return!1}return typeof c=="number"&&!i.call(v,c)&&(c=r.call(v,c)),i.call(v,c)?!!t.call(v,c,_):!1}};return s=>new Proxy(s,n)})()});var Fs=R(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.createElementComparator=fr.clampRange=fr.clampIndex=void 0;var _b=qe(),mb=Os(),mD=Ze(),bb=ft();function bD(i,e,t){let r=i.length,n=e>-1?e:r+e%r;return t?t(i,n):n}fr.clampIndex=bD;var gb;function gD(i,e,t,r){let{length:n=0}=i,s=typeof e!="number"?0:e,c=typeof t!="number"?n:t;return s<0&&(s=(s%n+n)%n),c<0&&(c=(c%n+n)%n),c<s&&(gb=s,s=c,c=gb),c>n&&(c=n),r?r(i,s,c):[s,c]}fr.clampRange=gD;var vD=bb.BigIntAvailable?bb.BigInt(0):0,vb=i=>i!==i;function Ds(i){let e=typeof i;if(e!=="object"||i===null)return vb(i)?vb:e!=="bigint"?t=>t===i:t=>vD+t===i;if(i instanceof Date){let t=i.valueOf();return r=>r instanceof Date?r.valueOf()===t:!1}return ArrayBuffer.isView(i)?t=>t?mD.compareArrayLike(i,t):!1:i instanceof Map?jD(i):Array.isArray(i)?wD(i):i instanceof _b.Vector?ID(i):TD(i)}fr.createElementComparator=Ds;function wD(i){let e=[];for(let t=-1,r=i.length;++t<r;)e[t]=Ds(i[t]);return ma(e)}function jD(i){let e=-1,t=[];return i.forEach(r=>t[++e]=Ds(r)),ma(t)}function ID(i){let e=[];for(let t=-1,r=i.length;++t<r;)e[t]=Ds(i.get(t));return ma(e)}function TD(i){let e=Object.keys(i);if(e.length===0)return()=>!1;let t=[];for(let r=-1,n=e.length;++r<n;)t[r]=Ds(i[e[r]]);return ma(t,e)}function ma(i,e){return t=>{if(!t||typeof t!="object")return!1;switch(t.constructor){case Array:return BD(i,t);case Map:case mb.MapRow:case mb.StructRow:return wb(i,t,t.keys());case Object:case void 0:return wb(i,t,e||Object.keys(t))}return t instanceof _b.Vector?SD(i,t):!1}}function BD(i,e){let t=i.length;if(e.length!==t)return!1;for(let r=-1;++r<t;)if(!i[r](e[r]))return!1;return!0}function SD(i,e){let t=i.length;if(e.length!==t)return!1;for(let r=-1;++r<t;)if(!i[r](e.get(r)))return!1;return!0}function wb(i,e,t){let r=t[Symbol.iterator](),n=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),s=e instanceof Map?e.values():Object.values(e)[Symbol.iterator](),c=0,_=i.length,v=s.next(),B=r.next(),O=n.next();for(;c<_&&!B.done&&!O.done&&!v.done&&!(B.value!==O.value||!i[c](v.value));++c,B=r.next(),O=n.next(),v=s.next());return c===_&&B.done&&O.done&&v.done?!0:(r.return&&r.return(),n.return&&n.return(),s.return&&s.return(),!1)}});var Yr=R(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.selectColumnChildrenArgs=nt.selectVectorChildrenArgs=nt.selectChunkArgs=nt.selectFieldArgs=nt.selectColumnArgs=nt.selectArgs=nt.arrayTypeToDataType=nt.isTypedArray=void 0;var el=Jt(),jb=rt(),ki=Mn(),kn=qe(),Pt=ve(),AD=pr(),hr=Array.isArray;function tl(i){return ArrayBuffer.isView(i)&&"BYTES_PER_ELEMENT"in i}nt.isTypedArray=tl;function Ib(i){switch(i){case Int8Array:return Pt.Int8;case Int16Array:return Pt.Int16;case Int32Array:return Pt.Int32;case BigInt64Array:return Pt.Int64;case Uint8Array:return Pt.Uint8;case Uint16Array:return Pt.Uint16;case Uint32Array:return Pt.Uint32;case BigUint64Array:return Pt.Uint64;case Float32Array:return Pt.Float32;case Float64Array:return Pt.Float64;default:return null}}nt.arrayTypeToDataType=Ib;function OD(i){let e=Ib(i.constructor);if(!e)throw new TypeError("Unrecognized Array input");let t=new e,r=el.Data.new(t,0,i.length,0,[void 0,i]);return kn.Vector.new(r)}nt.selectArgs=(i,e)=>ba(i,e,[],0);nt.selectColumnArgs=i=>{let[e,t]=rl(i,[[],[]]);return t.map((r,n)=>r instanceof ki.Column?ki.Column.new(r.field.clone(e[n]),r):r instanceof kn.Vector?ki.Column.new(e[n],r):tl(r)?ki.Column.new(e[n],OD(r)):ki.Column.new(e[n],[]))};nt.selectFieldArgs=i=>rl(i,[[],[]]);nt.selectChunkArgs=(i,e)=>il(i,e,[],0);nt.selectVectorChildrenArgs=(i,e)=>Tb(i,e,[],0);nt.selectColumnChildrenArgs=(i,e)=>Bb(i,e,[],0);function ba(i,e,t,r){let n,s=r,c=-1,_=e.length;for(;++c<_;)hr(n=e[c])?s=ba(i,n,t,s).length:n instanceof i&&(t[s++]=n);return t}function il(i,e,t,r){let n,s=r,c=-1,_=e.length;for(;++c<_;)hr(n=e[c])?s=il(i,n,t,s).length:n instanceof AD.Chunked?s=il(i,n.chunks,t,s).length:n instanceof i&&(t[s++]=n);return t}function Tb(i,e,t,r){let n,s=r,c=-1,_=e.length;for(;++c<_;)hr(n=e[c])?s=Tb(i,n,t,s).length:n instanceof i?s=ba(kn.Vector,n.schema.fields.map((v,B)=>n.getChildAt(B)),t,s).length:n instanceof kn.Vector&&(t[s++]=n);return t}function Bb(i,e,t,r){let n,s=r,c=-1,_=e.length;for(;++c<_;)hr(n=e[c])?s=Bb(i,n,t,s).length:n instanceof i?s=ba(ki.Column,n.schema.fields.map((v,B)=>ki.Column.new(v,n.getChildAt(B))),t,s).length:n instanceof ki.Column&&(t[s++]=n);return t}var DD=(i,[e,t],r)=>(i[0][r]=e,i[1][r]=t,i);function rl(i,e){let t,r;switch(r=i.length){case 0:return e;case 1:if(t=e[0],!i[0])return e;if(hr(i[0]))return rl(i[0],e);i[0]instanceof el.Data||i[0]instanceof kn.Vector||tl(i[0])||i[0]instanceof Pt.DataType||([t,i]=Object.entries(i[0]).reduce(DD,e));break;default:hr(t=i[r-1])?i=hr(i[0])?i[0]:i.slice(0,r-1):(i=hr(i[0])?i[0]:i,t=[])}let n=-1,s=-1,c=-1,_=i.length,v,B,[O,N]=e;for(;++c<_;)B=i[c],B instanceof ki.Column&&(N[++s]=B)?O[++n]=B.field.clone(t[c],B.type,!0):({[c]:v=c}=t,B instanceof Pt.DataType&&(N[++s]=B)?O[++n]=jb.Field.new(v,B,!0):(B==null?void 0:B.type)&&(N[++s]=B)&&(B instanceof el.Data&&(N[s]=B=kn.Vector.new(B)),O[++n]=jb.Field.new(v,B.type,!0)));return e}});var pr=R(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.Chunked=void 0;var FD=Fs(),Sb=ve(),ED=Yr(),Ab=qe(),Ob=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}},Mi=class extends Ab.AbstractVector{constructor(e,t=[],r=RD(t)){super();this._nullCount=-1,this._type=e,this._chunks=t,this._chunkOffsets=r,this._length=r[r.length-1],this._numChildren=(this._type.children||[]).length}static flatten(...e){return ED.selectChunkArgs(Ab.Vector,e)}static concat(...e){let t=Mi.flatten(...e);return new Mi(t[0].type,t)}get type(){return this._type}get length(){return this._length}get chunks(){return this._chunks}get typeId(){return this._type.typeId}get VectorName(){return`Chunked<${this._type}>`}get data(){return this._chunks[0]?this._chunks[0].data:null}get ArrayType(){return this._type.ArrayType}get numChildren(){return this._numChildren}get stride(){return this._chunks[0]?this._chunks[0].stride:1}get byteLength(){return this._chunks.reduce((e,t)=>e+t.byteLength,0)}get nullCount(){let e=this._nullCount;return e<0&&(this._nullCount=e=this._chunks.reduce((t,{nullCount:r})=>t+r,0)),e}get indices(){if(Sb.DataType.isDictionary(this._type)){if(!this._indices){let e=this._chunks;this._indices=e.length===1?e[0].indices:Mi.concat(...e.map(t=>t.indices))}return this._indices}return null}get dictionary(){return Sb.DataType.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}[Symbol.iterator](){return new Ob(this._chunks)}clone(e=this._chunks){return new Mi(this._type,e)}concat(...e){return this.clone(Mi.flatten(this,...e))}slice(e,t){return FD.clampRange(this,e,t,this._sliceInternal)}getChildAt(e){if(e<0||e>=this._numChildren)return null;let t=this._children||(this._children=[]),r,n,s;return(r=t[e])?r:(n=(this._type.children||[])[e])&&(s=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),s.length>0)?t[e]=new Mi(n.type,s):null}search(e,t){let r=e,n=this._chunkOffsets,s=n.length-1;if(r<0||r>=n[s])return null;if(s<=1)return t?t(this,0,r):[0,r];let c=0,_=0,v=0;do{if(c+1===s)return t?t(this,c,r-_):[c,r-_];v=c+(s-c)/2|0,r>=n[v]?c=v:s=v}while(r<n[s]&&r>=(_=n[c]));return null}isValid(e){return!!this.search(e,this.isValidInternal)}get(e){return this.search(e,this.getInternal)}set(e,t){this.search(e,({chunks:r},n,s)=>r[n].set(s,t))}indexOf(e,t){return t&&typeof t=="number"?this.search(t,(r,n,s)=>this.indexOfInternal(r,n,s,e)):this.indexOfInternal(this,0,Math.max(0,t||0),e)}toArray(){let{chunks:e}=this,t=e.length,r=this._type.ArrayType;if(t<=0)return new r(0);if(t<=1)return e[0].toArray();let n=0,s=new Array(t);for(let v=-1;++v<t;)n+=(s[v]=e[v].toArray()).length;r!==s[0].constructor&&(r=s[0].constructor);let c=new r(n),_=r===Array?UD:CD;for(let v=-1,B=0;++v<t;)B=_(s[v],c,B);return c}getInternal({_chunks:e},t,r){return e[t].get(r)}isValidInternal({_chunks:e},t,r){return e[t].isValid(r)}indexOfInternal({_chunks:e},t,r,n){let s=t-1,c=e.length,_=r,v=0,B=-1;for(;++s<c;){if(~(B=e[s].indexOf(n,_)))return v+B;_=0,v+=e[s].length}return-1}_sliceInternal(e,t,r){let n=[],{chunks:s,_chunkOffsets:c}=e;for(let _=-1,v=s.length;++_<v;){let B=s[_],O=B.length,N=c[_];if(N>=r)break;if(t>=N+O)continue;if(N>=t&&N+O<=r){n.push(B);continue}let q=Math.max(0,t-N),J=Math.min(r-N,O);n.push(B.slice(q,J))}return e.clone(n)}};ga.Chunked=Mi;function RD(i){let e=new Uint32Array((i||[]).length+1),t=e[0]=0,r=e.length;for(let n=0;++n<r;)e[n]=t+=i[n-1].length;return e}var CD=(i,e,t)=>(e.set(i,t),t+i.length),UD=(i,e,t)=>{let r=t;for(let n=-1,s=i.length;++n<s;)e[r++]=i[n];return r}});var Mn=R(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.Column=void 0;var Db=rt(),Fb=qe(),nl=pr(),Gr=class extends nl.Chunked{constructor(e,t=[],r){t=nl.Chunked.flatten(...t);super(e.type,t,r);if(this._field=e,t.length===1&&!(this instanceof sl))return new sl(e,t[0],this._chunkOffsets)}static new(...e){let[t,r,...n]=e;typeof t!="string"&&!(t instanceof Db.Field)&&(r=t,t="");let s=nl.Chunked.flatten(Array.isArray(r)?[...r,...n]:r instanceof Fb.Vector?[r,...n]:[Fb.Vector.new(r,...n)]);if(typeof t=="string"){let c=s[0].data.type;t=new Db.Field(t,c,!0)}else!t.nullable&&s.some(({nullCount:c})=>c>0)&&(t=t.clone({nullable:!0}));return new Gr(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 Gr(this._field,e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t=this._children||(this._children=[]),r,n,s;return(r=t[e])?r:(n=(this.type.children||[])[e])&&(s=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),s.length>0)?t[e]=new Gr(n,s):null}};va.Column=Gr;var sl=class extends Gr{constructor(e,t,r){super(e,[t],r);this._chunk=t}search(e,t){return t?t(this,0,e):[0,e]}isValid(e){return this._chunk.isValid(e)}get(e){return this._chunk.get(e)}set(e,t){this._chunk.set(e,t)}indexOf(e,t){return this._chunk.indexOf(e,t)}}});var Eb=R(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.instance=Pn.TypeAssembler=void 0;var kD=Ai(),MD=kD.flatbuffers.Long,PD=ut(),K=Qi(),ol=class extends PD.Visitor{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return K.Null.startNull(t),K.Null.endNull(t)}visitInt(e,t){return K.Int.startInt(t),K.Int.addBitWidth(t,e.bitWidth),K.Int.addIsSigned(t,e.isSigned),K.Int.endInt(t)}visitFloat(e,t){return K.FloatingPoint.startFloatingPoint(t),K.FloatingPoint.addPrecision(t,e.precision),K.FloatingPoint.endFloatingPoint(t)}visitBinary(e,t){return K.Binary.startBinary(t),K.Binary.endBinary(t)}visitBool(e,t){return K.Bool.startBool(t),K.Bool.endBool(t)}visitUtf8(e,t){return K.Utf8.startUtf8(t),K.Utf8.endUtf8(t)}visitDecimal(e,t){return K.Decimal.startDecimal(t),K.Decimal.addScale(t,e.scale),K.Decimal.addPrecision(t,e.precision),K.Decimal.endDecimal(t)}visitDate(e,t){return K.Date.startDate(t),K.Date.addUnit(t,e.unit),K.Date.endDate(t)}visitTime(e,t){return K.Time.startTime(t),K.Time.addUnit(t,e.unit),K.Time.addBitWidth(t,e.bitWidth),K.Time.endTime(t)}visitTimestamp(e,t){let r=e.timezone&&t.createString(e.timezone)||void 0;return K.Timestamp.startTimestamp(t),K.Timestamp.addUnit(t,e.unit),r!==void 0&&K.Timestamp.addTimezone(t,r),K.Timestamp.endTimestamp(t)}visitInterval(e,t){return K.Interval.startInterval(t),K.Interval.addUnit(t,e.unit),K.Interval.endInterval(t)}visitList(e,t){return K.List.startList(t),K.List.endList(t)}visitStruct(e,t){return K.Struct_.startStruct_(t),K.Struct_.endStruct_(t)}visitUnion(e,t){K.Union.startTypeIdsVector(t,e.typeIds.length);let r=K.Union.createTypeIdsVector(t,e.typeIds);return K.Union.startUnion(t),K.Union.addMode(t,e.mode),K.Union.addTypeIds(t,r),K.Union.endUnion(t)}visitDictionary(e,t){let r=this.visit(e.indices,t);return K.DictionaryEncoding.startDictionaryEncoding(t),K.DictionaryEncoding.addId(t,new MD(e.id,0)),K.DictionaryEncoding.addIsOrdered(t,e.isOrdered),r!==void 0&&K.DictionaryEncoding.addIndexType(t,r),K.DictionaryEncoding.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return K.FixedSizeBinary.startFixedSizeBinary(t),K.FixedSizeBinary.addByteWidth(t,e.byteWidth),K.FixedSizeBinary.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return K.FixedSizeList.startFixedSizeList(t),K.FixedSizeList.addListSize(t,e.listSize),K.FixedSizeList.endFixedSizeList(t)}visitMap(e,t){return K.Map.startMap(t),K.Map.addKeysSorted(t,e.keysSorted),K.Map.endMap(t)}};Pn.TypeAssembler=ol;Pn.instance=new ol});var Vb=R(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.fieldFromJSON=_i.dictionaryBatchFromJSON=_i.recordBatchFromJSON=_i.schemaFromJSON=void 0;var Vn=rt(),Ee=ve(),Kr=$r(),Nn=Se();function VD(i,e=new Map){return new Vn.Schema(LD(i,e),wa(i.customMetadata),e)}_i.schemaFromJSON=VD;function Rb(i){return new Kr.RecordBatch(i.count,Ub(i.columns),kb(i.columns))}_i.recordBatchFromJSON=Rb;function ND(i){return new Kr.DictionaryBatch(Rb(i.data),i.id,i.isDelta)}_i.dictionaryBatchFromJSON=ND;function LD(i,e){return(i.fields||[]).filter(Boolean).map(t=>Vn.Field.fromJSON(t,e))}function Cb(i,e){return(i.children||[]).filter(Boolean).map(t=>Vn.Field.fromJSON(t,e))}function Ub(i){return(i||[]).reduce((e,t)=>[...e,new Kr.FieldNode(t.count,xD(t.VALIDITY)),...Ub(t.children)],[])}function kb(i,e=[]){for(let t=-1,r=(i||[]).length;++t<r;){let n=i[t];n.VALIDITY&&e.push(new Kr.BufferRegion(e.length,n.VALIDITY.length)),n.TYPE&&e.push(new Kr.BufferRegion(e.length,n.TYPE.length)),n.OFFSET&&e.push(new Kr.BufferRegion(e.length,n.OFFSET.length)),n.DATA&&e.push(new Kr.BufferRegion(e.length,n.DATA.length)),e=kb(n.children,e)}return e}function xD(i){return(i||[]).reduce((e,t)=>e+ +(t===0),0)}function qD(i,e){let t,r,n,s,c,_;return!e||!(s=i.dictionary)?(c=Pb(i,Cb(i,e)),n=new Vn.Field(i.name,c,i.nullable,wa(i.customMetadata))):e.has(t=s.id)?(r=(r=s.indexType)?Mb(r):new Ee.Int32,_=new Ee.Dictionary(e.get(t),r,t,s.isOrdered),n=new Vn.Field(i.name,_,i.nullable,wa(i.customMetadata))):(r=(r=s.indexType)?Mb(r):new Ee.Int32,e.set(t,c=Pb(i,Cb(i,e))),_=new Ee.Dictionary(c,r,t,s.isOrdered),n=new Vn.Field(i.name,_,i.nullable,wa(i.customMetadata))),n||null}_i.fieldFromJSON=qD;function wa(i){return new Map(Object.entries(i||{}))}function Mb(i){return new Ee.Int(i.isSigned,i.bitWidth)}function Pb(i,e){let t=i.type.name;switch(t){case"NONE":return new Ee.Null;case"null":return new Ee.Null;case"binary":return new Ee.Binary;case"utf8":return new Ee.Utf8;case"bool":return new Ee.Bool;case"list":return new Ee.List((e||[])[0]);case"struct":return new Ee.Struct(e||[]);case"struct_":return new Ee.Struct(e||[])}switch(t){case"int":{let r=i.type;return new Ee.Int(r.isSigned,r.bitWidth)}case"floatingpoint":{let r=i.type;return new Ee.Float(Nn.Precision[r.precision])}case"decimal":{let r=i.type;return new Ee.Decimal(r.scale,r.precision)}case"date":{let r=i.type;return new Ee.Date_(Nn.DateUnit[r.unit])}case"time":{let r=i.type;return new Ee.Time(Nn.TimeUnit[r.unit],r.bitWidth)}case"timestamp":{let r=i.type;return new Ee.Timestamp(Nn.TimeUnit[r.unit],r.timezone)}case"interval":{let r=i.type;return new Ee.Interval(Nn.IntervalUnit[r.unit])}case"union":{let r=i.type;return new Ee.Union(Nn.UnionMode[r.mode],r.typeIds||[],e||[])}case"fixedsizebinary":{let r=i.type;return new Ee.FixedSizeBinary(r.byteWidth)}case"fixedsizelist":{let r=i.type;return new Ee.FixedSizeList(r.listSize,(e||[])[0])}case"map":{let r=i.type;return new Ee.Map_((e||[])[0],r.keysSorted)}}throw new Error(`Unrecognized type: "${t}"`)}});var $r=R(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.FieldNode=Nt.BufferRegion=Nt.DictionaryBatch=Nt.RecordBatch=Nt.Message=void 0;var al=Ai(),Y=Qi(),Ue=Bo(),st=rt(),WD=Ze(),Ne=Se(),ul=Eb(),ja=Vb(),Jr=al.flatbuffers.Long,zD=al.flatbuffers.Builder,HD=al.flatbuffers.ByteBuffer,Re=ve(),yr=class{constructor(e,t,r,n){this._version=t,this._headerType=r,this.body=new Uint8Array(0),n&&(this._createHeader=()=>n),this._bodyLength=typeof e=="number"?e:e.low}static fromJSON(e,t){let r=new yr(0,Ne.MetadataVersion.V4,t);return r._createHeader=YD(e,t),r}static decode(e){e=new HD(WD.toUint8Array(e));let t=Ue.Message.getRootAsMessage(e),r=t.bodyLength(),n=t.version(),s=t.headerType(),c=new yr(r,n,s);return c._createHeader=GD(t,s),c}static encode(e){let t=new zD,r=-1;return e.isSchema()?r=st.Schema.encode(t,e.header()):e.isRecordBatch()?r=Vt.encode(t,e.header()):e.isDictionaryBatch()&&(r=mi.encode(t,e.header())),Ue.Message.startMessage(t),Ue.Message.addVersion(t,Ne.MetadataVersion.V4),Ue.Message.addHeader(t,r),Ue.Message.addHeaderType(t,e.headerType),Ue.Message.addBodyLength(t,new Jr(e.bodyLength,0)),Ue.Message.finishMessageBuffer(t,Ue.Message.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof st.Schema)return new yr(0,Ne.MetadataVersion.V4,Ne.MessageHeader.Schema,e);if(e instanceof Vt)return new yr(t,Ne.MetadataVersion.V4,Ne.MessageHeader.RecordBatch,e);if(e instanceof mi)return new yr(t,Ne.MetadataVersion.V4,Ne.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===Ne.MessageHeader.Schema}isRecordBatch(){return this.headerType===Ne.MessageHeader.RecordBatch}isDictionaryBatch(){return this.headerType===Ne.MessageHeader.DictionaryBatch}};Nt.Message=yr;var Vt=class{constructor(e,t,r){this._nodes=t,this._buffers=r,this._length=typeof e=="number"?e:e.low}get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}};Nt.RecordBatch=Vt;var mi=class{constructor(e,t,r=!1){this._data=e,this._isDelta=r,this._id=typeof t=="number"?t:t.low}get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}};Nt.DictionaryBatch=mi;var Qr=class{constructor(e,t){this.offset=typeof e=="number"?e:e.low,this.length=typeof t=="number"?t:t.low}};Nt.BufferRegion=Qr;var Zr=class{constructor(e,t){this.length=typeof e=="number"?e:e.low,this.nullCount=typeof t=="number"?t:t.low}};Nt.FieldNode=Zr;function YD(i,e){return()=>{switch(e){case Ne.MessageHeader.Schema:return st.Schema.fromJSON(i);case Ne.MessageHeader.RecordBatch:return Vt.fromJSON(i);case Ne.MessageHeader.DictionaryBatch:return mi.fromJSON(i)}throw new Error(`Unrecognized Message type: { name: ${Ne.MessageHeader[e]}, type: ${e} }`)}}function GD(i,e){return()=>{switch(e){case Ne.MessageHeader.Schema:return st.Schema.decode(i.header(new Y.Schema));case Ne.MessageHeader.RecordBatch:return Vt.decode(i.header(new Ue.RecordBatch),i.version());case Ne.MessageHeader.DictionaryBatch:return mi.decode(i.header(new Ue.DictionaryBatch),i.version())}throw new Error(`Unrecognized Message type: { name: ${Ne.MessageHeader[e]}, type: ${e} }`)}}st.Field.encode=nF;st.Field.decode=iF;st.Field.fromJSON=ja.fieldFromJSON;st.Schema.encode=rF;st.Schema.decode=KD;st.Schema.fromJSON=ja.schemaFromJSON;Vt.encode=sF;Vt.decode=$D;Vt.fromJSON=ja.recordBatchFromJSON;mi.encode=oF;mi.decode=JD;mi.fromJSON=ja.dictionaryBatchFromJSON;Zr.encode=aF;Zr.decode=ZD;Qr.encode=uF;Qr.decode=QD;function KD(i,e=new Map){let t=tF(i,e);return new st.Schema(t,Ia(i),e)}function $D(i,e=Ne.MetadataVersion.V4){return new Vt(i.length(),XD(i),eF(i,e))}function JD(i,e=Ne.MetadataVersion.V4){return new mi(Vt.decode(i.data(),e),i.id(),i.isDelta())}function QD(i){return new Qr(i.offset(),i.length())}function ZD(i){return new Zr(i.length(),i.nullCount())}function XD(i){let e=[];for(let t,r=-1,n=-1,s=i.nodesLength();++r<s;)(t=i.nodes(r))&&(e[++n]=Zr.decode(t));return e}function eF(i,e){let t=[];for(let r,n=-1,s=-1,c=i.buffersLength();++n<c;)(r=i.buffers(n))&&(e<Ne.MetadataVersion.V4&&(r.bb_pos+=8*(n+1)),t[++s]=Qr.decode(r));return t}function tF(i,e){let t=[];for(let r,n=-1,s=-1,c=i.fieldsLength();++n<c;)(r=i.fields(n))&&(t[++s]=st.Field.decode(r,e));return t}function Nb(i,e){let t=[];for(let r,n=-1,s=-1,c=i.childrenLength();++n<c;)(r=i.children(n))&&(t[++s]=st.Field.decode(r,e));return t}function iF(i,e){let t,r,n,s,c,_;return!e||!(_=i.dictionary())?(n=xb(i,Nb(i,e)),r=new st.Field(i.name(),n,i.nullable(),Ia(i))):e.has(t=_.id().low)?(s=(s=_.indexType())?Lb(s):new Re.Int32,c=new Re.Dictionary(e.get(t),s,t,_.isOrdered()),r=new st.Field(i.name(),c,i.nullable(),Ia(i))):(s=(s=_.indexType())?Lb(s):new Re.Int32,e.set(t,n=xb(i,Nb(i,e))),c=new Re.Dictionary(n,s,t,_.isOrdered()),r=new st.Field(i.name(),c,i.nullable(),Ia(i))),r||null}function Ia(i){let e=new Map;if(i)for(let t,r,n=-1,s=i.customMetadataLength()|0;++n<s;)(t=i.customMetadata(n))&&(r=t.key())!=null&&e.set(r,t.value());return e}function Lb(i){return new Re.Int(i.isSigned(),i.bitWidth())}function xb(i,e){let t=i.typeType();switch(t){case Y.Type.NONE:return new Re.Null;case Y.Type.Null:return new Re.Null;case Y.Type.Binary:return new Re.Binary;case Y.Type.Utf8:return new Re.Utf8;case Y.Type.Bool:return new Re.Bool;case Y.Type.List:return new Re.List((e||[])[0]);case Y.Type.Struct_:return new Re.Struct(e||[])}switch(t){case Y.Type.Int:{let r=i.type(new Y.Int);return new Re.Int(r.isSigned(),r.bitWidth())}case Y.Type.FloatingPoint:{let r=i.type(new Y.FloatingPoint);return new Re.Float(r.precision())}case Y.Type.Decimal:{let r=i.type(new Y.Decimal);return new Re.Decimal(r.scale(),r.precision())}case Y.Type.Date:{let r=i.type(new Y.Date);return new Re.Date_(r.unit())}case Y.Type.Time:{let r=i.type(new Y.Time);return new Re.Time(r.unit(),r.bitWidth())}case Y.Type.Timestamp:{let r=i.type(new Y.Timestamp);return new Re.Timestamp(r.unit(),r.timezone())}case Y.Type.Interval:{let r=i.type(new Y.Interval);return new Re.Interval(r.unit())}case Y.Type.Union:{let r=i.type(new Y.Union);return new Re.Union(r.mode(),r.typeIdsArray()||[],e||[])}case Y.Type.FixedSizeBinary:{let r=i.type(new Y.FixedSizeBinary);return new Re.FixedSizeBinary(r.byteWidth())}case Y.Type.FixedSizeList:{let r=i.type(new Y.FixedSizeList);return new Re.FixedSizeList(r.listSize(),(e||[])[0])}case Y.Type.Map:{let r=i.type(new Y.Map);return new Re.Map_((e||[])[0],r.keysSorted())}}throw new Error(`Unrecognized type: "${Y.Type[t]}" (${t})`)}function rF(i,e){let t=e.fields.map(s=>st.Field.encode(i,s));Y.Schema.startFieldsVector(i,t.length);let r=Y.Schema.createFieldsVector(i,t),n=e.metadata&&e.metadata.size>0?Y.Schema.createCustomMetadataVector(i,[...e.metadata].map(([s,c])=>{let _=i.createString(`${s}`),v=i.createString(`${c}`);return Y.KeyValue.startKeyValue(i),Y.KeyValue.addKey(i,_),Y.KeyValue.addValue(i,v),Y.KeyValue.endKeyValue(i)})):-1;return Y.Schema.startSchema(i),Y.Schema.addFields(i,r),Y.Schema.addEndianness(i,cF?Y.Endianness.Little:Y.Endianness.Big),n!==-1&&Y.Schema.addCustomMetadata(i,n),Y.Schema.endSchema(i)}function nF(i,e){let t=-1,r=-1,n=-1,s=e.type,c=e.typeId;Re.DataType.isDictionary(s)?(c=s.dictionary.typeId,n=ul.instance.visit(s,i),r=ul.instance.visit(s.dictionary,i)):r=ul.instance.visit(s,i);let _=(s.children||[]).map(O=>st.Field.encode(i,O)),v=Y.Field.createChildrenVector(i,_),B=e.metadata&&e.metadata.size>0?Y.Field.createCustomMetadataVector(i,[...e.metadata].map(([O,N])=>{let q=i.createString(`${O}`),J=i.createString(`${N}`);return Y.KeyValue.startKeyValue(i),Y.KeyValue.addKey(i,q),Y.KeyValue.addValue(i,J),Y.KeyValue.endKeyValue(i)})):-1;return e.name&&(t=i.createString(e.name)),Y.Field.startField(i),Y.Field.addType(i,r),Y.Field.addTypeType(i,c),Y.Field.addChildren(i,v),Y.Field.addNullable(i,!!e.nullable),t!==-1&&Y.Field.addName(i,t),n!==-1&&Y.Field.addDictionary(i,n),B!==-1&&Y.Field.addCustomMetadata(i,B),Y.Field.endField(i)}function sF(i,e){let t=e.nodes||[],r=e.buffers||[];Ue.RecordBatch.startNodesVector(i,t.length),t.slice().reverse().forEach(c=>Zr.encode(i,c));let n=i.endVector();Ue.RecordBatch.startBuffersVector(i,r.length),r.slice().reverse().forEach(c=>Qr.encode(i,c));let s=i.endVector();return Ue.RecordBatch.startRecordBatch(i),Ue.RecordBatch.addLength(i,new Jr(e.length,0)),Ue.RecordBatch.addNodes(i,n),Ue.RecordBatch.addBuffers(i,s),Ue.RecordBatch.endRecordBatch(i)}function oF(i,e){let t=Vt.encode(i,e.data);return Ue.DictionaryBatch.startDictionaryBatch(i),Ue.DictionaryBatch.addId(i,new Jr(e.id,0)),Ue.DictionaryBatch.addIsDelta(i,e.isDelta),Ue.DictionaryBatch.addData(i,t),Ue.DictionaryBatch.endDictionaryBatch(i)}function aF(i,e){return Ue.FieldNode.createFieldNode(i,new Jr(e.length,0),new Jr(e.nullCount,0))}function uF(i,e){return Y.Buffer.createBuffer(i,new Jr(e.offset,0),new Jr(e.length,0))}var cF=function(){let i=new ArrayBuffer(2);return new DataView(i).setInt16(0,256,!0),new Int16Array(i)[0]===256}()});var Ba=R(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.magicX2AndPadding=ye.magicAndPadding=ye.magicLength=ye.checkForMagicArrowString=ye.MAGIC=ye.MAGIC_STR=ye.PADDING=ye.JSONMessageReader=ye.AsyncMessageReader=ye.MessageReader=void 0;var _r=dt(),mr=Se(),lF=Ai(),qb=lF.flatbuffers.ByteBuffer,Es=$r(),dF=ft(),fF=$c(),Wb=Ze(),Ta=lr(),ei=cn(),cl=i=>`Expected ${mr.MessageHeader[i]} Message in stream, but was null or length 0.`,ll=i=>`Header pointer of flatbuffer-encoded ${mr.MessageHeader[i]} Message is null or length 0.`,zb=(i,e)=>`Expected to read ${i} metadata bytes, but only read ${e}.`,Hb=(i,e)=>`Expected to read ${i} bytes for message body, but only read ${e}.`,dl=class{constructor(e){this.source=e instanceof Ta.ByteStream?e:new Ta.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?ei.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(cl(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=Wb.toUint8Array(this.source.read(e));if(t.byteLength<e)throw new Error(Hb(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){let t=mr.MessageHeader.Schema,r=this.readMessage(t),n=r==null?void 0:r.header();if(e&&!n)throw new Error(ll(t));return n}readMetadataLength(){let e=this.source.read(ye.PADDING),t=e&&new qb(e),r=(t==null?void 0:t.readInt32(0))||0;return{done:r===0,value:r}}readMetadata(e){let t=this.source.read(e);if(!t)return ei.ITERATOR_DONE;if(t.byteLength<e)throw new Error(zb(e,t.byteLength));return{done:!1,value:Es.Message.decode(t)}}};ye.MessageReader=dl;var Yb=class{constructor(e,t){this.source=e instanceof Ta.AsyncByteStream?e:dF.isFileHandle(e)?new fF.AsyncRandomAccessFile(e,t):new Ta.AsyncByteStream(e)}[Symbol.asyncIterator](){return this}next(){return _r.__awaiter(this,void 0,void 0,function*(){let e;return(e=yield this.readMetadataLength()).done||e.value===-1&&(e=yield this.readMetadataLength()).done||(e=yield this.readMetadata(e.value)).done?ei.ITERATOR_DONE:e})}throw(e){return _r.__awaiter(this,void 0,void 0,function*(){return yield this.source.throw(e)})}return(e){return _r.__awaiter(this,void 0,void 0,function*(){return yield this.source.return(e)})}readMessage(e){return _r.__awaiter(this,void 0,void 0,function*(){let t;if((t=yield this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(cl(e));return t.value})}readMessageBody(e){return _r.__awaiter(this,void 0,void 0,function*(){if(e<=0)return new Uint8Array(0);let t=Wb.toUint8Array(yield this.source.read(e));if(t.byteLength<e)throw new Error(Hb(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()})}readSchema(e=!1){return _r.__awaiter(this,void 0,void 0,function*(){let t=mr.MessageHeader.Schema,r=yield this.readMessage(t),n=r==null?void 0:r.header();if(e&&!n)throw new Error(ll(t));return n})}readMetadataLength(){return _r.__awaiter(this,void 0,void 0,function*(){let e=yield this.source.read(ye.PADDING),t=e&&new qb(e),r=(t==null?void 0:t.readInt32(0))||0;return{done:r===0,value:r}})}readMetadata(e){return _r.__awaiter(this,void 0,void 0,function*(){let t=yield this.source.read(e);if(!t)return ei.ITERATOR_DONE;if(t.byteLength<e)throw new Error(zb(e,t.byteLength));return{done:!1,value:Es.Message.decode(t)}})}};ye.AsyncMessageReader=Yb;var Gb=class extends dl{constructor(e){super(new Uint8Array(0));this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof ei.ArrowJSON?e:new ei.ArrowJSON(e)}next(){let{_json:e}=this;if(!this._schema){this._schema=!0;let t=Es.Message.fromJSON(e.schema,mr.MessageHeader.Schema);return{done:!1,value:t}}if(this._dictionaryIndex<e.dictionaries.length){let t=e.dictionaries[this._dictionaryIndex++];this._body=t.data.columns;let r=Es.Message.fromJSON(t,mr.MessageHeader.DictionaryBatch);return{done:!1,value:r}}if(this._batchIndex<e.batches.length){let t=e.batches[this._batchIndex++];this._body=t.columns;let r=Es.Message.fromJSON(t,mr.MessageHeader.RecordBatch);return{done:!1,value:r}}return this._body=[],ei.ITERATOR_DONE}readMessageBody(e){return t(this._body);function t(r){return(r||[]).reduce((n,s)=>[...n,...s.VALIDITY&&[s.VALIDITY]||[],...s.TYPE&&[s.TYPE]||[],...s.OFFSET&&[s.OFFSET]||[],...s.DATA&&[s.DATA]||[],...t(s.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(cl(e));return t.value}readSchema(){let e=mr.MessageHeader.Schema,t=this.readMessage(e),r=t==null?void 0:t.header();if(!t||!r)throw new Error(ll(e));return r}};ye.JSONMessageReader=Gb;ye.PADDING=4;ye.MAGIC_STR="ARROW1";ye.MAGIC=new Uint8Array(ye.MAGIC_STR.length);for(let i=0;i<ye.MAGIC_STR.length;i+=1|0)ye.MAGIC[i]=ye.MAGIC_STR.charCodeAt(i);function hF(i,e=0){for(let t=-1,r=ye.MAGIC.length;++t<r;)if(ye.MAGIC[t]!==i[e+t])return!1;return!0}ye.checkForMagicArrowString=hF;ye.magicLength=ye.MAGIC.length;ye.magicAndPadding=ye.magicLength+ye.PADDING;ye.magicX2AndPadding=ye.magicLength*2+ye.PADDING});var yl=R(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.compareTypes=Le.compareFields=Le.compareSchemas=Le.instance=Le.TypeComparator=void 0;var pF=ut(),Q=class extends pF.Visitor{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((r,n)=>this.compareFields(r,t[n]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}};Le.TypeComparator=Q;function wt(i,e){return e instanceof i.constructor}function Rs(i,e){return i===e||wt(i,e)}function Pi(i,e){return i===e||wt(i,e)&&i.bitWidth===e.bitWidth&&i.isSigned===e.isSigned}function Sa(i,e){return i===e||wt(i,e)&&i.precision===e.precision}function yF(i,e){return i===e||wt(i,e)&&i.byteWidth===e.byteWidth}function fl(i,e){return i===e||wt(i,e)&&i.unit===e.unit}function Cs(i,e){return i===e||wt(i,e)&&i.unit===e.unit&&i.timezone===e.timezone}function Us(i,e){return i===e||wt(i,e)&&i.unit===e.unit&&i.bitWidth===e.bitWidth}function _F(i,e){return i===e||wt(i,e)&&i.children.length===e.children.length&&Le.instance.compareManyFields(i.children,e.children)}function mF(i,e){return i===e||wt(i,e)&&i.children.length===e.children.length&&Le.instance.compareManyFields(i.children,e.children)}function hl(i,e){return i===e||wt(i,e)&&i.mode===e.mode&&i.typeIds.every((t,r)=>t===e.typeIds[r])&&Le.instance.compareManyFields(i.children,e.children)}function bF(i,e){return i===e||wt(i,e)&&i.id===e.id&&i.isOrdered===e.isOrdered&&Le.instance.visit(i.indices,e.indices)&&Le.instance.visit(i.dictionary,e.dictionary)}function pl(i,e){return i===e||wt(i,e)&&i.unit===e.unit}function gF(i,e){return i===e||wt(i,e)&&i.listSize===e.listSize&&i.children.length===e.children.length&&Le.instance.compareManyFields(i.children,e.children)}function vF(i,e){return i===e||wt(i,e)&&i.keysSorted===e.keysSorted&&i.children.length===e.children.length&&Le.instance.compareManyFields(i.children,e.children)}Q.prototype.visitNull=Rs;Q.prototype.visitBool=Rs;Q.prototype.visitInt=Pi;Q.prototype.visitInt8=Pi;Q.prototype.visitInt16=Pi;Q.prototype.visitInt32=Pi;Q.prototype.visitInt64=Pi;Q.prototype.visitUint8=Pi;Q.prototype.visitUint16=Pi;Q.prototype.visitUint32=Pi;Q.prototype.visitUint64=Pi;Q.prototype.visitFloat=Sa;Q.prototype.visitFloat16=Sa;Q.prototype.visitFloat32=Sa;Q.prototype.visitFloat64=Sa;Q.prototype.visitUtf8=Rs;Q.prototype.visitBinary=Rs;Q.prototype.visitFixedSizeBinary=yF;Q.prototype.visitDate=fl;Q.prototype.visitDateDay=fl;Q.prototype.visitDateMillisecond=fl;Q.prototype.visitTimestamp=Cs;Q.prototype.visitTimestampSecond=Cs;Q.prototype.visitTimestampMillisecond=Cs;Q.prototype.visitTimestampMicrosecond=Cs;Q.prototype.visitTimestampNanosecond=Cs;Q.prototype.visitTime=Us;Q.prototype.visitTimeSecond=Us;Q.prototype.visitTimeMillisecond=Us;Q.prototype.visitTimeMicrosecond=Us;Q.prototype.visitTimeNanosecond=Us;Q.prototype.visitDecimal=Rs;Q.prototype.visitList=_F;Q.prototype.visitStruct=mF;Q.prototype.visitUnion=hl;Q.prototype.visitDenseUnion=hl;Q.prototype.visitSparseUnion=hl;Q.prototype.visitDictionary=bF;Q.prototype.visitInterval=pl;Q.prototype.visitIntervalDayTime=pl;Q.prototype.visitIntervalYearMonth=pl;Q.prototype.visitFixedSizeList=gF;Q.prototype.visitMap=vF;Le.instance=new Q;function wF(i,e){return Le.instance.compareSchemas(i,e)}Le.compareSchemas=wF;function jF(i,e){return Le.instance.compareFields(i,e)}Le.compareFields=jF;function IF(i,e){return Le.instance.visit(i,e)}Le.compareTypes=IF});var Zb=R(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.VectorAssembler=void 0;var TF=ut(),Kb=Se(),BF=Vi(),_l=Ze(),ml=ci(),SF=Yr(),$b=$r(),Jb=ve(),Je=class extends TF.Visitor{constructor(){super();this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(...e){let t=new Je,r=SF.selectVectorChildrenArgs(BF.RecordBatch,e),[n=t]=t.visitMany(r);return n}visit(e){if(!Jb.DataType.isDictionary(e.type)){let{data:t,length:r,nullCount:n}=e;if(r>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");Jb.DataType.isNull(e.type)||ti.call(this,n<=0?new Uint8Array(0):ml.truncateBitmap(t.offset,r,t.nullBitmap)),this.nodes.push(new $b.FieldNode(r,n))}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.indices)}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}};Aa.VectorAssembler=Je;function ti(i){let e=i.byteLength+7&~7;return this.buffers.push(i),this.bufferRegions.push(new $b.BufferRegion(this._byteLength,e)),this._byteLength+=e,this}function AF(i){let{type:e,length:t,typeIds:r,valueOffsets:n}=i;if(ti.call(this,r),e.mode===Kb.UnionMode.Sparse)return gl.call(this,i);if(e.mode===Kb.UnionMode.Dense){if(i.offset<=0)return ti.call(this,n),gl.call(this,i);{let s=r.reduce((O,N)=>Math.max(O,N),r[0]),c=new Int32Array(s+1),_=new Int32Array(s+1).fill(-1),v=new Int32Array(t),B=_l.rebaseValueOffsets(-n[0],t,n);for(let O,N,q=-1;++q<t;)(N=_[O=r[q]])===-1&&(N=_[O]=B[O]),v[q]=B[q]-N,++c[O];ti.call(this,v);for(let O,N=-1,q=e.children.length;++N<q;)if(O=i.getChildAt(N)){let J=e.typeIds[N],ke=Math.min(t,c[J]);this.visit(O.slice(_[J],ke))}}}return this}function OF(i){let e;return i.nullCount>=i.length?ti.call(this,new Uint8Array(0)):(e=i.values)instanceof Uint8Array?ti.call(this,ml.truncateBitmap(i.offset,i.length,e)):ti.call(this,ml.packBools(i))}function br(i){return ti.call(this,i.values.subarray(0,i.length*i.stride))}function Qb(i){let{length:e,values:t,valueOffsets:r}=i,n=r[0],s=r[e],c=Math.min(s-n,t.byteLength-n);return ti.call(this,_l.rebaseValueOffsets(-r[0],e,r)),ti.call(this,t.subarray(n,n+c)),this}function bl(i){let{length:e,valueOffsets:t}=i;return t&&ti.call(this,_l.rebaseValueOffsets(t[0],e,t)),this.visit(i.getChildAt(0))}function gl(i){return this.visitMany(i.type.children.map((e,t)=>i.getChildAt(t)).filter(Boolean))[0]}Je.prototype.visitBool=OF;Je.prototype.visitInt=br;Je.prototype.visitFloat=br;Je.prototype.visitUtf8=Qb;Je.prototype.visitBinary=Qb;Je.prototype.visitFixedSizeBinary=br;Je.prototype.visitDate=br;Je.prototype.visitTimestamp=br;Je.prototype.visitTime=br;Je.prototype.visitDecimal=br;Je.prototype.visitList=bl;Je.prototype.visitStruct=gl;Je.prototype.visitUnion=AF;Je.prototype.visitInterval=br;Je.prototype.visitFixedSizeList=bl;Je.prototype.visitMap=bl});var eg=R(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.JSONTypeAssembler=void 0;var DF=ut(),lt=Qi(),Ln=Se(),Xb=class extends DF.Visitor{visit(e){return e==null?void 0:super.visit(e)}visitNull({typeId:e}){return{name:lt.Type[e].toLowerCase()}}visitInt({typeId:e,bitWidth:t,isSigned:r}){return{name:lt.Type[e].toLowerCase(),bitWidth:t,isSigned:r}}visitFloat({typeId:e,precision:t}){return{name:lt.Type[e].toLowerCase(),precision:Ln.Precision[t]}}visitBinary({typeId:e}){return{name:lt.Type[e].toLowerCase()}}visitBool({typeId:e}){return{name:lt.Type[e].toLowerCase()}}visitUtf8({typeId:e}){return{name:lt.Type[e].toLowerCase()}}visitDecimal({typeId:e,scale:t,precision:r}){return{name:lt.Type[e].toLowerCase(),scale:t,precision:r}}visitDate({typeId:e,unit:t}){return{name:lt.Type[e].toLowerCase(),unit:Ln.DateUnit[t]}}visitTime({typeId:e,unit:t,bitWidth:r}){return{name:lt.Type[e].toLowerCase(),unit:Ln.TimeUnit[t],bitWidth:r}}visitTimestamp({typeId:e,timezone:t,unit:r}){return{name:lt.Type[e].toLowerCase(),unit:Ln.TimeUnit[r],timezone:t}}visitInterval({typeId:e,unit:t}){return{name:lt.Type[e].toLowerCase(),unit:Ln.IntervalUnit[t]}}visitList({typeId:e}){return{name:lt.Type[e].toLowerCase()}}visitStruct({typeId:e}){return{name:lt.Type[e].toLowerCase()}}visitUnion({typeId:e,mode:t,typeIds:r}){return{name:lt.Type[e].toLowerCase(),mode:Ln.UnionMode[t],typeIds:[...r]}}visitDictionary(e){return this.visit(e.dictionary)}visitFixedSizeBinary({typeId:e,byteWidth:t}){return{name:lt.Type[e].toLowerCase(),byteWidth:t}}visitFixedSizeList({typeId:e,listSize:t}){return{name:lt.Type[e].toLowerCase(),listSize:t}}visitMap({typeId:e,keysSorted:t}){return{name:lt.Type[e].toLowerCase(),keysSorted:t}}};Oa.JSONTypeAssembler=Xb});var rg=R(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.JSONVectorAssembler=void 0;var FF=js(),ks=Mn(),EF=qe(),RF=ut(),CF=Se(),UF=Vi(),vl=Se(),Da=ci(),kF=Yr(),tg=ve(),Fa=class extends RF.Visitor{static assemble(...e){return new Fa().visitMany(kF.selectColumnChildrenArgs(UF.RecordBatch,e))}visit(e){let{data:t,name:r,length:n}=e,{offset:s,nullCount:c,nullBitmap:_}=t,v=tg.DataType.isDictionary(e.type)?e.type.indices:e.type,B=Object.assign([],t.buffers,{[CF.BufferType.VALIDITY]:void 0});return Object.assign({name:r,count:n,VALIDITY:tg.DataType.isNull(v)?void 0:c<=0?Array.from({length:n},()=>1):[...new Da.BitIterator(_,s,n,null,Da.getBit)]},super.visit(EF.Vector.new(t.clone(v,s,n,0,B))))}visitNull(){return{}}visitBool({values:e,offset:t,length:r}){return{DATA:[...new Da.BitIterator(e,t,r,null,Da.getBool)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[...Ms(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...e],OFFSET:[...e.valueOffsets]}}visitBinary(e){return{DATA:[...ig(e)],OFFSET:[...e.valueOffsets]}}visitFixedSizeBinary(e){return{DATA:[...ig(e)]}}visitDate(e){return{DATA:e.type.unit===vl.DateUnit.DAY?[...e.values]:[...Ms(e.values,2)]}}visitTimestamp(e){return{DATA:[...Ms(e.values,2)]}}visitTime(e){return{DATA:e.type.unit<vl.TimeUnit.MICROSECOND?[...e.values]:[...Ms(e.values,2)]}}visitDecimal(e){return{DATA:[...Ms(e.values,4)]}}visitList(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,r)=>this.visit(new ks.Column(t,[e.getChildAt(r)])))}}visitStruct(e){return{children:e.type.children.map((t,r)=>this.visit(new ks.Column(t,[e.getChildAt(r)])))}}visitUnion(e){return{TYPE:[...e.typeIds],OFFSET:e.type.mode===vl.UnionMode.Dense?[...e.valueOffsets]:void 0,children:e.type.children.map((t,r)=>this.visit(new ks.Column(t,[e.getChildAt(r)])))}}visitInterval(e){return{DATA:[...e.values]}}visitFixedSizeList(e){return{children:e.type.children.map((t,r)=>this.visit(new ks.Column(t,[e.getChildAt(r)])))}}visitMap(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,r)=>this.visit(new ks.Column(t,[e.getChildAt(r)])))}}};Ea.JSONVectorAssembler=Fa;function*ig(i){for(let e of i)yield e.reduce((t,r)=>`${t}${("0"+(r&255).toString(16)).slice(-2)}`,"").toUpperCase()}function*Ms(i,e){for(let t=-1,r=i.length/e;++t<r;)yield`${FF.BN.new(i.subarray((t+0)*e,(t+1)*e),!1)}`}});var Ma=R(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.RecordBatchJSONWriter=gi.RecordBatchFileWriter=gi.RecordBatchStreamWriter=gi.RecordBatchWriter=void 0;var ng=dt(),wl=Vs(),MF=Ba(),PF=Mn(),VF=ve(),NF=rt(),Ra=$r(),jl=$r(),xn=Yc(),Il=Se(),sg=yl(),Tl=lr(),og=Zb(),LF=eg(),ag=rg(),xF=Ze(),Bl=Vi(),qF=cn(),bi=ft(),Ps=class extends qF.ReadableInterop{constructor(e){super();this._position=0,this._started=!1,this._sink=new Tl.AsyncByteQueue,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,bi.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 bi.isPromise(e)?e.then(t=>this.writeAll(t)):bi.isAsyncIterable(e)?Al(this,e):Sl(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 Tl.AsyncByteQueue?this._sink=e:(this._sink=new Tl.AsyncByteQueue,e&&bi.isWritableDOMStream(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&bi.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||!sg.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 wl.Table&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof Bl.RecordBatch&&!(t=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(t&&!sg.compareSchemas(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof Bl.RecordBatch?e instanceof Bl._InternalEmptyPlaceholderRecordBatch||this._writeRecordBatch(e):e instanceof wl.Table?this.writeAll(e.chunks):bi.isIterable(e)&&this.writeAll(e)}_writeMessage(e,t=8){let r=t-1,n=Ra.Message.encode(e),s=n.byteLength,c=this._writeLegacyIpcFormat?4:8,_=s+c+r&~r,v=_-s-c;return e.headerType===Il.MessageHeader.RecordBatch?this._recordBatchBlocks.push(new xn.FileBlock(_,e.bodyLength,this._position)):e.headerType===Il.MessageHeader.DictionaryBatch&&this._dictionaryBlocks.push(new xn.FileBlock(_,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(_-c)),s>0&&this._write(n),this._writePadding(v)}_write(e){if(this._started){let t=xF.toUint8Array(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(Ra.Message.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(MF.MAGIC)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:r,bufferRegions:n,buffers:s}=og.VectorAssembler.assemble(e),c=new jl.RecordBatch(e.length,r,n),_=Ra.Message.from(c,t);return this._writeDictionaries(e)._writeMessage(_)._writeBodyBuffers(s)}_writeDictionaryBatch(e,t,r=!1){this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));let{byteLength:n,nodes:s,bufferRegions:c,buffers:_}=og.VectorAssembler.assemble(e),v=new jl.RecordBatch(e.length,s,c),B=new jl.DictionaryBatch(v,t,r),O=Ra.Message.from(B,n);return this._writeMessage(O)._writeBodyBuffers(_)}_writeBodyBuffers(e){let t,r,n;for(let s=-1,c=e.length;++s<c;)(t=e[s])&&(r=t.byteLength)>0&&(this._write(t),(n=(r+7&~7)-r)>0&&this._writePadding(n));return this}_writeDictionaries(e){for(let[t,r]of e.dictionaries){let n=this._dictionaryDeltaOffsets.get(t)||0;if(n===0||(r=r.slice(n)).length>0){let s="chunks"in r?r.chunks:[r];for(let c of s)this._writeDictionaryBatch(c,t,n>0),n+=c.length}}return this}};gi.RecordBatchWriter=Ps;var Ca=class extends Ps{static writeAll(e,t){let r=new Ca(t);return bi.isPromise(e)?e.then(n=>r.writeAll(n)):bi.isAsyncIterable(e)?Al(r,e):Sl(r,e)}};gi.RecordBatchStreamWriter=Ca;var Ua=class extends Ps{static writeAll(e){let t=new Ua;return bi.isPromise(e)?e.then(r=>t.writeAll(r)):bi.isAsyncIterable(e)?Al(t,e):Sl(t,e)}constructor(){super();this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){let t=xn.Footer.encode(new xn.Footer(e,Il.MetadataVersion.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};gi.RecordBatchFileWriter=Ua;var ka=class extends Ps{constructor(){super();this._autoDestroy=!0,this._recordBatches=[],this._dictionaries=[]}static writeAll(e){return new ka().writeAll(e)}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write(`{
8
+ "schema": ${JSON.stringify({fields:e.fields.map(ug)},null,2)}`)}_writeDictionaries(e){return e.dictionaries.size>0&&this._dictionaries.push(e),this}_writeDictionaryBatch(e,t,r=!1){return this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0)),this._write(this._dictionaryBlocks.length===0?" ":`,
9
+ `),this._write(`${WF(e,t,r)}`),this._dictionaryBlocks.push(new xn.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(`${KF(this._recordBatches[e])}`),this._recordBatchBlocks.push(new qn.FileBlock(0,0,0));this._write(`
15
+ `),this._write(`${zF(this._recordBatches[e])}`),this._recordBatchBlocks.push(new xn.FileBlock(0,0,0));this._write(`
16
16
  ]`)}return this._schema&&this._write(`
17
- }`),this._dictionaries=[],this._recordBatches=[],super.close()}};wi.RecordBatchJSONWriter=Ma;function Ol(i,e){let t=e;e instanceof Il.Table&&(t=e.chunks,i.reset(void 0,e.schema));for(let r of t)i.write(r);return i.finish()}function Dl(i,e){var t,r,n,s;return ug.__awaiter(this,void 0,void 0,function*(){try{for(t=ug.__asyncValues(e);r=yield t.next(),!r.done;){let c=r.value;i.write(c)}}catch(c){n={error:c}}finally{try{r&&!r.done&&(s=t.return)&&(yield s.call(t))}finally{if(n)throw n.error}}return i.finish()})}function fg({name:i,type:e,nullable:t}){let r=new zF.JSONTypeAssembler;return{name:i,nullable:t,type:r.visit(e),children:(e.children||[]).map(fg),dictionary:qF.DataType.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:r.visit(e.indices)}:void 0}}function GF(i,e,t=!1){let r=new WF.Field(`${e}`,i.type,i.nullCount>0),n=dg.JSONVectorAssembler.assemble(new xF.Column(r,[i]));return JSON.stringify({id:e,isDelta:t,data:{count:i.length,columns:n}},null,2)}function KF(i){return JSON.stringify({count:i.length,columns:dg.JSONVectorAssembler.assemble(i)},null,2)}});var Rl=R(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.distributeVectorsIntoRecordBatches=vr.distributeColumnsIntoRecordBatches=vr.ensureSameLengthData=void 0;var hg=Jt(),Fl=rt(),$F=yr(),JF=Ni(),El=new Uint8Array(0),pg=i=>[El,El,new Uint8Array(i),El];function QF(i,e,t=e.reduce((r,n)=>Math.max(r,n.length),0)){let r,n,s=-1,c=e.length,_=[...i.fields],v=[],B=(t+63&~63)>>3;for(;++s<c;)(r=e[s])&&r.length===t?v[s]=r:((n=_[s]).nullable||(_[s]=_[s].clone({nullable:!0})),v[s]=r?r._changeLengthAndBackfillNullBitmap(t):hg.Data.new(n.type,0,t,t,pg(B)));return[new Fl.Schema(_),t,v]}vr.ensureSameLengthData=QF;function ZF(i){return yg(new Fl.Schema(i.map(({field:e})=>e)),i)}vr.distributeColumnsIntoRecordBatches=ZF;function yg(i,e){return XF(i,e.map(t=>t instanceof $F.Chunked?t.chunks.map(r=>r.data):[t.data]))}vr.distributeVectorsIntoRecordBatches=yg;function XF(i,e){let t=[...i.fields],r=[],n={numBatches:e.reduce((N,q)=>Math.max(N,q.length),0)},s=0,c=0,_=-1,v=e.length,B,O=[];for(;n.numBatches-- >0;){for(c=Number.POSITIVE_INFINITY,_=-1;++_<v;)O[_]=B=e[_].shift(),c=Math.min(c,B?B.length:c);isFinite(c)&&(O=eE(t,c,O,e,n),c>0&&(r[s++]=[c,O.slice()]))}return[i=new Fl.Schema(t,i.metadata),r.map(N=>new JF.RecordBatch(i,...N))]}function eE(i,e,t,r,n){let s,c,_=0,v=-1,B=r.length,O=(e+63&~63)>>3;for(;++v<B;)(s=t[v])&&(_=s.length)>=e?_===e?t[v]=s:(t[v]=s.slice(0,e),s=s.slice(e,_-e),n.numBatches=Math.max(n.numBatches,r[v].unshift(s))):((c=i[v]).nullable||(i[v]=c.clone({nullable:!0})),t[v]=s?s._changeLengthAndBackfillNullBitmap(e):hg.Data.new(c.type,0,e,e,pg(O)));return t}});var ze=R(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.BaseVector=void 0;var tE=Se(),iE=yr(),rE=Es(),Cl=qe(),Ul=class extends Cl.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`${tE.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 Cl.Vector.new(e,t)}concat(...e){return iE.Chunked.concat(this,...e)}slice(e,t){return rE.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]=Cl.Vector.new(this.data.childData[e]))}toJSON(){return[...this]}_sliceInternal(e,t,r){return e.clone(e.data.slice(t,r-t),null)}_bindDataAccessors(e){}};Va.BaseVector=Ul;Ul.prototype[Symbol.isConcatSpreadable]=!0});var kl=R(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.BinaryVector=void 0;var nE=qe(),sE=ze(),oE=ve(),_g=class extends sE.BaseVector{asUtf8(){return nE.Vector.new(this.data.clone(new oE.Utf8))}};Na.BinaryVector=_g});var Ml=R(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.BoolVector=void 0;var aE=ve(),uE=ze(),cE=ji(),mg=class extends uE.BaseVector{static from(e){return cE.vectorFromValuesWithType(()=>new aE.Bool,e)}};La.BoolVector=mg});var Vl=R(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.DateMillisecondVector=wr.DateDayVector=wr.DateVector=void 0;var lE=Se(),dE=ze(),bg=ji(),Pl=ve(),xa=class extends dE.BaseVector{static from(...e){return e.length===2?bg.vectorFromValuesWithType(()=>e[1]===lE.DateUnit.DAY?new Pl.DateDay:new Pl.DateMillisecond,e[0]):bg.vectorFromValuesWithType(()=>new Pl.DateMillisecond,e[0])}};wr.DateVector=xa;var gg=class extends xa{};wr.DateDayVector=gg;var vg=class extends xa{};wr.DateMillisecondVector=vg});var Nl=R(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.DecimalVector=void 0;var fE=ze(),wg=class extends fE.BaseVector{};qa.DecimalVector=wg});var za=R(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});Wa.DictionaryVector=void 0;var hE=Jt(),jg=qe(),pE=ze(),yE=ji(),_E=ve(),Ll=class extends pE.BaseVector{constructor(e){super(e);this.indices=jg.Vector.new(e.clone(this.type.indices))}static from(...e){if(e.length===3){let[t,r,n]=e,s=new _E.Dictionary(t.type,r,null,null);return jg.Vector.new(hE.Data.Dictionary(s,0,n.length,0,null,n,t))}return yE.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)}};Wa.DictionaryVector=Ll;Ll.prototype.indices=null});var xl=R(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});Ha.FixedSizeBinaryVector=void 0;var mE=ze(),Ig=class extends mE.BaseVector{};Ha.FixedSizeBinaryVector=Ig});var ql=R(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.FixedSizeListVector=void 0;var bE=ze(),Tg=class extends bE.BaseVector{};Ya.FixedSizeListVector=Tg});var Yl=R(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.Float64Vector=Ii.Float32Vector=Ii.Float16Vector=Ii.FloatVector=void 0;var gE=Jt(),vE=qe(),wE=ze(),jE=ji(),en=ve(),Ls=class extends wE.BaseVector{static from(e){let t=BE(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){let r=TE(e.constructor)||t;if(t===null&&(t=r),t&&t===r){let n=new t,s=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!IE(t,e.constructor))return vE.Vector.new(gE.Data.Float(n,0,s,0,null,e))}}if(t)return jE.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")}};Ii.FloatVector=Ls;var Wl=class extends Ls{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}};Ii.Float16Vector=Wl;var zl=class extends Ls{};Ii.Float32Vector=zl;var Hl=class extends Ls{};Ii.Float64Vector=Hl;var IE=(i,e)=>i===en.Float16&&e!==Uint16Array,TE=i=>{switch(i){case Uint16Array:return en.Float16;case Float32Array:return en.Float32;case Float64Array:return en.Float64;default:return null}},BE=i=>{switch(i){case Wl:return en.Float16;case zl:return en.Float32;case Hl:return en.Float64;default:return null}}});var Gl=R(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.IntervalYearMonthVector=jr.IntervalDayTimeVector=jr.IntervalVector=void 0;var SE=ze(),Ga=class extends SE.BaseVector{};jr.IntervalVector=Ga;var Bg=class extends Ga{};jr.IntervalDayTimeVector=Bg;var Sg=class extends Ga{};jr.IntervalYearMonthVector=Sg});var Ka=R(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.Uint64Vector=Qe.Uint32Vector=Qe.Uint16Vector=Qe.Uint8Vector=Qe.Int64Vector=Qe.Int32Vector=Qe.Int16Vector=Qe.Int8Vector=Qe.IntVector=void 0;var AE=Jt(),OE=qe(),DE=ze(),FE=ji(),Ag=ft(),Og=Ze(),xe=ve(),Ti=class extends DE.BaseVector{static from(...e){let[t,r=!1]=e,n=CE(this,r);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let s=RE(t.constructor,r)||n;if(n===null&&(n=s),n&&n===s){let c=new n,_=t.byteLength/c.ArrayType.BYTES_PER_ELEMENT;return EE(n,t.constructor)&&(_*=.5),OE.Vector.new(AE.Data.Int(c,0,_,0,null,t))}}if(n)return FE.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")}};Qe.IntVector=Ti;var Kl=class extends Ti{};Qe.Int8Vector=Kl;var $l=class extends Ti{};Qe.Int16Vector=$l;var Jl=class extends Ti{};Qe.Int32Vector=Jl;var Ql=class extends Ti{toBigInt64Array(){return Og.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}};Qe.Int64Vector=Ql;var Zl=class extends Ti{};Qe.Uint8Vector=Zl;var Xl=class extends Ti{};Qe.Uint16Vector=Xl;var ed=class extends Ti{};Qe.Uint32Vector=ed;var td=class extends Ti{toBigUint64Array(){return Og.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}};Qe.Uint64Vector=td;var EE=(i,e)=>(i===xe.Int64||i===xe.Uint64)&&(e===Int32Array||e===Uint32Array),RE=(i,e)=>{switch(i){case Int8Array:return xe.Int8;case Int16Array:return xe.Int16;case Int32Array:return e?xe.Int64:xe.Int32;case Ag.BigInt64Array:return xe.Int64;case Uint8Array:return xe.Uint8;case Uint16Array:return xe.Uint16;case Uint32Array:return e?xe.Uint64:xe.Uint32;case Ag.BigUint64Array:return xe.Uint64;default:return null}},CE=(i,e)=>{switch(i){case Kl:return xe.Int8;case $l:return xe.Int16;case Jl:return e?xe.Int64:xe.Int32;case Ql:return xe.Int64;case Zl:return xe.Uint8;case Xl:return xe.Uint16;case ed:return e?xe.Uint64:xe.Uint32;case td:return xe.Uint64;default:return null}}});var id=R($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});$a.ListVector=void 0;var UE=ze(),Dg=class extends UE.BaseVector{};$a.ListVector=Dg});var rd=R(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.MapVector=void 0;var kE=Ds(),ME=qe(),PE=ze(),VE=ve(),Fg=class extends PE.BaseVector{asList(){let e=this.type.children[0];return ME.Vector.new(this.data.clone(new VE.List(e)))}bind(e){let t=this.getChildAt(0),{[e]:r,[e+1]:n}=this.valueOffsets;return new kE.MapRow(t.slice(r,n))}};Ja.MapVector=Fg});var nd=R(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.NullVector=void 0;var NE=ze(),Eg=class extends NE.BaseVector{};Qa.NullVector=Eg});var sd=R(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.StructVector=void 0;var LE=Ds(),xE=ze(),qE=Symbol.for("rowIndex"),Rg=class extends xE.BaseVector{bind(e){let t=this._row||(this._row=new LE.StructRow(this)),r=Object.create(t);return r[qE]=e,r}};Za.StructVector=Rg});var od=R(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.TimestampNanosecondVector=Nt.TimestampMicrosecondVector=Nt.TimestampMillisecondVector=Nt.TimestampSecondVector=Nt.TimestampVector=void 0;var WE=ze(),Wn=class extends WE.BaseVector{};Nt.TimestampVector=Wn;var Cg=class extends Wn{};Nt.TimestampSecondVector=Cg;var Ug=class extends Wn{};Nt.TimestampMillisecondVector=Ug;var kg=class extends Wn{};Nt.TimestampMicrosecondVector=kg;var Mg=class extends Wn{};Nt.TimestampNanosecondVector=Mg});var ad=R(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.TimeNanosecondVector=Lt.TimeMicrosecondVector=Lt.TimeMillisecondVector=Lt.TimeSecondVector=Lt.TimeVector=void 0;var zE=ze(),zn=class extends zE.BaseVector{};Lt.TimeVector=zn;var Pg=class extends zn{};Lt.TimeSecondVector=Pg;var Vg=class extends zn{};Lt.TimeMillisecondVector=Vg;var Ng=class extends zn{};Lt.TimeMicrosecondVector=Ng;var Lg=class extends zn{};Lt.TimeNanosecondVector=Lg});var ud=R(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.SparseUnionVector=Ir.DenseUnionVector=Ir.UnionVector=void 0;var HE=ze(),Xa=class extends HE.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}};Ir.UnionVector=Xa;var xg=class extends Xa{get valueOffsets(){return this.data.valueOffsets}};Ir.DenseUnionVector=xg;var qg=class extends Xa{};Ir.SparseUnionVector=qg});var cd=R(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.Utf8Vector=void 0;var YE=qe(),GE=ze(),Wg=ve(),KE=ji(),zg=class extends GE.BaseVector{static from(e){return KE.vectorFromValuesWithType(()=>new Wg.Utf8,e)}asBinary(){return YE.Vector.new(this.data.clone(new Wg.Binary))}};eu.Utf8Vector=zg});var Hg=R(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.partial2=Tr.partial1=Tr.partial0=void 0;function $E(i){return function(){return i(this)}}Tr.partial0=$E;function JE(i){return function(e){return i(this,e)}}Tr.partial1=JE;function QE(i){return function(e,t){return i(this,e,t)}}Tr.partial2=QE});var fd=R(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.instance=Hn.GetVisitor=void 0;var tu=Is(),ZE=ut(),XE=Cr(),eR=gs(),xt=Se(),Z=class extends ZE.Visitor{};Hn.GetVisitor=Z;var tR=(i,e)=>864e5*i[e],ld=(i,e)=>4294967296*i[e+1]+(i[e]>>>0),iR=(i,e)=>4294967296*(i[e+1]/1e3)+(i[e]>>>0)/1e3,rR=(i,e)=>4294967296*(i[e+1]/1e6)+(i[e]>>>0)/1e6,Yg=i=>new Date(i),nR=(i,e)=>Yg(tR(i,e)),sR=(i,e)=>Yg(ld(i,e)),oR=(i,e)=>null,Gg=(i,e,t)=>{let{[t]:r,[t+1]:n}=e;return r!=null&&n!=null?i.subarray(r,n):null},aR=({offset:i,values:e},t)=>{let r=i+t;return(e[r>>3]&1<<r%8)!=0},Kg=({values:i},e)=>nR(i,e),$g=({values:i},e)=>sR(i,e*2),Bi=({stride:i,values:e},t)=>e[i*t],Jg=({stride:i,values:e},t)=>eR.uint16ToFloat64(e[i*t]),dd=({stride:i,values:e,type:t},r)=>tu.BN.new(e.subarray(i*r,i*(r+1)),t.isSigned),uR=({stride:i,values:e},t)=>e.subarray(i*t,i*(t+1)),cR=({values:i,valueOffsets:e},t)=>Gg(i,e,t),lR=({values:i,valueOffsets:e},t)=>{let r=Gg(i,e,t);return r!==null?XE.decodeUtf8(r):null},dR=(i,e)=>i.type.bitWidth<64?Bi(i,e):dd(i,e),fR=(i,e)=>i.type.precision!==xt.Precision.HALF?Bi(i,e):Jg(i,e),hR=(i,e)=>i.type.unit===xt.DateUnit.DAY?Kg(i,e):$g(i,e),Qg=({values:i},e)=>1e3*ld(i,e*2),Zg=({values:i},e)=>ld(i,e*2),Xg=({values:i},e)=>iR(i,e*2),ev=({values:i},e)=>rR(i,e*2),pR=(i,e)=>{switch(i.type.unit){case xt.TimeUnit.SECOND:return Qg(i,e);case xt.TimeUnit.MILLISECOND:return Zg(i,e);case xt.TimeUnit.MICROSECOND:return Xg(i,e);case xt.TimeUnit.NANOSECOND:return ev(i,e)}},tv=({values:i,stride:e},t)=>i[e*t],iv=({values:i,stride:e},t)=>i[e*t],rv=({values:i},e)=>tu.BN.signed(i.subarray(2*e,2*(e+1))),nv=({values:i},e)=>tu.BN.signed(i.subarray(2*e,2*(e+1))),yR=(i,e)=>{switch(i.type.unit){case xt.TimeUnit.SECOND:return tv(i,e);case xt.TimeUnit.MILLISECOND:return iv(i,e);case xt.TimeUnit.MICROSECOND:return rv(i,e);case xt.TimeUnit.NANOSECOND:return nv(i,e)}},_R=({values:i},e)=>tu.BN.decimal(i.subarray(4*e,4*(e+1))),mR=(i,e)=>{let t=i.getChildAt(0),{valueOffsets:r,stride:n}=i;return t.slice(r[e*n],r[e*n+1])},bR=(i,e)=>i.bind(e),gR=(i,e)=>i.bind(e),vR=(i,e)=>i.type.mode===xt.UnionMode.Dense?sv(i,e):ov(i,e),sv=(i,e)=>{let t=i.typeIdToChildIndex[i.typeIds[e]],r=i.getChildAt(t);return r?r.get(i.valueOffsets[e]):null},ov=(i,e)=>{let t=i.typeIdToChildIndex[i.typeIds[e]],r=i.getChildAt(t);return r?r.get(e):null},wR=(i,e)=>i.getValue(i.getKey(e)),jR=(i,e)=>i.type.unit===xt.IntervalUnit.DAY_TIME?av(i,e):uv(i,e),av=({values:i},e)=>i.subarray(2*e,2*(e+1)),uv=({values:i},e)=>{let t=i[e],r=new Int32Array(2);return r[0]=t/12|0,r[1]=t%12|0,r},IR=(i,e)=>{let t=i.getChildAt(0),{stride:r}=i;return t.slice(e*r,(e+1)*r)};Z.prototype.visitNull=oR;Z.prototype.visitBool=aR;Z.prototype.visitInt=dR;Z.prototype.visitInt8=Bi;Z.prototype.visitInt16=Bi;Z.prototype.visitInt32=Bi;Z.prototype.visitInt64=dd;Z.prototype.visitUint8=Bi;Z.prototype.visitUint16=Bi;Z.prototype.visitUint32=Bi;Z.prototype.visitUint64=dd;Z.prototype.visitFloat=fR;Z.prototype.visitFloat16=Jg;Z.prototype.visitFloat32=Bi;Z.prototype.visitFloat64=Bi;Z.prototype.visitUtf8=lR;Z.prototype.visitBinary=cR;Z.prototype.visitFixedSizeBinary=uR;Z.prototype.visitDate=hR;Z.prototype.visitDateDay=Kg;Z.prototype.visitDateMillisecond=$g;Z.prototype.visitTimestamp=pR;Z.prototype.visitTimestampSecond=Qg;Z.prototype.visitTimestampMillisecond=Zg;Z.prototype.visitTimestampMicrosecond=Xg;Z.prototype.visitTimestampNanosecond=ev;Z.prototype.visitTime=yR;Z.prototype.visitTimeSecond=tv;Z.prototype.visitTimeMillisecond=iv;Z.prototype.visitTimeMicrosecond=rv;Z.prototype.visitTimeNanosecond=nv;Z.prototype.visitDecimal=_R;Z.prototype.visitList=mR;Z.prototype.visitStruct=gR;Z.prototype.visitUnion=vR;Z.prototype.visitDenseUnion=sv;Z.prototype.visitSparseUnion=ov;Z.prototype.visitDictionary=wR;Z.prototype.visitInterval=jR;Z.prototype.visitIntervalDayTime=av;Z.prototype.visitIntervalYearMonth=uv;Z.prototype.visitFixedSizeList=IR;Z.prototype.visitMap=bR;Hn.instance=new Z});var fv=R(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.instance=Yn.IndexOfVisitor=void 0;var TR=ut(),cv=di(),lv=Es(),X=class extends TR.Visitor{};Yn.IndexOfVisitor=X;function BR(i,e){return e===null&&i.length>0?0:-1}function SR(i,e){let{nullBitmap:t}=i.data;if(!t||i.nullCount<=0)return-1;let r=0;for(let n of new cv.BitIterator(t,i.data.offset+(e||0),i.length,t,cv.getBool)){if(!n)return r;++r}return-1}function de(i,e,t){if(e===void 0)return-1;if(e===null)return SR(i,t);let r=lv.createElementComparator(e);for(let n=(t||0)-1,s=i.length;++n<s;)if(r(i.get(n)))return n;return-1}function dv(i,e,t){let r=lv.createElementComparator(e);for(let n=(t||0)-1,s=i.length;++n<s;)if(r(i.get(n)))return n;return-1}X.prototype.visitNull=BR;X.prototype.visitBool=de;X.prototype.visitInt=de;X.prototype.visitInt8=de;X.prototype.visitInt16=de;X.prototype.visitInt32=de;X.prototype.visitInt64=de;X.prototype.visitUint8=de;X.prototype.visitUint16=de;X.prototype.visitUint32=de;X.prototype.visitUint64=de;X.prototype.visitFloat=de;X.prototype.visitFloat16=de;X.prototype.visitFloat32=de;X.prototype.visitFloat64=de;X.prototype.visitUtf8=de;X.prototype.visitBinary=de;X.prototype.visitFixedSizeBinary=de;X.prototype.visitDate=de;X.prototype.visitDateDay=de;X.prototype.visitDateMillisecond=de;X.prototype.visitTimestamp=de;X.prototype.visitTimestampSecond=de;X.prototype.visitTimestampMillisecond=de;X.prototype.visitTimestampMicrosecond=de;X.prototype.visitTimestampNanosecond=de;X.prototype.visitTime=de;X.prototype.visitTimeSecond=de;X.prototype.visitTimeMillisecond=de;X.prototype.visitTimeMicrosecond=de;X.prototype.visitTimeNanosecond=de;X.prototype.visitDecimal=de;X.prototype.visitList=de;X.prototype.visitStruct=de;X.prototype.visitUnion=de;X.prototype.visitDenseUnion=dv;X.prototype.visitSparseUnion=dv;X.prototype.visitDictionary=de;X.prototype.visitInterval=de;X.prototype.visitIntervalDayTime=de;X.prototype.visitIntervalYearMonth=de;X.prototype.visitFixedSizeList=de;X.prototype.visitMap=de;Yn.instance=new X});var hd=R(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.instance=Gn.IteratorVisitor=void 0;var iu=Se(),AR=ut(),OR=di(),hv=fd(),ee=class extends AR.Visitor{};Gn.IteratorVisitor=ee;function DR(i){let e=hv.instance.getVisitFn(i);return new OR.BitIterator(i.data.nullBitmap,i.data.offset,i.length,i,(t,r,n,s)=>(n&1<<s)!=0?e(t,r):null)}var pv=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 ue(i){if(i.nullCount>0)return DR(i);let{type:e,typeId:t,length:r}=i;return i.stride===1&&(t===iu.Type.Timestamp||t===iu.Type.Int&&e.bitWidth!==64||t===iu.Type.Time&&e.bitWidth!==64||t===iu.Type.Float&&e.precision>0)?i.data.values.subarray(0,r)[Symbol.iterator]():new pv(i,hv.instance.getVisitFn(i))}ee.prototype.visitNull=ue;ee.prototype.visitBool=ue;ee.prototype.visitInt=ue;ee.prototype.visitInt8=ue;ee.prototype.visitInt16=ue;ee.prototype.visitInt32=ue;ee.prototype.visitInt64=ue;ee.prototype.visitUint8=ue;ee.prototype.visitUint16=ue;ee.prototype.visitUint32=ue;ee.prototype.visitUint64=ue;ee.prototype.visitFloat=ue;ee.prototype.visitFloat16=ue;ee.prototype.visitFloat32=ue;ee.prototype.visitFloat64=ue;ee.prototype.visitUtf8=ue;ee.prototype.visitBinary=ue;ee.prototype.visitFixedSizeBinary=ue;ee.prototype.visitDate=ue;ee.prototype.visitDateDay=ue;ee.prototype.visitDateMillisecond=ue;ee.prototype.visitTimestamp=ue;ee.prototype.visitTimestampSecond=ue;ee.prototype.visitTimestampMillisecond=ue;ee.prototype.visitTimestampMicrosecond=ue;ee.prototype.visitTimestampNanosecond=ue;ee.prototype.visitTime=ue;ee.prototype.visitTimeSecond=ue;ee.prototype.visitTimeMillisecond=ue;ee.prototype.visitTimeMicrosecond=ue;ee.prototype.visitTimeNanosecond=ue;ee.prototype.visitDecimal=ue;ee.prototype.visitList=ue;ee.prototype.visitStruct=ue;ee.prototype.visitUnion=ue;ee.prototype.visitDenseUnion=ue;ee.prototype.visitSparseUnion=ue;ee.prototype.visitDictionary=ue;ee.prototype.visitInterval=ue;ee.prototype.visitIntervalDayTime=ue;ee.prototype.visitIntervalYearMonth=ue;ee.prototype.visitFixedSizeList=ue;ee.prototype.visitMap=ue;Gn.instance=new ee});var yv=R(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.instance=Kn.ToArrayVisitor=void 0;var xs=Se(),FR=ut(),ER=hd(),te=class extends FR.Visitor{};Kn.ToArrayVisitor=te;function ce(i){let{type:e,length:t,stride:r}=i;switch(e.typeId){case xs.Type.Int:case xs.Type.Float:case xs.Type.Decimal:case xs.Type.Time:case xs.Type.Timestamp:return i.data.values.subarray(0,t*r)}return[...ER.instance.visit(i)]}te.prototype.visitNull=ce;te.prototype.visitBool=ce;te.prototype.visitInt=ce;te.prototype.visitInt8=ce;te.prototype.visitInt16=ce;te.prototype.visitInt32=ce;te.prototype.visitInt64=ce;te.prototype.visitUint8=ce;te.prototype.visitUint16=ce;te.prototype.visitUint32=ce;te.prototype.visitUint64=ce;te.prototype.visitFloat=ce;te.prototype.visitFloat16=ce;te.prototype.visitFloat32=ce;te.prototype.visitFloat64=ce;te.prototype.visitUtf8=ce;te.prototype.visitBinary=ce;te.prototype.visitFixedSizeBinary=ce;te.prototype.visitDate=ce;te.prototype.visitDateDay=ce;te.prototype.visitDateMillisecond=ce;te.prototype.visitTimestamp=ce;te.prototype.visitTimestampSecond=ce;te.prototype.visitTimestampMillisecond=ce;te.prototype.visitTimestampMicrosecond=ce;te.prototype.visitTimestampNanosecond=ce;te.prototype.visitTime=ce;te.prototype.visitTimeSecond=ce;te.prototype.visitTimeMillisecond=ce;te.prototype.visitTimeMicrosecond=ce;te.prototype.visitTimeNanosecond=ce;te.prototype.visitDecimal=ce;te.prototype.visitList=ce;te.prototype.visitStruct=ce;te.prototype.visitUnion=ce;te.prototype.visitDenseUnion=ce;te.prototype.visitSparseUnion=ce;te.prototype.visitDictionary=ce;te.prototype.visitInterval=ce;te.prototype.visitIntervalDayTime=ce;te.prototype.visitIntervalYearMonth=ce;te.prototype.visitFixedSizeList=ce;te.prototype.visitMap=ce;Kn.instance=new te});var _v=R($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.instance=$n.ByteWidthVisitor=void 0;var RR=ut(),CR=Se(),qs=(i,e)=>i+e,pd=i=>`Cannot compute the byte width of variable-width column ${i}`,yd=class extends RR.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(pd(e))}visitUtf8(e){throw new Error(pd(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===CR.TimeUnit.SECOND?4:8}visitInterval(e){return(e.unit+1)*4}visitList(e){throw new Error(pd(e))}visitStruct(e){return this.visitFields(e.children).reduce(qs,0)}visitUnion(e){return this.visitFields(e.children).reduce(qs,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(qs,0)}visitMap(e){return this.visitFields(e.children).reduce(qs,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(qs,0)}};$n.ByteWidthVisitor=yd;$n.instance=new yd});var mv=R(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.instance=Jn.GetVectorConstructor=void 0;var UR=ut(),kR=kl(),MR=Ml(),_d=Vl(),PR=Nl(),VR=za(),NR=xl(),LR=ql(),ru=Yl(),md=Gl(),Li=Ka(),xR=id(),qR=rd(),WR=nd(),zR=sd(),Ws=od(),zs=ad(),bd=ud(),HR=cd(),gd=class extends UR.Visitor{visitNull(){return WR.NullVector}visitBool(){return MR.BoolVector}visitInt(){return Li.IntVector}visitInt8(){return Li.Int8Vector}visitInt16(){return Li.Int16Vector}visitInt32(){return Li.Int32Vector}visitInt64(){return Li.Int64Vector}visitUint8(){return Li.Uint8Vector}visitUint16(){return Li.Uint16Vector}visitUint32(){return Li.Uint32Vector}visitUint64(){return Li.Uint64Vector}visitFloat(){return ru.FloatVector}visitFloat16(){return ru.Float16Vector}visitFloat32(){return ru.Float32Vector}visitFloat64(){return ru.Float64Vector}visitUtf8(){return HR.Utf8Vector}visitBinary(){return kR.BinaryVector}visitFixedSizeBinary(){return NR.FixedSizeBinaryVector}visitDate(){return _d.DateVector}visitDateDay(){return _d.DateDayVector}visitDateMillisecond(){return _d.DateMillisecondVector}visitTimestamp(){return Ws.TimestampVector}visitTimestampSecond(){return Ws.TimestampSecondVector}visitTimestampMillisecond(){return Ws.TimestampMillisecondVector}visitTimestampMicrosecond(){return Ws.TimestampMicrosecondVector}visitTimestampNanosecond(){return Ws.TimestampNanosecondVector}visitTime(){return zs.TimeVector}visitTimeSecond(){return zs.TimeSecondVector}visitTimeMillisecond(){return zs.TimeMillisecondVector}visitTimeMicrosecond(){return zs.TimeMicrosecondVector}visitTimeNanosecond(){return zs.TimeNanosecondVector}visitDecimal(){return PR.DecimalVector}visitList(){return xR.ListVector}visitStruct(){return zR.StructVector}visitUnion(){return bd.UnionVector}visitDenseUnion(){return bd.DenseUnionVector}visitSparseUnion(){return bd.SparseUnionVector}visitDictionary(){return VR.DictionaryVector}visitInterval(){return md.IntervalVector}visitIntervalDayTime(){return md.IntervalDayTimeVector}visitIntervalYearMonth(){return md.IntervalYearMonthVector}visitFixedSizeList(){return LR.FixedSizeListVector}visitMap(){return qR.MapVector}};Jn.GetVectorConstructor=gd;Jn.instance=new gd});var ji=R(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 vd=dt(),YR=qe();Object.defineProperty(C,"Vector",{enumerable:!0,get:function(){return YR.Vector}});var GR=ze();Object.defineProperty(C,"BaseVector",{enumerable:!0,get:function(){return GR.BaseVector}});var KR=kl();Object.defineProperty(C,"BinaryVector",{enumerable:!0,get:function(){return KR.BinaryVector}});var $R=Ml();Object.defineProperty(C,"BoolVector",{enumerable:!0,get:function(){return $R.BoolVector}});var JR=yr();Object.defineProperty(C,"Chunked",{enumerable:!0,get:function(){return JR.Chunked}});var wd=Vl();Object.defineProperty(C,"DateVector",{enumerable:!0,get:function(){return wd.DateVector}});Object.defineProperty(C,"DateDayVector",{enumerable:!0,get:function(){return wd.DateDayVector}});Object.defineProperty(C,"DateMillisecondVector",{enumerable:!0,get:function(){return wd.DateMillisecondVector}});var QR=Nl();Object.defineProperty(C,"DecimalVector",{enumerable:!0,get:function(){return QR.DecimalVector}});var ZR=za();Object.defineProperty(C,"DictionaryVector",{enumerable:!0,get:function(){return ZR.DictionaryVector}});var XR=xl();Object.defineProperty(C,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return XR.FixedSizeBinaryVector}});var eC=ql();Object.defineProperty(C,"FixedSizeListVector",{enumerable:!0,get:function(){return eC.FixedSizeListVector}});var nu=Yl();Object.defineProperty(C,"FloatVector",{enumerable:!0,get:function(){return nu.FloatVector}});Object.defineProperty(C,"Float16Vector",{enumerable:!0,get:function(){return nu.Float16Vector}});Object.defineProperty(C,"Float32Vector",{enumerable:!0,get:function(){return nu.Float32Vector}});Object.defineProperty(C,"Float64Vector",{enumerable:!0,get:function(){return nu.Float64Vector}});var jd=Gl();Object.defineProperty(C,"IntervalVector",{enumerable:!0,get:function(){return jd.IntervalVector}});Object.defineProperty(C,"IntervalDayTimeVector",{enumerable:!0,get:function(){return jd.IntervalDayTimeVector}});Object.defineProperty(C,"IntervalYearMonthVector",{enumerable:!0,get:function(){return jd.IntervalYearMonthVector}});var xi=Ka();Object.defineProperty(C,"IntVector",{enumerable:!0,get:function(){return xi.IntVector}});Object.defineProperty(C,"Int8Vector",{enumerable:!0,get:function(){return xi.Int8Vector}});Object.defineProperty(C,"Int16Vector",{enumerable:!0,get:function(){return xi.Int16Vector}});Object.defineProperty(C,"Int32Vector",{enumerable:!0,get:function(){return xi.Int32Vector}});Object.defineProperty(C,"Int64Vector",{enumerable:!0,get:function(){return xi.Int64Vector}});Object.defineProperty(C,"Uint8Vector",{enumerable:!0,get:function(){return xi.Uint8Vector}});Object.defineProperty(C,"Uint16Vector",{enumerable:!0,get:function(){return xi.Uint16Vector}});Object.defineProperty(C,"Uint32Vector",{enumerable:!0,get:function(){return xi.Uint32Vector}});Object.defineProperty(C,"Uint64Vector",{enumerable:!0,get:function(){return xi.Uint64Vector}});var tC=id();Object.defineProperty(C,"ListVector",{enumerable:!0,get:function(){return tC.ListVector}});var iC=rd();Object.defineProperty(C,"MapVector",{enumerable:!0,get:function(){return iC.MapVector}});var rC=nd();Object.defineProperty(C,"NullVector",{enumerable:!0,get:function(){return rC.NullVector}});var nC=sd();Object.defineProperty(C,"StructVector",{enumerable:!0,get:function(){return nC.StructVector}});var Hs=od();Object.defineProperty(C,"TimestampVector",{enumerable:!0,get:function(){return Hs.TimestampVector}});Object.defineProperty(C,"TimestampSecondVector",{enumerable:!0,get:function(){return Hs.TimestampSecondVector}});Object.defineProperty(C,"TimestampMillisecondVector",{enumerable:!0,get:function(){return Hs.TimestampMillisecondVector}});Object.defineProperty(C,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return Hs.TimestampMicrosecondVector}});Object.defineProperty(C,"TimestampNanosecondVector",{enumerable:!0,get:function(){return Hs.TimestampNanosecondVector}});var Ys=ad();Object.defineProperty(C,"TimeVector",{enumerable:!0,get:function(){return Ys.TimeVector}});Object.defineProperty(C,"TimeSecondVector",{enumerable:!0,get:function(){return Ys.TimeSecondVector}});Object.defineProperty(C,"TimeMillisecondVector",{enumerable:!0,get:function(){return Ys.TimeMillisecondVector}});Object.defineProperty(C,"TimeMicrosecondVector",{enumerable:!0,get:function(){return Ys.TimeMicrosecondVector}});Object.defineProperty(C,"TimeNanosecondVector",{enumerable:!0,get:function(){return Ys.TimeNanosecondVector}});var Id=ud();Object.defineProperty(C,"UnionVector",{enumerable:!0,get:function(){return Id.UnionVector}});Object.defineProperty(C,"DenseUnionVector",{enumerable:!0,get:function(){return Id.DenseUnionVector}});Object.defineProperty(C,"SparseUnionVector",{enumerable:!0,get:function(){return Id.SparseUnionVector}});var sC=cd();Object.defineProperty(C,"Utf8Vector",{enumerable:!0,get:function(){return sC.Utf8Vector}});var bv=Ds();Object.defineProperty(C,"MapRow",{enumerable:!0,get:function(){return bv.MapRow}});Object.defineProperty(C,"StructRow",{enumerable:!0,get:function(){return bv.StructRow}});var Gs=Hg(),Td=Se(),Qn=qe(),gv=yr(),tn=ze(),oC=di(),su=ft(),vv=Ve(),wv=fd(),jv=Pc(),Iv=fv(),Tv=yv(),Bv=hd(),Sv=_v(),Av=mv();Qn.Vector.new=aC;Qn.Vector.from=cC;function aC(i,...e){return new(Av.instance.getVisitFn(i)())(i,...e)}function uC(i,e){if(su.isIterable(e))return Qn.Vector.from({nullValues:[null,void 0],type:i(),values:e});if(su.isAsyncIterable(e))return Qn.Vector.from({nullValues:[null,void 0],type:i(),values:e});let{values:t=[],type:r=i(),nullValues:n=[null,void 0]}=Object.assign({},e);return su.isIterable(t)?Qn.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:r})):Qn.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:r}))}C.vectorFromValuesWithType=uC;function cC(i){let e=Object.assign({nullValues:[null,void 0]},i),{values:t=[]}=e,r=vd.__rest(e,["values"]);if(su.isIterable(t)){let n=[...vv.Builder.throughIterable(r)(t)];return n.length===1?n[0]:gv.Chunked.concat(n)}return(n=>vd.__awaiter(this,void 0,void 0,function*(){var s,c;let _=vv.Builder.throughAsyncIterable(r);try{for(var v=vd.__asyncValues(_(t)),B;B=yield v.next(),!B.done;){let O=B.value;n.push(O)}}catch(O){s={error:O}}finally{try{B&&!B.done&&(c=v.return)&&(yield c.call(v))}finally{if(s)throw s.error}}return n.length===1?n[0]:gv.Chunked.concat(n)}))([])}tn.BaseVector.prototype.get=function(e){return wv.instance.visit(this,e)};tn.BaseVector.prototype.set=function(e,t){return jv.instance.visit(this,e,t)};tn.BaseVector.prototype.indexOf=function(e,t){return Iv.instance.visit(this,e,t)};tn.BaseVector.prototype.toArray=function(){return Tv.instance.visit(this)};tn.BaseVector.prototype.getByteWidth=function(){return Sv.instance.visit(this.type)};tn.BaseVector.prototype[Symbol.iterator]=function(){return Bv.instance.visit(this)};tn.BaseVector.prototype._bindDataAccessors=hC;Object.keys(Td.Type).map(i=>Td.Type[i]).filter(i=>typeof i=="number").filter(i=>i!==Td.Type.NONE).forEach(i=>{let e=Av.instance.visit(i);e.prototype.get=Gs.partial1(wv.instance.getVisitFn(i)),e.prototype.set=Gs.partial2(jv.instance.getVisitFn(i)),e.prototype.indexOf=Gs.partial2(Iv.instance.getVisitFn(i)),e.prototype.toArray=Gs.partial0(Tv.instance.getVisitFn(i)),e.prototype.getByteWidth=lC(Sv.instance.getVisitFn(i)),e.prototype[Symbol.iterator]=Gs.partial0(Bv.instance.getVisitFn(i))});function lC(i){return function(){return i(this.type)}}function dC(i){return function(e){return this.isValid(e)?i.call(this,e):null}}function fC(i){return function(e,t){oC.setBool(this.nullBitmap,this.offset+e,t!=null)&&i.call(this,e,t)}}function hC(){let i=this.nullBitmap;i&&i.byteLength>0&&(this.get=dC(this.get),this.set=fC(this.set))}});var Ns=R(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.Table=void 0;var ou=dt(),pC=Pn(),yC=Ks(),Ov=Pa(),Bd=Ni(),Dv=rt(),Sd=ve(),Fv=Gr(),Ad=ft(),Ev=Rl(),Od=ji(),tt=class extends Od.Chunked{constructor(...e){var t;let r=null;e[0]instanceof Dv.Schema&&(r=e[0]);let n=e[0]instanceof tt?e[0].chunks:Fv.selectArgs(Bd.RecordBatch,e);if(!r&&!(r=(t=n[0])===null||t===void 0?void 0:t.schema))throw new TypeError("Table must be initialized with a Schema or at least one RecordBatch");n[0]||(n[0]=new Bd._InternalEmptyPlaceholderRecordBatch(r));super(new Sd.Struct(r.fields),n);this._schema=r,this._chunks=n}static empty(e=new Dv.Schema([])){return new tt(e,[])}static from(e){if(!e)return tt.empty();if(typeof e=="object"){let r=Ad.isIterable(e.values)?_C(e):Ad.isAsyncIterable(e.values)?mC(e):null;if(r!==null)return r}let t=yC.RecordBatchReader.from(e);return Ad.isPromise(t)?(()=>ou.__awaiter(this,void 0,void 0,function*(){return yield tt.from(yield t)}))():t.isSync()&&(t=t.open())?t.schema?new tt(t.schema,[...t]):tt.empty():(r=>ou.__awaiter(this,void 0,void 0,function*(){var n,s;let c=yield r,_=c.schema,v=[];if(_){try{for(var B=ou.__asyncValues(c),O;O=yield B.next(),!O.done;){let N=O.value;v.push(N)}}catch(N){n={error:N}}finally{try{O&&!O.done&&(s=B.return)&&(yield s.call(B))}finally{if(n)throw n.error}}return new tt(_,v)}return tt.empty()}))(t.open())}static fromAsync(e){return ou.__awaiter(this,void 0,void 0,function*(){return yield tt.from(e)})}static fromStruct(e){return tt.new(e.data.childData,e.type.children)}static new(...e){return new tt(...Ev.distributeColumnsIntoRecordBatches(Fv.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 tt(this._schema,e)}getColumn(e){return this.getColumnAt(this.getColumnIndex(e))}getColumnAt(e){return this.getChildAt(e)}getColumnIndex(e){return this._schema.fields.findIndex(t=>t.name===e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t,r,n=this._schema.fields,s=this._children||(this._children=[]);if(r=s[e])return r;if(t=n[e]){let c=this._chunks.map(_=>_.getChildAt(e)).filter(_=>_!=null);if(c.length>0)return s[e]=new pC.Column(t,c)}return null}serialize(e="binary",t=!0){return(t?Ov.RecordBatchStreamWriter:Ov.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){let t=this._schema.fields.reduce((r,n,s)=>r.set(n.name,s),new Map);return this.selectAt(...e.map(r=>t.get(r)).filter(r=>r>-1))}selectAt(...e){let t=this._schema.selectAt(...e);return new tt(t,this._chunks.map(({length:r,data:{childData:n}})=>new Bd.RecordBatch(t,r,e.map(s=>n[s]).filter(Boolean))))}assign(e){let t=this._schema.fields,[r,n]=e.schema.fields.reduce((_,v,B)=>{let[O,N]=_,q=t.findIndex(J=>J.name===v.name);return~q?N[q]=B:O.push(B),_},[[],[]]),s=this._schema.assign(e.schema),c=[...t.map((_,v,B,O=n[v])=>O===void 0?this.getColumnAt(v):e.getColumnAt(O)),...r.map(_=>e.getColumnAt(_))].filter(Boolean);return new tt(...Ev.distributeVectorsIntoRecordBatches(s,c))}};au.Table=tt;function _C(i){let{type:e}=i;return e instanceof Sd.Struct?tt.fromStruct(Od.StructVector.from(i)):null}function mC(i){let{type:e}=i;return e instanceof Sd.Struct?Od.StructVector.from(i).then(t=>tt.fromStruct(t)):null}});var Ni=R(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn._InternalEmptyPlaceholderRecordBatch=Zn.RecordBatch=void 0;var Dd=Jt(),Fd=Ns(),bC=qe(),gC=ut(),vC=rt(),wC=ft(),jC=yr(),IC=Gr(),Ed=ve(),TC=Rl(),BC=ji(),Br=class extends BC.StructVector{constructor(...e){let t,r=e[0],n;if(e[1]instanceof Dd.Data)[,t,n]=e;else{let s=r.fields,[,c,_]=e;t=Dd.Data.Struct(new Ed.Struct(s),0,c,0,null,_)}super(t,n);this._schema=r}static from(e){return wC.isIterable(e.values),Fd.Table.from(e)}static new(...e){let[t,r]=IC.selectFieldArgs(e),n=r.filter(s=>s instanceof bC.Vector);return new Br(...TC.ensureSameLengthData(new vC.Schema(t),n.map(s=>s.data)))}clone(e,t=this._children){return new Br(this._schema,e,t)}concat(...e){let t=this._schema,r=jC.Chunked.flatten(this,...e);return new Fd.Table(t,r.map(({data:n})=>new Br(t,n)))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=uu.collect(this))}select(...e){let t=this._schema.fields.reduce((r,n,s)=>r.set(n.name,s),new Map);return this.selectAt(...e.map(r=>t.get(r)).filter(r=>r>-1))}selectAt(...e){let t=this._schema.selectAt(...e),r=e.map(n=>this.data.childData[n]).filter(Boolean);return new Br(t,this.length,r)}};Zn.RecordBatch=Br;var Rv=class extends Br{constructor(e){super(e,0,e.fields.map(t=>Dd.Data.new(t.type,0,0,0)))}};Zn._InternalEmptyPlaceholderRecordBatch=Rv;var uu=class extends gC.Visitor{constructor(){super(...arguments);this.dictionaries=new Map}static collect(e){return new uu().visit(e.data,new Ed.Struct(e.schema.fields)).dictionaries}visit(e,t){return Ed.DataType.isDictionary(t)?this.visitDictionary(e,t):(e.childData.forEach((r,n)=>this.visit(r,t.children[n].type)),this)}visitDictionary(e,t){let r=e.dictionary;return r&&r.length>0&&this.dictionaries.set(t.id,r),this}}});var Ks=R(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.AsyncRecordBatchFileReader=zt.RecordBatchFileReader=zt.AsyncRecordBatchStreamReader=zt.RecordBatchStreamReader=zt.RecordBatchReader=void 0;var Fe=dt(),Cv=qe(),cu=Se(),Uv=Kc(),kv=ms(),Mv=dr(),$s=Qc(),Pv=yb(),Rd=Ni(),rn=ln(),qt=Sa(),Wt=ft(),Si=class extends rn.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 Wt.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 kv.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return kv.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 Si?e:Wt.isArrowJSON(e)?SC(e):Wt.isFileHandle(e)?DC(e):Wt.isPromise(e)?(()=>Fe.__awaiter(this,void 0,void 0,function*(){return yield Si.from(yield e)}))():Wt.isFetchResponse(e)||Wt.isReadableDOMStream(e)||Wt.isReadableNodeStream(e)||Wt.isAsyncIterable(e)?OC(new Mv.AsyncByteStream(e)):AC(new Mv.ByteStream(e))}static readAll(e){return e instanceof Si?e.isSync()?xv(e):qv(e):Wt.isArrowJSON(e)||ArrayBuffer.isView(e)||Wt.isIterable(e)||Wt.isIteratorResult(e)?xv(e):qv(e)}};zt.RecordBatchReader=Si;var Xn=class extends Si{constructor(e){super(e);this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Fe.__asyncGenerator(this,arguments,function*(){yield Fe.__await(yield*Fe.__asyncDelegator(Fe.__asyncValues(this[Symbol.iterator]())))})}};zt.RecordBatchStreamReader=Xn;var es=class extends Si{constructor(e){super(e);this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}};zt.AsyncRecordBatchStreamReader=es;var lu=class extends Xn{constructor(e){super(e);this._impl=e}};zt.RecordBatchFileReader=lu;var Cd=class extends es{constructor(e){super(e);this._impl=e}};zt.AsyncRecordBatchFileReader=Cd;var Ud=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 Rd.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){let{id:r,isDelta:n,data:s}=e,{dictionaries:c,schema:_}=this,v=c.get(r);if(n||!v){let B=_.dictionaries.get(r);return v&&n?v.concat(Cv.Vector.new(this._loadVectors(s,t,[B])[0])):Cv.Vector.new(this._loadVectors(s,t,[B])[0])}return v}_loadVectors(e,t,r){return new Pv.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(r)}},Js=class extends Ud{constructor(e,t){super(t);this._reader=Wt.isArrowJSON(e)?new qt.JSONMessageReader(this._handle=e):new qt.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=Lv(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):rn.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):rn.ITERATOR_DONE}next(){if(this.closed)return rn.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let r=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(r,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let r=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(r,n);this.dictionaries.set(r.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Rd._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},Qs=class extends Ud{constructor(e,t){super(t);this._reader=new qt.AsyncMessageReader(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Fe.__awaiter(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return Fe.__awaiter(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=Lv(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return Fe.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):rn.ITERATOR_DONE})}return(e){return Fe.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):rn.ITERATOR_DONE})}next(){return Fe.__awaiter(this,void 0,void 0,function*(){if(this.closed)return rn.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let r=e.header(),n=yield t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(r,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let r=e.header(),n=yield t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(r,n);this.dictionaries.set(r.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Rd._InternalEmptyPlaceholderRecordBatch(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return Fe.__awaiter(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},kd=class extends Js{constructor(e,t){super(e instanceof $s.RandomAccessFile?e:new $s.RandomAccessFile(e),t)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){if(this.closed)return null;this._footer||this.open();let t=this._footer&&this._footer.getRecordBatch(e);if(t&&this._handle.seek(t.offset)){let r=this._reader.readMessage(cu.MessageHeader.RecordBatch);if(r==null?void 0:r.isRecordBatch()){let n=r.header(),s=this._reader.readMessageBody(r.bodyLength);return this._loadRecordBatch(n,s)}}return null}_readDictionaryBatch(e){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){let r=this._reader.readMessage(cu.MessageHeader.DictionaryBatch);if(r==null?void 0:r.isDictionaryBatch()){let n=r.header(),s=this._reader.readMessageBody(r.bodyLength),c=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,c)}}}_readFooter(){let{_handle:e}=this,t=e.size-qt.magicAndPadding,r=e.readInt32(t),n=e.readAt(t-r,r);return Uv.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}},Vv=class extends Qs{constructor(e,...t){let r=typeof t[0]!="number"?t.shift():void 0,n=t[0]instanceof Map?t.shift():void 0;super(e instanceof $s.AsyncRandomAccessFile?e:new $s.AsyncRandomAccessFile(e,r),n)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isFile(){return!0}isAsync(){return!0}open(e){let t=Object.create(null,{open:{get:()=>super.open}});return Fe.__awaiter(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let r of this._footer.dictionaryBatches())r&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return Fe.__awaiter(this,void 0,void 0,function*(){if(this.closed)return null;this._footer||(yield this.open());let t=this._footer&&this._footer.getRecordBatch(e);if(t&&(yield this._handle.seek(t.offset))){let r=yield this._reader.readMessage(cu.MessageHeader.RecordBatch);if(r==null?void 0:r.isRecordBatch()){let n=r.header(),s=yield this._reader.readMessageBody(r.bodyLength);return this._loadRecordBatch(n,s)}}return null})}_readDictionaryBatch(e){return Fe.__awaiter(this,void 0,void 0,function*(){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&(yield this._handle.seek(t.offset))){let r=yield this._reader.readMessage(cu.MessageHeader.DictionaryBatch);if(r==null?void 0:r.isDictionaryBatch()){let n=r.header(),s=yield this._reader.readMessageBody(r.bodyLength),c=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,c)}}})}_readFooter(){return Fe.__awaiter(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-qt.magicAndPadding,r=yield e.readInt32(t),n=yield e.readAt(t-r,r);return Uv.Footer.decode(n)})}_readNextMessageAndValidate(e){return Fe.__awaiter(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&(yield this._handle.seek(t.offset)))return yield this._reader.readMessage(e)}return null})}},Nv=class extends Js{constructor(e,t){super(e,t)}_loadVectors(e,t,r){return new Pv.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(r)}};function Lv(i,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:i.autoDestroy}function*xv(i){let e=Si.from(i);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}function qv(i){return Fe.__asyncGenerator(this,arguments,function*(){let t=yield Fe.__await(Si.from(i));try{if(!(yield Fe.__await(t.open({autoDestroy:!1}))).closed)do yield yield Fe.__await(t);while(!(yield Fe.__await(t.reset().open())).closed)}finally{yield Fe.__await(t.cancel())}})}function SC(i){return new Xn(new Nv(i))}function AC(i){let e=i.peek(qt.magicLength+7&~7);return e&&e.byteLength>=4?qt.checkForMagicArrowString(e)?new lu(new kd(i.read())):new Xn(new Js(i)):new Xn(new Js(function*(){}()))}function OC(i){return Fe.__awaiter(this,void 0,void 0,function*(){let e=yield i.peek(qt.magicLength+7&~7);return e&&e.byteLength>=4?qt.checkForMagicArrowString(e)?new lu(new kd(yield i.read())):new es(new Qs(i)):new es(new Qs(function(){return Fe.__asyncGenerator(this,arguments,function*(){})}()))})}function DC(i){return Fe.__awaiter(this,void 0,void 0,function*(){let{size:e}=yield i.stat(),t=new $s.AsyncRandomAccessFile(i,e);return e>=qt.magicX2AndPadding&&qt.checkForMagicArrowString(yield t.readAt(0,qt.magicLength+7&~7))?new Cd(new Vv(t)):new es(new Qs(t))})}});var Hv=R(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.toDOMStream=void 0;var du=dt(),Wv=Ze(),zv=ft();function FC(i,e){if(zv.isAsyncIterable(i))return RC(i,e);if(zv.isIterable(i))return EC(i,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}fu.toDOMStream=FC;function EC(i,e){let t=null,r=(e==null?void 0:e.type)==="bytes"||!1,n=(e==null?void 0:e.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},e),{start(c){s(c,t||(t=i[Symbol.iterator]()))},pull(c){t?s(c,t):c.close()},cancel(){((t==null?void 0:t.return)&&t.return()||!0)&&(t=null)}}),Object.assign({highWaterMark:r?n:void 0},e));function s(c,_){let v,B=null,O=c.desiredSize||null;for(;!(B=_.next(r?O:null)).done;)if(ArrayBuffer.isView(B.value)&&(v=Wv.toUint8Array(B.value))&&(O!=null&&r&&(O=O-v.byteLength+1),B.value=v),c.enqueue(B.value),O!=null&&--O<=0)return;c.close()}}function RC(i,e){let t=null,r=(e==null?void 0:e.type)==="bytes"||!1,n=(e==null?void 0:e.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},e),{start(c){return du.__awaiter(this,void 0,void 0,function*(){yield s(c,t||(t=i[Symbol.asyncIterator]()))})},pull(c){return du.__awaiter(this,void 0,void 0,function*(){t?yield s(c,t):c.close()})},cancel(){return du.__awaiter(this,void 0,void 0,function*(){((t==null?void 0:t.return)&&(yield t.return())||!0)&&(t=null)})}}),Object.assign({highWaterMark:r?n:void 0},e));function s(c,_){return du.__awaiter(this,void 0,void 0,function*(){let v,B=null,O=c.desiredSize||null;for(;!(B=yield _.next(r?O:null)).done;)if(ArrayBuffer.isView(B.value)&&(v=Wv.toUint8Array(B.value))&&(O!=null&&r&&(O=O-v.byteLength+1),B.value=v),c.enqueue(B.value),O!=null&&--O<=0)return;c.close()})}}});var Kv=R(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.BuilderTransform=ts.builderThroughDOMStream=void 0;var CC=dt(),UC=fa();function kC(i){return new Md(i)}ts.builderThroughDOMStream=kC;var Md=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:r,["queueingStrategy"]:n="count"}=e,s=CC.__rest(e,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=UC.Builder.new(s),this._getSize=n!=="bytes"?Yv:Gv;let{["highWaterMark"]:c=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},t),{["highWaterMark"]:_=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},r);this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:v=>{this._maybeFlush(this._builder,this._controller=v)},start:v=>{this._maybeFlush(this._builder,this._controller=v)}},{highWaterMark:c,size:n!=="bytes"?Yv:Gv}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:_,size:v=>this._writeValueAndReturnChunkSize(v)})}_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)}};ts.BuilderTransform=Md;var Yv=i=>i.length,Gv=i=>i.byteLength});var $v=R(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.recordBatchReaderThroughDOMStream=void 0;var Zs=dt(),MC=dr(),PC=Ks();function VC(i,e){let t=new MC.AsyncByteQueue,r=null,n=new ReadableStream({cancel(){return Zs.__awaiter(this,void 0,void 0,function*(){yield t.close()})},start(_){return Zs.__awaiter(this,void 0,void 0,function*(){yield c(_,r||(r=yield s()))})},pull(_){return Zs.__awaiter(this,void 0,void 0,function*(){r?yield c(_,r):_.close()})}});return{writable:new WritableStream(t,Object.assign({highWaterMark:Math.pow(2,14)},i)),readable:n};function s(){return Zs.__awaiter(this,void 0,void 0,function*(){return yield(yield PC.RecordBatchReader.from(t)).open(e)})}function c(_,v){return Zs.__awaiter(this,void 0,void 0,function*(){let B=_.desiredSize,O=null;for(;!(O=yield v.next()).done;)if(_.enqueue(O.value),B!=null&&--B<=0)return;_.close()})}}hu.recordBatchReaderThroughDOMStream=VC});var Jv=R(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.recordBatchWriterThroughDOMStream=void 0;var pu=dt(),NC=dr();function LC(i,e){let t=new this(i),r=new NC.AsyncByteStream(t),n=new ReadableStream({type:"bytes",cancel(){return pu.__awaiter(this,void 0,void 0,function*(){yield r.cancel()})},pull(c){return pu.__awaiter(this,void 0,void 0,function*(){yield s(c)})},start(c){return pu.__awaiter(this,void 0,void 0,function*(){yield s(c)})}},Object.assign({highWaterMark:Math.pow(2,14)},e));return{writable:new WritableStream(t,i),readable:n};function s(c){return pu.__awaiter(this,void 0,void 0,function*(){let _=null,v=c.desiredSize;for(;_=yield r.read(v||null);)if(c.enqueue(_),v!=null&&(v-=_.byteLength)<=0)return;c.close()})}}yu.recordBatchWriterThroughDOMStream=LC});var qd=R(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.custom=he.or=he.and=he.col=he.lit=he.CustomPredicate=he.Not=he.GTeq=he.LTeq=he.Equals=he.Or=he.And=he.CombinationPredicate=he.ComparisonPredicate=he.Predicate=he.Col=he.Literal=he.Value=void 0;var xC=za(),Sr=class{eq(e){return e instanceof Sr||(e=new qi(e)),new Vd(this,e)}le(e){return e instanceof Sr||(e=new qi(e)),new Nd(this,e)}ge(e){return e instanceof Sr||(e=new qi(e)),new Ld(this,e)}lt(e){return new ss(this.ge(e))}gt(e){return new ss(this.le(e))}ne(e){return new ss(this.eq(e))}};he.Value=Sr;var qi=class extends Sr{constructor(e){super();this.v=e}};he.Literal=qi;var Pd=class extends Sr{constructor(e){super();this.name=e}bind(e){if(!this.colidx){this.colidx=-1;let r=e.schema.fields;for(let n=-1;++n<r.length;)if(r[n].name===this.name){this.colidx=n;break}if(this.colidx<0)throw new Error(`Failed to bind Col "${this.name}"`)}let t=this.vector=e.getChildAt(this.colidx);return r=>t.get(r)}};he.Col=Pd;var is=class{and(...e){return new rs(this,...e)}or(...e){return new ns(this,...e)}not(){return new ss(this)}};he.Predicate=is;var Xs=class extends is{constructor(e,t){super();this.left=e,this.right=t}bind(e){return this.left instanceof qi?this.right instanceof qi?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof qi?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}};he.ComparisonPredicate=Xs;var eo=class extends is{constructor(...e){super();this.children=e}};he.CombinationPredicate=eo;eo.prototype.children=Object.freeze([]);var rs=class extends eo{constructor(...e){e=e.reduce((t,r)=>t.concat(r instanceof rs?r.children:r),[]);super(...e)}bind(e){let t=this.children.map(r=>r.bind(e));return(r,n)=>t.every(s=>s(r,n))}};he.And=rs;var ns=class extends eo{constructor(...e){e=e.reduce((t,r)=>t.concat(r instanceof ns?r.children:r),[]);super(...e)}bind(e){let t=this.children.map(r=>r.bind(e));return(r,n)=>t.some(s=>s(r,n))}};he.Or=ns;var Vd=class extends Xs{_bindLitLit(e,t,r){let n=t.v==r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),s=r.bind(e);return(c,_)=>n(c,_)==s(c,_)}_bindColLit(e,t,r){let n=t.bind(e);if(t.vector instanceof xC.DictionaryVector){let s,c=t.vector;return c.dictionary!==this.lastDictionary?(s=c.reverseLookup(r.v),this.lastDictionary=c.dictionary,this.lastKey=s):s=this.lastKey,s===-1?()=>!1:_=>c.getKey(_)===s}else return(s,c)=>n(s,c)==r.v}_bindLitCol(e,t,r){return this._bindColLit(e,r,t)}};he.Equals=Vd;var Nd=class extends Xs{_bindLitLit(e,t,r){let n=t.v<=r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),s=r.bind(e);return(c,_)=>n(c,_)<=s(c,_)}_bindColLit(e,t,r){let n=t.bind(e);return(s,c)=>n(s,c)<=r.v}_bindLitCol(e,t,r){let n=r.bind(e);return(s,c)=>t.v<=n(s,c)}};he.LTeq=Nd;var Ld=class extends Xs{_bindLitLit(e,t,r){let n=t.v>=r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),s=r.bind(e);return(c,_)=>n(c,_)>=s(c,_)}_bindColLit(e,t,r){let n=t.bind(e);return(s,c)=>n(s,c)>=r.v}_bindLitCol(e,t,r){let n=r.bind(e);return(s,c)=>t.v>=n(s,c)}};he.GTeq=Ld;var ss=class extends is{constructor(e){super();this.child=e}bind(e){let t=this.child.bind(e);return(r,n)=>!t(r,n)}};he.Not=ss;var xd=class extends is{constructor(e,t){super();this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}};he.CustomPredicate=xd;function qC(i){return new qi(i)}he.lit=qC;function WC(i){return new Pd(i)}he.col=WC;function zC(...i){return new rs(...i)}he.and=zC;function HC(...i){return new ns(...i)}he.or=HC;function YC(i,e){return new xd(i,e)}he.custom=YC});var iw=R(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.FilteredDataFrame=Ar.CountByResult=Ar.DataFrame=void 0;var Qv=Ns(),Zv=Ka(),Wd=rt(),Xv=qd(),GC=Ni(),ew=ve(),zd=class extends Qv.Table{filter(e){return new to(this.chunks,e)}scan(e,t){let r=this.chunks,n=r.length;for(let s=-1;++s<n;){let c=r[s];t&&t(c);for(let _=-1,v=c.length;++_<v;)e(_,c)}}scanReverse(e,t){let r=this.chunks,n=r.length;for(let s=n;--s>=0;){let c=r[s];t&&t(c);for(let _=c.length;--_>=0;)e(_,c)}}countBy(e){let t=this.chunks,r=t.length,n=typeof e=="string"?new Xv.Col(e):e;n.bind(t[r-1]);let s=n.vector;if(!ew.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)),_=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,v=new _(s.dictionary.length);for(let B=-1;++B<r;){let O=t[B];n.bind(O);let N=n.vector.indices;for(let q=-1,J=O.length;++q<J;){let ke=N.get(q);ke!==null&&v[ke]++}}return new _u(s.dictionary,Zv.IntVector.from(v))}};Ar.DataFrame=zd;var _u=class extends Qv.Table{constructor(e,t){let r=new Wd.Schema([new Wd.Field("values",e.type),new Wd.Field("counts",t.type)]);super(new GC.RecordBatch(r,t.length,[e,t]))}toJSON(){let e=this.getColumnAt(0),t=this.getColumnAt(1),r={};for(let n=-1;++n<this.length;)r[e.get(n)]=t.get(n);return r}};Ar.CountByResult=_u;var tw=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}},to=class extends zd{constructor(e,t){super(e);this._predicate=t}scan(e,t){let r=this._chunks,n=r.length;for(let s=-1;++s<n;){let c=r[s],_=this._predicate.bind(c),v=!1;for(let B=-1,O=c.length;++B<O;)_(B,c)&&(t&&!v&&(t(c),v=!0),e(B,c))}}scanReverse(e,t){let r=this._chunks,n=r.length;for(let s=n;--s>=0;){let c=r[s],_=this._predicate.bind(c),v=!1;for(let B=c.length;--B>=0;)_(B,c)&&(t&&!v&&(t(c),v=!0),e(B,c))}}count(){let e=0,t=this._chunks,r=t.length;for(let n=-1;++n<r;){let s=t[n],c=this._predicate.bind(s);for(let _=-1,v=s.length;++_<v;)c(_,s)&&++e}return e}[Symbol.iterator](){return new tw(this._chunks,this._predicate)}filter(e){return new to(this._chunks,this._predicate.and(e))}countBy(e){let t=this._chunks,r=t.length,n=typeof e=="string"?new Xv.Col(e):e;n.bind(t[r-1]);let s=n.vector;if(!ew.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)),_=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,v=new _(s.dictionary.length);for(let B=-1;++B<r;){let O=t[B],N=this._predicate.bind(O);n.bind(O);let q=n.vector.indices;for(let J=-1,ke=O.length;++J<ke;){let Oe=q.get(J);Oe!==null&&N(J,O)&&v[Oe]++}}return new _u(s.dictionary,Zv.IntVector.from(v))}};Ar.FilteredDataFrame=to});var sw=R(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.isTypedArray=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.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.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.Field=b.Schema=b.Visitor=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.Type=b.MessageHeader=b.MetadataVersion=b.IntervalUnit=b.UnionMode=b.Precision=b.TimeUnit=b.DateUnit=void 0;var os=Zi();Object.defineProperty(b,"DateUnit",{enumerable:!0,get:function(){return os.DateUnit}});Object.defineProperty(b,"TimeUnit",{enumerable:!0,get:function(){return os.TimeUnit}});Object.defineProperty(b,"Precision",{enumerable:!0,get:function(){return os.Precision}});Object.defineProperty(b,"UnionMode",{enumerable:!0,get:function(){return os.UnionMode}});Object.defineProperty(b,"IntervalUnit",{enumerable:!0,get:function(){return os.IntervalUnit}});Object.defineProperty(b,"MetadataVersion",{enumerable:!0,get:function(){return os.MetadataVersion}});var KC=So();Object.defineProperty(b,"MessageHeader",{enumerable:!0,get:function(){return KC.MessageHeader}});var rw=Se();Object.defineProperty(b,"Type",{enumerable:!0,get:function(){return rw.Type}});Object.defineProperty(b,"BufferType",{enumerable:!0,get:function(){return rw.BufferType}});var $C=Jt();Object.defineProperty(b,"Data",{enumerable:!0,get:function(){return $C.Data}});var oe=ve();Object.defineProperty(b,"DataType",{enumerable:!0,get:function(){return oe.DataType}});Object.defineProperty(b,"Null",{enumerable:!0,get:function(){return oe.Null}});Object.defineProperty(b,"Bool",{enumerable:!0,get:function(){return oe.Bool}});Object.defineProperty(b,"Int",{enumerable:!0,get:function(){return oe.Int}});Object.defineProperty(b,"Int8",{enumerable:!0,get:function(){return oe.Int8}});Object.defineProperty(b,"Int16",{enumerable:!0,get:function(){return oe.Int16}});Object.defineProperty(b,"Int32",{enumerable:!0,get:function(){return oe.Int32}});Object.defineProperty(b,"Int64",{enumerable:!0,get:function(){return oe.Int64}});Object.defineProperty(b,"Uint8",{enumerable:!0,get:function(){return oe.Uint8}});Object.defineProperty(b,"Uint16",{enumerable:!0,get:function(){return oe.Uint16}});Object.defineProperty(b,"Uint32",{enumerable:!0,get:function(){return oe.Uint32}});Object.defineProperty(b,"Uint64",{enumerable:!0,get:function(){return oe.Uint64}});Object.defineProperty(b,"Float",{enumerable:!0,get:function(){return oe.Float}});Object.defineProperty(b,"Float16",{enumerable:!0,get:function(){return oe.Float16}});Object.defineProperty(b,"Float32",{enumerable:!0,get:function(){return oe.Float32}});Object.defineProperty(b,"Float64",{enumerable:!0,get:function(){return oe.Float64}});Object.defineProperty(b,"Utf8",{enumerable:!0,get:function(){return oe.Utf8}});Object.defineProperty(b,"Binary",{enumerable:!0,get:function(){return oe.Binary}});Object.defineProperty(b,"FixedSizeBinary",{enumerable:!0,get:function(){return oe.FixedSizeBinary}});Object.defineProperty(b,"Date_",{enumerable:!0,get:function(){return oe.Date_}});Object.defineProperty(b,"DateDay",{enumerable:!0,get:function(){return oe.DateDay}});Object.defineProperty(b,"DateMillisecond",{enumerable:!0,get:function(){return oe.DateMillisecond}});Object.defineProperty(b,"Timestamp",{enumerable:!0,get:function(){return oe.Timestamp}});Object.defineProperty(b,"TimestampSecond",{enumerable:!0,get:function(){return oe.TimestampSecond}});Object.defineProperty(b,"TimestampMillisecond",{enumerable:!0,get:function(){return oe.TimestampMillisecond}});Object.defineProperty(b,"TimestampMicrosecond",{enumerable:!0,get:function(){return oe.TimestampMicrosecond}});Object.defineProperty(b,"TimestampNanosecond",{enumerable:!0,get:function(){return oe.TimestampNanosecond}});Object.defineProperty(b,"Time",{enumerable:!0,get:function(){return oe.Time}});Object.defineProperty(b,"TimeSecond",{enumerable:!0,get:function(){return oe.TimeSecond}});Object.defineProperty(b,"TimeMillisecond",{enumerable:!0,get:function(){return oe.TimeMillisecond}});Object.defineProperty(b,"TimeMicrosecond",{enumerable:!0,get:function(){return oe.TimeMicrosecond}});Object.defineProperty(b,"TimeNanosecond",{enumerable:!0,get:function(){return oe.TimeNanosecond}});Object.defineProperty(b,"Decimal",{enumerable:!0,get:function(){return oe.Decimal}});Object.defineProperty(b,"List",{enumerable:!0,get:function(){return oe.List}});Object.defineProperty(b,"Struct",{enumerable:!0,get:function(){return oe.Struct}});Object.defineProperty(b,"Union",{enumerable:!0,get:function(){return oe.Union}});Object.defineProperty(b,"DenseUnion",{enumerable:!0,get:function(){return oe.DenseUnion}});Object.defineProperty(b,"SparseUnion",{enumerable:!0,get:function(){return oe.SparseUnion}});Object.defineProperty(b,"Dictionary",{enumerable:!0,get:function(){return oe.Dictionary}});Object.defineProperty(b,"Interval",{enumerable:!0,get:function(){return oe.Interval}});Object.defineProperty(b,"IntervalDayTime",{enumerable:!0,get:function(){return oe.IntervalDayTime}});Object.defineProperty(b,"IntervalYearMonth",{enumerable:!0,get:function(){return oe.IntervalYearMonth}});Object.defineProperty(b,"FixedSizeList",{enumerable:!0,get:function(){return oe.FixedSizeList}});Object.defineProperty(b,"Map_",{enumerable:!0,get:function(){return oe.Map_}});var JC=Ns();Object.defineProperty(b,"Table",{enumerable:!0,get:function(){return JC.Table}});var QC=Pn();Object.defineProperty(b,"Column",{enumerable:!0,get:function(){return QC.Column}});var ZC=ut();Object.defineProperty(b,"Visitor",{enumerable:!0,get:function(){return ZC.Visitor}});var nw=rt();Object.defineProperty(b,"Schema",{enumerable:!0,get:function(){return nw.Schema}});Object.defineProperty(b,"Field",{enumerable:!0,get:function(){return nw.Field}});var ie=ji();Object.defineProperty(b,"Vector",{enumerable:!0,get:function(){return ie.Vector}});Object.defineProperty(b,"BaseVector",{enumerable:!0,get:function(){return ie.BaseVector}});Object.defineProperty(b,"BinaryVector",{enumerable:!0,get:function(){return ie.BinaryVector}});Object.defineProperty(b,"BoolVector",{enumerable:!0,get:function(){return ie.BoolVector}});Object.defineProperty(b,"Chunked",{enumerable:!0,get:function(){return ie.Chunked}});Object.defineProperty(b,"DateVector",{enumerable:!0,get:function(){return ie.DateVector}});Object.defineProperty(b,"DateDayVector",{enumerable:!0,get:function(){return ie.DateDayVector}});Object.defineProperty(b,"DateMillisecondVector",{enumerable:!0,get:function(){return ie.DateMillisecondVector}});Object.defineProperty(b,"DecimalVector",{enumerable:!0,get:function(){return ie.DecimalVector}});Object.defineProperty(b,"DictionaryVector",{enumerable:!0,get:function(){return ie.DictionaryVector}});Object.defineProperty(b,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return ie.FixedSizeBinaryVector}});Object.defineProperty(b,"FixedSizeListVector",{enumerable:!0,get:function(){return ie.FixedSizeListVector}});Object.defineProperty(b,"FloatVector",{enumerable:!0,get:function(){return ie.FloatVector}});Object.defineProperty(b,"Float16Vector",{enumerable:!0,get:function(){return ie.Float16Vector}});Object.defineProperty(b,"Float32Vector",{enumerable:!0,get:function(){return ie.Float32Vector}});Object.defineProperty(b,"Float64Vector",{enumerable:!0,get:function(){return ie.Float64Vector}});Object.defineProperty(b,"IntervalVector",{enumerable:!0,get:function(){return ie.IntervalVector}});Object.defineProperty(b,"IntervalDayTimeVector",{enumerable:!0,get:function(){return ie.IntervalDayTimeVector}});Object.defineProperty(b,"IntervalYearMonthVector",{enumerable:!0,get:function(){return ie.IntervalYearMonthVector}});Object.defineProperty(b,"IntVector",{enumerable:!0,get:function(){return ie.IntVector}});Object.defineProperty(b,"Int8Vector",{enumerable:!0,get:function(){return ie.Int8Vector}});Object.defineProperty(b,"Int16Vector",{enumerable:!0,get:function(){return ie.Int16Vector}});Object.defineProperty(b,"Int32Vector",{enumerable:!0,get:function(){return ie.Int32Vector}});Object.defineProperty(b,"Int64Vector",{enumerable:!0,get:function(){return ie.Int64Vector}});Object.defineProperty(b,"Uint8Vector",{enumerable:!0,get:function(){return ie.Uint8Vector}});Object.defineProperty(b,"Uint16Vector",{enumerable:!0,get:function(){return ie.Uint16Vector}});Object.defineProperty(b,"Uint32Vector",{enumerable:!0,get:function(){return ie.Uint32Vector}});Object.defineProperty(b,"Uint64Vector",{enumerable:!0,get:function(){return ie.Uint64Vector}});Object.defineProperty(b,"ListVector",{enumerable:!0,get:function(){return ie.ListVector}});Object.defineProperty(b,"MapVector",{enumerable:!0,get:function(){return ie.MapVector}});Object.defineProperty(b,"NullVector",{enumerable:!0,get:function(){return ie.NullVector}});Object.defineProperty(b,"StructVector",{enumerable:!0,get:function(){return ie.StructVector}});Object.defineProperty(b,"TimestampVector",{enumerable:!0,get:function(){return ie.TimestampVector}});Object.defineProperty(b,"TimestampSecondVector",{enumerable:!0,get:function(){return ie.TimestampSecondVector}});Object.defineProperty(b,"TimestampMillisecondVector",{enumerable:!0,get:function(){return ie.TimestampMillisecondVector}});Object.defineProperty(b,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return ie.TimestampMicrosecondVector}});Object.defineProperty(b,"TimestampNanosecondVector",{enumerable:!0,get:function(){return ie.TimestampNanosecondVector}});Object.defineProperty(b,"TimeVector",{enumerable:!0,get:function(){return ie.TimeVector}});Object.defineProperty(b,"TimeSecondVector",{enumerable:!0,get:function(){return ie.TimeSecondVector}});Object.defineProperty(b,"TimeMillisecondVector",{enumerable:!0,get:function(){return ie.TimeMillisecondVector}});Object.defineProperty(b,"TimeMicrosecondVector",{enumerable:!0,get:function(){return ie.TimeMicrosecondVector}});Object.defineProperty(b,"TimeNanosecondVector",{enumerable:!0,get:function(){return ie.TimeNanosecondVector}});Object.defineProperty(b,"UnionVector",{enumerable:!0,get:function(){return ie.UnionVector}});Object.defineProperty(b,"DenseUnionVector",{enumerable:!0,get:function(){return ie.DenseUnionVector}});Object.defineProperty(b,"SparseUnionVector",{enumerable:!0,get:function(){return ie.SparseUnionVector}});Object.defineProperty(b,"Utf8Vector",{enumerable:!0,get:function(){return ie.Utf8Vector}});var ae=fa();Object.defineProperty(b,"Builder",{enumerable:!0,get:function(){return ae.Builder}});Object.defineProperty(b,"BinaryBuilder",{enumerable:!0,get:function(){return ae.BinaryBuilder}});Object.defineProperty(b,"BoolBuilder",{enumerable:!0,get:function(){return ae.BoolBuilder}});Object.defineProperty(b,"DateBuilder",{enumerable:!0,get:function(){return ae.DateBuilder}});Object.defineProperty(b,"DateDayBuilder",{enumerable:!0,get:function(){return ae.DateDayBuilder}});Object.defineProperty(b,"DateMillisecondBuilder",{enumerable:!0,get:function(){return ae.DateMillisecondBuilder}});Object.defineProperty(b,"DecimalBuilder",{enumerable:!0,get:function(){return ae.DecimalBuilder}});Object.defineProperty(b,"DictionaryBuilder",{enumerable:!0,get:function(){return ae.DictionaryBuilder}});Object.defineProperty(b,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return ae.FixedSizeBinaryBuilder}});Object.defineProperty(b,"FixedSizeListBuilder",{enumerable:!0,get:function(){return ae.FixedSizeListBuilder}});Object.defineProperty(b,"FloatBuilder",{enumerable:!0,get:function(){return ae.FloatBuilder}});Object.defineProperty(b,"Float16Builder",{enumerable:!0,get:function(){return ae.Float16Builder}});Object.defineProperty(b,"Float32Builder",{enumerable:!0,get:function(){return ae.Float32Builder}});Object.defineProperty(b,"Float64Builder",{enumerable:!0,get:function(){return ae.Float64Builder}});Object.defineProperty(b,"IntervalBuilder",{enumerable:!0,get:function(){return ae.IntervalBuilder}});Object.defineProperty(b,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return ae.IntervalDayTimeBuilder}});Object.defineProperty(b,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return ae.IntervalYearMonthBuilder}});Object.defineProperty(b,"IntBuilder",{enumerable:!0,get:function(){return ae.IntBuilder}});Object.defineProperty(b,"Int8Builder",{enumerable:!0,get:function(){return ae.Int8Builder}});Object.defineProperty(b,"Int16Builder",{enumerable:!0,get:function(){return ae.Int16Builder}});Object.defineProperty(b,"Int32Builder",{enumerable:!0,get:function(){return ae.Int32Builder}});Object.defineProperty(b,"Int64Builder",{enumerable:!0,get:function(){return ae.Int64Builder}});Object.defineProperty(b,"Uint8Builder",{enumerable:!0,get:function(){return ae.Uint8Builder}});Object.defineProperty(b,"Uint16Builder",{enumerable:!0,get:function(){return ae.Uint16Builder}});Object.defineProperty(b,"Uint32Builder",{enumerable:!0,get:function(){return ae.Uint32Builder}});Object.defineProperty(b,"Uint64Builder",{enumerable:!0,get:function(){return ae.Uint64Builder}});Object.defineProperty(b,"ListBuilder",{enumerable:!0,get:function(){return ae.ListBuilder}});Object.defineProperty(b,"MapBuilder",{enumerable:!0,get:function(){return ae.MapBuilder}});Object.defineProperty(b,"NullBuilder",{enumerable:!0,get:function(){return ae.NullBuilder}});Object.defineProperty(b,"StructBuilder",{enumerable:!0,get:function(){return ae.StructBuilder}});Object.defineProperty(b,"TimestampBuilder",{enumerable:!0,get:function(){return ae.TimestampBuilder}});Object.defineProperty(b,"TimestampSecondBuilder",{enumerable:!0,get:function(){return ae.TimestampSecondBuilder}});Object.defineProperty(b,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return ae.TimestampMillisecondBuilder}});Object.defineProperty(b,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return ae.TimestampMicrosecondBuilder}});Object.defineProperty(b,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return ae.TimestampNanosecondBuilder}});Object.defineProperty(b,"TimeBuilder",{enumerable:!0,get:function(){return ae.TimeBuilder}});Object.defineProperty(b,"TimeSecondBuilder",{enumerable:!0,get:function(){return ae.TimeSecondBuilder}});Object.defineProperty(b,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return ae.TimeMillisecondBuilder}});Object.defineProperty(b,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return ae.TimeMicrosecondBuilder}});Object.defineProperty(b,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return ae.TimeNanosecondBuilder}});Object.defineProperty(b,"UnionBuilder",{enumerable:!0,get:function(){return ae.UnionBuilder}});Object.defineProperty(b,"DenseUnionBuilder",{enumerable:!0,get:function(){return ae.DenseUnionBuilder}});Object.defineProperty(b,"SparseUnionBuilder",{enumerable:!0,get:function(){return ae.SparseUnionBuilder}});Object.defineProperty(b,"Utf8Builder",{enumerable:!0,get:function(){return ae.Utf8Builder}});var Hd=dr();Object.defineProperty(b,"ByteStream",{enumerable:!0,get:function(){return Hd.ByteStream}});Object.defineProperty(b,"AsyncByteStream",{enumerable:!0,get:function(){return Hd.AsyncByteStream}});Object.defineProperty(b,"AsyncByteQueue",{enumerable:!0,get:function(){return Hd.AsyncByteQueue}});var io=Ks();Object.defineProperty(b,"RecordBatchReader",{enumerable:!0,get:function(){return io.RecordBatchReader}});Object.defineProperty(b,"RecordBatchFileReader",{enumerable:!0,get:function(){return io.RecordBatchFileReader}});Object.defineProperty(b,"RecordBatchStreamReader",{enumerable:!0,get:function(){return io.RecordBatchStreamReader}});Object.defineProperty(b,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return io.AsyncRecordBatchFileReader}});Object.defineProperty(b,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return io.AsyncRecordBatchStreamReader}});var mu=Pa();Object.defineProperty(b,"RecordBatchWriter",{enumerable:!0,get:function(){return mu.RecordBatchWriter}});Object.defineProperty(b,"RecordBatchFileWriter",{enumerable:!0,get:function(){return mu.RecordBatchFileWriter}});Object.defineProperty(b,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return mu.RecordBatchStreamWriter}});Object.defineProperty(b,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return mu.RecordBatchJSONWriter}});var Yd=Sa();Object.defineProperty(b,"MessageReader",{enumerable:!0,get:function(){return Yd.MessageReader}});Object.defineProperty(b,"AsyncMessageReader",{enumerable:!0,get:function(){return Yd.AsyncMessageReader}});Object.defineProperty(b,"JSONMessageReader",{enumerable:!0,get:function(){return Yd.JSONMessageReader}});var XC=Jr();Object.defineProperty(b,"Message",{enumerable:!0,get:function(){return XC.Message}});var eU=Ni();Object.defineProperty(b,"RecordBatch",{enumerable:!0,get:function(){return eU.RecordBatch}});var Gd=iw();Object.defineProperty(b,"DataFrame",{enumerable:!0,get:function(){return Gd.DataFrame}});Object.defineProperty(b,"FilteredDataFrame",{enumerable:!0,get:function(){return Gd.FilteredDataFrame}});Object.defineProperty(b,"CountByResult",{enumerable:!0,get:function(){return Gd.CountByResult}});var tU=Is(),iU=Xc(),rU=di(),nU=gs(),sU=Ze(),oU=Es(),aU=qd();b.predicate=aU;var Kd=ml();b.util=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},tU),iU),rU),nU),sU),oU),{compareSchemas:Kd.compareSchemas,compareFields:Kd.compareFields,compareTypes:Kd.compareTypes});var uU=Gr();Object.defineProperty(b,"isTypedArray",{enumerable:!0,get:function(){return uU.isTypedArray}})});var vu=R(()=>{});var ef=R(()=>{});var lw=R((wu,rf)=>{var tf=function(){var i=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename!="undefined"&&(i=i||__filename),function(e){e=e||{};var t=typeof e!="undefined"?e:{},r,n;t.ready=new Promise(function(o,a){r=o,n=a});var s={},c;for(c in t)t.hasOwnProperty(c)&&(s[c]=t[c]);var _=[],v="./this.program",B=function(o,a){throw a},O=typeof window=="object",N=typeof importScripts=="function",q=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",J="";function ke(o){return t.locateFile?t.locateFile(o,J):J+o}var Oe,Ht,pt,le;function _w(o){if(!(o instanceof _o)){var a=o;Or("exiting due to exception: "+a)}}var nn,sn;q?(N?J=vu().dirname(J)+"/":J=__dirname+"/",Oe=function(a,u){return nn||(nn=ef()),sn||(sn=vu()),a=sn.normalize(a),nn.readFileSync(a,u?null:"utf8")},pt=function(a){var u=Oe(a,!0);return u.buffer||(u=new Uint8Array(u)),df(u.buffer),u},Ht=function(a,u,l){nn||(nn=ef()),sn||(sn=vu()),a=sn.normalize(a),nn.readFile(a,function(d,f){d?l(d):u(f.buffer)})},process.argv.length>1&&(v=process.argv[1].replace(/\\/g,"/")),_=process.argv.slice(2),process.on("uncaughtException",function(o){if(!(o instanceof _o))throw o}),process.on("unhandledRejection",function(o){throw o}),B=function(o,a){if(ju())throw process.exitCode=o,a;_w(a),process.exit(o)},t.inspect=function(){return"[Emscripten Module object]"}):(O||N)&&(N?J=self.location.href:typeof document!="undefined"&&document.currentScript&&(J=document.currentScript.src),i&&(J=i),J.indexOf("blob:")!==0?J=J.substr(0,J.replace(/[?#].*/,"").lastIndexOf("/")+1):J="",Oe=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.send(null),a.responseText},N&&(pt=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),Ht=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)},le=function(o){document.title=o});var mw=t.print||console.log.bind(console),Or=t.printErr||console.warn.bind(console);for(c in s)s.hasOwnProperty(c)&&(t[c]=s[c]);s=null,t.arguments&&(_=t.arguments),t.thisProgram&&(v=t.thisProgram),t.quit&&(B=t.quit);var lf=0,ot=function(o){lf=o},bw=function(){return lf},ds;t.wasmBinary&&(ds=t.wasmBinary);var gw=t.noExitRuntime||!0;typeof WebAssembly!="object"&&ri("no native wasm support detected");var ro,W=!1,no;function df(o,a){o||ri("Assertion failed: "+a)}function vw(o){var a=t["_"+o];return df(a,"Cannot call unknown function "+o+", make sure it is exported"),a}function ww(o,a,u,l,d){var f={string:function(P){var se=0;if(P!=null&&P!==0){var me=(P.length<<2)+1;se=Au(me),jw(P,se,me)}return se},array:function(P){var se=Au(P.length);return yf(P,se),se}};function h(P){return a==="string"?so(P):a==="boolean"?Boolean(P):P}var p=vw(o),y=[],m=0;if(l)for(var g=0;g<l.length;g++){var w=f[u[g]];w?(m===0&&(m=j()),y[g]=w(l[g])):y[g]=l[g]}var A=p.apply(null,y);function E(P){return m!==0&&I(m),h(P)}return A=E(A),A}var ff=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function hf(o,a,u){for(var l=a+u,d=a;o[d]&&!(d>=l);)++d;if(d-a>16&&o.subarray&&ff)return ff.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 so(o,a){return o?hf(on,o,a):""}function pf(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 jw(o,a,u){return pf(o,on,a,u)}function Iw(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 yf(o,a){ii.set(o,a)}function Tw(o,a,u){for(var l=0;l<o.length;++l)ii[a++>>0]=o.charCodeAt(l);u||(ii[a>>0]=0)}function Bw(o,a){return o%a>0&&(o+=a-o%a),o}var _f,ii,on,Sw,Aw,fe,Ow,Dw,Fw;function mf(o){_f=o,t.HEAP8=ii=new Int8Array(o),t.HEAP16=Sw=new Int16Array(o),t.HEAP32=fe=new Int32Array(o),t.HEAPU8=on=new Uint8Array(o),t.HEAPU16=Aw=new Uint16Array(o),t.HEAPU32=Ow=new Uint32Array(o),t.HEAPF32=Dw=new Float32Array(o),t.HEAPF64=Fw=new Float64Array(o)}var pU=t.INITIAL_MEMORY||16777216,G,bf=[],gf=[],Ew=[],vf=[],Rw=!1,Cw=!1,Uw=0;function ju(){return gw||Uw>0}function kw(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)Lw(t.preRun.shift());oo(bf)}function Mw(){Rw=!0,oo(gf)}function Pw(){oo(Ew)}function Vw(){Cw=!0}function Nw(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)qw(t.postRun.shift());oo(vf)}function Lw(o){bf.unshift(o)}function xw(o){gf.unshift(o)}function qw(o){vf.unshift(o)}var Dr=0,Iu=null,fs=null;function Ww(o){Dr++,t.monitorRunDependencies&&t.monitorRunDependencies(Dr)}function zw(o){if(Dr--,t.monitorRunDependencies&&t.monitorRunDependencies(Dr),Dr==0&&(Iu!==null&&(clearInterval(Iu),Iu=null),fs)){var a=fs;fs=null,a()}}t.preloadedImages={},t.preloadedAudios={};function ri(o){t.onAbort&&t.onAbort(o),o="Aborted("+o+")",Or(o),W=!0,no=1,o+=". Build with -s ASSERTIONS=1 for more info.";var a=new WebAssembly.RuntimeError(o);throw n(a),a}var Hw="data:application/octet-stream;base64,";function wf(o){return o.startsWith(Hw)}var Yt;Yt="duckdb_wasm.wasm",wf(Yt)||(Yt=ke(Yt));function jf(o){try{if(o==Yt&&ds)return new Uint8Array(ds);if(pt)return pt(o);throw"both async and sync fetching of the wasm failed"}catch(a){ri(a)}}function Yw(){return!ds&&(O||N)&&typeof fetch=="function"?fetch(Yt,{credentials:"same-origin"}).then(function(o){if(!o.ok)throw"failed to load wasm binary file at '"+Yt+"'";return o.arrayBuffer()}).catch(function(){return jf(Yt)}):Promise.resolve().then(function(){return jf(Yt)})}function Gw(){var o={a:l0};function a(h,p){var y=h.exports;t.asm=y,ro=t.asm.Ae,mf(ro.buffer),G=t.asm.De,xw(t.asm.Be),zw("wasm-instantiate")}Ww("wasm-instantiate");function u(h){a(h.instance)}function l(h){return Yw().then(function(p){return WebAssembly.instantiate(p,o)}).then(function(p){return p}).then(h,function(p){Or("failed to asynchronously prepare wasm: "+p),ri(p)})}function d(){return!ds&&typeof WebAssembly.instantiateStreaming=="function"&&!wf(Yt)&&typeof fetch=="function"?fetch(Yt,{credentials:"same-origin"}).then(function(h){var p=WebAssembly.instantiateStreaming(h,o);return p.then(u,function(y){return Or("wasm streaming compile failed: "+y),Or("falling back to ArrayBuffer instantiation"),l(u)})}):l(u)}if(t.instantiateWasm)try{var f=t.instantiateWasm(o,a);return f}catch(h){return Or("Module.instantiateWasm callback failed with error: "+h),!1}return d().catch(n),{}}function oo(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?G.get(u)():G.get(u)(a.arg):u(a.arg===void 0?null:a.arg)}}function Kw(o){if(o instanceof _o||o=="unwind")return no;B(1,o)}function $w(o){return Ou(o+16)+16}function Fr(o){this.excPtr=o,this.ptr=o-16,this.set_type=function(a){fe[this.ptr+4>>2]=a},this.get_type=function(){return fe[this.ptr+4>>2]},this.set_destructor=function(a){fe[this.ptr+8>>2]=a},this.get_destructor=function(){return fe[this.ptr+8>>2]},this.set_refcount=function(a){fe[this.ptr>>2]=a},this.set_caught=function(a){a=a?1:0,ii[this.ptr+12>>0]=a},this.get_caught=function(){return ii[this.ptr+12>>0]!=0},this.set_rethrown=function(a){a=a?1:0,ii[this.ptr+13>>0]=a},this.get_rethrown=function(){return ii[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=fe[this.ptr>>2];fe[this.ptr>>2]=a+1},this.release_ref=function(){var a=fe[this.ptr>>2];return fe[this.ptr>>2]=a-1,a===1}}function an(o){this.free=function(){Du(this.ptr),this.ptr=0},this.set_base_ptr=function(a){fe[this.ptr>>2]=a},this.get_base_ptr=function(){return fe[this.ptr>>2]},this.set_adjusted_ptr=function(a){fe[this.ptr+4>>2]=a},this.get_adjusted_ptr_addr=function(){return this.ptr+4},this.get_adjusted_ptr=function(){return fe[this.ptr+4>>2]},this.get_exception_ptr=function(){var a=Bf(this.get_exception_info().get_type());if(a)return fe[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 Fr(this.get_base_ptr())},o===void 0?(this.ptr=Ou(8),this.set_adjusted_ptr(0)):this.ptr=o}var ao=[];function Jw(o){o.add_ref()}var uo=0;function Qw(o){var a=new an(o),u=a.get_exception_info();return u.get_caught()||(u.set_caught(!0),uo--),u.set_rethrown(!1),ao.push(a),Jw(u),a.get_exception_ptr()}var Ai=0;function If(o){return Du(new Fr(o).ptr)}function Zw(o){if(o.release_ref()&&!o.get_rethrown()){var a=o.get_destructor();a&&G.get(a)(o.excPtr),If(o.excPtr)}}function Xw(){T(0);var o=ao.pop();Zw(o.get_exception_info()),o.free(),Ai=0}function ej(o){var a=new an(o),u=a.get_base_ptr();throw Ai||(Ai=u),a.free(),u}function tj(){var o=Ai;if(!o)return ot(0),0|0;var a=new Fr(o),u=a.get_type(),l=new an;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ot(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(ps(h,u,l.get_adjusted_ptr_addr()))return ot(h),l.ptr|0}return ot(u),l.ptr|0}function ij(){var o=Ai;if(!o)return ot(0),0|0;var a=new Fr(o),u=a.get_type(),l=new an;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ot(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(ps(h,u,l.get_adjusted_ptr_addr()))return ot(h),l.ptr|0}return ot(u),l.ptr|0}function rj(){var o=Ai;if(!o)return ot(0),0|0;var a=new Fr(o),u=a.get_type(),l=new an;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ot(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(ps(h,u,l.get_adjusted_ptr_addr()))return ot(h),l.ptr|0}return ot(u),l.ptr|0}function nj(){var o=Ai;if(!o)return ot(0),0|0;var a=new Fr(o),u=a.get_type(),l=new an;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ot(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(ps(h,u,l.get_adjusted_ptr_addr()))return ot(h),l.ptr|0}return ot(u),l.ptr|0}function sj(){var o=ao.pop();o||ri("no exception to throw");var a=o.get_exception_info(),u=o.get_base_ptr();throw a.get_rethrown()?o.free():(ao.push(o),a.set_rethrown(!0),a.set_caught(!1),uo++),Ai=u,u}function oj(o,a,u){var l=new Fr(o);throw l.init(a,u),Ai=o,uo++,o}function aj(){return uo}var it={mappings:{},buffers:[null,[],[]],printChar:function(o,a){var u=it.buffers[o];a===0||a===10?((o===1?mw:Or)(hf(u,0)),u.length=0):u.push(a)},varargs:void 0,get:function(){it.varargs+=4;var o=fe[it.varargs-4>>2];return o},getStr:function(o){var a=so(o);return a},get64:function(o,a){return o}};function uj(o,a){return o=it.getStr(o),it.doAccess(o,a)}function cj(o){return fe[Tf()>>2]=o,o}function lj(o,a,u){return it.varargs=u,0}function dj(o,a){}function fj(o,a,u,l){}function hj(o,a,u){}function pj(){return 42}function yj(o,a,u){return it.varargs=u,0}function _j(o,a,u){return 0}function mj(o,a){return o=it.getStr(o),it.doMkdir(o,a)}function bj(o,a,u){it.varargs=u}function gj(o,a){}function vj(o){}function wj(o,a){}function jj(o){}function Ij(o,a){ri("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Tj(o,a){ri("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Bj(){ri("")}var Tu;q?Tu=function(){var o=process.hrtime();return o[0]*1e3+o[1]/1e6}:Tu=function(){return performance.now()};var Sj=!0;function Aj(o,a){var u;if(o===0)u=Date.now();else if((o===1||o===4)&&Sj)u=Tu();else return cj(28),-1;return fe[a>>2]=u/1e3|0,fe[a+4>>2]=u%1e3*1e3*1e3|0,0}function Oj(o,a){return globalThis.DUCKDB_RUNTIME.createDirectory(t,o,a)}function Dj(o,a){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,o,a)}function Fj(o,a){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,o,a)}function Ej(o,a){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,o,a)}function Rj(o){return globalThis.DUCKDB_RUNTIME.closeFile(t,o)}function Cj(o,a){return globalThis.DUCKDB_RUNTIME.checkFile(t,o,a)}function Uj(o){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,o)}function kj(o,a,u,l){return globalThis.DUCKDB_RUNTIME.moveFile(t,o,a,u,l)}function Mj(o){return globalThis.DUCKDB_RUNTIME.openFile(t,o)}function Pj(o,a,u,l){return globalThis.DUCKDB_RUNTIME.readFile(t,o,a,u,l)}function Vj(o,a){return globalThis.DUCKDB_RUNTIME.truncateFile(t,o,a)}function Nj(o,a,u,l){return globalThis.DUCKDB_RUNTIME.writeFile(t,o,a,u,l)}function Lj(o,a){return globalThis.DUCKDB_RUNTIME.glob(t,o,a)}function xj(o){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,o)}function qj(){return 2147483648}function Wj(o,a,u){on.copyWithin(o,a,a+u)}function zj(o){try{return ro.grow(o-_f.byteLength+65535>>>16),mf(ro.buffer),1}catch(a){}}function Hj(o){var a=on.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,Bw(Math.max(o,d),65536)),h=zj(f);if(h)return!0}return!1}var Bu={};function Yj(){return v||"./this.program"}function hs(){if(!hs.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,_:Yj()};for(var u in Bu)Bu[u]===void 0?delete a[u]:a[u]=Bu[u];var l=[];for(var u in a)l.push(u+"="+a[u]);hs.strings=l}return hs.strings}function Gj(o,a){var u=0;return hs().forEach(function(l,d){var f=a+u;fe[o+d*4>>2]=f,Tw(l,f),u+=l.length+1}),0}function Kj(o,a){var u=hs();fe[o>>2]=u.length;var l=0;return u.forEach(function(d){l+=d.length+1}),fe[a>>2]=l,0}function $j(o){return 0}function Jj(o,a){var u=o==1||o==2?2:ri();return ii[a>>0]=u,0}function Qj(o,a,u,l,d,f){var h=it.getStreamFromFD(o),p=it.doReadv(h,a,u,l);return fe[f>>2]=p,0}function Zj(o,a,u,l,d,f){var h=it.getStreamFromFD(o),p=it.doWritev(h,a,u,l);return fe[f>>2]=p,0}function Xj(o,a,u,l){var d=it.getStreamFromFD(o),f=it.doReadv(d,a,u);return fe[l>>2]=f,0}function e0(o,a,u,l,d){}function t0(o){var a=it.getStreamFromFD(o);return a.stream_ops&&a.stream_ops.fsync?-a.stream_ops.fsync(a):0}function i0(o,a,u,l){for(var d=0,f=0;f<u;f++){for(var h=fe[a+f*8>>2],p=fe[a+(f*8+4)>>2],y=0;y<p;y++)it.printChar(o,on[h+y]);d+=p}return fe[l>>2]=d,0}function r0(){return bw()}function n0(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var o=new Uint8Array(1);return function(){return crypto.getRandomValues(o),o[0]}}else if(q)try{var a=j1("crypto");return function(){return a.randomBytes(1)[0]}}catch(u){}return function(){ri("randomDevice")}}function co(o,a){co.randomDevice||(co.randomDevice=n0());for(var u=0;u<a;u++)ii[o+u>>0]=co.randomDevice();return 0}function s0(o){return o}function o0(o){ot(o)}function lo(o){return o%4==0&&(o%100!=0||o%400==0)}function Su(o,a){for(var u=0,l=0;l<=a;u+=o[l++]);return u}var fo=[31,29,31,30,31,30,31,31,30,31,30,31],ho=[31,28,31,30,31,30,31,31,30,31,30,31];function po(o,a){for(var u=new Date(o.getTime());a>0;){var l=lo(u.getFullYear()),d=u.getMonth(),f=(l?fo:ho)[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 a0(o,a,u,l){var d=fe[l+40>>2],f={tm_sec:fe[l>>2],tm_min:fe[l+4>>2],tm_hour:fe[l+8>>2],tm_mday:fe[l+12>>2],tm_mon:fe[l+16>>2],tm_year:fe[l+20>>2],tm_wday:fe[l+24>>2],tm_yday:fe[l+28>>2],tm_isdst:fe[l+32>>2],tm_gmtoff:fe[l+36>>2],tm_zone:d?so(d):""},h=so(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 w(U,$,Ce){for(var ge=typeof U=="number"?U.toString():U||"";ge.length<$;)ge=Ce[0]+ge;return ge}function A(U,$){return w(U,$,"0")}function E(U,$){function Ce(yt){return yt<0?-1:yt>0?1:0}var ge;return(ge=Ce(U.getFullYear()-$.getFullYear()))===0&&(ge=Ce(U.getMonth()-$.getMonth()))===0&&(ge=Ce(U.getDate()-$.getDate())),ge}function P(U){switch(U.getDay()){case 0:return new Date(U.getFullYear()-1,11,29);case 1:return U;case 2:return new Date(U.getFullYear(),0,3);case 3:return new Date(U.getFullYear(),0,2);case 4:return new Date(U.getFullYear(),0,1);case 5:return new Date(U.getFullYear()-1,11,31);case 6:return new Date(U.getFullYear()-1,11,30)}}function se(U){var $=po(new Date(U.tm_year+1900,0,1),U.tm_yday),Ce=new Date($.getFullYear(),0,4),ge=new Date($.getFullYear()+1,0,4),yt=P(Ce),zi=P(ge);return E(yt,$)<=0?E(zi,$)<=0?$.getFullYear()+1:$.getFullYear():$.getFullYear()-1}var me={"%a":function(U){return m[U.tm_wday].substring(0,3)},"%A":function(U){return m[U.tm_wday]},"%b":function(U){return g[U.tm_mon].substring(0,3)},"%B":function(U){return g[U.tm_mon]},"%C":function(U){var $=U.tm_year+1900;return A($/100|0,2)},"%d":function(U){return A(U.tm_mday,2)},"%e":function(U){return w(U.tm_mday,2," ")},"%g":function(U){return se(U).toString().substring(2)},"%G":function(U){return se(U)},"%H":function(U){return A(U.tm_hour,2)},"%I":function(U){var $=U.tm_hour;return $==0?$=12:$>12&&($-=12),A($,2)},"%j":function(U){return A(U.tm_mday+Su(lo(U.tm_year+1900)?fo:ho,U.tm_mon-1),3)},"%m":function(U){return A(U.tm_mon+1,2)},"%M":function(U){return A(U.tm_min,2)},"%n":function(){return`
18
- `},"%p":function(U){return U.tm_hour>=0&&U.tm_hour<12?"AM":"PM"},"%S":function(U){return A(U.tm_sec,2)},"%t":function(){return" "},"%u":function(U){return U.tm_wday||7},"%U":function(U){var $=new Date(U.tm_year+1900,0,1),Ce=$.getDay()===0?$:po($,7-$.getDay()),ge=new Date(U.tm_year+1900,U.tm_mon,U.tm_mday);if(E(Ce,ge)<0){var yt=Su(lo(ge.getFullYear())?fo:ho,ge.getMonth()-1)-31,zi=31-Ce.getDate(),Er=zi+yt+ge.getDate();return A(Math.ceil(Er/7),2)}return E(Ce,$)===0?"01":"00"},"%V":function(U){var $=new Date(U.tm_year+1900,0,4),Ce=new Date(U.tm_year+1901,0,4),ge=P($),yt=P(Ce),zi=po(new Date(U.tm_year+1900,0,1),U.tm_yday);if(E(zi,ge)<0)return"53";if(E(yt,zi)<=0)return"01";var Er;return ge.getFullYear()<U.tm_year+1900?Er=U.tm_yday+32-ge.getDate():Er=U.tm_yday+1-ge.getDate(),A(Math.ceil(Er/7),2)},"%w":function(U){return U.tm_wday},"%W":function(U){var $=new Date(U.tm_year,0,1),Ce=$.getDay()===1?$:po($,$.getDay()===0?1:7-$.getDay()+1),ge=new Date(U.tm_year+1900,U.tm_mon,U.tm_mday);if(E(Ce,ge)<0){var yt=Su(lo(ge.getFullYear())?fo:ho,ge.getMonth()-1)-31,zi=31-Ce.getDate(),Er=zi+yt+ge.getDate();return A(Math.ceil(Er/7),2)}return E(Ce,$)===0?"01":"00"},"%y":function(U){return(U.tm_year+1900).toString().substring(2)},"%Y":function(U){return U.tm_year+1900},"%z":function(U){var $=U.tm_gmtoff,Ce=$>=0;return $=Math.abs($)/60,$=$/60*100+$%60,(Ce?"+":"-")+String("0000"+$).slice(-4)},"%Z":function(U){return U.tm_zone},"%%":function(){return"%"}};for(var y in me)h.includes(y)&&(h=h.replace(new RegExp(y,"g"),me[y](f)));var Be=c0(h,!1);return Be.length>a?0:(yf(Be,o),Be.length-1)}function u0(o,a,u,l){return a0(o,a,u,l)}function c0(o,a,u){var l=u>0?u:Iw(o)+1,d=new Array(l),f=pf(o,d,0,d.length);return a&&(d.length=f),d}var l0={i:$w,A:Qw,G:Xw,b:tj,n:ij,I:rj,pa:nj,j:If,ua:sj,u:oj,E:aj,c:ej,Ga:uj,ea:lj,Ia:dj,Ha:fj,Ea:hj,ia:pj,Na:yj,Aa:_j,Fa:mj,sa:bj,Ca:gj,ja:vj,la:wj,ka:jj,La:Ij,Ka:Tj,ga:Bj,qa:Aj,xe:Oj,ye:Dj,ve:Fj,we:Ej,ha:Rj,te:Cj,wa:Uj,ue:kj,ya:Mj,$:Pj,ze:Vj,xa:Nj,se:Lj,re:xj,Oa:qj,Sa:Wj,Kc:Hj,Qa:Gj,Ra:Kj,Y:$j,Ma:Jj,mb:Qj,lb:Zj,ra:Xj,Md:e0,Da:t0,da:i0,a:r0,Ja:co,W:LI,K:BI,R:rI,sc:qB,X:NI,M:VI,va:iI,tc:xB,t:pI,U:HI,rb:uI,Z:vI,V:zI,Cb:aI,e:$0,aa:MI,C:wI,Hb:SS,d:J0,fa:SI,ma:xI,h:Z0,Fb:OS,l:tI,ta:OI,o:X0,z:dI,w:fI,Q:lI,x:yI,v:mI,p:EI,L:kI,J:UI,Vb:fS,Yb:cS,$b:oS,hc:XB,Wb:dS,Gb:AS,rc:WB,Zb:uS,ic:ZB,ne:$I,Kd:BT,Dd:RT,be:aT,Mb:wS,cd:sB,Ua:c1,Ta:l1,Ud:_T,Jd:ST,vb:PS,Sc:mB,Td:mT,yc:MB,Nb:vS,Eb:DS,ie:eT,Qd:vT,uc:LB,Ed:ET,od:GT,Bd:UT,hb:KS,Rd:gT,ec:tS,Od:jT,bd:oB,cb:XS,Va:u1,ed:rB,Vd:yT,xd:VT,$a:i1,tb:NS,Fd:FT,db:ZS,Db:FS,Pd:wT,yd:PT,ad:aB,Ad:kT,zd:MT,ud:xT,dc:iS,Tb:pS,ge:iT,_d:lT,jc:QB,Zd:dT,Ld:TT,mc:KB,lc:$B,fe:rT,$d:cT,Id:AT,qe:YI,Ac:UB,kc:JB,Xb:lS,zc:kB,pc:HB,Pc:vB,sb:LS,vc:NB,qc:zB,ld:JT,xc:PB,oc:YB,xb:kS,gd:tB,Sb:yS,id:XT,Yc:dB,Jc:BB,Ic:SB,Gc:OB,Hc:AB,md:$T,Ab:RS,Vc:pB,Wa:a1,bc:nS,jb:YS,Tc:_B,nc:GB,Pb:bS,s:G0,k:Q0,B:TI,ba:FI,ob:WS,D:II,ca:DI,pb:qS,f:K0,T:sI,P:jI,fc:nI,g:oI,m:eI,Ba:qI,q:hI,r:cI,na:PI,y:_I,O:AI,N:CI,S:bI,za:WI,oa:RI,_:gI,wd:NT,nb:zS,dd:nB,Ub:hS,wc:VB,gc:eS,Ib:BS,gb:$S,le:QI,Sd:bT,ub:VS,ab:t1,sd:WT,td:qT,Qb:mS,pd:YT,Kb:IS,Jb:TS,Lc:TB,ke:ZI,qd:HT,vd:LT,Rc:bB,Dc:EB,yb:US,zb:CS,eb:QS,ee:nT,nd:KT,Lb:jS,Bc:CB,Oc:wB,je:XI,bb:e1,oe:KI,Xd:hT,Yd:fT,Cd:CT,wb:MS,Xc:fB,Fc:DB,Ec:FB,Wc:hB,fb:JS,hd:eB,$c:uB,Xa:o1,Cc:RB,ib:GS,pe:GI,Nd:IT,Zc:lB,Mc:IB,ce:oT,_b:aS,me:JI,ae:uT,_c:cB,Hd:OT,Gd:DT,Uc:yB,qb:xS,fd:iB,cc:rS,he:tT,_a:r1,Nc:jB,kb:HS,Wd:pT,Qc:gB,Ya:s1,Za:n1,ac:sS,de:sT,kd:QT,Ob:gS,Rb:_S,Bb:ES,rd:zT,jd:ZT,H:s0,F:o0,Pa:u0},yU=Gw(),d0=t.___wasm_call_ctors=function(){return(d0=t.___wasm_call_ctors=t.asm.Be).apply(null,arguments)},f0=t._main=function(){return(f0=t._main=t.asm.Ce).apply(null,arguments)},h0=t._duckdb_web_fs_glob_add_path=function(){return(h0=t._duckdb_web_fs_glob_add_path=t.asm.Ee).apply(null,arguments)},p0=t._duckdb_web_clear_response=function(){return(p0=t._duckdb_web_clear_response=t.asm.Fe).apply(null,arguments)},y0=t._duckdb_web_fail_with=function(){return(y0=t._duckdb_web_fail_with=t.asm.Ge).apply(null,arguments)},_0=t._duckdb_web_reset=function(){return(_0=t._duckdb_web_reset=t.asm.He).apply(null,arguments)},m0=t._duckdb_web_connect=function(){return(m0=t._duckdb_web_connect=t.asm.Ie).apply(null,arguments)},b0=t._duckdb_web_disconnect=function(){return(b0=t._duckdb_web_disconnect=t.asm.Je).apply(null,arguments)},g0=t._duckdb_web_flush_files=function(){return(g0=t._duckdb_web_flush_files=t.asm.Ke).apply(null,arguments)},v0=t._duckdb_web_flush_file=function(){return(v0=t._duckdb_web_flush_file=t.asm.Le).apply(null,arguments)},w0=t._duckdb_web_open=function(){return(w0=t._duckdb_web_open=t.asm.Me).apply(null,arguments)},j0=t._duckdb_web_collect_file_stats=function(){return(j0=t._duckdb_web_collect_file_stats=t.asm.Ne).apply(null,arguments)},I0=t._duckdb_web_export_file_stats=function(){return(I0=t._duckdb_web_export_file_stats=t.asm.Oe).apply(null,arguments)},T0=t._duckdb_web_fs_drop_file=function(){return(T0=t._duckdb_web_fs_drop_file=t.asm.Pe).apply(null,arguments)},B0=t._duckdb_web_fs_drop_files=function(){return(B0=t._duckdb_web_fs_drop_files=t.asm.Qe).apply(null,arguments)},S0=t._duckdb_web_fs_glob_file_infos=function(){return(S0=t._duckdb_web_fs_glob_file_infos=t.asm.Re).apply(null,arguments)},A0=t._duckdb_web_fs_get_file_info_by_id=function(){return(A0=t._duckdb_web_fs_get_file_info_by_id=t.asm.Se).apply(null,arguments)},O0=t._duckdb_web_fs_get_file_info_by_name=function(){return(O0=t._duckdb_web_fs_get_file_info_by_name=t.asm.Te).apply(null,arguments)},D0=t._duckdb_web_fs_set_file_descriptor=function(){return(D0=t._duckdb_web_fs_set_file_descriptor=t.asm.Ue).apply(null,arguments)},F0=t._duckdb_web_fs_register_file_url=function(){return(F0=t._duckdb_web_fs_register_file_url=t.asm.Ve).apply(null,arguments)},E0=t._duckdb_web_fs_register_file_buffer=function(){return(E0=t._duckdb_web_fs_register_file_buffer=t.asm.We).apply(null,arguments)},R0=t._duckdb_web_copy_file_to_buffer=function(){return(R0=t._duckdb_web_copy_file_to_buffer=t.asm.Xe).apply(null,arguments)},C0=t._duckdb_web_copy_file_to_path=function(){return(C0=t._duckdb_web_copy_file_to_path=t.asm.Ye).apply(null,arguments)},U0=t._duckdb_web_get_version=function(){return(U0=t._duckdb_web_get_version=t.asm.Ze).apply(null,arguments)},k0=t._duckdb_web_get_feature_flags=function(){return(k0=t._duckdb_web_get_feature_flags=t.asm._e).apply(null,arguments)},M0=t._duckdb_web_tokenize=function(){return(M0=t._duckdb_web_tokenize=t.asm.$e).apply(null,arguments)},P0=t._duckdb_web_prepared_create=function(){return(P0=t._duckdb_web_prepared_create=t.asm.af).apply(null,arguments)},V0=t._duckdb_web_prepared_close=function(){return(V0=t._duckdb_web_prepared_close=t.asm.bf).apply(null,arguments)},N0=t._duckdb_web_prepared_run=function(){return(N0=t._duckdb_web_prepared_run=t.asm.cf).apply(null,arguments)},L0=t._duckdb_web_prepared_send=function(){return(L0=t._duckdb_web_prepared_send=t.asm.df).apply(null,arguments)},x0=t._duckdb_web_query_run=function(){return(x0=t._duckdb_web_query_run=t.asm.ef).apply(null,arguments)},q0=t._duckdb_web_query_send=function(){return(q0=t._duckdb_web_query_send=t.asm.ff).apply(null,arguments)},W0=t._duckdb_web_query_fetch_results=function(){return(W0=t._duckdb_web_query_fetch_results=t.asm.gf).apply(null,arguments)},z0=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(z0=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.hf).apply(null,arguments)},H0=t._duckdb_web_insert_csv_from_path=function(){return(H0=t._duckdb_web_insert_csv_from_path=t.asm.jf).apply(null,arguments)},Y0=t._duckdb_web_insert_json_from_path=function(){return(Y0=t._duckdb_web_insert_json_from_path=t.asm.kf).apply(null,arguments)},Tf=t.___errno_location=function(){return(Tf=t.___errno_location=t.asm.lf).apply(null,arguments)},j=t.stackSave=function(){return(j=t.stackSave=t.asm.mf).apply(null,arguments)},I=t.stackRestore=function(){return(I=t.stackRestore=t.asm.nf).apply(null,arguments)},Au=t.stackAlloc=function(){return(Au=t.stackAlloc=t.asm.of).apply(null,arguments)},T=t._setThrew=function(){return(T=t._setThrew=t.asm.pf).apply(null,arguments)},ps=t.___cxa_can_catch=function(){return(ps=t.___cxa_can_catch=t.asm.qf).apply(null,arguments)},Bf=t.___cxa_is_pointer_type=function(){return(Bf=t.___cxa_is_pointer_type=t.asm.rf).apply(null,arguments)},Ou=t._malloc=function(){return(Ou=t._malloc=t.asm.sf).apply(null,arguments)},Du=t._free=function(){return(Du=t._free=t.asm.tf).apply(null,arguments)},Sf=t.dynCall_viiij=function(){return(Sf=t.dynCall_viiij=t.asm.uf).apply(null,arguments)},Af=t.dynCall_viiijjj=function(){return(Af=t.dynCall_viiijjj=t.asm.vf).apply(null,arguments)},Of=t.dynCall_iiij=function(){return(Of=t.dynCall_iiij=t.asm.wf).apply(null,arguments)},Df=t.dynCall_vijijj=function(){return(Df=t.dynCall_vijijj=t.asm.xf).apply(null,arguments)},Ff=t.dynCall_iji=function(){return(Ff=t.dynCall_iji=t.asm.yf).apply(null,arguments)},Ef=t.dynCall_vij=function(){return(Ef=t.dynCall_vij=t.asm.zf).apply(null,arguments)},Rf=t.dynCall_viijj=function(){return(Rf=t.dynCall_viijj=t.asm.Af).apply(null,arguments)},Cf=t.dynCall_ji=function(){return(Cf=t.dynCall_ji=t.asm.Bf).apply(null,arguments)},Uf=t.dynCall_viiijj=function(){return(Uf=t.dynCall_viiijj=t.asm.Cf).apply(null,arguments)},kf=t.dynCall_vijjj=function(){return(kf=t.dynCall_vijjj=t.asm.Df).apply(null,arguments)},Mf=t.dynCall_jii=function(){return(Mf=t.dynCall_jii=t.asm.Ef).apply(null,arguments)},Pf=t.dynCall_jiiii=function(){return(Pf=t.dynCall_jiiii=t.asm.Ff).apply(null,arguments)},Vf=t.dynCall_iiiiij=function(){return(Vf=t.dynCall_iiiiij=t.asm.Gf).apply(null,arguments)},Nf=t.dynCall_iiiiijj=function(){return(Nf=t.dynCall_iiiiijj=t.asm.Hf).apply(null,arguments)},Lf=t.dynCall_viijii=function(){return(Lf=t.dynCall_viijii=t.asm.If).apply(null,arguments)},xf=t.dynCall_viiji=function(){return(xf=t.dynCall_viiji=t.asm.Jf).apply(null,arguments)},qf=t.dynCall_vijj=function(){return(qf=t.dynCall_vijj=t.asm.Kf).apply(null,arguments)},Wf=t.dynCall_viji=function(){return(Wf=t.dynCall_viji=t.asm.Lf).apply(null,arguments)},zf=t.dynCall_iij=function(){return(zf=t.dynCall_iij=t.asm.Mf).apply(null,arguments)},Hf=t.dynCall_viij=function(){return(Hf=t.dynCall_viij=t.asm.Nf).apply(null,arguments)},Yf=t.dynCall_jiji=function(){return(Yf=t.dynCall_jiji=t.asm.Of).apply(null,arguments)},Gf=t.dynCall_viiiij=function(){return(Gf=t.dynCall_viiiij=t.asm.Pf).apply(null,arguments)},Kf=t.dynCall_iiiij=function(){return(Kf=t.dynCall_iiiij=t.asm.Qf).apply(null,arguments)},$f=t.dynCall_iiiiiji=function(){return($f=t.dynCall_iiiiiji=t.asm.Rf).apply(null,arguments)},Jf=t.dynCall_iiiji=function(){return(Jf=t.dynCall_iiiji=t.asm.Sf).apply(null,arguments)},Qf=t.dynCall_iiiiji=function(){return(Qf=t.dynCall_iiiiji=t.asm.Tf).apply(null,arguments)},Zf=t.dynCall_jiii=function(){return(Zf=t.dynCall_jiii=t.asm.Uf).apply(null,arguments)},Xf=t.dynCall_jij=function(){return(Xf=t.dynCall_jij=t.asm.Vf).apply(null,arguments)},eh=t.dynCall_j=function(){return(eh=t.dynCall_j=t.asm.Wf).apply(null,arguments)},th=t.dynCall_viijij=function(){return(th=t.dynCall_viijij=t.asm.Xf).apply(null,arguments)},ih=t.dynCall_iijjijj=function(){return(ih=t.dynCall_iijjijj=t.asm.Yf).apply(null,arguments)},rh=t.dynCall_viiiijiiiii=function(){return(rh=t.dynCall_viiiijiiiii=t.asm.Zf).apply(null,arguments)},nh=t.dynCall_viiiijiiii=function(){return(nh=t.dynCall_viiiijiiii=t.asm._f).apply(null,arguments)},sh=t.dynCall_viiijii=function(){return(sh=t.dynCall_viiijii=t.asm.$f).apply(null,arguments)},oh=t.dynCall_viiiiiij=function(){return(oh=t.dynCall_viiiiiij=t.asm.ag).apply(null,arguments)},ah=t.dynCall_iiijiii=function(){return(ah=t.dynCall_iiijiii=t.asm.bg).apply(null,arguments)},uh=t.dynCall_iiiiijii=function(){return(uh=t.dynCall_iiiiijii=t.asm.cg).apply(null,arguments)},ch=t.dynCall_viijiii=function(){return(ch=t.dynCall_viijiii=t.asm.dg).apply(null,arguments)},lh=t.dynCall_iiijiij=function(){return(lh=t.dynCall_iiijiij=t.asm.eg).apply(null,arguments)},dh=t.dynCall_vijiii=function(){return(dh=t.dynCall_vijiii=t.asm.fg).apply(null,arguments)},fh=t.dynCall_iijjiii=function(){return(fh=t.dynCall_iijjiii=t.asm.gg).apply(null,arguments)},hh=t.dynCall_iijjiiii=function(){return(hh=t.dynCall_iijjiiii=t.asm.hg).apply(null,arguments)},ph=t.dynCall_iiji=function(){return(ph=t.dynCall_iiji=t.asm.ig).apply(null,arguments)},yh=t.dynCall_iijji=function(){return(yh=t.dynCall_iijji=t.asm.jg).apply(null,arguments)},_h=t.dynCall_vijiiii=function(){return(_h=t.dynCall_vijiiii=t.asm.kg).apply(null,arguments)},mh=t.dynCall_iijiiii=function(){return(mh=t.dynCall_iijiiii=t.asm.lg).apply(null,arguments)},bh=t.dynCall_vijij=function(){return(bh=t.dynCall_vijij=t.asm.mg).apply(null,arguments)},gh=t.dynCall_iiijjjj=function(){return(gh=t.dynCall_iiijjjj=t.asm.ng).apply(null,arguments)},vh=t.dynCall_iiijiiii=function(){return(vh=t.dynCall_iiijiiii=t.asm.og).apply(null,arguments)},wh=t.dynCall_jiiij=function(){return(wh=t.dynCall_jiiij=t.asm.pg).apply(null,arguments)},jh=t.dynCall_iiiiijjiijj=function(){return(jh=t.dynCall_iiiiijjiijj=t.asm.qg).apply(null,arguments)},Ih=t.dynCall_viijiijji=function(){return(Ih=t.dynCall_viijiijji=t.asm.rg).apply(null,arguments)},Th=t.dynCall_vjjijij=function(){return(Th=t.dynCall_vjjijij=t.asm.sg).apply(null,arguments)},Bh=t.dynCall_vijjji=function(){return(Bh=t.dynCall_vijjji=t.asm.tg).apply(null,arguments)},Sh=t.dynCall_vjjii=function(){return(Sh=t.dynCall_vjjii=t.asm.ug).apply(null,arguments)},Ah=t.dynCall_viiiiiji=function(){return(Ah=t.dynCall_viiiiiji=t.asm.vg).apply(null,arguments)},Oh=t.dynCall_jiiijji=function(){return(Oh=t.dynCall_jiiijji=t.asm.wg).apply(null,arguments)},Dh=t.dynCall_iijj=function(){return(Dh=t.dynCall_iijj=t.asm.xg).apply(null,arguments)},Fh=t.dynCall_iiijjii=function(){return(Fh=t.dynCall_iiijjii=t.asm.yg).apply(null,arguments)},Eh=t.dynCall_iijjii=function(){return(Eh=t.dynCall_iijjii=t.asm.zg).apply(null,arguments)},Rh=t.dynCall_vijii=function(){return(Rh=t.dynCall_vijii=t.asm.Ag).apply(null,arguments)},Ch=t.dynCall_viijjii=function(){return(Ch=t.dynCall_viijjii=t.asm.Bg).apply(null,arguments)},Uh=t.dynCall_viiiijj=function(){return(Uh=t.dynCall_viiiijj=t.asm.Cg).apply(null,arguments)},kh=t.dynCall_jijjij=function(){return(kh=t.dynCall_jijjij=t.asm.Dg).apply(null,arguments)},Mh=t.dynCall_jiijii=function(){return(Mh=t.dynCall_jiijii=t.asm.Eg).apply(null,arguments)},Ph=t.dynCall_jijiii=function(){return(Ph=t.dynCall_jijiii=t.asm.Fg).apply(null,arguments)},Vh=t.dynCall_viijiiiii=function(){return(Vh=t.dynCall_viijiiiii=t.asm.Gg).apply(null,arguments)},Nh=t.dynCall_viijiiij=function(){return(Nh=t.dynCall_viijiiij=t.asm.Hg).apply(null,arguments)},Lh=t.dynCall_vijiiiji=function(){return(Lh=t.dynCall_vijiiiji=t.asm.Ig).apply(null,arguments)},xh=t.dynCall_jiiji=function(){return(xh=t.dynCall_jiiji=t.asm.Jg).apply(null,arguments)},qh=t.dynCall_viiijij=function(){return(qh=t.dynCall_viiijij=t.asm.Kg).apply(null,arguments)},Wh=t.dynCall_viijiijj=function(){return(Wh=t.dynCall_viijiijj=t.asm.Lg).apply(null,arguments)},zh=t.dynCall_viiiiijj=function(){return(zh=t.dynCall_viiiiijj=t.asm.Mg).apply(null,arguments)},Hh=t.dynCall_viiijji=function(){return(Hh=t.dynCall_viiijji=t.asm.Ng).apply(null,arguments)},Yh=t.dynCall_viiiji=function(){return(Yh=t.dynCall_viiiji=t.asm.Og).apply(null,arguments)},Gh=t.dynCall_iiiijiii=function(){return(Gh=t.dynCall_iiiijiii=t.asm.Pg).apply(null,arguments)},Kh=t.dynCall_iiijij=function(){return(Kh=t.dynCall_iiijij=t.asm.Qg).apply(null,arguments)},$h=t.dynCall_iiijji=function(){return($h=t.dynCall_iiijji=t.asm.Rg).apply(null,arguments)},Jh=t.dynCall_viijji=function(){return(Jh=t.dynCall_viijji=t.asm.Sg).apply(null,arguments)},Qh=t.dynCall_iiiijj=function(){return(Qh=t.dynCall_iiiijj=t.asm.Tg).apply(null,arguments)},Zh=t.dynCall_viiijiii=function(){return(Zh=t.dynCall_viiijiii=t.asm.Ug).apply(null,arguments)},Xh=t.dynCall_vijji=function(){return(Xh=t.dynCall_vijji=t.asm.Vg).apply(null,arguments)},ep=t.dynCall_jiiiij=function(){return(ep=t.dynCall_jiiiij=t.asm.Wg).apply(null,arguments)},tp=t.dynCall_jiijiiiii=function(){return(tp=t.dynCall_jiijiiiii=t.asm.Xg).apply(null,arguments)},ip=t.dynCall_jiijiijiii=function(){return(ip=t.dynCall_jiijiijiii=t.asm.Yg).apply(null,arguments)},rp=t.dynCall_jiijjiii=function(){return(rp=t.dynCall_jiijjiii=t.asm.Zg).apply(null,arguments)},np=t.dynCall_jiijijii=function(){return(np=t.dynCall_jiijijii=t.asm._g).apply(null,arguments)},sp=t.dynCall_viiijjij=function(){return(sp=t.dynCall_viiijjij=t.asm.$g).apply(null,arguments)},op=t.dynCall_vijijjiij=function(){return(op=t.dynCall_vijijjiij=t.asm.ah).apply(null,arguments)},ap=t.dynCall_viijjij=function(){return(ap=t.dynCall_viijjij=t.asm.bh).apply(null,arguments)},up=t.dynCall_viiijjiij=function(){return(up=t.dynCall_viiijjiij=t.asm.ch).apply(null,arguments)},cp=t.dynCall_viiiijjjj=function(){return(cp=t.dynCall_viiiijjjj=t.asm.dh).apply(null,arguments)},lp=t.dynCall_viijiiiiij=function(){return(lp=t.dynCall_viijiiiiij=t.asm.eh).apply(null,arguments)},dp=t.dynCall_viijiiiijj=function(){return(dp=t.dynCall_viijiiiijj=t.asm.fh).apply(null,arguments)},fp=t.dynCall_viiijiiiijjj=function(){return(fp=t.dynCall_viiijiiiijjj=t.asm.gh).apply(null,arguments)},hp=t.dynCall_viijijiiiijjj=function(){return(hp=t.dynCall_viijijiiiijjj=t.asm.hh).apply(null,arguments)},pp=t.dynCall_jiiijii=function(){return(pp=t.dynCall_jiiijii=t.asm.ih).apply(null,arguments)},yp=t.dynCall_viiiiijiiii=function(){return(yp=t.dynCall_viiiiijiiii=t.asm.jh).apply(null,arguments)},_p=t.dynCall_iiijii=function(){return(_p=t.dynCall_iiijii=t.asm.kh).apply(null,arguments)},mp=t.dynCall_fiijii=function(){return(mp=t.dynCall_fiijii=t.asm.lh).apply(null,arguments)},bp=t.dynCall_diijii=function(){return(bp=t.dynCall_diijii=t.asm.mh).apply(null,arguments)},gp=t.dynCall_iiiiiiijii=function(){return(gp=t.dynCall_iiiiiiijii=t.asm.nh).apply(null,arguments)},vp=t.dynCall_viiiiji=function(){return(vp=t.dynCall_viiiiji=t.asm.oh).apply(null,arguments)},wp=t.dynCall_jiiiijii=function(){return(wp=t.dynCall_jiiiijii=t.asm.ph).apply(null,arguments)},jp=t.dynCall_jiiiijiiiiiiii=function(){return(jp=t.dynCall_jiiiijiiiiiiii=t.asm.qh).apply(null,arguments)},Ip=t.dynCall_jiiiiijiiii=function(){return(Ip=t.dynCall_jiiiiijiiii=t.asm.rh).apply(null,arguments)},Tp=t.dynCall_jiiijiii=function(){return(Tp=t.dynCall_jiiijiii=t.asm.sh).apply(null,arguments)},Bp=t.dynCall_jj=function(){return(Bp=t.dynCall_jj=t.asm.th).apply(null,arguments)},Sp=t.dynCall_jd=function(){return(Sp=t.dynCall_jd=t.asm.uh).apply(null,arguments)},Ap=t.dynCall_jf=function(){return(Ap=t.dynCall_jf=t.asm.vh).apply(null,arguments)},Op=t.dynCall_iijjjj=function(){return(Op=t.dynCall_iijjjj=t.asm.wh).apply(null,arguments)},Dp=t.dynCall_iiijj=function(){return(Dp=t.dynCall_iiijj=t.asm.xh).apply(null,arguments)},Fp=t.dynCall_vijijiiiijjj=function(){return(Fp=t.dynCall_vijijiiiijjj=t.asm.yh).apply(null,arguments)},Ep=t.dynCall_iiiiiiji=function(){return(Ep=t.dynCall_iiiiiiji=t.asm.zh).apply(null,arguments)},Rp=t.dynCall_iiiiiiiiji=function(){return(Rp=t.dynCall_iiiiiiiiji=t.asm.Ah).apply(null,arguments)},Cp=t.dynCall_jijijjij=function(){return(Cp=t.dynCall_jijijjij=t.asm.Bh).apply(null,arguments)},Up=t.dynCall_vijjij=function(){return(Up=t.dynCall_vijjij=t.asm.Ch).apply(null,arguments)},kp=t.dynCall_viijjj=function(){return(kp=t.dynCall_viijjj=t.asm.Dh).apply(null,arguments)},Mp=t.dynCall_viijjji=function(){return(Mp=t.dynCall_viijjji=t.asm.Eh).apply(null,arguments)},Pp=t.dynCall_iiiiiij=function(){return(Pp=t.dynCall_iiiiiij=t.asm.Fh).apply(null,arguments)},Vp=t.dynCall_iiiiiiiiiiji=function(){return(Vp=t.dynCall_iiiiiiiiiiji=t.asm.Gh).apply(null,arguments)},Np=t.dynCall_jiiiiiii=function(){return(Np=t.dynCall_jiiiiiii=t.asm.Hh).apply(null,arguments)},Lp=t.dynCall_jijj=function(){return(Lp=t.dynCall_jijj=t.asm.Ih).apply(null,arguments)},xp=t.dynCall_viiiijiiiiiiii=function(){return(xp=t.dynCall_viiiijiiiiiiii=t.asm.Jh).apply(null,arguments)},qp=t.dynCall_ij=function(){return(qp=t.dynCall_ij=t.asm.Kh).apply(null,arguments)},Wp=t.dynCall_jjj=function(){return(Wp=t.dynCall_jjj=t.asm.Lh).apply(null,arguments)},zp=t.dynCall_vjii=function(){return(zp=t.dynCall_vjii=t.asm.Mh).apply(null,arguments)},Hp=t.dynCall_vjiiii=function(){return(Hp=t.dynCall_vjiiii=t.asm.Nh).apply(null,arguments)},Yp=t.dynCall_viiiiijiii=function(){return(Yp=t.dynCall_viiiiijiii=t.asm.Oh).apply(null,arguments)},Gp=t.dynCall_jiij=function(){return(Gp=t.dynCall_jiij=t.asm.Ph).apply(null,arguments)},Kp=t.dynCall_iiiijjii=function(){return(Kp=t.dynCall_iiiijjii=t.asm.Qh).apply(null,arguments)},$p=t.dynCall_iiiiijji=function(){return($p=t.dynCall_iiiiijji=t.asm.Rh).apply(null,arguments)},Jp=t.dynCall_viiijjii=function(){return(Jp=t.dynCall_viiijjii=t.asm.Sh).apply(null,arguments)},Qp=t.dynCall_viiiijji=function(){return(Qp=t.dynCall_viiiijji=t.asm.Th).apply(null,arguments)},Zp=t.dynCall_viiiijjii=function(){return(Zp=t.dynCall_viiiijjii=t.asm.Uh).apply(null,arguments)},Xp=t.dynCall_viiiiijji=function(){return(Xp=t.dynCall_viiiiijji=t.asm.Vh).apply(null,arguments)},ey=t.dynCall_iidj=function(){return(ey=t.dynCall_iidj=t.asm.Wh).apply(null,arguments)},ty=t.dynCall_ijji=function(){return(ty=t.dynCall_ijji=t.asm.Xh).apply(null,arguments)},iy=t.dynCall_iiiiiiiij=function(){return(iy=t.dynCall_iiiiiiiij=t.asm.Yh).apply(null,arguments)},ry=t.dynCall_iiiiiiij=function(){return(ry=t.dynCall_iiiiiiij=t.asm.Zh).apply(null,arguments)},ny=t.dynCall_iiiiiiiiiiiij=function(){return(ny=t.dynCall_iiiiiiiiiiiij=t.asm._h).apply(null,arguments)},sy=t.dynCall_iiiiiiiji=function(){return(sy=t.dynCall_iiiiiiiji=t.asm.$h).apply(null,arguments)},oy=t.dynCall_iiiidjj=function(){return(oy=t.dynCall_iiiidjj=t.asm.ai).apply(null,arguments)},ay=t.dynCall_iiiijjj=function(){return(ay=t.dynCall_iiiijjj=t.asm.bi).apply(null,arguments)},uy=t.dynCall_jiiiii=function(){return(uy=t.dynCall_jiiiii=t.asm.ci).apply(null,arguments)},cy=t.dynCall_jiiiiiijii=function(){return(cy=t.dynCall_jiiiiiijii=t.asm.di).apply(null,arguments)},ly=t.dynCall_iiiijji=function(){return(ly=t.dynCall_iiiijji=t.asm.ei).apply(null,arguments)},dy=t.dynCall_jiiiiii=function(){return(dy=t.dynCall_jiiiiii=t.asm.fi).apply(null,arguments)},fy=t.dynCall_iijiji=function(){return(fy=t.dynCall_iijiji=t.asm.gi).apply(null,arguments)},hy=t.dynCall_vjiiiji=function(){return(hy=t.dynCall_vjiiiji=t.asm.hi).apply(null,arguments)},py=t.dynCall_viiijijiji=function(){return(py=t.dynCall_viiijijiji=t.asm.ii).apply(null,arguments)},yy=t.dynCall_jiiijj=function(){return(yy=t.dynCall_jiiijj=t.asm.ji).apply(null,arguments)},_y=t.dynCall_viijiiii=function(){return(_y=t.dynCall_viijiiii=t.asm.ki).apply(null,arguments)},my=t.dynCall_iiiijii=function(){return(my=t.dynCall_iiiijii=t.asm.li).apply(null,arguments)},by=t.dynCall_viiiijii=function(){return(by=t.dynCall_viiiijii=t.asm.mi).apply(null,arguments)},gy=t.dynCall_iijiii=function(){return(gy=t.dynCall_iijiii=t.asm.ni).apply(null,arguments)},vy=t.dynCall_jiiiiji=function(){return(vy=t.dynCall_jiiiiji=t.asm.oi).apply(null,arguments)},wy=t.dynCall_vijiijj=function(){return(wy=t.dynCall_vijiijj=t.asm.pi).apply(null,arguments)},jy=t.dynCall_vifiijj=function(){return(jy=t.dynCall_vifiijj=t.asm.qi).apply(null,arguments)},Iy=t.dynCall_vidiijj=function(){return(Iy=t.dynCall_vidiijj=t.asm.ri).apply(null,arguments)},Ty=t.dynCall_viiiiij=function(){return(Ty=t.dynCall_viiiiij=t.asm.si).apply(null,arguments)},By=t.dynCall_ijj=function(){return(By=t.dynCall_ijj=t.asm.ti).apply(null,arguments)},Sy=t.dynCall_ijjiii=function(){return(Sy=t.dynCall_ijjiii=t.asm.ui).apply(null,arguments)},Ay=t.dynCall_vijijjji=function(){return(Ay=t.dynCall_vijijjji=t.asm.vi).apply(null,arguments)},Oy=t.dynCall_viiiiijjji=function(){return(Oy=t.dynCall_viiiiijjji=t.asm.wi).apply(null,arguments)},Dy=t.dynCall_viijijj=function(){return(Dy=t.dynCall_viijijj=t.asm.xi).apply(null,arguments)},Fy=t.dynCall_iiijiijj=function(){return(Fy=t.dynCall_iiijiijj=t.asm.yi).apply(null,arguments)},Ey=t.dynCall_viiijijjj=function(){return(Ey=t.dynCall_viiijijjj=t.asm.zi).apply(null,arguments)},Ry=t.dynCall_iijiijj=function(){return(Ry=t.dynCall_iijiijj=t.asm.Ai).apply(null,arguments)},Cy=t.dynCall_viiijjjji=function(){return(Cy=t.dynCall_viiijjjji=t.asm.Bi).apply(null,arguments)},Uy=t.dynCall_viiiijiii=function(){return(Uy=t.dynCall_viiiijiii=t.asm.Ci).apply(null,arguments)},ky=t.dynCall_iijii=function(){return(ky=t.dynCall_iijii=t.asm.Di).apply(null,arguments)},My=t.dynCall_vijjiiii=function(){return(My=t.dynCall_vijjiiii=t.asm.Ei).apply(null,arguments)},Py=t.dynCall_vijijjiiiii=function(){return(Py=t.dynCall_vijijjiiiii=t.asm.Fi).apply(null,arguments)},Vy=t.dynCall_vijjiiiii=function(){return(Vy=t.dynCall_vijjiiiii=t.asm.Gi).apply(null,arguments)},Ny=t.dynCall_iiijjji=function(){return(Ny=t.dynCall_iiijjji=t.asm.Hi).apply(null,arguments)},Ly=t.dynCall_iiiiijjj=function(){return(Ly=t.dynCall_iiiiijjj=t.asm.Ii).apply(null,arguments)},xy=t.dynCall_jijiiii=function(){return(xy=t.dynCall_jijiiii=t.asm.Ji).apply(null,arguments)},qy=t.dynCall_iiijjjii=function(){return(qy=t.dynCall_iiijjjii=t.asm.Ki).apply(null,arguments)},Wy=t.dynCall_iiiiijjji=function(){return(Wy=t.dynCall_iiiiijjji=t.asm.Li).apply(null,arguments)},zy=t.dynCall_viijiji=function(){return(zy=t.dynCall_viijiji=t.asm.Mi).apply(null,arguments)};function G0(o){var a=j();try{G.get(o)()}catch(u){if(I(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function K0(o,a,u){var l=j();try{G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function $0(o,a){var u=j();try{return G.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function J0(o,a,u){var l=j();try{return G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Q0(o,a){var u=j();try{G.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function Z0(o,a,u,l){var d=j();try{return G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function X0(o,a,u,l,d,f){var h=j();try{return G.get(o)(a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function eI(o,a,u,l,d){var f=j();try{G.get(o)(a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function tI(o,a,u,l,d){var f=j();try{return G.get(o)(a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function iI(o,a,u,l){var d=j();try{return G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function rI(o,a,u,l){var d=j();try{return G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function nI(o,a,u,l){var d=j();try{G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function sI(o,a,u,l){var d=j();try{G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function oI(o,a,u,l){var d=j();try{G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function aI(o,a,u){var l=j();try{return G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function uI(o,a,u){var l=j();try{return G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function cI(o,a,u,l,d,f,h){var p=j();try{G.get(o)(a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function lI(o,a,u,l,d,f,h,p,y){var m=j();try{return G.get(o)(a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function dI(o,a,u,l,d,f,h){var p=j();try{return G.get(o)(a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function fI(o,a,u,l,d,f,h,p){var y=j();try{return G.get(o)(a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function hI(o,a,u,l,d,f){var h=j();try{G.get(o)(a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function pI(o){var a=j();try{return G.get(o)()}catch(u){if(I(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function yI(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return G.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function _I(o,a,u,l,d,f,h,p){var y=j();try{G.get(o)(a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function mI(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{return G.get(o)(a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function bI(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{G.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function gI(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se){var me=j();try{G.get(o)(a,u,l,d,f,h,p,y,m,g,w,A,E,P,se)}catch(Be){if(I(me),Be!==Be+0&&Be!=="longjmp")throw Be;T(1,0)}}function vI(o,a,u,l,d){var f=j();try{return G.get(o)(a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function wI(o,a,u,l,d){var f=j();try{return G.get(o)(a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function jI(o,a,u,l,d,f){var h=j();try{G.get(o)(a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function II(o,a,u){var l=j();try{G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function TI(o,a,u){var l=j();try{G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function BI(o,a){var u=j();try{return G.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function SI(o,a,u,l){var d=j();try{return G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function AI(o,a,u,l,d,f,h,p,y){var m=j();try{G.get(o)(a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function OI(o,a,u,l,d,f){var h=j();try{return G.get(o)(a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function DI(o,a,u,l){var d=j();try{G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function FI(o,a,u,l){var d=j();try{G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function EI(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se){var me=j();try{return G.get(o)(a,u,l,d,f,h,p,y,m,g,w,A,E,P,se)}catch(Be){if(I(me),Be!==Be+0&&Be!=="longjmp")throw Be;T(1,0)}}function RI(o,a,u,l,d,f,h,p,y,m,g,w,A,E){var P=j();try{G.get(o)(a,u,l,d,f,h,p,y,m,g,w,A,E)}catch(se){if(I(P),se!==se+0&&se!=="longjmp")throw se;T(1,0)}}function CI(o,a,u,l,d,f,h,p,y,m){var g=j();try{G.get(o)(a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function UI(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se,me,Be,U,$,Ce){var ge=j();try{return G.get(o)(a,u,l,d,f,h,p,y,m,g,w,A,E,P,se,me,Be,U,$,Ce)}catch(yt){if(I(ge),yt!==yt+0&&yt!=="longjmp")throw yt;T(1,0)}}function kI(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se,me,Be,U,$){var Ce=j();try{return G.get(o)(a,u,l,d,f,h,p,y,m,g,w,A,E,P,se,me,Be,U,$)}catch(ge){if(I(Ce),ge!==ge+0&&ge!=="longjmp")throw ge;T(1,0)}}function MI(o,a,u){var l=j();try{return G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function PI(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{G.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function VI(o,a){var u=j();try{return G.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function NI(o,a,u){var l=j();try{return G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function LI(o,a,u){var l=j();try{return G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function xI(o,a,u,l){var d=j();try{return G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function qI(o,a,u,l,d,f,h,p,y,m){var g=j();try{G.get(o)(a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function WI(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{G.get(o)(a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function zI(o,a){var u=j();try{return G.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function HI(o,a){var u=j();try{return G.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function YI(o,a,u,l,d){var f=j();try{return Pf(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function GI(o,a,u,l,d,f,h){var p=j();try{Rf(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function KI(o,a,u,l,d){var f=j();try{Hf(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function $I(o,a,u,l,d,f,h){var p=j();try{return Vf(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function JI(o,a,u,l){var d=j();try{Ef(o,a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function QI(o,a,u,l,d,f,h){var p=j();try{Gf(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function ZI(o,a,u,l,d,f){var h=j();try{Sf(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function XI(o,a,u,l,d,f,h,p,y,m){var g=j();try{Af(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function eT(o,a,u,l,d){var f=j();try{return Of(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function tT(o,a,u,l,d,f,h,p,y){var m=j();try{Df(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function iT(o,a,u,l){var d=j();try{return Ff(o,a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function rT(o,a){var u=j();try{return Cf(o,a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function nT(o,a,u,l,d,f,h,p){var y=j();try{Uf(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function sT(o,a,u,l,d,f,h,p){var y=j();try{kf(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function oT(o,a,u,l,d,f,h,p,y){var m=j();try{kp(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function aT(o,a,u,l,d,f,h,p,y){var m=j();try{return Nf(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function uT(o,a,u,l,d){var f=j();try{Wf(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function cT(o,a,u){var l=j();try{return Mf(o,a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function lT(o,a,u,l,d){var f=j();try{return By(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function dT(o,a,u,l,d,f,h,p){var y=j();try{return Sy(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function fT(o,a,u,l,d,f,h){var p=j();try{Lf(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function hT(o,a,u,l,d,f){var h=j();try{xf(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function pT(o,a,u,l,d,f){var h=j();try{qf(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function yT(o,a,u,l){var d=j();try{return zf(o,a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function _T(o,a,u,l,d,f){var h=j();try{return Kf(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function mT(o,a,u,l,d,f,h,p){var y=j();try{return Qh(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function bT(o,a,u,l,d,f,h,p){var y=j();try{vp(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function gT(o,a,u,l,d,f,h,p){var y=j();try{return Kh(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function vT(o,a,u,l,d,f){var h=j();try{return Jf(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function wT(o,a,u,l,d,f){var h=j();try{return Dh(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function jT(o,a,u,l,d,f,h,p){var y=j();try{return $h(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function IT(o,a,u,l,d,f,h,p){var y=j();try{Jh(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function TT(o){var a=j();try{return eh(o)}catch(u){if(I(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function BT(o,a,u,l,d,f,h,p){var y=j();try{return $f(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function ST(o,a,u,l,d,f,h){var p=j();try{return Qf(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function AT(o,a,u,l){var d=j();try{return Zf(o,a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function OT(o,a,u,l,d,f,h){var p=j();try{dh(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function DT(o,a,u,l,d,f,h,p){var y=j();try{_h(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function FT(o,a,u,l,d,f,h,p){var y=j();try{return mh(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function ET(o,a,u,l,d,f,h,p){var y=j();try{return ah(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function RT(o,a,u,l,d,f,h,p,y){var m=j();try{return uh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function CT(o,a,u,l,d,f,h,p){var y=j();try{ch(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function UT(o,a,u,l,d,f,h,p,y){var m=j();try{return lh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function kT(o,a,u,l,d,f,h,p,y){var m=j();try{return fh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(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=j();try{return hh(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function PT(o,a,u,l,d,f,h){var p=j();try{return yh(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function VT(o,a,u,l,d){var f=j();try{return ph(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function NT(o,a,u,l,d,f,h,p,y){var m=j();try{oh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function LT(o,a,u,l,d,f,h,p){var y=j();try{sh(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function xT(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return ih(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function qT(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{rh(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function WT(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{nh(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function zT(o,a,u,l,d,f,h){var p=j();try{Sh(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function HT(o,a,u,l,d,f,h){var p=j();try{Yh(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function YT(o,a,u,l,d,f,h,p,y){var m=j();try{Uh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function GT(o,a,u,l,d,f,h,p,y){var m=j();try{return vh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function KT(o,a,u,l,d,f,h,p,y){var m=j();try{Hh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function $T(o,a,u,l){var d=j();try{return Xf(o,a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function JT(o,a,u,l,d,f){var h=j();try{return wh(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function QT(o,a,u,l,d,f,h,p,y){var m=j();try{Bh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function ZT(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{Th(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function XT(o,a,u,l,d,f){var h=j();try{return xh(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function eB(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{Ih(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function tB(o,a,u,l,d,f,h,p,y){var m=j();try{return Oh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function iB(o,a,u,l,d,f,h){var p=j();try{bh(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function rB(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return gh(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function nB(o,a,u,l,d,f,h,p,y){var m=j();try{Ah(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function sB(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P){var se=j();try{return jh(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P)}catch(me){if(I(se),me!==me+0&&me!=="longjmp")throw me;T(1,0)}}function oB(o,a,u,l,d,f,h,p,y){var m=j();try{return Fh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function aB(o,a,u,l,d,f,h,p){var y=j();try{return Eh(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function uB(o,a,u,l,d,f,h,p){var y=j();try{th(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function cB(o,a,u,l,d,f){var h=j();try{Rh(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function lB(o,a,u,l,d,f,h,p,y){var m=j();try{Ch(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function dB(o,a,u,l,d,f,h){var p=j();try{return Mh(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function fB(o,a,u,l,d,f,h,p,y,m){var g=j();try{Vh(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function hB(o,a,u,l,d,f,h,p,y,m){var g=j();try{Nh(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function pB(o,a,u,l,d,f,h){var p=j();try{return Ph(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function yB(o,a,u,l,d,f,h,p,y,m){var g=j();try{Lh(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function _B(o,a,u,l,d,f,h,p,y){var m=j();try{return kh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function mB(o,a,u,l,d,f,h,p,y){var m=j();try{return Gh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function bB(o,a,u,l,d,f,h,p,y){var m=j();try{Zh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function gB(o,a,u,l,d,f,h){var p=j();try{Xh(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function vB(o,a,u,l,d,f,h){var p=j();try{return ep(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function wB(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{sp(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function jB(o,a,u,l,d,f,h,p,y,m,g,w,A){var E=j();try{op(o,a,u,l,d,f,h,p,y,m,g,w,A)}catch(P){if(I(E),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function IB(o,a,u,l,d,f,h,p,y,m){var g=j();try{ap(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function TB(o,a,u,l,d,f,h,p,y,m,g,w,A){var E=j();try{cp(o,a,u,l,d,f,h,p,y,m,g,w,A)}catch(P){if(I(E),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function BB(o,a,u,l,d,f,h,p,y,m){var g=j();try{return tp(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function SB(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{return ip(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function AB(o,a,u,l,d,f,h,p,y,m){var g=j();try{return rp(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function OB(o,a,u,l,d,f,h,p,y,m){var g=j();try{return np(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function DB(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{lp(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function FB(o,a,u,l,d,f,h,p,y,m,g,w,A){var E=j();try{dp(o,a,u,l,d,f,h,p,y,m,g,w,A)}catch(P){if(I(E),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function EB(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se){var me=j();try{fp(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se)}catch(Be){if(I(me),Be!==Be+0&&Be!=="longjmp")throw Be;T(1,0)}}function RB(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se,me,Be){var U=j();try{hp(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se,me,Be)}catch($){if(I(U),$!==$+0&&$!=="longjmp")throw $;T(1,0)}}function CB(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{up(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function UB(o,a,u,l,d,f){var h=j();try{return uy(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function kB(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return cy(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function MB(o,a,u,l,d,f,h,p,y){var m=j();try{return ly(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function PB(o,a,u,l,d,f,h,p){var y=j();try{return pp(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function VB(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{yp(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function NB(o,a,u,l,d,f,h,p,y){var m=j();try{return wp(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function LB(o,a,u,l,d,f,h){var p=j();try{return _p(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function xB(o,a,u,l,d,f,h){var p=j();try{return mp(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function qB(o,a,u,l,d,f,h){var p=j();try{return bp(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function WB(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return gp(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function zB(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P){var se=j();try{return jp(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P)}catch(me){if(I(se),me!==me+0&&me!=="longjmp")throw me;T(1,0)}}function HB(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{return Ip(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function YB(o,a,u,l,d,f,h,p,y){var m=j();try{return Tp(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function GB(o,a,u){var l=j();try{return Bp(o,a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function KB(o,a){var u=j();try{return Sp(o,a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function $B(o,a){var u=j();try{return Ap(o,a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function JB(o,a,u,l,d,f,h){var p=j();try{return dy(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function QB(o,a,u,l,d,f){var h=j();try{return ty(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function ZB(o,a,u,l,d,f,h,p,y){var m=j();try{return Ep(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function XB(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return Rp(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function eS(o,a,u,l,d,f,h,p,y,m){var g=j();try{zh(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function tS(o,a,u,l,d,f,h){var p=j();try{return Dp(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function iS(o,a,u,l,d,f,h,p,y,m){var g=j();try{return Op(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function rS(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se,me){var Be=j();try{Fp(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se,me)}catch(U){if(I(Be),U!==U+0&&U!=="longjmp")throw U;T(1,0)}}function nS(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{return Cp(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function sS(o,a,u,l,d,f,h,p,y){var m=j();try{Up(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function oS(o,a,u,l,d,f,h,p,y,m){var g=j();try{return iy(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function aS(o,a,u,l,d,f,h,p,y,m){var g=j();try{Mp(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function uS(o,a,u,l,d,f,h,p){var y=j();try{return Pp(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function cS(o,a,u,l,d,f,h,p,y,m,g,w,A){var E=j();try{return Vp(o,a,u,l,d,f,h,p,y,m,g,w,A)}catch(P){if(I(E),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function lS(o,a,u,l,d,f,h,p){var y=j();try{return Np(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function dS(o,a,u,l,d,f,h,p,y){var m=j();try{return ry(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function fS(o,a,u,l,d,f,h,p,y,m,g,w,A,E){var P=j();try{return ny(o,a,u,l,d,f,h,p,y,m,g,w,A,E)}catch(se){if(I(P),se!==se+0&&se!=="longjmp")throw se;T(1,0)}}function hS(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{Yp(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function pS(o,a,u){var l=j();try{return qp(o,a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function yS(o,a,u,l,d){var f=j();try{return Gp(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function _S(o,a,u,l,d,f,h){var p=j();try{Hp(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function mS(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P){var se=j();try{xp(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P)}catch(me){if(I(se),me!==me+0&&me!=="longjmp")throw me;T(1,0)}}function bS(o,a,u,l,d){var f=j();try{return Wp(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function gS(o,a,u,l,d){var f=j();try{zp(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function vS(o,a,u,l,d,f,h,p,y,m){var g=j();try{return Kp(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function wS(o,a,u,l,d,f,h,p,y,m){var g=j();try{return $p(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function jS(o,a,u,l,d,f,h,p,y,m){var g=j();try{Jp(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function IS(o,a,u,l,d,f,h,p,y,m){var g=j();try{Qp(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function TS(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{Zp(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function BS(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{Xp(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function SS(o,a,u,l,d){var f=j();try{return ey(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function AS(o,a,u,l,d,f,h,p,y,m){var g=j();try{return sy(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function OS(o,a,u,l,d,f,h,p,y){var m=j();try{return oy(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function DS(o,a,u,l,d,f,h,p,y,m){var g=j();try{return ay(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function FS(o,a,u,l,d,f,h,p){var y=j();try{return fy(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function ES(o,a,u,l,d,f,h,p,y){var m=j();try{hy(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function RS(o,a,u,l,d){var f=j();try{return Yf(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function CS(o,a,u,l,d,f,h,p,y,m,g,w,A){var E=j();try{py(o,a,u,l,d,f,h,p,y,m,g,w,A)}catch(P){if(I(E),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function US(o,a,u,l,d,f,h,p,y){var m=j();try{qh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function kS(o,a,u,l,d,f,h,p){var y=j();try{return yy(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function MS(o,a,u,l,d,f,h,p,y){var m=j();try{_y(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function PS(o,a,u,l,d,f,h,p){var y=j();try{return my(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function VS(o,a,u,l,d,f,h,p,y){var m=j();try{by(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function NS(o,a,u,l,d,f,h){var p=j();try{return gy(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function LS(o,a,u,l,d,f,h,p){var y=j();try{return vy(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function xS(o,a,u,l,d,f,h,p,y,m){var g=j();try{wy(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function qS(o,a,u,l,d,f,h,p,y){var m=j();try{jy(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function WS(o,a,u,l,d,f,h,p,y){var m=j();try{Iy(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function zS(o,a,u,l,d,f,h,p){var y=j();try{Ty(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function HS(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{Ay(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function YS(o,a,u,l,d,f){var h=j();try{return Lp(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function GS(o,a,u,l,d,f,h,p,y,m){var g=j();try{Dy(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function KS(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return Fy(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function $S(o,a,u,l,d,f,h,p,y,m,g,w,A){var E=j();try{Oy(o,a,u,l,d,f,h,p,y,m,g,w,A)}catch(P){if(I(E),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function JS(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{Wh(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function QS(o,a,u,l,d,f,h,p,y,m,g,w,A){var E=j();try{Ey(o,a,u,l,d,f,h,p,y,m,g,w,A)}catch(P){if(I(E),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function ZS(o,a,u,l,d,f,h,p,y,m){var g=j();try{return Ry(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function XS(o,a,u,l,d,f,h,p,y,m){var g=j();try{return Ny(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function e1(o,a,u,l,d,f,h,p,y,m,g,w,A){var E=j();try{Cy(o,a,u,l,d,f,h,p,y,m,g,w,A)}catch(P){if(I(E),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function t1(o,a,u,l,d,f,h,p,y,m){var g=j();try{Uy(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function i1(o,a,u,l,d,f){var h=j();try{return ky(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function r1(o,a,u,l,d,f,h,p,y,m,g,w,A,E){var P=j();try{Py(o,a,u,l,d,f,h,p,y,m,g,w,A,E)}catch(se){if(I(P),se!==se+0&&se!=="longjmp")throw se;T(1,0)}}function n1(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{Vy(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function s1(o,a,u,l,d,f,h,p,y,m){var g=j();try{My(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function o1(o,a,u,l,d,f,h,p,y){var m=j();try{zy(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function a1(o,a,u,l,d,f,h,p){var y=j();try{return xy(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function u1(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return qy(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function c1(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return Ly(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function l1(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{return Wy(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}t.ccall=ww;var yo;function _o(o){this.name="ExitStatus",this.message="Program terminated with exit("+o+")",this.status=o}var d1=!1;fs=function o(){yo||Fu(),yo||(fs=o)};function f1(o){var a=t._main,u=0,l=0;try{var d=a(u,l);return h1(d,!0),d}catch(f){return Kw(f)}finally{d1=!0}}function Fu(o){if(o=o||_,Dr>0||(kw(),Dr>0))return;function a(){yo||(yo=!0,t.calledRun=!0,!W&&(Mw(),Pw(),r(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),Hy&&f1(o),Nw()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),a()},1)):a()}t.run=Fu;function h1(o,a){no=o,ju()||Vw(),p1(o)}function p1(o){no=o,ju()||(t.onExit&&t.onExit(o),W=!0),B(o,new _o(o))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var Hy=!0;return t.noInitialRun&&(Hy=!1),Fu(),e.ready}}();typeof wu=="object"&&typeof rf=="object"?rf.exports=tf:typeof define=="function"&&define.amd?define([],function(){return tf}):typeof wu=="object"&&(wu.DuckDB=tf)});var hU={};I1(hU,{registerWorker:()=>yw});var ow=ni(ms()),aw=ni(fa()),as=ni(Ks()),us=ni(Pa()),uw=ni(Hv()),cw=ni(Kv()),bu=ni($v()),gu=ni(Jv()),S=ni(sw());ow.default.toDOMStream=uw.toDOMStream;aw.Builder.throughDOM=cw.builderThroughDOMStream;as.RecordBatchReader.throughDOM=bu.recordBatchReaderThroughDOMStream;as.RecordBatchFileReader.throughDOM=bu.recordBatchReaderThroughDOMStream;as.RecordBatchStreamReader.throughDOM=bu.recordBatchReaderThroughDOMStream;us.RecordBatchWriter.throughDOM=gu.recordBatchWriterThroughDOMStream;us.RecordBatchFileWriter.throughDOM=gu.recordBatchWriterThroughDOMStream;us.RecordBatchStreamWriter.throughDOM=gu.recordBatchWriterThroughDOMStream;var $d;(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"})($d||($d={}));var Jd;(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"})(Jd||(Jd={}));var Qd;(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"})(Qd||(Qd={}));var Zd;(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"})(Zd||(Zd={}));var cU=class{constructor(e,t,r){this.db=e;this.conn=t;this.header=r;this._first=!0,this._depleted=!1,this._inFlight=null}next(){return si(this,null,function*(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e;return this._inFlight!=null?(e=yield this._inFlight,this._inFlight=null):e=yield this.db.fetchQueryResults(this.conn),this._depleted=e.length==0,this._depleted||(this._inFlight=this.db.fetchQueryResults(this.conn)),{done:this._depleted,value:e}})}[Symbol.asyncIterator](){return this}};var be;(function(W){W.CLOSE_PREPARED="CLOSE_PREPARED",W.COLLECT_FILE_STATISTICS="COLLECT_FILE_STATISTICS",W.CONNECT="CONNECT",W.COPY_FILE_TO_BUFFER="COPY_FILE_TO_BUFFER",W.COPY_FILE_TO_PATH="COPY_FILE_TO_PATH",W.CREATE_PREPARED="CREATE_PREPARED",W.DISCONNECT="DISCONNECT",W.DROP_FILE="DROP_FILE",W.DROP_FILES="DROP_FILES",W.EXPORT_FILE_STATISTICS="EXPORT_FILE_STATISTICS",W.FETCH_QUERY_RESULTS="FETCH_QUERY_RESULTS",W.FLUSH_FILES="FLUSH_FILES",W.GET_FEATURE_FLAGS="GET_FEATURE_FLAGS",W.GET_VERSION="GET_VERSION",W.GLOB_FILE_INFOS="GLOB_FILE_INFOS",W.INSERT_ARROW_FROM_IPC_STREAM="INSERT_ARROW_FROM_IPC_STREAM",W.INSERT_CSV_FROM_PATH="IMPORT_CSV_FROM_PATH",W.INSERT_JSON_FROM_PATH="IMPORT_JSON_FROM_PATH",W.INSTANTIATE="INSTANTIATE",W.OPEN="OPEN",W.PING="PING",W.REGISTER_FILE_BUFFER="REGISTER_FILE_BUFFER",W.REGISTER_FILE_HANDLE="REGISTER_FILE_HANDLE",W.REGISTER_FILE_URL="REGISTER_FILE_URL",W.RESET="RESET",W.RUN_PREPARED="RUN_PREPARED",W.RUN_QUERY="RUN_QUERY",W.SEND_PREPARED="SEND_PREPARED",W.SEND_QUERY="SEND_QUERY",W.TOKENIZE="TOKENIZE"})(be||(be={}));var He;(function(le){le.CONNECTION_INFO="CONNECTION_INFO",le.ERROR="ERROR",le.FEATURE_FLAGS="FEATURE_FLAGS",le.FILE_BUFFER="FILE_BUFFER",le.FILE_INFOS="FILE_INFOS",le.FILE_SIZE="FILE_SIZE",le.FILE_STATISTICS="FILE_STATISTICS",le.LOG="LOG",le.OK="OK",le.PREPARED_STATEMENT_ID="PREPARED_STATEMENT_ID",le.QUERY_PLAN="QUERY_PLAN",le.QUERY_RESULT="QUERY_RESULT",le.QUERY_RESULT_CHUNK="QUERY_RESULT_CHUNK",le.QUERY_START="QUERY_START",le.REGISTERED_FILE="REGISTERED_FILE",le.SCRIPT_TOKENS="SCRIPT_TOKENS",le.SUCCESS="SUCCESS",le.VERSION_STRING="VERSION_STRING"})(He||(He={}));function cs(i,e){switch(e.typeId){case S.Type.Binary:return{name:i,type:"binary"};case S.Type.Bool:return{name:i,type:"bool"};case S.Type.Date:return{name:i,type:"date"};case S.Type.DateDay:return{name:i,type:"date32[d]"};case S.Type.DateMillisecond:return{name:i,type:"date64[ms]"};case S.Type.Decimal:{let t=e;return{name:i,type:"decimal",precision:t.precision,scale:t.scale}}case S.Type.Float:return{name:i,type:"float"};case S.Type.Float16:return{name:i,type:"float16"};case S.Type.Float32:return{name:i,type:"float32"};case S.Type.Float64:return{name:i,type:"float64"};case S.Type.Int:return{name:i,type:"int32"};case S.Type.Int16:return{name:i,type:"int16"};case S.Type.Int32:return{name:i,type:"int32"};case S.Type.Int64:return{name:i,type:"int64"};case S.Type.Uint16:return{name:i,type:"uint16"};case S.Type.Uint32:return{name:i,type:"uint32"};case S.Type.Uint64:return{name:i,type:"uint64"};case S.Type.Uint8:return{name:i,type:"uint8"};case S.Type.IntervalDayTime:return{name:i,type:"interval[dt]"};case S.Type.IntervalYearMonth:return{name:i,type:"interval[m]"};case S.Type.List:{let t=e;return{name:i,type:"list",children:[cs(t.valueField.name,t.valueField.type)]}}case S.Type.FixedSizeBinary:return{name:i,type:"fixedsizebinary",byteWidth:e.byteWidth};case S.Type.Null:return{name:i,type:"null"};case S.Type.Utf8:return{name:i,type:"utf8"};case S.Type.Struct:return{name:i,type:"struct",children:e.children.map(r=>cs(r.name,r.type))};case S.Type.Time:return{name:i,type:"time[s]"};case S.Type.TimeMicrosecond:return{name:i,type:"time[us]"};case S.Type.TimeMillisecond:return{name:i,type:"time[ms]"};case S.Type.TimeNanosecond:return{name:i,type:"time[ns]"};case S.Type.TimeSecond:return{name:i,type:"time[s]"};case S.Type.Timestamp:return{name:i,type:"timestamp",timezone:e.timezone||void 0};case S.Type.TimestampSecond:return{name:i,type:"timestamp[s]",timezone:e.timezone||void 0};case S.Type.TimestampMicrosecond:return{name:i,type:"timestamp[us]",timezone:e.timezone||void 0};case S.Type.TimestampNanosecond:return{name:i,type:"timestamp[ns]",timezone:e.timezone||void 0};case S.Type.TimestampMillisecond:return{name:i,type:"timestamp[ms]",timezone:e.timezone||void 0}}throw new Error(`unsupported arrow type: ${e.toString()}`)}var DM=new TextEncoder;var Xd=class{constructor(){this._bindings=null;this._nextMessageId=0}log(e){this.postMessage({messageId:this._nextMessageId++,requestId:0,type:He.LOG,data:e},[])}sendOK(e){this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.OK,data:null},[])}failWith(e,t){let r={name:t.name,message:t.message,stack:t.stack||void 0};this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.ERROR,data:r},[])}onMessage(e){return si(this,null,function*(){switch(e.type){case be.PING:this.sendOK(e);return;case be.INSTANTIATE:this._bindings!=null&&this.failWith(e,new Error("duckdb already initialized"));try{this._bindings=yield this.instantiate(e.data[0],e.data[1]),this.sendOK(e)}catch(t){this._bindings=null,this.failWith(e,t)}return;default:break}if(!this._bindings)return this.failWith(e,new Error("duckdb is not initialized"));try{switch(e.type){case be.GET_VERSION:this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.VERSION_STRING,data:this._bindings.getVersion()},[]);break;case be.GET_FEATURE_FLAGS:this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.FEATURE_FLAGS,data:this._bindings.getFeatureFlags()},[]);break;case be.RESET:this._bindings.reset(),this.sendOK(e);break;case be.OPEN:this._bindings.open(e.data),this.sendOK(e);break;case be.DROP_FILE:this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.SUCCESS,data:this._bindings.dropFile(e.data)},[]);break;case be.DROP_FILES:this._bindings.dropFiles(),this.sendOK(e);break;case be.FLUSH_FILES:this._bindings.flushFiles(),this.sendOK(e);break;case be.CONNECT:{let t=this._bindings.connect();this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.CONNECTION_INFO,data:t.useUnsafe((r,n)=>n)},[]);break}case be.DISCONNECT:this._bindings.disconnect(e.data),this.sendOK(e);break;case be.CREATE_PREPARED:{let t=this._bindings.createPrepared(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.PREPARED_STATEMENT_ID,data:t},[]);break}case be.CLOSE_PREPARED:{this._bindings.closePrepared(e.data[0],e.data[1]),this.sendOK(e);break}case be.RUN_PREPARED:{let t=this._bindings.runPrepared(e.data[0],e.data[1],e.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.QUERY_RESULT,data:t},[t.buffer]);break}case be.RUN_QUERY:{let t=this._bindings.runQuery(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.QUERY_RESULT,data:t},[t.buffer]);break}case be.SEND_PREPARED:{let t=this._bindings.sendPrepared(e.data[0],e.data[1],e.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.QUERY_START,data:t},[t.buffer]);break}case be.SEND_QUERY:{let t=this._bindings.sendQuery(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.QUERY_START,data:t},[t.buffer]);break}case be.FETCH_QUERY_RESULTS:{let t=this._bindings.fetchQueryResults(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.QUERY_RESULT_CHUNK,data:t},[t.buffer]);break}case be.GLOB_FILE_INFOS:{let t=this._bindings.globFiles(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.FILE_INFOS,data:t},[]);break}case be.REGISTER_FILE_URL:this._bindings.registerFileURL(e.data[0],e.data[1]),this.sendOK(e);break;case be.REGISTER_FILE_BUFFER:this._bindings.registerFileBuffer(e.data[0],e.data[1]),this.sendOK(e);break;case be.REGISTER_FILE_HANDLE:this._bindings.registerFileHandle(e.data[0],e.data[1]),this.sendOK(e);break;case be.COPY_FILE_TO_PATH:this._bindings.copyFileToPath(e.data[0],e.data[1]),this.sendOK(e);break;case be.COPY_FILE_TO_BUFFER:{let t=this._bindings.copyFileToBuffer(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.FILE_BUFFER,data:t},[]);break}case be.COLLECT_FILE_STATISTICS:this._bindings.collectFileStatistics(e.data[0],e.data[1]),this.sendOK(e);break;case be.EXPORT_FILE_STATISTICS:{this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.FILE_STATISTICS,data:this._bindings.exportFileStatistics(e.data)},[]);break}case be.INSERT_ARROW_FROM_IPC_STREAM:{this._bindings.insertArrowFromIPCStream(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case be.INSERT_CSV_FROM_PATH:{this._bindings.insertCSVFromPath(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case be.INSERT_JSON_FROM_PATH:{this._bindings.insertJSONFromPath(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case be.TOKENIZE:{let t=this._bindings.tokenize(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.SCRIPT_TOKENS,data:t},[]);break}}}catch(t){return this.failWith(e,t)}})}};var hw=ni(lw());var nf=class{constructor(e,t){this._bindings=e,this._conn=t}close(){this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}query(e){let t=this._bindings.runQuery(this._conn,e),r=S.RecordBatchReader.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),S.Table.from(r)}send(e){let t=this._bindings.sendQuery(this._conn,e),r=new sf(this._bindings,this._conn,t),n=S.RecordBatchReader.from(r);return console.assert(n.isSync()),console.assert(n.isStream()),n}prepare(e){let t=this._bindings.createPrepared(this._conn,e);return new dw(this._bindings,this._conn,t)}insertArrowTable(e,t){let r=e.serialize("binary",!0);this.insertArrowFromIPCStream(r,t)}insertArrowFromIPCStream(e,t){this._bindings.insertArrowFromIPCStream(this._conn,e,t)}insertCSVFromPath(e,t){this._bindings.insertCSVFromPath(this._conn,e,t)}insertJSONFromPath(e,t){this._bindings.insertJSONFromPath(this._conn,e,t)}},sf=class{constructor(e,t,r){this.bindings=e;this.conn=t;this.header=r;this._first=!0,this._depleted=!1}next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e=this.bindings.fetchQueryResults(this.conn);return this._depleted=e.length==0,{done:this._depleted,value:e}}[Symbol.iterator](){return this}},dw=class{constructor(e,t,r){this.bindings=e,this.connectionId=t,this.statementId=r}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...e){let t=this.bindings.runPrepared(this.connectionId,this.statementId,e),r=S.RecordBatchReader.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),S.Table.from(r)}send(...e){let t=this.bindings.sendPrepared(this.connectionId,this.statementId,e),r=new sf(this.bindings,this.connectionId,t),n=S.RecordBatchReader.from(r);return console.assert(n.isSync()),console.assert(n.isStream()),n}};var Ie;(function(e){e[e.SUCCESS=0]="SUCCESS"})(Ie||(Ie={}));function lU(){let i=new TextDecoder;return e=>(typeof SharedArrayBuffer!="undefined"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),i.decode(e))}var dU=lU();function Wi(i,e){i.ccall("duckdb_web_fail_with",null,["string"],[e])}function ls(i,e,t){let r=i.HEAPU8.subarray(e,e+t),n=new Uint8Array(new ArrayBuffer(r.byteLength));return n.set(r),n}function _e(i,e,t){return dU(i.HEAPU8.subarray(e,e+t))}var bt;(function(r){r[r.BUFFER=0]="BUFFER",r[r.NATIVE=1]="NATIVE",r[r.HTTP=3]="HTTP"})(bt||(bt={}));function Ae(i,e,t,r){let n=i.stackSave(),s=i.stackAlloc(3*8);t.unshift("number"),r.unshift(s),i.ccall(e,null,t,r);let c=i.HEAPF64[(s>>3)+0],_=i.HEAPF64[(s>>3)+1],v=i.HEAPF64[(s>>3)+2];return i.stackRestore(n),[c,_,v]}function Ye(i){i.ccall("duckdb_web_clear_response",null,[],[])}var of=class{constructor(e){let t=new Float64Array(e.buffer,e.byteOffset,e.byteLength/8),r=new Uint8Array(new ArrayBuffer(e.byteLength));r.set(e.subarray(7*8)),this.totalFileReadsCold=t[0],this.totalFileReadsAhead=t[1],this.totalFileReadsCached=t[2],this.totalFileWrites=t[3],this.totalPageAccesses=t[4],this.totalPageLoads=t[5],this.blockSize=t[6],this.blockStats=r}getBlockStats(e,t){return t=t||{file_reads_cold:0,file_reads_ahead:0,file_reads_cached:0,file_writes:0,page_accesses:0,page_loads:0},t.file_writes=this.blockStats[e*3+0]&15,t.file_reads_cold=this.blockStats[e*3+0]>>4,t.file_reads_ahead=this.blockStats[e*3+1]&15,t.file_reads_cached=this.blockStats[e*3+1]>>4,t.page_accesses=this.blockStats[e*3+1]&15,t.page_loads=this.blockStats[e*3+1]>>4,t}};var fU=new TextEncoder,fw;(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"})(fw||(fw={}));var af=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}instantiate(){return si(this,null,function*(){return this._instance!=null?this:(this._initPromise!=null&&(yield this._initPromise),this._initPromise=new Promise(e=>{this._initPromiseResolver=e}),this._instance=yield this.instantiateImpl({print:console.log.bind(console),printErr:console.log.bind(console),onRuntimeInitialized:this._initPromiseResolver}),yield this._initPromise,this._initPromise=null,this)})}open(e){let[t,r,n]=Ae(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==Ie.SUCCESS)throw new Error(_e(this.mod,r,n));Ye(this.mod)}reset(){let[e,t,r]=Ae(this.mod,"duckdb_web_reset",[],[]);if(e!==Ie.SUCCESS)throw new Error(_e(this.mod,t,r));Ye(this.mod)}getVersion(){let[e,t,r]=Ae(this.mod,"duckdb_web_get_version",[],[]);if(e!==Ie.SUCCESS)throw new Error(_e(this.mod,t,r));let n=_e(this.mod,t,r);return Ye(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,r,n]=Ae(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==Ie.SUCCESS)throw new Error(_e(this.mod,r,n));let s=_e(this.mod,r,n);return Ye(this.mod),JSON.parse(s)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new nf(this,e)}disconnect(e){this.mod.ccall("duckdb_web_disconnect",null,["number"],[e])}runQuery(e,t){let[r,n,s]=Ae(this.mod,"duckdb_web_query_run",["number","string"],[e,t]);if(r!==Ie.SUCCESS)throw new Error(_e(this.mod,n,s));let c=ls(this.mod,n,s);return Ye(this.mod),c}sendQuery(e,t){let[r,n,s]=Ae(this.mod,"duckdb_web_query_send",["number","string"],[e,t]);if(r!==Ie.SUCCESS)throw new Error(_e(this.mod,n,s));let c=ls(this.mod,n,s);return Ye(this.mod),c}fetchQueryResults(e){let[t,r,n]=Ae(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==Ie.SUCCESS)throw new Error(_e(this.mod,r,n));let s=ls(this.mod,r,n);return Ye(this.mod),s}createPrepared(e,t){let[r,n,s]=Ae(this.mod,"duckdb_web_prepared_create",["number","string"],[e,t]);if(r!==Ie.SUCCESS)throw new Error(_e(this.mod,n,s));return Ye(this.mod),n}closePrepared(e,t){let[r,n,s]=Ae(this.mod,"duckdb_web_prepared_close",["number","number"],[e,t]);if(r!==Ie.SUCCESS)throw new Error(_e(this.mod,n,s));Ye(this.mod)}runPrepared(e,t,r){let[n,s,c]=Ae(this.mod,"duckdb_web_prepared_run",["number","number","string"],[e,t,JSON.stringify(r)]);if(n!==Ie.SUCCESS)throw new Error(_e(this.mod,s,c));let _=ls(this.mod,s,c);return Ye(this.mod),_}sendPrepared(e,t,r){let[n,s,c]=Ae(this.mod,"duckdb_web_prepared_send",["number","number","string"],[e,t,JSON.stringify(r)]);if(n!==Ie.SUCCESS)throw new Error(_e(this.mod,s,c));let _=ls(this.mod,s,c);return Ye(this.mod),_}insertArrowFromIPCStream(e,t,r){if(t.length==0)return;let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let c=r?JSON.stringify(r):"",[_,v,B]=Ae(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,c]);if(_!==Ie.SUCCESS)throw new Error(_e(this.mod,v,B))}insertCSVFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let B in r.columns)r.columnsFlat.push(cs(B,r.columns[B]))}let n=Rr({},r);n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[c,_,v]=Ae(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,s]);if(c!==Ie.SUCCESS)throw new Error(_e(this.mod,_,v))}insertJSONFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let B in r.columns)r.columnsFlat.push(cs(B,r.columns[B]))}let n=Rr({},r);n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[c,_,v]=Ae(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,s]);if(c!==Ie.SUCCESS)throw new Error(_e(this.mod,_,v))}globFiles(e){let[t,r,n]=Ae(this.mod,"duckdb_web_fs_glob_file_infos",["string"],[e]);if(t!==Ie.SUCCESS)throw new Error(_e(this.mod,r,n));let s=_e(this.mod,r,n);Ye(this.mod);let c=JSON.parse(s);return c==null?[]:c}registerFileURL(e,t){t===void 0&&(t=e);let[r,n,s]=Ae(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,t]);if(r!==Ie.SUCCESS)throw new Error(_e(this.mod,n,s));Ye(this.mod)}registerFileText(e,t){let r=fU.encode(t);this.registerFileBuffer(e,r)}registerFileBuffer(e,t){let r=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(r,r+t.length).set(t);let[s,c,_]=Ae(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,r,t.length]);if(s!==Ie.SUCCESS)throw new Error(_e(this.mod,c,_));Ye(this.mod)}registerFileHandle(e,t){let[r,n,s]=Ae(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,e]);if(r!==Ie.SUCCESS)throw new Error(_e(this.mod,n,s));if(Ye(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(){let[e,t,r]=Ae(this.mod,"duckdb_web_fs_drop_files",[],[]);if(e!==Ie.SUCCESS)throw new Error(_e(this.mod,t,r));Ye(this.mod)}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(e,t){let[r,n,s]=Ae(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(r!==Ie.SUCCESS)throw new Error(_e(this.mod,n,s));Ye(this.mod)}copyFileToBuffer(e){let[t,r,n]=Ae(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==Ie.SUCCESS)throw new Error(_e(this.mod,r,n));let s=this.mod.HEAPU8.subarray(r,r+n),c=new Uint8Array(s.length);return c.set(s),Ye(this.mod),c}collectFileStatistics(e,t){let[r,n,s]=Ae(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(r!==Ie.SUCCESS)throw new Error(_e(this.mod,n,s))}exportFileStatistics(e){let[t,r,n]=Ae(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==Ie.SUCCESS)throw new Error(_e(this.mod,r,n));return new of(this.mod.HEAPU8.subarray(r,r+n))}};var uf=class extends af{constructor(e,t,r,n){super(e,t);this.mainModuleURL=r,this.pthreadWorkerURL=n}locateFile(e,t){if(e.endsWith(".wasm"))return this.mainModuleURL;if(e.endsWith(".worker.js")){if(!this.pthreadWorkerURL)throw new Error("Missing DuckDB worker URL!");return this.pthreadWorkerURL}throw new Error(`WASM instantiation requested unexpected file: prefix=${t} path=${e}`)}instantiateWasm(e,t){return globalThis.DUCKDB_RUNTIME=this._runtime,WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(fetch(this.mainModuleURL),e).then(r=>{t(r.instance,r.module)}):fetch(this.mainModuleURL).then(r=>r.arrayBuffer()).then(r=>WebAssembly.instantiate(r,e).then(n=>{t(n.instance,n.module)})).catch(r=>{console.error("Failed to instantiate WASM:",r)}),[]}};var cf=class extends uf{constructor(e,t,r,n=null){super(e,t,r,n)}instantiateImpl(e){return(0,hw.default)(mo(Rr({},e),{instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)}))}};var gt={fileInfoCache:new Map,getFileInfo(i,e){try{let t=gt.fileInfoCache.get(e);if(t)return t;let[r,n,s]=Ae(i,"duckdb_web_fs_get_file_info_by_id",["number"],[e]);if(r!==Ie.SUCCESS)return null;let c=_e(i,n,s);Ye(i);let _=JSON.parse(c);if(_==null)return null;let v=mo(Rr({},_),{blob:null});return gt.fileInfoCache.set(e,v),v}catch(t){return null}},testPlatformFeature:(i,e)=>{switch(e){case 1:return typeof BigInt64Array!="undefined";default:return console.warn(`test for unknown feature: ${e}`),!1}},openFile:(i,e)=>{var t;try{gt.fileInfoCache.delete(e);let r=gt.getFileInfo(i,e);switch(r==null?void 0:r.dataProtocol){case bt.HTTP:{let n=null;try{let s=new XMLHttpRequest;s.open("HEAD",r.dataUrl,!1),s.setRequestHeader("Range","bytes=0-"),s.send(null);let c=s.getResponseHeader("Content-Length");if(s.status==206&&c!==null){let _=i._malloc(2*8);return i.HEAPF64[(_>>3)+0]=+c,i.HEAPF64[(_>>3)+1]=0,_}}catch(s){n=s,console.warn(`HEAD request with range header failed: ${s}`)}if(r.allowFullHttpReads){console.warn(`falling back to full HTTP read for: ${r.dataUrl}`);let s=new XMLHttpRequest;if(s.open("GET",r.dataUrl,!1),s.responseType="arraybuffer",s.send(null),s.status==200){let c=i._malloc(s.response.byteLength),_=new Uint8Array(s.response,0,s.response.byteLength);i.HEAPU8.set(_,c);let v=i._malloc(2*8);return i.HEAPF64[(v>>3)+0]=s.response.byteLength,i.HEAPF64[(v>>3)+1]=c,v}}if(n!=null)throw new Error(`Reading file ${r.fileName} failed with error: ${n}`);return 0}case bt.NATIVE:{let n=(t=gt._files)==null?void 0:t.get(r.fileName);if(n){let _=i._malloc(2*8);return i.HEAPF64[(_>>3)+0]=n.size,i.HEAPF64[(_>>3)+1]=0,_}console.warn(`Buffering missing file: ${r.fileName}`);let s=i._malloc(2*8),c=i._malloc(1);return i.HEAPF64[(s>>3)+0]=1,i.HEAPF64[(s>>3)+1]=c,s}}}catch(r){console.error(r.toString()),Wi(i,r.toString())}return 0},glob:(i,e,t)=>{try{let r=_e(i,e,t);if(r.startsWith("http")){let n=new XMLHttpRequest;if(n.open("HEAD",r,!1),n.send(null),n.status!=200&&n.status!==206){Wi(i,`HEAD request failed: ${r}`);return}i.ccall("duckdb_web_fs_glob_add_path",null,["string"],[r])}}catch(r){return Wi(i,r.toString()),0}},checkFile:(i,e,t)=>{try{let r=_e(i,e,t);if(r.startsWith("http")){let n=new XMLHttpRequest;n.open("HEAD",r,!1),n.setRequestHeader("Range","bytes=0-"),n.send(null);let s=!1;if(n.status==206)s=!0;else if(n.status==200)s=n.getResponseHeader("Accept-Ranges")==="bytes";else return!1;return!!s}}catch(r){return!1}return!1},syncFile:(i,e)=>{},closeFile:(i,e)=>{let t=gt.getFileInfo(i,e);switch(gt.fileInfoCache.delete(e),t==null?void 0:t.dataProtocol){case bt.HTTP:break;case bt.NATIVE:return}},truncateFile:(i,e,t)=>{let r=gt.getFileInfo(i,e);switch(r==null?void 0:r.dataProtocol){case bt.HTTP:Wi(i,"Cannot truncate a http file");return;case bt.NATIVE:Wi(i,"truncateFile not implemented");return}return 0},readFile(i,e,t,r,n){var s;try{let c=gt.getFileInfo(i,e);switch(c==null?void 0:c.dataProtocol){case bt.HTTP:{if(!c.dataUrl)throw new Error(`Missing data URL for file ${e}`);try{let _=new XMLHttpRequest;if(_.open("GET",c.dataUrl,!1),_.responseType="arraybuffer",_.setRequestHeader("Range",`bytes=${n}-${n+r-1}`),_.send(null),_.status==206||_.status==200&&r==_.response.byteLength&&n==0){let v=new Uint8Array(_.response,0,Math.min(_.response.byteLength,r));return i.HEAPU8.set(v,t),v.byteLength}else throw _.status==200?new Error(`Range request for ${c.dataUrl} did not return a partial response: ${_.status} "${_.statusText}"`):new Error(`Range request for ${c.dataUrl} did returned non-success status: ${_.status} "${_.statusText}"`)}catch(_){throw new Error(`Range request for ${c.dataUrl} failed with error: ${_}"`)}}case bt.NATIVE:{let _=(s=gt._files)==null?void 0:s.get(c.fileName);if(!_)throw new Error(`No handle available for file: ${c.fileName}`);let v=_.slice(n,n+r),B=new Uint8Array(new FileReaderSync().readAsArrayBuffer(v));return i.HEAPU8.set(B,t),B.byteLength}}return 0}catch(c){return Wi(i,c.toString()),0}},writeFile:(i,e,t,r,n)=>{let s=gt.getFileInfo(i,e);switch(s==null?void 0:s.dataProtocol){case bt.HTTP:return Wi(i,"Cannot write to HTTP file"),0;case bt.NATIVE:return Wi(i,"writefile not implemented"),0}return 0},getLastFileModificationTime:(i,e)=>{var r;let t=gt.getFileInfo(i,e);switch(t==null?void 0:t.dataProtocol){case bt.NATIVE:{if(!((r=gt._files)==null?void 0:r.get(t.fileName)))throw Error(`No handle available for file: ${t.fileName}`);return 0}case bt.HTTP:return new Date().getTime()}return 0},checkDirectory:(i,e,t)=>{let r=_e(i,e,t);return console.log(`checkDirectory: ${r}`),!1},createDirectory:(i,e,t)=>{let r=_e(i,e,t);console.log(`createDirectory: ${r}`)},removeDirectory:(i,e,t)=>{let r=_e(i,e,t);console.log(`removeDirectory: ${r}`)},listDirectoryEntries:(i,e,t)=>{let r=_e(i,e,t);return console.log(`listDirectoryEntries: ${r}`),!1},moveFile:(i,e,t,r,n)=>{},removeFile:(i,e,t)=>{}};var pw=class extends Xd{postMessage(e,t){globalThis.postMessage(e,t)}instantiate(e,t){return si(this,null,function*(){return yield new cf(this,gt,e,t).instantiate()})}};function yw(){let i=new pw;globalThis.onmessage=e=>si(this,null,function*(){yield i.onMessage(e.data)})}yw();return hU;})();
17
+ }`),this._dictionaries=[],this._recordBatches=[],super.close()}};gi.RecordBatchJSONWriter=ka;function Sl(i,e){let t=e;e instanceof wl.Table&&(t=e.chunks,i.reset(void 0,e.schema));for(let r of t)i.write(r);return i.finish()}function Al(i,e){var t,r,n,s;return ng.__awaiter(this,void 0,void 0,function*(){try{for(t=ng.__asyncValues(e);r=yield t.next(),!r.done;){let c=r.value;i.write(c)}}catch(c){n={error:c}}finally{try{r&&!r.done&&(s=t.return)&&(yield s.call(t))}finally{if(n)throw n.error}}return i.finish()})}function ug({name:i,type:e,nullable:t}){let r=new LF.JSONTypeAssembler;return{name:i,nullable:t,type:r.visit(e),children:(e.children||[]).map(ug),dictionary:VF.DataType.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:r.visit(e.indices)}:void 0}}function WF(i,e,t=!1){let r=new NF.Field(`${e}`,i.type,i.nullCount>0),n=ag.JSONVectorAssembler.assemble(new PF.Column(r,[i]));return JSON.stringify({id:e,isDelta:t,data:{count:i.length,columns:n}},null,2)}function zF(i){return JSON.stringify({count:i.length,columns:ag.JSONVectorAssembler.assemble(i)},null,2)}});var Fl=R(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.distributeVectorsIntoRecordBatches=gr.distributeColumnsIntoRecordBatches=gr.ensureSameLengthData=void 0;var cg=Jt(),Ol=rt(),HF=pr(),YF=Vi(),Dl=new Uint8Array(0),lg=i=>[Dl,Dl,new Uint8Array(i),Dl];function GF(i,e,t=e.reduce((r,n)=>Math.max(r,n.length),0)){let r,n,s=-1,c=e.length,_=[...i.fields],v=[],B=(t+63&~63)>>3;for(;++s<c;)(r=e[s])&&r.length===t?v[s]=r:((n=_[s]).nullable||(_[s]=_[s].clone({nullable:!0})),v[s]=r?r._changeLengthAndBackfillNullBitmap(t):cg.Data.new(n.type,0,t,t,lg(B)));return[new Ol.Schema(_),t,v]}gr.ensureSameLengthData=GF;function KF(i){return dg(new Ol.Schema(i.map(({field:e})=>e)),i)}gr.distributeColumnsIntoRecordBatches=KF;function dg(i,e){return $F(i,e.map(t=>t instanceof HF.Chunked?t.chunks.map(r=>r.data):[t.data]))}gr.distributeVectorsIntoRecordBatches=dg;function $F(i,e){let t=[...i.fields],r=[],n={numBatches:e.reduce((N,q)=>Math.max(N,q.length),0)},s=0,c=0,_=-1,v=e.length,B,O=[];for(;n.numBatches-- >0;){for(c=Number.POSITIVE_INFINITY,_=-1;++_<v;)O[_]=B=e[_].shift(),c=Math.min(c,B?B.length:c);isFinite(c)&&(O=JF(t,c,O,e,n),c>0&&(r[s++]=[c,O.slice()]))}return[i=new Ol.Schema(t,i.metadata),r.map(N=>new YF.RecordBatch(i,...N))]}function JF(i,e,t,r,n){let s,c,_=0,v=-1,B=r.length,O=(e+63&~63)>>3;for(;++v<B;)(s=t[v])&&(_=s.length)>=e?_===e?t[v]=s:(t[v]=s.slice(0,e),s=s.slice(e,_-e),n.numBatches=Math.max(n.numBatches,r[v].unshift(s))):((c=i[v]).nullable||(i[v]=c.clone({nullable:!0})),t[v]=s?s._changeLengthAndBackfillNullBitmap(e):cg.Data.new(c.type,0,e,e,lg(O)));return t}});var ze=R(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.BaseVector=void 0;var QF=Se(),ZF=pr(),XF=Fs(),El=qe(),Rl=class extends El.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`${QF.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 El.Vector.new(e,t)}concat(...e){return ZF.Chunked.concat(this,...e)}slice(e,t){return XF.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]=El.Vector.new(this.data.childData[e]))}toJSON(){return[...this]}_sliceInternal(e,t,r){return e.clone(e.data.slice(t,r-t),null)}_bindDataAccessors(e){}};Pa.BaseVector=Rl;Rl.prototype[Symbol.isConcatSpreadable]=!0});var Cl=R(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.BinaryVector=void 0;var eE=qe(),tE=ze(),iE=ve(),fg=class extends tE.BaseVector{asUtf8(){return eE.Vector.new(this.data.clone(new iE.Utf8))}};Va.BinaryVector=fg});var Ul=R(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.BoolVector=void 0;var rE=ve(),nE=ze(),sE=vi(),hg=class extends nE.BaseVector{static from(e){return sE.vectorFromValuesWithType(()=>new rE.Bool,e)}};Na.BoolVector=hg});var Ml=R(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.DateMillisecondVector=vr.DateDayVector=vr.DateVector=void 0;var oE=Se(),aE=ze(),pg=vi(),kl=ve(),La=class extends aE.BaseVector{static from(...e){return e.length===2?pg.vectorFromValuesWithType(()=>e[1]===oE.DateUnit.DAY?new kl.DateDay:new kl.DateMillisecond,e[0]):pg.vectorFromValuesWithType(()=>new kl.DateMillisecond,e[0])}};vr.DateVector=La;var yg=class extends La{};vr.DateDayVector=yg;var _g=class extends La{};vr.DateMillisecondVector=_g});var Pl=R(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.DecimalVector=void 0;var uE=ze(),mg=class extends uE.BaseVector{};xa.DecimalVector=mg});var Wa=R(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.DictionaryVector=void 0;var cE=Jt(),bg=qe(),lE=ze(),dE=vi(),fE=ve(),Vl=class extends lE.BaseVector{constructor(e){super(e);this.indices=bg.Vector.new(e.clone(this.type.indices))}static from(...e){if(e.length===3){let[t,r,n]=e,s=new fE.Dictionary(t.type,r,null,null);return bg.Vector.new(cE.Data.Dictionary(s,0,n.length,0,null,n,t))}return dE.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)}};qa.DictionaryVector=Vl;Vl.prototype.indices=null});var Nl=R(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.FixedSizeBinaryVector=void 0;var hE=ze(),gg=class extends hE.BaseVector{};za.FixedSizeBinaryVector=gg});var Ll=R(Ha=>{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});Ha.FixedSizeListVector=void 0;var pE=ze(),vg=class extends pE.BaseVector{};Ha.FixedSizeListVector=vg});var zl=R(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.Float64Vector=wi.Float32Vector=wi.Float16Vector=wi.FloatVector=void 0;var yE=Jt(),_E=qe(),mE=ze(),bE=vi(),Xr=ve(),Ns=class extends mE.BaseVector{static from(e){let t=wE(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){let r=vE(e.constructor)||t;if(t===null&&(t=r),t&&t===r){let n=new t,s=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!gE(t,e.constructor))return _E.Vector.new(yE.Data.Float(n,0,s,0,null,e))}}if(t)return bE.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")}};wi.FloatVector=Ns;var xl=class extends Ns{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}};wi.Float16Vector=xl;var ql=class extends Ns{};wi.Float32Vector=ql;var Wl=class extends Ns{};wi.Float64Vector=Wl;var gE=(i,e)=>i===Xr.Float16&&e!==Uint16Array,vE=i=>{switch(i){case Uint16Array:return Xr.Float16;case Float32Array:return Xr.Float32;case Float64Array:return Xr.Float64;default:return null}},wE=i=>{switch(i){case xl:return Xr.Float16;case ql:return Xr.Float32;case Wl:return Xr.Float64;default:return null}}});var Hl=R(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.IntervalYearMonthVector=wr.IntervalDayTimeVector=wr.IntervalVector=void 0;var jE=ze(),Ya=class extends jE.BaseVector{};wr.IntervalVector=Ya;var wg=class extends Ya{};wr.IntervalDayTimeVector=wg;var jg=class extends Ya{};wr.IntervalYearMonthVector=jg});var Ga=R(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.Uint64Vector=Qe.Uint32Vector=Qe.Uint16Vector=Qe.Uint8Vector=Qe.Int64Vector=Qe.Int32Vector=Qe.Int16Vector=Qe.Int8Vector=Qe.IntVector=void 0;var IE=Jt(),TE=qe(),BE=ze(),SE=vi(),Ig=ft(),Tg=Ze(),xe=ve(),ji=class extends BE.BaseVector{static from(...e){let[t,r=!1]=e,n=DE(this,r);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let s=OE(t.constructor,r)||n;if(n===null&&(n=s),n&&n===s){let c=new n,_=t.byteLength/c.ArrayType.BYTES_PER_ELEMENT;return AE(n,t.constructor)&&(_*=.5),TE.Vector.new(IE.Data.Int(c,0,_,0,null,t))}}if(n)return SE.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")}};Qe.IntVector=ji;var Yl=class extends ji{};Qe.Int8Vector=Yl;var Gl=class extends ji{};Qe.Int16Vector=Gl;var Kl=class extends ji{};Qe.Int32Vector=Kl;var $l=class extends ji{toBigInt64Array(){return Tg.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}};Qe.Int64Vector=$l;var Jl=class extends ji{};Qe.Uint8Vector=Jl;var Ql=class extends ji{};Qe.Uint16Vector=Ql;var Zl=class extends ji{};Qe.Uint32Vector=Zl;var Xl=class extends ji{toBigUint64Array(){return Tg.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}};Qe.Uint64Vector=Xl;var AE=(i,e)=>(i===xe.Int64||i===xe.Uint64)&&(e===Int32Array||e===Uint32Array),OE=(i,e)=>{switch(i){case Int8Array:return xe.Int8;case Int16Array:return xe.Int16;case Int32Array:return e?xe.Int64:xe.Int32;case Ig.BigInt64Array:return xe.Int64;case Uint8Array:return xe.Uint8;case Uint16Array:return xe.Uint16;case Uint32Array:return e?xe.Uint64:xe.Uint32;case Ig.BigUint64Array:return xe.Uint64;default:return null}},DE=(i,e)=>{switch(i){case Yl:return xe.Int8;case Gl:return xe.Int16;case Kl:return e?xe.Int64:xe.Int32;case $l:return xe.Int64;case Jl:return xe.Uint8;case Ql:return xe.Uint16;case Zl:return e?xe.Uint64:xe.Uint32;case Xl:return xe.Uint64;default:return null}}});var ed=R(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.ListVector=void 0;var FE=ze(),Bg=class extends FE.BaseVector{};Ka.ListVector=Bg});var td=R($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});$a.MapVector=void 0;var EE=Os(),RE=qe(),CE=ze(),UE=ve(),Sg=class extends CE.BaseVector{asList(){let e=this.type.children[0];return RE.Vector.new(this.data.clone(new UE.List(e)))}bind(e){let t=this.getChildAt(0),{[e]:r,[e+1]:n}=this.valueOffsets;return new EE.MapRow(t.slice(r,n))}};$a.MapVector=Sg});var id=R(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.NullVector=void 0;var kE=ze(),Ag=class extends kE.BaseVector{};Ja.NullVector=Ag});var rd=R(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.StructVector=void 0;var ME=Os(),PE=ze(),VE=Symbol.for("rowIndex"),Og=class extends PE.BaseVector{bind(e){let t=this._row||(this._row=new ME.StructRow(this)),r=Object.create(t);return r[VE]=e,r}};Qa.StructVector=Og});var nd=R(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.TimestampNanosecondVector=Lt.TimestampMicrosecondVector=Lt.TimestampMillisecondVector=Lt.TimestampSecondVector=Lt.TimestampVector=void 0;var NE=ze(),qn=class extends NE.BaseVector{};Lt.TimestampVector=qn;var Dg=class extends qn{};Lt.TimestampSecondVector=Dg;var Fg=class extends qn{};Lt.TimestampMillisecondVector=Fg;var Eg=class extends qn{};Lt.TimestampMicrosecondVector=Eg;var Rg=class extends qn{};Lt.TimestampNanosecondVector=Rg});var sd=R(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.TimeNanosecondVector=xt.TimeMicrosecondVector=xt.TimeMillisecondVector=xt.TimeSecondVector=xt.TimeVector=void 0;var LE=ze(),Wn=class extends LE.BaseVector{};xt.TimeVector=Wn;var Cg=class extends Wn{};xt.TimeSecondVector=Cg;var Ug=class extends Wn{};xt.TimeMillisecondVector=Ug;var kg=class extends Wn{};xt.TimeMicrosecondVector=kg;var Mg=class extends Wn{};xt.TimeNanosecondVector=Mg});var od=R(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.SparseUnionVector=jr.DenseUnionVector=jr.UnionVector=void 0;var xE=ze(),Za=class extends xE.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}};jr.UnionVector=Za;var Pg=class extends Za{get valueOffsets(){return this.data.valueOffsets}};jr.DenseUnionVector=Pg;var Vg=class extends Za{};jr.SparseUnionVector=Vg});var ad=R(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});Xa.Utf8Vector=void 0;var qE=qe(),WE=ze(),Ng=ve(),zE=vi(),Lg=class extends WE.BaseVector{static from(e){return zE.vectorFromValuesWithType(()=>new Ng.Utf8,e)}asBinary(){return qE.Vector.new(this.data.clone(new Ng.Binary))}};Xa.Utf8Vector=Lg});var xg=R(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.partial2=Ir.partial1=Ir.partial0=void 0;function HE(i){return function(){return i(this)}}Ir.partial0=HE;function YE(i){return function(e){return i(this,e)}}Ir.partial1=YE;function GE(i){return function(e,t){return i(this,e,t)}}Ir.partial2=GE});var ld=R(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.instance=zn.GetVisitor=void 0;var eu=js(),KE=ut(),$E=Rr(),JE=bs(),qt=Se(),Z=class extends KE.Visitor{};zn.GetVisitor=Z;var QE=(i,e)=>864e5*i[e],ud=(i,e)=>4294967296*i[e+1]+(i[e]>>>0),ZE=(i,e)=>4294967296*(i[e+1]/1e3)+(i[e]>>>0)/1e3,XE=(i,e)=>4294967296*(i[e+1]/1e6)+(i[e]>>>0)/1e6,qg=i=>new Date(i),eR=(i,e)=>qg(QE(i,e)),tR=(i,e)=>qg(ud(i,e)),iR=(i,e)=>null,Wg=(i,e,t)=>{let{[t]:r,[t+1]:n}=e;return r!=null&&n!=null?i.subarray(r,n):null},rR=({offset:i,values:e},t)=>{let r=i+t;return(e[r>>3]&1<<r%8)!=0},zg=({values:i},e)=>eR(i,e),Hg=({values:i},e)=>tR(i,e*2),Ii=({stride:i,values:e},t)=>e[i*t],Yg=({stride:i,values:e},t)=>JE.uint16ToFloat64(e[i*t]),cd=({stride:i,values:e,type:t},r)=>eu.BN.new(e.subarray(i*r,i*(r+1)),t.isSigned),nR=({stride:i,values:e},t)=>e.subarray(i*t,i*(t+1)),sR=({values:i,valueOffsets:e},t)=>Wg(i,e,t),oR=({values:i,valueOffsets:e},t)=>{let r=Wg(i,e,t);return r!==null?$E.decodeUtf8(r):null},aR=(i,e)=>i.type.bitWidth<64?Ii(i,e):cd(i,e),uR=(i,e)=>i.type.precision!==qt.Precision.HALF?Ii(i,e):Yg(i,e),cR=(i,e)=>i.type.unit===qt.DateUnit.DAY?zg(i,e):Hg(i,e),Gg=({values:i},e)=>1e3*ud(i,e*2),Kg=({values:i},e)=>ud(i,e*2),$g=({values:i},e)=>ZE(i,e*2),Jg=({values:i},e)=>XE(i,e*2),lR=(i,e)=>{switch(i.type.unit){case qt.TimeUnit.SECOND:return Gg(i,e);case qt.TimeUnit.MILLISECOND:return Kg(i,e);case qt.TimeUnit.MICROSECOND:return $g(i,e);case qt.TimeUnit.NANOSECOND:return Jg(i,e)}},Qg=({values:i,stride:e},t)=>i[e*t],Zg=({values:i,stride:e},t)=>i[e*t],Xg=({values:i},e)=>eu.BN.signed(i.subarray(2*e,2*(e+1))),ev=({values:i},e)=>eu.BN.signed(i.subarray(2*e,2*(e+1))),dR=(i,e)=>{switch(i.type.unit){case qt.TimeUnit.SECOND:return Qg(i,e);case qt.TimeUnit.MILLISECOND:return Zg(i,e);case qt.TimeUnit.MICROSECOND:return Xg(i,e);case qt.TimeUnit.NANOSECOND:return ev(i,e)}},fR=({values:i},e)=>eu.BN.decimal(i.subarray(4*e,4*(e+1))),hR=(i,e)=>{let t=i.getChildAt(0),{valueOffsets:r,stride:n}=i;return t.slice(r[e*n],r[e*n+1])},pR=(i,e)=>i.bind(e),yR=(i,e)=>i.bind(e),_R=(i,e)=>i.type.mode===qt.UnionMode.Dense?tv(i,e):iv(i,e),tv=(i,e)=>{let t=i.typeIdToChildIndex[i.typeIds[e]],r=i.getChildAt(t);return r?r.get(i.valueOffsets[e]):null},iv=(i,e)=>{let t=i.typeIdToChildIndex[i.typeIds[e]],r=i.getChildAt(t);return r?r.get(e):null},mR=(i,e)=>i.getValue(i.getKey(e)),bR=(i,e)=>i.type.unit===qt.IntervalUnit.DAY_TIME?rv(i,e):nv(i,e),rv=({values:i},e)=>i.subarray(2*e,2*(e+1)),nv=({values:i},e)=>{let t=i[e],r=new Int32Array(2);return r[0]=t/12|0,r[1]=t%12|0,r},gR=(i,e)=>{let t=i.getChildAt(0),{stride:r}=i;return t.slice(e*r,(e+1)*r)};Z.prototype.visitNull=iR;Z.prototype.visitBool=rR;Z.prototype.visitInt=aR;Z.prototype.visitInt8=Ii;Z.prototype.visitInt16=Ii;Z.prototype.visitInt32=Ii;Z.prototype.visitInt64=cd;Z.prototype.visitUint8=Ii;Z.prototype.visitUint16=Ii;Z.prototype.visitUint32=Ii;Z.prototype.visitUint64=cd;Z.prototype.visitFloat=uR;Z.prototype.visitFloat16=Yg;Z.prototype.visitFloat32=Ii;Z.prototype.visitFloat64=Ii;Z.prototype.visitUtf8=oR;Z.prototype.visitBinary=sR;Z.prototype.visitFixedSizeBinary=nR;Z.prototype.visitDate=cR;Z.prototype.visitDateDay=zg;Z.prototype.visitDateMillisecond=Hg;Z.prototype.visitTimestamp=lR;Z.prototype.visitTimestampSecond=Gg;Z.prototype.visitTimestampMillisecond=Kg;Z.prototype.visitTimestampMicrosecond=$g;Z.prototype.visitTimestampNanosecond=Jg;Z.prototype.visitTime=dR;Z.prototype.visitTimeSecond=Qg;Z.prototype.visitTimeMillisecond=Zg;Z.prototype.visitTimeMicrosecond=Xg;Z.prototype.visitTimeNanosecond=ev;Z.prototype.visitDecimal=fR;Z.prototype.visitList=hR;Z.prototype.visitStruct=yR;Z.prototype.visitUnion=_R;Z.prototype.visitDenseUnion=tv;Z.prototype.visitSparseUnion=iv;Z.prototype.visitDictionary=mR;Z.prototype.visitInterval=bR;Z.prototype.visitIntervalDayTime=rv;Z.prototype.visitIntervalYearMonth=nv;Z.prototype.visitFixedSizeList=gR;Z.prototype.visitMap=pR;zn.instance=new Z});var uv=R(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.instance=Hn.IndexOfVisitor=void 0;var vR=ut(),sv=ci(),ov=Fs(),X=class extends vR.Visitor{};Hn.IndexOfVisitor=X;function wR(i,e){return e===null&&i.length>0?0:-1}function jR(i,e){let{nullBitmap:t}=i.data;if(!t||i.nullCount<=0)return-1;let r=0;for(let n of new sv.BitIterator(t,i.data.offset+(e||0),i.length,t,sv.getBool)){if(!n)return r;++r}return-1}function de(i,e,t){if(e===void 0)return-1;if(e===null)return jR(i,t);let r=ov.createElementComparator(e);for(let n=(t||0)-1,s=i.length;++n<s;)if(r(i.get(n)))return n;return-1}function av(i,e,t){let r=ov.createElementComparator(e);for(let n=(t||0)-1,s=i.length;++n<s;)if(r(i.get(n)))return n;return-1}X.prototype.visitNull=wR;X.prototype.visitBool=de;X.prototype.visitInt=de;X.prototype.visitInt8=de;X.prototype.visitInt16=de;X.prototype.visitInt32=de;X.prototype.visitInt64=de;X.prototype.visitUint8=de;X.prototype.visitUint16=de;X.prototype.visitUint32=de;X.prototype.visitUint64=de;X.prototype.visitFloat=de;X.prototype.visitFloat16=de;X.prototype.visitFloat32=de;X.prototype.visitFloat64=de;X.prototype.visitUtf8=de;X.prototype.visitBinary=de;X.prototype.visitFixedSizeBinary=de;X.prototype.visitDate=de;X.prototype.visitDateDay=de;X.prototype.visitDateMillisecond=de;X.prototype.visitTimestamp=de;X.prototype.visitTimestampSecond=de;X.prototype.visitTimestampMillisecond=de;X.prototype.visitTimestampMicrosecond=de;X.prototype.visitTimestampNanosecond=de;X.prototype.visitTime=de;X.prototype.visitTimeSecond=de;X.prototype.visitTimeMillisecond=de;X.prototype.visitTimeMicrosecond=de;X.prototype.visitTimeNanosecond=de;X.prototype.visitDecimal=de;X.prototype.visitList=de;X.prototype.visitStruct=de;X.prototype.visitUnion=de;X.prototype.visitDenseUnion=av;X.prototype.visitSparseUnion=av;X.prototype.visitDictionary=de;X.prototype.visitInterval=de;X.prototype.visitIntervalDayTime=de;X.prototype.visitIntervalYearMonth=de;X.prototype.visitFixedSizeList=de;X.prototype.visitMap=de;Hn.instance=new X});var dd=R(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.instance=Yn.IteratorVisitor=void 0;var tu=Se(),IR=ut(),TR=ci(),cv=ld(),ee=class extends IR.Visitor{};Yn.IteratorVisitor=ee;function BR(i){let e=cv.instance.getVisitFn(i);return new TR.BitIterator(i.data.nullBitmap,i.data.offset,i.length,i,(t,r,n,s)=>(n&1<<s)!=0?e(t,r):null)}var lv=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 ue(i){if(i.nullCount>0)return BR(i);let{type:e,typeId:t,length:r}=i;return i.stride===1&&(t===tu.Type.Timestamp||t===tu.Type.Int&&e.bitWidth!==64||t===tu.Type.Time&&e.bitWidth!==64||t===tu.Type.Float&&e.precision>0)?i.data.values.subarray(0,r)[Symbol.iterator]():new lv(i,cv.instance.getVisitFn(i))}ee.prototype.visitNull=ue;ee.prototype.visitBool=ue;ee.prototype.visitInt=ue;ee.prototype.visitInt8=ue;ee.prototype.visitInt16=ue;ee.prototype.visitInt32=ue;ee.prototype.visitInt64=ue;ee.prototype.visitUint8=ue;ee.prototype.visitUint16=ue;ee.prototype.visitUint32=ue;ee.prototype.visitUint64=ue;ee.prototype.visitFloat=ue;ee.prototype.visitFloat16=ue;ee.prototype.visitFloat32=ue;ee.prototype.visitFloat64=ue;ee.prototype.visitUtf8=ue;ee.prototype.visitBinary=ue;ee.prototype.visitFixedSizeBinary=ue;ee.prototype.visitDate=ue;ee.prototype.visitDateDay=ue;ee.prototype.visitDateMillisecond=ue;ee.prototype.visitTimestamp=ue;ee.prototype.visitTimestampSecond=ue;ee.prototype.visitTimestampMillisecond=ue;ee.prototype.visitTimestampMicrosecond=ue;ee.prototype.visitTimestampNanosecond=ue;ee.prototype.visitTime=ue;ee.prototype.visitTimeSecond=ue;ee.prototype.visitTimeMillisecond=ue;ee.prototype.visitTimeMicrosecond=ue;ee.prototype.visitTimeNanosecond=ue;ee.prototype.visitDecimal=ue;ee.prototype.visitList=ue;ee.prototype.visitStruct=ue;ee.prototype.visitUnion=ue;ee.prototype.visitDenseUnion=ue;ee.prototype.visitSparseUnion=ue;ee.prototype.visitDictionary=ue;ee.prototype.visitInterval=ue;ee.prototype.visitIntervalDayTime=ue;ee.prototype.visitIntervalYearMonth=ue;ee.prototype.visitFixedSizeList=ue;ee.prototype.visitMap=ue;Yn.instance=new ee});var dv=R(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.instance=Gn.ToArrayVisitor=void 0;var Ls=Se(),SR=ut(),AR=dd(),te=class extends SR.Visitor{};Gn.ToArrayVisitor=te;function ce(i){let{type:e,length:t,stride:r}=i;switch(e.typeId){case Ls.Type.Int:case Ls.Type.Float:case Ls.Type.Decimal:case Ls.Type.Time:case Ls.Type.Timestamp:return i.data.values.subarray(0,t*r)}return[...AR.instance.visit(i)]}te.prototype.visitNull=ce;te.prototype.visitBool=ce;te.prototype.visitInt=ce;te.prototype.visitInt8=ce;te.prototype.visitInt16=ce;te.prototype.visitInt32=ce;te.prototype.visitInt64=ce;te.prototype.visitUint8=ce;te.prototype.visitUint16=ce;te.prototype.visitUint32=ce;te.prototype.visitUint64=ce;te.prototype.visitFloat=ce;te.prototype.visitFloat16=ce;te.prototype.visitFloat32=ce;te.prototype.visitFloat64=ce;te.prototype.visitUtf8=ce;te.prototype.visitBinary=ce;te.prototype.visitFixedSizeBinary=ce;te.prototype.visitDate=ce;te.prototype.visitDateDay=ce;te.prototype.visitDateMillisecond=ce;te.prototype.visitTimestamp=ce;te.prototype.visitTimestampSecond=ce;te.prototype.visitTimestampMillisecond=ce;te.prototype.visitTimestampMicrosecond=ce;te.prototype.visitTimestampNanosecond=ce;te.prototype.visitTime=ce;te.prototype.visitTimeSecond=ce;te.prototype.visitTimeMillisecond=ce;te.prototype.visitTimeMicrosecond=ce;te.prototype.visitTimeNanosecond=ce;te.prototype.visitDecimal=ce;te.prototype.visitList=ce;te.prototype.visitStruct=ce;te.prototype.visitUnion=ce;te.prototype.visitDenseUnion=ce;te.prototype.visitSparseUnion=ce;te.prototype.visitDictionary=ce;te.prototype.visitInterval=ce;te.prototype.visitIntervalDayTime=ce;te.prototype.visitIntervalYearMonth=ce;te.prototype.visitFixedSizeList=ce;te.prototype.visitMap=ce;Gn.instance=new te});var fv=R(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.instance=Kn.ByteWidthVisitor=void 0;var OR=ut(),DR=Se(),xs=(i,e)=>i+e,fd=i=>`Cannot compute the byte width of variable-width column ${i}`,hd=class extends OR.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(fd(e))}visitUtf8(e){throw new Error(fd(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===DR.TimeUnit.SECOND?4:8}visitInterval(e){return(e.unit+1)*4}visitList(e){throw new Error(fd(e))}visitStruct(e){return this.visitFields(e.children).reduce(xs,0)}visitUnion(e){return this.visitFields(e.children).reduce(xs,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(xs,0)}visitMap(e){return this.visitFields(e.children).reduce(xs,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(xs,0)}};Kn.ByteWidthVisitor=hd;Kn.instance=new hd});var hv=R($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.instance=$n.GetVectorConstructor=void 0;var FR=ut(),ER=Cl(),RR=Ul(),pd=Ml(),CR=Pl(),UR=Wa(),kR=Nl(),MR=Ll(),iu=zl(),yd=Hl(),Ni=Ga(),PR=ed(),VR=td(),NR=id(),LR=rd(),qs=nd(),Ws=sd(),_d=od(),xR=ad(),md=class extends FR.Visitor{visitNull(){return NR.NullVector}visitBool(){return RR.BoolVector}visitInt(){return Ni.IntVector}visitInt8(){return Ni.Int8Vector}visitInt16(){return Ni.Int16Vector}visitInt32(){return Ni.Int32Vector}visitInt64(){return Ni.Int64Vector}visitUint8(){return Ni.Uint8Vector}visitUint16(){return Ni.Uint16Vector}visitUint32(){return Ni.Uint32Vector}visitUint64(){return Ni.Uint64Vector}visitFloat(){return iu.FloatVector}visitFloat16(){return iu.Float16Vector}visitFloat32(){return iu.Float32Vector}visitFloat64(){return iu.Float64Vector}visitUtf8(){return xR.Utf8Vector}visitBinary(){return ER.BinaryVector}visitFixedSizeBinary(){return kR.FixedSizeBinaryVector}visitDate(){return pd.DateVector}visitDateDay(){return pd.DateDayVector}visitDateMillisecond(){return pd.DateMillisecondVector}visitTimestamp(){return qs.TimestampVector}visitTimestampSecond(){return qs.TimestampSecondVector}visitTimestampMillisecond(){return qs.TimestampMillisecondVector}visitTimestampMicrosecond(){return qs.TimestampMicrosecondVector}visitTimestampNanosecond(){return qs.TimestampNanosecondVector}visitTime(){return Ws.TimeVector}visitTimeSecond(){return Ws.TimeSecondVector}visitTimeMillisecond(){return Ws.TimeMillisecondVector}visitTimeMicrosecond(){return Ws.TimeMicrosecondVector}visitTimeNanosecond(){return Ws.TimeNanosecondVector}visitDecimal(){return CR.DecimalVector}visitList(){return PR.ListVector}visitStruct(){return LR.StructVector}visitUnion(){return _d.UnionVector}visitDenseUnion(){return _d.DenseUnionVector}visitSparseUnion(){return _d.SparseUnionVector}visitDictionary(){return UR.DictionaryVector}visitInterval(){return yd.IntervalVector}visitIntervalDayTime(){return yd.IntervalDayTimeVector}visitIntervalYearMonth(){return yd.IntervalYearMonthVector}visitFixedSizeList(){return MR.FixedSizeListVector}visitMap(){return VR.MapVector}};$n.GetVectorConstructor=md;$n.instance=new md});var vi=R(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 bd=dt(),qR=qe();Object.defineProperty(C,"Vector",{enumerable:!0,get:function(){return qR.Vector}});var WR=ze();Object.defineProperty(C,"BaseVector",{enumerable:!0,get:function(){return WR.BaseVector}});var zR=Cl();Object.defineProperty(C,"BinaryVector",{enumerable:!0,get:function(){return zR.BinaryVector}});var HR=Ul();Object.defineProperty(C,"BoolVector",{enumerable:!0,get:function(){return HR.BoolVector}});var YR=pr();Object.defineProperty(C,"Chunked",{enumerable:!0,get:function(){return YR.Chunked}});var gd=Ml();Object.defineProperty(C,"DateVector",{enumerable:!0,get:function(){return gd.DateVector}});Object.defineProperty(C,"DateDayVector",{enumerable:!0,get:function(){return gd.DateDayVector}});Object.defineProperty(C,"DateMillisecondVector",{enumerable:!0,get:function(){return gd.DateMillisecondVector}});var GR=Pl();Object.defineProperty(C,"DecimalVector",{enumerable:!0,get:function(){return GR.DecimalVector}});var KR=Wa();Object.defineProperty(C,"DictionaryVector",{enumerable:!0,get:function(){return KR.DictionaryVector}});var $R=Nl();Object.defineProperty(C,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return $R.FixedSizeBinaryVector}});var JR=Ll();Object.defineProperty(C,"FixedSizeListVector",{enumerable:!0,get:function(){return JR.FixedSizeListVector}});var ru=zl();Object.defineProperty(C,"FloatVector",{enumerable:!0,get:function(){return ru.FloatVector}});Object.defineProperty(C,"Float16Vector",{enumerable:!0,get:function(){return ru.Float16Vector}});Object.defineProperty(C,"Float32Vector",{enumerable:!0,get:function(){return ru.Float32Vector}});Object.defineProperty(C,"Float64Vector",{enumerable:!0,get:function(){return ru.Float64Vector}});var vd=Hl();Object.defineProperty(C,"IntervalVector",{enumerable:!0,get:function(){return vd.IntervalVector}});Object.defineProperty(C,"IntervalDayTimeVector",{enumerable:!0,get:function(){return vd.IntervalDayTimeVector}});Object.defineProperty(C,"IntervalYearMonthVector",{enumerable:!0,get:function(){return vd.IntervalYearMonthVector}});var Li=Ga();Object.defineProperty(C,"IntVector",{enumerable:!0,get:function(){return Li.IntVector}});Object.defineProperty(C,"Int8Vector",{enumerable:!0,get:function(){return Li.Int8Vector}});Object.defineProperty(C,"Int16Vector",{enumerable:!0,get:function(){return Li.Int16Vector}});Object.defineProperty(C,"Int32Vector",{enumerable:!0,get:function(){return Li.Int32Vector}});Object.defineProperty(C,"Int64Vector",{enumerable:!0,get:function(){return Li.Int64Vector}});Object.defineProperty(C,"Uint8Vector",{enumerable:!0,get:function(){return Li.Uint8Vector}});Object.defineProperty(C,"Uint16Vector",{enumerable:!0,get:function(){return Li.Uint16Vector}});Object.defineProperty(C,"Uint32Vector",{enumerable:!0,get:function(){return Li.Uint32Vector}});Object.defineProperty(C,"Uint64Vector",{enumerable:!0,get:function(){return Li.Uint64Vector}});var QR=ed();Object.defineProperty(C,"ListVector",{enumerable:!0,get:function(){return QR.ListVector}});var ZR=td();Object.defineProperty(C,"MapVector",{enumerable:!0,get:function(){return ZR.MapVector}});var XR=id();Object.defineProperty(C,"NullVector",{enumerable:!0,get:function(){return XR.NullVector}});var eC=rd();Object.defineProperty(C,"StructVector",{enumerable:!0,get:function(){return eC.StructVector}});var zs=nd();Object.defineProperty(C,"TimestampVector",{enumerable:!0,get:function(){return zs.TimestampVector}});Object.defineProperty(C,"TimestampSecondVector",{enumerable:!0,get:function(){return zs.TimestampSecondVector}});Object.defineProperty(C,"TimestampMillisecondVector",{enumerable:!0,get:function(){return zs.TimestampMillisecondVector}});Object.defineProperty(C,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return zs.TimestampMicrosecondVector}});Object.defineProperty(C,"TimestampNanosecondVector",{enumerable:!0,get:function(){return zs.TimestampNanosecondVector}});var Hs=sd();Object.defineProperty(C,"TimeVector",{enumerable:!0,get:function(){return Hs.TimeVector}});Object.defineProperty(C,"TimeSecondVector",{enumerable:!0,get:function(){return Hs.TimeSecondVector}});Object.defineProperty(C,"TimeMillisecondVector",{enumerable:!0,get:function(){return Hs.TimeMillisecondVector}});Object.defineProperty(C,"TimeMicrosecondVector",{enumerable:!0,get:function(){return Hs.TimeMicrosecondVector}});Object.defineProperty(C,"TimeNanosecondVector",{enumerable:!0,get:function(){return Hs.TimeNanosecondVector}});var wd=od();Object.defineProperty(C,"UnionVector",{enumerable:!0,get:function(){return wd.UnionVector}});Object.defineProperty(C,"DenseUnionVector",{enumerable:!0,get:function(){return wd.DenseUnionVector}});Object.defineProperty(C,"SparseUnionVector",{enumerable:!0,get:function(){return wd.SparseUnionVector}});var tC=ad();Object.defineProperty(C,"Utf8Vector",{enumerable:!0,get:function(){return tC.Utf8Vector}});var pv=Os();Object.defineProperty(C,"MapRow",{enumerable:!0,get:function(){return pv.MapRow}});Object.defineProperty(C,"StructRow",{enumerable:!0,get:function(){return pv.StructRow}});var Ys=xg(),jd=Se(),Jn=qe(),yv=pr(),en=ze(),iC=ci(),nu=ft(),_v=Ve(),mv=ld(),bv=kc(),gv=uv(),vv=dv(),wv=dd(),jv=fv(),Iv=hv();Jn.Vector.new=rC;Jn.Vector.from=sC;function rC(i,...e){return new(Iv.instance.getVisitFn(i)())(i,...e)}function nC(i,e){if(nu.isIterable(e))return Jn.Vector.from({nullValues:[null,void 0],type:i(),values:e});if(nu.isAsyncIterable(e))return Jn.Vector.from({nullValues:[null,void 0],type:i(),values:e});let{values:t=[],type:r=i(),nullValues:n=[null,void 0]}=Object.assign({},e);return nu.isIterable(t)?Jn.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:r})):Jn.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:r}))}C.vectorFromValuesWithType=nC;function sC(i){let e=Object.assign({nullValues:[null,void 0]},i),{values:t=[]}=e,r=bd.__rest(e,["values"]);if(nu.isIterable(t)){let n=[..._v.Builder.throughIterable(r)(t)];return n.length===1?n[0]:yv.Chunked.concat(n)}return(n=>bd.__awaiter(this,void 0,void 0,function*(){var s,c;let _=_v.Builder.throughAsyncIterable(r);try{for(var v=bd.__asyncValues(_(t)),B;B=yield v.next(),!B.done;){let O=B.value;n.push(O)}}catch(O){s={error:O}}finally{try{B&&!B.done&&(c=v.return)&&(yield c.call(v))}finally{if(s)throw s.error}}return n.length===1?n[0]:yv.Chunked.concat(n)}))([])}en.BaseVector.prototype.get=function(e){return mv.instance.visit(this,e)};en.BaseVector.prototype.set=function(e,t){return bv.instance.visit(this,e,t)};en.BaseVector.prototype.indexOf=function(e,t){return gv.instance.visit(this,e,t)};en.BaseVector.prototype.toArray=function(){return vv.instance.visit(this)};en.BaseVector.prototype.getByteWidth=function(){return jv.instance.visit(this.type)};en.BaseVector.prototype[Symbol.iterator]=function(){return wv.instance.visit(this)};en.BaseVector.prototype._bindDataAccessors=cC;Object.keys(jd.Type).map(i=>jd.Type[i]).filter(i=>typeof i=="number").filter(i=>i!==jd.Type.NONE).forEach(i=>{let e=Iv.instance.visit(i);e.prototype.get=Ys.partial1(mv.instance.getVisitFn(i)),e.prototype.set=Ys.partial2(bv.instance.getVisitFn(i)),e.prototype.indexOf=Ys.partial2(gv.instance.getVisitFn(i)),e.prototype.toArray=Ys.partial0(vv.instance.getVisitFn(i)),e.prototype.getByteWidth=oC(jv.instance.getVisitFn(i)),e.prototype[Symbol.iterator]=Ys.partial0(wv.instance.getVisitFn(i))});function oC(i){return function(){return i(this.type)}}function aC(i){return function(e){return this.isValid(e)?i.call(this,e):null}}function uC(i){return function(e,t){iC.setBool(this.nullBitmap,this.offset+e,t!=null)&&i.call(this,e,t)}}function cC(){let i=this.nullBitmap;i&&i.byteLength>0&&(this.get=aC(this.get),this.set=uC(this.set))}});var Vs=R(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.Table=void 0;var su=dt(),lC=Mn(),dC=Gs(),Tv=Ma(),Id=Vi(),Bv=rt(),Td=ve(),Sv=Yr(),Bd=ft(),Av=Fl(),Sd=vi(),tt=class extends Sd.Chunked{constructor(...e){var t;let r=null;e[0]instanceof Bv.Schema&&(r=e[0]);let n=e[0]instanceof tt?e[0].chunks:Sv.selectArgs(Id.RecordBatch,e);if(!r&&!(r=(t=n[0])===null||t===void 0?void 0:t.schema))throw new TypeError("Table must be initialized with a Schema or at least one RecordBatch");n[0]||(n[0]=new Id._InternalEmptyPlaceholderRecordBatch(r));super(new Td.Struct(r.fields),n);this._schema=r,this._chunks=n}static empty(e=new Bv.Schema([])){return new tt(e,[])}static from(e){if(!e)return tt.empty();if(typeof e=="object"){let r=Bd.isIterable(e.values)?fC(e):Bd.isAsyncIterable(e.values)?hC(e):null;if(r!==null)return r}let t=dC.RecordBatchReader.from(e);return Bd.isPromise(t)?(()=>su.__awaiter(this,void 0,void 0,function*(){return yield tt.from(yield t)}))():t.isSync()&&(t=t.open())?t.schema?new tt(t.schema,[...t]):tt.empty():(r=>su.__awaiter(this,void 0,void 0,function*(){var n,s;let c=yield r,_=c.schema,v=[];if(_){try{for(var B=su.__asyncValues(c),O;O=yield B.next(),!O.done;){let N=O.value;v.push(N)}}catch(N){n={error:N}}finally{try{O&&!O.done&&(s=B.return)&&(yield s.call(B))}finally{if(n)throw n.error}}return new tt(_,v)}return tt.empty()}))(t.open())}static fromAsync(e){return su.__awaiter(this,void 0,void 0,function*(){return yield tt.from(e)})}static fromStruct(e){return tt.new(e.data.childData,e.type.children)}static new(...e){return new tt(...Av.distributeColumnsIntoRecordBatches(Sv.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 tt(this._schema,e)}getColumn(e){return this.getColumnAt(this.getColumnIndex(e))}getColumnAt(e){return this.getChildAt(e)}getColumnIndex(e){return this._schema.fields.findIndex(t=>t.name===e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t,r,n=this._schema.fields,s=this._children||(this._children=[]);if(r=s[e])return r;if(t=n[e]){let c=this._chunks.map(_=>_.getChildAt(e)).filter(_=>_!=null);if(c.length>0)return s[e]=new lC.Column(t,c)}return null}serialize(e="binary",t=!0){return(t?Tv.RecordBatchStreamWriter:Tv.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){let t=this._schema.fields.reduce((r,n,s)=>r.set(n.name,s),new Map);return this.selectAt(...e.map(r=>t.get(r)).filter(r=>r>-1))}selectAt(...e){let t=this._schema.selectAt(...e);return new tt(t,this._chunks.map(({length:r,data:{childData:n}})=>new Id.RecordBatch(t,r,e.map(s=>n[s]).filter(Boolean))))}assign(e){let t=this._schema.fields,[r,n]=e.schema.fields.reduce((_,v,B)=>{let[O,N]=_,q=t.findIndex(J=>J.name===v.name);return~q?N[q]=B:O.push(B),_},[[],[]]),s=this._schema.assign(e.schema),c=[...t.map((_,v,B,O=n[v])=>O===void 0?this.getColumnAt(v):e.getColumnAt(O)),...r.map(_=>e.getColumnAt(_))].filter(Boolean);return new tt(...Av.distributeVectorsIntoRecordBatches(s,c))}};ou.Table=tt;function fC(i){let{type:e}=i;return e instanceof Td.Struct?tt.fromStruct(Sd.StructVector.from(i)):null}function hC(i){let{type:e}=i;return e instanceof Td.Struct?Sd.StructVector.from(i).then(t=>tt.fromStruct(t)):null}});var Vi=R(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn._InternalEmptyPlaceholderRecordBatch=Qn.RecordBatch=void 0;var Ad=Jt(),Od=Vs(),pC=qe(),yC=ut(),_C=rt(),mC=ft(),bC=pr(),gC=Yr(),Dd=ve(),vC=Fl(),wC=vi(),Tr=class extends wC.StructVector{constructor(...e){let t,r=e[0],n;if(e[1]instanceof Ad.Data)[,t,n]=e;else{let s=r.fields,[,c,_]=e;t=Ad.Data.Struct(new Dd.Struct(s),0,c,0,null,_)}super(t,n);this._schema=r}static from(e){return mC.isIterable(e.values),Od.Table.from(e)}static new(...e){let[t,r]=gC.selectFieldArgs(e),n=r.filter(s=>s instanceof pC.Vector);return new Tr(...vC.ensureSameLengthData(new _C.Schema(t),n.map(s=>s.data)))}clone(e,t=this._children){return new Tr(this._schema,e,t)}concat(...e){let t=this._schema,r=bC.Chunked.flatten(this,...e);return new Od.Table(t,r.map(({data:n})=>new Tr(t,n)))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=au.collect(this))}select(...e){let t=this._schema.fields.reduce((r,n,s)=>r.set(n.name,s),new Map);return this.selectAt(...e.map(r=>t.get(r)).filter(r=>r>-1))}selectAt(...e){let t=this._schema.selectAt(...e),r=e.map(n=>this.data.childData[n]).filter(Boolean);return new Tr(t,this.length,r)}};Qn.RecordBatch=Tr;var Ov=class extends Tr{constructor(e){super(e,0,e.fields.map(t=>Ad.Data.new(t.type,0,0,0)))}};Qn._InternalEmptyPlaceholderRecordBatch=Ov;var au=class extends yC.Visitor{constructor(){super(...arguments);this.dictionaries=new Map}static collect(e){return new au().visit(e.data,new Dd.Struct(e.schema.fields)).dictionaries}visit(e,t){return Dd.DataType.isDictionary(t)?this.visitDictionary(e,t):(e.childData.forEach((r,n)=>this.visit(r,t.children[n].type)),this)}visitDictionary(e,t){let r=e.dictionary;return r&&r.length>0&&this.dictionaries.set(t.id,r),this}}});var Gs=R(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.AsyncRecordBatchFileReader=Ht.RecordBatchFileReader=Ht.AsyncRecordBatchStreamReader=Ht.RecordBatchStreamReader=Ht.RecordBatchReader=void 0;var Fe=dt(),Dv=qe(),uu=Se(),Fv=Yc(),Ev=_s(),Rv=lr(),Ks=$c(),Cv=db(),Fd=Vi(),tn=cn(),Wt=Ba(),zt=ft(),Ti=class extends tn.ReadableInterop{constructor(e){super();this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){let t=this._impl.open(e);return zt.isPromise(t)?t.then(()=>this):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return Ev.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Ev.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 Ti?e:zt.isArrowJSON(e)?jC(e):zt.isFileHandle(e)?BC(e):zt.isPromise(e)?(()=>Fe.__awaiter(this,void 0,void 0,function*(){return yield Ti.from(yield e)}))():zt.isFetchResponse(e)||zt.isReadableDOMStream(e)||zt.isReadableNodeStream(e)||zt.isAsyncIterable(e)?TC(new Rv.AsyncByteStream(e)):IC(new Rv.ByteStream(e))}static readAll(e){return e instanceof Ti?e.isSync()?Pv(e):Vv(e):zt.isArrowJSON(e)||ArrayBuffer.isView(e)||zt.isIterable(e)||zt.isIteratorResult(e)?Pv(e):Vv(e)}};Ht.RecordBatchReader=Ti;var Zn=class extends Ti{constructor(e){super(e);this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Fe.__asyncGenerator(this,arguments,function*(){yield Fe.__await(yield*Fe.__asyncDelegator(Fe.__asyncValues(this[Symbol.iterator]())))})}};Ht.RecordBatchStreamReader=Zn;var Xn=class extends Ti{constructor(e){super(e);this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}};Ht.AsyncRecordBatchStreamReader=Xn;var cu=class extends Zn{constructor(e){super(e);this._impl=e}};Ht.RecordBatchFileReader=cu;var Ed=class extends Xn{constructor(e){super(e);this._impl=e}};Ht.AsyncRecordBatchFileReader=Ed;var Rd=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 Fd.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){let{id:r,isDelta:n,data:s}=e,{dictionaries:c,schema:_}=this,v=c.get(r);if(n||!v){let B=_.dictionaries.get(r);return v&&n?v.concat(Dv.Vector.new(this._loadVectors(s,t,[B])[0])):Dv.Vector.new(this._loadVectors(s,t,[B])[0])}return v}_loadVectors(e,t,r){return new Cv.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(r)}},$s=class extends Rd{constructor(e,t){super(t);this._reader=zt.isArrowJSON(e)?new Wt.JSONMessageReader(this._handle=e):new Wt.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=Mv(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):tn.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):tn.ITERATOR_DONE}next(){if(this.closed)return tn.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let r=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(r,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let r=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(r,n);this.dictionaries.set(r.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Fd._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},Js=class extends Rd{constructor(e,t){super(t);this._reader=new Wt.AsyncMessageReader(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Fe.__awaiter(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return Fe.__awaiter(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=Mv(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return Fe.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):tn.ITERATOR_DONE})}return(e){return Fe.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):tn.ITERATOR_DONE})}next(){return Fe.__awaiter(this,void 0,void 0,function*(){if(this.closed)return tn.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let r=e.header(),n=yield t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(r,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let r=e.header(),n=yield t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(r,n);this.dictionaries.set(r.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Fd._InternalEmptyPlaceholderRecordBatch(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return Fe.__awaiter(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},Cd=class extends $s{constructor(e,t){super(e instanceof Ks.RandomAccessFile?e:new Ks.RandomAccessFile(e),t)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){if(this.closed)return null;this._footer||this.open();let t=this._footer&&this._footer.getRecordBatch(e);if(t&&this._handle.seek(t.offset)){let r=this._reader.readMessage(uu.MessageHeader.RecordBatch);if(r==null?void 0:r.isRecordBatch()){let n=r.header(),s=this._reader.readMessageBody(r.bodyLength);return this._loadRecordBatch(n,s)}}return null}_readDictionaryBatch(e){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){let r=this._reader.readMessage(uu.MessageHeader.DictionaryBatch);if(r==null?void 0:r.isDictionaryBatch()){let n=r.header(),s=this._reader.readMessageBody(r.bodyLength),c=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,c)}}}_readFooter(){let{_handle:e}=this,t=e.size-Wt.magicAndPadding,r=e.readInt32(t),n=e.readAt(t-r,r);return Fv.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}},Uv=class extends Js{constructor(e,...t){let r=typeof t[0]!="number"?t.shift():void 0,n=t[0]instanceof Map?t.shift():void 0;super(e instanceof Ks.AsyncRandomAccessFile?e:new Ks.AsyncRandomAccessFile(e,r),n)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isFile(){return!0}isAsync(){return!0}open(e){let t=Object.create(null,{open:{get:()=>super.open}});return Fe.__awaiter(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let r of this._footer.dictionaryBatches())r&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return Fe.__awaiter(this,void 0,void 0,function*(){if(this.closed)return null;this._footer||(yield this.open());let t=this._footer&&this._footer.getRecordBatch(e);if(t&&(yield this._handle.seek(t.offset))){let r=yield this._reader.readMessage(uu.MessageHeader.RecordBatch);if(r==null?void 0:r.isRecordBatch()){let n=r.header(),s=yield this._reader.readMessageBody(r.bodyLength);return this._loadRecordBatch(n,s)}}return null})}_readDictionaryBatch(e){return Fe.__awaiter(this,void 0,void 0,function*(){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&(yield this._handle.seek(t.offset))){let r=yield this._reader.readMessage(uu.MessageHeader.DictionaryBatch);if(r==null?void 0:r.isDictionaryBatch()){let n=r.header(),s=yield this._reader.readMessageBody(r.bodyLength),c=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,c)}}})}_readFooter(){return Fe.__awaiter(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-Wt.magicAndPadding,r=yield e.readInt32(t),n=yield e.readAt(t-r,r);return Fv.Footer.decode(n)})}_readNextMessageAndValidate(e){return Fe.__awaiter(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&(yield this._handle.seek(t.offset)))return yield this._reader.readMessage(e)}return null})}},kv=class extends $s{constructor(e,t){super(e,t)}_loadVectors(e,t,r){return new Cv.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(r)}};function Mv(i,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:i.autoDestroy}function*Pv(i){let e=Ti.from(i);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}function Vv(i){return Fe.__asyncGenerator(this,arguments,function*(){let t=yield Fe.__await(Ti.from(i));try{if(!(yield Fe.__await(t.open({autoDestroy:!1}))).closed)do yield yield Fe.__await(t);while(!(yield Fe.__await(t.reset().open())).closed)}finally{yield Fe.__await(t.cancel())}})}function jC(i){return new Zn(new kv(i))}function IC(i){let e=i.peek(Wt.magicLength+7&~7);return e&&e.byteLength>=4?Wt.checkForMagicArrowString(e)?new cu(new Cd(i.read())):new Zn(new $s(i)):new Zn(new $s(function*(){}()))}function TC(i){return Fe.__awaiter(this,void 0,void 0,function*(){let e=yield i.peek(Wt.magicLength+7&~7);return e&&e.byteLength>=4?Wt.checkForMagicArrowString(e)?new cu(new Cd(yield i.read())):new Xn(new Js(i)):new Xn(new Js(function(){return Fe.__asyncGenerator(this,arguments,function*(){})}()))})}function BC(i){return Fe.__awaiter(this,void 0,void 0,function*(){let{size:e}=yield i.stat(),t=new Ks.AsyncRandomAccessFile(i,e);return e>=Wt.magicX2AndPadding&&Wt.checkForMagicArrowString(yield t.readAt(0,Wt.magicLength+7&~7))?new Ed(new Uv(t)):new Xn(new Js(t))})}});var xv=R(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.toDOMStream=void 0;var lu=dt(),Nv=Ze(),Lv=ft();function SC(i,e){if(Lv.isAsyncIterable(i))return OC(i,e);if(Lv.isIterable(i))return AC(i,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}du.toDOMStream=SC;function AC(i,e){let t=null,r=(e==null?void 0:e.type)==="bytes"||!1,n=(e==null?void 0:e.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},e),{start(c){s(c,t||(t=i[Symbol.iterator]()))},pull(c){t?s(c,t):c.close()},cancel(){((t==null?void 0:t.return)&&t.return()||!0)&&(t=null)}}),Object.assign({highWaterMark:r?n:void 0},e));function s(c,_){let v,B=null,O=c.desiredSize||null;for(;!(B=_.next(r?O:null)).done;)if(ArrayBuffer.isView(B.value)&&(v=Nv.toUint8Array(B.value))&&(O!=null&&r&&(O=O-v.byteLength+1),B.value=v),c.enqueue(B.value),O!=null&&--O<=0)return;c.close()}}function OC(i,e){let t=null,r=(e==null?void 0:e.type)==="bytes"||!1,n=(e==null?void 0:e.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},e),{start(c){return lu.__awaiter(this,void 0,void 0,function*(){yield s(c,t||(t=i[Symbol.asyncIterator]()))})},pull(c){return lu.__awaiter(this,void 0,void 0,function*(){t?yield s(c,t):c.close()})},cancel(){return lu.__awaiter(this,void 0,void 0,function*(){((t==null?void 0:t.return)&&(yield t.return())||!0)&&(t=null)})}}),Object.assign({highWaterMark:r?n:void 0},e));function s(c,_){return lu.__awaiter(this,void 0,void 0,function*(){let v,B=null,O=c.desiredSize||null;for(;!(B=yield _.next(r?O:null)).done;)if(ArrayBuffer.isView(B.value)&&(v=Nv.toUint8Array(B.value))&&(O!=null&&r&&(O=O-v.byteLength+1),B.value=v),c.enqueue(B.value),O!=null&&--O<=0)return;c.close()})}}});var zv=R(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.BuilderTransform=es.builderThroughDOMStream=void 0;var DC=dt(),FC=da();function EC(i){return new Ud(i)}es.builderThroughDOMStream=EC;var Ud=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:r,["queueingStrategy"]:n="count"}=e,s=DC.__rest(e,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=FC.Builder.new(s),this._getSize=n!=="bytes"?qv:Wv;let{["highWaterMark"]:c=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},t),{["highWaterMark"]:_=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},r);this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:v=>{this._maybeFlush(this._builder,this._controller=v)},start:v=>{this._maybeFlush(this._builder,this._controller=v)}},{highWaterMark:c,size:n!=="bytes"?qv:Wv}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:_,size:v=>this._writeValueAndReturnChunkSize(v)})}_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)}};es.BuilderTransform=Ud;var qv=i=>i.length,Wv=i=>i.byteLength});var Hv=R(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.recordBatchReaderThroughDOMStream=void 0;var Qs=dt(),RC=lr(),CC=Gs();function UC(i,e){let t=new RC.AsyncByteQueue,r=null,n=new ReadableStream({cancel(){return Qs.__awaiter(this,void 0,void 0,function*(){yield t.close()})},start(_){return Qs.__awaiter(this,void 0,void 0,function*(){yield c(_,r||(r=yield s()))})},pull(_){return Qs.__awaiter(this,void 0,void 0,function*(){r?yield c(_,r):_.close()})}});return{writable:new WritableStream(t,Object.assign({highWaterMark:Math.pow(2,14)},i)),readable:n};function s(){return Qs.__awaiter(this,void 0,void 0,function*(){return yield(yield CC.RecordBatchReader.from(t)).open(e)})}function c(_,v){return Qs.__awaiter(this,void 0,void 0,function*(){let B=_.desiredSize,O=null;for(;!(O=yield v.next()).done;)if(_.enqueue(O.value),B!=null&&--B<=0)return;_.close()})}}fu.recordBatchReaderThroughDOMStream=UC});var Yv=R(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.recordBatchWriterThroughDOMStream=void 0;var hu=dt(),kC=lr();function MC(i,e){let t=new this(i),r=new kC.AsyncByteStream(t),n=new ReadableStream({type:"bytes",cancel(){return hu.__awaiter(this,void 0,void 0,function*(){yield r.cancel()})},pull(c){return hu.__awaiter(this,void 0,void 0,function*(){yield s(c)})},start(c){return hu.__awaiter(this,void 0,void 0,function*(){yield s(c)})}},Object.assign({highWaterMark:Math.pow(2,14)},e));return{writable:new WritableStream(t,i),readable:n};function s(c){return hu.__awaiter(this,void 0,void 0,function*(){let _=null,v=c.desiredSize;for(;_=yield r.read(v||null);)if(c.enqueue(_),v!=null&&(v-=_.byteLength)<=0)return;c.close()})}}pu.recordBatchWriterThroughDOMStream=MC});var Ld=R(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.custom=he.or=he.and=he.col=he.lit=he.CustomPredicate=he.Not=he.GTeq=he.LTeq=he.Equals=he.Or=he.And=he.CombinationPredicate=he.ComparisonPredicate=he.Predicate=he.Col=he.Literal=he.Value=void 0;var PC=Wa(),Br=class{eq(e){return e instanceof Br||(e=new xi(e)),new Md(this,e)}le(e){return e instanceof Br||(e=new xi(e)),new Pd(this,e)}ge(e){return e instanceof Br||(e=new xi(e)),new Vd(this,e)}lt(e){return new ns(this.ge(e))}gt(e){return new ns(this.le(e))}ne(e){return new ns(this.eq(e))}};he.Value=Br;var xi=class extends Br{constructor(e){super();this.v=e}};he.Literal=xi;var kd=class extends Br{constructor(e){super();this.name=e}bind(e){if(!this.colidx){this.colidx=-1;let r=e.schema.fields;for(let n=-1;++n<r.length;)if(r[n].name===this.name){this.colidx=n;break}if(this.colidx<0)throw new Error(`Failed to bind Col "${this.name}"`)}let t=this.vector=e.getChildAt(this.colidx);return r=>t.get(r)}};he.Col=kd;var ts=class{and(...e){return new is(this,...e)}or(...e){return new rs(this,...e)}not(){return new ns(this)}};he.Predicate=ts;var Zs=class extends ts{constructor(e,t){super();this.left=e,this.right=t}bind(e){return this.left instanceof xi?this.right instanceof xi?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof xi?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}};he.ComparisonPredicate=Zs;var Xs=class extends ts{constructor(...e){super();this.children=e}};he.CombinationPredicate=Xs;Xs.prototype.children=Object.freeze([]);var is=class extends Xs{constructor(...e){e=e.reduce((t,r)=>t.concat(r instanceof is?r.children:r),[]);super(...e)}bind(e){let t=this.children.map(r=>r.bind(e));return(r,n)=>t.every(s=>s(r,n))}};he.And=is;var rs=class extends Xs{constructor(...e){e=e.reduce((t,r)=>t.concat(r instanceof rs?r.children:r),[]);super(...e)}bind(e){let t=this.children.map(r=>r.bind(e));return(r,n)=>t.some(s=>s(r,n))}};he.Or=rs;var Md=class extends Zs{_bindLitLit(e,t,r){let n=t.v==r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),s=r.bind(e);return(c,_)=>n(c,_)==s(c,_)}_bindColLit(e,t,r){let n=t.bind(e);if(t.vector instanceof PC.DictionaryVector){let s,c=t.vector;return c.dictionary!==this.lastDictionary?(s=c.reverseLookup(r.v),this.lastDictionary=c.dictionary,this.lastKey=s):s=this.lastKey,s===-1?()=>!1:_=>c.getKey(_)===s}else return(s,c)=>n(s,c)==r.v}_bindLitCol(e,t,r){return this._bindColLit(e,r,t)}};he.Equals=Md;var Pd=class extends Zs{_bindLitLit(e,t,r){let n=t.v<=r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),s=r.bind(e);return(c,_)=>n(c,_)<=s(c,_)}_bindColLit(e,t,r){let n=t.bind(e);return(s,c)=>n(s,c)<=r.v}_bindLitCol(e,t,r){let n=r.bind(e);return(s,c)=>t.v<=n(s,c)}};he.LTeq=Pd;var Vd=class extends Zs{_bindLitLit(e,t,r){let n=t.v>=r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),s=r.bind(e);return(c,_)=>n(c,_)>=s(c,_)}_bindColLit(e,t,r){let n=t.bind(e);return(s,c)=>n(s,c)>=r.v}_bindLitCol(e,t,r){let n=r.bind(e);return(s,c)=>t.v>=n(s,c)}};he.GTeq=Vd;var ns=class extends ts{constructor(e){super();this.child=e}bind(e){let t=this.child.bind(e);return(r,n)=>!t(r,n)}};he.Not=ns;var Nd=class extends ts{constructor(e,t){super();this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}};he.CustomPredicate=Nd;function VC(i){return new xi(i)}he.lit=VC;function NC(i){return new kd(i)}he.col=NC;function LC(...i){return new is(...i)}he.and=LC;function xC(...i){return new rs(...i)}he.or=xC;function qC(i,e){return new Nd(i,e)}he.custom=qC});var Zv=R(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.FilteredDataFrame=Sr.CountByResult=Sr.DataFrame=void 0;var Gv=Vs(),Kv=Ga(),xd=rt(),$v=Ld(),WC=Vi(),Jv=ve(),qd=class extends Gv.Table{filter(e){return new eo(this.chunks,e)}scan(e,t){let r=this.chunks,n=r.length;for(let s=-1;++s<n;){let c=r[s];t&&t(c);for(let _=-1,v=c.length;++_<v;)e(_,c)}}scanReverse(e,t){let r=this.chunks,n=r.length;for(let s=n;--s>=0;){let c=r[s];t&&t(c);for(let _=c.length;--_>=0;)e(_,c)}}countBy(e){let t=this.chunks,r=t.length,n=typeof e=="string"?new $v.Col(e):e;n.bind(t[r-1]);let s=n.vector;if(!Jv.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)),_=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,v=new _(s.dictionary.length);for(let B=-1;++B<r;){let O=t[B];n.bind(O);let N=n.vector.indices;for(let q=-1,J=O.length;++q<J;){let ke=N.get(q);ke!==null&&v[ke]++}}return new yu(s.dictionary,Kv.IntVector.from(v))}};Sr.DataFrame=qd;var yu=class extends Gv.Table{constructor(e,t){let r=new xd.Schema([new xd.Field("values",e.type),new xd.Field("counts",t.type)]);super(new WC.RecordBatch(r,t.length,[e,t]))}toJSON(){let e=this.getColumnAt(0),t=this.getColumnAt(1),r={};for(let n=-1;++n<this.length;)r[e.get(n)]=t.get(n);return r}};Sr.CountByResult=yu;var Qv=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}},eo=class extends qd{constructor(e,t){super(e);this._predicate=t}scan(e,t){let r=this._chunks,n=r.length;for(let s=-1;++s<n;){let c=r[s],_=this._predicate.bind(c),v=!1;for(let B=-1,O=c.length;++B<O;)_(B,c)&&(t&&!v&&(t(c),v=!0),e(B,c))}}scanReverse(e,t){let r=this._chunks,n=r.length;for(let s=n;--s>=0;){let c=r[s],_=this._predicate.bind(c),v=!1;for(let B=c.length;--B>=0;)_(B,c)&&(t&&!v&&(t(c),v=!0),e(B,c))}}count(){let e=0,t=this._chunks,r=t.length;for(let n=-1;++n<r;){let s=t[n],c=this._predicate.bind(s);for(let _=-1,v=s.length;++_<v;)c(_,s)&&++e}return e}[Symbol.iterator](){return new Qv(this._chunks,this._predicate)}filter(e){return new eo(this._chunks,this._predicate.and(e))}countBy(e){let t=this._chunks,r=t.length,n=typeof e=="string"?new $v.Col(e):e;n.bind(t[r-1]);let s=n.vector;if(!Jv.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)),_=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,v=new _(s.dictionary.length);for(let B=-1;++B<r;){let O=t[B],N=this._predicate.bind(O);n.bind(O);let q=n.vector.indices;for(let J=-1,ke=O.length;++J<ke;){let Oe=q.get(J);Oe!==null&&N(J,O)&&v[Oe]++}}return new yu(s.dictionary,Kv.IntVector.from(v))}};Sr.FilteredDataFrame=eo});var tw=R(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.isTypedArray=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.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.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.Field=b.Schema=b.Visitor=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.Type=b.MessageHeader=b.MetadataVersion=b.IntervalUnit=b.UnionMode=b.Precision=b.TimeUnit=b.DateUnit=void 0;var ss=Qi();Object.defineProperty(b,"DateUnit",{enumerable:!0,get:function(){return ss.DateUnit}});Object.defineProperty(b,"TimeUnit",{enumerable:!0,get:function(){return ss.TimeUnit}});Object.defineProperty(b,"Precision",{enumerable:!0,get:function(){return ss.Precision}});Object.defineProperty(b,"UnionMode",{enumerable:!0,get:function(){return ss.UnionMode}});Object.defineProperty(b,"IntervalUnit",{enumerable:!0,get:function(){return ss.IntervalUnit}});Object.defineProperty(b,"MetadataVersion",{enumerable:!0,get:function(){return ss.MetadataVersion}});var zC=Bo();Object.defineProperty(b,"MessageHeader",{enumerable:!0,get:function(){return zC.MessageHeader}});var Xv=Se();Object.defineProperty(b,"Type",{enumerable:!0,get:function(){return Xv.Type}});Object.defineProperty(b,"BufferType",{enumerable:!0,get:function(){return Xv.BufferType}});var HC=Jt();Object.defineProperty(b,"Data",{enumerable:!0,get:function(){return HC.Data}});var oe=ve();Object.defineProperty(b,"DataType",{enumerable:!0,get:function(){return oe.DataType}});Object.defineProperty(b,"Null",{enumerable:!0,get:function(){return oe.Null}});Object.defineProperty(b,"Bool",{enumerable:!0,get:function(){return oe.Bool}});Object.defineProperty(b,"Int",{enumerable:!0,get:function(){return oe.Int}});Object.defineProperty(b,"Int8",{enumerable:!0,get:function(){return oe.Int8}});Object.defineProperty(b,"Int16",{enumerable:!0,get:function(){return oe.Int16}});Object.defineProperty(b,"Int32",{enumerable:!0,get:function(){return oe.Int32}});Object.defineProperty(b,"Int64",{enumerable:!0,get:function(){return oe.Int64}});Object.defineProperty(b,"Uint8",{enumerable:!0,get:function(){return oe.Uint8}});Object.defineProperty(b,"Uint16",{enumerable:!0,get:function(){return oe.Uint16}});Object.defineProperty(b,"Uint32",{enumerable:!0,get:function(){return oe.Uint32}});Object.defineProperty(b,"Uint64",{enumerable:!0,get:function(){return oe.Uint64}});Object.defineProperty(b,"Float",{enumerable:!0,get:function(){return oe.Float}});Object.defineProperty(b,"Float16",{enumerable:!0,get:function(){return oe.Float16}});Object.defineProperty(b,"Float32",{enumerable:!0,get:function(){return oe.Float32}});Object.defineProperty(b,"Float64",{enumerable:!0,get:function(){return oe.Float64}});Object.defineProperty(b,"Utf8",{enumerable:!0,get:function(){return oe.Utf8}});Object.defineProperty(b,"Binary",{enumerable:!0,get:function(){return oe.Binary}});Object.defineProperty(b,"FixedSizeBinary",{enumerable:!0,get:function(){return oe.FixedSizeBinary}});Object.defineProperty(b,"Date_",{enumerable:!0,get:function(){return oe.Date_}});Object.defineProperty(b,"DateDay",{enumerable:!0,get:function(){return oe.DateDay}});Object.defineProperty(b,"DateMillisecond",{enumerable:!0,get:function(){return oe.DateMillisecond}});Object.defineProperty(b,"Timestamp",{enumerable:!0,get:function(){return oe.Timestamp}});Object.defineProperty(b,"TimestampSecond",{enumerable:!0,get:function(){return oe.TimestampSecond}});Object.defineProperty(b,"TimestampMillisecond",{enumerable:!0,get:function(){return oe.TimestampMillisecond}});Object.defineProperty(b,"TimestampMicrosecond",{enumerable:!0,get:function(){return oe.TimestampMicrosecond}});Object.defineProperty(b,"TimestampNanosecond",{enumerable:!0,get:function(){return oe.TimestampNanosecond}});Object.defineProperty(b,"Time",{enumerable:!0,get:function(){return oe.Time}});Object.defineProperty(b,"TimeSecond",{enumerable:!0,get:function(){return oe.TimeSecond}});Object.defineProperty(b,"TimeMillisecond",{enumerable:!0,get:function(){return oe.TimeMillisecond}});Object.defineProperty(b,"TimeMicrosecond",{enumerable:!0,get:function(){return oe.TimeMicrosecond}});Object.defineProperty(b,"TimeNanosecond",{enumerable:!0,get:function(){return oe.TimeNanosecond}});Object.defineProperty(b,"Decimal",{enumerable:!0,get:function(){return oe.Decimal}});Object.defineProperty(b,"List",{enumerable:!0,get:function(){return oe.List}});Object.defineProperty(b,"Struct",{enumerable:!0,get:function(){return oe.Struct}});Object.defineProperty(b,"Union",{enumerable:!0,get:function(){return oe.Union}});Object.defineProperty(b,"DenseUnion",{enumerable:!0,get:function(){return oe.DenseUnion}});Object.defineProperty(b,"SparseUnion",{enumerable:!0,get:function(){return oe.SparseUnion}});Object.defineProperty(b,"Dictionary",{enumerable:!0,get:function(){return oe.Dictionary}});Object.defineProperty(b,"Interval",{enumerable:!0,get:function(){return oe.Interval}});Object.defineProperty(b,"IntervalDayTime",{enumerable:!0,get:function(){return oe.IntervalDayTime}});Object.defineProperty(b,"IntervalYearMonth",{enumerable:!0,get:function(){return oe.IntervalYearMonth}});Object.defineProperty(b,"FixedSizeList",{enumerable:!0,get:function(){return oe.FixedSizeList}});Object.defineProperty(b,"Map_",{enumerable:!0,get:function(){return oe.Map_}});var YC=Vs();Object.defineProperty(b,"Table",{enumerable:!0,get:function(){return YC.Table}});var GC=Mn();Object.defineProperty(b,"Column",{enumerable:!0,get:function(){return GC.Column}});var KC=ut();Object.defineProperty(b,"Visitor",{enumerable:!0,get:function(){return KC.Visitor}});var ew=rt();Object.defineProperty(b,"Schema",{enumerable:!0,get:function(){return ew.Schema}});Object.defineProperty(b,"Field",{enumerable:!0,get:function(){return ew.Field}});var ie=vi();Object.defineProperty(b,"Vector",{enumerable:!0,get:function(){return ie.Vector}});Object.defineProperty(b,"BaseVector",{enumerable:!0,get:function(){return ie.BaseVector}});Object.defineProperty(b,"BinaryVector",{enumerable:!0,get:function(){return ie.BinaryVector}});Object.defineProperty(b,"BoolVector",{enumerable:!0,get:function(){return ie.BoolVector}});Object.defineProperty(b,"Chunked",{enumerable:!0,get:function(){return ie.Chunked}});Object.defineProperty(b,"DateVector",{enumerable:!0,get:function(){return ie.DateVector}});Object.defineProperty(b,"DateDayVector",{enumerable:!0,get:function(){return ie.DateDayVector}});Object.defineProperty(b,"DateMillisecondVector",{enumerable:!0,get:function(){return ie.DateMillisecondVector}});Object.defineProperty(b,"DecimalVector",{enumerable:!0,get:function(){return ie.DecimalVector}});Object.defineProperty(b,"DictionaryVector",{enumerable:!0,get:function(){return ie.DictionaryVector}});Object.defineProperty(b,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return ie.FixedSizeBinaryVector}});Object.defineProperty(b,"FixedSizeListVector",{enumerable:!0,get:function(){return ie.FixedSizeListVector}});Object.defineProperty(b,"FloatVector",{enumerable:!0,get:function(){return ie.FloatVector}});Object.defineProperty(b,"Float16Vector",{enumerable:!0,get:function(){return ie.Float16Vector}});Object.defineProperty(b,"Float32Vector",{enumerable:!0,get:function(){return ie.Float32Vector}});Object.defineProperty(b,"Float64Vector",{enumerable:!0,get:function(){return ie.Float64Vector}});Object.defineProperty(b,"IntervalVector",{enumerable:!0,get:function(){return ie.IntervalVector}});Object.defineProperty(b,"IntervalDayTimeVector",{enumerable:!0,get:function(){return ie.IntervalDayTimeVector}});Object.defineProperty(b,"IntervalYearMonthVector",{enumerable:!0,get:function(){return ie.IntervalYearMonthVector}});Object.defineProperty(b,"IntVector",{enumerable:!0,get:function(){return ie.IntVector}});Object.defineProperty(b,"Int8Vector",{enumerable:!0,get:function(){return ie.Int8Vector}});Object.defineProperty(b,"Int16Vector",{enumerable:!0,get:function(){return ie.Int16Vector}});Object.defineProperty(b,"Int32Vector",{enumerable:!0,get:function(){return ie.Int32Vector}});Object.defineProperty(b,"Int64Vector",{enumerable:!0,get:function(){return ie.Int64Vector}});Object.defineProperty(b,"Uint8Vector",{enumerable:!0,get:function(){return ie.Uint8Vector}});Object.defineProperty(b,"Uint16Vector",{enumerable:!0,get:function(){return ie.Uint16Vector}});Object.defineProperty(b,"Uint32Vector",{enumerable:!0,get:function(){return ie.Uint32Vector}});Object.defineProperty(b,"Uint64Vector",{enumerable:!0,get:function(){return ie.Uint64Vector}});Object.defineProperty(b,"ListVector",{enumerable:!0,get:function(){return ie.ListVector}});Object.defineProperty(b,"MapVector",{enumerable:!0,get:function(){return ie.MapVector}});Object.defineProperty(b,"NullVector",{enumerable:!0,get:function(){return ie.NullVector}});Object.defineProperty(b,"StructVector",{enumerable:!0,get:function(){return ie.StructVector}});Object.defineProperty(b,"TimestampVector",{enumerable:!0,get:function(){return ie.TimestampVector}});Object.defineProperty(b,"TimestampSecondVector",{enumerable:!0,get:function(){return ie.TimestampSecondVector}});Object.defineProperty(b,"TimestampMillisecondVector",{enumerable:!0,get:function(){return ie.TimestampMillisecondVector}});Object.defineProperty(b,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return ie.TimestampMicrosecondVector}});Object.defineProperty(b,"TimestampNanosecondVector",{enumerable:!0,get:function(){return ie.TimestampNanosecondVector}});Object.defineProperty(b,"TimeVector",{enumerable:!0,get:function(){return ie.TimeVector}});Object.defineProperty(b,"TimeSecondVector",{enumerable:!0,get:function(){return ie.TimeSecondVector}});Object.defineProperty(b,"TimeMillisecondVector",{enumerable:!0,get:function(){return ie.TimeMillisecondVector}});Object.defineProperty(b,"TimeMicrosecondVector",{enumerable:!0,get:function(){return ie.TimeMicrosecondVector}});Object.defineProperty(b,"TimeNanosecondVector",{enumerable:!0,get:function(){return ie.TimeNanosecondVector}});Object.defineProperty(b,"UnionVector",{enumerable:!0,get:function(){return ie.UnionVector}});Object.defineProperty(b,"DenseUnionVector",{enumerable:!0,get:function(){return ie.DenseUnionVector}});Object.defineProperty(b,"SparseUnionVector",{enumerable:!0,get:function(){return ie.SparseUnionVector}});Object.defineProperty(b,"Utf8Vector",{enumerable:!0,get:function(){return ie.Utf8Vector}});var ae=da();Object.defineProperty(b,"Builder",{enumerable:!0,get:function(){return ae.Builder}});Object.defineProperty(b,"BinaryBuilder",{enumerable:!0,get:function(){return ae.BinaryBuilder}});Object.defineProperty(b,"BoolBuilder",{enumerable:!0,get:function(){return ae.BoolBuilder}});Object.defineProperty(b,"DateBuilder",{enumerable:!0,get:function(){return ae.DateBuilder}});Object.defineProperty(b,"DateDayBuilder",{enumerable:!0,get:function(){return ae.DateDayBuilder}});Object.defineProperty(b,"DateMillisecondBuilder",{enumerable:!0,get:function(){return ae.DateMillisecondBuilder}});Object.defineProperty(b,"DecimalBuilder",{enumerable:!0,get:function(){return ae.DecimalBuilder}});Object.defineProperty(b,"DictionaryBuilder",{enumerable:!0,get:function(){return ae.DictionaryBuilder}});Object.defineProperty(b,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return ae.FixedSizeBinaryBuilder}});Object.defineProperty(b,"FixedSizeListBuilder",{enumerable:!0,get:function(){return ae.FixedSizeListBuilder}});Object.defineProperty(b,"FloatBuilder",{enumerable:!0,get:function(){return ae.FloatBuilder}});Object.defineProperty(b,"Float16Builder",{enumerable:!0,get:function(){return ae.Float16Builder}});Object.defineProperty(b,"Float32Builder",{enumerable:!0,get:function(){return ae.Float32Builder}});Object.defineProperty(b,"Float64Builder",{enumerable:!0,get:function(){return ae.Float64Builder}});Object.defineProperty(b,"IntervalBuilder",{enumerable:!0,get:function(){return ae.IntervalBuilder}});Object.defineProperty(b,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return ae.IntervalDayTimeBuilder}});Object.defineProperty(b,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return ae.IntervalYearMonthBuilder}});Object.defineProperty(b,"IntBuilder",{enumerable:!0,get:function(){return ae.IntBuilder}});Object.defineProperty(b,"Int8Builder",{enumerable:!0,get:function(){return ae.Int8Builder}});Object.defineProperty(b,"Int16Builder",{enumerable:!0,get:function(){return ae.Int16Builder}});Object.defineProperty(b,"Int32Builder",{enumerable:!0,get:function(){return ae.Int32Builder}});Object.defineProperty(b,"Int64Builder",{enumerable:!0,get:function(){return ae.Int64Builder}});Object.defineProperty(b,"Uint8Builder",{enumerable:!0,get:function(){return ae.Uint8Builder}});Object.defineProperty(b,"Uint16Builder",{enumerable:!0,get:function(){return ae.Uint16Builder}});Object.defineProperty(b,"Uint32Builder",{enumerable:!0,get:function(){return ae.Uint32Builder}});Object.defineProperty(b,"Uint64Builder",{enumerable:!0,get:function(){return ae.Uint64Builder}});Object.defineProperty(b,"ListBuilder",{enumerable:!0,get:function(){return ae.ListBuilder}});Object.defineProperty(b,"MapBuilder",{enumerable:!0,get:function(){return ae.MapBuilder}});Object.defineProperty(b,"NullBuilder",{enumerable:!0,get:function(){return ae.NullBuilder}});Object.defineProperty(b,"StructBuilder",{enumerable:!0,get:function(){return ae.StructBuilder}});Object.defineProperty(b,"TimestampBuilder",{enumerable:!0,get:function(){return ae.TimestampBuilder}});Object.defineProperty(b,"TimestampSecondBuilder",{enumerable:!0,get:function(){return ae.TimestampSecondBuilder}});Object.defineProperty(b,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return ae.TimestampMillisecondBuilder}});Object.defineProperty(b,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return ae.TimestampMicrosecondBuilder}});Object.defineProperty(b,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return ae.TimestampNanosecondBuilder}});Object.defineProperty(b,"TimeBuilder",{enumerable:!0,get:function(){return ae.TimeBuilder}});Object.defineProperty(b,"TimeSecondBuilder",{enumerable:!0,get:function(){return ae.TimeSecondBuilder}});Object.defineProperty(b,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return ae.TimeMillisecondBuilder}});Object.defineProperty(b,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return ae.TimeMicrosecondBuilder}});Object.defineProperty(b,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return ae.TimeNanosecondBuilder}});Object.defineProperty(b,"UnionBuilder",{enumerable:!0,get:function(){return ae.UnionBuilder}});Object.defineProperty(b,"DenseUnionBuilder",{enumerable:!0,get:function(){return ae.DenseUnionBuilder}});Object.defineProperty(b,"SparseUnionBuilder",{enumerable:!0,get:function(){return ae.SparseUnionBuilder}});Object.defineProperty(b,"Utf8Builder",{enumerable:!0,get:function(){return ae.Utf8Builder}});var Wd=lr();Object.defineProperty(b,"ByteStream",{enumerable:!0,get:function(){return Wd.ByteStream}});Object.defineProperty(b,"AsyncByteStream",{enumerable:!0,get:function(){return Wd.AsyncByteStream}});Object.defineProperty(b,"AsyncByteQueue",{enumerable:!0,get:function(){return Wd.AsyncByteQueue}});var to=Gs();Object.defineProperty(b,"RecordBatchReader",{enumerable:!0,get:function(){return to.RecordBatchReader}});Object.defineProperty(b,"RecordBatchFileReader",{enumerable:!0,get:function(){return to.RecordBatchFileReader}});Object.defineProperty(b,"RecordBatchStreamReader",{enumerable:!0,get:function(){return to.RecordBatchStreamReader}});Object.defineProperty(b,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return to.AsyncRecordBatchFileReader}});Object.defineProperty(b,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return to.AsyncRecordBatchStreamReader}});var _u=Ma();Object.defineProperty(b,"RecordBatchWriter",{enumerable:!0,get:function(){return _u.RecordBatchWriter}});Object.defineProperty(b,"RecordBatchFileWriter",{enumerable:!0,get:function(){return _u.RecordBatchFileWriter}});Object.defineProperty(b,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return _u.RecordBatchStreamWriter}});Object.defineProperty(b,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return _u.RecordBatchJSONWriter}});var zd=Ba();Object.defineProperty(b,"MessageReader",{enumerable:!0,get:function(){return zd.MessageReader}});Object.defineProperty(b,"AsyncMessageReader",{enumerable:!0,get:function(){return zd.AsyncMessageReader}});Object.defineProperty(b,"JSONMessageReader",{enumerable:!0,get:function(){return zd.JSONMessageReader}});var $C=$r();Object.defineProperty(b,"Message",{enumerable:!0,get:function(){return $C.Message}});var JC=Vi();Object.defineProperty(b,"RecordBatch",{enumerable:!0,get:function(){return JC.RecordBatch}});var Hd=Zv();Object.defineProperty(b,"DataFrame",{enumerable:!0,get:function(){return Hd.DataFrame}});Object.defineProperty(b,"FilteredDataFrame",{enumerable:!0,get:function(){return Hd.FilteredDataFrame}});Object.defineProperty(b,"CountByResult",{enumerable:!0,get:function(){return Hd.CountByResult}});var QC=js(),ZC=Qc(),XC=ci(),eU=bs(),tU=Ze(),iU=Fs(),rU=Ld();b.predicate=rU;var Yd=yl();b.util=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},QC),ZC),XC),eU),tU),iU),{compareSchemas:Yd.compareSchemas,compareFields:Yd.compareFields,compareTypes:Yd.compareTypes});var nU=Yr();Object.defineProperty(b,"isTypedArray",{enumerable:!0,get:function(){return nU.isTypedArray}})});var gu=R(()=>{});var Zd=R(()=>{});var lU={};g1(lU,{registerWorker:()=>dw});var iw=Si(_s()),rw=Si(da()),os=Si(Gs()),as=Si(Ma()),nw=Si(xv()),sw=Si(zv()),mu=Si(Hv()),bu=Si(Yv()),S=Si(tw());iw.default.toDOMStream=nw.toDOMStream;rw.Builder.throughDOM=sw.builderThroughDOMStream;os.RecordBatchReader.throughDOM=mu.recordBatchReaderThroughDOMStream;os.RecordBatchFileReader.throughDOM=mu.recordBatchReaderThroughDOMStream;os.RecordBatchStreamReader.throughDOM=mu.recordBatchReaderThroughDOMStream;as.RecordBatchWriter.throughDOM=bu.recordBatchWriterThroughDOMStream;as.RecordBatchFileWriter.throughDOM=bu.recordBatchWriterThroughDOMStream;as.RecordBatchStreamWriter.throughDOM=bu.recordBatchWriterThroughDOMStream;var Gd;(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"})(Gd||(Gd={}));var Kd;(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"})(Kd||(Kd={}));var $d;(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"})($d||($d={}));var Jd;(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"})(Jd||(Jd={}));var sU=class{constructor(e,t,r){this.db=e;this.conn=t;this.header=r;this._first=!0,this._depleted=!1,this._inFlight=null}async next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e;return this._inFlight!=null?(e=await this._inFlight,this._inFlight=null):e=await this.db.fetchQueryResults(this.conn),this._depleted=e.length==0,this._depleted||(this._inFlight=this.db.fetchQueryResults(this.conn)),{done:this._depleted,value:e}}[Symbol.asyncIterator](){return this}};var be;(function(W){W.CLOSE_PREPARED="CLOSE_PREPARED",W.COLLECT_FILE_STATISTICS="COLLECT_FILE_STATISTICS",W.CONNECT="CONNECT",W.COPY_FILE_TO_BUFFER="COPY_FILE_TO_BUFFER",W.COPY_FILE_TO_PATH="COPY_FILE_TO_PATH",W.CREATE_PREPARED="CREATE_PREPARED",W.DISCONNECT="DISCONNECT",W.DROP_FILE="DROP_FILE",W.DROP_FILES="DROP_FILES",W.EXPORT_FILE_STATISTICS="EXPORT_FILE_STATISTICS",W.FETCH_QUERY_RESULTS="FETCH_QUERY_RESULTS",W.FLUSH_FILES="FLUSH_FILES",W.GET_FEATURE_FLAGS="GET_FEATURE_FLAGS",W.GET_VERSION="GET_VERSION",W.GLOB_FILE_INFOS="GLOB_FILE_INFOS",W.INSERT_ARROW_FROM_IPC_STREAM="INSERT_ARROW_FROM_IPC_STREAM",W.INSERT_CSV_FROM_PATH="IMPORT_CSV_FROM_PATH",W.INSERT_JSON_FROM_PATH="IMPORT_JSON_FROM_PATH",W.INSTANTIATE="INSTANTIATE",W.OPEN="OPEN",W.PING="PING",W.REGISTER_FILE_BUFFER="REGISTER_FILE_BUFFER",W.REGISTER_FILE_HANDLE="REGISTER_FILE_HANDLE",W.REGISTER_FILE_URL="REGISTER_FILE_URL",W.RESET="RESET",W.RUN_PREPARED="RUN_PREPARED",W.RUN_QUERY="RUN_QUERY",W.SEND_PREPARED="SEND_PREPARED",W.SEND_QUERY="SEND_QUERY",W.TOKENIZE="TOKENIZE"})(be||(be={}));var He;(function(le){le.CONNECTION_INFO="CONNECTION_INFO",le.ERROR="ERROR",le.FEATURE_FLAGS="FEATURE_FLAGS",le.FILE_BUFFER="FILE_BUFFER",le.FILE_INFOS="FILE_INFOS",le.FILE_SIZE="FILE_SIZE",le.FILE_STATISTICS="FILE_STATISTICS",le.LOG="LOG",le.OK="OK",le.PREPARED_STATEMENT_ID="PREPARED_STATEMENT_ID",le.QUERY_PLAN="QUERY_PLAN",le.QUERY_RESULT="QUERY_RESULT",le.QUERY_RESULT_CHUNK="QUERY_RESULT_CHUNK",le.QUERY_START="QUERY_START",le.REGISTERED_FILE="REGISTERED_FILE",le.SCRIPT_TOKENS="SCRIPT_TOKENS",le.SUCCESS="SUCCESS",le.VERSION_STRING="VERSION_STRING"})(He||(He={}));function us(i,e){switch(e.typeId){case S.Type.Binary:return{name:i,type:"binary"};case S.Type.Bool:return{name:i,type:"bool"};case S.Type.Date:return{name:i,type:"date"};case S.Type.DateDay:return{name:i,type:"date32[d]"};case S.Type.DateMillisecond:return{name:i,type:"date64[ms]"};case S.Type.Decimal:{let t=e;return{name:i,type:"decimal",precision:t.precision,scale:t.scale}}case S.Type.Float:return{name:i,type:"float"};case S.Type.Float16:return{name:i,type:"float16"};case S.Type.Float32:return{name:i,type:"float32"};case S.Type.Float64:return{name:i,type:"float64"};case S.Type.Int:return{name:i,type:"int32"};case S.Type.Int16:return{name:i,type:"int16"};case S.Type.Int32:return{name:i,type:"int32"};case S.Type.Int64:return{name:i,type:"int64"};case S.Type.Uint16:return{name:i,type:"uint16"};case S.Type.Uint32:return{name:i,type:"uint32"};case S.Type.Uint64:return{name:i,type:"uint64"};case S.Type.Uint8:return{name:i,type:"uint8"};case S.Type.IntervalDayTime:return{name:i,type:"interval[dt]"};case S.Type.IntervalYearMonth:return{name:i,type:"interval[m]"};case S.Type.List:{let t=e;return{name:i,type:"list",children:[us(t.valueField.name,t.valueField.type)]}}case S.Type.FixedSizeBinary:return{name:i,type:"fixedsizebinary",byteWidth:e.byteWidth};case S.Type.Null:return{name:i,type:"null"};case S.Type.Utf8:return{name:i,type:"utf8"};case S.Type.Struct:return{name:i,type:"struct",children:e.children.map(r=>us(r.name,r.type))};case S.Type.Time:return{name:i,type:"time[s]"};case S.Type.TimeMicrosecond:return{name:i,type:"time[us]"};case S.Type.TimeMillisecond:return{name:i,type:"time[ms]"};case S.Type.TimeNanosecond:return{name:i,type:"time[ns]"};case S.Type.TimeSecond:return{name:i,type:"time[s]"};case S.Type.Timestamp:return{name:i,type:"timestamp",timezone:e.timezone||void 0};case S.Type.TimestampSecond:return{name:i,type:"timestamp[s]",timezone:e.timezone||void 0};case S.Type.TimestampMicrosecond:return{name:i,type:"timestamp[us]",timezone:e.timezone||void 0};case S.Type.TimestampNanosecond:return{name:i,type:"timestamp[ns]",timezone:e.timezone||void 0};case S.Type.TimestampMillisecond:return{name:i,type:"timestamp[ms]",timezone:e.timezone||void 0}}throw new Error(`unsupported arrow type: ${e.toString()}`)}var SM=new TextEncoder;var Qd=class{constructor(){this._bindings=null;this._nextMessageId=0}log(e){this.postMessage({messageId:this._nextMessageId++,requestId:0,type:He.LOG,data:e},[])}sendOK(e){this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.OK,data:null},[])}failWith(e,t){let r={name:t.name,message:t.message,stack:t.stack||void 0};this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.ERROR,data:r},[])}async onMessage(e){switch(e.type){case be.PING:this.sendOK(e);return;case be.INSTANTIATE:this._bindings!=null&&this.failWith(e,new Error("duckdb already initialized"));try{this._bindings=await this.instantiate(e.data[0],e.data[1]),this.sendOK(e)}catch(t){this._bindings=null,this.failWith(e,t)}return;default:break}if(!this._bindings)return this.failWith(e,new Error("duckdb is not initialized"));try{switch(e.type){case be.GET_VERSION:this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.VERSION_STRING,data:this._bindings.getVersion()},[]);break;case be.GET_FEATURE_FLAGS:this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.FEATURE_FLAGS,data:this._bindings.getFeatureFlags()},[]);break;case be.RESET:this._bindings.reset(),this.sendOK(e);break;case be.OPEN:this._bindings.open(e.data),this.sendOK(e);break;case be.DROP_FILE:this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.SUCCESS,data:this._bindings.dropFile(e.data)},[]);break;case be.DROP_FILES:this._bindings.dropFiles(),this.sendOK(e);break;case be.FLUSH_FILES:this._bindings.flushFiles(),this.sendOK(e);break;case be.CONNECT:{let t=this._bindings.connect();this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.CONNECTION_INFO,data:t.useUnsafe((r,n)=>n)},[]);break}case be.DISCONNECT:this._bindings.disconnect(e.data),this.sendOK(e);break;case be.CREATE_PREPARED:{let t=this._bindings.createPrepared(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.PREPARED_STATEMENT_ID,data:t},[]);break}case be.CLOSE_PREPARED:{this._bindings.closePrepared(e.data[0],e.data[1]),this.sendOK(e);break}case be.RUN_PREPARED:{let t=this._bindings.runPrepared(e.data[0],e.data[1],e.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.QUERY_RESULT,data:t},[t.buffer]);break}case be.RUN_QUERY:{let t=this._bindings.runQuery(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.QUERY_RESULT,data:t},[t.buffer]);break}case be.SEND_PREPARED:{let t=this._bindings.sendPrepared(e.data[0],e.data[1],e.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.QUERY_START,data:t},[t.buffer]);break}case be.SEND_QUERY:{let t=this._bindings.sendQuery(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.QUERY_START,data:t},[t.buffer]);break}case be.FETCH_QUERY_RESULTS:{let t=this._bindings.fetchQueryResults(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.QUERY_RESULT_CHUNK,data:t},[t.buffer]);break}case be.GLOB_FILE_INFOS:{let t=this._bindings.globFiles(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.FILE_INFOS,data:t},[]);break}case be.REGISTER_FILE_URL:this._bindings.registerFileURL(e.data[0],e.data[1]),this.sendOK(e);break;case be.REGISTER_FILE_BUFFER:this._bindings.registerFileBuffer(e.data[0],e.data[1]),this.sendOK(e);break;case be.REGISTER_FILE_HANDLE:this._bindings.registerFileHandle(e.data[0],e.data[1]),this.sendOK(e);break;case be.COPY_FILE_TO_PATH:this._bindings.copyFileToPath(e.data[0],e.data[1]),this.sendOK(e);break;case be.COPY_FILE_TO_BUFFER:{let t=this._bindings.copyFileToBuffer(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.FILE_BUFFER,data:t},[]);break}case be.COLLECT_FILE_STATISTICS:this._bindings.collectFileStatistics(e.data[0],e.data[1]),this.sendOK(e);break;case be.EXPORT_FILE_STATISTICS:{this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.FILE_STATISTICS,data:this._bindings.exportFileStatistics(e.data)},[]);break}case be.INSERT_ARROW_FROM_IPC_STREAM:{this._bindings.insertArrowFromIPCStream(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case be.INSERT_CSV_FROM_PATH:{this._bindings.insertCSVFromPath(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case be.INSERT_JSON_FROM_PATH:{this._bindings.insertJSONFromPath(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case be.TOKENIZE:{let t=this._bindings.tokenize(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:He.SCRIPT_TOKENS,data:t},[]);break}}}catch(t){return this.failWith(e,t)}}};var aw={},oU=function(){var i=aw.url;return function(e){e=e||{};var t=typeof e!="undefined"?e:{},r,n;t.ready=new Promise(function(o,a){r=o,n=a});var s={},c;for(c in t)t.hasOwnProperty(c)&&(s[c]=t[c]);var _=[],v="./this.program",B=function(o,a){throw a},O=typeof window=="object",N=typeof importScripts=="function",q=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",J="";function ke(o){return t.locateFile?t.locateFile(o,J):J+o}var Oe,Yt,pt,le;function fw(o){if(!(o instanceof yo)){var a=o;Ar("exiting due to exception: "+a)}}var rn,nn;q?(N?J=gu().dirname(J)+"/":J=__dirname+"/",Oe=function(a,u){return rn||(rn=Zd()),nn||(nn=gu()),a=nn.normalize(a),rn.readFileSync(a,u?null:"utf8")},pt=function(a){var u=Oe(a,!0);return u.buffer||(u=new Uint8Array(u)),af(u.buffer),u},Yt=function(a,u,l){rn||(rn=Zd()),nn||(nn=gu()),a=nn.normalize(a),rn.readFile(a,function(d,f){d?l(d):u(f.buffer)})},process.argv.length>1&&(v=process.argv[1].replace(/\\/g,"/")),_=process.argv.slice(2),process.on("uncaughtException",function(o){if(!(o instanceof yo))throw o}),process.on("unhandledRejection",function(o){throw o}),B=function(o,a){if(vu())throw process.exitCode=o,a;fw(a),process.exit(o)},t.inspect=function(){return"[Emscripten Module object]"}):(O||N)&&(N?J=self.location.href:typeof document!="undefined"&&document.currentScript&&(J=document.currentScript.src),i&&(J=i),J.indexOf("blob:")!==0?J=J.substr(0,J.replace(/[?#].*/,"").lastIndexOf("/")+1):J="",Oe=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.send(null),a.responseText},N&&(pt=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),Yt=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)},le=function(o){document.title=o});var hw=t.print||console.log.bind(console),Ar=t.printErr||console.warn.bind(console);for(c in s)s.hasOwnProperty(c)&&(t[c]=s[c]);s=null,t.arguments&&(_=t.arguments),t.thisProgram&&(v=t.thisProgram),t.quit&&(B=t.quit);var of=0,ot=function(o){of=o},pw=function(){return of},ls;t.wasmBinary&&(ls=t.wasmBinary);var yw=t.noExitRuntime||!0;typeof WebAssembly!="object"&&ri("no native wasm support detected");var io,W=!1,ro;function af(o,a){o||ri("Assertion failed: "+a)}function _w(o){var a=t["_"+o];return af(a,"Cannot call unknown function "+o+", make sure it is exported"),a}function mw(o,a,u,l,d){var f={string:function(P){var se=0;if(P!=null&&P!==0){var me=(P.length<<2)+1;se=Bu(me),bw(P,se,me)}return se},array:function(P){var se=Bu(P.length);return df(P,se),se}};function h(P){return a==="string"?no(P):a==="boolean"?Boolean(P):P}var p=_w(o),y=[],m=0;if(l)for(var g=0;g<l.length;g++){var w=f[u[g]];w?(m===0&&(m=j()),y[g]=w(l[g])):y[g]=l[g]}var A=p.apply(null,y);function E(P){return m!==0&&I(m),h(P)}return A=E(A),A}var uf=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function cf(o,a,u){for(var l=a+u,d=a;o[d]&&!(d>=l);)++d;if(d-a>16&&o.subarray&&uf)return uf.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 no(o,a){return o?cf(sn,o,a):""}function lf(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 bw(o,a,u){return lf(o,sn,a,u)}function gw(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 df(o,a){ii.set(o,a)}function vw(o,a,u){for(var l=0;l<o.length;++l)ii[a++>>0]=o.charCodeAt(l);u||(ii[a>>0]=0)}function ww(o,a){return o%a>0&&(o+=a-o%a),o}var ff,ii,sn,jw,Iw,fe,Tw,Bw,Sw;function hf(o){ff=o,t.HEAP8=ii=new Int8Array(o),t.HEAP16=jw=new Int16Array(o),t.HEAP32=fe=new Int32Array(o),t.HEAPU8=sn=new Uint8Array(o),t.HEAPU16=Iw=new Uint16Array(o),t.HEAPU32=Tw=new Uint32Array(o),t.HEAPF32=Bw=new Float32Array(o),t.HEAPF64=Sw=new Float64Array(o)}var dU=t.INITIAL_MEMORY||16777216,G,pf=[],yf=[],Aw=[],_f=[],Ow=!1,Dw=!1,Fw=0;function vu(){return yw||Fw>0}function Ew(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)Mw(t.preRun.shift());so(pf)}function Rw(){Ow=!0,so(yf)}function Cw(){so(Aw)}function Uw(){Dw=!0}function kw(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Vw(t.postRun.shift());so(_f)}function Mw(o){pf.unshift(o)}function Pw(o){yf.unshift(o)}function Vw(o){_f.unshift(o)}var Or=0,wu=null,ds=null;function Nw(o){Or++,t.monitorRunDependencies&&t.monitorRunDependencies(Or)}function Lw(o){if(Or--,t.monitorRunDependencies&&t.monitorRunDependencies(Or),Or==0&&(wu!==null&&(clearInterval(wu),wu=null),ds)){var a=ds;ds=null,a()}}t.preloadedImages={},t.preloadedAudios={};function ri(o){t.onAbort&&t.onAbort(o),o="Aborted("+o+")",Ar(o),W=!0,ro=1,o+=". Build with -s ASSERTIONS=1 for more info.";var a=new WebAssembly.RuntimeError(o);throw n(a),a}var xw="data:application/octet-stream;base64,";function mf(o){return o.startsWith(xw)}var Bt;t.locateFile?(Bt="./duckdb-wasm.wasm",mf(Bt)||(Bt=ke(Bt))):Bt=new URL("duckdb_wasm.wasm",aw.url).toString();function bf(o){try{if(o==Bt&&ls)return new Uint8Array(ls);if(pt)return pt(o);throw"both async and sync fetching of the wasm failed"}catch(a){ri(a)}}function qw(){return!ls&&(O||N)&&typeof fetch=="function"?fetch(Bt,{credentials:"same-origin"}).then(function(o){if(!o.ok)throw"failed to load wasm binary file at '"+Bt+"'";return o.arrayBuffer()}).catch(function(){return bf(Bt)}):Promise.resolve().then(function(){return bf(Bt)})}function Ww(){var o={a:o0};function a(h,p){var y=h.exports;t.asm=y,io=t.asm.Ae,hf(io.buffer),G=t.asm.De,Pw(t.asm.Be),Lw("wasm-instantiate")}Nw("wasm-instantiate");function u(h){a(h.instance)}function l(h){return qw().then(function(p){return WebAssembly.instantiate(p,o)}).then(function(p){return p}).then(h,function(p){Ar("failed to asynchronously prepare wasm: "+p),ri(p)})}function d(){return!ls&&typeof WebAssembly.instantiateStreaming=="function"&&!mf(Bt)&&typeof fetch=="function"?fetch(Bt,{credentials:"same-origin"}).then(function(h){var p=WebAssembly.instantiateStreaming(h,o);return p.then(u,function(y){return Ar("wasm streaming compile failed: "+y),Ar("falling back to ArrayBuffer instantiation"),l(u)})}):l(u)}if(t.instantiateWasm)try{var f=t.instantiateWasm(o,a);return f}catch(h){return Ar("Module.instantiateWasm callback failed with error: "+h),!1}return d().catch(n),{}}function so(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?G.get(u)():G.get(u)(a.arg):u(a.arg===void 0?null:a.arg)}}function zw(o){if(o instanceof yo||o=="unwind")return ro;B(1,o)}function Hw(o){return Su(o+16)+16}function Dr(o){this.excPtr=o,this.ptr=o-16,this.set_type=function(a){fe[this.ptr+4>>2]=a},this.get_type=function(){return fe[this.ptr+4>>2]},this.set_destructor=function(a){fe[this.ptr+8>>2]=a},this.get_destructor=function(){return fe[this.ptr+8>>2]},this.set_refcount=function(a){fe[this.ptr>>2]=a},this.set_caught=function(a){a=a?1:0,ii[this.ptr+12>>0]=a},this.get_caught=function(){return ii[this.ptr+12>>0]!=0},this.set_rethrown=function(a){a=a?1:0,ii[this.ptr+13>>0]=a},this.get_rethrown=function(){return ii[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=fe[this.ptr>>2];fe[this.ptr>>2]=a+1},this.release_ref=function(){var a=fe[this.ptr>>2];return fe[this.ptr>>2]=a-1,a===1}}function on(o){this.free=function(){Au(this.ptr),this.ptr=0},this.set_base_ptr=function(a){fe[this.ptr>>2]=a},this.get_base_ptr=function(){return fe[this.ptr>>2]},this.set_adjusted_ptr=function(a){fe[this.ptr+4>>2]=a},this.get_adjusted_ptr_addr=function(){return this.ptr+4},this.get_adjusted_ptr=function(){return fe[this.ptr+4>>2]},this.get_exception_ptr=function(){var a=wf(this.get_exception_info().get_type());if(a)return fe[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 Dr(this.get_base_ptr())},o===void 0?(this.ptr=Su(8),this.set_adjusted_ptr(0)):this.ptr=o}var oo=[];function Yw(o){o.add_ref()}var ao=0;function Gw(o){var a=new on(o),u=a.get_exception_info();return u.get_caught()||(u.set_caught(!0),ao--),u.set_rethrown(!1),oo.push(a),Yw(u),a.get_exception_ptr()}var Bi=0;function gf(o){return Au(new Dr(o).ptr)}function Kw(o){if(o.release_ref()&&!o.get_rethrown()){var a=o.get_destructor();a&&G.get(a)(o.excPtr),gf(o.excPtr)}}function $w(){T(0);var o=oo.pop();Kw(o.get_exception_info()),o.free(),Bi=0}function Jw(o){var a=new on(o),u=a.get_base_ptr();throw Bi||(Bi=u),a.free(),u}function Qw(){var o=Bi;if(!o)return ot(0),0|0;var a=new Dr(o),u=a.get_type(),l=new on;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ot(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(hs(h,u,l.get_adjusted_ptr_addr()))return ot(h),l.ptr|0}return ot(u),l.ptr|0}function Zw(){var o=Bi;if(!o)return ot(0),0|0;var a=new Dr(o),u=a.get_type(),l=new on;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ot(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(hs(h,u,l.get_adjusted_ptr_addr()))return ot(h),l.ptr|0}return ot(u),l.ptr|0}function Xw(){var o=Bi;if(!o)return ot(0),0|0;var a=new Dr(o),u=a.get_type(),l=new on;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ot(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(hs(h,u,l.get_adjusted_ptr_addr()))return ot(h),l.ptr|0}return ot(u),l.ptr|0}function ej(){var o=Bi;if(!o)return ot(0),0|0;var a=new Dr(o),u=a.get_type(),l=new on;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ot(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(hs(h,u,l.get_adjusted_ptr_addr()))return ot(h),l.ptr|0}return ot(u),l.ptr|0}function tj(){var o=oo.pop();o||ri("no exception to throw");var a=o.get_exception_info(),u=o.get_base_ptr();throw a.get_rethrown()?o.free():(oo.push(o),a.set_rethrown(!0),a.set_caught(!1),ao++),Bi=u,u}function ij(o,a,u){var l=new Dr(o);throw l.init(a,u),Bi=o,ao++,o}function rj(){return ao}var it={mappings:{},buffers:[null,[],[]],printChar:function(o,a){var u=it.buffers[o];a===0||a===10?((o===1?hw:Ar)(cf(u,0)),u.length=0):u.push(a)},varargs:void 0,get:function(){it.varargs+=4;var o=fe[it.varargs-4>>2];return o},getStr:function(o){var a=no(o);return a},get64:function(o,a){return o}};function nj(o,a){return o=it.getStr(o),it.doAccess(o,a)}function sj(o){return fe[vf()>>2]=o,o}function oj(o,a,u){return it.varargs=u,0}function aj(o,a){}function uj(o,a,u,l){}function cj(o,a,u){}function lj(){return 42}function dj(o,a,u){return it.varargs=u,0}function fj(o,a,u){return 0}function hj(o,a){return o=it.getStr(o),it.doMkdir(o,a)}function pj(o,a,u){it.varargs=u}function yj(o,a){}function _j(o){}function mj(o,a){}function bj(o){}function gj(o,a){ri("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function vj(o,a){ri("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function wj(){ri("")}var ju;q?ju=function(){var o=process.hrtime();return o[0]*1e3+o[1]/1e6}:ju=function(){return performance.now()};var jj=!0;function Ij(o,a){var u;if(o===0)u=Date.now();else if((o===1||o===4)&&jj)u=ju();else return sj(28),-1;return fe[a>>2]=u/1e3|0,fe[a+4>>2]=u%1e3*1e3*1e3|0,0}function Tj(o,a){return globalThis.DUCKDB_RUNTIME.createDirectory(t,o,a)}function Bj(o,a){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,o,a)}function Sj(o,a){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,o,a)}function Aj(o,a){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,o,a)}function Oj(o){return globalThis.DUCKDB_RUNTIME.closeFile(t,o)}function Dj(o,a){return globalThis.DUCKDB_RUNTIME.checkFile(t,o,a)}function Fj(o){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,o)}function Ej(o,a,u,l){return globalThis.DUCKDB_RUNTIME.moveFile(t,o,a,u,l)}function Rj(o){return globalThis.DUCKDB_RUNTIME.openFile(t,o)}function Cj(o,a,u,l){return globalThis.DUCKDB_RUNTIME.readFile(t,o,a,u,l)}function Uj(o,a){return globalThis.DUCKDB_RUNTIME.truncateFile(t,o,a)}function kj(o,a,u,l){return globalThis.DUCKDB_RUNTIME.writeFile(t,o,a,u,l)}function Mj(o,a){return globalThis.DUCKDB_RUNTIME.glob(t,o,a)}function Pj(o){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,o)}function Vj(){return 2147483648}function Nj(o,a,u){sn.copyWithin(o,a,a+u)}function Lj(o){try{return io.grow(o-ff.byteLength+65535>>>16),hf(io.buffer),1}catch(a){}}function xj(o){var a=sn.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,ww(Math.max(o,d),65536)),h=Lj(f);if(h)return!0}return!1}var Iu={};function qj(){return v||"./this.program"}function fs(){if(!fs.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,_:qj()};for(var u in Iu)Iu[u]===void 0?delete a[u]:a[u]=Iu[u];var l=[];for(var u in a)l.push(u+"="+a[u]);fs.strings=l}return fs.strings}function Wj(o,a){var u=0;return fs().forEach(function(l,d){var f=a+u;fe[o+d*4>>2]=f,vw(l,f),u+=l.length+1}),0}function zj(o,a){var u=fs();fe[o>>2]=u.length;var l=0;return u.forEach(function(d){l+=d.length+1}),fe[a>>2]=l,0}function Hj(o){return 0}function Yj(o,a){var u=o==1||o==2?2:ri();return ii[a>>0]=u,0}function Gj(o,a,u,l,d,f){var h=it.getStreamFromFD(o),p=it.doReadv(h,a,u,l);return fe[f>>2]=p,0}function Kj(o,a,u,l,d,f){var h=it.getStreamFromFD(o),p=it.doWritev(h,a,u,l);return fe[f>>2]=p,0}function $j(o,a,u,l){var d=it.getStreamFromFD(o),f=it.doReadv(d,a,u);return fe[l>>2]=f,0}function Jj(o,a,u,l,d){}function Qj(o){var a=it.getStreamFromFD(o);return a.stream_ops&&a.stream_ops.fsync?-a.stream_ops.fsync(a):0}function Zj(o,a,u,l){for(var d=0,f=0;f<u;f++){for(var h=fe[a+f*8>>2],p=fe[a+(f*8+4)>>2],y=0;y<p;y++)it.printChar(o,sn[h+y]);d+=p}return fe[l>>2]=d,0}function Xj(){return pw()}function e0(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var o=new Uint8Array(1);return function(){return crypto.getRandomValues(o),o[0]}}else if(q)try{var a=b1("crypto");return function(){return a.randomBytes(1)[0]}}catch(u){}return function(){ri("randomDevice")}}function uo(o,a){uo.randomDevice||(uo.randomDevice=e0());for(var u=0;u<a;u++)ii[o+u>>0]=uo.randomDevice();return 0}function t0(o){return o}function i0(o){ot(o)}function co(o){return o%4==0&&(o%100!=0||o%400==0)}function Tu(o,a){for(var u=0,l=0;l<=a;u+=o[l++]);return u}var lo=[31,29,31,30,31,30,31,31,30,31,30,31],fo=[31,28,31,30,31,30,31,31,30,31,30,31];function ho(o,a){for(var u=new Date(o.getTime());a>0;){var l=co(u.getFullYear()),d=u.getMonth(),f=(l?lo:fo)[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 r0(o,a,u,l){var d=fe[l+40>>2],f={tm_sec:fe[l>>2],tm_min:fe[l+4>>2],tm_hour:fe[l+8>>2],tm_mday:fe[l+12>>2],tm_mon:fe[l+16>>2],tm_year:fe[l+20>>2],tm_wday:fe[l+24>>2],tm_yday:fe[l+28>>2],tm_isdst:fe[l+32>>2],tm_gmtoff:fe[l+36>>2],tm_zone:d?no(d):""},h=no(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 w(U,$,Ce){for(var ge=typeof U=="number"?U.toString():U||"";ge.length<$;)ge=Ce[0]+ge;return ge}function A(U,$){return w(U,$,"0")}function E(U,$){function Ce(yt){return yt<0?-1:yt>0?1:0}var ge;return(ge=Ce(U.getFullYear()-$.getFullYear()))===0&&(ge=Ce(U.getMonth()-$.getMonth()))===0&&(ge=Ce(U.getDate()-$.getDate())),ge}function P(U){switch(U.getDay()){case 0:return new Date(U.getFullYear()-1,11,29);case 1:return U;case 2:return new Date(U.getFullYear(),0,3);case 3:return new Date(U.getFullYear(),0,2);case 4:return new Date(U.getFullYear(),0,1);case 5:return new Date(U.getFullYear()-1,11,31);case 6:return new Date(U.getFullYear()-1,11,30)}}function se(U){var $=ho(new Date(U.tm_year+1900,0,1),U.tm_yday),Ce=new Date($.getFullYear(),0,4),ge=new Date($.getFullYear()+1,0,4),yt=P(Ce),Wi=P(ge);return E(yt,$)<=0?E(Wi,$)<=0?$.getFullYear()+1:$.getFullYear():$.getFullYear()-1}var me={"%a":function(U){return m[U.tm_wday].substring(0,3)},"%A":function(U){return m[U.tm_wday]},"%b":function(U){return g[U.tm_mon].substring(0,3)},"%B":function(U){return g[U.tm_mon]},"%C":function(U){var $=U.tm_year+1900;return A($/100|0,2)},"%d":function(U){return A(U.tm_mday,2)},"%e":function(U){return w(U.tm_mday,2," ")},"%g":function(U){return se(U).toString().substring(2)},"%G":function(U){return se(U)},"%H":function(U){return A(U.tm_hour,2)},"%I":function(U){var $=U.tm_hour;return $==0?$=12:$>12&&($-=12),A($,2)},"%j":function(U){return A(U.tm_mday+Tu(co(U.tm_year+1900)?lo:fo,U.tm_mon-1),3)},"%m":function(U){return A(U.tm_mon+1,2)},"%M":function(U){return A(U.tm_min,2)},"%n":function(){return`
18
+ `},"%p":function(U){return U.tm_hour>=0&&U.tm_hour<12?"AM":"PM"},"%S":function(U){return A(U.tm_sec,2)},"%t":function(){return" "},"%u":function(U){return U.tm_wday||7},"%U":function(U){var $=new Date(U.tm_year+1900,0,1),Ce=$.getDay()===0?$:ho($,7-$.getDay()),ge=new Date(U.tm_year+1900,U.tm_mon,U.tm_mday);if(E(Ce,ge)<0){var yt=Tu(co(ge.getFullYear())?lo:fo,ge.getMonth()-1)-31,Wi=31-Ce.getDate(),Fr=Wi+yt+ge.getDate();return A(Math.ceil(Fr/7),2)}return E(Ce,$)===0?"01":"00"},"%V":function(U){var $=new Date(U.tm_year+1900,0,4),Ce=new Date(U.tm_year+1901,0,4),ge=P($),yt=P(Ce),Wi=ho(new Date(U.tm_year+1900,0,1),U.tm_yday);if(E(Wi,ge)<0)return"53";if(E(yt,Wi)<=0)return"01";var Fr;return ge.getFullYear()<U.tm_year+1900?Fr=U.tm_yday+32-ge.getDate():Fr=U.tm_yday+1-ge.getDate(),A(Math.ceil(Fr/7),2)},"%w":function(U){return U.tm_wday},"%W":function(U){var $=new Date(U.tm_year,0,1),Ce=$.getDay()===1?$:ho($,$.getDay()===0?1:7-$.getDay()+1),ge=new Date(U.tm_year+1900,U.tm_mon,U.tm_mday);if(E(Ce,ge)<0){var yt=Tu(co(ge.getFullYear())?lo:fo,ge.getMonth()-1)-31,Wi=31-Ce.getDate(),Fr=Wi+yt+ge.getDate();return A(Math.ceil(Fr/7),2)}return E(Ce,$)===0?"01":"00"},"%y":function(U){return(U.tm_year+1900).toString().substring(2)},"%Y":function(U){return U.tm_year+1900},"%z":function(U){var $=U.tm_gmtoff,Ce=$>=0;return $=Math.abs($)/60,$=$/60*100+$%60,(Ce?"+":"-")+String("0000"+$).slice(-4)},"%Z":function(U){return U.tm_zone},"%%":function(){return"%"}};for(var y in me)h.includes(y)&&(h=h.replace(new RegExp(y,"g"),me[y](f)));var Be=s0(h,!1);return Be.length>a?0:(df(Be,o),Be.length-1)}function n0(o,a,u,l){return r0(o,a,u,l)}function s0(o,a,u){var l=u>0?u:gw(o)+1,d=new Array(l),f=lf(o,d,0,d.length);return a&&(d.length=f),d}var o0={i:Hw,A:Gw,G:$w,b:Qw,n:Zw,I:Xw,pa:ej,j:gf,ua:tj,u:ij,E:rj,c:Jw,Ga:nj,ea:oj,Ia:aj,Ha:uj,Ea:cj,ia:lj,Na:dj,Aa:fj,Fa:hj,sa:pj,Ca:yj,ja:_j,la:mj,ka:bj,La:gj,Ka:vj,ga:wj,qa:Ij,xe:Tj,ye:Bj,ve:Sj,we:Aj,ha:Oj,te:Dj,wa:Fj,ue:Ej,ya:Rj,$:Cj,ze:Uj,xa:kj,se:Mj,re:Pj,Oa:Vj,Sa:Nj,Kc:xj,Qa:Wj,Ra:zj,Y:Hj,Ma:Yj,mb:Gj,lb:Kj,ra:$j,Md:Jj,Da:Qj,da:Zj,a:Xj,Ja:uo,W:MI,K:wI,R:X0,sc:VB,X:kI,M:UI,va:Z0,tc:PB,t:lI,U:xI,rb:nI,Z:_I,V:LI,Cb:rI,e:H0,aa:RI,C:mI,Hb:jS,d:Y0,fa:jI,ma:PI,h:K0,Fb:TS,l:Q0,ta:TI,o:$0,z:aI,w:uI,Q:oI,x:dI,v:hI,p:AI,L:EI,J:FI,Vb:uS,Yb:sS,$b:iS,hc:$B,Wb:aS,Gb:IS,rc:NB,Zb:nS,ic:KB,ne:HI,Kd:wT,Dd:OT,be:rT,Mb:mS,cd:tB,Ua:s1,Ta:o1,Ud:fT,Jd:jT,vb:CS,Sc:hB,Td:hT,yc:RB,Nb:_S,Eb:BS,ie:JI,Qd:_T,uc:MB,Ed:AT,od:WT,Bd:FT,hb:zS,Rd:yT,ec:QB,Od:bT,bd:iB,cb:$S,Va:n1,ed:XT,Vd:dT,xd:UT,$a:ZS,tb:kS,Fd:ST,db:KS,Db:SS,Pd:mT,yd:CT,ad:rB,Ad:ET,zd:RT,ud:PT,dc:ZB,Tb:lS,ge:ZI,_d:oT,jc:GB,Zd:aT,Ld:vT,mc:zB,lc:HB,fe:XI,$d:sT,Id:IT,qe:qI,Ac:FB,kc:YB,Xb:oS,zc:EB,pc:xB,Pc:_B,sb:MS,vc:kB,qc:LB,ld:YT,xc:CB,oc:qB,xb:ES,gd:QT,Sb:dS,id:$T,Yc:aB,Jc:wB,Ic:jB,Gc:TB,Hc:IB,md:HT,Ab:OS,Vc:lB,Wa:r1,bc:eS,jb:qS,Tc:fB,nc:WB,Pb:pS,s:W0,k:G0,B:vI,ba:SI,ob:NS,D:gI,ca:BI,pb:VS,f:z0,T:tI,P:bI,fc:eI,g:iI,m:J0,Ba:VI,q:cI,r:sI,na:CI,y:fI,O:II,N:DI,S:pI,za:NI,oa:OI,_:yI,wd:kT,nb:LS,dd:eB,Ub:cS,wc:UB,gc:JB,Ib:wS,gb:HS,le:GI,Sd:pT,ub:US,ab:QS,sd:NT,td:VT,Qb:hS,pd:qT,Kb:gS,Jb:vS,Lc:vB,ke:KI,qd:xT,vd:MT,Rc:pB,Dc:AB,yb:FS,zb:DS,eb:GS,ee:eT,nd:zT,Lb:bS,Bc:DB,Oc:mB,je:$I,bb:JS,oe:zI,Xd:cT,Yd:uT,Cd:DT,wb:RS,Xc:uB,Fc:BB,Ec:SB,Wc:cB,fb:YS,hd:JT,$c:nB,Xa:i1,Cc:OB,ib:WS,pe:WI,Nd:gT,Zc:oB,Mc:gB,ce:iT,_b:rS,me:YI,ae:nT,_c:sB,Hd:TT,Gd:BT,Uc:dB,qb:PS,fd:ZT,cc:XB,he:QI,_a:XS,Nc:bB,kb:xS,Wd:lT,Qc:yB,Ya:t1,Za:e1,ac:tS,de:tT,kd:GT,Ob:yS,Rb:fS,Bb:AS,rd:LT,jd:KT,H:t0,F:i0,Pa:n0},fU=Ww(),a0=t.___wasm_call_ctors=function(){return(a0=t.___wasm_call_ctors=t.asm.Be).apply(null,arguments)},u0=t._main=function(){return(u0=t._main=t.asm.Ce).apply(null,arguments)},c0=t._duckdb_web_fs_glob_add_path=function(){return(c0=t._duckdb_web_fs_glob_add_path=t.asm.Ee).apply(null,arguments)},l0=t._duckdb_web_clear_response=function(){return(l0=t._duckdb_web_clear_response=t.asm.Fe).apply(null,arguments)},d0=t._duckdb_web_fail_with=function(){return(d0=t._duckdb_web_fail_with=t.asm.Ge).apply(null,arguments)},f0=t._duckdb_web_reset=function(){return(f0=t._duckdb_web_reset=t.asm.He).apply(null,arguments)},h0=t._duckdb_web_connect=function(){return(h0=t._duckdb_web_connect=t.asm.Ie).apply(null,arguments)},p0=t._duckdb_web_disconnect=function(){return(p0=t._duckdb_web_disconnect=t.asm.Je).apply(null,arguments)},y0=t._duckdb_web_flush_files=function(){return(y0=t._duckdb_web_flush_files=t.asm.Ke).apply(null,arguments)},_0=t._duckdb_web_flush_file=function(){return(_0=t._duckdb_web_flush_file=t.asm.Le).apply(null,arguments)},m0=t._duckdb_web_open=function(){return(m0=t._duckdb_web_open=t.asm.Me).apply(null,arguments)},b0=t._duckdb_web_collect_file_stats=function(){return(b0=t._duckdb_web_collect_file_stats=t.asm.Ne).apply(null,arguments)},g0=t._duckdb_web_export_file_stats=function(){return(g0=t._duckdb_web_export_file_stats=t.asm.Oe).apply(null,arguments)},v0=t._duckdb_web_fs_drop_file=function(){return(v0=t._duckdb_web_fs_drop_file=t.asm.Pe).apply(null,arguments)},w0=t._duckdb_web_fs_drop_files=function(){return(w0=t._duckdb_web_fs_drop_files=t.asm.Qe).apply(null,arguments)},j0=t._duckdb_web_fs_glob_file_infos=function(){return(j0=t._duckdb_web_fs_glob_file_infos=t.asm.Re).apply(null,arguments)},I0=t._duckdb_web_fs_get_file_info_by_id=function(){return(I0=t._duckdb_web_fs_get_file_info_by_id=t.asm.Se).apply(null,arguments)},T0=t._duckdb_web_fs_get_file_info_by_name=function(){return(T0=t._duckdb_web_fs_get_file_info_by_name=t.asm.Te).apply(null,arguments)},B0=t._duckdb_web_fs_set_file_descriptor=function(){return(B0=t._duckdb_web_fs_set_file_descriptor=t.asm.Ue).apply(null,arguments)},S0=t._duckdb_web_fs_register_file_url=function(){return(S0=t._duckdb_web_fs_register_file_url=t.asm.Ve).apply(null,arguments)},A0=t._duckdb_web_fs_register_file_buffer=function(){return(A0=t._duckdb_web_fs_register_file_buffer=t.asm.We).apply(null,arguments)},O0=t._duckdb_web_copy_file_to_buffer=function(){return(O0=t._duckdb_web_copy_file_to_buffer=t.asm.Xe).apply(null,arguments)},D0=t._duckdb_web_copy_file_to_path=function(){return(D0=t._duckdb_web_copy_file_to_path=t.asm.Ye).apply(null,arguments)},F0=t._duckdb_web_get_version=function(){return(F0=t._duckdb_web_get_version=t.asm.Ze).apply(null,arguments)},E0=t._duckdb_web_get_feature_flags=function(){return(E0=t._duckdb_web_get_feature_flags=t.asm._e).apply(null,arguments)},R0=t._duckdb_web_tokenize=function(){return(R0=t._duckdb_web_tokenize=t.asm.$e).apply(null,arguments)},C0=t._duckdb_web_prepared_create=function(){return(C0=t._duckdb_web_prepared_create=t.asm.af).apply(null,arguments)},U0=t._duckdb_web_prepared_close=function(){return(U0=t._duckdb_web_prepared_close=t.asm.bf).apply(null,arguments)},k0=t._duckdb_web_prepared_run=function(){return(k0=t._duckdb_web_prepared_run=t.asm.cf).apply(null,arguments)},M0=t._duckdb_web_prepared_send=function(){return(M0=t._duckdb_web_prepared_send=t.asm.df).apply(null,arguments)},P0=t._duckdb_web_query_run=function(){return(P0=t._duckdb_web_query_run=t.asm.ef).apply(null,arguments)},V0=t._duckdb_web_query_send=function(){return(V0=t._duckdb_web_query_send=t.asm.ff).apply(null,arguments)},N0=t._duckdb_web_query_fetch_results=function(){return(N0=t._duckdb_web_query_fetch_results=t.asm.gf).apply(null,arguments)},L0=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(L0=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.hf).apply(null,arguments)},x0=t._duckdb_web_insert_csv_from_path=function(){return(x0=t._duckdb_web_insert_csv_from_path=t.asm.jf).apply(null,arguments)},q0=t._duckdb_web_insert_json_from_path=function(){return(q0=t._duckdb_web_insert_json_from_path=t.asm.kf).apply(null,arguments)},vf=t.___errno_location=function(){return(vf=t.___errno_location=t.asm.lf).apply(null,arguments)},j=t.stackSave=function(){return(j=t.stackSave=t.asm.mf).apply(null,arguments)},I=t.stackRestore=function(){return(I=t.stackRestore=t.asm.nf).apply(null,arguments)},Bu=t.stackAlloc=function(){return(Bu=t.stackAlloc=t.asm.of).apply(null,arguments)},T=t._setThrew=function(){return(T=t._setThrew=t.asm.pf).apply(null,arguments)},hs=t.___cxa_can_catch=function(){return(hs=t.___cxa_can_catch=t.asm.qf).apply(null,arguments)},wf=t.___cxa_is_pointer_type=function(){return(wf=t.___cxa_is_pointer_type=t.asm.rf).apply(null,arguments)},Su=t._malloc=function(){return(Su=t._malloc=t.asm.sf).apply(null,arguments)},Au=t._free=function(){return(Au=t._free=t.asm.tf).apply(null,arguments)},jf=t.dynCall_viiij=function(){return(jf=t.dynCall_viiij=t.asm.uf).apply(null,arguments)},If=t.dynCall_viiijjj=function(){return(If=t.dynCall_viiijjj=t.asm.vf).apply(null,arguments)},Tf=t.dynCall_iiij=function(){return(Tf=t.dynCall_iiij=t.asm.wf).apply(null,arguments)},Bf=t.dynCall_vijijj=function(){return(Bf=t.dynCall_vijijj=t.asm.xf).apply(null,arguments)},Sf=t.dynCall_iji=function(){return(Sf=t.dynCall_iji=t.asm.yf).apply(null,arguments)},Af=t.dynCall_vij=function(){return(Af=t.dynCall_vij=t.asm.zf).apply(null,arguments)},Of=t.dynCall_viijj=function(){return(Of=t.dynCall_viijj=t.asm.Af).apply(null,arguments)},Df=t.dynCall_ji=function(){return(Df=t.dynCall_ji=t.asm.Bf).apply(null,arguments)},Ff=t.dynCall_viiijj=function(){return(Ff=t.dynCall_viiijj=t.asm.Cf).apply(null,arguments)},Ef=t.dynCall_vijjj=function(){return(Ef=t.dynCall_vijjj=t.asm.Df).apply(null,arguments)},Rf=t.dynCall_jii=function(){return(Rf=t.dynCall_jii=t.asm.Ef).apply(null,arguments)},Cf=t.dynCall_jiiii=function(){return(Cf=t.dynCall_jiiii=t.asm.Ff).apply(null,arguments)},Uf=t.dynCall_iiiiij=function(){return(Uf=t.dynCall_iiiiij=t.asm.Gf).apply(null,arguments)},kf=t.dynCall_iiiiijj=function(){return(kf=t.dynCall_iiiiijj=t.asm.Hf).apply(null,arguments)},Mf=t.dynCall_viijii=function(){return(Mf=t.dynCall_viijii=t.asm.If).apply(null,arguments)},Pf=t.dynCall_viiji=function(){return(Pf=t.dynCall_viiji=t.asm.Jf).apply(null,arguments)},Vf=t.dynCall_vijj=function(){return(Vf=t.dynCall_vijj=t.asm.Kf).apply(null,arguments)},Nf=t.dynCall_viji=function(){return(Nf=t.dynCall_viji=t.asm.Lf).apply(null,arguments)},Lf=t.dynCall_iij=function(){return(Lf=t.dynCall_iij=t.asm.Mf).apply(null,arguments)},xf=t.dynCall_viij=function(){return(xf=t.dynCall_viij=t.asm.Nf).apply(null,arguments)},qf=t.dynCall_jiji=function(){return(qf=t.dynCall_jiji=t.asm.Of).apply(null,arguments)},Wf=t.dynCall_viiiij=function(){return(Wf=t.dynCall_viiiij=t.asm.Pf).apply(null,arguments)},zf=t.dynCall_iiiij=function(){return(zf=t.dynCall_iiiij=t.asm.Qf).apply(null,arguments)},Hf=t.dynCall_iiiiiji=function(){return(Hf=t.dynCall_iiiiiji=t.asm.Rf).apply(null,arguments)},Yf=t.dynCall_iiiji=function(){return(Yf=t.dynCall_iiiji=t.asm.Sf).apply(null,arguments)},Gf=t.dynCall_iiiiji=function(){return(Gf=t.dynCall_iiiiji=t.asm.Tf).apply(null,arguments)},Kf=t.dynCall_jiii=function(){return(Kf=t.dynCall_jiii=t.asm.Uf).apply(null,arguments)},$f=t.dynCall_jij=function(){return($f=t.dynCall_jij=t.asm.Vf).apply(null,arguments)},Jf=t.dynCall_j=function(){return(Jf=t.dynCall_j=t.asm.Wf).apply(null,arguments)},Qf=t.dynCall_viijij=function(){return(Qf=t.dynCall_viijij=t.asm.Xf).apply(null,arguments)},Zf=t.dynCall_iijjijj=function(){return(Zf=t.dynCall_iijjijj=t.asm.Yf).apply(null,arguments)},Xf=t.dynCall_viiiijiiiii=function(){return(Xf=t.dynCall_viiiijiiiii=t.asm.Zf).apply(null,arguments)},eh=t.dynCall_viiiijiiii=function(){return(eh=t.dynCall_viiiijiiii=t.asm._f).apply(null,arguments)},th=t.dynCall_viiijii=function(){return(th=t.dynCall_viiijii=t.asm.$f).apply(null,arguments)},ih=t.dynCall_viiiiiij=function(){return(ih=t.dynCall_viiiiiij=t.asm.ag).apply(null,arguments)},rh=t.dynCall_iiijiii=function(){return(rh=t.dynCall_iiijiii=t.asm.bg).apply(null,arguments)},nh=t.dynCall_iiiiijii=function(){return(nh=t.dynCall_iiiiijii=t.asm.cg).apply(null,arguments)},sh=t.dynCall_viijiii=function(){return(sh=t.dynCall_viijiii=t.asm.dg).apply(null,arguments)},oh=t.dynCall_iiijiij=function(){return(oh=t.dynCall_iiijiij=t.asm.eg).apply(null,arguments)},ah=t.dynCall_vijiii=function(){return(ah=t.dynCall_vijiii=t.asm.fg).apply(null,arguments)},uh=t.dynCall_iijjiii=function(){return(uh=t.dynCall_iijjiii=t.asm.gg).apply(null,arguments)},ch=t.dynCall_iijjiiii=function(){return(ch=t.dynCall_iijjiiii=t.asm.hg).apply(null,arguments)},lh=t.dynCall_iiji=function(){return(lh=t.dynCall_iiji=t.asm.ig).apply(null,arguments)},dh=t.dynCall_iijji=function(){return(dh=t.dynCall_iijji=t.asm.jg).apply(null,arguments)},fh=t.dynCall_vijiiii=function(){return(fh=t.dynCall_vijiiii=t.asm.kg).apply(null,arguments)},hh=t.dynCall_iijiiii=function(){return(hh=t.dynCall_iijiiii=t.asm.lg).apply(null,arguments)},ph=t.dynCall_vijij=function(){return(ph=t.dynCall_vijij=t.asm.mg).apply(null,arguments)},yh=t.dynCall_iiijjjj=function(){return(yh=t.dynCall_iiijjjj=t.asm.ng).apply(null,arguments)},_h=t.dynCall_iiijiiii=function(){return(_h=t.dynCall_iiijiiii=t.asm.og).apply(null,arguments)},mh=t.dynCall_jiiij=function(){return(mh=t.dynCall_jiiij=t.asm.pg).apply(null,arguments)},bh=t.dynCall_iiiiijjiijj=function(){return(bh=t.dynCall_iiiiijjiijj=t.asm.qg).apply(null,arguments)},gh=t.dynCall_viijiijji=function(){return(gh=t.dynCall_viijiijji=t.asm.rg).apply(null,arguments)},vh=t.dynCall_vjjijij=function(){return(vh=t.dynCall_vjjijij=t.asm.sg).apply(null,arguments)},wh=t.dynCall_vijjji=function(){return(wh=t.dynCall_vijjji=t.asm.tg).apply(null,arguments)},jh=t.dynCall_vjjii=function(){return(jh=t.dynCall_vjjii=t.asm.ug).apply(null,arguments)},Ih=t.dynCall_viiiiiji=function(){return(Ih=t.dynCall_viiiiiji=t.asm.vg).apply(null,arguments)},Th=t.dynCall_jiiijji=function(){return(Th=t.dynCall_jiiijji=t.asm.wg).apply(null,arguments)},Bh=t.dynCall_iijj=function(){return(Bh=t.dynCall_iijj=t.asm.xg).apply(null,arguments)},Sh=t.dynCall_iiijjii=function(){return(Sh=t.dynCall_iiijjii=t.asm.yg).apply(null,arguments)},Ah=t.dynCall_iijjii=function(){return(Ah=t.dynCall_iijjii=t.asm.zg).apply(null,arguments)},Oh=t.dynCall_vijii=function(){return(Oh=t.dynCall_vijii=t.asm.Ag).apply(null,arguments)},Dh=t.dynCall_viijjii=function(){return(Dh=t.dynCall_viijjii=t.asm.Bg).apply(null,arguments)},Fh=t.dynCall_viiiijj=function(){return(Fh=t.dynCall_viiiijj=t.asm.Cg).apply(null,arguments)},Eh=t.dynCall_jijjij=function(){return(Eh=t.dynCall_jijjij=t.asm.Dg).apply(null,arguments)},Rh=t.dynCall_jiijii=function(){return(Rh=t.dynCall_jiijii=t.asm.Eg).apply(null,arguments)},Ch=t.dynCall_jijiii=function(){return(Ch=t.dynCall_jijiii=t.asm.Fg).apply(null,arguments)},Uh=t.dynCall_viijiiiii=function(){return(Uh=t.dynCall_viijiiiii=t.asm.Gg).apply(null,arguments)},kh=t.dynCall_viijiiij=function(){return(kh=t.dynCall_viijiiij=t.asm.Hg).apply(null,arguments)},Mh=t.dynCall_vijiiiji=function(){return(Mh=t.dynCall_vijiiiji=t.asm.Ig).apply(null,arguments)},Ph=t.dynCall_jiiji=function(){return(Ph=t.dynCall_jiiji=t.asm.Jg).apply(null,arguments)},Vh=t.dynCall_viiijij=function(){return(Vh=t.dynCall_viiijij=t.asm.Kg).apply(null,arguments)},Nh=t.dynCall_viijiijj=function(){return(Nh=t.dynCall_viijiijj=t.asm.Lg).apply(null,arguments)},Lh=t.dynCall_viiiiijj=function(){return(Lh=t.dynCall_viiiiijj=t.asm.Mg).apply(null,arguments)},xh=t.dynCall_viiijji=function(){return(xh=t.dynCall_viiijji=t.asm.Ng).apply(null,arguments)},qh=t.dynCall_viiiji=function(){return(qh=t.dynCall_viiiji=t.asm.Og).apply(null,arguments)},Wh=t.dynCall_iiiijiii=function(){return(Wh=t.dynCall_iiiijiii=t.asm.Pg).apply(null,arguments)},zh=t.dynCall_iiijij=function(){return(zh=t.dynCall_iiijij=t.asm.Qg).apply(null,arguments)},Hh=t.dynCall_iiijji=function(){return(Hh=t.dynCall_iiijji=t.asm.Rg).apply(null,arguments)},Yh=t.dynCall_viijji=function(){return(Yh=t.dynCall_viijji=t.asm.Sg).apply(null,arguments)},Gh=t.dynCall_iiiijj=function(){return(Gh=t.dynCall_iiiijj=t.asm.Tg).apply(null,arguments)},Kh=t.dynCall_viiijiii=function(){return(Kh=t.dynCall_viiijiii=t.asm.Ug).apply(null,arguments)},$h=t.dynCall_vijji=function(){return($h=t.dynCall_vijji=t.asm.Vg).apply(null,arguments)},Jh=t.dynCall_jiiiij=function(){return(Jh=t.dynCall_jiiiij=t.asm.Wg).apply(null,arguments)},Qh=t.dynCall_jiijiiiii=function(){return(Qh=t.dynCall_jiijiiiii=t.asm.Xg).apply(null,arguments)},Zh=t.dynCall_jiijiijiii=function(){return(Zh=t.dynCall_jiijiijiii=t.asm.Yg).apply(null,arguments)},Xh=t.dynCall_jiijjiii=function(){return(Xh=t.dynCall_jiijjiii=t.asm.Zg).apply(null,arguments)},ep=t.dynCall_jiijijii=function(){return(ep=t.dynCall_jiijijii=t.asm._g).apply(null,arguments)},tp=t.dynCall_viiijjij=function(){return(tp=t.dynCall_viiijjij=t.asm.$g).apply(null,arguments)},ip=t.dynCall_vijijjiij=function(){return(ip=t.dynCall_vijijjiij=t.asm.ah).apply(null,arguments)},rp=t.dynCall_viijjij=function(){return(rp=t.dynCall_viijjij=t.asm.bh).apply(null,arguments)},np=t.dynCall_viiijjiij=function(){return(np=t.dynCall_viiijjiij=t.asm.ch).apply(null,arguments)},sp=t.dynCall_viiiijjjj=function(){return(sp=t.dynCall_viiiijjjj=t.asm.dh).apply(null,arguments)},op=t.dynCall_viijiiiiij=function(){return(op=t.dynCall_viijiiiiij=t.asm.eh).apply(null,arguments)},ap=t.dynCall_viijiiiijj=function(){return(ap=t.dynCall_viijiiiijj=t.asm.fh).apply(null,arguments)},up=t.dynCall_viiijiiiijjj=function(){return(up=t.dynCall_viiijiiiijjj=t.asm.gh).apply(null,arguments)},cp=t.dynCall_viijijiiiijjj=function(){return(cp=t.dynCall_viijijiiiijjj=t.asm.hh).apply(null,arguments)},lp=t.dynCall_jiiijii=function(){return(lp=t.dynCall_jiiijii=t.asm.ih).apply(null,arguments)},dp=t.dynCall_viiiiijiiii=function(){return(dp=t.dynCall_viiiiijiiii=t.asm.jh).apply(null,arguments)},fp=t.dynCall_iiijii=function(){return(fp=t.dynCall_iiijii=t.asm.kh).apply(null,arguments)},hp=t.dynCall_fiijii=function(){return(hp=t.dynCall_fiijii=t.asm.lh).apply(null,arguments)},pp=t.dynCall_diijii=function(){return(pp=t.dynCall_diijii=t.asm.mh).apply(null,arguments)},yp=t.dynCall_iiiiiiijii=function(){return(yp=t.dynCall_iiiiiiijii=t.asm.nh).apply(null,arguments)},_p=t.dynCall_viiiiji=function(){return(_p=t.dynCall_viiiiji=t.asm.oh).apply(null,arguments)},mp=t.dynCall_jiiiijii=function(){return(mp=t.dynCall_jiiiijii=t.asm.ph).apply(null,arguments)},bp=t.dynCall_jiiiijiiiiiiii=function(){return(bp=t.dynCall_jiiiijiiiiiiii=t.asm.qh).apply(null,arguments)},gp=t.dynCall_jiiiiijiiii=function(){return(gp=t.dynCall_jiiiiijiiii=t.asm.rh).apply(null,arguments)},vp=t.dynCall_jiiijiii=function(){return(vp=t.dynCall_jiiijiii=t.asm.sh).apply(null,arguments)},wp=t.dynCall_jj=function(){return(wp=t.dynCall_jj=t.asm.th).apply(null,arguments)},jp=t.dynCall_jd=function(){return(jp=t.dynCall_jd=t.asm.uh).apply(null,arguments)},Ip=t.dynCall_jf=function(){return(Ip=t.dynCall_jf=t.asm.vh).apply(null,arguments)},Tp=t.dynCall_iijjjj=function(){return(Tp=t.dynCall_iijjjj=t.asm.wh).apply(null,arguments)},Bp=t.dynCall_iiijj=function(){return(Bp=t.dynCall_iiijj=t.asm.xh).apply(null,arguments)},Sp=t.dynCall_vijijiiiijjj=function(){return(Sp=t.dynCall_vijijiiiijjj=t.asm.yh).apply(null,arguments)},Ap=t.dynCall_iiiiiiji=function(){return(Ap=t.dynCall_iiiiiiji=t.asm.zh).apply(null,arguments)},Op=t.dynCall_iiiiiiiiji=function(){return(Op=t.dynCall_iiiiiiiiji=t.asm.Ah).apply(null,arguments)},Dp=t.dynCall_jijijjij=function(){return(Dp=t.dynCall_jijijjij=t.asm.Bh).apply(null,arguments)},Fp=t.dynCall_vijjij=function(){return(Fp=t.dynCall_vijjij=t.asm.Ch).apply(null,arguments)},Ep=t.dynCall_viijjj=function(){return(Ep=t.dynCall_viijjj=t.asm.Dh).apply(null,arguments)},Rp=t.dynCall_viijjji=function(){return(Rp=t.dynCall_viijjji=t.asm.Eh).apply(null,arguments)},Cp=t.dynCall_iiiiiij=function(){return(Cp=t.dynCall_iiiiiij=t.asm.Fh).apply(null,arguments)},Up=t.dynCall_iiiiiiiiiiji=function(){return(Up=t.dynCall_iiiiiiiiiiji=t.asm.Gh).apply(null,arguments)},kp=t.dynCall_jiiiiiii=function(){return(kp=t.dynCall_jiiiiiii=t.asm.Hh).apply(null,arguments)},Mp=t.dynCall_jijj=function(){return(Mp=t.dynCall_jijj=t.asm.Ih).apply(null,arguments)},Pp=t.dynCall_viiiijiiiiiiii=function(){return(Pp=t.dynCall_viiiijiiiiiiii=t.asm.Jh).apply(null,arguments)},Vp=t.dynCall_ij=function(){return(Vp=t.dynCall_ij=t.asm.Kh).apply(null,arguments)},Np=t.dynCall_jjj=function(){return(Np=t.dynCall_jjj=t.asm.Lh).apply(null,arguments)},Lp=t.dynCall_vjii=function(){return(Lp=t.dynCall_vjii=t.asm.Mh).apply(null,arguments)},xp=t.dynCall_vjiiii=function(){return(xp=t.dynCall_vjiiii=t.asm.Nh).apply(null,arguments)},qp=t.dynCall_viiiiijiii=function(){return(qp=t.dynCall_viiiiijiii=t.asm.Oh).apply(null,arguments)},Wp=t.dynCall_jiij=function(){return(Wp=t.dynCall_jiij=t.asm.Ph).apply(null,arguments)},zp=t.dynCall_iiiijjii=function(){return(zp=t.dynCall_iiiijjii=t.asm.Qh).apply(null,arguments)},Hp=t.dynCall_iiiiijji=function(){return(Hp=t.dynCall_iiiiijji=t.asm.Rh).apply(null,arguments)},Yp=t.dynCall_viiijjii=function(){return(Yp=t.dynCall_viiijjii=t.asm.Sh).apply(null,arguments)},Gp=t.dynCall_viiiijji=function(){return(Gp=t.dynCall_viiiijji=t.asm.Th).apply(null,arguments)},Kp=t.dynCall_viiiijjii=function(){return(Kp=t.dynCall_viiiijjii=t.asm.Uh).apply(null,arguments)},$p=t.dynCall_viiiiijji=function(){return($p=t.dynCall_viiiiijji=t.asm.Vh).apply(null,arguments)},Jp=t.dynCall_iidj=function(){return(Jp=t.dynCall_iidj=t.asm.Wh).apply(null,arguments)},Qp=t.dynCall_ijji=function(){return(Qp=t.dynCall_ijji=t.asm.Xh).apply(null,arguments)},Zp=t.dynCall_iiiiiiiij=function(){return(Zp=t.dynCall_iiiiiiiij=t.asm.Yh).apply(null,arguments)},Xp=t.dynCall_iiiiiiij=function(){return(Xp=t.dynCall_iiiiiiij=t.asm.Zh).apply(null,arguments)},ey=t.dynCall_iiiiiiiiiiiij=function(){return(ey=t.dynCall_iiiiiiiiiiiij=t.asm._h).apply(null,arguments)},ty=t.dynCall_iiiiiiiji=function(){return(ty=t.dynCall_iiiiiiiji=t.asm.$h).apply(null,arguments)},iy=t.dynCall_iiiidjj=function(){return(iy=t.dynCall_iiiidjj=t.asm.ai).apply(null,arguments)},ry=t.dynCall_iiiijjj=function(){return(ry=t.dynCall_iiiijjj=t.asm.bi).apply(null,arguments)},ny=t.dynCall_jiiiii=function(){return(ny=t.dynCall_jiiiii=t.asm.ci).apply(null,arguments)},sy=t.dynCall_jiiiiiijii=function(){return(sy=t.dynCall_jiiiiiijii=t.asm.di).apply(null,arguments)},oy=t.dynCall_iiiijji=function(){return(oy=t.dynCall_iiiijji=t.asm.ei).apply(null,arguments)},ay=t.dynCall_jiiiiii=function(){return(ay=t.dynCall_jiiiiii=t.asm.fi).apply(null,arguments)},uy=t.dynCall_iijiji=function(){return(uy=t.dynCall_iijiji=t.asm.gi).apply(null,arguments)},cy=t.dynCall_vjiiiji=function(){return(cy=t.dynCall_vjiiiji=t.asm.hi).apply(null,arguments)},ly=t.dynCall_viiijijiji=function(){return(ly=t.dynCall_viiijijiji=t.asm.ii).apply(null,arguments)},dy=t.dynCall_jiiijj=function(){return(dy=t.dynCall_jiiijj=t.asm.ji).apply(null,arguments)},fy=t.dynCall_viijiiii=function(){return(fy=t.dynCall_viijiiii=t.asm.ki).apply(null,arguments)},hy=t.dynCall_iiiijii=function(){return(hy=t.dynCall_iiiijii=t.asm.li).apply(null,arguments)},py=t.dynCall_viiiijii=function(){return(py=t.dynCall_viiiijii=t.asm.mi).apply(null,arguments)},yy=t.dynCall_iijiii=function(){return(yy=t.dynCall_iijiii=t.asm.ni).apply(null,arguments)},_y=t.dynCall_jiiiiji=function(){return(_y=t.dynCall_jiiiiji=t.asm.oi).apply(null,arguments)},my=t.dynCall_vijiijj=function(){return(my=t.dynCall_vijiijj=t.asm.pi).apply(null,arguments)},by=t.dynCall_vifiijj=function(){return(by=t.dynCall_vifiijj=t.asm.qi).apply(null,arguments)},gy=t.dynCall_vidiijj=function(){return(gy=t.dynCall_vidiijj=t.asm.ri).apply(null,arguments)},vy=t.dynCall_viiiiij=function(){return(vy=t.dynCall_viiiiij=t.asm.si).apply(null,arguments)},wy=t.dynCall_ijj=function(){return(wy=t.dynCall_ijj=t.asm.ti).apply(null,arguments)},jy=t.dynCall_ijjiii=function(){return(jy=t.dynCall_ijjiii=t.asm.ui).apply(null,arguments)},Iy=t.dynCall_vijijjji=function(){return(Iy=t.dynCall_vijijjji=t.asm.vi).apply(null,arguments)},Ty=t.dynCall_viiiiijjji=function(){return(Ty=t.dynCall_viiiiijjji=t.asm.wi).apply(null,arguments)},By=t.dynCall_viijijj=function(){return(By=t.dynCall_viijijj=t.asm.xi).apply(null,arguments)},Sy=t.dynCall_iiijiijj=function(){return(Sy=t.dynCall_iiijiijj=t.asm.yi).apply(null,arguments)},Ay=t.dynCall_viiijijjj=function(){return(Ay=t.dynCall_viiijijjj=t.asm.zi).apply(null,arguments)},Oy=t.dynCall_iijiijj=function(){return(Oy=t.dynCall_iijiijj=t.asm.Ai).apply(null,arguments)},Dy=t.dynCall_viiijjjji=function(){return(Dy=t.dynCall_viiijjjji=t.asm.Bi).apply(null,arguments)},Fy=t.dynCall_viiiijiii=function(){return(Fy=t.dynCall_viiiijiii=t.asm.Ci).apply(null,arguments)},Ey=t.dynCall_iijii=function(){return(Ey=t.dynCall_iijii=t.asm.Di).apply(null,arguments)},Ry=t.dynCall_vijjiiii=function(){return(Ry=t.dynCall_vijjiiii=t.asm.Ei).apply(null,arguments)},Cy=t.dynCall_vijijjiiiii=function(){return(Cy=t.dynCall_vijijjiiiii=t.asm.Fi).apply(null,arguments)},Uy=t.dynCall_vijjiiiii=function(){return(Uy=t.dynCall_vijjiiiii=t.asm.Gi).apply(null,arguments)},ky=t.dynCall_iiijjji=function(){return(ky=t.dynCall_iiijjji=t.asm.Hi).apply(null,arguments)},My=t.dynCall_iiiiijjj=function(){return(My=t.dynCall_iiiiijjj=t.asm.Ii).apply(null,arguments)},Py=t.dynCall_jijiiii=function(){return(Py=t.dynCall_jijiiii=t.asm.Ji).apply(null,arguments)},Vy=t.dynCall_iiijjjii=function(){return(Vy=t.dynCall_iiijjjii=t.asm.Ki).apply(null,arguments)},Ny=t.dynCall_iiiiijjji=function(){return(Ny=t.dynCall_iiiiijjji=t.asm.Li).apply(null,arguments)},Ly=t.dynCall_viijiji=function(){return(Ly=t.dynCall_viijiji=t.asm.Mi).apply(null,arguments)};function W0(o){var a=j();try{G.get(o)()}catch(u){if(I(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function z0(o,a,u){var l=j();try{G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function H0(o,a){var u=j();try{return G.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function Y0(o,a,u){var l=j();try{return G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function G0(o,a){var u=j();try{G.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function K0(o,a,u,l){var d=j();try{return G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function $0(o,a,u,l,d,f){var h=j();try{return G.get(o)(a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function J0(o,a,u,l,d){var f=j();try{G.get(o)(a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function Q0(o,a,u,l,d){var f=j();try{return G.get(o)(a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function Z0(o,a,u,l){var d=j();try{return G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function X0(o,a,u,l){var d=j();try{return G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function eI(o,a,u,l){var d=j();try{G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function tI(o,a,u,l){var d=j();try{G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function iI(o,a,u,l){var d=j();try{G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function rI(o,a,u){var l=j();try{return G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function nI(o,a,u){var l=j();try{return G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function sI(o,a,u,l,d,f,h){var p=j();try{G.get(o)(a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function oI(o,a,u,l,d,f,h,p,y){var m=j();try{return G.get(o)(a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function aI(o,a,u,l,d,f,h){var p=j();try{return G.get(o)(a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function uI(o,a,u,l,d,f,h,p){var y=j();try{return G.get(o)(a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function cI(o,a,u,l,d,f){var h=j();try{G.get(o)(a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function lI(o){var a=j();try{return G.get(o)()}catch(u){if(I(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function dI(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return G.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function fI(o,a,u,l,d,f,h,p){var y=j();try{G.get(o)(a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function hI(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{return G.get(o)(a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function pI(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{G.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function yI(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se){var me=j();try{G.get(o)(a,u,l,d,f,h,p,y,m,g,w,A,E,P,se)}catch(Be){if(I(me),Be!==Be+0&&Be!=="longjmp")throw Be;T(1,0)}}function _I(o,a,u,l,d){var f=j();try{return G.get(o)(a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function mI(o,a,u,l,d){var f=j();try{return G.get(o)(a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function bI(o,a,u,l,d,f){var h=j();try{G.get(o)(a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function gI(o,a,u){var l=j();try{G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function vI(o,a,u){var l=j();try{G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function wI(o,a){var u=j();try{return G.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function jI(o,a,u,l){var d=j();try{return G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function II(o,a,u,l,d,f,h,p,y){var m=j();try{G.get(o)(a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function TI(o,a,u,l,d,f){var h=j();try{return G.get(o)(a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function BI(o,a,u,l){var d=j();try{G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function SI(o,a,u,l){var d=j();try{G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function AI(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se){var me=j();try{return G.get(o)(a,u,l,d,f,h,p,y,m,g,w,A,E,P,se)}catch(Be){if(I(me),Be!==Be+0&&Be!=="longjmp")throw Be;T(1,0)}}function OI(o,a,u,l,d,f,h,p,y,m,g,w,A,E){var P=j();try{G.get(o)(a,u,l,d,f,h,p,y,m,g,w,A,E)}catch(se){if(I(P),se!==se+0&&se!=="longjmp")throw se;T(1,0)}}function DI(o,a,u,l,d,f,h,p,y,m){var g=j();try{G.get(o)(a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function FI(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se,me,Be,U,$,Ce){var ge=j();try{return G.get(o)(a,u,l,d,f,h,p,y,m,g,w,A,E,P,se,me,Be,U,$,Ce)}catch(yt){if(I(ge),yt!==yt+0&&yt!=="longjmp")throw yt;T(1,0)}}function EI(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se,me,Be,U,$){var Ce=j();try{return G.get(o)(a,u,l,d,f,h,p,y,m,g,w,A,E,P,se,me,Be,U,$)}catch(ge){if(I(Ce),ge!==ge+0&&ge!=="longjmp")throw ge;T(1,0)}}function RI(o,a,u){var l=j();try{return G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function CI(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{G.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function UI(o,a){var u=j();try{return G.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function kI(o,a,u){var l=j();try{return G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function MI(o,a,u){var l=j();try{return G.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function PI(o,a,u,l){var d=j();try{return G.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function VI(o,a,u,l,d,f,h,p,y,m){var g=j();try{G.get(o)(a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function NI(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{G.get(o)(a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function LI(o,a){var u=j();try{return G.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function xI(o,a){var u=j();try{return G.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function qI(o,a,u,l,d){var f=j();try{return Cf(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function WI(o,a,u,l,d,f,h){var p=j();try{Of(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function zI(o,a,u,l,d){var f=j();try{xf(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function HI(o,a,u,l,d,f,h){var p=j();try{return Uf(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function YI(o,a,u,l){var d=j();try{Af(o,a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function GI(o,a,u,l,d,f,h){var p=j();try{Wf(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function KI(o,a,u,l,d,f){var h=j();try{jf(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function $I(o,a,u,l,d,f,h,p,y,m){var g=j();try{If(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function JI(o,a,u,l,d){var f=j();try{return Tf(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function QI(o,a,u,l,d,f,h,p,y){var m=j();try{Bf(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function ZI(o,a,u,l){var d=j();try{return Sf(o,a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function XI(o,a){var u=j();try{return Df(o,a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function eT(o,a,u,l,d,f,h,p){var y=j();try{Ff(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function tT(o,a,u,l,d,f,h,p){var y=j();try{Ef(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function iT(o,a,u,l,d,f,h,p,y){var m=j();try{Ep(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function rT(o,a,u,l,d,f,h,p,y){var m=j();try{return kf(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function nT(o,a,u,l,d){var f=j();try{Nf(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function sT(o,a,u){var l=j();try{return Rf(o,a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function oT(o,a,u,l,d){var f=j();try{return wy(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function aT(o,a,u,l,d,f,h,p){var y=j();try{return jy(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function uT(o,a,u,l,d,f,h){var p=j();try{Mf(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function cT(o,a,u,l,d,f){var h=j();try{Pf(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function lT(o,a,u,l,d,f){var h=j();try{Vf(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function dT(o,a,u,l){var d=j();try{return Lf(o,a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function fT(o,a,u,l,d,f){var h=j();try{return zf(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function hT(o,a,u,l,d,f,h,p){var y=j();try{return Gh(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function pT(o,a,u,l,d,f,h,p){var y=j();try{_p(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function yT(o,a,u,l,d,f,h,p){var y=j();try{return zh(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function _T(o,a,u,l,d,f){var h=j();try{return Yf(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function mT(o,a,u,l,d,f){var h=j();try{return Bh(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function bT(o,a,u,l,d,f,h,p){var y=j();try{return Hh(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function gT(o,a,u,l,d,f,h,p){var y=j();try{Yh(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function vT(o){var a=j();try{return Jf(o)}catch(u){if(I(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function wT(o,a,u,l,d,f,h,p){var y=j();try{return Hf(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function jT(o,a,u,l,d,f,h){var p=j();try{return Gf(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function IT(o,a,u,l){var d=j();try{return Kf(o,a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function TT(o,a,u,l,d,f,h){var p=j();try{ah(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function BT(o,a,u,l,d,f,h,p){var y=j();try{fh(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function ST(o,a,u,l,d,f,h,p){var y=j();try{return hh(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function AT(o,a,u,l,d,f,h,p){var y=j();try{return rh(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function OT(o,a,u,l,d,f,h,p,y){var m=j();try{return nh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function DT(o,a,u,l,d,f,h,p){var y=j();try{sh(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function FT(o,a,u,l,d,f,h,p,y){var m=j();try{return oh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function ET(o,a,u,l,d,f,h,p,y){var m=j();try{return uh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function RT(o,a,u,l,d,f,h,p,y,m){var g=j();try{return ch(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function CT(o,a,u,l,d,f,h){var p=j();try{return dh(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function UT(o,a,u,l,d){var f=j();try{return lh(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function kT(o,a,u,l,d,f,h,p,y){var m=j();try{ih(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function MT(o,a,u,l,d,f,h,p){var y=j();try{th(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function PT(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return Zf(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function VT(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{Xf(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function NT(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{eh(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function LT(o,a,u,l,d,f,h){var p=j();try{jh(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function xT(o,a,u,l,d,f,h){var p=j();try{qh(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function qT(o,a,u,l,d,f,h,p,y){var m=j();try{Fh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function WT(o,a,u,l,d,f,h,p,y){var m=j();try{return _h(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function zT(o,a,u,l,d,f,h,p,y){var m=j();try{xh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function HT(o,a,u,l){var d=j();try{return $f(o,a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function YT(o,a,u,l,d,f){var h=j();try{return mh(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function GT(o,a,u,l,d,f,h,p,y){var m=j();try{wh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function KT(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{vh(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function $T(o,a,u,l,d,f){var h=j();try{return Ph(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function JT(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{gh(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function QT(o,a,u,l,d,f,h,p,y){var m=j();try{return Th(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function ZT(o,a,u,l,d,f,h){var p=j();try{ph(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function XT(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return yh(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function eB(o,a,u,l,d,f,h,p,y){var m=j();try{Ih(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function tB(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P){var se=j();try{return bh(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P)}catch(me){if(I(se),me!==me+0&&me!=="longjmp")throw me;T(1,0)}}function iB(o,a,u,l,d,f,h,p,y){var m=j();try{return Sh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function rB(o,a,u,l,d,f,h,p){var y=j();try{return Ah(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function nB(o,a,u,l,d,f,h,p){var y=j();try{Qf(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function sB(o,a,u,l,d,f){var h=j();try{Oh(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function oB(o,a,u,l,d,f,h,p,y){var m=j();try{Dh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function aB(o,a,u,l,d,f,h){var p=j();try{return Rh(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function uB(o,a,u,l,d,f,h,p,y,m){var g=j();try{Uh(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function cB(o,a,u,l,d,f,h,p,y,m){var g=j();try{kh(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function lB(o,a,u,l,d,f,h){var p=j();try{return Ch(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function dB(o,a,u,l,d,f,h,p,y,m){var g=j();try{Mh(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function fB(o,a,u,l,d,f,h,p,y){var m=j();try{return Eh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function hB(o,a,u,l,d,f,h,p,y){var m=j();try{return Wh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function pB(o,a,u,l,d,f,h,p,y){var m=j();try{Kh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function yB(o,a,u,l,d,f,h){var p=j();try{$h(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function _B(o,a,u,l,d,f,h){var p=j();try{return Jh(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function mB(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{tp(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function bB(o,a,u,l,d,f,h,p,y,m,g,w,A){var E=j();try{ip(o,a,u,l,d,f,h,p,y,m,g,w,A)}catch(P){if(I(E),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function gB(o,a,u,l,d,f,h,p,y,m){var g=j();try{rp(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function vB(o,a,u,l,d,f,h,p,y,m,g,w,A){var E=j();try{sp(o,a,u,l,d,f,h,p,y,m,g,w,A)}catch(P){if(I(E),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function wB(o,a,u,l,d,f,h,p,y,m){var g=j();try{return Qh(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function jB(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{return Zh(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function IB(o,a,u,l,d,f,h,p,y,m){var g=j();try{return Xh(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function TB(o,a,u,l,d,f,h,p,y,m){var g=j();try{return ep(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function BB(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{op(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function SB(o,a,u,l,d,f,h,p,y,m,g,w,A){var E=j();try{ap(o,a,u,l,d,f,h,p,y,m,g,w,A)}catch(P){if(I(E),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function AB(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se){var me=j();try{up(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se)}catch(Be){if(I(me),Be!==Be+0&&Be!=="longjmp")throw Be;T(1,0)}}function OB(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se,me,Be){var U=j();try{cp(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se,me,Be)}catch($){if(I(U),$!==$+0&&$!=="longjmp")throw $;T(1,0)}}function DB(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{np(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function FB(o,a,u,l,d,f){var h=j();try{return ny(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function EB(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return sy(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function RB(o,a,u,l,d,f,h,p,y){var m=j();try{return oy(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function CB(o,a,u,l,d,f,h,p){var y=j();try{return lp(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function UB(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{dp(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function kB(o,a,u,l,d,f,h,p,y){var m=j();try{return mp(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function MB(o,a,u,l,d,f,h){var p=j();try{return fp(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function PB(o,a,u,l,d,f,h){var p=j();try{return hp(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function VB(o,a,u,l,d,f,h){var p=j();try{return pp(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function NB(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return yp(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function LB(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P){var se=j();try{return bp(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P)}catch(me){if(I(se),me!==me+0&&me!=="longjmp")throw me;T(1,0)}}function xB(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{return gp(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function qB(o,a,u,l,d,f,h,p,y){var m=j();try{return vp(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function WB(o,a,u){var l=j();try{return wp(o,a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function zB(o,a){var u=j();try{return jp(o,a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function HB(o,a){var u=j();try{return Ip(o,a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function YB(o,a,u,l,d,f,h){var p=j();try{return ay(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function GB(o,a,u,l,d,f){var h=j();try{return Qp(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function KB(o,a,u,l,d,f,h,p,y){var m=j();try{return Ap(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function $B(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return Op(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function JB(o,a,u,l,d,f,h,p,y,m){var g=j();try{Lh(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function QB(o,a,u,l,d,f,h){var p=j();try{return Bp(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function ZB(o,a,u,l,d,f,h,p,y,m){var g=j();try{return Tp(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function XB(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se,me){var Be=j();try{Sp(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P,se,me)}catch(U){if(I(Be),U!==U+0&&U!=="longjmp")throw U;T(1,0)}}function eS(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{return Dp(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function tS(o,a,u,l,d,f,h,p,y){var m=j();try{Fp(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function iS(o,a,u,l,d,f,h,p,y,m){var g=j();try{return Zp(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function rS(o,a,u,l,d,f,h,p,y,m){var g=j();try{Rp(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function nS(o,a,u,l,d,f,h,p){var y=j();try{return Cp(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function sS(o,a,u,l,d,f,h,p,y,m,g,w,A){var E=j();try{return Up(o,a,u,l,d,f,h,p,y,m,g,w,A)}catch(P){if(I(E),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function oS(o,a,u,l,d,f,h,p){var y=j();try{return kp(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function aS(o,a,u,l,d,f,h,p,y){var m=j();try{return Xp(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function uS(o,a,u,l,d,f,h,p,y,m,g,w,A,E){var P=j();try{return ey(o,a,u,l,d,f,h,p,y,m,g,w,A,E)}catch(se){if(I(P),se!==se+0&&se!=="longjmp")throw se;T(1,0)}}function cS(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{qp(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function lS(o,a,u){var l=j();try{return Vp(o,a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function dS(o,a,u,l,d){var f=j();try{return Wp(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function fS(o,a,u,l,d,f,h){var p=j();try{xp(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function hS(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P){var se=j();try{Pp(o,a,u,l,d,f,h,p,y,m,g,w,A,E,P)}catch(me){if(I(se),me!==me+0&&me!=="longjmp")throw me;T(1,0)}}function pS(o,a,u,l,d){var f=j();try{return Np(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function yS(o,a,u,l,d){var f=j();try{Lp(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function _S(o,a,u,l,d,f,h,p,y,m){var g=j();try{return zp(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function mS(o,a,u,l,d,f,h,p,y,m){var g=j();try{return Hp(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function bS(o,a,u,l,d,f,h,p,y,m){var g=j();try{Yp(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function gS(o,a,u,l,d,f,h,p,y,m){var g=j();try{Gp(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function vS(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{Kp(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function wS(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{$p(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function jS(o,a,u,l,d){var f=j();try{return Jp(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function IS(o,a,u,l,d,f,h,p,y,m){var g=j();try{return ty(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function TS(o,a,u,l,d,f,h,p,y){var m=j();try{return iy(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function BS(o,a,u,l,d,f,h,p,y,m){var g=j();try{return ry(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function SS(o,a,u,l,d,f,h,p){var y=j();try{return uy(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function AS(o,a,u,l,d,f,h,p,y){var m=j();try{cy(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function OS(o,a,u,l,d){var f=j();try{return qf(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function DS(o,a,u,l,d,f,h,p,y,m,g,w,A){var E=j();try{ly(o,a,u,l,d,f,h,p,y,m,g,w,A)}catch(P){if(I(E),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function FS(o,a,u,l,d,f,h,p,y){var m=j();try{Vh(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function ES(o,a,u,l,d,f,h,p){var y=j();try{return dy(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function RS(o,a,u,l,d,f,h,p,y){var m=j();try{fy(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function CS(o,a,u,l,d,f,h,p){var y=j();try{return hy(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function US(o,a,u,l,d,f,h,p,y){var m=j();try{py(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function kS(o,a,u,l,d,f,h){var p=j();try{return yy(o,a,u,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function MS(o,a,u,l,d,f,h,p){var y=j();try{return _y(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function PS(o,a,u,l,d,f,h,p,y,m){var g=j();try{my(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function VS(o,a,u,l,d,f,h,p,y){var m=j();try{by(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function NS(o,a,u,l,d,f,h,p,y){var m=j();try{gy(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function LS(o,a,u,l,d,f,h,p){var y=j();try{vy(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function xS(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{Iy(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}function qS(o,a,u,l,d,f){var h=j();try{return Mp(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function WS(o,a,u,l,d,f,h,p,y,m){var g=j();try{By(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function zS(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return Sy(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function HS(o,a,u,l,d,f,h,p,y,m,g,w,A){var E=j();try{Ty(o,a,u,l,d,f,h,p,y,m,g,w,A)}catch(P){if(I(E),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function YS(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{Nh(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function GS(o,a,u,l,d,f,h,p,y,m,g,w,A){var E=j();try{Ay(o,a,u,l,d,f,h,p,y,m,g,w,A)}catch(P){if(I(E),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function KS(o,a,u,l,d,f,h,p,y,m){var g=j();try{return Oy(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function $S(o,a,u,l,d,f,h,p,y,m){var g=j();try{return ky(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function JS(o,a,u,l,d,f,h,p,y,m,g,w,A){var E=j();try{Dy(o,a,u,l,d,f,h,p,y,m,g,w,A)}catch(P){if(I(E),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function QS(o,a,u,l,d,f,h,p,y,m){var g=j();try{Fy(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function ZS(o,a,u,l,d,f){var h=j();try{return Ey(o,a,u,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function XS(o,a,u,l,d,f,h,p,y,m,g,w,A,E){var P=j();try{Cy(o,a,u,l,d,f,h,p,y,m,g,w,A,E)}catch(se){if(I(P),se!==se+0&&se!=="longjmp")throw se;T(1,0)}}function e1(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{Uy(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function t1(o,a,u,l,d,f,h,p,y,m){var g=j();try{Ry(o,a,u,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function i1(o,a,u,l,d,f,h,p,y){var m=j();try{Ly(o,a,u,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function r1(o,a,u,l,d,f,h,p){var y=j();try{return Py(o,a,u,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function n1(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return Vy(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function s1(o,a,u,l,d,f,h,p,y,m,g){var w=j();try{return My(o,a,u,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function o1(o,a,u,l,d,f,h,p,y,m,g,w){var A=j();try{return Ny(o,a,u,l,d,f,h,p,y,m,g,w)}catch(E){if(I(A),E!==E+0&&E!=="longjmp")throw E;T(1,0)}}t.ccall=mw;var po;function yo(o){this.name="ExitStatus",this.message="Program terminated with exit("+o+")",this.status=o}var a1=!1;ds=function o(){po||Ou(),po||(ds=o)};function u1(o){var a=t._main,u=0,l=0;try{var d=a(u,l);return c1(d,!0),d}catch(f){return zw(f)}finally{a1=!0}}function Ou(o){if(o=o||_,Or>0||(Ew(),Or>0))return;function a(){po||(po=!0,t.calledRun=!0,!W&&(Rw(),Cw(),r(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),xy&&u1(o),kw()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),a()},1)):a()}t.run=Ou;function c1(o,a){ro=o,vu()||Uw(),l1(o)}function l1(o){ro=o,vu()||(t.onExit&&t.onExit(o),W=!0),B(o,new yo(o))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var xy=!0;return t.noInitialRun&&(xy=!1),Ou(),e.ready}}(),ow=oU;var Xd=class{constructor(e,t){this._bindings=e,this._conn=t}close(){this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}query(e){let t=this._bindings.runQuery(this._conn,e),r=S.RecordBatchReader.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),S.Table.from(r)}send(e){let t=this._bindings.sendQuery(this._conn,e),r=new ef(this._bindings,this._conn,t),n=S.RecordBatchReader.from(r);return console.assert(n.isSync()),console.assert(n.isStream()),n}prepare(e){let t=this._bindings.createPrepared(this._conn,e);return new uw(this._bindings,this._conn,t)}insertArrowTable(e,t){let r=e.serialize("binary",!0);this.insertArrowFromIPCStream(r,t)}insertArrowFromIPCStream(e,t){this._bindings.insertArrowFromIPCStream(this._conn,e,t)}insertCSVFromPath(e,t){this._bindings.insertCSVFromPath(this._conn,e,t)}insertJSONFromPath(e,t){this._bindings.insertJSONFromPath(this._conn,e,t)}},ef=class{constructor(e,t,r){this.bindings=e;this.conn=t;this.header=r;this._first=!0,this._depleted=!1}next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e=this.bindings.fetchQueryResults(this.conn);return this._depleted=e.length==0,{done:this._depleted,value:e}}[Symbol.iterator](){return this}},uw=class{constructor(e,t,r){this.bindings=e,this.connectionId=t,this.statementId=r}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...e){let t=this.bindings.runPrepared(this.connectionId,this.statementId,e),r=S.RecordBatchReader.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),S.Table.from(r)}send(...e){let t=this.bindings.sendPrepared(this.connectionId,this.statementId,e),r=new ef(this.bindings,this.connectionId,t),n=S.RecordBatchReader.from(r);return console.assert(n.isSync()),console.assert(n.isStream()),n}};var Ie;(function(e){e[e.SUCCESS=0]="SUCCESS"})(Ie||(Ie={}));function aU(){let i=new TextDecoder;return e=>(typeof SharedArrayBuffer!="undefined"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),i.decode(e))}var uU=aU();function qi(i,e){i.ccall("duckdb_web_fail_with",null,["string"],[e])}function cs(i,e,t){let r=i.HEAPU8.subarray(e,e+t),n=new Uint8Array(new ArrayBuffer(r.byteLength));return n.set(r),n}function _e(i,e,t){return uU(i.HEAPU8.subarray(e,e+t))}var bt;(function(r){r[r.BUFFER=0]="BUFFER",r[r.NATIVE=1]="NATIVE",r[r.HTTP=3]="HTTP"})(bt||(bt={}));function Ae(i,e,t,r){let n=i.stackSave(),s=i.stackAlloc(3*8);t.unshift("number"),r.unshift(s),i.ccall(e,null,t,r);let c=i.HEAPF64[(s>>3)+0],_=i.HEAPF64[(s>>3)+1],v=i.HEAPF64[(s>>3)+2];return i.stackRestore(n),[c,_,v]}function Ye(i){i.ccall("duckdb_web_clear_response",null,[],[])}var tf=class{constructor(e){let t=new Float64Array(e.buffer,e.byteOffset,e.byteLength/8),r=new Uint8Array(new ArrayBuffer(e.byteLength));r.set(e.subarray(7*8)),this.totalFileReadsCold=t[0],this.totalFileReadsAhead=t[1],this.totalFileReadsCached=t[2],this.totalFileWrites=t[3],this.totalPageAccesses=t[4],this.totalPageLoads=t[5],this.blockSize=t[6],this.blockStats=r}getBlockStats(e,t){return t=t||{file_reads_cold:0,file_reads_ahead:0,file_reads_cached:0,file_writes:0,page_accesses:0,page_loads:0},t.file_writes=this.blockStats[e*3+0]&15,t.file_reads_cold=this.blockStats[e*3+0]>>4,t.file_reads_ahead=this.blockStats[e*3+1]&15,t.file_reads_cached=this.blockStats[e*3+1]>>4,t.page_accesses=this.blockStats[e*3+1]&15,t.page_loads=this.blockStats[e*3+1]>>4,t}};var cU=new TextEncoder,cw;(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"})(cw||(cw={}));var rf=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,r,n]=Ae(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==Ie.SUCCESS)throw new Error(_e(this.mod,r,n));Ye(this.mod)}reset(){let[e,t,r]=Ae(this.mod,"duckdb_web_reset",[],[]);if(e!==Ie.SUCCESS)throw new Error(_e(this.mod,t,r));Ye(this.mod)}getVersion(){let[e,t,r]=Ae(this.mod,"duckdb_web_get_version",[],[]);if(e!==Ie.SUCCESS)throw new Error(_e(this.mod,t,r));let n=_e(this.mod,t,r);return Ye(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,r,n]=Ae(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==Ie.SUCCESS)throw new Error(_e(this.mod,r,n));let s=_e(this.mod,r,n);return Ye(this.mod),JSON.parse(s)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new Xd(this,e)}disconnect(e){this.mod.ccall("duckdb_web_disconnect",null,["number"],[e])}runQuery(e,t){let[r,n,s]=Ae(this.mod,"duckdb_web_query_run",["number","string"],[e,t]);if(r!==Ie.SUCCESS)throw new Error(_e(this.mod,n,s));let c=cs(this.mod,n,s);return Ye(this.mod),c}sendQuery(e,t){let[r,n,s]=Ae(this.mod,"duckdb_web_query_send",["number","string"],[e,t]);if(r!==Ie.SUCCESS)throw new Error(_e(this.mod,n,s));let c=cs(this.mod,n,s);return Ye(this.mod),c}fetchQueryResults(e){let[t,r,n]=Ae(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==Ie.SUCCESS)throw new Error(_e(this.mod,r,n));let s=cs(this.mod,r,n);return Ye(this.mod),s}createPrepared(e,t){let[r,n,s]=Ae(this.mod,"duckdb_web_prepared_create",["number","string"],[e,t]);if(r!==Ie.SUCCESS)throw new Error(_e(this.mod,n,s));return Ye(this.mod),n}closePrepared(e,t){let[r,n,s]=Ae(this.mod,"duckdb_web_prepared_close",["number","number"],[e,t]);if(r!==Ie.SUCCESS)throw new Error(_e(this.mod,n,s));Ye(this.mod)}runPrepared(e,t,r){let[n,s,c]=Ae(this.mod,"duckdb_web_prepared_run",["number","number","string"],[e,t,JSON.stringify(r)]);if(n!==Ie.SUCCESS)throw new Error(_e(this.mod,s,c));let _=cs(this.mod,s,c);return Ye(this.mod),_}sendPrepared(e,t,r){let[n,s,c]=Ae(this.mod,"duckdb_web_prepared_send",["number","number","string"],[e,t,JSON.stringify(r)]);if(n!==Ie.SUCCESS)throw new Error(_e(this.mod,s,c));let _=cs(this.mod,s,c);return Ye(this.mod),_}insertArrowFromIPCStream(e,t,r){if(t.length==0)return;let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let c=r?JSON.stringify(r):"",[_,v,B]=Ae(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,c]);if(_!==Ie.SUCCESS)throw new Error(_e(this.mod,v,B))}insertCSVFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let B in r.columns)r.columnsFlat.push(us(B,r.columns[B]))}let n=Er({},r);n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[c,_,v]=Ae(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,s]);if(c!==Ie.SUCCESS)throw new Error(_e(this.mod,_,v))}insertJSONFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let B in r.columns)r.columnsFlat.push(us(B,r.columns[B]))}let n=Er({},r);n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[c,_,v]=Ae(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,s]);if(c!==Ie.SUCCESS)throw new Error(_e(this.mod,_,v))}globFiles(e){let[t,r,n]=Ae(this.mod,"duckdb_web_fs_glob_file_infos",["string"],[e]);if(t!==Ie.SUCCESS)throw new Error(_e(this.mod,r,n));let s=_e(this.mod,r,n);Ye(this.mod);let c=JSON.parse(s);return c==null?[]:c}registerFileURL(e,t){t===void 0&&(t=e);let[r,n,s]=Ae(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,t]);if(r!==Ie.SUCCESS)throw new Error(_e(this.mod,n,s));Ye(this.mod)}registerFileText(e,t){let r=cU.encode(t);this.registerFileBuffer(e,r)}registerFileBuffer(e,t){let r=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(r,r+t.length).set(t);let[s,c,_]=Ae(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,r,t.length]);if(s!==Ie.SUCCESS)throw new Error(_e(this.mod,c,_));Ye(this.mod)}registerFileHandle(e,t){let[r,n,s]=Ae(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,e]);if(r!==Ie.SUCCESS)throw new Error(_e(this.mod,n,s));if(Ye(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(){let[e,t,r]=Ae(this.mod,"duckdb_web_fs_drop_files",[],[]);if(e!==Ie.SUCCESS)throw new Error(_e(this.mod,t,r));Ye(this.mod)}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(e,t){let[r,n,s]=Ae(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(r!==Ie.SUCCESS)throw new Error(_e(this.mod,n,s));Ye(this.mod)}copyFileToBuffer(e){let[t,r,n]=Ae(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==Ie.SUCCESS)throw new Error(_e(this.mod,r,n));let s=this.mod.HEAPU8.subarray(r,r+n),c=new Uint8Array(s.length);return c.set(s),Ye(this.mod),c}collectFileStatistics(e,t){let[r,n,s]=Ae(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(r!==Ie.SUCCESS)throw new Error(_e(this.mod,n,s))}exportFileStatistics(e){let[t,r,n]=Ae(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==Ie.SUCCESS)throw new Error(_e(this.mod,r,n));return new tf(this.mod.HEAPU8.subarray(r,r+n))}};var nf=class extends rf{constructor(e,t,r,n){super(e,t);this.mainModuleURL=r,this.pthreadWorkerURL=n}locateFile(e,t){if(e.endsWith(".wasm"))return this.mainModuleURL;if(e.endsWith(".worker.js")){if(!this.pthreadWorkerURL)throw new Error("Missing DuckDB worker URL!");return this.pthreadWorkerURL}throw new Error(`WASM instantiation requested unexpected file: prefix=${t} path=${e}`)}instantiateWasm(e,t){return globalThis.DUCKDB_RUNTIME=this._runtime,WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(fetch(this.mainModuleURL),e).then(r=>{t(r.instance,r.module)}):fetch(this.mainModuleURL).then(r=>r.arrayBuffer()).then(r=>WebAssembly.instantiate(r,e).then(n=>{t(n.instance,n.module)})).catch(r=>{console.error("Failed to instantiate WASM:",r)}),[]}};var sf=class extends nf{constructor(e,t,r,n=null){super(e,t,r,n)}instantiateImpl(e){return ow(_o(Er({},e),{instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)}))}};var gt={fileInfoCache:new Map,getFileInfo(i,e){try{let t=gt.fileInfoCache.get(e);if(t)return t;let[r,n,s]=Ae(i,"duckdb_web_fs_get_file_info_by_id",["number"],[e]);if(r!==Ie.SUCCESS)return null;let c=_e(i,n,s);Ye(i);let _=JSON.parse(c);if(_==null)return null;let v=_o(Er({},_),{blob:null});return gt.fileInfoCache.set(e,v),v}catch(t){return null}},testPlatformFeature:(i,e)=>{switch(e){case 1:return typeof BigInt64Array!="undefined";default:return console.warn(`test for unknown feature: ${e}`),!1}},openFile:(i,e)=>{var t;try{gt.fileInfoCache.delete(e);let r=gt.getFileInfo(i,e);switch(r==null?void 0:r.dataProtocol){case bt.HTTP:{let n=null;try{let s=new XMLHttpRequest;s.open("HEAD",r.dataUrl,!1),s.setRequestHeader("Range","bytes=0-"),s.send(null);let c=s.getResponseHeader("Content-Length");if(s.status==206&&c!==null){let _=i._malloc(2*8);return i.HEAPF64[(_>>3)+0]=+c,i.HEAPF64[(_>>3)+1]=0,_}}catch(s){n=s,console.warn(`HEAD request with range header failed: ${s}`)}if(r.allowFullHttpReads){console.warn(`falling back to full HTTP read for: ${r.dataUrl}`);let s=new XMLHttpRequest;if(s.open("GET",r.dataUrl,!1),s.responseType="arraybuffer",s.send(null),s.status==200){let c=i._malloc(s.response.byteLength),_=new Uint8Array(s.response,0,s.response.byteLength);i.HEAPU8.set(_,c);let v=i._malloc(2*8);return i.HEAPF64[(v>>3)+0]=s.response.byteLength,i.HEAPF64[(v>>3)+1]=c,v}}if(n!=null)throw new Error(`Reading file ${r.fileName} failed with error: ${n}`);return 0}case bt.NATIVE:{let n=(t=gt._files)==null?void 0:t.get(r.fileName);if(n){let _=i._malloc(2*8);return i.HEAPF64[(_>>3)+0]=n.size,i.HEAPF64[(_>>3)+1]=0,_}console.warn(`Buffering missing file: ${r.fileName}`);let s=i._malloc(2*8),c=i._malloc(1);return i.HEAPF64[(s>>3)+0]=1,i.HEAPF64[(s>>3)+1]=c,s}}}catch(r){console.error(r.toString()),qi(i,r.toString())}return 0},glob:(i,e,t)=>{try{let r=_e(i,e,t);if(r.startsWith("http")){let n=new XMLHttpRequest;if(n.open("HEAD",r,!1),n.send(null),n.status!=200&&n.status!==206){qi(i,`HEAD request failed: ${r}`);return}i.ccall("duckdb_web_fs_glob_add_path",null,["string"],[r])}}catch(r){return qi(i,r.toString()),0}},checkFile:(i,e,t)=>{try{let r=_e(i,e,t);if(r.startsWith("http")){let n=new XMLHttpRequest;n.open("HEAD",r,!1),n.setRequestHeader("Range","bytes=0-"),n.send(null);let s=!1;if(n.status==206)s=!0;else if(n.status==200)s=n.getResponseHeader("Accept-Ranges")==="bytes";else return!1;return!!s}}catch(r){return!1}return!1},syncFile:(i,e)=>{},closeFile:(i,e)=>{let t=gt.getFileInfo(i,e);switch(gt.fileInfoCache.delete(e),t==null?void 0:t.dataProtocol){case bt.HTTP:break;case bt.NATIVE:return}},truncateFile:(i,e,t)=>{let r=gt.getFileInfo(i,e);switch(r==null?void 0:r.dataProtocol){case bt.HTTP:qi(i,"Cannot truncate a http file");return;case bt.NATIVE:qi(i,"truncateFile not implemented");return}return 0},readFile(i,e,t,r,n){var s;try{let c=gt.getFileInfo(i,e);switch(c==null?void 0:c.dataProtocol){case bt.HTTP:{if(!c.dataUrl)throw new Error(`Missing data URL for file ${e}`);try{let _=new XMLHttpRequest;if(_.open("GET",c.dataUrl,!1),_.responseType="arraybuffer",_.setRequestHeader("Range",`bytes=${n}-${n+r-1}`),_.send(null),_.status==206||_.status==200&&r==_.response.byteLength&&n==0){let v=new Uint8Array(_.response,0,Math.min(_.response.byteLength,r));return i.HEAPU8.set(v,t),v.byteLength}else throw _.status==200?new Error(`Range request for ${c.dataUrl} did not return a partial response: ${_.status} "${_.statusText}"`):new Error(`Range request for ${c.dataUrl} did returned non-success status: ${_.status} "${_.statusText}"`)}catch(_){throw new Error(`Range request for ${c.dataUrl} failed with error: ${_}"`)}}case bt.NATIVE:{let _=(s=gt._files)==null?void 0:s.get(c.fileName);if(!_)throw new Error(`No handle available for file: ${c.fileName}`);let v=_.slice(n,n+r),B=new Uint8Array(new FileReaderSync().readAsArrayBuffer(v));return i.HEAPU8.set(B,t),B.byteLength}}return 0}catch(c){return qi(i,c.toString()),0}},writeFile:(i,e,t,r,n)=>{let s=gt.getFileInfo(i,e);switch(s==null?void 0:s.dataProtocol){case bt.HTTP:return qi(i,"Cannot write to HTTP file"),0;case bt.NATIVE:return qi(i,"writefile not implemented"),0}return 0},getLastFileModificationTime:(i,e)=>{var r;let t=gt.getFileInfo(i,e);switch(t==null?void 0:t.dataProtocol){case bt.NATIVE:{if(!((r=gt._files)==null?void 0:r.get(t.fileName)))throw Error(`No handle available for file: ${t.fileName}`);return 0}case bt.HTTP:return new Date().getTime()}return 0},checkDirectory:(i,e,t)=>{let r=_e(i,e,t);return console.log(`checkDirectory: ${r}`),!1},createDirectory:(i,e,t)=>{let r=_e(i,e,t);console.log(`createDirectory: ${r}`)},removeDirectory:(i,e,t)=>{let r=_e(i,e,t);console.log(`removeDirectory: ${r}`)},listDirectoryEntries:(i,e,t)=>{let r=_e(i,e,t);return console.log(`listDirectoryEntries: ${r}`),!1},moveFile:(i,e,t,r,n)=>{},removeFile:(i,e,t)=>{}};var lw=class extends Qd{postMessage(e,t){globalThis.postMessage(e,t)}async instantiate(e,t){return await new sf(this,gt,e,t).instantiate()}};function dw(){let i=new lw;globalThis.onmessage=async e=>{await i.onMessage(e.data)}}dw();return lU;})();
19
19
  /*! *****************************************************************************
20
20
  Copyright (c) Microsoft Corporation.
21
21