{"version":3,"file":"bundle.js","sources":["../../node_modules/svelte/internal/index.mjs","../../node_modules/event-target-shim/dist/event-target-shim.mjs","../../node_modules/flatbuffers/js/flatbuffers.mjs","../../node_modules/text-encoding-utf-8/lib/encoding.lib.mjs","../../node_modules/apache-arrow/util/utf8.mjs","../../node_modules/apache-arrow/io/interfaces.mjs","../../node_modules/apache-arrow/util/compat.mjs","../../node_modules/apache-arrow/util/buffer.mjs","../../node_modules/apache-arrow/io/adapters.mjs","../../node_modules/apache-arrow/vector.mjs","../../node_modules/apache-arrow/fb/Schema.mjs","../../node_modules/apache-arrow/fb/Message.mjs","../../node_modules/apache-arrow/enum.mjs","../../node_modules/apache-arrow/util/bit.mjs","../../node_modules/apache-arrow/visitor.mjs","../../node_modules/apache-arrow/visitor/typecomparator.mjs","../../node_modules/apache-arrow/type.mjs","../../node_modules/apache-arrow/data.mjs","../../node_modules/apache-arrow/util/pretty.mjs","../../node_modules/apache-arrow/builder/valid.mjs","../../node_modules/apache-arrow/builder/buffer.mjs","../../node_modules/apache-arrow/builder.mjs","../../node_modules/apache-arrow/builder/bool.mjs","../../node_modules/apache-arrow/builder/null.mjs","../../node_modules/apache-arrow/builder/date.mjs","../../node_modules/apache-arrow/builder/decimal.mjs","../../node_modules/apache-arrow/builder/dictionary.mjs","../../node_modules/apache-arrow/builder/fixedsizebinary.mjs","../../node_modules/apache-arrow/util/math.mjs","../../node_modules/apache-arrow/builder/float.mjs","../../node_modules/apache-arrow/util/bn.mjs","../../node_modules/apache-arrow/builder/int.mjs","../../node_modules/apache-arrow/builder/time.mjs","../../node_modules/apache-arrow/builder/timestamp.mjs","../../node_modules/apache-arrow/builder/interval.mjs","../../node_modules/apache-arrow/builder/binary.mjs","../../node_modules/apache-arrow/builder/utf8.mjs","../../node_modules/apache-arrow/builder/run.mjs","../../node_modules/apache-arrow/vector/row.mjs","../../node_modules/apache-arrow/util/vector.mjs","../../node_modules/apache-arrow/vector/chunked.mjs","../../node_modules/apache-arrow/column.mjs","../../node_modules/apache-arrow/util/args.mjs","../../node_modules/apache-arrow/schema.mjs","../../node_modules/apache-arrow/builder/list.mjs","../../node_modules/apache-arrow/builder/fixedsizelist.mjs","../../node_modules/apache-arrow/builder/map.mjs","../../node_modules/apache-arrow/builder/struct.mjs","../../node_modules/apache-arrow/builder/union.mjs","../../node_modules/apache-arrow/visitor/set.mjs","../../node_modules/apache-arrow/visitor/builderctor.mjs","../../node_modules/apache-arrow/fb/File.mjs","../../node_modules/apache-arrow/builder/index.mjs","../../node_modules/apache-arrow/ipc/metadata/file.mjs","../../node_modules/apache-arrow/io/stream.mjs","../../node_modules/apache-arrow/io/file.mjs","../../node_modules/apache-arrow/util/int.mjs","../../node_modules/apache-arrow/visitor/vectorloader.mjs","../../node_modules/apache-arrow/visitor/typeassembler.mjs","../../node_modules/apache-arrow/ipc/metadata/json.mjs","../../node_modules/apache-arrow/ipc/metadata/message.mjs","../../node_modules/apache-arrow/ipc/message.mjs","../../node_modules/apache-arrow/visitor/vectorassembler.mjs","../../node_modules/apache-arrow/ipc/writer.mjs","../../node_modules/apache-arrow/util/recordbatch.mjs","../../node_modules/apache-arrow/vector/base.mjs","../../node_modules/apache-arrow/vector/binary.mjs","../../node_modules/apache-arrow/vector/bool.mjs","../../node_modules/apache-arrow/vector/date.mjs","../../node_modules/apache-arrow/vector/decimal.mjs","../../node_modules/apache-arrow/vector/dictionary.mjs","../../node_modules/apache-arrow/vector/fixedsizebinary.mjs","../../node_modules/apache-arrow/vector/fixedsizelist.mjs","../../node_modules/apache-arrow/vector/float.mjs","../../node_modules/apache-arrow/vector/interval.mjs","../../node_modules/apache-arrow/vector/int.mjs","../../node_modules/apache-arrow/vector/list.mjs","../../node_modules/apache-arrow/vector/map.mjs","../../node_modules/apache-arrow/vector/null.mjs","../../node_modules/apache-arrow/vector/struct.mjs","../../node_modules/apache-arrow/vector/timestamp.mjs","../../node_modules/apache-arrow/vector/time.mjs","../../node_modules/apache-arrow/vector/union.mjs","../../node_modules/apache-arrow/vector/utf8.mjs","../../node_modules/apache-arrow/util/fn.mjs","../../node_modules/apache-arrow/visitor/get.mjs","../../node_modules/apache-arrow/visitor/indexof.mjs","../../node_modules/apache-arrow/visitor/iterator.mjs","../../node_modules/apache-arrow/visitor/toarray.mjs","../../node_modules/apache-arrow/visitor/bytewidth.mjs","../../node_modules/apache-arrow/visitor/vectorctor.mjs","../../node_modules/apache-arrow/vector/index.mjs","../../node_modules/apache-arrow/table.mjs","../../node_modules/apache-arrow/recordbatch.mjs","../../node_modules/apache-arrow/ipc/reader.mjs","../../node_modules/apache-arrow/io/whatwg/builder.mjs","../../node_modules/apache-arrow/compute/predicate.mjs","../../node_modules/apache-arrow/compute/dataframe.mjs","../../node_modules/apache-arrow/Arrow.dom.mjs","../../node_modules/apache-arrow/io/whatwg/iterable.mjs","../../node_modules/apache-arrow/io/whatwg/reader.mjs","../../node_modules/apache-arrow/io/whatwg/writer.mjs","../../src/streamlit/ArrowTable.ts","../../src/streamlit/streamlit.ts","../../src/streamlit/WithStreamlitConnection.svelte","../../src/streamlit/setStreamlitLifecycle.ts","../../src/ImageGallery.svelte","../../src/main.ts"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nlet src_url_equal_anchor;\nfunction src_url_equal(element_src, url) {\n if (!src_url_equal_anchor) {\n src_url_equal_anchor = document.createElement('a');\n }\n src_url_equal_anchor.href = url;\n return element_src === src_url_equal_anchor.href;\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\nfunction get_all_dirty_from_scope($$scope) {\n if ($$scope.ctx.length > 32) {\n const dirty = [];\n const length = $$scope.ctx.length / 32;\n for (let i = 0; i < length; i++) {\n dirty[i] = -1;\n }\n return dirty;\n }\n return -1;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached if target is not \n let children = target.childNodes;\n // If target is , there may be children without claim_order\n if (target.nodeName === 'HEAD') {\n const myChildren = [];\n for (let i = 0; i < children.length; i++) {\n const node = children[i];\n if (node.claim_order !== undefined) {\n myChildren.push(node);\n }\n }\n children = myChildren;\n }\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n // with fast path for when we are on the current longest subsequence\n const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n const append_styles_to = get_root_for_style(target);\n if (!append_styles_to.getElementById(style_sheet_id)) {\n const style = element('style');\n style.id = style_sheet_id;\n style.textContent = styles;\n append_stylesheet(append_styles_to, style);\n }\n}\nfunction get_root_for_style(node) {\n if (!node)\n return document;\n const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n if (root && root.host) {\n return root;\n }\n return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n const style_element = element('style');\n append_stylesheet(get_root_for_style(node), style_element);\n return style_element;\n}\nfunction append_stylesheet(node, style) {\n append(node.head || node, style);\n}\nfunction append_hydration(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentElement !== target))) {\n target.actual_end_child = target.firstChild;\n }\n // Skip nodes of undefined ordering\n while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n target.actual_end_child = target.actual_end_child.nextSibling;\n }\n if (node !== target.actual_end_child) {\n // We only insert if the ordering of this node should be modified or the parent node is not target\n if (node.claim_order !== undefined || node.parentNode !== target) {\n target.insertBefore(node, target.actual_end_child);\n }\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target || node.nextSibling !== null) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append_hydration(target, node);\n }\n else if (node.parentNode !== target || node.nextSibling != anchor) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction trusted(fn) {\n return function (event) {\n // @ts-ignore\n if (event.isTrusted)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n init_claim_info(nodes);\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else if (replacement === undefined) {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n return undefined;\n }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n const dataStr = '' + data;\n if (node.data.startsWith(dataStr)) {\n if (node.data.length !== dataStr.length) {\n return node.splitText(dataStr.length);\n }\n }\n else {\n node.data = dataStr;\n }\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTagHydration();\n }\n init_claim_info(nodes);\n const html_tag_nodes = nodes.splice(start_index, end_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n for (const n of claimed_nodes) {\n n.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n }\n return new HtmlTagHydration(claimed_nodes);\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n select.selectedIndex = -1; // no option should be selected\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, bubbles = false) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor() {\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.c(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nclass HtmlTagHydration extends HtmlTag {\n constructor(claimed_nodes) {\n super();\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n c(html) {\n if (this.l) {\n this.n = this.l;\n }\n else {\n super.c(html);\n }\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert_hydration(this.t, this.n[i], anchor);\n }\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\nconst active_docs = new Set();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = get_root_for_style(node);\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = append_empty_stylesheet(node).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction getAllContexts() {\n return get_current_component().$$.context;\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n flushing = false;\n seen_callbacks.clear();\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n started = true;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = (program.b - t);\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction escape_attribute_value(value) {\n return typeof value === 'string' ? escape(value) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false,\n root: options.target || parent_component.$$.root\n };\n append_styles && append_styles($$.root);\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.44.1' }, detail), true));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to separate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, HtmlTagHydration, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, src_url_equal, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","/**\n * @author Toru Nagashima \n * @copyright 2015 Toru Nagashima. All rights reserved.\n * See LICENSE file in root directory for full license.\n */\n/**\n * @typedef {object} PrivateData\n * @property {EventTarget} eventTarget The event target.\n * @property {{type:string}} event The original event object.\n * @property {number} eventPhase The current event phase.\n * @property {EventTarget|null} currentTarget The current event target.\n * @property {boolean} canceled The flag to prevent default.\n * @property {boolean} stopped The flag to stop propagation.\n * @property {boolean} immediateStopped The flag to stop propagation immediately.\n * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null.\n * @property {number} timeStamp The unix time.\n * @private\n */\n\n/**\n * Private data for event wrappers.\n * @type {WeakMap}\n * @private\n */\nconst privateData = new WeakMap();\n\n/**\n * Cache for wrapper classes.\n * @type {WeakMap}\n * @private\n */\nconst wrappers = new WeakMap();\n\n/**\n * Get private data.\n * @param {Event} event The event object to get private data.\n * @returns {PrivateData} The private data of the event.\n * @private\n */\nfunction pd(event) {\n const retv = privateData.get(event);\n console.assert(\n retv != null,\n \"'this' is expected an Event object, but got\",\n event\n );\n return retv\n}\n\n/**\n * https://dom.spec.whatwg.org/#set-the-canceled-flag\n * @param data {PrivateData} private data.\n */\nfunction setCancelFlag(data) {\n if (data.passiveListener != null) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(\n \"Unable to preventDefault inside passive event listener invocation.\",\n data.passiveListener\n );\n }\n return\n }\n if (!data.event.cancelable) {\n return\n }\n\n data.canceled = true;\n if (typeof data.event.preventDefault === \"function\") {\n data.event.preventDefault();\n }\n}\n\n/**\n * @see https://dom.spec.whatwg.org/#interface-event\n * @private\n */\n/**\n * The event wrapper.\n * @constructor\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Event|{type:string}} event The original event to wrap.\n */\nfunction Event(eventTarget, event) {\n privateData.set(this, {\n eventTarget,\n event,\n eventPhase: 2,\n currentTarget: eventTarget,\n canceled: false,\n stopped: false,\n immediateStopped: false,\n passiveListener: null,\n timeStamp: event.timeStamp || Date.now(),\n });\n\n // https://heycam.github.io/webidl/#Unforgeable\n Object.defineProperty(this, \"isTrusted\", { value: false, enumerable: true });\n\n // Define accessors\n const keys = Object.keys(event);\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (!(key in this)) {\n Object.defineProperty(this, key, defineRedirectDescriptor(key));\n }\n }\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEvent.prototype = {\n /**\n * The type of this event.\n * @type {string}\n */\n get type() {\n return pd(this).event.type\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get target() {\n return pd(this).eventTarget\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n */\n get currentTarget() {\n return pd(this).currentTarget\n },\n\n /**\n * @returns {EventTarget[]} The composed path of this event.\n */\n composedPath() {\n const currentTarget = pd(this).currentTarget;\n if (currentTarget == null) {\n return []\n }\n return [currentTarget]\n },\n\n /**\n * Constant of NONE.\n * @type {number}\n */\n get NONE() {\n return 0\n },\n\n /**\n * Constant of CAPTURING_PHASE.\n * @type {number}\n */\n get CAPTURING_PHASE() {\n return 1\n },\n\n /**\n * Constant of AT_TARGET.\n * @type {number}\n */\n get AT_TARGET() {\n return 2\n },\n\n /**\n * Constant of BUBBLING_PHASE.\n * @type {number}\n */\n get BUBBLING_PHASE() {\n return 3\n },\n\n /**\n * The target of this event.\n * @type {number}\n */\n get eventPhase() {\n return pd(this).eventPhase\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopPropagation() {\n const data = pd(this);\n\n data.stopped = true;\n if (typeof data.event.stopPropagation === \"function\") {\n data.event.stopPropagation();\n }\n },\n\n /**\n * Stop event bubbling.\n * @returns {void}\n */\n stopImmediatePropagation() {\n const data = pd(this);\n\n data.stopped = true;\n data.immediateStopped = true;\n if (typeof data.event.stopImmediatePropagation === \"function\") {\n data.event.stopImmediatePropagation();\n }\n },\n\n /**\n * The flag to be bubbling.\n * @type {boolean}\n */\n get bubbles() {\n return Boolean(pd(this).event.bubbles)\n },\n\n /**\n * The flag to be cancelable.\n * @type {boolean}\n */\n get cancelable() {\n return Boolean(pd(this).event.cancelable)\n },\n\n /**\n * Cancel this event.\n * @returns {void}\n */\n preventDefault() {\n setCancelFlag(pd(this));\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n */\n get defaultPrevented() {\n return pd(this).canceled\n },\n\n /**\n * The flag to be composed.\n * @type {boolean}\n */\n get composed() {\n return Boolean(pd(this).event.composed)\n },\n\n /**\n * The unix time of this event.\n * @type {number}\n */\n get timeStamp() {\n return pd(this).timeStamp\n },\n\n /**\n * The target of this event.\n * @type {EventTarget}\n * @deprecated\n */\n get srcElement() {\n return pd(this).eventTarget\n },\n\n /**\n * The flag to stop event bubbling.\n * @type {boolean}\n * @deprecated\n */\n get cancelBubble() {\n return pd(this).stopped\n },\n set cancelBubble(value) {\n if (!value) {\n return\n }\n const data = pd(this);\n\n data.stopped = true;\n if (typeof data.event.cancelBubble === \"boolean\") {\n data.event.cancelBubble = true;\n }\n },\n\n /**\n * The flag to indicate cancellation state.\n * @type {boolean}\n * @deprecated\n */\n get returnValue() {\n return !pd(this).canceled\n },\n set returnValue(value) {\n if (!value) {\n setCancelFlag(pd(this));\n }\n },\n\n /**\n * Initialize this event object. But do nothing under event dispatching.\n * @param {string} type The event type.\n * @param {boolean} [bubbles=false] The flag to be possible to bubble up.\n * @param {boolean} [cancelable=false] The flag to be possible to cancel.\n * @deprecated\n */\n initEvent() {\n // Do nothing.\n },\n};\n\n// `constructor` is not enumerable.\nObject.defineProperty(Event.prototype, \"constructor\", {\n value: Event,\n configurable: true,\n writable: true,\n});\n\n// Ensure `event instanceof window.Event` is `true`.\nif (typeof window !== \"undefined\" && typeof window.Event !== \"undefined\") {\n Object.setPrototypeOf(Event.prototype, window.Event.prototype);\n\n // Make association for wrappers.\n wrappers.set(window.Event.prototype, Event);\n}\n\n/**\n * Get the property descriptor to redirect a given property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to redirect the property.\n * @private\n */\nfunction defineRedirectDescriptor(key) {\n return {\n get() {\n return pd(this).event[key]\n },\n set(value) {\n pd(this).event[key] = value;\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Get the property descriptor to call a given method property.\n * @param {string} key Property name to define property descriptor.\n * @returns {PropertyDescriptor} The property descriptor to call the method property.\n * @private\n */\nfunction defineCallDescriptor(key) {\n return {\n value() {\n const event = pd(this).event;\n return event[key].apply(event, arguments)\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define new wrapper class.\n * @param {Function} BaseEvent The base wrapper class.\n * @param {Object} proto The prototype of the original event.\n * @returns {Function} The defined wrapper class.\n * @private\n */\nfunction defineWrapper(BaseEvent, proto) {\n const keys = Object.keys(proto);\n if (keys.length === 0) {\n return BaseEvent\n }\n\n /** CustomEvent */\n function CustomEvent(eventTarget, event) {\n BaseEvent.call(this, eventTarget, event);\n }\n\n CustomEvent.prototype = Object.create(BaseEvent.prototype, {\n constructor: { value: CustomEvent, configurable: true, writable: true },\n });\n\n // Define accessors.\n for (let i = 0; i < keys.length; ++i) {\n const key = keys[i];\n if (!(key in BaseEvent.prototype)) {\n const descriptor = Object.getOwnPropertyDescriptor(proto, key);\n const isFunc = typeof descriptor.value === \"function\";\n Object.defineProperty(\n CustomEvent.prototype,\n key,\n isFunc\n ? defineCallDescriptor(key)\n : defineRedirectDescriptor(key)\n );\n }\n }\n\n return CustomEvent\n}\n\n/**\n * Get the wrapper class of a given prototype.\n * @param {Object} proto The prototype of the original event to get its wrapper.\n * @returns {Function} The wrapper class.\n * @private\n */\nfunction getWrapper(proto) {\n if (proto == null || proto === Object.prototype) {\n return Event\n }\n\n let wrapper = wrappers.get(proto);\n if (wrapper == null) {\n wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto);\n wrappers.set(proto, wrapper);\n }\n return wrapper\n}\n\n/**\n * Wrap a given event to management a dispatching.\n * @param {EventTarget} eventTarget The event target of this dispatching.\n * @param {Object} event The event to wrap.\n * @returns {Event} The wrapper instance.\n * @private\n */\nfunction wrapEvent(eventTarget, event) {\n const Wrapper = getWrapper(Object.getPrototypeOf(event));\n return new Wrapper(eventTarget, event)\n}\n\n/**\n * Get the immediateStopped flag of a given event.\n * @param {Event} event The event to get.\n * @returns {boolean} The flag to stop propagation immediately.\n * @private\n */\nfunction isStopped(event) {\n return pd(event).immediateStopped\n}\n\n/**\n * Set the current event phase of a given event.\n * @param {Event} event The event to set current target.\n * @param {number} eventPhase New event phase.\n * @returns {void}\n * @private\n */\nfunction setEventPhase(event, eventPhase) {\n pd(event).eventPhase = eventPhase;\n}\n\n/**\n * Set the current target of a given event.\n * @param {Event} event The event to set current target.\n * @param {EventTarget|null} currentTarget New current target.\n * @returns {void}\n * @private\n */\nfunction setCurrentTarget(event, currentTarget) {\n pd(event).currentTarget = currentTarget;\n}\n\n/**\n * Set a passive listener of a given event.\n * @param {Event} event The event to set current target.\n * @param {Function|null} passiveListener New passive listener.\n * @returns {void}\n * @private\n */\nfunction setPassiveListener(event, passiveListener) {\n pd(event).passiveListener = passiveListener;\n}\n\n/**\n * @typedef {object} ListenerNode\n * @property {Function} listener\n * @property {1|2|3} listenerType\n * @property {boolean} passive\n * @property {boolean} once\n * @property {ListenerNode|null} next\n * @private\n */\n\n/**\n * @type {WeakMap>}\n * @private\n */\nconst listenersMap = new WeakMap();\n\n// Listener types\nconst CAPTURE = 1;\nconst BUBBLE = 2;\nconst ATTRIBUTE = 3;\n\n/**\n * Check whether a given value is an object or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an object.\n */\nfunction isObject(x) {\n return x !== null && typeof x === \"object\" //eslint-disable-line no-restricted-syntax\n}\n\n/**\n * Get listeners.\n * @param {EventTarget} eventTarget The event target to get.\n * @returns {Map} The listeners.\n * @private\n */\nfunction getListeners(eventTarget) {\n const listeners = listenersMap.get(eventTarget);\n if (listeners == null) {\n throw new TypeError(\n \"'this' is expected an EventTarget object, but got another value.\"\n )\n }\n return listeners\n}\n\n/**\n * Get the property descriptor for the event attribute of a given event.\n * @param {string} eventName The event name to get property descriptor.\n * @returns {PropertyDescriptor} The property descriptor.\n * @private\n */\nfunction defineEventAttributeDescriptor(eventName) {\n return {\n get() {\n const listeners = getListeners(this);\n let node = listeners.get(eventName);\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n return node.listener\n }\n node = node.next;\n }\n return null\n },\n\n set(listener) {\n if (typeof listener !== \"function\" && !isObject(listener)) {\n listener = null; // eslint-disable-line no-param-reassign\n }\n const listeners = getListeners(this);\n\n // Traverse to the tail while removing old value.\n let prev = null;\n let node = listeners.get(eventName);\n while (node != null) {\n if (node.listenerType === ATTRIBUTE) {\n // Remove old value.\n if (prev !== null) {\n prev.next = node.next;\n } else if (node.next !== null) {\n listeners.set(eventName, node.next);\n } else {\n listeners.delete(eventName);\n }\n } else {\n prev = node;\n }\n\n node = node.next;\n }\n\n // Add new value.\n if (listener !== null) {\n const newNode = {\n listener,\n listenerType: ATTRIBUTE,\n passive: false,\n once: false,\n next: null,\n };\n if (prev === null) {\n listeners.set(eventName, newNode);\n } else {\n prev.next = newNode;\n }\n }\n },\n configurable: true,\n enumerable: true,\n }\n}\n\n/**\n * Define an event attribute (e.g. `eventTarget.onclick`).\n * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite.\n * @param {string} eventName The event name to define.\n * @returns {void}\n */\nfunction defineEventAttribute(eventTargetPrototype, eventName) {\n Object.defineProperty(\n eventTargetPrototype,\n `on${eventName}`,\n defineEventAttributeDescriptor(eventName)\n );\n}\n\n/**\n * Define a custom EventTarget with event attributes.\n * @param {string[]} eventNames Event names for event attributes.\n * @returns {EventTarget} The custom EventTarget.\n * @private\n */\nfunction defineCustomEventTarget(eventNames) {\n /** CustomEventTarget */\n function CustomEventTarget() {\n EventTarget.call(this);\n }\n\n CustomEventTarget.prototype = Object.create(EventTarget.prototype, {\n constructor: {\n value: CustomEventTarget,\n configurable: true,\n writable: true,\n },\n });\n\n for (let i = 0; i < eventNames.length; ++i) {\n defineEventAttribute(CustomEventTarget.prototype, eventNames[i]);\n }\n\n return CustomEventTarget\n}\n\n/**\n * EventTarget.\n *\n * - This is constructor if no arguments.\n * - This is a function which returns a CustomEventTarget constructor if there are arguments.\n *\n * For example:\n *\n * class A extends EventTarget {}\n * class B extends EventTarget(\"message\") {}\n * class C extends EventTarget(\"message\", \"error\") {}\n * class D extends EventTarget([\"message\", \"error\"]) {}\n */\nfunction EventTarget() {\n /*eslint-disable consistent-return */\n if (this instanceof EventTarget) {\n listenersMap.set(this, new Map());\n return\n }\n if (arguments.length === 1 && Array.isArray(arguments[0])) {\n return defineCustomEventTarget(arguments[0])\n }\n if (arguments.length > 0) {\n const types = new Array(arguments.length);\n for (let i = 0; i < arguments.length; ++i) {\n types[i] = arguments[i];\n }\n return defineCustomEventTarget(types)\n }\n throw new TypeError(\"Cannot call a class as a function\")\n /*eslint-enable consistent-return */\n}\n\n// Should be enumerable, but class methods are not enumerable.\nEventTarget.prototype = {\n /**\n * Add a given listener to this event target.\n * @param {string} eventName The event name to add.\n * @param {Function} listener The listener to add.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n addEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n if (typeof listener !== \"function\" && !isObject(listener)) {\n throw new TypeError(\"'listener' should be a function or an object.\")\n }\n\n const listeners = getListeners(this);\n const optionsIsObj = isObject(options);\n const capture = optionsIsObj\n ? Boolean(options.capture)\n : Boolean(options);\n const listenerType = capture ? CAPTURE : BUBBLE;\n const newNode = {\n listener,\n listenerType,\n passive: optionsIsObj && Boolean(options.passive),\n once: optionsIsObj && Boolean(options.once),\n next: null,\n };\n\n // Set it as the first node if the first node is null.\n let node = listeners.get(eventName);\n if (node === undefined) {\n listeners.set(eventName, newNode);\n return\n }\n\n // Traverse to the tail while checking duplication..\n let prev = null;\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n // Should ignore duplication.\n return\n }\n prev = node;\n node = node.next;\n }\n\n // Add it.\n prev.next = newNode;\n },\n\n /**\n * Remove a given listener from this event target.\n * @param {string} eventName The event name to remove.\n * @param {Function} listener The listener to remove.\n * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.\n * @returns {void}\n */\n removeEventListener(eventName, listener, options) {\n if (listener == null) {\n return\n }\n\n const listeners = getListeners(this);\n const capture = isObject(options)\n ? Boolean(options.capture)\n : Boolean(options);\n const listenerType = capture ? CAPTURE : BUBBLE;\n\n let prev = null;\n let node = listeners.get(eventName);\n while (node != null) {\n if (\n node.listener === listener &&\n node.listenerType === listenerType\n ) {\n if (prev !== null) {\n prev.next = node.next;\n } else if (node.next !== null) {\n listeners.set(eventName, node.next);\n } else {\n listeners.delete(eventName);\n }\n return\n }\n\n prev = node;\n node = node.next;\n }\n },\n\n /**\n * Dispatch a given event.\n * @param {Event|{type:string}} event The event to dispatch.\n * @returns {boolean} `false` if canceled.\n */\n dispatchEvent(event) {\n if (event == null || typeof event.type !== \"string\") {\n throw new TypeError('\"event.type\" should be a string.')\n }\n\n // If listeners aren't registered, terminate.\n const listeners = getListeners(this);\n const eventName = event.type;\n let node = listeners.get(eventName);\n if (node == null) {\n return true\n }\n\n // Since we cannot rewrite several properties, so wrap object.\n const wrappedEvent = wrapEvent(this, event);\n\n // This doesn't process capturing phase and bubbling phase.\n // This isn't participating in a tree.\n let prev = null;\n while (node != null) {\n // Remove this listener if it's once\n if (node.once) {\n if (prev !== null) {\n prev.next = node.next;\n } else if (node.next !== null) {\n listeners.set(eventName, node.next);\n } else {\n listeners.delete(eventName);\n }\n } else {\n prev = node;\n }\n\n // Call this listener\n setPassiveListener(\n wrappedEvent,\n node.passive ? node.listener : null\n );\n if (typeof node.listener === \"function\") {\n try {\n node.listener.call(this, wrappedEvent);\n } catch (err) {\n if (\n typeof console !== \"undefined\" &&\n typeof console.error === \"function\"\n ) {\n console.error(err);\n }\n }\n } else if (\n node.listenerType !== ATTRIBUTE &&\n typeof node.listener.handleEvent === \"function\"\n ) {\n node.listener.handleEvent(wrappedEvent);\n }\n\n // Break if `event.stopImmediatePropagation` was called.\n if (isStopped(wrappedEvent)) {\n break\n }\n\n node = node.next;\n }\n setPassiveListener(wrappedEvent, null);\n setEventPhase(wrappedEvent, 0);\n setCurrentTarget(wrappedEvent, null);\n\n return !wrappedEvent.defaultPrevented\n },\n};\n\n// `constructor` is not enumerable.\nObject.defineProperty(EventTarget.prototype, \"constructor\", {\n value: EventTarget,\n configurable: true,\n writable: true,\n});\n\n// Ensure `eventTarget instanceof window.EventTarget` is `true`.\nif (\n typeof window !== \"undefined\" &&\n typeof window.EventTarget !== \"undefined\"\n) {\n Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype);\n}\n\nexport default EventTarget;\nexport { defineEventAttribute, EventTarget };\n//# sourceMappingURL=event-target-shim.mjs.map\n","/// @file\n/// @addtogroup flatbuffers_javascript_api\n/// @{\n/// @cond FLATBUFFERS_INTERNAL\n\n/**\n * @fileoverview\n *\n * Need to suppress 'global this' error so the Node.js export line doesn't cause\n * closure compile to error out.\n * @suppress {globalThis}\n */\n\n/**\n * @const\n * @namespace\n */\nvar flatbuffers = {};\n\n/**\n * @typedef {number}\n */\nflatbuffers.Offset;\n\n/**\n * @typedef {{\n * bb: flatbuffers.ByteBuffer,\n * bb_pos: number\n * }}\n */\nflatbuffers.Table;\n\n/**\n * @type {number}\n * @const\n */\nflatbuffers.SIZEOF_SHORT = 2;\n\n/**\n * @type {number}\n * @const\n */\nflatbuffers.SIZEOF_INT = 4;\n\n/**\n * @type {number}\n * @const\n */\nflatbuffers.FILE_IDENTIFIER_LENGTH = 4;\n\n/**\n * @enum {number}\n */\nflatbuffers.Encoding = {\n UTF8_BYTES: 1,\n UTF16_STRING: 2\n};\n\n/**\n * @type {Int32Array}\n * @const\n */\nflatbuffers.int32 = new Int32Array(2);\n\n/**\n * @type {Float32Array}\n * @const\n */\nflatbuffers.float32 = new Float32Array(flatbuffers.int32.buffer);\n\n/**\n * @type {Float64Array}\n * @const\n */\nflatbuffers.float64 = new Float64Array(flatbuffers.int32.buffer);\n\n/**\n * @type {boolean}\n * @const\n */\nflatbuffers.isLittleEndian = new Uint16Array(new Uint8Array([1, 0]).buffer)[0] === 1;\n\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * @constructor\n * @param {number} low\n * @param {number} high\n */\nflatbuffers.Long = function(low, high) {\n /**\n * @type {number}\n * @const\n */\n this.low = low | 0;\n\n /**\n * @type {number}\n * @const\n */\n this.high = high | 0;\n};\n\n/**\n * @param {number} low\n * @param {number} high\n * @returns {flatbuffers.Long}\n */\nflatbuffers.Long.create = function(low, high) {\n // Special-case zero to avoid GC overhead for default values\n return low == 0 && high == 0 ? flatbuffers.Long.ZERO : new flatbuffers.Long(low, high);\n};\n\n/**\n * @returns {number}\n */\nflatbuffers.Long.prototype.toFloat64 = function() {\n return (this.low >>> 0) + this.high * 0x100000000;\n};\n\n/**\n * @param {flatbuffers.Long} other\n * @returns {boolean}\n */\nflatbuffers.Long.prototype.equals = function(other) {\n return this.low == other.low && this.high == other.high;\n};\n\n/**\n * @type {flatbuffers.Long}\n * @const\n */\nflatbuffers.Long.ZERO = new flatbuffers.Long(0, 0);\n\n/// @endcond\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Create a FlatBufferBuilder.\n *\n * @constructor\n * @param {number=} opt_initial_size\n */\nflatbuffers.Builder = function(opt_initial_size) {\n if (!opt_initial_size) {\n var initial_size = 1024;\n } else {\n var initial_size = opt_initial_size;\n }\n\n /**\n * @type {flatbuffers.ByteBuffer}\n * @private\n */\n this.bb = flatbuffers.ByteBuffer.allocate(initial_size);\n\n /**\n * Remaining space in the ByteBuffer.\n *\n * @type {number}\n * @private\n */\n this.space = initial_size;\n\n /**\n * Minimum alignment encountered so far.\n *\n * @type {number}\n * @private\n */\n this.minalign = 1;\n\n /**\n * The vtable for the current table.\n *\n * @type {Array.}\n * @private\n */\n this.vtable = null;\n\n /**\n * The amount of fields we're actually using.\n *\n * @type {number}\n * @private\n */\n this.vtable_in_use = 0;\n\n /**\n * Whether we are currently serializing a table.\n *\n * @type {boolean}\n * @private\n */\n this.isNested = false;\n\n /**\n * Starting offset of the current struct/table.\n *\n * @type {number}\n * @private\n */\n this.object_start = 0;\n\n /**\n * List of offsets of all vtables.\n *\n * @type {Array.}\n * @private\n */\n this.vtables = [];\n\n /**\n * For the current vector being built.\n *\n * @type {number}\n * @private\n */\n this.vector_num_elems = 0;\n\n /**\n * False omits default values from the serialized data\n *\n * @type {boolean}\n * @private\n */\n this.force_defaults = false;\n};\n\nflatbuffers.Builder.prototype.clear = function() {\n this.bb.clear();\n this.space = this.bb.capacity();\n this.minalign = 1;\n this.vtable = null;\n this.vtable_in_use = 0;\n this.isNested = false;\n this.object_start = 0;\n this.vtables = [];\n this.vector_num_elems = 0;\n this.force_defaults = false;\n};\n\n/**\n * In order to save space, fields that are set to their default value\n * don't get serialized into the buffer. Forcing defaults provides a\n * way to manually disable this optimization.\n *\n * @param {boolean} forceDefaults true always serializes default values\n */\nflatbuffers.Builder.prototype.forceDefaults = function(forceDefaults) {\n this.force_defaults = forceDefaults;\n};\n\n/**\n * Get the ByteBuffer representing the FlatBuffer. Only call this after you've\n * called finish(). The actual data starts at the ByteBuffer's current position,\n * not necessarily at 0.\n *\n * @returns {flatbuffers.ByteBuffer}\n */\nflatbuffers.Builder.prototype.dataBuffer = function() {\n return this.bb;\n};\n\n/**\n * Get the bytes representing the FlatBuffer. Only call this after you've\n * called finish().\n *\n * @returns {Uint8Array}\n */\nflatbuffers.Builder.prototype.asUint8Array = function() {\n return this.bb.bytes().subarray(this.bb.position(), this.bb.position() + this.offset());\n};\n\n/// @cond FLATBUFFERS_INTERNAL\n/**\n * Prepare to write an element of `size` after `additional_bytes` have been\n * written, e.g. if you write a string, you need to align such the int length\n * field is aligned to 4 bytes, and the string data follows it directly. If all\n * you need to do is alignment, `additional_bytes` will be 0.\n *\n * @param {number} size This is the of the new element to write\n * @param {number} additional_bytes The padding size\n */\nflatbuffers.Builder.prototype.prep = function(size, additional_bytes) {\n // Track the biggest thing we've ever aligned to.\n if (size > this.minalign) {\n this.minalign = size;\n }\n\n // Find the amount of alignment needed such that `size` is properly\n // aligned after `additional_bytes`\n var align_size = ((~(this.bb.capacity() - this.space + additional_bytes)) + 1) & (size - 1);\n\n // Reallocate the buffer if needed.\n while (this.space < align_size + size + additional_bytes) {\n var old_buf_size = this.bb.capacity();\n this.bb = flatbuffers.Builder.growByteBuffer(this.bb);\n this.space += this.bb.capacity() - old_buf_size;\n }\n\n this.pad(align_size);\n};\n\n/**\n * @param {number} byte_size\n */\nflatbuffers.Builder.prototype.pad = function(byte_size) {\n for (var i = 0; i < byte_size; i++) {\n this.bb.writeInt8(--this.space, 0);\n }\n};\n\n/**\n * @param {number} value\n */\nflatbuffers.Builder.prototype.writeInt8 = function(value) {\n this.bb.writeInt8(this.space -= 1, value);\n};\n\n/**\n * @param {number} value\n */\nflatbuffers.Builder.prototype.writeInt16 = function(value) {\n this.bb.writeInt16(this.space -= 2, value);\n};\n\n/**\n * @param {number} value\n */\nflatbuffers.Builder.prototype.writeInt32 = function(value) {\n this.bb.writeInt32(this.space -= 4, value);\n};\n\n/**\n * @param {flatbuffers.Long} value\n */\nflatbuffers.Builder.prototype.writeInt64 = function(value) {\n this.bb.writeInt64(this.space -= 8, value);\n};\n\n/**\n * @param {number} value\n */\nflatbuffers.Builder.prototype.writeFloat32 = function(value) {\n this.bb.writeFloat32(this.space -= 4, value);\n};\n\n/**\n * @param {number} value\n */\nflatbuffers.Builder.prototype.writeFloat64 = function(value) {\n this.bb.writeFloat64(this.space -= 8, value);\n};\n/// @endcond\n\n/**\n * Add an `int8` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param {number} value The `int8` to add the the buffer.\n */\nflatbuffers.Builder.prototype.addInt8 = function(value) {\n this.prep(1, 0);\n this.writeInt8(value);\n};\n\n/**\n * Add an `int16` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param {number} value The `int16` to add the the buffer.\n */\nflatbuffers.Builder.prototype.addInt16 = function(value) {\n this.prep(2, 0);\n this.writeInt16(value);\n};\n\n/**\n * Add an `int32` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param {number} value The `int32` to add the the buffer.\n */\nflatbuffers.Builder.prototype.addInt32 = function(value) {\n this.prep(4, 0);\n this.writeInt32(value);\n};\n\n/**\n * Add an `int64` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param {flatbuffers.Long} value The `int64` to add the the buffer.\n */\nflatbuffers.Builder.prototype.addInt64 = function(value) {\n this.prep(8, 0);\n this.writeInt64(value);\n};\n\n/**\n * Add a `float32` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param {number} value The `float32` to add the the buffer.\n */\nflatbuffers.Builder.prototype.addFloat32 = function(value) {\n this.prep(4, 0);\n this.writeFloat32(value);\n};\n\n/**\n * Add a `float64` to the buffer, properly aligned, and grows the buffer (if necessary).\n * @param {number} value The `float64` to add the the buffer.\n */\nflatbuffers.Builder.prototype.addFloat64 = function(value) {\n this.prep(8, 0);\n this.writeFloat64(value);\n};\n\n/// @cond FLATBUFFERS_INTERNAL\n/**\n * @param {number} voffset\n * @param {number} value\n * @param {number} defaultValue\n */\nflatbuffers.Builder.prototype.addFieldInt8 = function(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addInt8(value);\n this.slot(voffset);\n }\n};\n\n/**\n * @param {number} voffset\n * @param {number} value\n * @param {number} defaultValue\n */\nflatbuffers.Builder.prototype.addFieldInt16 = function(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addInt16(value);\n this.slot(voffset);\n }\n};\n\n/**\n * @param {number} voffset\n * @param {number} value\n * @param {number} defaultValue\n */\nflatbuffers.Builder.prototype.addFieldInt32 = function(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addInt32(value);\n this.slot(voffset);\n }\n};\n\n/**\n * @param {number} voffset\n * @param {flatbuffers.Long} value\n * @param {flatbuffers.Long} defaultValue\n */\nflatbuffers.Builder.prototype.addFieldInt64 = function(voffset, value, defaultValue) {\n if (this.force_defaults || !value.equals(defaultValue)) {\n this.addInt64(value);\n this.slot(voffset);\n }\n};\n\n/**\n * @param {number} voffset\n * @param {number} value\n * @param {number} defaultValue\n */\nflatbuffers.Builder.prototype.addFieldFloat32 = function(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addFloat32(value);\n this.slot(voffset);\n }\n};\n\n/**\n * @param {number} voffset\n * @param {number} value\n * @param {number} defaultValue\n */\nflatbuffers.Builder.prototype.addFieldFloat64 = function(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addFloat64(value);\n this.slot(voffset);\n }\n};\n\n/**\n * @param {number} voffset\n * @param {flatbuffers.Offset} value\n * @param {flatbuffers.Offset} defaultValue\n */\nflatbuffers.Builder.prototype.addFieldOffset = function(voffset, value, defaultValue) {\n if (this.force_defaults || value != defaultValue) {\n this.addOffset(value);\n this.slot(voffset);\n }\n};\n\n/**\n * Structs are stored inline, so nothing additional is being added. `d` is always 0.\n *\n * @param {number} voffset\n * @param {flatbuffers.Offset} value\n * @param {flatbuffers.Offset} defaultValue\n */\nflatbuffers.Builder.prototype.addFieldStruct = function(voffset, value, defaultValue) {\n if (value != defaultValue) {\n this.nested(value);\n this.slot(voffset);\n }\n};\n\n/**\n * Structures are always stored inline, they need to be created right\n * where they're used. You'll get this assertion failure if you\n * created it elsewhere.\n *\n * @param {flatbuffers.Offset} obj The offset of the created object\n */\nflatbuffers.Builder.prototype.nested = function(obj) {\n if (obj != this.offset()) {\n throw new Error('FlatBuffers: struct must be serialized inline.');\n }\n};\n\n/**\n * Should not be creating any other object, string or vector\n * while an object is being constructed\n */\nflatbuffers.Builder.prototype.notNested = function() {\n if (this.isNested) {\n throw new Error('FlatBuffers: object serialization must not be nested.');\n }\n};\n\n/**\n * Set the current vtable at `voffset` to the current location in the buffer.\n *\n * @param {number} voffset\n */\nflatbuffers.Builder.prototype.slot = function(voffset) {\n this.vtable[voffset] = this.offset();\n};\n\n/**\n * @returns {flatbuffers.Offset} Offset relative to the end of the buffer.\n */\nflatbuffers.Builder.prototype.offset = function() {\n return this.bb.capacity() - this.space;\n};\n\n/**\n * Doubles the size of the backing ByteBuffer and copies the old data towards\n * the end of the new buffer (since we build the buffer backwards).\n *\n * @param {flatbuffers.ByteBuffer} bb The current buffer with the existing data\n * @returns {flatbuffers.ByteBuffer} A new byte buffer with the old data copied\n * to it. The data is located at the end of the buffer.\n *\n * uint8Array.set() formally takes {Array|ArrayBufferView}, so to pass\n * it a uint8Array we need to suppress the type check:\n * @suppress {checkTypes}\n */\nflatbuffers.Builder.growByteBuffer = function(bb) {\n var old_buf_size = bb.capacity();\n\n // Ensure we don't grow beyond what fits in an int.\n if (old_buf_size & 0xC0000000) {\n throw new Error('FlatBuffers: cannot grow buffer beyond 2 gigabytes.');\n }\n\n var new_buf_size = old_buf_size << 1;\n var nbb = flatbuffers.ByteBuffer.allocate(new_buf_size);\n nbb.setPosition(new_buf_size - old_buf_size);\n nbb.bytes().set(bb.bytes(), new_buf_size - old_buf_size);\n return nbb;\n};\n/// @endcond\n\n/**\n * Adds on offset, relative to where it will be written.\n *\n * @param {flatbuffers.Offset} offset The offset to add.\n */\nflatbuffers.Builder.prototype.addOffset = function(offset) {\n this.prep(flatbuffers.SIZEOF_INT, 0); // Ensure alignment is already done.\n this.writeInt32(this.offset() - offset + flatbuffers.SIZEOF_INT);\n};\n\n/// @cond FLATBUFFERS_INTERNAL\n/**\n * Start encoding a new object in the buffer. Users will not usually need to\n * call this directly. The FlatBuffers compiler will generate helper methods\n * that call this method internally.\n *\n * @param {number} numfields\n */\nflatbuffers.Builder.prototype.startObject = function(numfields) {\n this.notNested();\n if (this.vtable == null) {\n this.vtable = [];\n }\n this.vtable_in_use = numfields;\n for (var i = 0; i < numfields; i++) {\n this.vtable[i] = 0; // This will push additional elements as needed\n }\n this.isNested = true;\n this.object_start = this.offset();\n};\n\n/**\n * Finish off writing the object that is under construction.\n *\n * @returns {flatbuffers.Offset} The offset to the object inside `dataBuffer`\n */\nflatbuffers.Builder.prototype.endObject = function() {\n if (this.vtable == null || !this.isNested) {\n throw new Error('FlatBuffers: endObject called without startObject');\n }\n\n this.addInt32(0);\n var vtableloc = this.offset();\n\n // Trim trailing zeroes.\n var i = this.vtable_in_use - 1;\n for (; i >= 0 && this.vtable[i] == 0; i--) {}\n var trimmed_size = i + 1;\n\n // Write out the current vtable.\n for (; i >= 0; i--) {\n // Offset relative to the start of the table.\n this.addInt16(this.vtable[i] != 0 ? vtableloc - this.vtable[i] : 0);\n }\n\n var standard_fields = 2; // The fields below:\n this.addInt16(vtableloc - this.object_start);\n var len = (trimmed_size + standard_fields) * flatbuffers.SIZEOF_SHORT;\n this.addInt16(len);\n\n // Search for an existing vtable that matches the current one.\n var existing_vtable = 0;\n var vt1 = this.space;\nouter_loop:\n for (i = 0; i < this.vtables.length; i++) {\n var vt2 = this.bb.capacity() - this.vtables[i];\n if (len == this.bb.readInt16(vt2)) {\n for (var j = flatbuffers.SIZEOF_SHORT; j < len; j += flatbuffers.SIZEOF_SHORT) {\n if (this.bb.readInt16(vt1 + j) != this.bb.readInt16(vt2 + j)) {\n continue outer_loop;\n }\n }\n existing_vtable = this.vtables[i];\n break;\n }\n }\n\n if (existing_vtable) {\n // Found a match:\n // Remove the current vtable.\n this.space = this.bb.capacity() - vtableloc;\n\n // Point table to existing vtable.\n this.bb.writeInt32(this.space, existing_vtable - vtableloc);\n } else {\n // No match:\n // Add the location of the current vtable to the list of vtables.\n this.vtables.push(this.offset());\n\n // Point table to current vtable.\n this.bb.writeInt32(this.bb.capacity() - vtableloc, this.offset() - vtableloc);\n }\n\n this.isNested = false;\n return vtableloc;\n};\n/// @endcond\n\n/**\n * Finalize a buffer, poiting to the given `root_table`.\n *\n * @param {flatbuffers.Offset} root_table\n * @param {string=} opt_file_identifier\n */\nflatbuffers.Builder.prototype.finish = function(root_table, opt_file_identifier) {\n if (opt_file_identifier) {\n var file_identifier = opt_file_identifier;\n this.prep(this.minalign, flatbuffers.SIZEOF_INT +\n flatbuffers.FILE_IDENTIFIER_LENGTH);\n if (file_identifier.length != flatbuffers.FILE_IDENTIFIER_LENGTH) {\n throw new Error('FlatBuffers: file identifier must be length ' +\n flatbuffers.FILE_IDENTIFIER_LENGTH);\n }\n for (var i = flatbuffers.FILE_IDENTIFIER_LENGTH - 1; i >= 0; i--) {\n this.writeInt8(file_identifier.charCodeAt(i));\n }\n }\n this.prep(this.minalign, flatbuffers.SIZEOF_INT);\n this.addOffset(root_table);\n this.bb.setPosition(this.space);\n};\n\n/// @cond FLATBUFFERS_INTERNAL\n/**\n * This checks a required field has been set in a given table that has\n * just been constructed.\n *\n * @param {flatbuffers.Offset} table\n * @param {number} field\n */\nflatbuffers.Builder.prototype.requiredField = function(table, field) {\n var table_start = this.bb.capacity() - table;\n var vtable_start = table_start - this.bb.readInt32(table_start);\n var ok = this.bb.readInt16(vtable_start + field) != 0;\n\n // If this fails, the caller will show what field needs to be set.\n if (!ok) {\n throw new Error('FlatBuffers: field ' + field + ' must be set');\n }\n};\n\n/**\n * Start a new array/vector of objects. Users usually will not call\n * this directly. The FlatBuffers compiler will create a start/end\n * method for vector types in generated code.\n *\n * @param {number} elem_size The size of each element in the array\n * @param {number} num_elems The number of elements in the array\n * @param {number} alignment The alignment of the array\n */\nflatbuffers.Builder.prototype.startVector = function(elem_size, num_elems, alignment) {\n this.notNested();\n this.vector_num_elems = num_elems;\n this.prep(flatbuffers.SIZEOF_INT, elem_size * num_elems);\n this.prep(alignment, elem_size * num_elems); // Just in case alignment > int.\n};\n\n/**\n * Finish off the creation of an array and all its elements. The array must be\n * created with `startVector`.\n *\n * @returns {flatbuffers.Offset} The offset at which the newly created array\n * starts.\n */\nflatbuffers.Builder.prototype.endVector = function() {\n this.writeInt32(this.vector_num_elems);\n return this.offset();\n};\n/// @endcond\n\n/**\n * Encode the string `s` in the buffer using UTF-8. If a Uint8Array is passed\n * instead of a string, it is assumed to contain valid UTF-8 encoded data.\n *\n * @param {string|Uint8Array} s The string to encode\n * @return {flatbuffers.Offset} The offset in the buffer where the encoded string starts\n */\nflatbuffers.Builder.prototype.createString = function(s) {\n if (s instanceof Uint8Array) {\n var utf8 = s;\n } else {\n var utf8 = [];\n var i = 0;\n\n while (i < s.length) {\n var codePoint;\n\n // Decode UTF-16\n var a = s.charCodeAt(i++);\n if (a < 0xD800 || a >= 0xDC00) {\n codePoint = a;\n } else {\n var b = s.charCodeAt(i++);\n codePoint = (a << 10) + b + (0x10000 - (0xD800 << 10) - 0xDC00);\n }\n\n // Encode UTF-8\n if (codePoint < 0x80) {\n utf8.push(codePoint);\n } else {\n if (codePoint < 0x800) {\n utf8.push(((codePoint >> 6) & 0x1F) | 0xC0);\n } else {\n if (codePoint < 0x10000) {\n utf8.push(((codePoint >> 12) & 0x0F) | 0xE0);\n } else {\n utf8.push(\n ((codePoint >> 18) & 0x07) | 0xF0,\n ((codePoint >> 12) & 0x3F) | 0x80);\n }\n utf8.push(((codePoint >> 6) & 0x3F) | 0x80);\n }\n utf8.push((codePoint & 0x3F) | 0x80);\n }\n }\n }\n\n this.addInt8(0);\n this.startVector(1, utf8.length, 1);\n this.bb.setPosition(this.space -= utf8.length);\n for (var i = 0, offset = this.space, bytes = this.bb.bytes(); i < utf8.length; i++) {\n bytes[offset++] = utf8[i];\n }\n return this.endVector();\n};\n\n/**\n * A helper function to avoid generated code depending on this file directly.\n *\n * @param {number} low\n * @param {number} high\n * @returns {flatbuffers.Long}\n */\nflatbuffers.Builder.prototype.createLong = function(low, high) {\n return flatbuffers.Long.create(low, high);\n};\n////////////////////////////////////////////////////////////////////////////////\n/// @cond FLATBUFFERS_INTERNAL\n/**\n * Create a new ByteBuffer with a given array of bytes (`Uint8Array`).\n *\n * @constructor\n * @param {Uint8Array} bytes\n */\nflatbuffers.ByteBuffer = function(bytes) {\n /**\n * @type {Uint8Array}\n * @private\n */\n this.bytes_ = bytes;\n\n /**\n * @type {number}\n * @private\n */\n this.position_ = 0;\n};\n\n/**\n * Create and allocate a new ByteBuffer with a given size.\n *\n * @param {number} byte_size\n * @returns {flatbuffers.ByteBuffer}\n */\nflatbuffers.ByteBuffer.allocate = function(byte_size) {\n return new flatbuffers.ByteBuffer(new Uint8Array(byte_size));\n};\n\nflatbuffers.ByteBuffer.prototype.clear = function() {\n this.position_ = 0;\n};\n\n/**\n * Get the underlying `Uint8Array`.\n *\n * @returns {Uint8Array}\n */\nflatbuffers.ByteBuffer.prototype.bytes = function() {\n return this.bytes_;\n};\n\n/**\n * Get the buffer's position.\n *\n * @returns {number}\n */\nflatbuffers.ByteBuffer.prototype.position = function() {\n return this.position_;\n};\n\n/**\n * Set the buffer's position.\n *\n * @param {number} position\n */\nflatbuffers.ByteBuffer.prototype.setPosition = function(position) {\n this.position_ = position;\n};\n\n/**\n * Get the buffer's capacity.\n *\n * @returns {number}\n */\nflatbuffers.ByteBuffer.prototype.capacity = function() {\n return this.bytes_.length;\n};\n\n/**\n * @param {number} offset\n * @returns {number}\n */\nflatbuffers.ByteBuffer.prototype.readInt8 = function(offset) {\n return this.readUint8(offset) << 24 >> 24;\n};\n\n/**\n * @param {number} offset\n * @returns {number}\n */\nflatbuffers.ByteBuffer.prototype.readUint8 = function(offset) {\n return this.bytes_[offset];\n};\n\n/**\n * @param {number} offset\n * @returns {number}\n */\nflatbuffers.ByteBuffer.prototype.readInt16 = function(offset) {\n return this.readUint16(offset) << 16 >> 16;\n};\n\n/**\n * @param {number} offset\n * @returns {number}\n */\nflatbuffers.ByteBuffer.prototype.readUint16 = function(offset) {\n return this.bytes_[offset] | this.bytes_[offset + 1] << 8;\n};\n\n/**\n * @param {number} offset\n * @returns {number}\n */\nflatbuffers.ByteBuffer.prototype.readInt32 = function(offset) {\n return this.bytes_[offset] | this.bytes_[offset + 1] << 8 | this.bytes_[offset + 2] << 16 | this.bytes_[offset + 3] << 24;\n};\n\n/**\n * @param {number} offset\n * @returns {number}\n */\nflatbuffers.ByteBuffer.prototype.readUint32 = function(offset) {\n return this.readInt32(offset) >>> 0;\n};\n\n/**\n * @param {number} offset\n * @returns {flatbuffers.Long}\n */\nflatbuffers.ByteBuffer.prototype.readInt64 = function(offset) {\n return new flatbuffers.Long(this.readInt32(offset), this.readInt32(offset + 4));\n};\n\n/**\n * @param {number} offset\n * @returns {flatbuffers.Long}\n */\nflatbuffers.ByteBuffer.prototype.readUint64 = function(offset) {\n return new flatbuffers.Long(this.readUint32(offset), this.readUint32(offset + 4));\n};\n\n/**\n * @param {number} offset\n * @returns {number}\n */\nflatbuffers.ByteBuffer.prototype.readFloat32 = function(offset) {\n flatbuffers.int32[0] = this.readInt32(offset);\n return flatbuffers.float32[0];\n};\n\n/**\n * @param {number} offset\n * @returns {number}\n */\nflatbuffers.ByteBuffer.prototype.readFloat64 = function(offset) {\n flatbuffers.int32[flatbuffers.isLittleEndian ? 0 : 1] = this.readInt32(offset);\n flatbuffers.int32[flatbuffers.isLittleEndian ? 1 : 0] = this.readInt32(offset + 4);\n return flatbuffers.float64[0];\n};\n\n/**\n * @param {number} offset\n * @param {number|boolean} value\n */\nflatbuffers.ByteBuffer.prototype.writeInt8 = function(offset, value) {\n this.bytes_[offset] = /** @type {number} */(value);\n};\n\n/**\n * @param {number} offset\n * @param {number} value\n */\nflatbuffers.ByteBuffer.prototype.writeUint8 = function(offset, value) {\n this.bytes_[offset] = value;\n};\n\n/**\n * @param {number} offset\n * @param {number} value\n */\nflatbuffers.ByteBuffer.prototype.writeInt16 = function(offset, value) {\n this.bytes_[offset] = value;\n this.bytes_[offset + 1] = value >> 8;\n};\n\n/**\n * @param {number} offset\n * @param {number} value\n */\nflatbuffers.ByteBuffer.prototype.writeUint16 = function(offset, value) {\n this.bytes_[offset] = value;\n this.bytes_[offset + 1] = value >> 8;\n};\n\n/**\n * @param {number} offset\n * @param {number} value\n */\nflatbuffers.ByteBuffer.prototype.writeInt32 = function(offset, value) {\n this.bytes_[offset] = value;\n this.bytes_[offset + 1] = value >> 8;\n this.bytes_[offset + 2] = value >> 16;\n this.bytes_[offset + 3] = value >> 24;\n};\n\n/**\n * @param {number} offset\n * @param {number} value\n */\nflatbuffers.ByteBuffer.prototype.writeUint32 = function(offset, value) {\n this.bytes_[offset] = value;\n this.bytes_[offset + 1] = value >> 8;\n this.bytes_[offset + 2] = value >> 16;\n this.bytes_[offset + 3] = value >> 24;\n};\n\n/**\n * @param {number} offset\n * @param {flatbuffers.Long} value\n */\nflatbuffers.ByteBuffer.prototype.writeInt64 = function(offset, value) {\n this.writeInt32(offset, value.low);\n this.writeInt32(offset + 4, value.high);\n};\n\n/**\n * @param {number} offset\n * @param {flatbuffers.Long} value\n */\nflatbuffers.ByteBuffer.prototype.writeUint64 = function(offset, value) {\n this.writeUint32(offset, value.low);\n this.writeUint32(offset + 4, value.high);\n};\n\n/**\n * @param {number} offset\n * @param {number} value\n */\nflatbuffers.ByteBuffer.prototype.writeFloat32 = function(offset, value) {\n flatbuffers.float32[0] = value;\n this.writeInt32(offset, flatbuffers.int32[0]);\n};\n\n/**\n * @param {number} offset\n * @param {number} value\n */\nflatbuffers.ByteBuffer.prototype.writeFloat64 = function(offset, value) {\n flatbuffers.float64[0] = value;\n this.writeInt32(offset, flatbuffers.int32[flatbuffers.isLittleEndian ? 0 : 1]);\n this.writeInt32(offset + 4, flatbuffers.int32[flatbuffers.isLittleEndian ? 1 : 0]);\n};\n\n/**\n * Return the file identifier. Behavior is undefined for FlatBuffers whose\n * schema does not include a file_identifier (likely points at padding or the\n * start of a the root vtable).\n * @returns {string}\n */\nflatbuffers.ByteBuffer.prototype.getBufferIdentifier = function() {\n if (this.bytes_.length < this.position_ + flatbuffers.SIZEOF_INT +\n flatbuffers.FILE_IDENTIFIER_LENGTH) {\n throw new Error(\n 'FlatBuffers: ByteBuffer is too short to contain an identifier.');\n }\n var result = \"\";\n for (var i = 0; i < flatbuffers.FILE_IDENTIFIER_LENGTH; i++) {\n result += String.fromCharCode(\n this.readInt8(this.position_ + flatbuffers.SIZEOF_INT + i));\n }\n return result;\n};\n\n/**\n * Look up a field in the vtable, return an offset into the object, or 0 if the\n * field is not present.\n *\n * @param {number} bb_pos\n * @param {number} vtable_offset\n * @returns {number}\n */\nflatbuffers.ByteBuffer.prototype.__offset = function(bb_pos, vtable_offset) {\n var vtable = bb_pos - this.readInt32(bb_pos);\n return vtable_offset < this.readInt16(vtable) ? this.readInt16(vtable + vtable_offset) : 0;\n};\n\n/**\n * Initialize any Table-derived type to point to the union at the given offset.\n *\n * @param {flatbuffers.Table} t\n * @param {number} offset\n * @returns {flatbuffers.Table}\n */\nflatbuffers.ByteBuffer.prototype.__union = function(t, offset) {\n t.bb_pos = offset + this.readInt32(offset);\n t.bb = this;\n return t;\n};\n\n/**\n * Create a JavaScript string from UTF-8 data stored inside the FlatBuffer.\n * This allocates a new string and converts to wide chars upon each access.\n *\n * To avoid the conversion to UTF-16, pass flatbuffers.Encoding.UTF8_BYTES as\n * the \"optionalEncoding\" argument. This is useful for avoiding conversion to\n * and from UTF-16 when the data will just be packaged back up in another\n * FlatBuffer later on.\n *\n * @param {number} offset\n * @param {flatbuffers.Encoding=} opt_encoding Defaults to UTF16_STRING\n * @returns {string|Uint8Array}\n */\nflatbuffers.ByteBuffer.prototype.__string = function(offset, opt_encoding) {\n offset += this.readInt32(offset);\n\n var length = this.readInt32(offset);\n var result = '';\n var i = 0;\n\n offset += flatbuffers.SIZEOF_INT;\n\n if (opt_encoding === flatbuffers.Encoding.UTF8_BYTES) {\n return this.bytes_.subarray(offset, offset + length);\n }\n\n while (i < length) {\n var codePoint;\n\n // Decode UTF-8\n var a = this.readUint8(offset + i++);\n if (a < 0xC0) {\n codePoint = a;\n } else {\n var b = this.readUint8(offset + i++);\n if (a < 0xE0) {\n codePoint =\n ((a & 0x1F) << 6) |\n (b & 0x3F);\n } else {\n var c = this.readUint8(offset + i++);\n if (a < 0xF0) {\n codePoint =\n ((a & 0x0F) << 12) |\n ((b & 0x3F) << 6) |\n (c & 0x3F);\n } else {\n var d = this.readUint8(offset + i++);\n codePoint =\n ((a & 0x07) << 18) |\n ((b & 0x3F) << 12) |\n ((c & 0x3F) << 6) |\n (d & 0x3F);\n }\n }\n }\n\n // Encode UTF-16\n if (codePoint < 0x10000) {\n result += String.fromCharCode(codePoint);\n } else {\n codePoint -= 0x10000;\n result += String.fromCharCode(\n (codePoint >> 10) + 0xD800,\n (codePoint & ((1 << 10) - 1)) + 0xDC00);\n }\n }\n\n return result;\n};\n\n/**\n * Retrieve the relative offset stored at \"offset\"\n * @param {number} offset\n * @returns {number}\n */\nflatbuffers.ByteBuffer.prototype.__indirect = function(offset) {\n return offset + this.readInt32(offset);\n};\n\n/**\n * Get the start of data of a vector whose offset is stored at \"offset\" in this object.\n *\n * @param {number} offset\n * @returns {number}\n */\nflatbuffers.ByteBuffer.prototype.__vector = function(offset) {\n return offset + this.readInt32(offset) + flatbuffers.SIZEOF_INT; // data starts after the length\n};\n\n/**\n * Get the length of a vector whose offset is stored at \"offset\" in this object.\n *\n * @param {number} offset\n * @returns {number}\n */\nflatbuffers.ByteBuffer.prototype.__vector_len = function(offset) {\n return this.readInt32(offset + this.readInt32(offset));\n};\n\n/**\n * @param {string} ident\n * @returns {boolean}\n */\nflatbuffers.ByteBuffer.prototype.__has_identifier = function(ident) {\n if (ident.length != flatbuffers.FILE_IDENTIFIER_LENGTH) {\n throw new Error('FlatBuffers: file identifier must be length ' +\n flatbuffers.FILE_IDENTIFIER_LENGTH);\n }\n for (var i = 0; i < flatbuffers.FILE_IDENTIFIER_LENGTH; i++) {\n if (ident.charCodeAt(i) != this.readInt8(this.position_ + flatbuffers.SIZEOF_INT + i)) {\n return false;\n }\n }\n return true;\n};\n\n/**\n * A helper function to avoid generated code depending on this file directly.\n *\n * @param {number} low\n * @param {number} high\n * @returns {flatbuffers.Long}\n */\nflatbuffers.ByteBuffer.prototype.createLong = function(low, high) {\n return flatbuffers.Long.create(low, high);\n};\n\n// Exports for Node.js and RequireJS\nexport { flatbuffers };\n\n/// @endcond\n/// @}\n","'use strict';\n\n// This is free and unencumbered software released into the public domain.\n// See LICENSE.md for more information.\n\n//\n// Utilities\n//\n\n/**\n * @param {number} a The number to test.\n * @param {number} min The minimum value in the range, inclusive.\n * @param {number} max The maximum value in the range, inclusive.\n * @return {boolean} True if a >= min and a <= max.\n */\nfunction inRange(a, min, max) {\n return min <= a && a <= max;\n}\n\n/**\n * @param {*} o\n * @return {Object}\n */\nfunction ToDictionary(o) {\n if (o === undefined) return {};\n if (o === Object(o)) return o;\n throw TypeError('Could not convert argument to dictionary');\n}\n\n/**\n * @param {string} string Input string of UTF-16 code units.\n * @return {!Array.} Code points.\n */\nfunction stringToCodePoints(string) {\n // https://heycam.github.io/webidl/#dfn-obtain-unicode\n\n // 1. Let S be the DOMString value.\n var s = String(string);\n\n // 2. Let n be the length of S.\n var n = s.length;\n\n // 3. Initialize i to 0.\n var i = 0;\n\n // 4. Initialize U to be an empty sequence of Unicode characters.\n var u = [];\n\n // 5. While i < n:\n while (i < n) {\n\n // 1. Let c be the code unit in S at index i.\n var c = s.charCodeAt(i);\n\n // 2. Depending on the value of c:\n\n // c < 0xD800 or c > 0xDFFF\n if (c < 0xD800 || c > 0xDFFF) {\n // Append to U the Unicode character with code point c.\n u.push(c);\n }\n\n // 0xDC00 ≤ c ≤ 0xDFFF\n else if (0xDC00 <= c && c <= 0xDFFF) {\n // Append to U a U+FFFD REPLACEMENT CHARACTER.\n u.push(0xFFFD);\n }\n\n // 0xD800 ≤ c ≤ 0xDBFF\n else if (0xD800 <= c && c <= 0xDBFF) {\n // 1. If i = n−1, then append to U a U+FFFD REPLACEMENT\n // CHARACTER.\n if (i === n - 1) {\n u.push(0xFFFD);\n }\n // 2. Otherwise, i < n−1:\n else {\n // 1. Let d be the code unit in S at index i+1.\n var d = string.charCodeAt(i + 1);\n\n // 2. If 0xDC00 ≤ d ≤ 0xDFFF, then:\n if (0xDC00 <= d && d <= 0xDFFF) {\n // 1. Let a be c & 0x3FF.\n var a = c & 0x3FF;\n\n // 2. Let b be d & 0x3FF.\n var b = d & 0x3FF;\n\n // 3. Append to U the Unicode character with code point\n // 2^16+2^10*a+b.\n u.push(0x10000 + (a << 10) + b);\n\n // 4. Set i to i+1.\n i += 1;\n }\n\n // 3. Otherwise, d < 0xDC00 or d > 0xDFFF. Append to U a\n // U+FFFD REPLACEMENT CHARACTER.\n else {\n u.push(0xFFFD);\n }\n }\n }\n\n // 3. Set i to i+1.\n i += 1;\n }\n\n // 6. Return U.\n return u;\n}\n\n/**\n * @param {!Array.} code_points Array of code points.\n * @return {string} string String of UTF-16 code units.\n */\nfunction codePointsToString(code_points) {\n var s = '';\n for (var i = 0; i < code_points.length; ++i) {\n var cp = code_points[i];\n if (cp <= 0xFFFF) {\n s += String.fromCharCode(cp);\n } else {\n cp -= 0x10000;\n s += String.fromCharCode((cp >> 10) + 0xD800,\n (cp & 0x3FF) + 0xDC00);\n }\n }\n return s;\n}\n\n\n//\n// Implementation of Encoding specification\n// https://encoding.spec.whatwg.org/\n//\n\n//\n// 3. Terminology\n//\n\n/**\n * End-of-stream is a special token that signifies no more tokens\n * are in the stream.\n * @const\n */ var end_of_stream = -1;\n\n/**\n * A stream represents an ordered sequence of tokens.\n *\n * @constructor\n * @param {!(Array.|Uint8Array)} tokens Array of tokens that provide the\n * stream.\n */\nfunction Stream(tokens) {\n /** @type {!Array.} */\n this.tokens = [].slice.call(tokens);\n}\n\nStream.prototype = {\n /**\n * @return {boolean} True if end-of-stream has been hit.\n */\n endOfStream: function() {\n return !this.tokens.length;\n },\n\n /**\n * When a token is read from a stream, the first token in the\n * stream must be returned and subsequently removed, and\n * end-of-stream must be returned otherwise.\n *\n * @return {number} Get the next token from the stream, or\n * end_of_stream.\n */\n read: function() {\n if (!this.tokens.length)\n return end_of_stream;\n return this.tokens.shift();\n },\n\n /**\n * When one or more tokens are prepended to a stream, those tokens\n * must be inserted, in given order, before the first token in the\n * stream.\n *\n * @param {(number|!Array.)} token The token(s) to prepend to the stream.\n */\n prepend: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.unshift(tokens.pop());\n } else {\n this.tokens.unshift(token);\n }\n },\n\n /**\n * When one or more tokens are pushed to a stream, those tokens\n * must be inserted, in given order, after the last token in the\n * stream.\n *\n * @param {(number|!Array.)} token The tokens(s) to prepend to the stream.\n */\n push: function(token) {\n if (Array.isArray(token)) {\n var tokens = /**@type {!Array.}*/(token);\n while (tokens.length)\n this.tokens.push(tokens.shift());\n } else {\n this.tokens.push(token);\n }\n }\n};\n\n//\n// 4. Encodings\n//\n\n// 4.1 Encoders and decoders\n\n/** @const */\nvar finished = -1;\n\n/**\n * @param {boolean} fatal If true, decoding errors raise an exception.\n * @param {number=} opt_code_point Override the standard fallback code point.\n * @return {number} The code point to insert on a decoding error.\n */\nfunction decoderError(fatal, opt_code_point) {\n if (fatal)\n throw TypeError('Decoder error');\n return opt_code_point || 0xFFFD;\n}\n\n/** @interface */\nfunction Decoder() {}\nDecoder.prototype = {\n /**\n * @param {Stream} stream The stream of bytes being decoded.\n * @param {number} bite The next byte read from the stream.\n * @return {?(number|!Array.)} The next code point(s)\n * decoded, or null if not enough data exists in the input\n * stream to decode a complete code point, or |finished|.\n */\n handler: function(stream, bite) {}\n};\n\n/** @interface */\nfunction Encoder() {}\nEncoder.prototype = {\n /**\n * @param {Stream} stream The stream of code points being encoded.\n * @param {number} code_point Next code point read from the stream.\n * @return {(number|!Array.)} Byte(s) to emit, or |finished|.\n */\n handler: function(stream, code_point) {}\n};\n\n//\n// 7. API\n//\n\n/** @const */ var DEFAULT_ENCODING = 'utf-8';\n\n// 7.1 Interface TextDecoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextDecoder(encoding, options) {\n if (!(this instanceof TextDecoder)) {\n return new TextDecoder(encoding, options);\n }\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {boolean} */\n this._BOMseen = false;\n /** @private @type {?Decoder} */\n this._decoder = null;\n /** @private @type {boolean} */\n this._fatal = Boolean(options['fatal']);\n /** @private @type {boolean} */\n this._ignoreBOM = Boolean(options['ignoreBOM']);\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n Object.defineProperty(this, 'fatal', {value: this._fatal});\n Object.defineProperty(this, 'ignoreBOM', {value: this._ignoreBOM});\n}\n\nTextDecoder.prototype = {\n /**\n * @param {ArrayBufferView=} input The buffer of bytes to decode.\n * @param {Object=} options\n * @return {string} The decoded string.\n */\n decode: function decode(input, options) {\n var bytes;\n if (typeof input === 'object' && input instanceof ArrayBuffer) {\n bytes = new Uint8Array(input);\n } else if (typeof input === 'object' && 'buffer' in input &&\n input.buffer instanceof ArrayBuffer) {\n bytes = new Uint8Array(input.buffer,\n input.byteOffset,\n input.byteLength);\n } else {\n bytes = new Uint8Array(0);\n }\n\n options = ToDictionary(options);\n\n if (!this._streaming) {\n this._decoder = new UTF8Decoder({fatal: this._fatal});\n this._BOMseen = false;\n }\n this._streaming = Boolean(options['stream']);\n\n var input_stream = new Stream(bytes);\n\n var code_points = [];\n\n /** @type {?(number|!Array.)} */\n var result;\n\n while (!input_stream.endOfStream()) {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n }\n if (!this._streaming) {\n do {\n result = this._decoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (result === null)\n continue;\n if (Array.isArray(result))\n code_points.push.apply(code_points, /**@type {!Array.}*/(result));\n else\n code_points.push(result);\n } while (!input_stream.endOfStream());\n this._decoder = null;\n }\n\n if (code_points.length) {\n // If encoding is one of utf-8, utf-16be, and utf-16le, and\n // ignore BOM flag and BOM seen flag are unset, run these\n // subsubsteps:\n if (['utf-8'].indexOf(this.encoding) !== -1 &&\n !this._ignoreBOM && !this._BOMseen) {\n // If token is U+FEFF, set BOM seen flag.\n if (code_points[0] === 0xFEFF) {\n this._BOMseen = true;\n code_points.shift();\n } else {\n // Otherwise, if token is not end-of-stream, set BOM seen\n // flag and append token to output.\n this._BOMseen = true;\n }\n }\n }\n\n return codePointsToString(code_points);\n }\n};\n\n// 7.2 Interface TextEncoder\n\n/**\n * @constructor\n * @param {string=} encoding The label of the encoding;\n * defaults to 'utf-8'.\n * @param {Object=} options\n */\nfunction TextEncoder(encoding, options) {\n if (!(this instanceof TextEncoder))\n return new TextEncoder(encoding, options);\n encoding = encoding !== undefined ? String(encoding).toLowerCase() : DEFAULT_ENCODING;\n if (encoding !== DEFAULT_ENCODING) {\n throw new Error('Encoding not supported. Only utf-8 is supported');\n }\n options = ToDictionary(options);\n\n /** @private @type {boolean} */\n this._streaming = false;\n /** @private @type {?Encoder} */\n this._encoder = null;\n /** @private @type {{fatal: boolean}} */\n this._options = {fatal: Boolean(options['fatal'])};\n\n Object.defineProperty(this, 'encoding', {value: 'utf-8'});\n}\n\nTextEncoder.prototype = {\n /**\n * @param {string=} opt_string The string to encode.\n * @param {Object=} options\n * @return {Uint8Array} Encoded bytes, as a Uint8Array.\n */\n encode: function encode(opt_string, options) {\n opt_string = opt_string ? String(opt_string) : '';\n options = ToDictionary(options);\n\n // NOTE: This option is nonstandard. None of the encodings\n // permitted for encoding (i.e. UTF-8, UTF-16) are stateful,\n // so streaming is not necessary.\n if (!this._streaming)\n this._encoder = new UTF8Encoder(this._options);\n this._streaming = Boolean(options['stream']);\n\n var bytes = [];\n var input_stream = new Stream(stringToCodePoints(opt_string));\n /** @type {?(number|!Array.)} */\n var result;\n while (!input_stream.endOfStream()) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n if (!this._streaming) {\n while (true) {\n result = this._encoder.handler(input_stream, input_stream.read());\n if (result === finished)\n break;\n if (Array.isArray(result))\n bytes.push.apply(bytes, /**@type {!Array.}*/(result));\n else\n bytes.push(result);\n }\n this._encoder = null;\n }\n return new Uint8Array(bytes);\n }\n};\n\n//\n// 8. The encoding\n//\n\n// 8.1 utf-8\n\n/**\n * @constructor\n * @implements {Decoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Decoder(options) {\n var fatal = options.fatal;\n\n // utf-8's decoder's has an associated utf-8 code point, utf-8\n // bytes seen, and utf-8 bytes needed (all initially 0), a utf-8\n // lower boundary (initially 0x80), and a utf-8 upper boundary\n // (initially 0xBF).\n var /** @type {number} */ utf8_code_point = 0,\n /** @type {number} */ utf8_bytes_seen = 0,\n /** @type {number} */ utf8_bytes_needed = 0,\n /** @type {number} */ utf8_lower_boundary = 0x80,\n /** @type {number} */ utf8_upper_boundary = 0xBF;\n\n /**\n * @param {Stream} stream The stream of bytes being decoded.\n * @param {number} bite The next byte read from the stream.\n * @return {?(number|!Array.)} The next code point(s)\n * decoded, or null if not enough data exists in the input\n * stream to decode a complete code point.\n */\n this.handler = function(stream, bite) {\n // 1. If byte is end-of-stream and utf-8 bytes needed is not 0,\n // set utf-8 bytes needed to 0 and return error.\n if (bite === end_of_stream && utf8_bytes_needed !== 0) {\n utf8_bytes_needed = 0;\n return decoderError(fatal);\n }\n\n // 2. If byte is end-of-stream, return finished.\n if (bite === end_of_stream)\n return finished;\n\n // 3. If utf-8 bytes needed is 0, based on byte:\n if (utf8_bytes_needed === 0) {\n\n // 0x00 to 0x7F\n if (inRange(bite, 0x00, 0x7F)) {\n // Return a code point whose value is byte.\n return bite;\n }\n\n // 0xC2 to 0xDF\n if (inRange(bite, 0xC2, 0xDF)) {\n // Set utf-8 bytes needed to 1 and utf-8 code point to byte\n // − 0xC0.\n utf8_bytes_needed = 1;\n utf8_code_point = bite - 0xC0;\n }\n\n // 0xE0 to 0xEF\n else if (inRange(bite, 0xE0, 0xEF)) {\n // 1. If byte is 0xE0, set utf-8 lower boundary to 0xA0.\n if (bite === 0xE0)\n utf8_lower_boundary = 0xA0;\n // 2. If byte is 0xED, set utf-8 upper boundary to 0x9F.\n if (bite === 0xED)\n utf8_upper_boundary = 0x9F;\n // 3. Set utf-8 bytes needed to 2 and utf-8 code point to\n // byte − 0xE0.\n utf8_bytes_needed = 2;\n utf8_code_point = bite - 0xE0;\n }\n\n // 0xF0 to 0xF4\n else if (inRange(bite, 0xF0, 0xF4)) {\n // 1. If byte is 0xF0, set utf-8 lower boundary to 0x90.\n if (bite === 0xF0)\n utf8_lower_boundary = 0x90;\n // 2. If byte is 0xF4, set utf-8 upper boundary to 0x8F.\n if (bite === 0xF4)\n utf8_upper_boundary = 0x8F;\n // 3. Set utf-8 bytes needed to 3 and utf-8 code point to\n // byte − 0xF0.\n utf8_bytes_needed = 3;\n utf8_code_point = bite - 0xF0;\n }\n\n // Otherwise\n else {\n // Return error.\n return decoderError(fatal);\n }\n\n // Then (byte is in the range 0xC2 to 0xF4) set utf-8 code\n // point to utf-8 code point << (6 × utf-8 bytes needed) and\n // return continue.\n utf8_code_point = utf8_code_point << (6 * utf8_bytes_needed);\n return null;\n }\n\n // 4. If byte is not in the range utf-8 lower boundary to utf-8\n // upper boundary, run these substeps:\n if (!inRange(bite, utf8_lower_boundary, utf8_upper_boundary)) {\n\n // 1. Set utf-8 code point, utf-8 bytes needed, and utf-8\n // bytes seen to 0, set utf-8 lower boundary to 0x80, and set\n // utf-8 upper boundary to 0xBF.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 2. Prepend byte to stream.\n stream.prepend(bite);\n\n // 3. Return error.\n return decoderError(fatal);\n }\n\n // 5. Set utf-8 lower boundary to 0x80 and utf-8 upper boundary\n // to 0xBF.\n utf8_lower_boundary = 0x80;\n utf8_upper_boundary = 0xBF;\n\n // 6. Increase utf-8 bytes seen by one and set utf-8 code point\n // to utf-8 code point + (byte − 0x80) << (6 × (utf-8 bytes\n // needed − utf-8 bytes seen)).\n utf8_bytes_seen += 1;\n utf8_code_point += (bite - 0x80) << (6 * (utf8_bytes_needed - utf8_bytes_seen));\n\n // 7. If utf-8 bytes seen is not equal to utf-8 bytes needed,\n // continue.\n if (utf8_bytes_seen !== utf8_bytes_needed)\n return null;\n\n // 8. Let code point be utf-8 code point.\n var code_point = utf8_code_point;\n\n // 9. Set utf-8 code point, utf-8 bytes needed, and utf-8 bytes\n // seen to 0.\n utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;\n\n // 10. Return a code point whose value is code point.\n return code_point;\n };\n}\n\n/**\n * @constructor\n * @implements {Encoder}\n * @param {{fatal: boolean}} options\n */\nfunction UTF8Encoder(options) {\n var fatal = options.fatal;\n /**\n * @param {Stream} stream Input stream.\n * @param {number} code_point Next code point read from the stream.\n * @return {(number|!Array.)} Byte(s) to emit.\n */\n this.handler = function(stream, code_point) {\n // 1. If code point is end-of-stream, return finished.\n if (code_point === end_of_stream)\n return finished;\n\n // 2. If code point is in the range U+0000 to U+007F, return a\n // byte whose value is code point.\n if (inRange(code_point, 0x0000, 0x007f))\n return code_point;\n\n // 3. Set count and offset based on the range code point is in:\n var count, offset;\n // U+0080 to U+07FF: 1 and 0xC0\n if (inRange(code_point, 0x0080, 0x07FF)) {\n count = 1;\n offset = 0xC0;\n }\n // U+0800 to U+FFFF: 2 and 0xE0\n else if (inRange(code_point, 0x0800, 0xFFFF)) {\n count = 2;\n offset = 0xE0;\n }\n // U+10000 to U+10FFFF: 3 and 0xF0\n else if (inRange(code_point, 0x10000, 0x10FFFF)) {\n count = 3;\n offset = 0xF0;\n }\n\n // 4.Let bytes be a byte sequence whose first byte is (code\n // point >> (6 × count)) + offset.\n var bytes = [(code_point >> (6 * count)) + offset];\n\n // 5. Run these substeps while count is greater than 0:\n while (count > 0) {\n\n // 1. Set temp to code point >> (6 × (count − 1)).\n var temp = code_point >> (6 * (count - 1));\n\n // 2. Append to bytes 0x80 | (temp & 0x3F).\n bytes.push(0x80 | (temp & 0x3F));\n\n // 3. Decrease count by one.\n count -= 1;\n }\n\n // 6. Return bytes bytes, in order.\n return bytes;\n };\n}\n\nexport {TextEncoder, TextDecoder};\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { toUint8Array } from './buffer';\nimport { TextDecoder as TextDecoderPolyfill, TextEncoder as TextEncoderPolyfill, } from 'text-encoding-utf-8';\n/** @ignore @suppress {missingRequire} */\nconst _Buffer = typeof Buffer === 'function' ? Buffer : null;\n/** @ignore */\nconst useNativeEncoders = typeof TextDecoder === 'function' && typeof TextEncoder === 'function';\n/** @ignore */\nexport const decodeUtf8 = ((TextDecoder) => {\n if (useNativeEncoders || !_Buffer) {\n const decoder = new TextDecoder('utf-8');\n return (buffer) => decoder.decode(buffer);\n }\n return (input) => {\n const { buffer, byteOffset, length } = toUint8Array(input);\n return _Buffer.from(buffer, byteOffset, length).toString();\n };\n})(typeof TextDecoder !== 'undefined' ? TextDecoder : TextDecoderPolyfill);\n/** @ignore */\nexport const encodeUtf8 = ((TextEncoder) => {\n if (useNativeEncoders || !_Buffer) {\n const encoder = new TextEncoder();\n return (value) => encoder.encode(value);\n }\n return (input = '') => toUint8Array(_Buffer.from(input, 'utf8'));\n})(typeof TextEncoder !== 'undefined' ? TextEncoder : TextEncoderPolyfill);\n\n//# sourceMappingURL=utf8.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport streamAdapters from './adapters';\n/** @ignore */\nexport const ITERATOR_DONE = Object.freeze({ done: true, value: void (0) });\n/** @ignore */\nexport class ArrowJSON {\n // @ts-ignore\n constructor(_json) {\n this._json = _json;\n }\n get schema() { return this._json['schema']; }\n get batches() { return (this._json['batches'] || []); }\n get dictionaries() { return (this._json['dictionaries'] || []); }\n}\n/** @ignore */\nexport class ReadableInterop {\n tee() {\n return this._getDOMStream().tee();\n }\n pipe(writable, options) {\n return this._getNodeStream().pipe(writable, options);\n }\n pipeTo(writable, options) { return this._getDOMStream().pipeTo(writable, options); }\n pipeThrough(duplex, options) {\n return this._getDOMStream().pipeThrough(duplex, options);\n }\n _getDOMStream() {\n return this._DOMStream || (this._DOMStream = this.toDOMStream());\n }\n _getNodeStream() {\n return this._nodeStream || (this._nodeStream = this.toNodeStream());\n }\n}\n/** @ignore */\nexport class AsyncQueue extends ReadableInterop {\n constructor() {\n super();\n this._values = [];\n this.resolvers = [];\n this._closedPromise = new Promise((r) => this._closedPromiseResolve = r);\n }\n get closed() { return this._closedPromise; }\n async cancel(reason) { await this.return(reason); }\n write(value) {\n if (this._ensureOpen()) {\n this.resolvers.length <= 0\n ? (this._values.push(value))\n : (this.resolvers.shift().resolve({ done: false, value }));\n }\n }\n abort(value) {\n if (this._closedPromiseResolve) {\n this.resolvers.length <= 0\n ? (this._error = { error: value })\n : (this.resolvers.shift().reject({ done: true, value }));\n }\n }\n close() {\n if (this._closedPromiseResolve) {\n const { resolvers } = this;\n while (resolvers.length > 0) {\n resolvers.shift().resolve(ITERATOR_DONE);\n }\n this._closedPromiseResolve();\n this._closedPromiseResolve = undefined;\n }\n }\n [Symbol.asyncIterator]() { return this; }\n toDOMStream(options) {\n return streamAdapters.toDOMStream((this._closedPromiseResolve || this._error)\n ? this\n : this._values, options);\n }\n toNodeStream(options) {\n return streamAdapters.toNodeStream((this._closedPromiseResolve || this._error)\n ? this\n : this._values, options);\n }\n async throw(_) { await this.abort(_); return ITERATOR_DONE; }\n async return(_) { await this.close(); return ITERATOR_DONE; }\n async read(size) { return (await this.next(size, 'read')).value; }\n async peek(size) { return (await this.next(size, 'peek')).value; }\n next(..._args) {\n if (this._values.length > 0) {\n return Promise.resolve({ done: false, value: this._values.shift() });\n }\n else if (this._error) {\n return Promise.reject({ done: true, value: this._error.error });\n }\n else if (!this._closedPromiseResolve) {\n return Promise.resolve(ITERATOR_DONE);\n }\n else {\n return new Promise((resolve, reject) => {\n this.resolvers.push({ resolve, reject });\n });\n }\n }\n _ensureOpen() {\n if (this._closedPromiseResolve) {\n return true;\n }\n throw new Error(`${this} is closed`);\n }\n}\n\n//# sourceMappingURL=interfaces.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { ReadableInterop } from '../io/interfaces';\n/** @ignore */\nconst [BigIntCtor, BigIntAvailable] = (() => {\n const BigIntUnavailableError = () => { throw new Error('BigInt is not available in this environment'); };\n function BigIntUnavailable() { throw BigIntUnavailableError(); }\n BigIntUnavailable.asIntN = () => { throw BigIntUnavailableError(); };\n BigIntUnavailable.asUintN = () => { throw BigIntUnavailableError(); };\n return typeof BigInt !== 'undefined' ? [BigInt, true] : [BigIntUnavailable, false];\n})();\n/** @ignore */\nconst [BigInt64ArrayCtor, BigInt64ArrayAvailable] = (() => {\n const BigInt64ArrayUnavailableError = () => { throw new Error('BigInt64Array is not available in this environment'); };\n class BigInt64ArrayUnavailable {\n static get BYTES_PER_ELEMENT() { return 8; }\n static of() { throw BigInt64ArrayUnavailableError(); }\n static from() { throw BigInt64ArrayUnavailableError(); }\n constructor() { throw BigInt64ArrayUnavailableError(); }\n }\n return typeof BigInt64Array !== 'undefined' ? [BigInt64Array, true] : [BigInt64ArrayUnavailable, false];\n})();\n/** @ignore */\nconst [BigUint64ArrayCtor, BigUint64ArrayAvailable] = (() => {\n const BigUint64ArrayUnavailableError = () => { throw new Error('BigUint64Array is not available in this environment'); };\n class BigUint64ArrayUnavailable {\n static get BYTES_PER_ELEMENT() { return 8; }\n static of() { throw BigUint64ArrayUnavailableError(); }\n static from() { throw BigUint64ArrayUnavailableError(); }\n constructor() { throw BigUint64ArrayUnavailableError(); }\n }\n return typeof BigUint64Array !== 'undefined' ? [BigUint64Array, true] : [BigUint64ArrayUnavailable, false];\n})();\nexport { BigIntCtor as BigInt, BigIntAvailable };\nexport { BigInt64ArrayCtor as BigInt64Array, BigInt64ArrayAvailable };\nexport { BigUint64ArrayCtor as BigUint64Array, BigUint64ArrayAvailable };\n/** @ignore */ const isNumber = (x) => typeof x === 'number';\n/** @ignore */ const isBoolean = (x) => typeof x === 'boolean';\n/** @ignore */ const isFunction = (x) => typeof x === 'function';\n/** @ignore */\nexport const isObject = (x) => x != null && Object(x) === x;\n/** @ignore */\nexport const isPromise = (x) => {\n return isObject(x) && isFunction(x.then);\n};\n/** @ignore */\nexport const isObservable = (x) => {\n return isObject(x) && isFunction(x.subscribe);\n};\n/** @ignore */\nexport const isIterable = (x) => {\n return isObject(x) && isFunction(x[Symbol.iterator]);\n};\n/** @ignore */\nexport const isAsyncIterable = (x) => {\n return isObject(x) && isFunction(x[Symbol.asyncIterator]);\n};\n/** @ignore */\nexport const isArrowJSON = (x) => {\n return isObject(x) && isObject(x['schema']);\n};\n/** @ignore */\nexport const isArrayLike = (x) => {\n return isObject(x) && isNumber(x['length']);\n};\n/** @ignore */\nexport const isIteratorResult = (x) => {\n return isObject(x) && ('done' in x) && ('value' in x);\n};\n/** @ignore */\nexport const isUnderlyingSink = (x) => {\n return isObject(x) &&\n isFunction(x['abort']) &&\n isFunction(x['close']) &&\n isFunction(x['start']) &&\n isFunction(x['write']);\n};\n/** @ignore */\nexport const isFileHandle = (x) => {\n return isObject(x) && isFunction(x['stat']) && isNumber(x['fd']);\n};\n/** @ignore */\nexport const isFSReadStream = (x) => {\n return isReadableNodeStream(x) && isNumber(x['bytesRead']);\n};\n/** @ignore */\nexport const isFetchResponse = (x) => {\n return isObject(x) && isReadableDOMStream(x['body']);\n};\n/** @ignore */\nexport const isWritableDOMStream = (x) => {\n return isObject(x) &&\n isFunction(x['abort']) &&\n isFunction(x['getWriter']) &&\n !(x instanceof ReadableInterop);\n};\n/** @ignore */\nexport const isReadableDOMStream = (x) => {\n return isObject(x) &&\n isFunction(x['cancel']) &&\n isFunction(x['getReader']) &&\n !(x instanceof ReadableInterop);\n};\n/** @ignore */\nexport const isWritableNodeStream = (x) => {\n return isObject(x) &&\n isFunction(x['end']) &&\n isFunction(x['write']) &&\n isBoolean(x['writable']) &&\n !(x instanceof ReadableInterop);\n};\n/** @ignore */\nexport const isReadableNodeStream = (x) => {\n return isObject(x) &&\n isFunction(x['read']) &&\n isFunction(x['pipe']) &&\n isBoolean(x['readable']) &&\n !(x instanceof ReadableInterop);\n};\n\n//# sourceMappingURL=compat.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { flatbuffers } from 'flatbuffers';\nimport { encodeUtf8 } from '../util/utf8';\nvar ByteBuffer = flatbuffers.ByteBuffer;\nimport { isPromise, isIterable, isAsyncIterable, isIteratorResult, BigInt64Array, BigUint64Array } from './compat';\n/** @ignore */\nconst SharedArrayBuf = (typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : ArrayBuffer);\n/** @ignore */\nfunction collapseContiguousByteRanges(chunks) {\n let result = chunks[0] ? [chunks[0]] : [];\n let xOffset, yOffset, xLen, yLen;\n for (let x, y, i = 0, j = 0, n = chunks.length; ++i < n;) {\n x = result[j];\n y = chunks[i];\n // continue if x and y don't share the same underlying ArrayBuffer, or if x isn't before y\n if (!x || !y || x.buffer !== y.buffer || y.byteOffset < x.byteOffset) {\n y && (result[++j] = y);\n continue;\n }\n ({ byteOffset: xOffset, byteLength: xLen } = x);\n ({ byteOffset: yOffset, byteLength: yLen } = y);\n // continue if the byte ranges of x and y aren't contiguous\n if ((xOffset + xLen) < yOffset || (yOffset + yLen) < xOffset) {\n y && (result[++j] = y);\n continue;\n }\n result[j] = new Uint8Array(x.buffer, xOffset, yOffset - xOffset + yLen);\n }\n return result;\n}\n/** @ignore */\nexport function memcpy(target, source, targetByteOffset = 0, sourceByteLength = source.byteLength) {\n const targetByteLength = target.byteLength;\n const dst = new Uint8Array(target.buffer, target.byteOffset, targetByteLength);\n const src = new Uint8Array(source.buffer, source.byteOffset, Math.min(sourceByteLength, targetByteLength));\n dst.set(src, targetByteOffset);\n return target;\n}\n/** @ignore */\nexport function joinUint8Arrays(chunks, size) {\n // collapse chunks that share the same underlying ArrayBuffer and whose byte ranges overlap,\n // to avoid unnecessarily copying the bytes to do this buffer join. This is a common case during\n // streaming, where we may be reading partial byte ranges out of the same underlying ArrayBuffer\n let result = collapseContiguousByteRanges(chunks);\n let byteLength = result.reduce((x, b) => x + b.byteLength, 0);\n let source, sliced, buffer;\n let offset = 0, index = -1, length = Math.min(size || Infinity, byteLength);\n for (let n = result.length; ++index < n;) {\n source = result[index];\n sliced = source.subarray(0, Math.min(source.length, length - offset));\n if (length <= (offset + sliced.length)) {\n if (sliced.length < source.length) {\n result[index] = source.subarray(sliced.length);\n }\n else if (sliced.length === source.length) {\n index++;\n }\n buffer ? memcpy(buffer, sliced, offset) : (buffer = sliced);\n break;\n }\n memcpy(buffer || (buffer = new Uint8Array(length)), sliced, offset);\n offset += sliced.length;\n }\n return [buffer || new Uint8Array(0), result.slice(index), byteLength - (buffer ? buffer.byteLength : 0)];\n}\nexport function toArrayBufferView(ArrayBufferViewCtor, input) {\n let value = isIteratorResult(input) ? input.value : input;\n if (value instanceof ArrayBufferViewCtor) {\n if (ArrayBufferViewCtor === Uint8Array) {\n // Node's `Buffer` class passes the `instanceof Uint8Array` check, but we need\n // a real Uint8Array, since Buffer#slice isn't the same as Uint8Array#slice :/\n return new ArrayBufferViewCtor(value.buffer, value.byteOffset, value.byteLength);\n }\n return value;\n }\n if (!value) {\n return new ArrayBufferViewCtor(0);\n }\n if (typeof value === 'string') {\n value = encodeUtf8(value);\n }\n if (value instanceof ArrayBuffer) {\n return new ArrayBufferViewCtor(value);\n }\n if (value instanceof SharedArrayBuf) {\n return new ArrayBufferViewCtor(value);\n }\n if (value instanceof ByteBuffer) {\n return toArrayBufferView(ArrayBufferViewCtor, value.bytes());\n }\n return !ArrayBuffer.isView(value) ? ArrayBufferViewCtor.from(value) : value.byteLength <= 0 ? new ArrayBufferViewCtor(0)\n : new ArrayBufferViewCtor(value.buffer, value.byteOffset, value.byteLength / ArrayBufferViewCtor.BYTES_PER_ELEMENT);\n}\n/** @ignore */ export const toInt8Array = (input) => toArrayBufferView(Int8Array, input);\n/** @ignore */ export const toInt16Array = (input) => toArrayBufferView(Int16Array, input);\n/** @ignore */ export const toInt32Array = (input) => toArrayBufferView(Int32Array, input);\n/** @ignore */ export const toBigInt64Array = (input) => toArrayBufferView(BigInt64Array, input);\n/** @ignore */ export const toUint8Array = (input) => toArrayBufferView(Uint8Array, input);\n/** @ignore */ export const toUint16Array = (input) => toArrayBufferView(Uint16Array, input);\n/** @ignore */ export const toUint32Array = (input) => toArrayBufferView(Uint32Array, input);\n/** @ignore */ export const toBigUint64Array = (input) => toArrayBufferView(BigUint64Array, input);\n/** @ignore */ export const toFloat32Array = (input) => toArrayBufferView(Float32Array, input);\n/** @ignore */ export const toFloat64Array = (input) => toArrayBufferView(Float64Array, input);\n/** @ignore */ export const toUint8ClampedArray = (input) => toArrayBufferView(Uint8ClampedArray, input);\n/** @ignore */\nconst pump = (iterator) => { iterator.next(); return iterator; };\n/** @ignore */\nexport function* toArrayBufferViewIterator(ArrayCtor, source) {\n const wrap = function* (x) { yield x; };\n const buffers = (typeof source === 'string') ? wrap(source)\n : (ArrayBuffer.isView(source)) ? wrap(source)\n : (source instanceof ArrayBuffer) ? wrap(source)\n : (source instanceof SharedArrayBuf) ? wrap(source)\n : !isIterable(source) ? wrap(source) : source;\n yield* pump((function* (it) {\n let r = null;\n do {\n r = it.next(yield toArrayBufferView(ArrayCtor, r));\n } while (!r.done);\n })(buffers[Symbol.iterator]()));\n}\n/** @ignore */ export const toInt8ArrayIterator = (input) => toArrayBufferViewIterator(Int8Array, input);\n/** @ignore */ export const toInt16ArrayIterator = (input) => toArrayBufferViewIterator(Int16Array, input);\n/** @ignore */ export const toInt32ArrayIterator = (input) => toArrayBufferViewIterator(Int32Array, input);\n/** @ignore */ export const toUint8ArrayIterator = (input) => toArrayBufferViewIterator(Uint8Array, input);\n/** @ignore */ export const toUint16ArrayIterator = (input) => toArrayBufferViewIterator(Uint16Array, input);\n/** @ignore */ export const toUint32ArrayIterator = (input) => toArrayBufferViewIterator(Uint32Array, input);\n/** @ignore */ export const toFloat32ArrayIterator = (input) => toArrayBufferViewIterator(Float32Array, input);\n/** @ignore */ export const toFloat64ArrayIterator = (input) => toArrayBufferViewIterator(Float64Array, input);\n/** @ignore */ export const toUint8ClampedArrayIterator = (input) => toArrayBufferViewIterator(Uint8ClampedArray, input);\n/** @ignore */\nexport async function* toArrayBufferViewAsyncIterator(ArrayCtor, source) {\n // if a Promise, unwrap the Promise and iterate the resolved value\n if (isPromise(source)) {\n return yield* toArrayBufferViewAsyncIterator(ArrayCtor, await source);\n }\n const wrap = async function* (x) { yield await x; };\n const emit = async function* (source) {\n yield* pump((function* (it) {\n let r = null;\n do {\n r = it.next(yield r && r.value);\n } while (!r.done);\n })(source[Symbol.iterator]()));\n };\n const buffers = (typeof source === 'string') ? wrap(source) // if string, wrap in an AsyncIterableIterator\n : (ArrayBuffer.isView(source)) ? wrap(source) // if TypedArray, wrap in an AsyncIterableIterator\n : (source instanceof ArrayBuffer) ? wrap(source) // if ArrayBuffer, wrap in an AsyncIterableIterator\n : (source instanceof SharedArrayBuf) ? wrap(source) // if SharedArrayBuffer, wrap in an AsyncIterableIterator\n : isIterable(source) ? emit(source) // If Iterable, wrap in an AsyncIterableIterator and compose the `next` values\n : !isAsyncIterable(source) ? wrap(source) // If not an AsyncIterable, treat as a sentinel and wrap in an AsyncIterableIterator\n : source; // otherwise if AsyncIterable, use it\n yield* pump((async function* (it) {\n let r = null;\n do {\n r = await it.next(yield toArrayBufferView(ArrayCtor, r));\n } while (!r.done);\n })(buffers[Symbol.asyncIterator]()));\n}\n/** @ignore */ export const toInt8ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Int8Array, input);\n/** @ignore */ export const toInt16ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Int16Array, input);\n/** @ignore */ export const toInt32ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Int32Array, input);\n/** @ignore */ export const toUint8ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Uint8Array, input);\n/** @ignore */ export const toUint16ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Uint16Array, input);\n/** @ignore */ export const toUint32ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Uint32Array, input);\n/** @ignore */ export const toFloat32ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Float32Array, input);\n/** @ignore */ export const toFloat64ArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Float64Array, input);\n/** @ignore */ export const toUint8ClampedArrayAsyncIterator = (input) => toArrayBufferViewAsyncIterator(Uint8ClampedArray, input);\n/** @ignore */\nexport function rebaseValueOffsets(offset, length, valueOffsets) {\n // If we have a non-zero offset, create a new offsets array with the values\n // shifted by the start offset, such that the new start offset is 0\n if (offset !== 0) {\n valueOffsets = valueOffsets.slice(0, length + 1);\n for (let i = -1; ++i <= length;) {\n valueOffsets[i] += offset;\n }\n }\n return valueOffsets;\n}\n/** @ignore */\nexport function compareArrayLike(a, b) {\n let i = 0, n = a.length;\n if (n !== b.length) {\n return false;\n }\n if (n > 0) {\n do {\n if (a[i] !== b[i]) {\n return false;\n }\n } while (++i < n);\n }\n return true;\n}\n\n//# sourceMappingURL=buffer.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { toUint8Array, joinUint8Arrays, toUint8ArrayIterator, toUint8ArrayAsyncIterator } from '../util/buffer';\n/** @ignore */\nexport default {\n fromIterable(source) {\n return pump(fromIterable(source));\n },\n fromAsyncIterable(source) {\n return pump(fromAsyncIterable(source));\n },\n fromDOMStream(source) {\n return pump(fromDOMStream(source));\n },\n fromNodeStream(stream) {\n return pump(fromNodeStream(stream));\n },\n // @ts-ignore\n toDOMStream(source, options) {\n throw new Error(`\"toDOMStream\" not available in this environment`);\n },\n // @ts-ignore\n toNodeStream(source, options) {\n throw new Error(`\"toNodeStream\" not available in this environment`);\n },\n};\n/** @ignore */\nconst pump = (iterator) => { iterator.next(); return iterator; };\n/** @ignore */\nfunction* fromIterable(source) {\n let done, threw = false;\n let buffers = [], buffer;\n let cmd, size, bufferLength = 0;\n function byteRange() {\n if (cmd === 'peek') {\n return joinUint8Arrays(buffers, size)[0];\n }\n [buffer, buffers, bufferLength] = joinUint8Arrays(buffers, size);\n return buffer;\n }\n // Yield so the caller can inject the read command before creating the source Iterator\n ({ cmd, size } = yield null);\n // initialize the iterator\n let it = toUint8ArrayIterator(source)[Symbol.iterator]();\n try {\n do {\n // read the next value\n ({ done, value: buffer } = isNaN(size - bufferLength) ?\n it.next(undefined) : it.next(size - bufferLength));\n // if chunk is not null or empty, push it onto the queue\n if (!done && buffer.byteLength > 0) {\n buffers.push(buffer);\n bufferLength += buffer.byteLength;\n }\n // If we have enough bytes in our buffer, yield chunks until we don't\n if (done || size <= bufferLength) {\n do {\n ({ cmd, size } = yield byteRange());\n } while (size < bufferLength);\n }\n } while (!done);\n }\n catch (e) {\n (threw = true) && (typeof it.throw === 'function') && (it.throw(e));\n }\n finally {\n (threw === false) && (typeof it.return === 'function') && (it.return());\n }\n}\n/** @ignore */\nasync function* fromAsyncIterable(source) {\n let done, threw = false;\n let buffers = [], buffer;\n let cmd, size, bufferLength = 0;\n function byteRange() {\n if (cmd === 'peek') {\n return joinUint8Arrays(buffers, size)[0];\n }\n [buffer, buffers, bufferLength] = joinUint8Arrays(buffers, size);\n return buffer;\n }\n // Yield so the caller can inject the read command before creating the source AsyncIterator\n ({ cmd, size } = yield null);\n // initialize the iterator\n let it = toUint8ArrayAsyncIterator(source)[Symbol.asyncIterator]();\n try {\n do {\n // read the next value\n ({ done, value: buffer } = isNaN(size - bufferLength)\n ? await it.next(undefined)\n : await it.next(size - bufferLength));\n // if chunk is not null or empty, push it onto the queue\n if (!done && buffer.byteLength > 0) {\n buffers.push(buffer);\n bufferLength += buffer.byteLength;\n }\n // If we have enough bytes in our buffer, yield chunks until we don't\n if (done || size <= bufferLength) {\n do {\n ({ cmd, size } = yield byteRange());\n } while (size < bufferLength);\n }\n } while (!done);\n }\n catch (e) {\n (threw = true) && (typeof it.throw === 'function') && (await it.throw(e));\n }\n finally {\n (threw === false) && (typeof it.return === 'function') && (await it.return());\n }\n}\n// All this manual Uint8Array chunk management can be avoided if/when engines\n// add support for ArrayBuffer.transfer() or ArrayBuffer.prototype.realloc():\n// https://github.com/domenic/proposal-arraybuffer-transfer\n/** @ignore */\nasync function* fromDOMStream(source) {\n let done = false, threw = false;\n let buffers = [], buffer;\n let cmd, size, bufferLength = 0;\n function byteRange() {\n if (cmd === 'peek') {\n return joinUint8Arrays(buffers, size)[0];\n }\n [buffer, buffers, bufferLength] = joinUint8Arrays(buffers, size);\n return buffer;\n }\n // Yield so the caller can inject the read command before we establish the ReadableStream lock\n ({ cmd, size } = yield null);\n // initialize the reader and lock the stream\n let it = new AdaptiveByteReader(source);\n try {\n do {\n // read the next value\n ({ done, value: buffer } = isNaN(size - bufferLength)\n ? await it['read'](undefined)\n : await it['read'](size - bufferLength));\n // if chunk is not null or empty, push it onto the queue\n if (!done && buffer.byteLength > 0) {\n buffers.push(toUint8Array(buffer));\n bufferLength += buffer.byteLength;\n }\n // If we have enough bytes in our buffer, yield chunks until we don't\n if (done || size <= bufferLength) {\n do {\n ({ cmd, size } = yield byteRange());\n } while (size < bufferLength);\n }\n } while (!done);\n }\n catch (e) {\n (threw = true) && (await it['cancel'](e));\n }\n finally {\n (threw === false) ? (await it['cancel']())\n : source['locked'] && it.releaseLock();\n }\n}\n/** @ignore */\nclass AdaptiveByteReader {\n constructor(source) {\n this.source = source;\n this.byobReader = null;\n this.defaultReader = null;\n try {\n this.supportsBYOB = !!(this.reader = this.getBYOBReader());\n }\n catch (e) {\n this.supportsBYOB = !!!(this.reader = this.getDefaultReader());\n }\n }\n get closed() {\n return this.reader ? this.reader['closed'].catch(() => { }) : Promise.resolve();\n }\n releaseLock() {\n if (this.reader) {\n this.reader.releaseLock();\n }\n this.reader = this.byobReader = this.defaultReader = null;\n }\n async cancel(reason) {\n const { reader, source } = this;\n reader && (await reader['cancel'](reason).catch(() => { }));\n source && (source['locked'] && this.releaseLock());\n }\n async read(size) {\n if (size === 0) {\n return { done: this.reader == null, value: new Uint8Array(0) };\n }\n const result = !this.supportsBYOB || typeof size !== 'number'\n ? await this.getDefaultReader().read()\n : await this.readFromBYOBReader(size);\n !result.done && (result.value = toUint8Array(result));\n return result;\n }\n getDefaultReader() {\n if (this.byobReader) {\n this.releaseLock();\n }\n if (!this.defaultReader) {\n this.defaultReader = this.source['getReader']();\n // We have to catch and swallow errors here to avoid uncaught promise rejection exceptions\n // that seem to be raised when we call `releaseLock()` on this reader. I'm still mystified\n // about why these errors are raised, but I'm sure there's some important spec reason that\n // I haven't considered. I hate to employ such an anti-pattern here, but it seems like the\n // only solution in this case :/\n this.defaultReader['closed'].catch(() => { });\n }\n return (this.reader = this.defaultReader);\n }\n getBYOBReader() {\n if (this.defaultReader) {\n this.releaseLock();\n }\n if (!this.byobReader) {\n this.byobReader = this.source['getReader']({ mode: 'byob' });\n // We have to catch and swallow errors here to avoid uncaught promise rejection exceptions\n // that seem to be raised when we call `releaseLock()` on this reader. I'm still mystified\n // about why these errors are raised, but I'm sure there's some important spec reason that\n // I haven't considered. I hate to employ such an anti-pattern here, but it seems like the\n // only solution in this case :/\n this.byobReader['closed'].catch(() => { });\n }\n return (this.reader = this.byobReader);\n }\n // This strategy plucked from the example in the streams spec:\n // https://streams.spec.whatwg.org/#example-manual-read-bytes\n async readFromBYOBReader(size) {\n return await readInto(this.getBYOBReader(), new ArrayBuffer(size), 0, size);\n }\n}\n/** @ignore */\nasync function readInto(reader, buffer, offset, size) {\n if (offset >= size) {\n return { done: false, value: new Uint8Array(buffer, 0, size) };\n }\n const { done, value } = await reader.read(new Uint8Array(buffer, offset, size - offset));\n if (((offset += value.byteLength) < size) && !done) {\n return await readInto(reader, value.buffer, offset, size);\n }\n return { done, value: new Uint8Array(value.buffer, 0, offset) };\n}\n/** @ignore */\nconst onEvent = (stream, event) => {\n let handler = (_) => resolve([event, _]);\n let resolve;\n return [event, handler, new Promise((r) => (resolve = r) && stream['once'](event, handler))];\n};\n/** @ignore */\nasync function* fromNodeStream(stream) {\n let events = [];\n let event = 'error';\n let done = false, err = null;\n let cmd, size, bufferLength = 0;\n let buffers = [], buffer;\n function byteRange() {\n if (cmd === 'peek') {\n return joinUint8Arrays(buffers, size)[0];\n }\n [buffer, buffers, bufferLength] = joinUint8Arrays(buffers, size);\n return buffer;\n }\n // Yield so the caller can inject the read command before we\n // add the listener for the source stream's 'readable' event.\n ({ cmd, size } = yield null);\n // ignore stdin if it's a TTY\n if (stream['isTTY']) {\n return yield new Uint8Array(0);\n }\n try {\n // initialize the stream event handlers\n events[0] = onEvent(stream, 'end');\n events[1] = onEvent(stream, 'error');\n do {\n events[2] = onEvent(stream, 'readable');\n // wait on the first message event from the stream\n [event, err] = await Promise.race(events.map((x) => x[2]));\n // if the stream emitted an Error, rethrow it\n if (event === 'error') {\n break;\n }\n if (!(done = event === 'end')) {\n // If the size is NaN, request to read everything in the stream's internal buffer\n if (!isFinite(size - bufferLength)) {\n buffer = toUint8Array(stream['read'](undefined));\n }\n else {\n buffer = toUint8Array(stream['read'](size - bufferLength));\n // If the byteLength is 0, then the requested amount is more than the stream has\n // in its internal buffer. In this case the stream needs a \"kick\" to tell it to\n // continue emitting readable events, so request to read everything the stream\n // has in its internal buffer right now.\n if (buffer.byteLength < (size - bufferLength)) {\n buffer = toUint8Array(stream['read'](undefined));\n }\n }\n // if chunk is not null or empty, push it onto the queue\n if (buffer.byteLength > 0) {\n buffers.push(buffer);\n bufferLength += buffer.byteLength;\n }\n }\n // If we have enough bytes in our buffer, yield chunks until we don't\n if (done || size <= bufferLength) {\n do {\n ({ cmd, size } = yield byteRange());\n } while (size < bufferLength);\n }\n } while (!done);\n }\n finally {\n await cleanup(events, event === 'error' ? err : null);\n }\n function cleanup(events, err) {\n buffer = buffers = null;\n return new Promise(async (resolve, reject) => {\n for (const [evt, fn] of events) {\n stream['off'](evt, fn);\n }\n try {\n // Some stream implementations don't call the destroy callback,\n // because it's really a node-internal API. Just calling `destroy`\n // here should be enough to conform to the ReadableStream contract\n const destroy = stream['destroy'];\n destroy && destroy.call(stream, err);\n err = undefined;\n }\n catch (e) {\n err = e || err;\n }\n finally {\n err != null ? reject(err) : resolve();\n }\n });\n }\n}\n\n//# sourceMappingURL=adapters.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nexport class AbstractVector {\n}\nexport { AbstractVector as Vector };\n\n//# sourceMappingURL=vector.mjs.map\n","/* tslint:disable:class-name */\n/**\n * @enum {number}\n */\nexport var org;\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n let MetadataVersion;\n (function (MetadataVersion) {\n /**\n * 0.1.0\n */\n MetadataVersion[MetadataVersion[\"V1\"] = 0] = \"V1\";\n /**\n * 0.2.0\n */\n MetadataVersion[MetadataVersion[\"V2\"] = 1] = \"V2\";\n /**\n * 0.3.0 -> 0.7.1\n */\n MetadataVersion[MetadataVersion[\"V3\"] = 2] = \"V3\";\n /**\n * >= 0.8.0\n */\n MetadataVersion[MetadataVersion[\"V4\"] = 3] = \"V4\";\n })(MetadataVersion = flatbuf.MetadataVersion || (flatbuf.MetadataVersion = {}));\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * @enum {number}\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n let UnionMode;\n (function (UnionMode) {\n UnionMode[UnionMode[\"Sparse\"] = 0] = \"Sparse\";\n UnionMode[UnionMode[\"Dense\"] = 1] = \"Dense\";\n })(UnionMode = flatbuf.UnionMode || (flatbuf.UnionMode = {}));\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * @enum {number}\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n let Precision;\n (function (Precision) {\n Precision[Precision[\"HALF\"] = 0] = \"HALF\";\n Precision[Precision[\"SINGLE\"] = 1] = \"SINGLE\";\n Precision[Precision[\"DOUBLE\"] = 2] = \"DOUBLE\";\n })(Precision = flatbuf.Precision || (flatbuf.Precision = {}));\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * @enum {number}\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n let DateUnit;\n (function (DateUnit) {\n DateUnit[DateUnit[\"DAY\"] = 0] = \"DAY\";\n DateUnit[DateUnit[\"MILLISECOND\"] = 1] = \"MILLISECOND\";\n })(DateUnit = flatbuf.DateUnit || (flatbuf.DateUnit = {}));\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * @enum {number}\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n let TimeUnit;\n (function (TimeUnit) {\n TimeUnit[TimeUnit[\"SECOND\"] = 0] = \"SECOND\";\n TimeUnit[TimeUnit[\"MILLISECOND\"] = 1] = \"MILLISECOND\";\n TimeUnit[TimeUnit[\"MICROSECOND\"] = 2] = \"MICROSECOND\";\n TimeUnit[TimeUnit[\"NANOSECOND\"] = 3] = \"NANOSECOND\";\n })(TimeUnit = flatbuf.TimeUnit || (flatbuf.TimeUnit = {}));\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * @enum {number}\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n let IntervalUnit;\n (function (IntervalUnit) {\n IntervalUnit[IntervalUnit[\"YEAR_MONTH\"] = 0] = \"YEAR_MONTH\";\n IntervalUnit[IntervalUnit[\"DAY_TIME\"] = 1] = \"DAY_TIME\";\n })(IntervalUnit = flatbuf.IntervalUnit || (flatbuf.IntervalUnit = {}));\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * ----------------------------------------------------------------------\n * Top-level Type value, enabling extensible type-specific metadata. We can\n * add new logical types to Type without breaking backwards compatibility\n *\n * @enum {number}\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n let Type;\n (function (Type) {\n Type[Type[\"NONE\"] = 0] = \"NONE\";\n Type[Type[\"Null\"] = 1] = \"Null\";\n Type[Type[\"Int\"] = 2] = \"Int\";\n Type[Type[\"FloatingPoint\"] = 3] = \"FloatingPoint\";\n Type[Type[\"Binary\"] = 4] = \"Binary\";\n Type[Type[\"Utf8\"] = 5] = \"Utf8\";\n Type[Type[\"Bool\"] = 6] = \"Bool\";\n Type[Type[\"Decimal\"] = 7] = \"Decimal\";\n Type[Type[\"Date\"] = 8] = \"Date\";\n Type[Type[\"Time\"] = 9] = \"Time\";\n Type[Type[\"Timestamp\"] = 10] = \"Timestamp\";\n Type[Type[\"Interval\"] = 11] = \"Interval\";\n Type[Type[\"List\"] = 12] = \"List\";\n Type[Type[\"Struct_\"] = 13] = \"Struct_\";\n Type[Type[\"Union\"] = 14] = \"Union\";\n Type[Type[\"FixedSizeBinary\"] = 15] = \"FixedSizeBinary\";\n Type[Type[\"FixedSizeList\"] = 16] = \"FixedSizeList\";\n Type[Type[\"Map\"] = 17] = \"Map\";\n Type[Type[\"Duration\"] = 18] = \"Duration\";\n Type[Type[\"LargeBinary\"] = 19] = \"LargeBinary\";\n Type[Type[\"LargeUtf8\"] = 20] = \"LargeUtf8\";\n Type[Type[\"LargeList\"] = 21] = \"LargeList\";\n })(Type = flatbuf.Type || (flatbuf.Type = {}));\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * ----------------------------------------------------------------------\n * Endianness of the platform producing the data\n *\n * @enum {number}\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n let Endianness;\n (function (Endianness) {\n Endianness[Endianness[\"Little\"] = 0] = \"Little\";\n Endianness[Endianness[\"Big\"] = 1] = \"Big\";\n })(Endianness = flatbuf.Endianness || (flatbuf.Endianness = {}));\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * These are stored in the flatbuffer in the Type union below\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Null {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Null\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Null= obj\n * @returns Null\n */\n static getRootAsNull(bb, obj) {\n return (obj || new Null).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startNull(builder) {\n builder.startObject(0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endNull(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createNull(builder) {\n Null.startNull(builder);\n return Null.endNull(builder);\n }\n }\n flatbuf.Null = Null;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * A Struct_ in the flatbuffer metadata is the same as an Arrow Struct\n * (according to the physical memory layout). We used Struct_ here as\n * Struct is a reserved word in Flatbuffers\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Struct_ {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Struct_\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Struct_= obj\n * @returns Struct_\n */\n static getRootAsStruct_(bb, obj) {\n return (obj || new Struct_).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startStruct_(builder) {\n builder.startObject(0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endStruct_(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createStruct_(builder) {\n Struct_.startStruct_(builder);\n return Struct_.endStruct_(builder);\n }\n }\n flatbuf.Struct_ = Struct_;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class List {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns List\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param List= obj\n * @returns List\n */\n static getRootAsList(bb, obj) {\n return (obj || new List).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startList(builder) {\n builder.startObject(0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endList(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createList(builder) {\n List.startList(builder);\n return List.endList(builder);\n }\n }\n flatbuf.List = List;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * Same as List, but with 64-bit offsets, allowing to represent\n * extremely large data values.\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class LargeList {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns LargeList\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param LargeList= obj\n * @returns LargeList\n */\n static getRootAsLargeList(bb, obj) {\n return (obj || new LargeList).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startLargeList(builder) {\n builder.startObject(0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endLargeList(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createLargeList(builder) {\n LargeList.startLargeList(builder);\n return LargeList.endLargeList(builder);\n }\n }\n flatbuf.LargeList = LargeList;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class FixedSizeList {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns FixedSizeList\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param FixedSizeList= obj\n * @returns FixedSizeList\n */\n static getRootAsFixedSizeList(bb, obj) {\n return (obj || new FixedSizeList).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * Number of list items per value\n *\n * @returns number\n */\n listSize() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startFixedSizeList(builder) {\n builder.startObject(1);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param number listSize\n */\n static addListSize(builder, listSize) {\n builder.addFieldInt32(0, listSize, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endFixedSizeList(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createFixedSizeList(builder, listSize) {\n FixedSizeList.startFixedSizeList(builder);\n FixedSizeList.addListSize(builder, listSize);\n return FixedSizeList.endFixedSizeList(builder);\n }\n }\n flatbuf.FixedSizeList = FixedSizeList;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * A Map is a logical nested type that is represented as\n *\n * List>\n *\n * In this layout, the keys and values are each respectively contiguous. We do\n * not constrain the key and value types, so the application is responsible\n * for ensuring that the keys are hashable and unique. Whether the keys are sorted\n * may be set in the metadata for this field\n *\n * In a Field with Map type, the Field has a child Struct field, which then\n * has two children: key type and the second the value type. The names of the\n * child fields may be respectively \"entry\", \"key\", and \"value\", but this is\n * not enforced\n *\n * Map\n * - child[0] entry: Struct\n * - child[0] key: K\n * - child[1] value: V\n *\n * Neither the \"entry\" field nor the \"key\" field may be nullable.\n *\n * The metadata is structured so that Arrow systems without special handling\n * for Map can make Map an alias for List. The \"layout\" attribute for the Map\n * field must have the same contents as a List.\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Map {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Map\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Map= obj\n * @returns Map\n */\n static getRootAsMap(bb, obj) {\n return (obj || new Map).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * Set to true if the keys within each value are sorted\n *\n * @returns boolean\n */\n keysSorted() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startMap(builder) {\n builder.startObject(1);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param boolean keysSorted\n */\n static addKeysSorted(builder, keysSorted) {\n builder.addFieldInt8(0, +keysSorted, +false);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endMap(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createMap(builder, keysSorted) {\n Map.startMap(builder);\n Map.addKeysSorted(builder, keysSorted);\n return Map.endMap(builder);\n }\n }\n flatbuf.Map = Map;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * A union is a complex type with children in Field\n * By default ids in the type vector refer to the offsets in the children\n * optionally typeIds provides an indirection between the child offset and the type id\n * for each child typeIds[offset] is the id used in the type vector\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Union {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Union\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Union= obj\n * @returns Union\n */\n static getRootAsUnion(bb, obj) {\n return (obj || new Union).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @returns org.apache.arrow.flatbuf.UnionMode\n */\n mode() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? /** */ (this.bb.readInt16(this.bb_pos + offset)) : org.apache.arrow.flatbuf.UnionMode.Sparse;\n }\n /**\n * @param number index\n * @returns number\n */\n typeIds(index) {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.readInt32(this.bb.__vector(this.bb_pos + offset) + index * 4) : 0;\n }\n /**\n * @returns number\n */\n typeIdsLength() {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * @returns Int32Array\n */\n typeIdsArray() {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? new Int32Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startUnion(builder) {\n builder.startObject(2);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param org.apache.arrow.flatbuf.UnionMode mode\n */\n static addMode(builder, mode) {\n builder.addFieldInt16(0, mode, org.apache.arrow.flatbuf.UnionMode.Sparse);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset typeIdsOffset\n */\n static addTypeIds(builder, typeIdsOffset) {\n builder.addFieldOffset(1, typeIdsOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param Array. data\n * @returns flatbuffers.Offset\n */\n static createTypeIdsVector(builder, data) {\n builder.startVector(4, data.length, 4);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addInt32(data[i]);\n }\n return builder.endVector();\n }\n /**\n * @param flatbuffers.Builder builder\n * @param number numElems\n */\n static startTypeIdsVector(builder, numElems) {\n builder.startVector(4, numElems, 4);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endUnion(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createUnion(builder, mode, typeIdsOffset) {\n Union.startUnion(builder);\n Union.addMode(builder, mode);\n Union.addTypeIds(builder, typeIdsOffset);\n return Union.endUnion(builder);\n }\n }\n flatbuf.Union = Union;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Int {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Int\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Int= obj\n * @returns Int\n */\n static getRootAsInt(bb, obj) {\n return (obj || new Int).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @returns number\n */\n bitWidth() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;\n }\n /**\n * @returns boolean\n */\n isSigned() {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startInt(builder) {\n builder.startObject(2);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param number bitWidth\n */\n static addBitWidth(builder, bitWidth) {\n builder.addFieldInt32(0, bitWidth, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param boolean isSigned\n */\n static addIsSigned(builder, isSigned) {\n builder.addFieldInt8(1, +isSigned, +false);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endInt(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createInt(builder, bitWidth, isSigned) {\n Int.startInt(builder);\n Int.addBitWidth(builder, bitWidth);\n Int.addIsSigned(builder, isSigned);\n return Int.endInt(builder);\n }\n }\n flatbuf.Int = Int;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class FloatingPoint {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns FloatingPoint\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param FloatingPoint= obj\n * @returns FloatingPoint\n */\n static getRootAsFloatingPoint(bb, obj) {\n return (obj || new FloatingPoint).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @returns org.apache.arrow.flatbuf.Precision\n */\n precision() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? /** */ (this.bb.readInt16(this.bb_pos + offset)) : org.apache.arrow.flatbuf.Precision.HALF;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startFloatingPoint(builder) {\n builder.startObject(1);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param org.apache.arrow.flatbuf.Precision precision\n */\n static addPrecision(builder, precision) {\n builder.addFieldInt16(0, precision, org.apache.arrow.flatbuf.Precision.HALF);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endFloatingPoint(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createFloatingPoint(builder, precision) {\n FloatingPoint.startFloatingPoint(builder);\n FloatingPoint.addPrecision(builder, precision);\n return FloatingPoint.endFloatingPoint(builder);\n }\n }\n flatbuf.FloatingPoint = FloatingPoint;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * Unicode with UTF-8 encoding\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Utf8 {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Utf8\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Utf8= obj\n * @returns Utf8\n */\n static getRootAsUtf8(bb, obj) {\n return (obj || new Utf8).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startUtf8(builder) {\n builder.startObject(0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endUtf8(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createUtf8(builder) {\n Utf8.startUtf8(builder);\n return Utf8.endUtf8(builder);\n }\n }\n flatbuf.Utf8 = Utf8;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * Opaque binary data\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Binary {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Binary\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Binary= obj\n * @returns Binary\n */\n static getRootAsBinary(bb, obj) {\n return (obj || new Binary).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startBinary(builder) {\n builder.startObject(0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endBinary(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createBinary(builder) {\n Binary.startBinary(builder);\n return Binary.endBinary(builder);\n }\n }\n flatbuf.Binary = Binary;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * Same as Utf8, but with 64-bit offsets, allowing to represent\n * extremely large data values.\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class LargeUtf8 {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns LargeUtf8\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param LargeUtf8= obj\n * @returns LargeUtf8\n */\n static getRootAsLargeUtf8(bb, obj) {\n return (obj || new LargeUtf8).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startLargeUtf8(builder) {\n builder.startObject(0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endLargeUtf8(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createLargeUtf8(builder) {\n LargeUtf8.startLargeUtf8(builder);\n return LargeUtf8.endLargeUtf8(builder);\n }\n }\n flatbuf.LargeUtf8 = LargeUtf8;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * Same as Binary, but with 64-bit offsets, allowing to represent\n * extremely large data values.\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class LargeBinary {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns LargeBinary\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param LargeBinary= obj\n * @returns LargeBinary\n */\n static getRootAsLargeBinary(bb, obj) {\n return (obj || new LargeBinary).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startLargeBinary(builder) {\n builder.startObject(0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endLargeBinary(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createLargeBinary(builder) {\n LargeBinary.startLargeBinary(builder);\n return LargeBinary.endLargeBinary(builder);\n }\n }\n flatbuf.LargeBinary = LargeBinary;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class FixedSizeBinary {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns FixedSizeBinary\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param FixedSizeBinary= obj\n * @returns FixedSizeBinary\n */\n static getRootAsFixedSizeBinary(bb, obj) {\n return (obj || new FixedSizeBinary).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * Number of bytes per value\n *\n * @returns number\n */\n byteWidth() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startFixedSizeBinary(builder) {\n builder.startObject(1);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param number byteWidth\n */\n static addByteWidth(builder, byteWidth) {\n builder.addFieldInt32(0, byteWidth, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endFixedSizeBinary(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createFixedSizeBinary(builder, byteWidth) {\n FixedSizeBinary.startFixedSizeBinary(builder);\n FixedSizeBinary.addByteWidth(builder, byteWidth);\n return FixedSizeBinary.endFixedSizeBinary(builder);\n }\n }\n flatbuf.FixedSizeBinary = FixedSizeBinary;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Bool {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Bool\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Bool= obj\n * @returns Bool\n */\n static getRootAsBool(bb, obj) {\n return (obj || new Bool).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startBool(builder) {\n builder.startObject(0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endBool(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createBool(builder) {\n Bool.startBool(builder);\n return Bool.endBool(builder);\n }\n }\n flatbuf.Bool = Bool;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Decimal {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Decimal\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Decimal= obj\n * @returns Decimal\n */\n static getRootAsDecimal(bb, obj) {\n return (obj || new Decimal).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * Total number of decimal digits\n *\n * @returns number\n */\n precision() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;\n }\n /**\n * Number of digits after the decimal point \".\"\n *\n * @returns number\n */\n scale() {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startDecimal(builder) {\n builder.startObject(2);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param number precision\n */\n static addPrecision(builder, precision) {\n builder.addFieldInt32(0, precision, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param number scale\n */\n static addScale(builder, scale) {\n builder.addFieldInt32(1, scale, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endDecimal(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createDecimal(builder, precision, scale) {\n Decimal.startDecimal(builder);\n Decimal.addPrecision(builder, precision);\n Decimal.addScale(builder, scale);\n return Decimal.endDecimal(builder);\n }\n }\n flatbuf.Decimal = Decimal;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * Date is either a 32-bit or 64-bit type representing elapsed time since UNIX\n * epoch (1970-01-01), stored in either of two units:\n *\n * * Milliseconds (64 bits) indicating UNIX time elapsed since the epoch (no\n * leap seconds), where the values are evenly divisible by 86400000\n * * Days (32 bits) since the UNIX epoch\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Date {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Date\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Date= obj\n * @returns Date\n */\n static getRootAsDate(bb, obj) {\n return (obj || new Date).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @returns org.apache.arrow.flatbuf.DateUnit\n */\n unit() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? /** */ (this.bb.readInt16(this.bb_pos + offset)) : org.apache.arrow.flatbuf.DateUnit.MILLISECOND;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startDate(builder) {\n builder.startObject(1);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param org.apache.arrow.flatbuf.DateUnit unit\n */\n static addUnit(builder, unit) {\n builder.addFieldInt16(0, unit, org.apache.arrow.flatbuf.DateUnit.MILLISECOND);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endDate(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createDate(builder, unit) {\n Date.startDate(builder);\n Date.addUnit(builder, unit);\n return Date.endDate(builder);\n }\n }\n flatbuf.Date = Date;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * Time type. The physical storage type depends on the unit\n * - SECOND and MILLISECOND: 32 bits\n * - MICROSECOND and NANOSECOND: 64 bits\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Time {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Time\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Time= obj\n * @returns Time\n */\n static getRootAsTime(bb, obj) {\n return (obj || new Time).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @returns org.apache.arrow.flatbuf.TimeUnit\n */\n unit() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? /** */ (this.bb.readInt16(this.bb_pos + offset)) : org.apache.arrow.flatbuf.TimeUnit.MILLISECOND;\n }\n /**\n * @returns number\n */\n bitWidth() {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.readInt32(this.bb_pos + offset) : 32;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startTime(builder) {\n builder.startObject(2);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param org.apache.arrow.flatbuf.TimeUnit unit\n */\n static addUnit(builder, unit) {\n builder.addFieldInt16(0, unit, org.apache.arrow.flatbuf.TimeUnit.MILLISECOND);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param number bitWidth\n */\n static addBitWidth(builder, bitWidth) {\n builder.addFieldInt32(1, bitWidth, 32);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endTime(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createTime(builder, unit, bitWidth) {\n Time.startTime(builder);\n Time.addUnit(builder, unit);\n Time.addBitWidth(builder, bitWidth);\n return Time.endTime(builder);\n }\n }\n flatbuf.Time = Time;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * Time elapsed from the Unix epoch, 00:00:00.000 on 1 January 1970, excluding\n * leap seconds, as a 64-bit integer. Note that UNIX time does not include\n * leap seconds.\n *\n * The Timestamp metadata supports both \"time zone naive\" and \"time zone\n * aware\" timestamps. Read about the timezone attribute for more detail\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Timestamp {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Timestamp\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Timestamp= obj\n * @returns Timestamp\n */\n static getRootAsTimestamp(bb, obj) {\n return (obj || new Timestamp).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @returns org.apache.arrow.flatbuf.TimeUnit\n */\n unit() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? /** */ (this.bb.readInt16(this.bb_pos + offset)) : org.apache.arrow.flatbuf.TimeUnit.SECOND;\n }\n timezone(optionalEncoding) {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startTimestamp(builder) {\n builder.startObject(2);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param org.apache.arrow.flatbuf.TimeUnit unit\n */\n static addUnit(builder, unit) {\n builder.addFieldInt16(0, unit, org.apache.arrow.flatbuf.TimeUnit.SECOND);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset timezoneOffset\n */\n static addTimezone(builder, timezoneOffset) {\n builder.addFieldOffset(1, timezoneOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endTimestamp(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createTimestamp(builder, unit, timezoneOffset) {\n Timestamp.startTimestamp(builder);\n Timestamp.addUnit(builder, unit);\n Timestamp.addTimezone(builder, timezoneOffset);\n return Timestamp.endTimestamp(builder);\n }\n }\n flatbuf.Timestamp = Timestamp;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Interval {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Interval\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Interval= obj\n * @returns Interval\n */\n static getRootAsInterval(bb, obj) {\n return (obj || new Interval).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @returns org.apache.arrow.flatbuf.IntervalUnit\n */\n unit() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? /** */ (this.bb.readInt16(this.bb_pos + offset)) : org.apache.arrow.flatbuf.IntervalUnit.YEAR_MONTH;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startInterval(builder) {\n builder.startObject(1);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param org.apache.arrow.flatbuf.IntervalUnit unit\n */\n static addUnit(builder, unit) {\n builder.addFieldInt16(0, unit, org.apache.arrow.flatbuf.IntervalUnit.YEAR_MONTH);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endInterval(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createInterval(builder, unit) {\n Interval.startInterval(builder);\n Interval.addUnit(builder, unit);\n return Interval.endInterval(builder);\n }\n }\n flatbuf.Interval = Interval;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Duration {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Duration\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Duration= obj\n * @returns Duration\n */\n static getRootAsDuration(bb, obj) {\n return (obj || new Duration).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @returns org.apache.arrow.flatbuf.TimeUnit\n */\n unit() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? /** */ (this.bb.readInt16(this.bb_pos + offset)) : org.apache.arrow.flatbuf.TimeUnit.MILLISECOND;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startDuration(builder) {\n builder.startObject(1);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param org.apache.arrow.flatbuf.TimeUnit unit\n */\n static addUnit(builder, unit) {\n builder.addFieldInt16(0, unit, org.apache.arrow.flatbuf.TimeUnit.MILLISECOND);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endDuration(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createDuration(builder, unit) {\n Duration.startDuration(builder);\n Duration.addUnit(builder, unit);\n return Duration.endDuration(builder);\n }\n }\n flatbuf.Duration = Duration;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * ----------------------------------------------------------------------\n * user defined key value pairs to add custom metadata to arrow\n * key namespacing is the responsibility of the user\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class KeyValue {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns KeyValue\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param KeyValue= obj\n * @returns KeyValue\n */\n static getRootAsKeyValue(bb, obj) {\n return (obj || new KeyValue).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n key(optionalEncoding) {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;\n }\n value(optionalEncoding) {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startKeyValue(builder) {\n builder.startObject(2);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset keyOffset\n */\n static addKey(builder, keyOffset) {\n builder.addFieldOffset(0, keyOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset valueOffset\n */\n static addValue(builder, valueOffset) {\n builder.addFieldOffset(1, valueOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endKeyValue(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createKeyValue(builder, keyOffset, valueOffset) {\n KeyValue.startKeyValue(builder);\n KeyValue.addKey(builder, keyOffset);\n KeyValue.addValue(builder, valueOffset);\n return KeyValue.endKeyValue(builder);\n }\n }\n flatbuf.KeyValue = KeyValue;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * ----------------------------------------------------------------------\n * Dictionary encoding metadata\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class DictionaryEncoding {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns DictionaryEncoding\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param DictionaryEncoding= obj\n * @returns DictionaryEncoding\n */\n static getRootAsDictionaryEncoding(bb, obj) {\n return (obj || new DictionaryEncoding).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * The known dictionary id in the application where this data is used. In\n * the file or streaming formats, the dictionary ids are found in the\n * DictionaryBatch messages\n *\n * @returns flatbuffers.Long\n */\n id() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);\n }\n /**\n * The dictionary indices are constrained to be positive integers. If this\n * field is null, the indices must be signed int32\n *\n * @param org.apache.arrow.flatbuf.Int= obj\n * @returns org.apache.arrow.flatbuf.Int|null\n */\n indexType(obj) {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? (obj || new org.apache.arrow.flatbuf.Int).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n /**\n * By default, dictionaries are not ordered, or the order does not have\n * semantic meaning. In some statistical, applications, dictionary-encoding\n * is used to represent ordered categorical data, and we provide a way to\n * preserve that metadata here\n *\n * @returns boolean\n */\n isOrdered() {\n let offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startDictionaryEncoding(builder) {\n builder.startObject(3);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Long id\n */\n static addId(builder, id) {\n builder.addFieldInt64(0, id, builder.createLong(0, 0));\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset indexTypeOffset\n */\n static addIndexType(builder, indexTypeOffset) {\n builder.addFieldOffset(1, indexTypeOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param boolean isOrdered\n */\n static addIsOrdered(builder, isOrdered) {\n builder.addFieldInt8(2, +isOrdered, +false);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endDictionaryEncoding(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createDictionaryEncoding(builder, id, indexTypeOffset, isOrdered) {\n DictionaryEncoding.startDictionaryEncoding(builder);\n DictionaryEncoding.addId(builder, id);\n DictionaryEncoding.addIndexType(builder, indexTypeOffset);\n DictionaryEncoding.addIsOrdered(builder, isOrdered);\n return DictionaryEncoding.endDictionaryEncoding(builder);\n }\n }\n flatbuf.DictionaryEncoding = DictionaryEncoding;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * ----------------------------------------------------------------------\n * A field represents a named column in a record / row batch or child of a\n * nested type.\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Field {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Field\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Field= obj\n * @returns Field\n */\n static getRootAsField(bb, obj) {\n return (obj || new Field).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n name(optionalEncoding) {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;\n }\n /**\n * Whether or not this field can contain nulls. Should be true in general.\n *\n * @returns boolean\n */\n nullable() {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;\n }\n /**\n * @returns org.apache.arrow.flatbuf.Type\n */\n typeType() {\n let offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? /** */ (this.bb.readUint8(this.bb_pos + offset)) : org.apache.arrow.flatbuf.Type.NONE;\n }\n /**\n * This is the type of the decoded value if the field is dictionary encoded.\n *\n * @param flatbuffers.Table obj\n * @returns ?flatbuffers.Table\n */\n type(obj) {\n let offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;\n }\n /**\n * Present only if the field is dictionary encoded.\n *\n * @param org.apache.arrow.flatbuf.DictionaryEncoding= obj\n * @returns org.apache.arrow.flatbuf.DictionaryEncoding|null\n */\n dictionary(obj) {\n let offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? (obj || new org.apache.arrow.flatbuf.DictionaryEncoding).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n /**\n * children apply only to nested data types like Struct, List and Union. For\n * primitive types children will have length 0.\n *\n * @param number index\n * @param org.apache.arrow.flatbuf.Field= obj\n * @returns org.apache.arrow.flatbuf.Field\n */\n children(index, obj) {\n let offset = this.bb.__offset(this.bb_pos, 14);\n return offset ? (obj || new org.apache.arrow.flatbuf.Field).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;\n }\n /**\n * @returns number\n */\n childrenLength() {\n let offset = this.bb.__offset(this.bb_pos, 14);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * User-defined metadata\n *\n * @param number index\n * @param org.apache.arrow.flatbuf.KeyValue= obj\n * @returns org.apache.arrow.flatbuf.KeyValue\n */\n customMetadata(index, obj) {\n let offset = this.bb.__offset(this.bb_pos, 16);\n return offset ? (obj || new org.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;\n }\n /**\n * @returns number\n */\n customMetadataLength() {\n let offset = this.bb.__offset(this.bb_pos, 16);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startField(builder) {\n builder.startObject(7);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset nameOffset\n */\n static addName(builder, nameOffset) {\n builder.addFieldOffset(0, nameOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param boolean nullable\n */\n static addNullable(builder, nullable) {\n builder.addFieldInt8(1, +nullable, +false);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param org.apache.arrow.flatbuf.Type typeType\n */\n static addTypeType(builder, typeType) {\n builder.addFieldInt8(2, typeType, org.apache.arrow.flatbuf.Type.NONE);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset typeOffset\n */\n static addType(builder, typeOffset) {\n builder.addFieldOffset(3, typeOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset dictionaryOffset\n */\n static addDictionary(builder, dictionaryOffset) {\n builder.addFieldOffset(4, dictionaryOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset childrenOffset\n */\n static addChildren(builder, childrenOffset) {\n builder.addFieldOffset(5, childrenOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param Array. data\n * @returns flatbuffers.Offset\n */\n static createChildrenVector(builder, data) {\n builder.startVector(4, data.length, 4);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addOffset(data[i]);\n }\n return builder.endVector();\n }\n /**\n * @param flatbuffers.Builder builder\n * @param number numElems\n */\n static startChildrenVector(builder, numElems) {\n builder.startVector(4, numElems, 4);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset customMetadataOffset\n */\n static addCustomMetadata(builder, customMetadataOffset) {\n builder.addFieldOffset(6, customMetadataOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param Array. data\n * @returns flatbuffers.Offset\n */\n static createCustomMetadataVector(builder, data) {\n builder.startVector(4, data.length, 4);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addOffset(data[i]);\n }\n return builder.endVector();\n }\n /**\n * @param flatbuffers.Builder builder\n * @param number numElems\n */\n static startCustomMetadataVector(builder, numElems) {\n builder.startVector(4, numElems, 4);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endField(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createField(builder, nameOffset, nullable, typeType, typeOffset, dictionaryOffset, childrenOffset, customMetadataOffset) {\n Field.startField(builder);\n Field.addName(builder, nameOffset);\n Field.addNullable(builder, nullable);\n Field.addTypeType(builder, typeType);\n Field.addType(builder, typeOffset);\n Field.addDictionary(builder, dictionaryOffset);\n Field.addChildren(builder, childrenOffset);\n Field.addCustomMetadata(builder, customMetadataOffset);\n return Field.endField(builder);\n }\n }\n flatbuf.Field = Field;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * ----------------------------------------------------------------------\n * A Buffer represents a single contiguous memory segment\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Buffer {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Buffer\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * The relative offset into the shared memory page where the bytes for this\n * buffer starts\n *\n * @returns flatbuffers.Long\n */\n offset() {\n return this.bb.readInt64(this.bb_pos);\n }\n /**\n * The absolute length (in bytes) of the memory buffer. The memory is found\n * from offset (inclusive) to offset + length (non-inclusive).\n *\n * @returns flatbuffers.Long\n */\n length() {\n return this.bb.readInt64(this.bb_pos + 8);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Long offset\n * @param flatbuffers.Long length\n * @returns flatbuffers.Offset\n */\n static createBuffer(builder, offset, length) {\n builder.prep(8, 16);\n builder.writeInt64(length);\n builder.writeInt64(offset);\n return builder.offset();\n }\n }\n flatbuf.Buffer = Buffer;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * ----------------------------------------------------------------------\n * A Schema describes the columns in a row batch\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Schema {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Schema\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Schema= obj\n * @returns Schema\n */\n static getRootAsSchema(bb, obj) {\n return (obj || new Schema).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * endianness of the buffer\n * it is Little Endian by default\n * if endianness doesn't match the underlying system then the vectors need to be converted\n *\n * @returns org.apache.arrow.flatbuf.Endianness\n */\n endianness() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? /** */ (this.bb.readInt16(this.bb_pos + offset)) : org.apache.arrow.flatbuf.Endianness.Little;\n }\n /**\n * @param number index\n * @param org.apache.arrow.flatbuf.Field= obj\n * @returns org.apache.arrow.flatbuf.Field\n */\n fields(index, obj) {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? (obj || new org.apache.arrow.flatbuf.Field).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;\n }\n /**\n * @returns number\n */\n fieldsLength() {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * @param number index\n * @param org.apache.arrow.flatbuf.KeyValue= obj\n * @returns org.apache.arrow.flatbuf.KeyValue\n */\n customMetadata(index, obj) {\n let offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? (obj || new org.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;\n }\n /**\n * @returns number\n */\n customMetadataLength() {\n let offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startSchema(builder) {\n builder.startObject(3);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param org.apache.arrow.flatbuf.Endianness endianness\n */\n static addEndianness(builder, endianness) {\n builder.addFieldInt16(0, endianness, org.apache.arrow.flatbuf.Endianness.Little);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset fieldsOffset\n */\n static addFields(builder, fieldsOffset) {\n builder.addFieldOffset(1, fieldsOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param Array. data\n * @returns flatbuffers.Offset\n */\n static createFieldsVector(builder, data) {\n builder.startVector(4, data.length, 4);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addOffset(data[i]);\n }\n return builder.endVector();\n }\n /**\n * @param flatbuffers.Builder builder\n * @param number numElems\n */\n static startFieldsVector(builder, numElems) {\n builder.startVector(4, numElems, 4);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset customMetadataOffset\n */\n static addCustomMetadata(builder, customMetadataOffset) {\n builder.addFieldOffset(2, customMetadataOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param Array. data\n * @returns flatbuffers.Offset\n */\n static createCustomMetadataVector(builder, data) {\n builder.startVector(4, data.length, 4);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addOffset(data[i]);\n }\n return builder.endVector();\n }\n /**\n * @param flatbuffers.Builder builder\n * @param number numElems\n */\n static startCustomMetadataVector(builder, numElems) {\n builder.startVector(4, numElems, 4);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endSchema(builder) {\n let offset = builder.endObject();\n return offset;\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset offset\n */\n static finishSchemaBuffer(builder, offset) {\n builder.finish(offset);\n }\n static createSchema(builder, endianness, fieldsOffset, customMetadataOffset) {\n Schema.startSchema(builder);\n Schema.addEndianness(builder, endianness);\n Schema.addFields(builder, fieldsOffset);\n Schema.addCustomMetadata(builder, customMetadataOffset);\n return Schema.endSchema(builder);\n }\n }\n flatbuf.Schema = Schema;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n\n//# sourceMappingURL=Schema.mjs.map\n","// automatically generated by the FlatBuffers compiler, do not modify\nimport * as NS7624605610262437867 from './Schema';\nexport var org;\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n flatbuf.Schema = NS7624605610262437867.org.apache.arrow.flatbuf.Schema;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * ----------------------------------------------------------------------\n * The root Message type\n * This union enables us to easily send different message types without\n * redundant storage, and in the future we can easily add new message types.\n *\n * Arrow implementations do not need to implement all of the message types,\n * which may include experimental metadata types. For maximum compatibility,\n * it is best to send data using RecordBatch\n *\n * @enum {number}\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n let MessageHeader;\n (function (MessageHeader) {\n MessageHeader[MessageHeader[\"NONE\"] = 0] = \"NONE\";\n MessageHeader[MessageHeader[\"Schema\"] = 1] = \"Schema\";\n MessageHeader[MessageHeader[\"DictionaryBatch\"] = 2] = \"DictionaryBatch\";\n MessageHeader[MessageHeader[\"RecordBatch\"] = 3] = \"RecordBatch\";\n MessageHeader[MessageHeader[\"Tensor\"] = 4] = \"Tensor\";\n MessageHeader[MessageHeader[\"SparseTensor\"] = 5] = \"SparseTensor\";\n })(MessageHeader = flatbuf.MessageHeader || (flatbuf.MessageHeader = {}));\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * ----------------------------------------------------------------------\n * Data structures for describing a table row batch (a collection of\n * equal-length Arrow arrays)\n * Metadata about a field at some level of a nested type tree (but not\n * its children).\n *\n * For example, a List with values [[1, 2, 3], null, [4], [5, 6], null]\n * would have {length: 5, null_count: 2} for its List node, and {length: 6,\n * null_count: 0} for its Int16 node, as separate FieldNode structs\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class FieldNode {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns FieldNode\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * The number of value slots in the Arrow array at this level of a nested\n * tree\n *\n * @returns flatbuffers.Long\n */\n length() {\n return this.bb.readInt64(this.bb_pos);\n }\n /**\n * The number of observed nulls. Fields with null_count == 0 may choose not\n * to write their physical validity bitmap out as a materialized buffer,\n * instead setting the length of the bitmap buffer to 0.\n *\n * @returns flatbuffers.Long\n */\n nullCount() {\n return this.bb.readInt64(this.bb_pos + 8);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Long length\n * @param flatbuffers.Long null_count\n * @returns flatbuffers.Offset\n */\n static createFieldNode(builder, length, null_count) {\n builder.prep(8, 16);\n builder.writeInt64(null_count);\n builder.writeInt64(length);\n return builder.offset();\n }\n }\n flatbuf.FieldNode = FieldNode;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * A data header describing the shared memory layout of a \"record\" or \"row\"\n * batch. Some systems call this a \"row batch\" internally and others a \"record\n * batch\".\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class RecordBatch {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns RecordBatch\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param RecordBatch= obj\n * @returns RecordBatch\n */\n static getRootAsRecordBatch(bb, obj) {\n return (obj || new RecordBatch).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * number of records / rows. The arrays in the batch should all have this\n * length\n *\n * @returns flatbuffers.Long\n */\n length() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);\n }\n /**\n * Nodes correspond to the pre-ordered flattened logical schema\n *\n * @param number index\n * @param org.apache.arrow.flatbuf.FieldNode= obj\n * @returns org.apache.arrow.flatbuf.FieldNode\n */\n nodes(index, obj) {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? (obj || new org.apache.arrow.flatbuf.FieldNode).__init(this.bb.__vector(this.bb_pos + offset) + index * 16, this.bb) : null;\n }\n /**\n * @returns number\n */\n nodesLength() {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * Buffers correspond to the pre-ordered flattened buffer tree\n *\n * The number of buffers appended to this list depends on the schema. For\n * example, most primitive arrays will have 2 buffers, 1 for the validity\n * bitmap and 1 for the values. For struct arrays, there will only be a\n * single buffer for the validity (nulls) bitmap\n *\n * @param number index\n * @param org.apache.arrow.flatbuf.Buffer= obj\n * @returns org.apache.arrow.flatbuf.Buffer\n */\n buffers(index, obj) {\n let offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? (obj || new NS7624605610262437867.org.apache.arrow.flatbuf.Buffer).__init(this.bb.__vector(this.bb_pos + offset) + index * 16, this.bb) : null;\n }\n /**\n * @returns number\n */\n buffersLength() {\n let offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startRecordBatch(builder) {\n builder.startObject(3);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Long length\n */\n static addLength(builder, length) {\n builder.addFieldInt64(0, length, builder.createLong(0, 0));\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset nodesOffset\n */\n static addNodes(builder, nodesOffset) {\n builder.addFieldOffset(1, nodesOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param number numElems\n */\n static startNodesVector(builder, numElems) {\n builder.startVector(16, numElems, 8);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset buffersOffset\n */\n static addBuffers(builder, buffersOffset) {\n builder.addFieldOffset(2, buffersOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param number numElems\n */\n static startBuffersVector(builder, numElems) {\n builder.startVector(16, numElems, 8);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endRecordBatch(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createRecordBatch(builder, length, nodesOffset, buffersOffset) {\n RecordBatch.startRecordBatch(builder);\n RecordBatch.addLength(builder, length);\n RecordBatch.addNodes(builder, nodesOffset);\n RecordBatch.addBuffers(builder, buffersOffset);\n return RecordBatch.endRecordBatch(builder);\n }\n }\n flatbuf.RecordBatch = RecordBatch;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * For sending dictionary encoding information. Any Field can be\n * dictionary-encoded, but in this case none of its children may be\n * dictionary-encoded.\n * There is one vector / column per dictionary, but that vector / column\n * may be spread across multiple dictionary batches by using the isDelta\n * flag\n *\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class DictionaryBatch {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns DictionaryBatch\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param DictionaryBatch= obj\n * @returns DictionaryBatch\n */\n static getRootAsDictionaryBatch(bb, obj) {\n return (obj || new DictionaryBatch).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @returns flatbuffers.Long\n */\n id() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);\n }\n /**\n * @param org.apache.arrow.flatbuf.RecordBatch= obj\n * @returns org.apache.arrow.flatbuf.RecordBatch|null\n */\n data(obj) {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? (obj || new org.apache.arrow.flatbuf.RecordBatch).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n /**\n * If isDelta is true the values in the dictionary are to be appended to a\n * dictionary with the indicated id\n *\n * @returns boolean\n */\n isDelta() {\n let offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startDictionaryBatch(builder) {\n builder.startObject(3);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Long id\n */\n static addId(builder, id) {\n builder.addFieldInt64(0, id, builder.createLong(0, 0));\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset dataOffset\n */\n static addData(builder, dataOffset) {\n builder.addFieldOffset(1, dataOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param boolean isDelta\n */\n static addIsDelta(builder, isDelta) {\n builder.addFieldInt8(2, +isDelta, +false);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endDictionaryBatch(builder) {\n let offset = builder.endObject();\n return offset;\n }\n static createDictionaryBatch(builder, id, dataOffset, isDelta) {\n DictionaryBatch.startDictionaryBatch(builder);\n DictionaryBatch.addId(builder, id);\n DictionaryBatch.addData(builder, dataOffset);\n DictionaryBatch.addIsDelta(builder, isDelta);\n return DictionaryBatch.endDictionaryBatch(builder);\n }\n }\n flatbuf.DictionaryBatch = DictionaryBatch;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Message {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Message\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Message= obj\n * @returns Message\n */\n static getRootAsMessage(bb, obj) {\n return (obj || new Message).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @returns org.apache.arrow.flatbuf.MetadataVersion\n */\n version() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? /** */ (this.bb.readInt16(this.bb_pos + offset)) : NS7624605610262437867.org.apache.arrow.flatbuf.MetadataVersion.V1;\n }\n /**\n * @returns org.apache.arrow.flatbuf.MessageHeader\n */\n headerType() {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? /** */ (this.bb.readUint8(this.bb_pos + offset)) : org.apache.arrow.flatbuf.MessageHeader.NONE;\n }\n /**\n * @param flatbuffers.Table obj\n * @returns ?flatbuffers.Table\n */\n header(obj) {\n let offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.__union(obj, this.bb_pos + offset) : null;\n }\n /**\n * @returns flatbuffers.Long\n */\n bodyLength() {\n let offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0);\n }\n /**\n * @param number index\n * @param org.apache.arrow.flatbuf.KeyValue= obj\n * @returns org.apache.arrow.flatbuf.KeyValue\n */\n customMetadata(index, obj) {\n let offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? (obj || new NS7624605610262437867.org.apache.arrow.flatbuf.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;\n }\n /**\n * @returns number\n */\n customMetadataLength() {\n let offset = this.bb.__offset(this.bb_pos, 12);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startMessage(builder) {\n builder.startObject(5);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param org.apache.arrow.flatbuf.MetadataVersion version\n */\n static addVersion(builder, version) {\n builder.addFieldInt16(0, version, NS7624605610262437867.org.apache.arrow.flatbuf.MetadataVersion.V1);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param org.apache.arrow.flatbuf.MessageHeader headerType\n */\n static addHeaderType(builder, headerType) {\n builder.addFieldInt8(1, headerType, org.apache.arrow.flatbuf.MessageHeader.NONE);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset headerOffset\n */\n static addHeader(builder, headerOffset) {\n builder.addFieldOffset(2, headerOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Long bodyLength\n */\n static addBodyLength(builder, bodyLength) {\n builder.addFieldInt64(3, bodyLength, builder.createLong(0, 0));\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset customMetadataOffset\n */\n static addCustomMetadata(builder, customMetadataOffset) {\n builder.addFieldOffset(4, customMetadataOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param Array. data\n * @returns flatbuffers.Offset\n */\n static createCustomMetadataVector(builder, data) {\n builder.startVector(4, data.length, 4);\n for (let i = data.length - 1; i >= 0; i--) {\n builder.addOffset(data[i]);\n }\n return builder.endVector();\n }\n /**\n * @param flatbuffers.Builder builder\n * @param number numElems\n */\n static startCustomMetadataVector(builder, numElems) {\n builder.startVector(4, numElems, 4);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endMessage(builder) {\n let offset = builder.endObject();\n return offset;\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset offset\n */\n static finishMessageBuffer(builder, offset) {\n builder.finish(offset);\n }\n static createMessage(builder, version, headerType, headerOffset, bodyLength, customMetadataOffset) {\n Message.startMessage(builder);\n Message.addVersion(builder, version);\n Message.addHeaderType(builder, headerType);\n Message.addHeader(builder, headerOffset);\n Message.addBodyLength(builder, bodyLength);\n Message.addCustomMetadata(builder, customMetadataOffset);\n return Message.endMessage(builder);\n }\n }\n flatbuf.Message = Message;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n\n//# sourceMappingURL=Message.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport * as Schema_ from './fb/Schema';\nimport * as Message_ from './fb/Message';\nexport var ArrowType = Schema_.org.apache.arrow.flatbuf.Type;\nexport var DateUnit = Schema_.org.apache.arrow.flatbuf.DateUnit;\nexport var TimeUnit = Schema_.org.apache.arrow.flatbuf.TimeUnit;\nexport var Precision = Schema_.org.apache.arrow.flatbuf.Precision;\nexport var UnionMode = Schema_.org.apache.arrow.flatbuf.UnionMode;\nexport var IntervalUnit = Schema_.org.apache.arrow.flatbuf.IntervalUnit;\nexport var MessageHeader = Message_.org.apache.arrow.flatbuf.MessageHeader;\nexport var MetadataVersion = Schema_.org.apache.arrow.flatbuf.MetadataVersion;\n/**\n * Main data type enumeration.\n *\n * Data types in this library are all *logical*. They can be expressed as\n * either a primitive physical type (bytes or bits of some fixed size), a\n * nested type consisting of other data types, or another data type (e.g. a\n * timestamp encoded as an int64).\n *\n * **Note**: Only enum values 0-17 (NONE through Map) are written to an Arrow\n * IPC payload.\n *\n * The rest of the values are specified here so TypeScript can narrow the type\n * signatures further beyond the base Arrow Types. The Arrow DataTypes include\n * metadata like `bitWidth` that impact the type signatures of the values we\n * accept and return.\n *\n * For example, the `Int8Vector` reads 1-byte numbers from an `Int8Array`, an\n * `Int32Vector` reads a 4-byte number from an `Int32Array`, and an `Int64Vector`\n * reads a pair of 4-byte lo, hi 32-bit integers as a zero-copy slice from the\n * underlying `Int32Array`.\n *\n * Library consumers benefit by knowing the narrowest type, since we can ensure\n * the types across all public methods are propagated, and never bail to `any`.\n * These values are _never_ used at runtime, and they will _never_ be written\n * to the flatbuffers metadata of serialized Arrow IPC payloads.\n */\nexport var Type;\n(function (Type) {\n /** The default placeholder type */\n Type[Type[\"NONE\"] = 0] = \"NONE\";\n /** A NULL type having no physical storage */\n Type[Type[\"Null\"] = 1] = \"Null\";\n /** Signed or unsigned 8, 16, 32, or 64-bit little-endian integer */\n Type[Type[\"Int\"] = 2] = \"Int\";\n /** 2, 4, or 8-byte floating point value */\n Type[Type[\"Float\"] = 3] = \"Float\";\n /** Variable-length bytes (no guarantee of UTF8-ness) */\n Type[Type[\"Binary\"] = 4] = \"Binary\";\n /** UTF8 variable-length string as List */\n Type[Type[\"Utf8\"] = 5] = \"Utf8\";\n /** Boolean as 1 bit, LSB bit-packed ordering */\n Type[Type[\"Bool\"] = 6] = \"Bool\";\n /** Precision-and-scale-based decimal type. Storage type depends on the parameters. */\n Type[Type[\"Decimal\"] = 7] = \"Decimal\";\n /** int32_t days or int64_t milliseconds since the UNIX epoch */\n Type[Type[\"Date\"] = 8] = \"Date\";\n /** Time as signed 32 or 64-bit integer, representing either seconds, milliseconds, microseconds, or nanoseconds since midnight since midnight */\n Type[Type[\"Time\"] = 9] = \"Time\";\n /** Exact timestamp encoded with int64 since UNIX epoch (Default unit millisecond) */\n Type[Type[\"Timestamp\"] = 10] = \"Timestamp\";\n /** YEAR_MONTH or DAY_TIME interval in SQL style */\n Type[Type[\"Interval\"] = 11] = \"Interval\";\n /** A list of some logical data type */\n Type[Type[\"List\"] = 12] = \"List\";\n /** Struct of logical types */\n Type[Type[\"Struct\"] = 13] = \"Struct\";\n /** Union of logical types */\n Type[Type[\"Union\"] = 14] = \"Union\";\n /** Fixed-size binary. Each value occupies the same number of bytes */\n Type[Type[\"FixedSizeBinary\"] = 15] = \"FixedSizeBinary\";\n /** Fixed-size list. Each value occupies the same number of bytes */\n Type[Type[\"FixedSizeList\"] = 16] = \"FixedSizeList\";\n /** Map of named logical types */\n Type[Type[\"Map\"] = 17] = \"Map\";\n /** Dictionary aka Category type */\n Type[Type[\"Dictionary\"] = -1] = \"Dictionary\";\n Type[Type[\"Int8\"] = -2] = \"Int8\";\n Type[Type[\"Int16\"] = -3] = \"Int16\";\n Type[Type[\"Int32\"] = -4] = \"Int32\";\n Type[Type[\"Int64\"] = -5] = \"Int64\";\n Type[Type[\"Uint8\"] = -6] = \"Uint8\";\n Type[Type[\"Uint16\"] = -7] = \"Uint16\";\n Type[Type[\"Uint32\"] = -8] = \"Uint32\";\n Type[Type[\"Uint64\"] = -9] = \"Uint64\";\n Type[Type[\"Float16\"] = -10] = \"Float16\";\n Type[Type[\"Float32\"] = -11] = \"Float32\";\n Type[Type[\"Float64\"] = -12] = \"Float64\";\n Type[Type[\"DateDay\"] = -13] = \"DateDay\";\n Type[Type[\"DateMillisecond\"] = -14] = \"DateMillisecond\";\n Type[Type[\"TimestampSecond\"] = -15] = \"TimestampSecond\";\n Type[Type[\"TimestampMillisecond\"] = -16] = \"TimestampMillisecond\";\n Type[Type[\"TimestampMicrosecond\"] = -17] = \"TimestampMicrosecond\";\n Type[Type[\"TimestampNanosecond\"] = -18] = \"TimestampNanosecond\";\n Type[Type[\"TimeSecond\"] = -19] = \"TimeSecond\";\n Type[Type[\"TimeMillisecond\"] = -20] = \"TimeMillisecond\";\n Type[Type[\"TimeMicrosecond\"] = -21] = \"TimeMicrosecond\";\n Type[Type[\"TimeNanosecond\"] = -22] = \"TimeNanosecond\";\n Type[Type[\"DenseUnion\"] = -23] = \"DenseUnion\";\n Type[Type[\"SparseUnion\"] = -24] = \"SparseUnion\";\n Type[Type[\"IntervalDayTime\"] = -25] = \"IntervalDayTime\";\n Type[Type[\"IntervalYearMonth\"] = -26] = \"IntervalYearMonth\";\n})(Type || (Type = {}));\nexport var BufferType;\n(function (BufferType) {\n /**\n * used in List type, Dense Union and variable length primitive types (String, Binary)\n */\n BufferType[BufferType[\"OFFSET\"] = 0] = \"OFFSET\";\n /**\n * actual data, either wixed width primitive types in slots or variable width delimited by an OFFSET vector\n */\n BufferType[BufferType[\"DATA\"] = 1] = \"DATA\";\n /**\n * Bit vector indicating if each value is null\n */\n BufferType[BufferType[\"VALIDITY\"] = 2] = \"VALIDITY\";\n /**\n * Type vector used in Union type\n */\n BufferType[BufferType[\"TYPE\"] = 3] = \"TYPE\";\n})(BufferType || (BufferType = {}));\n\n//# sourceMappingURL=enum.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n/** @ignore */\nexport function getBool(_data, _index, byte, bit) {\n return (byte & 1 << bit) !== 0;\n}\n/** @ignore */\nexport function getBit(_data, _index, byte, bit) {\n return (byte & 1 << bit) >> bit;\n}\n/** @ignore */\nexport function setBool(bytes, index, value) {\n return value ?\n !!(bytes[index >> 3] |= (1 << (index % 8))) || true :\n !(bytes[index >> 3] &= ~(1 << (index % 8))) && false;\n}\n/** @ignore */\nexport function truncateBitmap(offset, length, bitmap) {\n const alignedSize = (bitmap.byteLength + 7) & ~7;\n if (offset > 0 || bitmap.byteLength < alignedSize) {\n const bytes = new Uint8Array(alignedSize);\n // If the offset is a multiple of 8 bits, it's safe to slice the bitmap\n bytes.set(offset % 8 === 0 ? bitmap.subarray(offset >> 3) :\n // Otherwise iterate each bit from the offset and return a new one\n packBools(iterateBits(bitmap, offset, length, null, getBool)).subarray(0, alignedSize));\n return bytes;\n }\n return bitmap;\n}\n/** @ignore */\nexport function packBools(values) {\n let xs = [];\n let i = 0, bit = 0, byte = 0;\n for (const value of values) {\n value && (byte |= 1 << bit);\n if (++bit === 8) {\n xs[i++] = byte;\n byte = bit = 0;\n }\n }\n if (i === 0 || bit > 0) {\n xs[i++] = byte;\n }\n let b = new Uint8Array((xs.length + 7) & ~7);\n b.set(xs);\n return b;\n}\n/** @ignore */\nexport function* iterateBits(bytes, begin, length, context, get) {\n let bit = begin % 8;\n let byteIndex = begin >> 3;\n let index = 0, remaining = length;\n for (; remaining > 0; bit = 0) {\n let byte = bytes[byteIndex++];\n do {\n yield get(context, index++, byte, bit);\n } while (--remaining > 0 && ++bit < 8);\n }\n}\n/**\n * Compute the population count (the number of bits set to 1) for a range of bits in a Uint8Array.\n * @param vector The Uint8Array of bits for which to compute the population count.\n * @param lhs The range's left-hand side (or start) bit\n * @param rhs The range's right-hand side (or end) bit\n */\n/** @ignore */\nexport function popcnt_bit_range(data, lhs, rhs) {\n if (rhs - lhs <= 0) {\n return 0;\n }\n // If the bit range is less than one byte, sum the 1 bits in the bit range\n if (rhs - lhs < 8) {\n let sum = 0;\n for (const bit of iterateBits(data, lhs, rhs - lhs, data, getBit)) {\n sum += bit;\n }\n return sum;\n }\n // Get the next lowest multiple of 8 from the right hand side\n const rhsInside = rhs >> 3 << 3;\n // Get the next highest multiple of 8 from the left hand side\n const lhsInside = lhs + (lhs % 8 === 0 ? 0 : 8 - lhs % 8);\n return (\n // Get the popcnt of bits between the left hand side, and the next highest multiple of 8\n popcnt_bit_range(data, lhs, lhsInside) +\n // Get the popcnt of bits between the right hand side, and the next lowest multiple of 8\n popcnt_bit_range(data, rhsInside, rhs) +\n // Get the popcnt of all bits between the left and right hand sides' multiples of 8\n popcnt_array(data, lhsInside >> 3, (rhsInside - lhsInside) >> 3));\n}\n/** @ignore */\nexport function popcnt_array(arr, byteOffset, byteLength) {\n let cnt = 0, pos = byteOffset | 0;\n const view = new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n const len = byteLength === void 0 ? arr.byteLength : pos + byteLength;\n while (len - pos >= 4) {\n cnt += popcnt_uint32(view.getUint32(pos));\n pos += 4;\n }\n while (len - pos >= 2) {\n cnt += popcnt_uint32(view.getUint16(pos));\n pos += 2;\n }\n while (len - pos >= 1) {\n cnt += popcnt_uint32(view.getUint8(pos));\n pos += 1;\n }\n return cnt;\n}\n/** @ignore */\nexport function popcnt_uint32(uint32) {\n let i = uint32 | 0;\n i = i - ((i >>> 1) & 0x55555555);\n i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);\n return (((i + (i >>> 4)) & 0x0F0F0F0F) * 0x01010101) >>> 24;\n}\n\n//# sourceMappingURL=bit.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Data } from './data';\nimport { Vector } from './vector';\nimport { Type, Precision, DateUnit, TimeUnit, IntervalUnit, UnionMode } from './enum';\nimport { DataType, } from './type';\nexport class Visitor {\n visitMany(nodes, ...args) {\n return nodes.map((node, i) => this.visit(node, ...args.map((x) => x[i])));\n }\n visit(...args) {\n return this.getVisitFn(args[0], false).apply(this, args);\n }\n getVisitFn(node, throwIfNotFound = true) {\n return getVisitFn(this, node, throwIfNotFound);\n }\n visitNull(_node, ..._args) { return null; }\n visitBool(_node, ..._args) { return null; }\n visitInt(_node, ..._args) { return null; }\n visitFloat(_node, ..._args) { return null; }\n visitUtf8(_node, ..._args) { return null; }\n visitBinary(_node, ..._args) { return null; }\n visitFixedSizeBinary(_node, ..._args) { return null; }\n visitDate(_node, ..._args) { return null; }\n visitTimestamp(_node, ..._args) { return null; }\n visitTime(_node, ..._args) { return null; }\n visitDecimal(_node, ..._args) { return null; }\n visitList(_node, ..._args) { return null; }\n visitStruct(_node, ..._args) { return null; }\n visitUnion(_node, ..._args) { return null; }\n visitDictionary(_node, ..._args) { return null; }\n visitInterval(_node, ..._args) { return null; }\n visitFixedSizeList(_node, ..._args) { return null; }\n visitMap(_node, ..._args) { return null; }\n}\n/** @ignore */\nfunction getVisitFn(visitor, node, throwIfNotFound = true) {\n let fn = null;\n let dtype = Type.NONE;\n // tslint:disable\n if (node instanceof Data) {\n dtype = inferDType(node.type);\n }\n else if (node instanceof Vector) {\n dtype = inferDType(node.type);\n }\n else if (node instanceof DataType) {\n dtype = inferDType(node);\n }\n else if (typeof (dtype = node) !== 'number') {\n dtype = Type[node];\n }\n switch (dtype) {\n case Type.Null:\n fn = visitor.visitNull;\n break;\n case Type.Bool:\n fn = visitor.visitBool;\n break;\n case Type.Int:\n fn = visitor.visitInt;\n break;\n case Type.Int8:\n fn = visitor.visitInt8 || visitor.visitInt;\n break;\n case Type.Int16:\n fn = visitor.visitInt16 || visitor.visitInt;\n break;\n case Type.Int32:\n fn = visitor.visitInt32 || visitor.visitInt;\n break;\n case Type.Int64:\n fn = visitor.visitInt64 || visitor.visitInt;\n break;\n case Type.Uint8:\n fn = visitor.visitUint8 || visitor.visitInt;\n break;\n case Type.Uint16:\n fn = visitor.visitUint16 || visitor.visitInt;\n break;\n case Type.Uint32:\n fn = visitor.visitUint32 || visitor.visitInt;\n break;\n case Type.Uint64:\n fn = visitor.visitUint64 || visitor.visitInt;\n break;\n case Type.Float:\n fn = visitor.visitFloat;\n break;\n case Type.Float16:\n fn = visitor.visitFloat16 || visitor.visitFloat;\n break;\n case Type.Float32:\n fn = visitor.visitFloat32 || visitor.visitFloat;\n break;\n case Type.Float64:\n fn = visitor.visitFloat64 || visitor.visitFloat;\n break;\n case Type.Utf8:\n fn = visitor.visitUtf8;\n break;\n case Type.Binary:\n fn = visitor.visitBinary;\n break;\n case Type.FixedSizeBinary:\n fn = visitor.visitFixedSizeBinary;\n break;\n case Type.Date:\n fn = visitor.visitDate;\n break;\n case Type.DateDay:\n fn = visitor.visitDateDay || visitor.visitDate;\n break;\n case Type.DateMillisecond:\n fn = visitor.visitDateMillisecond || visitor.visitDate;\n break;\n case Type.Timestamp:\n fn = visitor.visitTimestamp;\n break;\n case Type.TimestampSecond:\n fn = visitor.visitTimestampSecond || visitor.visitTimestamp;\n break;\n case Type.TimestampMillisecond:\n fn = visitor.visitTimestampMillisecond || visitor.visitTimestamp;\n break;\n case Type.TimestampMicrosecond:\n fn = visitor.visitTimestampMicrosecond || visitor.visitTimestamp;\n break;\n case Type.TimestampNanosecond:\n fn = visitor.visitTimestampNanosecond || visitor.visitTimestamp;\n break;\n case Type.Time:\n fn = visitor.visitTime;\n break;\n case Type.TimeSecond:\n fn = visitor.visitTimeSecond || visitor.visitTime;\n break;\n case Type.TimeMillisecond:\n fn = visitor.visitTimeMillisecond || visitor.visitTime;\n break;\n case Type.TimeMicrosecond:\n fn = visitor.visitTimeMicrosecond || visitor.visitTime;\n break;\n case Type.TimeNanosecond:\n fn = visitor.visitTimeNanosecond || visitor.visitTime;\n break;\n case Type.Decimal:\n fn = visitor.visitDecimal;\n break;\n case Type.List:\n fn = visitor.visitList;\n break;\n case Type.Struct:\n fn = visitor.visitStruct;\n break;\n case Type.Union:\n fn = visitor.visitUnion;\n break;\n case Type.DenseUnion:\n fn = visitor.visitDenseUnion || visitor.visitUnion;\n break;\n case Type.SparseUnion:\n fn = visitor.visitSparseUnion || visitor.visitUnion;\n break;\n case Type.Dictionary:\n fn = visitor.visitDictionary;\n break;\n case Type.Interval:\n fn = visitor.visitInterval;\n break;\n case Type.IntervalDayTime:\n fn = visitor.visitIntervalDayTime || visitor.visitInterval;\n break;\n case Type.IntervalYearMonth:\n fn = visitor.visitIntervalYearMonth || visitor.visitInterval;\n break;\n case Type.FixedSizeList:\n fn = visitor.visitFixedSizeList;\n break;\n case Type.Map:\n fn = visitor.visitMap;\n break;\n }\n if (typeof fn === 'function')\n return fn;\n if (!throwIfNotFound)\n return () => null;\n throw new Error(`Unrecognized type '${Type[dtype]}'`);\n}\n/** @ignore */\nfunction inferDType(type) {\n switch (type.typeId) {\n case Type.Null: return Type.Null;\n case Type.Int:\n const { bitWidth, isSigned } = type;\n switch (bitWidth) {\n case 8: return isSigned ? Type.Int8 : Type.Uint8;\n case 16: return isSigned ? Type.Int16 : Type.Uint16;\n case 32: return isSigned ? Type.Int32 : Type.Uint32;\n case 64: return isSigned ? Type.Int64 : Type.Uint64;\n }\n return Type.Int;\n case Type.Float:\n switch (type.precision) {\n case Precision.HALF: return Type.Float16;\n case Precision.SINGLE: return Type.Float32;\n case Precision.DOUBLE: return Type.Float64;\n }\n return Type.Float;\n case Type.Binary: return Type.Binary;\n case Type.Utf8: return Type.Utf8;\n case Type.Bool: return Type.Bool;\n case Type.Decimal: return Type.Decimal;\n case Type.Time:\n switch (type.unit) {\n case TimeUnit.SECOND: return Type.TimeSecond;\n case TimeUnit.MILLISECOND: return Type.TimeMillisecond;\n case TimeUnit.MICROSECOND: return Type.TimeMicrosecond;\n case TimeUnit.NANOSECOND: return Type.TimeNanosecond;\n }\n return Type.Time;\n case Type.Timestamp:\n switch (type.unit) {\n case TimeUnit.SECOND: return Type.TimestampSecond;\n case TimeUnit.MILLISECOND: return Type.TimestampMillisecond;\n case TimeUnit.MICROSECOND: return Type.TimestampMicrosecond;\n case TimeUnit.NANOSECOND: return Type.TimestampNanosecond;\n }\n return Type.Timestamp;\n case Type.Date:\n switch (type.unit) {\n case DateUnit.DAY: return Type.DateDay;\n case DateUnit.MILLISECOND: return Type.DateMillisecond;\n }\n return Type.Date;\n case Type.Interval:\n switch (type.unit) {\n case IntervalUnit.DAY_TIME: return Type.IntervalDayTime;\n case IntervalUnit.YEAR_MONTH: return Type.IntervalYearMonth;\n }\n return Type.Interval;\n case Type.Map: return Type.Map;\n case Type.List: return Type.List;\n case Type.Struct: return Type.Struct;\n case Type.Union:\n switch (type.mode) {\n case UnionMode.Dense: return Type.DenseUnion;\n case UnionMode.Sparse: return Type.SparseUnion;\n }\n return Type.Union;\n case Type.FixedSizeBinary: return Type.FixedSizeBinary;\n case Type.FixedSizeList: return Type.FixedSizeList;\n case Type.Dictionary: return Type.Dictionary;\n }\n throw new Error(`Unrecognized type '${Type[type.typeId]}'`);\n}\n// Add these here so they're picked up by the externs creator\n// in the build, and closure-compiler doesn't minify them away\nVisitor.prototype.visitInt8 = null;\nVisitor.prototype.visitInt16 = null;\nVisitor.prototype.visitInt32 = null;\nVisitor.prototype.visitInt64 = null;\nVisitor.prototype.visitUint8 = null;\nVisitor.prototype.visitUint16 = null;\nVisitor.prototype.visitUint32 = null;\nVisitor.prototype.visitUint64 = null;\nVisitor.prototype.visitFloat16 = null;\nVisitor.prototype.visitFloat32 = null;\nVisitor.prototype.visitFloat64 = null;\nVisitor.prototype.visitDateDay = null;\nVisitor.prototype.visitDateMillisecond = null;\nVisitor.prototype.visitTimestampSecond = null;\nVisitor.prototype.visitTimestampMillisecond = null;\nVisitor.prototype.visitTimestampMicrosecond = null;\nVisitor.prototype.visitTimestampNanosecond = null;\nVisitor.prototype.visitTimeSecond = null;\nVisitor.prototype.visitTimeMillisecond = null;\nVisitor.prototype.visitTimeMicrosecond = null;\nVisitor.prototype.visitTimeNanosecond = null;\nVisitor.prototype.visitDenseUnion = null;\nVisitor.prototype.visitSparseUnion = null;\nVisitor.prototype.visitIntervalDayTime = null;\nVisitor.prototype.visitIntervalYearMonth = null;\n\n//# sourceMappingURL=visitor.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Visitor } from '../visitor';\n/** @ignore */\nexport class TypeComparator extends Visitor {\n compareSchemas(schema, other) {\n return (schema === other) || (other instanceof schema.constructor &&\n instance.compareFields(schema.fields, other.fields));\n }\n compareFields(fields, others) {\n return (fields === others) || (Array.isArray(fields) &&\n Array.isArray(others) &&\n fields.length === others.length &&\n fields.every((f, i) => instance.compareField(f, others[i])));\n }\n compareField(field, other) {\n return (field === other) || (other instanceof field.constructor &&\n field.name === other.name &&\n field.nullable === other.nullable &&\n instance.visit(field.type, other.type));\n }\n}\nfunction compareConstructor(type, other) {\n return other instanceof type.constructor;\n}\nfunction compareAny(type, other) {\n return (type === other) || compareConstructor(type, other);\n}\nfunction compareInt(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.bitWidth === other.bitWidth &&\n type.isSigned === other.isSigned);\n}\nfunction compareFloat(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.precision === other.precision);\n}\nfunction compareFixedSizeBinary(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.byteWidth === other.byteWidth);\n}\nfunction compareDate(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.unit === other.unit);\n}\nfunction compareTimestamp(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.unit === other.unit &&\n type.timezone === other.timezone);\n}\nfunction compareTime(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.unit === other.unit &&\n type.bitWidth === other.bitWidth);\n}\nfunction compareList(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.children.length === other.children.length &&\n instance.compareFields(type.children, other.children));\n}\nfunction compareStruct(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.children.length === other.children.length &&\n instance.compareFields(type.children, other.children));\n}\nfunction compareUnion(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.mode === other.mode &&\n type.typeIds.every((x, i) => x === other.typeIds[i]) &&\n instance.compareFields(type.children, other.children));\n}\nfunction compareDictionary(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.id === other.id &&\n type.isOrdered === other.isOrdered &&\n instance.visit(type.indices, other.indices) &&\n instance.visit(type.dictionary, other.dictionary));\n}\nfunction compareInterval(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.unit === other.unit);\n}\nfunction compareFixedSizeList(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.listSize === other.listSize &&\n type.children.length === other.children.length &&\n instance.compareFields(type.children, other.children));\n}\nfunction compareMap(type, other) {\n return (type === other) || (compareConstructor(type, other) &&\n type.keysSorted === other.keysSorted &&\n type.children.length === other.children.length &&\n instance.compareFields(type.children, other.children));\n}\nTypeComparator.prototype.visitNull = compareAny;\nTypeComparator.prototype.visitBool = compareAny;\nTypeComparator.prototype.visitInt = compareInt;\nTypeComparator.prototype.visitInt8 = compareInt;\nTypeComparator.prototype.visitInt16 = compareInt;\nTypeComparator.prototype.visitInt32 = compareInt;\nTypeComparator.prototype.visitInt64 = compareInt;\nTypeComparator.prototype.visitUint8 = compareInt;\nTypeComparator.prototype.visitUint16 = compareInt;\nTypeComparator.prototype.visitUint32 = compareInt;\nTypeComparator.prototype.visitUint64 = compareInt;\nTypeComparator.prototype.visitFloat = compareFloat;\nTypeComparator.prototype.visitFloat16 = compareFloat;\nTypeComparator.prototype.visitFloat32 = compareFloat;\nTypeComparator.prototype.visitFloat64 = compareFloat;\nTypeComparator.prototype.visitUtf8 = compareAny;\nTypeComparator.prototype.visitBinary = compareAny;\nTypeComparator.prototype.visitFixedSizeBinary = compareFixedSizeBinary;\nTypeComparator.prototype.visitDate = compareDate;\nTypeComparator.prototype.visitDateDay = compareDate;\nTypeComparator.prototype.visitDateMillisecond = compareDate;\nTypeComparator.prototype.visitTimestamp = compareTimestamp;\nTypeComparator.prototype.visitTimestampSecond = compareTimestamp;\nTypeComparator.prototype.visitTimestampMillisecond = compareTimestamp;\nTypeComparator.prototype.visitTimestampMicrosecond = compareTimestamp;\nTypeComparator.prototype.visitTimestampNanosecond = compareTimestamp;\nTypeComparator.prototype.visitTime = compareTime;\nTypeComparator.prototype.visitTimeSecond = compareTime;\nTypeComparator.prototype.visitTimeMillisecond = compareTime;\nTypeComparator.prototype.visitTimeMicrosecond = compareTime;\nTypeComparator.prototype.visitTimeNanosecond = compareTime;\nTypeComparator.prototype.visitDecimal = compareAny;\nTypeComparator.prototype.visitList = compareList;\nTypeComparator.prototype.visitStruct = compareStruct;\nTypeComparator.prototype.visitUnion = compareUnion;\nTypeComparator.prototype.visitDenseUnion = compareUnion;\nTypeComparator.prototype.visitSparseUnion = compareUnion;\nTypeComparator.prototype.visitDictionary = compareDictionary;\nTypeComparator.prototype.visitInterval = compareInterval;\nTypeComparator.prototype.visitIntervalDayTime = compareInterval;\nTypeComparator.prototype.visitIntervalYearMonth = compareInterval;\nTypeComparator.prototype.visitFixedSizeList = compareFixedSizeList;\nTypeComparator.prototype.visitMap = compareMap;\n/** @ignore */\nexport const instance = new TypeComparator();\n\n//# sourceMappingURL=typecomparator.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { instance as comparer } from './visitor/typecomparator';\nimport { Type, Precision, UnionMode, DateUnit, TimeUnit, IntervalUnit } from './enum';\n/**\n * An abstract base class for classes that encapsulate metadata about each of\n * the logical types that Arrow can represent.\n */\nexport class DataType {\n /** @nocollapse */ static isNull(x) { return x && x.typeId === Type.Null; }\n /** @nocollapse */ static isInt(x) { return x && x.typeId === Type.Int; }\n /** @nocollapse */ static isFloat(x) { return x && x.typeId === Type.Float; }\n /** @nocollapse */ static isBinary(x) { return x && x.typeId === Type.Binary; }\n /** @nocollapse */ static isUtf8(x) { return x && x.typeId === Type.Utf8; }\n /** @nocollapse */ static isBool(x) { return x && x.typeId === Type.Bool; }\n /** @nocollapse */ static isDecimal(x) { return x && x.typeId === Type.Decimal; }\n /** @nocollapse */ static isDate(x) { return x && x.typeId === Type.Date; }\n /** @nocollapse */ static isTime(x) { return x && x.typeId === Type.Time; }\n /** @nocollapse */ static isTimestamp(x) { return x && x.typeId === Type.Timestamp; }\n /** @nocollapse */ static isInterval(x) { return x && x.typeId === Type.Interval; }\n /** @nocollapse */ static isList(x) { return x && x.typeId === Type.List; }\n /** @nocollapse */ static isStruct(x) { return x && x.typeId === Type.Struct; }\n /** @nocollapse */ static isUnion(x) { return x && x.typeId === Type.Union; }\n /** @nocollapse */ static isFixedSizeBinary(x) { return x && x.typeId === Type.FixedSizeBinary; }\n /** @nocollapse */ static isFixedSizeList(x) { return x && x.typeId === Type.FixedSizeList; }\n /** @nocollapse */ static isMap(x) { return x && x.typeId === Type.Map; }\n /** @nocollapse */ static isDictionary(x) { return x && x.typeId === Type.Dictionary; }\n get typeId() { return Type.NONE; }\n compareTo(other) {\n return comparer.visit(this, other);\n }\n}\nDataType[Symbol.toStringTag] = ((proto) => {\n proto.children = null;\n proto.ArrayType = Array;\n return proto[Symbol.toStringTag] = 'DataType';\n})(DataType.prototype);\n/** @ignore */\nexport class Null extends DataType {\n toString() { return `Null`; }\n get typeId() { return Type.Null; }\n}\nNull[Symbol.toStringTag] = ((proto) => {\n return proto[Symbol.toStringTag] = 'Null';\n})(Null.prototype);\n/** @ignore */\nclass Int_ extends DataType {\n constructor(isSigned, bitWidth) {\n super();\n this.isSigned = isSigned;\n this.bitWidth = bitWidth;\n }\n get typeId() { return Type.Int; }\n get ArrayType() {\n switch (this.bitWidth) {\n case 8: return this.isSigned ? Int8Array : Uint8Array;\n case 16: return this.isSigned ? Int16Array : Uint16Array;\n case 32: return this.isSigned ? Int32Array : Uint32Array;\n case 64: return this.isSigned ? Int32Array : Uint32Array;\n }\n throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`);\n }\n toString() { return `${this.isSigned ? `I` : `Ui`}nt${this.bitWidth}`; }\n}\nInt_[Symbol.toStringTag] = ((proto) => {\n proto.isSigned = null;\n proto.bitWidth = null;\n return proto[Symbol.toStringTag] = 'Int';\n})(Int_.prototype);\nexport { Int_ as Int };\n/** @ignore */\nexport class Int8 extends Int_ {\n constructor() { super(true, 8); }\n}\n/** @ignore */\nexport class Int16 extends Int_ {\n constructor() { super(true, 16); }\n}\n/** @ignore */\nexport class Int32 extends Int_ {\n constructor() { super(true, 32); }\n}\n/** @ignore */\nexport class Int64 extends Int_ {\n constructor() { super(true, 64); }\n}\n/** @ignore */\nexport class Uint8 extends Int_ {\n constructor() { super(false, 8); }\n}\n/** @ignore */\nexport class Uint16 extends Int_ {\n constructor() { super(false, 16); }\n}\n/** @ignore */\nexport class Uint32 extends Int_ {\n constructor() { super(false, 32); }\n}\n/** @ignore */\nexport class Uint64 extends Int_ {\n constructor() { super(false, 64); }\n}\nObject.defineProperty(Int8.prototype, 'ArrayType', { value: Int8Array });\nObject.defineProperty(Int16.prototype, 'ArrayType', { value: Int16Array });\nObject.defineProperty(Int32.prototype, 'ArrayType', { value: Int32Array });\nObject.defineProperty(Int64.prototype, 'ArrayType', { value: Int32Array });\nObject.defineProperty(Uint8.prototype, 'ArrayType', { value: Uint8Array });\nObject.defineProperty(Uint16.prototype, 'ArrayType', { value: Uint16Array });\nObject.defineProperty(Uint32.prototype, 'ArrayType', { value: Uint32Array });\nObject.defineProperty(Uint64.prototype, 'ArrayType', { value: Uint32Array });\n/** @ignore */\nexport class Float extends DataType {\n constructor(precision) {\n super();\n this.precision = precision;\n }\n get typeId() { return Type.Float; }\n get ArrayType() {\n switch (this.precision) {\n case Precision.HALF: return Uint16Array;\n case Precision.SINGLE: return Float32Array;\n case Precision.DOUBLE: return Float64Array;\n }\n throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`);\n }\n toString() { return `Float${(this.precision << 5) || 16}`; }\n}\nFloat[Symbol.toStringTag] = ((proto) => {\n proto.precision = null;\n return proto[Symbol.toStringTag] = 'Float';\n})(Float.prototype);\n/** @ignore */\nexport class Float16 extends Float {\n constructor() { super(Precision.HALF); }\n}\n/** @ignore */\nexport class Float32 extends Float {\n constructor() { super(Precision.SINGLE); }\n}\n/** @ignore */\nexport class Float64 extends Float {\n constructor() { super(Precision.DOUBLE); }\n}\nObject.defineProperty(Float16.prototype, 'ArrayType', { value: Uint16Array });\nObject.defineProperty(Float32.prototype, 'ArrayType', { value: Float32Array });\nObject.defineProperty(Float64.prototype, 'ArrayType', { value: Float64Array });\n/** @ignore */\nexport class Binary extends DataType {\n constructor() {\n super();\n }\n get typeId() { return Type.Binary; }\n toString() { return `Binary`; }\n}\nBinary[Symbol.toStringTag] = ((proto) => {\n proto.ArrayType = Uint8Array;\n return proto[Symbol.toStringTag] = 'Binary';\n})(Binary.prototype);\n/** @ignore */\nexport class Utf8 extends DataType {\n constructor() {\n super();\n }\n get typeId() { return Type.Utf8; }\n toString() { return `Utf8`; }\n}\nUtf8[Symbol.toStringTag] = ((proto) => {\n proto.ArrayType = Uint8Array;\n return proto[Symbol.toStringTag] = 'Utf8';\n})(Utf8.prototype);\n/** @ignore */\nexport class Bool extends DataType {\n constructor() {\n super();\n }\n get typeId() { return Type.Bool; }\n toString() { return `Bool`; }\n}\nBool[Symbol.toStringTag] = ((proto) => {\n proto.ArrayType = Uint8Array;\n return proto[Symbol.toStringTag] = 'Bool';\n})(Bool.prototype);\n/** @ignore */\nexport class Decimal extends DataType {\n constructor(scale, precision) {\n super();\n this.scale = scale;\n this.precision = precision;\n }\n get typeId() { return Type.Decimal; }\n toString() { return `Decimal[${this.precision}e${this.scale > 0 ? `+` : ``}${this.scale}]`; }\n}\nDecimal[Symbol.toStringTag] = ((proto) => {\n proto.scale = null;\n proto.precision = null;\n proto.ArrayType = Uint32Array;\n return proto[Symbol.toStringTag] = 'Decimal';\n})(Decimal.prototype);\n/** @ignore */\nexport class Date_ extends DataType {\n constructor(unit) {\n super();\n this.unit = unit;\n }\n get typeId() { return Type.Date; }\n toString() { return `Date${(this.unit + 1) * 32}<${DateUnit[this.unit]}>`; }\n}\nDate_[Symbol.toStringTag] = ((proto) => {\n proto.unit = null;\n proto.ArrayType = Int32Array;\n return proto[Symbol.toStringTag] = 'Date';\n})(Date_.prototype);\n/** @ignore */\nexport class DateDay extends Date_ {\n constructor() { super(DateUnit.DAY); }\n}\n/** @ignore */\nexport class DateMillisecond extends Date_ {\n constructor() { super(DateUnit.MILLISECOND); }\n}\n/** @ignore */\nclass Time_ extends DataType {\n constructor(unit, bitWidth) {\n super();\n this.unit = unit;\n this.bitWidth = bitWidth;\n }\n get typeId() { return Type.Time; }\n toString() { return `Time${this.bitWidth}<${TimeUnit[this.unit]}>`; }\n}\nTime_[Symbol.toStringTag] = ((proto) => {\n proto.unit = null;\n proto.bitWidth = null;\n proto.ArrayType = Int32Array;\n return proto[Symbol.toStringTag] = 'Time';\n})(Time_.prototype);\nexport { Time_ as Time };\n/** @ignore */\nexport class TimeSecond extends Time_ {\n constructor() { super(TimeUnit.SECOND, 32); }\n}\n/** @ignore */\nexport class TimeMillisecond extends Time_ {\n constructor() { super(TimeUnit.MILLISECOND, 32); }\n}\n/** @ignore */\nexport class TimeMicrosecond extends Time_ {\n constructor() { super(TimeUnit.MICROSECOND, 64); }\n}\n/** @ignore */\nexport class TimeNanosecond extends Time_ {\n constructor() { super(TimeUnit.NANOSECOND, 64); }\n}\n/** @ignore */\nclass Timestamp_ extends DataType {\n constructor(unit, timezone) {\n super();\n this.unit = unit;\n this.timezone = timezone;\n }\n get typeId() { return Type.Timestamp; }\n toString() { return `Timestamp<${TimeUnit[this.unit]}${this.timezone ? `, ${this.timezone}` : ``}>`; }\n}\nTimestamp_[Symbol.toStringTag] = ((proto) => {\n proto.unit = null;\n proto.timezone = null;\n proto.ArrayType = Int32Array;\n return proto[Symbol.toStringTag] = 'Timestamp';\n})(Timestamp_.prototype);\nexport { Timestamp_ as Timestamp };\n/** @ignore */\nexport class TimestampSecond extends Timestamp_ {\n constructor(timezone) { super(TimeUnit.SECOND, timezone); }\n}\n/** @ignore */\nexport class TimestampMillisecond extends Timestamp_ {\n constructor(timezone) { super(TimeUnit.MILLISECOND, timezone); }\n}\n/** @ignore */\nexport class TimestampMicrosecond extends Timestamp_ {\n constructor(timezone) { super(TimeUnit.MICROSECOND, timezone); }\n}\n/** @ignore */\nexport class TimestampNanosecond extends Timestamp_ {\n constructor(timezone) { super(TimeUnit.NANOSECOND, timezone); }\n}\n/** @ignore */\nclass Interval_ extends DataType {\n constructor(unit) {\n super();\n this.unit = unit;\n }\n get typeId() { return Type.Interval; }\n toString() { return `Interval<${IntervalUnit[this.unit]}>`; }\n}\nInterval_[Symbol.toStringTag] = ((proto) => {\n proto.unit = null;\n proto.ArrayType = Int32Array;\n return proto[Symbol.toStringTag] = 'Interval';\n})(Interval_.prototype);\nexport { Interval_ as Interval };\n/** @ignore */\nexport class IntervalDayTime extends Interval_ {\n constructor() { super(IntervalUnit.DAY_TIME); }\n}\n/** @ignore */\nexport class IntervalYearMonth extends Interval_ {\n constructor() { super(IntervalUnit.YEAR_MONTH); }\n}\n/** @ignore */\nexport class List extends DataType {\n constructor(child) {\n super();\n this.children = [child];\n }\n get typeId() { return Type.List; }\n toString() { return `List<${this.valueType}>`; }\n get valueType() { return this.children[0].type; }\n get valueField() { return this.children[0]; }\n get ArrayType() { return this.valueType.ArrayType; }\n}\nList[Symbol.toStringTag] = ((proto) => {\n proto.children = null;\n return proto[Symbol.toStringTag] = 'List';\n})(List.prototype);\n/** @ignore */\nexport class Struct extends DataType {\n constructor(children) {\n super();\n this.children = children;\n }\n get typeId() { return Type.Struct; }\n toString() { return `Struct<{${this.children.map((f) => `${f.name}:${f.type}`).join(`, `)}}>`; }\n}\nStruct[Symbol.toStringTag] = ((proto) => {\n proto.children = null;\n return proto[Symbol.toStringTag] = 'Struct';\n})(Struct.prototype);\n/** @ignore */\nclass Union_ extends DataType {\n constructor(mode, typeIds, children) {\n super();\n this.mode = mode;\n this.children = children;\n this.typeIds = typeIds = Int32Array.from(typeIds);\n this.typeIdToChildIndex = typeIds.reduce((typeIdToChildIndex, typeId, idx) => {\n return (typeIdToChildIndex[typeId] = idx) && typeIdToChildIndex || typeIdToChildIndex;\n }, Object.create(null));\n }\n get typeId() { return Type.Union; }\n toString() {\n return `${this[Symbol.toStringTag]}<${this.children.map((x) => `${x.type}`).join(` | `)}>`;\n }\n}\nUnion_[Symbol.toStringTag] = ((proto) => {\n proto.mode = null;\n proto.typeIds = null;\n proto.children = null;\n proto.typeIdToChildIndex = null;\n proto.ArrayType = Int8Array;\n return proto[Symbol.toStringTag] = 'Union';\n})(Union_.prototype);\nexport { Union_ as Union };\n/** @ignore */\nexport class DenseUnion extends Union_ {\n constructor(typeIds, children) {\n super(UnionMode.Dense, typeIds, children);\n }\n}\n/** @ignore */\nexport class SparseUnion extends Union_ {\n constructor(typeIds, children) {\n super(UnionMode.Sparse, typeIds, children);\n }\n}\n/** @ignore */\nexport class FixedSizeBinary extends DataType {\n constructor(byteWidth) {\n super();\n this.byteWidth = byteWidth;\n }\n get typeId() { return Type.FixedSizeBinary; }\n toString() { return `FixedSizeBinary[${this.byteWidth}]`; }\n}\nFixedSizeBinary[Symbol.toStringTag] = ((proto) => {\n proto.byteWidth = null;\n proto.ArrayType = Uint8Array;\n return proto[Symbol.toStringTag] = 'FixedSizeBinary';\n})(FixedSizeBinary.prototype);\n/** @ignore */\nexport class FixedSizeList extends DataType {\n constructor(listSize, child) {\n super();\n this.listSize = listSize;\n this.children = [child];\n }\n get typeId() { return Type.FixedSizeList; }\n get valueType() { return this.children[0].type; }\n get valueField() { return this.children[0]; }\n get ArrayType() { return this.valueType.ArrayType; }\n toString() { return `FixedSizeList[${this.listSize}]<${this.valueType}>`; }\n}\nFixedSizeList[Symbol.toStringTag] = ((proto) => {\n proto.children = null;\n proto.listSize = null;\n return proto[Symbol.toStringTag] = 'FixedSizeList';\n})(FixedSizeList.prototype);\n/** @ignore */\nexport class Map_ extends DataType {\n constructor(child, keysSorted = false) {\n super();\n this.children = [child];\n this.keysSorted = keysSorted;\n }\n get typeId() { return Type.Map; }\n get keyType() { return this.children[0].type.children[0].type; }\n get valueType() { return this.children[0].type.children[1].type; }\n toString() { return `Map<{${this.children[0].type.children.map((f) => `${f.name}:${f.type}`).join(`, `)}}>`; }\n}\nMap_[Symbol.toStringTag] = ((proto) => {\n proto.children = null;\n proto.keysSorted = null;\n return proto[Symbol.toStringTag] = 'Map_';\n})(Map_.prototype);\n/** @ignore */\nconst getId = ((atomicDictionaryId) => () => ++atomicDictionaryId)(-1);\n/** @ignore */\nexport class Dictionary extends DataType {\n constructor(dictionary, indices, id, isOrdered) {\n super();\n this.indices = indices;\n this.dictionary = dictionary;\n this.isOrdered = isOrdered || false;\n this.id = id == null ? getId() : typeof id === 'number' ? id : id.low;\n }\n get typeId() { return Type.Dictionary; }\n get children() { return this.dictionary.children; }\n get valueType() { return this.dictionary; }\n get ArrayType() { return this.dictionary.ArrayType; }\n toString() { return `Dictionary<${this.indices}, ${this.dictionary}>`; }\n}\nDictionary[Symbol.toStringTag] = ((proto) => {\n proto.id = null;\n proto.indices = null;\n proto.isOrdered = null;\n proto.dictionary = null;\n return proto[Symbol.toStringTag] = 'Dictionary';\n})(Dictionary.prototype);\n/** @ignore */\nexport function strideForType(type) {\n let t = type;\n switch (type.typeId) {\n case Type.Decimal: return 4;\n case Type.Timestamp: return 2;\n case Type.Date: return 1 + t.unit;\n case Type.Interval: return 1 + t.unit;\n case Type.Int: return 1 + +(t.bitWidth > 32);\n case Type.Time: return 1 + +(t.bitWidth > 32);\n case Type.FixedSizeList: return t.listSize;\n case Type.FixedSizeBinary: return t.byteWidth;\n default: return 1;\n }\n}\n\n//# sourceMappingURL=type.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { truncateBitmap } from './util/bit';\nimport { popcnt_bit_range } from './util/bit';\nimport { BufferType, UnionMode, Type } from './enum';\nimport { strideForType } from './type';\nimport { toArrayBufferView, toUint8Array, toInt32Array } from './util/buffer';\n/** @ignore */ export const kUnknownNullCount = -1;\n/** @ignore */\nexport class Data {\n constructor(type, offset, length, nullCount, buffers, childData, dictionary) {\n this.type = type;\n this.dictionary = dictionary;\n this.offset = Math.floor(Math.max(offset || 0, 0));\n this.length = Math.floor(Math.max(length || 0, 0));\n this._nullCount = Math.floor(Math.max(nullCount || 0, -1));\n this.childData = (childData || []).map((x) => x instanceof Data ? x : x.data);\n let buffer;\n if (buffers instanceof Data) {\n this.stride = buffers.stride;\n this.values = buffers.values;\n this.typeIds = buffers.typeIds;\n this.nullBitmap = buffers.nullBitmap;\n this.valueOffsets = buffers.valueOffsets;\n }\n else {\n this.stride = strideForType(type);\n if (buffers) {\n (buffer = buffers[0]) && (this.valueOffsets = buffer);\n (buffer = buffers[1]) && (this.values = buffer);\n (buffer = buffers[2]) && (this.nullBitmap = buffer);\n (buffer = buffers[3]) && (this.typeIds = buffer);\n }\n }\n }\n get typeId() { return this.type.typeId; }\n get ArrayType() { return this.type.ArrayType; }\n get buffers() {\n return [this.valueOffsets, this.values, this.nullBitmap, this.typeIds];\n }\n get byteLength() {\n let byteLength = 0;\n let { valueOffsets, values, nullBitmap, typeIds } = this;\n valueOffsets && (byteLength += valueOffsets.byteLength);\n values && (byteLength += values.byteLength);\n nullBitmap && (byteLength += nullBitmap.byteLength);\n typeIds && (byteLength += typeIds.byteLength);\n return this.childData.reduce((byteLength, child) => byteLength + child.byteLength, byteLength);\n }\n get nullCount() {\n let nullCount = this._nullCount;\n let nullBitmap;\n if (nullCount <= kUnknownNullCount && (nullBitmap = this.nullBitmap)) {\n this._nullCount = nullCount = this.length - popcnt_bit_range(nullBitmap, this.offset, this.offset + this.length);\n }\n return nullCount;\n }\n clone(type, offset = this.offset, length = this.length, nullCount = this._nullCount, buffers = this, childData = this.childData) {\n return new Data(type, offset, length, nullCount, buffers, childData, this.dictionary);\n }\n slice(offset, length) {\n const { stride, typeId, childData } = this;\n // +true === 1, +false === 0, so this means\n // we keep nullCount at 0 if it's already 0,\n // otherwise set to the invalidated flag -1\n const nullCount = +(this._nullCount === 0) - 1;\n const childStride = typeId === 16 /* FixedSizeList */ ? stride : 1;\n const buffers = this._sliceBuffers(offset, length, stride, typeId);\n return this.clone(this.type, this.offset + offset, length, nullCount, buffers, \n // Don't slice children if we have value offsets (the variable-width types)\n (!childData.length || this.valueOffsets) ? childData : this._sliceChildren(childData, childStride * offset, childStride * length));\n }\n _changeLengthAndBackfillNullBitmap(newLength) {\n if (this.typeId === Type.Null) {\n return this.clone(this.type, 0, newLength, 0);\n }\n const { length, nullCount } = this;\n // start initialized with 0s (nulls), then fill from 0 to length with 1s (not null)\n const bitmap = new Uint8Array(((newLength + 63) & ~63) >> 3).fill(255, 0, length >> 3);\n // set all the bits in the last byte (up to bit `length - length % 8`) to 1 (not null)\n bitmap[length >> 3] = (1 << (length - (length & ~7))) - 1;\n // if we have a nullBitmap, truncate + slice and set it over the pre-filled 1s\n if (nullCount > 0) {\n bitmap.set(truncateBitmap(this.offset, length, this.nullBitmap), 0);\n }\n const buffers = this.buffers;\n buffers[BufferType.VALIDITY] = bitmap;\n return this.clone(this.type, 0, newLength, nullCount + (newLength - length), buffers);\n }\n _sliceBuffers(offset, length, stride, typeId) {\n let arr, { buffers } = this;\n // If typeIds exist, slice the typeIds buffer\n (arr = buffers[BufferType.TYPE]) && (buffers[BufferType.TYPE] = arr.subarray(offset, offset + length));\n // If offsets exist, only slice the offsets buffer\n (arr = buffers[BufferType.OFFSET]) && (buffers[BufferType.OFFSET] = arr.subarray(offset, offset + length + 1)) ||\n // Otherwise if no offsets, slice the data buffer. Don't slice the data vector for Booleans, since the offset goes by bits not bytes\n (arr = buffers[BufferType.DATA]) && (buffers[BufferType.DATA] = typeId === 6 ? arr : arr.subarray(stride * offset, stride * (offset + length)));\n return buffers;\n }\n _sliceChildren(childData, offset, length) {\n return childData.map((child) => child.slice(offset, length));\n }\n //\n // Convenience methods for creating Data instances for each of the Arrow Vector types\n //\n /** @nocollapse */\n static new(type, offset, length, nullCount, buffers, childData, dictionary) {\n if (buffers instanceof Data) {\n buffers = buffers.buffers;\n }\n else if (!buffers) {\n buffers = [];\n }\n switch (type.typeId) {\n case Type.Null: return Data.Null(type, offset, length);\n case Type.Int: return Data.Int(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], buffers[BufferType.DATA] || []);\n case Type.Dictionary: return Data.Dictionary(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], buffers[BufferType.DATA] || [], dictionary);\n case Type.Float: return Data.Float(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], buffers[BufferType.DATA] || []);\n case Type.Bool: return Data.Bool(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], buffers[BufferType.DATA] || []);\n case Type.Decimal: return Data.Decimal(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], buffers[BufferType.DATA] || []);\n case Type.Date: return Data.Date(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], buffers[BufferType.DATA] || []);\n case Type.Time: return Data.Time(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], buffers[BufferType.DATA] || []);\n case Type.Timestamp: return Data.Timestamp(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], buffers[BufferType.DATA] || []);\n case Type.Interval: return Data.Interval(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], buffers[BufferType.DATA] || []);\n case Type.FixedSizeBinary: return Data.FixedSizeBinary(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], buffers[BufferType.DATA] || []);\n case Type.Binary: return Data.Binary(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], buffers[BufferType.OFFSET] || [], buffers[BufferType.DATA] || []);\n case Type.Utf8: return Data.Utf8(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], buffers[BufferType.OFFSET] || [], buffers[BufferType.DATA] || []);\n case Type.List: return Data.List(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], buffers[BufferType.OFFSET] || [], (childData || [])[0]);\n case Type.FixedSizeList: return Data.FixedSizeList(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], (childData || [])[0]);\n case Type.Struct: return Data.Struct(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], childData || []);\n case Type.Map: return Data.Map(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], buffers[BufferType.OFFSET] || [], (childData || [])[0]);\n case Type.Union: return Data.Union(type, offset, length, nullCount || 0, buffers[BufferType.VALIDITY], buffers[BufferType.TYPE] || [], buffers[BufferType.OFFSET] || childData, childData);\n }\n throw new Error(`Unrecognized typeId ${type.typeId}`);\n }\n /** @nocollapse */\n static Null(type, offset, length) {\n return new Data(type, offset, length, 0);\n }\n /** @nocollapse */\n static Int(type, offset, length, nullCount, nullBitmap, data) {\n return new Data(type, offset, length, nullCount, [undefined, toArrayBufferView(type.ArrayType, data), toUint8Array(nullBitmap)]);\n }\n /** @nocollapse */\n static Dictionary(type, offset, length, nullCount, nullBitmap, data, dictionary) {\n return new Data(type, offset, length, nullCount, [undefined, toArrayBufferView(type.indices.ArrayType, data), toUint8Array(nullBitmap)], [], dictionary);\n }\n /** @nocollapse */\n static Float(type, offset, length, nullCount, nullBitmap, data) {\n return new Data(type, offset, length, nullCount, [undefined, toArrayBufferView(type.ArrayType, data), toUint8Array(nullBitmap)]);\n }\n /** @nocollapse */\n static Bool(type, offset, length, nullCount, nullBitmap, data) {\n return new Data(type, offset, length, nullCount, [undefined, toArrayBufferView(type.ArrayType, data), toUint8Array(nullBitmap)]);\n }\n /** @nocollapse */\n static Decimal(type, offset, length, nullCount, nullBitmap, data) {\n return new Data(type, offset, length, nullCount, [undefined, toArrayBufferView(type.ArrayType, data), toUint8Array(nullBitmap)]);\n }\n /** @nocollapse */\n static Date(type, offset, length, nullCount, nullBitmap, data) {\n return new Data(type, offset, length, nullCount, [undefined, toArrayBufferView(type.ArrayType, data), toUint8Array(nullBitmap)]);\n }\n /** @nocollapse */\n static Time(type, offset, length, nullCount, nullBitmap, data) {\n return new Data(type, offset, length, nullCount, [undefined, toArrayBufferView(type.ArrayType, data), toUint8Array(nullBitmap)]);\n }\n /** @nocollapse */\n static Timestamp(type, offset, length, nullCount, nullBitmap, data) {\n return new Data(type, offset, length, nullCount, [undefined, toArrayBufferView(type.ArrayType, data), toUint8Array(nullBitmap)]);\n }\n /** @nocollapse */\n static Interval(type, offset, length, nullCount, nullBitmap, data) {\n return new Data(type, offset, length, nullCount, [undefined, toArrayBufferView(type.ArrayType, data), toUint8Array(nullBitmap)]);\n }\n /** @nocollapse */\n static FixedSizeBinary(type, offset, length, nullCount, nullBitmap, data) {\n return new Data(type, offset, length, nullCount, [undefined, toArrayBufferView(type.ArrayType, data), toUint8Array(nullBitmap)]);\n }\n /** @nocollapse */\n static Binary(type, offset, length, nullCount, nullBitmap, valueOffsets, data) {\n return new Data(type, offset, length, nullCount, [toInt32Array(valueOffsets), toUint8Array(data), toUint8Array(nullBitmap)]);\n }\n /** @nocollapse */\n static Utf8(type, offset, length, nullCount, nullBitmap, valueOffsets, data) {\n return new Data(type, offset, length, nullCount, [toInt32Array(valueOffsets), toUint8Array(data), toUint8Array(nullBitmap)]);\n }\n /** @nocollapse */\n static List(type, offset, length, nullCount, nullBitmap, valueOffsets, child) {\n return new Data(type, offset, length, nullCount, [toInt32Array(valueOffsets), undefined, toUint8Array(nullBitmap)], [child]);\n }\n /** @nocollapse */\n static FixedSizeList(type, offset, length, nullCount, nullBitmap, child) {\n return new Data(type, offset, length, nullCount, [undefined, undefined, toUint8Array(nullBitmap)], [child]);\n }\n /** @nocollapse */\n static Struct(type, offset, length, nullCount, nullBitmap, children) {\n return new Data(type, offset, length, nullCount, [undefined, undefined, toUint8Array(nullBitmap)], children);\n }\n /** @nocollapse */\n static Map(type, offset, length, nullCount, nullBitmap, valueOffsets, child) {\n return new Data(type, offset, length, nullCount, [toInt32Array(valueOffsets), undefined, toUint8Array(nullBitmap)], [child]);\n }\n /** @nocollapse */\n static Union(type, offset, length, nullCount, nullBitmap, typeIds, valueOffsetsOrChildren, children) {\n const buffers = [\n undefined, undefined,\n toUint8Array(nullBitmap),\n toArrayBufferView(type.ArrayType, typeIds)\n ];\n if (type.mode === UnionMode.Sparse) {\n return new Data(type, offset, length, nullCount, buffers, valueOffsetsOrChildren);\n }\n buffers[BufferType.OFFSET] = toInt32Array(valueOffsetsOrChildren);\n return new Data(type, offset, length, nullCount, buffers, children);\n }\n}\nData.prototype.childData = Object.freeze([]);\n\n//# sourceMappingURL=data.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n/** @ignore */ const undf = void (0);\n/** @ignore */\nexport function valueToString(x) {\n if (x === null) {\n return 'null';\n }\n if (x === undf) {\n return 'undefined';\n }\n switch (typeof x) {\n case 'number': return `${x}`;\n case 'bigint': return `${x}`;\n case 'string': return `\"${x}\"`;\n }\n // If [Symbol.toPrimitive] is implemented (like in BN)\n // use it instead of JSON.stringify(). This ensures we\n // print BigInts, Decimals, and Binary in their native\n // representation\n if (typeof x[Symbol.toPrimitive] === 'function') {\n return x[Symbol.toPrimitive]('string');\n }\n return ArrayBuffer.isView(x) ? `[${x}]` : JSON.stringify(x);\n}\n\n//# sourceMappingURL=pretty.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { valueToString } from '../util/pretty';\nimport { BigIntAvailable } from '../util/compat';\n/**\n * Dynamically compile the null values into an `isValid()` function whose\n * implementation is a switch statement. Microbenchmarks in v8 indicate\n * this approach is 25% faster than using an ES6 Map.\n *\n * @example\n * console.log(createIsValidFunction([null, 'N/A', NaN]));\n * `function (x) {\n * if (x !== x) return false;\n * switch (x) {\n * case null:\n * case \"N/A\":\n * return false;\n * }\n * return true;\n * }`\n *\n * @ignore\n * @param nullValues\n */\nexport function createIsValidFunction(nullValues) {\n if (!nullValues || nullValues.length <= 0) {\n // @ts-ignore\n return function isValid(value) { return true; };\n }\n let fnBody = '';\n let noNaNs = nullValues.filter((x) => x === x);\n if (noNaNs.length > 0) {\n fnBody = `\n switch (x) {${noNaNs.map((x) => `\n case ${valueToCase(x)}:`).join('')}\n return false;\n }`;\n }\n // NaN doesn't equal anything including itself, so it doesn't work as a\n // switch case. Instead we must explicitly check for NaN before the switch.\n if (nullValues.length !== noNaNs.length) {\n fnBody = `if (x !== x) return false;\\n${fnBody}`;\n }\n return new Function(`x`, `${fnBody}\\nreturn true;`);\n}\n/** @ignore */\nfunction valueToCase(x) {\n if (typeof x !== 'bigint') {\n return valueToString(x);\n }\n else if (BigIntAvailable) {\n return `${valueToString(x)}n`;\n }\n return `\"${valueToString(x)}\"`;\n}\n\n//# sourceMappingURL=valid.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { memcpy } from '../util/buffer';\nimport { BigIntAvailable, BigInt64Array, BigUint64Array } from '../util/compat';\n/** @ignore */\nconst roundLengthUpToNearest64Bytes = (len, BPE) => ((((len * BPE) + 63) & ~63) || 64) / BPE;\n/** @ignore */\nconst sliceOrExtendArray = (arr, len = 0) => (arr.length >= len ? arr.subarray(0, len) : memcpy(new arr.constructor(len), arr, 0));\n/** @ignore */\nexport class BufferBuilder {\n constructor(buffer, stride = 1) {\n this.buffer = buffer;\n this.stride = stride;\n this.BYTES_PER_ELEMENT = buffer.BYTES_PER_ELEMENT;\n this.ArrayType = buffer.constructor;\n this._resize(this.length = buffer.length / stride | 0);\n }\n get byteLength() { return this.length * this.stride * this.BYTES_PER_ELEMENT | 0; }\n get reservedLength() { return this.buffer.length / this.stride; }\n get reservedByteLength() { return this.buffer.byteLength; }\n // @ts-ignore\n set(index, value) { return this; }\n append(value) { return this.set(this.length, value); }\n reserve(extra) {\n if (extra > 0) {\n this.length += extra;\n const stride = this.stride;\n const length = this.length * stride;\n const reserved = this.buffer.length;\n if (length >= reserved) {\n this._resize(reserved === 0\n ? roundLengthUpToNearest64Bytes(length * 1, this.BYTES_PER_ELEMENT)\n : roundLengthUpToNearest64Bytes(length * 2, this.BYTES_PER_ELEMENT));\n }\n }\n return this;\n }\n flush(length = this.length) {\n length = roundLengthUpToNearest64Bytes(length * this.stride, this.BYTES_PER_ELEMENT);\n const array = sliceOrExtendArray(this.buffer, length);\n this.clear();\n return array;\n }\n clear() {\n this.length = 0;\n this._resize(0);\n return this;\n }\n _resize(newLength) {\n return this.buffer = memcpy(new this.ArrayType(newLength), this.buffer);\n }\n}\nBufferBuilder.prototype.offset = 0;\n/** @ignore */\nexport class DataBufferBuilder extends BufferBuilder {\n last() { return this.get(this.length - 1); }\n get(index) { return this.buffer[index]; }\n set(index, value) {\n this.reserve(index - this.length + 1);\n this.buffer[index * this.stride] = value;\n return this;\n }\n}\n/** @ignore */\nexport class BitmapBufferBuilder extends DataBufferBuilder {\n constructor(data = new Uint8Array(0)) {\n super(data, 1 / 8);\n this.numValid = 0;\n }\n get numInvalid() { return this.length - this.numValid; }\n get(idx) { return this.buffer[idx >> 3] >> idx % 8 & 1; }\n set(idx, val) {\n const { buffer } = this.reserve(idx - this.length + 1);\n const byte = idx >> 3, bit = idx % 8, cur = buffer[byte] >> bit & 1;\n // If `val` is truthy and the current bit is 0, flip it to 1 and increment `numValid`.\n // If `val` is falsey and the current bit is 1, flip it to 0 and decrement `numValid`.\n val ? cur === 0 && ((buffer[byte] |= (1 << bit)), ++this.numValid)\n : cur === 1 && ((buffer[byte] &= ~(1 << bit)), --this.numValid);\n return this;\n }\n clear() {\n this.numValid = 0;\n return super.clear();\n }\n}\n/** @ignore */\nexport class OffsetsBufferBuilder extends DataBufferBuilder {\n constructor(data = new Int32Array(1)) { super(data, 1); }\n append(value) {\n return this.set(this.length - 1, value);\n }\n set(index, value) {\n const offset = this.length - 1;\n const buffer = this.reserve(index - offset + 1).buffer;\n if (offset < index++) {\n buffer.fill(buffer[offset], offset, index);\n }\n buffer[index] = buffer[index - 1] + value;\n return this;\n }\n flush(length = this.length - 1) {\n if (length > this.length) {\n this.set(length - 1, 0);\n }\n return super.flush(length + 1);\n }\n}\n/** @ignore */\nexport class WideBufferBuilder extends BufferBuilder {\n get ArrayType64() {\n return this._ArrayType64 || (this._ArrayType64 = (this.buffer instanceof Int32Array ? BigInt64Array : BigUint64Array));\n }\n set(index, value) {\n this.reserve(index - this.length + 1);\n switch (typeof value) {\n case 'bigint':\n this.buffer64[index] = value;\n break;\n case 'number':\n this.buffer[index * this.stride] = value;\n break;\n default: this.buffer.set(value, index * this.stride);\n }\n return this;\n }\n _resize(newLength) {\n const data = super._resize(newLength);\n const length = data.byteLength / (this.BYTES_PER_ELEMENT * this.stride);\n if (BigIntAvailable) {\n this.buffer64 = new this.ArrayType64(data.buffer, data.byteOffset, length);\n }\n return data;\n }\n}\n\n//# sourceMappingURL=buffer.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Vector } from './vector';\nimport { BufferType } from './enum';\nimport { Data } from './data';\nimport { createIsValidFunction } from './builder/valid';\nimport { BitmapBufferBuilder, DataBufferBuilder, OffsetsBufferBuilder } from './builder/buffer';\nimport { strideForType } from './type';\n/**\n * An abstract base class for types that construct Arrow Vectors from arbitrary JavaScript values.\n *\n * A `Builder` is responsible for writing arbitrary JavaScript values\n * to ArrayBuffers and/or child Builders according to the Arrow specification\n * for each DataType, creating or resizing the underlying ArrayBuffers as necessary.\n *\n * The `Builder` for each Arrow `DataType` handles converting and appending\n * values for a given `DataType`. The high-level {@link Builder.new `Builder.new()`} convenience\n * method creates the specific `Builder` subclass for the supplied `DataType`.\n *\n * Once created, `Builder` instances support both appending values to the end\n * of the `Builder`, and random-access writes to specific indices\n * (`Builder.prototype.append(value)` is a convenience method for\n * `builder.set(builder.length, value)`). Appending or setting values beyond the\n * Builder's current length may cause the builder to grow its underlying buffers\n * or child Builders (if applicable) to accommodate the new values.\n *\n * After enough values have been written to a `Builder`, `Builder.prototype.flush()`\n * will commit the values to the underlying ArrayBuffers (or child Builders). The\n * internal Builder state will be reset, and an instance of `Data` is returned.\n * Alternatively, `Builder.prototype.toVector()` will flush the `Builder` and return\n * an instance of `Vector` instead.\n *\n * When there are no more values to write, use `Builder.prototype.finish()` to\n * finalize the `Builder`. This does not reset the internal state, so it is\n * necessary to call `Builder.prototype.flush()` or `toVector()` one last time\n * if there are still values queued to be flushed.\n *\n * Note: calling `Builder.prototype.finish()` is required when using a `DictionaryBuilder`,\n * because this is when it flushes the values that have been enqueued in its internal\n * dictionary's `Builder`, and creates the `dictionaryVector` for the `Dictionary` `DataType`.\n *\n * ```ts\n * import { Builder, Utf8 } from 'apache-arrow';\n *\n * const utf8Builder = Builder.new({\n * type: new Utf8(),\n * nullValues: [null, 'n/a']\n * });\n *\n * utf8Builder\n * .append('hello')\n * .append('n/a')\n * .append('world')\n * .append(null);\n *\n * const utf8Vector = utf8Builder.finish().toVector();\n *\n * console.log(utf8Vector.toJSON());\n * // > [\"hello\", null, \"world\", null]\n * ```\n *\n * @typeparam T The `DataType` of this `Builder`.\n * @typeparam TNull The type(s) of values which will be considered null-value sentinels.\n */\nexport class Builder {\n /**\n * Construct a builder with the given Arrow DataType with optional null values,\n * which will be interpreted as \"null\" when set or appended to the `Builder`.\n * @param {{ type: T, nullValues?: any[] }} options A `BuilderOptions` object used to create this `Builder`.\n */\n constructor({ 'type': type, 'nullValues': nulls }) {\n /**\n * The number of values written to the `Builder` that haven't been flushed yet.\n * @readonly\n */\n this.length = 0;\n /**\n * A boolean indicating whether `Builder.prototype.finish()` has been called on this `Builder`.\n * @readonly\n */\n this.finished = false;\n this.type = type;\n this.children = [];\n this.nullValues = nulls;\n this.stride = strideForType(type);\n this._nulls = new BitmapBufferBuilder();\n if (nulls && nulls.length > 0) {\n this._isValid = createIsValidFunction(nulls);\n }\n }\n /**\n * Create a `Builder` instance based on the `type` property of the supplied `options` object.\n * @param {BuilderOptions} options An object with a required `DataType` instance\n * and other optional parameters to be passed to the `Builder` subclass for the given `type`.\n *\n * @typeparam T The `DataType` of the `Builder` to create.\n * @typeparam TNull The type(s) of values which will be considered null-value sentinels.\n * @nocollapse\n */\n // @ts-ignore\n static new(options) { }\n /** @nocollapse */\n // @ts-ignore\n static throughNode(options) {\n throw new Error(`\"throughNode\" not available in this environment`);\n }\n /** @nocollapse */\n // @ts-ignore\n static throughDOM(options) {\n throw new Error(`\"throughDOM\" not available in this environment`);\n }\n /**\n * Transform a synchronous `Iterable` of arbitrary JavaScript values into a\n * sequence of Arrow Vector following the chunking semantics defined in\n * the supplied `options` argument.\n *\n * This function returns a function that accepts an `Iterable` of values to\n * transform. When called, this function returns an Iterator of `Vector`.\n *\n * The resulting `Iterator>` yields Vectors based on the\n * `queueingStrategy` and `highWaterMark` specified in the `options` argument.\n *\n * * If `queueingStrategy` is `\"count\"` (or omitted), The `Iterator>`\n * will flush the underlying `Builder` (and yield a new `Vector`) once the\n * Builder's `length` reaches or exceeds the supplied `highWaterMark`.\n * * If `queueingStrategy` is `\"bytes\"`, the `Iterator>` will flush\n * the underlying `Builder` (and yield a new `Vector`) once its `byteLength`\n * reaches or exceeds the supplied `highWaterMark`.\n *\n * @param {IterableBuilderOptions} options An object of properties which determine the `Builder` to create and the chunking semantics to use.\n * @returns A function which accepts a JavaScript `Iterable` of values to\n * write, and returns an `Iterator` that yields Vectors according\n * to the chunking semantics defined in the `options` argument.\n * @nocollapse\n */\n static throughIterable(options) {\n return throughIterable(options);\n }\n /**\n * Transform an `AsyncIterable` of arbitrary JavaScript values into a\n * sequence of Arrow Vector following the chunking semantics defined in\n * the supplied `options` argument.\n *\n * This function returns a function that accepts an `AsyncIterable` of values to\n * transform. When called, this function returns an AsyncIterator of `Vector`.\n *\n * The resulting `AsyncIterator>` yields Vectors based on the\n * `queueingStrategy` and `highWaterMark` specified in the `options` argument.\n *\n * * If `queueingStrategy` is `\"count\"` (or omitted), The `AsyncIterator>`\n * will flush the underlying `Builder` (and yield a new `Vector`) once the\n * Builder's `length` reaches or exceeds the supplied `highWaterMark`.\n * * If `queueingStrategy` is `\"bytes\"`, the `AsyncIterator>` will flush\n * the underlying `Builder` (and yield a new `Vector`) once its `byteLength`\n * reaches or exceeds the supplied `highWaterMark`.\n *\n * @param {IterableBuilderOptions} options An object of properties which determine the `Builder` to create and the chunking semantics to use.\n * @returns A function which accepts a JavaScript `AsyncIterable` of values\n * to write, and returns an `AsyncIterator` that yields Vectors\n * according to the chunking semantics defined in the `options`\n * argument.\n * @nocollapse\n */\n static throughAsyncIterable(options) {\n return throughAsyncIterable(options);\n }\n /**\n * Flush the `Builder` and return a `Vector`.\n * @returns {Vector} A `Vector` of the flushed values.\n */\n toVector() { return Vector.new(this.flush()); }\n get ArrayType() { return this.type.ArrayType; }\n get nullCount() { return this._nulls.numInvalid; }\n get numChildren() { return this.children.length; }\n /**\n * @returns The aggregate length (in bytes) of the values that have been written.\n */\n get byteLength() {\n let size = 0;\n this._offsets && (size += this._offsets.byteLength);\n this._values && (size += this._values.byteLength);\n this._nulls && (size += this._nulls.byteLength);\n this._typeIds && (size += this._typeIds.byteLength);\n return this.children.reduce((size, child) => size + child.byteLength, size);\n }\n /**\n * @returns The aggregate number of rows that have been reserved to write new values.\n */\n get reservedLength() {\n return this._nulls.reservedLength;\n }\n /**\n * @returns The aggregate length (in bytes) that has been reserved to write new values.\n */\n get reservedByteLength() {\n let size = 0;\n this._offsets && (size += this._offsets.reservedByteLength);\n this._values && (size += this._values.reservedByteLength);\n this._nulls && (size += this._nulls.reservedByteLength);\n this._typeIds && (size += this._typeIds.reservedByteLength);\n return this.children.reduce((size, child) => size + child.reservedByteLength, size);\n }\n get valueOffsets() { return this._offsets ? this._offsets.buffer : null; }\n get values() { return this._values ? this._values.buffer : null; }\n get nullBitmap() { return this._nulls ? this._nulls.buffer : null; }\n get typeIds() { return this._typeIds ? this._typeIds.buffer : null; }\n /**\n * Appends a value (or null) to this `Builder`.\n * This is equivalent to `builder.set(builder.length, value)`.\n * @param {T['TValue'] | TNull } value The value to append.\n */\n append(value) { return this.set(this.length, value); }\n /**\n * Validates whether a value is valid (true), or null (false)\n * @param {T['TValue'] | TNull } value The value to compare against null the value representations\n */\n // @ts-ignore\n isValid(value) { return this._isValid(value); }\n /**\n * Write a value (or null-value sentinel) at the supplied index.\n * If the value matches one of the null-value representations, a 1-bit is\n * written to the null `BitmapBufferBuilder`. Otherwise, a 0 is written to\n * the null `BitmapBufferBuilder`, and the value is passed to\n * `Builder.prototype.setValue()`.\n * @param {number} index The index of the value to write.\n * @param {T['TValue'] | TNull } value The value to write at the supplied index.\n * @returns {this} The updated `Builder` instance.\n */\n set(index, value) {\n if (this.setValid(index, this.isValid(value))) {\n this.setValue(index, value);\n }\n return this;\n }\n /**\n * Write a value to the underlying buffers at the supplied index, bypassing\n * the null-value check. This is a low-level method that\n * @param {number} index\n * @param {T['TValue'] | TNull } value\n */\n // @ts-ignore\n setValue(index, value) { this._setValue(this, index, value); }\n setValid(index, valid) {\n this.length = this._nulls.set(index, +valid).length;\n return valid;\n }\n // @ts-ignore\n addChild(child, name = `${this.numChildren}`) {\n throw new Error(`Cannot append children to non-nested type \"${this.type}\"`);\n }\n /**\n * Retrieve the child `Builder` at the supplied `index`, or null if no child\n * exists at that index.\n * @param {number} index The index of the child `Builder` to retrieve.\n * @returns {Builder | null} The child Builder at the supplied index or null.\n */\n getChildAt(index) {\n return this.children[index] || null;\n }\n /**\n * Commit all the values that have been written to their underlying\n * ArrayBuffers, including any child Builders if applicable, and reset\n * the internal `Builder` state.\n * @returns A `Data` of the buffers and childData representing the values written.\n */\n flush() {\n const buffers = [];\n const values = this._values;\n const offsets = this._offsets;\n const typeIds = this._typeIds;\n const { length, nullCount } = this;\n if (typeIds) { /* Unions */\n buffers[BufferType.TYPE] = typeIds.flush(length);\n // DenseUnions\n offsets && (buffers[BufferType.OFFSET] = offsets.flush(length));\n }\n else if (offsets) { /* Variable-width primitives (Binary, Utf8) and Lists */\n // Binary, Utf8\n values && (buffers[BufferType.DATA] = values.flush(offsets.last()));\n buffers[BufferType.OFFSET] = offsets.flush(length);\n }\n else if (values) { /* Fixed-width primitives (Int, Float, Decimal, Time, Timestamp, and Interval) */\n buffers[BufferType.DATA] = values.flush(length);\n }\n nullCount > 0 && (buffers[BufferType.VALIDITY] = this._nulls.flush(length));\n const data = Data.new(this.type, 0, length, nullCount, buffers, this.children.map((child) => child.flush()));\n this.clear();\n return data;\n }\n /**\n * Finalize this `Builder`, and child builders if applicable.\n * @returns {this} The finalized `Builder` instance.\n */\n finish() {\n this.finished = true;\n this.children.forEach((child) => child.finish());\n return this;\n }\n /**\n * Clear this Builder's internal state, including child Builders if applicable, and reset the length to 0.\n * @returns {this} The cleared `Builder` instance.\n */\n clear() {\n this.length = 0;\n this._offsets && (this._offsets.clear());\n this._values && (this._values.clear());\n this._nulls && (this._nulls.clear());\n this._typeIds && (this._typeIds.clear());\n this.children.forEach((child) => child.clear());\n return this;\n }\n}\nBuilder.prototype.length = 1;\nBuilder.prototype.stride = 1;\nBuilder.prototype.children = null;\nBuilder.prototype.finished = false;\nBuilder.prototype.nullValues = null;\nBuilder.prototype._isValid = () => true;\n/** @ignore */\nexport class FixedWidthBuilder extends Builder {\n constructor(opts) {\n super(opts);\n this._values = new DataBufferBuilder(new this.ArrayType(0), this.stride);\n }\n setValue(index, value) {\n const values = this._values;\n values.reserve(index - values.length + 1);\n return super.setValue(index, value);\n }\n}\n/** @ignore */\nexport class VariableWidthBuilder extends Builder {\n constructor(opts) {\n super(opts);\n this._pendingLength = 0;\n this._offsets = new OffsetsBufferBuilder();\n }\n setValue(index, value) {\n const pending = this._pending || (this._pending = new Map());\n const current = pending.get(index);\n current && (this._pendingLength -= current.length);\n this._pendingLength += value.length;\n pending.set(index, value);\n }\n setValid(index, isValid) {\n if (!super.setValid(index, isValid)) {\n (this._pending || (this._pending = new Map())).set(index, undefined);\n return false;\n }\n return true;\n }\n clear() {\n this._pendingLength = 0;\n this._pending = undefined;\n return super.clear();\n }\n flush() {\n this._flush();\n return super.flush();\n }\n finish() {\n this._flush();\n return super.finish();\n }\n _flush() {\n const pending = this._pending;\n const pendingLength = this._pendingLength;\n this._pendingLength = 0;\n this._pending = undefined;\n if (pending && pending.size > 0) {\n this._flushPending(pending, pendingLength);\n }\n return this;\n }\n}\n/** @ignore */\nfunction throughIterable(options) {\n const { ['queueingStrategy']: queueingStrategy = 'count' } = options;\n const { ['highWaterMark']: highWaterMark = queueingStrategy !== 'bytes' ? 1000 : 2 ** 14 } = options;\n const sizeProperty = queueingStrategy !== 'bytes' ? 'length' : 'byteLength';\n return function* (source) {\n let numChunks = 0;\n let builder = Builder.new(options);\n for (const value of source) {\n if (builder.append(value)[sizeProperty] >= highWaterMark) {\n ++numChunks && (yield builder.toVector());\n }\n }\n if (builder.finish().length > 0 || numChunks === 0) {\n yield builder.toVector();\n }\n };\n}\n/** @ignore */\nfunction throughAsyncIterable(options) {\n const { ['queueingStrategy']: queueingStrategy = 'count' } = options;\n const { ['highWaterMark']: highWaterMark = queueingStrategy !== 'bytes' ? 1000 : 2 ** 14 } = options;\n const sizeProperty = queueingStrategy !== 'bytes' ? 'length' : 'byteLength';\n return async function* (source) {\n let numChunks = 0;\n let builder = Builder.new(options);\n for await (const value of source) {\n if (builder.append(value)[sizeProperty] >= highWaterMark) {\n ++numChunks && (yield builder.toVector());\n }\n }\n if (builder.finish().length > 0 || numChunks === 0) {\n yield builder.toVector();\n }\n };\n}\n\n//# sourceMappingURL=builder.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { BitmapBufferBuilder } from './buffer';\nimport { Builder } from '../builder';\n/** @ignore */\nexport class BoolBuilder extends Builder {\n constructor(options) {\n super(options);\n this._values = new BitmapBufferBuilder();\n }\n setValue(index, value) {\n this._values.set(index, +value);\n }\n}\n\n//# sourceMappingURL=bool.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Builder } from '../builder';\n/** @ignore */\nexport class NullBuilder extends Builder {\n // @ts-ignore\n setValue(index, value) { }\n setValid(index, valid) {\n this.length = Math.max(index + 1, this.length);\n return valid;\n }\n}\n\n//# sourceMappingURL=null.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { FixedWidthBuilder } from '../builder';\n/** @ignore */\nexport class DateBuilder extends FixedWidthBuilder {\n}\n/** @ignore */\nexport class DateDayBuilder extends DateBuilder {\n}\n/** @ignore */\nexport class DateMillisecondBuilder extends DateBuilder {\n}\n\n//# sourceMappingURL=date.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { FixedWidthBuilder } from '../builder';\n/** @ignore */\nexport class DecimalBuilder extends FixedWidthBuilder {\n}\n\n//# sourceMappingURL=decimal.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Dictionary } from '../type';\nimport { Builder } from '../builder';\n/** @ignore */\nexport class DictionaryBuilder extends Builder {\n constructor({ 'type': type, 'nullValues': nulls, 'dictionaryHashFunction': hashFn }) {\n super({ type: new Dictionary(type.dictionary, type.indices, type.id, type.isOrdered) });\n this._nulls = null;\n this._dictionaryOffset = 0;\n this._keysToIndices = Object.create(null);\n this.indices = Builder.new({ 'type': this.type.indices, 'nullValues': nulls });\n this.dictionary = Builder.new({ 'type': this.type.dictionary, 'nullValues': null });\n if (typeof hashFn === 'function') {\n this.valueToKey = hashFn;\n }\n }\n get values() { return this.indices.values; }\n get nullCount() { return this.indices.nullCount; }\n get nullBitmap() { return this.indices.nullBitmap; }\n get byteLength() { return this.indices.byteLength + this.dictionary.byteLength; }\n get reservedLength() { return this.indices.reservedLength + this.dictionary.reservedLength; }\n get reservedByteLength() { return this.indices.reservedByteLength + this.dictionary.reservedByteLength; }\n isValid(value) { return this.indices.isValid(value); }\n setValid(index, valid) {\n const indices = this.indices;\n valid = indices.setValid(index, valid);\n this.length = indices.length;\n return valid;\n }\n setValue(index, value) {\n let keysToIndices = this._keysToIndices;\n let key = this.valueToKey(value);\n let idx = keysToIndices[key];\n if (idx === undefined) {\n keysToIndices[key] = idx = this._dictionaryOffset + this.dictionary.append(value).length - 1;\n }\n return this.indices.setValue(index, idx);\n }\n flush() {\n const type = this.type;\n const prev = this._dictionary;\n const curr = this.dictionary.toVector();\n const data = this.indices.flush().clone(type);\n data.dictionary = prev ? prev.concat(curr) : curr;\n this.finished || (this._dictionaryOffset += curr.length);\n this._dictionary = data.dictionary;\n this.clear();\n return data;\n }\n finish() {\n this.indices.finish();\n this.dictionary.finish();\n this._dictionaryOffset = 0;\n this._keysToIndices = Object.create(null);\n return super.finish();\n }\n clear() {\n this.indices.clear();\n this.dictionary.clear();\n return super.clear();\n }\n valueToKey(val) {\n return typeof val === 'string' ? val : `${val}`;\n }\n}\n\n//# sourceMappingURL=dictionary.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { FixedWidthBuilder } from '../builder';\n/** @ignore */\nexport class FixedSizeBinaryBuilder extends FixedWidthBuilder {\n}\n\n//# sourceMappingURL=fixedsizebinary.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nconst f64 = new Float64Array(1);\nconst u32 = new Uint32Array(f64.buffer);\n/**\n * Convert uint16 (logically a float16) to a JS float64. Inspired by numpy's `npy_half_to_double`:\n * https://github.com/numpy/numpy/blob/5a5987291dc95376bb098be8d8e5391e89e77a2c/numpy/core/src/npymath/halffloat.c#L29\n * @param h {number} the uint16 to convert\n * @private\n * @ignore\n */\nexport function uint16ToFloat64(h) {\n let expo = (h & 0x7C00) >> 10;\n let sigf = (h & 0x03FF) / 1024;\n let sign = (-1) ** ((h & 0x8000) >> 15);\n switch (expo) {\n case 0x1F: return sign * (sigf ? NaN : 1 / 0);\n case 0x00: return sign * (sigf ? 6.103515625e-5 * sigf : 0);\n }\n return sign * (2 ** (expo - 15)) * (1 + sigf);\n}\n/**\n * Convert a float64 to uint16 (assuming the float64 is logically a float16). Inspired by numpy's `npy_double_to_half`:\n * https://github.com/numpy/numpy/blob/5a5987291dc95376bb098be8d8e5391e89e77a2c/numpy/core/src/npymath/halffloat.c#L43\n * @param d {number} The float64 to convert\n * @private\n * @ignore\n */\nexport function float64ToUint16(d) {\n if (d !== d) {\n return 0x7E00;\n } // NaN\n f64[0] = d;\n // Magic numbers:\n // 0x80000000 = 10000000 00000000 00000000 00000000 -- masks the 32nd bit\n // 0x7ff00000 = 01111111 11110000 00000000 00000000 -- masks the 21st-31st bits\n // 0x000fffff = 00000000 00001111 11111111 11111111 -- masks the 1st-20th bit\n let sign = (u32[1] & 0x80000000) >> 16 & 0xFFFF;\n let expo = (u32[1] & 0x7ff00000), sigf = 0x0000;\n if (expo >= 0x40f00000) {\n //\n // If exponent overflowed, the float16 is either NaN or Infinity.\n // Rules to propagate the sign bit: mantissa > 0 ? NaN : +/-Infinity\n //\n // Magic numbers:\n // 0x40F00000 = 01000000 11110000 00000000 00000000 -- 6-bit exponent overflow\n // 0x7C000000 = 01111100 00000000 00000000 00000000 -- masks the 27th-31st bits\n //\n // returns:\n // qNaN, aka 32256 decimal, 0x7E00 hex, or 01111110 00000000 binary\n // sNaN, aka 32000 decimal, 0x7D00 hex, or 01111101 00000000 binary\n // +inf, aka 31744 decimal, 0x7C00 hex, or 01111100 00000000 binary\n // -inf, aka 64512 decimal, 0xFC00 hex, or 11111100 00000000 binary\n //\n // If mantissa is greater than 23 bits, set to +Infinity like numpy\n if (u32[0] > 0) {\n expo = 0x7C00;\n }\n else {\n expo = (expo & 0x7C000000) >> 16;\n sigf = (u32[1] & 0x000fffff) >> 10;\n }\n }\n else if (expo <= 0x3f000000) {\n //\n // If exponent underflowed, the float is either signed zero or subnormal.\n //\n // Magic numbers:\n // 0x3F000000 = 00111111 00000000 00000000 00000000 -- 6-bit exponent underflow\n //\n sigf = 0x100000 + (u32[1] & 0x000fffff);\n sigf = 0x100000 + (sigf << ((expo >> 20) - 998)) >> 21;\n expo = 0;\n }\n else {\n //\n // No overflow or underflow, rebase the exponent and round the mantissa\n // Magic numbers:\n // 0x200 = 00000010 00000000 -- masks off the 10th bit\n //\n // Ensure the first mantissa bit (the 10th one) is 1 and round\n expo = (expo - 0x3f000000) >> 10;\n sigf = ((u32[1] & 0x000fffff) + 0x200) >> 10;\n }\n return sign | expo | sigf & 0xFFFF;\n}\n\n//# sourceMappingURL=math.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { float64ToUint16 } from '../util/math';\nimport { FixedWidthBuilder } from '../builder';\n/** @ignore */\nexport class FloatBuilder extends FixedWidthBuilder {\n}\n/** @ignore */\nexport class Float16Builder extends FloatBuilder {\n setValue(index, value) {\n // convert JS float64 to a uint16\n this._values.set(index, float64ToUint16(value));\n }\n}\n/** @ignore */\nexport class Float32Builder extends FloatBuilder {\n setValue(index, value) {\n this._values.set(index, value);\n }\n}\n/** @ignore */\nexport class Float64Builder extends FloatBuilder {\n setValue(index, value) {\n this._values.set(index, value);\n }\n}\n\n//# sourceMappingURL=float.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { toArrayBufferView } from './buffer';\nimport { BigIntAvailable, BigInt64Array, BigUint64Array } from './compat';\n/** @ignore */\nexport const isArrowBigNumSymbol = Symbol.for('isArrowBigNum');\n/** @ignore */\nfunction BigNum(x, ...xs) {\n if (xs.length === 0) {\n return Object.setPrototypeOf(toArrayBufferView(this['TypedArray'], x), this.constructor.prototype);\n }\n return Object.setPrototypeOf(new this['TypedArray'](x, ...xs), this.constructor.prototype);\n}\nBigNum.prototype[isArrowBigNumSymbol] = true;\nBigNum.prototype.toJSON = function () { return `\"${bignumToString(this)}\"`; };\nBigNum.prototype.valueOf = function () { return bignumToNumber(this); };\nBigNum.prototype.toString = function () { return bignumToString(this); };\nBigNum.prototype[Symbol.toPrimitive] = function (hint = 'default') {\n switch (hint) {\n case 'number': return bignumToNumber(this);\n case 'string': return bignumToString(this);\n case 'default': return bignumToBigInt(this);\n }\n return bignumToString(this);\n};\n/** @ignore */\nfunction SignedBigNum(...args) { return BigNum.apply(this, args); }\n/** @ignore */\nfunction UnsignedBigNum(...args) { return BigNum.apply(this, args); }\n/** @ignore */\nfunction DecimalBigNum(...args) { return BigNum.apply(this, args); }\nObject.setPrototypeOf(SignedBigNum.prototype, Object.create(Int32Array.prototype));\nObject.setPrototypeOf(UnsignedBigNum.prototype, Object.create(Uint32Array.prototype));\nObject.setPrototypeOf(DecimalBigNum.prototype, Object.create(Uint32Array.prototype));\nObject.assign(SignedBigNum.prototype, BigNum.prototype, { 'constructor': SignedBigNum, 'signed': true, 'TypedArray': Int32Array, 'BigIntArray': BigInt64Array });\nObject.assign(UnsignedBigNum.prototype, BigNum.prototype, { 'constructor': UnsignedBigNum, 'signed': false, 'TypedArray': Uint32Array, 'BigIntArray': BigUint64Array });\nObject.assign(DecimalBigNum.prototype, BigNum.prototype, { 'constructor': DecimalBigNum, 'signed': true, 'TypedArray': Uint32Array, 'BigIntArray': BigUint64Array });\n/** @ignore */\nfunction bignumToNumber(bn) {\n let { buffer, byteOffset, length, 'signed': signed } = bn;\n let words = new Int32Array(buffer, byteOffset, length);\n let number = 0, i = 0, n = words.length, hi, lo;\n while (i < n) {\n lo = words[i++];\n hi = words[i++];\n signed || (hi = hi >>> 0);\n number += (lo >>> 0) + (hi * (i ** 32));\n }\n return number;\n}\n/** @ignore */\nexport let bignumToString;\n/** @ignore */\nexport let bignumToBigInt;\nif (!BigIntAvailable) {\n bignumToString = decimalToString;\n bignumToBigInt = bignumToString;\n}\nelse {\n bignumToBigInt = ((a) => a.byteLength === 8 ? new a['BigIntArray'](a.buffer, a.byteOffset, 1)[0] : decimalToString(a));\n bignumToString = ((a) => a.byteLength === 8 ? `${new a['BigIntArray'](a.buffer, a.byteOffset, 1)[0]}` : decimalToString(a));\n}\n/** @ignore */\nfunction decimalToString(a) {\n let digits = '';\n let base64 = new Uint32Array(2);\n let base32 = new Uint16Array(a.buffer, a.byteOffset, a.byteLength / 2);\n let checks = new Uint32Array((base32 = new Uint16Array(base32).reverse()).buffer);\n let i = -1, n = base32.length - 1;\n do {\n for (base64[0] = base32[i = 0]; i < n;) {\n base32[i++] = base64[1] = base64[0] / 10;\n base64[0] = ((base64[0] - base64[1] * 10) << 16) + base32[i];\n }\n base32[i] = base64[1] = base64[0] / 10;\n base64[0] = base64[0] - base64[1] * 10;\n digits = `${base64[0]}${digits}`;\n } while (checks[0] || checks[1] || checks[2] || checks[3]);\n return digits ? digits : `0`;\n}\n/** @ignore */\nexport class BN {\n constructor(num, isSigned) {\n return BN.new(num, isSigned);\n }\n /** @nocollapse */\n static new(num, isSigned) {\n switch (isSigned) {\n case true: return new SignedBigNum(num);\n case false: return new UnsignedBigNum(num);\n }\n switch (num.constructor) {\n case Int8Array:\n case Int16Array:\n case Int32Array:\n case BigInt64Array:\n return new SignedBigNum(num);\n }\n if (num.byteLength === 16) {\n return new DecimalBigNum(num);\n }\n return new UnsignedBigNum(num);\n }\n /** @nocollapse */\n static signed(num) {\n return new SignedBigNum(num);\n }\n /** @nocollapse */\n static unsigned(num) {\n return new UnsignedBigNum(num);\n }\n /** @nocollapse */\n static decimal(num) {\n return new DecimalBigNum(num);\n }\n}\n\n//# sourceMappingURL=bn.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { bignumToBigInt } from '../util/bn';\nimport { WideBufferBuilder } from './buffer';\nimport { BigInt64Array } from '../util/compat';\nimport { FixedWidthBuilder } from '../builder';\n/** @ignore */\nexport class IntBuilder extends FixedWidthBuilder {\n setValue(index, value) {\n this._values.set(index, value);\n }\n}\n/** @ignore */\nexport class Int8Builder extends IntBuilder {\n}\n/** @ignore */\nexport class Int16Builder extends IntBuilder {\n}\n/** @ignore */\nexport class Int32Builder extends IntBuilder {\n}\n/** @ignore */\nexport class Int64Builder extends IntBuilder {\n constructor(options) {\n if (options['nullValues']) {\n options['nullValues'] = options['nullValues'].map(toBigInt);\n }\n super(options);\n this._values = new WideBufferBuilder(new Int32Array(0), 2);\n }\n get values64() { return this._values.buffer64; }\n isValid(value) { return super.isValid(toBigInt(value)); }\n}\n/** @ignore */\nexport class Uint8Builder extends IntBuilder {\n}\n/** @ignore */\nexport class Uint16Builder extends IntBuilder {\n}\n/** @ignore */\nexport class Uint32Builder extends IntBuilder {\n}\n/** @ignore */\nexport class Uint64Builder extends IntBuilder {\n constructor(options) {\n if (options['nullValues']) {\n options['nullValues'] = options['nullValues'].map(toBigInt);\n }\n super(options);\n this._values = new WideBufferBuilder(new Uint32Array(0), 2);\n }\n get values64() { return this._values.buffer64; }\n isValid(value) { return super.isValid(toBigInt(value)); }\n}\nconst toBigInt = ((memo) => (value) => {\n if (ArrayBuffer.isView(value)) {\n memo.buffer = value.buffer;\n memo.byteOffset = value.byteOffset;\n memo.byteLength = value.byteLength;\n value = bignumToBigInt(memo);\n memo.buffer = null;\n }\n return value;\n})({ 'BigIntArray': BigInt64Array });\n\n//# sourceMappingURL=int.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { FixedWidthBuilder } from '../builder';\n/** @ignore */\nexport class TimeBuilder extends FixedWidthBuilder {\n}\n/** @ignore */\nexport class TimeSecondBuilder extends TimeBuilder {\n}\n/** @ignore */\nexport class TimeMillisecondBuilder extends TimeBuilder {\n}\n/** @ignore */\nexport class TimeMicrosecondBuilder extends TimeBuilder {\n}\n/** @ignore */\nexport class TimeNanosecondBuilder extends TimeBuilder {\n}\n\n//# sourceMappingURL=time.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { FixedWidthBuilder } from '../builder';\n/** @ignore */\nexport class TimestampBuilder extends FixedWidthBuilder {\n}\n/** @ignore */\nexport class TimestampSecondBuilder extends TimestampBuilder {\n}\n/** @ignore */\nexport class TimestampMillisecondBuilder extends TimestampBuilder {\n}\n/** @ignore */\nexport class TimestampMicrosecondBuilder extends TimestampBuilder {\n}\n/** @ignore */\nexport class TimestampNanosecondBuilder extends TimestampBuilder {\n}\n\n//# sourceMappingURL=timestamp.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { FixedWidthBuilder } from '../builder';\n/** @ignore */\nexport class IntervalBuilder extends FixedWidthBuilder {\n}\n/** @ignore */\nexport class IntervalDayTimeBuilder extends IntervalBuilder {\n}\n/** @ignore */\nexport class IntervalYearMonthBuilder extends IntervalBuilder {\n}\n\n//# sourceMappingURL=interval.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { toUint8Array } from '../util/buffer';\nimport { BufferBuilder } from './buffer';\nimport { VariableWidthBuilder } from '../builder';\n/** @ignore */\nexport class BinaryBuilder extends VariableWidthBuilder {\n constructor(opts) {\n super(opts);\n this._values = new BufferBuilder(new Uint8Array(0));\n }\n get byteLength() {\n let size = this._pendingLength + (this.length * 4);\n this._offsets && (size += this._offsets.byteLength);\n this._values && (size += this._values.byteLength);\n this._nulls && (size += this._nulls.byteLength);\n return size;\n }\n setValue(index, value) {\n return super.setValue(index, toUint8Array(value));\n }\n _flushPending(pending, pendingLength) {\n const offsets = this._offsets;\n const data = this._values.reserve(pendingLength).buffer;\n let index = 0, length = 0, offset = 0, value;\n for ([index, value] of pending) {\n if (value === undefined) {\n offsets.set(index, 0);\n }\n else {\n length = value.length;\n data.set(value, offset);\n offsets.set(index, length);\n offset += length;\n }\n }\n }\n}\n\n//# sourceMappingURL=binary.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { encodeUtf8 } from '../util/utf8';\nimport { BinaryBuilder } from './binary';\nimport { BufferBuilder } from './buffer';\nimport { VariableWidthBuilder } from '../builder';\n/** @ignore */\nexport class Utf8Builder extends VariableWidthBuilder {\n constructor(opts) {\n super(opts);\n this._values = new BufferBuilder(new Uint8Array(0));\n }\n get byteLength() {\n let size = this._pendingLength + (this.length * 4);\n this._offsets && (size += this._offsets.byteLength);\n this._values && (size += this._values.byteLength);\n this._nulls && (size += this._nulls.byteLength);\n return size;\n }\n setValue(index, value) {\n return super.setValue(index, encodeUtf8(value));\n }\n // @ts-ignore\n _flushPending(pending, pendingLength) { }\n}\nUtf8Builder.prototype._flushPending = BinaryBuilder.prototype._flushPending;\n\n//# sourceMappingURL=utf8.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Vector } from '../vector';\n/** @ignore */\nexport class Run {\n get length() { return this._values.length; }\n get(index) { return this._values[index]; }\n clear() { this._values = null; return this; }\n bind(values) {\n if (values instanceof Vector) {\n return values;\n }\n this._values = values;\n return this;\n }\n}\n\n//# sourceMappingURL=run.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { valueToString } from '../util/pretty';\n/** @ignore */ const kParent = Symbol.for('parent');\n/** @ignore */ const kRowIndex = Symbol.for('rowIndex');\n/** @ignore */ const kKeyToIdx = Symbol.for('keyToIdx');\n/** @ignore */ const kIdxToVal = Symbol.for('idxToVal');\n/** @ignore */ const kCustomInspect = Symbol.for('nodejs.util.inspect.custom');\nclass Row {\n constructor(parent, numKeys) {\n this[kParent] = parent;\n this.size = numKeys;\n }\n entries() { return this[Symbol.iterator](); }\n has(key) { return this.get(key) !== undefined; }\n get(key) {\n let val = undefined;\n if (key !== null && key !== undefined) {\n const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map());\n let idx = ktoi.get(key);\n if (idx !== undefined) {\n const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size));\n ((val = itov[idx]) !== undefined) || (itov[idx] = val = this.getValue(idx));\n }\n else if ((idx = this.getIndex(key)) > -1) {\n ktoi.set(key, idx);\n const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size));\n ((val = itov[idx]) !== undefined) || (itov[idx] = val = this.getValue(idx));\n }\n }\n return val;\n }\n set(key, val) {\n if (key !== null && key !== undefined) {\n const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map());\n let idx = ktoi.get(key);\n if (idx === undefined) {\n ktoi.set(key, idx = this.getIndex(key));\n }\n if (idx > -1) {\n const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size));\n itov[idx] = this.setValue(idx, val);\n }\n }\n return this;\n }\n clear() { throw new Error(`Clearing ${this[Symbol.toStringTag]} not supported.`); }\n delete(_) { throw new Error(`Deleting ${this[Symbol.toStringTag]} values not supported.`); }\n *[Symbol.iterator]() {\n const ki = this.keys();\n const vi = this.values();\n const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map());\n const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size));\n for (let k, v, i = 0, kr, vr; !((kr = ki.next()).done || (vr = vi.next()).done); ++i) {\n k = kr.value;\n v = vr.value;\n itov[i] = v;\n ktoi.has(k) || ktoi.set(k, i);\n yield [k, v];\n }\n }\n forEach(callbackfn, thisArg) {\n const ki = this.keys();\n const vi = this.values();\n const callback = thisArg === undefined ? callbackfn :\n (v, k, m) => callbackfn.call(thisArg, v, k, m);\n const ktoi = this[kKeyToIdx] || (this[kKeyToIdx] = new Map());\n const itov = this[kIdxToVal] || (this[kIdxToVal] = new Array(this.size));\n for (let k, v, i = 0, kr, vr; !((kr = ki.next()).done || (vr = vi.next()).done); ++i) {\n k = kr.value;\n v = vr.value;\n itov[i] = v;\n ktoi.has(k) || ktoi.set(k, i);\n callback(v, k, this);\n }\n }\n toArray() { return [...this.values()]; }\n toJSON() {\n const obj = {};\n this.forEach((val, key) => obj[key] = val);\n return obj;\n }\n inspect() { return this.toString(); }\n [kCustomInspect]() { return this.toString(); }\n toString() {\n const str = [];\n this.forEach((val, key) => {\n key = valueToString(key);\n val = valueToString(val);\n str.push(`${key}: ${val}`);\n });\n return `{ ${str.join(', ')} }`;\n }\n}\nRow[Symbol.toStringTag] = ((proto) => {\n Object.defineProperties(proto, {\n 'size': { writable: true, enumerable: false, configurable: false, value: 0 },\n [kParent]: { writable: true, enumerable: false, configurable: false, value: null },\n [kRowIndex]: { writable: true, enumerable: false, configurable: false, value: -1 },\n });\n return proto[Symbol.toStringTag] = 'Row';\n})(Row.prototype);\nexport class MapRow extends Row {\n constructor(slice) {\n super(slice, slice.length);\n return createRowProxy(this);\n }\n keys() {\n return this[kParent].getChildAt(0)[Symbol.iterator]();\n }\n values() {\n return this[kParent].getChildAt(1)[Symbol.iterator]();\n }\n getKey(idx) {\n return this[kParent].getChildAt(0).get(idx);\n }\n getIndex(key) {\n return this[kParent].getChildAt(0).indexOf(key);\n }\n getValue(index) {\n return this[kParent].getChildAt(1).get(index);\n }\n setValue(index, value) {\n this[kParent].getChildAt(1).set(index, value);\n }\n}\nexport class StructRow extends Row {\n constructor(parent) {\n super(parent, parent.type.children.length);\n return defineRowProxyProperties(this);\n }\n *keys() {\n for (const field of this[kParent].type.children) {\n yield field.name;\n }\n }\n *values() {\n for (const field of this[kParent].type.children) {\n yield this[field.name];\n }\n }\n getKey(idx) {\n return this[kParent].type.children[idx].name;\n }\n getIndex(key) {\n return this[kParent].type.children.findIndex((f) => f.name === key);\n }\n getValue(index) {\n return this[kParent].getChildAt(index).get(this[kRowIndex]);\n }\n setValue(index, value) {\n return this[kParent].getChildAt(index).set(this[kRowIndex], value);\n }\n}\nObject.setPrototypeOf(Row.prototype, Map.prototype);\n/** @ignore */\nconst defineRowProxyProperties = (() => {\n const desc = { enumerable: true, configurable: false, get: null, set: null };\n return (row) => {\n let idx = -1, ktoi = row[kKeyToIdx] || (row[kKeyToIdx] = new Map());\n const getter = (key) => function () { return this.get(key); };\n const setter = (key) => function (val) { return this.set(key, val); };\n for (const key of row.keys()) {\n ktoi.set(key, ++idx);\n desc.get = getter(key);\n desc.set = setter(key);\n row.hasOwnProperty(key) || (desc.enumerable = true, Object.defineProperty(row, key, desc));\n row.hasOwnProperty(idx) || (desc.enumerable = false, Object.defineProperty(row, idx, desc));\n }\n desc.get = desc.set = null;\n return row;\n };\n})();\n/** @ignore */\nconst createRowProxy = (() => {\n if (typeof Proxy === 'undefined') {\n return defineRowProxyProperties;\n }\n const has = Row.prototype.has;\n const get = Row.prototype.get;\n const set = Row.prototype.set;\n const getKey = Row.prototype.getKey;\n const RowProxyHandler = {\n isExtensible() { return false; },\n deleteProperty() { return false; },\n preventExtensions() { return true; },\n ownKeys(row) { return [...row.keys()].map((x) => `${x}`); },\n has(row, key) {\n switch (key) {\n case 'getKey':\n case 'getIndex':\n case 'getValue':\n case 'setValue':\n case 'toArray':\n case 'toJSON':\n case 'inspect':\n case 'constructor':\n case 'isPrototypeOf':\n case 'propertyIsEnumerable':\n case 'toString':\n case 'toLocaleString':\n case 'valueOf':\n case 'size':\n case 'has':\n case 'get':\n case 'set':\n case 'clear':\n case 'delete':\n case 'keys':\n case 'values':\n case 'entries':\n case 'forEach':\n case '__proto__':\n case '__defineGetter__':\n case '__defineSetter__':\n case 'hasOwnProperty':\n case '__lookupGetter__':\n case '__lookupSetter__':\n case Symbol.iterator:\n case Symbol.toStringTag:\n case kParent:\n case kRowIndex:\n case kIdxToVal:\n case kKeyToIdx:\n case kCustomInspect:\n return true;\n }\n if (typeof key === 'number' && !row.has(key)) {\n key = row.getKey(key);\n }\n return row.has(key);\n },\n get(row, key, receiver) {\n switch (key) {\n case 'getKey':\n case 'getIndex':\n case 'getValue':\n case 'setValue':\n case 'toArray':\n case 'toJSON':\n case 'inspect':\n case 'constructor':\n case 'isPrototypeOf':\n case 'propertyIsEnumerable':\n case 'toString':\n case 'toLocaleString':\n case 'valueOf':\n case 'size':\n case 'has':\n case 'get':\n case 'set':\n case 'clear':\n case 'delete':\n case 'keys':\n case 'values':\n case 'entries':\n case 'forEach':\n case '__proto__':\n case '__defineGetter__':\n case '__defineSetter__':\n case 'hasOwnProperty':\n case '__lookupGetter__':\n case '__lookupSetter__':\n case Symbol.iterator:\n case Symbol.toStringTag:\n case kParent:\n case kRowIndex:\n case kIdxToVal:\n case kKeyToIdx:\n case kCustomInspect:\n return Reflect.get(row, key, receiver);\n }\n if (typeof key === 'number' && !has.call(receiver, key)) {\n key = getKey.call(receiver, key);\n }\n return get.call(receiver, key);\n },\n set(row, key, val, receiver) {\n switch (key) {\n case kParent:\n case kRowIndex:\n case kIdxToVal:\n case kKeyToIdx:\n return Reflect.set(row, key, val, receiver);\n case 'getKey':\n case 'getIndex':\n case 'getValue':\n case 'setValue':\n case 'toArray':\n case 'toJSON':\n case 'inspect':\n case 'constructor':\n case 'isPrototypeOf':\n case 'propertyIsEnumerable':\n case 'toString':\n case 'toLocaleString':\n case 'valueOf':\n case 'size':\n case 'has':\n case 'get':\n case 'set':\n case 'clear':\n case 'delete':\n case 'keys':\n case 'values':\n case 'entries':\n case 'forEach':\n case '__proto__':\n case '__defineGetter__':\n case '__defineSetter__':\n case 'hasOwnProperty':\n case '__lookupGetter__':\n case '__lookupSetter__':\n case Symbol.iterator:\n case Symbol.toStringTag:\n return false;\n }\n if (typeof key === 'number' && !has.call(receiver, key)) {\n key = getKey.call(receiver, key);\n }\n return has.call(receiver, key) ? !!set.call(receiver, key, val) : false;\n },\n };\n return (row) => new Proxy(row, RowProxyHandler);\n})();\n\n//# sourceMappingURL=row.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Vector } from '../vector';\nimport { MapRow, StructRow } from '../vector/row';\nimport { compareArrayLike } from '../util/buffer';\nimport { BigInt, BigIntAvailable } from './compat';\n/** @ignore */\nexport function clampIndex(source, index, then) {\n const length = source.length;\n const adjust = index > -1 ? index : (length + (index % length));\n return then ? then(source, adjust) : adjust;\n}\n/** @ignore */\nlet tmp;\n/** @ignore */\nexport function clampRange(source, begin, end, then) {\n // Adjust args similar to Array.prototype.slice. Normalize begin/end to\n // clamp between 0 and length, and wrap around on negative indices, e.g.\n // slice(-1, 5) or slice(5, -1)\n let { length: len = 0 } = source;\n let lhs = typeof begin !== 'number' ? 0 : begin;\n let rhs = typeof end !== 'number' ? len : end;\n // wrap around on negative start/end positions\n (lhs < 0) && (lhs = ((lhs % len) + len) % len);\n (rhs < 0) && (rhs = ((rhs % len) + len) % len);\n // ensure lhs <= rhs\n (rhs < lhs) && (tmp = lhs, lhs = rhs, rhs = tmp);\n // ensure rhs <= length\n (rhs > len) && (rhs = len);\n return then ? then(source, lhs, rhs) : [lhs, rhs];\n}\nconst big0 = BigIntAvailable ? BigInt(0) : 0;\nconst isNaNFast = (value) => value !== value;\n/** @ignore */\nexport function createElementComparator(search) {\n let typeofSearch = typeof search;\n // Compare primitives\n if (typeofSearch !== 'object' || search === null) {\n // Compare NaN\n if (isNaNFast(search)) {\n return isNaNFast;\n }\n return typeofSearch !== 'bigint'\n ? (value) => value === search\n : (value) => (big0 + value) === search;\n }\n // Compare Dates\n if (search instanceof Date) {\n const valueOfSearch = search.valueOf();\n return (value) => value instanceof Date ? (value.valueOf() === valueOfSearch) : false;\n }\n // Compare TypedArrays\n if (ArrayBuffer.isView(search)) {\n return (value) => value ? compareArrayLike(search, value) : false;\n }\n // Compare Maps and Rows\n if (search instanceof Map) {\n return creatMapComparator(search);\n }\n // Compare Array-likes\n if (Array.isArray(search)) {\n return createArrayLikeComparator(search);\n }\n // Compare Vectors\n if (search instanceof Vector) {\n return createVectorComparator(search);\n }\n // Compare non-empty Objects\n return createObjectComparator(search);\n}\n/** @ignore */\nfunction createArrayLikeComparator(lhs) {\n const comparators = [];\n for (let i = -1, n = lhs.length; ++i < n;) {\n comparators[i] = createElementComparator(lhs[i]);\n }\n return createSubElementsComparator(comparators);\n}\n/** @ignore */\nfunction creatMapComparator(lhs) {\n let i = -1;\n const comparators = [];\n lhs.forEach((v) => comparators[++i] = createElementComparator(v));\n return createSubElementsComparator(comparators);\n}\n/** @ignore */\nfunction createVectorComparator(lhs) {\n const comparators = [];\n for (let i = -1, n = lhs.length; ++i < n;) {\n comparators[i] = createElementComparator(lhs.get(i));\n }\n return createSubElementsComparator(comparators);\n}\n/** @ignore */\nfunction createObjectComparator(lhs) {\n const keys = Object.keys(lhs);\n // Only compare non-empty Objects\n if (keys.length === 0) {\n return () => false;\n }\n const comparators = [];\n for (let i = -1, n = keys.length; ++i < n;) {\n comparators[i] = createElementComparator(lhs[keys[i]]);\n }\n return createSubElementsComparator(comparators, keys);\n}\nfunction createSubElementsComparator(comparators, keys) {\n return (rhs) => {\n if (!rhs || typeof rhs !== 'object') {\n return false;\n }\n switch (rhs.constructor) {\n case Array: return compareArray(comparators, rhs);\n case Map:\n case MapRow:\n case StructRow:\n return compareObject(comparators, rhs, rhs.keys());\n case Object:\n case undefined: // support `Object.create(null)` objects\n return compareObject(comparators, rhs, keys || Object.keys(rhs));\n }\n return rhs instanceof Vector ? compareVector(comparators, rhs) : false;\n };\n}\nfunction compareArray(comparators, arr) {\n const n = comparators.length;\n if (arr.length !== n) {\n return false;\n }\n for (let i = -1; ++i < n;) {\n if (!(comparators[i](arr[i]))) {\n return false;\n }\n }\n return true;\n}\nfunction compareVector(comparators, vec) {\n const n = comparators.length;\n if (vec.length !== n) {\n return false;\n }\n for (let i = -1; ++i < n;) {\n if (!(comparators[i](vec.get(i)))) {\n return false;\n }\n }\n return true;\n}\nfunction compareObject(comparators, obj, keys) {\n const lKeyItr = keys[Symbol.iterator]();\n const rKeyItr = obj instanceof Map ? obj.keys() : Object.keys(obj)[Symbol.iterator]();\n const rValItr = obj instanceof Map ? obj.values() : Object.values(obj)[Symbol.iterator]();\n let i = 0;\n let n = comparators.length;\n let rVal = rValItr.next();\n let lKey = lKeyItr.next();\n let rKey = rKeyItr.next();\n for (; i < n && !lKey.done && !rKey.done && !rVal.done; ++i, lKey = lKeyItr.next(), rKey = rKeyItr.next(), rVal = rValItr.next()) {\n if (lKey.value !== rKey.value || !comparators[i](rVal.value)) {\n break;\n }\n }\n if (i === n && lKey.done && rKey.done && rVal.done) {\n return true;\n }\n lKeyItr.return && lKeyItr.return();\n rKeyItr.return && rKeyItr.return();\n rValItr.return && rValItr.return();\n return false;\n}\n\n//# sourceMappingURL=vector.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { clampRange } from '../util/vector';\nimport { DataType } from '../type';\nimport { selectChunkArgs } from '../util/args';\nimport { AbstractVector, Vector } from '../vector';\n/** @ignore */\nexport class Chunked extends AbstractVector {\n constructor(type, chunks = [], offsets = calculateOffsets(chunks)) {\n super();\n this._nullCount = -1;\n this._type = type;\n this._chunks = chunks;\n this._chunkOffsets = offsets;\n this._length = offsets[offsets.length - 1];\n this._numChildren = (this._type.children || []).length;\n }\n /** @nocollapse */\n static flatten(...vectors) {\n return selectChunkArgs(Vector, vectors);\n }\n /** @nocollapse */\n static concat(...vectors) {\n const chunks = Chunked.flatten(...vectors);\n return new Chunked(chunks[0].type, chunks);\n }\n get type() { return this._type; }\n get length() { return this._length; }\n get chunks() { return this._chunks; }\n get typeId() { return this._type.typeId; }\n get VectorName() { return `Chunked<${this._type}>`; }\n get data() {\n return this._chunks[0] ? this._chunks[0].data : null;\n }\n get ArrayType() { return this._type.ArrayType; }\n get numChildren() { return this._numChildren; }\n get stride() { return this._chunks[0] ? this._chunks[0].stride : 1; }\n get byteLength() {\n return this._chunks.reduce((byteLength, chunk) => byteLength + chunk.byteLength, 0);\n }\n get nullCount() {\n let nullCount = this._nullCount;\n if (nullCount < 0) {\n this._nullCount = nullCount = this._chunks.reduce((x, { nullCount }) => x + nullCount, 0);\n }\n return nullCount;\n }\n get indices() {\n if (DataType.isDictionary(this._type)) {\n if (!this._indices) {\n const chunks = this._chunks;\n this._indices = (chunks.length === 1\n ? chunks[0].indices\n : Chunked.concat(...chunks.map((x) => x.indices)));\n }\n return this._indices;\n }\n return null;\n }\n get dictionary() {\n if (DataType.isDictionary(this._type)) {\n return this._chunks[this._chunks.length - 1].data.dictionary;\n }\n return null;\n }\n *[Symbol.iterator]() {\n for (const chunk of this._chunks) {\n yield* chunk;\n }\n }\n clone(chunks = this._chunks) {\n return new Chunked(this._type, chunks);\n }\n concat(...others) {\n return this.clone(Chunked.flatten(this, ...others));\n }\n slice(begin, end) {\n return clampRange(this, begin, end, this._sliceInternal);\n }\n getChildAt(index) {\n if (index < 0 || index >= this._numChildren) {\n return null;\n }\n let columns = this._children || (this._children = []);\n let child, field, chunks;\n if (child = columns[index]) {\n return child;\n }\n if (field = (this._type.children || [])[index]) {\n chunks = this._chunks\n .map((vector) => vector.getChildAt(index))\n .filter((vec) => vec != null);\n if (chunks.length > 0) {\n return (columns[index] = new Chunked(field.type, chunks));\n }\n }\n return null;\n }\n search(index, then) {\n let idx = index;\n // binary search to find the child vector and value indices\n let offsets = this._chunkOffsets, rhs = offsets.length - 1;\n // return early if out of bounds, or if there's just one child\n if (idx < 0) {\n return null;\n }\n if (idx >= offsets[rhs]) {\n return null;\n }\n if (rhs <= 1) {\n return then ? then(this, 0, idx) : [0, idx];\n }\n let lhs = 0, pos = 0, mid = 0;\n do {\n if (lhs + 1 === rhs) {\n return then ? then(this, lhs, idx - pos) : [lhs, idx - pos];\n }\n mid = lhs + ((rhs - lhs) / 2) | 0;\n idx >= offsets[mid] ? (lhs = mid) : (rhs = mid);\n } while (idx < offsets[rhs] && idx >= (pos = offsets[lhs]));\n return null;\n }\n isValid(index) {\n return !!this.search(index, this.isValidInternal);\n }\n get(index) {\n return this.search(index, this.getInternal);\n }\n set(index, value) {\n this.search(index, ({ chunks }, i, j) => chunks[i].set(j, value));\n }\n indexOf(element, offset) {\n if (offset && typeof offset === 'number') {\n return this.search(offset, (self, i, j) => this.indexOfInternal(self, i, j, element));\n }\n return this.indexOfInternal(this, 0, Math.max(0, offset || 0), element);\n }\n toArray() {\n const { chunks } = this;\n const n = chunks.length;\n let ArrayType = this._type.ArrayType;\n if (n <= 0) {\n return new ArrayType(0);\n }\n if (n <= 1) {\n return chunks[0].toArray();\n }\n let len = 0, src = new Array(n);\n for (let i = -1; ++i < n;) {\n len += (src[i] = chunks[i].toArray()).length;\n }\n if (ArrayType !== src[0].constructor) {\n ArrayType = src[0].constructor;\n }\n let dst = new ArrayType(len);\n let set = ArrayType === Array ? arraySet : typedSet;\n for (let i = -1, idx = 0; ++i < n;) {\n idx = set(src[i], dst, idx);\n }\n return dst;\n }\n getInternal({ _chunks }, i, j) { return _chunks[i].get(j); }\n isValidInternal({ _chunks }, i, j) { return _chunks[i].isValid(j); }\n indexOfInternal({ _chunks }, chunkIndex, fromIndex, element) {\n let i = chunkIndex - 1, n = _chunks.length;\n let start = fromIndex, offset = 0, found = -1;\n while (++i < n) {\n if (~(found = _chunks[i].indexOf(element, start))) {\n return offset + found;\n }\n start = 0;\n offset += _chunks[i].length;\n }\n return -1;\n }\n _sliceInternal(self, begin, end) {\n const slices = [];\n const { chunks, _chunkOffsets: chunkOffsets } = self;\n for (let i = -1, n = chunks.length; ++i < n;) {\n const chunk = chunks[i];\n const chunkLength = chunk.length;\n const chunkOffset = chunkOffsets[i];\n // If the child is to the right of the slice boundary, we can stop\n if (chunkOffset >= end) {\n break;\n }\n // If the child is to the left of of the slice boundary, exclude\n if (begin >= chunkOffset + chunkLength) {\n continue;\n }\n // If the child is between both left and right boundaries, include w/o slicing\n if (chunkOffset >= begin && (chunkOffset + chunkLength) <= end) {\n slices.push(chunk);\n continue;\n }\n // If the child overlaps one of the slice boundaries, include that slice\n const from = Math.max(0, begin - chunkOffset);\n const to = Math.min(end - chunkOffset, chunkLength);\n slices.push(chunk.slice(from, to));\n }\n return self.clone(slices);\n }\n}\n/** @ignore */\nfunction calculateOffsets(vectors) {\n let offsets = new Uint32Array((vectors || []).length + 1);\n let offset = offsets[0] = 0, length = offsets.length;\n for (let index = 0; ++index < length;) {\n offsets[index] = (offset += vectors[index - 1].length);\n }\n return offsets;\n}\n/** @ignore */\nconst typedSet = (src, dst, offset) => {\n dst.set(src, offset);\n return (offset + src.length);\n};\n/** @ignore */\nconst arraySet = (src, dst, offset) => {\n let idx = offset;\n for (let i = -1, n = src.length; ++i < n;) {\n dst[idx++] = src[i];\n }\n return idx;\n};\n\n//# sourceMappingURL=chunked.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Field } from './schema';\nimport { Vector } from './vector';\nimport { Chunked } from './vector/chunked';\nexport class Column extends Chunked {\n constructor(field, vectors = [], offsets) {\n vectors = Chunked.flatten(...vectors);\n super(field.type, vectors, offsets);\n this._field = field;\n if (vectors.length === 1 && !(this instanceof SingleChunkColumn)) {\n return new SingleChunkColumn(field, vectors[0], this._chunkOffsets);\n }\n }\n /** @nocollapse */\n static new(field, data, ...rest) {\n const chunks = Chunked.flatten(Array.isArray(data) ? [...data, ...rest] :\n data instanceof Vector ? [data, ...rest] :\n [Vector.new(data, ...rest)]);\n if (typeof field === 'string') {\n const type = chunks[0].data.type;\n field = new Field(field, type, true);\n }\n else if (!field.nullable && chunks.some(({ nullCount }) => nullCount > 0)) {\n field = field.clone({ nullable: true });\n }\n return new Column(field, chunks);\n }\n get field() { return this._field; }\n get name() { return this._field.name; }\n get nullable() { return this._field.nullable; }\n get metadata() { return this._field.metadata; }\n clone(chunks = this._chunks) {\n return new Column(this._field, chunks);\n }\n getChildAt(index) {\n if (index < 0 || index >= this.numChildren) {\n return null;\n }\n let columns = this._children || (this._children = []);\n let column, field, chunks;\n if (column = columns[index]) {\n return column;\n }\n if (field = (this.type.children || [])[index]) {\n chunks = this._chunks\n .map((vector) => vector.getChildAt(index))\n .filter((vec) => vec != null);\n if (chunks.length > 0) {\n return (columns[index] = new Column(field, chunks));\n }\n }\n return null;\n }\n}\n/** @ignore */\nclass SingleChunkColumn extends Column {\n constructor(field, vector, offsets) {\n super(field, [vector], offsets);\n this._chunk = vector;\n }\n search(index, then) {\n return then ? then(this, 0, index) : [0, index];\n }\n isValid(index) {\n return this._chunk.isValid(index);\n }\n get(index) {\n return this._chunk.get(index);\n }\n set(index, value) {\n this._chunk.set(index, value);\n }\n indexOf(element, offset) {\n return this._chunk.indexOf(element, offset);\n }\n}\n\n//# sourceMappingURL=column.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Data } from '../data';\nimport { Field } from '../schema';\nimport { Column } from '../column';\nimport { Vector } from '../vector';\nimport { DataType } from '../type';\nimport { Chunked } from '../vector/chunked';\nconst isArray = Array.isArray;\n/** @ignore */\nexport const selectArgs = (Ctor, vals) => _selectArgs(Ctor, vals, [], 0);\n/** @ignore */\nexport const selectColumnArgs = (args) => {\n const [fields, values] = _selectFieldArgs(args, [[], []]);\n return values.map((x, i) => x instanceof Column ? Column.new(x.field.clone(fields[i]), x) :\n x instanceof Vector ? Column.new(fields[i], x) :\n Column.new(fields[i], []));\n};\n/** @ignore */\nexport const selectFieldArgs = (args) => _selectFieldArgs(args, [[], []]);\n/** @ignore */\nexport const selectChunkArgs = (Ctor, vals) => _selectChunkArgs(Ctor, vals, [], 0);\n/** @ignore */\nexport const selectVectorChildrenArgs = (Ctor, vals) => _selectVectorChildrenArgs(Ctor, vals, [], 0);\n/** @ignore */\nexport const selectColumnChildrenArgs = (Ctor, vals) => _selectColumnChildrenArgs(Ctor, vals, [], 0);\n/** @ignore */\nfunction _selectArgs(Ctor, vals, res, idx) {\n let value, j = idx;\n let i = -1, n = vals.length;\n while (++i < n) {\n if (isArray(value = vals[i])) {\n j = _selectArgs(Ctor, value, res, j).length;\n }\n else if (value instanceof Ctor) {\n res[j++] = value;\n }\n }\n return res;\n}\n/** @ignore */\nfunction _selectChunkArgs(Ctor, vals, res, idx) {\n let value, j = idx;\n let i = -1, n = vals.length;\n while (++i < n) {\n if (isArray(value = vals[i])) {\n j = _selectChunkArgs(Ctor, value, res, j).length;\n }\n else if (value instanceof Chunked) {\n j = _selectChunkArgs(Ctor, value.chunks, res, j).length;\n }\n else if (value instanceof Ctor) {\n res[j++] = value;\n }\n }\n return res;\n}\n/** @ignore */\nfunction _selectVectorChildrenArgs(Ctor, vals, res, idx) {\n let value, j = idx;\n let i = -1, n = vals.length;\n while (++i < n) {\n if (isArray(value = vals[i])) {\n j = _selectVectorChildrenArgs(Ctor, value, res, j).length;\n }\n else if (value instanceof Ctor) {\n j = _selectArgs(Vector, value.schema.fields.map((_, i) => value.getChildAt(i)), res, j).length;\n }\n else if (value instanceof Vector) {\n res[j++] = value;\n }\n }\n return res;\n}\n/** @ignore */\nfunction _selectColumnChildrenArgs(Ctor, vals, res, idx) {\n let value, j = idx;\n let i = -1, n = vals.length;\n while (++i < n) {\n if (isArray(value = vals[i])) {\n j = _selectColumnChildrenArgs(Ctor, value, res, j).length;\n }\n else if (value instanceof Ctor) {\n j = _selectArgs(Column, value.schema.fields.map((f, i) => Column.new(f, value.getChildAt(i))), res, j).length;\n }\n else if (value instanceof Column) {\n res[j++] = value;\n }\n }\n return res;\n}\n/** @ignore */\nconst toKeysAndValues = (xs, [k, v], i) => (xs[0][i] = k, xs[1][i] = v, xs);\n/** @ignore */\nfunction _selectFieldArgs(vals, ret) {\n let keys, n;\n switch (n = vals.length) {\n case 0: return ret;\n case 1:\n keys = ret[0];\n if (!(vals[0])) {\n return ret;\n }\n if (isArray(vals[0])) {\n return _selectFieldArgs(vals[0], ret);\n }\n if (!(vals[0] instanceof Data || vals[0] instanceof Vector || vals[0] instanceof DataType)) {\n [keys, vals] = Object.entries(vals[0]).reduce(toKeysAndValues, ret);\n }\n break;\n default:\n !isArray(keys = vals[n - 1])\n ? (vals = isArray(vals[0]) ? vals[0] : vals, keys = [])\n : (vals = isArray(vals[0]) ? vals[0] : vals.slice(0, n - 1));\n }\n let fieldIndex = -1;\n let valueIndex = -1;\n let idx = -1, len = vals.length;\n let field;\n let val;\n let [fields, values] = ret;\n while (++idx < len) {\n val = vals[idx];\n if (val instanceof Column && (values[++valueIndex] = val)) {\n fields[++fieldIndex] = val.field.clone(keys[idx], val.type, true);\n }\n else {\n ({ [idx]: field = idx } = keys);\n if (val instanceof DataType && (values[++valueIndex] = val)) {\n fields[++fieldIndex] = Field.new(field, val, true);\n }\n else if (val && val.type && (values[++valueIndex] = val)) {\n val instanceof Data && (values[valueIndex] = val = Vector.new(val));\n fields[++fieldIndex] = Field.new(field, val.type, true);\n }\n }\n }\n return ret;\n}\n\n//# sourceMappingURL=args.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { DataType } from './type';\nimport { selectArgs } from './util/args';\nimport { selectFieldArgs } from './util/args';\nimport { instance as comparer } from './visitor/typecomparator';\nexport class Schema {\n constructor(fields = [], metadata, dictionaries) {\n this.fields = (fields || []);\n this.metadata = metadata || new Map();\n if (!dictionaries) {\n dictionaries = generateDictionaryMap(fields);\n }\n this.dictionaries = dictionaries;\n }\n /** @nocollapse */\n static from(...args) {\n return Schema.new(args[0], args[1]);\n }\n /** @nocollapse */\n static new(...args) {\n return new Schema(selectFieldArgs(args)[0]);\n }\n get [Symbol.toStringTag]() { return 'Schema'; }\n toString() {\n return `Schema<{ ${this.fields.map((f, i) => `${i}: ${f}`).join(', ')} }>`;\n }\n compareTo(other) {\n return comparer.compareSchemas(this, other);\n }\n select(...columnNames) {\n const names = columnNames.reduce((xs, x) => (xs[x] = true) && xs, Object.create(null));\n return new Schema(this.fields.filter((f) => names[f.name]), this.metadata);\n }\n selectAt(...columnIndices) {\n return new Schema(columnIndices.map((i) => this.fields[i]).filter(Boolean), this.metadata);\n }\n assign(...args) {\n const other = args[0] instanceof Schema ? args[0]\n : new Schema(selectArgs(Field, args));\n const curFields = [...this.fields];\n const metadata = mergeMaps(mergeMaps(new Map(), this.metadata), other.metadata);\n const newFields = other.fields.filter((f2) => {\n const i = curFields.findIndex((f) => f.name === f2.name);\n return ~i ? (curFields[i] = f2.clone({\n metadata: mergeMaps(mergeMaps(new Map(), curFields[i].metadata), f2.metadata)\n })) && false : true;\n });\n const newDictionaries = generateDictionaryMap(newFields, new Map());\n return new Schema([...curFields, ...newFields], metadata, new Map([...this.dictionaries, ...newDictionaries]));\n }\n}\nexport class Field {\n constructor(name, type, nullable = false, metadata) {\n this.name = name;\n this.type = type;\n this.nullable = nullable;\n this.metadata = metadata || new Map();\n }\n /** @nocollapse */\n static new(...args) {\n let [name, type, nullable, metadata] = args;\n if (args[0] && typeof args[0] === 'object') {\n ({ name } = args[0]);\n (type === undefined) && (type = args[0].type);\n (nullable === undefined) && (nullable = args[0].nullable);\n (metadata === undefined) && (metadata = args[0].metadata);\n }\n return new Field(`${name}`, type, nullable, metadata);\n }\n get typeId() { return this.type.typeId; }\n get [Symbol.toStringTag]() { return 'Field'; }\n toString() { return `${this.name}: ${this.type}`; }\n compareTo(other) {\n return comparer.compareField(this, other);\n }\n clone(...args) {\n let [name, type, nullable, metadata] = args;\n (!args[0] || typeof args[0] !== 'object')\n ? ([name = this.name, type = this.type, nullable = this.nullable, metadata = this.metadata] = args)\n : ({ name = this.name, type = this.type, nullable = this.nullable, metadata = this.metadata } = args[0]);\n return Field.new(name, type, nullable, metadata);\n }\n}\n/** @ignore */\nfunction mergeMaps(m1, m2) {\n return new Map([...(m1 || new Map()), ...(m2 || new Map())]);\n}\n/** @ignore */\nfunction generateDictionaryMap(fields, dictionaries = new Map()) {\n for (let i = -1, n = fields.length; ++i < n;) {\n const field = fields[i];\n const type = field.type;\n if (DataType.isDictionary(type)) {\n if (!dictionaries.has(type.id)) {\n dictionaries.set(type.id, type.dictionary);\n }\n else if (dictionaries.get(type.id) !== type.dictionary) {\n throw new Error(`Cannot create Schema containing two different dictionaries with the same Id`);\n }\n }\n if (type.children && type.children.length > 0) {\n generateDictionaryMap(type.children, dictionaries);\n }\n }\n return dictionaries;\n}\n// Add these here so they're picked up by the externs creator\n// in the build, and closure-compiler doesn't minify them away\nSchema.prototype.fields = null;\nSchema.prototype.metadata = null;\nSchema.prototype.dictionaries = null;\nField.prototype.type = null;\nField.prototype.name = null;\nField.prototype.nullable = null;\nField.prototype.metadata = null;\n\n//# sourceMappingURL=schema.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Run } from './run';\nimport { Field } from '../schema';\nimport { List } from '../type';\nimport { OffsetsBufferBuilder } from './buffer';\nimport { VariableWidthBuilder } from '../builder';\n/** @ignore */\nexport class ListBuilder extends VariableWidthBuilder {\n constructor(opts) {\n super(opts);\n this._run = new Run();\n this._offsets = new OffsetsBufferBuilder();\n }\n addChild(child, name = '0') {\n if (this.numChildren > 0) {\n throw new Error('ListBuilder can only have one child.');\n }\n this.children[this.numChildren] = child;\n this.type = new List(new Field(name, child.type, true));\n return this.numChildren - 1;\n }\n clear() {\n this._run.clear();\n return super.clear();\n }\n _flushPending(pending) {\n const run = this._run;\n const offsets = this._offsets;\n const setValue = this._setValue;\n let index = 0, value;\n for ([index, value] of pending) {\n if (value === undefined) {\n offsets.set(index, 0);\n }\n else {\n offsets.set(index, value.length);\n setValue(this, index, run.bind(value));\n }\n }\n }\n}\n\n//# sourceMappingURL=list.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Run } from './run';\nimport { Field } from '../schema';\nimport { Builder } from '../builder';\nimport { FixedSizeList } from '../type';\n/** @ignore */\nexport class FixedSizeListBuilder extends Builder {\n constructor() {\n super(...arguments);\n this._run = new Run();\n }\n setValue(index, value) {\n super.setValue(index, this._run.bind(value));\n }\n addChild(child, name = '0') {\n if (this.numChildren > 0) {\n throw new Error('FixedSizeListBuilder can only have one child.');\n }\n const childIndex = this.children.push(child);\n this.type = new FixedSizeList(this.type.listSize, new Field(name, child.type, true));\n return childIndex;\n }\n clear() {\n this._run.clear();\n return super.clear();\n }\n}\n\n//# sourceMappingURL=fixedsizelist.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Field } from '../schema';\nimport { Map_ } from '../type';\nimport { VariableWidthBuilder } from '../builder';\n/** @ignore */\nexport class MapBuilder extends VariableWidthBuilder {\n set(index, value) {\n return super.set(index, value);\n }\n setValue(index, value) {\n value = value instanceof Map ? value : new Map(Object.entries(value));\n const pending = this._pending || (this._pending = new Map());\n const current = pending.get(index);\n current && (this._pendingLength -= current.size);\n this._pendingLength += value.size;\n pending.set(index, value);\n }\n addChild(child, name = `${this.numChildren}`) {\n if (this.numChildren > 0) {\n throw new Error('ListBuilder can only have one child.');\n }\n this.children[this.numChildren] = child;\n this.type = new Map_(new Field(name, child.type, true), this.type.keysSorted);\n return this.numChildren - 1;\n }\n _flushPending(pending) {\n const offsets = this._offsets;\n const setValue = this._setValue;\n pending.forEach((value, index) => {\n if (value === undefined) {\n offsets.set(index, 0);\n }\n else {\n offsets.set(index, value.size);\n setValue(this, index, value);\n }\n });\n }\n}\n\n//# sourceMappingURL=map.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Field } from '../schema';\nimport { Builder } from '../builder';\nimport { Struct } from '../type';\n/** @ignore */\nexport class StructBuilder extends Builder {\n addChild(child, name = `${this.numChildren}`) {\n const childIndex = this.children.push(child);\n this.type = new Struct([...this.type.children, new Field(name, child.type, true)]);\n return childIndex;\n }\n}\n\n//# sourceMappingURL=struct.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Field } from '../schema';\nimport { DataBufferBuilder } from './buffer';\nimport { Builder } from '../builder';\nimport { Union } from '../type';\n/** @ignore */\nexport class UnionBuilder extends Builder {\n constructor(options) {\n super(options);\n this._typeIds = new DataBufferBuilder(new Int8Array(0), 1);\n if (typeof options['valueToChildTypeId'] === 'function') {\n this._valueToChildTypeId = options['valueToChildTypeId'];\n }\n }\n get typeIdToChildIndex() { return this.type.typeIdToChildIndex; }\n append(value, childTypeId) {\n return this.set(this.length, value, childTypeId);\n }\n set(index, value, childTypeId) {\n if (childTypeId === undefined) {\n childTypeId = this._valueToChildTypeId(this, value, index);\n }\n if (this.setValid(index, this.isValid(value))) {\n this.setValue(index, value, childTypeId);\n }\n return this;\n }\n // @ts-ignore\n setValue(index, value, childTypeId) {\n this._typeIds.set(index, childTypeId);\n super.setValue(index, value);\n }\n // @ts-ignore\n addChild(child, name = `${this.children.length}`) {\n const childTypeId = this.children.push(child);\n const { type: { children, mode, typeIds } } = this;\n const fields = [...children, new Field(name, child.type)];\n this.type = new Union(mode, [...typeIds, childTypeId], fields);\n return childTypeId;\n }\n /** @ignore */\n // @ts-ignore\n _valueToChildTypeId(builder, value, offset) {\n throw new Error(`Cannot map UnionBuilder value to child typeId. \\\nPass the \\`childTypeId\\` as the second argument to unionBuilder.append(), \\\nor supply a \\`valueToChildTypeId\\` function as part of the UnionBuilder constructor options.`);\n }\n}\n/** @ignore */\nexport class SparseUnionBuilder extends UnionBuilder {\n}\n/** @ignore */\nexport class DenseUnionBuilder extends UnionBuilder {\n constructor(options) {\n super(options);\n this._offsets = new DataBufferBuilder(new Int32Array(0));\n }\n /** @ignore */\n setValue(index, value, childTypeId) {\n const childIndex = this.type.typeIdToChildIndex[childTypeId];\n this._offsets.set(index, this.getChildAt(childIndex).length);\n return super.setValue(index, value, childTypeId);\n }\n}\n\n//# sourceMappingURL=union.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Vector } from '../vector';\nimport { Visitor } from '../visitor';\nimport { encodeUtf8 } from '../util/utf8';\nimport { float64ToUint16 } from '../util/math';\nimport { toArrayBufferView } from '../util/buffer';\nimport { UnionMode, Precision, DateUnit, TimeUnit, IntervalUnit } from '../enum';\n/** @ignore */\nexport class SetVisitor extends Visitor {\n}\n/** @ignore */\nconst setEpochMsToDays = (data, index, epochMs) => { data[index] = (epochMs / 86400000) | 0; };\n/** @ignore */\nconst setEpochMsToMillisecondsLong = (data, index, epochMs) => {\n data[index] = (epochMs % 4294967296) | 0;\n data[index + 1] = (epochMs / 4294967296) | 0;\n};\n/** @ignore */\nconst setEpochMsToMicrosecondsLong = (data, index, epochMs) => {\n data[index] = ((epochMs * 1000) % 4294967296) | 0;\n data[index + 1] = ((epochMs * 1000) / 4294967296) | 0;\n};\n/** @ignore */\nconst setEpochMsToNanosecondsLong = (data, index, epochMs) => {\n data[index] = ((epochMs * 1000000) % 4294967296) | 0;\n data[index + 1] = ((epochMs * 1000000) / 4294967296) | 0;\n};\n/** @ignore */\nconst setVariableWidthBytes = (values, valueOffsets, index, value) => {\n const { [index]: x, [index + 1]: y } = valueOffsets;\n if (x != null && y != null) {\n values.set(value.subarray(0, y - x), x);\n }\n};\n/** @ignore */\nconst setBool = ({ offset, values }, index, val) => {\n const idx = offset + index;\n val ? (values[idx >> 3] |= (1 << (idx % 8))) // true\n : (values[idx >> 3] &= ~(1 << (idx % 8))); // false\n};\n/** @ignore */\nconst setDateDay = ({ values }, index, value) => { setEpochMsToDays(values, index, value.valueOf()); };\n/** @ignore */\nconst setDateMillisecond = ({ values }, index, value) => { setEpochMsToMillisecondsLong(values, index * 2, value.valueOf()); };\n/** @ignore */\nconst setNumeric = ({ stride, values }, index, value) => { values[stride * index] = value; };\n/** @ignore */\nconst setFloat16 = ({ stride, values }, index, value) => { values[stride * index] = float64ToUint16(value); };\n/** @ignore */\nconst setNumericX2 = (vector, index, value) => {\n switch (typeof value) {\n case 'bigint':\n vector.values64[index] = value;\n break;\n case 'number':\n vector.values[index * vector.stride] = value;\n break;\n default:\n const val = value;\n const { stride, ArrayType } = vector;\n const long = toArrayBufferView(ArrayType, val);\n vector.values.set(long.subarray(0, stride), stride * index);\n }\n};\n/** @ignore */\nconst setFixedSizeBinary = ({ stride, values }, index, value) => { values.set(value.subarray(0, stride), stride * index); };\n/** @ignore */\nconst setBinary = ({ values, valueOffsets }, index, value) => setVariableWidthBytes(values, valueOffsets, index, value);\n/** @ignore */\nconst setUtf8 = ({ values, valueOffsets }, index, value) => {\n setVariableWidthBytes(values, valueOffsets, index, encodeUtf8(value));\n};\n/* istanbul ignore next */\n/** @ignore */\nconst setInt = (vector, index, value) => {\n vector.type.bitWidth < 64\n ? setNumeric(vector, index, value)\n : setNumericX2(vector, index, value);\n};\n/* istanbul ignore next */\n/** @ignore */\nconst setFloat = (vector, index, value) => {\n vector.type.precision !== Precision.HALF\n ? setNumeric(vector, index, value)\n : setFloat16(vector, index, value);\n};\n/* istanbul ignore next */\nconst setDate = (vector, index, value) => {\n vector.type.unit === DateUnit.DAY\n ? setDateDay(vector, index, value)\n : setDateMillisecond(vector, index, value);\n};\n/** @ignore */\nconst setTimestampSecond = ({ values }, index, value) => setEpochMsToMillisecondsLong(values, index * 2, value / 1000);\n/** @ignore */\nconst setTimestampMillisecond = ({ values }, index, value) => setEpochMsToMillisecondsLong(values, index * 2, value);\n/** @ignore */\nconst setTimestampMicrosecond = ({ values }, index, value) => setEpochMsToMicrosecondsLong(values, index * 2, value);\n/** @ignore */\nconst setTimestampNanosecond = ({ values }, index, value) => setEpochMsToNanosecondsLong(values, index * 2, value);\n/* istanbul ignore next */\n/** @ignore */\nconst setTimestamp = (vector, index, value) => {\n switch (vector.type.unit) {\n case TimeUnit.SECOND: return setTimestampSecond(vector, index, value);\n case TimeUnit.MILLISECOND: return setTimestampMillisecond(vector, index, value);\n case TimeUnit.MICROSECOND: return setTimestampMicrosecond(vector, index, value);\n case TimeUnit.NANOSECOND: return setTimestampNanosecond(vector, index, value);\n }\n};\n/** @ignore */\nconst setTimeSecond = ({ values, stride }, index, value) => { values[stride * index] = value; };\n/** @ignore */\nconst setTimeMillisecond = ({ values, stride }, index, value) => { values[stride * index] = value; };\n/** @ignore */\nconst setTimeMicrosecond = ({ values }, index, value) => { values.set(value.subarray(0, 2), 2 * index); };\n/** @ignore */\nconst setTimeNanosecond = ({ values }, index, value) => { values.set(value.subarray(0, 2), 2 * index); };\n/* istanbul ignore next */\n/** @ignore */\nconst setTime = (vector, index, value) => {\n switch (vector.type.unit) {\n case TimeUnit.SECOND: return setTimeSecond(vector, index, value);\n case TimeUnit.MILLISECOND: return setTimeMillisecond(vector, index, value);\n case TimeUnit.MICROSECOND: return setTimeMicrosecond(vector, index, value);\n case TimeUnit.NANOSECOND: return setTimeNanosecond(vector, index, value);\n }\n};\n/** @ignore */\nconst setDecimal = ({ values }, index, value) => { values.set(value.subarray(0, 4), 4 * index); };\n/** @ignore */\nconst setList = (vector, index, value) => {\n const values = vector.getChildAt(0), valueOffsets = vector.valueOffsets;\n for (let idx = -1, itr = valueOffsets[index], end = valueOffsets[index + 1]; itr < end;) {\n values.set(itr++, value.get(++idx));\n }\n};\n/** @ignore */\nconst setMap = (vector, index, value) => {\n const values = vector.getChildAt(0), valueOffsets = vector.valueOffsets;\n const entries = value instanceof Map ? [...value] : Object.entries(value);\n for (let idx = -1, itr = valueOffsets[index], end = valueOffsets[index + 1]; itr < end;) {\n values.set(itr++, entries[++idx]);\n }\n};\n/** @ignore */ const _setStructArrayValue = (o, v) => (c, _, i) => c && c.set(o, v[i]);\n/** @ignore */ const _setStructVectorValue = (o, v) => (c, _, i) => c && c.set(o, v.get(i));\n/** @ignore */ const _setStructMapValue = (o, v) => (c, f, _) => c && c.set(o, v.get(f.name));\n/** @ignore */ const _setStructObjectValue = (o, v) => (c, f, _) => c && c.set(o, v[f.name]);\n/** @ignore */\nconst setStruct = (vector, index, value) => {\n const setValue = value instanceof Map ? _setStructMapValue(index, value) :\n value instanceof Vector ? _setStructVectorValue(index, value) :\n Array.isArray(value) ? _setStructArrayValue(index, value) :\n _setStructObjectValue(index, value);\n vector.type.children.forEach((f, i) => setValue(vector.getChildAt(i), f, i));\n};\n/* istanbul ignore next */\n/** @ignore */\nconst setUnion = (vector, index, value) => {\n vector.type.mode === UnionMode.Dense ?\n setDenseUnion(vector, index, value) :\n setSparseUnion(vector, index, value);\n};\n/** @ignore */\nconst setDenseUnion = (vector, index, value) => {\n const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]];\n const child = vector.getChildAt(childIndex);\n child && child.set(vector.valueOffsets[index], value);\n};\n/** @ignore */\nconst setSparseUnion = (vector, index, value) => {\n const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]];\n const child = vector.getChildAt(childIndex);\n child && child.set(index, value);\n};\n/** @ignore */\nconst setDictionary = (vector, index, value) => {\n const key = vector.getKey(index);\n if (key !== null) {\n vector.setValue(key, value);\n }\n};\n/* istanbul ignore next */\n/** @ignore */\nconst setIntervalValue = (vector, index, value) => {\n (vector.type.unit === IntervalUnit.DAY_TIME)\n ? setIntervalDayTime(vector, index, value)\n : setIntervalYearMonth(vector, index, value);\n};\n/** @ignore */\nconst setIntervalDayTime = ({ values }, index, value) => { values.set(value.subarray(0, 2), 2 * index); };\n/** @ignore */\nconst setIntervalYearMonth = ({ values }, index, value) => { values[index] = (value[0] * 12) + (value[1] % 12); };\n/** @ignore */\nconst setFixedSizeList = (vector, index, value) => {\n const child = vector.getChildAt(0), { stride } = vector;\n for (let idx = -1, offset = index * stride; ++idx < stride;) {\n child.set(offset + idx, value.get(idx));\n }\n};\nSetVisitor.prototype.visitBool = setBool;\nSetVisitor.prototype.visitInt = setInt;\nSetVisitor.prototype.visitInt8 = setNumeric;\nSetVisitor.prototype.visitInt16 = setNumeric;\nSetVisitor.prototype.visitInt32 = setNumeric;\nSetVisitor.prototype.visitInt64 = setNumericX2;\nSetVisitor.prototype.visitUint8 = setNumeric;\nSetVisitor.prototype.visitUint16 = setNumeric;\nSetVisitor.prototype.visitUint32 = setNumeric;\nSetVisitor.prototype.visitUint64 = setNumericX2;\nSetVisitor.prototype.visitFloat = setFloat;\nSetVisitor.prototype.visitFloat16 = setFloat16;\nSetVisitor.prototype.visitFloat32 = setNumeric;\nSetVisitor.prototype.visitFloat64 = setNumeric;\nSetVisitor.prototype.visitUtf8 = setUtf8;\nSetVisitor.prototype.visitBinary = setBinary;\nSetVisitor.prototype.visitFixedSizeBinary = setFixedSizeBinary;\nSetVisitor.prototype.visitDate = setDate;\nSetVisitor.prototype.visitDateDay = setDateDay;\nSetVisitor.prototype.visitDateMillisecond = setDateMillisecond;\nSetVisitor.prototype.visitTimestamp = setTimestamp;\nSetVisitor.prototype.visitTimestampSecond = setTimestampSecond;\nSetVisitor.prototype.visitTimestampMillisecond = setTimestampMillisecond;\nSetVisitor.prototype.visitTimestampMicrosecond = setTimestampMicrosecond;\nSetVisitor.prototype.visitTimestampNanosecond = setTimestampNanosecond;\nSetVisitor.prototype.visitTime = setTime;\nSetVisitor.prototype.visitTimeSecond = setTimeSecond;\nSetVisitor.prototype.visitTimeMillisecond = setTimeMillisecond;\nSetVisitor.prototype.visitTimeMicrosecond = setTimeMicrosecond;\nSetVisitor.prototype.visitTimeNanosecond = setTimeNanosecond;\nSetVisitor.prototype.visitDecimal = setDecimal;\nSetVisitor.prototype.visitList = setList;\nSetVisitor.prototype.visitStruct = setStruct;\nSetVisitor.prototype.visitUnion = setUnion;\nSetVisitor.prototype.visitDenseUnion = setDenseUnion;\nSetVisitor.prototype.visitSparseUnion = setSparseUnion;\nSetVisitor.prototype.visitDictionary = setDictionary;\nSetVisitor.prototype.visitInterval = setIntervalValue;\nSetVisitor.prototype.visitIntervalDayTime = setIntervalDayTime;\nSetVisitor.prototype.visitIntervalYearMonth = setIntervalYearMonth;\nSetVisitor.prototype.visitFixedSizeList = setFixedSizeList;\nSetVisitor.prototype.visitMap = setMap;\n/** @ignore */\nexport const instance = new SetVisitor();\n\n//# sourceMappingURL=set.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Visitor } from '../visitor';\nimport { BinaryBuilder } from '../builder/binary';\nimport { BoolBuilder } from '../builder/bool';\nimport { DateBuilder, DateDayBuilder, DateMillisecondBuilder } from '../builder/date';\nimport { DecimalBuilder } from '../builder/decimal';\nimport { DictionaryBuilder } from '../builder/dictionary';\nimport { FixedSizeBinaryBuilder } from '../builder/fixedsizebinary';\nimport { FixedSizeListBuilder } from '../builder/fixedsizelist';\nimport { FloatBuilder, Float16Builder, Float32Builder, Float64Builder } from '../builder/float';\nimport { IntervalBuilder, IntervalDayTimeBuilder, IntervalYearMonthBuilder } from '../builder/interval';\nimport { IntBuilder, Int8Builder, Int16Builder, Int32Builder, Int64Builder, Uint8Builder, Uint16Builder, Uint32Builder, Uint64Builder } from '../builder/int';\nimport { ListBuilder } from '../builder/list';\nimport { MapBuilder } from '../builder/map';\nimport { NullBuilder } from '../builder/null';\nimport { StructBuilder } from '../builder/struct';\nimport { TimestampBuilder, TimestampSecondBuilder, TimestampMillisecondBuilder, TimestampMicrosecondBuilder, TimestampNanosecondBuilder } from '../builder/timestamp';\nimport { TimeBuilder, TimeSecondBuilder, TimeMillisecondBuilder, TimeMicrosecondBuilder, TimeNanosecondBuilder } from '../builder/time';\nimport { UnionBuilder, DenseUnionBuilder, SparseUnionBuilder } from '../builder/union';\nimport { Utf8Builder } from '../builder/utf8';\n/** @ignore */\nexport class GetBuilderCtor extends Visitor {\n visitNull() { return NullBuilder; }\n visitBool() { return BoolBuilder; }\n visitInt() { return IntBuilder; }\n visitInt8() { return Int8Builder; }\n visitInt16() { return Int16Builder; }\n visitInt32() { return Int32Builder; }\n visitInt64() { return Int64Builder; }\n visitUint8() { return Uint8Builder; }\n visitUint16() { return Uint16Builder; }\n visitUint32() { return Uint32Builder; }\n visitUint64() { return Uint64Builder; }\n visitFloat() { return FloatBuilder; }\n visitFloat16() { return Float16Builder; }\n visitFloat32() { return Float32Builder; }\n visitFloat64() { return Float64Builder; }\n visitUtf8() { return Utf8Builder; }\n visitBinary() { return BinaryBuilder; }\n visitFixedSizeBinary() { return FixedSizeBinaryBuilder; }\n visitDate() { return DateBuilder; }\n visitDateDay() { return DateDayBuilder; }\n visitDateMillisecond() { return DateMillisecondBuilder; }\n visitTimestamp() { return TimestampBuilder; }\n visitTimestampSecond() { return TimestampSecondBuilder; }\n visitTimestampMillisecond() { return TimestampMillisecondBuilder; }\n visitTimestampMicrosecond() { return TimestampMicrosecondBuilder; }\n visitTimestampNanosecond() { return TimestampNanosecondBuilder; }\n visitTime() { return TimeBuilder; }\n visitTimeSecond() { return TimeSecondBuilder; }\n visitTimeMillisecond() { return TimeMillisecondBuilder; }\n visitTimeMicrosecond() { return TimeMicrosecondBuilder; }\n visitTimeNanosecond() { return TimeNanosecondBuilder; }\n visitDecimal() { return DecimalBuilder; }\n visitList() { return ListBuilder; }\n visitStruct() { return StructBuilder; }\n visitUnion() { return UnionBuilder; }\n visitDenseUnion() { return DenseUnionBuilder; }\n visitSparseUnion() { return SparseUnionBuilder; }\n visitDictionary() { return DictionaryBuilder; }\n visitInterval() { return IntervalBuilder; }\n visitIntervalDayTime() { return IntervalDayTimeBuilder; }\n visitIntervalYearMonth() { return IntervalYearMonthBuilder; }\n visitFixedSizeList() { return FixedSizeListBuilder; }\n visitMap() { return MapBuilder; }\n}\n/** @ignore */\nexport const instance = new GetBuilderCtor();\n\n//# sourceMappingURL=builderctor.mjs.map\n","// automatically generated by the FlatBuffers compiler, do not modify\nimport * as NS7624605610262437867 from './Schema';\n/**\n * ----------------------------------------------------------------------\n * Arrow File metadata\n *\n *\n * @constructor\n */\nexport var org;\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Footer {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Footer\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * @param flatbuffers.ByteBuffer bb\n * @param Footer= obj\n * @returns Footer\n */\n static getRootAsFooter(bb, obj) {\n return (obj || new Footer).__init(bb.readInt32(bb.position()) + bb.position(), bb);\n }\n /**\n * @returns org.apache.arrow.flatbuf.MetadataVersion\n */\n version() {\n let offset = this.bb.__offset(this.bb_pos, 4);\n return offset ? /** */ (this.bb.readInt16(this.bb_pos + offset)) : NS7624605610262437867.org.apache.arrow.flatbuf.MetadataVersion.V1;\n }\n /**\n * @param org.apache.arrow.flatbuf.Schema= obj\n * @returns org.apache.arrow.flatbuf.Schema|null\n */\n schema(obj) {\n let offset = this.bb.__offset(this.bb_pos, 6);\n return offset ? (obj || new NS7624605610262437867.org.apache.arrow.flatbuf.Schema).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;\n }\n /**\n * @param number index\n * @param org.apache.arrow.flatbuf.Block= obj\n * @returns org.apache.arrow.flatbuf.Block\n */\n dictionaries(index, obj) {\n let offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? (obj || new org.apache.arrow.flatbuf.Block).__init(this.bb.__vector(this.bb_pos + offset) + index * 24, this.bb) : null;\n }\n /**\n * @returns number\n */\n dictionariesLength() {\n let offset = this.bb.__offset(this.bb_pos, 8);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * @param number index\n * @param org.apache.arrow.flatbuf.Block= obj\n * @returns org.apache.arrow.flatbuf.Block\n */\n recordBatches(index, obj) {\n let offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? (obj || new org.apache.arrow.flatbuf.Block).__init(this.bb.__vector(this.bb_pos + offset) + index * 24, this.bb) : null;\n }\n /**\n * @returns number\n */\n recordBatchesLength() {\n let offset = this.bb.__offset(this.bb_pos, 10);\n return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;\n }\n /**\n * @param flatbuffers.Builder builder\n */\n static startFooter(builder) {\n builder.startObject(4);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param org.apache.arrow.flatbuf.MetadataVersion version\n */\n static addVersion(builder, version) {\n builder.addFieldInt16(0, version, NS7624605610262437867.org.apache.arrow.flatbuf.MetadataVersion.V1);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset schemaOffset\n */\n static addSchema(builder, schemaOffset) {\n builder.addFieldOffset(1, schemaOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset dictionariesOffset\n */\n static addDictionaries(builder, dictionariesOffset) {\n builder.addFieldOffset(2, dictionariesOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param number numElems\n */\n static startDictionariesVector(builder, numElems) {\n builder.startVector(24, numElems, 8);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset recordBatchesOffset\n */\n static addRecordBatches(builder, recordBatchesOffset) {\n builder.addFieldOffset(3, recordBatchesOffset, 0);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param number numElems\n */\n static startRecordBatchesVector(builder, numElems) {\n builder.startVector(24, numElems, 8);\n }\n /**\n * @param flatbuffers.Builder builder\n * @returns flatbuffers.Offset\n */\n static endFooter(builder) {\n let offset = builder.endObject();\n return offset;\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Offset offset\n */\n static finishFooterBuffer(builder, offset) {\n builder.finish(offset);\n }\n static createFooter(builder, version, schemaOffset, dictionariesOffset, recordBatchesOffset) {\n Footer.startFooter(builder);\n Footer.addVersion(builder, version);\n Footer.addSchema(builder, schemaOffset);\n Footer.addDictionaries(builder, dictionariesOffset);\n Footer.addRecordBatches(builder, recordBatchesOffset);\n return Footer.endFooter(builder);\n }\n }\n flatbuf.Footer = Footer;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n/**\n * @constructor\n */\n(function (org) {\n var apache;\n (function (apache) {\n var arrow;\n (function (arrow) {\n var flatbuf;\n (function (flatbuf) {\n class Block {\n constructor() {\n this.bb = null;\n this.bb_pos = 0;\n }\n /**\n * @param number i\n * @param flatbuffers.ByteBuffer bb\n * @returns Block\n */\n __init(i, bb) {\n this.bb_pos = i;\n this.bb = bb;\n return this;\n }\n /**\n * Index to the start of the RecordBlock (note this is past the Message header)\n *\n * @returns flatbuffers.Long\n */\n offset() {\n return this.bb.readInt64(this.bb_pos);\n }\n /**\n * Length of the metadata\n *\n * @returns number\n */\n metaDataLength() {\n return this.bb.readInt32(this.bb_pos + 8);\n }\n /**\n * Length of the data (this is aligned so there can be a gap between this and\n * the metatdata).\n *\n * @returns flatbuffers.Long\n */\n bodyLength() {\n return this.bb.readInt64(this.bb_pos + 16);\n }\n /**\n * @param flatbuffers.Builder builder\n * @param flatbuffers.Long offset\n * @param number metaDataLength\n * @param flatbuffers.Long bodyLength\n * @returns flatbuffers.Offset\n */\n static createBlock(builder, offset, metaDataLength, bodyLength) {\n builder.prep(8, 24);\n builder.writeInt64(bodyLength);\n builder.pad(4);\n builder.writeInt32(metaDataLength);\n builder.writeInt64(offset);\n return builder.offset();\n }\n }\n flatbuf.Block = Block;\n })(flatbuf = arrow.flatbuf || (arrow.flatbuf = {}));\n })(arrow = apache.arrow || (apache.arrow = {}));\n })(apache = org.apache || (org.apache = {}));\n})(org || (org = {}));\n\n//# sourceMappingURL=File.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n/** @ignore */\nexport { Builder } from '../builder';\nexport { BoolBuilder } from './bool';\nexport { NullBuilder } from './null';\nexport { DateBuilder, DateDayBuilder, DateMillisecondBuilder } from './date';\nexport { DecimalBuilder } from './decimal';\nexport { DictionaryBuilder } from './dictionary';\nexport { FixedSizeBinaryBuilder } from './fixedsizebinary';\nexport { FloatBuilder, Float16Builder, Float32Builder, Float64Builder } from './float';\nexport { IntBuilder, Int8Builder, Int16Builder, Int32Builder, Int64Builder, Uint8Builder, Uint16Builder, Uint32Builder, Uint64Builder } from './int';\nexport { TimeBuilder, TimeSecondBuilder, TimeMillisecondBuilder, TimeMicrosecondBuilder, TimeNanosecondBuilder } from './time';\nexport { TimestampBuilder, TimestampSecondBuilder, TimestampMillisecondBuilder, TimestampMicrosecondBuilder, TimestampNanosecondBuilder } from './timestamp';\nexport { IntervalBuilder, IntervalDayTimeBuilder, IntervalYearMonthBuilder } from './interval';\nexport { Utf8Builder } from './utf8';\nexport { BinaryBuilder } from './binary';\nexport { ListBuilder } from './list';\nexport { FixedSizeListBuilder } from './fixedsizelist';\nexport { MapBuilder } from './map';\nexport { StructBuilder } from './struct';\nexport { UnionBuilder, SparseUnionBuilder, DenseUnionBuilder } from './union';\nimport { Type } from '../enum';\nimport { Utf8Builder } from './utf8';\nimport { Builder } from '../builder';\nimport { instance as setVisitor } from '../visitor/set';\nimport { instance as getBuilderConstructor } from '../visitor/builderctor';\n/** @nocollapse */\nBuilder.new = newBuilder;\nfunction newBuilder(options) {\n const type = options.type;\n const builder = new (getBuilderConstructor.getVisitFn(type)())(options);\n if (type.children && type.children.length > 0) {\n const children = options['children'] || [];\n const defaultOptions = { 'nullValues': options['nullValues'] };\n const getChildOptions = Array.isArray(children)\n ? ((_, i) => children[i] || defaultOptions)\n : (({ name }) => children[name] || defaultOptions);\n type.children.forEach((field, index) => {\n const { type } = field;\n const opts = getChildOptions(field, index);\n builder.children.push(newBuilder({ ...opts, type }));\n });\n }\n return builder;\n}\nObject.keys(Type)\n .map((T) => Type[T])\n .filter((T) => typeof T === 'number' && T !== Type.NONE)\n .forEach((typeId) => {\n const BuilderCtor = getBuilderConstructor.visit(typeId);\n BuilderCtor.prototype._setValue = setVisitor.getVisitFn(typeId);\n});\nUtf8Builder.prototype._setValue = setVisitor.visitBinary;\n\n//# sourceMappingURL=index.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n/* tslint:disable:class-name */\nimport * as File_ from '../../fb/File';\nimport { flatbuffers } from 'flatbuffers';\nvar Long = flatbuffers.Long;\nvar Builder = flatbuffers.Builder;\nvar ByteBuffer = flatbuffers.ByteBuffer;\nvar _Block = File_.org.apache.arrow.flatbuf.Block;\nvar _Footer = File_.org.apache.arrow.flatbuf.Footer;\nimport { Schema } from '../../schema';\nimport { MetadataVersion } from '../../enum';\nimport { toUint8Array } from '../../util/buffer';\n/** @ignore */\nclass Footer_ {\n constructor(schema, version = MetadataVersion.V4, recordBatches, dictionaryBatches) {\n this.schema = schema;\n this.version = version;\n recordBatches && (this._recordBatches = recordBatches);\n dictionaryBatches && (this._dictionaryBatches = dictionaryBatches);\n }\n /** @nocollapse */\n static decode(buf) {\n buf = new ByteBuffer(toUint8Array(buf));\n const footer = _Footer.getRootAsFooter(buf);\n const schema = Schema.decode(footer.schema());\n return new OffHeapFooter(schema, footer);\n }\n /** @nocollapse */\n static encode(footer) {\n const b = new Builder();\n const schemaOffset = Schema.encode(b, footer.schema);\n _Footer.startRecordBatchesVector(b, footer.numRecordBatches);\n [...footer.recordBatches()].slice().reverse().forEach((rb) => FileBlock.encode(b, rb));\n const recordBatchesOffset = b.endVector();\n _Footer.startDictionariesVector(b, footer.numDictionaries);\n [...footer.dictionaryBatches()].slice().reverse().forEach((db) => FileBlock.encode(b, db));\n const dictionaryBatchesOffset = b.endVector();\n _Footer.startFooter(b);\n _Footer.addSchema(b, schemaOffset);\n _Footer.addVersion(b, MetadataVersion.V4);\n _Footer.addRecordBatches(b, recordBatchesOffset);\n _Footer.addDictionaries(b, dictionaryBatchesOffset);\n _Footer.finishFooterBuffer(b, _Footer.endFooter(b));\n return b.asUint8Array();\n }\n get numRecordBatches() { return this._recordBatches.length; }\n get numDictionaries() { return this._dictionaryBatches.length; }\n *recordBatches() {\n for (let block, i = -1, n = this.numRecordBatches; ++i < n;) {\n if (block = this.getRecordBatch(i)) {\n yield block;\n }\n }\n }\n *dictionaryBatches() {\n for (let block, i = -1, n = this.numDictionaries; ++i < n;) {\n if (block = this.getDictionaryBatch(i)) {\n yield block;\n }\n }\n }\n getRecordBatch(index) {\n return index >= 0\n && index < this.numRecordBatches\n && this._recordBatches[index] || null;\n }\n getDictionaryBatch(index) {\n return index >= 0\n && index < this.numDictionaries\n && this._dictionaryBatches[index] || null;\n }\n}\nexport { Footer_ as Footer };\n/** @ignore */\nclass OffHeapFooter extends Footer_ {\n constructor(schema, _footer) {\n super(schema, _footer.version());\n this._footer = _footer;\n }\n get numRecordBatches() { return this._footer.recordBatchesLength(); }\n get numDictionaries() { return this._footer.dictionariesLength(); }\n getRecordBatch(index) {\n if (index >= 0 && index < this.numRecordBatches) {\n const fileBlock = this._footer.recordBatches(index);\n if (fileBlock) {\n return FileBlock.decode(fileBlock);\n }\n }\n return null;\n }\n getDictionaryBatch(index) {\n if (index >= 0 && index < this.numDictionaries) {\n const fileBlock = this._footer.dictionaries(index);\n if (fileBlock) {\n return FileBlock.decode(fileBlock);\n }\n }\n return null;\n }\n}\n/** @ignore */\nexport class FileBlock {\n /** @nocollapse */\n static decode(block) {\n return new FileBlock(block.metaDataLength(), block.bodyLength(), block.offset());\n }\n /** @nocollapse */\n static encode(b, fileBlock) {\n const { metaDataLength } = fileBlock;\n const offset = new Long(fileBlock.offset, 0);\n const bodyLength = new Long(fileBlock.bodyLength, 0);\n return _Block.createBlock(b, offset, metaDataLength, bodyLength);\n }\n constructor(metaDataLength, bodyLength, offset) {\n this.metaDataLength = metaDataLength;\n this.offset = typeof offset === 'number' ? offset : offset.low;\n this.bodyLength = typeof bodyLength === 'number' ? bodyLength : bodyLength.low;\n }\n}\n\n//# sourceMappingURL=file.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport streamAdapters from './adapters';\nimport { decodeUtf8 } from '../util/utf8';\nimport { ITERATOR_DONE, AsyncQueue } from './interfaces';\nimport { toUint8Array, joinUint8Arrays } from '../util/buffer';\nimport { isPromise, isFetchResponse, isIterable, isAsyncIterable, isReadableDOMStream, isReadableNodeStream } from '../util/compat';\n/** @ignore */\nexport class AsyncByteQueue extends AsyncQueue {\n write(value) {\n if ((value = toUint8Array(value)).byteLength > 0) {\n return super.write(value);\n }\n }\n toString(sync = false) {\n return sync\n ? decodeUtf8(this.toUint8Array(true))\n : this.toUint8Array(false).then(decodeUtf8);\n }\n toUint8Array(sync = false) {\n return sync ? joinUint8Arrays(this._values)[0] : (async () => {\n let buffers = [], byteLength = 0;\n for await (const chunk of this) {\n buffers.push(chunk);\n byteLength += chunk.byteLength;\n }\n return joinUint8Arrays(buffers, byteLength)[0];\n })();\n }\n}\n/** @ignore */\nexport class ByteStream {\n constructor(source) {\n if (source) {\n this.source = new ByteStreamSource(streamAdapters.fromIterable(source));\n }\n }\n [Symbol.iterator]() { return this; }\n next(value) { return this.source.next(value); }\n throw(value) { return this.source.throw(value); }\n return(value) { return this.source.return(value); }\n peek(size) { return this.source.peek(size); }\n read(size) { return this.source.read(size); }\n}\n/** @ignore */\nexport class AsyncByteStream {\n constructor(source) {\n if (source instanceof AsyncByteStream) {\n this.source = source.source;\n }\n else if (source instanceof AsyncByteQueue) {\n this.source = new AsyncByteStreamSource(streamAdapters.fromAsyncIterable(source));\n }\n else if (isReadableNodeStream(source)) {\n this.source = new AsyncByteStreamSource(streamAdapters.fromNodeStream(source));\n }\n else if (isReadableDOMStream(source)) {\n this.source = new AsyncByteStreamSource(streamAdapters.fromDOMStream(source));\n }\n else if (isFetchResponse(source)) {\n this.source = new AsyncByteStreamSource(streamAdapters.fromDOMStream(source.body));\n }\n else if (isIterable(source)) {\n this.source = new AsyncByteStreamSource(streamAdapters.fromIterable(source));\n }\n else if (isPromise(source)) {\n this.source = new AsyncByteStreamSource(streamAdapters.fromAsyncIterable(source));\n }\n else if (isAsyncIterable(source)) {\n this.source = new AsyncByteStreamSource(streamAdapters.fromAsyncIterable(source));\n }\n }\n [Symbol.asyncIterator]() { return this; }\n next(value) { return this.source.next(value); }\n throw(value) { return this.source.throw(value); }\n return(value) { return this.source.return(value); }\n get closed() { return this.source.closed; }\n cancel(reason) { return this.source.cancel(reason); }\n peek(size) { return this.source.peek(size); }\n read(size) { return this.source.read(size); }\n}\n/** @ignore */\nclass ByteStreamSource {\n constructor(source) {\n this.source = source;\n }\n cancel(reason) { this.return(reason); }\n peek(size) { return this.next(size, 'peek').value; }\n read(size) { return this.next(size, 'read').value; }\n next(size, cmd = 'read') { return this.source.next({ cmd, size }); }\n throw(value) { return Object.create((this.source.throw && this.source.throw(value)) || ITERATOR_DONE); }\n return(value) { return Object.create((this.source.return && this.source.return(value)) || ITERATOR_DONE); }\n}\n/** @ignore */\nclass AsyncByteStreamSource {\n constructor(source) {\n this.source = source;\n this._closedPromise = new Promise((r) => this._closedPromiseResolve = r);\n }\n async cancel(reason) { await this.return(reason); }\n get closed() { return this._closedPromise; }\n async read(size) { return (await this.next(size, 'read')).value; }\n async peek(size) { return (await this.next(size, 'peek')).value; }\n async next(size, cmd = 'read') { return (await this.source.next({ cmd, size })); }\n async throw(value) {\n const result = (this.source.throw && await this.source.throw(value)) || ITERATOR_DONE;\n this._closedPromiseResolve && this._closedPromiseResolve();\n this._closedPromiseResolve = undefined;\n return Object.create(result);\n }\n async return(value) {\n const result = (this.source.return && await this.source.return(value)) || ITERATOR_DONE;\n this._closedPromiseResolve && this._closedPromiseResolve();\n this._closedPromiseResolve = undefined;\n return Object.create(result);\n }\n}\n\n//# sourceMappingURL=stream.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { ByteStream, AsyncByteStream } from './stream';\nimport { toUint8Array } from '../util/buffer';\n/** @ignore */\nexport class RandomAccessFile extends ByteStream {\n constructor(buffer, byteLength) {\n super();\n this.position = 0;\n this.buffer = toUint8Array(buffer);\n this.size = typeof byteLength === 'undefined' ? this.buffer.byteLength : byteLength;\n }\n readInt32(position) {\n const { buffer, byteOffset } = this.readAt(position, 4);\n return new DataView(buffer, byteOffset).getInt32(0, true);\n }\n seek(position) {\n this.position = Math.min(position, this.size);\n return position < this.size;\n }\n read(nBytes) {\n const { buffer, size, position } = this;\n if (buffer && position < size) {\n if (typeof nBytes !== 'number') {\n nBytes = Infinity;\n }\n this.position = Math.min(size, position + Math.min(size - position, nBytes));\n return buffer.subarray(position, this.position);\n }\n return null;\n }\n readAt(position, nBytes) {\n const buf = this.buffer;\n const end = Math.min(this.size, position + nBytes);\n return buf ? buf.subarray(position, end) : new Uint8Array(nBytes);\n }\n close() { this.buffer && (this.buffer = null); }\n throw(value) { this.close(); return { done: true, value }; }\n return(value) { this.close(); return { done: true, value }; }\n}\n/** @ignore */\nexport class AsyncRandomAccessFile extends AsyncByteStream {\n constructor(file, byteLength) {\n super();\n this.position = 0;\n this._handle = file;\n if (typeof byteLength === 'number') {\n this.size = byteLength;\n }\n else {\n this._pending = (async () => {\n this.size = (await file.stat()).size;\n delete this._pending;\n })();\n }\n }\n async readInt32(position) {\n const { buffer, byteOffset } = await this.readAt(position, 4);\n return new DataView(buffer, byteOffset).getInt32(0, true);\n }\n async seek(position) {\n this._pending && await this._pending;\n this.position = Math.min(position, this.size);\n return position < this.size;\n }\n async read(nBytes) {\n this._pending && await this._pending;\n const { _handle: file, size, position } = this;\n if (file && position < size) {\n if (typeof nBytes !== 'number') {\n nBytes = Infinity;\n }\n let pos = position, offset = 0, bytesRead = 0;\n let end = Math.min(size, pos + Math.min(size - pos, nBytes));\n let buffer = new Uint8Array(Math.max(0, (this.position = end) - pos));\n while ((pos += bytesRead) < end && (offset += bytesRead) < buffer.byteLength) {\n ({ bytesRead } = await file.read(buffer, offset, buffer.byteLength - offset, pos));\n }\n return buffer;\n }\n return null;\n }\n async readAt(position, nBytes) {\n this._pending && await this._pending;\n const { _handle: file, size } = this;\n if (file && (position + nBytes) < size) {\n const end = Math.min(size, position + nBytes);\n const buffer = new Uint8Array(end - position);\n return (await file.read(buffer, 0, nBytes, position)).buffer;\n }\n return new Uint8Array(nBytes);\n }\n async close() { const f = this._handle; this._handle = null; f && await f.close(); }\n async throw(value) { await this.close(); return { done: true, value }; }\n async return(value) { await this.close(); return { done: true, value }; }\n}\n\n//# sourceMappingURL=file.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n/** @ignore */\nconst carryBit16 = 1 << 16;\n/** @ignore */\nfunction intAsHex(value) {\n if (value < 0) {\n value = 0xFFFFFFFF + value + 1;\n }\n return `0x${value.toString(16)}`;\n}\n/** @ignore */\nconst kInt32DecimalDigits = 8;\n/** @ignore */\nconst kPowersOfTen = [1,\n 10,\n 100,\n 1000,\n 10000,\n 100000,\n 1000000,\n 10000000,\n 100000000];\n/** @ignore */\nexport class BaseInt64 {\n constructor(buffer) {\n this.buffer = buffer;\n }\n high() { return this.buffer[1]; }\n low() { return this.buffer[0]; }\n _times(other) {\n // Break the left and right numbers into 16 bit chunks\n // so that we can multiply them without overflow.\n const L = new Uint32Array([\n this.buffer[1] >>> 16,\n this.buffer[1] & 0xFFFF,\n this.buffer[0] >>> 16,\n this.buffer[0] & 0xFFFF\n ]);\n const R = new Uint32Array([\n other.buffer[1] >>> 16,\n other.buffer[1] & 0xFFFF,\n other.buffer[0] >>> 16,\n other.buffer[0] & 0xFFFF\n ]);\n let product = L[3] * R[3];\n this.buffer[0] = product & 0xFFFF;\n let sum = product >>> 16;\n product = L[2] * R[3];\n sum += product;\n product = (L[3] * R[2]) >>> 0;\n sum += product;\n this.buffer[0] += sum << 16;\n this.buffer[1] = (sum >>> 0 < product ? carryBit16 : 0);\n this.buffer[1] += sum >>> 16;\n this.buffer[1] += L[1] * R[3] + L[2] * R[2] + L[3] * R[1];\n this.buffer[1] += (L[0] * R[3] + L[1] * R[2] + L[2] * R[1] + L[3] * R[0]) << 16;\n return this;\n }\n _plus(other) {\n const sum = (this.buffer[0] + other.buffer[0]) >>> 0;\n this.buffer[1] += other.buffer[1];\n if (sum < (this.buffer[0] >>> 0)) {\n ++this.buffer[1];\n }\n this.buffer[0] = sum;\n }\n lessThan(other) {\n return this.buffer[1] < other.buffer[1] ||\n (this.buffer[1] === other.buffer[1] && this.buffer[0] < other.buffer[0]);\n }\n equals(other) {\n return this.buffer[1] === other.buffer[1] && this.buffer[0] == other.buffer[0];\n }\n greaterThan(other) {\n return other.lessThan(this);\n }\n hex() {\n return `${intAsHex(this.buffer[1])} ${intAsHex(this.buffer[0])}`;\n }\n}\n/** @ignore */\nexport class Uint64 extends BaseInt64 {\n times(other) {\n this._times(other);\n return this;\n }\n plus(other) {\n this._plus(other);\n return this;\n }\n /** @nocollapse */\n static from(val, out_buffer = new Uint32Array(2)) {\n return Uint64.fromString(typeof (val) === 'string' ? val : val.toString(), out_buffer);\n }\n /** @nocollapse */\n static fromNumber(num, out_buffer = new Uint32Array(2)) {\n // Always parse numbers as strings - pulling out high and low bits\n // directly seems to lose precision sometimes\n // For example:\n // > -4613034156400212000 >>> 0\n // 721782784\n // The correct lower 32-bits are 721782752\n return Uint64.fromString(num.toString(), out_buffer);\n }\n /** @nocollapse */\n static fromString(str, out_buffer = new Uint32Array(2)) {\n const length = str.length;\n let out = new Uint64(out_buffer);\n for (let posn = 0; posn < length;) {\n const group = kInt32DecimalDigits < length - posn ?\n kInt32DecimalDigits : length - posn;\n const chunk = new Uint64(new Uint32Array([parseInt(str.substr(posn, group), 10), 0]));\n const multiple = new Uint64(new Uint32Array([kPowersOfTen[group], 0]));\n out.times(multiple);\n out.plus(chunk);\n posn += group;\n }\n return out;\n }\n /** @nocollapse */\n static convertArray(values) {\n const data = new Uint32Array(values.length * 2);\n for (let i = -1, n = values.length; ++i < n;) {\n Uint64.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 2 * i * 4, 2));\n }\n return data;\n }\n /** @nocollapse */\n static multiply(left, right) {\n let rtrn = new Uint64(new Uint32Array(left.buffer));\n return rtrn.times(right);\n }\n /** @nocollapse */\n static add(left, right) {\n let rtrn = new Uint64(new Uint32Array(left.buffer));\n return rtrn.plus(right);\n }\n}\n/** @ignore */\nexport class Int64 extends BaseInt64 {\n negate() {\n this.buffer[0] = ~this.buffer[0] + 1;\n this.buffer[1] = ~this.buffer[1];\n if (this.buffer[0] == 0) {\n ++this.buffer[1];\n }\n return this;\n }\n times(other) {\n this._times(other);\n return this;\n }\n plus(other) {\n this._plus(other);\n return this;\n }\n lessThan(other) {\n // force high bytes to be signed\n const this_high = this.buffer[1] << 0;\n const other_high = other.buffer[1] << 0;\n return this_high < other_high ||\n (this_high === other_high && this.buffer[0] < other.buffer[0]);\n }\n /** @nocollapse */\n static from(val, out_buffer = new Uint32Array(2)) {\n return Int64.fromString(typeof (val) === 'string' ? val : val.toString(), out_buffer);\n }\n /** @nocollapse */\n static fromNumber(num, out_buffer = new Uint32Array(2)) {\n // Always parse numbers as strings - pulling out high and low bits\n // directly seems to lose precision sometimes\n // For example:\n // > -4613034156400212000 >>> 0\n // 721782784\n // The correct lower 32-bits are 721782752\n return Int64.fromString(num.toString(), out_buffer);\n }\n /** @nocollapse */\n static fromString(str, out_buffer = new Uint32Array(2)) {\n // TODO: Assert that out_buffer is 0 and length = 2\n const negate = str.startsWith('-');\n const length = str.length;\n let out = new Int64(out_buffer);\n for (let posn = negate ? 1 : 0; posn < length;) {\n const group = kInt32DecimalDigits < length - posn ?\n kInt32DecimalDigits : length - posn;\n const chunk = new Int64(new Uint32Array([parseInt(str.substr(posn, group), 10), 0]));\n const multiple = new Int64(new Uint32Array([kPowersOfTen[group], 0]));\n out.times(multiple);\n out.plus(chunk);\n posn += group;\n }\n return negate ? out.negate() : out;\n }\n /** @nocollapse */\n static convertArray(values) {\n const data = new Uint32Array(values.length * 2);\n for (let i = -1, n = values.length; ++i < n;) {\n Int64.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 2 * i * 4, 2));\n }\n return data;\n }\n /** @nocollapse */\n static multiply(left, right) {\n let rtrn = new Int64(new Uint32Array(left.buffer));\n return rtrn.times(right);\n }\n /** @nocollapse */\n static add(left, right) {\n let rtrn = new Int64(new Uint32Array(left.buffer));\n return rtrn.plus(right);\n }\n}\n/** @ignore */\nexport class Int128 {\n constructor(buffer) {\n this.buffer = buffer;\n // buffer[3] MSB (high)\n // buffer[2]\n // buffer[1]\n // buffer[0] LSB (low)\n }\n high() {\n return new Int64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset + 8, 2));\n }\n low() {\n return new Int64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset, 2));\n }\n negate() {\n this.buffer[0] = ~this.buffer[0] + 1;\n this.buffer[1] = ~this.buffer[1];\n this.buffer[2] = ~this.buffer[2];\n this.buffer[3] = ~this.buffer[3];\n if (this.buffer[0] == 0) {\n ++this.buffer[1];\n }\n if (this.buffer[1] == 0) {\n ++this.buffer[2];\n }\n if (this.buffer[2] == 0) {\n ++this.buffer[3];\n }\n return this;\n }\n times(other) {\n // Break the left and right numbers into 32 bit chunks\n // so that we can multiply them without overflow.\n const L0 = new Uint64(new Uint32Array([this.buffer[3], 0]));\n const L1 = new Uint64(new Uint32Array([this.buffer[2], 0]));\n const L2 = new Uint64(new Uint32Array([this.buffer[1], 0]));\n const L3 = new Uint64(new Uint32Array([this.buffer[0], 0]));\n const R0 = new Uint64(new Uint32Array([other.buffer[3], 0]));\n const R1 = new Uint64(new Uint32Array([other.buffer[2], 0]));\n const R2 = new Uint64(new Uint32Array([other.buffer[1], 0]));\n const R3 = new Uint64(new Uint32Array([other.buffer[0], 0]));\n let product = Uint64.multiply(L3, R3);\n this.buffer[0] = product.low();\n let sum = new Uint64(new Uint32Array([product.high(), 0]));\n product = Uint64.multiply(L2, R3);\n sum.plus(product);\n product = Uint64.multiply(L3, R2);\n sum.plus(product);\n this.buffer[1] = sum.low();\n this.buffer[3] = (sum.lessThan(product) ? 1 : 0);\n this.buffer[2] = sum.high();\n let high = new Uint64(new Uint32Array(this.buffer.buffer, this.buffer.byteOffset + 8, 2));\n high.plus(Uint64.multiply(L1, R3))\n .plus(Uint64.multiply(L2, R2))\n .plus(Uint64.multiply(L3, R1));\n this.buffer[3] += Uint64.multiply(L0, R3)\n .plus(Uint64.multiply(L1, R2))\n .plus(Uint64.multiply(L2, R1))\n .plus(Uint64.multiply(L3, R0)).low();\n return this;\n }\n plus(other) {\n let sums = new Uint32Array(4);\n sums[3] = (this.buffer[3] + other.buffer[3]) >>> 0;\n sums[2] = (this.buffer[2] + other.buffer[2]) >>> 0;\n sums[1] = (this.buffer[1] + other.buffer[1]) >>> 0;\n sums[0] = (this.buffer[0] + other.buffer[0]) >>> 0;\n if (sums[0] < (this.buffer[0] >>> 0)) {\n ++sums[1];\n }\n if (sums[1] < (this.buffer[1] >>> 0)) {\n ++sums[2];\n }\n if (sums[2] < (this.buffer[2] >>> 0)) {\n ++sums[3];\n }\n this.buffer[3] = sums[3];\n this.buffer[2] = sums[2];\n this.buffer[1] = sums[1];\n this.buffer[0] = sums[0];\n return this;\n }\n hex() {\n return `${intAsHex(this.buffer[3])} ${intAsHex(this.buffer[2])} ${intAsHex(this.buffer[1])} ${intAsHex(this.buffer[0])}`;\n }\n /** @nocollapse */\n static multiply(left, right) {\n let rtrn = new Int128(new Uint32Array(left.buffer));\n return rtrn.times(right);\n }\n /** @nocollapse */\n static add(left, right) {\n let rtrn = new Int128(new Uint32Array(left.buffer));\n return rtrn.plus(right);\n }\n /** @nocollapse */\n static from(val, out_buffer = new Uint32Array(4)) {\n return Int128.fromString(typeof (val) === 'string' ? val : val.toString(), out_buffer);\n }\n /** @nocollapse */\n static fromNumber(num, out_buffer = new Uint32Array(4)) {\n // Always parse numbers as strings - pulling out high and low bits\n // directly seems to lose precision sometimes\n // For example:\n // > -4613034156400212000 >>> 0\n // 721782784\n // The correct lower 32-bits are 721782752\n return Int128.fromString(num.toString(), out_buffer);\n }\n /** @nocollapse */\n static fromString(str, out_buffer = new Uint32Array(4)) {\n // TODO: Assert that out_buffer is 0 and length = 4\n const negate = str.startsWith('-');\n const length = str.length;\n let out = new Int128(out_buffer);\n for (let posn = negate ? 1 : 0; posn < length;) {\n const group = kInt32DecimalDigits < length - posn ?\n kInt32DecimalDigits : length - posn;\n const chunk = new Int128(new Uint32Array([parseInt(str.substr(posn, group), 10), 0, 0, 0]));\n const multiple = new Int128(new Uint32Array([kPowersOfTen[group], 0, 0, 0]));\n out.times(multiple);\n out.plus(chunk);\n posn += group;\n }\n return negate ? out.negate() : out;\n }\n /** @nocollapse */\n static convertArray(values) {\n // TODO: Distinguish between string and number at compile-time\n const data = new Uint32Array(values.length * 4);\n for (let i = -1, n = values.length; ++i < n;) {\n Int128.from(values[i], new Uint32Array(data.buffer, data.byteOffset + 4 * 4 * i, 4));\n }\n return data;\n }\n}\n\n//# sourceMappingURL=int.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Data } from '../data';\nimport { Field } from '../schema';\nimport { DataType } from '../type';\nimport { Visitor } from '../visitor';\nimport { packBools } from '../util/bit';\nimport { encodeUtf8 } from '../util/utf8';\nimport { Int64, Int128 } from '../util/int';\nimport { UnionMode, DateUnit } from '../enum';\nimport { toArrayBufferView } from '../util/buffer';\n/** @ignore */\nexport class VectorLoader extends Visitor {\n constructor(bytes, nodes, buffers, dictionaries) {\n super();\n this.nodesIndex = -1;\n this.buffersIndex = -1;\n this.bytes = bytes;\n this.nodes = nodes;\n this.buffers = buffers;\n this.dictionaries = dictionaries;\n }\n visit(node) {\n return super.visit(node instanceof Field ? node.type : node);\n }\n visitNull(type, { length, } = this.nextFieldNode()) { return Data.Null(type, 0, length); }\n visitBool(type, { length, nullCount } = this.nextFieldNode()) { return Data.Bool(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n visitInt(type, { length, nullCount } = this.nextFieldNode()) { return Data.Int(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n visitFloat(type, { length, nullCount } = this.nextFieldNode()) { return Data.Float(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n visitUtf8(type, { length, nullCount } = this.nextFieldNode()) { return Data.Utf8(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.readData(type)); }\n visitBinary(type, { length, nullCount } = this.nextFieldNode()) { return Data.Binary(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.readData(type)); }\n visitFixedSizeBinary(type, { length, nullCount } = this.nextFieldNode()) { return Data.FixedSizeBinary(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n visitDate(type, { length, nullCount } = this.nextFieldNode()) { return Data.Date(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n visitTimestamp(type, { length, nullCount } = this.nextFieldNode()) { return Data.Timestamp(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n visitTime(type, { length, nullCount } = this.nextFieldNode()) { return Data.Time(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n visitDecimal(type, { length, nullCount } = this.nextFieldNode()) { return Data.Decimal(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n visitList(type, { length, nullCount } = this.nextFieldNode()) { return Data.List(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.visit(type.children[0])); }\n visitStruct(type, { length, nullCount } = this.nextFieldNode()) { return Data.Struct(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.visitMany(type.children)); }\n visitUnion(type) { return type.mode === UnionMode.Sparse ? this.visitSparseUnion(type) : this.visitDenseUnion(type); }\n visitDenseUnion(type, { length, nullCount } = this.nextFieldNode()) { return Data.Union(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readTypeIds(type), this.readOffsets(type), this.visitMany(type.children)); }\n visitSparseUnion(type, { length, nullCount } = this.nextFieldNode()) { return Data.Union(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readTypeIds(type), this.visitMany(type.children)); }\n visitDictionary(type, { length, nullCount } = this.nextFieldNode()) { return Data.Dictionary(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type.indices), this.readDictionary(type)); }\n visitInterval(type, { length, nullCount } = this.nextFieldNode()) { return Data.Interval(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readData(type)); }\n visitFixedSizeList(type, { length, nullCount } = this.nextFieldNode()) { return Data.FixedSizeList(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.visit(type.children[0])); }\n visitMap(type, { length, nullCount } = this.nextFieldNode()) { return Data.Map(type, 0, length, nullCount, this.readNullBitmap(type, nullCount), this.readOffsets(type), this.visit(type.children[0])); }\n nextFieldNode() { return this.nodes[++this.nodesIndex]; }\n nextBufferRange() { return this.buffers[++this.buffersIndex]; }\n readNullBitmap(type, nullCount, buffer = this.nextBufferRange()) {\n return nullCount > 0 && this.readData(type, buffer) || new Uint8Array(0);\n }\n readOffsets(type, buffer) { return this.readData(type, buffer); }\n readTypeIds(type, buffer) { return this.readData(type, buffer); }\n readData(_type, { length, offset } = this.nextBufferRange()) {\n return this.bytes.subarray(offset, offset + length);\n }\n readDictionary(type) {\n return this.dictionaries.get(type.id);\n }\n}\n/** @ignore */\nexport class JSONVectorLoader extends VectorLoader {\n constructor(sources, nodes, buffers, dictionaries) {\n super(new Uint8Array(0), nodes, buffers, dictionaries);\n this.sources = sources;\n }\n readNullBitmap(_type, nullCount, { offset } = this.nextBufferRange()) {\n return nullCount <= 0 ? new Uint8Array(0) : packBools(this.sources[offset]);\n }\n readOffsets(_type, { offset } = this.nextBufferRange()) {\n return toArrayBufferView(Uint8Array, toArrayBufferView(Int32Array, this.sources[offset]));\n }\n readTypeIds(type, { offset } = this.nextBufferRange()) {\n return toArrayBufferView(Uint8Array, toArrayBufferView(type.ArrayType, this.sources[offset]));\n }\n readData(type, { offset } = this.nextBufferRange()) {\n const { sources } = this;\n if (DataType.isTimestamp(type)) {\n return toArrayBufferView(Uint8Array, Int64.convertArray(sources[offset]));\n }\n else if ((DataType.isInt(type) || DataType.isTime(type)) && type.bitWidth === 64) {\n return toArrayBufferView(Uint8Array, Int64.convertArray(sources[offset]));\n }\n else if (DataType.isDate(type) && type.unit === DateUnit.MILLISECOND) {\n return toArrayBufferView(Uint8Array, Int64.convertArray(sources[offset]));\n }\n else if (DataType.isDecimal(type)) {\n return toArrayBufferView(Uint8Array, Int128.convertArray(sources[offset]));\n }\n else if (DataType.isBinary(type) || DataType.isFixedSizeBinary(type)) {\n return binaryDataFromJSON(sources[offset]);\n }\n else if (DataType.isBool(type)) {\n return packBools(sources[offset]);\n }\n else if (DataType.isUtf8(type)) {\n return encodeUtf8(sources[offset].join(''));\n }\n return toArrayBufferView(Uint8Array, toArrayBufferView(type.ArrayType, sources[offset].map((x) => +x)));\n }\n}\n/** @ignore */\nfunction binaryDataFromJSON(values) {\n // \"DATA\": [\"49BC7D5B6C47D2\",\"3F5FB6D9322026\"]\n // There are definitely more efficient ways to do this... but it gets the\n // job done.\n const joined = values.join('');\n const data = new Uint8Array(joined.length / 2);\n for (let i = 0; i < joined.length; i += 2) {\n data[i >> 1] = parseInt(joined.substr(i, 2), 16);\n }\n return data;\n}\n\n//# sourceMappingURL=vectorloader.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { flatbuffers } from 'flatbuffers';\nvar Long = flatbuffers.Long;\nimport * as Schema_ from '../fb/Schema';\nimport { Visitor } from '../visitor';\nvar Null = Schema_.org.apache.arrow.flatbuf.Null;\nvar Int = Schema_.org.apache.arrow.flatbuf.Int;\nvar FloatingPoint = Schema_.org.apache.arrow.flatbuf.FloatingPoint;\nvar Binary = Schema_.org.apache.arrow.flatbuf.Binary;\nvar Bool = Schema_.org.apache.arrow.flatbuf.Bool;\nvar Utf8 = Schema_.org.apache.arrow.flatbuf.Utf8;\nvar Decimal = Schema_.org.apache.arrow.flatbuf.Decimal;\nvar Date = Schema_.org.apache.arrow.flatbuf.Date;\nvar Time = Schema_.org.apache.arrow.flatbuf.Time;\nvar Timestamp = Schema_.org.apache.arrow.flatbuf.Timestamp;\nvar Interval = Schema_.org.apache.arrow.flatbuf.Interval;\nvar List = Schema_.org.apache.arrow.flatbuf.List;\nvar Struct = Schema_.org.apache.arrow.flatbuf.Struct_;\nvar Union = Schema_.org.apache.arrow.flatbuf.Union;\nvar DictionaryEncoding = Schema_.org.apache.arrow.flatbuf.DictionaryEncoding;\nvar FixedSizeBinary = Schema_.org.apache.arrow.flatbuf.FixedSizeBinary;\nvar FixedSizeList = Schema_.org.apache.arrow.flatbuf.FixedSizeList;\nvar Map_ = Schema_.org.apache.arrow.flatbuf.Map;\n/** @ignore */\nexport class TypeAssembler extends Visitor {\n visit(node, builder) {\n return (node == null || builder == null) ? undefined : super.visit(node, builder);\n }\n visitNull(_node, b) {\n Null.startNull(b);\n return Null.endNull(b);\n }\n visitInt(node, b) {\n Int.startInt(b);\n Int.addBitWidth(b, node.bitWidth);\n Int.addIsSigned(b, node.isSigned);\n return Int.endInt(b);\n }\n visitFloat(node, b) {\n FloatingPoint.startFloatingPoint(b);\n FloatingPoint.addPrecision(b, node.precision);\n return FloatingPoint.endFloatingPoint(b);\n }\n visitBinary(_node, b) {\n Binary.startBinary(b);\n return Binary.endBinary(b);\n }\n visitBool(_node, b) {\n Bool.startBool(b);\n return Bool.endBool(b);\n }\n visitUtf8(_node, b) {\n Utf8.startUtf8(b);\n return Utf8.endUtf8(b);\n }\n visitDecimal(node, b) {\n Decimal.startDecimal(b);\n Decimal.addScale(b, node.scale);\n Decimal.addPrecision(b, node.precision);\n return Decimal.endDecimal(b);\n }\n visitDate(node, b) {\n Date.startDate(b);\n Date.addUnit(b, node.unit);\n return Date.endDate(b);\n }\n visitTime(node, b) {\n Time.startTime(b);\n Time.addUnit(b, node.unit);\n Time.addBitWidth(b, node.bitWidth);\n return Time.endTime(b);\n }\n visitTimestamp(node, b) {\n const timezone = (node.timezone && b.createString(node.timezone)) || undefined;\n Timestamp.startTimestamp(b);\n Timestamp.addUnit(b, node.unit);\n if (timezone !== undefined) {\n Timestamp.addTimezone(b, timezone);\n }\n return Timestamp.endTimestamp(b);\n }\n visitInterval(node, b) {\n Interval.startInterval(b);\n Interval.addUnit(b, node.unit);\n return Interval.endInterval(b);\n }\n visitList(_node, b) {\n List.startList(b);\n return List.endList(b);\n }\n visitStruct(_node, b) {\n Struct.startStruct_(b);\n return Struct.endStruct_(b);\n }\n visitUnion(node, b) {\n Union.startTypeIdsVector(b, node.typeIds.length);\n const typeIds = Union.createTypeIdsVector(b, node.typeIds);\n Union.startUnion(b);\n Union.addMode(b, node.mode);\n Union.addTypeIds(b, typeIds);\n return Union.endUnion(b);\n }\n visitDictionary(node, b) {\n const indexType = this.visit(node.indices, b);\n DictionaryEncoding.startDictionaryEncoding(b);\n DictionaryEncoding.addId(b, new Long(node.id, 0));\n DictionaryEncoding.addIsOrdered(b, node.isOrdered);\n if (indexType !== undefined) {\n DictionaryEncoding.addIndexType(b, indexType);\n }\n return DictionaryEncoding.endDictionaryEncoding(b);\n }\n visitFixedSizeBinary(node, b) {\n FixedSizeBinary.startFixedSizeBinary(b);\n FixedSizeBinary.addByteWidth(b, node.byteWidth);\n return FixedSizeBinary.endFixedSizeBinary(b);\n }\n visitFixedSizeList(node, b) {\n FixedSizeList.startFixedSizeList(b);\n FixedSizeList.addListSize(b, node.listSize);\n return FixedSizeList.endFixedSizeList(b);\n }\n visitMap(node, b) {\n Map_.startMap(b);\n Map_.addKeysSorted(b, node.keysSorted);\n return Map_.endMap(b);\n }\n}\n/** @ignore */\nexport const instance = new TypeAssembler();\n\n//# sourceMappingURL=typeassembler.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Schema, Field } from '../../schema';\nimport { Dictionary, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct, Union, Bool, Null, Int, Float, Date_, Time, Interval, Timestamp, Int32, } from '../../type';\nimport { DictionaryBatch, RecordBatch, FieldNode, BufferRegion } from './message';\nimport { TimeUnit, Precision, IntervalUnit, UnionMode, DateUnit } from '../../enum';\n/** @ignore */\nexport function schemaFromJSON(_schema, dictionaries = new Map()) {\n return new Schema(schemaFieldsFromJSON(_schema, dictionaries), customMetadataFromJSON(_schema['customMetadata']), dictionaries);\n}\n/** @ignore */\nexport function recordBatchFromJSON(b) {\n return new RecordBatch(b['count'], fieldNodesFromJSON(b['columns']), buffersFromJSON(b['columns']));\n}\n/** @ignore */\nexport function dictionaryBatchFromJSON(b) {\n return new DictionaryBatch(recordBatchFromJSON(b['data']), b['id'], b['isDelta']);\n}\n/** @ignore */\nfunction schemaFieldsFromJSON(_schema, dictionaries) {\n return (_schema['fields'] || []).filter(Boolean).map((f) => Field.fromJSON(f, dictionaries));\n}\n/** @ignore */\nfunction fieldChildrenFromJSON(_field, dictionaries) {\n return (_field['children'] || []).filter(Boolean).map((f) => Field.fromJSON(f, dictionaries));\n}\n/** @ignore */\nfunction fieldNodesFromJSON(xs) {\n return (xs || []).reduce((fieldNodes, column) => [\n ...fieldNodes,\n new FieldNode(column['count'], nullCountFromJSON(column['VALIDITY'])),\n ...fieldNodesFromJSON(column['children'])\n ], []);\n}\n/** @ignore */\nfunction buffersFromJSON(xs, buffers = []) {\n for (let i = -1, n = (xs || []).length; ++i < n;) {\n const column = xs[i];\n column['VALIDITY'] && buffers.push(new BufferRegion(buffers.length, column['VALIDITY'].length));\n column['TYPE'] && buffers.push(new BufferRegion(buffers.length, column['TYPE'].length));\n column['OFFSET'] && buffers.push(new BufferRegion(buffers.length, column['OFFSET'].length));\n column['DATA'] && buffers.push(new BufferRegion(buffers.length, column['DATA'].length));\n buffers = buffersFromJSON(column['children'], buffers);\n }\n return buffers;\n}\n/** @ignore */\nfunction nullCountFromJSON(validity) {\n return (validity || []).reduce((sum, val) => sum + +(val === 0), 0);\n}\n/** @ignore */\nexport function fieldFromJSON(_field, dictionaries) {\n let id;\n let keys;\n let field;\n let dictMeta;\n let type;\n let dictType;\n // If no dictionary encoding\n if (!dictionaries || !(dictMeta = _field['dictionary'])) {\n type = typeFromJSON(_field, fieldChildrenFromJSON(_field, dictionaries));\n field = new Field(_field['name'], type, _field['nullable'], customMetadataFromJSON(_field['customMetadata']));\n }\n // tslint:disable\n // If dictionary encoded and the first time we've seen this dictionary id, decode\n // the data type and child fields, then wrap in a Dictionary type and insert the\n // data type into the dictionary types map.\n else if (!dictionaries.has(id = dictMeta['id'])) {\n // a dictionary index defaults to signed 32 bit int if unspecified\n keys = (keys = dictMeta['indexType']) ? indexTypeFromJSON(keys) : new Int32();\n dictionaries.set(id, type = typeFromJSON(_field, fieldChildrenFromJSON(_field, dictionaries)));\n dictType = new Dictionary(type, keys, id, dictMeta['isOrdered']);\n field = new Field(_field['name'], dictType, _field['nullable'], customMetadataFromJSON(_field['customMetadata']));\n }\n // If dictionary encoded, and have already seen this dictionary Id in the schema, then reuse the\n // data type and wrap in a new Dictionary type and field.\n else {\n // a dictionary index defaults to signed 32 bit int if unspecified\n keys = (keys = dictMeta['indexType']) ? indexTypeFromJSON(keys) : new Int32();\n dictType = new Dictionary(dictionaries.get(id), keys, id, dictMeta['isOrdered']);\n field = new Field(_field['name'], dictType, _field['nullable'], customMetadataFromJSON(_field['customMetadata']));\n }\n return field || null;\n}\n/** @ignore */\nfunction customMetadataFromJSON(_metadata) {\n return new Map(Object.entries(_metadata || {}));\n}\n/** @ignore */\nfunction indexTypeFromJSON(_type) {\n return new Int(_type['isSigned'], _type['bitWidth']);\n}\n/** @ignore */\nfunction typeFromJSON(f, children) {\n const typeId = f['type']['name'];\n switch (typeId) {\n case 'NONE': return new Null();\n case 'null': return new Null();\n case 'binary': return new Binary();\n case 'utf8': return new Utf8();\n case 'bool': return new Bool();\n case 'list': return new List((children || [])[0]);\n case 'struct': return new Struct(children || []);\n case 'struct_': return new Struct(children || []);\n }\n switch (typeId) {\n case 'int': {\n const t = f['type'];\n return new Int(t['isSigned'], t['bitWidth']);\n }\n case 'floatingpoint': {\n const t = f['type'];\n return new Float(Precision[t['precision']]);\n }\n case 'decimal': {\n const t = f['type'];\n return new Decimal(t['scale'], t['precision']);\n }\n case 'date': {\n const t = f['type'];\n return new Date_(DateUnit[t['unit']]);\n }\n case 'time': {\n const t = f['type'];\n return new Time(TimeUnit[t['unit']], t['bitWidth']);\n }\n case 'timestamp': {\n const t = f['type'];\n return new Timestamp(TimeUnit[t['unit']], t['timezone']);\n }\n case 'interval': {\n const t = f['type'];\n return new Interval(IntervalUnit[t['unit']]);\n }\n case 'union': {\n const t = f['type'];\n return new Union(UnionMode[t['mode']], (t['typeIds'] || []), children || []);\n }\n case 'fixedsizebinary': {\n const t = f['type'];\n return new FixedSizeBinary(t['byteWidth']);\n }\n case 'fixedsizelist': {\n const t = f['type'];\n return new FixedSizeList(t['listSize'], (children || [])[0]);\n }\n case 'map': {\n const t = f['type'];\n return new Map_((children || [])[0], t['keysSorted']);\n }\n }\n throw new Error(`Unrecognized type: \"${typeId}\"`);\n}\n\n//# sourceMappingURL=json.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { flatbuffers } from 'flatbuffers';\nimport * as Schema_ from '../../fb/Schema';\nimport * as Message_ from '../../fb/Message';\nimport { Schema, Field } from '../../schema';\nimport { toUint8Array } from '../../util/buffer';\nimport { MessageHeader, MetadataVersion } from '../../enum';\nimport { instance as typeAssembler } from '../../visitor/typeassembler';\nimport { fieldFromJSON, schemaFromJSON, recordBatchFromJSON, dictionaryBatchFromJSON } from './json';\nvar Long = flatbuffers.Long;\nvar Builder = flatbuffers.Builder;\nvar ByteBuffer = flatbuffers.ByteBuffer;\nvar Type = Schema_.org.apache.arrow.flatbuf.Type;\nvar _Field = Schema_.org.apache.arrow.flatbuf.Field;\nvar _Schema = Schema_.org.apache.arrow.flatbuf.Schema;\nvar _Buffer = Schema_.org.apache.arrow.flatbuf.Buffer;\nvar _Message = Message_.org.apache.arrow.flatbuf.Message;\nvar _KeyValue = Schema_.org.apache.arrow.flatbuf.KeyValue;\nvar _FieldNode = Message_.org.apache.arrow.flatbuf.FieldNode;\nvar _Endianness = Schema_.org.apache.arrow.flatbuf.Endianness;\nvar _RecordBatch = Message_.org.apache.arrow.flatbuf.RecordBatch;\nvar _DictionaryBatch = Message_.org.apache.arrow.flatbuf.DictionaryBatch;\nimport { DataType, Dictionary, Utf8, Binary, Decimal, FixedSizeBinary, List, FixedSizeList, Map_, Struct, Union, Bool, Null, Int, Float, Date_, Time, Interval, Timestamp, Int32, } from '../../type';\n/**\n * @ignore\n * @private\n **/\nexport class Message {\n constructor(bodyLength, version, headerType, header) {\n this._version = version;\n this._headerType = headerType;\n this.body = new Uint8Array(0);\n header && (this._createHeader = () => header);\n this._bodyLength = typeof bodyLength === 'number' ? bodyLength : bodyLength.low;\n }\n /** @nocollapse */\n static fromJSON(msg, headerType) {\n const message = new Message(0, MetadataVersion.V4, headerType);\n message._createHeader = messageHeaderFromJSON(msg, headerType);\n return message;\n }\n /** @nocollapse */\n static decode(buf) {\n buf = new ByteBuffer(toUint8Array(buf));\n const _message = _Message.getRootAsMessage(buf);\n const bodyLength = _message.bodyLength();\n const version = _message.version();\n const headerType = _message.headerType();\n const message = new Message(bodyLength, version, headerType);\n message._createHeader = decodeMessageHeader(_message, headerType);\n return message;\n }\n /** @nocollapse */\n static encode(message) {\n let b = new Builder(), headerOffset = -1;\n if (message.isSchema()) {\n headerOffset = Schema.encode(b, message.header());\n }\n else if (message.isRecordBatch()) {\n headerOffset = RecordBatch.encode(b, message.header());\n }\n else if (message.isDictionaryBatch()) {\n headerOffset = DictionaryBatch.encode(b, message.header());\n }\n _Message.startMessage(b);\n _Message.addVersion(b, MetadataVersion.V4);\n _Message.addHeader(b, headerOffset);\n _Message.addHeaderType(b, message.headerType);\n _Message.addBodyLength(b, new Long(message.bodyLength, 0));\n _Message.finishMessageBuffer(b, _Message.endMessage(b));\n return b.asUint8Array();\n }\n /** @nocollapse */\n static from(header, bodyLength = 0) {\n if (header instanceof Schema) {\n return new Message(0, MetadataVersion.V4, MessageHeader.Schema, header);\n }\n if (header instanceof RecordBatch) {\n return new Message(bodyLength, MetadataVersion.V4, MessageHeader.RecordBatch, header);\n }\n if (header instanceof DictionaryBatch) {\n return new Message(bodyLength, MetadataVersion.V4, MessageHeader.DictionaryBatch, header);\n }\n throw new Error(`Unrecognized Message header: ${header}`);\n }\n get type() { return this.headerType; }\n get version() { return this._version; }\n get headerType() { return this._headerType; }\n get bodyLength() { return this._bodyLength; }\n header() { return this._createHeader(); }\n isSchema() { return this.headerType === MessageHeader.Schema; }\n isRecordBatch() { return this.headerType === MessageHeader.RecordBatch; }\n isDictionaryBatch() { return this.headerType === MessageHeader.DictionaryBatch; }\n}\n/**\n * @ignore\n * @private\n **/\nexport class RecordBatch {\n get nodes() { return this._nodes; }\n get length() { return this._length; }\n get buffers() { return this._buffers; }\n constructor(length, nodes, buffers) {\n this._nodes = nodes;\n this._buffers = buffers;\n this._length = typeof length === 'number' ? length : length.low;\n }\n}\n/**\n * @ignore\n * @private\n **/\nexport class DictionaryBatch {\n get id() { return this._id; }\n get data() { return this._data; }\n get isDelta() { return this._isDelta; }\n get length() { return this.data.length; }\n get nodes() { return this.data.nodes; }\n get buffers() { return this.data.buffers; }\n constructor(data, id, isDelta = false) {\n this._data = data;\n this._isDelta = isDelta;\n this._id = typeof id === 'number' ? id : id.low;\n }\n}\n/**\n * @ignore\n * @private\n **/\nexport class BufferRegion {\n constructor(offset, length) {\n this.offset = typeof offset === 'number' ? offset : offset.low;\n this.length = typeof length === 'number' ? length : length.low;\n }\n}\n/**\n * @ignore\n * @private\n **/\nexport class FieldNode {\n constructor(length, nullCount) {\n this.length = typeof length === 'number' ? length : length.low;\n this.nullCount = typeof nullCount === 'number' ? nullCount : nullCount.low;\n }\n}\n/** @ignore */\nfunction messageHeaderFromJSON(message, type) {\n return (() => {\n switch (type) {\n case MessageHeader.Schema: return Schema.fromJSON(message);\n case MessageHeader.RecordBatch: return RecordBatch.fromJSON(message);\n case MessageHeader.DictionaryBatch: return DictionaryBatch.fromJSON(message);\n }\n throw new Error(`Unrecognized Message type: { name: ${MessageHeader[type]}, type: ${type} }`);\n });\n}\n/** @ignore */\nfunction decodeMessageHeader(message, type) {\n return (() => {\n switch (type) {\n case MessageHeader.Schema: return Schema.decode(message.header(new _Schema()));\n case MessageHeader.RecordBatch: return RecordBatch.decode(message.header(new _RecordBatch()), message.version());\n case MessageHeader.DictionaryBatch: return DictionaryBatch.decode(message.header(new _DictionaryBatch()), message.version());\n }\n throw new Error(`Unrecognized Message type: { name: ${MessageHeader[type]}, type: ${type} }`);\n });\n}\nField['encode'] = encodeField;\nField['decode'] = decodeField;\nField['fromJSON'] = fieldFromJSON;\nSchema['encode'] = encodeSchema;\nSchema['decode'] = decodeSchema;\nSchema['fromJSON'] = schemaFromJSON;\nRecordBatch['encode'] = encodeRecordBatch;\nRecordBatch['decode'] = decodeRecordBatch;\nRecordBatch['fromJSON'] = recordBatchFromJSON;\nDictionaryBatch['encode'] = encodeDictionaryBatch;\nDictionaryBatch['decode'] = decodeDictionaryBatch;\nDictionaryBatch['fromJSON'] = dictionaryBatchFromJSON;\nFieldNode['encode'] = encodeFieldNode;\nFieldNode['decode'] = decodeFieldNode;\nBufferRegion['encode'] = encodeBufferRegion;\nBufferRegion['decode'] = decodeBufferRegion;\n/** @ignore */\nfunction decodeSchema(_schema, dictionaries = new Map()) {\n const fields = decodeSchemaFields(_schema, dictionaries);\n return new Schema(fields, decodeCustomMetadata(_schema), dictionaries);\n}\n/** @ignore */\nfunction decodeRecordBatch(batch, version = MetadataVersion.V4) {\n return new RecordBatch(batch.length(), decodeFieldNodes(batch), decodeBuffers(batch, version));\n}\n/** @ignore */\nfunction decodeDictionaryBatch(batch, version = MetadataVersion.V4) {\n return new DictionaryBatch(RecordBatch.decode(batch.data(), version), batch.id(), batch.isDelta());\n}\n/** @ignore */\nfunction decodeBufferRegion(b) {\n return new BufferRegion(b.offset(), b.length());\n}\n/** @ignore */\nfunction decodeFieldNode(f) {\n return new FieldNode(f.length(), f.nullCount());\n}\n/** @ignore */\nfunction decodeFieldNodes(batch) {\n const nodes = [];\n for (let f, i = -1, j = -1, n = batch.nodesLength(); ++i < n;) {\n if (f = batch.nodes(i)) {\n nodes[++j] = FieldNode.decode(f);\n }\n }\n return nodes;\n}\n/** @ignore */\nfunction decodeBuffers(batch, version) {\n const bufferRegions = [];\n for (let b, i = -1, j = -1, n = batch.buffersLength(); ++i < n;) {\n if (b = batch.buffers(i)) {\n // If this Arrow buffer was written before version 4,\n // advance the buffer's bb_pos 8 bytes to skip past\n // the now-removed page_id field\n if (version < MetadataVersion.V4) {\n b.bb_pos += (8 * (i + 1));\n }\n bufferRegions[++j] = BufferRegion.decode(b);\n }\n }\n return bufferRegions;\n}\n/** @ignore */\nfunction decodeSchemaFields(schema, dictionaries) {\n const fields = [];\n for (let f, i = -1, j = -1, n = schema.fieldsLength(); ++i < n;) {\n if (f = schema.fields(i)) {\n fields[++j] = Field.decode(f, dictionaries);\n }\n }\n return fields;\n}\n/** @ignore */\nfunction decodeFieldChildren(field, dictionaries) {\n const children = [];\n for (let f, i = -1, j = -1, n = field.childrenLength(); ++i < n;) {\n if (f = field.children(i)) {\n children[++j] = Field.decode(f, dictionaries);\n }\n }\n return children;\n}\n/** @ignore */\nfunction decodeField(f, dictionaries) {\n let id;\n let field;\n let type;\n let keys;\n let dictType;\n let dictMeta;\n // If no dictionary encoding\n if (!dictionaries || !(dictMeta = f.dictionary())) {\n type = decodeFieldType(f, decodeFieldChildren(f, dictionaries));\n field = new Field(f.name(), type, f.nullable(), decodeCustomMetadata(f));\n }\n // tslint:disable\n // If dictionary encoded and the first time we've seen this dictionary id, decode\n // the data type and child fields, then wrap in a Dictionary type and insert the\n // data type into the dictionary types map.\n else if (!dictionaries.has(id = dictMeta.id().low)) {\n // a dictionary index defaults to signed 32 bit int if unspecified\n keys = (keys = dictMeta.indexType()) ? decodeIndexType(keys) : new Int32();\n dictionaries.set(id, type = decodeFieldType(f, decodeFieldChildren(f, dictionaries)));\n dictType = new Dictionary(type, keys, id, dictMeta.isOrdered());\n field = new Field(f.name(), dictType, f.nullable(), decodeCustomMetadata(f));\n }\n // If dictionary encoded, and have already seen this dictionary Id in the schema, then reuse the\n // data type and wrap in a new Dictionary type and field.\n else {\n // a dictionary index defaults to signed 32 bit int if unspecified\n keys = (keys = dictMeta.indexType()) ? decodeIndexType(keys) : new Int32();\n dictType = new Dictionary(dictionaries.get(id), keys, id, dictMeta.isOrdered());\n field = new Field(f.name(), dictType, f.nullable(), decodeCustomMetadata(f));\n }\n return field || null;\n}\n/** @ignore */\nfunction decodeCustomMetadata(parent) {\n const data = new Map();\n if (parent) {\n for (let entry, key, i = -1, n = parent.customMetadataLength() | 0; ++i < n;) {\n if ((entry = parent.customMetadata(i)) && (key = entry.key()) != null) {\n data.set(key, entry.value());\n }\n }\n }\n return data;\n}\n/** @ignore */\nfunction decodeIndexType(_type) {\n return new Int(_type.isSigned(), _type.bitWidth());\n}\n/** @ignore */\nfunction decodeFieldType(f, children) {\n const typeId = f.typeType();\n switch (typeId) {\n case Type.NONE: return new Null();\n case Type.Null: return new Null();\n case Type.Binary: return new Binary();\n case Type.Utf8: return new Utf8();\n case Type.Bool: return new Bool();\n case Type.List: return new List((children || [])[0]);\n case Type.Struct_: return new Struct(children || []);\n }\n switch (typeId) {\n case Type.Int: {\n const t = f.type(new Schema_.org.apache.arrow.flatbuf.Int());\n return new Int(t.isSigned(), t.bitWidth());\n }\n case Type.FloatingPoint: {\n const t = f.type(new Schema_.org.apache.arrow.flatbuf.FloatingPoint());\n return new Float(t.precision());\n }\n case Type.Decimal: {\n const t = f.type(new Schema_.org.apache.arrow.flatbuf.Decimal());\n return new Decimal(t.scale(), t.precision());\n }\n case Type.Date: {\n const t = f.type(new Schema_.org.apache.arrow.flatbuf.Date());\n return new Date_(t.unit());\n }\n case Type.Time: {\n const t = f.type(new Schema_.org.apache.arrow.flatbuf.Time());\n return new Time(t.unit(), t.bitWidth());\n }\n case Type.Timestamp: {\n const t = f.type(new Schema_.org.apache.arrow.flatbuf.Timestamp());\n return new Timestamp(t.unit(), t.timezone());\n }\n case Type.Interval: {\n const t = f.type(new Schema_.org.apache.arrow.flatbuf.Interval());\n return new Interval(t.unit());\n }\n case Type.Union: {\n const t = f.type(new Schema_.org.apache.arrow.flatbuf.Union());\n return new Union(t.mode(), t.typeIdsArray() || [], children || []);\n }\n case Type.FixedSizeBinary: {\n const t = f.type(new Schema_.org.apache.arrow.flatbuf.FixedSizeBinary());\n return new FixedSizeBinary(t.byteWidth());\n }\n case Type.FixedSizeList: {\n const t = f.type(new Schema_.org.apache.arrow.flatbuf.FixedSizeList());\n return new FixedSizeList(t.listSize(), (children || [])[0]);\n }\n case Type.Map: {\n const t = f.type(new Schema_.org.apache.arrow.flatbuf.Map());\n return new Map_((children || [])[0], t.keysSorted());\n }\n }\n throw new Error(`Unrecognized type: \"${Type[typeId]}\" (${typeId})`);\n}\n/** @ignore */\nfunction encodeSchema(b, schema) {\n const fieldOffsets = schema.fields.map((f) => Field.encode(b, f));\n _Schema.startFieldsVector(b, fieldOffsets.length);\n const fieldsVectorOffset = _Schema.createFieldsVector(b, fieldOffsets);\n const metadataOffset = !(schema.metadata && schema.metadata.size > 0) ? -1 :\n _Schema.createCustomMetadataVector(b, [...schema.metadata].map(([k, v]) => {\n const key = b.createString(`${k}`);\n const val = b.createString(`${v}`);\n _KeyValue.startKeyValue(b);\n _KeyValue.addKey(b, key);\n _KeyValue.addValue(b, val);\n return _KeyValue.endKeyValue(b);\n }));\n _Schema.startSchema(b);\n _Schema.addFields(b, fieldsVectorOffset);\n _Schema.addEndianness(b, platformIsLittleEndian ? _Endianness.Little : _Endianness.Big);\n if (metadataOffset !== -1) {\n _Schema.addCustomMetadata(b, metadataOffset);\n }\n return _Schema.endSchema(b);\n}\n/** @ignore */\nfunction encodeField(b, field) {\n let nameOffset = -1;\n let typeOffset = -1;\n let dictionaryOffset = -1;\n let type = field.type;\n let typeId = field.typeId;\n if (!DataType.isDictionary(type)) {\n typeOffset = typeAssembler.visit(type, b);\n }\n else {\n typeId = type.dictionary.typeId;\n dictionaryOffset = typeAssembler.visit(type, b);\n typeOffset = typeAssembler.visit(type.dictionary, b);\n }\n const childOffsets = (type.children || []).map((f) => Field.encode(b, f));\n const childrenVectorOffset = _Field.createChildrenVector(b, childOffsets);\n const metadataOffset = !(field.metadata && field.metadata.size > 0) ? -1 :\n _Field.createCustomMetadataVector(b, [...field.metadata].map(([k, v]) => {\n const key = b.createString(`${k}`);\n const val = b.createString(`${v}`);\n _KeyValue.startKeyValue(b);\n _KeyValue.addKey(b, key);\n _KeyValue.addValue(b, val);\n return _KeyValue.endKeyValue(b);\n }));\n if (field.name) {\n nameOffset = b.createString(field.name);\n }\n _Field.startField(b);\n _Field.addType(b, typeOffset);\n _Field.addTypeType(b, typeId);\n _Field.addChildren(b, childrenVectorOffset);\n _Field.addNullable(b, !!field.nullable);\n if (nameOffset !== -1) {\n _Field.addName(b, nameOffset);\n }\n if (dictionaryOffset !== -1) {\n _Field.addDictionary(b, dictionaryOffset);\n }\n if (metadataOffset !== -1) {\n _Field.addCustomMetadata(b, metadataOffset);\n }\n return _Field.endField(b);\n}\n/** @ignore */\nfunction encodeRecordBatch(b, recordBatch) {\n const nodes = recordBatch.nodes || [];\n const buffers = recordBatch.buffers || [];\n _RecordBatch.startNodesVector(b, nodes.length);\n nodes.slice().reverse().forEach((n) => FieldNode.encode(b, n));\n const nodesVectorOffset = b.endVector();\n _RecordBatch.startBuffersVector(b, buffers.length);\n buffers.slice().reverse().forEach((b_) => BufferRegion.encode(b, b_));\n const buffersVectorOffset = b.endVector();\n _RecordBatch.startRecordBatch(b);\n _RecordBatch.addLength(b, new Long(recordBatch.length, 0));\n _RecordBatch.addNodes(b, nodesVectorOffset);\n _RecordBatch.addBuffers(b, buffersVectorOffset);\n return _RecordBatch.endRecordBatch(b);\n}\n/** @ignore */\nfunction encodeDictionaryBatch(b, dictionaryBatch) {\n const dataOffset = RecordBatch.encode(b, dictionaryBatch.data);\n _DictionaryBatch.startDictionaryBatch(b);\n _DictionaryBatch.addId(b, new Long(dictionaryBatch.id, 0));\n _DictionaryBatch.addIsDelta(b, dictionaryBatch.isDelta);\n _DictionaryBatch.addData(b, dataOffset);\n return _DictionaryBatch.endDictionaryBatch(b);\n}\n/** @ignore */\nfunction encodeFieldNode(b, node) {\n return _FieldNode.createFieldNode(b, new Long(node.length, 0), new Long(node.nullCount, 0));\n}\n/** @ignore */\nfunction encodeBufferRegion(b, node) {\n return _Buffer.createBuffer(b, new Long(node.offset, 0), new Long(node.length, 0));\n}\n/** @ignore */\nconst platformIsLittleEndian = (function () {\n const buffer = new ArrayBuffer(2);\n new DataView(buffer).setInt16(0, 256, true /* littleEndian */);\n // Int16Array uses the platform's endianness.\n return new Int16Array(buffer)[0] === 256;\n})();\n\n//# sourceMappingURL=message.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { MessageHeader } from '../enum';\nimport { flatbuffers } from 'flatbuffers';\nvar ByteBuffer = flatbuffers.ByteBuffer;\nimport { Message } from './metadata/message';\nimport { isFileHandle } from '../util/compat';\nimport { AsyncRandomAccessFile } from '../io/file';\nimport { toUint8Array } from '../util/buffer';\nimport { ByteStream, AsyncByteStream } from '../io/stream';\nimport { ArrowJSON, ITERATOR_DONE } from '../io/interfaces';\n/** @ignore */ const invalidMessageType = (type) => `Expected ${MessageHeader[type]} Message in stream, but was null or length 0.`;\n/** @ignore */ const nullMessage = (type) => `Header pointer of flatbuffer-encoded ${MessageHeader[type]} Message is null or length 0.`;\n/** @ignore */ const invalidMessageMetadata = (expected, actual) => `Expected to read ${expected} metadata bytes, but only read ${actual}.`;\n/** @ignore */ const invalidMessageBodyLength = (expected, actual) => `Expected to read ${expected} bytes for message body, but only read ${actual}.`;\n/** @ignore */\nexport class MessageReader {\n constructor(source) {\n this.source = source instanceof ByteStream ? source : new ByteStream(source);\n }\n [Symbol.iterator]() { return this; }\n next() {\n let r;\n if ((r = this.readMetadataLength()).done) {\n return ITERATOR_DONE;\n }\n // ARROW-6313: If the first 4 bytes are continuation indicator (-1), read\n // the next 4 for the 32-bit metadata length. Otherwise, assume this is a\n // pre-v0.15 message, where the first 4 bytes are the metadata length.\n if ((r.value === -1) &&\n (r = this.readMetadataLength()).done) {\n return ITERATOR_DONE;\n }\n if ((r = this.readMetadata(r.value)).done) {\n return ITERATOR_DONE;\n }\n return r;\n }\n throw(value) { return this.source.throw(value); }\n return(value) { return this.source.return(value); }\n readMessage(type) {\n let r;\n if ((r = this.next()).done) {\n return null;\n }\n if ((type != null) && r.value.headerType !== type) {\n throw new Error(invalidMessageType(type));\n }\n return r.value;\n }\n readMessageBody(bodyLength) {\n if (bodyLength <= 0) {\n return new Uint8Array(0);\n }\n const buf = toUint8Array(this.source.read(bodyLength));\n if (buf.byteLength < bodyLength) {\n throw new Error(invalidMessageBodyLength(bodyLength, buf.byteLength));\n }\n // 1. Work around bugs in fs.ReadStream's internal Buffer pooling, see: https://github.com/nodejs/node/issues/24817\n // 2. Work around https://github.com/whatwg/streams/blob/0ebe4b042e467d9876d80ae045de3843092ad797/reference-implementation/lib/helpers.js#L126\n return /* 1. */ (buf.byteOffset % 8 === 0) &&\n /* 2. */ (buf.byteOffset + buf.byteLength) <= buf.buffer.byteLength ? buf : buf.slice();\n }\n readSchema(throwIfNull = false) {\n const type = MessageHeader.Schema;\n const message = this.readMessage(type);\n const schema = message && message.header();\n if (throwIfNull && !schema) {\n throw new Error(nullMessage(type));\n }\n return schema;\n }\n readMetadataLength() {\n const buf = this.source.read(PADDING);\n const bb = buf && new ByteBuffer(buf);\n const len = bb && bb.readInt32(0) || 0;\n return { done: len === 0, value: len };\n }\n readMetadata(metadataLength) {\n const buf = this.source.read(metadataLength);\n if (!buf) {\n return ITERATOR_DONE;\n }\n if (buf.byteLength < metadataLength) {\n throw new Error(invalidMessageMetadata(metadataLength, buf.byteLength));\n }\n return { done: false, value: Message.decode(buf) };\n }\n}\n/** @ignore */\nexport class AsyncMessageReader {\n constructor(source, byteLength) {\n this.source = source instanceof AsyncByteStream ? source\n : isFileHandle(source)\n ? new AsyncRandomAccessFile(source, byteLength)\n : new AsyncByteStream(source);\n }\n [Symbol.asyncIterator]() { return this; }\n async next() {\n let r;\n if ((r = await this.readMetadataLength()).done) {\n return ITERATOR_DONE;\n }\n // ARROW-6313: If the first 4 bytes are continuation indicator (-1), read\n // the next 4 for the 32-bit metadata length. Otherwise, assume this is a\n // pre-v0.15 message, where the first 4 bytes are the metadata length.\n if ((r.value === -1) &&\n (r = await this.readMetadataLength()).done) {\n return ITERATOR_DONE;\n }\n if ((r = await this.readMetadata(r.value)).done) {\n return ITERATOR_DONE;\n }\n return r;\n }\n async throw(value) { return await this.source.throw(value); }\n async return(value) { return await this.source.return(value); }\n async readMessage(type) {\n let r;\n if ((r = await this.next()).done) {\n return null;\n }\n if ((type != null) && r.value.headerType !== type) {\n throw new Error(invalidMessageType(type));\n }\n return r.value;\n }\n async readMessageBody(bodyLength) {\n if (bodyLength <= 0) {\n return new Uint8Array(0);\n }\n const buf = toUint8Array(await this.source.read(bodyLength));\n if (buf.byteLength < bodyLength) {\n throw new Error(invalidMessageBodyLength(bodyLength, buf.byteLength));\n }\n // 1. Work around bugs in fs.ReadStream's internal Buffer pooling, see: https://github.com/nodejs/node/issues/24817\n // 2. Work around https://github.com/whatwg/streams/blob/0ebe4b042e467d9876d80ae045de3843092ad797/reference-implementation/lib/helpers.js#L126\n return /* 1. */ (buf.byteOffset % 8 === 0) &&\n /* 2. */ (buf.byteOffset + buf.byteLength) <= buf.buffer.byteLength ? buf : buf.slice();\n }\n async readSchema(throwIfNull = false) {\n const type = MessageHeader.Schema;\n const message = await this.readMessage(type);\n const schema = message && message.header();\n if (throwIfNull && !schema) {\n throw new Error(nullMessage(type));\n }\n return schema;\n }\n async readMetadataLength() {\n const buf = await this.source.read(PADDING);\n const bb = buf && new ByteBuffer(buf);\n const len = bb && bb.readInt32(0) || 0;\n return { done: len === 0, value: len };\n }\n async readMetadata(metadataLength) {\n const buf = await this.source.read(metadataLength);\n if (!buf) {\n return ITERATOR_DONE;\n }\n if (buf.byteLength < metadataLength) {\n throw new Error(invalidMessageMetadata(metadataLength, buf.byteLength));\n }\n return { done: false, value: Message.decode(buf) };\n }\n}\n/** @ignore */\nexport class JSONMessageReader extends MessageReader {\n constructor(source) {\n super(new Uint8Array(0));\n this._schema = false;\n this._body = [];\n this._batchIndex = 0;\n this._dictionaryIndex = 0;\n this._json = source instanceof ArrowJSON ? source : new ArrowJSON(source);\n }\n next() {\n const { _json } = this;\n if (!this._schema) {\n this._schema = true;\n const message = Message.fromJSON(_json.schema, MessageHeader.Schema);\n return { done: false, value: message };\n }\n if (this._dictionaryIndex < _json.dictionaries.length) {\n const batch = _json.dictionaries[this._dictionaryIndex++];\n this._body = batch['data']['columns'];\n const message = Message.fromJSON(batch, MessageHeader.DictionaryBatch);\n return { done: false, value: message };\n }\n if (this._batchIndex < _json.batches.length) {\n const batch = _json.batches[this._batchIndex++];\n this._body = batch['columns'];\n const message = Message.fromJSON(batch, MessageHeader.RecordBatch);\n return { done: false, value: message };\n }\n this._body = [];\n return ITERATOR_DONE;\n }\n readMessageBody(_bodyLength) {\n return flattenDataSources(this._body);\n function flattenDataSources(xs) {\n return (xs || []).reduce((buffers, column) => [\n ...buffers,\n ...(column['VALIDITY'] && [column['VALIDITY']] || []),\n ...(column['TYPE'] && [column['TYPE']] || []),\n ...(column['OFFSET'] && [column['OFFSET']] || []),\n ...(column['DATA'] && [column['DATA']] || []),\n ...flattenDataSources(column['children'])\n ], []);\n }\n }\n readMessage(type) {\n let r;\n if ((r = this.next()).done) {\n return null;\n }\n if ((type != null) && r.value.headerType !== type) {\n throw new Error(invalidMessageType(type));\n }\n return r.value;\n }\n readSchema() {\n const type = MessageHeader.Schema;\n const message = this.readMessage(type);\n const schema = message && message.header();\n if (!message || !schema) {\n throw new Error(nullMessage(type));\n }\n return schema;\n }\n}\n/** @ignore */\nexport const PADDING = 4;\n/** @ignore */\nexport const MAGIC_STR = 'ARROW1';\n/** @ignore */\nexport const MAGIC = new Uint8Array(MAGIC_STR.length);\nfor (let i = 0; i < MAGIC_STR.length; i += 1 | 0) {\n MAGIC[i] = MAGIC_STR.charCodeAt(i);\n}\n/** @ignore */\nexport function checkForMagicArrowString(buffer, index = 0) {\n for (let i = -1, n = MAGIC.length; ++i < n;) {\n if (MAGIC[i] !== buffer[index + i]) {\n return false;\n }\n }\n return true;\n}\n/** @ignore */\nexport const magicLength = MAGIC.length;\n/** @ignore */\nexport const magicAndPadding = magicLength + PADDING;\n/** @ignore */\nexport const magicX2AndPadding = magicLength * 2 + PADDING;\n\n//# sourceMappingURL=message.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Visitor } from '../visitor';\nimport { UnionMode } from '../enum';\nimport { RecordBatch } from '../recordbatch';\nimport { rebaseValueOffsets } from '../util/buffer';\nimport { packBools, truncateBitmap } from '../util/bit';\nimport { selectVectorChildrenArgs } from '../util/args';\nimport { BufferRegion, FieldNode } from '../ipc/metadata/message';\nimport { DataType, } from '../type';\n/** @ignore */\nexport class VectorAssembler extends Visitor {\n constructor() {\n super();\n this._byteLength = 0;\n this._nodes = [];\n this._buffers = [];\n this._bufferRegions = [];\n }\n /** @nocollapse */\n static assemble(...args) {\n const assembler = new VectorAssembler();\n const vectorChildren = selectVectorChildrenArgs(RecordBatch, args);\n const [assembleResult = assembler] = assembler.visitMany(vectorChildren);\n return assembleResult;\n }\n visit(vector) {\n if (!DataType.isDictionary(vector.type)) {\n const { data, length, nullCount } = vector;\n if (length > 2147483647) {\n /* istanbul ignore next */\n throw new RangeError('Cannot write arrays larger than 2^31 - 1 in length');\n }\n if (!DataType.isNull(vector.type)) {\n addBuffer.call(this, nullCount <= 0\n ? new Uint8Array(0) // placeholder validity buffer\n : truncateBitmap(data.offset, length, data.nullBitmap));\n }\n this.nodes.push(new FieldNode(length, nullCount));\n }\n return super.visit(vector);\n }\n visitNull(_nullV) {\n return this;\n }\n visitDictionary(vector) {\n // Assemble the indices here, Dictionary assembled separately.\n return this.visit(vector.indices);\n }\n get nodes() { return this._nodes; }\n get buffers() { return this._buffers; }\n get byteLength() { return this._byteLength; }\n get bufferRegions() { return this._bufferRegions; }\n}\n/** @ignore */\nfunction addBuffer(values) {\n const byteLength = (values.byteLength + 7) & ~7; // Round up to a multiple of 8\n this.buffers.push(values);\n this.bufferRegions.push(new BufferRegion(this._byteLength, byteLength));\n this._byteLength += byteLength;\n return this;\n}\n/** @ignore */\nfunction assembleUnion(vector) {\n const { type, length, typeIds, valueOffsets } = vector;\n // All Union Vectors have a typeIds buffer\n addBuffer.call(this, typeIds);\n // If this is a Sparse Union, treat it like all other Nested types\n if (type.mode === UnionMode.Sparse) {\n return assembleNestedVector.call(this, vector);\n }\n else if (type.mode === UnionMode.Dense) {\n // If this is a Dense Union, add the valueOffsets buffer and potentially slice the children\n if (vector.offset <= 0) {\n // If the Vector hasn't been sliced, write the existing valueOffsets\n addBuffer.call(this, valueOffsets);\n // We can treat this like all other Nested types\n return assembleNestedVector.call(this, vector);\n }\n else {\n // A sliced Dense Union is an unpleasant case. Because the offsets are different for\n // each child vector, we need to \"rebase\" the valueOffsets for each child\n // Union typeIds are not necessary 0-indexed\n const maxChildTypeId = typeIds.reduce((x, y) => Math.max(x, y), typeIds[0]);\n const childLengths = new Int32Array(maxChildTypeId + 1);\n // Set all to -1 to indicate that we haven't observed a first occurrence of a particular child yet\n const childOffsets = new Int32Array(maxChildTypeId + 1).fill(-1);\n const shiftedOffsets = new Int32Array(length);\n // If we have a non-zero offset, then the value offsets do not start at\n // zero. We must a) create a new offsets array with shifted offsets and\n // b) slice the values array accordingly\n const unshiftedOffsets = rebaseValueOffsets(-valueOffsets[0], length, valueOffsets);\n for (let typeId, shift, index = -1; ++index < length;) {\n if ((shift = childOffsets[typeId = typeIds[index]]) === -1) {\n shift = childOffsets[typeId] = unshiftedOffsets[typeId];\n }\n shiftedOffsets[index] = unshiftedOffsets[index] - shift;\n ++childLengths[typeId];\n }\n addBuffer.call(this, shiftedOffsets);\n // Slice and visit children accordingly\n for (let child, childIndex = -1, numChildren = type.children.length; ++childIndex < numChildren;) {\n if (child = vector.getChildAt(childIndex)) {\n const typeId = type.typeIds[childIndex];\n const childLength = Math.min(length, childLengths[typeId]);\n this.visit(child.slice(childOffsets[typeId], childLength));\n }\n }\n }\n }\n return this;\n}\n/** @ignore */\nfunction assembleBoolVector(vector) {\n // Bool vector is a special case of FlatVector, as its data buffer needs to stay packed\n let values;\n if (vector.nullCount >= vector.length) {\n // If all values are null, just insert a placeholder empty data buffer (fastest path)\n return addBuffer.call(this, new Uint8Array(0));\n }\n else if ((values = vector.values) instanceof Uint8Array) {\n // If values is already a Uint8Array, slice the bitmap (fast path)\n return addBuffer.call(this, truncateBitmap(vector.offset, vector.length, values));\n }\n // Otherwise if the underlying data *isn't* a Uint8Array, enumerate the\n // values as bools and re-pack them into a Uint8Array. This code isn't\n // reachable unless you're trying to manipulate the Data internals,\n // we we're only doing this for safety.\n /* istanbul ignore next */\n return addBuffer.call(this, packBools(vector));\n}\n/** @ignore */\nfunction assembleFlatVector(vector) {\n return addBuffer.call(this, vector.values.subarray(0, vector.length * vector.stride));\n}\n/** @ignore */\nfunction assembleFlatListVector(vector) {\n const { length, values, valueOffsets } = vector;\n const firstOffset = valueOffsets[0];\n const lastOffset = valueOffsets[length];\n const byteLength = Math.min(lastOffset - firstOffset, values.byteLength - firstOffset);\n // Push in the order FlatList types read their buffers\n addBuffer.call(this, rebaseValueOffsets(-valueOffsets[0], length, valueOffsets)); // valueOffsets buffer first\n addBuffer.call(this, values.subarray(firstOffset, firstOffset + byteLength)); // sliced values buffer second\n return this;\n}\n/** @ignore */\nfunction assembleListVector(vector) {\n const { length, valueOffsets } = vector;\n // If we have valueOffsets (MapVector, ListVector), push that buffer first\n if (valueOffsets) {\n addBuffer.call(this, rebaseValueOffsets(valueOffsets[0], length, valueOffsets));\n }\n // Then insert the List's values child\n return this.visit(vector.getChildAt(0));\n}\n/** @ignore */\nfunction assembleNestedVector(vector) {\n return this.visitMany(vector.type.children.map((_, i) => vector.getChildAt(i)).filter(Boolean))[0];\n}\nVectorAssembler.prototype.visitBool = assembleBoolVector;\nVectorAssembler.prototype.visitInt = assembleFlatVector;\nVectorAssembler.prototype.visitFloat = assembleFlatVector;\nVectorAssembler.prototype.visitUtf8 = assembleFlatListVector;\nVectorAssembler.prototype.visitBinary = assembleFlatListVector;\nVectorAssembler.prototype.visitFixedSizeBinary = assembleFlatVector;\nVectorAssembler.prototype.visitDate = assembleFlatVector;\nVectorAssembler.prototype.visitTimestamp = assembleFlatVector;\nVectorAssembler.prototype.visitTime = assembleFlatVector;\nVectorAssembler.prototype.visitDecimal = assembleFlatVector;\nVectorAssembler.prototype.visitList = assembleListVector;\nVectorAssembler.prototype.visitStruct = assembleNestedVector;\nVectorAssembler.prototype.visitUnion = assembleUnion;\nVectorAssembler.prototype.visitInterval = assembleFlatVector;\nVectorAssembler.prototype.visitFixedSizeList = assembleListVector;\nVectorAssembler.prototype.visitMap = assembleListVector;\n\n//# sourceMappingURL=vectorassembler.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Table } from '../table';\nimport { MAGIC } from './message';\nimport { Column } from '../column';\nimport { DataType } from '../type';\nimport { Field } from '../schema';\nimport { Message } from './metadata/message';\nimport * as metadata from './metadata/message';\nimport { FileBlock, Footer } from './metadata/file';\nimport { MessageHeader, MetadataVersion } from '../enum';\nimport { AsyncByteQueue } from '../io/stream';\nimport { VectorAssembler } from '../visitor/vectorassembler';\nimport { JSONTypeAssembler } from '../visitor/jsontypeassembler';\nimport { JSONVectorAssembler } from '../visitor/jsonvectorassembler';\nimport { toUint8Array } from '../util/buffer';\nimport { RecordBatch, _InternalEmptyPlaceholderRecordBatch } from '../recordbatch';\nimport { ReadableInterop } from '../io/interfaces';\nimport { isPromise, isAsyncIterable, isWritableDOMStream, isWritableNodeStream, isIterable, isObject } from '../util/compat';\nexport class RecordBatchWriter extends ReadableInterop {\n constructor(options) {\n super();\n this._position = 0;\n this._started = false;\n // @ts-ignore\n this._sink = new AsyncByteQueue();\n this._schema = null;\n this._dictionaryBlocks = [];\n this._recordBatchBlocks = [];\n this._dictionaryDeltaOffsets = new Map();\n isObject(options) || (options = { autoDestroy: true, writeLegacyIpcFormat: false });\n this._autoDestroy = (typeof options.autoDestroy === 'boolean') ? options.autoDestroy : true;\n this._writeLegacyIpcFormat = (typeof options.writeLegacyIpcFormat === 'boolean') ? options.writeLegacyIpcFormat : false;\n }\n /** @nocollapse */\n // @ts-ignore\n static throughNode(options) {\n throw new Error(`\"throughNode\" not available in this environment`);\n }\n /** @nocollapse */\n static throughDOM(\n // @ts-ignore\n writableStrategy, \n // @ts-ignore\n readableStrategy) {\n throw new Error(`\"throughDOM\" not available in this environment`);\n }\n toString(sync = false) {\n return this._sink.toString(sync);\n }\n toUint8Array(sync = false) {\n return this._sink.toUint8Array(sync);\n }\n writeAll(input) {\n if (isPromise(input)) {\n return input.then((x) => this.writeAll(x));\n }\n else if (isAsyncIterable(input)) {\n return writeAllAsync(this, input);\n }\n return writeAll(this, input);\n }\n get closed() { return this._sink.closed; }\n [Symbol.asyncIterator]() { return this._sink[Symbol.asyncIterator](); }\n toDOMStream(options) { return this._sink.toDOMStream(options); }\n toNodeStream(options) { return this._sink.toNodeStream(options); }\n close() {\n return this.reset()._sink.close();\n }\n abort(reason) {\n return this.reset()._sink.abort(reason);\n }\n finish() {\n this._autoDestroy ? this.close() : this.reset(this._sink, this._schema);\n return this;\n }\n reset(sink = this._sink, schema = null) {\n if ((sink === this._sink) || (sink instanceof AsyncByteQueue)) {\n this._sink = sink;\n }\n else {\n this._sink = new AsyncByteQueue();\n if (sink && isWritableDOMStream(sink)) {\n this.toDOMStream({ type: 'bytes' }).pipeTo(sink);\n }\n else if (sink && isWritableNodeStream(sink)) {\n this.toNodeStream({ objectMode: false }).pipe(sink);\n }\n }\n if (this._started && this._schema) {\n this._writeFooter(this._schema);\n }\n this._started = false;\n this._dictionaryBlocks = [];\n this._recordBatchBlocks = [];\n this._dictionaryDeltaOffsets = new Map();\n if (!schema || !(schema.compareTo(this._schema))) {\n if (schema === null) {\n this._position = 0;\n this._schema = null;\n }\n else {\n this._started = true;\n this._schema = schema;\n this._writeSchema(schema);\n }\n }\n return this;\n }\n write(payload) {\n let schema = null;\n if (!this._sink) {\n throw new Error(`RecordBatchWriter is closed`);\n }\n else if (payload === null || payload === undefined) {\n return this.finish() && undefined;\n }\n else if (payload instanceof Table && !(schema = payload.schema)) {\n return this.finish() && undefined;\n }\n else if (payload instanceof RecordBatch && !(schema = payload.schema)) {\n return this.finish() && undefined;\n }\n if (schema && !schema.compareTo(this._schema)) {\n if (this._started && this._autoDestroy) {\n return this.close();\n }\n this.reset(this._sink, schema);\n }\n if (payload instanceof RecordBatch) {\n if (!(payload instanceof _InternalEmptyPlaceholderRecordBatch)) {\n this._writeRecordBatch(payload);\n }\n }\n else if (payload instanceof Table) {\n this.writeAll(payload.chunks);\n }\n else if (isIterable(payload)) {\n this.writeAll(payload);\n }\n }\n _writeMessage(message, alignment = 8) {\n const a = alignment - 1;\n const buffer = Message.encode(message);\n const flatbufferSize = buffer.byteLength;\n const prefixSize = !this._writeLegacyIpcFormat ? 8 : 4;\n const alignedSize = (flatbufferSize + prefixSize + a) & ~a;\n const nPaddingBytes = alignedSize - flatbufferSize - prefixSize;\n if (message.headerType === MessageHeader.RecordBatch) {\n this._recordBatchBlocks.push(new FileBlock(alignedSize, message.bodyLength, this._position));\n }\n else if (message.headerType === MessageHeader.DictionaryBatch) {\n this._dictionaryBlocks.push(new FileBlock(alignedSize, message.bodyLength, this._position));\n }\n // If not in legacy pre-0.15.0 mode, write the stream continuation indicator\n if (!this._writeLegacyIpcFormat) {\n this._write(Int32Array.of(-1));\n }\n // Write the flatbuffer size prefix including padding\n this._write(Int32Array.of(alignedSize - prefixSize));\n // Write the flatbuffer\n if (flatbufferSize > 0) {\n this._write(buffer);\n }\n // Write any padding\n return this._writePadding(nPaddingBytes);\n }\n _write(chunk) {\n if (this._started) {\n const buffer = toUint8Array(chunk);\n if (buffer && buffer.byteLength > 0) {\n this._sink.write(buffer);\n this._position += buffer.byteLength;\n }\n }\n return this;\n }\n _writeSchema(schema) {\n return this._writeMessage(Message.from(schema));\n }\n // @ts-ignore\n _writeFooter(schema) {\n // eos bytes\n return this._writeLegacyIpcFormat\n ? this._write(Int32Array.of(0))\n : this._write(Int32Array.of(-1, 0));\n }\n _writeMagic() {\n return this._write(MAGIC);\n }\n _writePadding(nBytes) {\n return nBytes > 0 ? this._write(new Uint8Array(nBytes)) : this;\n }\n _writeRecordBatch(batch) {\n const { byteLength, nodes, bufferRegions, buffers } = VectorAssembler.assemble(batch);\n const recordBatch = new metadata.RecordBatch(batch.length, nodes, bufferRegions);\n const message = Message.from(recordBatch, byteLength);\n return this\n ._writeDictionaries(batch)\n ._writeMessage(message)\n ._writeBodyBuffers(buffers);\n }\n _writeDictionaryBatch(dictionary, id, isDelta = false) {\n this._dictionaryDeltaOffsets.set(id, dictionary.length + (this._dictionaryDeltaOffsets.get(id) || 0));\n const { byteLength, nodes, bufferRegions, buffers } = VectorAssembler.assemble(dictionary);\n const recordBatch = new metadata.RecordBatch(dictionary.length, nodes, bufferRegions);\n const dictionaryBatch = new metadata.DictionaryBatch(recordBatch, id, isDelta);\n const message = Message.from(dictionaryBatch, byteLength);\n return this\n ._writeMessage(message)\n ._writeBodyBuffers(buffers);\n }\n _writeBodyBuffers(buffers) {\n let buffer;\n let size, padding;\n for (let i = -1, n = buffers.length; ++i < n;) {\n if ((buffer = buffers[i]) && (size = buffer.byteLength) > 0) {\n this._write(buffer);\n if ((padding = ((size + 7) & ~7) - size) > 0) {\n this._writePadding(padding);\n }\n }\n }\n return this;\n }\n _writeDictionaries(batch) {\n for (let [id, dictionary] of batch.dictionaries) {\n let offset = this._dictionaryDeltaOffsets.get(id) || 0;\n if (offset === 0 || (dictionary = dictionary.slice(offset)).length > 0) {\n const chunks = 'chunks' in dictionary ? dictionary.chunks : [dictionary];\n for (const chunk of chunks) {\n this._writeDictionaryBatch(chunk, id, offset > 0);\n offset += chunk.length;\n }\n }\n }\n return this;\n }\n}\n/** @ignore */\nexport class RecordBatchStreamWriter extends RecordBatchWriter {\n /** @nocollapse */\n static writeAll(input, options) {\n const writer = new RecordBatchStreamWriter(options);\n if (isPromise(input)) {\n return input.then((x) => writer.writeAll(x));\n }\n else if (isAsyncIterable(input)) {\n return writeAllAsync(writer, input);\n }\n return writeAll(writer, input);\n }\n}\n/** @ignore */\nexport class RecordBatchFileWriter extends RecordBatchWriter {\n constructor() {\n super();\n this._autoDestroy = true;\n }\n /** @nocollapse */\n static writeAll(input) {\n const writer = new RecordBatchFileWriter();\n if (isPromise(input)) {\n return input.then((x) => writer.writeAll(x));\n }\n else if (isAsyncIterable(input)) {\n return writeAllAsync(writer, input);\n }\n return writeAll(writer, input);\n }\n // @ts-ignore\n _writeSchema(schema) {\n return this._writeMagic()._writePadding(2);\n }\n _writeFooter(schema) {\n const buffer = Footer.encode(new Footer(schema, MetadataVersion.V4, this._recordBatchBlocks, this._dictionaryBlocks));\n return super\n ._writeFooter(schema) // EOS bytes for sequential readers\n ._write(buffer) // Write the flatbuffer\n ._write(Int32Array.of(buffer.byteLength)) // then the footer size suffix\n ._writeMagic(); // then the magic suffix\n }\n}\n/** @ignore */\nexport class RecordBatchJSONWriter extends RecordBatchWriter {\n constructor() {\n super();\n this._autoDestroy = true;\n this._recordBatches = [];\n this._dictionaries = [];\n }\n /** @nocollapse */\n static writeAll(input) {\n return new RecordBatchJSONWriter().writeAll(input);\n }\n _writeMessage() { return this; }\n // @ts-ignore\n _writeFooter(schema) { return this; }\n _writeSchema(schema) {\n return this._write(`{\\n \"schema\": ${JSON.stringify({ fields: schema.fields.map(fieldToJSON) }, null, 2)}`);\n }\n _writeDictionaries(batch) {\n if (batch.dictionaries.size > 0) {\n this._dictionaries.push(batch);\n }\n return this;\n }\n _writeDictionaryBatch(dictionary, id, isDelta = false) {\n this._dictionaryDeltaOffsets.set(id, dictionary.length + (this._dictionaryDeltaOffsets.get(id) || 0));\n this._write(this._dictionaryBlocks.length === 0 ? ` ` : `,\\n `);\n this._write(`${dictionaryBatchToJSON(dictionary, id, isDelta)}`);\n this._dictionaryBlocks.push(new FileBlock(0, 0, 0));\n return this;\n }\n _writeRecordBatch(batch) {\n this._writeDictionaries(batch);\n this._recordBatches.push(batch);\n return this;\n }\n close() {\n if (this._dictionaries.length > 0) {\n this._write(`,\\n \"dictionaries\": [\\n`);\n for (const batch of this._dictionaries) {\n super._writeDictionaries(batch);\n }\n this._write(`\\n ]`);\n }\n if (this._recordBatches.length > 0) {\n for (let i = -1, n = this._recordBatches.length; ++i < n;) {\n this._write(i === 0 ? `,\\n \"batches\": [\\n ` : `,\\n `);\n this._write(`${recordBatchToJSON(this._recordBatches[i])}`);\n this._recordBatchBlocks.push(new FileBlock(0, 0, 0));\n }\n this._write(`\\n ]`);\n }\n if (this._schema) {\n this._write(`\\n}`);\n }\n this._dictionaries = [];\n this._recordBatches = [];\n return super.close();\n }\n}\n/** @ignore */\nfunction writeAll(writer, input) {\n let chunks = input;\n if (input instanceof Table) {\n chunks = input.chunks;\n writer.reset(undefined, input.schema);\n }\n for (const batch of chunks) {\n writer.write(batch);\n }\n return writer.finish();\n}\n/** @ignore */\nasync function writeAllAsync(writer, batches) {\n for await (const batch of batches) {\n writer.write(batch);\n }\n return writer.finish();\n}\n/** @ignore */\nfunction fieldToJSON({ name, type, nullable }) {\n const assembler = new JSONTypeAssembler();\n return {\n 'name': name, 'nullable': nullable,\n 'type': assembler.visit(type),\n 'children': (type.children || []).map(fieldToJSON),\n 'dictionary': !DataType.isDictionary(type) ? undefined : {\n 'id': type.id,\n 'isOrdered': type.isOrdered,\n 'indexType': assembler.visit(type.indices)\n }\n };\n}\n/** @ignore */\nfunction dictionaryBatchToJSON(dictionary, id, isDelta = false) {\n const field = new Field(`${id}`, dictionary.type, dictionary.nullCount > 0);\n const columns = JSONVectorAssembler.assemble(new Column(field, [dictionary]));\n return JSON.stringify({\n 'id': id,\n 'isDelta': isDelta,\n 'data': {\n 'count': dictionary.length,\n 'columns': columns\n }\n }, null, 2);\n}\n/** @ignore */\nfunction recordBatchToJSON(records) {\n return JSON.stringify({\n 'count': records.length,\n 'columns': JSONVectorAssembler.assemble(records)\n }, null, 2);\n}\n\n//# sourceMappingURL=writer.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Data } from '../data';\nimport { Schema } from '../schema';\nimport { Chunked } from '../vector/chunked';\nimport { RecordBatch } from '../recordbatch';\nconst noopBuf = new Uint8Array(0);\nconst nullBufs = (bitmapLength) => [\n noopBuf, noopBuf, new Uint8Array(bitmapLength), noopBuf\n];\n/** @ignore */\nexport function ensureSameLengthData(schema, chunks, batchLength = chunks.reduce((l, c) => Math.max(l, c.length), 0)) {\n let data;\n let field;\n let i = -1, n = chunks.length;\n const fields = [...schema.fields];\n const batchData = [];\n const bitmapLength = ((batchLength + 63) & ~63) >> 3;\n while (++i < n) {\n if ((data = chunks[i]) && data.length === batchLength) {\n batchData[i] = data;\n }\n else {\n (field = fields[i]).nullable || (fields[i] = fields[i].clone({ nullable: true }));\n batchData[i] = data ? data._changeLengthAndBackfillNullBitmap(batchLength)\n : Data.new(field.type, 0, batchLength, batchLength, nullBufs(bitmapLength));\n }\n }\n return [new Schema(fields), batchLength, batchData];\n}\n/** @ignore */\nexport function distributeColumnsIntoRecordBatches(columns) {\n return distributeVectorsIntoRecordBatches(new Schema(columns.map(({ field }) => field)), columns);\n}\n/** @ignore */\nexport function distributeVectorsIntoRecordBatches(schema, vecs) {\n return uniformlyDistributeChunksAcrossRecordBatches(schema, vecs.map((v) => v instanceof Chunked ? v.chunks.map((c) => c.data) : [v.data]));\n}\n/** @ignore */\nfunction uniformlyDistributeChunksAcrossRecordBatches(schema, columns) {\n const fields = [...schema.fields];\n const batchArgs = [];\n const memo = { numBatches: columns.reduce((n, c) => Math.max(n, c.length), 0) };\n let numBatches = 0, batchLength = 0;\n let i = -1, numColumns = columns.length;\n let child, childData = [];\n while (memo.numBatches-- > 0) {\n for (batchLength = Number.POSITIVE_INFINITY, i = -1; ++i < numColumns;) {\n childData[i] = child = columns[i].shift();\n batchLength = Math.min(batchLength, child ? child.length : batchLength);\n }\n if (isFinite(batchLength)) {\n childData = distributeChildData(fields, batchLength, childData, columns, memo);\n if (batchLength > 0) {\n batchArgs[numBatches++] = [batchLength, childData.slice()];\n }\n }\n }\n return [\n schema = new Schema(fields, schema.metadata),\n batchArgs.map((xs) => new RecordBatch(schema, ...xs))\n ];\n}\n/** @ignore */\nfunction distributeChildData(fields, batchLength, childData, columns, memo) {\n let data;\n let field;\n let length = 0, i = -1, n = columns.length;\n const bitmapLength = ((batchLength + 63) & ~63) >> 3;\n while (++i < n) {\n if ((data = childData[i]) && ((length = data.length) >= batchLength)) {\n if (length === batchLength) {\n childData[i] = data;\n }\n else {\n childData[i] = data.slice(0, batchLength);\n data = data.slice(batchLength, length - batchLength);\n memo.numBatches = Math.max(memo.numBatches, columns[i].unshift(data));\n }\n }\n else {\n (field = fields[i]).nullable || (fields[i] = field.clone({ nullable: true }));\n childData[i] = data ? data._changeLengthAndBackfillNullBitmap(batchLength)\n : Data.new(field.type, 0, batchLength, batchLength, nullBufs(bitmapLength));\n }\n }\n return childData;\n}\n\n//# sourceMappingURL=recordbatch.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Type } from '../enum';\nimport { Chunked } from './chunked';\nimport { clampRange } from '../util/vector';\nimport { AbstractVector, Vector } from '../vector';\n/** @ignore */\nexport class BaseVector extends AbstractVector {\n constructor(data, children) {\n super();\n this._children = children;\n this.numChildren = data.childData.length;\n this._bindDataAccessors(this.data = data);\n }\n get type() { return this.data.type; }\n get typeId() { return this.data.typeId; }\n get length() { return this.data.length; }\n get offset() { return this.data.offset; }\n get stride() { return this.data.stride; }\n get nullCount() { return this.data.nullCount; }\n get byteLength() { return this.data.byteLength; }\n get VectorName() { return `${Type[this.typeId]}Vector`; }\n get ArrayType() { return this.type.ArrayType; }\n get values() { return this.data.values; }\n get typeIds() { return this.data.typeIds; }\n get nullBitmap() { return this.data.nullBitmap; }\n get valueOffsets() { return this.data.valueOffsets; }\n get [Symbol.toStringTag]() { return `${this.VectorName}<${this.type[Symbol.toStringTag]}>`; }\n clone(data, children = this._children) {\n return Vector.new(data, children);\n }\n concat(...others) {\n return Chunked.concat(this, ...others);\n }\n slice(begin, end) {\n // Adjust args similar to Array.prototype.slice. Normalize begin/end to\n // clamp between 0 and length, and wrap around on negative indices, e.g.\n // slice(-1, 5) or slice(5, -1)\n return clampRange(this, begin, end, this._sliceInternal);\n }\n isValid(index) {\n if (this.nullCount > 0) {\n const idx = this.offset + index;\n const val = this.nullBitmap[idx >> 3];\n const mask = (val & (1 << (idx % 8)));\n return mask !== 0;\n }\n return true;\n }\n getChildAt(index) {\n return index < 0 || index >= this.numChildren ? null : ((this._children || (this._children = []))[index] ||\n (this._children[index] = Vector.new(this.data.childData[index])));\n }\n toJSON() { return [...this]; }\n _sliceInternal(self, begin, end) {\n return self.clone(self.data.slice(begin, end - begin), null);\n }\n // @ts-ignore\n _bindDataAccessors(data) {\n // Implementation in src/vectors/index.ts due to circular dependency/packaging shenanigans\n }\n}\nBaseVector.prototype[Symbol.isConcatSpreadable] = true;\n\n//# sourceMappingURL=base.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Vector } from '../vector';\nimport { BaseVector } from './base';\nimport { Utf8 } from '../type';\n/** @ignore */\nexport class BinaryVector extends BaseVector {\n asUtf8() {\n return Vector.new(this.data.clone(new Utf8()));\n }\n}\n\n//# sourceMappingURL=binary.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Bool } from '../type';\nimport { BaseVector } from './base';\nimport { vectorFromValuesWithType } from './index';\n/** @ignore */\nexport class BoolVector extends BaseVector {\n /** @nocollapse */\n static from(input) {\n return vectorFromValuesWithType(() => new Bool(), input);\n }\n}\n\n//# sourceMappingURL=bool.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { DateUnit } from '../enum';\nimport { BaseVector } from './base';\nimport { vectorFromValuesWithType } from './index';\nimport { DateDay, DateMillisecond } from '../type';\n/** @ignore */\nexport class DateVector extends BaseVector {\n /** @nocollapse */\n static from(...args) {\n if (args.length === 2) {\n return vectorFromValuesWithType(() => args[1] === DateUnit.DAY ? new DateDay() : new DateMillisecond(), args[0]);\n }\n return vectorFromValuesWithType(() => new DateMillisecond(), args[0]);\n }\n}\n/** @ignore */\nexport class DateDayVector extends DateVector {\n}\n/** @ignore */\nexport class DateMillisecondVector extends DateVector {\n}\n\n//# sourceMappingURL=date.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { BaseVector } from './base';\n/** @ignore */\nexport class DecimalVector extends BaseVector {\n}\n\n//# sourceMappingURL=decimal.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Data } from '../data';\nimport { Vector } from '../vector';\nimport { BaseVector } from './base';\nimport { vectorFromValuesWithType } from './index';\nimport { Dictionary } from '../type';\n/** @ignore */\nexport class DictionaryVector extends BaseVector {\n constructor(data) {\n super(data);\n this.indices = Vector.new(data.clone(this.type.indices));\n }\n /** @nocollapse */\n static from(...args) {\n if (args.length === 3) {\n const [values, indices, keys] = args;\n const type = new Dictionary(values.type, indices, null, null);\n return Vector.new(Data.Dictionary(type, 0, keys.length, 0, null, keys, values));\n }\n return vectorFromValuesWithType(() => args[0].type, args[0]);\n }\n get dictionary() { return this.data.dictionary; }\n reverseLookup(value) { return this.dictionary.indexOf(value); }\n getKey(idx) { return this.indices.get(idx); }\n getValue(key) { return this.dictionary.get(key); }\n setKey(idx, key) { return this.indices.set(idx, key); }\n setValue(key, value) { return this.dictionary.set(key, value); }\n}\nDictionaryVector.prototype.indices = null;\n\n//# sourceMappingURL=dictionary.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { BaseVector } from './base';\n/** @ignore */\nexport class FixedSizeBinaryVector extends BaseVector {\n}\n\n//# sourceMappingURL=fixedsizebinary.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { BaseVector } from './base';\n/** @ignore */\nexport class FixedSizeListVector extends BaseVector {\n}\n\n//# sourceMappingURL=fixedsizelist.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Data } from '../data';\nimport { Vector } from '../vector';\nimport { BaseVector } from './base';\nimport { vectorFromValuesWithType } from './index';\nimport { Float16, Float32, Float64 } from '../type';\n/** @ignore */\nexport class FloatVector extends BaseVector {\n /** @nocollapse */\n static from(input) {\n let ArrowType = vectorTypeToDataType(this);\n if ((input instanceof ArrayBuffer) || ArrayBuffer.isView(input)) {\n let InputType = arrayTypeToDataType(input.constructor) || ArrowType;\n // Special case, infer the Arrow DataType from the input if calling the base\n // FloatVector.from with a TypedArray, e.g. `FloatVector.from(new Float32Array())`\n if (ArrowType === null) {\n ArrowType = InputType;\n }\n // If the DataType inferred from the Vector constructor matches the\n // DataType inferred from the input arguments, return zero-copy view\n if (ArrowType && ArrowType === InputType) {\n let type = new ArrowType();\n let length = input.byteLength / type.ArrayType.BYTES_PER_ELEMENT;\n // If the ArrowType is Float16 but the input type isn't a Uint16Array,\n // let the Float16Builder handle casting the input values to Uint16s.\n if (!convertTo16Bit(ArrowType, input.constructor)) {\n return Vector.new(Data.Float(type, 0, length, 0, null, input));\n }\n }\n }\n if (ArrowType) {\n // If the DataType inferred from the Vector constructor is different than\n // the DataType inferred from the input TypedArray, or if input isn't a\n // TypedArray, use the Builders to construct the result Vector\n return vectorFromValuesWithType(() => new ArrowType(), input);\n }\n if ((input instanceof DataView) || (input instanceof ArrayBuffer)) {\n throw new TypeError(`Cannot infer float type from instance of ${input.constructor.name}`);\n }\n throw new TypeError('Unrecognized FloatVector input');\n }\n}\n/** @ignore */\nexport class Float16Vector extends FloatVector {\n // Since JS doesn't have half floats, `toArray()` returns a zero-copy slice\n // of the underlying Uint16Array data. This behavior ensures we don't incur\n // extra compute or copies if you're calling `toArray()` in order to create\n // a buffer for something like WebGL. Buf if you're using JS and want typed\n // arrays of 4-to-8-byte precision, these methods will enumerate the values\n // and clamp to the desired byte lengths.\n toFloat32Array() { return new Float32Array(this); }\n toFloat64Array() { return new Float64Array(this); }\n}\n/** @ignore */\nexport class Float32Vector extends FloatVector {\n}\n/** @ignore */\nexport class Float64Vector extends FloatVector {\n}\nconst convertTo16Bit = (typeCtor, dataCtor) => {\n return (typeCtor === Float16) && (dataCtor !== Uint16Array);\n};\n/** @ignore */\nconst arrayTypeToDataType = (ctor) => {\n switch (ctor) {\n case Uint16Array: return Float16;\n case Float32Array: return Float32;\n case Float64Array: return Float64;\n default: return null;\n }\n};\n/** @ignore */\nconst vectorTypeToDataType = (ctor) => {\n switch (ctor) {\n case Float16Vector: return Float16;\n case Float32Vector: return Float32;\n case Float64Vector: return Float64;\n default: return null;\n }\n};\n\n//# sourceMappingURL=float.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { BaseVector } from './base';\n/** @ignore */\nexport class IntervalVector extends BaseVector {\n}\n/** @ignore */\nexport class IntervalDayTimeVector extends IntervalVector {\n}\n/** @ignore */\nexport class IntervalYearMonthVector extends IntervalVector {\n}\n\n//# sourceMappingURL=interval.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Data } from '../data';\nimport { Vector } from '../vector';\nimport { BaseVector } from './base';\nimport { vectorFromValuesWithType } from './index';\nimport { BigInt64Array, BigUint64Array } from '../util/compat';\nimport { toBigInt64Array, toBigUint64Array } from '../util/buffer';\nimport { Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64 } from '../type';\n/** @ignore */\nexport class IntVector extends BaseVector {\n /** @nocollapse */\n static from(...args) {\n let [input, is64bit = false] = args;\n let ArrowType = vectorTypeToDataType(this, is64bit);\n if ((input instanceof ArrayBuffer) || ArrayBuffer.isView(input)) {\n let InputType = arrayTypeToDataType(input.constructor, is64bit) || ArrowType;\n // Special case, infer the Arrow DataType from the input if calling the base\n // IntVector.from with a TypedArray, e.g. `IntVector.from(new Int32Array())`\n if (ArrowType === null) {\n ArrowType = InputType;\n }\n // If the DataType inferred from the Vector constructor matches the\n // DataType inferred from the input arguments, return zero-copy view\n if (ArrowType && ArrowType === InputType) {\n let type = new ArrowType();\n let length = input.byteLength / type.ArrayType.BYTES_PER_ELEMENT;\n // If the ArrowType is 64bit but the input type is 32bit pairs, update the logical length\n if (convert32To64Bit(ArrowType, input.constructor)) {\n length *= 0.5;\n }\n return Vector.new(Data.Int(type, 0, length, 0, null, input));\n }\n }\n if (ArrowType) {\n // If the DataType inferred from the Vector constructor is different than\n // the DataType inferred from the input TypedArray, or if input isn't a\n // TypedArray, use the Builders to construct the result Vector\n return vectorFromValuesWithType(() => new ArrowType(), input);\n }\n if ((input instanceof DataView) || (input instanceof ArrayBuffer)) {\n throw new TypeError(`Cannot infer integer type from instance of ${input.constructor.name}`);\n }\n throw new TypeError('Unrecognized IntVector input');\n }\n}\n/** @ignore */\nexport class Int8Vector extends IntVector {\n}\n/** @ignore */\nexport class Int16Vector extends IntVector {\n}\n/** @ignore */\nexport class Int32Vector extends IntVector {\n}\n/** @ignore */\nexport class Int64Vector extends IntVector {\n toBigInt64Array() {\n return toBigInt64Array(this.values);\n }\n get values64() {\n return this._values64 || (this._values64 = this.toBigInt64Array());\n }\n}\n/** @ignore */\nexport class Uint8Vector extends IntVector {\n}\n/** @ignore */\nexport class Uint16Vector extends IntVector {\n}\n/** @ignore */\nexport class Uint32Vector extends IntVector {\n}\n/** @ignore */\nexport class Uint64Vector extends IntVector {\n toBigUint64Array() {\n return toBigUint64Array(this.values);\n }\n get values64() {\n return this._values64 || (this._values64 = this.toBigUint64Array());\n }\n}\nconst convert32To64Bit = (typeCtor, dataCtor) => {\n return (typeCtor === Int64 || typeCtor === Uint64) &&\n (dataCtor === Int32Array || dataCtor === Uint32Array);\n};\n/** @ignore */\nconst arrayTypeToDataType = (ctor, is64bit) => {\n switch (ctor) {\n case Int8Array: return Int8;\n case Int16Array: return Int16;\n case Int32Array: return is64bit ? Int64 : Int32;\n case BigInt64Array: return Int64;\n case Uint8Array: return Uint8;\n case Uint16Array: return Uint16;\n case Uint32Array: return is64bit ? Uint64 : Uint32;\n case BigUint64Array: return Uint64;\n default: return null;\n }\n};\n/** @ignore */\nconst vectorTypeToDataType = (ctor, is64bit) => {\n switch (ctor) {\n case Int8Vector: return Int8;\n case Int16Vector: return Int16;\n case Int32Vector: return is64bit ? Int64 : Int32;\n case Int64Vector: return Int64;\n case Uint8Vector: return Uint8;\n case Uint16Vector: return Uint16;\n case Uint32Vector: return is64bit ? Uint64 : Uint32;\n case Uint64Vector: return Uint64;\n default: return null;\n }\n};\n\n//# sourceMappingURL=int.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { BaseVector } from './base';\n/** @ignore */\nexport class ListVector extends BaseVector {\n}\n\n//# sourceMappingURL=list.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { MapRow } from './row';\nimport { Vector } from '../vector';\nimport { BaseVector } from './base';\nimport { List } from '../type';\n/** @ignore */\nexport class MapVector extends BaseVector {\n asList() {\n const child = this.type.children[0];\n return Vector.new(this.data.clone(new List(child)));\n }\n bind(index) {\n const child = this.getChildAt(0);\n const { [index]: begin, [index + 1]: end } = this.valueOffsets;\n return new MapRow(child.slice(begin, end));\n }\n}\n\n//# sourceMappingURL=map.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { BaseVector } from './base';\n/** @ignore */\nexport class NullVector extends BaseVector {\n}\n\n//# sourceMappingURL=null.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { StructRow } from './row';\nimport { BaseVector } from './base';\n/** @ignore */ const kRowIndex = Symbol.for('rowIndex');\n/** @ignore */\nexport class StructVector extends BaseVector {\n bind(index) {\n const proto = this._row || (this._row = new StructRow(this));\n const bound = Object.create(proto);\n bound[kRowIndex] = index;\n return bound;\n }\n}\n\n//# sourceMappingURL=struct.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { BaseVector } from './base';\n/** @ignore */\nexport class TimestampVector extends BaseVector {\n}\n/** @ignore */\nexport class TimestampSecondVector extends TimestampVector {\n}\n/** @ignore */\nexport class TimestampMillisecondVector extends TimestampVector {\n}\n/** @ignore */\nexport class TimestampMicrosecondVector extends TimestampVector {\n}\n/** @ignore */\nexport class TimestampNanosecondVector extends TimestampVector {\n}\n\n//# sourceMappingURL=timestamp.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { BaseVector } from './base';\n/** @ignore */\nexport class TimeVector extends BaseVector {\n}\n/** @ignore */\nexport class TimeSecondVector extends TimeVector {\n}\n/** @ignore */\nexport class TimeMillisecondVector extends TimeVector {\n}\n/** @ignore */\nexport class TimeMicrosecondVector extends TimeVector {\n}\n/** @ignore */\nexport class TimeNanosecondVector extends TimeVector {\n}\n\n//# sourceMappingURL=time.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { BaseVector } from './base';\n/** @ignore */\nexport class UnionVector extends BaseVector {\n get typeIdToChildIndex() { return this.data.type.typeIdToChildIndex; }\n}\n/** @ignore */\nexport class DenseUnionVector extends UnionVector {\n get valueOffsets() { return this.data.valueOffsets; }\n}\n/** @ignore */\nexport class SparseUnionVector extends UnionVector {\n}\n\n//# sourceMappingURL=union.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Vector } from '../vector';\nimport { BaseVector } from './base';\nimport { Binary, Utf8 } from '../type';\nimport { vectorFromValuesWithType } from './index';\n/** @ignore */\nexport class Utf8Vector extends BaseVector {\n /** @nocollapse */\n static from(input) {\n return vectorFromValuesWithType(() => new Utf8(), input);\n }\n asBinary() {\n return Vector.new(this.data.clone(new Binary()));\n }\n}\n\n//# sourceMappingURL=utf8.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n/** @ignore */\nexport function partial0(visit) {\n return function () { return visit(this); };\n}\n/** @ignore */\nexport function partial1(visit) {\n return function (a) { return visit(this, a); };\n}\n/** @ignore */\nexport function partial2(visit) {\n return function (a, b) { return visit(this, a, b); };\n}\n\n//# sourceMappingURL=fn.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { BN } from '../util/bn';\nimport { Visitor } from '../visitor';\nimport { decodeUtf8 } from '../util/utf8';\nimport { uint16ToFloat64 } from '../util/math';\nimport { UnionMode, Precision, DateUnit, TimeUnit, IntervalUnit } from '../enum';\n/** @ignore */\nexport class GetVisitor extends Visitor {\n}\n/** @ignore */ const epochDaysToMs = (data, index) => 86400000 * data[index];\n/** @ignore */ const epochMillisecondsLongToMs = (data, index) => 4294967296 * (data[index + 1]) + (data[index] >>> 0);\n/** @ignore */ const epochMicrosecondsLongToMs = (data, index) => 4294967296 * (data[index + 1] / 1000) + ((data[index] >>> 0) / 1000);\n/** @ignore */ const epochNanosecondsLongToMs = (data, index) => 4294967296 * (data[index + 1] / 1000000) + ((data[index] >>> 0) / 1000000);\n/** @ignore */ const epochMillisecondsToDate = (epochMs) => new Date(epochMs);\n/** @ignore */ const epochDaysToDate = (data, index) => epochMillisecondsToDate(epochDaysToMs(data, index));\n/** @ignore */ const epochMillisecondsLongToDate = (data, index) => epochMillisecondsToDate(epochMillisecondsLongToMs(data, index));\n/** @ignore */\nconst getNull = (_vector, _index) => null;\n/** @ignore */\nconst getVariableWidthBytes = (values, valueOffsets, index) => {\n const { [index]: x, [index + 1]: y } = valueOffsets;\n return x != null && y != null ? values.subarray(x, y) : null;\n};\n/** @ignore */\nconst getBool = ({ offset, values }, index) => {\n const idx = offset + index;\n const byte = values[idx >> 3];\n return (byte & 1 << (idx % 8)) !== 0;\n};\n/** @ignore */\nconst getDateDay = ({ values }, index) => epochDaysToDate(values, index);\n/** @ignore */\nconst getDateMillisecond = ({ values }, index) => epochMillisecondsLongToDate(values, index * 2);\n/** @ignore */\nconst getNumeric = ({ stride, values }, index) => values[stride * index];\n/** @ignore */\nconst getFloat16 = ({ stride, values }, index) => uint16ToFloat64(values[stride * index]);\n/** @ignore */\nconst getBigInts = ({ stride, values, type }, index) => BN.new(values.subarray(stride * index, stride * (index + 1)), type.isSigned);\n/** @ignore */\nconst getFixedSizeBinary = ({ stride, values }, index) => values.subarray(stride * index, stride * (index + 1));\n/** @ignore */\nconst getBinary = ({ values, valueOffsets }, index) => getVariableWidthBytes(values, valueOffsets, index);\n/** @ignore */\nconst getUtf8 = ({ values, valueOffsets }, index) => {\n const bytes = getVariableWidthBytes(values, valueOffsets, index);\n return bytes !== null ? decodeUtf8(bytes) : null;\n};\n/* istanbul ignore next */\n/** @ignore */\nconst getInt = (vector, index) => (vector.type.bitWidth < 64\n ? getNumeric(vector, index)\n : getBigInts(vector, index));\n/* istanbul ignore next */\n/** @ignore */\nconst getFloat = (vector, index) => (vector.type.precision !== Precision.HALF\n ? getNumeric(vector, index)\n : getFloat16(vector, index));\n/* istanbul ignore next */\n/** @ignore */\nconst getDate = (vector, index) => (vector.type.unit === DateUnit.DAY\n ? getDateDay(vector, index)\n : getDateMillisecond(vector, index));\n/** @ignore */\nconst getTimestampSecond = ({ values }, index) => 1000 * epochMillisecondsLongToMs(values, index * 2);\n/** @ignore */\nconst getTimestampMillisecond = ({ values }, index) => epochMillisecondsLongToMs(values, index * 2);\n/** @ignore */\nconst getTimestampMicrosecond = ({ values }, index) => epochMicrosecondsLongToMs(values, index * 2);\n/** @ignore */\nconst getTimestampNanosecond = ({ values }, index) => epochNanosecondsLongToMs(values, index * 2);\n/* istanbul ignore next */\n/** @ignore */\nconst getTimestamp = (vector, index) => {\n switch (vector.type.unit) {\n case TimeUnit.SECOND: return getTimestampSecond(vector, index);\n case TimeUnit.MILLISECOND: return getTimestampMillisecond(vector, index);\n case TimeUnit.MICROSECOND: return getTimestampMicrosecond(vector, index);\n case TimeUnit.NANOSECOND: return getTimestampNanosecond(vector, index);\n }\n};\n/** @ignore */\nconst getTimeSecond = ({ values, stride }, index) => values[stride * index];\n/** @ignore */\nconst getTimeMillisecond = ({ values, stride }, index) => values[stride * index];\n/** @ignore */\nconst getTimeMicrosecond = ({ values }, index) => BN.signed(values.subarray(2 * index, 2 * (index + 1)));\n/** @ignore */\nconst getTimeNanosecond = ({ values }, index) => BN.signed(values.subarray(2 * index, 2 * (index + 1)));\n/* istanbul ignore next */\n/** @ignore */\nconst getTime = (vector, index) => {\n switch (vector.type.unit) {\n case TimeUnit.SECOND: return getTimeSecond(vector, index);\n case TimeUnit.MILLISECOND: return getTimeMillisecond(vector, index);\n case TimeUnit.MICROSECOND: return getTimeMicrosecond(vector, index);\n case TimeUnit.NANOSECOND: return getTimeNanosecond(vector, index);\n }\n};\n/** @ignore */\nconst getDecimal = ({ values }, index) => BN.decimal(values.subarray(4 * index, 4 * (index + 1)));\n/** @ignore */\nconst getList = (vector, index) => {\n const child = vector.getChildAt(0), { valueOffsets, stride } = vector;\n return child.slice(valueOffsets[index * stride], valueOffsets[(index * stride) + 1]);\n};\n/** @ignore */\nconst getMap = (vector, index) => {\n return vector.bind(index);\n};\n/** @ignore */\nconst getStruct = (vector, index) => {\n return vector.bind(index);\n};\n/* istanbul ignore next */\n/** @ignore */\nconst getUnion = (vector, index) => {\n return vector.type.mode === UnionMode.Dense ?\n getDenseUnion(vector, index) :\n getSparseUnion(vector, index);\n};\n/** @ignore */\nconst getDenseUnion = (vector, index) => {\n const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]];\n const child = vector.getChildAt(childIndex);\n return child ? child.get(vector.valueOffsets[index]) : null;\n};\n/** @ignore */\nconst getSparseUnion = (vector, index) => {\n const childIndex = vector.typeIdToChildIndex[vector.typeIds[index]];\n const child = vector.getChildAt(childIndex);\n return child ? child.get(index) : null;\n};\n/** @ignore */\nconst getDictionary = (vector, index) => {\n return vector.getValue(vector.getKey(index));\n};\n/* istanbul ignore next */\n/** @ignore */\nconst getInterval = (vector, index) => (vector.type.unit === IntervalUnit.DAY_TIME)\n ? getIntervalDayTime(vector, index)\n : getIntervalYearMonth(vector, index);\n/** @ignore */\nconst getIntervalDayTime = ({ values }, index) => values.subarray(2 * index, 2 * (index + 1));\n/** @ignore */\nconst getIntervalYearMonth = ({ values }, index) => {\n const interval = values[index];\n const int32s = new Int32Array(2);\n int32s[0] = interval / 12 | 0; /* years */\n int32s[1] = interval % 12 | 0; /* months */\n return int32s;\n};\n/** @ignore */\nconst getFixedSizeList = (vector, index) => {\n const child = vector.getChildAt(0), { stride } = vector;\n return child.slice(index * stride, (index + 1) * stride);\n};\nGetVisitor.prototype.visitNull = getNull;\nGetVisitor.prototype.visitBool = getBool;\nGetVisitor.prototype.visitInt = getInt;\nGetVisitor.prototype.visitInt8 = getNumeric;\nGetVisitor.prototype.visitInt16 = getNumeric;\nGetVisitor.prototype.visitInt32 = getNumeric;\nGetVisitor.prototype.visitInt64 = getBigInts;\nGetVisitor.prototype.visitUint8 = getNumeric;\nGetVisitor.prototype.visitUint16 = getNumeric;\nGetVisitor.prototype.visitUint32 = getNumeric;\nGetVisitor.prototype.visitUint64 = getBigInts;\nGetVisitor.prototype.visitFloat = getFloat;\nGetVisitor.prototype.visitFloat16 = getFloat16;\nGetVisitor.prototype.visitFloat32 = getNumeric;\nGetVisitor.prototype.visitFloat64 = getNumeric;\nGetVisitor.prototype.visitUtf8 = getUtf8;\nGetVisitor.prototype.visitBinary = getBinary;\nGetVisitor.prototype.visitFixedSizeBinary = getFixedSizeBinary;\nGetVisitor.prototype.visitDate = getDate;\nGetVisitor.prototype.visitDateDay = getDateDay;\nGetVisitor.prototype.visitDateMillisecond = getDateMillisecond;\nGetVisitor.prototype.visitTimestamp = getTimestamp;\nGetVisitor.prototype.visitTimestampSecond = getTimestampSecond;\nGetVisitor.prototype.visitTimestampMillisecond = getTimestampMillisecond;\nGetVisitor.prototype.visitTimestampMicrosecond = getTimestampMicrosecond;\nGetVisitor.prototype.visitTimestampNanosecond = getTimestampNanosecond;\nGetVisitor.prototype.visitTime = getTime;\nGetVisitor.prototype.visitTimeSecond = getTimeSecond;\nGetVisitor.prototype.visitTimeMillisecond = getTimeMillisecond;\nGetVisitor.prototype.visitTimeMicrosecond = getTimeMicrosecond;\nGetVisitor.prototype.visitTimeNanosecond = getTimeNanosecond;\nGetVisitor.prototype.visitDecimal = getDecimal;\nGetVisitor.prototype.visitList = getList;\nGetVisitor.prototype.visitStruct = getStruct;\nGetVisitor.prototype.visitUnion = getUnion;\nGetVisitor.prototype.visitDenseUnion = getDenseUnion;\nGetVisitor.prototype.visitSparseUnion = getSparseUnion;\nGetVisitor.prototype.visitDictionary = getDictionary;\nGetVisitor.prototype.visitInterval = getInterval;\nGetVisitor.prototype.visitIntervalDayTime = getIntervalDayTime;\nGetVisitor.prototype.visitIntervalYearMonth = getIntervalYearMonth;\nGetVisitor.prototype.visitFixedSizeList = getFixedSizeList;\nGetVisitor.prototype.visitMap = getMap;\n/** @ignore */\nexport const instance = new GetVisitor();\n\n//# sourceMappingURL=get.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Visitor } from '../visitor';\nimport { getBool, iterateBits } from '../util/bit';\nimport { createElementComparator } from '../util/vector';\n/** @ignore */\nexport class IndexOfVisitor extends Visitor {\n}\n/** @ignore */\nfunction nullIndexOf(vector, searchElement) {\n // if you're looking for nulls and the vector isn't empty, we've got 'em!\n return searchElement === null && vector.length > 0 ? 0 : -1;\n}\n/** @ignore */\nfunction indexOfNull(vector, fromIndex) {\n const { nullBitmap } = vector;\n if (!nullBitmap || vector.nullCount <= 0) {\n return -1;\n }\n let i = 0;\n for (const isValid of iterateBits(nullBitmap, vector.data.offset + (fromIndex || 0), vector.length, nullBitmap, getBool)) {\n if (!isValid) {\n return i;\n }\n ++i;\n }\n return -1;\n}\n/** @ignore */\nfunction indexOfValue(vector, searchElement, fromIndex) {\n if (searchElement === undefined) {\n return -1;\n }\n if (searchElement === null) {\n return indexOfNull(vector, fromIndex);\n }\n const compare = createElementComparator(searchElement);\n for (let i = (fromIndex || 0) - 1, n = vector.length; ++i < n;) {\n if (compare(vector.get(i))) {\n return i;\n }\n }\n return -1;\n}\n/** @ignore */\nfunction indexOfUnion(vector, searchElement, fromIndex) {\n // Unions are special -- they do have a nullBitmap, but so can their children.\n // If the searchElement is null, we don't know whether it came from the Union's\n // bitmap or one of its childrens'. So we don't interrogate the Union's bitmap,\n // since that will report the wrong index if a child has a null before the Union.\n const compare = createElementComparator(searchElement);\n for (let i = (fromIndex || 0) - 1, n = vector.length; ++i < n;) {\n if (compare(vector.get(i))) {\n return i;\n }\n }\n return -1;\n}\nIndexOfVisitor.prototype.visitNull = nullIndexOf;\nIndexOfVisitor.prototype.visitBool = indexOfValue;\nIndexOfVisitor.prototype.visitInt = indexOfValue;\nIndexOfVisitor.prototype.visitInt8 = indexOfValue;\nIndexOfVisitor.prototype.visitInt16 = indexOfValue;\nIndexOfVisitor.prototype.visitInt32 = indexOfValue;\nIndexOfVisitor.prototype.visitInt64 = indexOfValue;\nIndexOfVisitor.prototype.visitUint8 = indexOfValue;\nIndexOfVisitor.prototype.visitUint16 = indexOfValue;\nIndexOfVisitor.prototype.visitUint32 = indexOfValue;\nIndexOfVisitor.prototype.visitUint64 = indexOfValue;\nIndexOfVisitor.prototype.visitFloat = indexOfValue;\nIndexOfVisitor.prototype.visitFloat16 = indexOfValue;\nIndexOfVisitor.prototype.visitFloat32 = indexOfValue;\nIndexOfVisitor.prototype.visitFloat64 = indexOfValue;\nIndexOfVisitor.prototype.visitUtf8 = indexOfValue;\nIndexOfVisitor.prototype.visitBinary = indexOfValue;\nIndexOfVisitor.prototype.visitFixedSizeBinary = indexOfValue;\nIndexOfVisitor.prototype.visitDate = indexOfValue;\nIndexOfVisitor.prototype.visitDateDay = indexOfValue;\nIndexOfVisitor.prototype.visitDateMillisecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimestamp = indexOfValue;\nIndexOfVisitor.prototype.visitTimestampSecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimestampMillisecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimestampMicrosecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimestampNanosecond = indexOfValue;\nIndexOfVisitor.prototype.visitTime = indexOfValue;\nIndexOfVisitor.prototype.visitTimeSecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimeMillisecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimeMicrosecond = indexOfValue;\nIndexOfVisitor.prototype.visitTimeNanosecond = indexOfValue;\nIndexOfVisitor.prototype.visitDecimal = indexOfValue;\nIndexOfVisitor.prototype.visitList = indexOfValue;\nIndexOfVisitor.prototype.visitStruct = indexOfValue;\nIndexOfVisitor.prototype.visitUnion = indexOfValue;\nIndexOfVisitor.prototype.visitDenseUnion = indexOfUnion;\nIndexOfVisitor.prototype.visitSparseUnion = indexOfUnion;\nIndexOfVisitor.prototype.visitDictionary = indexOfValue;\nIndexOfVisitor.prototype.visitInterval = indexOfValue;\nIndexOfVisitor.prototype.visitIntervalDayTime = indexOfValue;\nIndexOfVisitor.prototype.visitIntervalYearMonth = indexOfValue;\nIndexOfVisitor.prototype.visitFixedSizeList = indexOfValue;\nIndexOfVisitor.prototype.visitMap = indexOfValue;\n/** @ignore */\nexport const instance = new IndexOfVisitor();\n\n//# sourceMappingURL=indexof.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Type } from '../enum';\nimport { Visitor } from '../visitor';\nimport { iterateBits } from '../util/bit';\nimport { instance as getVisitor } from './get';\n/** @ignore */\nexport class IteratorVisitor extends Visitor {\n}\n/** @ignore */\nfunction nullableIterator(vector) {\n const getFn = getVisitor.getVisitFn(vector);\n return iterateBits(vector.nullBitmap, vector.offset, vector.length, vector, (vec, idx, nullByte, nullBit) => ((nullByte & 1 << nullBit) !== 0) ? getFn(vec, idx) : null);\n}\n/** @ignore */\nfunction vectorIterator(vector) {\n // If nullable, iterate manually\n if (vector.nullCount > 0) {\n return nullableIterator(vector);\n }\n const { type, typeId, length } = vector;\n // Fast case, defer to native iterators if possible\n if (vector.stride === 1 && ((typeId === Type.Timestamp) ||\n (typeId === Type.Int && type.bitWidth !== 64) ||\n (typeId === Type.Time && type.bitWidth !== 64) ||\n (typeId === Type.Float && type.precision > 0 /* Precision.HALF */))) {\n return vector.values.subarray(0, length)[Symbol.iterator]();\n }\n // Otherwise, iterate manually\n return (function* (getFn) {\n for (let index = -1; ++index < length;) {\n yield getFn(vector, index);\n }\n })(getVisitor.getVisitFn(vector));\n}\nIteratorVisitor.prototype.visitNull = vectorIterator;\nIteratorVisitor.prototype.visitBool = vectorIterator;\nIteratorVisitor.prototype.visitInt = vectorIterator;\nIteratorVisitor.prototype.visitInt8 = vectorIterator;\nIteratorVisitor.prototype.visitInt16 = vectorIterator;\nIteratorVisitor.prototype.visitInt32 = vectorIterator;\nIteratorVisitor.prototype.visitInt64 = vectorIterator;\nIteratorVisitor.prototype.visitUint8 = vectorIterator;\nIteratorVisitor.prototype.visitUint16 = vectorIterator;\nIteratorVisitor.prototype.visitUint32 = vectorIterator;\nIteratorVisitor.prototype.visitUint64 = vectorIterator;\nIteratorVisitor.prototype.visitFloat = vectorIterator;\nIteratorVisitor.prototype.visitFloat16 = vectorIterator;\nIteratorVisitor.prototype.visitFloat32 = vectorIterator;\nIteratorVisitor.prototype.visitFloat64 = vectorIterator;\nIteratorVisitor.prototype.visitUtf8 = vectorIterator;\nIteratorVisitor.prototype.visitBinary = vectorIterator;\nIteratorVisitor.prototype.visitFixedSizeBinary = vectorIterator;\nIteratorVisitor.prototype.visitDate = vectorIterator;\nIteratorVisitor.prototype.visitDateDay = vectorIterator;\nIteratorVisitor.prototype.visitDateMillisecond = vectorIterator;\nIteratorVisitor.prototype.visitTimestamp = vectorIterator;\nIteratorVisitor.prototype.visitTimestampSecond = vectorIterator;\nIteratorVisitor.prototype.visitTimestampMillisecond = vectorIterator;\nIteratorVisitor.prototype.visitTimestampMicrosecond = vectorIterator;\nIteratorVisitor.prototype.visitTimestampNanosecond = vectorIterator;\nIteratorVisitor.prototype.visitTime = vectorIterator;\nIteratorVisitor.prototype.visitTimeSecond = vectorIterator;\nIteratorVisitor.prototype.visitTimeMillisecond = vectorIterator;\nIteratorVisitor.prototype.visitTimeMicrosecond = vectorIterator;\nIteratorVisitor.prototype.visitTimeNanosecond = vectorIterator;\nIteratorVisitor.prototype.visitDecimal = vectorIterator;\nIteratorVisitor.prototype.visitList = vectorIterator;\nIteratorVisitor.prototype.visitStruct = vectorIterator;\nIteratorVisitor.prototype.visitUnion = vectorIterator;\nIteratorVisitor.prototype.visitDenseUnion = vectorIterator;\nIteratorVisitor.prototype.visitSparseUnion = vectorIterator;\nIteratorVisitor.prototype.visitDictionary = vectorIterator;\nIteratorVisitor.prototype.visitInterval = vectorIterator;\nIteratorVisitor.prototype.visitIntervalDayTime = vectorIterator;\nIteratorVisitor.prototype.visitIntervalYearMonth = vectorIterator;\nIteratorVisitor.prototype.visitFixedSizeList = vectorIterator;\nIteratorVisitor.prototype.visitMap = vectorIterator;\n/** @ignore */\nexport const instance = new IteratorVisitor();\n\n//# sourceMappingURL=iterator.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Type } from '../enum';\nimport { Visitor } from '../visitor';\nimport { instance as iteratorVisitor } from './iterator';\n/** @ignore */\nexport class ToArrayVisitor extends Visitor {\n}\n/** @ignore */\nfunction arrayOfVector(vector) {\n const { type, length, stride } = vector;\n // Fast case, return subarray if possible\n switch (type.typeId) {\n case Type.Int:\n case Type.Float:\n case Type.Decimal:\n case Type.Time:\n case Type.Timestamp:\n return vector.values.subarray(0, length * stride);\n }\n // Otherwise if not primitive, slow copy\n return [...iteratorVisitor.visit(vector)];\n}\nToArrayVisitor.prototype.visitNull = arrayOfVector;\nToArrayVisitor.prototype.visitBool = arrayOfVector;\nToArrayVisitor.prototype.visitInt = arrayOfVector;\nToArrayVisitor.prototype.visitInt8 = arrayOfVector;\nToArrayVisitor.prototype.visitInt16 = arrayOfVector;\nToArrayVisitor.prototype.visitInt32 = arrayOfVector;\nToArrayVisitor.prototype.visitInt64 = arrayOfVector;\nToArrayVisitor.prototype.visitUint8 = arrayOfVector;\nToArrayVisitor.prototype.visitUint16 = arrayOfVector;\nToArrayVisitor.prototype.visitUint32 = arrayOfVector;\nToArrayVisitor.prototype.visitUint64 = arrayOfVector;\nToArrayVisitor.prototype.visitFloat = arrayOfVector;\nToArrayVisitor.prototype.visitFloat16 = arrayOfVector;\nToArrayVisitor.prototype.visitFloat32 = arrayOfVector;\nToArrayVisitor.prototype.visitFloat64 = arrayOfVector;\nToArrayVisitor.prototype.visitUtf8 = arrayOfVector;\nToArrayVisitor.prototype.visitBinary = arrayOfVector;\nToArrayVisitor.prototype.visitFixedSizeBinary = arrayOfVector;\nToArrayVisitor.prototype.visitDate = arrayOfVector;\nToArrayVisitor.prototype.visitDateDay = arrayOfVector;\nToArrayVisitor.prototype.visitDateMillisecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimestamp = arrayOfVector;\nToArrayVisitor.prototype.visitTimestampSecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimestampMillisecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimestampMicrosecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimestampNanosecond = arrayOfVector;\nToArrayVisitor.prototype.visitTime = arrayOfVector;\nToArrayVisitor.prototype.visitTimeSecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimeMillisecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimeMicrosecond = arrayOfVector;\nToArrayVisitor.prototype.visitTimeNanosecond = arrayOfVector;\nToArrayVisitor.prototype.visitDecimal = arrayOfVector;\nToArrayVisitor.prototype.visitList = arrayOfVector;\nToArrayVisitor.prototype.visitStruct = arrayOfVector;\nToArrayVisitor.prototype.visitUnion = arrayOfVector;\nToArrayVisitor.prototype.visitDenseUnion = arrayOfVector;\nToArrayVisitor.prototype.visitSparseUnion = arrayOfVector;\nToArrayVisitor.prototype.visitDictionary = arrayOfVector;\nToArrayVisitor.prototype.visitInterval = arrayOfVector;\nToArrayVisitor.prototype.visitIntervalDayTime = arrayOfVector;\nToArrayVisitor.prototype.visitIntervalYearMonth = arrayOfVector;\nToArrayVisitor.prototype.visitFixedSizeList = arrayOfVector;\nToArrayVisitor.prototype.visitMap = arrayOfVector;\n/** @ignore */\nexport const instance = new ToArrayVisitor();\n\n//# sourceMappingURL=toarray.mjs.map\n","/* istanbul ignore file */\nimport { Visitor } from '../visitor';\nimport { TimeUnit } from '../enum';\n/** @ignore */ const sum = (x, y) => x + y;\n/** @ignore */ const variableWidthColumnErrorMessage = (type) => `Cannot compute the byte width of variable-width column ${type}`;\n/** @ignore */\nexport class ByteWidthVisitor extends Visitor {\n visitNull(____) { return 0; }\n visitInt(type) { return type.bitWidth / 8; }\n visitFloat(type) { return type.ArrayType.BYTES_PER_ELEMENT; }\n visitBinary(type) { throw new Error(variableWidthColumnErrorMessage(type)); }\n visitUtf8(type) { throw new Error(variableWidthColumnErrorMessage(type)); }\n visitBool(____) { return 1 / 8; }\n visitDecimal(____) { return 16; }\n visitDate(type) { return (type.unit + 1) * 4; }\n visitTime(type) { return type.bitWidth / 8; }\n visitTimestamp(type) { return type.unit === TimeUnit.SECOND ? 4 : 8; }\n visitInterval(type) { return (type.unit + 1) * 4; }\n visitList(type) { throw new Error(variableWidthColumnErrorMessage(type)); }\n visitStruct(type) { return this.visitFields(type.children).reduce(sum, 0); }\n visitUnion(type) { return this.visitFields(type.children).reduce(sum, 0); }\n visitFixedSizeBinary(type) { return type.byteWidth; }\n visitFixedSizeList(type) { return type.listSize * this.visitFields(type.children).reduce(sum, 0); }\n visitMap(type) { return this.visitFields(type.children).reduce(sum, 0); }\n visitDictionary(type) { return this.visit(type.indices); }\n visitFields(fields) { return (fields || []).map((field) => this.visit(field.type)); }\n visitSchema(schema) { return this.visitFields(schema.fields).reduce(sum, 0); }\n}\n/** @ignore */\nexport const instance = new ByteWidthVisitor();\n\n//# sourceMappingURL=bytewidth.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Visitor } from '../visitor';\nimport { BinaryVector } from '../vector/binary';\nimport { BoolVector } from '../vector/bool';\nimport { DateVector, DateDayVector, DateMillisecondVector } from '../vector/date';\nimport { DecimalVector } from '../vector/decimal';\nimport { DictionaryVector } from '../vector/dictionary';\nimport { FixedSizeBinaryVector } from '../vector/fixedsizebinary';\nimport { FixedSizeListVector } from '../vector/fixedsizelist';\nimport { FloatVector, Float16Vector, Float32Vector, Float64Vector } from '../vector/float';\nimport { IntervalVector, IntervalDayTimeVector, IntervalYearMonthVector } from '../vector/interval';\nimport { IntVector, Int8Vector, Int16Vector, Int32Vector, Int64Vector, Uint8Vector, Uint16Vector, Uint32Vector, Uint64Vector } from '../vector/int';\nimport { ListVector } from '../vector/list';\nimport { MapVector } from '../vector/map';\nimport { NullVector } from '../vector/null';\nimport { StructVector } from '../vector/struct';\nimport { TimestampVector, TimestampSecondVector, TimestampMillisecondVector, TimestampMicrosecondVector, TimestampNanosecondVector } from '../vector/timestamp';\nimport { TimeVector, TimeSecondVector, TimeMillisecondVector, TimeMicrosecondVector, TimeNanosecondVector } from '../vector/time';\nimport { UnionVector, DenseUnionVector, SparseUnionVector } from '../vector/union';\nimport { Utf8Vector } from '../vector/utf8';\n/** @ignore */\nexport class GetVectorConstructor extends Visitor {\n visitNull() { return NullVector; }\n visitBool() { return BoolVector; }\n visitInt() { return IntVector; }\n visitInt8() { return Int8Vector; }\n visitInt16() { return Int16Vector; }\n visitInt32() { return Int32Vector; }\n visitInt64() { return Int64Vector; }\n visitUint8() { return Uint8Vector; }\n visitUint16() { return Uint16Vector; }\n visitUint32() { return Uint32Vector; }\n visitUint64() { return Uint64Vector; }\n visitFloat() { return FloatVector; }\n visitFloat16() { return Float16Vector; }\n visitFloat32() { return Float32Vector; }\n visitFloat64() { return Float64Vector; }\n visitUtf8() { return Utf8Vector; }\n visitBinary() { return BinaryVector; }\n visitFixedSizeBinary() { return FixedSizeBinaryVector; }\n visitDate() { return DateVector; }\n visitDateDay() { return DateDayVector; }\n visitDateMillisecond() { return DateMillisecondVector; }\n visitTimestamp() { return TimestampVector; }\n visitTimestampSecond() { return TimestampSecondVector; }\n visitTimestampMillisecond() { return TimestampMillisecondVector; }\n visitTimestampMicrosecond() { return TimestampMicrosecondVector; }\n visitTimestampNanosecond() { return TimestampNanosecondVector; }\n visitTime() { return TimeVector; }\n visitTimeSecond() { return TimeSecondVector; }\n visitTimeMillisecond() { return TimeMillisecondVector; }\n visitTimeMicrosecond() { return TimeMicrosecondVector; }\n visitTimeNanosecond() { return TimeNanosecondVector; }\n visitDecimal() { return DecimalVector; }\n visitList() { return ListVector; }\n visitStruct() { return StructVector; }\n visitUnion() { return UnionVector; }\n visitDenseUnion() { return DenseUnionVector; }\n visitSparseUnion() { return SparseUnionVector; }\n visitDictionary() { return DictionaryVector; }\n visitInterval() { return IntervalVector; }\n visitIntervalDayTime() { return IntervalDayTimeVector; }\n visitIntervalYearMonth() { return IntervalYearMonthVector; }\n visitFixedSizeList() { return FixedSizeListVector; }\n visitMap() { return MapVector; }\n}\n/** @ignore */\nexport const instance = new GetVectorConstructor();\n\n//# sourceMappingURL=vectorctor.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nexport { Vector } from '../vector';\nexport { BaseVector } from './base';\nexport { BinaryVector } from './binary';\nexport { BoolVector } from './bool';\nexport { Chunked } from './chunked';\nexport { DateVector, DateDayVector, DateMillisecondVector } from './date';\nexport { DecimalVector } from './decimal';\nexport { DictionaryVector } from './dictionary';\nexport { FixedSizeBinaryVector } from './fixedsizebinary';\nexport { FixedSizeListVector } from './fixedsizelist';\nexport { FloatVector, Float16Vector, Float32Vector, Float64Vector } from './float';\nexport { IntervalVector, IntervalDayTimeVector, IntervalYearMonthVector } from './interval';\nexport { IntVector, Int8Vector, Int16Vector, Int32Vector, Int64Vector, Uint8Vector, Uint16Vector, Uint32Vector, Uint64Vector } from './int';\nexport { ListVector } from './list';\nexport { MapVector } from './map';\nexport { NullVector } from './null';\nexport { StructVector } from './struct';\nexport { TimestampVector, TimestampSecondVector, TimestampMillisecondVector, TimestampMicrosecondVector, TimestampNanosecondVector } from './timestamp';\nexport { TimeVector, TimeSecondVector, TimeMillisecondVector, TimeMicrosecondVector, TimeNanosecondVector } from './time';\nexport { UnionVector, DenseUnionVector, SparseUnionVector } from './union';\nexport { Utf8Vector } from './utf8';\nexport { MapRow, StructRow } from './row';\nimport * as fn from '../util/fn';\nimport { Type } from '../enum';\nimport { Vector } from '../vector';\nimport { Chunked } from './chunked';\nimport { BaseVector } from './base';\nimport { setBool } from '../util/bit';\nimport { isIterable, isAsyncIterable } from '../util/compat';\nimport { Builder } from '../builder';\nimport { instance as getVisitor } from '../visitor/get';\nimport { instance as setVisitor } from '../visitor/set';\nimport { instance as indexOfVisitor } from '../visitor/indexof';\nimport { instance as toArrayVisitor } from '../visitor/toarray';\nimport { instance as iteratorVisitor } from '../visitor/iterator';\nimport { instance as byteWidthVisitor } from '../visitor/bytewidth';\nimport { instance as getVectorConstructor } from '../visitor/vectorctor';\n/** @nocollapse */\nVector.new = newVector;\n/** @nocollapse */\nVector.from = vectorFrom;\n/** @ignore */\nfunction newVector(data, ...args) {\n return new (getVectorConstructor.getVisitFn(data)())(data, ...args);\n}\n/** @ignore */\nexport function vectorFromValuesWithType(newDataType, input) {\n if (isIterable(input)) {\n return Vector.from({ 'nullValues': [null, undefined], type: newDataType(), 'values': input });\n }\n else if (isAsyncIterable(input)) {\n return Vector.from({ 'nullValues': [null, undefined], type: newDataType(), 'values': input });\n }\n const { 'values': values = [], 'type': type = newDataType(), 'nullValues': nullValues = [null, undefined], } = { ...input };\n return isIterable(values)\n ? Vector.from({ nullValues, ...input, type })\n : Vector.from({ nullValues, ...input, type });\n}\nfunction vectorFrom(input) {\n const { 'values': values = [], ...options } = { 'nullValues': [null, undefined], ...input };\n if (isIterable(values)) {\n const chunks = [...Builder.throughIterable(options)(values)];\n return chunks.length === 1 ? chunks[0] : Chunked.concat(chunks);\n }\n return (async (chunks) => {\n const transform = Builder.throughAsyncIterable(options);\n for await (const chunk of transform(values)) {\n chunks.push(chunk);\n }\n return chunks.length === 1 ? chunks[0] : Chunked.concat(chunks);\n })([]);\n}\n//\n// We provide the following method implementations for code navigability purposes only.\n// They're overridden at runtime below with the specific Visitor implementation for each type,\n// short-circuiting the usual Visitor traversal and reducing intermediate lookups and calls.\n// This comment is here to remind you to not set breakpoints in these function bodies, or to inform\n// you why the breakpoints you have already set are not being triggered. Have a great day!\n//\nBaseVector.prototype.get = function baseVectorGet(index) {\n return getVisitor.visit(this, index);\n};\nBaseVector.prototype.set = function baseVectorSet(index, value) {\n return setVisitor.visit(this, index, value);\n};\nBaseVector.prototype.indexOf = function baseVectorIndexOf(value, fromIndex) {\n return indexOfVisitor.visit(this, value, fromIndex);\n};\nBaseVector.prototype.toArray = function baseVectorToArray() {\n return toArrayVisitor.visit(this);\n};\nBaseVector.prototype.getByteWidth = function baseVectorGetByteWidth() {\n return byteWidthVisitor.visit(this.type);\n};\nBaseVector.prototype[Symbol.iterator] = function baseVectorSymbolIterator() {\n return iteratorVisitor.visit(this);\n};\nBaseVector.prototype._bindDataAccessors = bindBaseVectorDataAccessors;\n// Perf: bind and assign the operator Visitor methods to each of the Vector subclasses for each Type\nObject.keys(Type)\n .map((T) => Type[T])\n .filter((T) => typeof T === 'number')\n .filter((typeId) => typeId !== Type.NONE)\n .forEach((typeId) => {\n const VectorCtor = getVectorConstructor.visit(typeId);\n VectorCtor.prototype['get'] = fn.partial1(getVisitor.getVisitFn(typeId));\n VectorCtor.prototype['set'] = fn.partial2(setVisitor.getVisitFn(typeId));\n VectorCtor.prototype['indexOf'] = fn.partial2(indexOfVisitor.getVisitFn(typeId));\n VectorCtor.prototype['toArray'] = fn.partial0(toArrayVisitor.getVisitFn(typeId));\n VectorCtor.prototype['getByteWidth'] = partialType0(byteWidthVisitor.getVisitFn(typeId));\n VectorCtor.prototype[Symbol.iterator] = fn.partial0(iteratorVisitor.getVisitFn(typeId));\n});\n/** @ignore */\nfunction partialType0(visit) {\n return function () { return visit(this.type); };\n}\n/** @ignore */\nfunction wrapNullableGet(fn) {\n return function (i) { return this.isValid(i) ? fn.call(this, i) : null; };\n}\n/** @ignore */\nfunction wrapNullableSet(fn) {\n return function (i, a) {\n if (setBool(this.nullBitmap, this.offset + i, !(a === null || a === undefined))) {\n fn.call(this, i, a);\n }\n };\n}\n/** @ignore */\nfunction bindBaseVectorDataAccessors() {\n const nullBitmap = this.nullBitmap;\n if (nullBitmap && nullBitmap.byteLength > 0) {\n this.get = wrapNullableGet(this.get);\n this.set = wrapNullableSet(this.set);\n }\n}\n\n//# sourceMappingURL=index.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Column } from './column';\nimport { Schema } from './schema';\nimport { RecordBatch, _InternalEmptyPlaceholderRecordBatch } from './recordbatch';\nimport { RecordBatchReader } from './ipc/reader';\nimport { Struct } from './type';\nimport { selectColumnArgs, selectArgs } from './util/args';\nimport { isPromise, isIterable, isAsyncIterable } from './util/compat';\nimport { RecordBatchFileWriter, RecordBatchStreamWriter } from './ipc/writer';\nimport { distributeColumnsIntoRecordBatches, distributeVectorsIntoRecordBatches } from './util/recordbatch';\nimport { Chunked, StructVector } from './vector/index';\nexport class Table extends Chunked {\n constructor(...args) {\n let schema = null;\n if (args[0] instanceof Schema) {\n schema = args.shift();\n }\n let chunks = selectArgs(RecordBatch, args);\n if (!schema && !(schema = chunks[0] && chunks[0].schema)) {\n throw new TypeError('Table must be initialized with a Schema or at least one RecordBatch');\n }\n chunks[0] || (chunks[0] = new _InternalEmptyPlaceholderRecordBatch(schema));\n super(new Struct(schema.fields), chunks);\n this._schema = schema;\n this._chunks = chunks;\n }\n /** @nocollapse */\n static empty(schema = new Schema([])) { return new Table(schema, []); }\n /** @nocollapse */\n static from(input) {\n if (!input) {\n return Table.empty();\n }\n if (typeof input === 'object') {\n let table = isIterable(input['values']) ? tableFromIterable(input)\n : isAsyncIterable(input['values']) ? tableFromAsyncIterable(input)\n : null;\n if (table !== null) {\n return table;\n }\n }\n let reader = RecordBatchReader.from(input);\n if (isPromise(reader)) {\n return (async () => await Table.from(await reader))();\n }\n if (reader.isSync() && (reader = reader.open())) {\n return !reader.schema ? Table.empty() : new Table(reader.schema, [...reader]);\n }\n return (async (opening) => {\n const reader = await opening;\n const schema = reader.schema;\n const batches = [];\n if (schema) {\n for await (let batch of reader) {\n batches.push(batch);\n }\n return new Table(schema, batches);\n }\n return Table.empty();\n })(reader.open());\n }\n /** @nocollapse */\n static async fromAsync(source) {\n return await Table.from(source);\n }\n /** @nocollapse */\n static fromStruct(vector) {\n return Table.new(vector.data.childData, vector.type.children);\n }\n /** @nocollapse */\n static new(...cols) {\n return new Table(...distributeColumnsIntoRecordBatches(selectColumnArgs(cols)));\n }\n get schema() { return this._schema; }\n get length() { return this._length; }\n get chunks() { return this._chunks; }\n get numCols() { return this._numChildren; }\n clone(chunks = this._chunks) {\n return new Table(this._schema, chunks);\n }\n getColumn(name) {\n return this.getColumnAt(this.getColumnIndex(name));\n }\n getColumnAt(index) {\n return this.getChildAt(index);\n }\n getColumnIndex(name) {\n return this._schema.fields.findIndex((f) => f.name === name);\n }\n getChildAt(index) {\n if (index < 0 || index >= this.numChildren) {\n return null;\n }\n let field, child;\n const fields = this._schema.fields;\n const columns = this._children || (this._children = []);\n if (child = columns[index]) {\n return child;\n }\n if (field = fields[index]) {\n const chunks = this._chunks\n .map((chunk) => chunk.getChildAt(index))\n .filter((vec) => vec != null);\n if (chunks.length > 0) {\n return (columns[index] = new Column(field, chunks));\n }\n }\n return null;\n }\n // @ts-ignore\n serialize(encoding = 'binary', stream = true) {\n const Writer = !stream\n ? RecordBatchFileWriter\n : RecordBatchStreamWriter;\n return Writer.writeAll(this).toUint8Array(true);\n }\n count() {\n return this._length;\n }\n select(...columnNames) {\n const nameToIndex = this._schema.fields.reduce((m, f, i) => m.set(f.name, i), new Map());\n return this.selectAt(...columnNames.map((columnName) => nameToIndex.get(columnName)).filter((x) => x > -1));\n }\n selectAt(...columnIndices) {\n const schema = this._schema.selectAt(...columnIndices);\n return new Table(schema, this._chunks.map(({ length, data: { childData } }) => {\n return new RecordBatch(schema, length, columnIndices.map((i) => childData[i]).filter(Boolean));\n }));\n }\n assign(other) {\n const fields = this._schema.fields;\n const [indices, oldToNew] = other.schema.fields.reduce((memo, f2, newIdx) => {\n const [indices, oldToNew] = memo;\n const i = fields.findIndex((f) => f.name === f2.name);\n ~i ? (oldToNew[i] = newIdx) : indices.push(newIdx);\n return memo;\n }, [[], []]);\n const schema = this._schema.assign(other.schema);\n const columns = [\n ...fields.map((_f, i, _fs, j = oldToNew[i]) => (j === undefined ? this.getColumnAt(i) : other.getColumnAt(j))),\n ...indices.map((i) => other.getColumnAt(i))\n ].filter(Boolean);\n return new Table(...distributeVectorsIntoRecordBatches(schema, columns));\n }\n}\nfunction tableFromIterable(input) {\n const { type } = input;\n if (type instanceof Struct) {\n return Table.fromStruct(StructVector.from(input));\n }\n return null;\n}\nfunction tableFromAsyncIterable(input) {\n const { type } = input;\n if (type instanceof Struct) {\n return StructVector.from(input).then((vector) => Table.fromStruct(vector));\n }\n return null;\n}\n\n//# sourceMappingURL=table.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Data } from './data';\nimport { Table } from './table';\nimport { Vector } from './vector';\nimport { Visitor } from './visitor';\nimport { Schema } from './schema';\nimport { isIterable } from './util/compat';\nimport { Chunked } from './vector/chunked';\nimport { selectFieldArgs } from './util/args';\nimport { DataType, Struct } from './type';\nimport { ensureSameLengthData } from './util/recordbatch';\nimport { StructVector } from './vector/index';\nexport class RecordBatch extends StructVector {\n constructor(...args) {\n let data;\n let schema = args[0];\n let children;\n if (args[1] instanceof Data) {\n [, data, children] = args;\n }\n else {\n const fields = schema.fields;\n const [, length, childData] = args;\n data = Data.Struct(new Struct(fields), 0, length, 0, null, childData);\n }\n super(data, children);\n this._schema = schema;\n }\n /** @nocollapse */\n static from(options) {\n if (isIterable(options['values'])) {\n return Table.from(options);\n }\n return Table.from(options);\n }\n /** @nocollapse */\n static new(...args) {\n const [fs, xs] = selectFieldArgs(args);\n const vs = xs.filter((x) => x instanceof Vector);\n return new RecordBatch(...ensureSameLengthData(new Schema(fs), vs.map((x) => x.data)));\n }\n clone(data, children = this._children) {\n return new RecordBatch(this._schema, data, children);\n }\n concat(...others) {\n const schema = this._schema, chunks = Chunked.flatten(this, ...others);\n return new Table(schema, chunks.map(({ data }) => new RecordBatch(schema, data)));\n }\n get schema() { return this._schema; }\n get numCols() { return this._schema.fields.length; }\n get dictionaries() {\n return this._dictionaries || (this._dictionaries = DictionaryCollector.collect(this));\n }\n select(...columnNames) {\n const nameToIndex = this._schema.fields.reduce((m, f, i) => m.set(f.name, i), new Map());\n return this.selectAt(...columnNames.map((columnName) => nameToIndex.get(columnName)).filter((x) => x > -1));\n }\n selectAt(...columnIndices) {\n const schema = this._schema.selectAt(...columnIndices);\n const childData = columnIndices.map((i) => this.data.childData[i]).filter(Boolean);\n return new RecordBatch(schema, this.length, childData);\n }\n}\n/**\n * An internal class used by the `RecordBatchReader` and `RecordBatchWriter`\n * implementations to differentiate between a stream with valid zero-length\n * RecordBatches, and a stream with a Schema message, but no RecordBatches.\n * @see https://github.com/apache/arrow/pull/4373\n * @ignore\n * @private\n */\n/* tslint:disable:class-name */\nexport class _InternalEmptyPlaceholderRecordBatch extends RecordBatch {\n constructor(schema) {\n super(schema, 0, schema.fields.map((f) => Data.new(f.type, 0, 0, 0)));\n }\n}\n/** @ignore */\nclass DictionaryCollector extends Visitor {\n constructor() {\n super(...arguments);\n this.dictionaries = new Map();\n }\n static collect(batch) {\n return new DictionaryCollector().visit(batch.data, new Struct(batch.schema.fields)).dictionaries;\n }\n visit(data, type) {\n if (DataType.isDictionary(type)) {\n return this.visitDictionary(data, type);\n }\n else {\n data.childData.forEach((child, i) => this.visit(child, type.children[i].type));\n }\n return this;\n }\n visitDictionary(data, type) {\n const dictionary = data.dictionary;\n if (dictionary && dictionary.length > 0) {\n this.dictionaries.set(type.id, dictionary);\n }\n return this;\n }\n}\n\n//# sourceMappingURL=recordbatch.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Vector } from '../vector';\nimport { MessageHeader } from '../enum';\nimport { Footer } from './metadata/file';\nimport streamAdapters from '../io/adapters';\nimport { ByteStream, AsyncByteStream } from '../io/stream';\nimport { RandomAccessFile, AsyncRandomAccessFile } from '../io/file';\nimport { VectorLoader, JSONVectorLoader } from '../visitor/vectorloader';\nimport { RecordBatch, _InternalEmptyPlaceholderRecordBatch } from '../recordbatch';\nimport { ITERATOR_DONE, ReadableInterop, } from '../io/interfaces';\nimport { MessageReader, AsyncMessageReader, JSONMessageReader, checkForMagicArrowString, magicLength, magicAndPadding, magicX2AndPadding } from './message';\nimport { isPromise, isIterable, isAsyncIterable, isIteratorResult, isArrowJSON, isFileHandle, isFetchResponse, isReadableDOMStream, isReadableNodeStream } from '../util/compat';\nexport class RecordBatchReader extends ReadableInterop {\n constructor(impl) {\n super();\n this._impl = impl;\n }\n get closed() { return this._impl.closed; }\n get schema() { return this._impl.schema; }\n get autoDestroy() { return this._impl.autoDestroy; }\n get dictionaries() { return this._impl.dictionaries; }\n get numDictionaries() { return this._impl.numDictionaries; }\n get numRecordBatches() { return this._impl.numRecordBatches; }\n get footer() { return this._impl.isFile() ? this._impl.footer : null; }\n isSync() { return this._impl.isSync(); }\n isAsync() { return this._impl.isAsync(); }\n isFile() { return this._impl.isFile(); }\n isStream() { return this._impl.isStream(); }\n next() {\n return this._impl.next();\n }\n throw(value) {\n return this._impl.throw(value);\n }\n return(value) {\n return this._impl.return(value);\n }\n cancel() {\n return this._impl.cancel();\n }\n reset(schema) {\n this._impl.reset(schema);\n this._DOMStream = undefined;\n this._nodeStream = undefined;\n return this;\n }\n open(options) {\n const opening = this._impl.open(options);\n return isPromise(opening) ? opening.then(() => this) : this;\n }\n readRecordBatch(index) {\n return this._impl.isFile() ? this._impl.readRecordBatch(index) : null;\n }\n [Symbol.iterator]() {\n return this._impl[Symbol.iterator]();\n }\n [Symbol.asyncIterator]() {\n return this._impl[Symbol.asyncIterator]();\n }\n toDOMStream() {\n return streamAdapters.toDOMStream((this.isSync()\n ? { [Symbol.iterator]: () => this }\n : { [Symbol.asyncIterator]: () => this }));\n }\n toNodeStream() {\n return streamAdapters.toNodeStream((this.isSync()\n ? { [Symbol.iterator]: () => this }\n : { [Symbol.asyncIterator]: () => this }), { objectMode: true });\n }\n /** @nocollapse */\n // @ts-ignore\n static throughNode(options) {\n throw new Error(`\"throughNode\" not available in this environment`);\n }\n /** @nocollapse */\n static throughDOM(\n // @ts-ignore\n writableStrategy, \n // @ts-ignore\n readableStrategy) {\n throw new Error(`\"throughDOM\" not available in this environment`);\n }\n /** @nocollapse */\n static from(source) {\n if (source instanceof RecordBatchReader) {\n return source;\n }\n else if (isArrowJSON(source)) {\n return fromArrowJSON(source);\n }\n else if (isFileHandle(source)) {\n return fromFileHandle(source);\n }\n else if (isPromise(source)) {\n return (async () => await RecordBatchReader.from(await source))();\n }\n else if (isFetchResponse(source) || isReadableDOMStream(source) || isReadableNodeStream(source) || isAsyncIterable(source)) {\n return fromAsyncByteStream(new AsyncByteStream(source));\n }\n return fromByteStream(new ByteStream(source));\n }\n /** @nocollapse */\n static readAll(source) {\n if (source instanceof RecordBatchReader) {\n return source.isSync() ? readAllSync(source) : readAllAsync(source);\n }\n else if (isArrowJSON(source) || ArrayBuffer.isView(source) || isIterable(source) || isIteratorResult(source)) {\n return readAllSync(source);\n }\n return readAllAsync(source);\n }\n}\n//\n// Since TS is a structural type system, we define the following subclass stubs\n// so that concrete types exist to associate with with the interfaces below.\n//\n// The implementation for each RecordBatchReader is hidden away in the set of\n// `RecordBatchReaderImpl` classes in the second half of this file. This allows\n// us to export a single RecordBatchReader class, and swap out the impl based\n// on the io primitives or underlying arrow (JSON, file, or stream) at runtime.\n//\n// Async/await makes our job a bit harder, since it forces everything to be\n// either fully sync or fully async. This is why the logic for the reader impls\n// has been duplicated into both sync and async variants. Since the RBR\n// delegates to its impl, an RBR with an AsyncRecordBatchFileReaderImpl for\n// example will return async/await-friendly Promises, but one with a (sync)\n// RecordBatchStreamReaderImpl will always return values. Nothing should be\n// different about their logic, aside from the async handling. This is also why\n// this code looks highly structured, as it should be nearly identical and easy\n// to follow.\n//\n/** @ignore */\nexport class RecordBatchStreamReader extends RecordBatchReader {\n constructor(_impl) {\n super(_impl);\n this._impl = _impl;\n }\n [Symbol.iterator]() { return this._impl[Symbol.iterator](); }\n async *[Symbol.asyncIterator]() { yield* this[Symbol.iterator](); }\n}\n/** @ignore */\nexport class AsyncRecordBatchStreamReader extends RecordBatchReader {\n constructor(_impl) {\n super(_impl);\n this._impl = _impl;\n }\n [Symbol.iterator]() { throw new Error(`AsyncRecordBatchStreamReader is not Iterable`); }\n [Symbol.asyncIterator]() { return this._impl[Symbol.asyncIterator](); }\n}\n/** @ignore */\nexport class RecordBatchFileReader extends RecordBatchStreamReader {\n constructor(_impl) {\n super(_impl);\n this._impl = _impl;\n }\n}\n/** @ignore */\nexport class AsyncRecordBatchFileReader extends AsyncRecordBatchStreamReader {\n constructor(_impl) {\n super(_impl);\n this._impl = _impl;\n }\n}\n/** @ignore */\nclass RecordBatchReaderImpl {\n constructor(dictionaries = new Map()) {\n this.closed = false;\n this.autoDestroy = true;\n this._dictionaryIndex = 0;\n this._recordBatchIndex = 0;\n this.dictionaries = dictionaries;\n }\n get numDictionaries() { return this._dictionaryIndex; }\n get numRecordBatches() { return this._recordBatchIndex; }\n isSync() { return false; }\n isAsync() { return false; }\n isFile() { return false; }\n isStream() { return false; }\n reset(schema) {\n this._dictionaryIndex = 0;\n this._recordBatchIndex = 0;\n this.schema = schema;\n this.dictionaries = new Map();\n return this;\n }\n _loadRecordBatch(header, body) {\n return new RecordBatch(this.schema, header.length, this._loadVectors(header, body, this.schema.fields));\n }\n _loadDictionaryBatch(header, body) {\n const { id, isDelta, data } = header;\n const { dictionaries, schema } = this;\n const dictionary = dictionaries.get(id);\n if (isDelta || !dictionary) {\n const type = schema.dictionaries.get(id);\n return (dictionary && isDelta ? dictionary.concat(Vector.new(this._loadVectors(data, body, [type])[0])) :\n Vector.new(this._loadVectors(data, body, [type])[0]));\n }\n return dictionary;\n }\n _loadVectors(header, body, types) {\n return new VectorLoader(body, header.nodes, header.buffers, this.dictionaries).visitMany(types);\n }\n}\n/** @ignore */\nclass RecordBatchStreamReaderImpl extends RecordBatchReaderImpl {\n constructor(source, dictionaries) {\n super(dictionaries);\n this._reader = !isArrowJSON(source)\n ? new MessageReader(this._handle = source)\n : new JSONMessageReader(this._handle = source);\n }\n isSync() { return true; }\n isStream() { return true; }\n [Symbol.iterator]() {\n return this;\n }\n cancel() {\n if (!this.closed && (this.closed = true)) {\n this.reset()._reader.return();\n this._reader = null;\n this.dictionaries = null;\n }\n }\n open(options) {\n if (!this.closed) {\n this.autoDestroy = shouldAutoDestroy(this, options);\n if (!(this.schema || (this.schema = this._reader.readSchema()))) {\n this.cancel();\n }\n }\n return this;\n }\n throw(value) {\n if (!this.closed && this.autoDestroy && (this.closed = true)) {\n return this.reset()._reader.throw(value);\n }\n return ITERATOR_DONE;\n }\n return(value) {\n if (!this.closed && this.autoDestroy && (this.closed = true)) {\n return this.reset()._reader.return(value);\n }\n return ITERATOR_DONE;\n }\n next() {\n if (this.closed) {\n return ITERATOR_DONE;\n }\n let message, { _reader: reader } = this;\n while (message = this._readNextMessageAndValidate()) {\n if (message.isSchema()) {\n this.reset(message.header());\n }\n else if (message.isRecordBatch()) {\n this._recordBatchIndex++;\n const header = message.header();\n const buffer = reader.readMessageBody(message.bodyLength);\n const recordBatch = this._loadRecordBatch(header, buffer);\n return { done: false, value: recordBatch };\n }\n else if (message.isDictionaryBatch()) {\n this._dictionaryIndex++;\n const header = message.header();\n const buffer = reader.readMessageBody(message.bodyLength);\n const vector = this._loadDictionaryBatch(header, buffer);\n this.dictionaries.set(header.id, vector);\n }\n }\n if (this.schema && this._recordBatchIndex === 0) {\n this._recordBatchIndex++;\n return { done: false, value: new _InternalEmptyPlaceholderRecordBatch(this.schema) };\n }\n return this.return();\n }\n _readNextMessageAndValidate(type) {\n return this._reader.readMessage(type);\n }\n}\n/** @ignore */\nclass AsyncRecordBatchStreamReaderImpl extends RecordBatchReaderImpl {\n constructor(source, dictionaries) {\n super(dictionaries);\n this._reader = new AsyncMessageReader(this._handle = source);\n }\n isAsync() { return true; }\n isStream() { return true; }\n [Symbol.asyncIterator]() {\n return this;\n }\n async cancel() {\n if (!this.closed && (this.closed = true)) {\n await this.reset()._reader.return();\n this._reader = null;\n this.dictionaries = null;\n }\n }\n async open(options) {\n if (!this.closed) {\n this.autoDestroy = shouldAutoDestroy(this, options);\n if (!(this.schema || (this.schema = (await this._reader.readSchema())))) {\n await this.cancel();\n }\n }\n return this;\n }\n async throw(value) {\n if (!this.closed && this.autoDestroy && (this.closed = true)) {\n return await this.reset()._reader.throw(value);\n }\n return ITERATOR_DONE;\n }\n async return(value) {\n if (!this.closed && this.autoDestroy && (this.closed = true)) {\n return await this.reset()._reader.return(value);\n }\n return ITERATOR_DONE;\n }\n async next() {\n if (this.closed) {\n return ITERATOR_DONE;\n }\n let message, { _reader: reader } = this;\n while (message = await this._readNextMessageAndValidate()) {\n if (message.isSchema()) {\n await this.reset(message.header());\n }\n else if (message.isRecordBatch()) {\n this._recordBatchIndex++;\n const header = message.header();\n const buffer = await reader.readMessageBody(message.bodyLength);\n const recordBatch = this._loadRecordBatch(header, buffer);\n return { done: false, value: recordBatch };\n }\n else if (message.isDictionaryBatch()) {\n this._dictionaryIndex++;\n const header = message.header();\n const buffer = await reader.readMessageBody(message.bodyLength);\n const vector = this._loadDictionaryBatch(header, buffer);\n this.dictionaries.set(header.id, vector);\n }\n }\n if (this.schema && this._recordBatchIndex === 0) {\n this._recordBatchIndex++;\n return { done: false, value: new _InternalEmptyPlaceholderRecordBatch(this.schema) };\n }\n return await this.return();\n }\n async _readNextMessageAndValidate(type) {\n return await this._reader.readMessage(type);\n }\n}\n/** @ignore */\nclass RecordBatchFileReaderImpl extends RecordBatchStreamReaderImpl {\n constructor(source, dictionaries) {\n super(source instanceof RandomAccessFile ? source : new RandomAccessFile(source), dictionaries);\n }\n get footer() { return this._footer; }\n get numDictionaries() { return this._footer ? this._footer.numDictionaries : 0; }\n get numRecordBatches() { return this._footer ? this._footer.numRecordBatches : 0; }\n isSync() { return true; }\n isFile() { return true; }\n open(options) {\n if (!this.closed && !this._footer) {\n this.schema = (this._footer = this._readFooter()).schema;\n for (const block of this._footer.dictionaryBatches()) {\n block && this._readDictionaryBatch(this._dictionaryIndex++);\n }\n }\n return super.open(options);\n }\n readRecordBatch(index) {\n if (this.closed) {\n return null;\n }\n if (!this._footer) {\n this.open();\n }\n const block = this._footer && this._footer.getRecordBatch(index);\n if (block && this._handle.seek(block.offset)) {\n const message = this._reader.readMessage(MessageHeader.RecordBatch);\n if (message && message.isRecordBatch()) {\n const header = message.header();\n const buffer = this._reader.readMessageBody(message.bodyLength);\n const recordBatch = this._loadRecordBatch(header, buffer);\n return recordBatch;\n }\n }\n return null;\n }\n _readDictionaryBatch(index) {\n const block = this._footer && this._footer.getDictionaryBatch(index);\n if (block && this._handle.seek(block.offset)) {\n const message = this._reader.readMessage(MessageHeader.DictionaryBatch);\n if (message && message.isDictionaryBatch()) {\n const header = message.header();\n const buffer = this._reader.readMessageBody(message.bodyLength);\n const vector = this._loadDictionaryBatch(header, buffer);\n this.dictionaries.set(header.id, vector);\n }\n }\n }\n _readFooter() {\n const { _handle } = this;\n const offset = _handle.size - magicAndPadding;\n const length = _handle.readInt32(offset);\n const buffer = _handle.readAt(offset - length, length);\n return Footer.decode(buffer);\n }\n _readNextMessageAndValidate(type) {\n if (!this._footer) {\n this.open();\n }\n if (this._footer && this._recordBatchIndex < this.numRecordBatches) {\n const block = this._footer && this._footer.getRecordBatch(this._recordBatchIndex);\n if (block && this._handle.seek(block.offset)) {\n return this._reader.readMessage(type);\n }\n }\n return null;\n }\n}\n/** @ignore */\nclass AsyncRecordBatchFileReaderImpl extends AsyncRecordBatchStreamReaderImpl {\n constructor(source, ...rest) {\n const byteLength = typeof rest[0] !== 'number' ? rest.shift() : undefined;\n const dictionaries = rest[0] instanceof Map ? rest.shift() : undefined;\n super(source instanceof AsyncRandomAccessFile ? source : new AsyncRandomAccessFile(source, byteLength), dictionaries);\n }\n get footer() { return this._footer; }\n get numDictionaries() { return this._footer ? this._footer.numDictionaries : 0; }\n get numRecordBatches() { return this._footer ? this._footer.numRecordBatches : 0; }\n isFile() { return true; }\n isAsync() { return true; }\n async open(options) {\n if (!this.closed && !this._footer) {\n this.schema = (this._footer = await this._readFooter()).schema;\n for (const block of this._footer.dictionaryBatches()) {\n block && await this._readDictionaryBatch(this._dictionaryIndex++);\n }\n }\n return await super.open(options);\n }\n async readRecordBatch(index) {\n if (this.closed) {\n return null;\n }\n if (!this._footer) {\n await this.open();\n }\n const block = this._footer && this._footer.getRecordBatch(index);\n if (block && (await this._handle.seek(block.offset))) {\n const message = await this._reader.readMessage(MessageHeader.RecordBatch);\n if (message && message.isRecordBatch()) {\n const header = message.header();\n const buffer = await this._reader.readMessageBody(message.bodyLength);\n const recordBatch = this._loadRecordBatch(header, buffer);\n return recordBatch;\n }\n }\n return null;\n }\n async _readDictionaryBatch(index) {\n const block = this._footer && this._footer.getDictionaryBatch(index);\n if (block && (await this._handle.seek(block.offset))) {\n const message = await this._reader.readMessage(MessageHeader.DictionaryBatch);\n if (message && message.isDictionaryBatch()) {\n const header = message.header();\n const buffer = await this._reader.readMessageBody(message.bodyLength);\n const vector = this._loadDictionaryBatch(header, buffer);\n this.dictionaries.set(header.id, vector);\n }\n }\n }\n async _readFooter() {\n const { _handle } = this;\n _handle._pending && await _handle._pending;\n const offset = _handle.size - magicAndPadding;\n const length = await _handle.readInt32(offset);\n const buffer = await _handle.readAt(offset - length, length);\n return Footer.decode(buffer);\n }\n async _readNextMessageAndValidate(type) {\n if (!this._footer) {\n await this.open();\n }\n if (this._footer && this._recordBatchIndex < this.numRecordBatches) {\n const block = this._footer.getRecordBatch(this._recordBatchIndex);\n if (block && await this._handle.seek(block.offset)) {\n return await this._reader.readMessage(type);\n }\n }\n return null;\n }\n}\n/** @ignore */\nclass RecordBatchJSONReaderImpl extends RecordBatchStreamReaderImpl {\n constructor(source, dictionaries) {\n super(source, dictionaries);\n }\n _loadVectors(header, body, types) {\n return new JSONVectorLoader(body, header.nodes, header.buffers, this.dictionaries).visitMany(types);\n }\n}\n//\n// Define some helper functions and static implementations down here. There's\n// a bit of branching in the static methods that can lead to the same routines\n// being executed, so we've broken those out here for readability.\n//\n/** @ignore */\nfunction shouldAutoDestroy(self, options) {\n return options && (typeof options['autoDestroy'] === 'boolean') ? options['autoDestroy'] : self['autoDestroy'];\n}\n/** @ignore */\nfunction* readAllSync(source) {\n const reader = RecordBatchReader.from(source);\n try {\n if (!reader.open({ autoDestroy: false }).closed) {\n do {\n yield reader;\n } while (!(reader.reset().open()).closed);\n }\n }\n finally {\n reader.cancel();\n }\n}\n/** @ignore */\nasync function* readAllAsync(source) {\n const reader = await RecordBatchReader.from(source);\n try {\n if (!(await reader.open({ autoDestroy: false })).closed) {\n do {\n yield reader;\n } while (!(await reader.reset().open()).closed);\n }\n }\n finally {\n await reader.cancel();\n }\n}\n/** @ignore */\nfunction fromArrowJSON(source) {\n return new RecordBatchStreamReader(new RecordBatchJSONReaderImpl(source));\n}\n/** @ignore */\nfunction fromByteStream(source) {\n const bytes = source.peek((magicLength + 7) & ~7);\n return bytes && bytes.byteLength >= 4 ? !checkForMagicArrowString(bytes)\n ? new RecordBatchStreamReader(new RecordBatchStreamReaderImpl(source))\n : new RecordBatchFileReader(new RecordBatchFileReaderImpl(source.read()))\n : new RecordBatchStreamReader(new RecordBatchStreamReaderImpl(function* () { }()));\n}\n/** @ignore */\nasync function fromAsyncByteStream(source) {\n const bytes = await source.peek((magicLength + 7) & ~7);\n return bytes && bytes.byteLength >= 4 ? !checkForMagicArrowString(bytes)\n ? new AsyncRecordBatchStreamReader(new AsyncRecordBatchStreamReaderImpl(source))\n : new RecordBatchFileReader(new RecordBatchFileReaderImpl(await source.read()))\n : new AsyncRecordBatchStreamReader(new AsyncRecordBatchStreamReaderImpl(async function* () { }()));\n}\n/** @ignore */\nasync function fromFileHandle(source) {\n const { size } = await source.stat();\n const file = new AsyncRandomAccessFile(source, size);\n if (size >= magicX2AndPadding) {\n if (checkForMagicArrowString(await file.readAt(0, (magicLength + 7) & ~7))) {\n return new AsyncRecordBatchFileReader(new AsyncRecordBatchFileReaderImpl(file));\n }\n }\n return new AsyncRecordBatchStreamReader(new AsyncRecordBatchStreamReaderImpl(file));\n}\n\n//# sourceMappingURL=reader.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Builder } from '../../builder/index';\n/** @ignore */\nexport function builderThroughDOMStream(options) {\n return new BuilderTransform(options);\n}\n/** @ignore */\nexport class BuilderTransform {\n constructor(options) {\n // Access properties by string indexers to defeat closure compiler\n this._numChunks = 0;\n this._finished = false;\n this._bufferedSize = 0;\n const { ['readableStrategy']: readableStrategy, ['writableStrategy']: writableStrategy, ['queueingStrategy']: queueingStrategy = 'count', ...builderOptions } = options;\n this._controller = null;\n this._builder = Builder.new(builderOptions);\n this._getSize = queueingStrategy !== 'bytes' ? chunkLength : chunkByteLength;\n const { ['highWaterMark']: readableHighWaterMark = queueingStrategy === 'bytes' ? 2 ** 14 : 1000 } = { ...readableStrategy };\n const { ['highWaterMark']: writableHighWaterMark = queueingStrategy === 'bytes' ? 2 ** 14 : 1000 } = { ...writableStrategy };\n this['readable'] = new ReadableStream({\n ['cancel']: () => { this._builder.clear(); },\n ['pull']: (c) => { this._maybeFlush(this._builder, this._controller = c); },\n ['start']: (c) => { this._maybeFlush(this._builder, this._controller = c); },\n }, {\n 'highWaterMark': readableHighWaterMark,\n 'size': queueingStrategy !== 'bytes' ? chunkLength : chunkByteLength,\n });\n this['writable'] = new WritableStream({\n ['abort']: () => { this._builder.clear(); },\n ['write']: () => { this._maybeFlush(this._builder, this._controller); },\n ['close']: () => { this._maybeFlush(this._builder.finish(), this._controller); },\n }, {\n 'highWaterMark': writableHighWaterMark,\n 'size': (value) => this._writeValueAndReturnChunkSize(value),\n });\n }\n _writeValueAndReturnChunkSize(value) {\n const bufferedSize = this._bufferedSize;\n this._bufferedSize = this._getSize(this._builder.append(value));\n return this._bufferedSize - bufferedSize;\n }\n _maybeFlush(builder, controller) {\n if (controller === null) {\n return;\n }\n if (this._bufferedSize >= controller.desiredSize) {\n ++this._numChunks && this._enqueue(controller, builder.toVector());\n }\n if (builder.finished) {\n if (builder.length > 0 || this._numChunks === 0) {\n ++this._numChunks && this._enqueue(controller, builder.toVector());\n }\n if (!this._finished && (this._finished = true)) {\n this._enqueue(controller, null);\n }\n }\n }\n _enqueue(controller, chunk) {\n this._bufferedSize = 0;\n this._controller = null;\n chunk === null ? controller.close() : controller.enqueue(chunk);\n }\n}\n/** @ignore */ const chunkLength = (chunk) => chunk.length;\n/** @ignore */ const chunkByteLength = (chunk) => chunk.byteLength;\n\n//# sourceMappingURL=builder.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { DictionaryVector } from '../vector/dictionary';\n/** @ignore */\nexport class Value {\n eq(other) {\n if (!(other instanceof Value)) {\n other = new Literal(other);\n }\n return new Equals(this, other);\n }\n le(other) {\n if (!(other instanceof Value)) {\n other = new Literal(other);\n }\n return new LTeq(this, other);\n }\n ge(other) {\n if (!(other instanceof Value)) {\n other = new Literal(other);\n }\n return new GTeq(this, other);\n }\n lt(other) {\n return new Not(this.ge(other));\n }\n gt(other) {\n return new Not(this.le(other));\n }\n ne(other) {\n return new Not(this.eq(other));\n }\n}\n/** @ignore */\nexport class Literal extends Value {\n constructor(v) {\n super();\n this.v = v;\n }\n}\n/** @ignore */\nexport class Col extends Value {\n constructor(name) {\n super();\n this.name = name;\n }\n bind(batch) {\n if (!this.colidx) {\n // Assume column index doesn't change between calls to bind\n //this.colidx = cols.findIndex(v => v.name.indexOf(this.name) != -1);\n this.colidx = -1;\n const fields = batch.schema.fields;\n for (let idx = -1; ++idx < fields.length;) {\n if (fields[idx].name === this.name) {\n this.colidx = idx;\n break;\n }\n }\n if (this.colidx < 0) {\n throw new Error(`Failed to bind Col \"${this.name}\"`);\n }\n }\n const vec = this.vector = batch.getChildAt(this.colidx);\n return (idx) => vec.get(idx);\n }\n}\n/** @ignore */\nexport class Predicate {\n and(...expr) { return new And(this, ...expr); }\n or(...expr) { return new Or(this, ...expr); }\n not() { return new Not(this); }\n}\n/** @ignore */\nexport class ComparisonPredicate extends Predicate {\n constructor(left, right) {\n super();\n this.left = left;\n this.right = right;\n }\n bind(batch) {\n if (this.left instanceof Literal) {\n if (this.right instanceof Literal) {\n return this._bindLitLit(batch, this.left, this.right);\n }\n else { // right is a Col\n return this._bindLitCol(batch, this.left, this.right);\n }\n }\n else { // left is a Col\n if (this.right instanceof Literal) {\n return this._bindColLit(batch, this.left, this.right);\n }\n else { // right is a Col\n return this._bindColCol(batch, this.left, this.right);\n }\n }\n }\n}\n/** @ignore */\nexport class CombinationPredicate extends Predicate {\n constructor(...children) {\n super();\n this.children = children;\n }\n}\n// add children to prototype so it doesn't get mangled in es2015/umd\nCombinationPredicate.prototype.children = Object.freeze([]); // freeze for safety\n/** @ignore */\nexport class And extends CombinationPredicate {\n constructor(...children) {\n // Flatten any Ands\n children = children.reduce((accum, p) => {\n return accum.concat(p instanceof And ? p.children : p);\n }, []);\n super(...children);\n }\n bind(batch) {\n const bound = this.children.map((p) => p.bind(batch));\n return (idx, batch) => bound.every((p) => p(idx, batch));\n }\n}\n/** @ignore */\nexport class Or extends CombinationPredicate {\n constructor(...children) {\n // Flatten any Ors\n children = children.reduce((accum, p) => {\n return accum.concat(p instanceof Or ? p.children : p);\n }, []);\n super(...children);\n }\n bind(batch) {\n const bound = this.children.map((p) => p.bind(batch));\n return (idx, batch) => bound.some((p) => p(idx, batch));\n }\n}\n/** @ignore */\nexport class Equals extends ComparisonPredicate {\n _bindLitLit(_batch, left, right) {\n const rtrn = left.v == right.v;\n return () => rtrn;\n }\n _bindColCol(batch, left, right) {\n const left_func = left.bind(batch);\n const right_func = right.bind(batch);\n return (idx, batch) => left_func(idx, batch) == right_func(idx, batch);\n }\n _bindColLit(batch, col, lit) {\n const col_func = col.bind(batch);\n if (col.vector instanceof DictionaryVector) {\n let key;\n const vector = col.vector;\n if (vector.dictionary !== this.lastDictionary) {\n key = vector.reverseLookup(lit.v);\n this.lastDictionary = vector.dictionary;\n this.lastKey = key;\n }\n else {\n key = this.lastKey;\n }\n if (key === -1) {\n // the value doesn't exist in the dictionary - always return\n // false\n // TODO: special-case of PredicateFunc that encapsulates this\n // \"always false\" behavior. That way filtering operations don't\n // have to bother checking\n return () => false;\n }\n else {\n return (idx) => {\n return vector.getKey(idx) === key;\n };\n }\n }\n else {\n return (idx, cols) => col_func(idx, cols) == lit.v;\n }\n }\n _bindLitCol(batch, lit, col) {\n // Equals is commutative\n return this._bindColLit(batch, col, lit);\n }\n}\n/** @ignore */\nexport class LTeq extends ComparisonPredicate {\n _bindLitLit(_batch, left, right) {\n const rtrn = left.v <= right.v;\n return () => rtrn;\n }\n _bindColCol(batch, left, right) {\n const left_func = left.bind(batch);\n const right_func = right.bind(batch);\n return (idx, cols) => left_func(idx, cols) <= right_func(idx, cols);\n }\n _bindColLit(batch, col, lit) {\n const col_func = col.bind(batch);\n return (idx, cols) => col_func(idx, cols) <= lit.v;\n }\n _bindLitCol(batch, lit, col) {\n const col_func = col.bind(batch);\n return (idx, cols) => lit.v <= col_func(idx, cols);\n }\n}\n/** @ignore */\nexport class GTeq extends ComparisonPredicate {\n _bindLitLit(_batch, left, right) {\n const rtrn = left.v >= right.v;\n return () => rtrn;\n }\n _bindColCol(batch, left, right) {\n const left_func = left.bind(batch);\n const right_func = right.bind(batch);\n return (idx, cols) => left_func(idx, cols) >= right_func(idx, cols);\n }\n _bindColLit(batch, col, lit) {\n const col_func = col.bind(batch);\n return (idx, cols) => col_func(idx, cols) >= lit.v;\n }\n _bindLitCol(batch, lit, col) {\n const col_func = col.bind(batch);\n return (idx, cols) => lit.v >= col_func(idx, cols);\n }\n}\n/** @ignore */\nexport class Not extends Predicate {\n constructor(child) {\n super();\n this.child = child;\n }\n bind(batch) {\n const func = this.child.bind(batch);\n return (idx, batch) => !func(idx, batch);\n }\n}\n/** @ignore */\nexport class CustomPredicate extends Predicate {\n constructor(next, bind_) {\n super();\n this.next = next;\n this.bind_ = bind_;\n }\n bind(batch) {\n this.bind_(batch);\n return this.next;\n }\n}\nexport function lit(v) { return new Literal(v); }\nexport function col(n) { return new Col(n); }\nexport function and(...p) { return new And(...p); }\nexport function or(...p) { return new Or(...p); }\nexport function custom(next, bind) {\n return new CustomPredicate(next, bind);\n}\n\n//# sourceMappingURL=predicate.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { Table } from '../table';\nimport { IntVector } from '../vector/int';\nimport { Field, Schema } from '../schema';\nimport { Col } from './predicate';\nimport { RecordBatch } from '../recordbatch';\nimport { DataType } from '../type';\nTable.prototype.countBy = function (name) { return new DataFrame(this.chunks).countBy(name); };\nTable.prototype.scan = function (next, bind) { return new DataFrame(this.chunks).scan(next, bind); };\nTable.prototype.scanReverse = function (next, bind) { return new DataFrame(this.chunks).scanReverse(next, bind); };\nTable.prototype.filter = function (predicate) { return new DataFrame(this.chunks).filter(predicate); };\nexport class DataFrame extends Table {\n filter(predicate) {\n return new FilteredDataFrame(this.chunks, predicate);\n }\n scan(next, bind) {\n const batches = this.chunks, numBatches = batches.length;\n for (let batchIndex = -1; ++batchIndex < numBatches;) {\n // load batches\n const batch = batches[batchIndex];\n if (bind) {\n bind(batch);\n }\n // yield all indices\n for (let index = -1, numRows = batch.length; ++index < numRows;) {\n next(index, batch);\n }\n }\n }\n scanReverse(next, bind) {\n const batches = this.chunks, numBatches = batches.length;\n for (let batchIndex = numBatches; --batchIndex >= 0;) {\n // load batches\n const batch = batches[batchIndex];\n if (bind) {\n bind(batch);\n }\n // yield all indices\n for (let index = batch.length; --index >= 0;) {\n next(index, batch);\n }\n }\n }\n countBy(name) {\n const batches = this.chunks, numBatches = batches.length;\n const count_by = typeof name === 'string' ? new Col(name) : name;\n // Assume that all dictionary batches are deltas, which means that the\n // last record batch has the most complete dictionary\n count_by.bind(batches[numBatches - 1]);\n const vector = count_by.vector;\n if (!DataType.isDictionary(vector.type)) {\n throw new Error('countBy currently only supports dictionary-encoded columns');\n }\n const countByteLength = Math.ceil(Math.log(vector.length) / Math.log(256));\n const CountsArrayType = countByteLength == 4 ? Uint32Array :\n countByteLength >= 2 ? Uint16Array : Uint8Array;\n const counts = new CountsArrayType(vector.dictionary.length);\n for (let batchIndex = -1; ++batchIndex < numBatches;) {\n // load batches\n const batch = batches[batchIndex];\n // rebind the countBy Col\n count_by.bind(batch);\n const keys = count_by.vector.indices;\n // yield all indices\n for (let index = -1, numRows = batch.length; ++index < numRows;) {\n let key = keys.get(index);\n if (key !== null) {\n counts[key]++;\n }\n }\n }\n return new CountByResult(vector.dictionary, IntVector.from(counts));\n }\n}\n/** @ignore */\nexport class CountByResult extends Table {\n constructor(values, counts) {\n const schema = new Schema([\n new Field('values', values.type),\n new Field('counts', counts.type)\n ]);\n super(new RecordBatch(schema, counts.length, [values, counts]));\n }\n toJSON() {\n const values = this.getColumnAt(0);\n const counts = this.getColumnAt(1);\n const result = {};\n for (let i = -1; ++i < this.length;) {\n result[values.get(i)] = counts.get(i);\n }\n return result;\n }\n}\n/** @ignore */\nexport class FilteredDataFrame extends DataFrame {\n constructor(batches, predicate) {\n super(batches);\n this._predicate = predicate;\n }\n scan(next, bind) {\n // inlined version of this:\n // this.parent.scan((idx, columns) => {\n // if (this.predicate(idx, columns)) next(idx, columns);\n // });\n const batches = this._chunks;\n const numBatches = batches.length;\n for (let batchIndex = -1; ++batchIndex < numBatches;) {\n // load batches\n const batch = batches[batchIndex];\n const predicate = this._predicate.bind(batch);\n let isBound = false;\n // yield all indices\n for (let index = -1, numRows = batch.length; ++index < numRows;) {\n if (predicate(index, batch)) {\n // bind batches lazily - if predicate doesn't match anything\n // in the batch we don't need to call bind on the batch\n if (bind && !isBound) {\n bind(batch);\n isBound = true;\n }\n next(index, batch);\n }\n }\n }\n }\n scanReverse(next, bind) {\n const batches = this._chunks;\n const numBatches = batches.length;\n for (let batchIndex = numBatches; --batchIndex >= 0;) {\n // load batches\n const batch = batches[batchIndex];\n const predicate = this._predicate.bind(batch);\n let isBound = false;\n // yield all indices\n for (let index = batch.length; --index >= 0;) {\n if (predicate(index, batch)) {\n // bind batches lazily - if predicate doesn't match anything\n // in the batch we don't need to call bind on the batch\n if (bind && !isBound) {\n bind(batch);\n isBound = true;\n }\n next(index, batch);\n }\n }\n }\n }\n count() {\n // inlined version of this:\n // let sum = 0;\n // this.parent.scan((idx, columns) => {\n // if (this.predicate(idx, columns)) ++sum;\n // });\n // return sum;\n let sum = 0;\n const batches = this._chunks;\n const numBatches = batches.length;\n for (let batchIndex = -1; ++batchIndex < numBatches;) {\n // load batches\n const batch = batches[batchIndex];\n const predicate = this._predicate.bind(batch);\n // yield all indices\n for (let index = -1, numRows = batch.length; ++index < numRows;) {\n if (predicate(index, batch)) {\n ++sum;\n }\n }\n }\n return sum;\n }\n *[Symbol.iterator]() {\n // inlined version of this:\n // this.parent.scan((idx, columns) => {\n // if (this.predicate(idx, columns)) next(idx, columns);\n // });\n const batches = this._chunks;\n const numBatches = batches.length;\n for (let batchIndex = -1; ++batchIndex < numBatches;) {\n // load batches\n const batch = batches[batchIndex];\n // TODO: bind batches lazily\n // If predicate doesn't match anything in the batch we don't need\n // to bind the callback\n const predicate = this._predicate.bind(batch);\n // yield all indices\n for (let index = -1, numRows = batch.length; ++index < numRows;) {\n if (predicate(index, batch)) {\n yield batch.get(index);\n }\n }\n }\n }\n filter(predicate) {\n return new FilteredDataFrame(this._chunks, this._predicate.and(predicate));\n }\n countBy(name) {\n const batches = this._chunks, numBatches = batches.length;\n const count_by = typeof name === 'string' ? new Col(name) : name;\n // Assume that all dictionary batches are deltas, which means that the\n // last record batch has the most complete dictionary\n count_by.bind(batches[numBatches - 1]);\n const vector = count_by.vector;\n if (!DataType.isDictionary(vector.type)) {\n throw new Error('countBy currently only supports dictionary-encoded columns');\n }\n const countByteLength = Math.ceil(Math.log(vector.length) / Math.log(256));\n const CountsArrayType = countByteLength == 4 ? Uint32Array :\n countByteLength >= 2 ? Uint16Array : Uint8Array;\n const counts = new CountsArrayType(vector.dictionary.length);\n for (let batchIndex = -1; ++batchIndex < numBatches;) {\n // load batches\n const batch = batches[batchIndex];\n const predicate = this._predicate.bind(batch);\n // rebind the countBy Col\n count_by.bind(batch);\n const keys = count_by.vector.indices;\n // yield all indices\n for (let index = -1, numRows = batch.length; ++index < numRows;) {\n let key = keys.get(index);\n if (key !== null && predicate(index, batch)) {\n counts[key]++;\n }\n }\n }\n return new CountByResult(vector.dictionary, IntVector.from(counts));\n }\n}\n\n//# sourceMappingURL=dataframe.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport streamAdapters from './io/adapters';\nimport { Builder } from './builder/index';\nimport { RecordBatchReader } from './ipc/reader';\nimport { RecordBatchWriter } from './ipc/writer';\nimport { toDOMStream } from './io/whatwg/iterable';\nimport { builderThroughDOMStream } from './io/whatwg/builder';\nimport { recordBatchReaderThroughDOMStream } from './io/whatwg/reader';\nimport { recordBatchWriterThroughDOMStream } from './io/whatwg/writer';\nstreamAdapters.toDOMStream = toDOMStream;\nBuilder['throughDOM'] = builderThroughDOMStream;\nRecordBatchReader['throughDOM'] = recordBatchReaderThroughDOMStream;\nRecordBatchWriter['throughDOM'] = recordBatchWriterThroughDOMStream;\nexport { ArrowType, DateUnit, IntervalUnit, MessageHeader, MetadataVersion, Precision, TimeUnit, Type, UnionMode, BufferType, Data, DataType, Null, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Utf8, Binary, FixedSizeBinary, Date_, DateDay, DateMillisecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Time, TimeSecond, TimeMillisecond, TimeMicrosecond, TimeNanosecond, Decimal, List, Struct, Union, DenseUnion, SparseUnion, Dictionary, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList, Map_, Table, Column, Schema, Field, Visitor, Vector, BaseVector, BinaryVector, BoolVector, Chunked, DateVector, DateDayVector, DateMillisecondVector, DecimalVector, DictionaryVector, FixedSizeBinaryVector, FixedSizeListVector, FloatVector, Float16Vector, Float32Vector, Float64Vector, IntervalVector, IntervalDayTimeVector, IntervalYearMonthVector, IntVector, Int8Vector, Int16Vector, Int32Vector, Int64Vector, Uint8Vector, Uint16Vector, Uint32Vector, Uint64Vector, ListVector, MapVector, NullVector, StructVector, TimestampVector, TimestampSecondVector, TimestampMillisecondVector, TimestampMicrosecondVector, TimestampNanosecondVector, TimeVector, TimeSecondVector, TimeMillisecondVector, TimeMicrosecondVector, TimeNanosecondVector, UnionVector, DenseUnionVector, SparseUnionVector, Utf8Vector, ByteStream, AsyncByteStream, AsyncByteQueue, RecordBatchReader, RecordBatchFileReader, RecordBatchStreamReader, AsyncRecordBatchFileReader, AsyncRecordBatchStreamReader, RecordBatchWriter, RecordBatchFileWriter, RecordBatchStreamWriter, RecordBatchJSONWriter, MessageReader, AsyncMessageReader, JSONMessageReader, Message, RecordBatch, DataFrame, FilteredDataFrame, CountByResult, predicate, util, Builder, BinaryBuilder, BoolBuilder, DateBuilder, DateDayBuilder, DateMillisecondBuilder, DecimalBuilder, DictionaryBuilder, FixedSizeBinaryBuilder, FixedSizeListBuilder, FloatBuilder, Float16Builder, Float32Builder, Float64Builder, IntervalBuilder, IntervalDayTimeBuilder, IntervalYearMonthBuilder, IntBuilder, Int8Builder, Int16Builder, Int32Builder, Int64Builder, Uint8Builder, Uint16Builder, Uint32Builder, Uint64Builder, ListBuilder, MapBuilder, NullBuilder, StructBuilder, TimestampBuilder, TimestampSecondBuilder, TimestampMillisecondBuilder, TimestampMicrosecondBuilder, TimestampNanosecondBuilder, TimeBuilder, TimeSecondBuilder, TimeMillisecondBuilder, TimeMicrosecondBuilder, TimeNanosecondBuilder, UnionBuilder, DenseUnionBuilder, SparseUnionBuilder, Utf8Builder, } from './Arrow';\n\n//# sourceMappingURL=Arrow.dom.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { toUint8Array } from '../../util/buffer';\nimport { isIterable, isAsyncIterable } from '../../util/compat';\n/** @ignore */\nexport function toDOMStream(source, options) {\n if (isAsyncIterable(source)) {\n return asyncIterableAsReadableDOMStream(source, options);\n }\n if (isIterable(source)) {\n return iterableAsReadableDOMStream(source, options);\n }\n /* istanbul ignore next */\n throw new Error(`toDOMStream() must be called with an Iterable or AsyncIterable`);\n}\n/** @ignore */\nfunction iterableAsReadableDOMStream(source, options) {\n let it = null;\n const bm = (options && options.type === 'bytes') || false;\n const hwm = options && options.highWaterMark || (2 ** 24);\n return new ReadableStream({\n ...options,\n start(controller) { next(controller, it || (it = source[Symbol.iterator]())); },\n pull(controller) { it ? (next(controller, it)) : controller.close(); },\n cancel() { (it && (it.return && it.return()) || true) && (it = null); }\n }, { highWaterMark: bm ? hwm : undefined, ...options });\n function next(controller, it) {\n let buf;\n let r = null;\n let size = controller.desiredSize || null;\n while (!(r = it.next(bm ? size : null)).done) {\n if (ArrayBuffer.isView(r.value) && (buf = toUint8Array(r.value))) {\n size != null && bm && (size = size - buf.byteLength + 1);\n r.value = buf;\n }\n controller.enqueue(r.value);\n if (size != null && --size <= 0) {\n return;\n }\n }\n controller.close();\n }\n}\n/** @ignore */\nfunction asyncIterableAsReadableDOMStream(source, options) {\n let it = null;\n const bm = (options && options.type === 'bytes') || false;\n const hwm = options && options.highWaterMark || (2 ** 24);\n return new ReadableStream({\n ...options,\n async start(controller) { await next(controller, it || (it = source[Symbol.asyncIterator]())); },\n async pull(controller) { it ? (await next(controller, it)) : controller.close(); },\n async cancel() { (it && (it.return && await it.return()) || true) && (it = null); },\n }, { highWaterMark: bm ? hwm : undefined, ...options });\n async function next(controller, it) {\n let buf;\n let r = null;\n let size = controller.desiredSize || null;\n while (!(r = await it.next(bm ? size : null)).done) {\n if (ArrayBuffer.isView(r.value) && (buf = toUint8Array(r.value))) {\n size != null && bm && (size = size - buf.byteLength + 1);\n r.value = buf;\n }\n controller.enqueue(r.value);\n if (size != null && --size <= 0) {\n return;\n }\n }\n controller.close();\n }\n}\n\n//# sourceMappingURL=iterable.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { AsyncByteQueue } from '../../io/stream';\nimport { RecordBatchReader } from '../../ipc/reader';\n/** @ignore */\nexport function recordBatchReaderThroughDOMStream(writableStrategy, readableStrategy) {\n const queue = new AsyncByteQueue();\n let reader = null;\n const readable = new ReadableStream({\n async cancel() { await queue.close(); },\n async start(controller) { await next(controller, reader || (reader = await open())); },\n async pull(controller) { reader ? await next(controller, reader) : controller.close(); }\n });\n return { writable: new WritableStream(queue, { 'highWaterMark': 2 ** 14, ...writableStrategy }), readable };\n async function open() {\n return await (await RecordBatchReader.from(queue)).open(readableStrategy);\n }\n async function next(controller, reader) {\n let size = controller.desiredSize;\n let r = null;\n while (!(r = await reader.next()).done) {\n controller.enqueue(r.value);\n if (size != null && --size <= 0) {\n return;\n }\n }\n controller.close();\n }\n}\n\n//# sourceMappingURL=reader.mjs.map\n","// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\nimport { AsyncByteStream } from '../../io/stream';\n/** @ignore */\nexport function recordBatchWriterThroughDOMStream(writableStrategy, readableStrategy) {\n const writer = new this(writableStrategy);\n const reader = new AsyncByteStream(writer);\n const readable = new ReadableStream({\n type: 'bytes',\n async cancel() { await reader.cancel(); },\n async pull(controller) { await next(controller); },\n async start(controller) { await next(controller); },\n }, { 'highWaterMark': 2 ** 14, ...readableStrategy });\n return { writable: new WritableStream(writer, writableStrategy), readable };\n async function next(controller) {\n let buf = null;\n let size = controller.desiredSize;\n while (buf = await reader.read(size || null)) {\n controller.enqueue(buf);\n if (size != null && (size -= buf.byteLength) <= 0) {\n return;\n }\n }\n controller.close();\n }\n}\n\n//# sourceMappingURL=writer.mjs.map\n","/**\r\n * @license\r\n * Copyright 2018-2019 Streamlit Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nimport { Table, Type } from \"apache-arrow\";\r\nexport class ArrowTable {\r\n constructor(dataBuffer, indexBuffer, columnsBuffer, styler) {\r\n this.getCell = (rowIndex, columnIndex) => {\r\n const isBlankCell = rowIndex < this.headerRows && columnIndex < this.headerColumns;\r\n const isIndexCell = rowIndex >= this.headerRows && columnIndex < this.headerColumns;\r\n const isColumnsCell = rowIndex < this.headerRows && columnIndex >= this.headerColumns;\r\n if (isBlankCell) {\r\n const classNames = [\"blank\"];\r\n if (columnIndex > 0) {\r\n classNames.push(\"level\" + rowIndex);\r\n }\r\n return {\r\n type: \"blank\",\r\n classNames: classNames.join(\" \"),\r\n content: \"\",\r\n };\r\n }\r\n else if (isColumnsCell) {\r\n const dataColumnIndex = columnIndex - this.headerColumns;\r\n const classNames = [\r\n \"col_heading\",\r\n \"level\" + rowIndex,\r\n \"col\" + dataColumnIndex,\r\n ];\r\n return {\r\n type: \"columns\",\r\n classNames: classNames.join(\" \"),\r\n content: this.getContent(this.columnsTable, dataColumnIndex, rowIndex),\r\n };\r\n }\r\n else if (isIndexCell) {\r\n const dataRowIndex = rowIndex - this.headerRows;\r\n const classNames = [\r\n \"row_heading\",\r\n \"level\" + columnIndex,\r\n \"row\" + dataRowIndex,\r\n ];\r\n return {\r\n type: \"index\",\r\n id: `T_${this.uuid}level${columnIndex}_row${dataRowIndex}`,\r\n classNames: classNames.join(\" \"),\r\n content: this.getContent(this.indexTable, dataRowIndex, columnIndex),\r\n };\r\n }\r\n else {\r\n const dataRowIndex = rowIndex - this.headerRows;\r\n const dataColumnIndex = columnIndex - this.headerColumns;\r\n const classNames = [\r\n \"data\",\r\n \"row\" + dataRowIndex,\r\n \"col\" + dataColumnIndex,\r\n ];\r\n const content = this.styler\r\n ? this.getContent(this.styler.displayValuesTable, dataRowIndex, dataColumnIndex)\r\n : this.getContent(this.dataTable, dataRowIndex, dataColumnIndex);\r\n return {\r\n type: \"data\",\r\n id: `T_${this.uuid}row${dataRowIndex}_col${dataColumnIndex}`,\r\n classNames: classNames.join(\" \"),\r\n content,\r\n };\r\n }\r\n };\r\n this.getContent = (table, rowIndex, columnIndex) => {\r\n const column = table.getColumnAt(columnIndex);\r\n if (column === null) {\r\n return \"\";\r\n }\r\n const columnTypeId = this.getColumnTypeId(table, columnIndex);\r\n switch (columnTypeId) {\r\n case Type.Timestamp: {\r\n return this.nanosToDate(column.get(rowIndex));\r\n }\r\n default: {\r\n return column.get(rowIndex);\r\n }\r\n }\r\n };\r\n this.dataTable = Table.from(dataBuffer);\r\n this.indexTable = Table.from(indexBuffer);\r\n this.columnsTable = Table.from(columnsBuffer);\r\n this.styler = styler\r\n ? {\r\n caption: styler.get(\"caption\"),\r\n displayValuesTable: Table.from(styler.get(\"displayValues\")),\r\n styles: styler.get(\"styles\"),\r\n uuid: styler.get(\"uuid\"),\r\n }\r\n : undefined;\r\n }\r\n get rows() {\r\n return this.indexTable.length + this.columnsTable.numCols;\r\n }\r\n get columns() {\r\n return this.indexTable.numCols + this.columnsTable.length;\r\n }\r\n get headerRows() {\r\n return this.rows - this.dataRows;\r\n }\r\n get headerColumns() {\r\n return this.columns - this.dataColumns;\r\n }\r\n get dataRows() {\r\n return this.dataTable.length;\r\n }\r\n get dataColumns() {\r\n return this.dataTable.numCols;\r\n }\r\n get uuid() {\r\n return this.styler && this.styler.uuid;\r\n }\r\n get caption() {\r\n return this.styler && this.styler.caption;\r\n }\r\n get styles() {\r\n return this.styler && this.styler.styles;\r\n }\r\n get table() {\r\n return this.dataTable;\r\n }\r\n get index() {\r\n return this.indexTable;\r\n }\r\n get columnTable() {\r\n return this.columnsTable;\r\n }\r\n /**\r\n * Returns apache-arrow specific typeId of column.\r\n */\r\n getColumnTypeId(table, columnIndex) {\r\n return table.schema.fields[columnIndex].type.typeId;\r\n }\r\n nanosToDate(nanos) {\r\n return new Date(nanos / 1e6);\r\n }\r\n}\r\n","/**\r\n * @license\r\n * Copyright 2018-2020 Streamlit Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n// Safari doesn't support the EventTarget class, so we use a shim.\r\nimport { EventTarget } from \"event-target-shim\";\r\nimport { ArrowTable } from \"./ArrowTable\";\r\n/** Messages from Component -> Streamlit */\r\nvar ComponentMessageType;\r\n(function (ComponentMessageType) {\r\n // A component sends this message when it's ready to receive messages\r\n // from Streamlit. Streamlit won't send any messages until it gets this.\r\n // Data: { apiVersion: number }\r\n ComponentMessageType[\"COMPONENT_READY\"] = \"streamlit:componentReady\";\r\n // The component has a new widget value. Send it back to Streamlit, which\r\n // will then re-run the app.\r\n // Data: { value: any }\r\n ComponentMessageType[\"SET_COMPONENT_VALUE\"] = \"streamlit:setComponentValue\";\r\n // The component has a new height for its iframe.\r\n // Data: { height: number }\r\n ComponentMessageType[\"SET_FRAME_HEIGHT\"] = \"streamlit:setFrameHeight\";\r\n})(ComponentMessageType || (ComponentMessageType = {}));\r\n/**\r\n * Streamlit communication API.\r\n *\r\n * Components can send data to Streamlit via the functions defined here,\r\n * and receive data from Streamlit via the `events` property.\r\n */\r\nexport class Streamlit {\r\n}\r\n/**\r\n * The Streamlit component API version we're targetting.\r\n * There's currently only 1!\r\n */\r\nStreamlit.API_VERSION = 1;\r\nStreamlit.RENDER_EVENT = \"streamlit:render\";\r\n/** Dispatches events received from Streamlit. */\r\nStreamlit.events = new EventTarget();\r\nStreamlit.registeredMessageListener = false;\r\n/**\r\n * Tell Streamlit that the component is ready to start receiving data.\r\n * Streamlit will defer emitting RENDER events until it receives the\r\n * COMPONENT_READY message.\r\n */\r\nStreamlit.setComponentReady = () => {\r\n if (!Streamlit.registeredMessageListener) {\r\n // Register for message events if we haven't already\r\n window.addEventListener(\"message\", Streamlit.onMessageEvent);\r\n Streamlit.registeredMessageListener = true;\r\n }\r\n Streamlit.sendBackMsg(ComponentMessageType.COMPONENT_READY, {\r\n apiVersion: Streamlit.API_VERSION,\r\n });\r\n};\r\n/**\r\n * Report the component's height to Streamlit.\r\n * This should be called every time the component changes its DOM - that is,\r\n * when it's first loaded, and any time it updates.\r\n */\r\nStreamlit.setFrameHeight = (height) => {\r\n if (height === undefined) {\r\n // `height` is optional. If undefined, it defaults to scrollHeight,\r\n // which is the entire height of the element minus its border,\r\n // scrollbar, and margin.\r\n height = document.body.scrollHeight;\r\n }\r\n if (height === Streamlit.lastFrameHeight) {\r\n // Don't bother updating if our height hasn't changed.\r\n return;\r\n }\r\n Streamlit.lastFrameHeight = height;\r\n Streamlit.sendBackMsg(ComponentMessageType.SET_FRAME_HEIGHT, { height });\r\n};\r\n/**\r\n * Set the component's value. This value will be returned to the Python\r\n * script, and the script will be re-run.\r\n *\r\n * For example:\r\n *\r\n * JavaScript:\r\n * Streamlit.setComponentValue(\"ahoy!\")\r\n *\r\n * Python:\r\n * value = st.my_component(...)\r\n * st.write(value) # -> \"ahoy!\"\r\n *\r\n * The value must be serializable into JSON.\r\n */\r\nStreamlit.setComponentValue = (value) => {\r\n Streamlit.sendBackMsg(ComponentMessageType.SET_COMPONENT_VALUE, { value });\r\n};\r\n/** Receive a ForwardMsg from the Streamlit app */\r\nStreamlit.onMessageEvent = (event) => {\r\n const type = event.data[\"type\"];\r\n switch (type) {\r\n case Streamlit.RENDER_EVENT:\r\n Streamlit.onRenderMessage(event.data);\r\n break;\r\n }\r\n};\r\n/**\r\n * Handle an untyped Streamlit render event and redispatch it as a\r\n * StreamlitRenderEvent.\r\n */\r\nStreamlit.onRenderMessage = (data) => {\r\n let args = data[\"args\"];\r\n if (args == null) {\r\n console.error(`Got null args in onRenderMessage. This should never happen`);\r\n args = {};\r\n }\r\n // Parse our dataframe arguments with arrow, and merge them into our args dict\r\n const dataframeArgs = data[\"dfs\"] && data[\"dfs\"].length > 0\r\n ? Streamlit.argsDataframeToObject(data[\"dfs\"])\r\n : {};\r\n args = {\r\n ...args,\r\n ...dataframeArgs,\r\n };\r\n const disabled = Boolean(data[\"disabled\"]);\r\n // Dispatch a render event!\r\n const eventData = { disabled, args };\r\n const event = new CustomEvent(Streamlit.RENDER_EVENT, {\r\n detail: eventData,\r\n });\r\n Streamlit.events.dispatchEvent(event);\r\n};\r\nStreamlit.argsDataframeToObject = (argsDataframe) => {\r\n const argsDataframeArrow = argsDataframe.map(({ key, value }) => [key, Streamlit.toArrowTable(value)]);\r\n return Object.fromEntries(argsDataframeArrow);\r\n};\r\nStreamlit.toArrowTable = (df) => {\r\n const { data, index, columns } = df.data;\r\n return new ArrowTable(data, index, columns);\r\n};\r\n/** Post a message to the Streamlit app. */\r\nStreamlit.sendBackMsg = (type, data) => {\r\n window.parent.postMessage({\r\n isStreamlitMessage: true,\r\n type: type,\r\n ...data,\r\n }, \"*\");\r\n};\r\n","\n\n\n\n{#if renderData}\n {#if spreadArgs}\n \n {:else}\n \n {/if}\n{/if}\n","import { onMount, afterUpdate } from \"svelte\";\r\nimport { Streamlit } from \"./streamlit\";\r\n/**\r\n * [Optional] Set Streamlit Svelte Lifecycle functions\r\n *\r\n * You are not required call this function on your Streamlit\r\n * component. If you decide not to call it, you should implement the\r\n * `onMount` and `afterUpdate` functions in your own component,\r\n * so that your plugin properly resizes.\r\n */\r\nexport const setStreamlitLifecycle = () => {\r\n onMount(() => {\r\n // Finally, tell Streamlit to update our initial height. We omit the\r\n // `height` parameter here to have it default to our scrollHeight.\r\n Streamlit.setFrameHeight();\r\n });\r\n afterUpdate(() => {\r\n // We tell Streamlit to update our frameHeight after each update, in\r\n // case it has changed. (This isn't strictly necessary for the example\r\n // because our height stays fixed, but this is a low-cost function, so\r\n // there's no harm in doing it redundantly.)\r\n Streamlit.setFrameHeight();\r\n });\r\n};\r\n","\n\n\n
\n {#each imageUrls as imageUrl}\n \"\"\n {/each}\n
\n\n\n\n\n\n\n\n\n\n","import { WithStreamlitConnection } from \"./streamlit\";\r\nimport ImageGallery from \"./ImageGallery.svelte\";\r\n// \"WithStreamlitConnection\" is a wrapper component. It bootstraps the\r\n// connection between your component and the Streamlit app, and handles\r\n// passing arguments from Python -> Component.\r\n//\r\n// You don't need to edit withStreamlitConnection (but you're welcome to!).\r\nconst imageGallery = new WithStreamlitConnection({\r\n target: document.body,\r\n props: {\r\n /**\r\n * Custom Streamlit component\r\n */\r\n component: ImageGallery,\r\n /**\r\n * Set to false if you want `args` (the named dictionary of arguments passed\r\n * from Python) to be passed as a dictionary to your component.\r\n *\r\n * Default is `true`.\r\n */\r\n spreadArgs: true,\r\n },\r\n});\r\nexport default ImageGallery;\r\n"],"names":["noop","assign","tar","src","k","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","src_url_equal_anchor","current_component","src_url_equal","element_src","url","document","createElement","href","append_styles","target","style_sheet_id","styles","append_styles_to","node","root","getRootNode","ownerDocument","host","get_root_for_style","getElementById","style","element","id","textContent","appendChild","append","head","append_stylesheet","insert","anchor","insertBefore","detach","parentNode","removeChild","name","empty","data","createTextNode","listen","event","handler","options","addEventListener","removeEventListener","attr","attribute","value","removeAttribute","getAttribute","setAttribute","set_style","key","important","setProperty","set_current_component","component","get_current_component","Error","onMount","$$","on_mount","push","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","flushing","seen_callbacks","Set","flush","i","length","update","pop","callback","has","add","clear","fragment","before_update","dirty","p","ctx","after_update","outroing","outros","group_outros","r","c","check_outros","transition_in","block","local","delete","transition_out","o","d","create_component","mount_component","customElement","on_destroy","m","new_on_destroy","map","filter","destroy_component","detaching","make_dirty","then","fill","init","instance","create_fragment","not_equal","props","parent_component","bound","on_disconnect","context","Map","callbacks","skip_bound","ready","ret","rest","hydrate","nodes","Array","from","childNodes","children","l","intro","SvelteComponent","[object Object]","this","$destroy","type","index","indexOf","splice","$$props","obj","$$set","keys","privateData","WeakMap","wrappers","pd","retv","get","console","assert","setCancelFlag","passiveListener","cancelable","canceled","preventDefault","error","Event","eventTarget","set","eventPhase","currentTarget","stopped","immediateStopped","timeStamp","Date","now","defineProperty","enumerable","defineRedirectDescriptor","configurable","defineCallDescriptor","apply","arguments","getWrapper","proto","prototype","wrapper","BaseEvent","CustomEvent","call","constructor","writable","isFunc","getOwnPropertyDescriptor","defineWrapper","getPrototypeOf","isStopped","setPassiveListener","NONE","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE","stopPropagation","stopImmediatePropagation","bubbles","Boolean","defaultPrevented","composed","srcElement","cancelBubble","returnValue","window","setPrototypeOf","listenersMap","isObject","x","getListeners","listeners","TypeError","defineEventAttribute","eventTargetPrototype","eventName","listenerType","listener","next","prev","newNode","passive","once","defineEventAttributeDescriptor","defineCustomEventTarget","eventNames","CustomEventTarget","EventTarget","isArray","types","optionsIsObj","capture","undefined","wrappedEvent","wrapEvent","err","handleEvent","setEventPhase","setCurrentTarget","flatbuffers","inRange","min","max","ToDictionary","SIZEOF_SHORT","SIZEOF_INT","FILE_IDENTIFIER_LENGTH","Encoding","UTF8_BYTES","UTF16_STRING","int32","Int32Array","float32","Float32Array","buffer","float64","Float64Array","isLittleEndian","Uint16Array","Uint8Array","Long","low","high","ZERO","toFloat64","equals","other","Builder","opt_initial_size","initial_size","bb","ByteBuffer","allocate","space","minalign","vtable","vtable_in_use","isNested","object_start","vtables","vector_num_elems","force_defaults","capacity","forceDefaults","dataBuffer","asUint8Array","bytes","subarray","position","offset","prep","size","additional_bytes","align_size","old_buf_size","growByteBuffer","pad","byte_size","writeInt8","writeInt16","writeInt32","writeInt64","writeFloat32","writeFloat64","addInt8","addInt16","addInt32","addInt64","addFloat32","addFloat64","addFieldInt8","voffset","defaultValue","slot","addFieldInt16","addFieldInt32","addFieldInt64","addFieldFloat32","addFieldFloat64","addFieldOffset","addOffset","addFieldStruct","nested","notNested","new_buf_size","nbb","setPosition","startObject","numfields","endObject","vtableloc","trimmed_size","len","existing_vtable","vt1","outer_loop","vt2","readInt16","j","finish","root_table","opt_file_identifier","file_identifier","charCodeAt","requiredField","table","field","table_start","vtable_start","readInt32","startVector","elem_size","num_elems","alignment","endVector","createString","s","utf8","codePoint","createLong","bytes_","position_","readInt8","readUint8","readUint16","readUint32","readInt64","readUint64","readFloat32","readFloat64","writeUint8","writeUint16","writeUint32","writeUint64","getBufferIdentifier","result","String","fromCharCode","__offset","bb_pos","vtable_offset","__union","t","__string","opt_encoding","__indirect","__vector","__vector_len","__has_identifier","ident","Stream","tokens","slice","endOfStream","read","shift","prepend","token","unshift","decoderError","fatal","opt_code_point","TextDecoder","encoding","toLowerCase","_streaming","_BOMseen","_decoder","_fatal","_ignoreBOM","TextEncoder","_encoder","_options","UTF8Decoder","utf8_code_point","utf8_bytes_seen","utf8_bytes_needed","utf8_lower_boundary","utf8_upper_boundary","stream","bite","code_point","UTF8Encoder","count","temp","decode","input","ArrayBuffer","byteOffset","byteLength","input_stream","code_points","cp","codePointsToString","encode","opt_string","string","n","u","stringToCodePoints","_Buffer","Buffer","useNativeEncoders","decodeUtf8","decoder","toUint8Array","toString","TextDecoderPolyfill","encodeUtf8","encoder","TextEncoderPolyfill","ITERATOR_DONE","freeze","done","ArrowJSON","_json","schema","batches","dictionaries","ReadableInterop","_getDOMStream","tee","_getNodeStream","pipe","pipeTo","duplex","pipeThrough","_DOMStream","toDOMStream","_nodeStream","toNodeStream","AsyncQueue","super","_values","resolvers","_closedPromise","_closedPromiseResolve","closed","reason","return","_ensureOpen","_error","reject","Symbol","asyncIterator","streamAdapters","_","abort","close","_args","BigIntCtor","BigIntAvailable","BigIntUnavailableError","BigIntUnavailable","asIntN","asUintN","BigInt","BigInt64ArrayCtor","BigInt64ArrayAvailable","BigInt64ArrayUnavailableError","BigInt64Array","BYTES_PER_ELEMENT","BigUint64ArrayCtor","BigUint64ArrayAvailable","BigUint64ArrayUnavailableError","BigUint64Array","isBoolean","isFunction","isPromise","isIterable","iterator","isAsyncIterable","isArrowJSON","isIteratorResult","isFileHandle","isNumber","isFetchResponse","isReadableDOMStream","isReadableNodeStream","SharedArrayBuf","SharedArrayBuffer","memcpy","source","targetByteOffset","sourceByteLength","targetByteLength","dst","Math","joinUint8Arrays","chunks","sliced","xOffset","yOffset","xLen","yLen","y","collapseContiguousByteRanges","reduce","Infinity","toArrayBufferView","ArrayBufferViewCtor","isView","toInt32Array","toBigInt64Array","toBigUint64Array","pump","toArrayBufferViewIterator","ArrayCtor","wrap","buffers","it","toUint8ArrayIterator","async","toArrayBufferViewAsyncIterator","emit","toUint8ArrayAsyncIterator","rebaseValueOffsets","valueOffsets","compareArrayLike","fromIterable","cmd","threw","bufferLength","isNaN","e","throw","fromAsyncIterable","fromDOMStream","AdaptiveByteReader","releaseLock","fromNodeStream","events","onEvent","race","isFinite","evt","destroy","cleanup","byobReader","defaultReader","supportsBYOB","reader","getBYOBReader","getDefaultReader","catch","readFromBYOBReader","mode","readInto","AbstractVector","org","apache","arrow","flatbuf","MetadataVersion","UnionMode","Precision","DateUnit","TimeUnit","IntervalUnit","Type","Endianness","Null","__init","builder","startNull","endNull","Struct_","startStruct_","endStruct_","List","startList","endList","LargeList","startLargeList","endLargeList","FixedSizeList","listSize","startFixedSizeList","addListSize","endFixedSizeList","keysSorted","startMap","addKeysSorted","endMap","Union","Sparse","typeIdsOffset","numElems","startUnion","addMode","addTypeIds","endUnion","Int","bitWidth","isSigned","startInt","addBitWidth","addIsSigned","endInt","FloatingPoint","HALF","precision","startFloatingPoint","addPrecision","endFloatingPoint","Utf8","startUtf8","endUtf8","Binary","startBinary","endBinary","LargeUtf8","startLargeUtf8","endLargeUtf8","LargeBinary","startLargeBinary","endLargeBinary","FixedSizeBinary","byteWidth","startFixedSizeBinary","addByteWidth","endFixedSizeBinary","Bool","startBool","endBool","Decimal","scale","startDecimal","addScale","endDecimal","MILLISECOND","unit","startDate","addUnit","endDate","Time","startTime","endTime","Timestamp","SECOND","optionalEncoding","timezoneOffset","startTimestamp","addTimezone","endTimestamp","Interval","YEAR_MONTH","startInterval","endInterval","Duration","startDuration","endDuration","KeyValue","keyOffset","valueOffset","startKeyValue","addKey","addValue","endKeyValue","DictionaryEncoding","indexTypeOffset","isOrdered","startDictionaryEncoding","addId","addIndexType","addIsOrdered","endDictionaryEncoding","Field","nameOffset","nullable","typeType","typeOffset","dictionaryOffset","childrenOffset","customMetadataOffset","startField","addName","addNullable","addTypeType","addType","addDictionary","addChildren","addCustomMetadata","endField","Schema","Little","endianness","fieldsOffset","startSchema","addEndianness","addFields","endSchema","NS7624605610262437867.org","MessageHeader","FieldNode","null_count","RecordBatch","nodesOffset","buffersOffset","startRecordBatch","addLength","addNodes","addBuffers","endRecordBatch","DictionaryBatch","dataOffset","isDelta","startDictionaryBatch","addData","addIsDelta","endDictionaryBatch","Message","V1","version","headerType","headerOffset","bodyLength","startMessage","addVersion","addHeaderType","addHeader","addBodyLength","endMessage","BufferType","Schema_.org","Message_.org","getBool","_data","_index","byte","bit","getBit","setBool","truncateBitmap","bitmap","alignedSize","packBools","iterateBits","values","xs","begin","byteIndex","remaining","popcnt_bit_range","lhs","rhs","sum","rhsInside","lhsInside","popcnt_array","arr","cnt","pos","view","DataView","popcnt_uint32","getUint32","getUint16","getUint8","uint32","Visitor","args","visit","getVisitFn","throwIfNotFound","visitor","dtype","Data","Vector","inferDType","DataType","visitNull","visitBool","visitInt","Int8","visitInt8","Int16","visitInt16","Int32","visitInt32","Int64","visitInt64","Uint8","visitUint8","Uint16","visitUint16","Uint32","visitUint32","Uint64","visitUint64","Float","visitFloat","Float16","visitFloat16","Float32","visitFloat32","Float64","visitFloat64","visitUtf8","visitBinary","visitFixedSizeBinary","visitDate","DateDay","visitDateDay","DateMillisecond","visitDateMillisecond","visitTimestamp","TimestampSecond","visitTimestampSecond","TimestampMillisecond","visitTimestampMillisecond","TimestampMicrosecond","visitTimestampMicrosecond","TimestampNanosecond","visitTimestampNanosecond","visitTime","TimeSecond","visitTimeSecond","TimeMillisecond","visitTimeMillisecond","TimeMicrosecond","visitTimeMicrosecond","TimeNanosecond","visitTimeNanosecond","visitDecimal","visitList","Struct","visitStruct","visitUnion","DenseUnion","visitDenseUnion","SparseUnion","visitSparseUnion","Dictionary","visitDictionary","visitInterval","IntervalDayTime","visitIntervalDayTime","IntervalYearMonth","visitIntervalYearMonth","visitFixedSizeList","visitMap","_node","typeId","SINGLE","DOUBLE","MICROSECOND","NANOSECOND","DAY","DAY_TIME","Dense","TypeComparator","compareFields","fields","others","every","f","compareField","compareConstructor","compareAny","compareInt","compareFloat","compareDate","compareTimestamp","timezone","compareTime","compareUnion","typeIds","compareInterval","indices","dictionary","comparer","toStringTag","ArrayType","Int_","Int8Array","Int16Array","Uint32Array","Date_","Time_","Timestamp_","Interval_","child","valueType","valueField","join","Union_","typeIdToChildIndex","idx","Map_","keyType","getId","atomicDictionaryId","strideForType","nullCount","childData","floor","_nullCount","stride","nullBitmap","childStride","_sliceBuffers","clone","_sliceChildren","newLength","VALIDITY","TYPE","OFFSET","DATA","valueOffsetsOrChildren","valueToString","toPrimitive","JSON","stringify","createIsValidFunction","nullValues","fnBody","noNaNs","valueToCase","Function","roundLengthUpToNearest64Bytes","BPE","BufferBuilder","_resize","reservedLength","reservedByteLength","extra","reserved","array","sliceOrExtendArray","DataBufferBuilder","reserve","BitmapBufferBuilder","numValid","numInvalid","val","cur","OffsetsBufferBuilder","WideBufferBuilder","ArrayType64","_ArrayType64","buffer64","nulls","finished","_nulls","_isValid","queueingStrategy","highWaterMark","sizeProperty","numChunks","new","toVector","throughIterable","throughAsyncIterable","numChildren","_offsets","_typeIds","setValid","isValid","setValue","_setValue","valid","offsets","last","FixedWidthBuilder","opts","VariableWidthBuilder","_pendingLength","pending","_pending","current","_flush","pendingLength","_flushPending","BoolBuilder","NullBuilder","DateBuilder","DateDayBuilder","DateMillisecondBuilder","DecimalBuilder","DictionaryBuilder","dictionaryHashFunction","hashFn","_dictionaryOffset","_keysToIndices","valueToKey","keysToIndices","_dictionary","curr","concat","FixedSizeBinaryBuilder","f64","u32","uint16ToFloat64","h","expo","sigf","sign","NaN","float64ToUint16","FloatBuilder","Float16Builder","Float32Builder","Float64Builder","isArrowBigNumSymbol","for","BigNum","SignedBigNum","UnsignedBigNum","DecimalBigNum","bignumToNumber","bn","hi","lo","signed","words","number","bignumToString","bignumToBigInt","decimalToString","digits","base64","base32","checks","reverse","toJSON","valueOf","hint","TypedArray","BigIntArray","BN","num","IntBuilder","Int8Builder","Int16Builder","Int32Builder","Int64Builder","toBigInt","values64","Uint8Builder","Uint16Builder","Uint32Builder","Uint64Builder","memo","TimeBuilder","TimeSecondBuilder","TimeMillisecondBuilder","TimeMicrosecondBuilder","TimeNanosecondBuilder","TimestampBuilder","TimestampSecondBuilder","TimestampMillisecondBuilder","TimestampMicrosecondBuilder","TimestampNanosecondBuilder","IntervalBuilder","IntervalDayTimeBuilder","IntervalYearMonthBuilder","BinaryBuilder","Utf8Builder","Run","kParent","kRowIndex","kKeyToIdx","kIdxToVal","kCustomInspect","Row","parent","numKeys","ktoi","itov","getValue","getIndex","ki","vi","v","kr","vr","callbackfn","thisArg","str","defineProperties","MapRow","createRowProxy","getChildAt","StructRow","defineRowProxyProperties","findIndex","desc","row","getter","setter","hasOwnProperty","Proxy","getKey","RowProxyHandler","isExtensible","deleteProperty","preventExtensions","ownKeys","receiver","Reflect","tmp","clampRange","end","big0","isNaNFast","createElementComparator","search","typeofSearch","valueOfSearch","comparators","createSubElementsComparator","creatMapComparator","createArrayLikeComparator","createVectorComparator","createObjectComparator","compareArray","compareObject","vec","compareVector","lKeyItr","rKeyItr","rValItr","rVal","lKey","rKey","Chunked","vectors","calculateOffsets","_type","_chunks","_chunkOffsets","_length","_numChildren","selectChunkArgs","flatten","VectorName","chunk","isDictionary","_indices","_sliceInternal","columns","_children","vector","mid","isValidInternal","getInternal","self","indexOfInternal","toArray","arraySet","typedSet","chunkIndex","fromIndex","start","found","slices","chunkOffsets","chunkLength","chunkOffset","to","Column","_field","SingleChunkColumn","some","metadata","column","_chunk","selectArgs","Ctor","vals","_selectArgs","selectFieldArgs","_selectFieldArgs","_selectChunkArgs","res","selectVectorChildrenArgs","_selectVectorChildrenArgs","toKeysAndValues","entries","fieldIndex","valueIndex","generateDictionaryMap","compareSchemas","columnNames","names","columnIndices","curFields","mergeMaps","newFields","f2","newDictionaries","m1","m2","ListBuilder","_run","bind","FixedSizeListBuilder","childIndex","MapBuilder","StructBuilder","UnionBuilder","_valueToChildTypeId","childTypeId","SparseUnionBuilder","DenseUnionBuilder","SetVisitor","setEpochMsToMillisecondsLong","epochMs","setVariableWidthBytes","setDateDay","setEpochMsToDays","setDateMillisecond","setNumeric","setFloat16","setNumericX2","long","setTimestampSecond","setTimestampMillisecond","setTimestampMicrosecond","setEpochMsToMicrosecondsLong","setTimestampNanosecond","setEpochMsToNanosecondsLong","setTimeSecond","setTimeMillisecond","setTimeMicrosecond","setTimeNanosecond","setDenseUnion","setSparseUnion","setIntervalDayTime","setIntervalYearMonth","itr","_setStructVectorValue","_setStructArrayValue","_setStructObjectValue","newBuilder","getBuilderConstructor","defaultOptions","getChildOptions","T","setVisitor","Footer","Block","schemaOffset","dictionariesOffset","recordBatchesOffset","startFooter","addSchema","addDictionaries","addRecordBatches","endFooter","metaDataLength","_Block","File_.org","_Footer","Footer_","V4","recordBatches","dictionaryBatches","_recordBatches","_dictionaryBatches","buf","footer","getRootAsFooter","OffHeapFooter","startRecordBatchesVector","numRecordBatches","rb","FileBlock","startDictionariesVector","numDictionaries","db","dictionaryBatchesOffset","finishFooterBuffer","getRecordBatch","getDictionaryBatch","_footer","recordBatchesLength","dictionariesLength","fileBlock","createBlock","AsyncByteQueue","write","sync","ByteStream","ByteStreamSource","peek","AsyncByteStream","AsyncByteStreamSource","body","cancel","RandomAccessFile","readAt","getInt32","nBytes","AsyncRandomAccessFile","file","_handle","stat","bytesRead","intAsHex","kPowersOfTen","BaseInt64","L","R","product","lessThan","_times","_plus","out_buffer","fromString","out","posn","group","parseInt","substr","multiple","times","plus","left","right","this_high","other_high","negate","startsWith","Int128","L0","L1","L2","L3","R0","R1","R2","R3","multiply","sums","VectorLoader","nodesIndex","buffersIndex","nextFieldNode","readNullBitmap","readData","readOffsets","visitMany","readTypeIds","readDictionary","nextBufferRange","JSONVectorLoader","sources","isTimestamp","isInt","isTime","isDate","convertArray","isDecimal","isBinary","isFixedSizeBinary","joined","binaryDataFromJSON","isBool","isUtf8","startTypeIdsVector","createTypeIdsVector","indexType","recordBatchFromJSON","fieldNodesFromJSON","fieldNodes","validity","buffersFromJSON","BufferRegion","fieldChildrenFromJSON","fromJSON","customMetadataFromJSON","_metadata","indexTypeFromJSON","typeFromJSON","_Field","_Schema","_Message","_KeyValue","_FieldNode","_Endianness","_RecordBatch","_DictionaryBatch","header","_version","_headerType","_createHeader","_bodyLength","msg","message","messageHeaderFromJSON","_message","getRootAsMessage","decodeMessageHeader","isSchema","isRecordBatch","isDictionaryBatch","finishMessageBuffer","_nodes","_buffers","_id","_isDelta","decodeFieldChildren","childrenLength","decodeCustomMetadata","entry","customMetadataLength","customMetadata","decodeIndexType","decodeFieldType","typeIdsArray","typeAssembler","childOffsets","childrenVectorOffset","createChildrenVector","metadataOffset","createCustomMetadataVector","dictType","dictMeta","fieldOffsets","startFieldsVector","fieldsVectorOffset","createFieldsVector","platformIsLittleEndian","Big","_schema","fieldsLength","decodeSchemaFields","schemaFieldsFromJSON","recordBatch","startNodesVector","nodesVectorOffset","startBuffersVector","b_","buffersVectorOffset","batch","nodesLength","decodeFieldNodes","bufferRegions","buffersLength","decodeBuffers","dictionaryBatch","createFieldNode","createBuffer","setInt16","invalidMessageType","nullMessage","invalidMessageMetadata","expected","actual","invalidMessageBodyLength","MessageReader","readMetadataLength","readMetadata","throwIfNull","readMessage","PADDING","metadataLength","AsyncMessageReader","JSONMessageReader","_body","_batchIndex","_dictionaryIndex","flattenDataSources","MAGIC","checkForMagicArrowString","magicLength","magicAndPadding","magicX2AndPadding","VectorAssembler","_byteLength","_bufferRegions","assembler","vectorChildren","assembleResult","RangeError","isNull","addBuffer","_nullV","assembleFlatVector","assembleFlatListVector","firstOffset","lastOffset","assembleListVector","assembleNestedVector","maxChildTypeId","childLengths","shiftedOffsets","unshiftedOffsets","childLength","RecordBatchWriter","_position","_started","_sink","_dictionaryBlocks","_recordBatchBlocks","_dictionaryDeltaOffsets","autoDestroy","writeLegacyIpcFormat","_autoDestroy","_writeLegacyIpcFormat","writableStrategy","readableStrategy","writeAll","writeAllAsync","reset","sink","isWritableNodeStream","objectMode","_writeFooter","compareTo","_writeSchema","payload","Table","_InternalEmptyPlaceholderRecordBatch","_writeRecordBatch","flatbufferSize","prefixSize","nPaddingBytes","_write","of","_writePadding","_writeMessage","assemble","metadata.RecordBatch","_writeDictionaries","_writeBodyBuffers","metadata.DictionaryBatch","padding","_writeDictionaryBatch","RecordBatchStreamWriter","writer","RecordBatchFileWriter","_writeMagic","noopBuf","nullBufs","bitmapLength","distributeVectorsIntoRecordBatches","vecs","batchArgs","numBatches","batchLength","numColumns","Number","POSITIVE_INFINITY","distributeChildData","uniformlyDistributeChunksAcrossRecordBatches","_changeLengthAndBackfillNullBitmap","BaseVector","_bindDataAccessors","isConcatSpreadable","BinaryVector","BoolVector","vectorFromValuesWithType","DateVector","DateDayVector","DateMillisecondVector","DecimalVector","DictionaryVector","FixedSizeBinaryVector","FixedSizeListVector","FloatVector","ArrowType","vectorTypeToDataType","InputType","arrayTypeToDataType","convertTo16Bit","Float16Vector","Float32Vector","Float64Vector","typeCtor","dataCtor","ctor","IntervalVector","IntervalDayTimeVector","IntervalYearMonthVector","IntVector","is64bit","convert32To64Bit","Int8Vector","Int16Vector","Int32Vector","Int64Vector","_values64","Uint8Vector","Uint16Vector","Uint32Vector","Uint64Vector","ListVector","MapVector","NullVector","StructVector","_row","TimestampVector","TimestampSecondVector","TimestampMillisecondVector","TimestampMicrosecondVector","TimestampNanosecondVector","TimeVector","TimeSecondVector","TimeMillisecondVector","TimeMicrosecondVector","TimeNanosecondVector","UnionVector","DenseUnionVector","SparseUnionVector","Utf8Vector","partial0","partial2","GetVisitor","epochMillisecondsLongToMs","epochMillisecondsToDate","getVariableWidthBytes","getDateDay","epochDaysToMs","epochDaysToDate","getDateMillisecond","epochMillisecondsLongToDate","getNumeric","getFloat16","getBigInts","getTimestampSecond","getTimestampMillisecond","getTimestampMicrosecond","epochMicrosecondsLongToMs","getTimestampNanosecond","epochNanosecondsLongToMs","getTimeSecond","getTimeMillisecond","getTimeMicrosecond","getTimeNanosecond","getDenseUnion","getSparseUnion","getIntervalDayTime","getIntervalYearMonth","interval","int32s","_vector","decimal","IndexOfVisitor","indexOfValue","searchElement","indexOfNull","compare","indexOfUnion","IteratorVisitor","vectorIterator","getFn","getVisitor","nullByte","nullBit","nullableIterator","ToArrayVisitor","arrayOfVector","iteratorVisitor","variableWidthColumnErrorMessage","____","visitFields","newDataType","getVectorConstructor","transform","indexOfVisitor","toArrayVisitor","getByteWidth","byteWidthVisitor","wrapNullableSet","VectorCtor","fn.partial2","fn.partial0","partialType0","fromStruct","tableFromIterable","tableFromAsyncIterable","RecordBatchReader","isSync","open","opening","cols","selectColumnArgs","numCols","getColumnAt","getColumnIndex","nameToIndex","selectAt","columnName","oldToNew","newIdx","_f","_fs","fs","vs","batchData","ensureSameLengthData","_dictionaries","DictionaryCollector","collect","impl","_impl","isFile","isAsync","isStream","readRecordBatch","RecordBatchStreamReader","RecordBatchJSONReaderImpl","fromArrowJSON","AsyncRecordBatchFileReader","AsyncRecordBatchFileReaderImpl","AsyncRecordBatchStreamReader","AsyncRecordBatchStreamReaderImpl","fromFileHandle","RecordBatchFileReader","RecordBatchFileReaderImpl","fromAsyncByteStream","RecordBatchStreamReaderImpl","fromByteStream","readAllSync","readAllAsync","RecordBatchReaderImpl","_recordBatchIndex","_loadVectors","_reader","shouldAutoDestroy","readSchema","_readNextMessageAndValidate","readMessageBody","_loadRecordBatch","_loadDictionaryBatch","_readFooter","_readDictionaryBatch","seek","BuilderTransform","_numChunks","_finished","_bufferedSize","builderOptions","_controller","_builder","_getSize","chunkByteLength","readableHighWaterMark","writableHighWaterMark","ReadableStream","pull","_maybeFlush","WritableStream","_writeValueAndReturnChunkSize","bufferedSize","controller","desiredSize","_enqueue","enqueue","Value","Literal","Equals","LTeq","GTeq","Not","ge","le","eq","Col","colidx","Predicate","expr","And","Or","ComparisonPredicate","_bindLitLit","_bindLitCol","_bindColLit","_bindColCol","CombinationPredicate","accum","_batch","rtrn","left_func","right_func","col","lit","col_func","lastDictionary","reverseLookup","lastKey","func","countBy","DataFrame","scan","scanReverse","predicate","FilteredDataFrame","batchIndex","numRows","count_by","countByteLength","ceil","log","counts","CountByResult","_predicate","isBound","and","bm","hwm","asyncIterableAsReadableDOMStream","iterableAsReadableDOMStream","queue","readable","ArrowTable","indexBuffer","columnsBuffer","styler","getCell","rowIndex","columnIndex","isBlankCell","headerRows","headerColumns","isIndexCell","isColumnsCell","classNames","content","dataColumnIndex","getContent","columnsTable","dataRowIndex","uuid","indexTable","displayValuesTable","dataTable","getColumnTypeId","nanosToDate","caption","rows","dataRows","dataColumns","columnTable","nanos","ComponentMessageType","Streamlit","levels","updates","to_null_out","accounted_for","$$scope","spread_props","renderData","width","disabled","spreadArgs","onRenderEvent","detail","RENDER_EVENT","setComponentReady","API_VERSION","registeredMessageListener","onMessageEvent","sendBackMsg","COMPONENT_READY","apiVersion","setFrameHeight","height","scrollHeight","lastFrameHeight","SET_FRAME_HEIGHT","setComponentValue","SET_COMPONENT_VALUE","onRenderMessage","dataframeArgs","argsDataframeToObject","eventData","dispatchEvent","argsDataframe","argsDataframeArrow","toArrowTable","fromEntries","df","postMessage","isStreamlitMessage","setStreamlitLifecycle","iterations","selectedImageUrl","imageUrls","currentSrc","ImageGallery"],"mappings":"gCAAA,SAASA,KAET,SAASC,EAAOC,EAAKC,GAEjB,IAAK,MAAMC,KAAKD,EACZD,EAAIE,GAAKD,EAAIC,GACjB,OAAOF,EAUX,SAASG,EAAIC,GACT,OAAOA,IAEX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