diff --git "a/highlighted_text/build/static/js/2.ce130e37.chunk.js" "b/highlighted_text/build/static/js/2.ce130e37.chunk.js" --- "a/highlighted_text/build/static/js/2.ce130e37.chunk.js" +++ "b/highlighted_text/build/static/js/2.ce130e37.chunk.js" @@ -1,3 +1,3 @@ -/*! For license information please see 2.ce130e37.chunk.js.LICENSE.txt */ -(this.webpackJsonpstreamlit_component_template=this.webpackJsonpstreamlit_component_template||[]).push([[2],[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(15);function i(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){for(var e=new Array(arguments.length),t=0;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(u)throw a}}}}function D(e,t,n,r,i,a,o){try{var u=e[a](o),s=u.value}catch(c){return void n(c)}u.done?t(s):Promise.resolve(s).then(r,i)}function L(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){D(a,r,i,o,u,"next",e)}function u(e){D(a,r,i,o,u,"throw",e)}o(void 0)}))}}var F=n(0),C=n(1),M=n(8);function N(){N=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(I){s=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var a=t&&t.prototype instanceof h?t:h,o=Object.create(a.prototype),u=new x(i||[]);return r(o,"_invoke",{value:w(e,n,u)}),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(I){return{type:"throw",arg:I}}}e.wrap=c;var f={};function h(){}function d(){}function p(){}var y={};s(y,a,(function(){return this}));var v=Object.getPrototypeOf,b=v&&v(v(S([])));b&&b!==t&&n.call(b,a)&&(y=b);var m=p.prototype=h.prototype=Object.create(y);function g(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function i(r,a,o,u){var s=l(e[r],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==Object(M.a)(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,o,u)}),(function(e){i("throw",e,o,u)})):t.resolve(f).then((function(e){c.value=e,o(c)}),(function(e){return i("throw",e,o,u)}))}u(s.arg)}var a;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function w(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return T()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var u=_(o,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=l(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function _(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=l(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,f;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;j(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,u=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(u.push(r.value),u.length!==t);s=!0);}catch(l){c=!0,i=l}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}(e,t)||Object(A.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){this.v=e,this.k=t}function R(e){return new P(e,0)}function V(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,u=o instanceof P;Promise.resolve(u?o.v:o).then((function(n){if(u){var s="return"===t?"return":"next";if(!o.k||n.done)return r(s,n);n=e[s](n).value}i(a.done?"return":"normal",n)}),(function(e){r("throw",e)}))}catch(s){i("throw",s)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise((function(a,o){var u={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=u:(t=n=u,r(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}function z(e){return function(){return new V(e.apply(this,arguments))}}function W(e){var t={},n=!1;function r(t,r){return n=!0,{done:!1,value:new P(r=new Promise((function(n){n(e[t](r))})),1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return n?(n=!1,e):r("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(n)throw n=!1,e;return r("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return n?(n=!1,e):r("return",e)}),t}function Y(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new H(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function H(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return H=function(e){this.s=e,this.n=e.next},H.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new H(e)}V.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},V.prototype.next=function(e){return this._invoke("next",e)},V.prototype.throw=function(e){return this._invoke("throw",e)},V.prototype.return=function(e){return this._invoke("return",e)};var $={};function K(e,t,n){return t<=e&&e<=n}function Q(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}$.Offset,$.Table,$.SIZEOF_SHORT=2,$.SIZEOF_INT=4,$.FILE_IDENTIFIER_LENGTH=4,$.Encoding={UTF8_BYTES:1,UTF16_STRING:2},$.int32=new Int32Array(2),$.float32=new Float32Array($.int32.buffer),$.float64=new Float64Array($.int32.buffer),$.isLittleEndian=1===new Uint16Array(new Uint8Array([1,0]).buffer)[0],$.Long=function(e,t){this.low=0|e,this.high=0|t},$.Long.create=function(e,t){return 0==e&&0==t?$.Long.ZERO:new $.Long(e,t)},$.Long.prototype.toFloat64=function(){return(this.low>>>0)+4294967296*this.high},$.Long.prototype.equals=function(e){return this.low==e.low&&this.high==e.high},$.Long.ZERO=new $.Long(0,0),$.Builder=function(e){if(e)t=e;else var t=1024;this.bb=$.ByteBuffer.allocate(t),this.space=t,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},$.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},$.Builder.prototype.forceDefaults=function(e){this.force_defaults=e},$.Builder.prototype.dataBuffer=function(){return this.bb},$.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())},$.Builder.prototype.prep=function(e,t){e>this.minalign&&(this.minalign=e);for(var n=1+~(this.bb.capacity()-this.space+t)&e-1;this.space=0&&0==this.vtable[t];t--);for(var n=t+1;t>=0;t--)this.addInt16(0!=this.vtable[t]?e-this.vtable[t]:0);this.addInt16(e-this.object_start);var r=(n+2)*$.SIZEOF_SHORT;this.addInt16(r);var i=0,a=this.space;e:for(t=0;t=0;r--)this.writeInt8(n.charCodeAt(r))}this.prep(this.minalign,$.SIZEOF_INT),this.addOffset(e),this.bb.setPosition(this.space)},$.Builder.prototype.requiredField=function(e,t){var n=this.bb.capacity()-e,r=n-this.bb.readInt32(n);if(!(0!=this.bb.readInt16(r+t)))throw new Error("FlatBuffers: field "+t+" must be set")},$.Builder.prototype.startVector=function(e,t,n){this.notNested(),this.vector_num_elems=t,this.prep($.SIZEOF_INT,e*t),this.prep(n,e*t)},$.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()},$.Builder.prototype.createString=function(e){if(e instanceof Uint8Array)var t=e;else{t=[];for(var n=0;n=56320)r=i;else r=(i<<10)+e.charCodeAt(n++)+-56613888;r<128?t.push(r):(r<2048?t.push(r>>6&31|192):(r<65536?t.push(r>>12&15|224):t.push(r>>18&7|240,r>>12&63|128),t.push(r>>6&63|128)),t.push(63&r|128))}}this.addInt8(0),this.startVector(1,t.length,1),this.bb.setPosition(this.space-=t.length);n=0;for(var a=this.space,o=this.bb.bytes();n>24},$.ByteBuffer.prototype.readUint8=function(e){return this.bytes_[e]},$.ByteBuffer.prototype.readInt16=function(e){return this.readUint16(e)<<16>>16},$.ByteBuffer.prototype.readUint16=function(e){return this.bytes_[e]|this.bytes_[e+1]<<8},$.ByteBuffer.prototype.readInt32=function(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24},$.ByteBuffer.prototype.readUint32=function(e){return this.readInt32(e)>>>0},$.ByteBuffer.prototype.readInt64=function(e){return new $.Long(this.readInt32(e),this.readInt32(e+4))},$.ByteBuffer.prototype.readUint64=function(e){return new $.Long(this.readUint32(e),this.readUint32(e+4))},$.ByteBuffer.prototype.readFloat32=function(e){return $.int32[0]=this.readInt32(e),$.float32[0]},$.ByteBuffer.prototype.readFloat64=function(e){return $.int32[$.isLittleEndian?0:1]=this.readInt32(e),$.int32[$.isLittleEndian?1:0]=this.readInt32(e+4),$.float64[0]},$.ByteBuffer.prototype.writeInt8=function(e,t){this.bytes_[e]=t},$.ByteBuffer.prototype.writeUint8=function(e,t){this.bytes_[e]=t},$.ByteBuffer.prototype.writeInt16=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8},$.ByteBuffer.prototype.writeUint16=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8},$.ByteBuffer.prototype.writeInt32=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24},$.ByteBuffer.prototype.writeUint32=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24},$.ByteBuffer.prototype.writeInt64=function(e,t){this.writeInt32(e,t.low),this.writeInt32(e+4,t.high)},$.ByteBuffer.prototype.writeUint64=function(e,t){this.writeUint32(e,t.low),this.writeUint32(e+4,t.high)},$.ByteBuffer.prototype.writeFloat32=function(e,t){$.float32[0]=t,this.writeInt32(e,$.int32[0])},$.ByteBuffer.prototype.writeFloat64=function(e,t){$.float64[0]=t,this.writeInt32(e,$.int32[$.isLittleEndian?0:1]),this.writeInt32(e+4,$.int32[$.isLittleEndian?1:0])},$.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length>10),56320+(1023&a)))}return r},$.ByteBuffer.prototype.__indirect=function(e){return e+this.readInt32(e)},$.ByteBuffer.prototype.__vector=function(e){return e+this.readInt32(e)+$.SIZEOF_INT},$.ByteBuffer.prototype.__vector_len=function(e){return this.readInt32(e+this.readInt32(e))},$.ByteBuffer.prototype.__has_identifier=function(e){if(e.length!=$.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+$.FILE_IDENTIFIER_LENGTH);for(var t=0;t<$.FILE_IDENTIFIER_LENGTH;t++)if(e.charCodeAt(t)!=this.readInt8(this.position_+$.SIZEOF_INT+t))return!1;return!0},$.ByteBuffer.prototype.createLong=function(e,t){return $.Long.create(e,t)};function q(e){this.tokens=[].slice.call(e)}q.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var G=-1;function J(e,t){if(e)throw TypeError("Decoder error");return t||65533}var Z="utf-8";function X(e,t){if(!(this instanceof X))return new X(e,t);if((e=void 0!==e?String(e).toLowerCase():Z)!==Z)throw new Error("Encoding not supported. Only utf-8 is supported");t=Q(t),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(t.fatal),this._ignoreBOM=Boolean(t.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function ee(e,t){if(!(this instanceof ee))return new ee(e,t);if((e=void 0!==e?String(e).toLowerCase():Z)!==Z)throw new Error("Encoding not supported. Only utf-8 is supported");t=Q(t),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(t.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function te(e){var t=e.fatal,n=0,r=0,i=0,a=128,o=191;this.handler=function(e,u){if(-1===u&&0!==i)return i=0,J(t);if(-1===u)return G;if(0===i){if(K(u,0,127))return u;if(K(u,194,223))i=1,n=u-192;else if(K(u,224,239))224===u&&(a=160),237===u&&(o=159),i=2,n=u-224;else{if(!K(u,240,244))return J(t);240===u&&(a=144),244===u&&(o=143),i=3,n=u-240}return n<<=6*i,null}if(!K(u,a,o))return n=i=r=0,a=128,o=191,e.prepend(u),J(t);if(a=128,o=191,n+=u-128<<6*(i-(r+=1)),r!==i)return null;var s=n;return n=i=r=0,s}}function ne(e){e.fatal;this.handler=function(e,t){if(-1===t)return G;if(K(t,0,127))return t;var n,r;K(t,128,2047)?(n=1,r=192):K(t,2048,65535)?(n=2,r=224):K(t,65536,1114111)&&(n=3,r=240);for(var i=[(t>>6*n)+r];n>0;){var a=t>>6*(n-1);i.push(128|63&a),n-=1}return i}}X.prototype={decode:function(e,t){var n;n="object"===typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"===typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=Q(t),this._streaming||(this._decoder=new te({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(t.stream);for(var r,i=new q(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(e){for(var t="",n=0;n>10),56320+(1023&r)))}return t}(a)}},ee.prototype={encode:function(e,t){e=e?String(e):"",t=Q(t),this._streaming||(this._encoder=new ne(this._options)),this._streaming=Boolean(t.stream);for(var n,r=[],i=new q(function(e){for(var t=String(e),n=t.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=e.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}(e));!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 re="function"===typeof Buffer?Buffer:null,ie="function"===typeof TextDecoder&&"function"===typeof TextEncoder,ae=function(e){if(ie||!re){var t=new e("utf-8");return function(e){return t.decode(e)}}return function(e){var t=We(e),n=t.buffer,r=t.byteOffset,i=t.length;return re.from(n,r,i).toString()}}("undefined"!==typeof TextDecoder?TextDecoder:X),oe=function(e){if(ie||!re){var t=new e;return function(e){return t.encode(e)}}return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return We(re.from(e,"utf8"))}}("undefined"!==typeof TextEncoder?TextEncoder:ee),ue=n(2),se=n(3),ce=Object.freeze({done:!0,value:void 0}),le=function(){function e(t){Object(F.a)(this,e),this._json=t}return Object(C.a)(e,[{key:"schema",get:function(){return this._json.schema}},{key:"batches",get:function(){return this._json.batches||[]}},{key:"dictionaries",get:function(){return this._json.dictionaries||[]}}]),e}(),fe=function(){function e(){Object(F.a)(this,e)}return Object(C.a)(e,[{key:"tee",value:function(){return this._getDOMStream().tee()}},{key:"pipe",value:function(e,t){return this._getNodeStream().pipe(e,t)}},{key:"pipeTo",value:function(e,t){return this._getDOMStream().pipeTo(e,t)}},{key:"pipeThrough",value:function(e,t){return this._getDOMStream().pipeThrough(e,t)}},{key:"_getDOMStream",value:function(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}},{key:"_getNodeStream",value:function(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}}]),e}(),he=function(e,t){Object(ue.a)(r,e);var n=Object(se.a)(r);function r(){var e;return Object(F.a)(this,r),(e=n.call(this))._values=[],e.resolvers=[],e._closedPromise=new Promise((function(t){return e._closedPromiseResolve=t})),e}return Object(C.a)(r,[{key:"closed",get:function(){return this._closedPromise}},{key:"cancel",value:function(){var e=L(N().mark((function e(t){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.return(t);case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"write",value:function(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}},{key:"abort",value:function(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}},{key:"close",value:function(){if(this._closedPromiseResolve){for(var e=this.resolvers;e.length>0;)e.shift().resolve(ce);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}},{key:t,value:function(){return this}},{key:"toDOMStream",value:function(e){return wt.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}},{key:"toNodeStream",value:function(e){return wt.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}},{key:"throw",value:function(){var e=L(N().mark((function e(t){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.abort(t);case 2:return e.abrupt("return",ce);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"return",value:function(){var e=L(N().mark((function e(t){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.close();case 2:return e.abrupt("return",ce);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"read",value:function(){var e=L(N().mark((function e(t){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.next(t,"read");case 2:return e.abrupt("return",e.sent.value);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"peek",value:function(){var e=L(N().mark((function e(t){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.next(t,"peek");case 2:return e.abrupt("return",e.sent.value);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"next",value:function(){var e=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(t,n){e.resolvers.push({resolve:t,reject:n})})):Promise.resolve(ce)}},{key:"_ensureOpen",value:function(){if(this._closedPromiseResolve)return!0;throw new Error("".concat(this," is closed"))}}]),r}(fe,Symbol.asyncIterator),de=U(function(){var e=function(){throw new Error("BigInt is not available in this environment")};function t(){throw e()}return t.asIntN=function(){throw e()},t.asUintN=function(){throw e()},"undefined"!==typeof BigInt?[BigInt,!0]:[t,!1]}(),2),pe=de[0],ye=de[1],ve=U(function(){var e=function(){throw new Error("BigInt64Array is not available in this environment")};return"undefined"!==typeof BigInt64Array?[BigInt64Array,!0]:[function(){function t(){throw Object(F.a)(this,t),e()}return Object(C.a)(t,null,[{key:"BYTES_PER_ELEMENT",get:function(){return 8}},{key:"of",value:function(){throw e()}},{key:"from",value:function(){throw e()}}]),t}(),!1]}(),2),be=ve[0],me=(ve[1],U(function(){var e=function(){throw new Error("BigUint64Array is not available in this environment")};return"undefined"!==typeof BigUint64Array?[BigUint64Array,!0]:[function(){function t(){throw Object(F.a)(this,t),e()}return Object(C.a)(t,null,[{key:"BYTES_PER_ELEMENT",get:function(){return 8}},{key:"of",value:function(){throw e()}},{key:"from",value:function(){throw e()}}]),t}(),!1]}(),2)),ge=me[0],ke=(me[1],function(e){return"number"===typeof e}),we=function(e){return"boolean"===typeof e},_e=function(e){return"function"===typeof e},Oe=function(e){return null!=e&&Object(e)===e},je=function(e){return Oe(e)&&_e(e.then)},xe=function(e){return Oe(e)&&_e(e[Symbol.iterator])},Se=function(e){return Oe(e)&&_e(e[Symbol.asyncIterator])},Te=function(e){return Oe(e)&&Oe(e.schema)},Ie=function(e){return Oe(e)&&"done"in e&&"value"in e},Ee=function(e){return Oe(e)&&_e(e.stat)&&ke(e.fd)},Ae=function(e){return Oe(e)&&Be(e.body)},Be=function(e){return Oe(e)&&_e(e.cancel)&&_e(e.getReader)&&!(e instanceof fe)},De=function(e){return Oe(e)&&_e(e.read)&&_e(e.pipe)&&we(e.readable)&&!(e instanceof fe)},Le=N().mark(Je),Fe=$.ByteBuffer,Ce="undefined"!==typeof SharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;function Me(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.byteLength,i=e.byteLength,a=new Uint8Array(e.buffer,e.byteOffset,i),o=new Uint8Array(t.buffer,t.byteOffset,Math.min(r,i));return a.set(o,n),e}function Ne(e,t){for(var n,r,i,a=function(e){for(var t,n,r,i,a,o,u=e[0]?[e[0]]:[],s=0,c=0,l=e.length;++s0)do{if(e[n]!==t[n])return!1}while(++n0&&(r.push(i),u+=i.byteLength),!(t||o<=u)){d.next=22;break}case 16:return d.next=18,s();case 18:h=d.sent,a=h.cmd,o=h.size;case 21:if(o0&&(i.push(a),s+=a.byteLength),!(n||u<=s)){e.next=31;break}case 25:return e.next=27,c();case 27:d=e.sent,o=d.cmd,u=d.size;case 30:if(u0&&(i.push(We(a)),s+=a.byteLength),!(n||u<=s)){e.next=31;break}case 25:return e.next=27,c();case 27:d=e.sent,o=d.cmd,u=d.size;case 30:if(u=i)){e.next=2;break}return e.abrupt("return",{done:!1,value:new Uint8Array(n,0,i)});case 2:return e.next=4,t.read(new Uint8Array(n,r,i-r));case 4:if(a=e.sent,o=a.done,u=a.value,!((r+=u.byteLength)0&&(c.push(l),s+=l.byteLength)),!(i||u<=s)){e.next=36;break}case 30:return e.next=32,f();case 32:y=e.sent,o=y.cmd,u=y.size;case 35:if(u=0;n--)e.addInt32(t[n]);return e.endVector()}},{key:"startTypeIdsVector",value:function(e,t){e.startVector(4,t,4)}},{key:"endUnion",value:function(e){return e.endObject()}},{key:"createUnion",value:function(e,n,r){return t.startUnion(e),t.addMode(e,n),t.addTypeIds(e,r),t.endUnion(e)}}]),t}();t.Union=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(F.a)(this,e),this.bb=null,this.bb_pos=0}return Object(C.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"bitWidth",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}},{key:"isSigned",value:function(){var e=this.bb.__offset(this.bb_pos,6);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}}],[{key:"getRootAsInt",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startInt",value:function(e){e.startObject(2)}},{key:"addBitWidth",value:function(e,t){e.addFieldInt32(0,t,0)}},{key:"addIsSigned",value:function(e,t){e.addFieldInt8(1,+t,0)}},{key:"endInt",value:function(e){return e.endObject()}},{key:"createInt",value:function(t,n,r){return e.startInt(t),e.addBitWidth(t,n),e.addIsSigned(t,r),e.endInt(t)}}]),e}();e.Int=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(F.a)(this,t),this.bb=null,this.bb_pos=0}return Object(C.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"precision",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):e.apache.arrow.flatbuf.Precision.HALF}}],[{key:"getRootAsFloatingPoint",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startFloatingPoint",value:function(e){e.startObject(1)}},{key:"addPrecision",value:function(t,n){t.addFieldInt16(0,n,e.apache.arrow.flatbuf.Precision.HALF)}},{key:"endFloatingPoint",value:function(e){return e.endObject()}},{key:"createFloatingPoint",value:function(e,n){return t.startFloatingPoint(e),t.addPrecision(e,n),t.endFloatingPoint(e)}}]),t}();t.FloatingPoint=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(F.a)(this,e),this.bb=null,this.bb_pos=0}return Object(C.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}}],[{key:"getRootAsUtf8",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startUtf8",value:function(e){e.startObject(0)}},{key:"endUtf8",value:function(e){return e.endObject()}},{key:"createUtf8",value:function(t){return e.startUtf8(t),e.endUtf8(t)}}]),e}();e.Utf8=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(F.a)(this,e),this.bb=null,this.bb_pos=0}return Object(C.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}}],[{key:"getRootAsBinary",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startBinary",value:function(e){e.startObject(0)}},{key:"endBinary",value:function(e){return e.endObject()}},{key:"createBinary",value:function(t){return e.startBinary(t),e.endBinary(t)}}]),e}();e.Binary=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(F.a)(this,e),this.bb=null,this.bb_pos=0}return Object(C.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}}],[{key:"getRootAsLargeUtf8",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startLargeUtf8",value:function(e){e.startObject(0)}},{key:"endLargeUtf8",value:function(e){return e.endObject()}},{key:"createLargeUtf8",value:function(t){return e.startLargeUtf8(t),e.endLargeUtf8(t)}}]),e}();e.LargeUtf8=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(F.a)(this,e),this.bb=null,this.bb_pos=0}return Object(C.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}}],[{key:"getRootAsLargeBinary",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startLargeBinary",value:function(e){e.startObject(0)}},{key:"endLargeBinary",value:function(e){return e.endObject()}},{key:"createLargeBinary",value:function(t){return e.startLargeBinary(t),e.endLargeBinary(t)}}]),e}();e.LargeBinary=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(F.a)(this,e),this.bb=null,this.bb_pos=0}return Object(C.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"byteWidth",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}}],[{key:"getRootAsFixedSizeBinary",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startFixedSizeBinary",value:function(e){e.startObject(1)}},{key:"addByteWidth",value:function(e,t){e.addFieldInt32(0,t,0)}},{key:"endFixedSizeBinary",value:function(e){return e.endObject()}},{key:"createFixedSizeBinary",value:function(t,n){return e.startFixedSizeBinary(t),e.addByteWidth(t,n),e.endFixedSizeBinary(t)}}]),e}();e.FixedSizeBinary=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(F.a)(this,e),this.bb=null,this.bb_pos=0}return Object(C.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}}],[{key:"getRootAsBool",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startBool",value:function(e){e.startObject(0)}},{key:"endBool",value:function(e){return e.endObject()}},{key:"createBool",value:function(t){return e.startBool(t),e.endBool(t)}}]),e}();e.Bool=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(F.a)(this,e),this.bb=null,this.bb_pos=0}return Object(C.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"precision",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}},{key:"scale",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}}],[{key:"getRootAsDecimal",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startDecimal",value:function(e){e.startObject(2)}},{key:"addPrecision",value:function(e,t){e.addFieldInt32(0,t,0)}},{key:"addScale",value:function(e,t){e.addFieldInt32(1,t,0)}},{key:"endDecimal",value:function(e){return e.endObject()}},{key:"createDecimal",value:function(t,n,r){return e.startDecimal(t),e.addPrecision(t,n),e.addScale(t,r),e.endDecimal(t)}}]),e}();e.Decimal=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(F.a)(this,t),this.bb=null,this.bb_pos=0}return Object(C.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"unit",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):e.apache.arrow.flatbuf.DateUnit.MILLISECOND}}],[{key:"getRootAsDate",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startDate",value:function(e){e.startObject(1)}},{key:"addUnit",value:function(t,n){t.addFieldInt16(0,n,e.apache.arrow.flatbuf.DateUnit.MILLISECOND)}},{key:"endDate",value:function(e){return e.endObject()}},{key:"createDate",value:function(e,n){return t.startDate(e),t.addUnit(e,n),t.endDate(e)}}]),t}();t.Date=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(F.a)(this,t),this.bb=null,this.bb_pos=0}return Object(C.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"unit",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):e.apache.arrow.flatbuf.TimeUnit.MILLISECOND}},{key:"bitWidth",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):32}}],[{key:"getRootAsTime",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startTime",value:function(e){e.startObject(2)}},{key:"addUnit",value:function(t,n){t.addFieldInt16(0,n,e.apache.arrow.flatbuf.TimeUnit.MILLISECOND)}},{key:"addBitWidth",value:function(e,t){e.addFieldInt32(1,t,32)}},{key:"endTime",value:function(e){return e.endObject()}},{key:"createTime",value:function(e,n,r){return t.startTime(e),t.addUnit(e,n),t.addBitWidth(e,r),t.endTime(e)}}]),t}();t.Time=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(F.a)(this,t),this.bb=null,this.bb_pos=0}return Object(C.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"unit",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):e.apache.arrow.flatbuf.TimeUnit.SECOND}},{key:"timezone",value:function(e){var t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}}],[{key:"getRootAsTimestamp",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startTimestamp",value:function(e){e.startObject(2)}},{key:"addUnit",value:function(t,n){t.addFieldInt16(0,n,e.apache.arrow.flatbuf.TimeUnit.SECOND)}},{key:"addTimezone",value:function(e,t){e.addFieldOffset(1,t,0)}},{key:"endTimestamp",value:function(e){return e.endObject()}},{key:"createTimestamp",value:function(e,n,r){return t.startTimestamp(e),t.addUnit(e,n),t.addTimezone(e,r),t.endTimestamp(e)}}]),t}();t.Timestamp=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(F.a)(this,t),this.bb=null,this.bb_pos=0}return Object(C.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"unit",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):e.apache.arrow.flatbuf.IntervalUnit.YEAR_MONTH}}],[{key:"getRootAsInterval",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startInterval",value:function(e){e.startObject(1)}},{key:"addUnit",value:function(t,n){t.addFieldInt16(0,n,e.apache.arrow.flatbuf.IntervalUnit.YEAR_MONTH)}},{key:"endInterval",value:function(e){return e.endObject()}},{key:"createInterval",value:function(e,n){return t.startInterval(e),t.addUnit(e,n),t.endInterval(e)}}]),t}();t.Interval=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(F.a)(this,t),this.bb=null,this.bb_pos=0}return Object(C.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"unit",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):e.apache.arrow.flatbuf.TimeUnit.MILLISECOND}}],[{key:"getRootAsDuration",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startDuration",value:function(e){e.startObject(1)}},{key:"addUnit",value:function(t,n){t.addFieldInt16(0,n,e.apache.arrow.flatbuf.TimeUnit.MILLISECOND)}},{key:"endDuration",value:function(e){return e.endObject()}},{key:"createDuration",value:function(e,n){return t.startDuration(e),t.addUnit(e,n),t.endDuration(e)}}]),t}();t.Duration=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(F.a)(this,e),this.bb=null,this.bb_pos=0}return Object(C.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"key",value:function(e){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}},{key:"value",value:function(e){var t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}}],[{key:"getRootAsKeyValue",value:function(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}},{key:"startKeyValue",value:function(e){e.startObject(2)}},{key:"addKey",value:function(e,t){e.addFieldOffset(0,t,0)}},{key:"addValue",value:function(e,t){e.addFieldOffset(1,t,0)}},{key:"endKeyValue",value:function(e){return e.endObject()}},{key:"createKeyValue",value:function(t,n,r){return e.startKeyValue(t),e.addKey(t,n),e.addValue(t,r),e.endKeyValue(t)}}]),e}();e.KeyValue=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(F.a)(this,t),this.bb=null,this.bb_pos=0}return Object(C.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"id",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}},{key:"indexType",value:function(t){var n=this.bb.__offset(this.bb_pos,6);return n?(t||new e.apache.arrow.flatbuf.Int).__init(this.bb.__indirect(this.bb_pos+n),this.bb):null}},{key:"isOrdered",value:function(){var e=this.bb.__offset(this.bb_pos,8);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}}],[{key:"getRootAsDictionaryEncoding",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startDictionaryEncoding",value:function(e){e.startObject(3)}},{key:"addId",value:function(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}},{key:"addIndexType",value:function(e,t){e.addFieldOffset(1,t,0)}},{key:"addIsOrdered",value:function(e,t){e.addFieldInt8(2,+t,0)}},{key:"endDictionaryEncoding",value:function(e){return e.endObject()}},{key:"createDictionaryEncoding",value:function(e,n,r,i){return t.startDictionaryEncoding(e),t.addId(e,n),t.addIndexType(e,r),t.addIsOrdered(e,i),t.endDictionaryEncoding(e)}}]),t}();t.DictionaryEncoding=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(F.a)(this,t),this.bb=null,this.bb_pos=0}return Object(C.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"name",value:function(e){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}},{key:"nullable",value:function(){var e=this.bb.__offset(this.bb_pos,6);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}},{key:"typeType",value:function(){var t=this.bb.__offset(this.bb_pos,8);return t?this.bb.readUint8(this.bb_pos+t):e.apache.arrow.flatbuf.Type.NONE}},{key:"type",value:function(e){var t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}},{key:"dictionary",value:function(t){var n=this.bb.__offset(this.bb_pos,12);return n?(t||new e.apache.arrow.flatbuf.DictionaryEncoding).__init(this.bb.__indirect(this.bb_pos+n),this.bb):null}},{key:"children",value:function(t,n){var r=this.bb.__offset(this.bb_pos,14);return r?(n||new e.apache.arrow.flatbuf.Field).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*t),this.bb):null}},{key:"childrenLength",value:function(){var e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"customMetadata",value:function(t,n){var r=this.bb.__offset(this.bb_pos,16);return r?(n||new e.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*t),this.bb):null}},{key:"customMetadataLength",value:function(){var e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}}],[{key:"getRootAsField",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startField",value:function(e){e.startObject(7)}},{key:"addName",value:function(e,t){e.addFieldOffset(0,t,0)}},{key:"addNullable",value:function(e,t){e.addFieldInt8(1,+t,0)}},{key:"addTypeType",value:function(t,n){t.addFieldInt8(2,n,e.apache.arrow.flatbuf.Type.NONE)}},{key:"addType",value:function(e,t){e.addFieldOffset(3,t,0)}},{key:"addDictionary",value:function(e,t){e.addFieldOffset(4,t,0)}},{key:"addChildren",value:function(e,t){e.addFieldOffset(5,t,0)}},{key:"createChildrenVector",value:function(e,t){e.startVector(4,t.length,4);for(var n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}},{key:"startChildrenVector",value:function(e,t){e.startVector(4,t,4)}},{key:"addCustomMetadata",value:function(e,t){e.addFieldOffset(6,t,0)}},{key:"createCustomMetadataVector",value:function(e,t){e.startVector(4,t.length,4);for(var n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}},{key:"startCustomMetadataVector",value:function(e,t){e.startVector(4,t,4)}},{key:"endField",value:function(e){return e.endObject()}},{key:"createField",value:function(e,n,r,i,a,o,u,s){return t.startField(e),t.addName(e,n),t.addNullable(e,r),t.addTypeType(e,i),t.addType(e,a),t.addDictionary(e,o),t.addChildren(e,u),t.addCustomMetadata(e,s),t.endField(e)}}]),t}();t.Field=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(F.a)(this,e),this.bb=null,this.bb_pos=0}return Object(C.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,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(e,t,n){return e.prep(8,16),e.writeInt64(n),e.writeInt64(t),e.offset()}}]),e}();e.Buffer=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(F.a)(this,t),this.bb=null,this.bb_pos=0}return Object(C.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"endianness",value:function(){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):e.apache.arrow.flatbuf.Endianness.Little}},{key:"fields",value:function(t,n){var r=this.bb.__offset(this.bb_pos,6);return r?(n||new e.apache.arrow.flatbuf.Field).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*t),this.bb):null}},{key:"fieldsLength",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"customMetadata",value:function(t,n){var r=this.bb.__offset(this.bb_pos,8);return r?(n||new e.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*t),this.bb):null}},{key:"customMetadataLength",value:function(){var e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}}],[{key:"getRootAsSchema",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startSchema",value:function(e){e.startObject(3)}},{key:"addEndianness",value:function(t,n){t.addFieldInt16(0,n,e.apache.arrow.flatbuf.Endianness.Little)}},{key:"addFields",value:function(e,t){e.addFieldOffset(1,t,0)}},{key:"createFieldsVector",value:function(e,t){e.startVector(4,t.length,4);for(var n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}},{key:"startFieldsVector",value:function(e,t){e.startVector(4,t,4)}},{key:"addCustomMetadata",value:function(e,t){e.addFieldOffset(2,t,0)}},{key:"createCustomMetadataVector",value:function(e,t){e.startVector(4,t.length,4);for(var n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}},{key:"startCustomMetadataVector",value:function(e,t){e.startVector(4,t,4)}},{key:"endSchema",value:function(e){return e.endObject()}},{key:"finishSchemaBuffer",value:function(e,t){e.finish(t)}},{key:"createSchema",value:function(e,n,r,i){return t.startSchema(e),t.addEndianness(e,n),t.addFields(e,r),t.addCustomMetadata(e,i),t.endSchema(e)}}]),t}();t.Schema=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(Nt||(Nt={})),function(e){!function(e){!function(e){!function(e){e.Schema=Nt.apache.arrow.flatbuf.Schema}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(zt||(zt={})),function(e){!function(e){!function(e){!function(e){!function(e){e[e.NONE=0]="NONE",e[e.Schema=1]="Schema",e[e.DictionaryBatch=2]="DictionaryBatch",e[e.RecordBatch=3]="RecordBatch",e[e.Tensor=4]="Tensor",e[e.SparseTensor=5]="SparseTensor"}(e.MessageHeader||(e.MessageHeader={}))}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(zt||(zt={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(F.a)(this,e),this.bb=null,this.bb_pos=0}return Object(C.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,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(e,t,n){return e.prep(8,16),e.writeInt64(n),e.writeInt64(t),e.offset()}}]),e}();e.FieldNode=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(zt||(zt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(F.a)(this,t),this.bb=null,this.bb_pos=0}return Object(C.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"length",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}},{key:"nodes",value:function(t,n){var r=this.bb.__offset(this.bb_pos,6);return r?(n||new e.apache.arrow.flatbuf.FieldNode).__init(this.bb.__vector(this.bb_pos+r)+16*t,this.bb):null}},{key:"nodesLength",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"buffers",value:function(e,t){var n=this.bb.__offset(this.bb_pos,8);return n?(t||new Nt.apache.arrow.flatbuf.Buffer).__init(this.bb.__vector(this.bb_pos+n)+16*e,this.bb):null}},{key:"buffersLength",value:function(){var e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}}],[{key:"getRootAsRecordBatch",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startRecordBatch",value:function(e){e.startObject(3)}},{key:"addLength",value:function(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}},{key:"addNodes",value:function(e,t){e.addFieldOffset(1,t,0)}},{key:"startNodesVector",value:function(e,t){e.startVector(16,t,8)}},{key:"addBuffers",value:function(e,t){e.addFieldOffset(2,t,0)}},{key:"startBuffersVector",value:function(e,t){e.startVector(16,t,8)}},{key:"endRecordBatch",value:function(e){return e.endObject()}},{key:"createRecordBatch",value:function(e,n,r,i){return t.startRecordBatch(e),t.addLength(e,n),t.addNodes(e,r),t.addBuffers(e,i),t.endRecordBatch(e)}}]),t}();t.RecordBatch=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(zt||(zt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(F.a)(this,t),this.bb=null,this.bb_pos=0}return Object(C.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"id",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}},{key:"data",value:function(t){var n=this.bb.__offset(this.bb_pos,6);return n?(t||new e.apache.arrow.flatbuf.RecordBatch).__init(this.bb.__indirect(this.bb_pos+n),this.bb):null}},{key:"isDelta",value:function(){var e=this.bb.__offset(this.bb_pos,8);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}}],[{key:"getRootAsDictionaryBatch",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startDictionaryBatch",value:function(e){e.startObject(3)}},{key:"addId",value:function(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}},{key:"addData",value:function(e,t){e.addFieldOffset(1,t,0)}},{key:"addIsDelta",value:function(e,t){e.addFieldInt8(2,+t,0)}},{key:"endDictionaryBatch",value:function(e){return e.endObject()}},{key:"createDictionaryBatch",value:function(e,n,r,i){return t.startDictionaryBatch(e),t.addId(e,n),t.addData(e,r),t.addIsDelta(e,i),t.endDictionaryBatch(e)}}]),t}();t.DictionaryBatch=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(zt||(zt={})),function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(F.a)(this,t),this.bb=null,this.bb_pos=0}return Object(C.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"version",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Nt.apache.arrow.flatbuf.MetadataVersion.V1}},{key:"headerType",value:function(){var t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint8(this.bb_pos+t):e.apache.arrow.flatbuf.MessageHeader.NONE}},{key:"header",value:function(e){var t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}},{key:"bodyLength",value:function(){var e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}},{key:"customMetadata",value:function(e,t){var n=this.bb.__offset(this.bb_pos,12);return n?(t||new Nt.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}},{key:"customMetadataLength",value:function(){var e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}}],[{key:"getRootAsMessage",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startMessage",value:function(e){e.startObject(5)}},{key:"addVersion",value:function(e,t){e.addFieldInt16(0,t,Nt.apache.arrow.flatbuf.MetadataVersion.V1)}},{key:"addHeaderType",value:function(t,n){t.addFieldInt8(1,n,e.apache.arrow.flatbuf.MessageHeader.NONE)}},{key:"addHeader",value:function(e,t){e.addFieldOffset(2,t,0)}},{key:"addBodyLength",value:function(e,t){e.addFieldInt64(3,t,e.createLong(0,0))}},{key:"addCustomMetadata",value:function(e,t){e.addFieldOffset(4,t,0)}},{key:"createCustomMetadataVector",value:function(e,t){e.startVector(4,t.length,4);for(var n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}},{key:"startCustomMetadataVector",value:function(e,t){e.startVector(4,t,4)}},{key:"endMessage",value:function(e){return e.endObject()}},{key:"finishMessageBuffer",value:function(e,t){e.finish(t)}},{key:"createMessage",value:function(e,n,r,i,a,o){return t.startMessage(e),t.addVersion(e,n),t.addHeaderType(e,r),t.addHeader(e,i),t.addBodyLength(e,a),t.addCustomMetadata(e,o),t.endMessage(e)}}]),t}();t.Message=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(zt||(zt={}));Nt.apache.arrow.flatbuf.Type;var Yt,Ht,$t=Nt.apache.arrow.flatbuf.DateUnit,Kt=Nt.apache.arrow.flatbuf.TimeUnit,Qt=Nt.apache.arrow.flatbuf.Precision,qt=Nt.apache.arrow.flatbuf.UnionMode,Gt=Nt.apache.arrow.flatbuf.IntervalUnit,Jt=zt.apache.arrow.flatbuf.MessageHeader,Zt=Nt.apache.arrow.flatbuf.MetadataVersion;!function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth"}(Yt||(Yt={})),function(e){e[e.OFFSET=0]="OFFSET",e[e.DATA=1]="DATA",e[e.VALIDITY=2]="VALIDITY",e[e.TYPE=3]="TYPE"}(Ht||(Ht={}));var Xt=N().mark(on);function en(e,t,n,r){return 0!==(n&1<>r}function nn(e,t,n){return n?!!(e[t>>3]|=1<>3]&=~(1<0||n.byteLength>3):an(on(n,e,t,null,en)).subarray(0,r)),i}return n}function an(e){var t,n=[],r=0,i=0,a=0,o=B(e);try{for(o.s();!(t=o.n()).done;){t.value&&(a|=1<0)&&(n[r++]=a);var u=new Uint8Array(n.length+7&-8);return u.set(n),u}function on(e,t,n,r,i){var a,o,u,s,c;return N().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:a=t%8,o=t>>3,u=0,s=n;case 3:if(!(s>0)){l.next=11;break}c=e[o++];case 5:return l.next=7,i(r,u++,c,a);case 7:if(--s>0&&++a<8){l.next=5;break}case 8:a=0,l.next=3;break;case 11:case"end":return l.stop()}}),Xt)}function un(e,t,n){if(n-t<=0)return 0;if(n-t<8){var r,i=0,a=B(on(e,t,n-t,e,tn));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=t+(t%8===0?0:8-t%8);return un(e,t,u)+un(e,o,n)+sn(e,u>>3,o-u>>3)}function sn(e,t,n){for(var r=0,i=0|t,a=new DataView(e.buffer,e.byteOffset,e.byteLength),o=void 0===n?e.byteLength:i+n;o-i>=4;)r+=cn(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=cn(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=cn(a.getUint8(i)),i+=1;return r}function cn(e){var t=0|e;return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24}var ln=n(4),fn=function(){function e(){Object(F.a)(this,e)}return Object(C.a)(e,[{key:"visitMany",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i2&&void 0!==arguments[2])||arguments[2],r=null,i=Yt.NONE;t instanceof or||t instanceof Wt?i=hn(t.type):t instanceof xn?i=hn(t):"number"!==typeof(i=t)&&(i=Yt[t]);switch(i){case Yt.Null:r=e.visitNull;break;case Yt.Bool:r=e.visitBool;break;case Yt.Int:r=e.visitInt;break;case Yt.Int8:r=e.visitInt8||e.visitInt;break;case Yt.Int16:r=e.visitInt16||e.visitInt;break;case Yt.Int32:r=e.visitInt32||e.visitInt;break;case Yt.Int64:r=e.visitInt64||e.visitInt;break;case Yt.Uint8:r=e.visitUint8||e.visitInt;break;case Yt.Uint16:r=e.visitUint16||e.visitInt;break;case Yt.Uint32:r=e.visitUint32||e.visitInt;break;case Yt.Uint64:r=e.visitUint64||e.visitInt;break;case Yt.Float:r=e.visitFloat;break;case Yt.Float16:r=e.visitFloat16||e.visitFloat;break;case Yt.Float32:r=e.visitFloat32||e.visitFloat;break;case Yt.Float64:r=e.visitFloat64||e.visitFloat;break;case Yt.Utf8:r=e.visitUtf8;break;case Yt.Binary:r=e.visitBinary;break;case Yt.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case Yt.Date:r=e.visitDate;break;case Yt.DateDay:r=e.visitDateDay||e.visitDate;break;case Yt.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case Yt.Timestamp:r=e.visitTimestamp;break;case Yt.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case Yt.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case Yt.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case Yt.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case Yt.Time:r=e.visitTime;break;case Yt.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case Yt.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case Yt.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case Yt.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case Yt.Decimal:r=e.visitDecimal;break;case Yt.List:r=e.visitList;break;case Yt.Struct:r=e.visitStruct;break;case Yt.Union:r=e.visitUnion;break;case Yt.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case Yt.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case Yt.Dictionary:r=e.visitDictionary;break;case Yt.Interval:r=e.visitInterval;break;case Yt.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case Yt.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case Yt.FixedSizeList:r=e.visitFixedSizeList;break;case Yt.Map:r=e.visitMap}if("function"===typeof r)return r;if(!n)return function(){return null};throw new Error("Unrecognized type '".concat(Yt[i],"'"))}(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1])}},{key:"visitNull",value:function(e){return null}},{key:"visitBool",value:function(e){return null}},{key:"visitInt",value:function(e){return null}},{key:"visitFloat",value:function(e){return null}},{key:"visitUtf8",value:function(e){return null}},{key:"visitBinary",value:function(e){return null}},{key:"visitFixedSizeBinary",value:function(e){return null}},{key:"visitDate",value:function(e){return null}},{key:"visitTimestamp",value:function(e){return null}},{key:"visitTime",value:function(e){return null}},{key:"visitDecimal",value:function(e){return null}},{key:"visitList",value:function(e){return null}},{key:"visitStruct",value:function(e){return null}},{key:"visitUnion",value:function(e){return null}},{key:"visitDictionary",value:function(e){return null}},{key:"visitInterval",value:function(e){return null}},{key:"visitFixedSizeList",value:function(e){return null}},{key:"visitMap",value:function(e){return null}}]),e}();function hn(e){switch(e.typeId){case Yt.Null:return Yt.Null;case Yt.Int:var t=e.bitWidth,n=e.isSigned;switch(t){case 8:return n?Yt.Int8:Yt.Uint8;case 16:return n?Yt.Int16:Yt.Uint16;case 32:return n?Yt.Int32:Yt.Uint32;case 64:return n?Yt.Int64:Yt.Uint64}return Yt.Int;case Yt.Float:switch(e.precision){case Qt.HALF:return Yt.Float16;case Qt.SINGLE:return Yt.Float32;case Qt.DOUBLE:return Yt.Float64}return Yt.Float;case Yt.Binary:return Yt.Binary;case Yt.Utf8:return Yt.Utf8;case Yt.Bool:return Yt.Bool;case Yt.Decimal:return Yt.Decimal;case Yt.Time:switch(e.unit){case Kt.SECOND:return Yt.TimeSecond;case Kt.MILLISECOND:return Yt.TimeMillisecond;case Kt.MICROSECOND:return Yt.TimeMicrosecond;case Kt.NANOSECOND:return Yt.TimeNanosecond}return Yt.Time;case Yt.Timestamp:switch(e.unit){case Kt.SECOND:return Yt.TimestampSecond;case Kt.MILLISECOND:return Yt.TimestampMillisecond;case Kt.MICROSECOND:return Yt.TimestampMicrosecond;case Kt.NANOSECOND:return Yt.TimestampNanosecond}return Yt.Timestamp;case Yt.Date:switch(e.unit){case $t.DAY:return Yt.DateDay;case $t.MILLISECOND:return Yt.DateMillisecond}return Yt.Date;case Yt.Interval:switch(e.unit){case Gt.DAY_TIME:return Yt.IntervalDayTime;case Gt.YEAR_MONTH:return Yt.IntervalYearMonth}return Yt.Interval;case Yt.Map:return Yt.Map;case Yt.List:return Yt.List;case Yt.Struct:return Yt.Struct;case Yt.Union:switch(e.mode){case qt.Dense:return Yt.DenseUnion;case qt.Sparse:return Yt.SparseUnion}return Yt.Union;case Yt.FixedSizeBinary:return Yt.FixedSizeBinary;case Yt.FixedSizeList:return Yt.FixedSizeList;case Yt.Dictionary:return Yt.Dictionary}throw new Error("Unrecognized type '".concat(Yt[e.typeId],"'"))}fn.prototype.visitInt8=null,fn.prototype.visitInt16=null,fn.prototype.visitInt32=null,fn.prototype.visitInt64=null,fn.prototype.visitUint8=null,fn.prototype.visitUint16=null,fn.prototype.visitUint32=null,fn.prototype.visitUint64=null,fn.prototype.visitFloat16=null,fn.prototype.visitFloat32=null,fn.prototype.visitFloat64=null,fn.prototype.visitDateDay=null,fn.prototype.visitDateMillisecond=null,fn.prototype.visitTimestampSecond=null,fn.prototype.visitTimestampMillisecond=null,fn.prototype.visitTimestampMicrosecond=null,fn.prototype.visitTimestampNanosecond=null,fn.prototype.visitTimeSecond=null,fn.prototype.visitTimeMillisecond=null,fn.prototype.visitTimeMicrosecond=null,fn.prototype.visitTimeNanosecond=null,fn.prototype.visitDenseUnion=null,fn.prototype.visitSparseUnion=null,fn.prototype.visitIntervalDayTime=null,fn.prototype.visitIntervalYearMonth=null;var dn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,[{key:"compareSchemas",value:function(e,t){return e===t||t instanceof e.constructor&&jn.compareFields(e.fields,t.fields)}},{key:"compareFields",value:function(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((function(e,n){return jn.compareField(e,t[n])}))}},{key:"compareField",value:function(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&jn.visit(e.type,t.type)}}]),n}(fn);function pn(e,t){return t instanceof e.constructor}function yn(e,t){return e===t||pn(e,t)}function vn(e,t){return e===t||pn(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function bn(e,t){return e===t||pn(e,t)&&e.precision===t.precision}function mn(e,t){return e===t||pn(e,t)&&e.unit===t.unit}function gn(e,t){return e===t||pn(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function kn(e,t){return e===t||pn(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function wn(e,t){return e===t||pn(e,t)&&e.mode===t.mode&&e.typeIds.every((function(e,n){return e===t.typeIds[n]}))&&jn.compareFields(e.children,t.children)}function _n(e,t){return e===t||pn(e,t)&&e.unit===t.unit}dn.prototype.visitNull=yn,dn.prototype.visitBool=yn,dn.prototype.visitInt=vn,dn.prototype.visitInt8=vn,dn.prototype.visitInt16=vn,dn.prototype.visitInt32=vn,dn.prototype.visitInt64=vn,dn.prototype.visitUint8=vn,dn.prototype.visitUint16=vn,dn.prototype.visitUint32=vn,dn.prototype.visitUint64=vn,dn.prototype.visitFloat=bn,dn.prototype.visitFloat16=bn,dn.prototype.visitFloat32=bn,dn.prototype.visitFloat64=bn,dn.prototype.visitUtf8=yn,dn.prototype.visitBinary=yn,dn.prototype.visitFixedSizeBinary=function(e,t){return e===t||pn(e,t)&&e.byteWidth===t.byteWidth},dn.prototype.visitDate=mn,dn.prototype.visitDateDay=mn,dn.prototype.visitDateMillisecond=mn,dn.prototype.visitTimestamp=gn,dn.prototype.visitTimestampSecond=gn,dn.prototype.visitTimestampMillisecond=gn,dn.prototype.visitTimestampMicrosecond=gn,dn.prototype.visitTimestampNanosecond=gn,dn.prototype.visitTime=kn,dn.prototype.visitTimeSecond=kn,dn.prototype.visitTimeMillisecond=kn,dn.prototype.visitTimeMicrosecond=kn,dn.prototype.visitTimeNanosecond=kn,dn.prototype.visitDecimal=yn,dn.prototype.visitList=function(e,t){return e===t||pn(e,t)&&e.children.length===t.children.length&&jn.compareFields(e.children,t.children)},dn.prototype.visitStruct=function(e,t){return e===t||pn(e,t)&&e.children.length===t.children.length&&jn.compareFields(e.children,t.children)},dn.prototype.visitUnion=wn,dn.prototype.visitDenseUnion=wn,dn.prototype.visitSparseUnion=wn,dn.prototype.visitDictionary=function(e,t){return e===t||pn(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&jn.visit(e.indices,t.indices)&&jn.visit(e.dictionary,t.dictionary)},dn.prototype.visitInterval=_n,dn.prototype.visitIntervalDayTime=_n,dn.prototype.visitIntervalYearMonth=_n,dn.prototype.visitFixedSizeList=function(e,t){return e===t||pn(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&jn.compareFields(e.children,t.children)},dn.prototype.visitMap=function(e,t){return e===t||pn(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&jn.compareFields(e.children,t.children)};var On,jn=new dn,xn=function(){function e(){Object(F.a)(this,e)}return Object(C.a)(e,[{key:"typeId",get:function(){return Yt.NONE}},{key:"compareTo",value:function(e){return jn.visit(this,e)}}],[{key:"isNull",value:function(e){return e&&e.typeId===Yt.Null}},{key:"isInt",value:function(e){return e&&e.typeId===Yt.Int}},{key:"isFloat",value:function(e){return e&&e.typeId===Yt.Float}},{key:"isBinary",value:function(e){return e&&e.typeId===Yt.Binary}},{key:"isUtf8",value:function(e){return e&&e.typeId===Yt.Utf8}},{key:"isBool",value:function(e){return e&&e.typeId===Yt.Bool}},{key:"isDecimal",value:function(e){return e&&e.typeId===Yt.Decimal}},{key:"isDate",value:function(e){return e&&e.typeId===Yt.Date}},{key:"isTime",value:function(e){return e&&e.typeId===Yt.Time}},{key:"isTimestamp",value:function(e){return e&&e.typeId===Yt.Timestamp}},{key:"isInterval",value:function(e){return e&&e.typeId===Yt.Interval}},{key:"isList",value:function(e){return e&&e.typeId===Yt.List}},{key:"isStruct",value:function(e){return e&&e.typeId===Yt.Struct}},{key:"isUnion",value:function(e){return e&&e.typeId===Yt.Union}},{key:"isFixedSizeBinary",value:function(e){return e&&e.typeId===Yt.FixedSizeBinary}},{key:"isFixedSizeList",value:function(e){return e&&e.typeId===Yt.FixedSizeList}},{key:"isMap",value:function(e){return e&&e.typeId===Yt.Map}},{key:"isDictionary",value:function(e){return e&&e.typeId===Yt.Dictionary}}]),e}();xn[Symbol.toStringTag]=((On=xn.prototype).children=null,On.ArrayType=Array,On[Symbol.toStringTag]="DataType");var Sn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,[{key:"toString",value:function(){return"Null"}},{key:"typeId",get:function(){return Yt.Null}}]),n}(xn);Sn[Symbol.toStringTag]=function(e){return e[Symbol.toStringTag]="Null"}(Sn.prototype);var Tn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e,r){var i;return Object(F.a)(this,n),(i=t.call(this)).isSigned=e,i.bitWidth=r,i}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.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}(xn);Tn[Symbol.toStringTag]=function(e){return e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]="Int"}(Tn.prototype);var In=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.call(this,!0,8)}return Object(C.a)(n)}(Tn),En=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.call(this,!0,16)}return Object(C.a)(n)}(Tn),An=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.call(this,!0,32)}return Object(C.a)(n)}(Tn),Bn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.call(this,!0,64)}return Object(C.a)(n)}(Tn),Dn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.call(this,!1,8)}return Object(C.a)(n)}(Tn),Ln=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.call(this,!1,16)}return Object(C.a)(n)}(Tn),Fn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.call(this,!1,32)}return Object(C.a)(n)}(Tn),Cn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.call(this,!1,64)}return Object(C.a)(n)}(Tn);Object.defineProperty(In.prototype,"ArrayType",{value:Int8Array}),Object.defineProperty(En.prototype,"ArrayType",{value:Int16Array}),Object.defineProperty(An.prototype,"ArrayType",{value:Int32Array}),Object.defineProperty(Bn.prototype,"ArrayType",{value:Int32Array}),Object.defineProperty(Dn.prototype,"ArrayType",{value:Uint8Array}),Object.defineProperty(Ln.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(Fn.prototype,"ArrayType",{value:Uint32Array}),Object.defineProperty(Cn.prototype,"ArrayType",{value:Uint32Array});var Mn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this)).precision=e,r}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.Float}},{key:"ArrayType",get:function(){switch(this.precision){case Qt.HALF:return Uint16Array;case Qt.SINGLE:return Float32Array;case Qt.DOUBLE:return Float64Array}throw new Error("Unrecognized ".concat(this[Symbol.toStringTag]," type"))}},{key:"toString",value:function(){return"Float".concat(this.precision<<5||16)}}]),n}(xn);Mn[Symbol.toStringTag]=function(e){return e.precision=null,e[Symbol.toStringTag]="Float"}(Mn.prototype);var Nn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.call(this,Qt.HALF)}return Object(C.a)(n)}(Mn),Un=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.call(this,Qt.SINGLE)}return Object(C.a)(n)}(Mn),Pn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.call(this,Qt.DOUBLE)}return Object(C.a)(n)}(Mn);Object.defineProperty(Nn.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(Un.prototype,"ArrayType",{value:Float32Array}),Object.defineProperty(Pn.prototype,"ArrayType",{value:Float64Array});var Rn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.call(this)}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.Binary}},{key:"toString",value:function(){return"Binary"}}]),n}(xn);Rn[Symbol.toStringTag]=function(e){return e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Binary"}(Rn.prototype);var Vn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.call(this)}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.Utf8}},{key:"toString",value:function(){return"Utf8"}}]),n}(xn);Vn[Symbol.toStringTag]=function(e){return e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Utf8"}(Vn.prototype);var zn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.call(this)}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.Bool}},{key:"toString",value:function(){return"Bool"}}]),n}(xn);zn[Symbol.toStringTag]=function(e){return e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Bool"}(zn.prototype);var Wn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e,r){var i;return Object(F.a)(this,n),(i=t.call(this)).scale=e,i.precision=r,i}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.Decimal}},{key:"toString",value:function(){return"Decimal[".concat(this.precision,"e").concat(this.scale>0?"+":"").concat(this.scale,"]")}}]),n}(xn);Wn[Symbol.toStringTag]=function(e){return e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]="Decimal"}(Wn.prototype);var Yn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this)).unit=e,r}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.Date}},{key:"toString",value:function(){return"Date".concat(32*(this.unit+1),"<").concat($t[this.unit],">")}}]),n}(xn);Yn[Symbol.toStringTag]=function(e){return e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Date"}(Yn.prototype);var Hn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.call(this,$t.DAY)}return Object(C.a)(n)}(Yn),$n=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.call(this,$t.MILLISECOND)}return Object(C.a)(n)}(Yn),Kn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e,r){var i;return Object(F.a)(this,n),(i=t.call(this)).unit=e,i.bitWidth=r,i}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.Time}},{key:"toString",value:function(){return"Time".concat(this.bitWidth,"<").concat(Kt[this.unit],">")}}]),n}(xn);Kn[Symbol.toStringTag]=function(e){return e.unit=null,e.bitWidth=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Time"}(Kn.prototype);var Qn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e,r){var i;return Object(F.a)(this,n),(i=t.call(this)).unit=e,i.timezone=r,i}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.Timestamp}},{key:"toString",value:function(){return"Timestamp<".concat(Kt[this.unit]).concat(this.timezone?", ".concat(this.timezone):"",">")}}]),n}(xn);Qn[Symbol.toStringTag]=function(e){return e.unit=null,e.timezone=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Timestamp"}(Qn.prototype);var qn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this)).unit=e,r}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.Interval}},{key:"toString",value:function(){return"Interval<".concat(Gt[this.unit],">")}}]),n}(xn);qn[Symbol.toStringTag]=function(e){return e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Interval"}(qn.prototype);var Gn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this)).children=[e],r}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.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}(xn);Gn[Symbol.toStringTag]=function(e){return e.children=null,e[Symbol.toStringTag]="List"}(Gn.prototype);var Jn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this)).children=e,r}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.Struct}},{key:"toString",value:function(){return"Struct<{".concat(this.children.map((function(e){return"".concat(e.name,":").concat(e.type)})).join(", "),"}>")}}]),n}(xn);Jn[Symbol.toStringTag]=function(e){return e.children=null,e[Symbol.toStringTag]="Struct"}(Jn.prototype);var Zn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e,r,i){var a;return Object(F.a)(this,n),(a=t.call(this)).mode=e,a.children=i,a.typeIds=r=Int32Array.from(r),a.typeIdToChildIndex=r.reduce((function(e,t,n){return(e[t]=n)&&e||e}),Object.create(null)),a}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.Union}},{key:"toString",value:function(){return"".concat(this[Symbol.toStringTag],"<").concat(this.children.map((function(e){return"".concat(e.type)})).join(" | "),">")}}]),n}(xn);Zn[Symbol.toStringTag]=function(e){return e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]="Union"}(Zn.prototype);var Xn=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this)).byteWidth=e,r}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.FixedSizeBinary}},{key:"toString",value:function(){return"FixedSizeBinary[".concat(this.byteWidth,"]")}}]),n}(xn);Xn[Symbol.toStringTag]=function(e){return e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]="FixedSizeBinary"}(Xn.prototype);var er=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e,r){var i;return Object(F.a)(this,n),(i=t.call(this)).listSize=e,i.children=[r],i}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.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}(xn);er[Symbol.toStringTag]=function(e){return e.children=null,e.listSize=null,e[Symbol.toStringTag]="FixedSizeList"}(er.prototype);var tr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(F.a)(this,n),(r=t.call(this)).children=[e],r.keysSorted=i,r}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.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(e){return"".concat(e.name,":").concat(e.type)})).join(", "),"}>")}}]),n}(xn);tr[Symbol.toStringTag]=function(e){return e.children=null,e.keysSorted=null,e[Symbol.toStringTag]="Map_"}(tr.prototype);var nr,rr=(nr=-1,function(){return++nr}),ir=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e,r,i,a){var o;return Object(F.a)(this,n),(o=t.call(this)).indices=r,o.dictionary=e,o.isOrdered=a||!1,o.id=null==i?rr():"number"===typeof i?i:i.low,o}return Object(C.a)(n,[{key:"typeId",get:function(){return Yt.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}(xn);function ar(e){var t=e;switch(e.typeId){case Yt.Decimal:return 4;case Yt.Timestamp:return 2;case Yt.Date:case Yt.Interval:return 1+t.unit;case Yt.Int:case Yt.Time:return+(t.bitWidth>32)+1;case Yt.FixedSizeList:return t.listSize;case Yt.FixedSizeBinary:return t.byteWidth;default:return 1}}ir[Symbol.toStringTag]=function(e){return e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]="Dictionary"}(ir.prototype);var or=function(){function e(t,n,r,i,a,o,u){var s;Object(F.a)(this,e),this.type=t,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(t){return t instanceof e?t:t.data})),a instanceof e?(this.stride=a.stride,this.values=a.values,this.typeIds=a.typeIds,this.nullBitmap=a.nullBitmap,this.valueOffsets=a.valueOffsets):(this.stride=ar(t),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 Object(C.a)(e,[{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 e=0,t=this.valueOffsets,n=this.values,r=this.nullBitmap,i=this.typeIds;return t&&(e+=t.byteLength),n&&(e+=n.byteLength),r&&(e+=r.byteLength),i&&(e+=i.byteLength),this.childData.reduce((function(e,t){return e+t.byteLength}),e)}},{key:"nullCount",get:function(){var e,t=this._nullCount;return t<=-1&&(e=this.nullBitmap)&&(this._nullCount=t=this.length-un(e,this.offset,this.offset+this.length)),t}},{key:"clone",value:function(t){return new e(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.offset,arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.length,arguments.length>3&&void 0!==arguments[3]?arguments[3]:this._nullCount,arguments.length>4&&void 0!==arguments[4]?arguments[4]:this,arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.childData,this.dictionary)}},{key:"slice",value:function(e,t){var n=this.stride,r=this.typeId,i=this.childData,a=+(0===this._nullCount)-1,o=16===r?n:1,u=this._sliceBuffers(e,t,n,r);return this.clone(this.type,this.offset+e,t,a,u,!i.length||this.valueOffsets?i:this._sliceChildren(i,o*e,o*t))}},{key:"_changeLengthAndBackfillNullBitmap",value:function(e){if(this.typeId===Yt.Null)return this.clone(this.type,0,e,0);var t=this.length,n=this.nullCount,r=new Uint8Array((e+63&-64)>>3).fill(255,0,t>>3);r[t>>3]=(1<0&&r.set(rn(this.offset,t,this.nullBitmap),0);var i=this.buffers;return i[Ht.VALIDITY]=r,this.clone(this.type,0,e,n+(e-t),i)}},{key:"_sliceBuffers",value:function(e,t,n,r){var i,a=this.buffers;return(i=a[Ht.TYPE])&&(a[Ht.TYPE]=i.subarray(e,e+t)),(i=a[Ht.OFFSET])&&(a[Ht.OFFSET]=i.subarray(e,e+t+1))||(i=a[Ht.DATA])&&(a[Ht.DATA]=6===r?i:i.subarray(n*e,n*(e+t))),a}},{key:"_sliceChildren",value:function(e,t,n){return e.map((function(e){return e.slice(t,n)}))}}],[{key:"new",value:function(t,n,r,i,a,o,u){switch(a instanceof e?a=a.buffers:a||(a=[]),t.typeId){case Yt.Null:return e.Null(t,n,r);case Yt.Int:return e.Int(t,n,r,i||0,a[Ht.VALIDITY],a[Ht.DATA]||[]);case Yt.Dictionary:return e.Dictionary(t,n,r,i||0,a[Ht.VALIDITY],a[Ht.DATA]||[],u);case Yt.Float:return e.Float(t,n,r,i||0,a[Ht.VALIDITY],a[Ht.DATA]||[]);case Yt.Bool:return e.Bool(t,n,r,i||0,a[Ht.VALIDITY],a[Ht.DATA]||[]);case Yt.Decimal:return e.Decimal(t,n,r,i||0,a[Ht.VALIDITY],a[Ht.DATA]||[]);case Yt.Date:return e.Date(t,n,r,i||0,a[Ht.VALIDITY],a[Ht.DATA]||[]);case Yt.Time:return e.Time(t,n,r,i||0,a[Ht.VALIDITY],a[Ht.DATA]||[]);case Yt.Timestamp:return e.Timestamp(t,n,r,i||0,a[Ht.VALIDITY],a[Ht.DATA]||[]);case Yt.Interval:return e.Interval(t,n,r,i||0,a[Ht.VALIDITY],a[Ht.DATA]||[]);case Yt.FixedSizeBinary:return e.FixedSizeBinary(t,n,r,i||0,a[Ht.VALIDITY],a[Ht.DATA]||[]);case Yt.Binary:return e.Binary(t,n,r,i||0,a[Ht.VALIDITY],a[Ht.OFFSET]||[],a[Ht.DATA]||[]);case Yt.Utf8:return e.Utf8(t,n,r,i||0,a[Ht.VALIDITY],a[Ht.OFFSET]||[],a[Ht.DATA]||[]);case Yt.List:return e.List(t,n,r,i||0,a[Ht.VALIDITY],a[Ht.OFFSET]||[],(o||[])[0]);case Yt.FixedSizeList:return e.FixedSizeList(t,n,r,i||0,a[Ht.VALIDITY],(o||[])[0]);case Yt.Struct:return e.Struct(t,n,r,i||0,a[Ht.VALIDITY],o||[]);case Yt.Map:return e.Map(t,n,r,i||0,a[Ht.VALIDITY],a[Ht.OFFSET]||[],(o||[])[0]);case Yt.Union:return e.Union(t,n,r,i||0,a[Ht.VALIDITY],a[Ht.TYPE]||[],a[Ht.OFFSET]||o,o)}throw new Error("Unrecognized typeId ".concat(t.typeId))}},{key:"Null",value:function(t,n,r){return new e(t,n,r,0)}},{key:"Int",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ue(t.ArrayType,o),We(a)])}},{key:"Dictionary",value:function(t,n,r,i,a,o,u){return new e(t,n,r,i,[void 0,Ue(t.indices.ArrayType,o),We(a)],[],u)}},{key:"Float",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ue(t.ArrayType,o),We(a)])}},{key:"Bool",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ue(t.ArrayType,o),We(a)])}},{key:"Decimal",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ue(t.ArrayType,o),We(a)])}},{key:"Date",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ue(t.ArrayType,o),We(a)])}},{key:"Time",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ue(t.ArrayType,o),We(a)])}},{key:"Timestamp",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ue(t.ArrayType,o),We(a)])}},{key:"Interval",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ue(t.ArrayType,o),We(a)])}},{key:"FixedSizeBinary",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,Ue(t.ArrayType,o),We(a)])}},{key:"Binary",value:function(t,n,r,i,a,o,u){return new e(t,n,r,i,[Ve(o),We(u),We(a)])}},{key:"Utf8",value:function(t,n,r,i,a,o,u){return new e(t,n,r,i,[Ve(o),We(u),We(a)])}},{key:"List",value:function(t,n,r,i,a,o,u){return new e(t,n,r,i,[Ve(o),void 0,We(a)],[u])}},{key:"FixedSizeList",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,void 0,We(a)],[o])}},{key:"Struct",value:function(t,n,r,i,a,o){return new e(t,n,r,i,[void 0,void 0,We(a)],o)}},{key:"Map",value:function(t,n,r,i,a,o,u){return new e(t,n,r,i,[Ve(o),void 0,We(a)],[u])}},{key:"Union",value:function(t,n,r,i,a,o,u,s){var c=[void 0,void 0,We(a),Ue(t.ArrayType,o)];return t.mode===qt.Sparse?new e(t,n,r,i,c,u):(c[Ht.OFFSET]=Ve(u),new e(t,n,r,i,c,s))}}]),e}();or.prototype.childData=Object.freeze([]);var ur=void 0;function sr(e){if(null===e)return"null";if(e===ur)return"undefined";switch(typeof e){case"number":case"bigint":return"".concat(e);case"string":return'"'.concat(e,'"')}return"function"===typeof e[Symbol.toPrimitive]?e[Symbol.toPrimitive]("string"):ArrayBuffer.isView(e)?"[".concat(e,"]"):JSON.stringify(e)}function cr(e){if(!e||e.length<=0)return function(e){return!0};var t="",n=e.filter((function(e){return e===e}));return n.length>0&&(t="\n switch (x) {".concat(n.map((function(e){return"\n case ".concat(function(e){if("bigint"!==typeof e)return sr(e);if(ye)return"".concat(sr(e),"n");return'"'.concat(sr(e),'"')}(e),":")})).join(""),"\n return false;\n }")),e.length!==n.length&&(t="if (x !== x) return false;\n".concat(t)),new Function("x","".concat(t,"\nreturn true;"))}var lr=function(e,t){return(e*t+63&-64||64)/t},fr=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Object(F.a)(this,e),this.buffer=t,this.stride=n,this.BYTES_PER_ELEMENT=t.BYTES_PER_ELEMENT,this.ArrayType=t.constructor,this._resize(this.length=t.length/n|0)}return Object(C.a)(e,[{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(e,t){return this}},{key:"append",value:function(e){return this.set(this.length,e)}},{key:"reserve",value:function(e){if(e>0){this.length+=e;var t=this.stride,n=this.length*t,r=this.buffer.length;n>=r&&this._resize(lr(0===r?1*n:2*n,this.BYTES_PER_ELEMENT))}return this}},{key:"flush",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length;e=lr(e*this.stride,this.BYTES_PER_ELEMENT);var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.length>=t?e.subarray(0,t):Me(new e.constructor(t),e,0)}(this.buffer,e);return this.clear(),t}},{key:"clear",value:function(){return this.length=0,this._resize(0),this}},{key:"_resize",value:function(e){return this.buffer=Me(new this.ArrayType(e),this.buffer)}}]),e}();fr.prototype.offset=0;var hr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,[{key:"last",value:function(){return this.get(this.length-1)}},{key:"get",value:function(e){return this.buffer[e]}},{key:"set",value:function(e,t){return this.reserve(e-this.length+1),this.buffer[e*this.stride]=t,this}}]),n}(fr),dr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array(0);return Object(F.a)(this,n),(e=t.call(this,r,1/8)).numValid=0,e}return Object(C.a)(n,[{key:"numInvalid",get:function(){return this.length-this.numValid}},{key:"get",value:function(e){return this.buffer[e>>3]>>e%8&1}},{key:"set",value:function(e,t){var n=this.reserve(e-this.length+1).buffer,r=e>>3,i=e%8,a=n[r]>>i&1;return t?0===a&&(n[r]|=1<0&&void 0!==arguments[0]?arguments[0]:new Int32Array(1);return Object(F.a)(this,n),t.call(this,e,1)}return Object(C.a)(n,[{key:"append",value:function(e){return this.set(this.length-1,e)}},{key:"set",value:function(e,t){var n=this.length-1,r=this.reserve(e-n+1).buffer;return n0&&void 0!==arguments[0]?arguments[0]:this.length-1;return e>this.length&&this.set(e-1,0),Mt(Object(Ct.a)(n.prototype),"flush",this).call(this,e+1)}}]),n}(hr),yr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,[{key:"ArrayType64",get:function(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?be:ge)}},{key:"set",value:function(e,t){switch(this.reserve(e-this.length+1),typeof t){case"bigint":this.buffer64[e]=t;break;case"number":this.buffer[e*this.stride]=t;break;default:this.buffer.set(t,e*this.stride)}return this}},{key:"_resize",value:function(e){var t=Mt(Object(Ct.a)(n.prototype),"_resize",this).call(this,e),r=t.byteLength/(this.BYTES_PER_ELEMENT*this.stride);return ye&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,r)),t}}]),n}(fr),vr=function(){function e(t){var n=t.type,r=t.nullValues;Object(F.a)(this,e),this.length=0,this.finished=!1,this.type=n,this.children=[],this.nullValues=r,this.stride=ar(n),this._nulls=new dr,r&&r.length>0&&(this._isValid=cr(r))}return Object(C.a)(e,[{key:"toVector",value:function(){return Wt.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 e=0;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),this._typeIds&&(e+=this._typeIds.byteLength),this.children.reduce((function(e,t){return e+t.byteLength}),e)}},{key:"reservedLength",get:function(){return this._nulls.reservedLength}},{key:"reservedByteLength",get:function(){var e=0;return this._offsets&&(e+=this._offsets.reservedByteLength),this._values&&(e+=this._values.reservedByteLength),this._nulls&&(e+=this._nulls.reservedByteLength),this._typeIds&&(e+=this._typeIds.reservedByteLength),this.children.reduce((function(e,t){return e+t.reservedByteLength}),e)}},{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(e){return this.set(this.length,e)}},{key:"isValid",value:function(e){return this._isValid(e)}},{key:"set",value:function(e,t){return this.setValid(e,this.isValid(t))&&this.setValue(e,t),this}},{key:"setValue",value:function(e,t){this._setValue(this,e,t)}},{key:"setValid",value:function(e,t){return this.length=this._nulls.set(e,+t).length,t}},{key:"addChild",value:function(e){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(e){return this.children[e]||null}},{key:"flush",value:function(){var e=[],t=this._values,n=this._offsets,r=this._typeIds,i=this.length,a=this.nullCount;r?(e[Ht.TYPE]=r.flush(i),n&&(e[Ht.OFFSET]=n.flush(i))):n?(t&&(e[Ht.DATA]=t.flush(n.last())),e[Ht.OFFSET]=n.flush(i)):t&&(e[Ht.DATA]=t.flush(i)),a>0&&(e[Ht.VALIDITY]=this._nulls.flush(i));var o=or.new(this.type,0,i,a,e,this.children.map((function(e){return e.flush()})));return this.clear(),o}},{key:"finish",value:function(){return this.finished=!0,this.children.forEach((function(e){return e.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(e){return e.clear()})),this}}],[{key:"new",value:function(e){}},{key:"throughNode",value:function(e){throw new Error('"throughNode" not available in this environment')}},{key:"throughDOM",value:function(e){throw new Error('"throughDOM" not available in this environment')}},{key:"throughIterable",value:function(e){return function(e){var t=e.queueingStrategy,n=void 0===t?"count":t,r=e.highWaterMark,i=void 0===r?"bytes"!==n?1e3:Math.pow(2,14):r,a="bytes"!==n?"length":"byteLength";return N().mark((function t(n){var r,o,u,s,c;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=0,o=vr.new(e),u=B(n),t.prev=3,u.s();case 5:if((s=u.n()).done){t.next=14;break}if(c=s.value,!(o.append(c)[a]>=i)){t.next=12;break}if(t.t0=++r,!t.t0){t.next=12;break}return t.next=12,o.toVector();case 12:t.next=5;break;case 14:t.next=19;break;case 16:t.prev=16,t.t1=t.catch(3),u.e(t.t1);case 19:return t.prev=19,u.f(),t.finish(19);case 22:if(!(o.finish().length>0||0===r)){t.next=25;break}return t.next=25,o.toVector();case 25:case"end":return t.stop()}}),t,null,[[3,16,19,22]])}))}(e)}},{key:"throughAsyncIterable",value:function(e){return function(e){var t=e.queueingStrategy,n=void 0===t?"count":t,r=e.highWaterMark,i=void 0===r?"bytes"!==n?1e3:Math.pow(2,14):r,a="bytes"!==n?"length":"byteLength";return function(){var t=z(N().mark((function t(n){var r,o,u,s,c,l,f,h;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=0,o=vr.new(e),u=!1,s=!1,t.prev=4,l=Y(n);case 6:return t.next=8,R(l.next());case 8:if(!(u=!(f=t.sent).done)){t.next=18;break}if(h=f.value,!(o.append(h)[a]>=i)){t.next=15;break}if(t.t0=++r,!t.t0){t.next=15;break}return t.next=15,o.toVector();case 15:u=!1,t.next=6;break;case 18:t.next=24;break;case 20:t.prev=20,t.t1=t.catch(4),s=!0,c=t.t1;case 24:if(t.prev=24,t.prev=25,!u||null==l.return){t.next=29;break}return t.next=29,R(l.return());case 29:if(t.prev=29,!s){t.next=32;break}throw c;case 32:return t.finish(29);case 33:return t.finish(24);case 34:if(!(o.finish().length>0||0===r)){t.next=37;break}return t.next=37,o.toVector();case 37:case"end":return t.stop()}}),t,null,[[4,20,24,34],[25,,29,33]])})));return function(e){return t.apply(this,arguments)}}()}(e)}}]),e}();vr.prototype.length=1,vr.prototype.stride=1,vr.prototype.children=null,vr.prototype.finished=!1,vr.prototype.nullValues=null,vr.prototype._isValid=function(){return!0};var br=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this,e))._values=new hr(new r.ArrayType(0),r.stride),r}return Object(C.a)(n,[{key:"setValue",value:function(e,t){var r=this._values;return r.reserve(e-r.length+1),Mt(Object(Ct.a)(n.prototype),"setValue",this).call(this,e,t)}}]),n}(vr),mr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this,e))._pendingLength=0,r._offsets=new pr,r}return Object(C.a)(n,[{key:"setValue",value:function(e,t){var n=this._pending||(this._pending=new Map),r=n.get(e);r&&(this._pendingLength-=r.length),this._pendingLength+=t.length,n.set(e,t)}},{key:"setValid",value:function(e,t){return!!Mt(Object(Ct.a)(n.prototype),"setValid",this).call(this,e,t)||((this._pending||(this._pending=new Map)).set(e,void 0),!1)}},{key:"clear",value:function(){return this._pendingLength=0,this._pending=void 0,Mt(Object(Ct.a)(n.prototype),"clear",this).call(this)}},{key:"flush",value:function(){return this._flush(),Mt(Object(Ct.a)(n.prototype),"flush",this).call(this)}},{key:"finish",value:function(){return this._flush(),Mt(Object(Ct.a)(n.prototype),"finish",this).call(this)}},{key:"_flush",value:function(){var e=this._pending,t=this._pendingLength;return this._pendingLength=0,this._pending=void 0,e&&e.size>0&&this._flushPending(e,t),this}}]),n}(vr);var gr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this,e))._values=new dr,r}return Object(C.a)(n,[{key:"setValue",value:function(e,t){this._values.set(e,+t)}}]),n}(vr),kr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,[{key:"setValue",value:function(e,t){}},{key:"setValid",value:function(e,t){return this.length=Math.max(e+1,this.length),t}}]),n}(vr),wr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(br),_r=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(wr),Or=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(wr),jr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(br),xr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r,i=e.type,a=e.nullValues,o=e.dictionaryHashFunction;return Object(F.a)(this,n),(r=t.call(this,{type:new ir(i.dictionary,i.indices,i.id,i.isOrdered)}))._nulls=null,r._dictionaryOffset=0,r._keysToIndices=Object.create(null),r.indices=vr.new({type:r.type.indices,nullValues:a}),r.dictionary=vr.new({type:r.type.dictionary,nullValues:null}),"function"===typeof o&&(r.valueToKey=o),r}return Object(C.a)(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(e){return this.indices.isValid(e)}},{key:"setValid",value:function(e,t){var n=this.indices;return t=n.setValid(e,t),this.length=n.length,t}},{key:"setValue",value:function(e,t){var n=this._keysToIndices,r=this.valueToKey(t),i=n[r];return void 0===i&&(n[r]=i=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,i)}},{key:"flush",value:function(){var e=this.type,t=this._dictionary,n=this.dictionary.toVector(),r=this.indices.flush().clone(e);return r.dictionary=t?t.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),Mt(Object(Ct.a)(n.prototype),"finish",this).call(this)}},{key:"clear",value:function(){return this.indices.clear(),this.dictionary.clear(),Mt(Object(Ct.a)(n.prototype),"clear",this).call(this)}},{key:"valueToKey",value:function(e){return"string"===typeof e?e:"".concat(e)}}]),n}(vr),Sr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(br),Tr=new Float64Array(1),Ir=new Uint32Array(Tr.buffer);function Er(e){var t=(31744&e)>>10,n=(1023&e)/1024,r=Math.pow(-1,(32768&e)>>15);switch(t){case 31:return r*(n?NaN:1/0);case 0:return r*(n?6103515625e-14*n:0)}return r*Math.pow(2,t-15)*(1+n)}function Ar(e){if(e!==e)return 32256;Tr[0]=e;var t=(2147483648&Ir[1])>>16&65535,n=2146435072&Ir[1],r=0;return n>=1089470464?Ir[0]>0?n=31744:(n=(2080374784&n)>>16,r=(1048575&Ir[1])>>10):n<=1056964608?(r=1048576+((r=1048576+(1048575&Ir[1]))<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=512+(1048575&Ir[1])>>10),t|n|65535&r}var Br=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(br),Dr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,[{key:"setValue",value:function(e,t){this._values.set(e,Ar(t))}}]),n}(Br),Lr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,[{key:"setValue",value:function(e,t){this._values.set(e,t)}}]),n}(Br),Fr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,[{key:"setValue",value:function(e,t){this._values.set(e,t)}}]),n}(Br),Cr=n(13),Mr=n(14);function Nr(e,t,n){return Nr=Object(Mr.a)()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Object(Cr.a)(i,n.prototype),i},Nr.apply(null,arguments)}var Ur,Pr,Rr=Symbol.for("isArrowBigNum");function Vr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r>>=0),s+=(n>>>0)+t*Math.pow(c,32);return s}function $r(e){var t="",n=new Uint32Array(2),r=new Uint16Array(e.buffer,e.byteOffset,e.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"){case"number":return Hr(this);case"string":return Ur(this);case"default":return Pr(this)}return Ur(this)},Object.setPrototypeOf(zr.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(Wr.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(Yr.prototype,Object.create(Uint32Array.prototype)),Object.assign(zr.prototype,Vr.prototype,{constructor:zr,signed:!0,TypedArray:Int32Array,BigIntArray:be}),Object.assign(Wr.prototype,Vr.prototype,{constructor:Wr,signed:!1,TypedArray:Uint32Array,BigIntArray:ge}),Object.assign(Yr.prototype,Vr.prototype,{constructor:Yr,signed:!0,TypedArray:Uint32Array,BigIntArray:ge}),ye?(Pr=function(e){return 8===e.byteLength?new e.BigIntArray(e.buffer,e.byteOffset,1)[0]:$r(e)},Ur=function(e){return 8===e.byteLength?"".concat(new e.BigIntArray(e.buffer,e.byteOffset,1)[0]):$r(e)}):Pr=Ur=$r;var Kr,Qr=function(){function e(t,n){return Object(F.a)(this,e),e.new(t,n)}return Object(C.a)(e,null,[{key:"new",value:function(e,t){switch(t){case!0:return new zr(e);case!1:return new Wr(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case be:return new zr(e)}return 16===e.byteLength?new Yr(e):new Wr(e)}},{key:"signed",value:function(e){return new zr(e)}},{key:"unsigned",value:function(e){return new Wr(e)}},{key:"decimal",value:function(e){return new Yr(e)}}]),e}(),qr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,[{key:"setValue",value:function(e,t){this._values.set(e,t)}}]),n}(br),Gr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(qr),Jr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(qr),Zr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(qr),Xr=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),e.nullValues&&(e.nullValues=e.nullValues.map(ii)),(r=t.call(this,e))._values=new yr(new Int32Array(0),2),r}return Object(C.a)(n,[{key:"values64",get:function(){return this._values.buffer64}},{key:"isValid",value:function(e){return Mt(Object(Ct.a)(n.prototype),"isValid",this).call(this,ii(e))}}]),n}(qr),ei=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(qr),ti=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(qr),ni=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(qr),ri=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),e.nullValues&&(e.nullValues=e.nullValues.map(ii)),(r=t.call(this,e))._values=new yr(new Uint32Array(0),2),r}return Object(C.a)(n,[{key:"values64",get:function(){return this._values.buffer64}},{key:"isValid",value:function(e){return Mt(Object(Ct.a)(n.prototype),"isValid",this).call(this,ii(e))}}]),n}(qr),ii=(Kr={BigIntArray:be},function(e){return ArrayBuffer.isView(e)&&(Kr.buffer=e.buffer,Kr.byteOffset=e.byteOffset,Kr.byteLength=e.byteLength,e=Pr(Kr),Kr.buffer=null),e}),ai=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(br),oi=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(ai),ui=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(ai),si=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(ai),ci=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(ai),li=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(br),fi=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(li),hi=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(li),di=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(li),pi=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(li),yi=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(br),vi=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(yi),bi=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(yi),mi=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this,e))._values=new fr(new Uint8Array(0)),r}return Object(C.a)(n,[{key:"byteLength",get:function(){var e=this._pendingLength+4*this.length;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}},{key:"setValue",value:function(e,t){return Mt(Object(Ct.a)(n.prototype),"setValue",this).call(this,e,We(t))}},{key:"_flushPending",value:function(e,t){var n,r,i=this._offsets,a=this._values.reserve(t).buffer,o=0,u=0,s=0,c=B(e);try{for(c.s();!(r=c.n()).done;){var l=U(r.value,2);o=l[0],void 0===(n=l[1])?i.set(o,0):(u=n.length,a.set(n,s),i.set(o,u),s+=u)}}catch(f){c.e(f)}finally{c.f()}}}]),n}(mr),gi=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this,e))._values=new fr(new Uint8Array(0)),r}return Object(C.a)(n,[{key:"byteLength",get:function(){var e=this._pendingLength+4*this.length;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}},{key:"setValue",value:function(e,t){return Mt(Object(Ct.a)(n.prototype),"setValue",this).call(this,e,oe(t))}},{key:"_flushPending",value:function(e,t){}}]),n}(mr);gi.prototype._flushPending=mi.prototype._flushPending;var ki=function(){function e(){Object(F.a)(this,e)}return Object(C.a)(e,[{key:"length",get:function(){return this._values.length}},{key:"get",value:function(e){return this._values[e]}},{key:"clear",value:function(){return this._values=null,this}},{key:"bind",value:function(e){return e instanceof Wt?e:(this._values=e,this)}}]),e}(),wi=n(9),_i=n(10),Oi=Symbol.for("parent"),ji=Symbol.for("rowIndex"),xi=Symbol.for("keyToIdx"),Si=Symbol.for("idxToVal"),Ti=Symbol.for("nodejs.util.inspect.custom"),Ii=function(e){function t(e,n){Object(F.a)(this,t),this[Oi]=e,this.size=n}return Object(C.a)(t,[{key:"entries",value:function(){return this[Symbol.iterator]()}},{key:"has",value:function(e){return void 0!==this.get(e)}},{key:"get",value:function(e){var t=void 0;if(null!==e&&void 0!==e){var n=this[xi]||(this[xi]=new Map),r=n.get(e);if(void 0!==r){var i=this[Si]||(this[Si]=new Array(this.size));void 0!==(t=i[r])||(i[r]=t=this.getValue(r))}else if((r=this.getIndex(e))>-1){n.set(e,r);var a=this[Si]||(this[Si]=new Array(this.size));void 0!==(t=a[r])||(a[r]=t=this.getValue(r))}}return t}},{key:"set",value:function(e,t){if(null!==e&&void 0!==e){var n=this[xi]||(this[xi]=new Map),r=n.get(e);if(void 0===r&&n.set(e,r=this.getIndex(e)),r>-1)(this[Si]||(this[Si]=new Array(this.size)))[r]=this.setValue(r,t)}return this}},{key:"clear",value:function(){throw new Error("Clearing ".concat(this[Symbol.toStringTag]," not supported."))}},{key:"delete",value:function(e){throw new Error("Deleting ".concat(this[Symbol.toStringTag]," values not supported."))}},{key:e,value:N().mark((function e(){var t,n,r,i,a,o,u,s,c;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.keys(),n=this.values(),r=this[xi]||(this[xi]=new Map),i=this[Si]||(this[Si]=new Array(this.size)),u=0;case 5:if((s=t.next()).done||(c=n.next()).done){e.next=15;break}return a=s.value,o=c.value,i[u]=o,r.has(a)||r.set(a,u),e.next=12,[a,o];case 12:++u,e.next=5;break;case 15:case"end":return e.stop()}}),e,this)}))},{key:"forEach",value:function(e,t){for(var n,r,i,a,o=this.keys(),u=this.values(),s=void 0===t?e:function(n,r,i){return e.call(t,n,r,i)},c=this[xi]||(this[xi]=new Map),l=this[Si]||(this[Si]=new Array(this.size)),f=0;!(i=o.next()).done&&!(a=u.next()).done;++f)n=i.value,r=a.value,l[f]=r,c.has(n)||c.set(n,f),s(r,n,this)}},{key:"toArray",value:function(){return Object(ln.a)(this.values())}},{key:"toJSON",value:function(){var e={};return this.forEach((function(t,n){return e[n]=t})),e}},{key:"inspect",value:function(){return this.toString()}},{key:Ti,value:function(){return this.toString()}},{key:"toString",value:function(){var e=[];return this.forEach((function(t,n){n=sr(n),t=sr(t),e.push("".concat(n,": ").concat(t))})),"{ ".concat(e.join(", ")," }")}}]),t}(Symbol.iterator);Ii[Symbol.toStringTag]=function(e){var t;return Object.defineProperties(e,(Dt(t={size:{writable:!0,enumerable:!1,configurable:!1,value:0}},Oi,{writable:!0,enumerable:!1,configurable:!1,value:null}),Dt(t,ji,{writable:!0,enumerable:!1,configurable:!1,value:-1}),t)),e[Symbol.toStringTag]="Row"}(Ii.prototype);var Ei=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),r=t.call(this,e,e.length),Object(wi.a)(r,Li(Object(_i.a)(r)))}return Object(C.a)(n,[{key:"keys",value:function(){return this[Oi].getChildAt(0)[Symbol.iterator]()}},{key:"values",value:function(){return this[Oi].getChildAt(1)[Symbol.iterator]()}},{key:"getKey",value:function(e){return this[Oi].getChildAt(0).get(e)}},{key:"getIndex",value:function(e){return this[Oi].getChildAt(0).indexOf(e)}},{key:"getValue",value:function(e){return this[Oi].getChildAt(1).get(e)}},{key:"setValue",value:function(e,t){this[Oi].getChildAt(1).set(e,t)}}]),n}(Ii),Ai=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),r=t.call(this,e,e.type.children.length),Object(wi.a)(r,Di(Object(_i.a)(r)))}return Object(C.a)(n,[{key:"keys",value:N().mark((function e(){var t,n,r;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=B(this[Oi].type.children),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=n.value,e.next=7,r.name;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"values",value:N().mark((function e(){var t,n,r;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=B(this[Oi].type.children),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=n.value,e.next=7,this[r.name];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"getKey",value:function(e){return this[Oi].type.children[e].name}},{key:"getIndex",value:function(e){return this[Oi].type.children.findIndex((function(t){return t.name===e}))}},{key:"getValue",value:function(e){return this[Oi].getChildAt(e).get(this[ji])}},{key:"setValue",value:function(e,t){return this[Oi].getChildAt(e).set(this[ji],t)}}]),n}(Ii);Object.setPrototypeOf(Ii.prototype,Map.prototype);var Bi,Di=function(){var e={enumerable:!0,configurable:!1,get:null,set:null};return function(t){var n,r=-1,i=t[xi]||(t[xi]=new Map),a=function(e){return function(){return this.get(e)}},o=function(e){return function(t){return this.set(e,t)}},u=B(t.keys());try{for(u.s();!(n=u.n()).done;){var s=n.value;i.set(s,++r),e.get=a(s),e.set=o(s),t.hasOwnProperty(s)||(e.enumerable=!0,Object.defineProperty(t,s,e)),t.hasOwnProperty(r)||(e.enumerable=!1,Object.defineProperty(t,r,e))}}catch(c){u.e(c)}finally{u.f()}return e.get=e.set=null,t}}(),Li=function(){if("undefined"===typeof Proxy)return Di;var e=Ii.prototype.has,t=Ii.prototype.get,n=Ii.prototype.set,r=Ii.prototype.getKey,i={isExtensible:function(){return!1},deleteProperty:function(){return!1},preventExtensions:function(){return!0},ownKeys:function(e){return Object(ln.a)(e.keys()).map((function(e){return"".concat(e)}))},has:function(e,t){switch(t){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 Oi:case ji:case Si:case xi:case Ti:return!0}return"number"!==typeof t||e.has(t)||(t=e.getKey(t)),e.has(t)},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 Oi:case ji:case Si:case xi:case Ti:return Reflect.get(n,i,a)}return"number"!==typeof i||e.call(a,i)||(i=r.call(a,i)),t.call(a,i)},set:function(t,i,a,o){switch(i){case Oi:case ji:case Si:case xi:return Reflect.set(t,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||e.call(o,i)||(i=r.call(o,i)),!!e.call(o,i)&&!!n.call(o,i,a)}};return function(e){return new Proxy(e,i)}}();function Fi(e,t,n){var r=e.length,i=t>-1?t:r+t%r;return n?n(e,i):i}function Ci(e,t,n,r){var i=e.length,a=void 0===i?0:i,o="number"!==typeof t?0:t,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(e,o,u):[o,u]}var Mi=ye?pe(0):0,Ni=function(e){return e!==e};function Ui(e){var t=typeof e;if("object"!==t||null===e)return Ni(e)?Ni:"bigint"!==t?function(t){return t===e}:function(t){return Mi+t===e};if(e instanceof Date){var n=e.valueOf();return function(e){return e instanceof Date&&e.valueOf()===n}}return ArrayBuffer.isView(e)?function(t){return!!t&>(e,t)}:e instanceof Map?function(e){var t=-1,n=[];return e.forEach((function(e){return n[++t]=Ui(e)})),Pi(n)}(e):Array.isArray(e)?function(e){for(var t=[],n=-1,r=e.length;++n1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){for(var t=new Uint32Array((e||[]).length+1),n=t[0]=0,r=t.length,i=0;++i")}},{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(e,t){return e+t.byteLength}),0)}},{key:"nullCount",get:function(){var e=this._nullCount;return e<0&&(this._nullCount=e=this._chunks.reduce((function(e,t){return e+t.nullCount}),0)),e}},{key:"indices",get:function(){if(xn.isDictionary(this._type)){if(!this._indices){var e=this._chunks;this._indices=1===e.length?e[0].indices:r.concat.apply(r,Object(ln.a)(e.map((function(e){return e.indices}))))}return this._indices}return null}},{key:"dictionary",get:function(){return xn.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}},{key:t,value:N().mark((function e(){var t,n,r;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=B(this._chunks),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=8;break}return r=n.value,e.delegateYield(r,"t0",6);case 6:e.next=3;break;case 8:e.next=13;break;case 10:e.prev=10,e.t1=e.catch(1),t.e(e.t1);case 13:return e.prev=13,t.f(),e.finish(13);case 16:case"end":return e.stop()}}),e,this,[[1,10,13,16]])}))},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._chunks;return new r(this._type,e)}},{key:"concat",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n=this._numChildren)return null;var t,n,i,a=this._children||(this._children=[]);return(t=a[e])?t:(n=(this._type.children||[])[e])&&(i=this._chunks.map((function(t){return t.getChildAt(e)})).filter((function(e){return null!=e}))).length>0?a[e]=new r(n.type,i):null}},{key:"search",value:function(e,t){var n=e,r=this._chunkOffsets,i=r.length-1;if(n<0)return null;if(n>=r[i])return null;if(i<=1)return t?t(this,0,n):[0,n];var a=0,o=0,u=0;do{if(a+1===i)return t?t(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(e){return!!this.search(e,this.isValidInternal)}},{key:"get",value:function(e){return this.search(e,this.getInternal)}},{key:"set",value:function(e,t){this.search(e,(function(e,n,r){return e.chunks[n].set(r,t)}))}},{key:"indexOf",value:function(e,t){var n=this;return t&&"number"===typeof t?this.search(t,(function(t,r,i){return n.indexOfInternal(t,r,i,e)})):this.indexOfInternal(this,0,Math.max(0,t||0),e)}},{key:"toArray",value:function(){var e=this.chunks,t=e.length,n=this._type.ArrayType;if(t<=0)return new n(0);if(t<=1)return e[0].toArray();for(var r=0,i=new Array(t),a=-1;++a=n)break;if(!(t>=l+c))if(l>=t&&l+c<=n)r.push(s);else{var f=Math.max(0,t-l),h=Math.min(n-l,c);r.push(s.slice(f,h))}}return e.clone(r)}}],[{key:"flatten",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0;return Object(F.a)(this,n),i=Vi.flatten.apply(Vi,Object(ln.a)(i)),(r=t.call(this,e.type,i,a))._field=e,1!==i.length||Object(_i.a)(r)instanceof Hi?r:Object(wi.a)(r,new Hi(e,i[0],r._chunkOffsets))}return Object(C.a)(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 e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._chunks;return new n(this._field,e)}},{key:"getChildAt",value:function(e){if(e<0||e>=this.numChildren)return null;var t,r,i,a=this._children||(this._children=[]);return(t=a[e])?t:(r=(this.type.children||[])[e])&&(i=this._chunks.map((function(t){return t.getChildAt(e)})).filter((function(e){return null!=e}))).length>0?a[e]=new n(r,i):null}}],[{key:"new",value:function(e,t){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a0}))&&(e=e.clone({nullable:!0}));return new n(e,o)}}]),n}(Vi),Hi=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e,r,i){var a;return Object(F.a)(this,n),(a=t.call(this,e,[r],i))._chunk=r,a}return Object(C.a)(n,[{key:"search",value:function(e,t){return t?t(this,0,e):[0,e]}},{key:"isValid",value:function(e){return this._chunk.isValid(e)}},{key:"get",value:function(e){return this._chunk.get(e)}},{key:"set",value:function(e,t){this._chunk.set(e,t)}},{key:"indexOf",value:function(e,t){return this._chunk.indexOf(e,t)}}]),n}(Yi),$i=Array.isArray,Ki=function(e,t){return Ji(e,t,[],0)},Qi=function(e){return ta(e,[[],[]])},qi=function(e,t){return Zi(e,t,[],0)},Gi=function(e,t){return Xi(e,t,[],0)};function Ji(e,t,n,r){for(var i,a=r,o=-1,u=t.length;++o0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;Object(F.a)(this,t),this.fields=e||[],this.metadata=n||new Map,r||(r=aa(e)),this.dictionaries=r}return Object(C.a)(t,[{key:e,get:function(){return"Schema"}},{key:"toString",value:function(){return"Schema<{ ".concat(this.fields.map((function(e,t){return"".concat(t,": ").concat(e)})).join(", ")," }>")}},{key:"compareTo",value:function(e){return jn.compareSchemas(this,e)}},{key:"select",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0;Object(F.a)(this,t),this.name=e,this.type=n,this.nullable=r,this.metadata=i||new Map}return Object(C.a)(t,[{key:"typeId",get:function(){return this.type.typeId}},{key:e,get:function(){return"Field"}},{key:"toString",value:function(){return"".concat(this.name,": ").concat(this.type)}},{key:"compareTo",value:function(e){return jn.compareField(this,e)}},{key:"clone",value:function(){for(var e,n,r,i,a,o,u,s,c,l,f=arguments.length,h=new Array(f),d=0;d1&&void 0!==arguments[1]?arguments[1]:new Map,n=-1,r=e.length;++n0&&aa(i.children,t)}return t}na.prototype.fields=null,na.prototype.metadata=null,na.prototype.dictionaries=null,ra.prototype.type=null,ra.prototype.name=null,ra.prototype.nullable=null,ra.prototype.metadata=null;var oa=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this,e))._run=new ki,r._offsets=new pr,r}return Object(C.a)(n,[{key:"addChild",value:function(e){var t=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]=e,this.type=new Gn(new ra(t,e.type,!0)),this.numChildren-1}},{key:"clear",value:function(){return this._run.clear(),Mt(Object(Ct.a)(n.prototype),"clear",this).call(this)}},{key:"_flushPending",value:function(e){var t,n,r=this._run,i=this._offsets,a=this._setValue,o=0,u=B(e);try{for(u.s();!(n=u.n()).done;){var s=U(n.value,2);o=s[0],void 0===(t=s[1])?i.set(o,0):(i.set(o,t.length),a(this,o,r.bind(t)))}}catch(c){u.e(c)}finally{u.f()}}}]),n}(mr),ua=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){var e;return Object(F.a)(this,n),(e=t.apply(this,arguments))._run=new ki,e}return Object(C.a)(n,[{key:"setValue",value:function(e,t){Mt(Object(Ct.a)(n.prototype),"setValue",this).call(this,e,this._run.bind(t))}},{key:"addChild",value:function(e){var t=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(e);return this.type=new er(this.type.listSize,new ra(t,e.type,!0)),n}},{key:"clear",value:function(){return this._run.clear(),Mt(Object(Ct.a)(n.prototype),"clear",this).call(this)}}]),n}(vr),sa=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,[{key:"set",value:function(e,t){return Mt(Object(Ct.a)(n.prototype),"set",this).call(this,e,t)}},{key:"setValue",value:function(e,t){t=t instanceof Map?t:new Map(Object.entries(t));var n=this._pending||(this._pending=new Map),r=n.get(e);r&&(this._pendingLength-=r.size),this._pendingLength+=t.size,n.set(e,t)}},{key:"addChild",value:function(e){var t=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]=e,this.type=new tr(new ra(t,e.type,!0),this.type.keysSorted),this.numChildren-1}},{key:"_flushPending",value:function(e){var t=this,n=this._offsets,r=this._setValue;e.forEach((function(e,i){void 0===e?n.set(i,0):(n.set(i,e.size),r(t,i,e))}))}}]),n}(mr),ca=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,[{key:"addChild",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"".concat(this.numChildren),n=this.children.push(e);return this.type=new Jn([].concat(Object(ln.a)(this.type.children),[new ra(t,e.type,!0)])),n}}]),n}(vr),la=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this,e))._typeIds=new hr(new Int8Array(0),1),"function"===typeof e.valueToChildTypeId&&(r._valueToChildTypeId=e.valueToChildTypeId),r}return Object(C.a)(n,[{key:"typeIdToChildIndex",get:function(){return this.type.typeIdToChildIndex}},{key:"append",value:function(e,t){return this.set(this.length,e,t)}},{key:"set",value:function(e,t,n){return void 0===n&&(n=this._valueToChildTypeId(this,t,e)),this.setValid(e,this.isValid(t))&&this.setValue(e,t,n),this}},{key:"setValue",value:function(e,t,r){this._typeIds.set(e,r),Mt(Object(Ct.a)(n.prototype),"setValue",this).call(this,e,t)}},{key:"addChild",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"".concat(this.children.length),n=this.children.push(e),r=this.type,i=r.children,a=r.mode,o=r.typeIds,u=[].concat(Object(ln.a)(i),[new ra(t,e.type)]);return this.type=new Zn(a,[].concat(Object(ln.a)(o),[n]),u),n}},{key:"_valueToChildTypeId",value:function(e,t,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}(vr),fa=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(la),ha=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this,e))._offsets=new hr(new Int32Array(0)),r}return Object(C.a)(n,[{key:"setValue",value:function(e,t,r){var i=this.type.typeIdToChildIndex[r];return this._offsets.set(e,this.getChildAt(i).length),Mt(Object(Ct.a)(n.prototype),"setValue",this).call(this,e,t,r)}}]),n}(la),da=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(fn),pa=function(e,t,n){e[t]=n%4294967296|0,e[t+1]=n/4294967296|0},ya=function(e,t,n,r){var i=t[n],a=t[n+1];null!=i&&null!=a&&e.set(r.subarray(0,a-i),i)},va=function(e,t,n){!function(e,t,n){e[t]=n/864e5|0}(e.values,t,n.valueOf())},ba=function(e,t,n){var r=e.values;pa(r,2*t,n.valueOf())},ma=function(e,t,n){var r=e.stride;e.values[r*t]=n},ga=function(e,t,n){var r=e.stride;e.values[r*t]=Ar(n)},ka=function(e,t,n){switch(typeof n){case"bigint":e.values64[t]=n;break;case"number":e.values[t*e.stride]=n;break;default:var r=n,i=e.stride,a=Ue(e.ArrayType,r);e.values.set(a.subarray(0,i),i*t)}},wa=function(e,t,n){var r=e.values;return pa(r,2*t,n/1e3)},_a=function(e,t,n){var r=e.values;return pa(r,2*t,n)},Oa=function(e,t,n){return function(e,t,n){e[t]=1e3*n%4294967296|0,e[t+1]=1e3*n/4294967296|0}(e.values,2*t,n)},ja=function(e,t,n){return function(e,t,n){e[t]=1e6*n%4294967296|0,e[t+1]=1e6*n/4294967296|0}(e.values,2*t,n)},xa=function(e,t,n){e.values[e.stride*t]=n},Sa=function(e,t,n){e.values[e.stride*t]=n},Ta=function(e,t,n){e.values.set(n.subarray(0,2),2*t)},Ia=function(e,t,n){e.values.set(n.subarray(0,2),2*t)},Ea=function(e,t,n){var r=e.typeIdToChildIndex[e.typeIds[t]],i=e.getChildAt(r);i&&i.set(e.valueOffsets[t],n)},Aa=function(e,t,n){var r=e.typeIdToChildIndex[e.typeIds[t]],i=e.getChildAt(r);i&&i.set(t,n)},Ba=function(e,t,n){e.values.set(n.subarray(0,2),2*t)},Da=function(e,t,n){e.values[t]=12*n[0]+n[1]%12};da.prototype.visitBool=function(e,t,n){var r=e.offset,i=e.values,a=r+t;n?i[a>>3]|=1<>3]&=~(1<0){var i=t.children||[],a={nullValues:t.nullValues},o=Array.isArray(i)?function(e,t){return i[t]||a}:function(e){var t=e.name;return i[t]||a};n.children.forEach((function(t,n){var i=t.type,a=o(t,n);r.children.push(e(Ft(Ft({},a),{},{type:i})))}))}return r},Object.keys(Yt).map((function(e){return Yt[e]})).filter((function(e){return"number"===typeof e&&e!==Yt.NONE})).forEach((function(e){Ma.visit(e).prototype._setValue=Fa.getVisitFn(e)})),gi.prototype._setValue=Fa.visitBinary,function(e){!function(t){!function(t){!function(t){var n=function(){function t(){Object(F.a)(this,t),this.bb=null,this.bb_pos=0}return Object(C.a)(t,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"version",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Nt.apache.arrow.flatbuf.MetadataVersion.V1}},{key:"schema",value:function(e){var t=this.bb.__offset(this.bb_pos,6);return t?(e||new Nt.apache.arrow.flatbuf.Schema).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}},{key:"dictionaries",value:function(t,n){var r=this.bb.__offset(this.bb_pos,8);return r?(n||new e.apache.arrow.flatbuf.Block).__init(this.bb.__vector(this.bb_pos+r)+24*t,this.bb):null}},{key:"dictionariesLength",value:function(){var e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"recordBatches",value:function(t,n){var r=this.bb.__offset(this.bb_pos,10);return r?(n||new e.apache.arrow.flatbuf.Block).__init(this.bb.__vector(this.bb_pos+r)+24*t,this.bb):null}},{key:"recordBatchesLength",value:function(){var e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}}],[{key:"getRootAsFooter",value:function(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}},{key:"startFooter",value:function(e){e.startObject(4)}},{key:"addVersion",value:function(e,t){e.addFieldInt16(0,t,Nt.apache.arrow.flatbuf.MetadataVersion.V1)}},{key:"addSchema",value:function(e,t){e.addFieldOffset(1,t,0)}},{key:"addDictionaries",value:function(e,t){e.addFieldOffset(2,t,0)}},{key:"startDictionariesVector",value:function(e,t){e.startVector(24,t,8)}},{key:"addRecordBatches",value:function(e,t){e.addFieldOffset(3,t,0)}},{key:"startRecordBatchesVector",value:function(e,t){e.startVector(24,t,8)}},{key:"endFooter",value:function(e){return e.endObject()}},{key:"finishFooterBuffer",value:function(e,t){e.finish(t)}},{key:"createFooter",value:function(e,n,r,i,a){return t.startFooter(e),t.addVersion(e,n),t.addSchema(e,r),t.addDictionaries(e,i),t.addRecordBatches(e,a),t.endFooter(e)}}]),t}();t.Footer=n}(t.flatbuf||(t.flatbuf={}))}(t.arrow||(t.arrow={}))}(e.apache||(e.apache={}))}(La||(La={})),function(e){!function(e){!function(e){!function(e){var t=function(){function e(){Object(F.a)(this,e),this.bb=null,this.bb_pos=0}return Object(C.a)(e,[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,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(e,t,n,r){return e.prep(8,24),e.writeInt64(r),e.pad(4),e.writeInt32(n),e.writeInt64(t),e.offset()}}]),e}();e.Block=t}(e.flatbuf||(e.flatbuf={}))}(e.arrow||(e.arrow={}))}(e.apache||(e.apache={}))}(La||(La={}));var Na=$.Long,Ua=$.Builder,Pa=$.ByteBuffer,Ra=La.apache.arrow.flatbuf.Block,Va=La.apache.arrow.flatbuf.Footer,za=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Zt.V4,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;Object(F.a)(this,e),this.schema=t,this.version=n,r&&(this._recordBatches=r),i&&(this._dictionaryBatches=i)}return Object(C.a)(e,[{key:"numRecordBatches",get:function(){return this._recordBatches.length}},{key:"numDictionaries",get:function(){return this._dictionaryBatches.length}},{key:"recordBatches",value:N().mark((function e(){var t,n,r;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=-1,r=this.numRecordBatches;case 1:if(!(++n=0&&e=0&&e=0&&e=0&&e0)return Mt(Object(Ct.a)(n.prototype),"write",this).call(this,e)}},{key:"toString",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?ae(this.toUint8Array(!0)):this.toUint8Array(!1).then(ae)}},{key:"toUint8Array",value:function(){var e=this;return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?Ne(this._values)[0]:L(N().mark((function t(){var n,r,i,a,o,u,s,c;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],r=0,i=!1,a=!1,t.prev=3,u=Y(e);case 5:return t.next=7,u.next();case 7:if(!(i=!(s=t.sent).done)){t.next=14;break}c=s.value,n.push(c),r+=c.byteLength;case 11:i=!1,t.next=5;break;case 14:t.next=20;break;case 16:t.prev=16,t.t0=t.catch(3),a=!0,o=t.t0;case 20:if(t.prev=20,t.prev=21,!i||null==u.return){t.next=25;break}return t.next=25,u.return();case 25:if(t.prev=25,!a){t.next=28;break}throw o;case 28:return t.finish(25);case 29:return t.finish(20);case 30:return t.abrupt("return",Ne(n,r)[0]);case 31:case"end":return t.stop()}}),t,null,[[3,16,20,30],[21,,25,29]])})))()}}]),n}(he),$a=function(e){function t(e){Object(F.a)(this,t),e&&(this.source=new Qa(wt.fromIterable(e)))}return Object(C.a)(t,[{key:e,value:function(){return this}},{key:"next",value:function(e){return this.source.next(e)}},{key:"throw",value:function(e){return this.source.throw(e)}},{key:"return",value:function(e){return this.source.return(e)}},{key:"peek",value:function(e){return this.source.peek(e)}},{key:"read",value:function(e){return this.source.read(e)}}]),t}(Symbol.iterator),Ka=function(e){function t(e){Object(F.a)(this,t),e instanceof t?this.source=e.source:e instanceof Ha?this.source=new qa(wt.fromAsyncIterable(e)):De(e)?this.source=new qa(wt.fromNodeStream(e)):Be(e)?this.source=new qa(wt.fromDOMStream(e)):Ae(e)?this.source=new qa(wt.fromDOMStream(e.body)):xe(e)?this.source=new qa(wt.fromIterable(e)):(je(e)||Se(e))&&(this.source=new qa(wt.fromAsyncIterable(e)))}return Object(C.a)(t,[{key:e,value:function(){return this}},{key:"next",value:function(e){return this.source.next(e)}},{key:"throw",value:function(e){return this.source.throw(e)}},{key:"return",value:function(e){return this.source.return(e)}},{key:"closed",get:function(){return this.source.closed}},{key:"cancel",value:function(e){return this.source.cancel(e)}},{key:"peek",value:function(e){return this.source.peek(e)}},{key:"read",value:function(e){return this.source.read(e)}}]),t}(Symbol.asyncIterator),Qa=function(){function e(t){Object(F.a)(this,e),this.source=t}return Object(C.a)(e,[{key:"cancel",value:function(e){this.return(e)}},{key:"peek",value:function(e){return this.next(e,"peek").value}},{key:"read",value:function(e){return this.next(e,"read").value}},{key:"next",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"read";return this.source.next({cmd:t,size:e})}},{key:"throw",value:function(e){return Object.create(this.source.throw&&this.source.throw(e)||ce)}},{key:"return",value:function(e){return Object.create(this.source.return&&this.source.return(e)||ce)}}]),e}(),qa=function(){function e(t){var n=this;Object(F.a)(this,e),this.source=t,this._closedPromise=new Promise((function(e){return n._closedPromiseResolve=e}))}return Object(C.a)(e,[{key:"cancel",value:function(){var e=L(N().mark((function e(t){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.return(t);case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"closed",get:function(){return this._closedPromise}},{key:"read",value:function(){var e=L(N().mark((function e(t){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.next(t,"read");case 2:return e.abrupt("return",e.sent.value);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"peek",value:function(){var e=L(N().mark((function e(t){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.next(t,"peek");case 2:return e.abrupt("return",e.sent.value);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"next",value:function(){var e=L(N().mark((function e(t){var n,r=arguments;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:"read",e.next=3,this.source.next({cmd:n,size:t});case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"throw",value:function(){var e=L(N().mark((function e(t){var n;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t1=this.source.throw,!e.t1){e.next=5;break}return e.next=4,this.source.throw(t);case 4:e.t1=e.sent;case 5:if(e.t0=e.t1,e.t0){e.next=8;break}e.t0=ce;case 8:return n=e.t0,this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,e.abrupt("return",Object.create(n));case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"return",value:function(){var e=L(N().mark((function e(t){var n;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t1=this.source.return,!e.t1){e.next=5;break}return e.next=4,this.source.return(t);case 4:e.t1=e.sent;case 5:if(e.t0=e.t1,e.t0){e.next=8;break}e.t0=ce;case 8:return n=e.t0,this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,e.abrupt("return",Object.create(n));case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),Ga=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e,r){var i;return Object(F.a)(this,n),(i=t.call(this)).position=0,i.buffer=We(e),i.size="undefined"===typeof r?i.buffer.byteLength:r,i}return Object(C.a)(n,[{key:"readInt32",value:function(e){var t=this.readAt(e,4),n=t.buffer,r=t.byteOffset;return new DataView(n,r).getInt32(0,!0)}},{key:"seek",value:function(e){return this.position=Math.min(e,this.size),e>>16,65535&this.buffer[1],this.buffer[0]>>>16,65535&this.buffer[0]]),n=new Uint32Array([e.buffer[1]>>>16,65535&e.buffer[1],e.buffer[0]>>>16,65535&e.buffer[0]]),r=t[3]*n[3];this.buffer[0]=65535&r;var i=r>>>16;return i+=r=t[2]*n[3],i+=r=t[3]*n[2]>>>0,this.buffer[0]+=i<<16,this.buffer[1]=i>>>0>>16,this.buffer[1]+=t[1]*n[3]+t[2]*n[2]+t[3]*n[1],this.buffer[1]+=t[0]*n[3]+t[1]*n[2]+t[2]*n[1]+t[3]*n[0]<<16,this}},{key:"_plus",value:function(e){var t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t>>0&&++this.buffer[1],this.buffer[0]=t}},{key:"lessThan",value:function(e){return this.buffer[1]1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);return n.fromString("string"===typeof e?e:e.toString(),t)}},{key:"fromNumber",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);return n.fromString(e.toString(),t)}},{key:"fromString",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2),r=e.length,i=new n(t),a=0;a1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);return n.fromString("string"===typeof e?e:e.toString(),t)}},{key:"fromNumber",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);return n.fromString(e.toString(),t)}},{key:"fromString",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2),r=e.startsWith("-"),i=e.length,a=new n(t),o=r?1:0;o>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]>>0&&++t[1],t[1]>>0&&++t[2],t[2]>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}},{key:"hex",value:function(){return"".concat(Za(this.buffer[3])," ").concat(Za(this.buffer[2])," ").concat(Za(this.buffer[1])," ").concat(Za(this.buffer[0]))}}],[{key:"multiply",value:function(t,n){return new e(new Uint32Array(t.buffer)).times(n)}},{key:"add",value:function(t,n){return new e(new Uint32Array(t.buffer)).plus(n)}},{key:"from",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(4);return e.fromString("string"===typeof t?t:t.toString(),n)}},{key:"fromNumber",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(4);return e.fromString(t.toString(),n)}},{key:"fromString",value:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(4),r=t.startsWith("-"),i=t.length,a=new e(n),o=r?1:0;o1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode()).length;return or.Null(e,0,t)}},{key:"visitBool",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.Bool(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitInt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.Int(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitFloat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.Float(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitUtf8",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.Utf8(e,0,n,r,this.readNullBitmap(e,r),this.readOffsets(e),this.readData(e))}},{key:"visitBinary",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.Binary(e,0,n,r,this.readNullBitmap(e,r),this.readOffsets(e),this.readData(e))}},{key:"visitFixedSizeBinary",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.FixedSizeBinary(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitDate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.Date(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitTimestamp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.Timestamp(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitTime",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.Time(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitDecimal",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.Decimal(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitList",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.List(e,0,n,r,this.readNullBitmap(e,r),this.readOffsets(e),this.visit(e.children[0]))}},{key:"visitStruct",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.Struct(e,0,n,r,this.readNullBitmap(e,r),this.visitMany(e.children))}},{key:"visitUnion",value:function(e){return e.mode===qt.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}},{key:"visitDenseUnion",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.Union(e,0,n,r,this.readNullBitmap(e,r),this.readTypeIds(e),this.readOffsets(e),this.visitMany(e.children))}},{key:"visitSparseUnion",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.Union(e,0,n,r,this.readNullBitmap(e,r),this.readTypeIds(e),this.visitMany(e.children))}},{key:"visitDictionary",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.Dictionary(e,0,n,r,this.readNullBitmap(e,r),this.readData(e.indices),this.readDictionary(e))}},{key:"visitInterval",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.Interval(e,0,n,r,this.readNullBitmap(e,r),this.readData(e))}},{key:"visitFixedSizeList",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.FixedSizeList(e,0,n,r,this.readNullBitmap(e,r),this.visit(e.children[0]))}},{key:"visitMap",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode(),n=t.length,r=t.nullCount;return or.Map(e,0,n,r,this.readNullBitmap(e,r),this.readOffsets(e),this.visit(e.children[0]))}},{key:"nextFieldNode",value:function(){return this.nodes[++this.nodesIndex]}},{key:"nextBufferRange",value:function(){return this.buffers[++this.buffersIndex]}},{key:"readNullBitmap",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.nextBufferRange();return t>0&&this.readData(e,n)||new Uint8Array(0)}},{key:"readOffsets",value:function(e,t){return this.readData(e,t)}},{key:"readTypeIds",value:function(e,t){return this.readData(e,t)}},{key:"readData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextBufferRange(),n=t.length,r=t.offset;return this.bytes.subarray(r,r+n)}},{key:"readDictionary",value:function(e){return this.dictionaries.get(e.id)}}]),n}(fn),ao=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e,r,i,a){var o;return Object(F.a)(this,n),(o=t.call(this,new Uint8Array(0),r,i,a)).sources=e,o}return Object(C.a)(n,[{key:"readNullBitmap",value:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.nextBufferRange()).offset;return t<=0?new Uint8Array(0):an(this.sources[n])}},{key:"readOffsets",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextBufferRange()).offset;return Ue(Uint8Array,Ue(Int32Array,this.sources[t]))}},{key:"readTypeIds",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextBufferRange()).offset;return Ue(Uint8Array,Ue(e.ArrayType,this.sources[t]))}},{key:"readData",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextBufferRange()).offset,n=this.sources;return xn.isTimestamp(e)||(xn.isInt(e)||xn.isTime(e))&&64===e.bitWidth||xn.isDate(e)&&e.unit===$t.MILLISECOND?Ue(Uint8Array,no.convertArray(n[t])):xn.isDecimal(e)?Ue(Uint8Array,ro.convertArray(n[t])):xn.isBinary(e)||xn.isFixedSizeBinary(e)?function(e){for(var t=e.join(""),n=new Uint8Array(t.length/2),r=0;r>1]=parseInt(t.substr(r,2),16);return n}(n[t]):xn.isBool(e)?an(n[t]):xn.isUtf8(e)?oe(n[t].join("")):Ue(Uint8Array,Ue(e.ArrayType,n[t].map((function(e){return+e}))))}}]),n}(io);var oo=$.Long,uo=Nt.apache.arrow.flatbuf.Null,so=Nt.apache.arrow.flatbuf.Int,co=Nt.apache.arrow.flatbuf.FloatingPoint,lo=Nt.apache.arrow.flatbuf.Binary,fo=Nt.apache.arrow.flatbuf.Bool,ho=Nt.apache.arrow.flatbuf.Utf8,po=Nt.apache.arrow.flatbuf.Decimal,yo=Nt.apache.arrow.flatbuf.Date,vo=Nt.apache.arrow.flatbuf.Time,bo=Nt.apache.arrow.flatbuf.Timestamp,mo=Nt.apache.arrow.flatbuf.Interval,go=Nt.apache.arrow.flatbuf.List,ko=Nt.apache.arrow.flatbuf.Struct_,wo=Nt.apache.arrow.flatbuf.Union,_o=Nt.apache.arrow.flatbuf.DictionaryEncoding,Oo=Nt.apache.arrow.flatbuf.FixedSizeBinary,jo=Nt.apache.arrow.flatbuf.FixedSizeList,xo=Nt.apache.arrow.flatbuf.Map,So=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,[{key:"visit",value:function(e,t){return null==e||null==t?void 0:Mt(Object(Ct.a)(n.prototype),"visit",this).call(this,e,t)}},{key:"visitNull",value:function(e,t){return uo.startNull(t),uo.endNull(t)}},{key:"visitInt",value:function(e,t){return so.startInt(t),so.addBitWidth(t,e.bitWidth),so.addIsSigned(t,e.isSigned),so.endInt(t)}},{key:"visitFloat",value:function(e,t){return co.startFloatingPoint(t),co.addPrecision(t,e.precision),co.endFloatingPoint(t)}},{key:"visitBinary",value:function(e,t){return lo.startBinary(t),lo.endBinary(t)}},{key:"visitBool",value:function(e,t){return fo.startBool(t),fo.endBool(t)}},{key:"visitUtf8",value:function(e,t){return ho.startUtf8(t),ho.endUtf8(t)}},{key:"visitDecimal",value:function(e,t){return po.startDecimal(t),po.addScale(t,e.scale),po.addPrecision(t,e.precision),po.endDecimal(t)}},{key:"visitDate",value:function(e,t){return yo.startDate(t),yo.addUnit(t,e.unit),yo.endDate(t)}},{key:"visitTime",value:function(e,t){return vo.startTime(t),vo.addUnit(t,e.unit),vo.addBitWidth(t,e.bitWidth),vo.endTime(t)}},{key:"visitTimestamp",value:function(e,t){var n=e.timezone&&t.createString(e.timezone)||void 0;return bo.startTimestamp(t),bo.addUnit(t,e.unit),void 0!==n&&bo.addTimezone(t,n),bo.endTimestamp(t)}},{key:"visitInterval",value:function(e,t){return mo.startInterval(t),mo.addUnit(t,e.unit),mo.endInterval(t)}},{key:"visitList",value:function(e,t){return go.startList(t),go.endList(t)}},{key:"visitStruct",value:function(e,t){return ko.startStruct_(t),ko.endStruct_(t)}},{key:"visitUnion",value:function(e,t){wo.startTypeIdsVector(t,e.typeIds.length);var n=wo.createTypeIdsVector(t,e.typeIds);return wo.startUnion(t),wo.addMode(t,e.mode),wo.addTypeIds(t,n),wo.endUnion(t)}},{key:"visitDictionary",value:function(e,t){var n=this.visit(e.indices,t);return _o.startDictionaryEncoding(t),_o.addId(t,new oo(e.id,0)),_o.addIsOrdered(t,e.isOrdered),void 0!==n&&_o.addIndexType(t,n),_o.endDictionaryEncoding(t)}},{key:"visitFixedSizeBinary",value:function(e,t){return Oo.startFixedSizeBinary(t),Oo.addByteWidth(t,e.byteWidth),Oo.endFixedSizeBinary(t)}},{key:"visitFixedSizeList",value:function(e,t){return jo.startFixedSizeList(t),jo.addListSize(t,e.listSize),jo.endFixedSizeList(t)}},{key:"visitMap",value:function(e,t){return xo.startMap(t),xo.addKeysSorted(t,e.keysSorted),xo.endMap(t)}}]),n}(fn),To=new So;function Io(e){return new qo(e.count,Ao(e.columns),Bo(e.columns))}function Eo(e,t){return(e.children||[]).filter(Boolean).map((function(e){return ra.fromJSON(e,t)}))}function Ao(e){return(e||[]).reduce((function(e,t){return[].concat(Object(ln.a)(e),[new Zo(t.count,(n=t.VALIDITY,(n||[]).reduce((function(e,t){return e+ +(0===t)}),0)))],Object(ln.a)(Ao(t.children)));var n}),[])}function Bo(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=-1,r=(e||[]).length;++n1&&void 0!==arguments[1]?arguments[1]:0;if(t instanceof na)return new e(0,Zt.V4,Jt.Schema,t);if(t instanceof qo)return new e(n,Zt.V4,Jt.RecordBatch,t);if(t instanceof Go)return new e(n,Zt.V4,Jt.DictionaryBatch,t);throw new Error("Unrecognized Message header: ".concat(t))}}]),e}(),qo=function(){function e(t,n,r){Object(F.a)(this,e),this._nodes=n,this._buffers=r,this._length="number"===typeof t?t:t.low}return Object(C.a)(e,[{key:"nodes",get:function(){return this._nodes}},{key:"length",get:function(){return this._length}},{key:"buffers",get:function(){return this._buffers}}]),e}(),Go=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Object(F.a)(this,e),this._data=t,this._isDelta=r,this._id="number"===typeof n?n:n.low}return Object(C.a)(e,[{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}}]),e}(),Jo=Object(C.a)((function e(t,n){Object(F.a)(this,e),this.offset="number"===typeof t?t:t.low,this.length="number"===typeof n?n:n.low})),Zo=Object(C.a)((function e(t,n){Object(F.a)(this,e),this.length="number"===typeof t?t:t.low,this.nullCount="number"===typeof n?n:n.low}));function Xo(e,t){for(var n,r=[],i=-1,a=-1,o=e.childrenLength();++i0?Po.createCustomMetadataVector(e,Object(ln.a)(t.metadata).map((function(t){var n=U(t,2),r=n[0],i=n[1],a=e.createString("".concat(r)),o=e.createString("".concat(i));return Wo.startKeyValue(e),Wo.addKey(e,a),Wo.addValue(e,o),Wo.endKeyValue(e)}))):-1;t.name&&(n=e.createString(t.name));Po.startField(e),Po.addType(e,r),Po.addTypeType(e,o),Po.addChildren(e,s),Po.addNullable(e,!!t.nullable),-1!==n&&Po.addName(e,n);-1!==i&&Po.addDictionary(e,i);-1!==c&&Po.addCustomMetadata(e,c);return Po.endField(e)},ra.decode=function(e,t){var n,r,i,a,o,u;t&&(u=e.dictionary())?t.has(n=u.id().low)?(a=(a=u.indexType())?tu(a):new An,o=new ir(t.get(n),a,n,u.isOrdered()),r=new ra(e.name(),o,e.nullable(),eu(e))):(a=(a=u.indexType())?tu(a):new An,t.set(n,i=nu(e,Xo(e,t))),o=new ir(i,a,n,u.isOrdered()),r=new ra(e.name(),o,e.nullable(),eu(e))):(i=nu(e,Xo(e,t)),r=new ra(e.name(),i,e.nullable(),eu(e)));return r||null},ra.fromJSON=function(e,t){var n,r,i,a,o,u;return t&&(a=e.dictionary)?t.has(n=a.id)?(r=(r=a.indexType)?Lo(r):new An,u=new ir(t.get(n),r,n,a.isOrdered),i=new ra(e.name,u,e.nullable,Do(e.customMetadata))):(r=(r=a.indexType)?Lo(r):new An,t.set(n,o=Fo(e,Eo(e,t))),u=new ir(o,r,n,a.isOrdered),i=new ra(e.name,u,e.nullable,Do(e.customMetadata))):(o=Fo(e,Eo(e,t)),i=new ra(e.name,o,e.nullable,Do(e.customMetadata))),i||null},na.encode=function(e,t){var n=t.fields.map((function(t){return ra.encode(e,t)}));Ro.startFieldsVector(e,n.length);var r=Ro.createFieldsVector(e,n),i=t.metadata&&t.metadata.size>0?Ro.createCustomMetadataVector(e,Object(ln.a)(t.metadata).map((function(t){var n=U(t,2),r=n[0],i=n[1],a=e.createString("".concat(r)),o=e.createString("".concat(i));return Wo.startKeyValue(e),Wo.addKey(e,a),Wo.addValue(e,o),Wo.endKeyValue(e)}))):-1;Ro.startSchema(e),Ro.addFields(e,r),Ro.addEndianness(e,ru?Ho.Little:Ho.Big),-1!==i&&Ro.addCustomMetadata(e,i);return Ro.endSchema(e)},na.decode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map,n=function(e,t){for(var n,r=[],i=-1,a=-1,o=e.fieldsLength();++i1&&void 0!==arguments[1]?arguments[1]:new Map;return new na(function(e,t){return(e.fields||[]).filter(Boolean).map((function(e){return ra.fromJSON(e,t)}))}(e,t),Do(e.customMetadata),t)},qo.encode=function(e,t){var n=t.nodes||[],r=t.buffers||[];$o.startNodesVector(e,n.length),n.slice().reverse().forEach((function(t){return Zo.encode(e,t)}));var i=e.endVector();$o.startBuffersVector(e,r.length),r.slice().reverse().forEach((function(t){return Jo.encode(e,t)}));var a=e.endVector();return $o.startRecordBatch(e),$o.addLength(e,new Co(t.length,0)),$o.addNodes(e,i),$o.addBuffers(e,a),$o.endRecordBatch(e)},qo.decode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Zt.V4;return new qo(e.length(),function(e){for(var t,n=[],r=-1,i=-1,a=e.nodesLength();++r1&&void 0!==arguments[1]?arguments[1]:Zt.V4;return new Go(qo.decode(e.data(),t),e.id(),e.isDelta())},Go.fromJSON=function(e){return new Go(Io(e.data),e.id,e.isDelta)},Zo.encode=function(e,t){return Yo.createFieldNode(e,new Co(t.length,0),new Co(t.nullCount,0))},Zo.decode=function(e){return new Zo(e.length(),e.nullCount())},Jo.encode=function(e,t){return Vo.createBuffer(e,new Co(t.offset,0),new Co(t.length,0))},Jo.decode=function(e){return new Jo(e.offset(),e.length())};for(var ru=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),iu=$.ByteBuffer,au=function(e){return"Expected ".concat(Jt[e]," Message in stream, but was null or length 0.")},ou=function(e){return"Header pointer of flatbuffer-encoded ".concat(Jt[e]," Message is null or length 0.")},uu=function(e,t){return"Expected to read ".concat(e," metadata bytes, but only read ").concat(t,".")},su=function(e,t){return"Expected to read ".concat(e," bytes for message body, but only read ").concat(t,".")},cu=function(e){function t(e){Object(F.a)(this,t),this.source=e instanceof $a?e:new $a(e)}return Object(C.a)(t,[{key:e,value:function(){return this}},{key:"next",value:function(){var e;return(e=this.readMetadataLength()).done||-1===e.value&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?ce:e}},{key:"throw",value:function(e){return this.source.throw(e)}},{key:"return",value:function(e){return this.source.return(e)}},{key:"readMessage",value:function(e){var t;if((t=this.next()).done)return null;if(null!=e&&t.value.headerType!==e)throw new Error(au(e));return t.value}},{key:"readMessageBody",value:function(e){if(e<=0)return new Uint8Array(0);var t=We(this.source.read(e));if(t.byteLength0&&void 0!==arguments[0]&&arguments[0],t=Jt.Schema,n=this.readMessage(t),r=n&&n.header();if(e&&!r)throw new Error(ou(t));return r}},{key:"readMetadataLength",value:function(){var e=this.source.read(hu),t=e&&new iu(e),n=t&&t.readInt32(0)||0;return{done:0===n,value:n}}},{key:"readMetadata",value:function(e){var t=this.source.read(e);if(!t)return ce;if(t.byteLength0&&void 0!==a[0]&&a[0],n=Jt.Schema,e.next=4,this.readMessage(n);case 4:if(r=e.sent,i=r&&r.header(),!t||i){e.next=8;break}throw new Error(ou(n));case 8:return e.abrupt("return",i);case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"readMetadataLength",value:function(){var e=L(N().mark((function e(){var t,n,r;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.source.read(hu);case 2:return t=e.sent,n=t&&new iu(t),r=n&&n.readInt32(0)||0,e.abrupt("return",{done:0===r,value:r});case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"readMetadata",value:function(){var e=L(N().mark((function e(t){var n;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.source.read(t);case 2:if(n=e.sent){e.next=5;break}return e.abrupt("return",ce);case 5:if(!(n.byteLength1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=pu.length;++n2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");xn.isNull(e.type)||wu.call(this,i<=0?new Uint8Array(0):rn(t.offset,r,t.nullBitmap)),this.nodes.push(new Zo(r,i))}return Mt(Object(Ct.a)(n.prototype),"visit",this).call(this,e)}},{key:"visitNull",value:function(e){return this}},{key:"visitDictionary",value:function(e){return this.visit(e.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 e=new n,t=arguments.length,r=new Array(t),i=0;i=e.length?wu.call(this,new Uint8Array(0)):(t=e.values)instanceof Uint8Array?wu.call(this,rn(e.offset,e.length,t)):wu.call(this,an(e))},ku.prototype.visitInt=_u,ku.prototype.visitFloat=_u,ku.prototype.visitUtf8=Ou,ku.prototype.visitBinary=Ou,ku.prototype.visitFixedSizeBinary=_u,ku.prototype.visitDate=_u,ku.prototype.visitTimestamp=_u,ku.prototype.visitTime=_u,ku.prototype.visitDecimal=_u,ku.prototype.visitList=ju,ku.prototype.visitStruct=xu,ku.prototype.visitUnion=function(e){var t=e.type,n=e.length,r=e.typeIds,i=e.valueOffsets;if(wu.call(this,r),t.mode===qt.Sparse)return xu.call(this,e);if(t.mode===qt.Dense){if(e.offset<=0)return wu.call(this,i),xu.call(this,e);for(var a,o,u=r.reduce((function(e,t){return Math.max(e,t)}),r[0]),s=new Int32Array(u+1),c=new Int32Array(u+1).fill(-1),l=new Int32Array(n),f=mt(-i[0],n,i),h=-1;++h0&&void 0!==arguments[0]&&arguments[0];return this._sink.toString(e)}},{key:"toUint8Array",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._sink.toUint8Array(e)}},{key:"writeAll",value:function(e){var t=this;return je(e)?e.then((function(e){return t.writeAll(e)})):Se(e)?Au(this,e):Eu(this,e)}},{key:"closed",get:function(){return this._sink.closed}},{key:t,value:function(){return this._sink[Symbol.asyncIterator]()}},{key:"toDOMStream",value:function(e){return this._sink.toDOMStream(e)}},{key:"toNodeStream",value:function(e){return this._sink.toNodeStream(e)}},{key:"close",value:function(){return this.reset()._sink.close()}},{key:"abort",value:function(e){return this.reset()._sink.abort(e)}},{key:"finish",value:function(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}},{key:"reset",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._sink,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t===this._sink||t instanceof Ha?this._sink=t:(this._sink=new Ha,t&&(Oe(e=t)&&_e(e.abort)&&_e(e.getWriter)&&!(e instanceof fe))?this.toDOMStream({type:"bytes"}).pipeTo(t):t&&function(e){return Oe(e)&&_e(e.end)&&_e(e.write)&&we(e.writable)&&!(e instanceof fe)}(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,n&&n.compareTo(this._schema)||(null===n?(this._position=0,this._schema=null):(this._started=!0,this._schema=n,this._writeSchema(n))),this}},{key:"write",value:function(e){var t=null;if(!this._sink)throw new Error("RecordBatchWriter is closed");if(null===e||void 0===e)return this.finish()&&void 0;if(e instanceof _c&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof Oc&&!(t=e.schema))return this.finish()&&void 0;if(t&&!t.compareTo(this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof Oc?e instanceof jc||this._writeRecordBatch(e):e instanceof _c?this.writeAll(e.chunks):xe(e)&&this.writeAll(e)}},{key:"_writeMessage",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:8)-1,n=Qo.encode(e),r=n.byteLength,i=this._writeLegacyIpcFormat?4:8,a=r+i+t&~t,o=a-r-i;return e.headerType===Jt.RecordBatch?this._recordBatchBlocks.push(new Ya(a,e.bodyLength,this._position)):e.headerType===Jt.DictionaryBatch&&this._dictionaryBlocks.push(new Ya(a,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(a-i)),r>0&&this._write(n),this._writePadding(o)}},{key:"_write",value:function(e){if(this._started){var t=We(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}},{key:"_writeSchema",value:function(e){return this._writeMessage(Qo.from(e))}},{key:"_writeFooter",value:function(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}},{key:"_writeMagic",value:function(){return this._write(pu)}},{key:"_writePadding",value:function(e){return e>0?this._write(new Uint8Array(e)):this}},{key:"_writeRecordBatch",value:function(e){var t=ku.assemble(e),n=t.byteLength,r=t.nodes,i=t.bufferRegions,a=t.buffers,o=new qo(e.length,r,i),u=Qo.from(o,n);return this._writeDictionaries(e)._writeMessage(u)._writeBodyBuffers(a)}},{key:"_writeDictionaryBatch",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));var r=ku.assemble(e),i=r.byteLength,a=r.nodes,o=r.bufferRegions,u=r.buffers,s=new qo(e.length,a,o),c=new Go(s,t,n),l=Qo.from(c,i);return this._writeMessage(l)._writeBodyBuffers(u)}},{key:"_writeBodyBuffers",value:function(e){for(var t,n,r,i=-1,a=e.length;++i0&&(this._write(t),(r=(n+7&-8)-n)>0&&this._writePadding(r));return this}},{key:"_writeDictionaries",value:function(e){var t,n=B(e.dictionaries);try{for(n.s();!(t=n.n()).done;){var r=U(t.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=B("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(l){s.e(l)}finally{s.f()}}}}catch(l){n.e(l)}finally{n.f()}return this}}],[{key:"throughNode",value:function(e){throw new Error('"throughNode" not available in this environment')}},{key:"throughDOM",value:function(e,t){throw new Error('"throughDOM" not available in this environment')}}]),r}(fe,Symbol.asyncIterator),Tu=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,null,[{key:"writeAll",value:function(e,t){var r=new n(t);return je(e)?e.then((function(e){return r.writeAll(e)})):Se(e)?Au(r,e):Eu(r,e)}}]),n}(Su),Iu=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){var e;return Object(F.a)(this,n),(e=t.call(this))._autoDestroy=!0,e}return Object(C.a)(n,[{key:"_writeSchema",value:function(e){return this._writeMagic()._writePadding(2)}},{key:"_writeFooter",value:function(e){var t=za.encode(new za(e,Zt.V4,this._recordBatchBlocks,this._dictionaryBlocks));return Mt(Object(Ct.a)(n.prototype),"_writeFooter",this).call(this,e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}}],[{key:"writeAll",value:function(e){var t=new n;return je(e)?e.then((function(e){return t.writeAll(e)})):Se(e)?Au(t,e):Eu(t,e)}}]),n}(Su);function Eu(e,t){var n=t;t instanceof _c&&(n=t.chunks,e.reset(void 0,t.schema));var r,i=B(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;e.write(a)}}catch(o){i.e(o)}finally{i.f()}return e.finish()}function Au(e,t){return Bu.apply(this,arguments)}function Bu(){return(Bu=L(N().mark((function e(t,n){var r,i,a,o,u,s;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!1,i=!1,e.prev=2,o=Y(n);case 4:return e.next=6,o.next();case 6:if(!(r=!(u=e.sent).done)){e.next=12;break}s=u.value,t.write(s);case 9:r=!1,e.next=4;break;case 12:e.next=18;break;case 14:e.prev=14,e.t0=e.catch(2),i=!0,a=e.t0;case 18:if(e.prev=18,e.prev=19,!r||null==o.return){e.next=23;break}return e.next=23,o.return();case 23:if(e.prev=23,!i){e.next=26;break}throw a;case 26:return e.finish(23);case 27:return e.finish(18);case 28:return e.abrupt("return",t.finish());case 29:case"end":return e.stop()}}),e,null,[[2,14,18,28],[19,,23,27]])})))).apply(this,arguments)}var Du=new Uint8Array(0),Lu=function(e){return[Du,Du,new Uint8Array(e),Du]};function Fu(e,t){return function(e,t){var n,r=Object(ln.a)(e.fields),i=[],a={numBatches:t.reduce((function(e,t){return Math.max(e,t.length)}),0)},o=0,u=0,s=-1,c=t.length,l=[];for(;a.numBatches-- >0;){for(u=Number.POSITIVE_INFINITY,s=-1;++s0&&(i[o++]=[u,l.slice()]))}return[e=new na(r,e.metadata),i.map((function(t){return Nr(Oc,[e].concat(Object(ln.a)(t)))}))]}(e,t.map((function(e){return e instanceof Vi?e.chunks.map((function(e){return e.data})):[e.data]})))}function Cu(e,t,n,r,i){for(var a,o,u=0,s=-1,c=r.length,l=(t+63&-64)>>3;++s=t?u===t?n[s]=a:(n[s]=a.slice(0,t),a=a.slice(t,u-t),i.numBatches=Math.max(i.numBatches,r[s].unshift(a))):((o=e[s]).nullable||(e[s]=o.clone({nullable:!0})),n[s]=a?a._changeLengthAndBackfillNullBitmap(t):or.new(o.type,0,t,t,Lu(l)));return n}function Mu(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Nu=function(e,t){Object(ue.a)(r,e);var n=Object(se.a)(r);function r(e,t){var i;return Object(F.a)(this,r),(i=n.call(this))._children=t,i.numChildren=e.childData.length,i._bindDataAccessors(i.data=e),i}return Object(C.a)(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(Yt[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:t,get:function(){return"".concat(this.VectorName,"<").concat(this.type[Symbol.toStringTag],">")}},{key:"clone",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._children;return Wt.new(e,t)}},{key:"concat",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n0){var t=this.offset+e;return 0!==(this.nullBitmap[t>>3]&1<=this.numChildren?null:(this._children||(this._children=[]))[e]||(this._children[e]=Wt.new(this.data.childData[e]))}},{key:"toJSON",value:function(){return Object(ln.a)(this)}},{key:"_sliceInternal",value:function(e,t,n){return e.clone(e.data.slice(t,n-t),null)}},{key:"_bindDataAccessors",value:function(e){}}]),r}(Wt,Symbol.toStringTag);Nu.prototype[Symbol.isConcatSpreadable]=!0;var Uu=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,[{key:"asUtf8",value:function(){return Wt.new(this.data.clone(new Vn))}}]),n}(Nu),Pu=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,null,[{key:"from",value:function(e){return wc((function(){return new zn}),e)}}]),n}(Nu),Ru=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,null,[{key:"from",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n>>0)},Us=function(e){return new Date(e)},Ps=function(e,t,n){var r=t[n],i=t[n+1];return null!=r&&null!=i?e.subarray(r,i):null},Rs=function(e,t){return function(e,t){return Us(function(e,t){return 864e5*e[t]}(e,t))}(e.values,t)},Vs=function(e,t){return function(e,t){return Us(Ns(e,t))}(e.values,2*t)},zs=function(e,t){var n=e.stride;return e.values[n*t]},Ws=function(e,t){var n=e.stride;return Er(e.values[n*t])},Ys=function(e,t){var n=e.stride,r=e.values,i=e.type;return Qr.new(r.subarray(n*t,n*(t+1)),i.isSigned)},Hs=function(e,t){var n=e.values;return 1e3*Ns(n,2*t)},$s=function(e,t){var n=e.values;return Ns(n,2*t)},Ks=function(e,t){return function(e,t){return e[t+1]/1e3*4294967296+(e[t]>>>0)/1e3}(e.values,2*t)},Qs=function(e,t){return function(e,t){return e[t+1]/1e6*4294967296+(e[t]>>>0)/1e6}(e.values,2*t)},qs=function(e,t){return e.values[e.stride*t]},Gs=function(e,t){return e.values[e.stride*t]},Js=function(e,t){var n=e.values;return Qr.signed(n.subarray(2*t,2*(t+1)))},Zs=function(e,t){var n=e.values;return Qr.signed(n.subarray(2*t,2*(t+1)))},Xs=function(e,t){var n=e.typeIdToChildIndex[e.typeIds[t]],r=e.getChildAt(n);return r?r.get(e.valueOffsets[t]):null},ec=function(e,t){var n=e.typeIdToChildIndex[e.typeIds[t]],r=e.getChildAt(n);return r?r.get(t):null},tc=function(e,t){return e.values.subarray(2*t,2*(t+1))},nc=function(e,t){var n=e.values[t],r=new Int32Array(2);return r[0]=n/12|0,r[1]=n%12|0,r};Ms.prototype.visitNull=function(e,t){return null},Ms.prototype.visitBool=function(e,t){var n=e.offset+t;return 0!==(e.values[n>>3]&1<0?0:-1},ic.prototype.visitBool=ac,ic.prototype.visitInt=ac,ic.prototype.visitInt8=ac,ic.prototype.visitInt16=ac,ic.prototype.visitInt32=ac,ic.prototype.visitInt64=ac,ic.prototype.visitUint8=ac,ic.prototype.visitUint16=ac,ic.prototype.visitUint32=ac,ic.prototype.visitUint64=ac,ic.prototype.visitFloat=ac,ic.prototype.visitFloat16=ac,ic.prototype.visitFloat32=ac,ic.prototype.visitFloat64=ac,ic.prototype.visitUtf8=ac,ic.prototype.visitBinary=ac,ic.prototype.visitFixedSizeBinary=ac,ic.prototype.visitDate=ac,ic.prototype.visitDateDay=ac,ic.prototype.visitDateMillisecond=ac,ic.prototype.visitTimestamp=ac,ic.prototype.visitTimestampSecond=ac,ic.prototype.visitTimestampMillisecond=ac,ic.prototype.visitTimestampMicrosecond=ac,ic.prototype.visitTimestampNanosecond=ac,ic.prototype.visitTime=ac,ic.prototype.visitTimeSecond=ac,ic.prototype.visitTimeMillisecond=ac,ic.prototype.visitTimeMicrosecond=ac,ic.prototype.visitTimeNanosecond=ac,ic.prototype.visitDecimal=ac,ic.prototype.visitList=ac,ic.prototype.visitStruct=ac,ic.prototype.visitUnion=ac,ic.prototype.visitDenseUnion=oc,ic.prototype.visitSparseUnion=oc,ic.prototype.visitDictionary=ac,ic.prototype.visitInterval=ac,ic.prototype.visitIntervalDayTime=ac,ic.prototype.visitIntervalYearMonth=ac,ic.prototype.visitFixedSizeList=ac,ic.prototype.visitMap=ac;var uc=new ic,sc=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n)}(fn);function cc(e){if(e.nullCount>0)return function(e){var t=rc.getVisitFn(e);return on(e.nullBitmap,e.offset,e.length,e,(function(e,n,r,i){return 0!==(r&1<0)?e.values.subarray(0,r)[Symbol.iterator]():N().mark((function t(n){var i;return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=-1;case 1:if(!(++i1?t-1:0),r=1;r0&&(this.get=(t=this.get,function(e){return this.isValid(e)?t.call(this,e):null}),this.set=function(e){return function(t,n){nn(this.nullBitmap,this.offset+t,!(null===n||void 0===n))&&e.call(this,t,n)}}(this.set));var t},Object.keys(Yt).map((function(e){return Yt[e]})).filter((function(e){return"number"===typeof e})).filter((function(e){return e!==Yt.NONE})).forEach((function(e){var t,n=gc.visit(e);n.prototype.get=(t=rc.getVisitFn(e),function(e){return t(this,e)}),n.prototype.set=Cs(Fa.getVisitFn(e)),n.prototype.indexOf=Cs(uc.getVisitFn(e)),n.prototype.toArray=Fs(dc.getVisitFn(e)),n.prototype.getByteWidth=function(e){return function(){return e(this.type)}}(bc.getVisitFn(e)),n.prototype[Symbol.iterator]=Fs(lc.getVisitFn(e))}));var _c=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){var e;Object(F.a)(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,e)}},{key:"getColumn",value:function(e){return this.getColumnAt(this.getColumnIndex(e))}},{key:"getColumnAt",value:function(e){return this.getChildAt(e)}},{key:"getColumnIndex",value:function(e){return this._schema.fields.findIndex((function(t){return t.name===e}))}},{key:"getChildAt",value:function(e){if(e<0||e>=this.numChildren)return null;var t,n,r=this._schema.fields,i=this._children||(this._children=[]);if(n=i[e])return n;if(t=r[e]){var a=this._chunks.map((function(t){return t.getChildAt(e)})).filter((function(e){return null!=e}));if(a.length>0)return i[e]=new Yi(t,a)}return null}},{key:"serialize",value:function(){return(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?Tu:Iu).writeAll(this).toUint8Array(!0)}},{key:"count",value:function(){return this._length}},{key:"select",value:function(){for(var e=this._schema.fields.reduce((function(e,t,n){return e.set(t.name,n)}),new Map),t=arguments.length,n=new Array(t),r=0;r-1}))))}},{key:"selectAt",value:function(){for(var e,t=arguments.length,r=new Array(t),i=0;i3&&void 0!==arguments[3]?arguments[3]:u[r];return void 0===a?t.getColumnAt(r):e.getColumnAt(a)}))),Object(ln.a)(o.map((function(t){return e.getColumnAt(t)})))).filter(Boolean);return Nr(n,Object(ln.a)(Fu(s,c)))}}],[{key:"empty",value:function(){return new n(arguments.length>0&&void 0!==arguments[0]?arguments[0]:new na([]),[])}},{key:"from",value:function(e){if(!e)return n.empty();if("object"===typeof e){var t=xe(e.values)?function(e){var t=e.type;if(t instanceof Jn)return _c.fromStruct(gs.from(e));return null}(e):Se(e.values)?function(e){var t=e.type;if(t instanceof Jn)return gs.from(e).then((function(e){return _c.fromStruct(e)}));return null}(e):null;if(null!==t)return t}var r=Tc.from(e);return je(r)?L(N().mark((function e(){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=n,e.next=3,r;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)})))():r.isSync()&&(r=r.open())?r.schema?new n(r.schema,Object(ln.a)(r)):n.empty():function(){var e=L(N().mark((function e(t){var r,i,a,o,u,s,c,l,f;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:if(r=e.sent,i=r.schema,a=[],!i){e.next=35;break}o=!1,u=!1,e.prev=8,c=Y(r);case 10:return e.next=12,c.next();case 12:if(!(o=!(l=e.sent).done)){e.next=18;break}f=l.value,a.push(f);case 15:o=!1,e.next=10;break;case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(8),u=!0,s=e.t0;case 24:if(e.prev=24,e.prev=25,!o||null==c.return){e.next=29;break}return e.next=29,c.return();case 29:if(e.prev=29,!u){e.next=32;break}throw s;case 32:return e.finish(29);case 33:return e.finish(24);case 34:return e.abrupt("return",new n(i,a));case 35:return e.abrupt("return",n.empty());case 36:case"end":return e.stop()}}),e,null,[[8,20,24,34],[25,,29,33]])})));return function(t){return e.apply(this,arguments)}}()(r.open())}},{key:"fromAsync",value:function(){var e=L(N().mark((function e(t){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.from(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"fromStruct",value:function(e){return n.new(e.data.childData,e.type.children)}},{key:"new",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:this._children;return new n(this._schema,e,t)}},{key:"concat",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r-1}))))}},{key:"selectAt",value:function(){for(var e,t=this,r=arguments.length,i=new Array(r),a=0;a2&&void 0!==arguments[2]?arguments[2]:t.reduce((function(e,t){return Math.max(e,t.length)}),0),a=-1,o=t.length,u=Object(ln.a)(e.fields),s=[],c=(i+63&-64)>>3;++a0&&this.dictionaries.set(t.id,n),this}}],[{key:"collect",value:function(e){return(new n).visit(e.data,new Jn(e.schema.fields)).dictionaries}}]),n}(fn),Sc=N().mark(Pc),Tc=function(e,t,n){Object(ue.a)(i,e);var r=Object(se.a)(i);function i(e){var t;return Object(F.a)(this,i),(t=r.call(this))._impl=e,t}return Object(C.a)(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(e){return this._impl.throw(e)}},{key:"return",value:function(e){return this._impl.return(e)}},{key:"cancel",value:function(){return this._impl.cancel()}},{key:"reset",value:function(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}},{key:"open",value:function(e){var t=this,n=this._impl.open(e);return je(n)?n.then((function(){return t})):this}},{key:"readRecordBatch",value:function(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}},{key:t,value:function(){return this._impl[Symbol.iterator]()}},{key:n,value:function(){return this._impl[Symbol.asyncIterator]()}},{key:"toDOMStream",value:function(){var e=this;return wt.toDOMStream(this.isSync()?Dt({},Symbol.iterator,(function(){return e})):Dt({},Symbol.asyncIterator,(function(){return e})))}},{key:"toNodeStream",value:function(){var e=this;return wt.toNodeStream(this.isSync()?Dt({},Symbol.iterator,(function(){return e})):Dt({},Symbol.asyncIterator,(function(){return e})),{objectMode:!0})}}],[{key:"throughNode",value:function(e){throw new Error('"throughNode" not available in this environment')}},{key:"throughDOM",value:function(e,t){throw new Error('"throughDOM" not available in this environment')}},{key:"from",value:function(e){return e instanceof i?e:Te(e)?function(e){return new Ic(new Nc(e))}(e):Ee(e)?function(e){return Wc.apply(this,arguments)}(e):je(e)?L(N().mark((function t(){return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=i,t.next=3,e;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)})))():Ae(e)||Be(e)||De(e)||Se(e)?function(e){return zc.apply(this,arguments)}(new Ka(e)):function(e){var t=e.peek(bu+7&-8);return t&&t.byteLength>=4?vu(t)?new Ac(new Cc(e.read())):new Ic(new Lc(e)):new Ic(new Lc(N().mark((function e(){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))()))}(new $a(e))}},{key:"readAll",value:function(e){return e instanceof i?e.isSync()?Pc(e):Rc(e):Te(e)||ArrayBuffer.isView(e)||xe(e)||Ie(e)?Pc(e):Rc(e)}}]),i}(fe,Symbol.iterator,Symbol.asyncIterator),Ic=function(e,t,n){Object(ue.a)(i,e);var r=Object(se.a)(i);function i(e){var t;return Object(F.a)(this,i),(t=r.call(this,e))._impl=e,t}return Object(C.a)(i,[{key:t,value:function(){return this._impl[Symbol.iterator]()}},{key:n,value:function(){var e=this;return z(N().mark((function t(){return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(W(Y(e[Symbol.iterator]())),"t0",1);case 1:case"end":return t.stop()}}),t)})))()}}]),i}(Tc,Symbol.iterator,Symbol.asyncIterator),Ec=function(e,t,n){Object(ue.a)(i,e);var r=Object(se.a)(i);function i(e){var t;return Object(F.a)(this,i),(t=r.call(this,e))._impl=e,t}return Object(C.a)(i,[{key:t,value:function(){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}},{key:n,value:function(){return this._impl[Symbol.asyncIterator]()}}]),i}(Tc,Symbol.iterator,Symbol.asyncIterator),Ac=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this,e))._impl=e,r}return Object(C.a)(n)}(Ic),Bc=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this,e))._impl=e,r}return Object(C.a)(n)}(Ec),Dc=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map;Object(F.a)(this,e),this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}return Object(C.a)(e,[{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(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}},{key:"_loadRecordBatch",value:function(e,t){return new Oc(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}},{key:"_loadDictionaryBatch",value:function(e,t){var n=e.id,r=e.isDelta,i=e.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(Wt.new(this._loadVectors(i,t,[s])[0])):Wt.new(this._loadVectors(i,t,[s])[0])}return u}},{key:"_loadVectors",value:function(e,t,n){return new io(t,e.nodes,e.buffers,this.dictionaries).visitMany(n)}}]),e}(),Lc=function(e,t){Object(ue.a)(r,e);var n=Object(se.a)(r);function r(e,t){var i;return Object(F.a)(this,r),(i=n.call(this,t))._reader=Te(e)?new fu(i._handle=e):new cu(i._handle=e),i}return Object(C.a)(r,[{key:"isSync",value:function(){return!0}},{key:"isStream",value:function(){return!0}},{key:t,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(e){return this.closed||(this.autoDestroy=Uc(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}},{key:"throw",value:function(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):ce}},{key:"return",value:function(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):ce}},{key:"next",value:function(){if(this.closed)return ce;for(var e,t=this._reader;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else{if(e.isRecordBatch()){this._recordBatchIndex++;var n=e.header(),r=t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(n,r)}}if(e.isDictionaryBatch()){this._dictionaryIndex++;var i=e.header(),a=t.readMessageBody(e.bodyLength),o=this._loadDictionaryBatch(i,a);this.dictionaries.set(i.id,o)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new jc(this.schema)}):this.return()}},{key:"_readNextMessageAndValidate",value:function(e){return this._reader.readMessage(e)}}]),r}(Dc,Symbol.iterator),Fc=function(e,t){Object(ue.a)(r,e);var n=Object(se.a)(r);function r(e,t){var i;return Object(F.a)(this,r),(i=n.call(this,t))._reader=new lu(i._handle=e),i}return Object(C.a)(r,[{key:"isAsync",value:function(){return!0}},{key:"isStream",value:function(){return!0}},{key:t,value:function(){return this}},{key:"cancel",value:function(){var e=L(N().mark((function e(){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.closed||!(this.closed=!0)){e.next=5;break}return e.next=3,this.reset()._reader.return();case 3:this._reader=null,this.dictionaries=null;case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"open",value:function(){var e=L(N().mark((function e(t){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.closed){e.next=10;break}if(this.autoDestroy=Uc(this,t),e.t0=this.schema,e.t0){e.next=7;break}return e.next=6,this._reader.readSchema();case 6:e.t0=this.schema=e.sent;case 7:if(e.t0){e.next=10;break}return e.next=10,this.cancel();case 10:return e.abrupt("return",this);case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"throw",value:function(){var e=L(N().mark((function e(t){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.closed||!this.autoDestroy||!(this.closed=!0)){e.next=4;break}return e.next=3,this.reset()._reader.throw(t);case 3:return e.abrupt("return",e.sent);case 4:return e.abrupt("return",ce);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"return",value:function(){var e=L(N().mark((function e(t){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.closed||!this.autoDestroy||!(this.closed=!0)){e.next=4;break}return e.next=3,this.reset()._reader.return(t);case 3:return e.abrupt("return",e.sent);case 4:return e.abrupt("return",ce);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"next",value:function(){var e=L(N().mark((function e(){var t,n,r,i,a,o,u,s;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.closed){e.next=2;break}return e.abrupt("return",ce);case 2:n=this._reader;case 3:return e.next=5,this._readNextMessageAndValidate();case 5:if(!(t=e.sent)){e.next=31;break}if(!t.isSchema()){e.next=11;break}return e.next=9,this.reset(t.header());case 9:e.next=29;break;case 11:if(!t.isRecordBatch()){e.next=21;break}return this._recordBatchIndex++,r=t.header(),e.next=16,n.readMessageBody(t.bodyLength);case 16:return i=e.sent,a=this._loadRecordBatch(r,i),e.abrupt("return",{done:!1,value:a});case 21:if(!t.isDictionaryBatch()){e.next=29;break}return this._dictionaryIndex++,o=t.header(),e.next=26,n.readMessageBody(t.bodyLength);case 26:u=e.sent,s=this._loadDictionaryBatch(o,u),this.dictionaries.set(o.id,s);case 29:e.next=3;break;case 31:if(!this.schema||0!==this._recordBatchIndex){e.next=34;break}return this._recordBatchIndex++,e.abrupt("return",{done:!1,value:new jc(this.schema)});case 34:return e.next=36,this.return();case 36:return e.abrupt("return",e.sent);case 37:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_readNextMessageAndValidate",value:function(){var e=L(N().mark((function e(t){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._reader.readMessage(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),r}(Dc,Symbol.asyncIterator),Cc=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e,r){return Object(F.a)(this,n),t.call(this,e instanceof Ga?e:new Ga(e),r)}return Object(C.a)(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(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;var t,r=B(this._footer.dictionaryBatches());try{for(r.s();!(t=r.n()).done;){t.value&&this._readDictionaryBatch(this._dictionaryIndex++)}}catch(i){r.e(i)}finally{r.f()}}return Mt(Object(Ct.a)(n.prototype),"open",this).call(this,e)}},{key:"readRecordBatch",value:function(e){if(this.closed)return null;this._footer||this.open();var t=this._footer&&this._footer.getRecordBatch(e);if(t&&this._handle.seek(t.offset)){var n=this._reader.readMessage(Jt.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(e){var t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){var n=this._reader.readMessage(Jt.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 e=this._handle,t=e.size-mu,n=e.readInt32(t),r=e.readAt(t-n,n);return za.decode(r)}},{key:"_readNextMessageAndValidate",value:function(e){if(this._footer||this.open(),this._footer&&this._recordBatchIndex1?r-1:0),a=1;a=4)){e.next=18;break}if(vu(n)){e.next=8;break}e.t1=new Ec(new Fc(t)),e.next=15;break;case 8:return e.t2=Ac,e.t3=Cc,e.next=12,t.read();case 12:e.t4=e.sent,e.t5=new e.t3(e.t4),e.t1=new e.t2(e.t5);case 15:e.t0=e.t1,e.next=19;break;case 18:e.t0=new Ec(new Fc(z(N().mark((function e(){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()));case 19:return e.abrupt("return",e.t0);case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wc(){return(Wc=L(N().mark((function e(t){var n,r,i;return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.stat();case 2:if(n=e.sent,r=n.size,i=new Ja(t,r),!(r>=gu)){e.next=12;break}return e.t0=vu,e.next=9,i.readAt(0,bu+7&-8);case 9:if(e.t1=e.sent,!(0,e.t0)(e.t1)){e.next=12;break}return e.abrupt("return",new Bc(new Mc(i)));case 12:return e.abrupt("return",new Ec(new Fc(i)));case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Yc=["readableStrategy","writableStrategy","queueingStrategy"];var Hc=function(){function e(t){var n,r,i=this;Object(F.a)(this,e),this._numChunks=0,this._finished=!1,this._bufferedSize=0;var a=t.readableStrategy,o=t.writableStrategy,u=t.queueingStrategy,s=void 0===u?"count":u,c=Mu(t,Yc);this._controller=null,this._builder=vr.new(c),this._getSize="bytes"!==s?$c:Kc;var l=Ft({},a).highWaterMark,f=void 0===l?"bytes"===s?Math.pow(2,14):1e3:l,h=Ft({},o).highWaterMark,d=void 0===h?"bytes"===s?Math.pow(2,14):1e3:h;this.readable=new ReadableStream((Dt(n={},"cancel",(function(){i._builder.clear()})),Dt(n,"pull",(function(e){i._maybeFlush(i._builder,i._controller=e)})),Dt(n,"start",(function(e){i._maybeFlush(i._builder,i._controller=e)})),n),{highWaterMark:f,size:"bytes"!==s?$c:Kc}),this.writable=new WritableStream((Dt(r={},"abort",(function(){i._builder.clear()})),Dt(r,"write",(function(){i._maybeFlush(i._builder,i._controller)})),Dt(r,"close",(function(){i._maybeFlush(i._builder.finish(),i._controller)})),r),{highWaterMark:d,size:function(e){return i._writeValueAndReturnChunkSize(e)}})}return Object(C.a)(e,[{key:"_writeValueAndReturnChunkSize",value:function(e){var t=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(e)),this._bufferedSize-t}},{key:"_maybeFlush",value:function(e,t){null!==t&&(this._bufferedSize>=t.desiredSize&&++this._numChunks&&this._enqueue(t,e.toVector()),e.finished&&((e.length>0||0===this._numChunks)&&++this._numChunks&&this._enqueue(t,e.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(t,null)))}},{key:"_enqueue",value:function(e,t){this._bufferedSize=0,this._controller=null,null===t?e.close():e.enqueue(t)}}]),e}(),$c=function(e){return e.length},Kc=function(e){return e.byteLength};var Qc=function(){function e(){Object(F.a)(this,e)}return Object(C.a)(e,[{key:"eq",value:function(t){return t instanceof e||(t=new qc(t)),new nl(this,t)}},{key:"le",value:function(t){return t instanceof e||(t=new qc(t)),new rl(this,t)}},{key:"ge",value:function(t){return t instanceof e||(t=new qc(t)),new il(this,t)}},{key:"lt",value:function(e){return new al(this.ge(e))}},{key:"gt",value:function(e){return new al(this.le(e))}},{key:"ne",value:function(e){return new al(this.eq(e))}}]),e}(),qc=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this)).v=e,r}return Object(C.a)(n)}(Qc),Gc=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this)).name=e,r}return Object(C.a)(n,[{key:"bind",value:function(e){if(!this.colidx){this.colidx=-1;for(var t=e.schema.fields,n=-1;++n=n.v;return function(){return r}}},{key:"_bindColCol",value:function(e,t,n){var r=t.bind(e),i=n.bind(e);return function(e,t){return r(e,t)>=i(e,t)}}},{key:"_bindColLit",value:function(e,t,n){var r=t.bind(e);return function(e,t){return r(e,t)>=n.v}}},{key:"_bindLitCol",value:function(e,t,n){var r=n.bind(e);return function(e,n){return t.v>=r(e,n)}}}]),n}(Zc),al=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(e){var r;return Object(F.a)(this,n),(r=t.call(this)).child=e,r}return Object(C.a)(n,[{key:"bind",value:function(e){var t=this.child.bind(e);return function(e,n){return!t(e,n)}}}]),n}(Jc);_c.prototype.countBy=function(e){return new ol(this.chunks).countBy(e)},_c.prototype.scan=function(e,t){return new ol(this.chunks).scan(e,t)},_c.prototype.scanReverse=function(e,t){return new ol(this.chunks).scanReverse(e,t)},_c.prototype.filter=function(e){return new ol(this.chunks).filter(e)};var ol=function(e){Object(ue.a)(n,e);var t=Object(se.a)(n);function n(){return Object(F.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,[{key:"filter",value:function(e){return new sl(this.chunks,e)}},{key:"scan",value:function(e,t){for(var n=this.chunks,r=n.length,i=-1;++i=0;){var i=n[r];t&&t(i);for(var a=i.length;--a>=0;)e(a,i)}}},{key:"countBy",value:function(e){var t=this.chunks,n=t.length,r="string"===typeof e?new Gc(e):e;r.bind(t[n-1]);var i=r.vector;if(!xn.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)&&(t&&!o&&(t(i),o=!0),e(u,i))}},{key:"count",value:function(){for(var e=0,t=this._chunks,n=t.length,r=-1;++r=2?Uint16Array:Uint8Array)(i.dictionary.length),u=-1;++u=i.headerRows&&t=i.headerColumns;if(n){var o=["blank"];return t>0&&o.push("level"+e),{type:"blank",classNames:o.join(" "),content:""}}if(a)return{type:"columns",classNames:(o=["col_heading","level"+e,"col"+(s=t-i.headerColumns)]).join(" "),content:i.getContent(i.columnsTable,s,e)};if(r){o=["row_heading","level"+t,"row"+(u=e-i.headerRows)];return{type:"index",id:"T_"+i.uuid+"level"+t+"_row"+u,classNames:o.join(" "),content:i.getContent(i.indexTable,u,t)}}o=["data","row"+(u=e-i.headerRows),"col"+(s=t-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(e,t,n){var r=e.getColumnAt(n);return null===r?"":i.getColumnTypeId(e,n)===Yt.Timestamp?i.nanosToDate(r.get(t)):r.get(t)},this.dataTable=_c.from(e),this.indexTable=_c.from(t),this.columnsTable=_c.from(n),this.styler=r?{caption:r.caption,displayValuesTable:_c.from(r.displayValues),styles:r.styles,uuid:r.uuid}:void 0}return Object.defineProperty(e.prototype,"rows",{get:function(){return this.indexTable.length+this.columnsTable.numCols},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return this.indexTable.numCols+this.columnsTable.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"headerRows",{get:function(){return this.rows-this.dataRows},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"headerColumns",{get:function(){return this.columns-this.dataColumns},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataRows",{get:function(){return this.dataTable.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataColumns",{get:function(){return this.dataTable.numCols},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uuid",{get:function(){return this.styler&&this.styler.uuid},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"caption",{get:function(){return this.styler&&this.styler.caption},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"styles",{get:function(){return this.styler&&this.styler.styles},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"table",{get:function(){return this.dataTable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"index",{get:function(){return this.indexTable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columnTable",{get:function(){return this.columnsTable},enumerable:!0,configurable:!0}),e.prototype.serialize=function(){return{data:this.dataTable.serialize(),index:this.indexTable.serialize(),columns:this.columnsTable.serialize()}},e.prototype.getColumnTypeId=function(e,t){return e.schema.fields[t].type.typeId},e.prototype.nanosToDate=function(e){return new Date(e/1e6)},e}(),fl=function(){return fl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?e.argsDataframeToObject(t.dfs):{};n=fl(fl({},n),r);var i=Boolean(t.disabled),a=t.theme;a&&dl(a);var o={disabled:i,args:n,theme:a},u=new CustomEvent(e.RENDER_EVENT,{detail:o});e.events.dispatchEvent(u)},e.argsDataframeToObject=function(t){var n=t.map((function(t){var n=t.key,r=t.value;return[n,e.toArrowTable(r)]}));return Object.fromEntries(n)},e.toArrowTable=function(e){var t=e.data,n=t.data,r=t.index,i=t.columns,a=t.styler;return new ll(n,r,i,a)},e.sendBackMsg=function(e,t){window.parent.postMessage(fl({isStreamlitMessage:!0,type:e},t),"*")},e}(),dl=function(e){var t=document.createElement("style");document.head.appendChild(t),t.innerHTML="\n :root {\n --primary-color: "+e.primaryColor+";\n --background-color: "+e.backgroundColor+";\n --secondary-background-color: "+e.secondaryBackgroundColor+";\n --text-color: "+e.textColor+";\n --font: "+e.font+";\n }\n\n body {\n background-color: var(--background-color);\n color: var(--text-color);\n }\n "};var pl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pl(t,e),t.prototype.componentDidMount=function(){hl.setFrameHeight()},t.prototype.componentDidUpdate=function(){hl.setFrameHeight()},t}(h.a.PureComponent);function vl(e){var t=function(t){function n(n){var r=t.call(this,n)||this;return r.componentDidMount=function(){hl.events.addEventListener(hl.RENDER_EVENT,r.onRenderEvent),hl.setComponentReady()},r.componentDidUpdate=function(){null!=r.state.componentError&&hl.setFrameHeight()},r.componentWillUnmount=function(){hl.events.removeEventListener(hl.RENDER_EVENT,r.onRenderEvent)},r.onRenderEvent=function(e){var t=e;r.setState({renderData:t.detail})},r.render=function(){return null!=r.state.componentError?h.a.createElement("div",null,h.a.createElement("h1",null,"Component Error"),h.a.createElement("span",null,r.state.componentError.message)):null==r.state.renderData?null:h.a.createElement(e,{width:window.innerWidth,disabled:r.state.renderData.disabled,args:r.state.renderData.args,theme:r.state.renderData.theme})},r.state={renderData:void 0,componentError:void 0},r}return pl(n,t),n.getDerivedStateFromError=function(e){return{componentError:e}},n}(h.a.PureComponent);return l()(t,e)}},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,o,u=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;sA.length&&A.push(e)}function L(e,t,n,r){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var u=!1;if(null===e)u=!0;else switch(i){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case a:case o:u=!0}}if(u)return n(r,e,""===t?"."+C(e,0):t),1;if(u=0,t=""===t?".":t+":",Array.isArray(e))for(var s=0;s