diff --git "a/utilities_cookies/build/static/js/2.422ca0c4.chunk.js" "b/utilities_cookies/build/static/js/2.422ca0c4.chunk.js" new file mode 100644--- /dev/null +++ "b/utilities_cookies/build/static/js/2.422ca0c4.chunk.js" @@ -0,0 +1,3 @@ +/*! For license information please see 2.422ca0c4.chunk.js.LICENSE.txt */ +(this.webpackJsonpstreamlit_cookie_manager=this.webpackJsonpstreamlit_cookie_manager||[]).push([[2],[function(t,e,n){t.exports=n(10)},function(t,e,n){"use strict";t.exports=n(8)},function(t,e,n){"use strict";n.d(e,"a",(function(){return xf}));var r={};n.r(r),n.d(r,"memcpy",(function(){return Yt})),n.d(r,"joinUint8Arrays",(function(){return Wt})),n.d(r,"toArrayBufferView",(function(){return Ht})),n.d(r,"toInt8Array",(function(){return $t})),n.d(r,"toInt16Array",(function(){return Kt})),n.d(r,"toInt32Array",(function(){return Gt})),n.d(r,"toBigInt64Array",(function(){return qt})),n.d(r,"toUint8Array",(function(){return Jt})),n.d(r,"toUint16Array",(function(){return Zt})),n.d(r,"toUint32Array",(function(){return Qt})),n.d(r,"toBigUint64Array",(function(){return Xt})),n.d(r,"toFloat32Array",(function(){return te})),n.d(r,"toFloat64Array",(function(){return ee})),n.d(r,"toUint8ClampedArray",(function(){return ne})),n.d(r,"toArrayBufferViewIterator",(function(){return ie})),n.d(r,"toInt8ArrayIterator",(function(){return ae})),n.d(r,"toInt16ArrayIterator",(function(){return oe})),n.d(r,"toInt32ArrayIterator",(function(){return ue})),n.d(r,"toUint8ArrayIterator",(function(){return se})),n.d(r,"toUint16ArrayIterator",(function(){return ce})),n.d(r,"toUint32ArrayIterator",(function(){return fe})),n.d(r,"toFloat32ArrayIterator",(function(){return le})),n.d(r,"toFloat64ArrayIterator",(function(){return he})),n.d(r,"toUint8ClampedArrayIterator",(function(){return ye})),n.d(r,"toArrayBufferViewAsyncIterator",(function(){return pe})),n.d(r,"toInt8ArrayAsyncIterator",(function(){return ve})),n.d(r,"toInt16ArrayAsyncIterator",(function(){return be})),n.d(r,"toInt32ArrayAsyncIterator",(function(){return ge})),n.d(r,"toUint8ArrayAsyncIterator",(function(){return me})),n.d(r,"toUint16ArrayAsyncIterator",(function(){return ke})),n.d(r,"toUint32ArrayAsyncIterator",(function(){return we})),n.d(r,"toFloat32ArrayAsyncIterator",(function(){return _e})),n.d(r,"toFloat64ArrayAsyncIterator",(function(){return Ie})),n.d(r,"toUint8ClampedArrayAsyncIterator",(function(){return Se})),n.d(r,"rebaseValueOffsets",(function(){return xe})),n.d(r,"compareArrayLike",(function(){return Ae}));var i={};n.r(i),n.d(i,"getBool",(function(){return un})),n.d(i,"getBit",(function(){return sn})),n.d(i,"setBool",(function(){return cn})),n.d(i,"truncateBitmap",(function(){return fn})),n.d(i,"packBools",(function(){return ln})),n.d(i,"iterateBits",(function(){return hn})),n.d(i,"popcnt_bit_range",(function(){return yn})),n.d(i,"popcnt_array",(function(){return pn})),n.d(i,"popcnt_uint32",(function(){return dn}));var a={};n.r(a),n.d(a,"uint16ToFloat64",(function(){return Nr})),n.d(a,"float64ToUint16",(function(){return Cr}));var o={};n.r(o),n.d(o,"isArrowBigNumSymbol",(function(){return Hr})),n.d(o,"bignumToString",(function(){return Yr})),n.d(o,"bignumToBigInt",(function(){return Wr})),n.d(o,"BN",(function(){return Xr}));var u={};n.r(u),n.d(u,"clampIndex",(function(){return Ci})),n.d(u,"clampRange",(function(){return Vi})),n.d(u,"createElementComparator",(function(){return Pi}));var s={};n.r(s),n.d(s,"BaseInt64",(function(){return ao})),n.d(s,"Uint64",(function(){return oo})),n.d(s,"Int64",(function(){return uo})),n.d(s,"Int128",(function(){return so}));n(3);var c=n(1),f=n.n(c),l=new WeakMap,h=new WeakMap;function y(t){var e=l.get(t);return console.assert(null!=e,"'this' is expected an Event object, but got",t),e}function p(t){null==t.passiveListener?t.event.cancelable&&(t.canceled=!0,"function"===typeof t.event.preventDefault&&t.event.preventDefault()):"undefined"!==typeof console&&"function"===typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",t.passiveListener)}function d(t,e){l.set(this,{eventTarget:t,event:e,eventPhase:2,currentTarget:t,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:e.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});for(var n=Object.keys(e),r=0;r0){for(var t=new Array(arguments.length),e=0;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){u=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(u)throw a}}}}function D(t,e,n,r,i,a,o){try{var u=t[a](o),s=u.value}catch(c){return void n(c)}u.done?e(s):Promise.resolve(s).then(r,i)}function L(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function o(t){D(a,r,i,o,u,"next",t)}function u(t){D(a,r,i,o,u,"throw",t)}o(void 0)}))}}function F(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function M(t,e){for(var n=0;n>>0)+4294967296*this.high},W.Long.prototype.equals=function(t){return this.low==t.low&&this.high==t.high},W.Long.ZERO=new W.Long(0,0),W.Builder=function(t){if(t)e=t;else var e=1024;this.bb=W.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},W.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},W.Builder.prototype.forceDefaults=function(t){this.force_defaults=t},W.Builder.prototype.dataBuffer=function(){return this.bb},W.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())},W.Builder.prototype.prep=function(t,e){t>this.minalign&&(this.minalign=t);for(var n=1+~(this.bb.capacity()-this.space+e)&t-1;this.space=0&&0==this.vtable[e];e--);for(var n=e+1;e>=0;e--)this.addInt16(0!=this.vtable[e]?t-this.vtable[e]:0);this.addInt16(t-this.object_start);var r=(n+2)*W.SIZEOF_SHORT;this.addInt16(r);var i=0,a=this.space;t:for(e=0;e=0;r--)this.writeInt8(n.charCodeAt(r))}this.prep(this.minalign,W.SIZEOF_INT),this.addOffset(t),this.bb.setPosition(this.space)},W.Builder.prototype.requiredField=function(t,e){var n=this.bb.capacity()-t,r=n-this.bb.readInt32(n);if(!(0!=this.bb.readInt16(r+e)))throw new Error("FlatBuffers: field "+e+" must be set")},W.Builder.prototype.startVector=function(t,e,n){this.notNested(),this.vector_num_elems=e,this.prep(W.SIZEOF_INT,t*e),this.prep(n,t*e)},W.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()},W.Builder.prototype.createString=function(t){if(t instanceof Uint8Array)var e=t;else{e=[];for(var n=0;n=56320)r=i;else r=(i<<10)+t.charCodeAt(n++)+-56613888;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(63&r|128))}}this.addInt8(0),this.startVector(1,e.length,1),this.bb.setPosition(this.space-=e.length);n=0;for(var a=this.space,o=this.bb.bytes();n>24},W.ByteBuffer.prototype.readUint8=function(t){return this.bytes_[t]},W.ByteBuffer.prototype.readInt16=function(t){return this.readUint16(t)<<16>>16},W.ByteBuffer.prototype.readUint16=function(t){return this.bytes_[t]|this.bytes_[t+1]<<8},W.ByteBuffer.prototype.readInt32=function(t){return this.bytes_[t]|this.bytes_[t+1]<<8|this.bytes_[t+2]<<16|this.bytes_[t+3]<<24},W.ByteBuffer.prototype.readUint32=function(t){return this.readInt32(t)>>>0},W.ByteBuffer.prototype.readInt64=function(t){return new W.Long(this.readInt32(t),this.readInt32(t+4))},W.ByteBuffer.prototype.readUint64=function(t){return new W.Long(this.readUint32(t),this.readUint32(t+4))},W.ByteBuffer.prototype.readFloat32=function(t){return W.int32[0]=this.readInt32(t),W.float32[0]},W.ByteBuffer.prototype.readFloat64=function(t){return W.int32[W.isLittleEndian?0:1]=this.readInt32(t),W.int32[W.isLittleEndian?1:0]=this.readInt32(t+4),W.float64[0]},W.ByteBuffer.prototype.writeInt8=function(t,e){this.bytes_[t]=e},W.ByteBuffer.prototype.writeUint8=function(t,e){this.bytes_[t]=e},W.ByteBuffer.prototype.writeInt16=function(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8},W.ByteBuffer.prototype.writeUint16=function(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8},W.ByteBuffer.prototype.writeInt32=function(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24},W.ByteBuffer.prototype.writeUint32=function(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24},W.ByteBuffer.prototype.writeInt64=function(t,e){this.writeInt32(t,e.low),this.writeInt32(t+4,e.high)},W.ByteBuffer.prototype.writeUint64=function(t,e){this.writeUint32(t,e.low),this.writeUint32(t+4,e.high)},W.ByteBuffer.prototype.writeFloat32=function(t,e){W.float32[0]=e,this.writeInt32(t,W.int32[0])},W.ByteBuffer.prototype.writeFloat64=function(t,e){W.float64[0]=e,this.writeInt32(t,W.int32[W.isLittleEndian?0:1]),this.writeInt32(t+4,W.int32[W.isLittleEndian?1:0])},W.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length>10),56320+(1023&a)))}return r},W.ByteBuffer.prototype.__indirect=function(t){return t+this.readInt32(t)},W.ByteBuffer.prototype.__vector=function(t){return t+this.readInt32(t)+W.SIZEOF_INT},W.ByteBuffer.prototype.__vector_len=function(t){return this.readInt32(t+this.readInt32(t))},W.ByteBuffer.prototype.__has_identifier=function(t){if(t.length!=W.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+W.FILE_IDENTIFIER_LENGTH);for(var e=0;e>6*n)+r];n>0;){var a=e>>6*(n-1);i.push(128|63&a),n-=1}return i}}Z.prototype={decode:function(t,e){var n;n="object"===typeof t&&t instanceof ArrayBuffer?new Uint8Array(t):"object"===typeof t&&"buffer"in t&&t.buffer instanceof ArrayBuffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(0),e=$(e),this._streaming||(this._decoder=new X({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(e.stream);for(var r,i=new K(n),a=[];!i.endOfStream()&&(r=this._decoder.handler(i,i.read()))!==G;)null!==r&&(Array.isArray(r)?a.push.apply(a,r):a.push(r));if(!this._streaming){do{if((r=this._decoder.handler(i,i.read()))===G)break;null!==r&&(Array.isArray(r)?a.push.apply(a,r):a.push(r))}while(!i.endOfStream());this._decoder=null}return a.length&&(-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===a[0]?(this._BOMseen=!0,a.shift()):this._BOMseen=!0)),function(t){for(var e="",n=0;n>10),56320+(1023&r)))}return e}(a)}},Q.prototype={encode:function(t,e){t=t?String(t):"",e=$(e),this._streaming||(this._encoder=new tt(this._options)),this._streaming=Boolean(e.stream);for(var n,r=[],i=new K(function(t){for(var e=String(t),n=e.length,r=0,i=[];r57343)i.push(a);else if(56320<=a&&a<=57343)i.push(65533);else if(55296<=a&&a<=56319)if(r===n-1)i.push(65533);else{var o=t.charCodeAt(r+1);if(56320<=o&&o<=57343){var u=1023&a,s=1023&o;i.push(65536+(u<<10)+s),r+=1}else i.push(65533)}r+=1}return i}(t));!i.endOfStream()&&(n=this._encoder.handler(i,i.read()))!==G;)Array.isArray(n)?r.push.apply(r,n):r.push(n);if(!this._streaming){for(;(n=this._encoder.handler(i,i.read()))!==G;)Array.isArray(n)?r.push.apply(r,n):r.push(n);this._encoder=null}return new Uint8Array(r)}};var et="function"===typeof Buffer?Buffer:null,nt="function"===typeof TextDecoder&&"function"===typeof TextEncoder,rt=function(t){if(nt||!et){var e=new t("utf-8");return function(t){return e.decode(t)}}return function(t){var e=Jt(t),n=e.buffer,r=e.byteOffset,i=e.length;return et.from(n,r,i).toString()}}("undefined"!==typeof TextDecoder?TextDecoder:Z),it=function(t){if(nt||!et){var e=new t;return function(t){return e.encode(t)}}return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Jt(et.from(t,"utf8"))}}("undefined"!==typeof TextEncoder?TextEncoder:Q);function at(t,e){return at=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},at(t,e)}function ot(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(t,"prototype",{value:Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),writable:!1}),e&&at(t,e)}function ut(t){return ut=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ut(t)}function st(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var ct=n(4),ft=n.n(ct);function lt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ht(t,e){if(e&&("object"===ft()(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return lt(t)}function yt(t){var e=st();return function(){var n,r=ut(t);if(e){var i=ut(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ht(this,n)}}var pt=Object.freeze({done:!0,value:void 0}),dt=function(){function t(e){F(this,t),this._json=e}return E(t,[{key:"schema",get:function(){return this._json.schema}},{key:"batches",get:function(){return this._json.batches||[]}},{key:"dictionaries",get:function(){return this._json.dictionaries||[]}}]),t}(),vt=function(){function t(){F(this,t)}return E(t,[{key:"tee",value:function(){return this._getDOMStream().tee()}},{key:"pipe",value:function(t,e){return this._getNodeStream().pipe(t,e)}},{key:"pipeTo",value:function(t,e){return this._getDOMStream().pipeTo(t,e)}},{key:"pipeThrough",value:function(t,e){return this._getDOMStream().pipeThrough(t,e)}},{key:"_getDOMStream",value:function(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}},{key:"_getNodeStream",value:function(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}}]),t}(),bt=function(t,e){ot(r,t);var n=yt(r);function r(){var t;return F(this,r),(t=n.call(this))._values=[],t.resolvers=[],t._closedPromise=new Promise((function(e){return t._closedPromiseResolve=e})),t}return E(r,[{key:"closed",get:function(){return this._closedPromise}},{key:"cancel",value:function(){var t=L(R.mark((function t(e){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.return(e);case 2:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"write",value:function(t){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(t):this.resolvers.shift().resolve({done:!1,value:t}))}},{key:"abort",value:function(t){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:t}:this.resolvers.shift().reject({done:!0,value:t}))}},{key:"close",value:function(){if(this._closedPromiseResolve){for(var t=this.resolvers;t.length>0;)t.shift().resolve(pt);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}},{key:e,value:function(){return this}},{key:"toDOMStream",value:function(t){return Be.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,t)}},{key:"toNodeStream",value:function(t){return Be.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,t)}},{key:"throw",value:function(){var t=L(R.mark((function t(e){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.abort(e);case 2:return t.abrupt("return",pt);case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"return",value:function(){var t=L(R.mark((function t(e){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.close();case 2:return t.abrupt("return",pt);case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"read",value:function(){var t=L(R.mark((function t(e){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.next(e,"read");case 2:return t.abrupt("return",t.sent.value);case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"peek",value:function(){var t=L(R.mark((function t(e){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.next(e,"peek");case 2:return t.abrupt("return",t.sent.value);case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"next",value:function(){var t=this;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((function(e,n){t.resolvers.push({resolve:e,reject:n})})):Promise.resolve(pt)}},{key:"_ensureOpen",value:function(){if(this._closedPromiseResolve)return!0;throw new Error("".concat(this," is closed"))}}]),r}(vt,Symbol.asyncIterator),gt=U(function(){var t=function(){throw new Error("BigInt is not available in this environment")};function e(){throw t()}return e.asIntN=function(){throw t()},e.asUintN=function(){throw t()},"undefined"!==typeof BigInt?[BigInt,!0]:[e,!1]}(),2),mt=gt[0],kt=gt[1],wt=U(function(){var t=function(){throw new Error("BigInt64Array is not available in this environment")};return"undefined"!==typeof BigInt64Array?[BigInt64Array,!0]:[function(){function e(){throw F(this,e),t()}return E(e,null,[{key:"BYTES_PER_ELEMENT",get:function(){return 8}},{key:"of",value:function(){throw t()}},{key:"from",value:function(){throw t()}}]),e}(),!1]}(),2),_t=wt[0],It=(wt[1],U(function(){var t=function(){throw new Error("BigUint64Array is not available in this environment")};return"undefined"!==typeof BigUint64Array?[BigUint64Array,!0]:[function(){function e(){throw F(this,e),t()}return E(e,null,[{key:"BYTES_PER_ELEMENT",get:function(){return 8}},{key:"of",value:function(){throw t()}},{key:"from",value:function(){throw t()}}]),e}(),!1]}(),2)),St=It[0],xt=(It[1],function(t){return"number"===typeof t}),At=function(t){return"boolean"===typeof t},Tt=function(t){return"function"===typeof t},Bt=function(t){return null!=t&&Object(t)===t},Ot=function(t){return Bt(t)&&Tt(t.then)},Dt=function(t){return Bt(t)&&Tt(t[Symbol.iterator])},Lt=function(t){return Bt(t)&&Tt(t[Symbol.asyncIterator])},Ft=function(t){return Bt(t)&&Bt(t.schema)},Mt=function(t){return Bt(t)&&"done"in t&&"value"in t},Et=function(t){return Bt(t)&&Tt(t.stat)&&xt(t.fd)},Ut=function(t){return Bt(t)&&Ct(t.body)},Nt=function(t){return Bt(t)&&Tt(t.abort)&&Tt(t.getWriter)&&!(t instanceof vt)},Ct=function(t){return Bt(t)&&Tt(t.cancel)&&Tt(t.getReader)&&!(t instanceof vt)},Vt=function(t){return Bt(t)&&Tt(t.end)&&Tt(t.write)&&At(t.writable)&&!(t instanceof vt)},jt=function(t){return Bt(t)&&Tt(t.read)&&Tt(t.pipe)&&At(t.readable)&&!(t instanceof vt)},Rt=R.mark(ie),Pt=W.ByteBuffer,zt="undefined"!==typeof SharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;function Yt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.byteLength,i=t.byteLength,a=new Uint8Array(t.buffer,t.byteOffset,i),o=new Uint8Array(e.buffer,e.byteOffset,Math.min(r,i));return a.set(o,n),t}function Wt(t,e){for(var n,r,i,a=function(t){for(var e,n,r,i,a,o,u=t[0]?[t[0]]:[],s=0,c=0,f=t.length;++s0)do{if(t[n]!==e[n])return!1}while(++n0&&(r.push(i),u+=i.byteLength),!(e||o<=u)){y.next=22;break}case 16:return y.next=18,s();case 18:h=y.sent,a=h.cmd,o=h.size;case 21:if(o0&&(i.push(a),s+=a.byteLength),!(n||u<=s)){t.next=31;break}case 25:return t.next=27,c();case 27:y=t.sent,o=y.cmd,u=y.size;case 30:if(u0&&(i.push(Jt(a)),s+=a.byteLength),!(n||u<=s)){t.next=31;break}case 25:return t.next=27,c();case 27:y=t.sent,o=y.cmd,u=y.size;case 30:if(u=i)){t.next=2;break}return t.abrupt("return",{done:!1,value:new Uint8Array(n,0,i)});case 2:return t.next=4,e.read(new Uint8Array(n,r,i-r));case 4:if(a=t.sent,o=a.done,u=a.value,!((r+=u.byteLength)0&&(c.push(f),s+=f.byteLength)),!(i||u<=s)){t.next=36;break}case 30:return t.next=32,l();case 32:d=t.sent,o=d.cmd,u=d.size;case 35:if(u=0;n--)t.addInt32(e[n]);return t.endVector()}},{key:"startTypeIdsVector",value:function(t,e){t.startVector(4,e,4)}},{key:"endUnion",value:function(t){return t.endObject()}},{key:"createUnion",value:function(t,n,r){return e.startUnion(t),e.addMode(t,n),e.addTypeIds(t,r),e.endUnion(t)}}]),e}();e.Union=n}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(t){!function(t){!function(t){var e=function(){function t(){F(this,t),this.bb=null,this.bb_pos=0}return E(t,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"bitWidth",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt32(this.bb_pos+t):0}},{key:"isSigned",value:function(){var t=this.bb.__offset(this.bb_pos,6);return!!t&&!!this.bb.readInt8(this.bb_pos+t)}}],[{key:"getRootAsInt",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startInt",value:function(t){t.startObject(2)}},{key:"addBitWidth",value:function(t,e){t.addFieldInt32(0,e,0)}},{key:"addIsSigned",value:function(t,e){t.addFieldInt8(1,+e,0)}},{key:"endInt",value:function(t){return t.endObject()}},{key:"createInt",value:function(e,n,r){return t.startInt(e),t.addBitWidth(e,n),t.addIsSigned(e,r),t.endInt(e)}}]),t}();t.Int=e}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(e){!function(e){!function(e){var n=function(){function e(){F(this,e),this.bb=null,this.bb_pos=0}return E(e,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"precision",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):t.apache.arrow.flatbuf.Precision.HALF}}],[{key:"getRootAsFloatingPoint",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startFloatingPoint",value:function(t){t.startObject(1)}},{key:"addPrecision",value:function(e,n){e.addFieldInt16(0,n,t.apache.arrow.flatbuf.Precision.HALF)}},{key:"endFloatingPoint",value:function(t){return t.endObject()}},{key:"createFloatingPoint",value:function(t,n){return e.startFloatingPoint(t),e.addPrecision(t,n),e.endFloatingPoint(t)}}]),e}();e.FloatingPoint=n}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(t){!function(t){!function(t){var e=function(){function t(){F(this,t),this.bb=null,this.bb_pos=0}return E(t,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}}],[{key:"getRootAsUtf8",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startUtf8",value:function(t){t.startObject(0)}},{key:"endUtf8",value:function(t){return t.endObject()}},{key:"createUtf8",value:function(e){return t.startUtf8(e),t.endUtf8(e)}}]),t}();t.Utf8=e}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(t){!function(t){!function(t){var e=function(){function t(){F(this,t),this.bb=null,this.bb_pos=0}return E(t,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}}],[{key:"getRootAsBinary",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startBinary",value:function(t){t.startObject(0)}},{key:"endBinary",value:function(t){return t.endObject()}},{key:"createBinary",value:function(e){return t.startBinary(e),t.endBinary(e)}}]),t}();t.Binary=e}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(t){!function(t){!function(t){var e=function(){function t(){F(this,t),this.bb=null,this.bb_pos=0}return E(t,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}}],[{key:"getRootAsLargeUtf8",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startLargeUtf8",value:function(t){t.startObject(0)}},{key:"endLargeUtf8",value:function(t){return t.endObject()}},{key:"createLargeUtf8",value:function(e){return t.startLargeUtf8(e),t.endLargeUtf8(e)}}]),t}();t.LargeUtf8=e}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(t){!function(t){!function(t){var e=function(){function t(){F(this,t),this.bb=null,this.bb_pos=0}return E(t,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}}],[{key:"getRootAsLargeBinary",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startLargeBinary",value:function(t){t.startObject(0)}},{key:"endLargeBinary",value:function(t){return t.endObject()}},{key:"createLargeBinary",value:function(e){return t.startLargeBinary(e),t.endLargeBinary(e)}}]),t}();t.LargeBinary=e}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(t){!function(t){!function(t){var e=function(){function t(){F(this,t),this.bb=null,this.bb_pos=0}return E(t,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"byteWidth",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt32(this.bb_pos+t):0}}],[{key:"getRootAsFixedSizeBinary",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startFixedSizeBinary",value:function(t){t.startObject(1)}},{key:"addByteWidth",value:function(t,e){t.addFieldInt32(0,e,0)}},{key:"endFixedSizeBinary",value:function(t){return t.endObject()}},{key:"createFixedSizeBinary",value:function(e,n){return t.startFixedSizeBinary(e),t.addByteWidth(e,n),t.endFixedSizeBinary(e)}}]),t}();t.FixedSizeBinary=e}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(t){!function(t){!function(t){var e=function(){function t(){F(this,t),this.bb=null,this.bb_pos=0}return E(t,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}}],[{key:"getRootAsBool",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startBool",value:function(t){t.startObject(0)}},{key:"endBool",value:function(t){return t.endObject()}},{key:"createBool",value:function(e){return t.startBool(e),t.endBool(e)}}]),t}();t.Bool=e}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(t){!function(t){!function(t){var e=function(){function t(){F(this,t),this.bb=null,this.bb_pos=0}return E(t,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"precision",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt32(this.bb_pos+t):0}},{key:"scale",value:function(){var t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt32(this.bb_pos+t):0}}],[{key:"getRootAsDecimal",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startDecimal",value:function(t){t.startObject(2)}},{key:"addPrecision",value:function(t,e){t.addFieldInt32(0,e,0)}},{key:"addScale",value:function(t,e){t.addFieldInt32(1,e,0)}},{key:"endDecimal",value:function(t){return t.endObject()}},{key:"createDecimal",value:function(e,n,r){return t.startDecimal(e),t.addPrecision(e,n),t.addScale(e,r),t.endDecimal(e)}}]),t}();t.Decimal=e}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(e){!function(e){!function(e){var n=function(){function e(){F(this,e),this.bb=null,this.bb_pos=0}return E(e,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"unit",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):t.apache.arrow.flatbuf.DateUnit.MILLISECOND}}],[{key:"getRootAsDate",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startDate",value:function(t){t.startObject(1)}},{key:"addUnit",value:function(e,n){e.addFieldInt16(0,n,t.apache.arrow.flatbuf.DateUnit.MILLISECOND)}},{key:"endDate",value:function(t){return t.endObject()}},{key:"createDate",value:function(t,n){return e.startDate(t),e.addUnit(t,n),e.endDate(t)}}]),e}();e.Date=n}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(e){!function(e){!function(e){var n=function(){function e(){F(this,e),this.bb=null,this.bb_pos=0}return E(e,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"unit",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):t.apache.arrow.flatbuf.TimeUnit.MILLISECOND}},{key:"bitWidth",value:function(){var t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt32(this.bb_pos+t):32}}],[{key:"getRootAsTime",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startTime",value:function(t){t.startObject(2)}},{key:"addUnit",value:function(e,n){e.addFieldInt16(0,n,t.apache.arrow.flatbuf.TimeUnit.MILLISECOND)}},{key:"addBitWidth",value:function(t,e){t.addFieldInt32(1,e,32)}},{key:"endTime",value:function(t){return t.endObject()}},{key:"createTime",value:function(t,n,r){return e.startTime(t),e.addUnit(t,n),e.addBitWidth(t,r),e.endTime(t)}}]),e}();e.Time=n}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(e){!function(e){!function(e){var n=function(){function e(){F(this,e),this.bb=null,this.bb_pos=0}return E(e,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"unit",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):t.apache.arrow.flatbuf.TimeUnit.SECOND}},{key:"timezone",value:function(t){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__string(this.bb_pos+e,t):null}}],[{key:"getRootAsTimestamp",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startTimestamp",value:function(t){t.startObject(2)}},{key:"addUnit",value:function(e,n){e.addFieldInt16(0,n,t.apache.arrow.flatbuf.TimeUnit.SECOND)}},{key:"addTimezone",value:function(t,e){t.addFieldOffset(1,e,0)}},{key:"endTimestamp",value:function(t){return t.endObject()}},{key:"createTimestamp",value:function(t,n,r){return e.startTimestamp(t),e.addUnit(t,n),e.addTimezone(t,r),e.endTimestamp(t)}}]),e}();e.Timestamp=n}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(e){!function(e){!function(e){var n=function(){function e(){F(this,e),this.bb=null,this.bb_pos=0}return E(e,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"unit",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):t.apache.arrow.flatbuf.IntervalUnit.YEAR_MONTH}}],[{key:"getRootAsInterval",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startInterval",value:function(t){t.startObject(1)}},{key:"addUnit",value:function(e,n){e.addFieldInt16(0,n,t.apache.arrow.flatbuf.IntervalUnit.YEAR_MONTH)}},{key:"endInterval",value:function(t){return t.endObject()}},{key:"createInterval",value:function(t,n){return e.startInterval(t),e.addUnit(t,n),e.endInterval(t)}}]),e}();e.Interval=n}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(e){!function(e){!function(e){var n=function(){function e(){F(this,e),this.bb=null,this.bb_pos=0}return E(e,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"unit",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):t.apache.arrow.flatbuf.TimeUnit.MILLISECOND}}],[{key:"getRootAsDuration",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startDuration",value:function(t){t.startObject(1)}},{key:"addUnit",value:function(e,n){e.addFieldInt16(0,n,t.apache.arrow.flatbuf.TimeUnit.MILLISECOND)}},{key:"endDuration",value:function(t){return t.endObject()}},{key:"createDuration",value:function(t,n){return e.startDuration(t),e.addUnit(t,n),e.endDuration(t)}}]),e}();e.Duration=n}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(t){!function(t){!function(t){var e=function(){function t(){F(this,t),this.bb=null,this.bb_pos=0}return E(t,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"key",value:function(t){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.__string(this.bb_pos+e,t):null}},{key:"value",value:function(t){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__string(this.bb_pos+e,t):null}}],[{key:"getRootAsKeyValue",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startKeyValue",value:function(t){t.startObject(2)}},{key:"addKey",value:function(t,e){t.addFieldOffset(0,e,0)}},{key:"addValue",value:function(t,e){t.addFieldOffset(1,e,0)}},{key:"endKeyValue",value:function(t){return t.endObject()}},{key:"createKeyValue",value:function(e,n,r){return t.startKeyValue(e),t.addKey(e,n),t.addValue(e,r),t.endKeyValue(e)}}]),t}();t.KeyValue=e}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(e){!function(e){!function(e){var n=function(){function e(){F(this,e),this.bb=null,this.bb_pos=0}return E(e,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"id",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt64(this.bb_pos+t):this.bb.createLong(0,0)}},{key:"indexType",value:function(e){var n=this.bb.__offset(this.bb_pos,6);return n?(e||new t.apache.arrow.flatbuf.Int).__init(this.bb.__indirect(this.bb_pos+n),this.bb):null}},{key:"isOrdered",value:function(){var t=this.bb.__offset(this.bb_pos,8);return!!t&&!!this.bb.readInt8(this.bb_pos+t)}}],[{key:"getRootAsDictionaryEncoding",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startDictionaryEncoding",value:function(t){t.startObject(3)}},{key:"addId",value:function(t,e){t.addFieldInt64(0,e,t.createLong(0,0))}},{key:"addIndexType",value:function(t,e){t.addFieldOffset(1,e,0)}},{key:"addIsOrdered",value:function(t,e){t.addFieldInt8(2,+e,0)}},{key:"endDictionaryEncoding",value:function(t){return t.endObject()}},{key:"createDictionaryEncoding",value:function(t,n,r,i){return e.startDictionaryEncoding(t),e.addId(t,n),e.addIndexType(t,r),e.addIsOrdered(t,i),e.endDictionaryEncoding(t)}}]),e}();e.DictionaryEncoding=n}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(e){!function(e){!function(e){var n=function(){function e(){F(this,e),this.bb=null,this.bb_pos=0}return E(e,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"name",value:function(t){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.__string(this.bb_pos+e,t):null}},{key:"nullable",value:function(){var t=this.bb.__offset(this.bb_pos,6);return!!t&&!!this.bb.readInt8(this.bb_pos+t)}},{key:"typeType",value:function(){var e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):t.apache.arrow.flatbuf.Type.NONE}},{key:"type",value:function(t){var e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__union(t,this.bb_pos+e):null}},{key:"dictionary",value:function(e){var n=this.bb.__offset(this.bb_pos,12);return n?(e||new t.apache.arrow.flatbuf.DictionaryEncoding).__init(this.bb.__indirect(this.bb_pos+n),this.bb):null}},{key:"children",value:function(e,n){var r=this.bb.__offset(this.bb_pos,14);return r?(n||new t.apache.arrow.flatbuf.Field).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*e),this.bb):null}},{key:"childrenLength",value:function(){var t=this.bb.__offset(this.bb_pos,14);return t?this.bb.__vector_len(this.bb_pos+t):0}},{key:"customMetadata",value:function(e,n){var r=this.bb.__offset(this.bb_pos,16);return r?(n||new t.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*e),this.bb):null}},{key:"customMetadataLength",value:function(){var t=this.bb.__offset(this.bb_pos,16);return t?this.bb.__vector_len(this.bb_pos+t):0}}],[{key:"getRootAsField",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startField",value:function(t){t.startObject(7)}},{key:"addName",value:function(t,e){t.addFieldOffset(0,e,0)}},{key:"addNullable",value:function(t,e){t.addFieldInt8(1,+e,0)}},{key:"addTypeType",value:function(e,n){e.addFieldInt8(2,n,t.apache.arrow.flatbuf.Type.NONE)}},{key:"addType",value:function(t,e){t.addFieldOffset(3,e,0)}},{key:"addDictionary",value:function(t,e){t.addFieldOffset(4,e,0)}},{key:"addChildren",value:function(t,e){t.addFieldOffset(5,e,0)}},{key:"createChildrenVector",value:function(t,e){t.startVector(4,e.length,4);for(var n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}},{key:"startChildrenVector",value:function(t,e){t.startVector(4,e,4)}},{key:"addCustomMetadata",value:function(t,e){t.addFieldOffset(6,e,0)}},{key:"createCustomMetadataVector",value:function(t,e){t.startVector(4,e.length,4);for(var n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}},{key:"startCustomMetadataVector",value:function(t,e){t.startVector(4,e,4)}},{key:"endField",value:function(t){return t.endObject()}},{key:"createField",value:function(t,n,r,i,a,o,u,s){return e.startField(t),e.addName(t,n),e.addNullable(t,r),e.addTypeType(t,i),e.addType(t,a),e.addDictionary(t,o),e.addChildren(t,u),e.addCustomMetadata(t,s),e.endField(t)}}]),e}();e.Field=n}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(t){!function(t){!function(t){var e=function(){function t(){F(this,t),this.bb=null,this.bb_pos=0}return E(t,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"offset",value:function(){return this.bb.readInt64(this.bb_pos)}},{key:"length",value:function(){return this.bb.readInt64(this.bb_pos+8)}}],[{key:"createBuffer",value:function(t,e,n){return t.prep(8,16),t.writeInt64(n),t.writeInt64(e),t.offset()}}]),t}();t.Buffer=e}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(e){!function(e){!function(e){var n=function(){function e(){F(this,e),this.bb=null,this.bb_pos=0}return E(e,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"endianness",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):t.apache.arrow.flatbuf.Endianness.Little}},{key:"fields",value:function(e,n){var r=this.bb.__offset(this.bb_pos,6);return r?(n||new t.apache.arrow.flatbuf.Field).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*e),this.bb):null}},{key:"fieldsLength",value:function(){var t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__vector_len(this.bb_pos+t):0}},{key:"customMetadata",value:function(e,n){var r=this.bb.__offset(this.bb_pos,8);return r?(n||new t.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*e),this.bb):null}},{key:"customMetadataLength",value:function(){var t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}}],[{key:"getRootAsSchema",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startSchema",value:function(t){t.startObject(3)}},{key:"addEndianness",value:function(e,n){e.addFieldInt16(0,n,t.apache.arrow.flatbuf.Endianness.Little)}},{key:"addFields",value:function(t,e){t.addFieldOffset(1,e,0)}},{key:"createFieldsVector",value:function(t,e){t.startVector(4,e.length,4);for(var n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}},{key:"startFieldsVector",value:function(t,e){t.startVector(4,e,4)}},{key:"addCustomMetadata",value:function(t,e){t.addFieldOffset(2,e,0)}},{key:"createCustomMetadataVector",value:function(t,e){t.startVector(4,e.length,4);for(var n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}},{key:"startCustomMetadataVector",value:function(t,e){t.startVector(4,e,4)}},{key:"endSchema",value:function(t){return t.endObject()}},{key:"finishSchemaBuffer",value:function(t,e){t.finish(e)}},{key:"createSchema",value:function(t,n,r,i){return e.startSchema(t),e.addEndianness(t,n),e.addFields(t,r),e.addCustomMetadata(t,i),e.endSchema(t)}}]),e}();e.Schema=n}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(t.apache||(t.apache={}))}(Ye||(Ye={})),function(t){!function(t){!function(t){!function(t){t.Schema=Ye.apache.arrow.flatbuf.Schema}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(t.apache||(t.apache={}))}(Ge||(Ge={})),function(t){!function(t){!function(t){!function(t){!function(t){t[t.NONE=0]="NONE",t[t.Schema=1]="Schema",t[t.DictionaryBatch=2]="DictionaryBatch",t[t.RecordBatch=3]="RecordBatch",t[t.Tensor=4]="Tensor",t[t.SparseTensor=5]="SparseTensor"}(t.MessageHeader||(t.MessageHeader={}))}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(t.apache||(t.apache={}))}(Ge||(Ge={})),function(t){!function(t){!function(t){!function(t){var e=function(){function t(){F(this,t),this.bb=null,this.bb_pos=0}return E(t,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"length",value:function(){return this.bb.readInt64(this.bb_pos)}},{key:"nullCount",value:function(){return this.bb.readInt64(this.bb_pos+8)}}],[{key:"createFieldNode",value:function(t,e,n){return t.prep(8,16),t.writeInt64(n),t.writeInt64(e),t.offset()}}]),t}();t.FieldNode=e}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(t.apache||(t.apache={}))}(Ge||(Ge={})),function(t){!function(e){!function(e){!function(e){var n=function(){function e(){F(this,e),this.bb=null,this.bb_pos=0}return E(e,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"length",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt64(this.bb_pos+t):this.bb.createLong(0,0)}},{key:"nodes",value:function(e,n){var r=this.bb.__offset(this.bb_pos,6);return r?(n||new t.apache.arrow.flatbuf.FieldNode).__init(this.bb.__vector(this.bb_pos+r)+16*e,this.bb):null}},{key:"nodesLength",value:function(){var t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__vector_len(this.bb_pos+t):0}},{key:"buffers",value:function(t,e){var n=this.bb.__offset(this.bb_pos,8);return n?(e||new Ye.apache.arrow.flatbuf.Buffer).__init(this.bb.__vector(this.bb_pos+n)+16*t,this.bb):null}},{key:"buffersLength",value:function(){var t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}}],[{key:"getRootAsRecordBatch",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startRecordBatch",value:function(t){t.startObject(3)}},{key:"addLength",value:function(t,e){t.addFieldInt64(0,e,t.createLong(0,0))}},{key:"addNodes",value:function(t,e){t.addFieldOffset(1,e,0)}},{key:"startNodesVector",value:function(t,e){t.startVector(16,e,8)}},{key:"addBuffers",value:function(t,e){t.addFieldOffset(2,e,0)}},{key:"startBuffersVector",value:function(t,e){t.startVector(16,e,8)}},{key:"endRecordBatch",value:function(t){return t.endObject()}},{key:"createRecordBatch",value:function(t,n,r,i){return e.startRecordBatch(t),e.addLength(t,n),e.addNodes(t,r),e.addBuffers(t,i),e.endRecordBatch(t)}}]),e}();e.RecordBatch=n}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(t.apache||(t.apache={}))}(Ge||(Ge={})),function(t){!function(e){!function(e){!function(e){var n=function(){function e(){F(this,e),this.bb=null,this.bb_pos=0}return E(e,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"id",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt64(this.bb_pos+t):this.bb.createLong(0,0)}},{key:"data",value:function(e){var n=this.bb.__offset(this.bb_pos,6);return n?(e||new t.apache.arrow.flatbuf.RecordBatch).__init(this.bb.__indirect(this.bb_pos+n),this.bb):null}},{key:"isDelta",value:function(){var t=this.bb.__offset(this.bb_pos,8);return!!t&&!!this.bb.readInt8(this.bb_pos+t)}}],[{key:"getRootAsDictionaryBatch",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startDictionaryBatch",value:function(t){t.startObject(3)}},{key:"addId",value:function(t,e){t.addFieldInt64(0,e,t.createLong(0,0))}},{key:"addData",value:function(t,e){t.addFieldOffset(1,e,0)}},{key:"addIsDelta",value:function(t,e){t.addFieldInt8(2,+e,0)}},{key:"endDictionaryBatch",value:function(t){return t.endObject()}},{key:"createDictionaryBatch",value:function(t,n,r,i){return e.startDictionaryBatch(t),e.addId(t,n),e.addData(t,r),e.addIsDelta(t,i),e.endDictionaryBatch(t)}}]),e}();e.DictionaryBatch=n}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(t.apache||(t.apache={}))}(Ge||(Ge={})),function(t){!function(e){!function(e){!function(e){var n=function(){function e(){F(this,e),this.bb=null,this.bb_pos=0}return E(e,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"version",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):Ye.apache.arrow.flatbuf.MetadataVersion.V1}},{key:"headerType",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):t.apache.arrow.flatbuf.MessageHeader.NONE}},{key:"header",value:function(t){var e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__union(t,this.bb_pos+e):null}},{key:"bodyLength",value:function(){var t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb_pos+t):this.bb.createLong(0,0)}},{key:"customMetadata",value:function(t,e){var n=this.bb.__offset(this.bb_pos,12);return n?(e||new Ye.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}},{key:"customMetadataLength",value:function(){var t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}}],[{key:"getRootAsMessage",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startMessage",value:function(t){t.startObject(5)}},{key:"addVersion",value:function(t,e){t.addFieldInt16(0,e,Ye.apache.arrow.flatbuf.MetadataVersion.V1)}},{key:"addHeaderType",value:function(e,n){e.addFieldInt8(1,n,t.apache.arrow.flatbuf.MessageHeader.NONE)}},{key:"addHeader",value:function(t,e){t.addFieldOffset(2,e,0)}},{key:"addBodyLength",value:function(t,e){t.addFieldInt64(3,e,t.createLong(0,0))}},{key:"addCustomMetadata",value:function(t,e){t.addFieldOffset(4,e,0)}},{key:"createCustomMetadataVector",value:function(t,e){t.startVector(4,e.length,4);for(var n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}},{key:"startCustomMetadataVector",value:function(t,e){t.startVector(4,e,4)}},{key:"endMessage",value:function(t){return t.endObject()}},{key:"finishMessageBuffer",value:function(t,e){t.finish(e)}},{key:"createMessage",value:function(t,n,r,i,a,o){return e.startMessage(t),e.addVersion(t,n),e.addHeaderType(t,r),e.addHeader(t,i),e.addBodyLength(t,a),e.addCustomMetadata(t,o),e.endMessage(t)}}]),e}();e.Message=n}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(t.apache||(t.apache={}))}(Ge||(Ge={}));Ye.apache.arrow.flatbuf.Type;var Je,Ze,Qe=Ye.apache.arrow.flatbuf.DateUnit,Xe=Ye.apache.arrow.flatbuf.TimeUnit,tn=Ye.apache.arrow.flatbuf.Precision,en=Ye.apache.arrow.flatbuf.UnionMode,nn=Ye.apache.arrow.flatbuf.IntervalUnit,rn=Ge.apache.arrow.flatbuf.MessageHeader,an=Ye.apache.arrow.flatbuf.MetadataVersion;!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(Je||(Je={})),function(t){t[t.OFFSET=0]="OFFSET",t[t.DATA=1]="DATA",t[t.VALIDITY=2]="VALIDITY",t[t.TYPE=3]="TYPE"}(Ze||(Ze={}));var on=R.mark(hn);function un(t,e,n,r){return 0!==(n&1<>r}function cn(t,e,n){return n?!!(t[e>>3]|=1<>3]&=~(1<0||n.byteLength>3):ln(hn(n,t,e,null,un)).subarray(0,r)),i}return n}function ln(t){var e,n=[],r=0,i=0,a=0,o=O(t);try{for(o.s();!(e=o.n()).done;){e.value&&(a|=1<0)&&(n[r++]=a);var u=new Uint8Array(n.length+7&-8);return u.set(n),u}function hn(t,e,n,r,i){var a,o,u,s,c;return R.wrap((function(f){for(;;)switch(f.prev=f.next){case 0:a=e%8,o=e>>3,u=0,s=n;case 3:if(!(s>0)){f.next=11;break}c=t[o++];case 5:return f.next=7,i(r,u++,c,a);case 7:if(--s>0&&++a<8){f.next=5;break}case 8:a=0,f.next=3;break;case 11:case"end":return f.stop()}}),on)}function yn(t,e,n){if(n-e<=0)return 0;if(n-e<8){var r,i=0,a=O(hn(t,e,n-e,t,sn));try{for(a.s();!(r=a.n()).done;){i+=r.value}}catch(s){a.e(s)}finally{a.f()}return i}var o=n>>3<<3,u=e+(e%8===0?0:8-e%8);return yn(t,e,u)+yn(t,o,n)+pn(t,u>>3,o-u>>3)}function pn(t,e,n){for(var r=0,i=0|e,a=new DataView(t.buffer,t.byteOffset,t.byteLength),o=void 0===n?t.byteLength:i+n;o-i>=4;)r+=dn(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=dn(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=dn(a.getUint8(i)),i+=1;return r}function dn(t){var e=0|t;return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24}function vn(t){return function(t){if(Array.isArray(t))return T(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||B(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var bn=function(){function t(){F(this,t)}return E(t,[{key:"visitMany",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1&&void 0!==arguments[1])||arguments[1];return gn(this,t,e)}},{key:"visitNull",value:function(t){return null}},{key:"visitBool",value:function(t){return null}},{key:"visitInt",value:function(t){return null}},{key:"visitFloat",value:function(t){return null}},{key:"visitUtf8",value:function(t){return null}},{key:"visitBinary",value:function(t){return null}},{key:"visitFixedSizeBinary",value:function(t){return null}},{key:"visitDate",value:function(t){return null}},{key:"visitTimestamp",value:function(t){return null}},{key:"visitTime",value:function(t){return null}},{key:"visitDecimal",value:function(t){return null}},{key:"visitList",value:function(t){return null}},{key:"visitStruct",value:function(t){return null}},{key:"visitUnion",value:function(t){return null}},{key:"visitDictionary",value:function(t){return null}},{key:"visitInterval",value:function(t){return null}},{key:"visitFixedSizeList",value:function(t){return null}},{key:"visitMap",value:function(t){return null}}]),t}();function gn(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=null,i=Je.NONE;switch(e instanceof yr||e instanceof qe?i=mn(e.type):e instanceof Fn?i=mn(e):"number"!==typeof(i=e)&&(i=Je[e]),i){case Je.Null:r=t.visitNull;break;case Je.Bool:r=t.visitBool;break;case Je.Int:r=t.visitInt;break;case Je.Int8:r=t.visitInt8||t.visitInt;break;case Je.Int16:r=t.visitInt16||t.visitInt;break;case Je.Int32:r=t.visitInt32||t.visitInt;break;case Je.Int64:r=t.visitInt64||t.visitInt;break;case Je.Uint8:r=t.visitUint8||t.visitInt;break;case Je.Uint16:r=t.visitUint16||t.visitInt;break;case Je.Uint32:r=t.visitUint32||t.visitInt;break;case Je.Uint64:r=t.visitUint64||t.visitInt;break;case Je.Float:r=t.visitFloat;break;case Je.Float16:r=t.visitFloat16||t.visitFloat;break;case Je.Float32:r=t.visitFloat32||t.visitFloat;break;case Je.Float64:r=t.visitFloat64||t.visitFloat;break;case Je.Utf8:r=t.visitUtf8;break;case Je.Binary:r=t.visitBinary;break;case Je.FixedSizeBinary:r=t.visitFixedSizeBinary;break;case Je.Date:r=t.visitDate;break;case Je.DateDay:r=t.visitDateDay||t.visitDate;break;case Je.DateMillisecond:r=t.visitDateMillisecond||t.visitDate;break;case Je.Timestamp:r=t.visitTimestamp;break;case Je.TimestampSecond:r=t.visitTimestampSecond||t.visitTimestamp;break;case Je.TimestampMillisecond:r=t.visitTimestampMillisecond||t.visitTimestamp;break;case Je.TimestampMicrosecond:r=t.visitTimestampMicrosecond||t.visitTimestamp;break;case Je.TimestampNanosecond:r=t.visitTimestampNanosecond||t.visitTimestamp;break;case Je.Time:r=t.visitTime;break;case Je.TimeSecond:r=t.visitTimeSecond||t.visitTime;break;case Je.TimeMillisecond:r=t.visitTimeMillisecond||t.visitTime;break;case Je.TimeMicrosecond:r=t.visitTimeMicrosecond||t.visitTime;break;case Je.TimeNanosecond:r=t.visitTimeNanosecond||t.visitTime;break;case Je.Decimal:r=t.visitDecimal;break;case Je.List:r=t.visitList;break;case Je.Struct:r=t.visitStruct;break;case Je.Union:r=t.visitUnion;break;case Je.DenseUnion:r=t.visitDenseUnion||t.visitUnion;break;case Je.SparseUnion:r=t.visitSparseUnion||t.visitUnion;break;case Je.Dictionary:r=t.visitDictionary;break;case Je.Interval:r=t.visitInterval;break;case Je.IntervalDayTime:r=t.visitIntervalDayTime||t.visitInterval;break;case Je.IntervalYearMonth:r=t.visitIntervalYearMonth||t.visitInterval;break;case Je.FixedSizeList:r=t.visitFixedSizeList;break;case Je.Map:r=t.visitMap}if("function"===typeof r)return r;if(!n)return function(){return null};throw new Error("Unrecognized type '".concat(Je[i],"'"))}function mn(t){switch(t.typeId){case Je.Null:return Je.Null;case Je.Int:var e=t.bitWidth,n=t.isSigned;switch(e){case 8:return n?Je.Int8:Je.Uint8;case 16:return n?Je.Int16:Je.Uint16;case 32:return n?Je.Int32:Je.Uint32;case 64:return n?Je.Int64:Je.Uint64}return Je.Int;case Je.Float:switch(t.precision){case tn.HALF:return Je.Float16;case tn.SINGLE:return Je.Float32;case tn.DOUBLE:return Je.Float64}return Je.Float;case Je.Binary:return Je.Binary;case Je.Utf8:return Je.Utf8;case Je.Bool:return Je.Bool;case Je.Decimal:return Je.Decimal;case Je.Time:switch(t.unit){case Xe.SECOND:return Je.TimeSecond;case Xe.MILLISECOND:return Je.TimeMillisecond;case Xe.MICROSECOND:return Je.TimeMicrosecond;case Xe.NANOSECOND:return Je.TimeNanosecond}return Je.Time;case Je.Timestamp:switch(t.unit){case Xe.SECOND:return Je.TimestampSecond;case Xe.MILLISECOND:return Je.TimestampMillisecond;case Xe.MICROSECOND:return Je.TimestampMicrosecond;case Xe.NANOSECOND:return Je.TimestampNanosecond}return Je.Timestamp;case Je.Date:switch(t.unit){case Qe.DAY:return Je.DateDay;case Qe.MILLISECOND:return Je.DateMillisecond}return Je.Date;case Je.Interval:switch(t.unit){case nn.DAY_TIME:return Je.IntervalDayTime;case nn.YEAR_MONTH:return Je.IntervalYearMonth}return Je.Interval;case Je.Map:return Je.Map;case Je.List:return Je.List;case Je.Struct:return Je.Struct;case Je.Union:switch(t.mode){case en.Dense:return Je.DenseUnion;case en.Sparse:return Je.SparseUnion}return Je.Union;case Je.FixedSizeBinary:return Je.FixedSizeBinary;case Je.FixedSizeList:return Je.FixedSizeList;case Je.Dictionary:return Je.Dictionary}throw new Error("Unrecognized type '".concat(Je[t.typeId],"'"))}bn.prototype.visitInt8=null,bn.prototype.visitInt16=null,bn.prototype.visitInt32=null,bn.prototype.visitInt64=null,bn.prototype.visitUint8=null,bn.prototype.visitUint16=null,bn.prototype.visitUint32=null,bn.prototype.visitUint64=null,bn.prototype.visitFloat16=null,bn.prototype.visitFloat32=null,bn.prototype.visitFloat64=null,bn.prototype.visitDateDay=null,bn.prototype.visitDateMillisecond=null,bn.prototype.visitTimestampSecond=null,bn.prototype.visitTimestampMillisecond=null,bn.prototype.visitTimestampMicrosecond=null,bn.prototype.visitTimestampNanosecond=null,bn.prototype.visitTimeSecond=null,bn.prototype.visitTimeMillisecond=null,bn.prototype.visitTimeMicrosecond=null,bn.prototype.visitTimeNanosecond=null,bn.prototype.visitDenseUnion=null,bn.prototype.visitSparseUnion=null,bn.prototype.visitIntervalDayTime=null,bn.prototype.visitIntervalYearMonth=null;var kn=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,[{key:"compareSchemas",value:function(t,e){return t===e||e instanceof t.constructor&&Ln.compareFields(t.fields,e.fields)}},{key:"compareFields",value:function(t,e){return t===e||Array.isArray(t)&&Array.isArray(e)&&t.length===e.length&&t.every((function(t,n){return Ln.compareField(t,e[n])}))}},{key:"compareField",value:function(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&Ln.visit(t.type,e.type)}}]),n}(bn);function wn(t,e){return e instanceof t.constructor}function _n(t,e){return t===e||wn(t,e)}function In(t,e){return t===e||wn(t,e)&&t.bitWidth===e.bitWidth&&t.isSigned===e.isSigned}function Sn(t,e){return t===e||wn(t,e)&&t.precision===e.precision}function xn(t,e){return t===e||wn(t,e)&&t.unit===e.unit}function An(t,e){return t===e||wn(t,e)&&t.unit===e.unit&&t.timezone===e.timezone}function Tn(t,e){return t===e||wn(t,e)&&t.unit===e.unit&&t.bitWidth===e.bitWidth}function Bn(t,e){return t===e||wn(t,e)&&t.mode===e.mode&&t.typeIds.every((function(t,n){return t===e.typeIds[n]}))&&Ln.compareFields(t.children,e.children)}function On(t,e){return t===e||wn(t,e)&&t.unit===e.unit}kn.prototype.visitNull=_n,kn.prototype.visitBool=_n,kn.prototype.visitInt=In,kn.prototype.visitInt8=In,kn.prototype.visitInt16=In,kn.prototype.visitInt32=In,kn.prototype.visitInt64=In,kn.prototype.visitUint8=In,kn.prototype.visitUint16=In,kn.prototype.visitUint32=In,kn.prototype.visitUint64=In,kn.prototype.visitFloat=Sn,kn.prototype.visitFloat16=Sn,kn.prototype.visitFloat32=Sn,kn.prototype.visitFloat64=Sn,kn.prototype.visitUtf8=_n,kn.prototype.visitBinary=_n,kn.prototype.visitFixedSizeBinary=function(t,e){return t===e||wn(t,e)&&t.byteWidth===e.byteWidth},kn.prototype.visitDate=xn,kn.prototype.visitDateDay=xn,kn.prototype.visitDateMillisecond=xn,kn.prototype.visitTimestamp=An,kn.prototype.visitTimestampSecond=An,kn.prototype.visitTimestampMillisecond=An,kn.prototype.visitTimestampMicrosecond=An,kn.prototype.visitTimestampNanosecond=An,kn.prototype.visitTime=Tn,kn.prototype.visitTimeSecond=Tn,kn.prototype.visitTimeMillisecond=Tn,kn.prototype.visitTimeMicrosecond=Tn,kn.prototype.visitTimeNanosecond=Tn,kn.prototype.visitDecimal=_n,kn.prototype.visitList=function(t,e){return t===e||wn(t,e)&&t.children.length===e.children.length&&Ln.compareFields(t.children,e.children)},kn.prototype.visitStruct=function(t,e){return t===e||wn(t,e)&&t.children.length===e.children.length&&Ln.compareFields(t.children,e.children)},kn.prototype.visitUnion=Bn,kn.prototype.visitDenseUnion=Bn,kn.prototype.visitSparseUnion=Bn,kn.prototype.visitDictionary=function(t,e){return t===e||wn(t,e)&&t.id===e.id&&t.isOrdered===e.isOrdered&&Ln.visit(t.indices,e.indices)&&Ln.visit(t.dictionary,e.dictionary)},kn.prototype.visitInterval=On,kn.prototype.visitIntervalDayTime=On,kn.prototype.visitIntervalYearMonth=On,kn.prototype.visitFixedSizeList=function(t,e){return t===e||wn(t,e)&&t.listSize===e.listSize&&t.children.length===e.children.length&&Ln.compareFields(t.children,e.children)},kn.prototype.visitMap=function(t,e){return t===e||wn(t,e)&&t.keysSorted===e.keysSorted&&t.children.length===e.children.length&&Ln.compareFields(t.children,e.children)};var Dn,Ln=new kn,Fn=function(){function t(){F(this,t)}return E(t,[{key:"typeId",get:function(){return Je.NONE}},{key:"compareTo",value:function(t){return Ln.visit(this,t)}}],[{key:"isNull",value:function(t){return t&&t.typeId===Je.Null}},{key:"isInt",value:function(t){return t&&t.typeId===Je.Int}},{key:"isFloat",value:function(t){return t&&t.typeId===Je.Float}},{key:"isBinary",value:function(t){return t&&t.typeId===Je.Binary}},{key:"isUtf8",value:function(t){return t&&t.typeId===Je.Utf8}},{key:"isBool",value:function(t){return t&&t.typeId===Je.Bool}},{key:"isDecimal",value:function(t){return t&&t.typeId===Je.Decimal}},{key:"isDate",value:function(t){return t&&t.typeId===Je.Date}},{key:"isTime",value:function(t){return t&&t.typeId===Je.Time}},{key:"isTimestamp",value:function(t){return t&&t.typeId===Je.Timestamp}},{key:"isInterval",value:function(t){return t&&t.typeId===Je.Interval}},{key:"isList",value:function(t){return t&&t.typeId===Je.List}},{key:"isStruct",value:function(t){return t&&t.typeId===Je.Struct}},{key:"isUnion",value:function(t){return t&&t.typeId===Je.Union}},{key:"isFixedSizeBinary",value:function(t){return t&&t.typeId===Je.FixedSizeBinary}},{key:"isFixedSizeList",value:function(t){return t&&t.typeId===Je.FixedSizeList}},{key:"isMap",value:function(t){return t&&t.typeId===Je.Map}},{key:"isDictionary",value:function(t){return t&&t.typeId===Je.Dictionary}}]),t}();Fn[Symbol.toStringTag]=((Dn=Fn.prototype).children=null,Dn.ArrayType=Array,Dn[Symbol.toStringTag]="DataType");var Mn=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,[{key:"toString",value:function(){return"Null"}},{key:"typeId",get:function(){return Je.Null}}]),n}(Fn);Mn[Symbol.toStringTag]=function(t){return t[Symbol.toStringTag]="Null"}(Mn.prototype);var En=function(t){ot(n,t);var e=yt(n);function n(t,r){var i;return F(this,n),(i=e.call(this)).isSigned=t,i.bitWidth=r,i}return E(n,[{key:"typeId",get:function(){return Je.Int}},{key:"ArrayType",get:function(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:case 64:return this.isSigned?Int32Array:Uint32Array}throw new Error("Unrecognized ".concat(this[Symbol.toStringTag]," type"))}},{key:"toString",value:function(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}]),n}(Fn);En[Symbol.toStringTag]=function(t){return t.isSigned=null,t.bitWidth=null,t[Symbol.toStringTag]="Int"}(En.prototype);var Un=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.call(this,!0,8)}return E(n)}(En),Nn=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.call(this,!0,16)}return E(n)}(En),Cn=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.call(this,!0,32)}return E(n)}(En),Vn=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.call(this,!0,64)}return E(n)}(En),jn=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.call(this,!1,8)}return E(n)}(En),Rn=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.call(this,!1,16)}return E(n)}(En),Pn=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.call(this,!1,32)}return E(n)}(En),zn=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.call(this,!1,64)}return E(n)}(En);Object.defineProperty(Un.prototype,"ArrayType",{value:Int8Array}),Object.defineProperty(Nn.prototype,"ArrayType",{value:Int16Array}),Object.defineProperty(Cn.prototype,"ArrayType",{value:Int32Array}),Object.defineProperty(Vn.prototype,"ArrayType",{value:Int32Array}),Object.defineProperty(jn.prototype,"ArrayType",{value:Uint8Array}),Object.defineProperty(Rn.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(Pn.prototype,"ArrayType",{value:Uint32Array}),Object.defineProperty(zn.prototype,"ArrayType",{value:Uint32Array});var Yn=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this)).precision=t,r}return E(n,[{key:"typeId",get:function(){return Je.Float}},{key:"ArrayType",get:function(){switch(this.precision){case tn.HALF:return Uint16Array;case tn.SINGLE:return Float32Array;case tn.DOUBLE:return Float64Array}throw new Error("Unrecognized ".concat(this[Symbol.toStringTag]," type"))}},{key:"toString",value:function(){return"Float".concat(this.precision<<5||16)}}]),n}(Fn);Yn[Symbol.toStringTag]=function(t){return t.precision=null,t[Symbol.toStringTag]="Float"}(Yn.prototype);var Wn=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.call(this,tn.HALF)}return E(n)}(Yn),Hn=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.call(this,tn.SINGLE)}return E(n)}(Yn),$n=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.call(this,tn.DOUBLE)}return E(n)}(Yn);Object.defineProperty(Wn.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(Hn.prototype,"ArrayType",{value:Float32Array}),Object.defineProperty($n.prototype,"ArrayType",{value:Float64Array});var Kn=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.call(this)}return E(n,[{key:"typeId",get:function(){return Je.Binary}},{key:"toString",value:function(){return"Binary"}}]),n}(Fn);Kn[Symbol.toStringTag]=function(t){return t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Binary"}(Kn.prototype);var Gn=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.call(this)}return E(n,[{key:"typeId",get:function(){return Je.Utf8}},{key:"toString",value:function(){return"Utf8"}}]),n}(Fn);Gn[Symbol.toStringTag]=function(t){return t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Utf8"}(Gn.prototype);var qn=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.call(this)}return E(n,[{key:"typeId",get:function(){return Je.Bool}},{key:"toString",value:function(){return"Bool"}}]),n}(Fn);qn[Symbol.toStringTag]=function(t){return t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Bool"}(qn.prototype);var Jn=function(t){ot(n,t);var e=yt(n);function n(t,r){var i;return F(this,n),(i=e.call(this)).scale=t,i.precision=r,i}return E(n,[{key:"typeId",get:function(){return Je.Decimal}},{key:"toString",value:function(){return"Decimal[".concat(this.precision,"e").concat(this.scale>0?"+":"").concat(this.scale,"]")}}]),n}(Fn);Jn[Symbol.toStringTag]=function(t){return t.scale=null,t.precision=null,t.ArrayType=Uint32Array,t[Symbol.toStringTag]="Decimal"}(Jn.prototype);var Zn=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this)).unit=t,r}return E(n,[{key:"typeId",get:function(){return Je.Date}},{key:"toString",value:function(){return"Date".concat(32*(this.unit+1),"<").concat(Qe[this.unit],">")}}]),n}(Fn);Zn[Symbol.toStringTag]=function(t){return t.unit=null,t.ArrayType=Int32Array,t[Symbol.toStringTag]="Date"}(Zn.prototype);var Qn=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.call(this,Qe.DAY)}return E(n)}(Zn),Xn=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.call(this,Qe.MILLISECOND)}return E(n)}(Zn),tr=function(t){ot(n,t);var e=yt(n);function n(t,r){var i;return F(this,n),(i=e.call(this)).unit=t,i.bitWidth=r,i}return E(n,[{key:"typeId",get:function(){return Je.Time}},{key:"toString",value:function(){return"Time".concat(this.bitWidth,"<").concat(Xe[this.unit],">")}}]),n}(Fn);tr[Symbol.toStringTag]=function(t){return t.unit=null,t.bitWidth=null,t.ArrayType=Int32Array,t[Symbol.toStringTag]="Time"}(tr.prototype);var er=function(t){ot(n,t);var e=yt(n);function n(t,r){var i;return F(this,n),(i=e.call(this)).unit=t,i.timezone=r,i}return E(n,[{key:"typeId",get:function(){return Je.Timestamp}},{key:"toString",value:function(){return"Timestamp<".concat(Xe[this.unit]).concat(this.timezone?", ".concat(this.timezone):"",">")}}]),n}(Fn);er[Symbol.toStringTag]=function(t){return t.unit=null,t.timezone=null,t.ArrayType=Int32Array,t[Symbol.toStringTag]="Timestamp"}(er.prototype);var nr=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this)).unit=t,r}return E(n,[{key:"typeId",get:function(){return Je.Interval}},{key:"toString",value:function(){return"Interval<".concat(nn[this.unit],">")}}]),n}(Fn);nr[Symbol.toStringTag]=function(t){return t.unit=null,t.ArrayType=Int32Array,t[Symbol.toStringTag]="Interval"}(nr.prototype);var rr=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this)).children=[t],r}return E(n,[{key:"typeId",get:function(){return Je.List}},{key:"toString",value:function(){return"List<".concat(this.valueType,">")}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:"ArrayType",get:function(){return this.valueType.ArrayType}}]),n}(Fn);rr[Symbol.toStringTag]=function(t){return t.children=null,t[Symbol.toStringTag]="List"}(rr.prototype);var ir=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this)).children=t,r}return E(n,[{key:"typeId",get:function(){return Je.Struct}},{key:"toString",value:function(){return"Struct<{".concat(this.children.map((function(t){return"".concat(t.name,":").concat(t.type)})).join(", "),"}>")}}]),n}(Fn);ir[Symbol.toStringTag]=function(t){return t.children=null,t[Symbol.toStringTag]="Struct"}(ir.prototype);var ar=function(t){ot(n,t);var e=yt(n);function n(t,r,i){var a;return F(this,n),(a=e.call(this)).mode=t,a.children=i,a.typeIds=r=Int32Array.from(r),a.typeIdToChildIndex=r.reduce((function(t,e,n){return(t[e]=n)&&t||t}),Object.create(null)),a}return E(n,[{key:"typeId",get:function(){return Je.Union}},{key:"toString",value:function(){return"".concat(this[Symbol.toStringTag],"<").concat(this.children.map((function(t){return"".concat(t.type)})).join(" | "),">")}}]),n}(Fn);ar[Symbol.toStringTag]=function(t){return t.mode=null,t.typeIds=null,t.children=null,t.typeIdToChildIndex=null,t.ArrayType=Int8Array,t[Symbol.toStringTag]="Union"}(ar.prototype);var or=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this)).byteWidth=t,r}return E(n,[{key:"typeId",get:function(){return Je.FixedSizeBinary}},{key:"toString",value:function(){return"FixedSizeBinary[".concat(this.byteWidth,"]")}}]),n}(Fn);or[Symbol.toStringTag]=function(t){return t.byteWidth=null,t.ArrayType=Uint8Array,t[Symbol.toStringTag]="FixedSizeBinary"}(or.prototype);var ur=function(t){ot(n,t);var e=yt(n);function n(t,r){var i;return F(this,n),(i=e.call(this)).listSize=t,i.children=[r],i}return E(n,[{key:"typeId",get:function(){return Je.FixedSizeList}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:"ArrayType",get:function(){return this.valueType.ArrayType}},{key:"toString",value:function(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}]),n}(Fn);ur[Symbol.toStringTag]=function(t){return t.children=null,t.listSize=null,t[Symbol.toStringTag]="FixedSizeList"}(ur.prototype);var sr=function(t){ot(n,t);var e=yt(n);function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return F(this,n),(r=e.call(this)).children=[t],r.keysSorted=i,r}return E(n,[{key:"typeId",get:function(){return Je.Map}},{key:"keyType",get:function(){return this.children[0].type.children[0].type}},{key:"valueType",get:function(){return this.children[0].type.children[1].type}},{key:"toString",value:function(){return"Map<{".concat(this.children[0].type.children.map((function(t){return"".concat(t.name,":").concat(t.type)})).join(", "),"}>")}}]),n}(Fn);sr[Symbol.toStringTag]=function(t){return t.children=null,t.keysSorted=null,t[Symbol.toStringTag]="Map_"}(sr.prototype);var cr,fr=(cr=-1,function(){return++cr}),lr=function(t){ot(n,t);var e=yt(n);function n(t,r,i,a){var o;return F(this,n),(o=e.call(this)).indices=r,o.dictionary=t,o.isOrdered=a||!1,o.id=null==i?fr():"number"===typeof i?i:i.low,o}return E(n,[{key:"typeId",get:function(){return Je.Dictionary}},{key:"children",get:function(){return this.dictionary.children}},{key:"valueType",get:function(){return this.dictionary}},{key:"ArrayType",get:function(){return this.dictionary.ArrayType}},{key:"toString",value:function(){return"Dictionary<".concat(this.indices,", ").concat(this.dictionary,">")}}]),n}(Fn);function hr(t){var e=t;switch(t.typeId){case Je.Decimal:return 4;case Je.Timestamp:return 2;case Je.Date:case Je.Interval:return 1+e.unit;case Je.Int:case Je.Time:return+(e.bitWidth>32)+1;case Je.FixedSizeList:return e.listSize;case Je.FixedSizeBinary:return e.byteWidth;default:return 1}}lr[Symbol.toStringTag]=function(t){return t.id=null,t.indices=null,t.isOrdered=null,t.dictionary=null,t[Symbol.toStringTag]="Dictionary"}(lr.prototype);var yr=function(){function t(e,n,r,i,a,o,u){var s;F(this,t),this.type=e,this.dictionary=u,this.offset=Math.floor(Math.max(n||0,0)),this.length=Math.floor(Math.max(r||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1)),this.childData=(o||[]).map((function(e){return e instanceof t?e:e.data})),a instanceof t?(this.stride=a.stride,this.values=a.values,this.typeIds=a.typeIds,this.nullBitmap=a.nullBitmap,this.valueOffsets=a.valueOffsets):(this.stride=hr(e),a&&((s=a[0])&&(this.valueOffsets=s),(s=a[1])&&(this.values=s),(s=a[2])&&(this.nullBitmap=s),(s=a[3])&&(this.typeIds=s)))}return E(t,[{key:"typeId",get:function(){return this.type.typeId}},{key:"ArrayType",get:function(){return this.type.ArrayType}},{key:"buffers",get:function(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}},{key:"byteLength",get:function(){var t=0,e=this.valueOffsets,n=this.values,r=this.nullBitmap,i=this.typeIds;return e&&(t+=e.byteLength),n&&(t+=n.byteLength),r&&(t+=r.byteLength),i&&(t+=i.byteLength),this.childData.reduce((function(t,e){return t+e.byteLength}),t)}},{key:"nullCount",get:function(){var t,e=this._nullCount;return e<=-1&&(t=this.nullBitmap)&&(this._nullCount=e=this.length-yn(t,this.offset,this.offset+this.length)),e}},{key:"clone",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.offset,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.length,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this._nullCount,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.childData;return new t(e,n,r,i,a,o,this.dictionary)}},{key:"slice",value:function(t,e){var n=this.stride,r=this.typeId,i=this.childData,a=+(0===this._nullCount)-1,o=16===r?n:1,u=this._sliceBuffers(t,e,n,r);return this.clone(this.type,this.offset+t,e,a,u,!i.length||this.valueOffsets?i:this._sliceChildren(i,o*t,o*e))}},{key:"_changeLengthAndBackfillNullBitmap",value:function(t){if(this.typeId===Je.Null)return this.clone(this.type,0,t,0);var e=this.length,n=this.nullCount,r=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3);r[e>>3]=(1<0&&r.set(fn(this.offset,e,this.nullBitmap),0);var i=this.buffers;return i[Ze.VALIDITY]=r,this.clone(this.type,0,t,n+(t-e),i)}},{key:"_sliceBuffers",value:function(t,e,n,r){var i,a=this.buffers;return(i=a[Ze.TYPE])&&(a[Ze.TYPE]=i.subarray(t,t+e)),(i=a[Ze.OFFSET])&&(a[Ze.OFFSET]=i.subarray(t,t+e+1))||(i=a[Ze.DATA])&&(a[Ze.DATA]=6===r?i:i.subarray(n*t,n*(t+e))),a}},{key:"_sliceChildren",value:function(t,e,n){return t.map((function(t){return t.slice(e,n)}))}}],[{key:"new",value:function(e,n,r,i,a,o,u){switch(a instanceof t?a=a.buffers:a||(a=[]),e.typeId){case Je.Null:return t.Null(e,n,r);case Je.Int:return t.Int(e,n,r,i||0,a[Ze.VALIDITY],a[Ze.DATA]||[]);case Je.Dictionary:return t.Dictionary(e,n,r,i||0,a[Ze.VALIDITY],a[Ze.DATA]||[],u);case Je.Float:return t.Float(e,n,r,i||0,a[Ze.VALIDITY],a[Ze.DATA]||[]);case Je.Bool:return t.Bool(e,n,r,i||0,a[Ze.VALIDITY],a[Ze.DATA]||[]);case Je.Decimal:return t.Decimal(e,n,r,i||0,a[Ze.VALIDITY],a[Ze.DATA]||[]);case Je.Date:return t.Date(e,n,r,i||0,a[Ze.VALIDITY],a[Ze.DATA]||[]);case Je.Time:return t.Time(e,n,r,i||0,a[Ze.VALIDITY],a[Ze.DATA]||[]);case Je.Timestamp:return t.Timestamp(e,n,r,i||0,a[Ze.VALIDITY],a[Ze.DATA]||[]);case Je.Interval:return t.Interval(e,n,r,i||0,a[Ze.VALIDITY],a[Ze.DATA]||[]);case Je.FixedSizeBinary:return t.FixedSizeBinary(e,n,r,i||0,a[Ze.VALIDITY],a[Ze.DATA]||[]);case Je.Binary:return t.Binary(e,n,r,i||0,a[Ze.VALIDITY],a[Ze.OFFSET]||[],a[Ze.DATA]||[]);case Je.Utf8:return t.Utf8(e,n,r,i||0,a[Ze.VALIDITY],a[Ze.OFFSET]||[],a[Ze.DATA]||[]);case Je.List:return t.List(e,n,r,i||0,a[Ze.VALIDITY],a[Ze.OFFSET]||[],(o||[])[0]);case Je.FixedSizeList:return t.FixedSizeList(e,n,r,i||0,a[Ze.VALIDITY],(o||[])[0]);case Je.Struct:return t.Struct(e,n,r,i||0,a[Ze.VALIDITY],o||[]);case Je.Map:return t.Map(e,n,r,i||0,a[Ze.VALIDITY],a[Ze.OFFSET]||[],(o||[])[0]);case Je.Union:return t.Union(e,n,r,i||0,a[Ze.VALIDITY],a[Ze.TYPE]||[],a[Ze.OFFSET]||o,o)}throw new Error("Unrecognized typeId ".concat(e.typeId))}},{key:"Null",value:function(e,n,r){return new t(e,n,r,0)}},{key:"Int",value:function(e,n,r,i,a,o){return new t(e,n,r,i,[void 0,Ht(e.ArrayType,o),Jt(a)])}},{key:"Dictionary",value:function(e,n,r,i,a,o,u){return new t(e,n,r,i,[void 0,Ht(e.indices.ArrayType,o),Jt(a)],[],u)}},{key:"Float",value:function(e,n,r,i,a,o){return new t(e,n,r,i,[void 0,Ht(e.ArrayType,o),Jt(a)])}},{key:"Bool",value:function(e,n,r,i,a,o){return new t(e,n,r,i,[void 0,Ht(e.ArrayType,o),Jt(a)])}},{key:"Decimal",value:function(e,n,r,i,a,o){return new t(e,n,r,i,[void 0,Ht(e.ArrayType,o),Jt(a)])}},{key:"Date",value:function(e,n,r,i,a,o){return new t(e,n,r,i,[void 0,Ht(e.ArrayType,o),Jt(a)])}},{key:"Time",value:function(e,n,r,i,a,o){return new t(e,n,r,i,[void 0,Ht(e.ArrayType,o),Jt(a)])}},{key:"Timestamp",value:function(e,n,r,i,a,o){return new t(e,n,r,i,[void 0,Ht(e.ArrayType,o),Jt(a)])}},{key:"Interval",value:function(e,n,r,i,a,o){return new t(e,n,r,i,[void 0,Ht(e.ArrayType,o),Jt(a)])}},{key:"FixedSizeBinary",value:function(e,n,r,i,a,o){return new t(e,n,r,i,[void 0,Ht(e.ArrayType,o),Jt(a)])}},{key:"Binary",value:function(e,n,r,i,a,o,u){return new t(e,n,r,i,[Gt(o),Jt(u),Jt(a)])}},{key:"Utf8",value:function(e,n,r,i,a,o,u){return new t(e,n,r,i,[Gt(o),Jt(u),Jt(a)])}},{key:"List",value:function(e,n,r,i,a,o,u){return new t(e,n,r,i,[Gt(o),void 0,Jt(a)],[u])}},{key:"FixedSizeList",value:function(e,n,r,i,a,o){return new t(e,n,r,i,[void 0,void 0,Jt(a)],[o])}},{key:"Struct",value:function(e,n,r,i,a,o){return new t(e,n,r,i,[void 0,void 0,Jt(a)],o)}},{key:"Map",value:function(e,n,r,i,a,o,u){return new t(e,n,r,i,[Gt(o),void 0,Jt(a)],[u])}},{key:"Union",value:function(e,n,r,i,a,o,u,s){var c=[void 0,void 0,Jt(a),Ht(e.ArrayType,o)];return e.mode===en.Sparse?new t(e,n,r,i,c,u):(c[Ze.OFFSET]=Gt(u),new t(e,n,r,i,c,s))}}]),t}();yr.prototype.childData=Object.freeze([]);function pr(t){if(null===t)return"null";if(undefined===t)return"undefined";switch(typeof t){case"number":case"bigint":return"".concat(t);case"string":return'"'.concat(t,'"')}return"function"===typeof t[Symbol.toPrimitive]?t[Symbol.toPrimitive]("string"):ArrayBuffer.isView(t)?"[".concat(t,"]"):JSON.stringify(t)}function dr(t){if(!t||t.length<=0)return function(t){return!0};var e="",n=t.filter((function(t){return t===t}));return n.length>0&&(e="\n switch (x) {".concat(n.map((function(t){return"\n case ".concat(function(t){if("bigint"!==typeof t)return pr(t);if(kt)return"".concat(pr(t),"n");return'"'.concat(pr(t),'"')}(t),":")})).join(""),"\n return false;\n }")),t.length!==n.length&&(e="if (x !== x) return false;\n".concat(e)),new Function("x","".concat(e,"\nreturn true;"))}var vr=function(t,e){return(t*e+63&-64||64)/e},br=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.length>=e?t.subarray(0,e):Yt(new t.constructor(e),t,0)},gr=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;F(this,t),this.buffer=e,this.stride=n,this.BYTES_PER_ELEMENT=e.BYTES_PER_ELEMENT,this.ArrayType=e.constructor,this._resize(this.length=e.length/n|0)}return E(t,[{key:"byteLength",get:function(){return this.length*this.stride*this.BYTES_PER_ELEMENT|0}},{key:"reservedLength",get:function(){return this.buffer.length/this.stride}},{key:"reservedByteLength",get:function(){return this.buffer.byteLength}},{key:"set",value:function(t,e){return this}},{key:"append",value:function(t){return this.set(this.length,t)}},{key:"reserve",value:function(t){if(t>0){this.length+=t;var e=this.stride,n=this.length*e,r=this.buffer.length;n>=r&&this._resize(vr(0===r?1*n:2*n,this.BYTES_PER_ELEMENT))}return this}},{key:"flush",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length;t=vr(t*this.stride,this.BYTES_PER_ELEMENT);var e=br(this.buffer,t);return this.clear(),e}},{key:"clear",value:function(){return this.length=0,this._resize(0),this}},{key:"_resize",value:function(t){return this.buffer=Yt(new this.ArrayType(t),this.buffer)}}]),t}();gr.prototype.offset=0;var mr=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,[{key:"last",value:function(){return this.get(this.length-1)}},{key:"get",value:function(t){return this.buffer[t]}},{key:"set",value:function(t,e){return this.reserve(t-this.length+1),this.buffer[t*this.stride]=e,this}}]),n}(gr),kr=function(t){ot(n,t);var e=yt(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array(0);return F(this,n),(t=e.call(this,r,1/8)).numValid=0,t}return E(n,[{key:"numInvalid",get:function(){return this.length-this.numValid}},{key:"get",value:function(t){return this.buffer[t>>3]>>t%8&1}},{key:"set",value:function(t,e){var n=this.reserve(t-this.length+1).buffer,r=t>>3,i=t%8,a=n[r]>>i&1;return e?0===a&&(n[r]|=1<0&&void 0!==arguments[0]?arguments[0]:new Int32Array(1);return F(this,n),e.call(this,t,1)}return E(n,[{key:"append",value:function(t){return this.set(this.length-1,t)}},{key:"set",value:function(t,e){var n=this.length-1,r=this.reserve(t-n+1).buffer;return n0&&void 0!==arguments[0]?arguments[0]:this.length-1;return t>this.length&&this.set(t-1,0),ze(ut(n.prototype),"flush",this).call(this,t+1)}}]),n}(mr),_r=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,[{key:"ArrayType64",get:function(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?_t:St)}},{key:"set",value:function(t,e){switch(this.reserve(t-this.length+1),typeof e){case"bigint":this.buffer64[t]=e;break;case"number":this.buffer[t*this.stride]=e;break;default:this.buffer.set(e,t*this.stride)}return this}},{key:"_resize",value:function(t){var e=ze(ut(n.prototype),"_resize",this).call(this,t),r=e.byteLength/(this.BYTES_PER_ELEMENT*this.stride);return kt&&(this.buffer64=new this.ArrayType64(e.buffer,e.byteOffset,r)),e}}]),n}(gr),Ir=function(){function t(e){var n=e.type,r=e.nullValues;F(this,t),this.length=0,this.finished=!1,this.type=n,this.children=[],this.nullValues=r,this.stride=hr(n),this._nulls=new kr,r&&r.length>0&&(this._isValid=dr(r))}return E(t,[{key:"toVector",value:function(){return qe.new(this.flush())}},{key:"ArrayType",get:function(){return this.type.ArrayType}},{key:"nullCount",get:function(){return this._nulls.numInvalid}},{key:"numChildren",get:function(){return this.children.length}},{key:"byteLength",get:function(){var t=0;return this._offsets&&(t+=this._offsets.byteLength),this._values&&(t+=this._values.byteLength),this._nulls&&(t+=this._nulls.byteLength),this._typeIds&&(t+=this._typeIds.byteLength),this.children.reduce((function(t,e){return t+e.byteLength}),t)}},{key:"reservedLength",get:function(){return this._nulls.reservedLength}},{key:"reservedByteLength",get:function(){var t=0;return this._offsets&&(t+=this._offsets.reservedByteLength),this._values&&(t+=this._values.reservedByteLength),this._nulls&&(t+=this._nulls.reservedByteLength),this._typeIds&&(t+=this._typeIds.reservedByteLength),this.children.reduce((function(t,e){return t+e.reservedByteLength}),t)}},{key:"valueOffsets",get:function(){return this._offsets?this._offsets.buffer:null}},{key:"values",get:function(){return this._values?this._values.buffer:null}},{key:"nullBitmap",get:function(){return this._nulls?this._nulls.buffer:null}},{key:"typeIds",get:function(){return this._typeIds?this._typeIds.buffer:null}},{key:"append",value:function(t){return this.set(this.length,t)}},{key:"isValid",value:function(t){return this._isValid(t)}},{key:"set",value:function(t,e){return this.setValid(t,this.isValid(e))&&this.setValue(t,e),this}},{key:"setValue",value:function(t,e){this._setValue(this,t,e)}},{key:"setValid",value:function(t,e){return this.length=this._nulls.set(t,+e).length,e}},{key:"addChild",value:function(t){arguments.length>1&&void 0!==arguments[1]||"".concat(this.numChildren);throw new Error('Cannot append children to non-nested type "'.concat(this.type,'"'))}},{key:"getChildAt",value:function(t){return this.children[t]||null}},{key:"flush",value:function(){var t=[],e=this._values,n=this._offsets,r=this._typeIds,i=this.length,a=this.nullCount;r?(t[Ze.TYPE]=r.flush(i),n&&(t[Ze.OFFSET]=n.flush(i))):n?(e&&(t[Ze.DATA]=e.flush(n.last())),t[Ze.OFFSET]=n.flush(i)):e&&(t[Ze.DATA]=e.flush(i)),a>0&&(t[Ze.VALIDITY]=this._nulls.flush(i));var o=yr.new(this.type,0,i,a,t,this.children.map((function(t){return t.flush()})));return this.clear(),o}},{key:"finish",value:function(){return this.finished=!0,this.children.forEach((function(t){return t.finish()})),this}},{key:"clear",value:function(){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((function(t){return t.clear()})),this}}],[{key:"new",value:function(t){}},{key:"throughNode",value:function(t){throw new Error('"throughNode" not available in this environment')}},{key:"throughDOM",value:function(t){throw new Error('"throughDOM" not available in this environment')}},{key:"throughIterable",value:function(t){return function(t){var e=t.queueingStrategy,n=void 0===e?"count":e,r=t.highWaterMark,i=void 0===r?"bytes"!==n?1e3:Math.pow(2,14):r,a="bytes"!==n?"length":"byteLength";return R.mark((function e(n){var r,o,u,s,c;return R.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=0,o=Ir.new(t),u=O(n),e.prev=3,u.s();case 5:if((s=u.n()).done){e.next=14;break}if(c=s.value,!(o.append(c)[a]>=i)){e.next=12;break}if(e.t0=++r,!e.t0){e.next=12;break}return e.next=12,o.toVector();case 12:e.next=5;break;case 14:e.next=19;break;case 16:e.prev=16,e.t1=e.catch(3),u.e(e.t1);case 19:return e.prev=19,u.f(),e.finish(19);case 22:if(!(o.finish().length>0||0===r)){e.next=25;break}return e.next=25,o.toVector();case 25:case"end":return e.stop()}}),e,null,[[3,16,19,22]])}))}(t)}},{key:"throughAsyncIterable",value:function(t){return function(t){var e=t.queueingStrategy,n=void 0===e?"count":e,r=t.highWaterMark,i=void 0===r?"bytes"!==n?1e3:Math.pow(2,14):r,a="bytes"!==n?"length":"byteLength";return function(){var e=j(R.mark((function e(n){var r,o,u,s,c,f,l,h;return R.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=0,o=Ir.new(t),u=!1,s=!1,e.prev=4,f=P(n);case 6:return e.next=8,C(f.next());case 8:if(!(u=!(l=e.sent).done)){e.next=18;break}if(h=l.value,!(o.append(h)[a]>=i)){e.next=15;break}if(e.t0=++r,!e.t0){e.next=15;break}return e.next=15,o.toVector();case 15:u=!1,e.next=6;break;case 18:e.next=24;break;case 20:e.prev=20,e.t1=e.catch(4),s=!0,c=e.t1;case 24:if(e.prev=24,e.prev=25,!u||null==f.return){e.next=29;break}return e.next=29,C(f.return());case 29:if(e.prev=29,!s){e.next=32;break}throw c;case 32:return e.finish(29);case 33:return e.finish(24);case 34:if(!(o.finish().length>0||0===r)){e.next=37;break}return e.next=37,o.toVector();case 37:case"end":return e.stop()}}),e,null,[[4,20,24,34],[25,,29,33]])})));return function(t){return e.apply(this,arguments)}}()}(t)}}]),t}();Ir.prototype.length=1,Ir.prototype.stride=1,Ir.prototype.children=null,Ir.prototype.finished=!1,Ir.prototype.nullValues=null,Ir.prototype._isValid=function(){return!0};var Sr=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this,t))._values=new mr(new r.ArrayType(0),r.stride),r}return E(n,[{key:"setValue",value:function(t,e){var r=this._values;return r.reserve(t-r.length+1),ze(ut(n.prototype),"setValue",this).call(this,t,e)}}]),n}(Ir),xr=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this,t))._pendingLength=0,r._offsets=new wr,r}return E(n,[{key:"setValue",value:function(t,e){var n=this._pending||(this._pending=new Map),r=n.get(t);r&&(this._pendingLength-=r.length),this._pendingLength+=e.length,n.set(t,e)}},{key:"setValid",value:function(t,e){return!!ze(ut(n.prototype),"setValid",this).call(this,t,e)||((this._pending||(this._pending=new Map)).set(t,void 0),!1)}},{key:"clear",value:function(){return this._pendingLength=0,this._pending=void 0,ze(ut(n.prototype),"clear",this).call(this)}},{key:"flush",value:function(){return this._flush(),ze(ut(n.prototype),"flush",this).call(this)}},{key:"finish",value:function(){return this._flush(),ze(ut(n.prototype),"finish",this).call(this)}},{key:"_flush",value:function(){var t=this._pending,e=this._pendingLength;return this._pendingLength=0,this._pending=void 0,t&&t.size>0&&this._flushPending(t,e),this}}]),n}(Ir);var Ar=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this,t))._values=new kr,r}return E(n,[{key:"setValue",value:function(t,e){this._values.set(t,+e)}}]),n}(Ir),Tr=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,[{key:"setValue",value:function(t,e){}},{key:"setValid",value:function(t,e){return this.length=Math.max(t+1,this.length),e}}]),n}(Ir),Br=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(Sr),Or=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(Br),Dr=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(Br),Lr=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(Sr),Fr=function(t){ot(n,t);var e=yt(n);function n(t){var r,i=t.type,a=t.nullValues,o=t.dictionaryHashFunction;return F(this,n),(r=e.call(this,{type:new lr(i.dictionary,i.indices,i.id,i.isOrdered)}))._nulls=null,r._dictionaryOffset=0,r._keysToIndices=Object.create(null),r.indices=Ir.new({type:r.type.indices,nullValues:a}),r.dictionary=Ir.new({type:r.type.dictionary,nullValues:null}),"function"===typeof o&&(r.valueToKey=o),r}return E(n,[{key:"values",get:function(){return this.indices.values}},{key:"nullCount",get:function(){return this.indices.nullCount}},{key:"nullBitmap",get:function(){return this.indices.nullBitmap}},{key:"byteLength",get:function(){return this.indices.byteLength+this.dictionary.byteLength}},{key:"reservedLength",get:function(){return this.indices.reservedLength+this.dictionary.reservedLength}},{key:"reservedByteLength",get:function(){return this.indices.reservedByteLength+this.dictionary.reservedByteLength}},{key:"isValid",value:function(t){return this.indices.isValid(t)}},{key:"setValid",value:function(t,e){var n=this.indices;return e=n.setValid(t,e),this.length=n.length,e}},{key:"setValue",value:function(t,e){var n=this._keysToIndices,r=this.valueToKey(e),i=n[r];return void 0===i&&(n[r]=i=this._dictionaryOffset+this.dictionary.append(e).length-1),this.indices.setValue(t,i)}},{key:"flush",value:function(){var t=this.type,e=this._dictionary,n=this.dictionary.toVector(),r=this.indices.flush().clone(t);return r.dictionary=e?e.concat(n):n,this.finished||(this._dictionaryOffset+=n.length),this._dictionary=r.dictionary,this.clear(),r}},{key:"finish",value:function(){return this.indices.finish(),this.dictionary.finish(),this._dictionaryOffset=0,this._keysToIndices=Object.create(null),ze(ut(n.prototype),"finish",this).call(this)}},{key:"clear",value:function(){return this.indices.clear(),this.dictionary.clear(),ze(ut(n.prototype),"clear",this).call(this)}},{key:"valueToKey",value:function(t){return"string"===typeof t?t:"".concat(t)}}]),n}(Ir),Mr=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(Sr),Er=new Float64Array(1),Ur=new Uint32Array(Er.buffer);function Nr(t){var e=(31744&t)>>10,n=(1023&t)/1024,r=Math.pow(-1,(32768&t)>>15);switch(e){case 31:return r*(n?NaN:1/0);case 0:return r*(n?6103515625e-14*n:0)}return r*Math.pow(2,e-15)*(1+n)}function Cr(t){if(t!==t)return 32256;Er[0]=t;var e=(2147483648&Ur[1])>>16&65535,n=2146435072&Ur[1],r=0;return n>=1089470464?Ur[0]>0?n=31744:(n=(2080374784&n)>>16,r=(1048575&Ur[1])>>10):n<=1056964608?(r=1048576+((r=1048576+(1048575&Ur[1]))<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=512+(1048575&Ur[1])>>10),e|n|65535&r}var Vr=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(Sr),jr=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,[{key:"setValue",value:function(t,e){this._values.set(t,Cr(e))}}]),n}(Vr),Rr=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,[{key:"setValue",value:function(t,e){this._values.set(t,e)}}]),n}(Vr),Pr=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,[{key:"setValue",value:function(t,e){this._values.set(t,e)}}]),n}(Vr);function zr(t,e,n){return zr=st()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&at(i,n.prototype),i},zr.apply(null,arguments)}var Yr,Wr,Hr=Symbol.for("isArrowBigNum");function $r(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r>>=0),s+=(n>>>0)+e*Math.pow(c,32);return s}function Zr(t){var e="",n=new Uint32Array(2),r=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),i=new Uint32Array((r=new Uint16Array(r).reverse()).buffer),a=-1,o=r.length-1;do{for(n[0]=r[a=0];a0&&void 0!==arguments[0]?arguments[0]:"default";switch(t){case"number":return Jr(this);case"string":return Yr(this);case"default":return Wr(this)}return Yr(this)},Object.setPrototypeOf(Kr.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(Gr.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(qr.prototype,Object.create(Uint32Array.prototype)),Object.assign(Kr.prototype,$r.prototype,{constructor:Kr,signed:!0,TypedArray:Int32Array,BigIntArray:_t}),Object.assign(Gr.prototype,$r.prototype,{constructor:Gr,signed:!1,TypedArray:Uint32Array,BigIntArray:St}),Object.assign(qr.prototype,$r.prototype,{constructor:qr,signed:!0,TypedArray:Uint32Array,BigIntArray:St}),kt?(Wr=function(t){return 8===t.byteLength?new t.BigIntArray(t.buffer,t.byteOffset,1)[0]:Zr(t)},Yr=function(t){return 8===t.byteLength?"".concat(new t.BigIntArray(t.buffer,t.byteOffset,1)[0]):Zr(t)}):Wr=Yr=Zr;var Qr,Xr=function(){function t(e,n){return F(this,t),t.new(e,n)}return E(t,null,[{key:"new",value:function(t,e){switch(e){case!0:return new Kr(t);case!1:return new Gr(t)}switch(t.constructor){case Int8Array:case Int16Array:case Int32Array:case _t:return new Kr(t)}return 16===t.byteLength?new qr(t):new Gr(t)}},{key:"signed",value:function(t){return new Kr(t)}},{key:"unsigned",value:function(t){return new Gr(t)}},{key:"decimal",value:function(t){return new qr(t)}}]),t}(),ti=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,[{key:"setValue",value:function(t,e){this._values.set(t,e)}}]),n}(Sr),ei=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(ti),ni=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(ti),ri=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(ti),ii=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),t.nullValues&&(t.nullValues=t.nullValues.map(ci)),(r=e.call(this,t))._values=new _r(new Int32Array(0),2),r}return E(n,[{key:"values64",get:function(){return this._values.buffer64}},{key:"isValid",value:function(t){return ze(ut(n.prototype),"isValid",this).call(this,ci(t))}}]),n}(ti),ai=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(ti),oi=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(ti),ui=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(ti),si=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),t.nullValues&&(t.nullValues=t.nullValues.map(ci)),(r=e.call(this,t))._values=new _r(new Uint32Array(0),2),r}return E(n,[{key:"values64",get:function(){return this._values.buffer64}},{key:"isValid",value:function(t){return ze(ut(n.prototype),"isValid",this).call(this,ci(t))}}]),n}(ti),ci=(Qr={BigIntArray:_t},function(t){return ArrayBuffer.isView(t)&&(Qr.buffer=t.buffer,Qr.byteOffset=t.byteOffset,Qr.byteLength=t.byteLength,t=Wr(Qr),Qr.buffer=null),t}),fi=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(Sr),li=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(fi),hi=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(fi),yi=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(fi),pi=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(fi),di=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(Sr),vi=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(di),bi=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(di),gi=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(di),mi=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(di),ki=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(Sr),wi=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(ki),_i=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(ki),Ii=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this,t))._values=new gr(new Uint8Array(0)),r}return E(n,[{key:"byteLength",get:function(){var t=this._pendingLength+4*this.length;return this._offsets&&(t+=this._offsets.byteLength),this._values&&(t+=this._values.byteLength),this._nulls&&(t+=this._nulls.byteLength),t}},{key:"setValue",value:function(t,e){return ze(ut(n.prototype),"setValue",this).call(this,t,Jt(e))}},{key:"_flushPending",value:function(t,e){var n,r,i=this._offsets,a=this._values.reserve(e).buffer,o=0,u=0,s=0,c=O(t);try{for(c.s();!(r=c.n()).done;){var f=U(r.value,2);o=f[0],void 0===(n=f[1])?i.set(o,0):(u=n.length,a.set(n,s),i.set(o,u),s+=u)}}catch(l){c.e(l)}finally{c.f()}}}]),n}(xr),Si=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this,t))._values=new gr(new Uint8Array(0)),r}return E(n,[{key:"byteLength",get:function(){var t=this._pendingLength+4*this.length;return this._offsets&&(t+=this._offsets.byteLength),this._values&&(t+=this._values.byteLength),this._nulls&&(t+=this._nulls.byteLength),t}},{key:"setValue",value:function(t,e){return ze(ut(n.prototype),"setValue",this).call(this,t,it(e))}},{key:"_flushPending",value:function(t,e){}}]),n}(xr);Si.prototype._flushPending=Ii.prototype._flushPending;var xi=function(){function t(){F(this,t)}return E(t,[{key:"length",get:function(){return this._values.length}},{key:"get",value:function(t){return this._values[t]}},{key:"clear",value:function(){return this._values=null,this}},{key:"bind",value:function(t){return t instanceof qe?t:(this._values=t,this)}}]),t}(),Ai=Symbol.for("parent"),Ti=Symbol.for("rowIndex"),Bi=Symbol.for("keyToIdx"),Oi=Symbol.for("idxToVal"),Di=Symbol.for("nodejs.util.inspect.custom"),Li=function(t){function e(t,n){F(this,e),this[Ai]=t,this.size=n}return E(e,[{key:"entries",value:function(){return this[Symbol.iterator]()}},{key:"has",value:function(t){return void 0!==this.get(t)}},{key:"get",value:function(t){var e=void 0;if(null!==t&&void 0!==t){var n=this[Bi]||(this[Bi]=new Map),r=n.get(t);if(void 0!==r){var i=this[Oi]||(this[Oi]=new Array(this.size));void 0!==(e=i[r])||(i[r]=e=this.getValue(r))}else if((r=this.getIndex(t))>-1){n.set(t,r);var a=this[Oi]||(this[Oi]=new Array(this.size));void 0!==(e=a[r])||(a[r]=e=this.getValue(r))}}return e}},{key:"set",value:function(t,e){if(null!==t&&void 0!==t){var n=this[Bi]||(this[Bi]=new Map),r=n.get(t);if(void 0===r&&n.set(t,r=this.getIndex(t)),r>-1)(this[Oi]||(this[Oi]=new Array(this.size)))[r]=this.setValue(r,e)}return this}},{key:"clear",value:function(){throw new Error("Clearing ".concat(this[Symbol.toStringTag]," not supported."))}},{key:"delete",value:function(t){throw new Error("Deleting ".concat(this[Symbol.toStringTag]," values not supported."))}},{key:Symbol.iterator,value:R.mark((function t(){var e,n,r,i,a,o,u,s,c;return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.keys(),n=this.values(),r=this[Bi]||(this[Bi]=new Map),i=this[Oi]||(this[Oi]=new Array(this.size)),u=0;case 5:if((s=e.next()).done||(c=n.next()).done){t.next=15;break}return a=s.value,o=c.value,i[u]=o,r.has(a)||r.set(a,u),t.next=12,[a,o];case 12:++u,t.next=5;break;case 15:case"end":return t.stop()}}),t,this)}))},{key:"forEach",value:function(t,e){for(var n,r,i,a,o=this.keys(),u=this.values(),s=void 0===e?t:function(n,r,i){return t.call(e,n,r,i)},c=this[Bi]||(this[Bi]=new Map),f=this[Oi]||(this[Oi]=new Array(this.size)),l=0;!(i=o.next()).done&&!(a=u.next()).done;++l)n=i.value,r=a.value,f[l]=r,c.has(n)||c.set(n,l),s(r,n,this)}},{key:"toArray",value:function(){return vn(this.values())}},{key:"toJSON",value:function(){var t={};return this.forEach((function(e,n){return t[n]=e})),t}},{key:"inspect",value:function(){return this.toString()}},{key:Di,value:function(){return this.toString()}},{key:"toString",value:function(){var t=[];return this.forEach((function(e,n){n=pr(n),e=pr(e),t.push("".concat(n,": ").concat(e))})),"{ ".concat(t.join(", ")," }")}}]),e}();Li[Symbol.toStringTag]=function(t){var e;return Object.defineProperties(t,(Ve(e={size:{writable:!0,enumerable:!1,configurable:!1,value:0}},Ai,{writable:!0,enumerable:!1,configurable:!1,value:null}),Ve(e,Ti,{writable:!0,enumerable:!1,configurable:!1,value:-1}),e)),t[Symbol.toStringTag]="Row"}(Li.prototype);var Fi=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),ht(r=e.call(this,t,t.length),Ni(lt(r)))}return E(n,[{key:"keys",value:function(){return this[Ai].getChildAt(0)[Symbol.iterator]()}},{key:"values",value:function(){return this[Ai].getChildAt(1)[Symbol.iterator]()}},{key:"getKey",value:function(t){return this[Ai].getChildAt(0).get(t)}},{key:"getIndex",value:function(t){return this[Ai].getChildAt(0).indexOf(t)}},{key:"getValue",value:function(t){return this[Ai].getChildAt(1).get(t)}},{key:"setValue",value:function(t,e){this[Ai].getChildAt(1).set(t,e)}}]),n}(Li),Mi=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),ht(r=e.call(this,t,t.type.children.length),Ui(lt(r)))}return E(n,[{key:"keys",value:R.mark((function t(){var e,n,r;return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=O(this[Ai].type.children),t.prev=1,e.s();case 3:if((n=e.n()).done){t.next=9;break}return r=n.value,t.next=7,r.name;case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),e.e(t.t0);case 14:return t.prev=14,e.f(),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,11,14,17]])}))},{key:"values",value:R.mark((function t(){var e,n,r;return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=O(this[Ai].type.children),t.prev=1,e.s();case 3:if((n=e.n()).done){t.next=9;break}return r=n.value,t.next=7,this[r.name];case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),e.e(t.t0);case 14:return t.prev=14,e.f(),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,11,14,17]])}))},{key:"getKey",value:function(t){return this[Ai].type.children[t].name}},{key:"getIndex",value:function(t){return this[Ai].type.children.findIndex((function(e){return e.name===t}))}},{key:"getValue",value:function(t){return this[Ai].getChildAt(t).get(this[Ti])}},{key:"setValue",value:function(t,e){return this[Ai].getChildAt(t).set(this[Ti],e)}}]),n}(Li);Object.setPrototypeOf(Li.prototype,Map.prototype);var Ei,Ui=function(){var t={enumerable:!0,configurable:!1,get:null,set:null};return function(e){var n,r=-1,i=e[Bi]||(e[Bi]=new Map),a=function(t){return function(){return this.get(t)}},o=function(t){return function(e){return this.set(t,e)}},u=O(e.keys());try{for(u.s();!(n=u.n()).done;){var s=n.value;i.set(s,++r),t.get=a(s),t.set=o(s),e.hasOwnProperty(s)||(t.enumerable=!0,Object.defineProperty(e,s,t)),e.hasOwnProperty(r)||(t.enumerable=!1,Object.defineProperty(e,r,t))}}catch(c){u.e(c)}finally{u.f()}return t.get=t.set=null,e}}(),Ni=function(){if("undefined"===typeof Proxy)return Ui;var t=Li.prototype.has,e=Li.prototype.get,n=Li.prototype.set,r=Li.prototype.getKey,i={isExtensible:function(){return!1},deleteProperty:function(){return!1},preventExtensions:function(){return!0},ownKeys:function(t){return vn(t.keys()).map((function(t){return"".concat(t)}))},has:function(t,e){switch(e){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 Ai:case Ti:case Oi:case Bi:case Di:return!0}return"number"!==typeof e||t.has(e)||(e=t.getKey(e)),t.has(e)},get:function(n,i,a){switch(i){case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:case Ai:case Ti:case Oi:case Bi:case Di:return Reflect.get(n,i,a)}return"number"!==typeof i||t.call(a,i)||(i=r.call(a,i)),e.call(a,i)},set:function(e,i,a,o){switch(i){case Ai:case Ti:case Oi:case Bi:return Reflect.set(e,i,a,o);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"number"!==typeof i||t.call(o,i)||(i=r.call(o,i)),!!t.call(o,i)&&!!n.call(o,i,a)}};return function(t){return new Proxy(t,i)}}();function Ci(t,e,n){var r=t.length,i=e>-1?e:r+e%r;return n?n(t,i):i}function Vi(t,e,n,r){var i=t.length,a=void 0===i?0:i,o="number"!==typeof e?0:e,u="number"!==typeof n?a:n;return o<0&&(o=(o%a+a)%a),u<0&&(u=(u%a+a)%a),ua&&(u=a),r?r(t,o,u):[o,u]}var ji=kt?mt(0):0,Ri=function(t){return t!==t};function Pi(t){var e=typeof t;if("object"!==e||null===t)return Ri(t)?Ri:"bigint"!==e?function(e){return e===t}:function(e){return ji+e===t};if(t instanceof Date){var n=t.valueOf();return function(t){return t instanceof Date&&t.valueOf()===n}}return ArrayBuffer.isView(t)?function(e){return!!e&&Ae(t,e)}:t instanceof Map?function(t){var e=-1,n=[];return t.forEach((function(t){return n[++e]=Pi(t)})),zi(n)}(t):Array.isArray(t)?function(t){for(var e=[],n=-1,r=t.length;++n1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Hi(i);return F(this,r),(e=n.call(this))._nullCount=-1,e._type=t,e._chunks=i,e._chunkOffsets=a,e._length=a[a.length-1],e._numChildren=(e._type.children||[]).length,e}return E(r,[{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._length}},{key:"chunks",get:function(){return this._chunks}},{key:"typeId",get:function(){return this._type.typeId}},{key:"VectorName",get:function(){return"Chunked<".concat(this._type,">")}},{key:"data",get:function(){return this._chunks[0]?this._chunks[0].data:null}},{key:"ArrayType",get:function(){return this._type.ArrayType}},{key:"numChildren",get:function(){return this._numChildren}},{key:"stride",get:function(){return this._chunks[0]?this._chunks[0].stride:1}},{key:"byteLength",get:function(){return this._chunks.reduce((function(t,e){return t+e.byteLength}),0)}},{key:"nullCount",get:function(){var t=this._nullCount;return t<0&&(this._nullCount=t=this._chunks.reduce((function(t,e){return t+e.nullCount}),0)),t}},{key:"indices",get:function(){if(Fn.isDictionary(this._type)){if(!this._indices){var t=this._chunks;this._indices=1===t.length?t[0].indices:r.concat.apply(r,vn(t.map((function(t){return t.indices}))))}return this._indices}return null}},{key:"dictionary",get:function(){return Fn.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}},{key:e,value:R.mark((function t(){var e,n,r;return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=O(this._chunks),t.prev=1,e.s();case 3:if((n=e.n()).done){t.next=8;break}return r=n.value,t.delegateYield(r,"t0",6);case 6:t.next=3;break;case 8:t.next=13;break;case 10:t.prev=10,t.t1=t.catch(1),e.e(t.t1);case 13:return t.prev=13,e.f(),t.finish(13);case 16:case"end":return t.stop()}}),t,this,[[1,10,13,16]])}))},{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._chunks;return new r(this._type,t)}},{key:"concat",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n=this._numChildren)return null;var e,n,i,a=this._children||(this._children=[]);return(e=a[t])?e:(n=(this._type.children||[])[t])&&(i=this._chunks.map((function(e){return e.getChildAt(t)})).filter((function(t){return null!=t}))).length>0?a[t]=new r(n.type,i):null}},{key:"search",value:function(t,e){var n=t,r=this._chunkOffsets,i=r.length-1;if(n<0)return null;if(n>=r[i])return null;if(i<=1)return e?e(this,0,n):[0,n];var a=0,o=0,u=0;do{if(a+1===i)return e?e(this,a,n-o):[a,n-o];n>=r[u=a+(i-a)/2|0]?a=u:i=u}while(n=(o=r[a]));return null}},{key:"isValid",value:function(t){return!!this.search(t,this.isValidInternal)}},{key:"get",value:function(t){return this.search(t,this.getInternal)}},{key:"set",value:function(t,e){this.search(t,(function(t,n,r){return t.chunks[n].set(r,e)}))}},{key:"indexOf",value:function(t,e){var n=this;return e&&"number"===typeof e?this.search(e,(function(e,r,i){return n.indexOfInternal(e,r,i,t)})):this.indexOfInternal(this,0,Math.max(0,e||0),t)}},{key:"toArray",value:function(){var t=this.chunks,e=t.length,n=this._type.ArrayType;if(e<=0)return new n(0);if(e<=1)return t[0].toArray();for(var r=0,i=new Array(e),a=-1;++a=n)break;if(!(e>=f+c))if(f>=e&&f+c<=n)r.push(s);else{var l=Math.max(0,e-f),h=Math.min(n-f,c);r.push(s.slice(l,h))}}return t.clone(r)}}],[{key:"flatten",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0;return F(this,n),i=Wi.flatten.apply(Wi,vn(i)),(r=e.call(this,t.type,i,a))._field=t,1!==i.length||lt(r)instanceof qi?r:ht(r,new qi(t,i[0],r._chunkOffsets))}return E(n,[{key:"field",get:function(){return this._field}},{key:"name",get:function(){return this._field.name}},{key:"nullable",get:function(){return this._field.nullable}},{key:"metadata",get:function(){return this._field.metadata}},{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._chunks;return new n(this._field,t)}},{key:"getChildAt",value:function(t){if(t<0||t>=this.numChildren)return null;var e,r,i,a=this._children||(this._children=[]);return(e=a[t])?e:(r=(this.type.children||[])[t])&&(i=this._chunks.map((function(e){return e.getChildAt(t)})).filter((function(t){return null!=t}))).length>0?a[t]=new n(r,i):null}}],[{key:"new",value:function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a0}))&&(t=t.clone({nullable:!0}));return new n(t,o)}}]),n}(Wi),qi=function(t){ot(n,t);var e=yt(n);function n(t,r,i){var a;return F(this,n),(a=e.call(this,t,[r],i))._chunk=r,a}return E(n,[{key:"search",value:function(t,e){return e?e(this,0,t):[0,t]}},{key:"isValid",value:function(t){return this._chunk.isValid(t)}},{key:"get",value:function(t){return this._chunk.get(t)}},{key:"set",value:function(t,e){this._chunk.set(t,e)}},{key:"indexOf",value:function(t,e){return this._chunk.indexOf(t,e)}}]),n}(Gi),Ji=Array.isArray,Zi=function(t,e){return na(t,e,[],0)},Qi=function(t){var e=U(oa(t,[[],[]]),2),n=e[0];return e[1].map((function(t,e){return t instanceof Gi?Gi.new(t.field.clone(n[e]),t):t instanceof qe?Gi.new(n[e],t):Gi.new(n[e],[])}))},Xi=function(t){return oa(t,[[],[]])},ta=function(t,e){return ra(t,e,[],0)},ea=function(t,e){return ia(t,e,[],0)};function na(t,e,n,r){for(var i,a=r,o=-1,u=e.length;++o0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;F(this,e),this.fields=t||[],this.metadata=n||new Map,r||(r=fa(t)),this.dictionaries=r}return E(e,[{key:Symbol.toStringTag,get:function(){return"Schema"}},{key:"toString",value:function(){return"Schema<{ ".concat(this.fields.map((function(t,e){return"".concat(e,": ").concat(t)})).join(", ")," }>")}},{key:"compareTo",value:function(t){return Ln.compareSchemas(this,t)}},{key:"select",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;F(this,e),this.name=t,this.type=n,this.nullable=r,this.metadata=i||new Map}return E(e,[{key:"typeId",get:function(){return this.type.typeId}},{key:Symbol.toStringTag,get:function(){return"Field"}},{key:"toString",value:function(){return"".concat(this.name,": ").concat(this.type)}},{key:"compareTo",value:function(t){return Ln.compareField(this,t)}},{key:"clone",value:function(){for(var t,n,r,i,a,o,u,s,c,f,l=arguments.length,h=new Array(l),y=0;y1&&void 0!==arguments[1]?arguments[1]:new Map,n=-1,r=t.length;++n0&&fa(a.children,e)}return e}ua.prototype.fields=null,ua.prototype.metadata=null,ua.prototype.dictionaries=null,sa.prototype.type=null,sa.prototype.name=null,sa.prototype.nullable=null,sa.prototype.metadata=null;var la=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this,t))._run=new xi,r._offsets=new wr,r}return E(n,[{key:"addChild",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=t,this.type=new rr(new sa(e,t.type,!0)),this.numChildren-1}},{key:"clear",value:function(){return this._run.clear(),ze(ut(n.prototype),"clear",this).call(this)}},{key:"_flushPending",value:function(t){var e,n,r=this._run,i=this._offsets,a=this._setValue,o=0,u=O(t);try{for(u.s();!(n=u.n()).done;){var s=U(n.value,2);o=s[0],void 0===(e=s[1])?i.set(o,0):(i.set(o,e.length),a(this,o,r.bind(e)))}}catch(c){u.e(c)}finally{u.f()}}}]),n}(xr),ha=function(t){ot(n,t);var e=yt(n);function n(){var t;return F(this,n),(t=e.apply(this,arguments))._run=new xi,t}return E(n,[{key:"setValue",value:function(t,e){ze(ut(n.prototype),"setValue",this).call(this,t,this._run.bind(e))}},{key:"addChild",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0";if(this.numChildren>0)throw new Error("FixedSizeListBuilder can only have one child.");var n=this.children.push(t);return this.type=new ur(this.type.listSize,new sa(e,t.type,!0)),n}},{key:"clear",value:function(){return this._run.clear(),ze(ut(n.prototype),"clear",this).call(this)}}]),n}(Ir),ya=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,[{key:"set",value:function(t,e){return ze(ut(n.prototype),"set",this).call(this,t,e)}},{key:"setValue",value:function(t,e){e=e instanceof Map?e:new Map(Object.entries(e));var n=this._pending||(this._pending=new Map),r=n.get(t);r&&(this._pendingLength-=r.size),this._pendingLength+=e.size,n.set(t,e)}},{key:"addChild",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"".concat(this.numChildren);if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=t,this.type=new sr(new sa(e,t.type,!0),this.type.keysSorted),this.numChildren-1}},{key:"_flushPending",value:function(t){var e=this,n=this._offsets,r=this._setValue;t.forEach((function(t,i){void 0===t?n.set(i,0):(n.set(i,t.size),r(e,i,t))}))}}]),n}(xr),pa=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,[{key:"addChild",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"".concat(this.numChildren),n=this.children.push(t);return this.type=new ir([].concat(vn(this.type.children),[new sa(e,t.type,!0)])),n}}]),n}(Ir),da=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this,t))._typeIds=new mr(new Int8Array(0),1),"function"===typeof t.valueToChildTypeId&&(r._valueToChildTypeId=t.valueToChildTypeId),r}return E(n,[{key:"typeIdToChildIndex",get:function(){return this.type.typeIdToChildIndex}},{key:"append",value:function(t,e){return this.set(this.length,t,e)}},{key:"set",value:function(t,e,n){return void 0===n&&(n=this._valueToChildTypeId(this,e,t)),this.setValid(t,this.isValid(e))&&this.setValue(t,e,n),this}},{key:"setValue",value:function(t,e,r){this._typeIds.set(t,r),ze(ut(n.prototype),"setValue",this).call(this,t,e)}},{key:"addChild",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"".concat(this.children.length),n=this.children.push(t),r=this.type,i=r.children,a=r.mode,o=r.typeIds,u=[].concat(vn(i),[new sa(e,t.type)]);return this.type=new ar(a,[].concat(vn(o),[n]),u),n}},{key:"_valueToChildTypeId",value:function(t,e,n){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.")}}]),n}(Ir),va=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(da),ba=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this,t))._offsets=new mr(new Int32Array(0)),r}return E(n,[{key:"setValue",value:function(t,e,r){var i=this.type.typeIdToChildIndex[r];return this._offsets.set(t,this.getChildAt(i).length),ze(ut(n.prototype),"setValue",this).call(this,t,e,r)}}]),n}(da),ga=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(bn),ma=function(t,e,n){t[e]=n%4294967296|0,t[e+1]=n/4294967296|0},ka=function(t,e,n,r){var i=e[n],a=e[n+1];null!=i&&null!=a&&t.set(r.subarray(0,a-i),i)},wa=function(t,e,n){!function(t,e,n){t[e]=n/864e5|0}(t.values,e,n.valueOf())},_a=function(t,e,n){var r=t.values;ma(r,2*e,n.valueOf())},Ia=function(t,e,n){var r=t.stride;t.values[r*e]=n},Sa=function(t,e,n){var r=t.stride;t.values[r*e]=Cr(n)},xa=function(t,e,n){switch(typeof n){case"bigint":t.values64[e]=n;break;case"number":t.values[e*t.stride]=n;break;default:var r=n,i=t.stride,a=Ht(t.ArrayType,r);t.values.set(a.subarray(0,i),i*e)}},Aa=function(t,e,n){var r=t.values;return ma(r,2*e,n/1e3)},Ta=function(t,e,n){var r=t.values;return ma(r,2*e,n)},Ba=function(t,e,n){return function(t,e,n){t[e]=1e3*n%4294967296|0,t[e+1]=1e3*n/4294967296|0}(t.values,2*e,n)},Oa=function(t,e,n){return function(t,e,n){t[e]=1e6*n%4294967296|0,t[e+1]=1e6*n/4294967296|0}(t.values,2*e,n)},Da=function(t,e,n){t.values[t.stride*e]=n},La=function(t,e,n){t.values[t.stride*e]=n},Fa=function(t,e,n){t.values.set(n.subarray(0,2),2*e)},Ma=function(t,e,n){t.values.set(n.subarray(0,2),2*e)},Ea=function(t,e,n){var r=t.typeIdToChildIndex[t.typeIds[e]],i=t.getChildAt(r);i&&i.set(t.valueOffsets[e],n)},Ua=function(t,e,n){var r=t.typeIdToChildIndex[t.typeIds[e]],i=t.getChildAt(r);i&&i.set(e,n)},Na=function(t,e,n){t.values.set(n.subarray(0,2),2*e)},Ca=function(t,e,n){t.values[e]=12*n[0]+n[1]%12};ga.prototype.visitBool=function(t,e,n){var r=t.offset,i=t.values,a=r+e;n?i[a>>3]|=1<>3]&=~(1<0){var i=e.children||[],a={nullValues:e.nullValues},o=Array.isArray(i)?function(t,e){return i[e]||a}:function(t){var e=t.name;return i[e]||a};n.children.forEach((function(e,n){var i=e.type,a=o(e,n);r.children.push(t(Re(Re({},a),{},{type:i})))}))}return r},Object.keys(Je).map((function(t){return Je[t]})).filter((function(t){return"number"===typeof t&&t!==Je.NONE})).forEach((function(t){Pa.visit(t).prototype._setValue=ja.getVisitFn(t)})),Si.prototype._setValue=ja.visitBinary,function(t){!function(e){!function(e){!function(e){var n=function(){function e(){F(this,e),this.bb=null,this.bb_pos=0}return E(e,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"version",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):Ye.apache.arrow.flatbuf.MetadataVersion.V1}},{key:"schema",value:function(t){var e=this.bb.__offset(this.bb_pos,6);return e?(t||new Ye.apache.arrow.flatbuf.Schema).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}},{key:"dictionaries",value:function(e,n){var r=this.bb.__offset(this.bb_pos,8);return r?(n||new t.apache.arrow.flatbuf.Block).__init(this.bb.__vector(this.bb_pos+r)+24*e,this.bb):null}},{key:"dictionariesLength",value:function(){var t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}},{key:"recordBatches",value:function(e,n){var r=this.bb.__offset(this.bb_pos,10);return r?(n||new t.apache.arrow.flatbuf.Block).__init(this.bb.__vector(this.bb_pos+r)+24*e,this.bb):null}},{key:"recordBatchesLength",value:function(){var t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}}],[{key:"getRootAsFooter",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startFooter",value:function(t){t.startObject(4)}},{key:"addVersion",value:function(t,e){t.addFieldInt16(0,e,Ye.apache.arrow.flatbuf.MetadataVersion.V1)}},{key:"addSchema",value:function(t,e){t.addFieldOffset(1,e,0)}},{key:"addDictionaries",value:function(t,e){t.addFieldOffset(2,e,0)}},{key:"startDictionariesVector",value:function(t,e){t.startVector(24,e,8)}},{key:"addRecordBatches",value:function(t,e){t.addFieldOffset(3,e,0)}},{key:"startRecordBatchesVector",value:function(t,e){t.startVector(24,e,8)}},{key:"endFooter",value:function(t){return t.endObject()}},{key:"finishFooterBuffer",value:function(t,e){t.finish(e)}},{key:"createFooter",value:function(t,n,r,i,a){return e.startFooter(t),e.addVersion(t,n),e.addSchema(t,r),e.addDictionaries(t,i),e.addRecordBatches(t,a),e.endFooter(t)}}]),e}();e.Footer=n}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(t.apache||(t.apache={}))}(Va||(Va={})),function(t){!function(t){!function(t){!function(t){var e=function(){function t(){F(this,t),this.bb=null,this.bb_pos=0}return E(t,[{key:"__init",value:function(t,e){return this.bb_pos=t,this.bb=e,this}},{key:"offset",value:function(){return this.bb.readInt64(this.bb_pos)}},{key:"metaDataLength",value:function(){return this.bb.readInt32(this.bb_pos+8)}},{key:"bodyLength",value:function(){return this.bb.readInt64(this.bb_pos+16)}}],[{key:"createBlock",value:function(t,e,n,r){return t.prep(8,24),t.writeInt64(r),t.pad(4),t.writeInt32(n),t.writeInt64(e),t.offset()}}]),t}();t.Block=e}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(t.apache||(t.apache={}))}(Va||(Va={}));var za=W.Long,Ya=W.Builder,Wa=W.ByteBuffer,Ha=Va.apache.arrow.flatbuf.Block,$a=Va.apache.arrow.flatbuf.Footer,Ka=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:an.V4,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;F(this,t),this.schema=e,this.version=n,r&&(this._recordBatches=r),i&&(this._dictionaryBatches=i)}return E(t,[{key:"numRecordBatches",get:function(){return this._recordBatches.length}},{key:"numDictionaries",get:function(){return this._dictionaryBatches.length}},{key:"recordBatches",value:R.mark((function t(){var e,n,r;return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=-1,r=this.numRecordBatches;case 1:if(!(++n=0&&t=0&&t=0&&t=0&&t0)return ze(ut(n.prototype),"write",this).call(this,t)}},{key:"toString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t?rt(this.toUint8Array(!0)):this.toUint8Array(!1).then(rt)}},{key:"toUint8Array",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Wt(this._values)[0]:L(R.mark((function e(){var n,r,i,a,o,u,s,c;return R.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=[],r=0,i=!1,a=!1,e.prev=3,u=P(t);case 5:return e.next=7,u.next();case 7:if(!(i=!(s=e.sent).done)){e.next=14;break}c=s.value,n.push(c),r+=c.byteLength;case 11:i=!1,e.next=5;break;case 14:e.next=20;break;case 16:e.prev=16,e.t0=e.catch(3),a=!0,o=e.t0;case 20:if(e.prev=20,e.prev=21,!i||null==u.return){e.next=25;break}return e.next=25,u.return();case 25:if(e.prev=25,!a){e.next=28;break}throw o;case 28:return e.finish(25);case 29:return e.finish(20);case 30:return e.abrupt("return",Wt(n,r)[0]);case 31:case"end":return e.stop()}}),e,null,[[3,16,20,30],[21,,25,29]])})))()}}]),n}(bt),Za=function(t){function e(t){F(this,e),t&&(this.source=new Xa(Be.fromIterable(t)))}return E(e,[{key:Symbol.iterator,value:function(){return this}},{key:"next",value:function(t){return this.source.next(t)}},{key:"throw",value:function(t){return this.source.throw(t)}},{key:"return",value:function(t){return this.source.return(t)}},{key:"peek",value:function(t){return this.source.peek(t)}},{key:"read",value:function(t){return this.source.read(t)}}]),e}(),Qa=function(t){function e(t){F(this,e),t instanceof e?this.source=t.source:t instanceof Ja?this.source=new to(Be.fromAsyncIterable(t)):jt(t)?this.source=new to(Be.fromNodeStream(t)):Ct(t)?this.source=new to(Be.fromDOMStream(t)):Ut(t)?this.source=new to(Be.fromDOMStream(t.body)):Dt(t)?this.source=new to(Be.fromIterable(t)):(Ot(t)||Lt(t))&&(this.source=new to(Be.fromAsyncIterable(t)))}return E(e,[{key:Symbol.asyncIterator,value:function(){return this}},{key:"next",value:function(t){return this.source.next(t)}},{key:"throw",value:function(t){return this.source.throw(t)}},{key:"return",value:function(t){return this.source.return(t)}},{key:"closed",get:function(){return this.source.closed}},{key:"cancel",value:function(t){return this.source.cancel(t)}},{key:"peek",value:function(t){return this.source.peek(t)}},{key:"read",value:function(t){return this.source.read(t)}}]),e}(),Xa=function(){function t(e){F(this,t),this.source=e}return E(t,[{key:"cancel",value:function(t){this.return(t)}},{key:"peek",value:function(t){return this.next(t,"peek").value}},{key:"read",value:function(t){return this.next(t,"read").value}},{key:"next",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"read";return this.source.next({cmd:e,size:t})}},{key:"throw",value:function(t){return Object.create(this.source.throw&&this.source.throw(t)||pt)}},{key:"return",value:function(t){return Object.create(this.source.return&&this.source.return(t)||pt)}}]),t}(),to=function(){function t(e){var n=this;F(this,t),this.source=e,this._closedPromise=new Promise((function(t){return n._closedPromiseResolve=t}))}return E(t,[{key:"cancel",value:function(){var t=L(R.mark((function t(e){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.return(e);case 2:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"closed",get:function(){return this._closedPromise}},{key:"read",value:function(){var t=L(R.mark((function t(e){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.next(e,"read");case 2:return t.abrupt("return",t.sent.value);case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"peek",value:function(){var t=L(R.mark((function t(e){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.next(e,"peek");case 2:return t.abrupt("return",t.sent.value);case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"next",value:function(){var t=L(R.mark((function t(e){var n,r=arguments;return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:"read",t.next=3,this.source.next({cmd:n,size:e});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"throw",value:function(){var t=L(R.mark((function t(e){var n;return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.t1=this.source.throw,!t.t1){t.next=5;break}return t.next=4,this.source.throw(e);case 4:t.t1=t.sent;case 5:if(t.t0=t.t1,t.t0){t.next=8;break}t.t0=pt;case 8:return n=t.t0,this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,t.abrupt("return",Object.create(n));case 12:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"return",value:function(){var t=L(R.mark((function t(e){var n;return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.t1=this.source.return,!t.t1){t.next=5;break}return t.next=4,this.source.return(e);case 4:t.t1=t.sent;case 5:if(t.t0=t.t1,t.t0){t.next=8;break}t.t0=pt;case 8:return n=t.t0,this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,t.abrupt("return",Object.create(n));case 12:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()}]),t}(),eo=function(t){ot(n,t);var e=yt(n);function n(t,r){var i;return F(this,n),(i=e.call(this)).position=0,i.buffer=Jt(t),i.size="undefined"===typeof r?i.buffer.byteLength:r,i}return E(n,[{key:"readInt32",value:function(t){var e=this.readAt(t,4),n=e.buffer,r=e.byteOffset;return new DataView(n,r).getInt32(0,!0)}},{key:"seek",value:function(t){return this.position=Math.min(t,this.size),t>>16,65535&this.buffer[1],this.buffer[0]>>>16,65535&this.buffer[0]]),n=new Uint32Array([t.buffer[1]>>>16,65535&t.buffer[1],t.buffer[0]>>>16,65535&t.buffer[0]]),r=e[3]*n[3];this.buffer[0]=65535&r;var i=r>>>16;return i+=r=e[2]*n[3],i+=r=e[3]*n[2]>>>0,this.buffer[0]+=i<<16,this.buffer[1]=i>>>0>>16,this.buffer[1]+=e[1]*n[3]+e[2]*n[2]+e[3]*n[1],this.buffer[1]+=e[0]*n[3]+e[1]*n[2]+e[2]*n[1]+e[3]*n[0]<<16,this}},{key:"_plus",value:function(t){var e=this.buffer[0]+t.buffer[0]>>>0;this.buffer[1]+=t.buffer[1],e>>0&&++this.buffer[1],this.buffer[0]=e}},{key:"lessThan",value:function(t){return this.buffer[1]1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);return n.fromString("string"===typeof t?t:t.toString(),e)}},{key:"fromNumber",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);return n.fromString(t.toString(),e)}},{key:"fromString",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2),r=t.length,i=new n(e),a=0;a1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);return n.fromString("string"===typeof t?t:t.toString(),e)}},{key:"fromNumber",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);return n.fromString(t.toString(),e)}},{key:"fromString",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2),r=t.startsWith("-"),i=t.length,a=new n(e),o=r?1:0;o>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]>>0&&++e[1],e[1]>>0&&++e[2],e[2]>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}},{key:"hex",value:function(){return"".concat(ro(this.buffer[3])," ").concat(ro(this.buffer[2])," ").concat(ro(this.buffer[1])," ").concat(ro(this.buffer[0]))}}],[{key:"multiply",value:function(e,n){return new t(new Uint32Array(e.buffer)).times(n)}},{key:"add",value:function(e,n){return new t(new Uint32Array(e.buffer)).plus(n)}},{key:"from",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(4);return t.fromString("string"===typeof e?e:e.toString(),n)}},{key:"fromNumber",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(4);return t.fromString(e.toString(),n)}},{key:"fromString",value:function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(4),r=e.startsWith("-"),i=e.length,a=new t(n),o=r?1:0;o1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length;return yr.Null(t,0,n)}},{key:"visitBool",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.Bool(t,0,n,r,this.readNullBitmap(t,r),this.readData(t))}},{key:"visitInt",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.Int(t,0,n,r,this.readNullBitmap(t,r),this.readData(t))}},{key:"visitFloat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.Float(t,0,n,r,this.readNullBitmap(t,r),this.readData(t))}},{key:"visitUtf8",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.Utf8(t,0,n,r,this.readNullBitmap(t,r),this.readOffsets(t),this.readData(t))}},{key:"visitBinary",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.Binary(t,0,n,r,this.readNullBitmap(t,r),this.readOffsets(t),this.readData(t))}},{key:"visitFixedSizeBinary",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.FixedSizeBinary(t,0,n,r,this.readNullBitmap(t,r),this.readData(t))}},{key:"visitDate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.Date(t,0,n,r,this.readNullBitmap(t,r),this.readData(t))}},{key:"visitTimestamp",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.Timestamp(t,0,n,r,this.readNullBitmap(t,r),this.readData(t))}},{key:"visitTime",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.Time(t,0,n,r,this.readNullBitmap(t,r),this.readData(t))}},{key:"visitDecimal",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.Decimal(t,0,n,r,this.readNullBitmap(t,r),this.readData(t))}},{key:"visitList",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.List(t,0,n,r,this.readNullBitmap(t,r),this.readOffsets(t),this.visit(t.children[0]))}},{key:"visitStruct",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.Struct(t,0,n,r,this.readNullBitmap(t,r),this.visitMany(t.children))}},{key:"visitUnion",value:function(t){return t.mode===en.Sparse?this.visitSparseUnion(t):this.visitDenseUnion(t)}},{key:"visitDenseUnion",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.Union(t,0,n,r,this.readNullBitmap(t,r),this.readTypeIds(t),this.readOffsets(t),this.visitMany(t.children))}},{key:"visitSparseUnion",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.Union(t,0,n,r,this.readNullBitmap(t,r),this.readTypeIds(t),this.visitMany(t.children))}},{key:"visitDictionary",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.Dictionary(t,0,n,r,this.readNullBitmap(t,r),this.readData(t.indices),this.readDictionary(t))}},{key:"visitInterval",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.Interval(t,0,n,r,this.readNullBitmap(t,r),this.readData(t))}},{key:"visitFixedSizeList",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.FixedSizeList(t,0,n,r,this.readNullBitmap(t,r),this.visit(t.children[0]))}},{key:"visitMap",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=e.length,r=e.nullCount;return yr.Map(t,0,n,r,this.readNullBitmap(t,r),this.readOffsets(t),this.visit(t.children[0]))}},{key:"nextFieldNode",value:function(){return this.nodes[++this.nodesIndex]}},{key:"nextBufferRange",value:function(){return this.buffers[++this.buffersIndex]}},{key:"readNullBitmap",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.nextBufferRange();return e>0&&this.readData(t,n)||new Uint8Array(0)}},{key:"readOffsets",value:function(t,e){return this.readData(t,e)}},{key:"readTypeIds",value:function(t,e){return this.readData(t,e)}},{key:"readData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextBufferRange(),n=e.length,r=e.offset;return this.bytes.subarray(r,r+n)}},{key:"readDictionary",value:function(t){return this.dictionaries.get(t.id)}}]),n}(bn),fo=function(t){ot(n,t);var e=yt(n);function n(t,r,i,a){var o;return F(this,n),(o=e.call(this,new Uint8Array(0),r,i,a)).sources=t,o}return E(n,[{key:"readNullBitmap",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.nextBufferRange(),r=n.offset;return e<=0?new Uint8Array(0):ln(this.sources[r])}},{key:"readOffsets",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextBufferRange(),n=e.offset;return Ht(Uint8Array,Ht(Int32Array,this.sources[n]))}},{key:"readTypeIds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextBufferRange(),n=e.offset;return Ht(Uint8Array,Ht(t.ArrayType,this.sources[n]))}},{key:"readData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextBufferRange(),n=e.offset,r=this.sources;return Fn.isTimestamp(t)||(Fn.isInt(t)||Fn.isTime(t))&&64===t.bitWidth||Fn.isDate(t)&&t.unit===Qe.MILLISECOND?Ht(Uint8Array,uo.convertArray(r[n])):Fn.isDecimal(t)?Ht(Uint8Array,so.convertArray(r[n])):Fn.isBinary(t)||Fn.isFixedSizeBinary(t)?lo(r[n]):Fn.isBool(t)?ln(r[n]):Fn.isUtf8(t)?it(r[n].join("")):Ht(Uint8Array,Ht(t.ArrayType,r[n].map((function(t){return+t}))))}}]),n}(co);function lo(t){for(var e=t.join(""),n=new Uint8Array(e.length/2),r=0;r>1]=parseInt(e.substr(r,2),16);return n}var ho=W.Long,yo=Ye.apache.arrow.flatbuf.Null,po=Ye.apache.arrow.flatbuf.Int,vo=Ye.apache.arrow.flatbuf.FloatingPoint,bo=Ye.apache.arrow.flatbuf.Binary,go=Ye.apache.arrow.flatbuf.Bool,mo=Ye.apache.arrow.flatbuf.Utf8,ko=Ye.apache.arrow.flatbuf.Decimal,wo=Ye.apache.arrow.flatbuf.Date,_o=Ye.apache.arrow.flatbuf.Time,Io=Ye.apache.arrow.flatbuf.Timestamp,So=Ye.apache.arrow.flatbuf.Interval,xo=Ye.apache.arrow.flatbuf.List,Ao=Ye.apache.arrow.flatbuf.Struct_,To=Ye.apache.arrow.flatbuf.Union,Bo=Ye.apache.arrow.flatbuf.DictionaryEncoding,Oo=Ye.apache.arrow.flatbuf.FixedSizeBinary,Do=Ye.apache.arrow.flatbuf.FixedSizeList,Lo=Ye.apache.arrow.flatbuf.Map,Fo=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,[{key:"visit",value:function(t,e){return null==t||null==e?void 0:ze(ut(n.prototype),"visit",this).call(this,t,e)}},{key:"visitNull",value:function(t,e){return yo.startNull(e),yo.endNull(e)}},{key:"visitInt",value:function(t,e){return po.startInt(e),po.addBitWidth(e,t.bitWidth),po.addIsSigned(e,t.isSigned),po.endInt(e)}},{key:"visitFloat",value:function(t,e){return vo.startFloatingPoint(e),vo.addPrecision(e,t.precision),vo.endFloatingPoint(e)}},{key:"visitBinary",value:function(t,e){return bo.startBinary(e),bo.endBinary(e)}},{key:"visitBool",value:function(t,e){return go.startBool(e),go.endBool(e)}},{key:"visitUtf8",value:function(t,e){return mo.startUtf8(e),mo.endUtf8(e)}},{key:"visitDecimal",value:function(t,e){return ko.startDecimal(e),ko.addScale(e,t.scale),ko.addPrecision(e,t.precision),ko.endDecimal(e)}},{key:"visitDate",value:function(t,e){return wo.startDate(e),wo.addUnit(e,t.unit),wo.endDate(e)}},{key:"visitTime",value:function(t,e){return _o.startTime(e),_o.addUnit(e,t.unit),_o.addBitWidth(e,t.bitWidth),_o.endTime(e)}},{key:"visitTimestamp",value:function(t,e){var n=t.timezone&&e.createString(t.timezone)||void 0;return Io.startTimestamp(e),Io.addUnit(e,t.unit),void 0!==n&&Io.addTimezone(e,n),Io.endTimestamp(e)}},{key:"visitInterval",value:function(t,e){return So.startInterval(e),So.addUnit(e,t.unit),So.endInterval(e)}},{key:"visitList",value:function(t,e){return xo.startList(e),xo.endList(e)}},{key:"visitStruct",value:function(t,e){return Ao.startStruct_(e),Ao.endStruct_(e)}},{key:"visitUnion",value:function(t,e){To.startTypeIdsVector(e,t.typeIds.length);var n=To.createTypeIdsVector(e,t.typeIds);return To.startUnion(e),To.addMode(e,t.mode),To.addTypeIds(e,n),To.endUnion(e)}},{key:"visitDictionary",value:function(t,e){var n=this.visit(t.indices,e);return Bo.startDictionaryEncoding(e),Bo.addId(e,new ho(t.id,0)),Bo.addIsOrdered(e,t.isOrdered),void 0!==n&&Bo.addIndexType(e,n),Bo.endDictionaryEncoding(e)}},{key:"visitFixedSizeBinary",value:function(t,e){return Oo.startFixedSizeBinary(e),Oo.addByteWidth(e,t.byteWidth),Oo.endFixedSizeBinary(e)}},{key:"visitFixedSizeList",value:function(t,e){return Do.startFixedSizeList(e),Do.addListSize(e,t.listSize),Do.endFixedSizeList(e)}},{key:"visitMap",value:function(t,e){return Lo.startMap(e),Lo.addKeysSorted(e,t.keysSorted),Lo.endMap(e)}}]),n}(bn),Mo=new Fo;function Eo(t){return new nu(t.count,Co(t.columns),Vo(t.columns))}function Uo(t,e){return(t.fields||[]).filter(Boolean).map((function(t){return sa.fromJSON(t,e)}))}function No(t,e){return(t.children||[]).filter(Boolean).map((function(t){return sa.fromJSON(t,e)}))}function Co(t){return(t||[]).reduce((function(t,e){return[].concat(vn(t),[new au(e.count,(n=e.VALIDITY,(n||[]).reduce((function(t,e){return t+ +(0===e)}),0)))],vn(Co(e.children)));var n}),[])}function Vo(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=-1,r=(t||[]).length;++n1&&void 0!==arguments[1]?arguments[1]:0;if(e instanceof ua)return new t(0,an.V4,rn.Schema,e);if(e instanceof nu)return new t(n,an.V4,rn.RecordBatch,e);if(e instanceof ru)return new t(n,an.V4,rn.DictionaryBatch,e);throw new Error("Unrecognized Message header: ".concat(e))}}]),t}(),nu=function(){function t(e,n,r){F(this,t),this._nodes=n,this._buffers=r,this._length="number"===typeof e?e:e.low}return E(t,[{key:"nodes",get:function(){return this._nodes}},{key:"length",get:function(){return this._length}},{key:"buffers",get:function(){return this._buffers}}]),t}(),ru=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];F(this,t),this._data=e,this._isDelta=r,this._id="number"===typeof n?n:n.low}return E(t,[{key:"id",get:function(){return this._id}},{key:"data",get:function(){return this._data}},{key:"isDelta",get:function(){return this._isDelta}},{key:"length",get:function(){return this.data.length}},{key:"nodes",get:function(){return this.data.nodes}},{key:"buffers",get:function(){return this.data.buffers}}]),t}(),iu=E((function t(e,n){F(this,t),this.offset="number"===typeof e?e:e.low,this.length="number"===typeof n?n:n.low})),au=E((function t(e,n){F(this,t),this.length="number"===typeof e?e:e.low,this.nullCount="number"===typeof n?n:n.low}));function ou(t){for(var e,n=[],r=-1,i=-1,a=t.nodesLength();++r0?$o.createCustomMetadataVector(t,vn(e.metadata).map((function(e){var n=U(e,2),r=n[0],i=n[1],a=t.createString("".concat(r)),o=t.createString("".concat(i));return Jo.startKeyValue(t),Jo.addKey(t,a),Jo.addValue(t,o),Jo.endKeyValue(t)}))):-1;e.name&&(n=t.createString(e.name));$o.startField(t),$o.addType(t,r),$o.addTypeType(t,o),$o.addChildren(t,s),$o.addNullable(t,!!e.nullable),-1!==n&&$o.addName(t,n);-1!==i&&$o.addDictionary(t,i);-1!==c&&$o.addCustomMetadata(t,c);return $o.endField(t)},sa.decode=function(t,e){var n,r,i,a,o,u;e&&(u=t.dictionary())?e.has(n=u.id().low)?(a=(a=u.indexType())?lu(a):new Cn,o=new lr(e.get(n),a,n,u.isOrdered()),r=new sa(t.name(),o,t.nullable(),fu(t))):(a=(a=u.indexType())?lu(a):new Cn,e.set(n,i=hu(t,cu(t,e))),o=new lr(i,a,n,u.isOrdered()),r=new sa(t.name(),o,t.nullable(),fu(t))):(i=hu(t,cu(t,e)),r=new sa(t.name(),i,t.nullable(),fu(t)));return r||null},sa.fromJSON=function(t,e){var n,r,i,a,o,u;return e&&(a=t.dictionary)?e.has(n=a.id)?(r=(r=a.indexType)?Ro(r):new Cn,u=new lr(e.get(n),r,n,a.isOrdered),i=new sa(t.name,u,t.nullable,jo(t.customMetadata))):(r=(r=a.indexType)?Ro(r):new Cn,e.set(n,o=Po(t,No(t,e))),u=new lr(o,r,n,a.isOrdered),i=new sa(t.name,u,t.nullable,jo(t.customMetadata))):(o=Po(t,No(t,e)),i=new sa(t.name,o,t.nullable,jo(t.customMetadata))),i||null},ua.encode=function(t,e){var n=e.fields.map((function(e){return sa.encode(t,e)}));Ko.startFieldsVector(t,n.length);var r=Ko.createFieldsVector(t,n),i=e.metadata&&e.metadata.size>0?Ko.createCustomMetadataVector(t,vn(e.metadata).map((function(e){var n=U(e,2),r=n[0],i=n[1],a=t.createString("".concat(r)),o=t.createString("".concat(i));return Jo.startKeyValue(t),Jo.addKey(t,a),Jo.addValue(t,o),Jo.endKeyValue(t)}))):-1;Ko.startSchema(t),Ko.addFields(t,r),Ko.addEndianness(t,yu?Qo.Little:Qo.Big),-1!==i&&Ko.addCustomMetadata(t,i);return Ko.endSchema(t)},ua.decode=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map,n=su(t,e);return new ua(n,fu(t),e)},ua.fromJSON=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map;return new ua(Uo(t,e),jo(t.customMetadata),e)},nu.encode=function(t,e){var n=e.nodes||[],r=e.buffers||[];Xo.startNodesVector(t,n.length),n.slice().reverse().forEach((function(e){return au.encode(t,e)}));var i=t.endVector();Xo.startBuffersVector(t,r.length),r.slice().reverse().forEach((function(e){return iu.encode(t,e)}));var a=t.endVector();return Xo.startRecordBatch(t),Xo.addLength(t,new zo(e.length,0)),Xo.addNodes(t,i),Xo.addBuffers(t,a),Xo.endRecordBatch(t)},nu.decode=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:an.V4;return new nu(t.length(),ou(t),uu(t,e))},nu.fromJSON=Eo,ru.encode=function(t,e){var n=nu.encode(t,e.data);return tu.startDictionaryBatch(t),tu.addId(t,new zo(e.id,0)),tu.addIsDelta(t,e.isDelta),tu.addData(t,n),tu.endDictionaryBatch(t)},ru.decode=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:an.V4;return new ru(nu.decode(t.data(),e),t.id(),t.isDelta())},ru.fromJSON=function(t){return new ru(Eo(t.data),t.id,t.isDelta)},au.encode=function(t,e){return Zo.createFieldNode(t,new zo(e.length,0),new zo(e.nullCount,0))},au.decode=function(t){return new au(t.length(),t.nullCount())},iu.encode=function(t,e){return Go.createBuffer(t,new zo(e.offset,0),new zo(e.length,0))},iu.decode=function(t){return new iu(t.offset(),t.length())};for(var yu=function(){var t=new ArrayBuffer(2);return new DataView(t).setInt16(0,256,!0),256===new Int16Array(t)[0]}(),pu=W.ByteBuffer,du=function(t){return"Expected ".concat(rn[t]," Message in stream, but was null or length 0.")},vu=function(t){return"Header pointer of flatbuffer-encoded ".concat(rn[t]," Message is null or length 0.")},bu=function(t,e){return"Expected to read ".concat(t," metadata bytes, but only read ").concat(e,".")},gu=function(t,e){return"Expected to read ".concat(t," bytes for message body, but only read ").concat(e,".")},mu=function(t){function e(t){F(this,e),this.source=t instanceof Za?t:new Za(t)}return E(e,[{key:Symbol.iterator,value:function(){return this}},{key:"next",value:function(){var t;return(t=this.readMetadataLength()).done||-1===t.value&&(t=this.readMetadataLength()).done||(t=this.readMetadata(t.value)).done?pt:t}},{key:"throw",value:function(t){return this.source.throw(t)}},{key:"return",value:function(t){return this.source.return(t)}},{key:"readMessage",value:function(t){var e;if((e=this.next()).done)return null;if(null!=t&&e.value.headerType!==t)throw new Error(du(t));return e.value}},{key:"readMessageBody",value:function(t){if(t<=0)return new Uint8Array(0);var e=Jt(this.source.read(t));if(e.byteLength0&&void 0!==arguments[0]&&arguments[0],e=rn.Schema,n=this.readMessage(e),r=n&&n.header();if(t&&!r)throw new Error(vu(e));return r}},{key:"readMetadataLength",value:function(){var t=this.source.read(_u),e=t&&new pu(t),n=e&&e.readInt32(0)||0;return{done:0===n,value:n}}},{key:"readMetadata",value:function(t){var e=this.source.read(t);if(!e)return pt;if(e.byteLength0&&void 0!==a[0]&&a[0],n=rn.Schema,t.next=4,this.readMessage(n);case 4:if(r=t.sent,i=r&&r.header(),!e||i){t.next=8;break}throw new Error(vu(n));case 8:return t.abrupt("return",i);case 9:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"readMetadataLength",value:function(){var t=L(R.mark((function t(){var e,n,r;return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.source.read(_u);case 2:return e=t.sent,n=e&&new pu(e),r=n&&n.readInt32(0)||0,t.abrupt("return",{done:0===r,value:r});case 6:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"readMetadata",value:function(){var t=L(R.mark((function t(e){var n;return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.source.read(e);case 2:if(n=t.sent){t.next=5;break}return t.abrupt("return",pt);case 5:if(!(n.byteLength1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=Su.length;++n2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");Fn.isNull(t.type)||Lu.call(this,i<=0?new Uint8Array(0):fn(e.offset,r,e.nullBitmap)),this.nodes.push(new au(r,i))}return ze(ut(n.prototype),"visit",this).call(this,t)}},{key:"visitNull",value:function(t){return this}},{key:"visitDictionary",value:function(t){return this.visit(t.indices)}},{key:"nodes",get:function(){return this._nodes}},{key:"buffers",get:function(){return this._buffers}},{key:"byteLength",get:function(){return this._byteLength}},{key:"bufferRegions",get:function(){return this._bufferRegions}}],[{key:"assemble",value:function(){for(var t=new n,e=arguments.length,r=new Array(e),i=0;i=t.length?Lu.call(this,new Uint8Array(0)):(e=t.values)instanceof Uint8Array?Lu.call(this,fn(t.offset,t.length,e)):Lu.call(this,ln(t))},Du.prototype.visitInt=Fu,Du.prototype.visitFloat=Fu,Du.prototype.visitUtf8=Mu,Du.prototype.visitBinary=Mu,Du.prototype.visitFixedSizeBinary=Fu,Du.prototype.visitDate=Fu,Du.prototype.visitTimestamp=Fu,Du.prototype.visitTime=Fu,Du.prototype.visitDecimal=Fu,Du.prototype.visitList=Eu,Du.prototype.visitStruct=Uu,Du.prototype.visitUnion=function(t){var e=t.type,n=t.length,r=t.typeIds,i=t.valueOffsets;if(Lu.call(this,r),e.mode===en.Sparse)return Uu.call(this,t);if(e.mode===en.Dense){if(t.offset<=0)return Lu.call(this,i),Uu.call(this,t);for(var a,o,u=r.reduce((function(t,e){return Math.max(t,e)}),r[0]),s=new Int32Array(u+1),c=new Int32Array(u+1).fill(-1),f=new Int32Array(n),l=xe(-i[0],n,i),h=-1;++h0&&void 0!==arguments[0]&&arguments[0];return this._sink.toString(t)}},{key:"toUint8Array",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._sink.toUint8Array(t)}},{key:"writeAll",value:function(t){var e=this;return Ot(t)?t.then((function(t){return e.writeAll(t)})):Lt(t)?Ru(this,t):ju(this,t)}},{key:"closed",get:function(){return this._sink.closed}},{key:e,value:function(){return this._sink[Symbol.asyncIterator]()}},{key:"toDOMStream",value:function(t){return this._sink.toDOMStream(t)}},{key:"toNodeStream",value:function(t){return this._sink.toNodeStream(t)}},{key:"close",value:function(){return this.reset()._sink.close()}},{key:"abort",value:function(t){return this.reset()._sink.abort(t)}},{key:"finish",value:function(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._sink,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t===this._sink||t instanceof Ja?this._sink=t:(this._sink=new Ja,t&&Nt(t)?this.toDOMStream({type:"bytes"}).pipeTo(t):t&&Vt(t)&&this.toNodeStream({objectMode:!1}).pipe(t)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,e&&e.compareTo(this._schema)||(null===e?(this._position=0,this._schema=null):(this._started=!0,this._schema=e,this._writeSchema(e))),this}},{key:"write",value:function(t){var e=null;if(!this._sink)throw new Error("RecordBatchWriter is closed");if(null===t||void 0===t)return this.finish()&&void 0;if(t instanceof Ec&&!(e=t.schema))return this.finish()&&void 0;if(t instanceof Uc&&!(e=t.schema))return this.finish()&&void 0;if(e&&!e.compareTo(this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,e)}t instanceof Uc?t instanceof Nc||this._writeRecordBatch(t):t instanceof Ec?this.writeAll(t.chunks):Dt(t)&&this.writeAll(t)}},{key:"_writeMessage",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,n=e-1,r=eu.encode(t),i=r.byteLength,a=this._writeLegacyIpcFormat?4:8,o=i+a+n&~n,u=o-i-a;return t.headerType===rn.RecordBatch?this._recordBatchBlocks.push(new qa(o,t.bodyLength,this._position)):t.headerType===rn.DictionaryBatch&&this._dictionaryBlocks.push(new qa(o,t.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(o-a)),i>0&&this._write(r),this._writePadding(u)}},{key:"_write",value:function(t){if(this._started){var e=Jt(t);e&&e.byteLength>0&&(this._sink.write(e),this._position+=e.byteLength)}return this}},{key:"_writeSchema",value:function(t){return this._writeMessage(eu.from(t))}},{key:"_writeFooter",value:function(t){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}},{key:"_writeMagic",value:function(){return this._write(Su)}},{key:"_writePadding",value:function(t){return t>0?this._write(new Uint8Array(t)):this}},{key:"_writeRecordBatch",value:function(t){var e=Du.assemble(t),n=e.byteLength,r=e.nodes,i=e.bufferRegions,a=e.buffers,o=new nu(t.length,r,i),u=eu.from(o,n);return this._writeDictionaries(t)._writeMessage(u)._writeBodyBuffers(a)}},{key:"_writeDictionaryBatch",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._dictionaryDeltaOffsets.set(e,t.length+(this._dictionaryDeltaOffsets.get(e)||0));var r=Du.assemble(t),i=r.byteLength,a=r.nodes,o=r.bufferRegions,u=r.buffers,s=new nu(t.length,a,o),c=new ru(s,e,n),f=eu.from(c,i);return this._writeMessage(f)._writeBodyBuffers(u)}},{key:"_writeBodyBuffers",value:function(t){for(var e,n,r,i=-1,a=t.length;++i0&&(this._write(e),(r=(n+7&-8)-n)>0&&this._writePadding(r));return this}},{key:"_writeDictionaries",value:function(t){var e,n=O(t.dictionaries);try{for(n.s();!(e=n.n()).done;){var r=U(e.value,2),i=r[0],a=r[1],o=this._dictionaryDeltaOffsets.get(i)||0;if(0===o||(a=a.slice(o)).length>0){var u,s=O("chunks"in a?a.chunks:[a]);try{for(s.s();!(u=s.n()).done;){var c=u.value;this._writeDictionaryBatch(c,i,o>0),o+=c.length}}catch(f){s.e(f)}finally{s.f()}}}}catch(f){n.e(f)}finally{n.f()}return this}}],[{key:"throughNode",value:function(t){throw new Error('"throughNode" not available in this environment')}},{key:"throughDOM",value:function(t,e){throw new Error('"throughDOM" not available in this environment')}}]),r}(vt,Symbol.asyncIterator),Cu=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,null,[{key:"writeAll",value:function(t,e){var r=new n(e);return Ot(t)?t.then((function(t){return r.writeAll(t)})):Lt(t)?Ru(r,t):ju(r,t)}}]),n}(Nu),Vu=function(t){ot(n,t);var e=yt(n);function n(){var t;return F(this,n),(t=e.call(this))._autoDestroy=!0,t}return E(n,[{key:"_writeSchema",value:function(t){return this._writeMagic()._writePadding(2)}},{key:"_writeFooter",value:function(t){var e=Ka.encode(new Ka(t,an.V4,this._recordBatchBlocks,this._dictionaryBlocks));return ze(ut(n.prototype),"_writeFooter",this).call(this,t)._write(e)._write(Int32Array.of(e.byteLength))._writeMagic()}}],[{key:"writeAll",value:function(t){var e=new n;return Ot(t)?t.then((function(t){return e.writeAll(t)})):Lt(t)?Ru(e,t):ju(e,t)}}]),n}(Nu);function ju(t,e){var n=e;e instanceof Ec&&(n=e.chunks,t.reset(void 0,e.schema));var r,i=O(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;t.write(a)}}catch(o){i.e(o)}finally{i.f()}return t.finish()}function Ru(t,e){return Pu.apply(this,arguments)}function Pu(){return(Pu=L(R.mark((function t(e,n){var r,i,a,o,u,s;return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=!1,i=!1,t.prev=2,o=P(n);case 4:return t.next=6,o.next();case 6:if(!(r=!(u=t.sent).done)){t.next=12;break}s=u.value,e.write(s);case 9:r=!1,t.next=4;break;case 12:t.next=18;break;case 14:t.prev=14,t.t0=t.catch(2),i=!0,a=t.t0;case 18:if(t.prev=18,t.prev=19,!r||null==o.return){t.next=23;break}return t.next=23,o.return();case 23:if(t.prev=23,!i){t.next=26;break}throw a;case 26:return t.finish(23);case 27:return t.finish(18);case 28:return t.abrupt("return",e.finish());case 29:case"end":return t.stop()}}),t,null,[[2,14,18,28],[19,,23,27]])})))).apply(this,arguments)}var zu=new Uint8Array(0),Yu=function(t){return[zu,zu,new Uint8Array(t),zu]};function Wu(t,e){for(var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.reduce((function(t,e){return Math.max(t,e.length)}),0),a=-1,o=e.length,u=vn(t.fields),s=[],c=(i+63&-64)>>3;++a0;){for(u=Number.POSITIVE_INFINITY,s=-1;++s0&&(i[o++]=[u,f.slice()]))}return[t=new ua(r,t.metadata),i.map((function(e){return zr(Uc,[t].concat(vn(e)))}))]}(t,e.map((function(t){return t instanceof Wi?t.chunks.map((function(t){return t.data})):[t.data]})))}function Ku(t,e,n,r,i){for(var a,o,u=0,s=-1,c=r.length,f=(e+63&-64)>>3;++s=e?u===e?n[s]=a:(n[s]=a.slice(0,e),a=a.slice(e,u-e),i.numBatches=Math.max(i.numBatches,r[s].unshift(a))):((o=t[s]).nullable||(t[s]=o.clone({nullable:!0})),n[s]=a?a._changeLengthAndBackfillNullBitmap(e):yr.new(o.type,0,e,e,Yu(f)));return n}function Gu(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},a=Object.keys(t);for(r=0;r=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var qu=function(t,e){ot(r,t);var n=yt(r);function r(t,e){var i;return F(this,r),(i=n.call(this))._children=e,i.numChildren=t.childData.length,i._bindDataAccessors(i.data=t),i}return E(r,[{key:"type",get:function(){return this.data.type}},{key:"typeId",get:function(){return this.data.typeId}},{key:"length",get:function(){return this.data.length}},{key:"offset",get:function(){return this.data.offset}},{key:"stride",get:function(){return this.data.stride}},{key:"nullCount",get:function(){return this.data.nullCount}},{key:"byteLength",get:function(){return this.data.byteLength}},{key:"VectorName",get:function(){return"".concat(Je[this.typeId],"Vector")}},{key:"ArrayType",get:function(){return this.type.ArrayType}},{key:"values",get:function(){return this.data.values}},{key:"typeIds",get:function(){return this.data.typeIds}},{key:"nullBitmap",get:function(){return this.data.nullBitmap}},{key:"valueOffsets",get:function(){return this.data.valueOffsets}},{key:e,get:function(){return"".concat(this.VectorName,"<").concat(this.type[Symbol.toStringTag],">")}},{key:"clone",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._children;return qe.new(t,e)}},{key:"concat",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n0){var e=this.offset+t;return 0!==(this.nullBitmap[e>>3]&1<=this.numChildren?null:(this._children||(this._children=[]))[t]||(this._children[t]=qe.new(this.data.childData[t]))}},{key:"toJSON",value:function(){return vn(this)}},{key:"_sliceInternal",value:function(t,e,n){return t.clone(t.data.slice(e,n-e),null)}},{key:"_bindDataAccessors",value:function(t){}}]),r}(qe,Symbol.toStringTag);qu.prototype[Symbol.isConcatSpreadable]=!0;var Ju=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,[{key:"asUtf8",value:function(){return qe.new(this.data.clone(new Gn))}}]),n}(qu),Zu=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,null,[{key:"from",value:function(t){return Mc((function(){return new qn}),t)}}]),n}(qu),Qu=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,null,[{key:"from",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n>>0)},Js=function(t){return new Date(t)},Zs=function(t,e,n){var r=e[n],i=e[n+1];return null!=r&&null!=i?t.subarray(r,i):null},Qs=function(t,e){return function(t,e){return Js(function(t,e){return 864e5*t[e]}(t,e))}(t.values,e)},Xs=function(t,e){return function(t,e){return Js(qs(t,e))}(t.values,2*e)},tc=function(t,e){var n=t.stride;return t.values[n*e]},ec=function(t,e){var n=t.stride;return Nr(t.values[n*e])},nc=function(t,e){var n=t.stride,r=t.values,i=t.type;return Xr.new(r.subarray(n*e,n*(e+1)),i.isSigned)},rc=function(t,e){var n=t.values;return 1e3*qs(n,2*e)},ic=function(t,e){var n=t.values;return qs(n,2*e)},ac=function(t,e){return function(t,e){return t[e+1]/1e3*4294967296+(t[e]>>>0)/1e3}(t.values,2*e)},oc=function(t,e){return function(t,e){return t[e+1]/1e6*4294967296+(t[e]>>>0)/1e6}(t.values,2*e)},uc=function(t,e){return t.values[t.stride*e]},sc=function(t,e){return t.values[t.stride*e]},cc=function(t,e){var n=t.values;return Xr.signed(n.subarray(2*e,2*(e+1)))},fc=function(t,e){var n=t.values;return Xr.signed(n.subarray(2*e,2*(e+1)))},lc=function(t,e){var n=t.typeIdToChildIndex[t.typeIds[e]],r=t.getChildAt(n);return r?r.get(t.valueOffsets[e]):null},hc=function(t,e){var n=t.typeIdToChildIndex[t.typeIds[e]],r=t.getChildAt(n);return r?r.get(e):null},yc=function(t,e){return t.values.subarray(2*e,2*(e+1))},pc=function(t,e){var n=t.values[e],r=new Int32Array(2);return r[0]=n/12|0,r[1]=n%12|0,r};Gs.prototype.visitNull=function(t,e){return null},Gs.prototype.visitBool=function(t,e){var n=t.offset+e;return 0!==(t.values[n>>3]&1<0?0:-1},vc.prototype.visitBool=bc,vc.prototype.visitInt=bc,vc.prototype.visitInt8=bc,vc.prototype.visitInt16=bc,vc.prototype.visitInt32=bc,vc.prototype.visitInt64=bc,vc.prototype.visitUint8=bc,vc.prototype.visitUint16=bc,vc.prototype.visitUint32=bc,vc.prototype.visitUint64=bc,vc.prototype.visitFloat=bc,vc.prototype.visitFloat16=bc,vc.prototype.visitFloat32=bc,vc.prototype.visitFloat64=bc,vc.prototype.visitUtf8=bc,vc.prototype.visitBinary=bc,vc.prototype.visitFixedSizeBinary=bc,vc.prototype.visitDate=bc,vc.prototype.visitDateDay=bc,vc.prototype.visitDateMillisecond=bc,vc.prototype.visitTimestamp=bc,vc.prototype.visitTimestampSecond=bc,vc.prototype.visitTimestampMillisecond=bc,vc.prototype.visitTimestampMicrosecond=bc,vc.prototype.visitTimestampNanosecond=bc,vc.prototype.visitTime=bc,vc.prototype.visitTimeSecond=bc,vc.prototype.visitTimeMillisecond=bc,vc.prototype.visitTimeMicrosecond=bc,vc.prototype.visitTimeNanosecond=bc,vc.prototype.visitDecimal=bc,vc.prototype.visitList=bc,vc.prototype.visitStruct=bc,vc.prototype.visitUnion=bc,vc.prototype.visitDenseUnion=gc,vc.prototype.visitSparseUnion=gc,vc.prototype.visitDictionary=bc,vc.prototype.visitInterval=bc,vc.prototype.visitIntervalDayTime=bc,vc.prototype.visitIntervalYearMonth=bc,vc.prototype.visitFixedSizeList=bc,vc.prototype.visitMap=bc;var mc=new vc,kc=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n)}(bn);function wc(t){if(t.nullCount>0)return function(t){var e=dc.getVisitFn(t);return hn(t.nullBitmap,t.offset,t.length,t,(function(t,n,r,i){return 0!==(r&1<0)?t.values.subarray(0,r)[Symbol.iterator]():R.mark((function e(n){var i;return R.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=-1;case 1:if(!(++i1?e-1:0),r=1;r0&&(this.get=(e=this.get,function(t){return this.isValid(t)?e.call(this,t):null}),this.set=function(t){return function(e,n){cn(this.nullBitmap,this.offset+e,!(null===n||void 0===n))&&t.call(this,e,n)}}(this.set));var e},Object.keys(Je).map((function(t){return Je[t]})).filter((function(t){return"number"===typeof t})).filter((function(t){return t!==Je.NONE})).forEach((function(t){var e,n=Lc.visit(t);n.prototype.get=(e=dc.getVisitFn(t),function(t){return e(this,t)}),n.prototype.set=Ks(ja.getVisitFn(t)),n.prototype.indexOf=Ks(mc.getVisitFn(t)),n.prototype.toArray=$s(xc.getVisitFn(t)),n.prototype.getByteWidth=function(t){return function(){return t(this.type)}}(Oc.getVisitFn(t)),n.prototype[Symbol.iterator]=$s(_c.getVisitFn(t))}));var Ec=function(t){ot(n,t);var e=yt(n);function n(){var t;F(this,n);for(var r=null,i=arguments.length,a=new Array(i),o=0;o0&&void 0!==arguments[0]?arguments[0]:this._chunks;return new n(this._schema,t)}},{key:"getColumn",value:function(t){return this.getColumnAt(this.getColumnIndex(t))}},{key:"getColumnAt",value:function(t){return this.getChildAt(t)}},{key:"getColumnIndex",value:function(t){return this._schema.fields.findIndex((function(e){return e.name===t}))}},{key:"getChildAt",value:function(t){if(t<0||t>=this.numChildren)return null;var e,n,r=this._schema.fields,i=this._children||(this._children=[]);if(n=i[t])return n;if(e=r[t]){var a=this._chunks.map((function(e){return e.getChildAt(t)})).filter((function(t){return null!=t}));if(a.length>0)return i[t]=new Gi(e,a)}return null}},{key:"serialize",value:function(){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=t?Cu:Vu;return e.writeAll(this).toUint8Array(!0)}},{key:"count",value:function(){return this._length}},{key:"select",value:function(){for(var t=this._schema.fields.reduce((function(t,e,n){return t.set(e.name,n)}),new Map),e=arguments.length,n=new Array(e),r=0;r-1}))))}},{key:"selectAt",value:function(){for(var t,e=arguments.length,r=new Array(e),i=0;i3&&void 0!==arguments[3]?arguments[3]:u[r];return void 0===a?e.getColumnAt(r):t.getColumnAt(a)}))),vn(o.map((function(e){return t.getColumnAt(e)})))).filter(Boolean);return zr(n,vn($u(s,c)))}}],[{key:"empty",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ua([]);return new n(t,[])}},{key:"from",value:function(t){if(!t)return n.empty();if("object"===typeof t){var e=Dt(t.values)?function(t){if(t.type instanceof ir)return Ec.fromStruct(Ls.from(t));return null}(t):Lt(t.values)?function(t){if(t.type instanceof ir)return Ls.from(t).then((function(t){return Ec.fromStruct(t)}));return null}(t):null;if(null!==e)return e}var r=jc.from(t);return Ot(r)?L(R.mark((function t(){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=n,t.next=3,r;case 3:return t.t1=t.sent,t.next=6,t.t0.from.call(t.t0,t.t1);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})))():r.isSync()&&(r=r.open())?r.schema?new n(r.schema,vn(r)):n.empty():function(){var t=L(R.mark((function t(e){var r,i,a,o,u,s,c,f,l;return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:if(r=t.sent,i=r.schema,a=[],!i){t.next=35;break}o=!1,u=!1,t.prev=8,c=P(r);case 10:return t.next=12,c.next();case 12:if(!(o=!(f=t.sent).done)){t.next=18;break}l=f.value,a.push(l);case 15:o=!1,t.next=10;break;case 18:t.next=24;break;case 20:t.prev=20,t.t0=t.catch(8),u=!0,s=t.t0;case 24:if(t.prev=24,t.prev=25,!o||null==c.return){t.next=29;break}return t.next=29,c.return();case 29:if(t.prev=29,!u){t.next=32;break}throw s;case 32:return t.finish(29);case 33:return t.finish(24);case 34:return t.abrupt("return",new n(i,a));case 35:return t.abrupt("return",n.empty());case 36:case"end":return t.stop()}}),t,null,[[8,20,24,34],[25,,29,33]])})));return function(e){return t.apply(this,arguments)}}()(r.open())}},{key:"fromAsync",value:function(){var t=L(R.mark((function t(e){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.from(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},{key:"fromStruct",value:function(t){return n.new(t.data.childData,t.type.children)}},{key:"new",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:this._children;return new n(this._schema,t,e)}},{key:"concat",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r-1}))))}},{key:"selectAt",value:function(){for(var t,e=this,r=arguments.length,i=new Array(r),a=0;a0&&this.dictionaries.set(e.id,n),this}}],[{key:"collect",value:function(t){return(new n).visit(t.data,new ir(t.schema.fields)).dictionaries}}]),n}(bn),Vc=R.mark(Zc),jc=function(t,e,n){ot(i,t);var r=yt(i);function i(t){var e;return F(this,i),(e=r.call(this))._impl=t,e}return E(i,[{key:"closed",get:function(){return this._impl.closed}},{key:"schema",get:function(){return this._impl.schema}},{key:"autoDestroy",get:function(){return this._impl.autoDestroy}},{key:"dictionaries",get:function(){return this._impl.dictionaries}},{key:"numDictionaries",get:function(){return this._impl.numDictionaries}},{key:"numRecordBatches",get:function(){return this._impl.numRecordBatches}},{key:"footer",get:function(){return this._impl.isFile()?this._impl.footer:null}},{key:"isSync",value:function(){return this._impl.isSync()}},{key:"isAsync",value:function(){return this._impl.isAsync()}},{key:"isFile",value:function(){return this._impl.isFile()}},{key:"isStream",value:function(){return this._impl.isStream()}},{key:"next",value:function(){return this._impl.next()}},{key:"throw",value:function(t){return this._impl.throw(t)}},{key:"return",value:function(t){return this._impl.return(t)}},{key:"cancel",value:function(){return this._impl.cancel()}},{key:"reset",value:function(t){return this._impl.reset(t),this._DOMStream=void 0,this._nodeStream=void 0,this}},{key:"open",value:function(t){var e=this,n=this._impl.open(t);return Ot(n)?n.then((function(){return e})):this}},{key:"readRecordBatch",value:function(t){return this._impl.isFile()?this._impl.readRecordBatch(t):null}},{key:e,value:function(){return this._impl[Symbol.iterator]()}},{key:n,value:function(){return this._impl[Symbol.asyncIterator]()}},{key:"toDOMStream",value:function(){var t=this;return Be.toDOMStream(this.isSync()?Ve({},Symbol.iterator,(function(){return t})):Ve({},Symbol.asyncIterator,(function(){return t})))}},{key:"toNodeStream",value:function(){var t=this;return Be.toNodeStream(this.isSync()?Ve({},Symbol.iterator,(function(){return t})):Ve({},Symbol.asyncIterator,(function(){return t})),{objectMode:!0})}}],[{key:"throughNode",value:function(t){throw new Error('"throughNode" not available in this environment')}},{key:"throughDOM",value:function(t,e){throw new Error('"throughDOM" not available in this environment')}},{key:"from",value:function(t){return t instanceof i?t:Ft(t)?function(t){return new Rc(new qc(t))}(t):Et(t)?function(t){return ef.apply(this,arguments)}(t):Ot(t)?L(R.mark((function e(){return R.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=i,e.next=3,t;case 3:return e.t1=e.sent,e.next=6,e.t0.from.call(e.t0,e.t1);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})))():Ut(t)||Ct(t)||jt(t)||Lt(t)?function(t){return tf.apply(this,arguments)}(new Qa(t)):function(t){var e=t.peek(Tu+7&-8);return e&&e.byteLength>=4?Au(e)?new zc(new Kc(t.read())):new Rc(new Hc(t)):new Rc(new Hc(R.mark((function t(){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))()))}(new Za(t))}},{key:"readAll",value:function(t){return t instanceof i?t.isSync()?Zc(t):Qc(t):Ft(t)||ArrayBuffer.isView(t)||Dt(t)||Mt(t)?Zc(t):Qc(t)}}]),i}(vt,Symbol.iterator,Symbol.asyncIterator),Rc=function(t,e,n){ot(i,t);var r=yt(i);function i(t){var e;return F(this,i),(e=r.call(this,t))._impl=t,e}return E(i,[{key:e,value:function(){return this._impl[Symbol.iterator]()}},{key:n,value:function(){var t=this;return j(R.mark((function e(){return R.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(Y(P(t[Symbol.iterator]()),C),"t0",1);case 1:case"end":return e.stop()}}),e)})))()}}]),i}(jc,Symbol.iterator,Symbol.asyncIterator),Pc=function(t,e,n){ot(i,t);var r=yt(i);function i(t){var e;return F(this,i),(e=r.call(this,t))._impl=t,e}return E(i,[{key:e,value:function(){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}},{key:n,value:function(){return this._impl[Symbol.asyncIterator]()}}]),i}(jc,Symbol.iterator,Symbol.asyncIterator),zc=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this,t))._impl=t,r}return E(n)}(Rc),Yc=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this,t))._impl=t,r}return E(n)}(Pc),Wc=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map;F(this,t),this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}return E(t,[{key:"numDictionaries",get:function(){return this._dictionaryIndex}},{key:"numRecordBatches",get:function(){return this._recordBatchIndex}},{key:"isSync",value:function(){return!1}},{key:"isAsync",value:function(){return!1}},{key:"isFile",value:function(){return!1}},{key:"isStream",value:function(){return!1}},{key:"reset",value:function(t){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=t,this.dictionaries=new Map,this}},{key:"_loadRecordBatch",value:function(t,e){return new Uc(this.schema,t.length,this._loadVectors(t,e,this.schema.fields))}},{key:"_loadDictionaryBatch",value:function(t,e){var n=t.id,r=t.isDelta,i=t.data,a=this.dictionaries,o=this.schema,u=a.get(n);if(r||!u){var s=o.dictionaries.get(n);return u&&r?u.concat(qe.new(this._loadVectors(i,e,[s])[0])):qe.new(this._loadVectors(i,e,[s])[0])}return u}},{key:"_loadVectors",value:function(t,e,n){return new co(e,t.nodes,t.buffers,this.dictionaries).visitMany(n)}}]),t}(),Hc=function(t,e){ot(r,t);var n=yt(r);function r(t,e){var i;return F(this,r),(i=n.call(this,e))._reader=Ft(t)?new wu(i._handle=t):new mu(i._handle=t),i}return E(r,[{key:"isSync",value:function(){return!0}},{key:"isStream",value:function(){return!0}},{key:e,value:function(){return this}},{key:"cancel",value:function(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}},{key:"open",value:function(t){return this.closed||(this.autoDestroy=Jc(this,t),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}},{key:"throw",value:function(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(t):pt}},{key:"return",value:function(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):pt}},{key:"next",value:function(){if(this.closed)return pt;for(var t,e=this._reader;t=this._readNextMessageAndValidate();)if(t.isSchema())this.reset(t.header());else{if(t.isRecordBatch()){this._recordBatchIndex++;var n=t.header(),r=e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(n,r)}}if(t.isDictionaryBatch()){this._dictionaryIndex++;var i=t.header(),a=e.readMessageBody(t.bodyLength),o=this._loadDictionaryBatch(i,a);this.dictionaries.set(i.id,o)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new Nc(this.schema)}):this.return()}},{key:"_readNextMessageAndValidate",value:function(t){return this._reader.readMessage(t)}}]),r}(Wc,Symbol.iterator),$c=function(t,e){ot(r,t);var n=yt(r);function r(t,e){var i;return F(this,r),(i=n.call(this,e))._reader=new ku(i._handle=t),i}return E(r,[{key:"isAsync",value:function(){return!0}},{key:"isStream",value:function(){return!0}},{key:e,value:function(){return this}},{key:"cancel",value:function(){var t=L(R.mark((function t(){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.closed||!(this.closed=!0)){t.next=5;break}return t.next=3,this.reset()._reader.return();case 3:this._reader=null,this.dictionaries=null;case 5:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"open",value:function(){var t=L(R.mark((function t(e){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.closed){t.next=10;break}if(this.autoDestroy=Jc(this,e),t.t0=this.schema,t.t0){t.next=7;break}return t.next=6,this._reader.readSchema();case 6:t.t0=this.schema=t.sent;case 7:if(t.t0){t.next=10;break}return t.next=10,this.cancel();case 10:return t.abrupt("return",this);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"throw",value:function(){var t=L(R.mark((function t(e){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.closed||!this.autoDestroy||!(this.closed=!0)){t.next=4;break}return t.next=3,this.reset()._reader.throw(e);case 3:return t.abrupt("return",t.sent);case 4:return t.abrupt("return",pt);case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"return",value:function(){var t=L(R.mark((function t(e){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.closed||!this.autoDestroy||!(this.closed=!0)){t.next=4;break}return t.next=3,this.reset()._reader.return(e);case 3:return t.abrupt("return",t.sent);case 4:return t.abrupt("return",pt);case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"next",value:function(){var t=L(R.mark((function t(){var e,n,r,i,a,o,u,s;return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.closed){t.next=2;break}return t.abrupt("return",pt);case 2:n=this._reader;case 3:return t.next=5,this._readNextMessageAndValidate();case 5:if(!(e=t.sent)){t.next=31;break}if(!e.isSchema()){t.next=11;break}return t.next=9,this.reset(e.header());case 9:t.next=29;break;case 11:if(!e.isRecordBatch()){t.next=21;break}return this._recordBatchIndex++,r=e.header(),t.next=16,n.readMessageBody(e.bodyLength);case 16:return i=t.sent,a=this._loadRecordBatch(r,i),t.abrupt("return",{done:!1,value:a});case 21:if(!e.isDictionaryBatch()){t.next=29;break}return this._dictionaryIndex++,o=e.header(),t.next=26,n.readMessageBody(e.bodyLength);case 26:u=t.sent,s=this._loadDictionaryBatch(o,u),this.dictionaries.set(o.id,s);case 29:t.next=3;break;case 31:if(!this.schema||0!==this._recordBatchIndex){t.next=34;break}return this._recordBatchIndex++,t.abrupt("return",{done:!1,value:new Nc(this.schema)});case 34:return t.next=36,this.return();case 36:return t.abrupt("return",t.sent);case 37:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"_readNextMessageAndValidate",value:function(){var t=L(R.mark((function t(e){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._reader.readMessage(e);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()}]),r}(Wc,Symbol.asyncIterator),Kc=function(t){ot(n,t);var e=yt(n);function n(t,r){return F(this,n),e.call(this,t instanceof eo?t:new eo(t),r)}return E(n,[{key:"footer",get:function(){return this._footer}},{key:"numDictionaries",get:function(){return this._footer?this._footer.numDictionaries:0}},{key:"numRecordBatches",get:function(){return this._footer?this._footer.numRecordBatches:0}},{key:"isSync",value:function(){return!0}},{key:"isFile",value:function(){return!0}},{key:"open",value:function(t){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;var e,r=O(this._footer.dictionaryBatches());try{for(r.s();!(e=r.n()).done;){e.value&&this._readDictionaryBatch(this._dictionaryIndex++)}}catch(i){r.e(i)}finally{r.f()}}return ze(ut(n.prototype),"open",this).call(this,t)}},{key:"readRecordBatch",value:function(t){if(this.closed)return null;this._footer||this.open();var e=this._footer&&this._footer.getRecordBatch(t);if(e&&this._handle.seek(e.offset)){var n=this._reader.readMessage(rn.RecordBatch);if(n&&n.isRecordBatch()){var r=n.header(),i=this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(r,i)}}return null}},{key:"_readDictionaryBatch",value:function(t){var e=this._footer&&this._footer.getDictionaryBatch(t);if(e&&this._handle.seek(e.offset)){var n=this._reader.readMessage(rn.DictionaryBatch);if(n&&n.isDictionaryBatch()){var r=n.header(),i=this._reader.readMessageBody(n.bodyLength),a=this._loadDictionaryBatch(r,i);this.dictionaries.set(r.id,a)}}}},{key:"_readFooter",value:function(){var t=this._handle,e=t.size-Bu,n=t.readInt32(e),r=t.readAt(e-n,n);return Ka.decode(r)}},{key:"_readNextMessageAndValidate",value:function(t){if(this._footer||this.open(),this._footer&&this._recordBatchIndex1?r-1:0),a=1;a=4)){t.next=18;break}if(Au(n)){t.next=8;break}t.t1=new Pc(new $c(e)),t.next=15;break;case 8:return t.t2=zc,t.t3=Kc,t.next=12,e.read();case 12:t.t4=t.sent,t.t5=new t.t3(t.t4),t.t1=new t.t2(t.t5);case 15:t.t0=t.t1,t.next=19;break;case 18:t.t0=new Pc(new $c(j(R.mark((function t(){return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})))()));case 19:return t.abrupt("return",t.t0);case 20:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ef(){return(ef=L(R.mark((function t(e){var n,r,i;return R.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.stat();case 2:if(n=t.sent,r=n.size,i=new no(e,r),!(r>=Ou)){t.next=12;break}return t.t0=Au,t.next=9,i.readAt(0,Tu+7&-8);case 9:if(t.t1=t.sent,!(0,t.t0)(t.t1)){t.next=12;break}return t.abrupt("return",new Yc(new Gc(i)));case 12:return t.abrupt("return",new Pc(new $c(i)));case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var nf=["readableStrategy","writableStrategy","queueingStrategy"];var rf=function(){function t(e){var n,r,i=this;F(this,t),this._numChunks=0,this._finished=!1,this._bufferedSize=0;var a=e.readableStrategy,o=e.writableStrategy,u=e.queueingStrategy,s=void 0===u?"count":u,c=Gu(e,nf);this._controller=null,this._builder=Ir.new(c),this._getSize="bytes"!==s?af:of;var f=Re({},a).highWaterMark,l=void 0===f?"bytes"===s?Math.pow(2,14):1e3:f,h=Re({},o).highWaterMark,y=void 0===h?"bytes"===s?Math.pow(2,14):1e3:h;this.readable=new ReadableStream((Ve(n={},"cancel",(function(){i._builder.clear()})),Ve(n,"pull",(function(t){i._maybeFlush(i._builder,i._controller=t)})),Ve(n,"start",(function(t){i._maybeFlush(i._builder,i._controller=t)})),n),{highWaterMark:l,size:"bytes"!==s?af:of}),this.writable=new WritableStream((Ve(r={},"abort",(function(){i._builder.clear()})),Ve(r,"write",(function(){i._maybeFlush(i._builder,i._controller)})),Ve(r,"close",(function(){i._maybeFlush(i._builder.finish(),i._controller)})),r),{highWaterMark:y,size:function(t){return i._writeValueAndReturnChunkSize(t)}})}return E(t,[{key:"_writeValueAndReturnChunkSize",value:function(t){var e=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(t)),this._bufferedSize-e}},{key:"_maybeFlush",value:function(t,e){null!==e&&(this._bufferedSize>=e.desiredSize&&++this._numChunks&&this._enqueue(e,t.toVector()),t.finished&&((t.length>0||0===this._numChunks)&&++this._numChunks&&this._enqueue(e,t.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(e,null)))}},{key:"_enqueue",value:function(t,e){this._bufferedSize=0,this._controller=null,null===e?t.close():t.enqueue(e)}}]),t}(),af=function(t){return t.length},of=function(t){return t.byteLength};var uf=function(){function t(){F(this,t)}return E(t,[{key:"eq",value:function(e){return e instanceof t||(e=new sf(e)),new df(this,e)}},{key:"le",value:function(e){return e instanceof t||(e=new sf(e)),new vf(this,e)}},{key:"ge",value:function(e){return e instanceof t||(e=new sf(e)),new bf(this,e)}},{key:"lt",value:function(t){return new gf(this.ge(t))}},{key:"gt",value:function(t){return new gf(this.le(t))}},{key:"ne",value:function(t){return new gf(this.eq(t))}}]),t}(),sf=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this)).v=t,r}return E(n)}(uf),cf=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this)).name=t,r}return E(n,[{key:"bind",value:function(t){if(!this.colidx){this.colidx=-1;for(var e=t.schema.fields,n=-1;++n=n.v;return function(){return r}}},{key:"_bindColCol",value:function(t,e,n){var r=e.bind(t),i=n.bind(t);return function(t,e){return r(t,e)>=i(t,e)}}},{key:"_bindColLit",value:function(t,e,n){var r=e.bind(t);return function(t,e){return r(t,e)>=n.v}}},{key:"_bindLitCol",value:function(t,e,n){var r=n.bind(t);return function(t,n){return e.v>=r(t,n)}}}]),n}(lf),gf=function(t){ot(n,t);var e=yt(n);function n(t){var r;return F(this,n),(r=e.call(this)).child=t,r}return E(n,[{key:"bind",value:function(t){var e=this.child.bind(t);return function(t,n){return!e(t,n)}}}]),n}(ff);Ec.prototype.countBy=function(t){return new mf(this.chunks).countBy(t)},Ec.prototype.scan=function(t,e){return new mf(this.chunks).scan(t,e)},Ec.prototype.scanReverse=function(t,e){return new mf(this.chunks).scanReverse(t,e)},Ec.prototype.filter=function(t){return new mf(this.chunks).filter(t)};var mf=function(t){ot(n,t);var e=yt(n);function n(){return F(this,n),e.apply(this,arguments)}return E(n,[{key:"filter",value:function(t){return new wf(this.chunks,t)}},{key:"scan",value:function(t,e){for(var n=this.chunks,r=n.length,i=-1;++i=0;){var i=n[r];e&&e(i);for(var a=i.length;--a>=0;)t(a,i)}}},{key:"countBy",value:function(t){var e=this.chunks,n=e.length,r="string"===typeof t?new cf(t):t;r.bind(e[n-1]);var i=r.vector;if(!Fn.isDictionary(i.type))throw new Error("countBy currently only supports dictionary-encoded columns");for(var a=Math.ceil(Math.log(i.length)/Math.log(256)),o=new(4==a?Uint32Array:a>=2?Uint16Array:Uint8Array)(i.dictionary.length),u=-1;++u=0;)for(var i=n[r],a=this._predicate.bind(i),o=!1,u=i.length;--u>=0;)a(u,i)&&(e&&!o&&(e(i),o=!0),t(u,i))}},{key:"count",value:function(){for(var t=0,e=this._chunks,n=e.length,r=-1;++r=2?Uint16Array:Uint8Array)(i.dictionary.length),u=-1;++u=i.headerRows&&e=i.headerColumns;if(n){var o=["blank"];return e>0&&o.push("level"+t),{type:"blank",classNames:o.join(" "),content:""}}if(a)return{type:"columns",classNames:(o=["col_heading","level"+t,"col"+(s=e-i.headerColumns)]).join(" "),content:i.getContent(i.columnsTable,s,t)};if(r){o=["row_heading","level"+e,"row"+(u=t-i.headerRows)];return{type:"index",id:"T_"+i.uuid+"level"+e+"_row"+u,classNames:o.join(" "),content:i.getContent(i.indexTable,u,e)}}o=["data","row"+(u=t-i.headerRows),"col"+(s=e-i.headerColumns)];var u,s,c=i.styler?i.getContent(i.styler.displayValuesTable,u,s):i.getContent(i.dataTable,u,s);return{type:"data",id:"T_"+i.uuid+"row"+u+"_col"+s,classNames:o.join(" "),content:c}},this.getContent=function(t,e,n){var r=t.getColumnAt(n);return null===r?"":i.getColumnTypeId(t,n)===Je.Timestamp?i.nanosToDate(r.get(e)):r.get(e)},this.dataTable=Ec.from(t),this.indexTable=Ec.from(e),this.columnsTable=Ec.from(n),this.styler=r?{caption:r.caption,displayValuesTable:Ec.from(r.displayValues),styles:r.styles,uuid:r.uuid}:void 0}return Object.defineProperty(t.prototype,"rows",{get:function(){return this.indexTable.length+this.columnsTable.numCols},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columns",{get:function(){return this.indexTable.numCols+this.columnsTable.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"headerRows",{get:function(){return this.rows-this.dataRows},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"headerColumns",{get:function(){return this.columns-this.dataColumns},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataRows",{get:function(){return this.dataTable.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataColumns",{get:function(){return this.dataTable.numCols},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"uuid",{get:function(){return this.styler&&this.styler.uuid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"caption",{get:function(){return this.styler&&this.styler.caption},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"styles",{get:function(){return this.styler&&this.styler.styles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"table",{get:function(){return this.dataTable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.indexTable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnTable",{get:function(){return this.columnsTable},enumerable:!0,configurable:!0}),t.prototype.serialize=function(){return{data:this.dataTable.serialize(),index:this.indexTable.serialize(),columns:this.columnsTable.serialize()}},t.prototype.getColumnTypeId=function(t,e){return t.schema.fields[e].type.typeId},t.prototype.nanosToDate=function(t){return new Date(t/1e6)},t}(),Sf=function(){return Sf=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0?t.argsDataframeToObject(e.dfs):{};n=Sf(Sf({},n),r);var i=Boolean(e.disabled),a=e.theme;a&&Af(a);var o={disabled:i,args:n,theme:a},u=new CustomEvent(t.RENDER_EVENT,{detail:o});t.events.dispatchEvent(u)},t.argsDataframeToObject=function(e){var n=e.map((function(e){var n=e.key,r=e.value;return[n,t.toArrowTable(r)]}));return Object.fromEntries(n)},t.toArrowTable=function(t){var e=t.data,n=e.data,r=e.index,i=e.columns,a=e.styler;return new If(n,r,i,a)},t.sendBackMsg=function(t,e){window.parent.postMessage(Sf({isStreamlitMessage:!0,type:t},e),"*")},t}(),Af=function(t){var e=document.createElement("style");document.head.appendChild(e),e.innerHTML="\n :root {\n --primary-color: "+t.primaryColor+";\n --background-color: "+t.backgroundColor+";\n --secondary-background-color: "+t.secondaryBackgroundColor+";\n --text-color: "+t.textColor+";\n --font: "+t.font+";\n }\n\n body {\n background-color: var(--background-color);\n color: var(--text-color);\n }\n "};var Tf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Tf(e,t),e.prototype.componentDidMount=function(){xf.setFrameHeight()},e.prototype.componentDidUpdate=function(){xf.setFrameHeight()}}(f.a.PureComponent)},function(t,e,n){"use strict";var r=n(6),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function s(t){return r.isMemo(t)?o:u[t.$$typeof]||i}u[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[r.Memo]=o;var c=Object.defineProperty,f=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,y=Object.getPrototypeOf,p=Object.prototype;t.exports=function t(e,n,r){if("string"!==typeof n){if(p){var i=y(n);i&&i!==p&&t(e,i,r)}var o=f(n);l&&(o=o.concat(l(n)));for(var u=s(e),d=s(n),v=0;vD.length&&D.push(t)}function M(t,e,n,r){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var u=!1;if(null===t)u=!0;else switch(i){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case a:case o:u=!0}}if(u)return n(r,t,""===e?"."+U(t,0):e),1;if(u=0,e=""===e?".":e+":",Array.isArray(t))for(var s=0;s=0;--a){var o=this.tryEntries[a],u=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=r}catch(i){"object"===typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}]]); +//# sourceMappingURL=2.422ca0c4.chunk.js.map \ No newline at end of file