@duckdb/duckdb-wasm 0.1.13-dev8.0 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -15
- package/dist/duckdb-browser-blocking.mjs +33 -0
- package/dist/duckdb-browser-blocking.mjs.map +7 -0
- package/dist/duckdb-browser-next-coi.pthread.worker.js +2 -3
- package/dist/duckdb-browser-next-coi.pthread.worker.js.map +3 -3
- package/dist/duckdb-browser-next-coi.worker.js +8 -8
- package/dist/duckdb-browser-next-coi.worker.js.map +3 -3
- package/dist/duckdb-browser-next.worker.js +8 -8
- package/dist/duckdb-browser-next.worker.js.map +3 -3
- package/dist/duckdb-browser.mjs +32 -0
- package/dist/duckdb-browser.mjs.map +7 -0
- package/dist/duckdb-browser.worker.js +8 -8
- package/dist/duckdb-browser.worker.js.map +3 -3
- package/dist/duckdb-next-coi.wasm +0 -0
- package/dist/duckdb-next.wasm +0 -0
- package/dist/duckdb-node-blocking.cjs +36 -3
- package/dist/duckdb-node-blocking.cjs.map +3 -3
- package/dist/duckdb-node-next.worker.cjs +36 -3
- package/dist/duckdb-node-next.worker.cjs.map +3 -3
- package/dist/duckdb-node.cjs +1 -1
- package/dist/duckdb-node.cjs.map +3 -3
- package/dist/duckdb-node.worker.cjs +35 -2
- package/dist/duckdb-node.worker.cjs.map +3 -3
- package/dist/duckdb.wasm +0 -0
- package/dist/tests-browser.js +89 -198
- package/dist/tests-browser.js.map +3 -3
- package/dist/tests-node.cjs +14734 -106
- package/dist/tests-node.cjs.map +3 -3
- package/dist/types/src/bindings/connection.d.ts +0 -6
- package/dist/types/src/parallel/async_connection.d.ts +0 -6
- package/dist/types/src/targets/duckdb-browser-blocking.d.ts +0 -1
- package/dist/types/src/targets/duckdb.d.ts +0 -1
- package/dist/types/src/utils/index.d.ts +0 -1
- package/package.json +33 -45
- package/dist/duckdb-browser-blocking.js +0 -33
- package/dist/duckdb-browser-blocking.js.map +0 -7
- package/dist/duckdb-browser.js +0 -32
- package/dist/duckdb-browser.js.map +0 -7
- package/dist/duckdb.d.ts +0 -1
- package/dist/duckdb.mjs +0 -2
- package/dist/duckdb.mjs.map +0 -7
- package/dist/types/src/utils/ipc_buffer.d.ts +0 -4
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
var duckdb=(()=>{var a1=Object.create;var po=Object.defineProperty;var u1=Object.getOwnPropertyDescriptor;var c1=Object.getOwnPropertyNames;var l1=Object.getPrototypeOf,d1=Object.prototype.hasOwnProperty;var xy=i=>po(i,"__esModule",{value:!0});var f1=(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),h1=(i,e)=>{xy(i);for(var t in e)po(i,t,{get:e[t],enumerable:!0})},p1=(i,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of c1(e))!d1.call(i,r)&&r!=="default"&&po(i,r,{get:()=>e[r],enumerable:!(t=u1(e,r))||t.enumerable});return i},Si=i=>p1(xy(po(i!=null?a1(l1(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);var dt=R((uU,mo)=>{var qy,Wy,zy,Hy,Yy,Gy,Ky,$y,Jy,yo,Ou,Qy,Zy,Xy,on,e_,t_,i_,r_,n_,s_,o_,a_,_o;(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 mo=="object"&&typeof mo.exports=="object"?i(t(e,t(mo.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,u){return r[s]=n?n(s,u):u}}})(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])};qy=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)},Wy=Object.assign||function(r){for(var n,s=1,u=arguments.length;s<u;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 u in r)Object.prototype.hasOwnProperty.call(r,u)&&n.indexOf(u)<0&&(s[u]=r[u]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _=0,u=Object.getOwnPropertySymbols(r);_<u.length;_++)n.indexOf(u[_])<0&&Object.prototype.propertyIsEnumerable.call(r,u[_])&&(s[u[_]]=r[u[_]]);return s},Hy=function(r,n,s,u){var _=arguments.length,v=_<3?n:u===null?u=Object.getOwnPropertyDescriptor(n,s):u,S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,n,s,u);else for(var O=r.length-1;O>=0;O--)(S=r[O])&&(v=(_<3?S(v):_>3?S(n,s,v):S(n,s))||v);return _>3&&v&&Object.defineProperty(n,s,v),v},Yy=function(r,n){return function(s,u){n(s,u,r)}},Gy=function(r,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,n)},Ky=function(r,n,s,u){function _(v){return v instanceof s?v:new s(function(S){S(v)})}return new(s||(s=Promise))(function(v,S){function O(J){try{q(u.next(J))}catch(ke){S(ke)}}function N(J){try{q(u.throw(J))}catch(ke){S(ke)}}function q(J){J.done?v(J.value):_(J.value).then(O,N)}q((u=u.apply(r,n||[])).next())})},$y=function(r,n){var s={label:0,sent:function(){if(v[0]&1)throw v[1];return v[1]},trys:[],ops:[]},u,_,v,S;return S={next:O(0),throw:O(1),return:O(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function O(q){return function(J){return N([q,J])}}function N(q){if(u)throw new TypeError("Generator is already executing.");for(;s;)try{if(u=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{u=v=0}if(q[0]&5)throw q[1];return{value:q[0]?q[1]:void 0,done:!0}}},Jy=function(r,n){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(n,s)&&_o(n,r,s)},_o=Object.create?function(r,n,s,u){u===void 0&&(u=s),Object.defineProperty(r,u,{enumerable:!0,get:function(){return n[s]}})}:function(r,n,s,u){u===void 0&&(u=s),r[u]=n[s]},yo=function(r){var n=typeof Symbol=="function"&&Symbol.iterator,s=n&&r[n],u=0;if(s)return s.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&u>=r.length&&(r=void 0),{value:r&&r[u++],done:!r}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},Ou=function(r,n){var s=typeof Symbol=="function"&&r[Symbol.iterator];if(!s)return r;var u=s.call(r),_,v=[],S;try{for(;(n===void 0||n-- >0)&&!(_=u.next()).done;)v.push(_.value)}catch(O){S={error:O}}finally{try{_&&!_.done&&(s=u.return)&&s.call(u)}finally{if(S)throw S.error}}return v},Qy=function(){for(var r=[],n=0;n<arguments.length;n++)r=r.concat(Ou(arguments[n]));return r},Zy=function(){for(var r=0,n=0,s=arguments.length;n<s;n++)r+=arguments[n].length;for(var u=Array(r),_=0,n=0;n<s;n++)for(var v=arguments[n],S=0,O=v.length;S<O;S++,_++)u[_]=v[S];return u},Xy=function(r,n,s){if(s||arguments.length===2)for(var u=0,_=n.length,v;u<_;u++)(v||!(u in n))&&(v||(v=Array.prototype.slice.call(n,0,u)),v[u]=n[u]);return r.concat(v||Array.prototype.slice.call(n))},on=function(r){return this instanceof on?(this.v=r,this):new on(r)},e_=function(r,n,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var u=s.apply(r,n||[]),_,v=[];return _={},S("next"),S("throw"),S("return"),_[Symbol.asyncIterator]=function(){return this},_;function S(Oe){u[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(u[Oe](Yt))}catch(pt){ke(v[0][3],pt)}}function N(Oe){Oe.value instanceof on?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])}},t_=function(r){var n,s;return n={},u("next"),u("throw",function(_){throw _}),u("return"),n[Symbol.iterator]=function(){return this},n;function u(_,v){n[_]=r[_]?function(S){return(s=!s)?{value:on(r[_](S)),done:_==="return"}:v?v(S):S}:v}},i_=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 yo=="function"?yo(r):r[Symbol.iterator](),s={},u("next"),u("throw"),u("return"),s[Symbol.asyncIterator]=function(){return this},s);function u(v){s[v]=r[v]&&function(S){return new Promise(function(O,N){S=r[v](S),_(O,N,S.done,S.value)})}}function _(v,S,O,N){Promise.resolve(N).then(function(q){v({value:q,done:O})},S)}},r_=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};n_=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)&&_o(n,r,s);return t(n,r),n},s_=function(r){return r&&r.__esModule?r:{default:r}},o_=function(r,n,s,u){if(s==="a"&&!u)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?r!==n||!u:!n.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?u:s==="a"?u.call(r):u?u.value:n.get(r)},a_=function(r,n,s,u,_){if(u==="m")throw new TypeError("Private method is not writable");if(u==="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 u==="a"?_.call(r,s):_?_.value=s:n.set(r,s),s},i("__extends",qy),i("__assign",Wy),i("__rest",zy),i("__decorate",Hy),i("__param",Yy),i("__metadata",Gy),i("__awaiter",Ky),i("__generator",$y),i("__exportStar",Jy),i("__createBinding",_o),i("__values",yo),i("__read",Ou),i("__spread",Qy),i("__spreadArrays",Zy),i("__spreadArray",Xy),i("__await",on),i("__asyncGenerator",e_),i("__asyncDelegator",t_),i("__asyncValues",i_),i("__makeTemplateObject",r_),i("__importStar",n_),i("__importDefault",s_),i("__classPrivateFieldGet",o_),i("__classPrivateFieldSet",a_)})});var Ai=R(u_=>{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,u=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(u+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,u=this.space,_=this.bb.bytes();t<e.length;t++)_[u++]=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,u=this.readUint8(i+n++);if(u<192)s=u;else{var _=this.readUint8(i+n++);if(u<224)s=(u&31)<<6|_&63;else{var v=this.readUint8(i+n++);if(u<240)s=(u&15)<<12|(_&63)<<6|v&63;else{var S=this.readUint8(i+n++);s=(u&7)<<18|(_&63)<<12|(v&63)<<6|S&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)};u_.flatbuffers=D});var Er=R(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.encodeUtf8=an.decodeUtf8=void 0;var y1=new TextDecoder("utf-8");an.decodeUtf8=i=>y1.decode(i);var _1=new TextEncoder;an.encodeUtf8=i=>_1.encode(i)});var un=R(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.AsyncQueue=vt.ReadableInterop=vt.ArrowJSON=vt.ITERATOR_DONE=void 0;var hs=dt(),c_=ps();vt.ITERATOR_DONE=Object.freeze({done:!0,value:void 0});var l_=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=l_;var Du=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=Du;var d_=class extends Du{constructor(){super();this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return hs.__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 c_.default.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return c_.default.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return hs.__awaiter(this,void 0,void 0,function*(){return yield this.abort(e),vt.ITERATOR_DONE})}return(e){return hs.__awaiter(this,void 0,void 0,function*(){return yield this.close(),vt.ITERATOR_DONE})}read(e){return hs.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return hs.__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=d_});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 bo=un(),[m1,b1]=(()=>{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=m1;z.BigIntAvailable=b1;var[g1,v1]=(()=>{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=g1;z.BigInt64ArrayAvailable=v1;var[w1,j1]=(()=>{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=w1;z.BigUint64ArrayAvailable=j1;var Fu=i=>typeof i=="number",f_=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)&&Fu(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)&&Fu(i.fd);z.isFSReadStream=i=>z.isReadableNodeStream(i)&&Fu(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 bo.ReadableInterop);z.isReadableDOMStream=i=>z.isObject(i)&&at(i.cancel)&&at(i.getReader)&&!(i instanceof bo.ReadableInterop);z.isWritableNodeStream=i=>z.isObject(i)&&at(i.end)&&at(i.write)&&f_(i.writable)&&!(i instanceof bo.ReadableInterop);z.isReadableNodeStream=i=>z.isObject(i)&&at(i.read)&&at(i.pipe)&&f_(i.readable)&&!(i instanceof bo.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(),I1=Ai(),T1=Er(),B1=I1.flatbuffers.ByteBuffer,Rr=ft(),Eu=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:ArrayBuffer;function S1(i){let e=i[0]?[i[0]]:[],t,r,n,s;for(let u,_,v=0,S=0,O=i.length;++v<O;){if(u=e[S],_=i[v],!u||!_||u.buffer!==_.buffer||_.byteOffset<u.byteOffset){_&&(e[++S]=_);continue}if({byteOffset:t,byteLength:n}=u,{byteOffset:r,byteLength:s}=_,t+n<r||r+s<t){_&&(e[++S]=_);continue}e[S]=new Uint8Array(u.buffer,t,r-t+s)}return e}function Ru(i,e,t=0,r=e.byteLength){let n=i.byteLength,s=new Uint8Array(i.buffer,i.byteOffset,n),u=new Uint8Array(e.buffer,e.byteOffset,Math.min(r,n));return s.set(u,t),i}L.memcpy=Ru;function A1(i,e){let t=S1(i),r=t.reduce((O,N)=>O+N.byteLength,0),n,s,u,_=0,v=-1,S=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,S-_)),S<=_+s.length){s.length<n.length?t[v]=n.subarray(s.length):s.length===n.length&&v++,u?Ru(u,s,_):u=s;break}Ru(u||(u=new Uint8Array(S)),s,_),_+=s.length}return[u||new Uint8Array(0),t.slice(v),r-(u?u.byteLength:0)]}L.joinUint8Arrays=A1;function _t(i,e){let t=Rr.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=T1.encodeUtf8(t)),t instanceof ArrayBuffer?new i(t):t instanceof Eu?new i(t):t instanceof B1?_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(Rr.BigInt64Array,i);L.toUint8Array=i=>_t(Uint8Array,i);L.toUint16Array=i=>_t(Uint16Array,i);L.toUint32Array=i=>_t(Uint32Array,i);L.toBigUint64Array=i=>_t(Rr.BigUint64Array,i);L.toFloat32Array=i=>_t(Float32Array,i);L.toFloat64Array=i=>_t(Float64Array,i);L.toUint8ClampedArray=i=>_t(Uint8ClampedArray,i);var Cu=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 Eu?t(e):Rr.isIterable(e)?e:t(e);return yield*Cu(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(Rr.isPromise(e))return yield Ge.__await(yield Ge.__await(yield*Ge.__asyncDelegator(Ge.__asyncValues(Gt(i,yield Ge.__await(e))))));let r=function(u){return Ge.__asyncGenerator(this,arguments,function*(){yield yield Ge.__await(yield Ge.__await(u))})},n=function(u){return Ge.__asyncGenerator(this,arguments,function*(){yield Ge.__await(yield*Ge.__asyncDelegator(Ge.__asyncValues(Cu(function*(_){let v=null;do v=_.next(yield v==null?void 0:v.value);while(!v.done)}(u[Symbol.iterator]())))))})},s=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Eu?r(e):Rr.isIterable(e)?n(e):Rr.isAsyncIterable(e)?e:r(e);return yield Ge.__await(yield*Ge.__asyncDelegator(Ge.__asyncValues(Cu(function(u){return Ge.__asyncGenerator(this,arguments,function*(){let _=null;do _=yield Ge.__await(u.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 O1(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=O1;function D1(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=D1});var ps=R(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});var je=dt(),mt=Ze();ku.default={fromIterable(i){return go(F1(i))},fromAsyncIterable(i){return go(E1(i))},fromDOMStream(i){return go(R1(i))},fromNodeStream(i){return go(C1(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 go=i=>(i.next(),i);function*F1(i){let e,t=!1,r=[],n,s,u,_=0;function v(){return s==="peek"?mt.joinUint8Arrays(r,u)[0]:([n,r,_]=mt.joinUint8Arrays(r,u),n)}({cmd:s,size:u}=yield null);let S=mt.toUint8ArrayIterator(i)[Symbol.iterator]();try{do if({done:e,value:n}=isNaN(u-_)?S.next(void 0):S.next(u-_),!e&&n.byteLength>0&&(r.push(n),_+=n.byteLength),e||u<=_)do({cmd:s,size:u}=yield v());while(u<_);while(!e)}catch(O){(t=!0)&&typeof S.throw=="function"&&S.throw(O)}finally{t===!1&&typeof S.return=="function"&&S.return(null)}return null}function E1(i){return je.__asyncGenerator(this,arguments,function*(){let t,r=!1,n=[],s,u,_,v=0;function S(){return u==="peek"?mt.joinUint8Arrays(n,_)[0]:([s,n,v]=mt.joinUint8Arrays(n,_),s)}({cmd:u,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:u,size:_}=yield yield je.__await(S()));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 R1(i){return je.__asyncGenerator(this,arguments,function*(){let t=!1,r=!1,n=[],s,u,_,v=0;function S(){return u==="peek"?mt.joinUint8Arrays(n,_)[0]:([s,n,v]=mt.joinUint8Arrays(n,_),s)}({cmd:u,size:_}=yield yield je.__await(null));let O=new h_(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:u,size:_}=yield yield je.__await(S()));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 h_=class{constructor(e){this.source=e,this.byobReader=null,this.defaultReader=null;try{this.supportsBYOB=!!(this.reader=this.getBYOBReader())}catch{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 p_(this.getBYOBReader(),new ArrayBuffer(e),0,e)})}};function p_(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 p_(i,s.buffer,t,r):{done:n,value:new Uint8Array(s.buffer,0,t)}})}var Uu=(i,e)=>{let t=n=>r([e,n]),r;return[e,t,new Promise(n=>(r=n)&&i.once(e,t))]};function C1(i){return je.__asyncGenerator(this,arguments,function*(){let t=[],r="error",n=!1,s=null,u,_,v=0,S=[],O;function N(){return u==="peek"?mt.joinUint8Arrays(S,_)[0]:([O,S,v]=mt.joinUint8Arrays(S,_),O)}if({cmd:u,size:_}=yield yield je.__await(null),i.isTTY)return yield yield je.__await(new Uint8Array(0)),yield je.__await(null);try{t[0]=Uu(i,"end"),t[1]=Uu(i,"error");do{if(t[2]=Uu(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&&(S.push(O),v+=O.byteLength)),n||_<=v)do({cmd:u,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=S=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(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.Vector=cn.AbstractVector=void 0;var vo=class{};cn.AbstractVector=vo;cn.Vector=vo;vo.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(),U1;(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"})(U1=V.MetadataVersion||(V.MetadataVersion={}));var k1;(function(i){i[i.UNUSED=0]="UNUSED",i[i.DICTIONARY_REPLACEMENT=1]="DICTIONARY_REPLACEMENT",i[i.COMPRESSED_BODY=2]="COMPRESSED_BODY"})(k1=V.Feature||(V.Feature={}));var Mu;(function(i){i[i.Sparse=0]="Sparse",i[i.Dense=1]="Dense"})(Mu=V.UnionMode||(V.UnionMode={}));var Pu;(function(i){i[i.HALF=0]="HALF",i[i.SINGLE=1]="SINGLE",i[i.DOUBLE=2]="DOUBLE"})(Pu=V.Precision||(V.Precision={}));var Vu;(function(i){i[i.DAY=0]="DAY",i[i.MILLISECOND=1]="MILLISECOND"})(Vu=V.DateUnit||(V.DateUnit={}));var Cr;(function(i){i[i.SECOND=0]="SECOND",i[i.MILLISECOND=1]="MILLISECOND",i[i.MICROSECOND=2]="MICROSECOND",i[i.NANOSECOND=3]="NANOSECOND"})(Cr=V.TimeUnit||(V.TimeUnit={}));var Nu;(function(i){i[i.YEAR_MONTH=0]="YEAR_MONTH",i[i.DAY_TIME=1]="DAY_TIME"})(Nu=V.IntervalUnit||(V.IntervalUnit={}));var Lu;(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"})(Lu=V.Type||(V.Type={}));var xu;(function(i){i[i.DenseArray=0]="DenseArray"})(xu=V.DictionaryKind||(V.DictionaryKind={}));var qu;(function(i){i[i.Little=0]="Little",i[i.Big=1]="Big"})(qu=V.Endianness||(V.Endianness={}));var Ur=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 Ur).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ur).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return Ur.startNull(e),Ur.endNull(e)}};V.Null=Ur;var kr=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 kr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new kr).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return kr.startStruct_(e),kr.endStruct_(e)}};V.Struct_=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 getRootAsList(e,t){return(t||new Mr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Mr).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return Mr.startList(e),Mr.endList(e)}};V.List=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 getRootAsLargeList(e,t){return(t||new Pr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeList(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Pr).__init(e.readInt32(e.position())+e.position(),e)}static startLargeList(e){e.startObject(0)}static endLargeList(e){return e.endObject()}static createLargeList(e){return Pr.startLargeList(e),Pr.endLargeList(e)}};V.LargeList=Pr;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):Mu.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,Mu.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):Pu.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,Pu.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 Vr=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 Vr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Vr).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return Vr.startUtf8(e),Vr.endUtf8(e)}};V.Utf8=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 getRootAsBinary(e,t){return(t||new Nr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Nr).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return Nr.startBinary(e),Nr.endBinary(e)}};V.Binary=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 getRootAsLargeUtf8(e,t){return(t||new Lr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Lr).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return Lr.startLargeUtf8(e),Lr.endLargeUtf8(e)}};V.LargeUtf8=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 getRootAsLargeBinary(e,t){return(t||new xr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new xr).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return xr.startLargeBinary(e),xr.endLargeBinary(e)}};V.LargeBinary=xr;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 qr=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 qr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new qr).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return qr.startBool(e),qr.endBool(e)}};V.Bool=qr;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):Vu.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Vu.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):Cr.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,Cr.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):Cr.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,Cr.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):Nu.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Nu.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):Cr.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Cr.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):xu.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,xu.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):Lu.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,Lu.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,u,_,v){return ht.startField(e),ht.addName(e,t),ht.addNullable(e,r),ht.addTypeType(e,n),ht.addType(e,s),ht.addDictionary(e,u),ht.addChildren(e,_),ht.addCustomMetadata(e,v),ht.endField(e)}};V.Field=ht;var y_=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=y_;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):qu.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,qu.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 Io=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 wo=Ai(),jo=Qi(),Wu;(function(i){i[i.LZ4_FRAME=0]="LZ4_FRAME",i[i.ZSTD=1]="ZSTD"})(Wu=We.CompressionType||(We.CompressionType={}));var zu;(function(i){i[i.BUFFER=0]="BUFFER"})(zu=We.BodyCompressionMethod||(We.BodyCompressionMethod={}));var Hu;(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"})(Hu=We.MessageHeader||(We.MessageHeader={}));var Yu=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=Yu;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()+wo.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):Wu.LZ4_FRAME}method(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):zu.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,Wu.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,zu.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()+wo.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 Yu).__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 jo.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()+wo.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()+wo.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):jo.MetadataVersion.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):Hu.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 jo.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,jo.MetadataVersion.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,Hu.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,u){return Ot.startMessage(e),Ot.addVersion(e,t),Ot.addHeaderType(e,r),Ot.addHeader(e,n),Ot.addBodyLength(e,s),Ot.addCustomMetadata(e,u),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 ln=Qi();Object.defineProperty(Me,"DateUnit",{enumerable:!0,get:function(){return ln.DateUnit}});Object.defineProperty(Me,"TimeUnit",{enumerable:!0,get:function(){return ln.TimeUnit}});Object.defineProperty(Me,"Precision",{enumerable:!0,get:function(){return ln.Precision}});Object.defineProperty(Me,"UnionMode",{enumerable:!0,get:function(){return ln.UnionMode}});Object.defineProperty(Me,"IntervalUnit",{enumerable:!0,get:function(){return ln.IntervalUnit}});Object.defineProperty(Me,"MetadataVersion",{enumerable:!0,get:function(){return ln.MetadataVersion}});var M1=Io();Object.defineProperty(Me,"MessageHeader",{enumerable:!0,get:function(){return M1.MessageHeader}});var P1;(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"})(P1=Me.Type||(Me.Type={}));var V1;(function(i){i[i.OFFSET=0]="OFFSET",i[i.DATA=1]="DATA",i[i.VALIDITY=2]="VALIDITY",i[i.TYPE=3]="TYPE"})(V1=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 __(i,e,t,r){return(t&1<<r)!=0}Ke.getBool=__;function m_(i,e,t,r){return(t&1<<r)>>r}Ke.getBit=m_;function N1(i,e,t){return t?!!(i[e>>3]|=1<<e%8)||!0:!(i[e>>3]&=~(1<<e%8))&&!1}Ke.setBool=N1;function L1(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):b_(new To(t,i,e,null,__)).subarray(0,r)),n}return t}Ke.truncateBitmap=L1;function b_(i){let e=[],t=0,r=0,n=0;for(let u of i)u&&(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=b_;var To=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=To;function Gu(i,e,t){if(t-e<=0)return 0;if(t-e<8){let s=0;for(let u of new To(i,e,t-e,i,m_))s+=u;return s}let r=t>>3<<3,n=e+(e%8==0?0:8-e%8);return Gu(i,e,n)+Gu(i,r,t)+g_(i,n>>3,r-n>>3)}Ke.popcnt_bit_range=Gu;function g_(i,e,t){let r=0,n=e|0,s=new DataView(i.buffer,i.byteOffset,i.byteLength),u=t===void 0?i.byteLength:n+t;for(;u-n>=4;)r+=Bo(s.getUint32(n)),n+=4;for(;u-n>=2;)r+=Bo(s.getUint16(n)),n+=2;for(;u-n>=1;)r+=Bo(s.getUint8(n)),n+=1;return r}Ke.popcnt_array=g_;function Bo(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=Bo});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 So=class extends Pe{toString(){return"Null"}get typeId(){return x.Type.Null}};k.Null=So;So[Symbol.toStringTag]=(i=>i[Symbol.toStringTag]="Null")(So.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 Ku=class extends Dt{constructor(){super(!0,8)}};k.Int8=Ku;var $u=class extends Dt{constructor(){super(!0,16)}};k.Int16=$u;var Ju=class extends Dt{constructor(){super(!0,32)}};k.Int32=Ju;var Qu=class extends Dt{constructor(){super(!0,64)}};k.Int64=Qu;var Zu=class extends Dt{constructor(){super(!1,8)}};k.Uint8=Zu;var Xu=class extends Dt{constructor(){super(!1,16)}};k.Uint16=Xu;var ec=class extends Dt{constructor(){super(!1,32)}};k.Uint32=ec;var tc=class extends Dt{constructor(){super(!1,64)}};k.Uint64=tc;Object.defineProperty(Ku.prototype,"ArrayType",{value:Int8Array});Object.defineProperty($u.prototype,"ArrayType",{value:Int16Array});Object.defineProperty(Ju.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(Qu.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(Zu.prototype,"ArrayType",{value:Uint8Array});Object.defineProperty(Xu.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(ec.prototype,"ArrayType",{value:Uint32Array});Object.defineProperty(tc.prototype,"ArrayType",{value:Uint32Array});var Wr=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=Wr;Wr[Symbol.toStringTag]=(i=>(i.precision=null,i[Symbol.toStringTag]="Float"))(Wr.prototype);var ic=class extends Wr{constructor(){super(x.Precision.HALF)}};k.Float16=ic;var rc=class extends Wr{constructor(){super(x.Precision.SINGLE)}};k.Float32=rc;var nc=class extends Wr{constructor(){super(x.Precision.DOUBLE)}};k.Float64=nc;Object.defineProperty(ic.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(rc.prototype,"ArrayType",{value:Float32Array});Object.defineProperty(nc.prototype,"ArrayType",{value:Float64Array});var Ao=class extends Pe{constructor(){super()}get typeId(){return x.Type.Binary}toString(){return"Binary"}};k.Binary=Ao;Ao[Symbol.toStringTag]=(i=>(i.ArrayType=Uint8Array,i[Symbol.toStringTag]="Binary"))(Ao.prototype);var Oo=class extends Pe{constructor(){super()}get typeId(){return x.Type.Utf8}toString(){return"Utf8"}};k.Utf8=Oo;Oo[Symbol.toStringTag]=(i=>(i.ArrayType=Uint8Array,i[Symbol.toStringTag]="Utf8"))(Oo.prototype);var Do=class extends Pe{constructor(){super()}get typeId(){return x.Type.Bool}toString(){return"Bool"}};k.Bool=Do;Do[Symbol.toStringTag]=(i=>(i.ArrayType=Uint8Array,i[Symbol.toStringTag]="Bool"))(Do.prototype);var Fo=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=Fo;Fo[Symbol.toStringTag]=(i=>(i.scale=null,i.precision=null,i.ArrayType=Uint32Array,i[Symbol.toStringTag]="Decimal"))(Fo.prototype);var dn=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_=dn;dn[Symbol.toStringTag]=(i=>(i.unit=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Date"))(dn.prototype);var v_=class extends dn{constructor(){super(x.DateUnit.DAY)}};k.DateDay=v_;var w_=class extends dn{constructor(){super(x.DateUnit.MILLISECOND)}};k.DateMillisecond=w_;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 j_=class extends Zi{constructor(){super(x.TimeUnit.SECOND,32)}};k.TimeSecond=j_;var I_=class extends Zi{constructor(){super(x.TimeUnit.MILLISECOND,32)}};k.TimeMillisecond=I_;var T_=class extends Zi{constructor(){super(x.TimeUnit.MICROSECOND,64)}};k.TimeMicrosecond=T_;var B_=class extends Zi{constructor(){super(x.TimeUnit.NANOSECOND,64)}};k.TimeNanosecond=B_;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 S_=class extends Xi{constructor(e){super(x.TimeUnit.SECOND,e)}};k.TimestampSecond=S_;var A_=class extends Xi{constructor(e){super(x.TimeUnit.MILLISECOND,e)}};k.TimestampMillisecond=A_;var O_=class extends Xi{constructor(e){super(x.TimeUnit.MICROSECOND,e)}};k.TimestampMicrosecond=O_;var D_=class extends Xi{constructor(e){super(x.TimeUnit.NANOSECOND,e)}};k.TimestampNanosecond=D_;var fn=class extends Pe{constructor(e){super();this.unit=e}get typeId(){return x.Type.Interval}toString(){return`Interval<${x.IntervalUnit[this.unit]}>`}};k.Interval=fn;fn[Symbol.toStringTag]=(i=>(i.unit=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Interval"))(fn.prototype);var F_=class extends fn{constructor(){super(x.IntervalUnit.DAY_TIME)}};k.IntervalDayTime=F_;var E_=class extends fn{constructor(){super(x.IntervalUnit.YEAR_MONTH)}};k.IntervalYearMonth=E_;var Eo=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=Eo;Eo[Symbol.toStringTag]=(i=>(i.children=null,i[Symbol.toStringTag]="List"))(Eo.prototype);var Ro=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=Ro;Ro[Symbol.toStringTag]=(i=>(i.children=null,i[Symbol.toStringTag]="Struct"))(Ro.prototype);var hn=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,u)=>(n[s]=u)&&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=hn;hn[Symbol.toStringTag]=(i=>(i.mode=null,i.typeIds=null,i.children=null,i.typeIdToChildIndex=null,i.ArrayType=Int8Array,i[Symbol.toStringTag]="Union"))(hn.prototype);var R_=class extends hn{constructor(e,t){super(x.UnionMode.Dense,e,t)}};k.DenseUnion=R_;var C_=class extends hn{constructor(e,t){super(x.UnionMode.Sparse,e,t)}};k.SparseUnion=C_;var Co=class extends Pe{constructor(e){super();this.byteWidth=e}get typeId(){return x.Type.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};k.FixedSizeBinary=Co;Co[Symbol.toStringTag]=(i=>(i.byteWidth=null,i.ArrayType=Uint8Array,i[Symbol.toStringTag]="FixedSizeBinary"))(Co.prototype);var Uo=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=Uo;Uo[Symbol.toStringTag]=(i=>(i.children=null,i.listSize=null,i[Symbol.toStringTag]="FixedSizeList"))(Uo.prototype);var ko=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_=ko;ko[Symbol.toStringTag]=(i=>(i.children=null,i.keysSorted=null,i[Symbol.toStringTag]="Map_"))(ko.prototype);var x1=(i=>()=>++i)(-1),Mo=class extends Pe{constructor(e,t,r,n){super();this.indices=t,this.dictionary=e,this.isOrdered=n||!1,this.id=r==null?x1():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=Mo;Mo[Symbol.toStringTag]=(i=>(i.id=null,i.indices=null,i.isOrdered=null,i.dictionary=null,i[Symbol.toStringTag]="Dictionary"))(Mo.prototype);function q1(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=q1});var Jt=R(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.Data=zr.kUnknownNullCount=void 0;var W1=ci(),z1=ci(),H=Se(),H1=ve(),pe=Ze();zr.kUnknownNullCount=-1;var re=class{constructor(e,t,r,n,s,u,_){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=(u||[]).map(S=>S instanceof re?S:S.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=H1.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((u,_)=>u+_.byteLength,e)}get nullCount(){let e=this._nullCount,t;return e<=zr.kUnknownNullCount&&(t=this.nullBitmap)&&(this._nullCount=e=this.length-z1.popcnt_bit_range(t,this.offset,this.offset+this.length)),e}clone(e,t=this.offset,r=this.length,n=this._nullCount,s=this,u=this.childData){return new re(e,t,r,n,s,u,this.dictionary)}slice(e,t){let{stride:r,typeId:n,childData:s}=this,u=+(this._nullCount===0)-1,_=n===16?r:1,v=this._sliceBuffers(e,t,r,n);return this.clone(this.type,this.offset+e,t,u,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(W1.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:u}=this;return(s=u[H.BufferType.TYPE])&&(u[H.BufferType.TYPE]=s.subarray(e,e+t)),(s=u[H.BufferType.OFFSET])&&(u[H.BufferType.OFFSET]=s.subarray(e,e+t+1))||(s=u[H.BufferType.DATA])&&(u[H.BufferType.DATA]=n===6?s:s.subarray(r*e,r*(e+t))),u}_sliceChildren(e,t,r){return e.map(n=>n.slice(t,r))}static new(e,t,r,n,s,u,_){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]||[],(u||[])[0]);case H.Type.FixedSizeList:return re.FixedSizeList(e,t,r,n||0,s[H.BufferType.VALIDITY],(u||[])[0]);case H.Type.Struct:return re.Struct(e,t,r,n||0,s[H.BufferType.VALIDITY],u||[]);case H.Type.Map:return re.Map(e,t,r,n||0,s[H.BufferType.VALIDITY],s[H.BufferType.OFFSET]||[],(u||[])[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]||u,u)}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,u){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,u),pe.toUint8Array(s)])}static Dictionary(e,t,r,n,s,u,_){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.indices.ArrayType,u),pe.toUint8Array(s)],[],_)}static Float(e,t,r,n,s,u){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,u),pe.toUint8Array(s)])}static Bool(e,t,r,n,s,u){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,u),pe.toUint8Array(s)])}static Decimal(e,t,r,n,s,u){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,u),pe.toUint8Array(s)])}static Date(e,t,r,n,s,u){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,u),pe.toUint8Array(s)])}static Time(e,t,r,n,s,u){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,u),pe.toUint8Array(s)])}static Timestamp(e,t,r,n,s,u){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,u),pe.toUint8Array(s)])}static Interval(e,t,r,n,s,u){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,u),pe.toUint8Array(s)])}static FixedSizeBinary(e,t,r,n,s,u){return new re(e,t,r,n,[void 0,pe.toArrayBufferView(e.ArrayType,u),pe.toUint8Array(s)])}static Binary(e,t,r,n,s,u,_){return new re(e,t,r,n,[pe.toInt32Array(u),pe.toUint8Array(_),pe.toUint8Array(s)])}static Utf8(e,t,r,n,s,u,_){return new re(e,t,r,n,[pe.toInt32Array(u),pe.toUint8Array(_),pe.toUint8Array(s)])}static List(e,t,r,n,s,u,_){return new re(e,t,r,n,[pe.toInt32Array(u),void 0,pe.toUint8Array(s)],_?[_]:[])}static FixedSizeList(e,t,r,n,s,u){return new re(e,t,r,n,[void 0,void 0,pe.toUint8Array(s)],u?[u]:[])}static Struct(e,t,r,n,s,u){return new re(e,t,r,n,[void 0,void 0,pe.toUint8Array(s)],u)}static Map(e,t,r,n,s,u,_){return new re(e,t,r,n,[pe.toInt32Array(u),void 0,pe.toUint8Array(s)],_?[_]:[])}static Union(e,t,r,n,s,u,_,v){let S=[void 0,void 0,pe.toUint8Array(s),pe.toArrayBufferView(e.ArrayType,u)];return e.mode===H.UnionMode.Sparse?new re(e,t,r,n,S,_):(S[H.BufferType.OFFSET]=pe.toInt32Array(_),new re(e,t,r,n,S,v))}};zr.Data=re;re.prototype.childData=Object.freeze([])});var sc=R(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.valueToString=void 0;var Y1=void 0;function G1(i){if(i===null)return"null";if(i===Y1)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)}Po.valueToString=G1});var U_=R(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.createIsValidFunction=void 0;var oc=sc(),K1=ft();function $1(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 ${
|
|
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;`)}Vo.createIsValidFunction=$1;function J1(i){return typeof i!="bigint"?oc.valueToString(i):K1.BigIntAvailable?`${oc.valueToString(i)}n`:`"${oc.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 k_=Ze(),ac=ft(),uc=(i,e)=>(i*e+63&~63||64)/e,Q1=(i,e=0)=>i.length>=e?i.subarray(0,e):k_.memcpy(new i.constructor(e),i,0),ys=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?uc(r*1,this.BYTES_PER_ELEMENT):uc(r*2,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=uc(e*this.stride,this.BYTES_PER_ELEMENT);let t=Q1(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this._resize(0),this}_resize(e){return this.buffer=k_.memcpy(new this.ArrayType(e),this.buffer)}};Ft.BufferBuilder=ys;ys.prototype.offset=0;var No=class extends ys{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=No;var M_=class extends No{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,u=r[n]>>s&1;return t?u===0&&(r[n]|=1<<s,++this.numValid):u===1&&(r[n]&=~(1<<s),--this.numValid),this}clear(){return this.numValid=0,super.clear()}};Ft.BitmapBufferBuilder=M_;var P_=class extends No{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=P_;var V_=class extends ys{get ArrayType64(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?ac.BigInt64Array:ac.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 ac.BigIntAvailable&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,r)),t}};Ft.WideBufferBuilder=V_});var Ve=R(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.VariableWidthBuilder=tr.FixedWidthBuilder=tr.Builder=void 0;var pn=dt(),Z1=qe(),yn=Se(),X1=Jt(),eA=U_(),cc=er(),tA=ve(),Et=class{constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=tA.strideForType(e),this._nulls=new cc.BitmapBufferBuilder,t&&t.length>0&&(this._isValid=eA.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 iA(e)}static throughAsyncIterable(e){return rA(e)}toVector(){return Z1.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:u}=this;n?(e[yn.BufferType.TYPE]=n.flush(s),r&&(e[yn.BufferType.OFFSET]=r.flush(s))):r?(t&&(e[yn.BufferType.DATA]=t.flush(r.last())),e[yn.BufferType.OFFSET]=r.flush(s)):t&&(e[yn.BufferType.DATA]=t.flush(s)),u>0&&(e[yn.BufferType.VALIDITY]=this._nulls.flush(s));let _=X1.Data.new(this.type,0,s,u,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 N_=class extends Et{constructor(e){super(e);this._values=new cc.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=N_;var L_=class extends Et{constructor(e){super(e);this._pendingLength=0,this._offsets=new cc.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=L_;function iA(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,u=Et.new(i);for(let _ of n)u.append(_)[r]>=t&&++s&&(yield u.toVector());(u.finish().length>0||s===0)&&(yield u.toVector())}}function rA(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 pn.__asyncGenerator(this,arguments,function*(){var s,u;let _=0,v=Et.new(i);try{for(var S=pn.__asyncValues(n),O;O=yield pn.__await(S.next()),!O.done;){let N=O.value;v.append(N)[r]>=t&&++_&&(yield yield pn.__await(v.toVector()))}}catch(N){s={error:N}}finally{try{O&&!O.done&&(u=S.return)&&(yield pn.__await(u.call(S)))}finally{if(s)throw s.error}}(v.finish().length>0||_===0)&&(yield yield pn.__await(v.toVector()))})}}});var lc=R(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.BoolBuilder=void 0;var nA=er(),sA=Ve(),x_=class extends sA.Builder{constructor(e){super(e);this._values=new nA.BitmapBufferBuilder}setValue(e,t){this._values.set(e,+t)}};Lo.BoolBuilder=x_});var dc=R(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.NullBuilder=void 0;var oA=Ve(),q_=class extends oA.Builder{setValue(e,t){}setValid(e,t){return this.length=Math.max(e+1,this.length),t}};xo.NullBuilder=q_});var fc=R(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.DateMillisecondBuilder=ir.DateDayBuilder=ir.DateBuilder=void 0;var aA=Ve(),qo=class extends aA.FixedWidthBuilder{};ir.DateBuilder=qo;var W_=class extends qo{};ir.DateDayBuilder=W_;var z_=class extends qo{};ir.DateMillisecondBuilder=z_});var hc=R(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.DecimalBuilder=void 0;var uA=Ve(),H_=class extends uA.FixedWidthBuilder{};Wo.DecimalBuilder=H_});var yc=R(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.DictionaryBuilder=void 0;var cA=ve(),pc=Ve(),Y_=class extends pc.Builder{constructor({type:e,nullValues:t,dictionaryHashFunction:r}){super({type:new cA.Dictionary(e.dictionary,e.indices,e.id,e.isOrdered)});this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=pc.Builder.new({type:this.type.indices,nullValues:t}),this.dictionary=pc.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}`}};zo.DictionaryBuilder=Y_});var _c=R(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.FixedSizeBinaryBuilder=void 0;var lA=Ve(),G_=class extends lA.FixedWidthBuilder{};Ho.FixedSizeBinaryBuilder=G_});var _s=R(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.float64ToUint16=mn.uint16ToFloat64=void 0;var K_=new Float64Array(1),_n=new Uint32Array(K_.buffer);function dA(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)}mn.uint16ToFloat64=dA;function fA(i){if(i!==i)return 32256;K_[0]=i;let e=(_n[1]&2147483648)>>16&65535,t=_n[1]&2146435072,r=0;return t>=1089470464?_n[0]>0?t=31744:(t=(t&2080374784)>>16,r=(_n[1]&1048575)>>10):t<=1056964608?(r=1048576+(_n[1]&1048575),r=1048576+(r<<(t>>20)-998)>>21,t=0):(t=t-1056964608>>10,r=(_n[1]&1048575)+512>>10),e|t|r&65535}mn.float64ToUint16=fA});var mc=R(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.Float64Builder=li.Float32Builder=li.Float16Builder=li.FloatBuilder=void 0;var hA=_s(),pA=Ve(),ms=class extends pA.FixedWidthBuilder{};li.FloatBuilder=ms;var $_=class extends ms{setValue(e,t){this._values.set(e,hA.float64ToUint16(t))}};li.Float16Builder=$_;var J_=class extends ms{setValue(e,t){this._values.set(e,t)}};li.Float32Builder=J_;var Q_=class extends ms{setValue(e,t){this._values.set(e,t)}};li.Float64Builder=Q_});var vs=R(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.BN=Xe.bignumToBigInt=Xe.bignumToString=Xe.isArrowBigNumSymbol=void 0;var yA=Ze(),bs=ft();Xe.isArrowBigNumSymbol=Symbol.for("isArrowBigNum");function Qt(i,...e){return e.length===0?Object.setPrototypeOf(yA.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 Z_(this)};Qt.prototype.toString=function(){return Xe.bignumToString(this)};Qt.prototype[Symbol.toPrimitive]=function(i="default"){switch(i){case"number":return Z_(this);case"string":return Xe.bignumToString(this);case"default":return Xe.bignumToBigInt(this)}return Xe.bignumToString(this)};function bn(...i){return Qt.apply(this,i)}function gn(...i){return Qt.apply(this,i)}function gs(...i){return Qt.apply(this,i)}Object.setPrototypeOf(bn.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(gn.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(gs.prototype,Object.create(Uint32Array.prototype));Object.assign(bn.prototype,Qt.prototype,{constructor:bn,signed:!0,TypedArray:Int32Array,BigIntArray:bs.BigInt64Array});Object.assign(gn.prototype,Qt.prototype,{constructor:gn,signed:!1,TypedArray:Uint32Array,BigIntArray:bs.BigUint64Array});Object.assign(gs.prototype,Qt.prototype,{constructor:gs,signed:!0,TypedArray:Uint32Array,BigIntArray:bs.BigUint64Array});function Z_(i){let{buffer:e,byteOffset:t,length:r,signed:n}=i,s=new Int32Array(e,t,r),u=0,_=0,v=s.length,S,O;for(;_<v;)O=s[_++],S=s[_++],n||(S=S>>>0),u+=(O>>>0)+S*Math.pow(_,32);return u}bs.BigIntAvailable?(Xe.bignumToBigInt=i=>i.byteLength===8?new i.BigIntArray(i.buffer,i.byteOffset,1)[0]:bc(i),Xe.bignumToString=i=>i.byteLength===8?`${new i.BigIntArray(i.buffer,i.byteOffset,1)[0]}`:bc(i)):(Xe.bignumToString=bc,Xe.bignumToBigInt=Xe.bignumToString);function bc(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,u=r.length-1;do{for(t[0]=r[s=0];s<u;)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 Yo=class{static new(e,t){switch(t){case!0:return new bn(e);case!1:return new gn(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case bs.BigInt64Array:return new bn(e)}return e.byteLength===16?new gs(e):new gn(e)}static signed(e){return new bn(e)}static unsigned(e){return new gn(e)}static decimal(e){return new gs(e)}constructor(e,t){return Yo.new(e,t)}};Xe.BN=Yo});var gc=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 _A=vs(),X_=er(),mA=ft(),bA=Ve(),di=class extends bA.FixedWidthBuilder{setValue(e,t){this._values.set(e,t)}};$e.IntBuilder=di;var em=class extends di{};$e.Int8Builder=em;var tm=class extends di{};$e.Int16Builder=tm;var im=class extends di{};$e.Int32Builder=im;var rm=class extends di{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(Go));super(e);this._values=new X_.WideBufferBuilder(new Int32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(Go(e))}};$e.Int64Builder=rm;var nm=class extends di{};$e.Uint8Builder=nm;var sm=class extends di{};$e.Uint16Builder=sm;var om=class extends di{};$e.Uint32Builder=om;var am=class extends di{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(Go));super(e);this._values=new X_.WideBufferBuilder(new Uint32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(Go(e))}};$e.Uint64Builder=am;var Go=(i=>e=>(ArrayBuffer.isView(e)&&(i.buffer=e.buffer,i.byteOffset=e.byteOffset,i.byteLength=e.byteLength,e=_A.bignumToBigInt(i),i.buffer=null),e))({BigIntArray:mA.BigInt64Array})});var vc=R(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.TimeNanosecondBuilder=Rt.TimeMicrosecondBuilder=Rt.TimeMillisecondBuilder=Rt.TimeSecondBuilder=Rt.TimeBuilder=void 0;var gA=Ve(),vn=class extends gA.FixedWidthBuilder{};Rt.TimeBuilder=vn;var um=class extends vn{};Rt.TimeSecondBuilder=um;var cm=class extends vn{};Rt.TimeMillisecondBuilder=cm;var lm=class extends vn{};Rt.TimeMicrosecondBuilder=lm;var dm=class extends vn{};Rt.TimeNanosecondBuilder=dm});var wc=R(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.TimestampNanosecondBuilder=Ct.TimestampMicrosecondBuilder=Ct.TimestampMillisecondBuilder=Ct.TimestampSecondBuilder=Ct.TimestampBuilder=void 0;var vA=Ve(),wn=class extends vA.FixedWidthBuilder{};Ct.TimestampBuilder=wn;var fm=class extends wn{};Ct.TimestampSecondBuilder=fm;var hm=class extends wn{};Ct.TimestampMillisecondBuilder=hm;var pm=class extends wn{};Ct.TimestampMicrosecondBuilder=pm;var ym=class extends wn{};Ct.TimestampNanosecondBuilder=ym});var jc=R(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.IntervalYearMonthBuilder=rr.IntervalDayTimeBuilder=rr.IntervalBuilder=void 0;var wA=Ve(),Ko=class extends wA.FixedWidthBuilder{};rr.IntervalBuilder=Ko;var _m=class extends Ko{};rr.IntervalDayTimeBuilder=_m;var mm=class extends Ko{};rr.IntervalYearMonthBuilder=mm});var Jo=R($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.BinaryBuilder=void 0;var jA=Ze(),IA=er(),TA=Ve(),bm=class extends TA.VariableWidthBuilder{constructor(e){super(e);this._values=new IA.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,jA.toUint8Array(t))}_flushPending(e,t){let r=this._offsets,n=this._values.reserve(t).buffer,s=0,u=0,_=0,v;for([s,v]of e)v===void 0?r.set(s,0):(u=v.length,n.set(v,_),r.set(s,u),_+=u)}};$o.BinaryBuilder=bm});var Zo=R(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.Utf8Builder=void 0;var BA=Er(),SA=Jo(),AA=er(),OA=Ve(),Ic=class extends OA.VariableWidthBuilder{constructor(e){super(e);this._values=new AA.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,BA.encodeUtf8(t))}_flushPending(e,t){}};Qo.Utf8Builder=Ic;Ic.prototype._flushPending=SA.BinaryBuilder.prototype._flushPending});var Tc=R(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.Run=void 0;var DA=qe(),gm=class{get length(){return this._values.length}get(e){return this._values[e]}clear(){return this._values=null,this}bind(e){return e instanceof DA.Vector?e:(this._values=e,this)}};Xo.Run=gm});var rt=R(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.Field=jn.Schema=void 0;var FA=ve(),Ut=class{constructor(e=[],t,r){this.fields=e||[],this.metadata=t||new Map,r||(r=Bc(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=ea(ea(new Map,this.metadata),t.metadata),s=t.fields.filter(_=>{let v=r.findIndex(S=>S.name===_.name);return~v?(r[v]=_.clone({metadata:ea(ea(new Map,r[v].metadata),_.metadata)}))&&!1:!0}),u=Bc(s,new Map);return new Ut([...r,...s],n,new Map([...this.dictionaries,...u]))}};jn.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)}};jn.Field=Ei;function ea(i,e){return new Map([...i||new Map,...e||new Map])}function Bc(i,e=new Map){for(let t=-1,r=i.length;++t<r;){let s=i[t].type;if(FA.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&&Bc(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 Sc=R(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.ListBuilder=void 0;var EA=Tc(),RA=rt(),CA=ve(),UA=er(),kA=Ve(),vm=class extends kA.VariableWidthBuilder{constructor(e){super(e);this._run=new EA.Run,this._offsets=new UA.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 CA.List(new RA.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,u;for([s,u]of e)u===void 0?r.set(s,0):(r.set(s,u.length),n(this,s,t.bind(u)))}};ta.ListBuilder=vm});var Ac=R(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.FixedSizeListBuilder=void 0;var MA=Tc(),PA=rt(),VA=Ve(),NA=ve(),wm=class extends VA.Builder{constructor(){super(...arguments);this._run=new MA.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 NA.FixedSizeList(this.type.listSize,new PA.Field(t,e.type,!0)),r}clear(){return this._run.clear(),super.clear()}};ia.FixedSizeListBuilder=wm});var Oc=R(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.MapBuilder=void 0;var LA=rt(),xA=ve(),qA=Ve(),jm=class extends qA.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 xA.Map_(new LA.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))})}};ra.MapBuilder=jm});var Dc=R(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.StructBuilder=void 0;var WA=rt(),zA=Ve(),HA=ve(),Im=class extends zA.Builder{addChild(e,t=`${this.numChildren}`){let r=this.children.push(e);return this.type=new HA.Struct([...this.type.children,new WA.Field(t,e.type,!0)]),r}};na.StructBuilder=Im});var Fc=R(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.DenseUnionBuilder=nr.SparseUnionBuilder=nr.UnionBuilder=void 0;var YA=rt(),Tm=er(),GA=Ve(),KA=ve(),sa=class extends GA.Builder{constructor(e){super(e);this._typeIds=new Tm.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:u}}=this,_=[...n,new YA.Field(t,e.type)];return this.type=new KA.Union(s,[...u,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=sa;var Bm=class extends sa{};nr.SparseUnionBuilder=Bm;var Sm=class extends sa{constructor(e){super(e);this._offsets=new Tm.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=Sm});var ut=R(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.Visitor=void 0;var $A=Jt(),JA=qe(),F=Se(),QA=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 ZA(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}};oa.Visitor=Te;function ZA(i,e,t=!0){let r=null,n=F.Type.NONE;switch(e instanceof $A.Data||e instanceof JA.Vector?n=Ec(e.type):e instanceof QA.DataType?n=Ec(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 Ec(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 Uc=R(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.instance=In.SetVisitor=void 0;var XA=qe(),eO=ut(),tO=Er(),iO=_s(),rO=Ze(),kt=Se(),ne=class extends eO.Visitor{};In.SetVisitor=ne;var nO=(i,e,t)=>{i[e]=t/864e5|0},Rc=(i,e,t)=>{i[e]=t%4294967296|0,i[e+1]=t/4294967296|0},sO=(i,e,t)=>{i[e]=t*1e3%4294967296|0,i[e+1]=t*1e3/4294967296|0},oO=(i,e,t)=>{i[e]=t*1e6%4294967296|0,i[e+1]=t*1e6/4294967296|0},Am=(i,e,t,r)=>{let{[t]:n,[t+1]:s}=e;n!=null&&s!=null&&i.set(r.subarray(0,s-n),n)},aO=({offset:i,values:e},t,r)=>{let n=i+t;r?e[n>>3]|=1<<n%8:e[n>>3]&=~(1<<n%8)},Om=({values:i},e,t)=>{nO(i,e,t.valueOf())},Dm=({values:i},e,t)=>{Rc(i,e*2,t.valueOf())},fi=({stride:i,values:e},t,r)=>{e[i*t]=r},Fm=({stride:i,values:e},t,r)=>{e[i*t]=iO.float64ToUint16(r)},Cc=(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,u=rO.toArrayBufferView(s,r);i.values.set(u.subarray(0,n),n*e)}}},uO=({stride:i,values:e},t,r)=>{e.set(r.subarray(0,i),i*t)},cO=({values:i,valueOffsets:e},t,r)=>Am(i,e,t,r),lO=({values:i,valueOffsets:e},t,r)=>{Am(i,e,t,tO.encodeUtf8(r))},dO=(i,e,t)=>{i.type.bitWidth<64?fi(i,e,t):Cc(i,e,t)},fO=(i,e,t)=>{i.type.precision!==kt.Precision.HALF?fi(i,e,t):Fm(i,e,t)},hO=(i,e,t)=>{i.type.unit===kt.DateUnit.DAY?Om(i,e,t):Dm(i,e,t)},Em=({values:i},e,t)=>Rc(i,e*2,t/1e3),Rm=({values:i},e,t)=>Rc(i,e*2,t),Cm=({values:i},e,t)=>sO(i,e*2,t),Um=({values:i},e,t)=>oO(i,e*2,t),pO=(i,e,t)=>{switch(i.type.unit){case kt.TimeUnit.SECOND:return Em(i,e,t);case kt.TimeUnit.MILLISECOND:return Rm(i,e,t);case kt.TimeUnit.MICROSECOND:return Cm(i,e,t);case kt.TimeUnit.NANOSECOND:return Um(i,e,t)}},km=({values:i,stride:e},t,r)=>{i[e*t]=r},Mm=({values:i,stride:e},t,r)=>{i[e*t]=r},Pm=({values:i},e,t)=>{i.set(t.subarray(0,2),2*e)},Vm=({values:i},e,t)=>{i.set(t.subarray(0,2),2*e)},yO=(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)}},_O=({values:i},e,t)=>{i.set(t.subarray(0,4),4*e)},mO=(i,e,t)=>{let r=i.getChildAt(0),n=i.valueOffsets;for(let s=-1,u=n[e],_=n[e+1];u<_;)r.set(u++,t.get(++s))},bO=(i,e,t)=>{let r=i.getChildAt(0),n=i.valueOffsets,s=t instanceof Map?[...t]:Object.entries(t);for(let u=-1,_=n[e],v=n[e+1];_<v;)r.set(_++,s[++u])},gO=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e[n]),vO=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e.get(n)),wO=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e.get(r.name)),jO=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e[r.name]),IO=(i,e,t)=>{let r=t instanceof Map?wO(e,t):t instanceof XA.Vector?vO(e,t):Array.isArray(t)?gO(e,t):jO(e,t);i.type.children.forEach((n,s)=>r(i.getChildAt(s),n,s))},TO=(i,e,t)=>{i.type.mode===kt.UnionMode.Dense?Nm(i,e,t):Lm(i,e,t)},Nm=(i,e,t)=>{let r=i.typeIdToChildIndex[i.typeIds[e]],n=i.getChildAt(r);n&&n.set(i.valueOffsets[e],t)},Lm=(i,e,t)=>{let r=i.typeIdToChildIndex[i.typeIds[e]],n=i.getChildAt(r);n&&n.set(e,t)},BO=(i,e,t)=>{let r=i.getKey(e);r!==null&&i.setValue(r,t)},SO=(i,e,t)=>{i.type.unit===kt.IntervalUnit.DAY_TIME?xm(i,e,t):qm(i,e,t)},xm=({values:i},e,t)=>{i.set(t.subarray(0,2),2*e)},qm=({values:i},e,t)=>{i[e]=t[0]*12+t[1]%12},AO=(i,e,t)=>{let r=i.getChildAt(0),{stride:n}=i;for(let s=-1,u=e*n;++s<n;)r.set(u+s,t.get(s))};ne.prototype.visitBool=aO;ne.prototype.visitInt=dO;ne.prototype.visitInt8=fi;ne.prototype.visitInt16=fi;ne.prototype.visitInt32=fi;ne.prototype.visitInt64=Cc;ne.prototype.visitUint8=fi;ne.prototype.visitUint16=fi;ne.prototype.visitUint32=fi;ne.prototype.visitUint64=Cc;ne.prototype.visitFloat=fO;ne.prototype.visitFloat16=Fm;ne.prototype.visitFloat32=fi;ne.prototype.visitFloat64=fi;ne.prototype.visitUtf8=lO;ne.prototype.visitBinary=cO;ne.prototype.visitFixedSizeBinary=uO;ne.prototype.visitDate=hO;ne.prototype.visitDateDay=Om;ne.prototype.visitDateMillisecond=Dm;ne.prototype.visitTimestamp=pO;ne.prototype.visitTimestampSecond=Em;ne.prototype.visitTimestampMillisecond=Rm;ne.prototype.visitTimestampMicrosecond=Cm;ne.prototype.visitTimestampNanosecond=Um;ne.prototype.visitTime=yO;ne.prototype.visitTimeSecond=km;ne.prototype.visitTimeMillisecond=Mm;ne.prototype.visitTimeMicrosecond=Pm;ne.prototype.visitTimeNanosecond=Vm;ne.prototype.visitDecimal=_O;ne.prototype.visitList=mO;ne.prototype.visitStruct=IO;ne.prototype.visitUnion=TO;ne.prototype.visitDenseUnion=Nm;ne.prototype.visitSparseUnion=Lm;ne.prototype.visitDictionary=BO;ne.prototype.visitInterval=SO;ne.prototype.visitIntervalDayTime=xm;ne.prototype.visitIntervalYearMonth=qm;ne.prototype.visitFixedSizeList=AO;ne.prototype.visitMap=bO;In.instance=new ne});var Wm=R(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.instance=Tn.GetBuilderCtor=void 0;var OO=ut(),DO=Jo(),FO=lc(),kc=fc(),EO=hc(),RO=yc(),CO=_c(),UO=Ac(),aa=mc(),Mc=jc(),Ri=gc(),kO=Sc(),MO=Oc(),PO=dc(),VO=Dc(),ws=wc(),js=vc(),Pc=Fc(),NO=Zo(),Vc=class extends OO.Visitor{visitNull(){return PO.NullBuilder}visitBool(){return FO.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 aa.FloatBuilder}visitFloat16(){return aa.Float16Builder}visitFloat32(){return aa.Float32Builder}visitFloat64(){return aa.Float64Builder}visitUtf8(){return NO.Utf8Builder}visitBinary(){return DO.BinaryBuilder}visitFixedSizeBinary(){return CO.FixedSizeBinaryBuilder}visitDate(){return kc.DateBuilder}visitDateDay(){return kc.DateDayBuilder}visitDateMillisecond(){return kc.DateMillisecondBuilder}visitTimestamp(){return ws.TimestampBuilder}visitTimestampSecond(){return ws.TimestampSecondBuilder}visitTimestampMillisecond(){return ws.TimestampMillisecondBuilder}visitTimestampMicrosecond(){return ws.TimestampMicrosecondBuilder}visitTimestampNanosecond(){return ws.TimestampNanosecondBuilder}visitTime(){return js.TimeBuilder}visitTimeSecond(){return js.TimeSecondBuilder}visitTimeMillisecond(){return js.TimeMillisecondBuilder}visitTimeMicrosecond(){return js.TimeMicrosecondBuilder}visitTimeNanosecond(){return js.TimeNanosecondBuilder}visitDecimal(){return EO.DecimalBuilder}visitList(){return kO.ListBuilder}visitStruct(){return VO.StructBuilder}visitUnion(){return Pc.UnionBuilder}visitDenseUnion(){return Pc.DenseUnionBuilder}visitSparseUnion(){return Pc.SparseUnionBuilder}visitDictionary(){return RO.DictionaryBuilder}visitInterval(){return Mc.IntervalBuilder}visitIntervalDayTime(){return Mc.IntervalDayTimeBuilder}visitIntervalYearMonth(){return Mc.IntervalYearMonthBuilder}visitFixedSizeList(){return UO.FixedSizeListBuilder}visitMap(){return MO.MapBuilder}};Tn.GetBuilderCtor=Vc;Tn.instance=new Vc});var ca=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 LO=Ve();Object.defineProperty(M,"Builder",{enumerable:!0,get:function(){return LO.Builder}});var xO=lc();Object.defineProperty(M,"BoolBuilder",{enumerable:!0,get:function(){return xO.BoolBuilder}});var qO=dc();Object.defineProperty(M,"NullBuilder",{enumerable:!0,get:function(){return qO.NullBuilder}});var Nc=fc();Object.defineProperty(M,"DateBuilder",{enumerable:!0,get:function(){return Nc.DateBuilder}});Object.defineProperty(M,"DateDayBuilder",{enumerable:!0,get:function(){return Nc.DateDayBuilder}});Object.defineProperty(M,"DateMillisecondBuilder",{enumerable:!0,get:function(){return Nc.DateMillisecondBuilder}});var WO=hc();Object.defineProperty(M,"DecimalBuilder",{enumerable:!0,get:function(){return WO.DecimalBuilder}});var zO=yc();Object.defineProperty(M,"DictionaryBuilder",{enumerable:!0,get:function(){return zO.DictionaryBuilder}});var HO=_c();Object.defineProperty(M,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return HO.FixedSizeBinaryBuilder}});var ua=mc();Object.defineProperty(M,"FloatBuilder",{enumerable:!0,get:function(){return ua.FloatBuilder}});Object.defineProperty(M,"Float16Builder",{enumerable:!0,get:function(){return ua.Float16Builder}});Object.defineProperty(M,"Float32Builder",{enumerable:!0,get:function(){return ua.Float32Builder}});Object.defineProperty(M,"Float64Builder",{enumerable:!0,get:function(){return ua.Float64Builder}});var Ci=gc();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 Is=vc();Object.defineProperty(M,"TimeBuilder",{enumerable:!0,get:function(){return Is.TimeBuilder}});Object.defineProperty(M,"TimeSecondBuilder",{enumerable:!0,get:function(){return Is.TimeSecondBuilder}});Object.defineProperty(M,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return Is.TimeMillisecondBuilder}});Object.defineProperty(M,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return Is.TimeMicrosecondBuilder}});Object.defineProperty(M,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return Is.TimeNanosecondBuilder}});var Ts=wc();Object.defineProperty(M,"TimestampBuilder",{enumerable:!0,get:function(){return Ts.TimestampBuilder}});Object.defineProperty(M,"TimestampSecondBuilder",{enumerable:!0,get:function(){return Ts.TimestampSecondBuilder}});Object.defineProperty(M,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return Ts.TimestampMillisecondBuilder}});Object.defineProperty(M,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return Ts.TimestampMicrosecondBuilder}});Object.defineProperty(M,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return Ts.TimestampNanosecondBuilder}});var Lc=jc();Object.defineProperty(M,"IntervalBuilder",{enumerable:!0,get:function(){return Lc.IntervalBuilder}});Object.defineProperty(M,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return Lc.IntervalDayTimeBuilder}});Object.defineProperty(M,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return Lc.IntervalYearMonthBuilder}});var YO=Zo();Object.defineProperty(M,"Utf8Builder",{enumerable:!0,get:function(){return YO.Utf8Builder}});var GO=Jo();Object.defineProperty(M,"BinaryBuilder",{enumerable:!0,get:function(){return GO.BinaryBuilder}});var KO=Sc();Object.defineProperty(M,"ListBuilder",{enumerable:!0,get:function(){return KO.ListBuilder}});var $O=Ac();Object.defineProperty(M,"FixedSizeListBuilder",{enumerable:!0,get:function(){return $O.FixedSizeListBuilder}});var JO=Oc();Object.defineProperty(M,"MapBuilder",{enumerable:!0,get:function(){return JO.MapBuilder}});var QO=Dc();Object.defineProperty(M,"StructBuilder",{enumerable:!0,get:function(){return QO.StructBuilder}});var xc=Fc();Object.defineProperty(M,"UnionBuilder",{enumerable:!0,get:function(){return xc.UnionBuilder}});Object.defineProperty(M,"SparseUnionBuilder",{enumerable:!0,get:function(){return xc.SparseUnionBuilder}});Object.defineProperty(M,"DenseUnionBuilder",{enumerable:!0,get:function(){return xc.DenseUnionBuilder}});var qc=Se(),ZO=Zo(),XO=Ve(),zm=Uc(),Hm=Wm();XO.Builder.new=Ym;function Ym(i){let e=i.type,t=new(Hm.instance.getVisitFn(e)())(i);if(e.children&&e.children.length>0){let r=i.children||[],n={nullValues:i.nullValues},s=Array.isArray(r)?(u,_)=>r[_]||n:({name:u})=>r[u]||n;e.children.forEach((u,_)=>{let{type:v}=u,S=s(u,_);t.children.push(Ym(Object.assign(Object.assign({},S),{type:v})))})}return t}Object.keys(qc.Type).map(i=>qc.Type[i]).filter(i=>typeof i=="number"&&i!==qc.Type.NONE).forEach(i=>{let e=Hm.instance.visit(i);e.prototype._setValue=zm.instance.getVisitFn(i)});ZO.Utf8Builder.prototype._setValue=zm.instance.visitBinary});var Gm=R(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.Block=Bn.Footer=void 0;var eD=Ai(),la=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()+eD.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):la.MetadataVersion.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new la.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 da).__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 da).__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 la.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,la.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,u){return Mt.startFooter(e),Mt.addVersion(e,t),Mt.addSchema(e,r),Mt.addDictionaries(e,n),Mt.addRecordBatches(e,s),Mt.addCustomMetadata(e,u),Mt.endFooter(e)}};Bn.Footer=Mt;var da=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()}};Bn.Block=da});var Hc=R(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.FileBlock=Sn.Footer=void 0;var Zt=Gm(),Wc=Ai(),Km=Wc.flatbuffers.Long,tD=Wc.flatbuffers.Builder,iD=Wc.flatbuffers.ByteBuffer,$m=rt(),Jm=Se(),rD=Ze(),zc=class{constructor(e,t=Jm.MetadataVersion.V4,r,n){this.schema=e,this.version=t,r&&(this._recordBatches=r),n&&(this._dictionaryBatches=n)}static decode(e){e=new iD(rD.toUint8Array(e));let t=Zt.Footer.getRootAsFooter(e),r=$m.Schema.decode(t.schema());return new Qm(r,t)}static encode(e){let t=new tD,r=$m.Schema.encode(t,e.schema);Zt.Footer.startRecordBatchesVector(t,e.numRecordBatches),[...e.recordBatches()].slice().reverse().forEach(u=>sr.encode(t,u));let n=t.endVector();Zt.Footer.startDictionariesVector(t,e.numDictionaries),[...e.dictionaryBatches()].slice().reverse().forEach(u=>sr.encode(t,u));let s=t.endVector();return Zt.Footer.startFooter(t),Zt.Footer.addSchema(t,r),Zt.Footer.addVersion(t,Jm.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}};Sn.Footer=zc;var Qm=class extends zc{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 Km(t.offset,0),s=new Km(t.bodyLength,0);return Zt.Block.createBlock(e,n,r,s)}};Sn.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=ps(),Zm=Er(),Bs=un(),Yc=Ze(),An=ft(),Gc=class extends Bs.AsyncQueue{write(e){if((e=Yc.toUint8Array(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?Zm.decodeUtf8(this.toUint8Array(!0)):this.toUint8Array(!1).then(Zm.decodeUtf8)}toUint8Array(e=!1){return e?Yc.joinUint8Arrays(this._values)[0]:(()=>or.__awaiter(this,void 0,void 0,function*(){var t,r;let n=[],s=0;try{for(var u=or.__asyncValues(this),_;_=yield u.next(),!_.done;){let v=_.value;n.push(v),s+=v.byteLength}}catch(v){t={error:v}}finally{try{_&&!_.done&&(r=u.return)&&(yield r.call(u))}finally{if(t)throw t.error}}return Yc.joinUint8Arrays(n,s)[0]}))()}};cr.AsyncByteQueue=Gc;var Xm=class{constructor(e){e&&(this.source=new eb(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=Xm;var fa=class{constructor(e){e instanceof fa?this.source=e.source:e instanceof Gc?this.source=new ur(ar.default.fromAsyncIterable(e)):An.isReadableNodeStream(e)?this.source=new ur(ar.default.fromNodeStream(e)):An.isReadableDOMStream(e)?this.source=new ur(ar.default.fromDOMStream(e)):An.isFetchResponse(e)?this.source=new ur(ar.default.fromDOMStream(e.body)):An.isIterable(e)?this.source=new ur(ar.default.fromIterable(e)):An.isPromise(e)?this.source=new ur(ar.default.fromAsyncIterable(e)):An.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=fa;var eb=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)||Bs.ITERATOR_DONE)}return(e){return Object.create(this.source.return&&this.source.return(e)||Bs.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))||Bs.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))||Bs.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}}});var Kc=R(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.AsyncRandomAccessFile=On.RandomAccessFile=void 0;var dr=dt(),tb=lr(),nD=Ze(),ib=class extends tb.ByteStream{constructor(e,t){super();this.position=0,this.buffer=nD.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}}};On.RandomAccessFile=ib;var rb=class extends tb.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,u=0,_=0,v=Math.min(r,s+Math.min(r-s,e)),S=new Uint8Array(Math.max(0,(this.position=v)-s));for(;(s+=_)<v&&(u+=_)<S.byteLength;)({bytesRead:_}=yield t.read(S,u,S.byteLength-u,s));return S}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),u=new Uint8Array(s-e);return(yield r.read(u,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}})}};On.AsyncRandomAccessFile=rb});var Jc=R(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.Int128=hi.Int64=hi.Uint64=hi.BaseInt64=void 0;var sD=1<<16;function Dn(i){return i<0&&(i=4294967295+i+1),`0x${i.toString(16)}`}var Fn=8,$c=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],ha=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?sD: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`${Dn(this.buffer[1])} ${Dn(this.buffer[0])}`}};hi.BaseInt64=ha;var we=class extends ha{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 u=Fn<r-s?Fn:r-s,_=new we(new Uint32Array([parseInt(e.substr(s,u),10),0])),v=new we(new Uint32Array([$c[u],0]));n.times(v),n.plus(_),s+=u}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 ha{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 u=r?1:0;u<n;){let _=Fn<n-u?Fn:n-u,v=new jt(new Uint32Array([parseInt(e.substr(u,_),10),0])),S=new jt(new Uint32Array([$c[_],0]));s.times(S),s.plus(v),u+=_}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])),u=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])),S=new we(new Uint32Array([e.buffer[0],0])),O=we.multiply(s,S);this.buffer[0]=O.low();let N=new we(new Uint32Array([O.high(),0]));return O=we.multiply(n,S),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,S)).plus(we.multiply(n,v)).plus(we.multiply(s,_)),this.buffer[3]+=we.multiply(t,S).plus(we.multiply(r,v)).plus(we.multiply(n,_)).plus(we.multiply(s,u)).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`${Dn(this.buffer[3])} ${Dn(this.buffer[2])} ${Dn(this.buffer[1])} ${Dn(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 u=r?1:0;u<n;){let _=Fn<n-u?Fn:n-u,v=new Xt(new Uint32Array([parseInt(e.substr(u,_),10),0,0,0])),S=new Xt(new Uint32Array([$c[_],0,0,0]));s.times(S),s.plus(v),u+=_}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 ab=R(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.JSONVectorLoader=En.VectorLoader=void 0;var et=Jt(),oD=rt(),Ui=ve(),aD=ut(),nb=ci(),uD=Er(),pa=Jc(),sb=Se(),pi=Ze(),Qc=class extends aD.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 oD.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===sb.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)}};En.VectorLoader=Qc;var ob=class extends Qc{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):nb.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===sb.DateUnit.MILLISECOND?pi.toArrayBufferView(Uint8Array,pa.Int64.convertArray(r[t])):Ui.DataType.isDecimal(e)?pi.toArrayBufferView(Uint8Array,pa.Int128.convertArray(r[t])):Ui.DataType.isBinary(e)||Ui.DataType.isFixedSizeBinary(e)?cD(r[t]):Ui.DataType.isBool(e)?nb.packBools(r[t]):Ui.DataType.isUtf8(e)?uD.encodeUtf8(r[t].join("")):pi.toArrayBufferView(Uint8Array,pi.toArrayBufferView(e.ArrayType,r[t].map(n=>+n)))}};En.JSONVectorLoader=ob;function cD(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 Ss=R(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.StructRow=Cn.MapRow=void 0;var ub=sc(),ct=Symbol.for("parent"),Rn=Symbol.for("rowIndex"),It=Symbol.for("keyToIdx"),Tt=Symbol.for("idxToVal"),Zc=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,u,_=0,v,S;!((v=e.next()).done||(S=t.next()).done);++_)s=v.value,u=S.value,n[_]=u,r.has(s)||r.set(s,_),yield[s,u]}forEach(e,t){let r=this.keys(),n=this.values(),s=t===void 0?e:(v,S,O)=>e.call(t,v,S,O),u=this[It]||(this[It]=new Map),_=this[Tt]||(this[Tt]=new Array(this.size));for(let v,S,O=0,N,q;!((N=r.next()).done||(q=n.next()).done);++O)v=N.value,S=q.value,_[O]=S,u.has(v)||u.set(v,O),s(S,v,this)}toArray(){return[...this.values()]}toJSON(){let e={};return this.forEach((t,r)=>e[r]=t),e}inspect(){return this.toString()}[Zc](){return this.toString()}toString(){let e=[];return this.forEach((t,r)=>{r=ub.valueToString(r),t=ub.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},[Rn]:{writable:!0,enumerable:!1,configurable:!1,value:-1}}),i[Symbol.toStringTag]="Row"))(yi.prototype);var cb=class extends yi{constructor(e){super(e,e.length);return lD(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)}};Cn.MapRow=cb;var lb=class extends yi{constructor(e){super(e,e.type.children.length);return db(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[Rn])}setValue(e,t){return this[ct].getChildAt(e).set(this[Rn],t)}};Cn.StructRow=lb;Object.setPrototypeOf(yi.prototype,Map.prototype);var db=(()=>{let i={enumerable:!0,configurable:!1,get:null,set:null};return e=>{let t=-1,r=e[It]||(e[It]=new Map),n=u=>function(){return this.get(u)},s=u=>function(_){return this.set(u,_)};for(let u of e.keys())r.set(u,++t),i.get=n(u),i.set=s(u),Object.prototype.hasOwnProperty.call(e,u)||(i.enumerable=!0,Object.defineProperty(e,u,i)),Object.prototype.hasOwnProperty.call(e,t)||(i.enumerable=!1,Object.defineProperty(e,t,i));return i.get=i.set=null,e}})(),lD=(()=>{if(typeof Proxy=="undefined")return db;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(u=>`${u}`)},has(s,u){switch(u){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 Rn:case Tt:case It:case Zc:return!0}return typeof u=="number"&&!s.has(u)&&(u=s.getKey(u)),s.has(u)},get(s,u,_){switch(u){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 Rn:case Tt:case It:case Zc:return Reflect.get(s,u,_)}return typeof u=="number"&&!i.call(_,u)&&(u=r.call(_,u)),e.call(_,u)},set(s,u,_,v){switch(u){case ct:case Rn:case Tt:case It:return Reflect.set(s,u,_,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 u=="number"&&!i.call(v,u)&&(u=r.call(v,u)),i.call(v,u)?!!t.call(v,u,_):!1}};return s=>new Proxy(s,n)})()});var Os=R(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.createElementComparator=fr.clampRange=fr.clampIndex=void 0;var fb=qe(),hb=Ss(),dD=Ze(),pb=ft();function fD(i,e,t){let r=i.length,n=e>-1?e:r+e%r;return t?t(i,n):n}fr.clampIndex=fD;var yb;function hD(i,e,t,r){let{length:n=0}=i,s=typeof e!="number"?0:e,u=typeof t!="number"?n:t;return s<0&&(s=(s%n+n)%n),u<0&&(u=(u%n+n)%n),u<s&&(yb=s,s=u,u=yb),u>n&&(u=n),r?r(i,s,u):[s,u]}fr.clampRange=hD;var pD=pb.BigIntAvailable?pb.BigInt(0):0,_b=i=>i!==i;function As(i){let e=typeof i;if(e!=="object"||i===null)return _b(i)?_b:e!=="bigint"?t=>t===i:t=>pD+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?dD.compareArrayLike(i,t):!1:i instanceof Map?_D(i):Array.isArray(i)?yD(i):i instanceof fb.Vector?mD(i):bD(i)}fr.createElementComparator=As;function yD(i){let e=[];for(let t=-1,r=i.length;++t<r;)e[t]=As(i[t]);return ya(e)}function _D(i){let e=-1,t=[];return i.forEach(r=>t[++e]=As(r)),ya(t)}function mD(i){let e=[];for(let t=-1,r=i.length;++t<r;)e[t]=As(i.get(t));return ya(e)}function bD(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]=As(i[e[r]]);return ya(t,e)}function ya(i,e){return t=>{if(!t||typeof t!="object")return!1;switch(t.constructor){case Array:return gD(i,t);case Map:case hb.MapRow:case hb.StructRow:return mb(i,t,t.keys());case Object:case void 0:return mb(i,t,e||Object.keys(t))}return t instanceof fb.Vector?vD(i,t):!1}}function gD(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 vD(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 mb(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](),u=0,_=i.length,v=s.next(),S=r.next(),O=n.next();for(;u<_&&!S.done&&!O.done&&!v.done&&!(S.value!==O.value||!i[u](v.value));++u,S=r.next(),O=n.next(),v=s.next());return u===_&&S.done&&O.done&&v.done?!0:(r.return&&r.return(),n.return&&n.return(),s.return&&s.return(),!1)}});var Hr=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 Xc=Jt(),bb=rt(),ki=kn(),Un=qe(),Pt=ve(),wD=pr(),hr=Array.isArray;function el(i){return ArrayBuffer.isView(i)&&"BYTES_PER_ELEMENT"in i}nt.isTypedArray=el;function gb(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=gb;function jD(i){let e=gb(i.constructor);if(!e)throw new TypeError("Unrecognized Array input");let t=new e,r=Xc.Data.new(t,0,i.length,0,[void 0,i]);return Un.Vector.new(r)}nt.selectArgs=(i,e)=>_a(i,e,[],0);nt.selectColumnArgs=i=>{let[e,t]=il(i,[[],[]]);return t.map((r,n)=>r instanceof ki.Column?ki.Column.new(r.field.clone(e[n]),r):r instanceof Un.Vector?ki.Column.new(e[n],r):el(r)?ki.Column.new(e[n],jD(r)):ki.Column.new(e[n],[]))};nt.selectFieldArgs=i=>il(i,[[],[]]);nt.selectChunkArgs=(i,e)=>tl(i,e,[],0);nt.selectVectorChildrenArgs=(i,e)=>vb(i,e,[],0);nt.selectColumnChildrenArgs=(i,e)=>wb(i,e,[],0);function _a(i,e,t,r){let n,s=r,u=-1,_=e.length;for(;++u<_;)hr(n=e[u])?s=_a(i,n,t,s).length:n instanceof i&&(t[s++]=n);return t}function tl(i,e,t,r){let n,s=r,u=-1,_=e.length;for(;++u<_;)hr(n=e[u])?s=tl(i,n,t,s).length:n instanceof wD.Chunked?s=tl(i,n.chunks,t,s).length:n instanceof i&&(t[s++]=n);return t}function vb(i,e,t,r){let n,s=r,u=-1,_=e.length;for(;++u<_;)hr(n=e[u])?s=vb(i,n,t,s).length:n instanceof i?s=_a(Un.Vector,n.schema.fields.map((v,S)=>n.getChildAt(S)),t,s).length:n instanceof Un.Vector&&(t[s++]=n);return t}function wb(i,e,t,r){let n,s=r,u=-1,_=e.length;for(;++u<_;)hr(n=e[u])?s=wb(i,n,t,s).length:n instanceof i?s=_a(ki.Column,n.schema.fields.map((v,S)=>ki.Column.new(v,n.getChildAt(S))),t,s).length:n instanceof ki.Column&&(t[s++]=n);return t}var ID=(i,[e,t],r)=>(i[0][r]=e,i[1][r]=t,i);function il(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 il(i[0],e);i[0]instanceof Xc.Data||i[0]instanceof Un.Vector||el(i[0])||i[0]instanceof Pt.DataType||([t,i]=Object.entries(i[0]).reduce(ID,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,u=-1,_=i.length,v,S,[O,N]=e;for(;++u<_;)S=i[u],S instanceof ki.Column&&(N[++s]=S)?O[++n]=S.field.clone(t[u],S.type,!0):({[u]:v=u}=t,S instanceof Pt.DataType&&(N[++s]=S)?O[++n]=bb.Field.new(v,S,!0):(S==null?void 0:S.type)&&(N[++s]=S)&&(S instanceof Xc.Data&&(N[s]=S=Un.Vector.new(S)),O[++n]=bb.Field.new(v,S.type,!0)));return e}});var pr=R(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.Chunked=void 0;var TD=Os(),jb=ve(),BD=Hr(),Ib=qe(),Tb=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 Ib.AbstractVector{constructor(e,t=[],r=SD(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 BD.selectChunkArgs(Ib.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(jb.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 jb.DataType.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}[Symbol.iterator](){return new Tb(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 TD.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(u=>u.getChildAt(e)).filter(u=>u!=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 u=0,_=0,v=0;do{if(u+1===s)return t?t(this,u,r-_):[u,r-_];v=u+(s-u)/2|0,r>=n[v]?u=v:s=v}while(r<n[s]&&r>=(_=n[u]));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 u=new r(n),_=r===Array?OD:AD;for(let v=-1,S=0;++v<t;)S=_(s[v],u,S);return u}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,u=e.length,_=r,v=0,S=-1;for(;++s<u;){if(~(S=e[s].indexOf(n,_)))return v+S;_=0,v+=e[s].length}return-1}_sliceInternal(e,t,r){let n=[],{chunks:s,_chunkOffsets:u}=e;for(let _=-1,v=s.length;++_<v;){let S=s[_],O=S.length,N=u[_];if(N>=r)break;if(t>=N+O)continue;if(N>=t&&N+O<=r){n.push(S);continue}let q=Math.max(0,t-N),J=Math.min(r-N,O);n.push(S.slice(q,J))}return e.clone(n)}};ma.Chunked=Mi;function SD(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 AD=(i,e,t)=>(e.set(i,t),t+i.length),OD=(i,e,t)=>{let r=t;for(let n=-1,s=i.length;++n<s;)e[r++]=i[n];return r}});var kn=R(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});ba.Column=void 0;var Bb=rt(),Sb=qe(),rl=pr(),Yr=class extends rl.Chunked{constructor(e,t=[],r){t=rl.Chunked.flatten(...t);super(e.type,t,r);if(this._field=e,t.length===1&&!(this instanceof nl))return new nl(e,t[0],this._chunkOffsets)}static new(...e){let[t,r,...n]=e;typeof t!="string"&&!(t instanceof Bb.Field)&&(r=t,t="");let s=rl.Chunked.flatten(Array.isArray(r)?[...r,...n]:r instanceof Sb.Vector?[r,...n]:[Sb.Vector.new(r,...n)]);if(typeof t=="string"){let u=s[0].data.type;t=new Bb.Field(t,u,!0)}else!t.nullable&&s.some(({nullCount:u})=>u>0)&&(t=t.clone({nullable:!0}));return new Yr(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 Yr(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(u=>u.getChildAt(e)).filter(u=>u!=null),s.length>0)?t[e]=new Yr(n,s):null}};ba.Column=Yr;var nl=class extends Yr{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 Ab=R(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.instance=Mn.TypeAssembler=void 0;var DD=Ai(),FD=DD.flatbuffers.Long,ED=ut(),K=Qi(),sl=class extends ED.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 FD(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)}};Mn.TypeAssembler=sl;Mn.instance=new sl});var Ub=R(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.fieldFromJSON=_i.dictionaryBatchFromJSON=_i.recordBatchFromJSON=_i.schemaFromJSON=void 0;var Pn=rt(),Ee=ve(),Gr=Kr(),Vn=Se();function RD(i,e=new Map){return new Pn.Schema(UD(i,e),ga(i.customMetadata),e)}_i.schemaFromJSON=RD;function Ob(i){return new Gr.RecordBatch(i.count,Fb(i.columns),Eb(i.columns))}_i.recordBatchFromJSON=Ob;function CD(i){return new Gr.DictionaryBatch(Ob(i.data),i.id,i.isDelta)}_i.dictionaryBatchFromJSON=CD;function UD(i,e){return(i.fields||[]).filter(Boolean).map(t=>Pn.Field.fromJSON(t,e))}function Db(i,e){return(i.children||[]).filter(Boolean).map(t=>Pn.Field.fromJSON(t,e))}function Fb(i){return(i||[]).reduce((e,t)=>[...e,new Gr.FieldNode(t.count,kD(t.VALIDITY)),...Fb(t.children)],[])}function Eb(i,e=[]){for(let t=-1,r=(i||[]).length;++t<r;){let n=i[t];n.VALIDITY&&e.push(new Gr.BufferRegion(e.length,n.VALIDITY.length)),n.TYPE&&e.push(new Gr.BufferRegion(e.length,n.TYPE.length)),n.OFFSET&&e.push(new Gr.BufferRegion(e.length,n.OFFSET.length)),n.DATA&&e.push(new Gr.BufferRegion(e.length,n.DATA.length)),e=Eb(n.children,e)}return e}function kD(i){return(i||[]).reduce((e,t)=>e+ +(t===0),0)}function MD(i,e){let t,r,n,s,u,_;return!e||!(s=i.dictionary)?(u=Cb(i,Db(i,e)),n=new Pn.Field(i.name,u,i.nullable,ga(i.customMetadata))):e.has(t=s.id)?(r=(r=s.indexType)?Rb(r):new Ee.Int32,_=new Ee.Dictionary(e.get(t),r,t,s.isOrdered),n=new Pn.Field(i.name,_,i.nullable,ga(i.customMetadata))):(r=(r=s.indexType)?Rb(r):new Ee.Int32,e.set(t,u=Cb(i,Db(i,e))),_=new Ee.Dictionary(u,r,t,s.isOrdered),n=new Pn.Field(i.name,_,i.nullable,ga(i.customMetadata))),n||null}_i.fieldFromJSON=MD;function ga(i){return new Map(Object.entries(i||{}))}function Rb(i){return new Ee.Int(i.isSigned,i.bitWidth)}function Cb(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(Vn.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_(Vn.DateUnit[r.unit])}case"time":{let r=i.type;return new Ee.Time(Vn.TimeUnit[r.unit],r.bitWidth)}case"timestamp":{let r=i.type;return new Ee.Timestamp(Vn.TimeUnit[r.unit],r.timezone)}case"interval":{let r=i.type;return new Ee.Interval(Vn.IntervalUnit[r.unit])}case"union":{let r=i.type;return new Ee.Union(Vn.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 Kr=R(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.FieldNode=Nt.BufferRegion=Nt.DictionaryBatch=Nt.RecordBatch=Nt.Message=void 0;var ol=Ai(),Y=Qi(),Ue=Io(),st=rt(),PD=Ze(),Ne=Se(),al=Ab(),va=Ub(),$r=ol.flatbuffers.Long,VD=ol.flatbuffers.Builder,ND=ol.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=LD(e,t),r}static decode(e){e=new ND(PD.toUint8Array(e));let t=Ue.Message.getRootAsMessage(e),r=t.bodyLength(),n=t.version(),s=t.headerType(),u=new yr(r,n,s);return u._createHeader=xD(t,s),u}static encode(e){let t=new VD,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 $r(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 Jr=class{constructor(e,t){this.offset=typeof e=="number"?e:e.low,this.length=typeof t=="number"?t:t.low}};Nt.BufferRegion=Jr;var Qr=class{constructor(e,t){this.length=typeof e=="number"?e:e.low,this.nullCount=typeof t=="number"?t:t.low}};Nt.FieldNode=Qr;function LD(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 xD(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=ZD;st.Field.decode=JD;st.Field.fromJSON=va.fieldFromJSON;st.Schema.encode=QD;st.Schema.decode=qD;st.Schema.fromJSON=va.schemaFromJSON;Vt.encode=XD;Vt.decode=WD;Vt.fromJSON=va.recordBatchFromJSON;mi.encode=eF;mi.decode=zD;mi.fromJSON=va.dictionaryBatchFromJSON;Qr.encode=tF;Qr.decode=YD;Jr.encode=iF;Jr.decode=HD;function qD(i,e=new Map){let t=$D(i,e);return new st.Schema(t,wa(i),e)}function WD(i,e=Ne.MetadataVersion.V4){return new Vt(i.length(),GD(i),KD(i,e))}function zD(i,e=Ne.MetadataVersion.V4){return new mi(Vt.decode(i.data(),e),i.id(),i.isDelta())}function HD(i){return new Jr(i.offset(),i.length())}function YD(i){return new Qr(i.length(),i.nullCount())}function GD(i){let e=[];for(let t,r=-1,n=-1,s=i.nodesLength();++r<s;)(t=i.nodes(r))&&(e[++n]=Qr.decode(t));return e}function KD(i,e){let t=[];for(let r,n=-1,s=-1,u=i.buffersLength();++n<u;)(r=i.buffers(n))&&(e<Ne.MetadataVersion.V4&&(r.bb_pos+=8*(n+1)),t[++s]=Jr.decode(r));return t}function $D(i,e){let t=[];for(let r,n=-1,s=-1,u=i.fieldsLength();++n<u;)(r=i.fields(n))&&(t[++s]=st.Field.decode(r,e));return t}function kb(i,e){let t=[];for(let r,n=-1,s=-1,u=i.childrenLength();++n<u;)(r=i.children(n))&&(t[++s]=st.Field.decode(r,e));return t}function JD(i,e){let t,r,n,s,u,_;return!e||!(_=i.dictionary())?(n=Pb(i,kb(i,e)),r=new st.Field(i.name(),n,i.nullable(),wa(i))):e.has(t=_.id().low)?(s=(s=_.indexType())?Mb(s):new Re.Int32,u=new Re.Dictionary(e.get(t),s,t,_.isOrdered()),r=new st.Field(i.name(),u,i.nullable(),wa(i))):(s=(s=_.indexType())?Mb(s):new Re.Int32,e.set(t,n=Pb(i,kb(i,e))),u=new Re.Dictionary(n,s,t,_.isOrdered()),r=new st.Field(i.name(),u,i.nullable(),wa(i))),r||null}function wa(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 Mb(i){return new Re.Int(i.isSigned(),i.bitWidth())}function Pb(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 QD(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,u])=>{let _=i.createString(`${s}`),v=i.createString(`${u}`);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,rF?Y.Endianness.Little:Y.Endianness.Big),n!==-1&&Y.Schema.addCustomMetadata(i,n),Y.Schema.endSchema(i)}function ZD(i,e){let t=-1,r=-1,n=-1,s=e.type,u=e.typeId;Re.DataType.isDictionary(s)?(u=s.dictionary.typeId,n=al.instance.visit(s,i),r=al.instance.visit(s.dictionary,i)):r=al.instance.visit(s,i);let _=(s.children||[]).map(O=>st.Field.encode(i,O)),v=Y.Field.createChildrenVector(i,_),S=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,u),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),S!==-1&&Y.Field.addCustomMetadata(i,S),Y.Field.endField(i)}function XD(i,e){let t=e.nodes||[],r=e.buffers||[];Ue.RecordBatch.startNodesVector(i,t.length),t.slice().reverse().forEach(u=>Qr.encode(i,u));let n=i.endVector();Ue.RecordBatch.startBuffersVector(i,r.length),r.slice().reverse().forEach(u=>Jr.encode(i,u));let s=i.endVector();return Ue.RecordBatch.startRecordBatch(i),Ue.RecordBatch.addLength(i,new $r(e.length,0)),Ue.RecordBatch.addNodes(i,n),Ue.RecordBatch.addBuffers(i,s),Ue.RecordBatch.endRecordBatch(i)}function eF(i,e){let t=Vt.encode(i,e.data);return Ue.DictionaryBatch.startDictionaryBatch(i),Ue.DictionaryBatch.addId(i,new $r(e.id,0)),Ue.DictionaryBatch.addIsDelta(i,e.isDelta),Ue.DictionaryBatch.addData(i,t),Ue.DictionaryBatch.endDictionaryBatch(i)}function tF(i,e){return Ue.FieldNode.createFieldNode(i,new $r(e.length,0),new $r(e.nullCount,0))}function iF(i,e){return Y.Buffer.createBuffer(i,new $r(e.offset,0),new $r(e.length,0))}var rF=function(){let i=new ArrayBuffer(2);return new DataView(i).setInt16(0,256,!0),new Int16Array(i)[0]===256}()});var Ia=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(),nF=Ai(),Vb=nF.flatbuffers.ByteBuffer,Ds=Kr(),sF=ft(),oF=Kc(),Nb=Ze(),ja=lr(),ei=un(),ul=i=>`Expected ${mr.MessageHeader[i]} Message in stream, but was null or length 0.`,cl=i=>`Header pointer of flatbuffer-encoded ${mr.MessageHeader[i]} Message is null or length 0.`,Lb=(i,e)=>`Expected to read ${i} metadata bytes, but only read ${e}.`,xb=(i,e)=>`Expected to read ${i} bytes for message body, but only read ${e}.`,ll=class{constructor(e){this.source=e instanceof ja.ByteStream?e:new ja.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(ul(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=Nb.toUint8Array(this.source.read(e));if(t.byteLength<e)throw new Error(xb(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(cl(t));return n}readMetadataLength(){let e=this.source.read(ye.PADDING),t=e&&new Vb(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(Lb(e,t.byteLength));return{done:!1,value:Ds.Message.decode(t)}}};ye.MessageReader=ll;var qb=class{constructor(e,t){this.source=e instanceof ja.AsyncByteStream?e:sF.isFileHandle(e)?new oF.AsyncRandomAccessFile(e,t):new ja.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(ul(e));return t.value})}readMessageBody(e){return _r.__awaiter(this,void 0,void 0,function*(){if(e<=0)return new Uint8Array(0);let t=Nb.toUint8Array(yield this.source.read(e));if(t.byteLength<e)throw new Error(xb(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(cl(t));return n})}readMetadataLength(){return _r.__awaiter(this,void 0,void 0,function*(){let e=yield this.source.read(ye.PADDING),t=e&&new Vb(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(Lb(e,t.byteLength));return{done:!1,value:Ds.Message.decode(t)}})}};ye.AsyncMessageReader=qb;var Wb=class extends ll{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=Ds.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=Ds.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=Ds.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(ul(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(cl(e));return r}};ye.JSONMessageReader=Wb;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 aF(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=aF;ye.magicLength=ye.MAGIC.length;ye.magicAndPadding=ye.magicLength+ye.PADDING;ye.magicX2AndPadding=ye.magicLength*2+ye.PADDING});var pl=R(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.compareTypes=Le.compareFields=Le.compareSchemas=Le.instance=Le.TypeComparator=void 0;var uF=ut(),Q=class extends uF.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 Fs(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 Ta(i,e){return i===e||wt(i,e)&&i.precision===e.precision}function cF(i,e){return i===e||wt(i,e)&&i.byteWidth===e.byteWidth}function dl(i,e){return i===e||wt(i,e)&&i.unit===e.unit}function Es(i,e){return i===e||wt(i,e)&&i.unit===e.unit&&i.timezone===e.timezone}function Rs(i,e){return i===e||wt(i,e)&&i.unit===e.unit&&i.bitWidth===e.bitWidth}function lF(i,e){return i===e||wt(i,e)&&i.children.length===e.children.length&&Le.instance.compareManyFields(i.children,e.children)}function dF(i,e){return i===e||wt(i,e)&&i.children.length===e.children.length&&Le.instance.compareManyFields(i.children,e.children)}function fl(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 fF(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 hl(i,e){return i===e||wt(i,e)&&i.unit===e.unit}function hF(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 pF(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=Fs;Q.prototype.visitBool=Fs;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=Ta;Q.prototype.visitFloat16=Ta;Q.prototype.visitFloat32=Ta;Q.prototype.visitFloat64=Ta;Q.prototype.visitUtf8=Fs;Q.prototype.visitBinary=Fs;Q.prototype.visitFixedSizeBinary=cF;Q.prototype.visitDate=dl;Q.prototype.visitDateDay=dl;Q.prototype.visitDateMillisecond=dl;Q.prototype.visitTimestamp=Es;Q.prototype.visitTimestampSecond=Es;Q.prototype.visitTimestampMillisecond=Es;Q.prototype.visitTimestampMicrosecond=Es;Q.prototype.visitTimestampNanosecond=Es;Q.prototype.visitTime=Rs;Q.prototype.visitTimeSecond=Rs;Q.prototype.visitTimeMillisecond=Rs;Q.prototype.visitTimeMicrosecond=Rs;Q.prototype.visitTimeNanosecond=Rs;Q.prototype.visitDecimal=Fs;Q.prototype.visitList=lF;Q.prototype.visitStruct=dF;Q.prototype.visitUnion=fl;Q.prototype.visitDenseUnion=fl;Q.prototype.visitSparseUnion=fl;Q.prototype.visitDictionary=fF;Q.prototype.visitInterval=hl;Q.prototype.visitIntervalDayTime=hl;Q.prototype.visitIntervalYearMonth=hl;Q.prototype.visitFixedSizeList=hF;Q.prototype.visitMap=pF;Le.instance=new Q;function yF(i,e){return Le.instance.compareSchemas(i,e)}Le.compareSchemas=yF;function _F(i,e){return Le.instance.compareFields(i,e)}Le.compareFields=_F;function mF(i,e){return Le.instance.visit(i,e)}Le.compareTypes=mF});var Kb=R(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});Ba.VectorAssembler=void 0;var bF=ut(),zb=Se(),gF=Vi(),yl=Ze(),_l=ci(),vF=Hr(),Hb=Kr(),Yb=ve(),Je=class extends bF.Visitor{constructor(){super();this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(...e){let t=new Je,r=vF.selectVectorChildrenArgs(gF.RecordBatch,e),[n=t]=t.visitMany(r);return n}visit(e){if(!Yb.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");Yb.DataType.isNull(e.type)||ti.call(this,n<=0?new Uint8Array(0):_l.truncateBitmap(t.offset,r,t.nullBitmap)),this.nodes.push(new Hb.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}};Ba.VectorAssembler=Je;function ti(i){let e=i.byteLength+7&~7;return this.buffers.push(i),this.bufferRegions.push(new Hb.BufferRegion(this._byteLength,e)),this._byteLength+=e,this}function wF(i){let{type:e,length:t,typeIds:r,valueOffsets:n}=i;if(ti.call(this,r),e.mode===zb.UnionMode.Sparse)return bl.call(this,i);if(e.mode===zb.UnionMode.Dense){if(i.offset<=0)return ti.call(this,n),bl.call(this,i);{let s=r.reduce((O,N)=>Math.max(O,N),r[0]),u=new Int32Array(s+1),_=new Int32Array(s+1).fill(-1),v=new Int32Array(t),S=yl.rebaseValueOffsets(-n[0],t,n);for(let O,N,q=-1;++q<t;)(N=_[O=r[q]])===-1&&(N=_[O]=S[O]),v[q]=S[q]-N,++u[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,u[J]);this.visit(O.slice(_[J],ke))}}}return this}function jF(i){let e;return i.nullCount>=i.length?ti.call(this,new Uint8Array(0)):(e=i.values)instanceof Uint8Array?ti.call(this,_l.truncateBitmap(i.offset,i.length,e)):ti.call(this,_l.packBools(i))}function br(i){return ti.call(this,i.values.subarray(0,i.length*i.stride))}function Gb(i){let{length:e,values:t,valueOffsets:r}=i,n=r[0],s=r[e],u=Math.min(s-n,t.byteLength-n);return ti.call(this,yl.rebaseValueOffsets(-r[0],e,r)),ti.call(this,t.subarray(n,n+u)),this}function ml(i){let{length:e,valueOffsets:t}=i;return t&&ti.call(this,yl.rebaseValueOffsets(t[0],e,t)),this.visit(i.getChildAt(0))}function bl(i){return this.visitMany(i.type.children.map((e,t)=>i.getChildAt(t)).filter(Boolean))[0]}Je.prototype.visitBool=jF;Je.prototype.visitInt=br;Je.prototype.visitFloat=br;Je.prototype.visitUtf8=Gb;Je.prototype.visitBinary=Gb;Je.prototype.visitFixedSizeBinary=br;Je.prototype.visitDate=br;Je.prototype.visitTimestamp=br;Je.prototype.visitTime=br;Je.prototype.visitDecimal=br;Je.prototype.visitList=ml;Je.prototype.visitStruct=bl;Je.prototype.visitUnion=wF;Je.prototype.visitInterval=br;Je.prototype.visitFixedSizeList=ml;Je.prototype.visitMap=ml});var Jb=R(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});Sa.JSONTypeAssembler=void 0;var IF=ut(),lt=Qi(),Nn=Se(),$b=class extends IF.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:Nn.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:Nn.DateUnit[t]}}visitTime({typeId:e,unit:t,bitWidth:r}){return{name:lt.Type[e].toLowerCase(),unit:Nn.TimeUnit[t],bitWidth:r}}visitTimestamp({typeId:e,timezone:t,unit:r}){return{name:lt.Type[e].toLowerCase(),unit:Nn.TimeUnit[r],timezone:t}}visitInterval({typeId:e,unit:t}){return{name:lt.Type[e].toLowerCase(),unit:Nn.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:Nn.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}}};Sa.JSONTypeAssembler=$b});var Xb=R(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.JSONVectorAssembler=void 0;var TF=vs(),Cs=kn(),BF=qe(),SF=ut(),AF=Se(),OF=Vi(),gl=Se(),Aa=ci(),DF=Hr(),Qb=ve(),Oa=class extends SF.Visitor{static assemble(...e){return new Oa().visitMany(DF.selectColumnChildrenArgs(OF.RecordBatch,e))}visit(e){let{data:t,name:r,length:n}=e,{offset:s,nullCount:u,nullBitmap:_}=t,v=Qb.DataType.isDictionary(e.type)?e.type.indices:e.type,S=Object.assign([],t.buffers,{[AF.BufferType.VALIDITY]:void 0});return Object.assign({name:r,count:n,VALIDITY:Qb.DataType.isNull(v)?void 0:u<=0?Array.from({length:n},()=>1):[...new Aa.BitIterator(_,s,n,null,Aa.getBit)]},super.visit(BF.Vector.new(t.clone(v,s,n,0,S))))}visitNull(){return{}}visitBool({values:e,offset:t,length:r}){return{DATA:[...new Aa.BitIterator(e,t,r,null,Aa.getBool)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[...Us(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...e],OFFSET:[...e.valueOffsets]}}visitBinary(e){return{DATA:[...Zb(e)],OFFSET:[...e.valueOffsets]}}visitFixedSizeBinary(e){return{DATA:[...Zb(e)]}}visitDate(e){return{DATA:e.type.unit===gl.DateUnit.DAY?[...e.values]:[...Us(e.values,2)]}}visitTimestamp(e){return{DATA:[...Us(e.values,2)]}}visitTime(e){return{DATA:e.type.unit<gl.TimeUnit.MICROSECOND?[...e.values]:[...Us(e.values,2)]}}visitDecimal(e){return{DATA:[...Us(e.values,4)]}}visitList(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,r)=>this.visit(new Cs.Column(t,[e.getChildAt(r)])))}}visitStruct(e){return{children:e.type.children.map((t,r)=>this.visit(new Cs.Column(t,[e.getChildAt(r)])))}}visitUnion(e){return{TYPE:[...e.typeIds],OFFSET:e.type.mode===gl.UnionMode.Dense?[...e.valueOffsets]:void 0,children:e.type.children.map((t,r)=>this.visit(new Cs.Column(t,[e.getChildAt(r)])))}}visitInterval(e){return{DATA:[...e.values]}}visitFixedSizeList(e){return{children:e.type.children.map((t,r)=>this.visit(new Cs.Column(t,[e.getChildAt(r)])))}}visitMap(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,r)=>this.visit(new Cs.Column(t,[e.getChildAt(r)])))}}};Da.JSONVectorAssembler=Oa;function*Zb(i){for(let e of i)yield e.reduce((t,r)=>`${t}${("0"+(r&255).toString(16)).slice(-2)}`,"").toUpperCase()}function*Us(i,e){for(let t=-1,r=i.length/e;++t<r;)yield`${TF.BN.new(i.subarray((t+0)*e,(t+1)*e),!1)}`}});var Ua=R(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.RecordBatchJSONWriter=gi.RecordBatchFileWriter=gi.RecordBatchStreamWriter=gi.RecordBatchWriter=void 0;var eg=dt(),vl=Ms(),FF=Ia(),EF=kn(),RF=ve(),CF=rt(),Fa=Kr(),wl=Kr(),Ln=Hc(),jl=Se(),tg=pl(),Il=lr(),ig=Kb(),UF=Jb(),rg=Xb(),kF=Ze(),Tl=Vi(),MF=un(),bi=ft(),ks=class extends MF.ReadableInterop{constructor(e){super();this._position=0,this._started=!1,this._sink=new Il.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)?Sl(this,e):Bl(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 Il.AsyncByteQueue?this._sink=e:(this._sink=new Il.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||!tg.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 vl.Table&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof Tl.RecordBatch&&!(t=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(t&&!tg.compareSchemas(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof Tl.RecordBatch?e instanceof Tl._InternalEmptyPlaceholderRecordBatch||this._writeRecordBatch(e):e instanceof vl.Table?this.writeAll(e.chunks):bi.isIterable(e)&&this.writeAll(e)}_writeMessage(e,t=8){let r=t-1,n=Fa.Message.encode(e),s=n.byteLength,u=this._writeLegacyIpcFormat?4:8,_=s+u+r&~r,v=_-s-u;return e.headerType===jl.MessageHeader.RecordBatch?this._recordBatchBlocks.push(new Ln.FileBlock(_,e.bodyLength,this._position)):e.headerType===jl.MessageHeader.DictionaryBatch&&this._dictionaryBlocks.push(new Ln.FileBlock(_,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(_-u)),s>0&&this._write(n),this._writePadding(v)}_write(e){if(this._started){let t=kF.toUint8Array(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(Fa.Message.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(FF.MAGIC)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:r,bufferRegions:n,buffers:s}=ig.VectorAssembler.assemble(e),u=new wl.RecordBatch(e.length,r,n),_=Fa.Message.from(u,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:u,buffers:_}=ig.VectorAssembler.assemble(e),v=new wl.RecordBatch(e.length,s,u),S=new wl.DictionaryBatch(v,t,r),O=Fa.Message.from(S,n);return this._writeMessage(O)._writeBodyBuffers(_)}_writeBodyBuffers(e){let t,r,n;for(let s=-1,u=e.length;++s<u;)(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 u of s)this._writeDictionaryBatch(u,t,n>0),n+=u.length}}return this}};gi.RecordBatchWriter=ks;var Ea=class extends ks{static writeAll(e,t){let r=new Ea(t);return bi.isPromise(e)?e.then(n=>r.writeAll(n)):bi.isAsyncIterable(e)?Sl(r,e):Bl(r,e)}};gi.RecordBatchStreamWriter=Ea;var Ra=class extends ks{static writeAll(e){let t=new Ra;return bi.isPromise(e)?e.then(r=>t.writeAll(r)):bi.isAsyncIterable(e)?Sl(t,e):Bl(t,e)}constructor(){super();this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){let t=Ln.Footer.encode(new Ln.Footer(e,jl.MetadataVersion.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};gi.RecordBatchFileWriter=Ra;var Ca=class extends ks{constructor(){super();this._autoDestroy=!0,this._recordBatches=[],this._dictionaries=[]}static writeAll(e){return new Ca().writeAll(e)}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write(`{
|
|
8
|
-
"schema": ${JSON.stringify({fields:e.fields.map(
|
|
9
|
-
`),this._write(`${
|
|
7
|
+
return true;`)}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(`${
|
|
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()}};gi.RecordBatchJSONWriter=Ca;function Bl(i,e){let t=e;e instanceof vl.Table&&(t=e.chunks,i.reset(void 0,e.schema));for(let r of t)i.write(r);return i.finish()}function Sl(i,e){var t,r,n,s;return eg.__awaiter(this,void 0,void 0,function*(){try{for(t=eg.__asyncValues(e);r=yield t.next(),!r.done;){let u=r.value;i.write(u)}}catch(u){n={error:u}}finally{try{r&&!r.done&&(s=t.return)&&(yield s.call(t))}finally{if(n)throw n.error}}return i.finish()})}function ng({name:i,type:e,nullable:t}){let r=new UF.JSONTypeAssembler;return{name:i,nullable:t,type:r.visit(e),children:(e.children||[]).map(ng),dictionary:RF.DataType.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:r.visit(e.indices)}:void 0}}function PF(i,e,t=!1){let r=new CF.Field(`${e}`,i.type,i.nullCount>0),n=rg.JSONVectorAssembler.assemble(new EF.Column(r,[i]));return JSON.stringify({id:e,isDelta:t,data:{count:i.length,columns:n}},null,2)}function VF(i){return JSON.stringify({count:i.length,columns:rg.JSONVectorAssembler.assemble(i)},null,2)}});var Dl=R(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.distributeVectorsIntoRecordBatches=gr.distributeColumnsIntoRecordBatches=gr.ensureSameLengthData=void 0;var sg=Jt(),Al=rt(),NF=pr(),LF=Vi(),Ol=new Uint8Array(0),og=i=>[Ol,Ol,new Uint8Array(i),Ol];function xF(i,e,t=e.reduce((r,n)=>Math.max(r,n.length),0)){let r,n,s=-1,u=e.length,_=[...i.fields],v=[],S=(t+63&~63)>>3;for(;++s<u;)(r=e[s])&&r.length===t?v[s]=r:((n=_[s]).nullable||(_[s]=_[s].clone({nullable:!0})),v[s]=r?r._changeLengthAndBackfillNullBitmap(t):sg.Data.new(n.type,0,t,t,og(S)));return[new Al.Schema(_),t,v]}gr.ensureSameLengthData=xF;function qF(i){return ag(new Al.Schema(i.map(({field:e})=>e)),i)}gr.distributeColumnsIntoRecordBatches=qF;function ag(i,e){return WF(i,e.map(t=>t instanceof NF.Chunked?t.chunks.map(r=>r.data):[t.data]))}gr.distributeVectorsIntoRecordBatches=ag;function WF(i,e){let t=[...i.fields],r=[],n={numBatches:e.reduce((N,q)=>Math.max(N,q.length),0)},s=0,u=0,_=-1,v=e.length,S,O=[];for(;n.numBatches-- >0;){for(u=Number.POSITIVE_INFINITY,_=-1;++_<v;)O[_]=S=e[_].shift(),u=Math.min(u,S?S.length:u);isFinite(u)&&(O=zF(t,u,O,e,n),u>0&&(r[s++]=[u,O.slice()]))}return[i=new Al.Schema(t,i.metadata),r.map(N=>new LF.RecordBatch(i,...N))]}function zF(i,e,t,r,n){let s,u,_=0,v=-1,S=r.length,O=(e+63&~63)>>3;for(;++v<S;)(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))):((u=i[v]).nullable||(i[v]=u.clone({nullable:!0})),t[v]=s?s._changeLengthAndBackfillNullBitmap(e):sg.Data.new(u.type,0,e,e,og(O)));return t}});var ze=R(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.BaseVector=void 0;var HF=Se(),YF=pr(),GF=Os(),Fl=qe(),El=class extends Fl.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`${HF.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 Fl.Vector.new(e,t)}concat(...e){return YF.Chunked.concat(this,...e)}slice(e,t){return GF.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]=Fl.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){}};ka.BaseVector=El;El.prototype[Symbol.isConcatSpreadable]=!0});var Rl=R(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.BinaryVector=void 0;var KF=qe(),$F=ze(),JF=ve(),ug=class extends $F.BaseVector{asUtf8(){return KF.Vector.new(this.data.clone(new JF.Utf8))}};Ma.BinaryVector=ug});var Cl=R(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.BoolVector=void 0;var QF=ve(),ZF=ze(),XF=vi(),cg=class extends ZF.BaseVector{static from(e){return XF.vectorFromValuesWithType(()=>new QF.Bool,e)}};Pa.BoolVector=cg});var kl=R(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.DateMillisecondVector=vr.DateDayVector=vr.DateVector=void 0;var eE=Se(),tE=ze(),lg=vi(),Ul=ve(),Va=class extends tE.BaseVector{static from(...e){return e.length===2?lg.vectorFromValuesWithType(()=>e[1]===eE.DateUnit.DAY?new Ul.DateDay:new Ul.DateMillisecond,e[0]):lg.vectorFromValuesWithType(()=>new Ul.DateMillisecond,e[0])}};vr.DateVector=Va;var dg=class extends Va{};vr.DateDayVector=dg;var fg=class extends Va{};vr.DateMillisecondVector=fg});var Ml=R(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.DecimalVector=void 0;var iE=ze(),hg=class extends iE.BaseVector{};Na.DecimalVector=hg});var xa=R(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.DictionaryVector=void 0;var rE=Jt(),pg=qe(),nE=ze(),sE=vi(),oE=ve(),Pl=class extends nE.BaseVector{constructor(e){super(e);this.indices=pg.Vector.new(e.clone(this.type.indices))}static from(...e){if(e.length===3){let[t,r,n]=e,s=new oE.Dictionary(t.type,r,null,null);return pg.Vector.new(rE.Data.Dictionary(s,0,n.length,0,null,n,t))}return sE.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)}};La.DictionaryVector=Pl;Pl.prototype.indices=null});var Vl=R(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.FixedSizeBinaryVector=void 0;var aE=ze(),yg=class extends aE.BaseVector{};qa.FixedSizeBinaryVector=yg});var Nl=R(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});Wa.FixedSizeListVector=void 0;var uE=ze(),_g=class extends uE.BaseVector{};Wa.FixedSizeListVector=_g});var Wl=R(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.Float64Vector=wi.Float32Vector=wi.Float16Vector=wi.FloatVector=void 0;var cE=Jt(),lE=qe(),dE=ze(),fE=vi(),Zr=ve(),Ps=class extends dE.BaseVector{static from(e){let t=yE(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){let r=pE(e.constructor)||t;if(t===null&&(t=r),t&&t===r){let n=new t,s=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!hE(t,e.constructor))return lE.Vector.new(cE.Data.Float(n,0,s,0,null,e))}}if(t)return fE.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=Ps;var Ll=class extends Ps{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}};wi.Float16Vector=Ll;var xl=class extends Ps{};wi.Float32Vector=xl;var ql=class extends Ps{};wi.Float64Vector=ql;var hE=(i,e)=>i===Zr.Float16&&e!==Uint16Array,pE=i=>{switch(i){case Uint16Array:return Zr.Float16;case Float32Array:return Zr.Float32;case Float64Array:return Zr.Float64;default:return null}},yE=i=>{switch(i){case Ll:return Zr.Float16;case xl:return Zr.Float32;case ql:return Zr.Float64;default:return null}}});var zl=R(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.IntervalYearMonthVector=wr.IntervalDayTimeVector=wr.IntervalVector=void 0;var _E=ze(),za=class extends _E.BaseVector{};wr.IntervalVector=za;var mg=class extends za{};wr.IntervalDayTimeVector=mg;var bg=class extends za{};wr.IntervalYearMonthVector=bg});var Ha=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 mE=Jt(),bE=qe(),gE=ze(),vE=vi(),gg=ft(),vg=Ze(),xe=ve(),ji=class extends gE.BaseVector{static from(...e){let[t,r=!1]=e,n=IE(this,r);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let s=jE(t.constructor,r)||n;if(n===null&&(n=s),n&&n===s){let u=new n,_=t.byteLength/u.ArrayType.BYTES_PER_ELEMENT;return wE(n,t.constructor)&&(_*=.5),bE.Vector.new(mE.Data.Int(u,0,_,0,null,t))}}if(n)return vE.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 Hl=class extends ji{};Qe.Int8Vector=Hl;var Yl=class extends ji{};Qe.Int16Vector=Yl;var Gl=class extends ji{};Qe.Int32Vector=Gl;var Kl=class extends ji{toBigInt64Array(){return vg.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}};Qe.Int64Vector=Kl;var $l=class extends ji{};Qe.Uint8Vector=$l;var Jl=class extends ji{};Qe.Uint16Vector=Jl;var Ql=class extends ji{};Qe.Uint32Vector=Ql;var Zl=class extends ji{toBigUint64Array(){return vg.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}};Qe.Uint64Vector=Zl;var wE=(i,e)=>(i===xe.Int64||i===xe.Uint64)&&(e===Int32Array||e===Uint32Array),jE=(i,e)=>{switch(i){case Int8Array:return xe.Int8;case Int16Array:return xe.Int16;case Int32Array:return e?xe.Int64:xe.Int32;case gg.BigInt64Array:return xe.Int64;case Uint8Array:return xe.Uint8;case Uint16Array:return xe.Uint16;case Uint32Array:return e?xe.Uint64:xe.Uint32;case gg.BigUint64Array:return xe.Uint64;default:return null}},IE=(i,e)=>{switch(i){case Hl:return xe.Int8;case Yl:return xe.Int16;case Gl:return e?xe.Int64:xe.Int32;case Kl:return xe.Int64;case $l:return xe.Uint8;case Jl:return xe.Uint16;case Ql:return e?xe.Uint64:xe.Uint32;case Zl:return xe.Uint64;default:return null}}});var Xl=R(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.ListVector=void 0;var TE=ze(),wg=class extends TE.BaseVector{};Ya.ListVector=wg});var ed=R(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.MapVector=void 0;var BE=Ss(),SE=qe(),AE=ze(),OE=ve(),jg=class extends AE.BaseVector{asList(){let e=this.type.children[0];return SE.Vector.new(this.data.clone(new OE.List(e)))}bind(e){let t=this.getChildAt(0),{[e]:r,[e+1]:n}=this.valueOffsets;return new BE.MapRow(t.slice(r,n))}};Ga.MapVector=jg});var td=R(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.NullVector=void 0;var DE=ze(),Ig=class extends DE.BaseVector{};Ka.NullVector=Ig});var id=R($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});$a.StructVector=void 0;var FE=Ss(),EE=ze(),RE=Symbol.for("rowIndex"),Tg=class extends EE.BaseVector{bind(e){let t=this._row||(this._row=new FE.StructRow(this)),r=Object.create(t);return r[RE]=e,r}};$a.StructVector=Tg});var rd=R(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.TimestampNanosecondVector=Lt.TimestampMicrosecondVector=Lt.TimestampMillisecondVector=Lt.TimestampSecondVector=Lt.TimestampVector=void 0;var CE=ze(),xn=class extends CE.BaseVector{};Lt.TimestampVector=xn;var Bg=class extends xn{};Lt.TimestampSecondVector=Bg;var Sg=class extends xn{};Lt.TimestampMillisecondVector=Sg;var Ag=class extends xn{};Lt.TimestampMicrosecondVector=Ag;var Og=class extends xn{};Lt.TimestampNanosecondVector=Og});var nd=R(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.TimeNanosecondVector=xt.TimeMicrosecondVector=xt.TimeMillisecondVector=xt.TimeSecondVector=xt.TimeVector=void 0;var UE=ze(),qn=class extends UE.BaseVector{};xt.TimeVector=qn;var Dg=class extends qn{};xt.TimeSecondVector=Dg;var Fg=class extends qn{};xt.TimeMillisecondVector=Fg;var Eg=class extends qn{};xt.TimeMicrosecondVector=Eg;var Rg=class extends qn{};xt.TimeNanosecondVector=Rg});var sd=R(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.SparseUnionVector=jr.DenseUnionVector=jr.UnionVector=void 0;var kE=ze(),Ja=class extends kE.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}};jr.UnionVector=Ja;var Cg=class extends Ja{get valueOffsets(){return this.data.valueOffsets}};jr.DenseUnionVector=Cg;var Ug=class extends Ja{};jr.SparseUnionVector=Ug});var od=R(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.Utf8Vector=void 0;var ME=qe(),PE=ze(),kg=ve(),VE=vi(),Mg=class extends PE.BaseVector{static from(e){return VE.vectorFromValuesWithType(()=>new kg.Utf8,e)}asBinary(){return ME.Vector.new(this.data.clone(new kg.Binary))}};Qa.Utf8Vector=Mg});var Pg=R(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.partial2=Ir.partial1=Ir.partial0=void 0;function NE(i){return function(){return i(this)}}Ir.partial0=NE;function LE(i){return function(e){return i(this,e)}}Ir.partial1=LE;function xE(i){return function(e,t){return i(this,e,t)}}Ir.partial2=xE});var cd=R(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.instance=Wn.GetVisitor=void 0;var Za=vs(),qE=ut(),WE=Er(),zE=_s(),qt=Se(),Z=class extends qE.Visitor{};Wn.GetVisitor=Z;var HE=(i,e)=>864e5*i[e],ad=(i,e)=>4294967296*i[e+1]+(i[e]>>>0),YE=(i,e)=>4294967296*(i[e+1]/1e3)+(i[e]>>>0)/1e3,GE=(i,e)=>4294967296*(i[e+1]/1e6)+(i[e]>>>0)/1e6,Vg=i=>new Date(i),KE=(i,e)=>Vg(HE(i,e)),$E=(i,e)=>Vg(ad(i,e)),JE=(i,e)=>null,Ng=(i,e,t)=>{let{[t]:r,[t+1]:n}=e;return r!=null&&n!=null?i.subarray(r,n):null},QE=({offset:i,values:e},t)=>{let r=i+t;return(e[r>>3]&1<<r%8)!=0},Lg=({values:i},e)=>KE(i,e),xg=({values:i},e)=>$E(i,e*2),Ii=({stride:i,values:e},t)=>e[i*t],qg=({stride:i,values:e},t)=>zE.uint16ToFloat64(e[i*t]),ud=({stride:i,values:e,type:t},r)=>Za.BN.new(e.subarray(i*r,i*(r+1)),t.isSigned),ZE=({stride:i,values:e},t)=>e.subarray(i*t,i*(t+1)),XE=({values:i,valueOffsets:e},t)=>Ng(i,e,t),eR=({values:i,valueOffsets:e},t)=>{let r=Ng(i,e,t);return r!==null?WE.decodeUtf8(r):null},tR=(i,e)=>i.type.bitWidth<64?Ii(i,e):ud(i,e),iR=(i,e)=>i.type.precision!==qt.Precision.HALF?Ii(i,e):qg(i,e),rR=(i,e)=>i.type.unit===qt.DateUnit.DAY?Lg(i,e):xg(i,e),Wg=({values:i},e)=>1e3*ad(i,e*2),zg=({values:i},e)=>ad(i,e*2),Hg=({values:i},e)=>YE(i,e*2),Yg=({values:i},e)=>GE(i,e*2),nR=(i,e)=>{switch(i.type.unit){case qt.TimeUnit.SECOND:return Wg(i,e);case qt.TimeUnit.MILLISECOND:return zg(i,e);case qt.TimeUnit.MICROSECOND:return Hg(i,e);case qt.TimeUnit.NANOSECOND:return Yg(i,e)}},Gg=({values:i,stride:e},t)=>i[e*t],Kg=({values:i,stride:e},t)=>i[e*t],$g=({values:i},e)=>Za.BN.signed(i.subarray(2*e,2*(e+1))),Jg=({values:i},e)=>Za.BN.signed(i.subarray(2*e,2*(e+1))),sR=(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)}},oR=({values:i},e)=>Za.BN.decimal(i.subarray(4*e,4*(e+1))),aR=(i,e)=>{let t=i.getChildAt(0),{valueOffsets:r,stride:n}=i;return t.slice(r[e*n],r[e*n+1])},uR=(i,e)=>i.bind(e),cR=(i,e)=>i.bind(e),lR=(i,e)=>i.type.mode===qt.UnionMode.Dense?Qg(i,e):Zg(i,e),Qg=(i,e)=>{let t=i.typeIdToChildIndex[i.typeIds[e]],r=i.getChildAt(t);return r?r.get(i.valueOffsets[e]):null},Zg=(i,e)=>{let t=i.typeIdToChildIndex[i.typeIds[e]],r=i.getChildAt(t);return r?r.get(e):null},dR=(i,e)=>i.getValue(i.getKey(e)),fR=(i,e)=>i.type.unit===qt.IntervalUnit.DAY_TIME?Xg(i,e):ev(i,e),Xg=({values:i},e)=>i.subarray(2*e,2*(e+1)),ev=({values:i},e)=>{let t=i[e],r=new Int32Array(2);return r[0]=t/12|0,r[1]=t%12|0,r},hR=(i,e)=>{let t=i.getChildAt(0),{stride:r}=i;return t.slice(e*r,(e+1)*r)};Z.prototype.visitNull=JE;Z.prototype.visitBool=QE;Z.prototype.visitInt=tR;Z.prototype.visitInt8=Ii;Z.prototype.visitInt16=Ii;Z.prototype.visitInt32=Ii;Z.prototype.visitInt64=ud;Z.prototype.visitUint8=Ii;Z.prototype.visitUint16=Ii;Z.prototype.visitUint32=Ii;Z.prototype.visitUint64=ud;Z.prototype.visitFloat=iR;Z.prototype.visitFloat16=qg;Z.prototype.visitFloat32=Ii;Z.prototype.visitFloat64=Ii;Z.prototype.visitUtf8=eR;Z.prototype.visitBinary=XE;Z.prototype.visitFixedSizeBinary=ZE;Z.prototype.visitDate=rR;Z.prototype.visitDateDay=Lg;Z.prototype.visitDateMillisecond=xg;Z.prototype.visitTimestamp=nR;Z.prototype.visitTimestampSecond=Wg;Z.prototype.visitTimestampMillisecond=zg;Z.prototype.visitTimestampMicrosecond=Hg;Z.prototype.visitTimestampNanosecond=Yg;Z.prototype.visitTime=sR;Z.prototype.visitTimeSecond=Gg;Z.prototype.visitTimeMillisecond=Kg;Z.prototype.visitTimeMicrosecond=$g;Z.prototype.visitTimeNanosecond=Jg;Z.prototype.visitDecimal=oR;Z.prototype.visitList=aR;Z.prototype.visitStruct=cR;Z.prototype.visitUnion=lR;Z.prototype.visitDenseUnion=Qg;Z.prototype.visitSparseUnion=Zg;Z.prototype.visitDictionary=dR;Z.prototype.visitInterval=fR;Z.prototype.visitIntervalDayTime=Xg;Z.prototype.visitIntervalYearMonth=ev;Z.prototype.visitFixedSizeList=hR;Z.prototype.visitMap=uR;Wn.instance=new Z});var nv=R(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.instance=zn.IndexOfVisitor=void 0;var pR=ut(),tv=ci(),iv=Os(),X=class extends pR.Visitor{};zn.IndexOfVisitor=X;function yR(i,e){return e===null&&i.length>0?0:-1}function _R(i,e){let{nullBitmap:t}=i.data;if(!t||i.nullCount<=0)return-1;let r=0;for(let n of new tv.BitIterator(t,i.data.offset+(e||0),i.length,t,tv.getBool)){if(!n)return r;++r}return-1}function de(i,e,t){if(e===void 0)return-1;if(e===null)return _R(i,t);let r=iv.createElementComparator(e);for(let n=(t||0)-1,s=i.length;++n<s;)if(r(i.get(n)))return n;return-1}function rv(i,e,t){let r=iv.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=yR;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=rv;X.prototype.visitSparseUnion=rv;X.prototype.visitDictionary=de;X.prototype.visitInterval=de;X.prototype.visitIntervalDayTime=de;X.prototype.visitIntervalYearMonth=de;X.prototype.visitFixedSizeList=de;X.prototype.visitMap=de;zn.instance=new X});var ld=R(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.instance=Hn.IteratorVisitor=void 0;var Xa=Se(),mR=ut(),bR=ci(),sv=cd(),ee=class extends mR.Visitor{};Hn.IteratorVisitor=ee;function gR(i){let e=sv.instance.getVisitFn(i);return new bR.BitIterator(i.data.nullBitmap,i.data.offset,i.length,i,(t,r,n,s)=>(n&1<<s)!=0?e(t,r):null)}var ov=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 gR(i);let{type:e,typeId:t,length:r}=i;return i.stride===1&&(t===Xa.Type.Timestamp||t===Xa.Type.Int&&e.bitWidth!==64||t===Xa.Type.Time&&e.bitWidth!==64||t===Xa.Type.Float&&e.precision>0)?i.data.values.subarray(0,r)[Symbol.iterator]():new ov(i,sv.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;Hn.instance=new ee});var av=R(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.instance=Yn.ToArrayVisitor=void 0;var Vs=Se(),vR=ut(),wR=ld(),te=class extends vR.Visitor{};Yn.ToArrayVisitor=te;function ce(i){let{type:e,length:t,stride:r}=i;switch(e.typeId){case Vs.Type.Int:case Vs.Type.Float:case Vs.Type.Decimal:case Vs.Type.Time:case Vs.Type.Timestamp:return i.data.values.subarray(0,t*r)}return[...wR.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;Yn.instance=new te});var uv=R(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.instance=Gn.ByteWidthVisitor=void 0;var jR=ut(),IR=Se(),Ns=(i,e)=>i+e,dd=i=>`Cannot compute the byte width of variable-width column ${i}`,fd=class extends jR.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(dd(e))}visitUtf8(e){throw new Error(dd(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===IR.TimeUnit.SECOND?4:8}visitInterval(e){return(e.unit+1)*4}visitList(e){throw new Error(dd(e))}visitStruct(e){return this.visitFields(e.children).reduce(Ns,0)}visitUnion(e){return this.visitFields(e.children).reduce(Ns,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(Ns,0)}visitMap(e){return this.visitFields(e.children).reduce(Ns,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(Ns,0)}};Gn.ByteWidthVisitor=fd;Gn.instance=new fd});var cv=R(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.instance=Kn.GetVectorConstructor=void 0;var TR=ut(),BR=Rl(),SR=Cl(),hd=kl(),AR=Ml(),OR=xa(),DR=Vl(),FR=Nl(),eu=Wl(),pd=zl(),Ni=Ha(),ER=Xl(),RR=ed(),CR=td(),UR=id(),Ls=rd(),xs=nd(),yd=sd(),kR=od(),_d=class extends TR.Visitor{visitNull(){return CR.NullVector}visitBool(){return SR.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 eu.FloatVector}visitFloat16(){return eu.Float16Vector}visitFloat32(){return eu.Float32Vector}visitFloat64(){return eu.Float64Vector}visitUtf8(){return kR.Utf8Vector}visitBinary(){return BR.BinaryVector}visitFixedSizeBinary(){return DR.FixedSizeBinaryVector}visitDate(){return hd.DateVector}visitDateDay(){return hd.DateDayVector}visitDateMillisecond(){return hd.DateMillisecondVector}visitTimestamp(){return Ls.TimestampVector}visitTimestampSecond(){return Ls.TimestampSecondVector}visitTimestampMillisecond(){return Ls.TimestampMillisecondVector}visitTimestampMicrosecond(){return Ls.TimestampMicrosecondVector}visitTimestampNanosecond(){return Ls.TimestampNanosecondVector}visitTime(){return xs.TimeVector}visitTimeSecond(){return xs.TimeSecondVector}visitTimeMillisecond(){return xs.TimeMillisecondVector}visitTimeMicrosecond(){return xs.TimeMicrosecondVector}visitTimeNanosecond(){return xs.TimeNanosecondVector}visitDecimal(){return AR.DecimalVector}visitList(){return ER.ListVector}visitStruct(){return UR.StructVector}visitUnion(){return yd.UnionVector}visitDenseUnion(){return yd.DenseUnionVector}visitSparseUnion(){return yd.SparseUnionVector}visitDictionary(){return OR.DictionaryVector}visitInterval(){return pd.IntervalVector}visitIntervalDayTime(){return pd.IntervalDayTimeVector}visitIntervalYearMonth(){return pd.IntervalYearMonthVector}visitFixedSizeList(){return FR.FixedSizeListVector}visitMap(){return RR.MapVector}};Kn.GetVectorConstructor=_d;Kn.instance=new _d});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 md=dt(),MR=qe();Object.defineProperty(C,"Vector",{enumerable:!0,get:function(){return MR.Vector}});var PR=ze();Object.defineProperty(C,"BaseVector",{enumerable:!0,get:function(){return PR.BaseVector}});var VR=Rl();Object.defineProperty(C,"BinaryVector",{enumerable:!0,get:function(){return VR.BinaryVector}});var NR=Cl();Object.defineProperty(C,"BoolVector",{enumerable:!0,get:function(){return NR.BoolVector}});var LR=pr();Object.defineProperty(C,"Chunked",{enumerable:!0,get:function(){return LR.Chunked}});var bd=kl();Object.defineProperty(C,"DateVector",{enumerable:!0,get:function(){return bd.DateVector}});Object.defineProperty(C,"DateDayVector",{enumerable:!0,get:function(){return bd.DateDayVector}});Object.defineProperty(C,"DateMillisecondVector",{enumerable:!0,get:function(){return bd.DateMillisecondVector}});var xR=Ml();Object.defineProperty(C,"DecimalVector",{enumerable:!0,get:function(){return xR.DecimalVector}});var qR=xa();Object.defineProperty(C,"DictionaryVector",{enumerable:!0,get:function(){return qR.DictionaryVector}});var WR=Vl();Object.defineProperty(C,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return WR.FixedSizeBinaryVector}});var zR=Nl();Object.defineProperty(C,"FixedSizeListVector",{enumerable:!0,get:function(){return zR.FixedSizeListVector}});var tu=Wl();Object.defineProperty(C,"FloatVector",{enumerable:!0,get:function(){return tu.FloatVector}});Object.defineProperty(C,"Float16Vector",{enumerable:!0,get:function(){return tu.Float16Vector}});Object.defineProperty(C,"Float32Vector",{enumerable:!0,get:function(){return tu.Float32Vector}});Object.defineProperty(C,"Float64Vector",{enumerable:!0,get:function(){return tu.Float64Vector}});var gd=zl();Object.defineProperty(C,"IntervalVector",{enumerable:!0,get:function(){return gd.IntervalVector}});Object.defineProperty(C,"IntervalDayTimeVector",{enumerable:!0,get:function(){return gd.IntervalDayTimeVector}});Object.defineProperty(C,"IntervalYearMonthVector",{enumerable:!0,get:function(){return gd.IntervalYearMonthVector}});var Li=Ha();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 HR=Xl();Object.defineProperty(C,"ListVector",{enumerable:!0,get:function(){return HR.ListVector}});var YR=ed();Object.defineProperty(C,"MapVector",{enumerable:!0,get:function(){return YR.MapVector}});var GR=td();Object.defineProperty(C,"NullVector",{enumerable:!0,get:function(){return GR.NullVector}});var KR=id();Object.defineProperty(C,"StructVector",{enumerable:!0,get:function(){return KR.StructVector}});var qs=rd();Object.defineProperty(C,"TimestampVector",{enumerable:!0,get:function(){return qs.TimestampVector}});Object.defineProperty(C,"TimestampSecondVector",{enumerable:!0,get:function(){return qs.TimestampSecondVector}});Object.defineProperty(C,"TimestampMillisecondVector",{enumerable:!0,get:function(){return qs.TimestampMillisecondVector}});Object.defineProperty(C,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return qs.TimestampMicrosecondVector}});Object.defineProperty(C,"TimestampNanosecondVector",{enumerable:!0,get:function(){return qs.TimestampNanosecondVector}});var Ws=nd();Object.defineProperty(C,"TimeVector",{enumerable:!0,get:function(){return Ws.TimeVector}});Object.defineProperty(C,"TimeSecondVector",{enumerable:!0,get:function(){return Ws.TimeSecondVector}});Object.defineProperty(C,"TimeMillisecondVector",{enumerable:!0,get:function(){return Ws.TimeMillisecondVector}});Object.defineProperty(C,"TimeMicrosecondVector",{enumerable:!0,get:function(){return Ws.TimeMicrosecondVector}});Object.defineProperty(C,"TimeNanosecondVector",{enumerable:!0,get:function(){return Ws.TimeNanosecondVector}});var vd=sd();Object.defineProperty(C,"UnionVector",{enumerable:!0,get:function(){return vd.UnionVector}});Object.defineProperty(C,"DenseUnionVector",{enumerable:!0,get:function(){return vd.DenseUnionVector}});Object.defineProperty(C,"SparseUnionVector",{enumerable:!0,get:function(){return vd.SparseUnionVector}});var $R=od();Object.defineProperty(C,"Utf8Vector",{enumerable:!0,get:function(){return $R.Utf8Vector}});var lv=Ss();Object.defineProperty(C,"MapRow",{enumerable:!0,get:function(){return lv.MapRow}});Object.defineProperty(C,"StructRow",{enumerable:!0,get:function(){return lv.StructRow}});var zs=Pg(),wd=Se(),$n=qe(),dv=pr(),Xr=ze(),JR=ci(),iu=ft(),fv=Ve(),hv=cd(),pv=Uc(),yv=nv(),_v=av(),mv=ld(),bv=uv(),gv=cv();$n.Vector.new=QR;$n.Vector.from=XR;function QR(i,...e){return new(gv.instance.getVisitFn(i)())(i,...e)}function ZR(i,e){if(iu.isIterable(e))return $n.Vector.from({nullValues:[null,void 0],type:i(),values:e});if(iu.isAsyncIterable(e))return $n.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 iu.isIterable(t)?$n.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:r})):$n.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:r}))}C.vectorFromValuesWithType=ZR;function XR(i){let e=Object.assign({nullValues:[null,void 0]},i),{values:t=[]}=e,r=md.__rest(e,["values"]);if(iu.isIterable(t)){let n=[...fv.Builder.throughIterable(r)(t)];return n.length===1?n[0]:dv.Chunked.concat(n)}return(n=>md.__awaiter(this,void 0,void 0,function*(){var s,u;let _=fv.Builder.throughAsyncIterable(r);try{for(var v=md.__asyncValues(_(t)),S;S=yield v.next(),!S.done;){let O=S.value;n.push(O)}}catch(O){s={error:O}}finally{try{S&&!S.done&&(u=v.return)&&(yield u.call(v))}finally{if(s)throw s.error}}return n.length===1?n[0]:dv.Chunked.concat(n)}))([])}Xr.BaseVector.prototype.get=function(e){return hv.instance.visit(this,e)};Xr.BaseVector.prototype.set=function(e,t){return pv.instance.visit(this,e,t)};Xr.BaseVector.prototype.indexOf=function(e,t){return yv.instance.visit(this,e,t)};Xr.BaseVector.prototype.toArray=function(){return _v.instance.visit(this)};Xr.BaseVector.prototype.getByteWidth=function(){return bv.instance.visit(this.type)};Xr.BaseVector.prototype[Symbol.iterator]=function(){return mv.instance.visit(this)};Xr.BaseVector.prototype._bindDataAccessors=rC;Object.keys(wd.Type).map(i=>wd.Type[i]).filter(i=>typeof i=="number").filter(i=>i!==wd.Type.NONE).forEach(i=>{let e=gv.instance.visit(i);e.prototype.get=zs.partial1(hv.instance.getVisitFn(i)),e.prototype.set=zs.partial2(pv.instance.getVisitFn(i)),e.prototype.indexOf=zs.partial2(yv.instance.getVisitFn(i)),e.prototype.toArray=zs.partial0(_v.instance.getVisitFn(i)),e.prototype.getByteWidth=eC(bv.instance.getVisitFn(i)),e.prototype[Symbol.iterator]=zs.partial0(mv.instance.getVisitFn(i))});function eC(i){return function(){return i(this.type)}}function tC(i){return function(e){return this.isValid(e)?i.call(this,e):null}}function iC(i){return function(e,t){JR.setBool(this.nullBitmap,this.offset+e,t!=null)&&i.call(this,e,t)}}function rC(){let i=this.nullBitmap;i&&i.byteLength>0&&(this.get=tC(this.get),this.set=iC(this.set))}});var Ms=R(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.Table=void 0;var ru=dt(),nC=kn(),sC=Hs(),vv=Ua(),jd=Vi(),wv=rt(),Id=ve(),jv=Hr(),Td=ft(),Iv=Dl(),Bd=vi(),tt=class extends Bd.Chunked{constructor(...e){var t;let r=null;e[0]instanceof wv.Schema&&(r=e[0]);let n=e[0]instanceof tt?e[0].chunks:jv.selectArgs(jd.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 jd._InternalEmptyPlaceholderRecordBatch(r));super(new Id.Struct(r.fields),n);this._schema=r,this._chunks=n}static empty(e=new wv.Schema([])){return new tt(e,[])}static from(e){if(!e)return tt.empty();if(typeof e=="object"){let r=Td.isIterable(e.values)?oC(e):Td.isAsyncIterable(e.values)?aC(e):null;if(r!==null)return r}let t=sC.RecordBatchReader.from(e);return Td.isPromise(t)?(()=>ru.__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=>ru.__awaiter(this,void 0,void 0,function*(){var n,s;let u=yield r,_=u.schema,v=[];if(_){try{for(var S=ru.__asyncValues(u),O;O=yield S.next(),!O.done;){let N=O.value;v.push(N)}}catch(N){n={error:N}}finally{try{O&&!O.done&&(s=S.return)&&(yield s.call(S))}finally{if(n)throw n.error}}return new tt(_,v)}return tt.empty()}))(t.open())}static fromAsync(e){return ru.__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(...Iv.distributeColumnsIntoRecordBatches(jv.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 u=this._chunks.map(_=>_.getChildAt(e)).filter(_=>_!=null);if(u.length>0)return s[e]=new nC.Column(t,u)}return null}serialize(e="binary",t=!0){return(t?vv.RecordBatchStreamWriter:vv.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 jd.RecordBatch(t,r,e.map(s=>n[s]).filter(Boolean))))}assign(e){let t=this._schema.fields,[r,n]=e.schema.fields.reduce((_,v,S)=>{let[O,N]=_,q=t.findIndex(J=>J.name===v.name);return~q?N[q]=S:O.push(S),_},[[],[]]),s=this._schema.assign(e.schema),u=[...t.map((_,v,S,O=n[v])=>O===void 0?this.getColumnAt(v):e.getColumnAt(O)),...r.map(_=>e.getColumnAt(_))].filter(Boolean);return new tt(...Iv.distributeVectorsIntoRecordBatches(s,u))}};nu.Table=tt;function oC(i){let{type:e}=i;return e instanceof Id.Struct?tt.fromStruct(Bd.StructVector.from(i)):null}function aC(i){let{type:e}=i;return e instanceof Id.Struct?Bd.StructVector.from(i).then(t=>tt.fromStruct(t)):null}});var Vi=R(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn._InternalEmptyPlaceholderRecordBatch=Jn.RecordBatch=void 0;var Sd=Jt(),Ad=Ms(),uC=qe(),cC=ut(),lC=rt(),dC=ft(),fC=pr(),hC=Hr(),Od=ve(),pC=Dl(),yC=vi(),Tr=class extends yC.StructVector{constructor(...e){let t,r=e[0],n;if(e[1]instanceof Sd.Data)[,t,n]=e;else{let s=r.fields,[,u,_]=e;t=Sd.Data.Struct(new Od.Struct(s),0,u,0,null,_)}super(t,n);this._schema=r}static from(e){return dC.isIterable(e.values),Ad.Table.from(e)}static new(...e){let[t,r]=hC.selectFieldArgs(e),n=r.filter(s=>s instanceof uC.Vector);return new Tr(...pC.ensureSameLengthData(new lC.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=fC.Chunked.flatten(this,...e);return new Ad.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=su.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)}};Jn.RecordBatch=Tr;var Tv=class extends Tr{constructor(e){super(e,0,e.fields.map(t=>Sd.Data.new(t.type,0,0,0)))}};Jn._InternalEmptyPlaceholderRecordBatch=Tv;var su=class extends cC.Visitor{constructor(){super(...arguments);this.dictionaries=new Map}static collect(e){return new su().visit(e.data,new Od.Struct(e.schema.fields)).dictionaries}visit(e,t){return Od.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 Hs=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(),Bv=qe(),ou=Se(),Sv=Hc(),Av=ps(),Ov=lr(),Ys=Kc(),Dv=ab(),Dd=Vi(),en=un(),Wt=Ia(),zt=ft(),Ti=class extends en.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 Av.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Av.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)?_C(e):zt.isFileHandle(e)?gC(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)?bC(new Ov.AsyncByteStream(e)):mC(new Ov.ByteStream(e))}static readAll(e){return e instanceof Ti?e.isSync()?Cv(e):Uv(e):zt.isArrowJSON(e)||ArrayBuffer.isView(e)||zt.isIterable(e)||zt.isIteratorResult(e)?Cv(e):Uv(e)}};Ht.RecordBatchReader=Ti;var Qn=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=Qn;var Zn=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=Zn;var au=class extends Qn{constructor(e){super(e);this._impl=e}};Ht.RecordBatchFileReader=au;var Fd=class extends Zn{constructor(e){super(e);this._impl=e}};Ht.AsyncRecordBatchFileReader=Fd;var Ed=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 Dd.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){let{id:r,isDelta:n,data:s}=e,{dictionaries:u,schema:_}=this,v=u.get(r);if(n||!v){let S=_.dictionaries.get(r);return v&&n?v.concat(Bv.Vector.new(this._loadVectors(s,t,[S])[0])):Bv.Vector.new(this._loadVectors(s,t,[S])[0])}return v}_loadVectors(e,t,r){return new Dv.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(r)}},Gs=class extends Ed{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=Rv(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):en.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):en.ITERATOR_DONE}next(){if(this.closed)return en.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 Dd._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},Ks=class extends Ed{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=Rv(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):en.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):en.ITERATOR_DONE})}next(){return Fe.__awaiter(this,void 0,void 0,function*(){if(this.closed)return en.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 Dd._InternalEmptyPlaceholderRecordBatch(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return Fe.__awaiter(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},Rd=class extends Gs{constructor(e,t){super(e instanceof Ys.RandomAccessFile?e:new Ys.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(ou.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(ou.MessageHeader.DictionaryBatch);if(r==null?void 0:r.isDictionaryBatch()){let n=r.header(),s=this._reader.readMessageBody(r.bodyLength),u=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,u)}}}_readFooter(){let{_handle:e}=this,t=e.size-Wt.magicAndPadding,r=e.readInt32(t),n=e.readAt(t-r,r);return Sv.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}},Fv=class extends Ks{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 Ys.AsyncRandomAccessFile?e:new Ys.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(ou.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(ou.MessageHeader.DictionaryBatch);if(r==null?void 0:r.isDictionaryBatch()){let n=r.header(),s=yield this._reader.readMessageBody(r.bodyLength),u=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,u)}}})}_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 Sv.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})}},Ev=class extends Gs{constructor(e,t){super(e,t)}_loadVectors(e,t,r){return new Dv.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(r)}};function Rv(i,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:i.autoDestroy}function*Cv(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 Uv(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 _C(i){return new Qn(new Ev(i))}function mC(i){let e=i.peek(Wt.magicLength+7&~7);return e&&e.byteLength>=4?Wt.checkForMagicArrowString(e)?new au(new Rd(i.read())):new Qn(new Gs(i)):new Qn(new Gs(function*(){}()))}function bC(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 au(new Rd(yield i.read())):new Zn(new Ks(i)):new Zn(new Ks(function(){return Fe.__asyncGenerator(this,arguments,function*(){})}()))})}function gC(i){return Fe.__awaiter(this,void 0,void 0,function*(){let{size:e}=yield i.stat(),t=new Ys.AsyncRandomAccessFile(i,e);return e>=Wt.magicX2AndPadding&&Wt.checkForMagicArrowString(yield t.readAt(0,Wt.magicLength+7&~7))?new Fd(new Fv(t)):new Zn(new Ks(t))})}});var Pv=R(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.toDOMStream=void 0;var uu=dt(),kv=Ze(),Mv=ft();function vC(i,e){if(Mv.isAsyncIterable(i))return jC(i,e);if(Mv.isIterable(i))return wC(i,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}cu.toDOMStream=vC;function wC(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(u){s(u,t||(t=i[Symbol.iterator]()))},pull(u){t?s(u,t):u.close()},cancel(){((t==null?void 0:t.return)&&t.return()||!0)&&(t=null)}}),Object.assign({highWaterMark:r?n:void 0},e));function s(u,_){let v,S=null,O=u.desiredSize||null;for(;!(S=_.next(r?O:null)).done;)if(ArrayBuffer.isView(S.value)&&(v=kv.toUint8Array(S.value))&&(O!=null&&r&&(O=O-v.byteLength+1),S.value=v),u.enqueue(S.value),O!=null&&--O<=0)return;u.close()}}function jC(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(u){return uu.__awaiter(this,void 0,void 0,function*(){yield s(u,t||(t=i[Symbol.asyncIterator]()))})},pull(u){return uu.__awaiter(this,void 0,void 0,function*(){t?yield s(u,t):u.close()})},cancel(){return uu.__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(u,_){return uu.__awaiter(this,void 0,void 0,function*(){let v,S=null,O=u.desiredSize||null;for(;!(S=yield _.next(r?O:null)).done;)if(ArrayBuffer.isView(S.value)&&(v=kv.toUint8Array(S.value))&&(O!=null&&r&&(O=O-v.byteLength+1),S.value=v),u.enqueue(S.value),O!=null&&--O<=0)return;u.close()})}}});var Lv=R(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.BuilderTransform=Xn.builderThroughDOMStream=void 0;var IC=dt(),TC=ca();function BC(i){return new Cd(i)}Xn.builderThroughDOMStream=BC;var Cd=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:r,["queueingStrategy"]:n="count"}=e,s=IC.__rest(e,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=TC.Builder.new(s),this._getSize=n!=="bytes"?Vv:Nv;let{["highWaterMark"]:u=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:u,size:n!=="bytes"?Vv:Nv}),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)}};Xn.BuilderTransform=Cd;var Vv=i=>i.length,Nv=i=>i.byteLength});var xv=R(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.recordBatchReaderThroughDOMStream=void 0;var $s=dt(),SC=lr(),AC=Hs();function OC(i,e){let t=new SC.AsyncByteQueue,r=null,n=new ReadableStream({cancel(){return $s.__awaiter(this,void 0,void 0,function*(){yield t.close()})},start(_){return $s.__awaiter(this,void 0,void 0,function*(){yield u(_,r||(r=yield s()))})},pull(_){return $s.__awaiter(this,void 0,void 0,function*(){r?yield u(_,r):_.close()})}});return{writable:new WritableStream(t,Object.assign({highWaterMark:Math.pow(2,14)},i)),readable:n};function s(){return $s.__awaiter(this,void 0,void 0,function*(){return yield(yield AC.RecordBatchReader.from(t)).open(e)})}function u(_,v){return $s.__awaiter(this,void 0,void 0,function*(){let S=_.desiredSize,O=null;for(;!(O=yield v.next()).done;)if(_.enqueue(O.value),S!=null&&--S<=0)return;_.close()})}}lu.recordBatchReaderThroughDOMStream=OC});var qv=R(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.recordBatchWriterThroughDOMStream=void 0;var du=dt(),DC=lr();function FC(i,e){let t=new this(i),r=new DC.AsyncByteStream(t),n=new ReadableStream({type:"bytes",cancel(){return du.__awaiter(this,void 0,void 0,function*(){yield r.cancel()})},pull(u){return du.__awaiter(this,void 0,void 0,function*(){yield s(u)})},start(u){return du.__awaiter(this,void 0,void 0,function*(){yield s(u)})}},Object.assign({highWaterMark:Math.pow(2,14)},e));return{writable:new WritableStream(t,i),readable:n};function s(u){return du.__awaiter(this,void 0,void 0,function*(){let _=null,v=u.desiredSize;for(;_=yield r.read(v||null);)if(u.enqueue(_),v!=null&&(v-=_.byteLength)<=0)return;u.close()})}}fu.recordBatchWriterThroughDOMStream=FC});var Nd=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 EC=xa(),Br=class{eq(e){return e instanceof Br||(e=new xi(e)),new kd(this,e)}le(e){return e instanceof Br||(e=new xi(e)),new Md(this,e)}ge(e){return e instanceof Br||(e=new xi(e)),new Pd(this,e)}lt(e){return new rs(this.ge(e))}gt(e){return new rs(this.le(e))}ne(e){return new rs(this.eq(e))}};he.Value=Br;var xi=class extends Br{constructor(e){super();this.v=e}};he.Literal=xi;var Ud=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=Ud;var es=class{and(...e){return new ts(this,...e)}or(...e){return new is(this,...e)}not(){return new rs(this)}};he.Predicate=es;var Js=class extends es{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=Js;var Qs=class extends es{constructor(...e){super();this.children=e}};he.CombinationPredicate=Qs;Qs.prototype.children=Object.freeze([]);var ts=class extends Qs{constructor(...e){e=e.reduce((t,r)=>t.concat(r instanceof ts?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=ts;var is=class extends Qs{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.some(s=>s(r,n))}};he.Or=is;var kd=class extends Js{_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(u,_)=>n(u,_)==s(u,_)}_bindColLit(e,t,r){let n=t.bind(e);if(t.vector instanceof EC.DictionaryVector){let s,u=t.vector;return u.dictionary!==this.lastDictionary?(s=u.reverseLookup(r.v),this.lastDictionary=u.dictionary,this.lastKey=s):s=this.lastKey,s===-1?()=>!1:_=>u.getKey(_)===s}else return(s,u)=>n(s,u)==r.v}_bindLitCol(e,t,r){return this._bindColLit(e,r,t)}};he.Equals=kd;var Md=class extends Js{_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(u,_)=>n(u,_)<=s(u,_)}_bindColLit(e,t,r){let n=t.bind(e);return(s,u)=>n(s,u)<=r.v}_bindLitCol(e,t,r){let n=r.bind(e);return(s,u)=>t.v<=n(s,u)}};he.LTeq=Md;var Pd=class extends Js{_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(u,_)=>n(u,_)>=s(u,_)}_bindColLit(e,t,r){let n=t.bind(e);return(s,u)=>n(s,u)>=r.v}_bindLitCol(e,t,r){let n=r.bind(e);return(s,u)=>t.v>=n(s,u)}};he.GTeq=Pd;var rs=class extends es{constructor(e){super();this.child=e}bind(e){let t=this.child.bind(e);return(r,n)=>!t(r,n)}};he.Not=rs;var Vd=class extends es{constructor(e,t){super();this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}};he.CustomPredicate=Vd;function RC(i){return new xi(i)}he.lit=RC;function CC(i){return new Ud(i)}he.col=CC;function UC(...i){return new ts(...i)}he.and=UC;function kC(...i){return new is(...i)}he.or=kC;function MC(i,e){return new Vd(i,e)}he.custom=MC});var Kv=R(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.FilteredDataFrame=Sr.CountByResult=Sr.DataFrame=void 0;var Wv=Ms(),zv=Ha(),Ld=rt(),Hv=Nd(),PC=Vi(),Yv=ve(),xd=class extends Wv.Table{filter(e){return new Zs(this.chunks,e)}scan(e,t){let r=this.chunks,n=r.length;for(let s=-1;++s<n;){let u=r[s];t&&t(u);for(let _=-1,v=u.length;++_<v;)e(_,u)}}scanReverse(e,t){let r=this.chunks,n=r.length;for(let s=n;--s>=0;){let u=r[s];t&&t(u);for(let _=u.length;--_>=0;)e(_,u)}}countBy(e){let t=this.chunks,r=t.length,n=typeof e=="string"?new Hv.Col(e):e;n.bind(t[r-1]);let s=n.vector;if(!Yv.DataType.isDictionary(s.type))throw new Error("countBy currently only supports dictionary-encoded columns");let u=Math.ceil(Math.log(s.length)/Math.log(256)),_=u==4?Uint32Array:u>=2?Uint16Array:Uint8Array,v=new _(s.dictionary.length);for(let S=-1;++S<r;){let O=t[S];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 hu(s.dictionary,zv.IntVector.from(v))}};Sr.DataFrame=xd;var hu=class extends Wv.Table{constructor(e,t){let r=new Ld.Schema([new Ld.Field("values",e.type),new Ld.Field("counts",t.type)]);super(new PC.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=hu;var Gv=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}},Zs=class extends xd{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 u=r[s],_=this._predicate.bind(u),v=!1;for(let S=-1,O=u.length;++S<O;)_(S,u)&&(t&&!v&&(t(u),v=!0),e(S,u))}}scanReverse(e,t){let r=this._chunks,n=r.length;for(let s=n;--s>=0;){let u=r[s],_=this._predicate.bind(u),v=!1;for(let S=u.length;--S>=0;)_(S,u)&&(t&&!v&&(t(u),v=!0),e(S,u))}}count(){let e=0,t=this._chunks,r=t.length;for(let n=-1;++n<r;){let s=t[n],u=this._predicate.bind(s);for(let _=-1,v=s.length;++_<v;)u(_,s)&&++e}return e}[Symbol.iterator](){return new Gv(this._chunks,this._predicate)}filter(e){return new Zs(this._chunks,this._predicate.and(e))}countBy(e){let t=this._chunks,r=t.length,n=typeof e=="string"?new Hv.Col(e):e;n.bind(t[r-1]);let s=n.vector;if(!Yv.DataType.isDictionary(s.type))throw new Error("countBy currently only supports dictionary-encoded columns");let u=Math.ceil(Math.log(s.length)/Math.log(256)),_=u==4?Uint32Array:u>=2?Uint16Array:Uint8Array,v=new _(s.dictionary.length);for(let S=-1;++S<r;){let O=t[S],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 hu(s.dictionary,zv.IntVector.from(v))}};Sr.FilteredDataFrame=Zs});var Qv=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 ns=Qi();Object.defineProperty(b,"DateUnit",{enumerable:!0,get:function(){return ns.DateUnit}});Object.defineProperty(b,"TimeUnit",{enumerable:!0,get:function(){return ns.TimeUnit}});Object.defineProperty(b,"Precision",{enumerable:!0,get:function(){return ns.Precision}});Object.defineProperty(b,"UnionMode",{enumerable:!0,get:function(){return ns.UnionMode}});Object.defineProperty(b,"IntervalUnit",{enumerable:!0,get:function(){return ns.IntervalUnit}});Object.defineProperty(b,"MetadataVersion",{enumerable:!0,get:function(){return ns.MetadataVersion}});var VC=Io();Object.defineProperty(b,"MessageHeader",{enumerable:!0,get:function(){return VC.MessageHeader}});var $v=Se();Object.defineProperty(b,"Type",{enumerable:!0,get:function(){return $v.Type}});Object.defineProperty(b,"BufferType",{enumerable:!0,get:function(){return $v.BufferType}});var NC=Jt();Object.defineProperty(b,"Data",{enumerable:!0,get:function(){return NC.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 LC=Ms();Object.defineProperty(b,"Table",{enumerable:!0,get:function(){return LC.Table}});var xC=kn();Object.defineProperty(b,"Column",{enumerable:!0,get:function(){return xC.Column}});var qC=ut();Object.defineProperty(b,"Visitor",{enumerable:!0,get:function(){return qC.Visitor}});var Jv=rt();Object.defineProperty(b,"Schema",{enumerable:!0,get:function(){return Jv.Schema}});Object.defineProperty(b,"Field",{enumerable:!0,get:function(){return Jv.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=ca();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 qd=lr();Object.defineProperty(b,"ByteStream",{enumerable:!0,get:function(){return qd.ByteStream}});Object.defineProperty(b,"AsyncByteStream",{enumerable:!0,get:function(){return qd.AsyncByteStream}});Object.defineProperty(b,"AsyncByteQueue",{enumerable:!0,get:function(){return qd.AsyncByteQueue}});var Xs=Hs();Object.defineProperty(b,"RecordBatchReader",{enumerable:!0,get:function(){return Xs.RecordBatchReader}});Object.defineProperty(b,"RecordBatchFileReader",{enumerable:!0,get:function(){return Xs.RecordBatchFileReader}});Object.defineProperty(b,"RecordBatchStreamReader",{enumerable:!0,get:function(){return Xs.RecordBatchStreamReader}});Object.defineProperty(b,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return Xs.AsyncRecordBatchFileReader}});Object.defineProperty(b,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return Xs.AsyncRecordBatchStreamReader}});var pu=Ua();Object.defineProperty(b,"RecordBatchWriter",{enumerable:!0,get:function(){return pu.RecordBatchWriter}});Object.defineProperty(b,"RecordBatchFileWriter",{enumerable:!0,get:function(){return pu.RecordBatchFileWriter}});Object.defineProperty(b,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return pu.RecordBatchStreamWriter}});Object.defineProperty(b,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return pu.RecordBatchJSONWriter}});var Wd=Ia();Object.defineProperty(b,"MessageReader",{enumerable:!0,get:function(){return Wd.MessageReader}});Object.defineProperty(b,"AsyncMessageReader",{enumerable:!0,get:function(){return Wd.AsyncMessageReader}});Object.defineProperty(b,"JSONMessageReader",{enumerable:!0,get:function(){return Wd.JSONMessageReader}});var WC=Kr();Object.defineProperty(b,"Message",{enumerable:!0,get:function(){return WC.Message}});var zC=Vi();Object.defineProperty(b,"RecordBatch",{enumerable:!0,get:function(){return zC.RecordBatch}});var zd=Kv();Object.defineProperty(b,"DataFrame",{enumerable:!0,get:function(){return zd.DataFrame}});Object.defineProperty(b,"FilteredDataFrame",{enumerable:!0,get:function(){return zd.FilteredDataFrame}});Object.defineProperty(b,"CountByResult",{enumerable:!0,get:function(){return zd.CountByResult}});var HC=vs(),YC=Jc(),GC=ci(),KC=_s(),$C=Ze(),JC=Os(),QC=Nd();b.predicate=QC;var Hd=pl();b.util=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},HC),YC),GC),KC),$C),JC),{compareSchemas:Hd.compareSchemas,compareFields:Hd.compareFields,compareTypes:Hd.compareTypes});var ZC=Hr();Object.defineProperty(b,"isTypedArray",{enumerable:!0,get:function(){return ZC.isTypedArray}})});var bu=R(()=>{});var Qd=R(()=>{});var nU={};h1(nU,{registerWorker:()=>aw});var Zv=Si(ps()),Xv=Si(ca()),ss=Si(Hs()),os=Si(Ua()),ew=Si(Pv()),tw=Si(Lv()),yu=Si(xv()),_u=Si(qv()),B=Si(Qv());Zv.default.toDOMStream=ew.toDOMStream;Xv.Builder.throughDOM=tw.builderThroughDOMStream;ss.RecordBatchReader.throughDOM=yu.recordBatchReaderThroughDOMStream;ss.RecordBatchFileReader.throughDOM=yu.recordBatchReaderThroughDOMStream;ss.RecordBatchStreamReader.throughDOM=yu.recordBatchReaderThroughDOMStream;os.RecordBatchWriter.throughDOM=_u.recordBatchWriterThroughDOMStream;os.RecordBatchFileWriter.throughDOM=_u.recordBatchWriterThroughDOMStream;os.RecordBatchStreamWriter.throughDOM=_u.recordBatchWriterThroughDOMStream;var mu=class extends B.AsyncByteQueue{flush(){let e=super.toUint8Array(!0);return this._values.length=0,e}};var Yd;(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"})(Yd||(Yd={}));var Gd;(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"})(Gd||(Gd={}));var Kd;(function(u){u[u.NONE=0]="NONE",u[u.OK=1]="OK",u[u.ERROR=2]="ERROR",u[u.START=3]="START",u[u.RUN=4]="RUN",u[u.CAPTURE=5]="CAPTURE"})(Kd||(Kd={}));var $d;(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"})($d||($d={}));var XC=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 as(i,e){switch(e.typeId){case B.Type.Binary:return{name:i,type:"binary"};case B.Type.Bool:return{name:i,type:"bool"};case B.Type.Date:return{name:i,type:"date"};case B.Type.DateDay:return{name:i,type:"date32[d]"};case B.Type.DateMillisecond:return{name:i,type:"date64[ms]"};case B.Type.Decimal:{let t=e;return{name:i,type:"decimal",precision:t.precision,scale:t.scale}}case B.Type.Float:return{name:i,type:"float"};case B.Type.Float16:return{name:i,type:"float16"};case B.Type.Float32:return{name:i,type:"float32"};case B.Type.Float64:return{name:i,type:"float64"};case B.Type.Int:return{name:i,type:"int32"};case B.Type.Int16:return{name:i,type:"int16"};case B.Type.Int32:return{name:i,type:"int32"};case B.Type.Int64:return{name:i,type:"int64"};case B.Type.Uint16:return{name:i,type:"uint16"};case B.Type.Uint32:return{name:i,type:"uint32"};case B.Type.Uint64:return{name:i,type:"uint64"};case B.Type.Uint8:return{name:i,type:"uint8"};case B.Type.IntervalDayTime:return{name:i,type:"interval[dt]"};case B.Type.IntervalYearMonth:return{name:i,type:"interval[m]"};case B.Type.List:{let t=e;return{name:i,type:"list",children:[as(t.valueField.name,t.valueField.type)]}}case B.Type.FixedSizeBinary:return{name:i,type:"fixedsizebinary",byteWidth:e.byteWidth};case B.Type.Null:return{name:i,type:"null"};case B.Type.Utf8:return{name:i,type:"utf8"};case B.Type.Struct:return{name:i,type:"struct",children:e.children.map(r=>as(r.name,r.type))};case B.Type.Time:return{name:i,type:"time[s]"};case B.Type.TimeMicrosecond:return{name:i,type:"time[us]"};case B.Type.TimeMillisecond:return{name:i,type:"time[ms]"};case B.Type.TimeNanosecond:return{name:i,type:"time[ns]"};case B.Type.TimeSecond:return{name:i,type:"time[s]"};case B.Type.Timestamp:return{name:i,type:"timestamp",timezone:e.timezone||void 0};case B.Type.TimestampSecond:return{name:i,type:"timestamp[s]",timezone:e.timezone||void 0};case B.Type.TimestampMicrosecond:return{name:i,type:"timestamp[us]",timezone:e.timezone||void 0};case B.Type.TimestampNanosecond:return{name:i,type:"timestamp[ns]",timezone:e.timezone||void 0};case B.Type.TimestampMillisecond:return{name:i,type:"timestamp[ms]",timezone:e.timezone||void 0}}throw new Error(`unsupported arrow type: ${e.toString()}`)}var AM=new TextEncoder;var Jd=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 rw={},eU=function(){var i=rw.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={},u;for(u in t)t.hasOwnProperty(u)&&(s[u]=t[u]);var _=[],v="./this.program",S=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 uw(o){if(!(o instanceof ho)){var a=o;Ar("exiting due to exception: "+a)}}var tn,rn;q?(N?J=bu().dirname(J)+"/":J=__dirname+"/",Oe=function(a,c){return tn||(tn=Qd()),rn||(rn=bu()),a=rn.normalize(a),tn.readFileSync(a,c?null:"utf8")},pt=function(a){var c=Oe(a,!0);return c.buffer||(c=new Uint8Array(c)),of(c.buffer),c},Yt=function(a,c,l){tn||(tn=Qd()),rn||(rn=bu()),a=rn.normalize(a),tn.readFile(a,function(d,f){d?l(d):c(f.buffer)})},process.argv.length>1&&(v=process.argv[1].replace(/\\/g,"/")),_=process.argv.slice(2),process.on("uncaughtException",function(o){if(!(o instanceof ho))throw o}),process.on("unhandledRejection",function(o){throw o}),S=function(o,a){if(gu())throw process.exitCode=o,a;uw(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,c){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}c()},l.onerror=c,l.send(null)},le=function(o){document.title=o});var cw=t.print||console.log.bind(console),Ar=t.printErr||console.warn.bind(console);for(u in s)s.hasOwnProperty(u)&&(t[u]=s[u]);s=null,t.arguments&&(_=t.arguments),t.thisProgram&&(v=t.thisProgram),t.quit&&(S=t.quit);var sf=0,ot=function(o){sf=o},lw=function(){return sf},cs;t.wasmBinary&&(cs=t.wasmBinary);var dw=t.noExitRuntime||!0;typeof WebAssembly!="object"&&ri("no native wasm support detected");var eo,W=!1,to;function of(o,a){o||ri("Assertion failed: "+a)}function fw(o){var a=t["_"+o];return of(a,"Cannot call unknown function "+o+", make sure it is exported"),a}function hw(o,a,c,l,d){var f={string:function(P){var se=0;if(P!=null&&P!==0){var me=(P.length<<2)+1;se=Tu(me),pw(P,se,me)}return se},array:function(P){var se=Tu(P.length);return lf(P,se),se}};function h(P){return a==="string"?io(P):a==="boolean"?Boolean(P):P}var p=fw(o),y=[],m=0;if(l)for(var g=0;g<l.length;g++){var w=f[c[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 af=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function uf(o,a,c){for(var l=a+c,d=a;o[d]&&!(d>=l);)++d;if(d-a>16&&o.subarray&&af)return af.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 io(o,a){return o?uf(nn,o,a):""}function cf(o,a,c,l){if(!(l>0))return 0;for(var d=c,f=c+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(c>=f)break;a[c++]=p}else if(p<=2047){if(c+1>=f)break;a[c++]=192|p>>6,a[c++]=128|p&63}else if(p<=65535){if(c+2>=f)break;a[c++]=224|p>>12,a[c++]=128|p>>6&63,a[c++]=128|p&63}else{if(c+3>=f)break;a[c++]=240|p>>18,a[c++]=128|p>>12&63,a[c++]=128|p>>6&63,a[c++]=128|p&63}}return a[c]=0,c-d}function pw(o,a,c){return cf(o,nn,a,c)}function yw(o){for(var a=0,c=0;c<o.length;++c){var l=o.charCodeAt(c);l>=55296&&l<=57343&&(l=65536+((l&1023)<<10)|o.charCodeAt(++c)&1023),l<=127?++a:l<=2047?a+=2:l<=65535?a+=3:a+=4}return a}function lf(o,a){ii.set(o,a)}function _w(o,a,c){for(var l=0;l<o.length;++l)ii[a++>>0]=o.charCodeAt(l);c||(ii[a>>0]=0)}function mw(o,a){return o%a>0&&(o+=a-o%a),o}var df,ii,nn,bw,gw,fe,vw,ww,jw;function ff(o){df=o,t.HEAP8=ii=new Int8Array(o),t.HEAP16=bw=new Int16Array(o),t.HEAP32=fe=new Int32Array(o),t.HEAPU8=nn=new Uint8Array(o),t.HEAPU16=gw=new Uint16Array(o),t.HEAPU32=vw=new Uint32Array(o),t.HEAPF32=ww=new Float32Array(o),t.HEAPF64=jw=new Float64Array(o)}var sU=t.INITIAL_MEMORY||16777216,G,hf=[],pf=[],Iw=[],yf=[],Tw=!1,Bw=!1,Sw=0;function gu(){return dw||Sw>0}function Aw(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)Rw(t.preRun.shift());ro(hf)}function Ow(){Tw=!0,ro(pf)}function Dw(){ro(Iw)}function Fw(){Bw=!0}function Ew(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Uw(t.postRun.shift());ro(yf)}function Rw(o){hf.unshift(o)}function Cw(o){pf.unshift(o)}function Uw(o){yf.unshift(o)}var Or=0,vu=null,ls=null;function kw(o){Or++,t.monitorRunDependencies&&t.monitorRunDependencies(Or)}function Mw(o){if(Or--,t.monitorRunDependencies&&t.monitorRunDependencies(Or),Or==0&&(vu!==null&&(clearInterval(vu),vu=null),ls)){var a=ls;ls=null,a()}}t.preloadedImages={},t.preloadedAudios={};function ri(o){t.onAbort&&t.onAbort(o),o="Aborted("+o+")",Ar(o),W=!0,to=1,o+=". Build with -s ASSERTIONS=1 for more info.";var a=new WebAssembly.RuntimeError(o);throw n(a),a}var Pw="data:application/octet-stream;base64,";function _f(o){return o.startsWith(Pw)}var Bt;t.locateFile?(Bt="duckdb_wasm.wasm",_f(Bt)||(Bt=ke(Bt))):Bt=new URL("duckdb_wasm.wasm",rw.url).toString();function mf(o){try{if(o==Bt&&cs)return new Uint8Array(cs);if(pt)return pt(o);throw"both async and sync fetching of the wasm failed"}catch(a){ri(a)}}function Vw(){return!cs&&(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 mf(Bt)}):Promise.resolve().then(function(){return mf(Bt)})}function Nw(){var o={a:i0};function a(h,p){var y=h.exports;t.asm=y,eo=t.asm.Ae,ff(eo.buffer),G=t.asm.De,Cw(t.asm.Be),Mw("wasm-instantiate")}kw("wasm-instantiate");function c(h){a(h.instance)}function l(h){return Vw().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!cs&&typeof WebAssembly.instantiateStreaming=="function"&&!_f(Bt)&&typeof fetch=="function"?fetch(Bt,{credentials:"same-origin"}).then(function(h){var p=WebAssembly.instantiateStreaming(h,o);return p.then(c,function(y){return Ar("wasm streaming compile failed: "+y),Ar("falling back to ArrayBuffer instantiation"),l(c)})}):l(c)}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 ro(o){for(;o.length>0;){var a=o.shift();if(typeof a=="function"){a(t);continue}var c=a.func;typeof c=="number"?a.arg===void 0?G.get(c)():G.get(c)(a.arg):c(a.arg===void 0?null:a.arg)}}function Lw(o){if(o instanceof ho||o=="unwind")return to;S(1,o)}function xw(o){return Bu(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,c){this.set_type(a),this.set_destructor(c),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 sn(o){this.free=function(){Su(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=vf(this.get_exception_info().get_type());if(a)return fe[this.get_base_ptr()>>2];var c=this.get_adjusted_ptr();return c!==0?c:this.get_base_ptr()},this.get_exception_info=function(){return new Dr(this.get_base_ptr())},o===void 0?(this.ptr=Bu(8),this.set_adjusted_ptr(0)):this.ptr=o}var no=[];function qw(o){o.add_ref()}var so=0;function Ww(o){var a=new sn(o),c=a.get_exception_info();return c.get_caught()||(c.set_caught(!0),so--),c.set_rethrown(!1),no.push(a),qw(c),a.get_exception_ptr()}var Bi=0;function bf(o){return Su(new Dr(o).ptr)}function zw(o){if(o.release_ref()&&!o.get_rethrown()){var a=o.get_destructor();a&&G.get(a)(o.excPtr),bf(o.excPtr)}}function Hw(){T(0);var o=no.pop();zw(o.get_exception_info()),o.free(),Bi=0}function Yw(o){var a=new sn(o),c=a.get_base_ptr();throw Bi||(Bi=c),a.free(),c}function Gw(){var o=Bi;if(!o)return ot(0),0|0;var a=new Dr(o),c=a.get_type(),l=new sn;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!c)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===c)break;if(fs(h,c,l.get_adjusted_ptr_addr()))return ot(h),l.ptr|0}return ot(c),l.ptr|0}function Kw(){var o=Bi;if(!o)return ot(0),0|0;var a=new Dr(o),c=a.get_type(),l=new sn;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!c)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===c)break;if(fs(h,c,l.get_adjusted_ptr_addr()))return ot(h),l.ptr|0}return ot(c),l.ptr|0}function $w(){var o=Bi;if(!o)return ot(0),0|0;var a=new Dr(o),c=a.get_type(),l=new sn;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!c)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===c)break;if(fs(h,c,l.get_adjusted_ptr_addr()))return ot(h),l.ptr|0}return ot(c),l.ptr|0}function Jw(){var o=Bi;if(!o)return ot(0),0|0;var a=new Dr(o),c=a.get_type(),l=new sn;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!c)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===c)break;if(fs(h,c,l.get_adjusted_ptr_addr()))return ot(h),l.ptr|0}return ot(c),l.ptr|0}function Qw(){var o=no.pop();o||ri("no exception to throw");var a=o.get_exception_info(),c=o.get_base_ptr();throw a.get_rethrown()?o.free():(no.push(o),a.set_rethrown(!0),a.set_caught(!1),so++),Bi=c,c}function Zw(o,a,c){var l=new Dr(o);throw l.init(a,c),Bi=o,so++,o}function Xw(){return so}var it={mappings:{},buffers:[null,[],[]],printChar:function(o,a){var c=it.buffers[o];a===0||a===10?((o===1?cw:Ar)(uf(c,0)),c.length=0):c.push(a)},varargs:void 0,get:function(){it.varargs+=4;var o=fe[it.varargs-4>>2];return o},getStr:function(o){var a=io(o);return a},get64:function(o,a){return o}};function ej(o,a){return o=it.getStr(o),it.doAccess(o,a)}function tj(o){return fe[gf()>>2]=o,o}function ij(o,a,c){return it.varargs=c,0}function rj(o,a){}function nj(o,a,c,l){}function sj(o,a,c){}function oj(){return 42}function aj(o,a,c){return it.varargs=c,0}function uj(o,a,c){return 0}function cj(o,a){return o=it.getStr(o),it.doMkdir(o,a)}function lj(o,a,c){it.varargs=c}function dj(o,a){}function fj(o){}function hj(o,a){}function pj(o){}function yj(o,a){ri("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function _j(o,a){ri("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function mj(){ri("")}var wu;q?wu=function(){var o=process.hrtime();return o[0]*1e3+o[1]/1e6}:wu=function(){return performance.now()};var bj=!0;function gj(o,a){var c;if(o===0)c=Date.now();else if((o===1||o===4)&&bj)c=wu();else return tj(28),-1;return fe[a>>2]=c/1e3|0,fe[a+4>>2]=c%1e3*1e3*1e3|0,0}function vj(o,a){return globalThis.DUCKDB_RUNTIME.createDirectory(t,o,a)}function wj(o,a){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,o,a)}function jj(o,a){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,o,a)}function Ij(o,a){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,o,a)}function Tj(o){return globalThis.DUCKDB_RUNTIME.closeFile(t,o)}function Bj(o,a){return globalThis.DUCKDB_RUNTIME.checkFile(t,o,a)}function Sj(o){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,o)}function Aj(o,a,c,l){return globalThis.DUCKDB_RUNTIME.moveFile(t,o,a,c,l)}function Oj(o){return globalThis.DUCKDB_RUNTIME.openFile(t,o)}function Dj(o,a,c,l){return globalThis.DUCKDB_RUNTIME.readFile(t,o,a,c,l)}function Fj(o,a){return globalThis.DUCKDB_RUNTIME.truncateFile(t,o,a)}function Ej(o,a,c,l){return globalThis.DUCKDB_RUNTIME.writeFile(t,o,a,c,l)}function Rj(o,a){return globalThis.DUCKDB_RUNTIME.glob(t,o,a)}function Cj(o){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,o)}function Uj(){return 2147483648}function kj(o,a,c){nn.copyWithin(o,a,a+c)}function Mj(o){try{return eo.grow(o-df.byteLength+65535>>>16),ff(eo.buffer),1}catch{}}function Pj(o){var a=nn.length;o=o>>>0;var c=2147483648;if(o>c)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(c,mw(Math.max(o,d),65536)),h=Mj(f);if(h)return!0}return!1}var ju={};function Vj(){return v||"./this.program"}function ds(){if(!ds.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,_:Vj()};for(var c in ju)ju[c]===void 0?delete a[c]:a[c]=ju[c];var l=[];for(var c in a)l.push(c+"="+a[c]);ds.strings=l}return ds.strings}function Nj(o,a){var c=0;return ds().forEach(function(l,d){var f=a+c;fe[o+d*4>>2]=f,_w(l,f),c+=l.length+1}),0}function Lj(o,a){var c=ds();fe[o>>2]=c.length;var l=0;return c.forEach(function(d){l+=d.length+1}),fe[a>>2]=l,0}function xj(o){return 0}function qj(o,a){var c=o==1||o==2?2:ri();return ii[a>>0]=c,0}function Wj(o,a,c,l,d,f){var h=it.getStreamFromFD(o),p=it.doReadv(h,a,c,l);return fe[f>>2]=p,0}function zj(o,a,c,l,d,f){var h=it.getStreamFromFD(o),p=it.doWritev(h,a,c,l);return fe[f>>2]=p,0}function Hj(o,a,c,l){var d=it.getStreamFromFD(o),f=it.doReadv(d,a,c);return fe[l>>2]=f,0}function Yj(o,a,c,l,d){}function Gj(o){var a=it.getStreamFromFD(o);return a.stream_ops&&a.stream_ops.fsync?-a.stream_ops.fsync(a):0}function Kj(o,a,c,l){for(var d=0,f=0;f<c;f++){for(var h=fe[a+f*8>>2],p=fe[a+(f*8+4)>>2],y=0;y<p;y++)it.printChar(o,nn[h+y]);d+=p}return fe[l>>2]=d,0}function $j(){return lw()}function Jj(){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=f1("crypto");return function(){return a.randomBytes(1)[0]}}catch{}return function(){ri("randomDevice")}}function oo(o,a){oo.randomDevice||(oo.randomDevice=Jj());for(var c=0;c<a;c++)ii[o+c>>0]=oo.randomDevice();return 0}function Qj(o){return o}function Zj(o){ot(o)}function ao(o){return o%4==0&&(o%100!=0||o%400==0)}function Iu(o,a){for(var c=0,l=0;l<=a;c+=o[l++]);return c}var uo=[31,29,31,30,31,30,31,31,30,31,30,31],co=[31,28,31,30,31,30,31,31,30,31,30,31];function lo(o,a){for(var c=new Date(o.getTime());a>0;){var l=ao(c.getFullYear()),d=c.getMonth(),f=(l?uo:co)[d];if(a>f-c.getDate())a-=f-c.getDate()+1,c.setDate(1),d<11?c.setMonth(d+1):(c.setMonth(0),c.setFullYear(c.getFullYear()+1));else return c.setDate(c.getDate()+a),c}return c}function Xj(o,a,c,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?io(d):""},h=io(c),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 $=lo(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+Iu(ao(U.tm_year+1900)?uo:co,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?$:lo($,7-$.getDay()),ge=new Date(U.tm_year+1900,U.tm_mon,U.tm_mday);if(E(Ce,ge)<0){var yt=Iu(ao(ge.getFullYear())?uo:co,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=lo(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?$:lo($,$.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=Iu(ao(ge.getFullYear())?uo:co,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=t0(h,!1);return Be.length>a?0:(lf(Be,o),Be.length-1)}function e0(o,a,c,l){return Xj(o,a,c,l)}function t0(o,a,c){var l=c>0?c:yw(o)+1,d=new Array(l),f=cf(o,d,0,d.length);return a&&(d.length=f),d}var i0={i:xw,A:Ww,G:Hw,b:Gw,n:Kw,I:$w,pa:Jw,j:bf,ua:Qw,u:Zw,E:Xw,c:Yw,Ga:ej,ea:ij,Ia:rj,Ha:nj,Ea:sj,ia:oj,Na:aj,Aa:uj,Fa:cj,sa:lj,Ca:dj,ja:fj,la:hj,ka:pj,La:yj,Ka:_j,ga:mj,qa:gj,xe:vj,ye:wj,ve:jj,we:Ij,ha:Tj,te:Bj,wa:Sj,ue:Aj,ya:Oj,$:Dj,ze:Fj,xa:Ej,se:Rj,re:Cj,Oa:Uj,Sa:kj,Kc:Pj,Qa:Nj,Ra:Lj,Y:xj,Ma:qj,mb:Wj,lb:zj,ra:Hj,Md:Yj,Da:Gj,da:Kj,a:$j,Ja:oo,W:RI,K:mI,R:$0,sc:UB,X:EI,M:FI,va:K0,tc:CB,t:oI,U:PI,rb:eI,Z:fI,V:MI,Cb:X0,e:x0,aa:OI,C:hI,Hb:bS,d:q0,fa:bI,ma:CI,h:z0,Fb:vS,l:G0,ta:vI,o:H0,z:rI,w:nI,Q:iI,x:aI,v:cI,p:II,L:AI,J:SI,Vb:nS,Yb:tS,$b:ZB,hc:HB,Wb:rS,Gb:gS,rc:kB,Zb:eS,ic:zB,ne:xI,Kd:mT,Dd:TT,be:XI,Mb:hS,cd:QT,Ua:t1,Ta:i1,Ud:uT,Jd:bT,vb:DS,Sc:cB,Td:cT,yc:OB,Nb:fS,Eb:wS,ie:YI,Qd:fT,uc:RB,Ed:IT,od:NT,Bd:ST,hb:LS,Rd:dT,ec:GB,Od:pT,bd:ZT,cb:HS,Va:e1,ed:$T,Vd:aT,xd:FT,$a:KS,tb:ES,Fd:jT,db:zS,Db:jS,Pd:hT,yd:DT,ad:XT,Ad:AT,zd:OT,ud:CT,dc:KB,Tb:oS,ge:KI,_d:iT,jc:WB,Zd:rT,Ld:_T,mc:LB,lc:xB,fe:$I,$d:tT,Id:gT,qe:VI,Ac:SB,kc:qB,Xb:iS,zc:AB,pc:PB,Pc:fB,sb:RS,vc:EB,qc:MB,ld:qT,xc:DB,oc:VB,xb:AS,gd:GT,Sb:aS,id:HT,Yc:rB,Jc:mB,Ic:bB,Gc:vB,Hc:gB,md:xT,Ab:TS,Vc:oB,Wa:XS,bc:JB,jb:VS,Tc:uB,nc:NB,Pb:lS,s:N0,k:W0,B:_I,ba:jI,ob:kS,D:yI,ca:wI,pb:US,f:L0,T:Q0,P:pI,fc:J0,g:Z0,m:Y0,Ba:UI,q:sI,r:tI,na:DI,y:uI,O:gI,N:BI,S:lI,za:kI,oa:TI,_:dI,wd:ET,nb:MS,dd:JT,Ub:sS,wc:FB,gc:YB,Ib:mS,gb:xS,le:WI,Sd:lT,ub:FS,ab:GS,sd:kT,td:UT,Qb:cS,pd:VT,Kb:yS,Jb:_S,Lc:_B,ke:zI,qd:PT,vd:RT,Rc:lB,Dc:IB,yb:SS,zb:BS,eb:WS,ee:JI,nd:LT,Lb:pS,Bc:BB,Oc:hB,je:HI,bb:YS,oe:LI,Xd:sT,Yd:nT,Cd:BT,wb:OS,Xc:nB,Fc:wB,Ec:jB,Wc:sB,fb:qS,hd:YT,$c:eB,Xa:ZS,Cc:TB,ib:NS,pe:NI,Nd:yT,Zc:iB,Mc:yB,ce:ZI,_b:XB,me:qI,ae:eT,_c:tB,Hd:vT,Gd:wT,Uc:aB,qb:CS,fd:KT,cc:$B,he:GI,_a:$S,Nc:pB,kb:PS,Wd:oT,Qc:dB,Ya:QS,Za:JS,ac:QB,de:QI,kd:WT,Ob:dS,Rb:uS,Bb:IS,rd:MT,jd:zT,H:Qj,F:Zj,Pa:e0},oU=Nw(),r0=t.___wasm_call_ctors=function(){return(r0=t.___wasm_call_ctors=t.asm.Be).apply(null,arguments)},n0=t._main=function(){return(n0=t._main=t.asm.Ce).apply(null,arguments)},s0=t._duckdb_web_fs_glob_add_path=function(){return(s0=t._duckdb_web_fs_glob_add_path=t.asm.Ee).apply(null,arguments)},o0=t._duckdb_web_clear_response=function(){return(o0=t._duckdb_web_clear_response=t.asm.Fe).apply(null,arguments)},a0=t._duckdb_web_fail_with=function(){return(a0=t._duckdb_web_fail_with=t.asm.Ge).apply(null,arguments)},u0=t._duckdb_web_reset=function(){return(u0=t._duckdb_web_reset=t.asm.He).apply(null,arguments)},c0=t._duckdb_web_connect=function(){return(c0=t._duckdb_web_connect=t.asm.Ie).apply(null,arguments)},l0=t._duckdb_web_disconnect=function(){return(l0=t._duckdb_web_disconnect=t.asm.Je).apply(null,arguments)},d0=t._duckdb_web_flush_files=function(){return(d0=t._duckdb_web_flush_files=t.asm.Ke).apply(null,arguments)},f0=t._duckdb_web_flush_file=function(){return(f0=t._duckdb_web_flush_file=t.asm.Le).apply(null,arguments)},h0=t._duckdb_web_open=function(){return(h0=t._duckdb_web_open=t.asm.Me).apply(null,arguments)},p0=t._duckdb_web_collect_file_stats=function(){return(p0=t._duckdb_web_collect_file_stats=t.asm.Ne).apply(null,arguments)},y0=t._duckdb_web_export_file_stats=function(){return(y0=t._duckdb_web_export_file_stats=t.asm.Oe).apply(null,arguments)},_0=t._duckdb_web_fs_drop_file=function(){return(_0=t._duckdb_web_fs_drop_file=t.asm.Pe).apply(null,arguments)},m0=t._duckdb_web_fs_drop_files=function(){return(m0=t._duckdb_web_fs_drop_files=t.asm.Qe).apply(null,arguments)},b0=t._duckdb_web_fs_glob_file_infos=function(){return(b0=t._duckdb_web_fs_glob_file_infos=t.asm.Re).apply(null,arguments)},g0=t._duckdb_web_fs_get_file_info_by_id=function(){return(g0=t._duckdb_web_fs_get_file_info_by_id=t.asm.Se).apply(null,arguments)},v0=t._duckdb_web_fs_get_file_info_by_name=function(){return(v0=t._duckdb_web_fs_get_file_info_by_name=t.asm.Te).apply(null,arguments)},w0=t._duckdb_web_fs_set_file_descriptor=function(){return(w0=t._duckdb_web_fs_set_file_descriptor=t.asm.Ue).apply(null,arguments)},j0=t._duckdb_web_fs_register_file_url=function(){return(j0=t._duckdb_web_fs_register_file_url=t.asm.Ve).apply(null,arguments)},I0=t._duckdb_web_fs_register_file_buffer=function(){return(I0=t._duckdb_web_fs_register_file_buffer=t.asm.We).apply(null,arguments)},T0=t._duckdb_web_copy_file_to_buffer=function(){return(T0=t._duckdb_web_copy_file_to_buffer=t.asm.Xe).apply(null,arguments)},B0=t._duckdb_web_copy_file_to_path=function(){return(B0=t._duckdb_web_copy_file_to_path=t.asm.Ye).apply(null,arguments)},S0=t._duckdb_web_get_version=function(){return(S0=t._duckdb_web_get_version=t.asm.Ze).apply(null,arguments)},A0=t._duckdb_web_get_feature_flags=function(){return(A0=t._duckdb_web_get_feature_flags=t.asm._e).apply(null,arguments)},O0=t._duckdb_web_tokenize=function(){return(O0=t._duckdb_web_tokenize=t.asm.$e).apply(null,arguments)},D0=t._duckdb_web_prepared_create=function(){return(D0=t._duckdb_web_prepared_create=t.asm.af).apply(null,arguments)},F0=t._duckdb_web_prepared_close=function(){return(F0=t._duckdb_web_prepared_close=t.asm.bf).apply(null,arguments)},E0=t._duckdb_web_prepared_run=function(){return(E0=t._duckdb_web_prepared_run=t.asm.cf).apply(null,arguments)},R0=t._duckdb_web_prepared_send=function(){return(R0=t._duckdb_web_prepared_send=t.asm.df).apply(null,arguments)},C0=t._duckdb_web_query_run=function(){return(C0=t._duckdb_web_query_run=t.asm.ef).apply(null,arguments)},U0=t._duckdb_web_query_send=function(){return(U0=t._duckdb_web_query_send=t.asm.ff).apply(null,arguments)},k0=t._duckdb_web_query_fetch_results=function(){return(k0=t._duckdb_web_query_fetch_results=t.asm.gf).apply(null,arguments)},M0=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(M0=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.hf).apply(null,arguments)},P0=t._duckdb_web_insert_csv_from_path=function(){return(P0=t._duckdb_web_insert_csv_from_path=t.asm.jf).apply(null,arguments)},V0=t._duckdb_web_insert_json_from_path=function(){return(V0=t._duckdb_web_insert_json_from_path=t.asm.kf).apply(null,arguments)},gf=t.___errno_location=function(){return(gf=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)},Tu=t.stackAlloc=function(){return(Tu=t.stackAlloc=t.asm.of).apply(null,arguments)},T=t._setThrew=function(){return(T=t._setThrew=t.asm.pf).apply(null,arguments)},fs=t.___cxa_can_catch=function(){return(fs=t.___cxa_can_catch=t.asm.qf).apply(null,arguments)},vf=t.___cxa_is_pointer_type=function(){return(vf=t.___cxa_is_pointer_type=t.asm.rf).apply(null,arguments)},Bu=t._malloc=function(){return(Bu=t._malloc=t.asm.sf).apply(null,arguments)},Su=t._free=function(){return(Su=t._free=t.asm.tf).apply(null,arguments)},wf=t.dynCall_viiij=function(){return(wf=t.dynCall_viiij=t.asm.uf).apply(null,arguments)},jf=t.dynCall_viiijjj=function(){return(jf=t.dynCall_viiijjj=t.asm.vf).apply(null,arguments)},If=t.dynCall_iiij=function(){return(If=t.dynCall_iiij=t.asm.wf).apply(null,arguments)},Tf=t.dynCall_vijijj=function(){return(Tf=t.dynCall_vijijj=t.asm.xf).apply(null,arguments)},Bf=t.dynCall_iji=function(){return(Bf=t.dynCall_iji=t.asm.yf).apply(null,arguments)},Sf=t.dynCall_vij=function(){return(Sf=t.dynCall_vij=t.asm.zf).apply(null,arguments)},Af=t.dynCall_viijj=function(){return(Af=t.dynCall_viijj=t.asm.Af).apply(null,arguments)},Of=t.dynCall_ji=function(){return(Of=t.dynCall_ji=t.asm.Bf).apply(null,arguments)},Df=t.dynCall_viiijj=function(){return(Df=t.dynCall_viiijj=t.asm.Cf).apply(null,arguments)},Ff=t.dynCall_vijjj=function(){return(Ff=t.dynCall_vijjj=t.asm.Df).apply(null,arguments)},Ef=t.dynCall_jii=function(){return(Ef=t.dynCall_jii=t.asm.Ef).apply(null,arguments)},Rf=t.dynCall_jiiii=function(){return(Rf=t.dynCall_jiiii=t.asm.Ff).apply(null,arguments)},Cf=t.dynCall_iiiiij=function(){return(Cf=t.dynCall_iiiiij=t.asm.Gf).apply(null,arguments)},Uf=t.dynCall_iiiiijj=function(){return(Uf=t.dynCall_iiiiijj=t.asm.Hf).apply(null,arguments)},kf=t.dynCall_viijii=function(){return(kf=t.dynCall_viijii=t.asm.If).apply(null,arguments)},Mf=t.dynCall_viiji=function(){return(Mf=t.dynCall_viiji=t.asm.Jf).apply(null,arguments)},Pf=t.dynCall_vijj=function(){return(Pf=t.dynCall_vijj=t.asm.Kf).apply(null,arguments)},Vf=t.dynCall_viji=function(){return(Vf=t.dynCall_viji=t.asm.Lf).apply(null,arguments)},Nf=t.dynCall_iij=function(){return(Nf=t.dynCall_iij=t.asm.Mf).apply(null,arguments)},Lf=t.dynCall_viij=function(){return(Lf=t.dynCall_viij=t.asm.Nf).apply(null,arguments)},xf=t.dynCall_jiji=function(){return(xf=t.dynCall_jiji=t.asm.Of).apply(null,arguments)},qf=t.dynCall_viiiij=function(){return(qf=t.dynCall_viiiij=t.asm.Pf).apply(null,arguments)},Wf=t.dynCall_iiiij=function(){return(Wf=t.dynCall_iiiij=t.asm.Qf).apply(null,arguments)},zf=t.dynCall_iiiiiji=function(){return(zf=t.dynCall_iiiiiji=t.asm.Rf).apply(null,arguments)},Hf=t.dynCall_iiiji=function(){return(Hf=t.dynCall_iiiji=t.asm.Sf).apply(null,arguments)},Yf=t.dynCall_iiiiji=function(){return(Yf=t.dynCall_iiiiji=t.asm.Tf).apply(null,arguments)},Gf=t.dynCall_jiii=function(){return(Gf=t.dynCall_jiii=t.asm.Uf).apply(null,arguments)},Kf=t.dynCall_jij=function(){return(Kf=t.dynCall_jij=t.asm.Vf).apply(null,arguments)},$f=t.dynCall_j=function(){return($f=t.dynCall_j=t.asm.Wf).apply(null,arguments)},Jf=t.dynCall_viijij=function(){return(Jf=t.dynCall_viijij=t.asm.Xf).apply(null,arguments)},Qf=t.dynCall_iijjijj=function(){return(Qf=t.dynCall_iijjijj=t.asm.Yf).apply(null,arguments)},Zf=t.dynCall_viiiijiiiii=function(){return(Zf=t.dynCall_viiiijiiiii=t.asm.Zf).apply(null,arguments)},Xf=t.dynCall_viiiijiiii=function(){return(Xf=t.dynCall_viiiijiiii=t.asm._f).apply(null,arguments)},eh=t.dynCall_viiijii=function(){return(eh=t.dynCall_viiijii=t.asm.$f).apply(null,arguments)},th=t.dynCall_viiiiiij=function(){return(th=t.dynCall_viiiiiij=t.asm.ag).apply(null,arguments)},ih=t.dynCall_iiijiii=function(){return(ih=t.dynCall_iiijiii=t.asm.bg).apply(null,arguments)},rh=t.dynCall_iiiiijii=function(){return(rh=t.dynCall_iiiiijii=t.asm.cg).apply(null,arguments)},nh=t.dynCall_viijiii=function(){return(nh=t.dynCall_viijiii=t.asm.dg).apply(null,arguments)},sh=t.dynCall_iiijiij=function(){return(sh=t.dynCall_iiijiij=t.asm.eg).apply(null,arguments)},oh=t.dynCall_vijiii=function(){return(oh=t.dynCall_vijiii=t.asm.fg).apply(null,arguments)},ah=t.dynCall_iijjiii=function(){return(ah=t.dynCall_iijjiii=t.asm.gg).apply(null,arguments)},uh=t.dynCall_iijjiiii=function(){return(uh=t.dynCall_iijjiiii=t.asm.hg).apply(null,arguments)},ch=t.dynCall_iiji=function(){return(ch=t.dynCall_iiji=t.asm.ig).apply(null,arguments)},lh=t.dynCall_iijji=function(){return(lh=t.dynCall_iijji=t.asm.jg).apply(null,arguments)},dh=t.dynCall_vijiiii=function(){return(dh=t.dynCall_vijiiii=t.asm.kg).apply(null,arguments)},fh=t.dynCall_iijiiii=function(){return(fh=t.dynCall_iijiiii=t.asm.lg).apply(null,arguments)},hh=t.dynCall_vijij=function(){return(hh=t.dynCall_vijij=t.asm.mg).apply(null,arguments)},ph=t.dynCall_iiijjjj=function(){return(ph=t.dynCall_iiijjjj=t.asm.ng).apply(null,arguments)},yh=t.dynCall_iiijiiii=function(){return(yh=t.dynCall_iiijiiii=t.asm.og).apply(null,arguments)},_h=t.dynCall_jiiij=function(){return(_h=t.dynCall_jiiij=t.asm.pg).apply(null,arguments)},mh=t.dynCall_iiiiijjiijj=function(){return(mh=t.dynCall_iiiiijjiijj=t.asm.qg).apply(null,arguments)},bh=t.dynCall_viijiijji=function(){return(bh=t.dynCall_viijiijji=t.asm.rg).apply(null,arguments)},gh=t.dynCall_vjjijij=function(){return(gh=t.dynCall_vjjijij=t.asm.sg).apply(null,arguments)},vh=t.dynCall_vijjji=function(){return(vh=t.dynCall_vijjji=t.asm.tg).apply(null,arguments)},wh=t.dynCall_vjjii=function(){return(wh=t.dynCall_vjjii=t.asm.ug).apply(null,arguments)},jh=t.dynCall_viiiiiji=function(){return(jh=t.dynCall_viiiiiji=t.asm.vg).apply(null,arguments)},Ih=t.dynCall_jiiijji=function(){return(Ih=t.dynCall_jiiijji=t.asm.wg).apply(null,arguments)},Th=t.dynCall_iijj=function(){return(Th=t.dynCall_iijj=t.asm.xg).apply(null,arguments)},Bh=t.dynCall_iiijjii=function(){return(Bh=t.dynCall_iiijjii=t.asm.yg).apply(null,arguments)},Sh=t.dynCall_iijjii=function(){return(Sh=t.dynCall_iijjii=t.asm.zg).apply(null,arguments)},Ah=t.dynCall_vijii=function(){return(Ah=t.dynCall_vijii=t.asm.Ag).apply(null,arguments)},Oh=t.dynCall_viijjii=function(){return(Oh=t.dynCall_viijjii=t.asm.Bg).apply(null,arguments)},Dh=t.dynCall_viiiijj=function(){return(Dh=t.dynCall_viiiijj=t.asm.Cg).apply(null,arguments)},Fh=t.dynCall_jijjij=function(){return(Fh=t.dynCall_jijjij=t.asm.Dg).apply(null,arguments)},Eh=t.dynCall_jiijii=function(){return(Eh=t.dynCall_jiijii=t.asm.Eg).apply(null,arguments)},Rh=t.dynCall_jijiii=function(){return(Rh=t.dynCall_jijiii=t.asm.Fg).apply(null,arguments)},Ch=t.dynCall_viijiiiii=function(){return(Ch=t.dynCall_viijiiiii=t.asm.Gg).apply(null,arguments)},Uh=t.dynCall_viijiiij=function(){return(Uh=t.dynCall_viijiiij=t.asm.Hg).apply(null,arguments)},kh=t.dynCall_vijiiiji=function(){return(kh=t.dynCall_vijiiiji=t.asm.Ig).apply(null,arguments)},Mh=t.dynCall_jiiji=function(){return(Mh=t.dynCall_jiiji=t.asm.Jg).apply(null,arguments)},Ph=t.dynCall_viiijij=function(){return(Ph=t.dynCall_viiijij=t.asm.Kg).apply(null,arguments)},Vh=t.dynCall_viijiijj=function(){return(Vh=t.dynCall_viijiijj=t.asm.Lg).apply(null,arguments)},Nh=t.dynCall_viiiiijj=function(){return(Nh=t.dynCall_viiiiijj=t.asm.Mg).apply(null,arguments)},Lh=t.dynCall_viiijji=function(){return(Lh=t.dynCall_viiijji=t.asm.Ng).apply(null,arguments)},xh=t.dynCall_viiiji=function(){return(xh=t.dynCall_viiiji=t.asm.Og).apply(null,arguments)},qh=t.dynCall_iiiijiii=function(){return(qh=t.dynCall_iiiijiii=t.asm.Pg).apply(null,arguments)},Wh=t.dynCall_iiijij=function(){return(Wh=t.dynCall_iiijij=t.asm.Qg).apply(null,arguments)},zh=t.dynCall_iiijji=function(){return(zh=t.dynCall_iiijji=t.asm.Rg).apply(null,arguments)},Hh=t.dynCall_viijji=function(){return(Hh=t.dynCall_viijji=t.asm.Sg).apply(null,arguments)},Yh=t.dynCall_iiiijj=function(){return(Yh=t.dynCall_iiiijj=t.asm.Tg).apply(null,arguments)},Gh=t.dynCall_viiijiii=function(){return(Gh=t.dynCall_viiijiii=t.asm.Ug).apply(null,arguments)},Kh=t.dynCall_vijji=function(){return(Kh=t.dynCall_vijji=t.asm.Vg).apply(null,arguments)},$h=t.dynCall_jiiiij=function(){return($h=t.dynCall_jiiiij=t.asm.Wg).apply(null,arguments)},Jh=t.dynCall_jiijiiiii=function(){return(Jh=t.dynCall_jiijiiiii=t.asm.Xg).apply(null,arguments)},Qh=t.dynCall_jiijiijiii=function(){return(Qh=t.dynCall_jiijiijiii=t.asm.Yg).apply(null,arguments)},Zh=t.dynCall_jiijjiii=function(){return(Zh=t.dynCall_jiijjiii=t.asm.Zg).apply(null,arguments)},Xh=t.dynCall_jiijijii=function(){return(Xh=t.dynCall_jiijijii=t.asm._g).apply(null,arguments)},ep=t.dynCall_viiijjij=function(){return(ep=t.dynCall_viiijjij=t.asm.$g).apply(null,arguments)},tp=t.dynCall_vijijjiij=function(){return(tp=t.dynCall_vijijjiij=t.asm.ah).apply(null,arguments)},ip=t.dynCall_viijjij=function(){return(ip=t.dynCall_viijjij=t.asm.bh).apply(null,arguments)},rp=t.dynCall_viiijjiij=function(){return(rp=t.dynCall_viiijjiij=t.asm.ch).apply(null,arguments)},np=t.dynCall_viiiijjjj=function(){return(np=t.dynCall_viiiijjjj=t.asm.dh).apply(null,arguments)},sp=t.dynCall_viijiiiiij=function(){return(sp=t.dynCall_viijiiiiij=t.asm.eh).apply(null,arguments)},op=t.dynCall_viijiiiijj=function(){return(op=t.dynCall_viijiiiijj=t.asm.fh).apply(null,arguments)},ap=t.dynCall_viiijiiiijjj=function(){return(ap=t.dynCall_viiijiiiijjj=t.asm.gh).apply(null,arguments)},up=t.dynCall_viijijiiiijjj=function(){return(up=t.dynCall_viijijiiiijjj=t.asm.hh).apply(null,arguments)},cp=t.dynCall_jiiijii=function(){return(cp=t.dynCall_jiiijii=t.asm.ih).apply(null,arguments)},lp=t.dynCall_viiiiijiiii=function(){return(lp=t.dynCall_viiiiijiiii=t.asm.jh).apply(null,arguments)},dp=t.dynCall_iiijii=function(){return(dp=t.dynCall_iiijii=t.asm.kh).apply(null,arguments)},fp=t.dynCall_fiijii=function(){return(fp=t.dynCall_fiijii=t.asm.lh).apply(null,arguments)},hp=t.dynCall_diijii=function(){return(hp=t.dynCall_diijii=t.asm.mh).apply(null,arguments)},pp=t.dynCall_iiiiiiijii=function(){return(pp=t.dynCall_iiiiiiijii=t.asm.nh).apply(null,arguments)},yp=t.dynCall_viiiiji=function(){return(yp=t.dynCall_viiiiji=t.asm.oh).apply(null,arguments)},_p=t.dynCall_jiiiijii=function(){return(_p=t.dynCall_jiiiijii=t.asm.ph).apply(null,arguments)},mp=t.dynCall_jiiiijiiiiiiii=function(){return(mp=t.dynCall_jiiiijiiiiiiii=t.asm.qh).apply(null,arguments)},bp=t.dynCall_jiiiiijiiii=function(){return(bp=t.dynCall_jiiiiijiiii=t.asm.rh).apply(null,arguments)},gp=t.dynCall_jiiijiii=function(){return(gp=t.dynCall_jiiijiii=t.asm.sh).apply(null,arguments)},vp=t.dynCall_jj=function(){return(vp=t.dynCall_jj=t.asm.th).apply(null,arguments)},wp=t.dynCall_jd=function(){return(wp=t.dynCall_jd=t.asm.uh).apply(null,arguments)},jp=t.dynCall_jf=function(){return(jp=t.dynCall_jf=t.asm.vh).apply(null,arguments)},Ip=t.dynCall_iijjjj=function(){return(Ip=t.dynCall_iijjjj=t.asm.wh).apply(null,arguments)},Tp=t.dynCall_iiijj=function(){return(Tp=t.dynCall_iiijj=t.asm.xh).apply(null,arguments)},Bp=t.dynCall_vijijiiiijjj=function(){return(Bp=t.dynCall_vijijiiiijjj=t.asm.yh).apply(null,arguments)},Sp=t.dynCall_iiiiiiji=function(){return(Sp=t.dynCall_iiiiiiji=t.asm.zh).apply(null,arguments)},Ap=t.dynCall_iiiiiiiiji=function(){return(Ap=t.dynCall_iiiiiiiiji=t.asm.Ah).apply(null,arguments)},Op=t.dynCall_jijijjij=function(){return(Op=t.dynCall_jijijjij=t.asm.Bh).apply(null,arguments)},Dp=t.dynCall_vijjij=function(){return(Dp=t.dynCall_vijjij=t.asm.Ch).apply(null,arguments)},Fp=t.dynCall_viijjj=function(){return(Fp=t.dynCall_viijjj=t.asm.Dh).apply(null,arguments)},Ep=t.dynCall_viijjji=function(){return(Ep=t.dynCall_viijjji=t.asm.Eh).apply(null,arguments)},Rp=t.dynCall_iiiiiij=function(){return(Rp=t.dynCall_iiiiiij=t.asm.Fh).apply(null,arguments)},Cp=t.dynCall_iiiiiiiiiiji=function(){return(Cp=t.dynCall_iiiiiiiiiiji=t.asm.Gh).apply(null,arguments)},Up=t.dynCall_jiiiiiii=function(){return(Up=t.dynCall_jiiiiiii=t.asm.Hh).apply(null,arguments)},kp=t.dynCall_jijj=function(){return(kp=t.dynCall_jijj=t.asm.Ih).apply(null,arguments)},Mp=t.dynCall_viiiijiiiiiiii=function(){return(Mp=t.dynCall_viiiijiiiiiiii=t.asm.Jh).apply(null,arguments)},Pp=t.dynCall_ij=function(){return(Pp=t.dynCall_ij=t.asm.Kh).apply(null,arguments)},Vp=t.dynCall_jjj=function(){return(Vp=t.dynCall_jjj=t.asm.Lh).apply(null,arguments)},Np=t.dynCall_vjii=function(){return(Np=t.dynCall_vjii=t.asm.Mh).apply(null,arguments)},Lp=t.dynCall_vjiiii=function(){return(Lp=t.dynCall_vjiiii=t.asm.Nh).apply(null,arguments)},xp=t.dynCall_viiiiijiii=function(){return(xp=t.dynCall_viiiiijiii=t.asm.Oh).apply(null,arguments)},qp=t.dynCall_jiij=function(){return(qp=t.dynCall_jiij=t.asm.Ph).apply(null,arguments)},Wp=t.dynCall_iiiijjii=function(){return(Wp=t.dynCall_iiiijjii=t.asm.Qh).apply(null,arguments)},zp=t.dynCall_iiiiijji=function(){return(zp=t.dynCall_iiiiijji=t.asm.Rh).apply(null,arguments)},Hp=t.dynCall_viiijjii=function(){return(Hp=t.dynCall_viiijjii=t.asm.Sh).apply(null,arguments)},Yp=t.dynCall_viiiijji=function(){return(Yp=t.dynCall_viiiijji=t.asm.Th).apply(null,arguments)},Gp=t.dynCall_viiiijjii=function(){return(Gp=t.dynCall_viiiijjii=t.asm.Uh).apply(null,arguments)},Kp=t.dynCall_viiiiijji=function(){return(Kp=t.dynCall_viiiiijji=t.asm.Vh).apply(null,arguments)},$p=t.dynCall_iidj=function(){return($p=t.dynCall_iidj=t.asm.Wh).apply(null,arguments)},Jp=t.dynCall_ijji=function(){return(Jp=t.dynCall_ijji=t.asm.Xh).apply(null,arguments)},Qp=t.dynCall_iiiiiiiij=function(){return(Qp=t.dynCall_iiiiiiiij=t.asm.Yh).apply(null,arguments)},Zp=t.dynCall_iiiiiiij=function(){return(Zp=t.dynCall_iiiiiiij=t.asm.Zh).apply(null,arguments)},Xp=t.dynCall_iiiiiiiiiiiij=function(){return(Xp=t.dynCall_iiiiiiiiiiiij=t.asm._h).apply(null,arguments)},ey=t.dynCall_iiiiiiiji=function(){return(ey=t.dynCall_iiiiiiiji=t.asm.$h).apply(null,arguments)},ty=t.dynCall_iiiidjj=function(){return(ty=t.dynCall_iiiidjj=t.asm.ai).apply(null,arguments)},iy=t.dynCall_iiiijjj=function(){return(iy=t.dynCall_iiiijjj=t.asm.bi).apply(null,arguments)},ry=t.dynCall_jiiiii=function(){return(ry=t.dynCall_jiiiii=t.asm.ci).apply(null,arguments)},ny=t.dynCall_jiiiiiijii=function(){return(ny=t.dynCall_jiiiiiijii=t.asm.di).apply(null,arguments)},sy=t.dynCall_iiiijji=function(){return(sy=t.dynCall_iiiijji=t.asm.ei).apply(null,arguments)},oy=t.dynCall_jiiiiii=function(){return(oy=t.dynCall_jiiiiii=t.asm.fi).apply(null,arguments)},ay=t.dynCall_iijiji=function(){return(ay=t.dynCall_iijiji=t.asm.gi).apply(null,arguments)},uy=t.dynCall_vjiiiji=function(){return(uy=t.dynCall_vjiiiji=t.asm.hi).apply(null,arguments)},cy=t.dynCall_viiijijiji=function(){return(cy=t.dynCall_viiijijiji=t.asm.ii).apply(null,arguments)},ly=t.dynCall_jiiijj=function(){return(ly=t.dynCall_jiiijj=t.asm.ji).apply(null,arguments)},dy=t.dynCall_viijiiii=function(){return(dy=t.dynCall_viijiiii=t.asm.ki).apply(null,arguments)},fy=t.dynCall_iiiijii=function(){return(fy=t.dynCall_iiiijii=t.asm.li).apply(null,arguments)},hy=t.dynCall_viiiijii=function(){return(hy=t.dynCall_viiiijii=t.asm.mi).apply(null,arguments)},py=t.dynCall_iijiii=function(){return(py=t.dynCall_iijiii=t.asm.ni).apply(null,arguments)},yy=t.dynCall_jiiiiji=function(){return(yy=t.dynCall_jiiiiji=t.asm.oi).apply(null,arguments)},_y=t.dynCall_vijiijj=function(){return(_y=t.dynCall_vijiijj=t.asm.pi).apply(null,arguments)},my=t.dynCall_vifiijj=function(){return(my=t.dynCall_vifiijj=t.asm.qi).apply(null,arguments)},by=t.dynCall_vidiijj=function(){return(by=t.dynCall_vidiijj=t.asm.ri).apply(null,arguments)},gy=t.dynCall_viiiiij=function(){return(gy=t.dynCall_viiiiij=t.asm.si).apply(null,arguments)},vy=t.dynCall_ijj=function(){return(vy=t.dynCall_ijj=t.asm.ti).apply(null,arguments)},wy=t.dynCall_ijjiii=function(){return(wy=t.dynCall_ijjiii=t.asm.ui).apply(null,arguments)},jy=t.dynCall_vijijjji=function(){return(jy=t.dynCall_vijijjji=t.asm.vi).apply(null,arguments)},Iy=t.dynCall_viiiiijjji=function(){return(Iy=t.dynCall_viiiiijjji=t.asm.wi).apply(null,arguments)},Ty=t.dynCall_viijijj=function(){return(Ty=t.dynCall_viijijj=t.asm.xi).apply(null,arguments)},By=t.dynCall_iiijiijj=function(){return(By=t.dynCall_iiijiijj=t.asm.yi).apply(null,arguments)},Sy=t.dynCall_viiijijjj=function(){return(Sy=t.dynCall_viiijijjj=t.asm.zi).apply(null,arguments)},Ay=t.dynCall_iijiijj=function(){return(Ay=t.dynCall_iijiijj=t.asm.Ai).apply(null,arguments)},Oy=t.dynCall_viiijjjji=function(){return(Oy=t.dynCall_viiijjjji=t.asm.Bi).apply(null,arguments)},Dy=t.dynCall_viiiijiii=function(){return(Dy=t.dynCall_viiiijiii=t.asm.Ci).apply(null,arguments)},Fy=t.dynCall_iijii=function(){return(Fy=t.dynCall_iijii=t.asm.Di).apply(null,arguments)},Ey=t.dynCall_vijjiiii=function(){return(Ey=t.dynCall_vijjiiii=t.asm.Ei).apply(null,arguments)},Ry=t.dynCall_vijijjiiiii=function(){return(Ry=t.dynCall_vijijjiiiii=t.asm.Fi).apply(null,arguments)},Cy=t.dynCall_vijjiiiii=function(){return(Cy=t.dynCall_vijjiiiii=t.asm.Gi).apply(null,arguments)},Uy=t.dynCall_iiijjji=function(){return(Uy=t.dynCall_iiijjji=t.asm.Hi).apply(null,arguments)},ky=t.dynCall_iiiiijjj=function(){return(ky=t.dynCall_iiiiijjj=t.asm.Ii).apply(null,arguments)},My=t.dynCall_jijiiii=function(){return(My=t.dynCall_jijiiii=t.asm.Ji).apply(null,arguments)},Py=t.dynCall_iiijjjii=function(){return(Py=t.dynCall_iiijjjii=t.asm.Ki).apply(null,arguments)},Vy=t.dynCall_iiiiijjji=function(){return(Vy=t.dynCall_iiiiijjji=t.asm.Li).apply(null,arguments)},Ny=t.dynCall_viijiji=function(){return(Ny=t.dynCall_viijiji=t.asm.Mi).apply(null,arguments)};function N0(o){var a=j();try{G.get(o)()}catch(c){if(I(a),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function L0(o,a,c){var l=j();try{G.get(o)(a,c)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function x0(o,a){var c=j();try{return G.get(o)(a)}catch(l){if(I(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function q0(o,a,c){var l=j();try{return G.get(o)(a,c)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function W0(o,a){var c=j();try{G.get(o)(a)}catch(l){if(I(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function z0(o,a,c,l){var d=j();try{return G.get(o)(a,c,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function H0(o,a,c,l,d,f){var h=j();try{return G.get(o)(a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function Y0(o,a,c,l,d){var f=j();try{G.get(o)(a,c,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function G0(o,a,c,l,d){var f=j();try{return G.get(o)(a,c,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function K0(o,a,c,l){var d=j();try{return G.get(o)(a,c,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function $0(o,a,c,l){var d=j();try{return G.get(o)(a,c,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function J0(o,a,c,l){var d=j();try{G.get(o)(a,c,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function Q0(o,a,c,l){var d=j();try{G.get(o)(a,c,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function Z0(o,a,c,l){var d=j();try{G.get(o)(a,c,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function X0(o,a,c){var l=j();try{return G.get(o)(a,c)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function eI(o,a,c){var l=j();try{return G.get(o)(a,c)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function tI(o,a,c,l,d,f,h){var p=j();try{G.get(o)(a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function iI(o,a,c,l,d,f,h,p,y){var m=j();try{return G.get(o)(a,c,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function rI(o,a,c,l,d,f,h){var p=j();try{return G.get(o)(a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function nI(o,a,c,l,d,f,h,p){var y=j();try{return G.get(o)(a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function sI(o,a,c,l,d,f){var h=j();try{G.get(o)(a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function oI(o){var a=j();try{return G.get(o)()}catch(c){if(I(a),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function aI(o,a,c,l,d,f,h,p,y,m,g){var w=j();try{return G.get(o)(a,c,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,c,l,d,f,h,p){var y=j();try{G.get(o)(a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function cI(o,a,c,l,d,f,h,p,y,m,g,w){var A=j();try{return G.get(o)(a,c,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,c,l,d,f,h,p,y,m,g){var w=j();try{G.get(o)(a,c,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function dI(o,a,c,l,d,f,h,p,y,m,g,w,A,E,P,se){var me=j();try{G.get(o)(a,c,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 fI(o,a,c,l,d){var f=j();try{return G.get(o)(a,c,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function hI(o,a,c,l,d){var f=j();try{return G.get(o)(a,c,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function pI(o,a,c,l,d,f){var h=j();try{G.get(o)(a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function yI(o,a,c){var l=j();try{G.get(o)(a,c)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function _I(o,a,c){var l=j();try{G.get(o)(a,c)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function mI(o,a){var c=j();try{return G.get(o)(a)}catch(l){if(I(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function bI(o,a,c,l){var d=j();try{return G.get(o)(a,c,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function gI(o,a,c,l,d,f,h,p,y){var m=j();try{G.get(o)(a,c,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function vI(o,a,c,l,d,f){var h=j();try{return G.get(o)(a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function wI(o,a,c,l){var d=j();try{G.get(o)(a,c,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function jI(o,a,c,l){var d=j();try{G.get(o)(a,c,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function II(o,a,c,l,d,f,h,p,y,m,g,w,A,E,P,se){var me=j();try{return G.get(o)(a,c,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 TI(o,a,c,l,d,f,h,p,y,m,g,w,A,E){var P=j();try{G.get(o)(a,c,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 BI(o,a,c,l,d,f,h,p,y,m){var g=j();try{G.get(o)(a,c,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function SI(o,a,c,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,c,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 AI(o,a,c,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,c,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 OI(o,a,c){var l=j();try{return G.get(o)(a,c)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function DI(o,a,c,l,d,f,h,p,y,m,g){var w=j();try{G.get(o)(a,c,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){var c=j();try{return G.get(o)(a)}catch(l){if(I(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function EI(o,a,c){var l=j();try{return G.get(o)(a,c)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function RI(o,a,c){var l=j();try{return G.get(o)(a,c)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function CI(o,a,c,l){var d=j();try{return G.get(o)(a,c,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function UI(o,a,c,l,d,f,h,p,y,m){var g=j();try{G.get(o)(a,c,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function kI(o,a,c,l,d,f,h,p,y,m,g,w){var A=j();try{G.get(o)(a,c,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 MI(o,a){var c=j();try{return G.get(o)(a)}catch(l){if(I(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function PI(o,a){var c=j();try{return G.get(o)(a)}catch(l){if(I(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function VI(o,a,c,l,d){var f=j();try{return Rf(o,a,c,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function NI(o,a,c,l,d,f,h){var p=j();try{Af(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function LI(o,a,c,l,d){var f=j();try{Lf(o,a,c,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function xI(o,a,c,l,d,f,h){var p=j();try{return Cf(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function qI(o,a,c,l){var d=j();try{Sf(o,a,c,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function WI(o,a,c,l,d,f,h){var p=j();try{qf(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function zI(o,a,c,l,d,f){var h=j();try{wf(o,a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function HI(o,a,c,l,d,f,h,p,y,m){var g=j();try{jf(o,a,c,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function YI(o,a,c,l,d){var f=j();try{return If(o,a,c,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function GI(o,a,c,l,d,f,h,p,y){var m=j();try{Tf(o,a,c,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function KI(o,a,c,l){var d=j();try{return Bf(o,a,c,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function $I(o,a){var c=j();try{return Of(o,a)}catch(l){if(I(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function JI(o,a,c,l,d,f,h,p){var y=j();try{Df(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function QI(o,a,c,l,d,f,h,p){var y=j();try{Ff(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function ZI(o,a,c,l,d,f,h,p,y){var m=j();try{Fp(o,a,c,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function XI(o,a,c,l,d,f,h,p,y){var m=j();try{return Uf(o,a,c,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,c,l,d){var f=j();try{Vf(o,a,c,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function tT(o,a,c){var l=j();try{return Ef(o,a,c)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function iT(o,a,c,l,d){var f=j();try{return vy(o,a,c,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function rT(o,a,c,l,d,f,h,p){var y=j();try{return wy(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function nT(o,a,c,l,d,f,h){var p=j();try{kf(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function sT(o,a,c,l,d,f){var h=j();try{Mf(o,a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function oT(o,a,c,l,d,f){var h=j();try{Pf(o,a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function aT(o,a,c,l){var d=j();try{return Nf(o,a,c,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function uT(o,a,c,l,d,f){var h=j();try{return Wf(o,a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function cT(o,a,c,l,d,f,h,p){var y=j();try{return Yh(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function lT(o,a,c,l,d,f,h,p){var y=j();try{yp(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function dT(o,a,c,l,d,f,h,p){var y=j();try{return Wh(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function fT(o,a,c,l,d,f){var h=j();try{return Hf(o,a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function hT(o,a,c,l,d,f){var h=j();try{return Th(o,a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function pT(o,a,c,l,d,f,h,p){var y=j();try{return zh(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function yT(o,a,c,l,d,f,h,p){var y=j();try{Hh(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function _T(o){var a=j();try{return $f(o)}catch(c){if(I(a),c!==c+0&&c!=="longjmp")throw c;T(1,0)}}function mT(o,a,c,l,d,f,h,p){var y=j();try{return zf(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function bT(o,a,c,l,d,f,h){var p=j();try{return Yf(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function gT(o,a,c,l){var d=j();try{return Gf(o,a,c,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function vT(o,a,c,l,d,f,h){var p=j();try{oh(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function wT(o,a,c,l,d,f,h,p){var y=j();try{dh(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function jT(o,a,c,l,d,f,h,p){var y=j();try{return fh(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function IT(o,a,c,l,d,f,h,p){var y=j();try{return ih(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function TT(o,a,c,l,d,f,h,p,y){var m=j();try{return rh(o,a,c,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function BT(o,a,c,l,d,f,h,p){var y=j();try{nh(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function ST(o,a,c,l,d,f,h,p,y){var m=j();try{return sh(o,a,c,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,c,l,d,f,h,p,y){var m=j();try{return ah(o,a,c,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function OT(o,a,c,l,d,f,h,p,y,m){var g=j();try{return uh(o,a,c,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function DT(o,a,c,l,d,f,h){var p=j();try{return lh(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function FT(o,a,c,l,d){var f=j();try{return ch(o,a,c,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function ET(o,a,c,l,d,f,h,p,y){var m=j();try{th(o,a,c,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,c,l,d,f,h,p){var y=j();try{eh(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function CT(o,a,c,l,d,f,h,p,y,m,g){var w=j();try{return Qf(o,a,c,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function UT(o,a,c,l,d,f,h,p,y,m,g,w){var A=j();try{Zf(o,a,c,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 kT(o,a,c,l,d,f,h,p,y,m,g){var w=j();try{Xf(o,a,c,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function MT(o,a,c,l,d,f,h){var p=j();try{wh(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function PT(o,a,c,l,d,f,h){var p=j();try{xh(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function VT(o,a,c,l,d,f,h,p,y){var m=j();try{Dh(o,a,c,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,c,l,d,f,h,p,y){var m=j();try{return yh(o,a,c,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,c,l,d,f,h,p,y){var m=j();try{Lh(o,a,c,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function xT(o,a,c,l){var d=j();try{return Kf(o,a,c,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function qT(o,a,c,l,d,f){var h=j();try{return _h(o,a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function WT(o,a,c,l,d,f,h,p,y){var m=j();try{vh(o,a,c,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,c,l,d,f,h,p,y,m,g){var w=j();try{gh(o,a,c,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function HT(o,a,c,l,d,f){var h=j();try{return Mh(o,a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function YT(o,a,c,l,d,f,h,p,y,m,g,w){var A=j();try{bh(o,a,c,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 GT(o,a,c,l,d,f,h,p,y){var m=j();try{return Ih(o,a,c,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,c,l,d,f,h){var p=j();try{hh(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function $T(o,a,c,l,d,f,h,p,y,m,g){var w=j();try{return ph(o,a,c,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function JT(o,a,c,l,d,f,h,p,y){var m=j();try{jh(o,a,c,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function QT(o,a,c,l,d,f,h,p,y,m,g,w,A,E,P){var se=j();try{return mh(o,a,c,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 ZT(o,a,c,l,d,f,h,p,y){var m=j();try{return Bh(o,a,c,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function XT(o,a,c,l,d,f,h,p){var y=j();try{return Sh(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function eB(o,a,c,l,d,f,h,p){var y=j();try{Jf(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function tB(o,a,c,l,d,f){var h=j();try{Ah(o,a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function iB(o,a,c,l,d,f,h,p,y){var m=j();try{Oh(o,a,c,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,c,l,d,f,h){var p=j();try{return Eh(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function nB(o,a,c,l,d,f,h,p,y,m){var g=j();try{Ch(o,a,c,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,c,l,d,f,h,p,y,m){var g=j();try{Uh(o,a,c,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,c,l,d,f,h){var p=j();try{return Rh(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function aB(o,a,c,l,d,f,h,p,y,m){var g=j();try{kh(o,a,c,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function uB(o,a,c,l,d,f,h,p,y){var m=j();try{return Fh(o,a,c,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,c,l,d,f,h,p,y){var m=j();try{return qh(o,a,c,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,c,l,d,f,h,p,y){var m=j();try{Gh(o,a,c,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,c,l,d,f,h){var p=j();try{Kh(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function fB(o,a,c,l,d,f,h){var p=j();try{return $h(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function hB(o,a,c,l,d,f,h,p,y,m,g){var w=j();try{ep(o,a,c,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function pB(o,a,c,l,d,f,h,p,y,m,g,w,A){var E=j();try{tp(o,a,c,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 yB(o,a,c,l,d,f,h,p,y,m){var g=j();try{ip(o,a,c,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,c,l,d,f,h,p,y,m,g,w,A){var E=j();try{np(o,a,c,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 mB(o,a,c,l,d,f,h,p,y,m){var g=j();try{return Jh(o,a,c,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,c,l,d,f,h,p,y,m,g,w){var A=j();try{return Qh(o,a,c,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 gB(o,a,c,l,d,f,h,p,y,m){var g=j();try{return Zh(o,a,c,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,c,l,d,f,h,p,y,m){var g=j();try{return Xh(o,a,c,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function wB(o,a,c,l,d,f,h,p,y,m,g,w){var A=j();try{sp(o,a,c,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 jB(o,a,c,l,d,f,h,p,y,m,g,w,A){var E=j();try{op(o,a,c,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,c,l,d,f,h,p,y,m,g,w,A,E,P,se){var me=j();try{ap(o,a,c,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 TB(o,a,c,l,d,f,h,p,y,m,g,w,A,E,P,se,me,Be){var U=j();try{up(o,a,c,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 BB(o,a,c,l,d,f,h,p,y,m,g,w){var A=j();try{rp(o,a,c,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,c,l,d,f){var h=j();try{return ry(o,a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function AB(o,a,c,l,d,f,h,p,y,m,g){var w=j();try{return ny(o,a,c,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function OB(o,a,c,l,d,f,h,p,y){var m=j();try{return sy(o,a,c,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,c,l,d,f,h,p){var y=j();try{return cp(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function FB(o,a,c,l,d,f,h,p,y,m,g,w){var A=j();try{lp(o,a,c,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 EB(o,a,c,l,d,f,h,p,y){var m=j();try{return _p(o,a,c,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,c,l,d,f,h){var p=j();try{return dp(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function CB(o,a,c,l,d,f,h){var p=j();try{return fp(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function UB(o,a,c,l,d,f,h){var p=j();try{return hp(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function kB(o,a,c,l,d,f,h,p,y,m,g){var w=j();try{return pp(o,a,c,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,c,l,d,f,h,p,y,m,g,w,A,E,P){var se=j();try{return mp(o,a,c,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 PB(o,a,c,l,d,f,h,p,y,m,g,w){var A=j();try{return bp(o,a,c,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 VB(o,a,c,l,d,f,h,p,y){var m=j();try{return gp(o,a,c,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function NB(o,a,c){var l=j();try{return vp(o,a,c)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function LB(o,a){var c=j();try{return wp(o,a)}catch(l){if(I(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function xB(o,a){var c=j();try{return jp(o,a)}catch(l){if(I(c),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function qB(o,a,c,l,d,f,h){var p=j();try{return oy(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function WB(o,a,c,l,d,f){var h=j();try{return Jp(o,a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function zB(o,a,c,l,d,f,h,p,y){var m=j();try{return Sp(o,a,c,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,c,l,d,f,h,p,y,m,g){var w=j();try{return Ap(o,a,c,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function YB(o,a,c,l,d,f,h,p,y,m){var g=j();try{Nh(o,a,c,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function GB(o,a,c,l,d,f,h){var p=j();try{return Tp(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function KB(o,a,c,l,d,f,h,p,y,m){var g=j();try{return Ip(o,a,c,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,c,l,d,f,h,p,y,m,g,w,A,E,P,se,me){var Be=j();try{Bp(o,a,c,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 JB(o,a,c,l,d,f,h,p,y,m,g,w){var A=j();try{return Op(o,a,c,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,c,l,d,f,h,p,y){var m=j();try{Dp(o,a,c,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function ZB(o,a,c,l,d,f,h,p,y,m){var g=j();try{return Qp(o,a,c,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,c,l,d,f,h,p,y,m){var g=j();try{Ep(o,a,c,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function eS(o,a,c,l,d,f,h,p){var y=j();try{return Rp(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function tS(o,a,c,l,d,f,h,p,y,m,g,w,A){var E=j();try{return Cp(o,a,c,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 iS(o,a,c,l,d,f,h,p){var y=j();try{return Up(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function rS(o,a,c,l,d,f,h,p,y){var m=j();try{return Zp(o,a,c,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,c,l,d,f,h,p,y,m,g,w,A,E){var P=j();try{return Xp(o,a,c,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 sS(o,a,c,l,d,f,h,p,y,m,g){var w=j();try{xp(o,a,c,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function oS(o,a,c){var l=j();try{return Pp(o,a,c)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function aS(o,a,c,l,d){var f=j();try{return qp(o,a,c,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function uS(o,a,c,l,d,f,h){var p=j();try{Lp(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function cS(o,a,c,l,d,f,h,p,y,m,g,w,A,E,P){var se=j();try{Mp(o,a,c,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 lS(o,a,c,l,d){var f=j();try{return Vp(o,a,c,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function dS(o,a,c,l,d){var f=j();try{Np(o,a,c,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function fS(o,a,c,l,d,f,h,p,y,m){var g=j();try{return Wp(o,a,c,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function hS(o,a,c,l,d,f,h,p,y,m){var g=j();try{return zp(o,a,c,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function pS(o,a,c,l,d,f,h,p,y,m){var g=j();try{Hp(o,a,c,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function yS(o,a,c,l,d,f,h,p,y,m){var g=j();try{Yp(o,a,c,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,c,l,d,f,h,p,y,m,g){var w=j();try{Gp(o,a,c,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function mS(o,a,c,l,d,f,h,p,y,m,g){var w=j();try{Kp(o,a,c,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,c,l,d){var f=j();try{return $p(o,a,c,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function gS(o,a,c,l,d,f,h,p,y,m){var g=j();try{return ey(o,a,c,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,c,l,d,f,h,p,y){var m=j();try{return ty(o,a,c,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,c,l,d,f,h,p,y,m){var g=j();try{return iy(o,a,c,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,c,l,d,f,h,p){var y=j();try{return ay(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function IS(o,a,c,l,d,f,h,p,y){var m=j();try{uy(o,a,c,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function TS(o,a,c,l,d){var f=j();try{return xf(o,a,c,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function BS(o,a,c,l,d,f,h,p,y,m,g,w,A){var E=j();try{cy(o,a,c,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 SS(o,a,c,l,d,f,h,p,y){var m=j();try{Ph(o,a,c,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function AS(o,a,c,l,d,f,h,p){var y=j();try{return ly(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function OS(o,a,c,l,d,f,h,p,y){var m=j();try{dy(o,a,c,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,c,l,d,f,h,p){var y=j();try{return fy(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function FS(o,a,c,l,d,f,h,p,y){var m=j();try{hy(o,a,c,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,c,l,d,f,h){var p=j();try{return py(o,a,c,l,d,f,h)}catch(y){if(I(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function RS(o,a,c,l,d,f,h,p){var y=j();try{return yy(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function CS(o,a,c,l,d,f,h,p,y,m){var g=j();try{_y(o,a,c,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,c,l,d,f,h,p,y){var m=j();try{my(o,a,c,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,c,l,d,f,h,p,y){var m=j();try{by(o,a,c,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function MS(o,a,c,l,d,f,h,p){var y=j();try{gy(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function PS(o,a,c,l,d,f,h,p,y,m,g,w){var A=j();try{jy(o,a,c,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 VS(o,a,c,l,d,f){var h=j();try{return kp(o,a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function NS(o,a,c,l,d,f,h,p,y,m){var g=j();try{Ty(o,a,c,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function LS(o,a,c,l,d,f,h,p,y,m,g){var w=j();try{return By(o,a,c,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function xS(o,a,c,l,d,f,h,p,y,m,g,w,A){var E=j();try{Iy(o,a,c,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,c,l,d,f,h,p,y,m,g){var w=j();try{Vh(o,a,c,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,c,l,d,f,h,p,y,m,g,w,A){var E=j();try{Sy(o,a,c,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,c,l,d,f,h,p,y,m){var g=j();try{return Ay(o,a,c,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function HS(o,a,c,l,d,f,h,p,y,m){var g=j();try{return Uy(o,a,c,l,d,f,h,p,y,m)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;T(1,0)}}function YS(o,a,c,l,d,f,h,p,y,m,g,w,A){var E=j();try{Oy(o,a,c,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 GS(o,a,c,l,d,f,h,p,y,m){var g=j();try{Dy(o,a,c,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,c,l,d,f){var h=j();try{return Fy(o,a,c,l,d,f)}catch(p){if(I(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function $S(o,a,c,l,d,f,h,p,y,m,g,w,A,E){var P=j();try{Ry(o,a,c,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 JS(o,a,c,l,d,f,h,p,y,m,g){var w=j();try{Cy(o,a,c,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,c,l,d,f,h,p,y,m){var g=j();try{Ey(o,a,c,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,c,l,d,f,h,p,y){var m=j();try{Ny(o,a,c,l,d,f,h,p,y)}catch(g){if(I(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function XS(o,a,c,l,d,f,h,p){var y=j();try{return My(o,a,c,l,d,f,h,p)}catch(m){if(I(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function e1(o,a,c,l,d,f,h,p,y,m,g){var w=j();try{return Py(o,a,c,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,c,l,d,f,h,p,y,m,g){var w=j();try{return ky(o,a,c,l,d,f,h,p,y,m,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;T(1,0)}}function i1(o,a,c,l,d,f,h,p,y,m,g,w){var A=j();try{return Vy(o,a,c,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=hw;var fo;function ho(o){this.name="ExitStatus",this.message="Program terminated with exit("+o+")",this.status=o}var r1=!1;ls=function o(){fo||Au(),fo||(ls=o)};function n1(o){var a=t._main,c=0,l=0;try{var d=a(c,l);return s1(d,!0),d}catch(f){return Lw(f)}finally{r1=!0}}function Au(o){if(o=o||_,Or>0||(Aw(),Or>0))return;function a(){fo||(fo=!0,t.calledRun=!0,!W&&(Ow(),Dw(),r(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),Ly&&n1(o),Ew()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),a()},1)):a()}t.run=Au;function s1(o,a){to=o,gu()||Fw(),o1(o)}function o1(o){to=o,gu()||(t.onExit&&t.onExit(o),W=!0),S(o,new ho(o))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var Ly=!0;return t.noInitialRun&&(Ly=!1),Au(),e.ready}}(),iw=eU;var Zd=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=B.RecordBatchReader.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),B.Table.from(r)}send(e){let t=this._bindings.sendQuery(this._conn,e),r=new Xd(this._bindings,this._conn,t),n=B.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 nw(this._bindings,this._conn,t)}insertArrowVectors(e,t){this.insertArrowTable(B.Table.new(e),t)}insertArrowTable(e,t){e.schema.fields.length==0&&console.warn("The schema is empty! If you used arrow.Table.from, consider constructing schema and batches manually"),this.insertArrowBatches(e.schema,e.chunks,t)}insertArrowBatches(e,t,r){e.fields.length==0&&console.warn("The schema is empty! If you used arrow.Table.from, consider constructing schema and batches manually");let n=new mu,s=new B.RecordBatchStreamWriter().reset(n,e),u=!0;for(let _ of t)u||this._bindings.insertArrowFromIPCStream(this._conn,n.flush(),r),u=!1,s.write(_);s.finish(),this._bindings.insertArrowFromIPCStream(this._conn,n.flush(),r)}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)}},Xd=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}},nw=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=B.RecordBatchReader.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),B.Table.from(r)}send(...e){let t=this.bindings.sendPrepared(this.connectionId,this.statementId,e),r=new Xd(this.bindings,this.connectionId,t),n=B.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 tU(){let i=new TextDecoder;return e=>(typeof SharedArrayBuffer!="undefined"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),i.decode(e))}var iU=tU();function qi(i,e){i.ccall("duckdb_web_fail_with",null,["string"],[e])}function us(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 iU(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 u=i.HEAPF64[(s>>3)+0],_=i.HEAPF64[(s>>3)+1],v=i.HEAPF64[(s>>3)+2];return i.stackRestore(n),[u,_,v]}function Ye(i){i.ccall("duckdb_web_clear_response",null,[],[])}var ef=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 rU=new TextEncoder,sw;(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"})(sw||(sw={}));var tf=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 Zd(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 u=us(this.mod,n,s);return Ye(this.mod),u}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 u=us(this.mod,n,s);return Ye(this.mod),u}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=us(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,u]=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,u));let _=us(this.mod,s,u);return Ye(this.mod),_}sendPrepared(e,t,r){let[n,s,u]=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,u));let _=us(this.mod,s,u);return Ye(this.mod),_}insertArrowFromIPCStream(e,t,r){let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let u=r?JSON.stringify(r):"",[_,v,S]=Ae(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,u]);if(_!==Ie.SUCCESS)throw new Error(_e(this.mod,v,S))}insertCSVFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let S in r.columns)r.columnsFlat.push(as(S,r.columns[S]))}let n={...r};n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[u,_,v]=Ae(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,s]);if(u!==Ie.SUCCESS)throw new Error(_e(this.mod,_,v))}insertJSONFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let S in r.columns)r.columnsFlat.push(as(S,r.columns[S]))}let n={...r};n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[u,_,v]=Ae(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,s]);if(u!==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 u=JSON.parse(s);return u??[]}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=rU.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,u,_]=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,u,_));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 u of this.pthread.runningWorkers)u.postMessage({cmd:"registerFileHandle",fileName:e,fileHandle:t});for(let u of this.pthread.unusedWorkers)u.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),u=new Uint8Array(s.length);return u.set(s),Ye(this.mod),u}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 ef(this.mod.HEAPU8.subarray(r,r+n))}};var rf=class extends tf{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 nf=class extends rf{constructor(e,t,r,n=null){super(e,t,r,n)}instantiateImpl(e){return iw({...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 u=_e(i,n,s);Ye(i);let _=JSON.parse(u);if(_==null)return null;let v={..._,blob:null};return gt.fileInfoCache.set(e,v),v}catch{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)=>{try{gt.fileInfoCache.delete(e);let t=gt.getFileInfo(i,e);switch(t?.dataProtocol){case bt.HTTP:{let r=null;try{let n=new XMLHttpRequest;n.open("HEAD",t.dataUrl,!1),n.setRequestHeader("Range","bytes=0-"),n.send(null);let s=n.getResponseHeader("Content-Length");if(n.status==206&&s!==null){let u=i._malloc(2*8);return i.HEAPF64[(u>>3)+0]=+s,i.HEAPF64[(u>>3)+1]=0,u}}catch(n){r=n,console.warn(`HEAD request with range header failed: ${n}`)}if(t.allowFullHttpReads){console.warn(`falling back to full HTTP read for: ${t.dataUrl}`);let n=new XMLHttpRequest;if(n.open("GET",t.dataUrl,!1),n.responseType="arraybuffer",n.send(null),n.status==200){let s=i._malloc(n.response.byteLength),u=new Uint8Array(n.response,0,n.response.byteLength);i.HEAPU8.set(u,s);let _=i._malloc(2*8);return i.HEAPF64[(_>>3)+0]=n.response.byteLength,i.HEAPF64[(_>>3)+1]=s,_}}if(r!=null)throw new Error(`Reading file ${t.fileName} failed with error: ${r}`);return 0}case bt.NATIVE:{let r=gt._files?.get(t.fileName);if(r){let u=i._malloc(2*8);return i.HEAPF64[(u>>3)+0]=r.size,i.HEAPF64[(u>>3)+1]=0,u}console.warn(`Buffering missing file: ${t.fileName}`);let n=i._malloc(2*8),s=i._malloc(1);return i.HEAPF64[(n>>3)+0]=1,i.HEAPF64[(n>>3)+1]=s,n}}}catch(t){console.error(t.toString()),qi(i,t.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{return!1}return!1},syncFile:(i,e)=>{},closeFile:(i,e)=>{let t=gt.getFileInfo(i,e);switch(gt.fileInfoCache.delete(e),t?.dataProtocol){case bt.HTTP:break;case bt.NATIVE:return}},truncateFile:(i,e,t)=>{switch(gt.getFileInfo(i,e)?.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){try{let s=gt.getFileInfo(i,e);switch(s?.dataProtocol){case bt.HTTP:{if(!s.dataUrl)throw new Error(`Missing data URL for file ${e}`);try{let u=new XMLHttpRequest;if(u.open("GET",s.dataUrl,!1),u.responseType="arraybuffer",u.setRequestHeader("Range",`bytes=${n}-${n+r-1}`),u.send(null),u.status==206||u.status==200&&r==u.response.byteLength&&n==0){let _=new Uint8Array(u.response,0,Math.min(u.response.byteLength,r));return i.HEAPU8.set(_,t),_.byteLength}else throw u.status==200?new Error(`Range request for ${s.dataUrl} did not return a partial response: ${u.status} "${u.statusText}"`):new Error(`Range request for ${s.dataUrl} did returned non-success status: ${u.status} "${u.statusText}"`)}catch(u){throw new Error(`Range request for ${s.dataUrl} failed with error: ${u}"`)}}case bt.NATIVE:{let u=gt._files?.get(s.fileName);if(!u)throw new Error(`No handle available for file: ${s.fileName}`);let _=u.slice(n,n+r),v=new Uint8Array(new FileReaderSync().readAsArrayBuffer(_));return i.HEAPU8.set(v,t),v.byteLength}}return 0}catch(s){return qi(i,s.toString()),0}},writeFile:(i,e,t,r,n)=>{switch(gt.getFileInfo(i,e)?.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)=>{let t=gt.getFileInfo(i,e);switch(t?.dataProtocol){case bt.NATIVE:{if(!gt._files?.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 ow=class extends Jd{postMessage(e,t){globalThis.postMessage(e,t)}async instantiate(e,t){return await new nf(this,gt,e,t).instantiate()}};function aw(){let i=new ow;globalThis.onmessage=async e=>{await i.onMessage(e.data)}}aw();return nU;})();
|
|
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
|
|