From d999ead197eecbec7ba7210275ee9478f5e0eb44 Mon Sep 17 00:00:00 2001 From: Ryan Morton Date: Tue, 28 Jul 2026 19:05:44 -0600 Subject: [PATCH 1/9] [engine-additive] feat: add keyframe storytelling and WebR gate --- .Rbuildignore | 3 + .agents/skills/cut-release/SKILL.md | 10 +- .github/workflows/webr.yaml | 43 + .gitignore | 1 + NAMESPACE | 3 + NEWS.md | 13 + R/addKeyframe.R | 159 ++ README.md | 21 +- _pkgdown.yml | 4 + inst/htmlwidgets/myIO/myIOapi.js | 162 +- inst/htmlwidgets/myIO/src/Chart.js | 5 + inst/htmlwidgets/myIO/src/index.js | 8 + .../myIO/src/interactions/keyframes.js | 194 +++ inst/htmlwidgets/myIO/style.css | 46 + inst/myio-schema.json | 13 + man/addKeyframe.Rd | 34 + man/setKeyframe.Rd | 31 + mcp/myio-schema.json | 13 + tests/js/keyframes.test.js | 111 ++ tests/js/myio-proxy.test.js | 11 + tests/playwright/fixtures/keyframes.html | 47 + tests/playwright/keyframes.spec.ts | 77 + tests/testthat/test_keyframes.R | 93 ++ tests/webr/Dockerfile | 7 + tests/webr/package-lock.json | 1371 +++++++++++++++++ tests/webr/package.json | 9 + tests/webr/verify.mjs | 179 +++ .../articles/sequential-storytelling.Rmd | 145 ++ 28 files changed, 2727 insertions(+), 86 deletions(-) create mode 100644 .github/workflows/webr.yaml create mode 100644 R/addKeyframe.R create mode 100644 inst/htmlwidgets/myIO/src/interactions/keyframes.js create mode 100644 man/addKeyframe.Rd create mode 100644 man/setKeyframe.Rd create mode 100644 tests/js/keyframes.test.js create mode 100644 tests/playwright/fixtures/keyframes.html create mode 100644 tests/playwright/keyframes.spec.ts create mode 100644 tests/testthat/test_keyframes.R create mode 100644 tests/webr/Dockerfile create mode 100644 tests/webr/package-lock.json create mode 100644 tests/webr/package.json create mode 100644 tests/webr/verify.mjs create mode 100644 vignettes/articles/sequential-storytelling.Rmd diff --git a/.Rbuildignore b/.Rbuildignore index 4378e740..b9ee4398 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -14,6 +14,8 @@ ^LICENSE\.md$ ^cran-comments\.md$ ^\.claude$ +^\.agents$ +^\.codex$ ^\.do$ ^app$ ^coverage$ @@ -38,6 +40,7 @@ ^tests/prototypes/shiny-transport$ ^tests/prototypes$ ^tests/playwright$ +^tests/webr$ ^playwright\.config\.ts$ ^inst/htmlwidgets/myIO/src/.*\.test\.js$ ^inst/htmlwidgets/myIO/src/coordinator/__tests__$ diff --git a/.agents/skills/cut-release/SKILL.md b/.agents/skills/cut-release/SKILL.md index a35a1697..0ca8450f 100644 --- a/.agents/skills/cut-release/SKILL.md +++ b/.agents/skills/cut-release/SKILL.md @@ -12,6 +12,10 @@ confirmation link, so full automation stops one step short of that by constructi ## Step 1 — Re-derive scope (don't trust a stale snapshot) +- Hard preflight: require `git status --porcelain` to be empty, require the current branch to be + `main`, fetch `origin`, and require `main`, its upstream, and `origin/main` to resolve to the same + commit. If any condition fails, stop before changing release metadata. Never release from a dirty, + detached, ahead, or behind worktree. - `git tag --sort=-v:refname | head -1` — last released tag (e.g. `v1.2.0`). - `git log {last_tag}..HEAD --oneline --no-merges` — everything merged since, including anything `backlog-pipeline`/`idea-scout` landed after this skill was written. Read every commit. @@ -58,8 +62,10 @@ package differentiation, final checks. Get a verdict. 1. `R CMD build . --no-manual` then `R CMD check --as-cran` on the resulting tarball — confirm 0 errors / 0 warnings, and every NOTE is one already documented in `cran-comments.md`. -2. Commit `DESCRIPTION` + `NEWS.md` directly to `main` (not a feature branch — this is a release - commit, matching how prior releases in this repo were tagged directly on main). +2. Review `git status --short` and commit every release-metadata file changed by the workflow, + including `DESCRIPTION`, `NEWS.md`, `cran-comments.md`, generated documentation, schemas, and + checksums where applicable. Do not tag with any workflow-generated metadata left uncommitted. + The release commit is made directly on `main`, matching how prior releases were tagged. 3. `git tag -a v{version} -m "Release v{version}"` and `git push origin main --tags`. 4. `gh release create v{version}` with notes drawn from the finalized NEWS.md section (customer- facing summary), following the format `/release` already uses. diff --git a/.github/workflows/webr.yaml b/.github/workflows/webr.yaml new file mode 100644 index 00000000..e2345d03 --- /dev/null +++ b/.github/workflows/webr.yaml @@ -0,0 +1,43 @@ +name: WebR compatibility + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + webr: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v7 + + - name: Pin WebR 0.6.0 builder with the upstream resolver patch + run: docker build tests/webr -t myio-webr-builder:v0.6.0 + + - name: Build myIO and dependencies for WebAssembly + uses: r-wasm/actions/build-rwasm@v3 + with: + packages: "local::." + repo-path: _webr-repo + image-path: _webr-image + webr-image: myio-webr-builder:v0.6.0 + + - uses: actions/setup-node@v7 + with: + node-version: 24 + cache: npm + cache-dependency-path: tests/webr/package-lock.json + + - name: Install WebR harness dependencies + run: npm ci --prefix tests/webr + + - name: Install Chromium + run: npx --prefix tests/webr playwright install --with-deps chromium + + - name: Verify R to browser rendering + run: node tests/webr/verify.mjs _webr-repo diff --git a/.gitignore b/.gitignore index 363be887..a7a66486 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ inst/myIOsticker.png /pkgdown coverage/ /.claude +/.codex/ .mcp.json /.playwright-mcp /test-results diff --git a/NAMESPACE b/NAMESPACE index 8b3a545f..2c5be048 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -2,6 +2,7 @@ S3method(print,myIO_duckdb_wasm_status) export(addIoLayer) +export(addKeyframe) export(clear_duckdb_wasm_cache) export(defineCategoricalAxis) export(dragPoints) @@ -28,6 +29,7 @@ export(setBrush) export(setColorScheme) export(setExportOptions) export(setFacet) +export(setKeyframe) export(setLayerOpacity) export(setLinked) export(setLinkedCursor) @@ -40,6 +42,7 @@ export(setToggle) export(setToolTipOptions) export(setTransition) export(setTransitionSpeed) +export(stepKeyframe) export(stop_duckdb_wasm_missing) export(suppressAxis) export(suppressLegend) diff --git a/NEWS.md b/NEWS.md index b3ee91ea..e6d064e3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,19 @@ ## New features +* Keyframe storytelling adds `addKeyframe()` for named, transformed data + snapshots and accessible previous/play-pause/next controls. Single-layer + charts accept a data frame; multi-layer charts accept a named list keyed by + layer label, with omitted layers retaining their prior state. Playback runs + once and stops at the final frame, while reduced-motion and zero-duration + transitions remain fully step- and play-capable. Shiny applications can use + `setKeyframe()` and `stepKeyframe()` through the existing instance registry. +* WebR 0.6.0 compatibility is now a blocking CI contract: the package and its + dependencies are compiled with the official r-wasm action, loaded in WebR, + used to create and serialize a real widget, and rendered with the production + bundle in Chromium. The verified path does not claim DuckDB-WASM support or + universal compatibility across browser hosts. + * Legend/button UI streamlining (#84): charts now show exactly one legend surface at a time. When a discrete chart's compact in-plot legend is showing, the chart-controls panel no longer repeats the same legend and becomes diff --git a/R/addKeyframe.R b/R/addKeyframe.R new file mode 100644 index 00000000..2e009f35 --- /dev/null +++ b/R/addKeyframe.R @@ -0,0 +1,159 @@ +#' Add a Named Data Keyframe +#' +#' Registers a named data state for sequential chart storytelling. A chart with +#' one serialized layer accepts a data frame directly. Multi-layer charts use a +#' named list of data frames keyed by existing layer labels; omitted layers +#' retain their data from the previous keyframe. +#' +#' @param myIO A widget created by \code{\link{myIO}()} with at least one layer. +#' @param data A data frame for a single-layer chart, or a named list of data +#' frames keyed by layer label for a multi-layer chart. +#' @param label A unique, non-empty keyframe label. +#' @return A modified \code{myIO} widget with the keyframe appended. +#' @examples +#' start <- data.frame(x = 1:3, y = c(2, 4, 3)) +#' finish <- data.frame(x = 1:3, y = c(5, 3, 7)) +#' myIO(start) |> +#' addIoLayer("line", label = "series", +#' mapping = list(x_var = "x", y_var = "y")) |> +#' addKeyframe(start, "Start") |> +#' addKeyframe(finish, "Finish") +#' @export +addKeyframe <- function(myIO, data, label) { + assert_myIO(myIO) + layers <- myIO$x$config$layers + if (length(layers) == 0L) { + stop("addKeyframe(): the chart must have at least one layer.", call. = FALSE) + } + if (!is.character(label) || length(label) != 1L || is.na(label) || + !nzchar(trimws(label))) { + stop("addKeyframe(): label must be a single non-empty string.", call. = FALSE) + } + + keyframes <- myIO$x$config$keyframes + if (is.null(keyframes)) keyframes <- list() + existing_labels <- vapply(keyframes, function(frame) frame[["label"]], character(1)) + if (label %in% existing_labels) { + stop("addKeyframe(): label must be unique; '", label, "' already exists.", + call. = FALSE) + } + + layer_labels <- vapply(layers, function(layer) layer[["label"]], character(1)) + if (is.data.frame(data)) { + if (length(layers) != 1L) { + stop("addKeyframe(): multi-layer charts require a named list of data frames.", + call. = FALSE) + } + updates <- stats::setNames(list(data), layer_labels[[1]]) + } else if (is.list(data)) { + update_names <- names(data) + if (length(data) == 0L || is.null(update_names) || + any(is.na(update_names)) || any(!nzchar(update_names))) { + stop("addKeyframe(): data must be a non-empty named list keyed by layer label.", + call. = FALSE) + } + if (anyDuplicated(update_names)) { + stop("addKeyframe(): layer names in data must be unique.", call. = FALSE) + } + unknown <- setdiff(update_names, layer_labels) + if (length(unknown) > 0L) { + stop("addKeyframe(): unknown layer label(s): ", paste(unknown, collapse = ", "), + ".", call. = FALSE) + } + invalid <- update_names[!vapply(data, is.data.frame, logical(1))] + if (length(invalid) > 0L) { + stop("addKeyframe(): data for layer '", invalid[[1]], "' must be a data frame.", + call. = FALSE) + } + updates <- data + } else { + stop("addKeyframe(): data must be a data frame or named list of data frames.", + call. = FALSE) + } + + prior_layers <- if (length(keyframes) > 0L) keyframes[[length(keyframes)]]$layers else + lapply(layers, function(layer) list(label = layer$label, data = layer$data)) + prior_by_label <- stats::setNames( + prior_layers, + vapply(prior_layers, function(layer) layer[["label"]], character(1)) + ) + snapshot <- lapply(seq_along(layers), function(index) { + layer <- layers[[index]] + layer_label <- layer$label + if (layer_label %in% names(updates)) { + list(label = layer_label, data = serialize_keyframe_data(layer, updates[[layer_label]])) + } else { + list(label = layer_label, data = prior_by_label[[layer_label]]$data) + } + }) + + myIO$x$config$keyframes <- c(keyframes, list(list(label = label, layers = snapshot))) + myIO +} + +serialize_keyframe_data <- function(layer, data) { + data <- ensure_source_key(data) + transform <- if (is.null(layer$transform)) "identity" else layer$transform + transformed <- get_transform(transform)(data, layer$mapping, layer$options) + transformed_data <- transformed$data + if (identical(layer$type, "treemap")) { + return(build_tree(transformed_data, layer$label, + layer$mapping$level_1, layer$mapping$level_2)) + } + as_layer_rows(transformed_data) +} + +#' Control Keyframes in Shiny +#' +#' Select a named or numbered keyframe, or step an existing myIO widget without +#' re-rendering the widget. +#' +#' @param proxy A \code{myIO_proxy} object returned by \code{\link{myIOProxy}()}. +#' @param frame A unique keyframe label or positive one-based keyframe index. +#' @param direction Either \code{"next"} or \code{"previous"}. +#' @return The proxy, invisibly. +#' @examples +#' \dontrun{ +#' myIOProxy("chart") |> setKeyframe("Forecast") +#' myIOProxy("chart") |> stepKeyframe("next") +#' } +#' @export +setKeyframe <- function(proxy, frame) { + assert_keyframe_proxy(proxy, "setKeyframe") + valid_character <- is.character(frame) && length(frame) == 1L && + !is.na(frame) && nzchar(trimws(frame)) + valid_numeric <- is.numeric(frame) && length(frame) == 1L && !is.na(frame) && + is.finite(frame) && frame >= 1 && frame == floor(frame) + if (!valid_character && !valid_numeric) { + if (is.numeric(frame) && length(frame) == 1L && !is.na(frame) && frame < 1) { + stop("setKeyframe(): numeric frame must be a positive one-based index.", + call. = FALSE) + } + stop("setKeyframe(): frame must be a single non-empty label or positive one-based index.", + call. = FALSE) + } + if (valid_numeric) frame <- as.integer(frame) + proxy$session$sendCustomMessage( + "myio:keyframe-control", + list(id = proxy$id, action = "select", frame = frame) + ) + invisible(proxy) +} + +#' @rdname setKeyframe +#' @export +stepKeyframe <- function(proxy, direction = c("next", "previous")) { + assert_keyframe_proxy(proxy, "stepKeyframe") + direction <- match.arg(direction) + proxy$session$sendCustomMessage( + "myio:keyframe-control", + list(id = proxy$id, action = "step", direction = direction) + ) + invisible(proxy) +} + +assert_keyframe_proxy <- function(proxy, caller) { + if (!inherits(proxy, "myIO_proxy")) { + stop(caller, "(): proxy must be a myIOProxy() object.", call. = FALSE) + } +} diff --git a/README.md b/README.md index 33ee921f..d9bbf007 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,14 @@ [![R-CMD-check](https://github.com/mortonanalytics/myIO/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/mortonanalytics/myIO/actions/workflows/R-CMD-check.yaml) +[![WebR compatibility](https://github.com/mortonanalytics/myIO/actions/workflows/webr.yaml/badge.svg)](https://github.com/mortonanalytics/myIO/actions/workflows/webr.yaml) ![R coverage](man/figures/coverage-badge.svg) ![JS coverage](man/figures/js-coverage-badge.svg) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -![version](https://img.shields.io/badge/version-1.0.0-blue) +![version](https://img.shields.io/badge/version-1.3.0-blue) # myIO -An R package for creating interactive `d3.js` visualizations using `htmlwidgets`. Supports 17 chart types including scatter plots, line charts, bar charts, treemaps, and more — all composable through a piped API. +An R package for creating interactive `d3.js` visualizations using `htmlwidgets`. Supports 36 chart types including scatter plots, line charts, uncertainty views, statistical composites, and more — all composable through a piped API. [Live Demo](https://mortonanalytics.github.io/myIO/) @@ -84,6 +85,19 @@ myIO charts are bidirectional — user actions flow back as structured data: - `setAnnotation()` — Click to label data points; export annotations as CSV - `setLinked()` — Crosstalk linked brushing across multiple charts - `setSlider()` — Parameter sliders that trigger Shiny recomputation +- `addKeyframe()` — Register complete data snapshots for sequential storytelling +- `setKeyframe()` / `stepKeyframe()` — Select or step keyframes through a Shiny proxy + +## Runtime Compatibility + +| Runtime | Supported path | +|---------|----------------| +| RStudio, R Markdown, and Quarto | Standard `htmlwidgets` rendering | +| Shiny | Widget rendering, reactive inputs, proxy data updates, and keyframe control | +| WebR 0.6.0 | Precompiled Wasm package, R payload creation, and production-bundle rendering in Chromium | + +The WebR claim is intentionally bounded to the pinned end-to-end CI path; it +does not imply that DuckDB-WASM or every browser host has been validated. ## Customization @@ -96,6 +110,7 @@ Customize plots by chaining additional functions: - `setColorScheme()` — Apply a custom color palette - `setTheme()` — Set theme tokens (colors, font, background) - `setTransitionSpeed()` — Control animation duration +- `setTransition()` — Configure duration, easing, and stagger - `setToolTipOptions()` — Configure tooltip behavior - `setToggle()` — Enable layer toggle controls - `flipAxis()` — Swap x and y axes @@ -104,4 +119,4 @@ Customize plots by chaining additional functions: - `dragPoints()` — Enable draggable points - `setReferenceLines()` — Add reference lines -See the [Getting Started](https://mortonanalytics.github.io/myIO/articles/getting-started.html), [Chart Types](https://mortonanalytics.github.io/myIO/articles/chart-types.html), [Shiny Integration](https://mortonanalytics.github.io/myIO/articles/shiny-integration.html), and [Transforms & Theming](https://mortonanalytics.github.io/myIO/articles/transforms-and-theming.html) vignettes for full examples. +See the [Getting Started](https://mortonanalytics.github.io/myIO/articles/getting-started.html), [Chart Types](https://mortonanalytics.github.io/myIO/articles/chart-types.html), [Sequential Storytelling](https://mortonanalytics.github.io/myIO/articles/sequential-storytelling.html), [Shiny Integration](https://mortonanalytics.github.io/myIO/articles/shiny-integration.html), and [Transforms & Theming](https://mortonanalytics.github.io/myIO/articles/transforms-and-theming.html) articles for full examples. diff --git a/_pkgdown.yml b/_pkgdown.yml index 4c152a5c..359484a8 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -53,6 +53,7 @@ articles: contents: - shiny-integration - articles/shiny-interactions + - articles/sequential-storytelling - title: Big-data & Linking contents: - large-data-linking @@ -78,6 +79,7 @@ reference: contents: - myIO - addIoLayer + - addKeyframe - title: Axes & Scales desc: Control axis formatting, limits, and orientation contents: @@ -127,6 +129,8 @@ reference: contents: - starts_with("myIO-shiny") - myIOProxy + - setKeyframe + - stepKeyframe - title: LLM Tool Calling desc: Machine-readable schema and validators for agent-built chart specs contents: diff --git a/inst/htmlwidgets/myIO/myIOapi.js b/inst/htmlwidgets/myIO/myIOapi.js index caf6c0df..013653d0 100644 --- a/inst/htmlwidgets/myIO/myIOapi.js +++ b/inst/htmlwidgets/myIO/myIOapi.js @@ -1,31 +1,31 @@ -(()=>{var l9=Object.create;var Qm=Object.defineProperty;var c9=Object.getOwnPropertyDescriptor;var u9=Object.getOwnPropertyNames;var f9=Object.getPrototypeOf,d9=Object.prototype.hasOwnProperty;var Mt=(t,e)=>()=>(t&&(e=t(t=0)),e);var Eg=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Xc=(t,e)=>{for(var r in e)Qm(t,r,{get:e[r],enumerable:!0})},h9=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of u9(e))!d9.call(t,s)&&s!==r&&Qm(t,s,{get:()=>e[s],enumerable:!(i=c9(e,s))||i.enumerable});return t};var y0=(t,e,r)=>(r=t!=null?l9(f9(t)):{},h9(e||!t||!t.__esModule?Qm(r,"default",{value:t,enumerable:!0}):r,t));function My(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(t);s=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function bi(t){return this instanceof bi?(this.v=t,this):new bi(t)}function y1(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r.apply(t,e||[]),s,o=[];return s=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),g("next"),g("throw"),g("return",h),s[Symbol.asyncIterator]=function(){return this},s;function h(I){return function(H){return Promise.resolve(H).then(I,w)}}function g(I,H){i[I]&&(s[I]=function(J){return new Promise(function(Z,oe){o.push([I,J,Z,oe])>1||v(I,J)})},H&&(s[I]=H(s[I])))}function v(I,H){try{x(i[I](H))}catch(J){O(o[0][3],J)}}function x(I){I.value instanceof bi?Promise.resolve(I.value.v).then(_,w):O(o[0][2],I)}function _(I){v("next",I)}function w(I){v("throw",I)}function O(I,H){I(H),o.shift(),o.length&&v(o[0][0],o[0][1])}}function Rd(t){var e,r;return e={},i("next"),i("throw",function(s){throw s}),i("return"),e[Symbol.iterator]=function(){return this},e;function i(s,o){e[s]=t[s]?function(h){return(r=!r)?{value:bi(t[s](h)),done:!1}:o?o(h):h}:o}}function dl(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof ky=="function"?ky(t):t[Symbol.iterator](),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(o){r[o]=t[o]&&function(h){return new Promise(function(g,v){h=t[o](h),s(g,v,h.done,h.value)})}}function s(o,h,g,v){Promise.resolve(v).then(function(x){o({value:x,done:g})},h)}}var G1=Mt(()=>{});var By,$h,Fx,Jc,E2=Mt(()=>{By=new TextDecoder("utf-8"),$h=By.decode.bind(By),Fx=new TextEncoder,Jc=t=>Fx.encode(t)});var $x,Fy,_o,b1,hl,fc,$l,r4,n4,i4,s4,a4,$y,Ph,Py,o4,Uy,w2=Mt(()=>{$x=t=>typeof t=="number",Fy=t=>typeof t=="boolean",_o=t=>typeof t=="function",b1=t=>t!=null&&Object(t)===t,hl=t=>b1(t)&&_o(t.then),fc=t=>b1(t)&&_o(t[Symbol.iterator]),$l=t=>b1(t)&&_o(t[Symbol.asyncIterator]),r4=t=>b1(t)&&b1(t.schema),n4=t=>b1(t)&&"done"in t&&"value"in t,i4=t=>b1(t)&&_o(t.stat)&&$x(t.fd),s4=t=>b1(t)&&Ph(t.body),a4=t=>"_getDOMStream"in t&&"_getNodeStream"in t,$y=t=>b1(t)&&_o(t.abort)&&_o(t.getWriter)&&!a4(t),Ph=t=>b1(t)&&_o(t.cancel)&&_o(t.getReader)&&!a4(t),Py=t=>b1(t)&&_o(t.end)&&_o(t.write)&&Fy(t.writable)&&!a4(t),o4=t=>b1(t)&&_o(t.read)&&_o(t.pipe)&&Fy(t.readable)&&!a4(t),Uy=t=>b1(t)&&_o(t.clear)&&_o(t.bytes)&&_o(t.position)&&_o(t.setPosition)&&_o(t.capacity)&&_o(t.getBufferIdentifier)&&_o(t.createLong)});var I6={};Xc(I6,{compareArrayLike:()=>T6,joinUint8Arrays:()=>pl,memcpy:()=>Uh,rebaseValueOffsets:()=>c4,toArrayBufferView:()=>Mi,toArrayBufferViewAsyncIterator:()=>dc,toArrayBufferViewIterator:()=>Kc,toBigInt64Array:()=>l4,toBigUint64Array:()=>qx,toFloat32Array:()=>zx,toFloat32ArrayAsyncIterator:()=>o_,toFloat32ArrayIterator:()=>Zx,toFloat64Array:()=>Hx,toFloat64ArrayAsyncIterator:()=>l_,toFloat64ArrayIterator:()=>e_,toInt16Array:()=>Vx,toInt16ArrayAsyncIterator:()=>n_,toInt16ArrayIterator:()=>Xx,toInt32Array:()=>jf,toInt32ArrayAsyncIterator:()=>i_,toInt32ArrayIterator:()=>Jx,toInt8Array:()=>Ux,toInt8ArrayAsyncIterator:()=>r_,toInt8ArrayIterator:()=>Yx,toUint16Array:()=>Gx,toUint16ArrayAsyncIterator:()=>s_,toUint16ArrayIterator:()=>Kx,toUint32Array:()=>jx,toUint32ArrayAsyncIterator:()=>a_,toUint32ArrayIterator:()=>Qx,toUint8Array:()=>oi,toUint8ArrayAsyncIterator:()=>A6,toUint8ArrayIterator:()=>w6,toUint8ClampedArray:()=>Wx,toUint8ClampedArrayAsyncIterator:()=>c_,toUint8ClampedArrayIterator:()=>t_});function Px(t){let e=t[0]?[t[0]]:[],r,i,s,o;for(let h,g,v=0,x=0,_=t.length;++v<_;){if(h=e[x],g=t[v],!h||!g||h.buffer!==g.buffer||g.byteOffset_+w.byteLength,0),s,o,h,g=0,v=-1,x=Math.min(e||Number.POSITIVE_INFINITY,i);for(let _=r.length;++v<_;){if(s=r[v],o=s.subarray(0,Math.min(s.length,x-g)),x<=g+o.length){o.length0)do if(t[r]!==e[r])return!1;while(++r{G1();E2();w2();E6=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;Ux=t=>Mi(Int8Array,t),Vx=t=>Mi(Int16Array,t),jf=t=>Mi(Int32Array,t),l4=t=>Mi(BigInt64Array,t),oi=t=>Mi(Uint8Array,t),Gx=t=>Mi(Uint16Array,t),jx=t=>Mi(Uint32Array,t),qx=t=>Mi(BigUint64Array,t),zx=t=>Mi(Float32Array,t),Hx=t=>Mi(Float64Array,t),Wx=t=>Mi(Uint8ClampedArray,t),S6=t=>(t.next(),t);Yx=t=>Kc(Int8Array,t),Xx=t=>Kc(Int16Array,t),Jx=t=>Kc(Int32Array,t),w6=t=>Kc(Uint8Array,t),Kx=t=>Kc(Uint16Array,t),Qx=t=>Kc(Uint32Array,t),Zx=t=>Kc(Float32Array,t),e_=t=>Kc(Float64Array,t),t_=t=>Kc(Uint8ClampedArray,t);r_=t=>dc(Int8Array,t),n_=t=>dc(Int16Array,t),i_=t=>dc(Int32Array,t),A6=t=>dc(Uint8Array,t),s_=t=>dc(Uint16Array,t),a_=t=>dc(Uint32Array,t),o_=t=>dc(Float32Array,t),l_=t=>dc(Float64Array,t),c_=t=>dc(Uint8ClampedArray,t)});function*u_(t){let e,r=!1,i=[],s,o,h,g=0;function v(){return o==="peek"?pl(i,h)[0]:([s,i,g]=pl(i,h),s)}({cmd:o,size:h}=(yield null)||{cmd:"read",size:0});let x=w6(t)[Symbol.iterator]();try{do if({done:e,value:s}=Number.isNaN(h-g)?x.next():x.next(h-g),!e&&s.byteLength>0&&(i.push(s),g+=s.byteLength),e||h<=g)do({cmd:o,size:h}=yield v());while(h0&&(s.push(o),v+=o.byteLength),r||g<=v)do({cmd:h,size:g}=yield yield bi(x()));while(g0&&(s.push(oi(o)),v+=o.byteLength),r||g<=v)do({cmd:h,size:g}=yield yield bi(x()));while(gI[2]))),i==="error")break;if((s=i==="end")||(Number.isFinite(g-v)?(_=oi(t.read(g-v)),_.byteLength0&&(x.push(_),v+=_.byteLength)),s||g<=v)do({cmd:h,size:g}=yield yield bi(w()));while(g{for(let[oe,se]of I)t.off(oe,se);try{let oe=t.destroy;oe&&oe.call(t,H),H=void 0}catch(oe){H=oe||H}finally{H!=null?Z(H):J()}})}})}var Go,u4,C6,O6,Vh=Mt(()=>{G1();Lo();Go={fromIterable(t){return u4(u_(t))},fromAsyncIterable(t){return u4(f_(t))},fromDOMStream(t){return u4(d_(t))},fromNodeStream(t){return u4(h_(t))},toDOMStream(t,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(t,e){throw new Error('"toNodeStream" not available in this environment')}},u4=t=>(t.next(),t);C6=class{constructor(e){this.source=e,this.reader=null,this.reader=this.source.getReader(),this.reader.closed.catch(()=>{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(e){return An(this,void 0,void 0,function*(){let{reader:r,source:i}=this;r&&(yield r.cancel(e).catch(()=>{})),i&&i.locked&&this.releaseLock()})}read(e){return An(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};let r=yield this.reader.read();return!r.done&&(r.value=oi(r)),r})}},O6=(t,e)=>{let r=s=>i([e,s]),i;return[e,r,new Promise(s=>(i=s)&&t.once(e,r))]}});var us,f4=Mt(()=>{(function(t){t[t.V1=0]="V1",t[t.V2=1]="V2",t[t.V3=2]="V3",t[t.V4=3]="V4",t[t.V5=4]="V5"})(us||(us={}))});var Qi,L6=Mt(()=>{(function(t){t[t.Sparse=0]="Sparse",t[t.Dense=1]="Dense"})(Qi||(Qi={}))});var fs,N6=Mt(()=>{(function(t){t[t.HALF=0]="HALF",t[t.SINGLE=1]="SINGLE",t[t.DOUBLE=2]="DOUBLE"})(fs||(fs={}))});var xs,D6=Mt(()=>{(function(t){t[t.DAY=0]="DAY",t[t.MILLISECOND=1]="MILLISECOND"})(xs||(xs={}))});var cn,Gh=Mt(()=>{(function(t){t[t.SECOND=0]="SECOND",t[t.MILLISECOND=1]="MILLISECOND",t[t.MICROSECOND=2]="MICROSECOND",t[t.NANOSECOND=3]="NANOSECOND"})(cn||(cn={}))});var Hi,R6=Mt(()=>{(function(t){t[t.YEAR_MONTH=0]="YEAR_MONTH",t[t.DAY_TIME=1]="DAY_TIME",t[t.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"})(Hi||(Hi={}))});var d4=Mt(()=>{});var Qc,h4,p4,kd,k6=Mt(()=>{Qc=new Int32Array(2),h4=new Float32Array(Qc.buffer),p4=new Float64Array(Qc.buffer),kd=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1});var jh,M6=Mt(()=>{(function(t){t[t.UTF8_BYTES=1]="UTF8_BYTES",t[t.UTF16_STRING=2]="UTF16_STRING"})(jh||(jh={}))});var jo,B6=Mt(()=>{d4();M6();k6();jo=class t{constructor(e){this.bytes_=e,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(e){return new t(new Uint8Array(e))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(e){this.position_=e}capacity(){return this.bytes_.length}readInt8(e){return this.readUint8(e)<<24>>24}readUint8(e){return this.bytes_[e]}readInt16(e){return this.readUint16(e)<<16>>16}readUint16(e){return this.bytes_[e]|this.bytes_[e+1]<<8}readInt32(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24}readUint32(e){return this.readInt32(e)>>>0}readInt64(e){return BigInt.asIntN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<>8}writeUint16(e,r){this.bytes_[e]=r,this.bytes_[e+1]=r>>8}writeInt32(e,r){this.bytes_[e]=r,this.bytes_[e+1]=r>>8,this.bytes_[e+2]=r>>16,this.bytes_[e+3]=r>>24}writeUint32(e,r){this.bytes_[e]=r,this.bytes_[e+1]=r>>8,this.bytes_[e+2]=r>>16,this.bytes_[e+3]=r>>24}writeInt64(e,r){this.writeInt32(e,Number(BigInt.asIntN(32,r))),this.writeInt32(e+4,Number(BigInt.asIntN(32,r>>BigInt(32))))}writeUint64(e,r){this.writeUint32(e,Number(BigInt.asUintN(32,r))),this.writeUint32(e+4,Number(BigInt.asUintN(32,r>>BigInt(32))))}writeFloat32(e,r){h4[0]=r,this.writeInt32(e,Qc[0])}writeFloat64(e,r){p4[0]=r,this.writeInt32(e,Qc[kd?0:1]),this.writeInt32(e+4,Qc[kd?1:0])}getBufferIdentifier(){if(this.bytes_.length{B6();d4();qf=class t{constructor(e){this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null,this.text_encoder=new TextEncoder;let r;e?r=e:r=1024,this.bb=jo.allocate(r),this.space=r}clear(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null}forceDefaults(e){this.force_defaults=e}dataBuffer(){return this.bb}asUint8Array(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())}prep(e,r){e>this.minalign&&(this.minalign=e);let i=~(this.bb.capacity()-this.space+r)+1&e-1;for(;this.space=0&&this.vtable[r]==0;r--);let i=r+1;for(;r>=0;r--)this.addInt16(this.vtable[r]!=0?e-this.vtable[r]:0);let s=2;this.addInt16(e-this.object_start);let o=(i+s)*2;this.addInt16(o);let h=0,g=this.space;e:for(r=0;r=0;h--)this.writeInt8(o.charCodeAt(h))}this.prep(this.minalign,4+s),this.addOffset(e),s&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(e,r){this.finish(e,r,!0)}requiredField(e,r){let i=this.bb.capacity()-e,s=i-this.bb.readInt32(i);if(!(r{d4();k6();Vy();B6();M6()});var zf,F6=Mt(()=>{(function(t){t[t.BUFFER=0]="BUFFER"})(zf||(zf={}))});var qo,Md=Mt(()=>{(function(t){t[t.LZ4_FRAME=0]="LZ4_FRAME",t[t.ZSTD=1]="ZSTD"})(qo||(qo={}))});var Mu,$6=Mt(()=>{Zi();F6();Md();Mu=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsBodyCompression(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}codec(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):qo.LZ4_FRAME}method(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):zf.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,r){e.addFieldInt8(0,r,qo.LZ4_FRAME)}static addMethod(e,r){e.addFieldInt8(1,r,zf.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,r,i){return t.startBodyCompression(e),t.addCodec(e,r),t.addMethod(e,i),t.endBodyCompression(e)}}});var Bd,P6=Mt(()=>{Bd=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createBuffer(e,r,i){return e.prep(8,16),e.writeInt64(BigInt(i??0)),e.writeInt64(BigInt(r??0)),e.offset()}}});var Fd,U6=Mt(()=>{Fd=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createFieldNode(e,r,i){return e.prep(8,16),e.writeInt64(BigInt(i??0)),e.writeInt64(BigInt(r??0)),e.offset()}}});var j1,V6=Mt(()=>{Zi();$6();P6();U6();j1=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsRecordBatch(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}length(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}nodes(e,r){let i=this.bb.__offset(this.bb_pos,6);return i?(r||new Fd).__init(this.bb.__vector(this.bb_pos+i)+e*16,this.bb):null}nodesLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,r){let i=this.bb.__offset(this.bb_pos,8);return i?(r||new Bd).__init(this.bb.__vector(this.bb_pos+i)+e*16,this.bb):null}buffersLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){let r=this.bb.__offset(this.bb_pos,10);return r?(e||new Mu).__init(this.bb.__indirect(this.bb_pos+r),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,r){e.addFieldInt64(0,r,BigInt("0"))}static addNodes(e,r){e.addFieldOffset(1,r,0)}static startNodesVector(e,r){e.startVector(16,r,8)}static addBuffers(e,r){e.addFieldOffset(2,r,0)}static startBuffersVector(e,r){e.startVector(16,r,8)}static addCompression(e,r){e.addFieldOffset(3,r,0)}static endRecordBatch(e){return e.endObject()}}});var Bu,Gy=Mt(()=>{Zi();V6();Bu=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsDictionaryBatch(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}data(e){let r=this.bb.__offset(this.bb_pos,6);return r?(e||new j1).__init(this.bb.__indirect(this.bb_pos+r),this.bb):null}isDelta(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startDictionaryBatch(e){e.startObject(3)}static addId(e,r){e.addFieldInt64(0,r,BigInt("0"))}static addData(e,r){e.addFieldOffset(1,r,0)}static addIsDelta(e,r){e.addFieldInt8(2,+r,0)}static endDictionaryBatch(e){return e.endObject()}}});var A2,G6=Mt(()=>{(function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"})(A2||(A2={}))});var qh,jy=Mt(()=>{(function(t){t[t.DenseArray=0]="DenseArray"})(qh||(qh={}))});var pc,g4=Mt(()=>{Zi();pc=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsInt(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}bitWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startInt(e){e.startObject(2)}static addBitWidth(e,r){e.addFieldInt32(0,r,0)}static addIsSigned(e,r){e.addFieldInt8(1,+r,0)}static endInt(e){return e.endObject()}static createInt(e,r,i){return t.startInt(e),t.addBitWidth(e,r),t.addIsSigned(e,i),t.endInt(e)}}});var Zc,j6=Mt(()=>{Zi();jy();g4();Zc=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsDictionaryEncoding(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}indexType(e){let r=this.bb.__offset(this.bb_pos,6);return r?(e||new pc).__init(this.bb.__indirect(this.bb_pos+r),this.bb):null}isOrdered(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}dictionaryKind(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt16(this.bb_pos+e):qh.DenseArray}static startDictionaryEncoding(e){e.startObject(4)}static addId(e,r){e.addFieldInt64(0,r,BigInt("0"))}static addIndexType(e,r){e.addFieldOffset(1,r,0)}static addIsOrdered(e,r){e.addFieldInt8(2,+r,0)}static addDictionaryKind(e,r){e.addFieldInt16(3,r,qh.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}}});var So,$d=Mt(()=>{Zi();So=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsKeyValue(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}key(e){let r=this.bb.__offset(this.bb_pos,4);return r?this.bb.__string(this.bb_pos+r,e):null}value(e){let r=this.bb.__offset(this.bb_pos,6);return r?this.bb.__string(this.bb_pos+r,e):null}static startKeyValue(e){e.startObject(2)}static addKey(e,r){e.addFieldOffset(0,r,0)}static addValue(e,r){e.addFieldOffset(1,r,0)}static endKeyValue(e){return e.endObject()}static createKeyValue(e,r,i){return t.startKeyValue(e),t.addKey(e,r),t.addValue(e,i),t.endKeyValue(e)}}});var zh,qy=Mt(()=>{Zi();zh=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsBinary(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return t.startBinary(e),t.endBinary(e)}}});var Hh,zy=Mt(()=>{Zi();Hh=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsBool(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return t.startBool(e),t.endBool(e)}}});var T2,q6=Mt(()=>{Zi();D6();T2=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsDate(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):xs.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,r){e.addFieldInt16(0,r,xs.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,r){return t.startDate(e),t.addUnit(e,r),t.endDate(e)}}});var eu,z6=Mt(()=>{Zi();eu=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsDecimal(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,r){e.addFieldInt32(0,r,0)}static addScale(e,r){e.addFieldInt32(1,r,0)}static addBitWidth(e,r){e.addFieldInt32(2,r,128)}static endDecimal(e){return e.endObject()}static createDecimal(e,r,i,s){return t.startDecimal(e),t.addPrecision(e,r),t.addScale(e,i),t.addBitWidth(e,s),t.endDecimal(e)}}});var I2,H6=Mt(()=>{Zi();Gh();I2=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsDuration(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):cn.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,r){e.addFieldInt16(0,r,cn.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(e,r){return t.startDuration(e),t.addUnit(e,r),t.endDuration(e)}}});var O2,W6=Mt(()=>{Zi();O2=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsFixedSizeBinary(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeBinary(e){e.startObject(1)}static addByteWidth(e,r){e.addFieldInt32(0,r,0)}static endFixedSizeBinary(e){return e.endObject()}static createFixedSizeBinary(e,r){return t.startFixedSizeBinary(e),t.addByteWidth(e,r),t.endFixedSizeBinary(e)}}});var C2,Y6=Mt(()=>{Zi();C2=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsFixedSizeList(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}listSize(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeList(e){e.startObject(1)}static addListSize(e,r){e.addFieldInt32(0,r,0)}static endFixedSizeList(e){return e.endObject()}static createFixedSizeList(e,r){return t.startFixedSizeList(e),t.addListSize(e,r),t.endFixedSizeList(e)}}});var L2,X6=Mt(()=>{Zi();N6();L2=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsFloatingPoint(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):fs.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,r){e.addFieldInt16(0,r,fs.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,r){return t.startFloatingPoint(e),t.addPrecision(e,r),t.endFloatingPoint(e)}}});var N2,J6=Mt(()=>{Zi();R6();N2=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsInterval(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Hi.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,r){e.addFieldInt16(0,r,Hi.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,r){return t.startInterval(e),t.addUnit(e,r),t.endInterval(e)}}});var Wh,Hy=Mt(()=>{Zi();Wh=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsLargeBinary(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return t.startLargeBinary(e),t.endLargeBinary(e)}}});var Yh,Wy=Mt(()=>{Zi();Yh=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsLargeUtf8(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return t.startLargeUtf8(e),t.endLargeUtf8(e)}}});var Xh,Yy=Mt(()=>{Zi();Xh=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsList(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return t.startList(e),t.endList(e)}}});var D2,K6=Mt(()=>{Zi();D2=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsMap(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){let e=this.bb.__offset(this.bb_pos,4);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startMap(e){e.startObject(1)}static addKeysSorted(e,r){e.addFieldInt8(0,+r,0)}static endMap(e){return e.endObject()}static createMap(e,r){return t.startMap(e),t.addKeysSorted(e,r),t.endMap(e)}}});var Jh,Xy=Mt(()=>{Zi();Jh=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsNull(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return t.startNull(e),t.endNull(e)}}});var Kh,Jy=Mt(()=>{Zi();Kh=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsStruct_(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return t.startStruct_(e),t.endStruct_(e)}}});var Fu,Q6=Mt(()=>{Zi();Gh();Fu=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsTime(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):cn.MILLISECOND}bitWidth(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):32}static startTime(e){e.startObject(2)}static addUnit(e,r){e.addFieldInt16(0,r,cn.MILLISECOND)}static addBitWidth(e,r){e.addFieldInt32(1,r,32)}static endTime(e){return e.endObject()}static createTime(e,r,i){return t.startTime(e),t.addUnit(e,r),t.addBitWidth(e,i),t.endTime(e)}}});var $u,Z6=Mt(()=>{Zi();Gh();$u=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsTimestamp(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):cn.SECOND}timezone(e){let r=this.bb.__offset(this.bb_pos,6);return r?this.bb.__string(this.bb_pos+r,e):null}static startTimestamp(e){e.startObject(2)}static addUnit(e,r){e.addFieldInt16(0,r,cn.SECOND)}static addTimezone(e,r){e.addFieldOffset(1,r,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,r,i){return t.startTimestamp(e),t.addUnit(e,r),t.addTimezone(e,i),t.endTimestamp(e)}}});var mc,e5=Mt(()=>{Zi();L6();mc=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsUnion(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}mode(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Qi.Sparse}typeIds(e){let r=this.bb.__offset(this.bb_pos,6);return r?this.bb.readInt32(this.bb.__vector(this.bb_pos+r)+e*4):0}typeIdsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}typeIdsArray(){let e=this.bb.__offset(this.bb_pos,6);return e?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}static startUnion(e){e.startObject(2)}static addMode(e,r){e.addFieldInt16(0,r,Qi.Sparse)}static addTypeIds(e,r){e.addFieldOffset(1,r,0)}static createTypeIdsVector(e,r){e.startVector(4,r.length,4);for(let i=r.length-1;i>=0;i--)e.addInt32(r[i]);return e.endVector()}static startTypeIdsVector(e,r){e.startVector(4,r,4)}static endUnion(e){return e.endObject()}static createUnion(e,r,i){return t.startUnion(e),t.addMode(e,r),t.addTypeIds(e,i),t.endUnion(e)}}});var Qh,Ky=Mt(()=>{Zi();Qh=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsUtf8(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return t.startUtf8(e),t.endUtf8(e)}}});var vi,y4=Mt(()=>{(function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.FloatingPoint=3]="FloatingPoint",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct_=13]="Struct_",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.LargeList=21]="LargeList",t[t.RunEndEncoded=22]="RunEndEncoded"})(vi||(vi={}))});var i1,t5=Mt(()=>{Zi();j6();$d();y4();i1=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsField(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}name(e){let r=this.bb.__offset(this.bb_pos,4);return r?this.bb.__string(this.bb_pos+r,e):null}nullable(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}typeType(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):vi.NONE}type(e){let r=this.bb.__offset(this.bb_pos,10);return r?this.bb.__union(e,this.bb_pos+r):null}dictionary(e){let r=this.bb.__offset(this.bb_pos,12);return r?(e||new Zc).__init(this.bb.__indirect(this.bb_pos+r),this.bb):null}children(e,r){let i=this.bb.__offset(this.bb_pos,14);return i?(r||new t).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}childrenLength(){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,r){let i=this.bb.__offset(this.bb_pos,16);return i?(r||new So).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,r){e.addFieldOffset(0,r,0)}static addNullable(e,r){e.addFieldInt8(1,+r,0)}static addTypeType(e,r){e.addFieldInt8(2,r,vi.NONE)}static addType(e,r){e.addFieldOffset(3,r,0)}static addDictionary(e,r){e.addFieldOffset(4,r,0)}static addChildren(e,r){e.addFieldOffset(5,r,0)}static createChildrenVector(e,r){e.startVector(4,r.length,4);for(let i=r.length-1;i>=0;i--)e.addOffset(r[i]);return e.endVector()}static startChildrenVector(e,r){e.startVector(4,r,4)}static addCustomMetadata(e,r){e.addFieldOffset(6,r,0)}static createCustomMetadataVector(e,r){e.startVector(4,r.length,4);for(let i=r.length-1;i>=0;i--)e.addOffset(r[i]);return e.endVector()}static startCustomMetadataVector(e,r){e.startVector(4,r,4)}static endField(e){return e.endObject()}}});var q1,r5=Mt(()=>{Zi();G6();t5();$d();q1=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsSchema(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}endianness(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):A2.Little}fields(e,r){let i=this.bb.__offset(this.bb_pos,6);return i?(r||new i1).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}fieldsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,r){let i=this.bb.__offset(this.bb_pos,8);return i?(r||new So).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){let r=this.bb.__offset(this.bb_pos,10);return r?this.bb.readInt64(this.bb.__vector(this.bb_pos+r)+e*8):BigInt(0)}featuresLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,r){e.addFieldInt16(0,r,A2.Little)}static addFields(e,r){e.addFieldOffset(1,r,0)}static createFieldsVector(e,r){e.startVector(4,r.length,4);for(let i=r.length-1;i>=0;i--)e.addOffset(r[i]);return e.endVector()}static startFieldsVector(e,r){e.startVector(4,r,4)}static addCustomMetadata(e,r){e.addFieldOffset(2,r,0)}static createCustomMetadataVector(e,r){e.startVector(4,r.length,4);for(let i=r.length-1;i>=0;i--)e.addOffset(r[i]);return e.endVector()}static startCustomMetadataVector(e,r){e.startVector(4,r,4)}static addFeatures(e,r){e.addFieldOffset(3,r,0)}static createFeaturesVector(e,r){e.startVector(8,r.length,8);for(let i=r.length-1;i>=0;i--)e.addInt64(r[i]);return e.endVector()}static startFeaturesVector(e,r){e.startVector(8,r,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,r){e.finish(r)}static finishSizePrefixedSchemaBuffer(e,r){e.finish(r,void 0,!0)}static createSchema(e,r,i,s,o){return t.startSchema(e),t.addEndianness(e,r),t.addFields(e,i),t.addCustomMetadata(e,s),t.addFeatures(e,o),t.endSchema(e)}}});var Bi,b4=Mt(()=>{(function(t){t[t.NONE=0]="NONE",t[t.Schema=1]="Schema",t[t.DictionaryBatch=2]="DictionaryBatch",t[t.RecordBatch=3]="RecordBatch",t[t.Tensor=4]="Tensor",t[t.SparseTensor=5]="SparseTensor"})(Bi||(Bi={}))});var be,v1,na=Mt(()=>{f4();L6();N6();D6();Gh();R6();b4();(function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth",t[t.DurationSecond=-27]="DurationSecond",t[t.DurationMillisecond=-28]="DurationMillisecond",t[t.DurationMicrosecond=-29]="DurationMicrosecond",t[t.DurationNanosecond=-30]="DurationNanosecond",t[t.IntervalMonthDayNano=-31]="IntervalMonthDayNano"})(be||(be={}));(function(t){t[t.OFFSET=0]="OFFSET",t[t.DATA=1]="DATA",t[t.VALIDITY=2]="VALIDITY",t[t.TYPE=3]="TYPE"})(v1||(v1={}))});var n5={};Xc(n5,{valueToString:()=>gc});function gc(t){if(t===null)return"null";if(t===void 0)return"undefined";switch(typeof t){case"number":return`${t}`;case"bigint":return`${t}`;case"string":return`"${t}"`}return typeof t[Symbol.toPrimitive]=="function"?t[Symbol.toPrimitive]("string"):ArrayBuffer.isView(t)?t instanceof BigInt64Array||t instanceof BigUint64Array?`[${[...t].map(e=>gc(e))}]`:`[${t}]`:ArrayBuffer.isView(t)?`[${t}]`:JSON.stringify(t,(e,r)=>typeof r=="bigint"?`${r}`:r)}var Zh=Mt(()=>{});function ts(t){if(typeof t=="bigint"&&(tNumber.MAX_SAFE_INTEGER))throw new TypeError(`${t} is not safe to convert to a number.`);return Number(t)}function i5(t,e){return ts(t/e)+ts(t%e)/ts(e)}var Pu=Mt(()=>{});var o5={};Xc(o5,{BN:()=>Hf,bigNumToBigInt:()=>Zy,bigNumToNumber:()=>a5,bigNumToString:()=>Vd,isArrowBigNumSymbol:()=>Qy});function yc(t,...e){return e.length===0?Object.setPrototypeOf(Mi(this.TypedArray,t),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(t,...e),this.constructor.prototype)}function Pd(...t){return yc.apply(this,t)}function Ud(...t){return yc.apply(this,t)}function ep(...t){return yc.apply(this,t)}function a5(t,e){let{buffer:r,byteOffset:i,byteLength:s,signed:o}=t,h=new BigUint64Array(r,i,s/8),g=o&&h.at(-1)&BigInt(1)<0){let _=BigInt("1".padEnd(e+1,"0")),w=v/_,O=g?-(v%_):v%_,I=ts(w),H=`${O}`.padStart(e,"0");return+`${g&&I===0?"-":""}${I}.${H}`}return ts(v)}function Vd(t){if(t.byteLength===8)return`${new t.BigIntArray(t.buffer,t.byteOffset,1)[0]}`;if(!t.signed)return s5(t);let e=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2);if(new Int16Array([e.at(-1)])[0]>=0)return s5(t);e=e.slice();let i=1;for(let o=0;o{Lo();Pu();Qy=Symbol.for("isArrowBigNum");yc.prototype[Qy]=!0;yc.prototype.toJSON=function(){return`"${Vd(this)}"`};yc.prototype.valueOf=function(t){return a5(this,t)};yc.prototype.toString=function(){return Vd(this)};yc.prototype[Symbol.toPrimitive]=function(t="default"){switch(t){case"number":return a5(this);case"string":return Vd(this);case"default":return Zy(this)}return Vd(this)};Object.setPrototypeOf(Pd.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Ud.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(ep.prototype,Object.create(Uint32Array.prototype));Object.assign(Pd.prototype,yc.prototype,{constructor:Pd,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Ud.prototype,yc.prototype,{constructor:Ud,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(ep.prototype,yc.prototype,{constructor:ep,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});p_=BigInt(4294967296)*BigInt(4294967296),m_=p_-BigInt(1);Hf=class t{static new(e,r){switch(r){case!0:return new Pd(e);case!1:return new Ud(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case BigInt64Array:return new Pd(e)}return e.byteLength===16?new ep(e):new Ud(e)}static signed(e){return new Pd(e)}static unsigned(e){return new Ud(e)}static decimal(e){return new ep(e)}constructor(e,r){return t.new(e,r)}}});function xl(t){let e=t;switch(t.typeId){case be.Decimal:return t.bitWidth/32;case be.Interval:return e.unit===Hi.MONTH_DAY_NANO?4:1+e.unit;case be.FixedSizeList:return e.listSize;case be.FixedSizeBinary:return e.byteWidth;default:return 1}}var e7,t7,r7,n7,i7,s7,a7,o7,l7,c7,u7,f7,d7,h7,p7,m7,g7,y7,b7,v7,x7,_7,ln,Eo,Pa,R2,k2,s1,tu,M2,B2,F2,$2,z1,Gd,P2,ru,bc,vc,ml,xc,gl,_c,yl,tp,rp,x1,np,ip,sp,ap,_1,op,Wf,lp,cp,H1,up,fp,dp,S1,hp,pp,mp,gp,E1,ys,w1,yp,bp,Sc,bl,vl,g_,zo,Ms=Mt(()=>{Pu();na();ln=class t{static isNull(e){return e?.typeId===be.Null}static isInt(e){return e?.typeId===be.Int}static isFloat(e){return e?.typeId===be.Float}static isBinary(e){return e?.typeId===be.Binary}static isLargeBinary(e){return e?.typeId===be.LargeBinary}static isUtf8(e){return e?.typeId===be.Utf8}static isLargeUtf8(e){return e?.typeId===be.LargeUtf8}static isBool(e){return e?.typeId===be.Bool}static isDecimal(e){return e?.typeId===be.Decimal}static isDate(e){return e?.typeId===be.Date}static isTime(e){return e?.typeId===be.Time}static isTimestamp(e){return e?.typeId===be.Timestamp}static isInterval(e){return e?.typeId===be.Interval}static isDuration(e){return e?.typeId===be.Duration}static isList(e){return e?.typeId===be.List}static isStruct(e){return e?.typeId===be.Struct}static isUnion(e){return e?.typeId===be.Union}static isFixedSizeBinary(e){return e?.typeId===be.FixedSizeBinary}static isFixedSizeList(e){return e?.typeId===be.FixedSizeList}static isMap(e){return e?.typeId===be.Map}static isDictionary(e){return e?.typeId===be.Dictionary}static isDenseUnion(e){return t.isUnion(e)&&e.mode===Qi.Dense}static isSparseUnion(e){return t.isUnion(e)&&e.mode===Qi.Sparse}constructor(e){this.typeId=e}};e7=Symbol.toStringTag;ln[e7]=(t=>(t.children=null,t.ArrayType=Array,t.OffsetArrayType=Int32Array,t[Symbol.toStringTag]="DataType"))(ln.prototype);Eo=class extends ln{constructor(){super(be.Null)}toString(){return"Null"}};t7=Symbol.toStringTag;Eo[t7]=(t=>t[Symbol.toStringTag]="Null")(Eo.prototype);Pa=class extends ln{constructor(e,r){super(be.Int),this.isSigned=e,this.bitWidth=r}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}};r7=Symbol.toStringTag;Pa[r7]=(t=>(t.isSigned=null,t.bitWidth=null,t[Symbol.toStringTag]="Int"))(Pa.prototype);R2=class extends Pa{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},k2=class extends Pa{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},s1=class extends Pa{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},tu=class extends Pa{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},M2=class extends Pa{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},B2=class extends Pa{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},F2=class extends Pa{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},$2=class extends Pa{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(R2.prototype,"ArrayType",{value:Int8Array});Object.defineProperty(k2.prototype,"ArrayType",{value:Int16Array});Object.defineProperty(s1.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(tu.prototype,"ArrayType",{value:BigInt64Array});Object.defineProperty(M2.prototype,"ArrayType",{value:Uint8Array});Object.defineProperty(B2.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(F2.prototype,"ArrayType",{value:Uint32Array});Object.defineProperty($2.prototype,"ArrayType",{value:BigUint64Array});z1=class extends ln{constructor(e){super(be.Float),this.precision=e}get ArrayType(){switch(this.precision){case fs.HALF:return Uint16Array;case fs.SINGLE:return Float32Array;case fs.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};n7=Symbol.toStringTag;z1[n7]=(t=>(t.precision=null,t[Symbol.toStringTag]="Float"))(z1.prototype);Gd=class extends z1{constructor(){super(fs.HALF)}},P2=class extends z1{constructor(){super(fs.SINGLE)}},ru=class extends z1{constructor(){super(fs.DOUBLE)}};Object.defineProperty(Gd.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(P2.prototype,"ArrayType",{value:Float32Array});Object.defineProperty(ru.prototype,"ArrayType",{value:Float64Array});bc=class extends ln{constructor(){super(be.Binary)}toString(){return"Binary"}};i7=Symbol.toStringTag;bc[i7]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Binary"))(bc.prototype);vc=class extends ln{constructor(){super(be.LargeBinary)}toString(){return"LargeBinary"}};s7=Symbol.toStringTag;vc[s7]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeBinary"))(vc.prototype);ml=class extends ln{constructor(){super(be.Utf8)}toString(){return"Utf8"}};a7=Symbol.toStringTag;ml[a7]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Utf8"))(ml.prototype);xc=class extends ln{constructor(){super(be.LargeUtf8)}toString(){return"LargeUtf8"}};o7=Symbol.toStringTag;xc[o7]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeUtf8"))(xc.prototype);gl=class extends ln{constructor(){super(be.Bool)}toString(){return"Bool"}};l7=Symbol.toStringTag;gl[l7]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Bool"))(gl.prototype);_c=class extends ln{constructor(e,r,i=128){super(be.Decimal),this.scale=e,this.precision=r,this.bitWidth=i}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};c7=Symbol.toStringTag;_c[c7]=(t=>(t.scale=null,t.precision=null,t.ArrayType=Uint32Array,t[Symbol.toStringTag]="Decimal"))(_c.prototype);yl=class extends ln{constructor(e){super(be.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${xs[this.unit]}>`}get ArrayType(){return this.unit===xs.DAY?Int32Array:BigInt64Array}};u7=Symbol.toStringTag;yl[u7]=(t=>(t.unit=null,t[Symbol.toStringTag]="Date"))(yl.prototype);tp=class extends yl{constructor(){super(xs.DAY)}},rp=class extends yl{constructor(){super(xs.MILLISECOND)}},x1=class extends ln{constructor(e,r){super(be.Time),this.unit=e,this.bitWidth=r}toString(){return`Time${this.bitWidth}<${cn[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};f7=Symbol.toStringTag;x1[f7]=(t=>(t.unit=null,t.bitWidth=null,t[Symbol.toStringTag]="Time"))(x1.prototype);np=class extends x1{constructor(){super(cn.SECOND,32)}},ip=class extends x1{constructor(){super(cn.MILLISECOND,32)}},sp=class extends x1{constructor(){super(cn.MICROSECOND,64)}},ap=class extends x1{constructor(){super(cn.NANOSECOND,64)}},_1=class extends ln{constructor(e,r){super(be.Timestamp),this.unit=e,this.timezone=r}toString(){return`Timestamp<${cn[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};d7=Symbol.toStringTag;_1[d7]=(t=>(t.unit=null,t.timezone=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Timestamp"))(_1.prototype);op=class extends _1{constructor(e){super(cn.SECOND,e)}},Wf=class extends _1{constructor(e){super(cn.MILLISECOND,e)}},lp=class extends _1{constructor(e){super(cn.MICROSECOND,e)}},cp=class extends _1{constructor(e){super(cn.NANOSECOND,e)}},H1=class extends ln{constructor(e){super(be.Interval),this.unit=e}toString(){return`Interval<${Hi[this.unit]}>`}};h7=Symbol.toStringTag;H1[h7]=(t=>(t.unit=null,t.ArrayType=Int32Array,t[Symbol.toStringTag]="Interval"))(H1.prototype);up=class extends H1{constructor(){super(Hi.DAY_TIME)}},fp=class extends H1{constructor(){super(Hi.YEAR_MONTH)}},dp=class extends H1{constructor(){super(Hi.MONTH_DAY_NANO)}},S1=class extends ln{constructor(e){super(be.Duration),this.unit=e}toString(){return`Duration<${cn[this.unit]}>`}};p7=Symbol.toStringTag;S1[p7]=(t=>(t.unit=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Duration"))(S1.prototype);hp=class extends S1{constructor(){super(cn.SECOND)}},pp=class extends S1{constructor(){super(cn.MILLISECOND)}},mp=class extends S1{constructor(){super(cn.MICROSECOND)}},gp=class extends S1{constructor(){super(cn.NANOSECOND)}},E1=class extends ln{constructor(e){super(be.List),this.children=[e]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};m7=Symbol.toStringTag;E1[m7]=(t=>(t.children=null,t[Symbol.toStringTag]="List"))(E1.prototype);ys=class extends ln{constructor(e){super(be.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};g7=Symbol.toStringTag;ys[g7]=(t=>(t.children=null,t[Symbol.toStringTag]="Struct"))(ys.prototype);w1=class extends ln{constructor(e,r,i){super(be.Union),this.mode=e,this.children=i,this.typeIds=r=Int32Array.from(r),this.typeIdToChildIndex=r.reduce((s,o,h)=>(s[o]=h)&&s||s,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}};y7=Symbol.toStringTag;w1[y7]=(t=>(t.mode=null,t.typeIds=null,t.children=null,t.typeIdToChildIndex=null,t.ArrayType=Int8Array,t[Symbol.toStringTag]="Union"))(w1.prototype);yp=class extends w1{constructor(e,r){super(Qi.Dense,e,r)}},bp=class extends w1{constructor(e,r){super(Qi.Sparse,e,r)}},Sc=class extends ln{constructor(e){super(be.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};b7=Symbol.toStringTag;Sc[b7]=(t=>(t.byteWidth=null,t.ArrayType=Uint8Array,t[Symbol.toStringTag]="FixedSizeBinary"))(Sc.prototype);bl=class extends ln{constructor(e,r){super(be.FixedSizeList),this.listSize=e,this.children=[r]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}};v7=Symbol.toStringTag;bl[v7]=(t=>(t.children=null,t.listSize=null,t[Symbol.toStringTag]="FixedSizeList"))(bl.prototype);vl=class extends ln{constructor(e,r=!1){var i,s,o;if(super(be.Map),this.children=[e],this.keysSorted=r,e&&(e.name="entries",!((i=e?.type)===null||i===void 0)&&i.children)){let h=(s=e?.type)===null||s===void 0?void 0:s.children[0];h&&(h.name="key");let g=(o=e?.type)===null||o===void 0?void 0:o.children[1];g&&(g.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};x7=Symbol.toStringTag;vl[x7]=(t=>(t.children=null,t.keysSorted=null,t[Symbol.toStringTag]="Map_"))(vl.prototype);g_=(t=>()=>++t)(-1),zo=class extends ln{constructor(e,r,i,s){super(be.Dictionary),this.indices=r,this.dictionary=e,this.isOrdered=s||!1,this.id=i==null?g_():ts(i)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};_7=Symbol.toStringTag;zo[_7]=(t=>(t.id=null,t.indices=null,t.isOrdered=null,t.dictionary=null,t[Symbol.toStringTag]="Dictionary"))(zo.prototype)});function y_(t,e,r=!0){return typeof e=="number"?jd(t,e,r):typeof e=="string"&&e in be?jd(t,be[e],r):e&&e instanceof ln?jd(t,E7(e),r):e?.type&&e.type instanceof ln?jd(t,E7(e.type),r):jd(t,be.NONE,r)}function jd(t,e,r=!0){let i=null;switch(e){case be.Null:i=t.visitNull;break;case be.Bool:i=t.visitBool;break;case be.Int:i=t.visitInt;break;case be.Int8:i=t.visitInt8||t.visitInt;break;case be.Int16:i=t.visitInt16||t.visitInt;break;case be.Int32:i=t.visitInt32||t.visitInt;break;case be.Int64:i=t.visitInt64||t.visitInt;break;case be.Uint8:i=t.visitUint8||t.visitInt;break;case be.Uint16:i=t.visitUint16||t.visitInt;break;case be.Uint32:i=t.visitUint32||t.visitInt;break;case be.Uint64:i=t.visitUint64||t.visitInt;break;case be.Float:i=t.visitFloat;break;case be.Float16:i=t.visitFloat16||t.visitFloat;break;case be.Float32:i=t.visitFloat32||t.visitFloat;break;case be.Float64:i=t.visitFloat64||t.visitFloat;break;case be.Utf8:i=t.visitUtf8;break;case be.LargeUtf8:i=t.visitLargeUtf8;break;case be.Binary:i=t.visitBinary;break;case be.LargeBinary:i=t.visitLargeBinary;break;case be.FixedSizeBinary:i=t.visitFixedSizeBinary;break;case be.Date:i=t.visitDate;break;case be.DateDay:i=t.visitDateDay||t.visitDate;break;case be.DateMillisecond:i=t.visitDateMillisecond||t.visitDate;break;case be.Timestamp:i=t.visitTimestamp;break;case be.TimestampSecond:i=t.visitTimestampSecond||t.visitTimestamp;break;case be.TimestampMillisecond:i=t.visitTimestampMillisecond||t.visitTimestamp;break;case be.TimestampMicrosecond:i=t.visitTimestampMicrosecond||t.visitTimestamp;break;case be.TimestampNanosecond:i=t.visitTimestampNanosecond||t.visitTimestamp;break;case be.Time:i=t.visitTime;break;case be.TimeSecond:i=t.visitTimeSecond||t.visitTime;break;case be.TimeMillisecond:i=t.visitTimeMillisecond||t.visitTime;break;case be.TimeMicrosecond:i=t.visitTimeMicrosecond||t.visitTime;break;case be.TimeNanosecond:i=t.visitTimeNanosecond||t.visitTime;break;case be.Decimal:i=t.visitDecimal;break;case be.List:i=t.visitList;break;case be.Struct:i=t.visitStruct;break;case be.Union:i=t.visitUnion;break;case be.DenseUnion:i=t.visitDenseUnion||t.visitUnion;break;case be.SparseUnion:i=t.visitSparseUnion||t.visitUnion;break;case be.Dictionary:i=t.visitDictionary;break;case be.Interval:i=t.visitInterval;break;case be.IntervalDayTime:i=t.visitIntervalDayTime||t.visitInterval;break;case be.IntervalYearMonth:i=t.visitIntervalYearMonth||t.visitInterval;break;case be.IntervalMonthDayNano:i=t.visitIntervalMonthDayNano||t.visitInterval;break;case be.Duration:i=t.visitDuration;break;case be.DurationSecond:i=t.visitDurationSecond||t.visitDuration;break;case be.DurationMillisecond:i=t.visitDurationMillisecond||t.visitDuration;break;case be.DurationMicrosecond:i=t.visitDurationMicrosecond||t.visitDuration;break;case be.DurationNanosecond:i=t.visitDurationNanosecond||t.visitDuration;break;case be.FixedSizeList:i=t.visitFixedSizeList;break;case be.Map:i=t.visitMap;break}if(typeof i=="function")return i;if(!r)return()=>null;throw new Error(`Unrecognized type '${be[e]}'`)}function E7(t){switch(t.typeId){case be.Null:return be.Null;case be.Int:{let{bitWidth:e,isSigned:r}=t;switch(e){case 8:return r?be.Int8:be.Uint8;case 16:return r?be.Int16:be.Uint16;case 32:return r?be.Int32:be.Uint32;case 64:return r?be.Int64:be.Uint64}return be.Int}case be.Float:switch(t.precision){case fs.HALF:return be.Float16;case fs.SINGLE:return be.Float32;case fs.DOUBLE:return be.Float64}return be.Float;case be.Binary:return be.Binary;case be.LargeBinary:return be.LargeBinary;case be.Utf8:return be.Utf8;case be.LargeUtf8:return be.LargeUtf8;case be.Bool:return be.Bool;case be.Decimal:return be.Decimal;case be.Time:switch(t.unit){case cn.SECOND:return be.TimeSecond;case cn.MILLISECOND:return be.TimeMillisecond;case cn.MICROSECOND:return be.TimeMicrosecond;case cn.NANOSECOND:return be.TimeNanosecond}return be.Time;case be.Timestamp:switch(t.unit){case cn.SECOND:return be.TimestampSecond;case cn.MILLISECOND:return be.TimestampMillisecond;case cn.MICROSECOND:return be.TimestampMicrosecond;case cn.NANOSECOND:return be.TimestampNanosecond}return be.Timestamp;case be.Date:switch(t.unit){case xs.DAY:return be.DateDay;case xs.MILLISECOND:return be.DateMillisecond}return be.Date;case be.Interval:switch(t.unit){case Hi.DAY_TIME:return be.IntervalDayTime;case Hi.YEAR_MONTH:return be.IntervalYearMonth;case Hi.MONTH_DAY_NANO:return be.IntervalMonthDayNano}return be.Interval;case be.Duration:switch(t.unit){case cn.SECOND:return be.DurationSecond;case cn.MILLISECOND:return be.DurationMillisecond;case cn.MICROSECOND:return be.DurationMicrosecond;case cn.NANOSECOND:return be.DurationNanosecond}return be.Duration;case be.Map:return be.Map;case be.List:return be.List;case be.Struct:return be.Struct;case be.Union:switch(t.mode){case Qi.Dense:return be.DenseUnion;case Qi.Sparse:return be.SparseUnion}return be.Union;case be.FixedSizeBinary:return be.FixedSizeBinary;case be.FixedSizeList:return be.FixedSizeList;case be.Dictionary:return be.Dictionary}throw new Error(`Unrecognized type '${be[t.typeId]}'`)}var Gn,W1=Mt(()=>{na();Ms();Gn=class{visitMany(e,...r){return e.map((i,s)=>this.visit(i,...r.map(o=>o[s])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,r=!0){return y_(this,e,r)}getVisitFnByTypeId(e,r=!0){return jd(this,e,r)}visitNull(e,...r){return null}visitBool(e,...r){return null}visitInt(e,...r){return null}visitFloat(e,...r){return null}visitUtf8(e,...r){return null}visitLargeUtf8(e,...r){return null}visitBinary(e,...r){return null}visitLargeBinary(e,...r){return null}visitFixedSizeBinary(e,...r){return null}visitDate(e,...r){return null}visitTimestamp(e,...r){return null}visitTime(e,...r){return null}visitDecimal(e,...r){return null}visitList(e,...r){return null}visitStruct(e,...r){return null}visitUnion(e,...r){return null}visitDictionary(e,...r){return null}visitInterval(e,...r){return null}visitDuration(e,...r){return null}visitFixedSizeList(e,...r){return null}visitMap(e,...r){return null}};Gn.prototype.visitInt8=null;Gn.prototype.visitInt16=null;Gn.prototype.visitInt32=null;Gn.prototype.visitInt64=null;Gn.prototype.visitUint8=null;Gn.prototype.visitUint16=null;Gn.prototype.visitUint32=null;Gn.prototype.visitUint64=null;Gn.prototype.visitFloat16=null;Gn.prototype.visitFloat32=null;Gn.prototype.visitFloat64=null;Gn.prototype.visitDateDay=null;Gn.prototype.visitDateMillisecond=null;Gn.prototype.visitTimestampSecond=null;Gn.prototype.visitTimestampMillisecond=null;Gn.prototype.visitTimestampMicrosecond=null;Gn.prototype.visitTimestampNanosecond=null;Gn.prototype.visitTimeSecond=null;Gn.prototype.visitTimeMillisecond=null;Gn.prototype.visitTimeMicrosecond=null;Gn.prototype.visitTimeNanosecond=null;Gn.prototype.visitDenseUnion=null;Gn.prototype.visitSparseUnion=null;Gn.prototype.visitIntervalDayTime=null;Gn.prototype.visitIntervalYearMonth=null;Gn.prototype.visitIntervalMonthDayNano=null;Gn.prototype.visitDuration=null;Gn.prototype.visitDurationSecond=null;Gn.prototype.visitDurationMillisecond=null;Gn.prototype.visitDurationMicrosecond=null;Gn.prototype.visitDurationNanosecond=null});var l5={};Xc(l5,{float64ToUint16:()=>vp,uint16ToFloat64:()=>x4});function x4(t){let e=(t&31744)>>10,r=(t&1023)/1024,i=Math.pow(-1,(t&32768)>>15);switch(e){case 31:return i*(r?Number.NaN:1/0);case 0:return i*(r?6103515625e-14*r:0)}return i*Math.pow(2,e-15)*(1+r)}function vp(t){if(t!==t)return 32256;w7[0]=t;let e=(qd[1]&2147483648)>>16&65535,r=qd[1]&2146435072,i=0;return r>=1089470464?qd[0]>0?r=31744:(r=(r&2080374784)>>16,i=(qd[1]&1048575)>>10):r<=1056964608?(i=1048576+(qd[1]&1048575),i=1048576+(i<<(r>>20)-998)>>21,r=0):(r=r-1056964608>>10,i=(qd[1]&1048575)+512>>10),e|r|i&65535}var w7,qd,xp=Mt(()=>{w7=new Float64Array(1),qd=new Uint32Array(w7.buffer)});function di(t){return(e,r,i)=>{if(e.setValid(r,i!=null))return t(e,r,i)}}var ii,b_,A7,v_,Uu,c5,T7,x_,_4,S4,u5,I7,O7,f5,E4,w4,A4,T4,d5,I4,O4,C4,L4,h5,p5,__,S_,E_,w_,A_,T_,I_,O_,C7,L7,C_,m5,N4,D4,R4,k4,M4,B4,F4,g5,L_,Ho,_l=Mt(()=>{A1();W1();Pu();E2();xp();na();ii=class extends Gn{};b_=(t,e,r)=>{t[e]=Math.floor(r/864e5)},A7=(t,e,r,i)=>{if(r+1{let s=t+r;i?e[s>>3]|=1<>3]&=~(1<{t[e]=r},c5=({values:t},e,r)=>{t[e]=r},T7=({values:t},e,r)=>{t[e]=vp(r)},x_=(t,e,r)=>{switch(t.type.precision){case fs.HALF:return T7(t,e,r);case fs.SINGLE:case fs.DOUBLE:return c5(t,e,r)}},_4=({values:t},e,r)=>{b_(t,e,r.valueOf())},S4=({values:t},e,r)=>{t[e]=BigInt(r)},u5=({stride:t,values:e},r,i)=>{e.set(i.subarray(0,t),t*r)},I7=({values:t,valueOffsets:e},r,i)=>A7(t,e,r,i),O7=({values:t,valueOffsets:e},r,i)=>A7(t,e,r,Jc(i)),f5=(t,e,r)=>{t.type.unit===xs.DAY?_4(t,e,r):S4(t,e,r)},E4=({values:t},e,r)=>{t[e]=BigInt(r/1e3)},w4=({values:t},e,r)=>{t[e]=BigInt(r)},A4=({values:t},e,r)=>{t[e]=BigInt(r*1e3)},T4=({values:t},e,r)=>{t[e]=BigInt(r*1e6)},d5=(t,e,r)=>{switch(t.type.unit){case cn.SECOND:return E4(t,e,r);case cn.MILLISECOND:return w4(t,e,r);case cn.MICROSECOND:return A4(t,e,r);case cn.NANOSECOND:return T4(t,e,r)}},I4=({values:t},e,r)=>{t[e]=r},O4=({values:t},e,r)=>{t[e]=r},C4=({values:t},e,r)=>{t[e]=r},L4=({values:t},e,r)=>{t[e]=r},h5=(t,e,r)=>{switch(t.type.unit){case cn.SECOND:return I4(t,e,r);case cn.MILLISECOND:return O4(t,e,r);case cn.MICROSECOND:return C4(t,e,r);case cn.NANOSECOND:return L4(t,e,r)}},p5=({values:t,stride:e},r,i)=>{t.set(i.subarray(0,e),e*r)},__=(t,e,r)=>{let i=t.children[0],s=t.valueOffsets,o=Ho.getVisitFn(i);if(Array.isArray(r))for(let h=-1,g=s[e],v=s[e+1];g{let i=t.children[0],{valueOffsets:s}=t,o=Ho.getVisitFn(i),{[e]:h,[e+1]:g}=s,v=r instanceof Map?r.entries():Object.entries(r);for(let x of v)if(o(i,h,x),++h>=g)break},E_=(t,e)=>(r,i,s,o)=>i&&r(i,t,e[o]),w_=(t,e)=>(r,i,s,o)=>i&&r(i,t,e.get(o)),A_=(t,e)=>(r,i,s,o)=>i&&r(i,t,e.get(s.name)),T_=(t,e)=>(r,i,s,o)=>i&&r(i,t,e[s.name]),I_=(t,e,r)=>{let i=t.type.children.map(o=>Ho.getVisitFn(o.type)),s=r instanceof Map?A_(e,r):r instanceof Bn?w_(e,r):Array.isArray(r)?E_(e,r):T_(e,r);t.type.children.forEach((o,h)=>s(i[h],t.children[h],o,h))},O_=(t,e,r)=>{t.type.mode===Qi.Dense?C7(t,e,r):L7(t,e,r)},C7=(t,e,r)=>{let i=t.type.typeIdToChildIndex[t.typeIds[e]],s=t.children[i];Ho.visit(s,t.valueOffsets[e],r)},L7=(t,e,r)=>{let i=t.type.typeIdToChildIndex[t.typeIds[e]],s=t.children[i];Ho.visit(s,e,r)},C_=(t,e,r)=>{var i;(i=t.dictionary)===null||i===void 0||i.set(t.values[e],r)},m5=(t,e,r)=>{switch(t.type.unit){case Hi.YEAR_MONTH:return D4(t,e,r);case Hi.DAY_TIME:return N4(t,e,r);case Hi.MONTH_DAY_NANO:return R4(t,e,r)}},N4=({values:t},e,r)=>{t.set(r.subarray(0,2),2*e)},D4=({values:t},e,r)=>{t[e]=r[0]*12+r[1]%12},R4=({values:t,stride:e},r,i)=>{t.set(i.subarray(0,e),e*r)},k4=({values:t},e,r)=>{t[e]=r},M4=({values:t},e,r)=>{t[e]=r},B4=({values:t},e,r)=>{t[e]=r},F4=({values:t},e,r)=>{t[e]=r},g5=(t,e,r)=>{switch(t.type.unit){case cn.SECOND:return k4(t,e,r);case cn.MILLISECOND:return M4(t,e,r);case cn.MICROSECOND:return B4(t,e,r);case cn.NANOSECOND:return F4(t,e,r)}},L_=(t,e,r)=>{let{stride:i}=t,s=t.children[0],o=Ho.getVisitFn(s);if(Array.isArray(r))for(let h=-1,g=e*i;++h{Zh();Yf();_l();Ec=Symbol.for("parent"),zd=Symbol.for("rowIndex"),nu=class{constructor(e,r){return this[Ec]=e,this[zd]=r,new Proxy(this,N_)}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[zd],r=this[Ec],i=r.type.children,s={};for(let o=-1,h=i.length;++o`${gc(e)}: ${gc(r)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new y5(this[Ec],this[zd])}},y5=class{constructor(e,r){this.childIndex=0,this.children=e.children,this.rowIndex=r,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){let e=this.childIndex;return er.name)}has(e,r){return e[Ec].type.children.some(i=>i.name===r)}getOwnPropertyDescriptor(e,r){if(e[Ec].type.children.some(i=>i.name===r))return{writable:!0,enumerable:!0,configurable:!0}}get(e,r){if(Reflect.has(e,r))return e[r];let i=e[Ec].type.children.findIndex(s=>s.name===r);if(i!==-1){let s=Qa.visit(e[Ec].children[i],e[zd]);return Reflect.set(e,r,s),s}}set(e,r,i){let s=e[Ec].type.children.findIndex(o=>o.name===r);return s!==-1?(Ho.visit(e[Ec].children[s],e[zd],i),Reflect.set(e,r,i)):Reflect.has(e,r)||typeof r=="symbol"?Reflect.set(e,r,i):!1}},N_=new b5});function ci(t){return(e,r)=>e.getValid(r)?t(e,r):null}var Kn,D_,R_,N7,k_,D7,R7,U2,M_,k7,B_,M7,B7,F_,$_,P_,F7,$7,P7,U7,U_,V7,G7,j7,q7,V_,G_,j_,q_,z_,H_,z7,H7,W_,Y_,W7,Y7,X7,J7,K7,Q7,Z7,X_,J_,Qa,Yf=Mt(()=>{v4();A1();W1();_p();$4();Pu();E2();xp();na();Kn=class extends Gn{};D_=(t,e)=>864e5*t[e],R_=(t,e)=>null,N7=(t,e,r)=>{if(r+1>=e.length)return null;let i=ts(e[r]),s=ts(e[r+1]);return t.subarray(i,s)},k_=({offset:t,values:e},r)=>{let i=t+r;return(e[i>>3]&1<D_(t,e),R7=({values:t},e)=>ts(t[e]),U2=({stride:t,values:e},r)=>e[t*r],M_=({stride:t,values:e},r)=>x4(e[t*r]),k7=({values:t},e)=>t[e],B_=({stride:t,values:e},r)=>e.subarray(t*r,t*(r+1)),M7=({values:t,valueOffsets:e},r)=>N7(t,e,r),B7=({values:t,valueOffsets:e},r)=>{let i=N7(t,e,r);return i!==null?$h(i):null},F_=({values:t},e)=>t[e],$_=({type:t,values:e},r)=>t.precision!==fs.HALF?e[r]:x4(e[r]),P_=(t,e)=>t.type.unit===xs.DAY?D7(t,e):R7(t,e),F7=({values:t},e)=>1e3*ts(t[e]),$7=({values:t},e)=>ts(t[e]),P7=({values:t},e)=>i5(t[e],BigInt(1e3)),U7=({values:t},e)=>i5(t[e],BigInt(1e6)),U_=(t,e)=>{switch(t.type.unit){case cn.SECOND:return F7(t,e);case cn.MILLISECOND:return $7(t,e);case cn.MICROSECOND:return P7(t,e);case cn.NANOSECOND:return U7(t,e)}},V7=({values:t},e)=>t[e],G7=({values:t},e)=>t[e],j7=({values:t},e)=>t[e],q7=({values:t},e)=>t[e],V_=(t,e)=>{switch(t.type.unit){case cn.SECOND:return V7(t,e);case cn.MILLISECOND:return G7(t,e);case cn.MICROSECOND:return j7(t,e);case cn.NANOSECOND:return q7(t,e)}},G_=({values:t,stride:e},r)=>Hf.decimal(t.subarray(e*r,e*(r+1))),j_=(t,e)=>{let{valueOffsets:r,stride:i,children:s}=t,{[e*i]:o,[e*i+1]:h}=r,v=s[0].slice(o,h-o);return new Bn([v])},q_=(t,e)=>{let{valueOffsets:r,children:i}=t,{[e]:s,[e+1]:o}=r,h=i[0];return new Ul(h.slice(s,o-s))},z_=(t,e)=>new nu(t,e),H_=(t,e)=>t.type.mode===Qi.Dense?z7(t,e):H7(t,e),z7=(t,e)=>{let r=t.type.typeIdToChildIndex[t.typeIds[e]],i=t.children[r];return Qa.visit(i,t.valueOffsets[e])},H7=(t,e)=>{let r=t.type.typeIdToChildIndex[t.typeIds[e]],i=t.children[r];return Qa.visit(i,e)},W_=(t,e)=>{var r;return(r=t.dictionary)===null||r===void 0?void 0:r.get(t.values[e])},Y_=(t,e)=>t.type.unit===Hi.MONTH_DAY_NANO?X7(t,e):t.type.unit===Hi.DAY_TIME?W7(t,e):Y7(t,e),W7=({values:t},e)=>t.subarray(2*e,2*(e+1)),Y7=({values:t},e)=>{let r=t[e],i=new Int32Array(2);return i[0]=Math.trunc(r/12),i[1]=Math.trunc(r%12),i},X7=({values:t},e)=>t.subarray(4*e,4*(e+1)),J7=({values:t},e)=>t[e],K7=({values:t},e)=>t[e],Q7=({values:t},e)=>t[e],Z7=({values:t},e)=>t[e],X_=(t,e)=>{switch(t.type.unit){case cn.SECOND:return J7(t,e);case cn.MILLISECOND:return K7(t,e);case cn.MICROSECOND:return Q7(t,e);case cn.NANOSECOND:return Z7(t,e)}},J_=(t,e)=>{let{stride:r,children:i}=t,o=i[0].slice(e*r,r);return new Bn([o])};Kn.prototype.visitNull=ci(R_);Kn.prototype.visitBool=ci(k_);Kn.prototype.visitInt=ci(F_);Kn.prototype.visitInt8=ci(U2);Kn.prototype.visitInt16=ci(U2);Kn.prototype.visitInt32=ci(U2);Kn.prototype.visitInt64=ci(k7);Kn.prototype.visitUint8=ci(U2);Kn.prototype.visitUint16=ci(U2);Kn.prototype.visitUint32=ci(U2);Kn.prototype.visitUint64=ci(k7);Kn.prototype.visitFloat=ci($_);Kn.prototype.visitFloat16=ci(M_);Kn.prototype.visitFloat32=ci(U2);Kn.prototype.visitFloat64=ci(U2);Kn.prototype.visitUtf8=ci(B7);Kn.prototype.visitLargeUtf8=ci(B7);Kn.prototype.visitBinary=ci(M7);Kn.prototype.visitLargeBinary=ci(M7);Kn.prototype.visitFixedSizeBinary=ci(B_);Kn.prototype.visitDate=ci(P_);Kn.prototype.visitDateDay=ci(D7);Kn.prototype.visitDateMillisecond=ci(R7);Kn.prototype.visitTimestamp=ci(U_);Kn.prototype.visitTimestampSecond=ci(F7);Kn.prototype.visitTimestampMillisecond=ci($7);Kn.prototype.visitTimestampMicrosecond=ci(P7);Kn.prototype.visitTimestampNanosecond=ci(U7);Kn.prototype.visitTime=ci(V_);Kn.prototype.visitTimeSecond=ci(V7);Kn.prototype.visitTimeMillisecond=ci(G7);Kn.prototype.visitTimeMicrosecond=ci(j7);Kn.prototype.visitTimeNanosecond=ci(q7);Kn.prototype.visitDecimal=ci(G_);Kn.prototype.visitList=ci(j_);Kn.prototype.visitStruct=ci(z_);Kn.prototype.visitUnion=ci(H_);Kn.prototype.visitDenseUnion=ci(z7);Kn.prototype.visitSparseUnion=ci(H7);Kn.prototype.visitDictionary=ci(W_);Kn.prototype.visitInterval=ci(Y_);Kn.prototype.visitIntervalDayTime=ci(W7);Kn.prototype.visitIntervalYearMonth=ci(Y7);Kn.prototype.visitIntervalMonthDayNano=ci(X7);Kn.prototype.visitDuration=ci(X_);Kn.prototype.visitDurationSecond=ci(J7);Kn.prototype.visitDurationMillisecond=ci(K7);Kn.prototype.visitDurationMicrosecond=ci(Q7);Kn.prototype.visitDurationNanosecond=ci(Z7);Kn.prototype.visitFixedSizeList=ci(J_);Kn.prototype.visitMap=ci(q_);Qa=new Kn});var V2,Wd,Hd,v5,Ul,x5,_5,_p=Mt(()=>{A1();Zh();Yf();_l();V2=Symbol.for("keys"),Wd=Symbol.for("vals"),Hd=Symbol.for("kKeysAsStrings"),v5=Symbol.for("_kKeysAsStrings"),Ul=class{constructor(e){return this[V2]=new Bn([e.children[0]]).memoize(),this[Wd]=e.children[1],new Proxy(this,new _5)}get[Hd](){return this[v5]||(this[v5]=Array.from(this[V2].toArray(),String))}[Symbol.iterator](){return new x5(this[V2],this[Wd])}get size(){return this[V2].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[V2],r=this[Wd],i={};for(let s=-1,o=e.length;++s`${gc(e)}: ${gc(r)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}},x5=class{constructor(e,r){this.keys=e,this.vals=r,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){let e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),Qa.visit(this.vals,e)]})}},_5=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[Hd]}has(e,r){return e[Hd].includes(r)}getOwnPropertyDescriptor(e,r){if(e[Hd].indexOf(r)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,r){if(Reflect.has(e,r))return e[r];let i=e[Hd].indexOf(r);if(i!==-1){let s=Qa.visit(Reflect.get(e,Wd),i);return Reflect.set(e,r,s),s}}set(e,r,i){let s=e[Hd].indexOf(r);return s!==-1?(Ho.visit(Reflect.get(e,Wd),s,i),Reflect.set(e,r,i)):Reflect.has(e,r)?Reflect.set(e,r,i):!1}};Object.defineProperties(Ul.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[V2]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Wd]:{writable:!0,enumerable:!1,configurable:!1,value:null},[v5]:{writable:!0,enumerable:!1,configurable:!1,value:null}})});var S5={};Xc(S5,{clampRange:()=>Sp,createElementComparator:()=>G2,wrapIndex:()=>Xf});function Sp(t,e,r,i){let{length:s=0}=t,o=typeof e!="number"?0:e,h=typeof r!="number"?s:r;return o<0&&(o=(o%s+s)%s),h<0&&(h=(h%s+s)%s),hs&&(h=s),i?i(t,o,h):[o,h]}function G2(t){if(typeof t!=="object"||t===null)return tb(t)?tb:r=>r===t;if(t instanceof Date){let r=t.valueOf();return i=>i instanceof Date?i.valueOf()===r:!1}return ArrayBuffer.isView(t)?r=>r?T6(t,r):!1:t instanceof Map?Q_(t):Array.isArray(t)?K_(t):t instanceof Bn?Z_(t):eS(t,!0)}function K_(t){let e=[];for(let r=-1,i=t.length;++r!1;let i=[];for(let s=-1,o=r.length;++s{if(!r||typeof r!="object")return!1;switch(r.constructor){case Array:return tS(t,r);case Map:return rb(t,r,r.keys());case Ul:case nu:case Object:case void 0:return rb(t,r,e||Object.keys(r))}return r instanceof Bn?rS(t,r):!1}}function tS(t,e){let r=t.length;if(e.length!==r)return!1;for(let i=-1;++i{A1();_p();$4();Lo();Xf=(t,e)=>t<0?e+t:t,tb=t=>t!==t});var E5={};Xc(E5,{BitIterator:()=>iu,getBit:()=>V4,getBool:()=>Xd,packBools:()=>Kf,popcnt_array:()=>nb,popcnt_bit_range:()=>Ep,popcnt_uint32:()=>U4,setBool:()=>nS,truncateBitmap:()=>Jf});function Xd(t,e,r,i){return(r&1<>i}function nS(t,e,r){return r?!!(t[e>>3]|=1<>3]&=~(1<0||r.byteLength>3):Kf(new iu(r,t,e,null,Xd)).subarray(0,i)),s}return r}function Kf(t){let e=[],r=0,i=0,s=0;for(let h of t)h&&(s|=1<0)&&(e[r++]=s);let o=new Uint8Array(e.length+7&-8);return o.set(e),o}function Ep(t,e,r){if(r-e<=0)return 0;if(r-e<8){let o=0;for(let h of new iu(t,e,r-e,t,V4))o+=h;return o}let i=r>>3<<3,s=e+(e%8===0?0:8-e%8);return Ep(t,e,s)+Ep(t,i,r)+nb(t,s>>3,i-s>>3)}function nb(t,e,r){let i=0,s=Math.trunc(e),o=new DataView(t.buffer,t.byteOffset,t.byteLength),h=r===void 0?t.byteLength:s+r;for(;h-s>=4;)i+=U4(o.getUint32(s)),s+=4;for(;h-s>=2;)i+=U4(o.getUint16(s)),s+=2;for(;h-s>=1;)i+=U4(o.getUint8(s)),s+=1;return i}function U4(t){let e=Math.trunc(t);return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}var iu,Qf=Mt(()=>{iu=class{constructor(e,r,i,s,o){this.bytes=e,this.length=i,this.context=s,this.get=o,this.bit=r%8,this.byteIndex=r>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index{A1();na();Ms();Qf();W1();Lo();iS=-1,Gi=class t{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){let{type:e}=this;return ln.isSparseUnion(e)?this.children.some(r=>r.nullable):ln.isDenseUnion(e)?this.children.some(r=>r.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let e=0,{valueOffsets:r,values:i,nullBitmap:s,typeIds:o}=this;return r&&(e+=r.byteLength),i&&(e+=i.byteLength),s&&(e+=s.byteLength),o&&(e+=o.byteLength),this.children.reduce((h,g)=>h+g.byteLength,e)}get nullCount(){if(ln.isUnion(this.type))return this.children.reduce((i,s)=>i+s.nullCount,0);let e=this._nullCount,r;return e<=iS&&(r=this.nullBitmap)&&(this._nullCount=e=r.length===0?0:this.length-Ep(r,this.offset,this.offset+this.length)),e}constructor(e,r,i,s,o,h=[],g){this.type=e,this.children=h,this.dictionary=g,this.offset=Math.floor(Math.max(r||0,0)),this.length=Math.floor(Math.max(i||0,0)),this._nullCount=Math.floor(Math.max(s||0,-1));let v;o instanceof t?(this.stride=o.stride,this.values=o.values,this.typeIds=o.typeIds,this.nullBitmap=o.nullBitmap,this.valueOffsets=o.valueOffsets):(this.stride=xl(e),o&&((v=o[0])&&(this.valueOffsets=v),(v=o[1])&&(this.values=v),(v=o[2])&&(this.nullBitmap=v),(v=o[3])&&(this.typeIds=v)))}getValid(e){let{type:r}=this;if(ln.isUnion(r)){let i=r,s=this.children[i.typeIdToChildIndex[this.typeIds[e]]],o=i.mode===Qi.Dense?this.valueOffsets[e]:e;return s.getValid(o)}if(this.nullable&&this.nullCount>0){let i=this.offset+e;return(this.nullBitmap[i>>3]&1<>3;(!o||o.byteLength<=_)&&(o=new Uint8Array((h+g+63&-64)>>3).fill(255),this.nullCount>0?(o.set(Jf(h,g,this.nullBitmap),0),Object.assign(this,{nullBitmap:o})):Object.assign(this,{nullBitmap:o,_nullCount:0}));let w=o[_];i=(w&x)!==0,o[_]=r?w|x:w&~x}return i!==!!r&&(this._nullCount=this.nullCount+(r?-1:1)),r}clone(e=this.type,r=this.offset,i=this.length,s=this._nullCount,o=this,h=this.children){return new t(e,r,i,s,o,h,this.dictionary)}slice(e,r){let{stride:i,typeId:s,children:o}=this,h=+(this._nullCount===0)-1,g=s===16?i:1,v=this._sliceBuffers(e,r,i,s);return this.clone(this.type,this.offset+e,r,h,v,o.length===0||this.valueOffsets?o:this._sliceChildren(o,g*e,g*r))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===be.Null)return this.clone(this.type,0,e,0);let{length:r,nullCount:i}=this,s=new Uint8Array((e+63&-64)>>3).fill(255,0,r>>3);s[r>>3]=(1<0&&s.set(Jf(this.offset,r,this.nullBitmap),0);let o=this.buffers;return o[v1.VALIDITY]=s,this.clone(this.type,0,e,i+(e-r),o)}_sliceBuffers(e,r,i,s){let o,{buffers:h}=this;return(o=h[v1.TYPE])&&(h[v1.TYPE]=o.subarray(e,e+r)),(o=h[v1.OFFSET])&&(h[v1.OFFSET]=o.subarray(e,e+r+1))||(o=h[v1.DATA])&&(h[v1.DATA]=s===6?o:o.subarray(i*e,i*(e+r))),h}_sliceChildren(e,r,i){return e.map(s=>s.slice(r,i))}};Gi.prototype.children=Object.freeze([]);w5=class t extends Gn{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{["type"]:r,["offset"]:i=0,["length"]:s=0}=e;return new Gi(r,i,s,s)}visitBool(e){let{["type"]:r,["offset"]:i=0}=e,s=oi(e.nullBitmap),o=Mi(r.ArrayType,e.data),{["length"]:h=o.length>>3,["nullCount"]:g=e.nullBitmap?-1:0}=e;return new Gi(r,i,h,g,[void 0,o,s])}visitInt(e){let{["type"]:r,["offset"]:i=0}=e,s=oi(e.nullBitmap),o=Mi(r.ArrayType,e.data),{["length"]:h=o.length,["nullCount"]:g=e.nullBitmap?-1:0}=e;return new Gi(r,i,h,g,[void 0,o,s])}visitFloat(e){let{["type"]:r,["offset"]:i=0}=e,s=oi(e.nullBitmap),o=Mi(r.ArrayType,e.data),{["length"]:h=o.length,["nullCount"]:g=e.nullBitmap?-1:0}=e;return new Gi(r,i,h,g,[void 0,o,s])}visitUtf8(e){let{["type"]:r,["offset"]:i=0}=e,s=oi(e.data),o=oi(e.nullBitmap),h=jf(e.valueOffsets),{["length"]:g=h.length-1,["nullCount"]:v=e.nullBitmap?-1:0}=e;return new Gi(r,i,g,v,[h,s,o])}visitLargeUtf8(e){let{["type"]:r,["offset"]:i=0}=e,s=oi(e.data),o=oi(e.nullBitmap),h=l4(e.valueOffsets),{["length"]:g=h.length-1,["nullCount"]:v=e.nullBitmap?-1:0}=e;return new Gi(r,i,g,v,[h,s,o])}visitBinary(e){let{["type"]:r,["offset"]:i=0}=e,s=oi(e.data),o=oi(e.nullBitmap),h=jf(e.valueOffsets),{["length"]:g=h.length-1,["nullCount"]:v=e.nullBitmap?-1:0}=e;return new Gi(r,i,g,v,[h,s,o])}visitLargeBinary(e){let{["type"]:r,["offset"]:i=0}=e,s=oi(e.data),o=oi(e.nullBitmap),h=l4(e.valueOffsets),{["length"]:g=h.length-1,["nullCount"]:v=e.nullBitmap?-1:0}=e;return new Gi(r,i,g,v,[h,s,o])}visitFixedSizeBinary(e){let{["type"]:r,["offset"]:i=0}=e,s=oi(e.nullBitmap),o=Mi(r.ArrayType,e.data),{["length"]:h=o.length/xl(r),["nullCount"]:g=e.nullBitmap?-1:0}=e;return new Gi(r,i,h,g,[void 0,o,s])}visitDate(e){let{["type"]:r,["offset"]:i=0}=e,s=oi(e.nullBitmap),o=Mi(r.ArrayType,e.data),{["length"]:h=o.length/xl(r),["nullCount"]:g=e.nullBitmap?-1:0}=e;return new Gi(r,i,h,g,[void 0,o,s])}visitTimestamp(e){let{["type"]:r,["offset"]:i=0}=e,s=oi(e.nullBitmap),o=Mi(r.ArrayType,e.data),{["length"]:h=o.length/xl(r),["nullCount"]:g=e.nullBitmap?-1:0}=e;return new Gi(r,i,h,g,[void 0,o,s])}visitTime(e){let{["type"]:r,["offset"]:i=0}=e,s=oi(e.nullBitmap),o=Mi(r.ArrayType,e.data),{["length"]:h=o.length/xl(r),["nullCount"]:g=e.nullBitmap?-1:0}=e;return new Gi(r,i,h,g,[void 0,o,s])}visitDecimal(e){let{["type"]:r,["offset"]:i=0}=e,s=oi(e.nullBitmap),o=Mi(r.ArrayType,e.data),{["length"]:h=o.length/xl(r),["nullCount"]:g=e.nullBitmap?-1:0}=e;return new Gi(r,i,h,g,[void 0,o,s])}visitList(e){let{["type"]:r,["offset"]:i=0,["child"]:s}=e,o=oi(e.nullBitmap),h=jf(e.valueOffsets),{["length"]:g=h.length-1,["nullCount"]:v=e.nullBitmap?-1:0}=e;return new Gi(r,i,g,v,[h,void 0,o],[s])}visitStruct(e){let{["type"]:r,["offset"]:i=0,["children"]:s=[]}=e,o=oi(e.nullBitmap),{length:h=s.reduce((v,{length:x})=>Math.max(v,x),0),nullCount:g=e.nullBitmap?-1:0}=e;return new Gi(r,i,h,g,[void 0,void 0,o],s)}visitUnion(e){let{["type"]:r,["offset"]:i=0,["children"]:s=[]}=e,o=Mi(r.ArrayType,e.typeIds),{["length"]:h=o.length,["nullCount"]:g=-1}=e;if(ln.isSparseUnion(r))return new Gi(r,i,h,g,[void 0,void 0,void 0,o],s);let v=jf(e.valueOffsets);return new Gi(r,i,h,g,[v,void 0,void 0,o],s)}visitDictionary(e){let{["type"]:r,["offset"]:i=0}=e,s=oi(e.nullBitmap),o=Mi(r.indices.ArrayType,e.data),{["dictionary"]:h=new Bn([new t().visit({type:r.dictionary})])}=e,{["length"]:g=o.length,["nullCount"]:v=e.nullBitmap?-1:0}=e;return new Gi(r,i,g,v,[void 0,o,s],[],h)}visitInterval(e){let{["type"]:r,["offset"]:i=0}=e,s=oi(e.nullBitmap),o=Mi(r.ArrayType,e.data),{["length"]:h=o.length/xl(r),["nullCount"]:g=e.nullBitmap?-1:0}=e;return new Gi(r,i,h,g,[void 0,o,s])}visitDuration(e){let{["type"]:r,["offset"]:i=0}=e,s=oi(e.nullBitmap),o=Mi(r.ArrayType,e.data),{["length"]:h=o.length,["nullCount"]:g=e.nullBitmap?-1:0}=e;return new Gi(r,i,h,g,[void 0,o,s])}visitFixedSizeList(e){let{["type"]:r,["offset"]:i=0,["child"]:s=new t().visit({type:r.valueType})}=e,o=oi(e.nullBitmap),{["length"]:h=s.length/xl(r),["nullCount"]:g=e.nullBitmap?-1:0}=e;return new Gi(r,i,h,g,[void 0,void 0,o],[s])}visitMap(e){let{["type"]:r,["offset"]:i=0,["child"]:s=new t().visit({type:r.childType})}=e,o=oi(e.nullBitmap),h=jf(e.valueOffsets),{["length"]:g=h.length-1,["nullCount"]:v=e.nullBitmap?-1:0}=e;return new Gi(r,i,g,v,[h,void 0,o],[s])}},sS=new w5});function ib(t){return t.some(e=>e.nullable)}function G4(t){return t.reduce((e,r)=>e+r.nullCount,0)}function j4(t){return t.reduce((e,r,i)=>(e[i+1]=e[i]+r.length,e),new Uint32Array(t.length+1))}function q4(t,e,r,i){let s=[];for(let o=-1,h=t.length;++o=i)break;if(r>=v+x)continue;if(v>=r&&v+x<=i){s.push(g);continue}let _=Math.max(0,r-v),w=Math.min(i-v,x);s.push(g.slice(_,w-_))}return s.length===0&&s.push(t[0].slice(0,0)),s}function A5(t,e,r,i){let s=0,o=0,h=e.length-1;do{if(s>=h-1)return r{wp=class{constructor(e=0,r){this.numChunks=e,this.getChunkIterator=r,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndex0?0:-1}function oS(t,e){let{nullBitmap:r}=t;if(!r||t.nullCount<=0)return-1;let i=0;for(let s of new iu(r,t.offset+(e||0),t.length,r,Xd)){if(!s)return i;++i}return-1}function Si(t,e,r){if(e===void 0)return-1;if(e===null)switch(t.typeId){case be.Union:break;case be.Dictionary:break;default:return oS(t,r)}let i=Qa.getVisitFn(t),s=G2(e);for(let o=(r||0)-1,h=t.length;++o{na();W1();Yf();Qf();Yd();Qn=class extends Gn{};Qn.prototype.visitNull=aS;Qn.prototype.visitBool=Si;Qn.prototype.visitInt=Si;Qn.prototype.visitInt8=Si;Qn.prototype.visitInt16=Si;Qn.prototype.visitInt32=Si;Qn.prototype.visitInt64=Si;Qn.prototype.visitUint8=Si;Qn.prototype.visitUint16=Si;Qn.prototype.visitUint32=Si;Qn.prototype.visitUint64=Si;Qn.prototype.visitFloat=Si;Qn.prototype.visitFloat16=Si;Qn.prototype.visitFloat32=Si;Qn.prototype.visitFloat64=Si;Qn.prototype.visitUtf8=Si;Qn.prototype.visitLargeUtf8=Si;Qn.prototype.visitBinary=Si;Qn.prototype.visitLargeBinary=Si;Qn.prototype.visitFixedSizeBinary=Si;Qn.prototype.visitDate=Si;Qn.prototype.visitDateDay=Si;Qn.prototype.visitDateMillisecond=Si;Qn.prototype.visitTimestamp=Si;Qn.prototype.visitTimestampSecond=Si;Qn.prototype.visitTimestampMillisecond=Si;Qn.prototype.visitTimestampMicrosecond=Si;Qn.prototype.visitTimestampNanosecond=Si;Qn.prototype.visitTime=Si;Qn.prototype.visitTimeSecond=Si;Qn.prototype.visitTimeMillisecond=Si;Qn.prototype.visitTimeMicrosecond=Si;Qn.prototype.visitTimeNanosecond=Si;Qn.prototype.visitDecimal=Si;Qn.prototype.visitList=Si;Qn.prototype.visitStruct=Si;Qn.prototype.visitUnion=Si;Qn.prototype.visitDenseUnion=sb;Qn.prototype.visitSparseUnion=sb;Qn.prototype.visitDictionary=Si;Qn.prototype.visitInterval=Si;Qn.prototype.visitIntervalDayTime=Si;Qn.prototype.visitIntervalYearMonth=Si;Qn.prototype.visitIntervalMonthDayNano=Si;Qn.prototype.visitDuration=Si;Qn.prototype.visitDurationSecond=Si;Qn.prototype.visitDurationMillisecond=Si;Qn.prototype.visitDurationMicrosecond=Si;Qn.prototype.visitDurationNanosecond=Si;Qn.prototype.visitFixedSizeList=Si;Qn.prototype.visitMap=Si;Zf=new Qn});function ui(t){let{type:e}=t;if(t.nullCount===0&&t.stride===1&&(ln.isInt(e)&&e.bitWidth!==64||ln.isTime(e)&&e.bitWidth!==64||ln.isFloat(e)&&e.precision!==fs.HALF))return new wp(t.data.length,i=>{let s=t.data[i];return s.values.subarray(0,s.length)[Symbol.iterator]()});let r=0;return new wp(t.data.length,i=>{let o=t.data[i].length,h=t.slice(r,r+o);return r+=o,new T5(h)})}var Zn,T5,Kd,X4=Mt(()=>{W1();na();Ms();W4();Zn=class extends Gn{};T5=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexlS(e)));if(ArrayBuffer.isView(t)){t instanceof DataView&&(t=new Uint8Array(t.buffer));let e={offset:0,length:t.length,nullCount:-1,data:t};if(t instanceof Int8Array)return new Bn([jn(Object.assign(Object.assign({},e),{type:new R2}))]);if(t instanceof Int16Array)return new Bn([jn(Object.assign(Object.assign({},e),{type:new k2}))]);if(t instanceof Int32Array)return new Bn([jn(Object.assign(Object.assign({},e),{type:new s1}))]);if(t instanceof BigInt64Array)return new Bn([jn(Object.assign(Object.assign({},e),{type:new tu}))]);if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)return new Bn([jn(Object.assign(Object.assign({},e),{type:new M2}))]);if(t instanceof Uint16Array)return new Bn([jn(Object.assign(Object.assign({},e),{type:new B2}))]);if(t instanceof Uint32Array)return new Bn([jn(Object.assign(Object.assign({},e),{type:new F2}))]);if(t instanceof BigUint64Array)return new Bn([jn(Object.assign(Object.assign({},e),{type:new $2}))]);if(t instanceof Float32Array)return new Bn([jn(Object.assign(Object.assign({},e),{type:new P2}))]);if(t instanceof Float64Array)return new Bn([jn(Object.assign(Object.assign({},e),{type:new ru}))]);throw new Error("Unrecognized input")}}throw new Error("Unrecognized input")}function lS(t){return t instanceof Gi?[t]:t instanceof Bn?t.data:j2(t).data}var ab,ob,lb,Bn,J4,A1=Mt(()=>{na();Yd();Ms();su();W4();Yf();_l();Y4();X4();Ms();ob={},lb={},Bn=class t{constructor(e){var r,i,s;let o=e[0]instanceof t?e.flatMap(g=>g.data):e;if(o.length===0||o.some(g=>!(g instanceof Gi)))throw new TypeError("Vector constructor expects an Array of Data instances.");let h=(r=o[0])===null||r===void 0?void 0:r.type;switch(o.length){case 0:this._offsets=[0];break;case 1:{let{get:g,set:v,indexOf:x}=ob[h.typeId],_=o[0];this.isValid=w=>Ap(_,w),this.get=w=>g(_,w),this.set=(w,O)=>v(_,w,O),this.indexOf=w=>x(_,w),this._offsets=[0,_.length];break}default:Object.setPrototypeOf(this,lb[h.typeId]),this._offsets=j4(o);break}this.data=o,this.type=h,this.stride=xl(h),this.numChildren=(s=(i=h.children)===null||i===void 0?void 0:i.length)!==null&&s!==void 0?s:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((e,r)=>e+r.byteLength,0)}get nullable(){return ib(this.data)}get nullCount(){return G4(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${be[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(Xf(e,this.length))}set(e,r){}indexOf(e,r){return-1}includes(e,r){return this.indexOf(e,r)>-1}[Symbol.iterator](){return Kd.visit(this)}concat(...e){return new t(this.data.concat(e.flatMap(r=>r.data).flat(Number.POSITIVE_INFINITY)))}slice(e,r){return new t(Sp(this,e,r,({data:i,_offsets:s},o,h)=>q4(i,s,o,h)))}toJSON(){return[...this]}toArray(){let{type:e,data:r,length:i,stride:s,ArrayType:o}=this;switch(e.typeId){case be.Int:case be.Float:case be.Decimal:case be.Time:case be.Timestamp:switch(r.length){case 0:return new o;case 1:return r[0].values.subarray(0,i*s);default:return r.reduce((h,{values:g,length:v})=>(h.array.set(g.subarray(0,v*s),h.offset),h.offset+=v*s,h),{array:new o(i*s),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(e){var r;return this.getChildAt((r=this.type.children)===null||r===void 0?void 0:r.findIndex(i=>i.name===e))}getChildAt(e){return e>-1&&er[e])):null}get isMemoized(){return ln.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(ln.isDictionary(this.type)){let e=new J4(this.data[0].dictionary),r=this.data.map(i=>{let s=i.clone();return s.dictionary=e,s});return new t(r)}return new J4(this)}unmemoize(){if(ln.isDictionary(this.type)&&this.isMemoized){let e=this.data[0].dictionary.unmemoize(),r=this.data.map(i=>{let s=i.clone();return s.dictionary=e,s});return new t(r)}return this}};ab=Symbol.toStringTag;Bn[ab]=(t=>{t.type=ln.prototype,t.data=[],t.length=0,t.stride=1,t.numChildren=0,t._offsets=new Uint32Array([0]),t[Symbol.isConcatSpreadable]=!0;let e=Object.keys(be).map(r=>be[r]).filter(r=>typeof r=="number"&&r!==be.NONE);for(let r of e){let i=Qa.getVisitFnByTypeId(r),s=Ho.getVisitFnByTypeId(r),o=Zf.getVisitFnByTypeId(r);ob[r]={get:i,set:s,indexOf:o},lb[r]=Object.create(t,{isValid:{value:Jd(Ap)},get:{value:Jd(Qa.getVisitFnByTypeId(r))},set:{value:z4(Ho.getVisitFnByTypeId(r))},indexOf:{value:H4(Zf.getVisitFnByTypeId(r))}})}return"Vector"})(Bn.prototype);J4=class t extends Bn{constructor(e){super(e.data);let r=this.get,i=this.set,s=this.slice,o=new Array(this.length);Object.defineProperty(this,"get",{value(h){let g=o[h];if(g!==void 0)return g;let v=r.call(this,h);return o[h]=v,v}}),Object.defineProperty(this,"set",{value(h,g){i.call(this,h,g),o[h]=g}}),Object.defineProperty(this,"slice",{value:(h,g)=>new t(s.call(this,h,g))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new Bn(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}});function cb(t){if(!t||t.length<=0)return function(s){return!0};let e="",r=t.filter(i=>i===i);return r.length>0&&(e=` +(()=>{var u_=Object.create;var S6=Object.defineProperty;var f_=Object.getOwnPropertyDescriptor;var d_=Object.getOwnPropertyNames;var h_=Object.getPrototypeOf,p_=Object.prototype.hasOwnProperty;var Dt=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(i){throw r=[i],i}};var Zg=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},vc=(t,e)=>{for(var r in e)S6(t,r,{get:e[r],enumerable:!0})},m_=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of d_(e))!p_.call(t,s)&&s!==r&&S6(t,s,{get:()=>e[s],enumerable:!(i=f_(e,s))||i.enumerable});return t};var N0=(t,e,r)=>(r=t!=null?u_(h_(t)):{},m_(e||!t||!t.__esModule?S6(r,"default",{value:t,enumerable:!0}):r,t));function p7(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(t);s=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function xi(t){return this instanceof xi?(this.v=t,this):new xi(t)}function E1(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r.apply(t,e||[]),s,a=[];return s=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),m("next"),m("throw"),m("return",d),s[Symbol.asyncIterator]=function(){return this},s;function d(O){return function(z){return Promise.resolve(z).then(O,w)}}function m(O,z){i[O]&&(s[O]=function(J){return new Promise(function(Q,oe){a.push([O,J,Q,oe])>1||v(O,J)})},z&&(s[O]=z(s[O])))}function v(O,z){try{_(i[O](z))}catch(J){I(a[0][3],J)}}function _(O){O.value instanceof xi?Promise.resolve(O.value.v).then(x,w):I(a[0][2],O)}function x(O){v("next",O)}function w(O){v("throw",O)}function I(O,z){O(z),a.shift(),a.length&&v(a[0][0],a[0][1])}}function Gd(t){var e,r;return e={},i("next"),i("throw",function(s){throw s}),i("return"),e[Symbol.iterator]=function(){return this},e;function i(s,a){e[s]=t[s]?function(d){return(r=!r)?{value:xi(t[s](d)),done:!1}:a?a(d):d}:a}}function ml(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof h7=="function"?h7(t):t[Symbol.iterator](),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(a){r[a]=t[a]&&function(d){return new Promise(function(m,v){d=t[a](d),s(m,v,d.done,d.value)})}}function s(a,d,m,v){Promise.resolve(v).then(function(_){a({value:_,done:m})},d)}}var W1=Dt(()=>{});var m7,jd,Gx,gl,Vu=Dt(()=>{m7=new TextDecoder("utf-8"),jd=m7.decode.bind(m7),Gx=new TextEncoder,gl=t=>Gx.encode(t)});var jx,g7,Eo,w1,yl,_c,Hl,b4,v4,_4,x4,S4,y7,Xh,b7,E4,v7,Rf=Dt(()=>{jx=t=>typeof t=="number",g7=t=>typeof t=="boolean",Eo=t=>typeof t=="function",w1=t=>t!=null&&Object(t)===t,yl=t=>w1(t)&&Eo(t.then),_c=t=>w1(t)&&Eo(t[Symbol.iterator]),Hl=t=>w1(t)&&Eo(t[Symbol.asyncIterator]),b4=t=>w1(t)&&w1(t.schema),v4=t=>w1(t)&&"done"in t&&"value"in t,_4=t=>w1(t)&&Eo(t.stat)&&jx(t.fd),x4=t=>w1(t)&&Xh(t.body),S4=t=>"_getDOMStream"in t&&"_getNodeStream"in t,y7=t=>w1(t)&&Eo(t.abort)&&Eo(t.getWriter)&&!S4(t),Xh=t=>w1(t)&&Eo(t.cancel)&&Eo(t.getReader)&&!S4(t),b7=t=>w1(t)&&Eo(t.end)&&Eo(t.write)&&g7(t.writable)&&!S4(t),E4=t=>w1(t)&&Eo(t.read)&&Eo(t.pipe)&&g7(t.readable)&&!S4(t),v7=t=>w1(t)&&Eo(t.clear)&&Eo(t.bytes)&&Eo(t.position)&&Eo(t.setPosition)&&Eo(t.capacity)&&Eo(t.getBufferIdentifier)&&Eo(t.createLong)});var e5={};vc(e5,{compareArrayLike:()=>Z6,joinUint8Arrays:()=>bl,memcpy:()=>Jh,rebaseValueOffsets:()=>w4,toArrayBufferView:()=>Fi,toArrayBufferViewAsyncIterator:()=>xc,toArrayBufferViewIterator:()=>ru,toBigInt64Array:()=>Kh,toBigUint64Array:()=>Xx,toFloat32Array:()=>Jx,toFloat32ArrayAsyncIterator:()=>dS,toFloat32ArrayIterator:()=>iS,toFloat64Array:()=>Kx,toFloat64ArrayAsyncIterator:()=>hS,toFloat64ArrayIterator:()=>sS,toInt16Array:()=>zx,toInt16ArrayAsyncIterator:()=>lS,toInt16ArrayIterator:()=>eS,toInt32Array:()=>J2,toInt32ArrayAsyncIterator:()=>cS,toInt32ArrayIterator:()=>tS,toInt8Array:()=>Hx,toInt8ArrayAsyncIterator:()=>oS,toInt8ArrayIterator:()=>Zx,toUint16Array:()=>Wx,toUint16ArrayAsyncIterator:()=>uS,toUint16ArrayIterator:()=>rS,toUint32Array:()=>Yx,toUint32ArrayAsyncIterator:()=>fS,toUint32ArrayIterator:()=>nS,toUint8Array:()=>Wn,toUint8ArrayAsyncIterator:()=>Q6,toUint8ArrayIterator:()=>K6,toUint8ClampedArray:()=>Qx,toUint8ClampedArrayAsyncIterator:()=>pS,toUint8ClampedArrayIterator:()=>aS});function qx(t){let e=t[0]?[t[0]]:[],r,i,s,a;for(let d,m,v=0,_=0,x=t.length;++vx+w.byteLength,0),s,a,d,m=0,v=-1,_=Math.min(e||Number.POSITIVE_INFINITY,i);for(let x=r.length;++v0)do if(t[r]!==e[r])return!1;while(++r{W1();Vu();Rf();J6=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;Hx=t=>Fi(Int8Array,t),zx=t=>Fi(Int16Array,t),J2=t=>Fi(Int32Array,t),Kh=t=>Fi(BigInt64Array,t),Wn=t=>Fi(Uint8Array,t),Wx=t=>Fi(Uint16Array,t),Yx=t=>Fi(Uint32Array,t),Xx=t=>Fi(BigUint64Array,t),Jx=t=>Fi(Float32Array,t),Kx=t=>Fi(Float64Array,t),Qx=t=>Fi(Uint8ClampedArray,t),X6=t=>(t.next(),t);Zx=t=>ru(Int8Array,t),eS=t=>ru(Int16Array,t),tS=t=>ru(Int32Array,t),K6=t=>ru(Uint8Array,t),rS=t=>ru(Uint16Array,t),nS=t=>ru(Uint32Array,t),iS=t=>ru(Float32Array,t),sS=t=>ru(Float64Array,t),aS=t=>ru(Uint8ClampedArray,t);oS=t=>xc(Int8Array,t),lS=t=>xc(Int16Array,t),cS=t=>xc(Int32Array,t),Q6=t=>xc(Uint8Array,t),uS=t=>xc(Uint16Array,t),fS=t=>xc(Uint32Array,t),dS=t=>xc(Float32Array,t),hS=t=>xc(Float64Array,t),pS=t=>xc(Uint8ClampedArray,t)});function*mS(t){let e,r=!1,i=[],s,a,d,m=0;function v(){return a==="peek"?bl(i,d)[0]:([s,i,m]=bl(i,d),s)}({cmd:a,size:d}=(yield null)||{cmd:"read",size:0});let _=K6(t)[Symbol.iterator]();try{do if({done:e,value:s}=Number.isNaN(d-m)?_.next():_.next(d-m),!e&&s.byteLength>0&&(i.push(s),m+=s.byteLength),e||d<=m)do({cmd:a,size:d}=yield v());while(d0&&(s.push(a),v+=a.byteLength),r||m<=v)do({cmd:d,size:m}=yield yield xi(_()));while(m0&&(s.push(Wn(a)),v+=a.byteLength),r||m<=v)do({cmd:d,size:m}=yield yield xi(_()));while(mO[2]))),i==="error")break;if((s=i==="end")||(Number.isFinite(m-v)?(x=Wn(t.read(m-v)),x.byteLength0&&(_.push(x),v+=x.byteLength)),s||m<=v)do({cmd:d,size:m}=yield yield xi(w()));while(m{for(let[oe,se]of O)t.off(oe,se);try{let oe=t.destroy;oe&&oe.call(t,z),z=void 0}catch(oe){z=oe||z}finally{z!=null?Q(z):J()}})}})}var jo,A4,r5,t5,Qh=Dt(()=>{W1();wo();jo={fromIterable(t){return A4(mS(t))},fromAsyncIterable(t){return A4(gS(t))},fromDOMStream(t){return A4(yS(t))},fromNodeStream(t){return A4(bS(t))},toDOMStream(t,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(t,e){throw new Error('"toNodeStream" not available in this environment')}},A4=t=>(t.next(),t);r5=class{constructor(e){this.source=e,this.reader=null,this.reader=this.source.getReader(),this.reader.closed.catch(()=>{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(e){return An(this,void 0,void 0,function*(){let{reader:r,source:i}=this;r&&(yield r.cancel(e).catch(()=>{})),i&&i.locked&&this.releaseLock()})}read(e){return An(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};let r=yield this.reader.read();return!r.done&&(r.value=Wn(r)),r})}},t5=(t,e)=>{let r=s=>i([e,s]),i;return[e,r,new Promise(s=>(i=s)&&t.once(e,r))]}});var fs,T4=Dt(()=>{(function(t){t[t.V1=0]="V1",t[t.V2=1]="V2",t[t.V3=2]="V3",t[t.V4=3]="V4",t[t.V5=4]="V5"})(fs||(fs={}))});var ns,n5=Dt(()=>{(function(t){t[t.Sparse=0]="Sparse",t[t.Dense=1]="Dense"})(ns||(ns={}))});var ds,i5=Dt(()=>{(function(t){t[t.HALF=0]="HALF",t[t.SINGLE=1]="SINGLE",t[t.DOUBLE=2]="DOUBLE"})(ds||(ds={}))});var Es,s5=Dt(()=>{(function(t){t[t.DAY=0]="DAY",t[t.MILLISECOND=1]="MILLISECOND"})(Es||(Es={}))});var cn,Zh=Dt(()=>{(function(t){t[t.SECOND=0]="SECOND",t[t.MILLISECOND=1]="MILLISECOND",t[t.MICROSECOND=2]="MICROSECOND",t[t.NANOSECOND=3]="NANOSECOND"})(cn||(cn={}))});var Ji,a5=Dt(()=>{(function(t){t[t.YEAR_MONTH=0]="YEAR_MONTH",t[t.DAY_TIME=1]="DAY_TIME",t[t.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"})(Ji||(Ji={}))});var I4=Dt(()=>{});var nu,O4,C4,qd,o5=Dt(()=>{nu=new Int32Array(2),O4=new Float32Array(nu.buffer),C4=new Float64Array(nu.buffer),qd=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1});var ep,l5=Dt(()=>{(function(t){t[t.UTF8_BYTES=1]="UTF8_BYTES",t[t.UTF16_STRING=2]="UTF16_STRING"})(ep||(ep={}))});var qo,c5=Dt(()=>{I4();l5();o5();qo=class t{constructor(e){this.bytes_=e,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(e){return new t(new Uint8Array(e))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(e){this.position_=e}capacity(){return this.bytes_.length}readInt8(e){return this.readUint8(e)<<24>>24}readUint8(e){return this.bytes_[e]}readInt16(e){return this.readUint16(e)<<16>>16}readUint16(e){return this.bytes_[e]|this.bytes_[e+1]<<8}readInt32(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24}readUint32(e){return this.readInt32(e)>>>0}readInt64(e){return BigInt.asIntN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<>8}writeUint16(e,r){this.bytes_[e]=r,this.bytes_[e+1]=r>>8}writeInt32(e,r){this.bytes_[e]=r,this.bytes_[e+1]=r>>8,this.bytes_[e+2]=r>>16,this.bytes_[e+3]=r>>24}writeUint32(e,r){this.bytes_[e]=r,this.bytes_[e+1]=r>>8,this.bytes_[e+2]=r>>16,this.bytes_[e+3]=r>>24}writeInt64(e,r){this.writeInt32(e,Number(BigInt.asIntN(32,r))),this.writeInt32(e+4,Number(BigInt.asIntN(32,r>>BigInt(32))))}writeUint64(e,r){this.writeUint32(e,Number(BigInt.asUintN(32,r))),this.writeUint32(e+4,Number(BigInt.asUintN(32,r>>BigInt(32))))}writeFloat32(e,r){O4[0]=r,this.writeInt32(e,nu[0])}writeFloat64(e,r){C4[0]=r,this.writeInt32(e,nu[qd?0:1]),this.writeInt32(e+4,nu[qd?1:0])}getBufferIdentifier(){if(this.bytes_.length{c5();I4();K2=class t{constructor(e){this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null,this.text_encoder=new TextEncoder;let r;e?r=e:r=1024,this.bb=qo.allocate(r),this.space=r}clear(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null}forceDefaults(e){this.force_defaults=e}dataBuffer(){return this.bb}asUint8Array(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())}prep(e,r){e>this.minalign&&(this.minalign=e);let i=~(this.bb.capacity()-this.space+r)+1&e-1;for(;this.space=0&&this.vtable[r]==0;r--);let i=r+1;for(;r>=0;r--)this.addInt16(this.vtable[r]!=0?e-this.vtable[r]:0);let s=2;this.addInt16(e-this.object_start);let a=(i+s)*2;this.addInt16(a);let d=0,m=this.space;e:for(r=0;r=0;d--)this.writeInt8(a.charCodeAt(d))}this.prep(this.minalign,4+s),this.addOffset(e),s&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(e,r){this.finish(e,r,!0)}requiredField(e,r){let i=this.bb.capacity()-e,s=i-this.bb.readInt32(i);if(!(r{I4();o5();_7();c5();l5()});var Q2,u5=Dt(()=>{(function(t){t[t.BUFFER=0]="BUFFER"})(Q2||(Q2={}))});var Ho,Hd=Dt(()=>{(function(t){t[t.LZ4_FRAME=0]="LZ4_FRAME",t[t.ZSTD=1]="ZSTD"})(Ho||(Ho={}))});var Gu,f5=Dt(()=>{zi();u5();Hd();Gu=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsBodyCompression(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}codec(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):Ho.LZ4_FRAME}method(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):Q2.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,r){e.addFieldInt8(0,r,Ho.LZ4_FRAME)}static addMethod(e,r){e.addFieldInt8(1,r,Q2.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,r,i){return t.startBodyCompression(e),t.addCodec(e,r),t.addMethod(e,i),t.endBodyCompression(e)}}});var zd,d5=Dt(()=>{zd=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createBuffer(e,r,i){return e.prep(8,16),e.writeInt64(BigInt(i??0)),e.writeInt64(BigInt(r??0)),e.offset()}}});var Wd,h5=Dt(()=>{Wd=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createFieldNode(e,r,i){return e.prep(8,16),e.writeInt64(BigInt(i??0)),e.writeInt64(BigInt(r??0)),e.offset()}}});var a1,p5=Dt(()=>{zi();f5();d5();h5();a1=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsRecordBatch(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}length(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}nodes(e,r){let i=this.bb.__offset(this.bb_pos,6);return i?(r||new Wd).__init(this.bb.__vector(this.bb_pos+i)+e*16,this.bb):null}nodesLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,r){let i=this.bb.__offset(this.bb_pos,8);return i?(r||new zd).__init(this.bb.__vector(this.bb_pos+i)+e*16,this.bb):null}buffersLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){let r=this.bb.__offset(this.bb_pos,10);return r?(e||new Gu).__init(this.bb.__indirect(this.bb_pos+r),this.bb):null}variadicBufferCounts(e){let r=this.bb.__offset(this.bb_pos,12);return r?this.bb.readInt64(this.bb.__vector(this.bb_pos+r)+e*8):BigInt(0)}variadicBufferCountsLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startRecordBatch(e){e.startObject(5)}static addLength(e,r){e.addFieldInt64(0,r,BigInt("0"))}static addNodes(e,r){e.addFieldOffset(1,r,0)}static startNodesVector(e,r){e.startVector(16,r,8)}static addBuffers(e,r){e.addFieldOffset(2,r,0)}static startBuffersVector(e,r){e.startVector(16,r,8)}static addCompression(e,r){e.addFieldOffset(3,r,0)}static addVariadicBufferCounts(e,r){e.addFieldOffset(4,r,0)}static createVariadicBufferCountsVector(e,r){e.startVector(8,r.length,8);for(let i=r.length-1;i>=0;i--)e.addInt64(r[i]);return e.endVector()}static startVariadicBufferCountsVector(e,r){e.startVector(8,r,8)}static endRecordBatch(e){return e.endObject()}}});var ju,x7=Dt(()=>{zi();p5();ju=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsDictionaryBatch(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}data(e){let r=this.bb.__offset(this.bb_pos,6);return r?(e||new a1).__init(this.bb.__indirect(this.bb_pos+r),this.bb):null}isDelta(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startDictionaryBatch(e){e.startObject(3)}static addId(e,r){e.addFieldInt64(0,r,BigInt("0"))}static addData(e,r){e.addFieldOffset(1,r,0)}static addIsDelta(e,r){e.addFieldInt8(2,+r,0)}static endDictionaryBatch(e){return e.endObject()}}});var Bf,m5=Dt(()=>{(function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"})(Bf||(Bf={}))});var tp,S7=Dt(()=>{(function(t){t[t.DenseArray=0]="DenseArray"})(tp||(tp={}))});var Ec,N4=Dt(()=>{zi();Ec=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsInt(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}bitWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startInt(e){e.startObject(2)}static addBitWidth(e,r){e.addFieldInt32(0,r,0)}static addIsSigned(e,r){e.addFieldInt8(1,+r,0)}static endInt(e){return e.endObject()}static createInt(e,r,i){return t.startInt(e),t.addBitWidth(e,r),t.addIsSigned(e,i),t.endInt(e)}}});var iu,g5=Dt(()=>{zi();S7();N4();iu=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsDictionaryEncoding(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}indexType(e){let r=this.bb.__offset(this.bb_pos,6);return r?(e||new Ec).__init(this.bb.__indirect(this.bb_pos+r),this.bb):null}isOrdered(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}dictionaryKind(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt16(this.bb_pos+e):tp.DenseArray}static startDictionaryEncoding(e){e.startObject(4)}static addId(e,r){e.addFieldInt64(0,r,BigInt("0"))}static addIndexType(e,r){e.addFieldOffset(1,r,0)}static addIsOrdered(e,r){e.addFieldInt8(2,+r,0)}static addDictionaryKind(e,r){e.addFieldInt16(3,r,tp.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}}});var aa,Yd=Dt(()=>{zi();aa=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsKeyValue(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}key(e){let r=this.bb.__offset(this.bb_pos,4);return r?this.bb.__string(this.bb_pos+r,e):null}value(e){let r=this.bb.__offset(this.bb_pos,6);return r?this.bb.__string(this.bb_pos+r,e):null}static startKeyValue(e){e.startObject(2)}static addKey(e,r){e.addFieldOffset(0,r,0)}static addValue(e,r){e.addFieldOffset(1,r,0)}static endKeyValue(e){return e.endObject()}static createKeyValue(e,r,i){return t.startKeyValue(e),t.addKey(e,r),t.addValue(e,i),t.endKeyValue(e)}}});var rp,E7=Dt(()=>{zi();rp=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsBinary(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return t.startBinary(e),t.endBinary(e)}}});var np,w7=Dt(()=>{zi();np=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsBinaryView(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinaryView(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startBinaryView(e){e.startObject(0)}static endBinaryView(e){return e.endObject()}static createBinaryView(e){return t.startBinaryView(e),t.endBinaryView(e)}}});var ip,A7=Dt(()=>{zi();ip=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsBool(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return t.startBool(e),t.endBool(e)}}});var kf,y5=Dt(()=>{zi();s5();kf=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsDate(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Es.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,r){e.addFieldInt16(0,r,Es.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,r){return t.startDate(e),t.addUnit(e,r),t.endDate(e)}}});var su,b5=Dt(()=>{zi();su=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsDecimal(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,r){e.addFieldInt32(0,r,0)}static addScale(e,r){e.addFieldInt32(1,r,0)}static addBitWidth(e,r){e.addFieldInt32(2,r,128)}static endDecimal(e){return e.endObject()}static createDecimal(e,r,i,s){return t.startDecimal(e),t.addPrecision(e,r),t.addScale(e,i),t.addBitWidth(e,s),t.endDecimal(e)}}});var Ff,v5=Dt(()=>{zi();Zh();Ff=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsDuration(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):cn.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,r){e.addFieldInt16(0,r,cn.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(e,r){return t.startDuration(e),t.addUnit(e,r),t.endDuration(e)}}});var Mf,_5=Dt(()=>{zi();Mf=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsFixedSizeBinary(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeBinary(e){e.startObject(1)}static addByteWidth(e,r){e.addFieldInt32(0,r,0)}static endFixedSizeBinary(e){return e.endObject()}static createFixedSizeBinary(e,r){return t.startFixedSizeBinary(e),t.addByteWidth(e,r),t.endFixedSizeBinary(e)}}});var $f,x5=Dt(()=>{zi();$f=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsFixedSizeList(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}listSize(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeList(e){e.startObject(1)}static addListSize(e,r){e.addFieldInt32(0,r,0)}static endFixedSizeList(e){return e.endObject()}static createFixedSizeList(e,r){return t.startFixedSizeList(e),t.addListSize(e,r),t.endFixedSizeList(e)}}});var Pf,S5=Dt(()=>{zi();i5();Pf=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsFloatingPoint(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):ds.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,r){e.addFieldInt16(0,r,ds.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,r){return t.startFloatingPoint(e),t.addPrecision(e,r),t.endFloatingPoint(e)}}});var Uf,E5=Dt(()=>{zi();a5();Uf=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsInterval(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ji.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,r){e.addFieldInt16(0,r,Ji.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,r){return t.startInterval(e),t.addUnit(e,r),t.endInterval(e)}}});var sp,T7=Dt(()=>{zi();sp=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsLargeBinary(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return t.startLargeBinary(e),t.endLargeBinary(e)}}});var ap,I7=Dt(()=>{zi();ap=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsLargeList(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeList(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startLargeList(e){e.startObject(0)}static endLargeList(e){return e.endObject()}static createLargeList(e){return t.startLargeList(e),t.endLargeList(e)}}});var op,O7=Dt(()=>{zi();op=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsLargeUtf8(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return t.startLargeUtf8(e),t.endLargeUtf8(e)}}});var lp,C7=Dt(()=>{zi();lp=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsList(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return t.startList(e),t.endList(e)}}});var Vf,w5=Dt(()=>{zi();Vf=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsMap(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){let e=this.bb.__offset(this.bb_pos,4);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startMap(e){e.startObject(1)}static addKeysSorted(e,r){e.addFieldInt8(0,+r,0)}static endMap(e){return e.endObject()}static createMap(e,r){return t.startMap(e),t.addKeysSorted(e,r),t.endMap(e)}}});var cp,L7=Dt(()=>{zi();cp=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsNull(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return t.startNull(e),t.endNull(e)}}});var up,N7=Dt(()=>{zi();up=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsStruct_(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return t.startStruct_(e),t.endStruct_(e)}}});var qu,A5=Dt(()=>{zi();Zh();qu=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsTime(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):cn.MILLISECOND}bitWidth(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):32}static startTime(e){e.startObject(2)}static addUnit(e,r){e.addFieldInt16(0,r,cn.MILLISECOND)}static addBitWidth(e,r){e.addFieldInt32(1,r,32)}static endTime(e){return e.endObject()}static createTime(e,r,i){return t.startTime(e),t.addUnit(e,r),t.addBitWidth(e,i),t.endTime(e)}}});var Hu,T5=Dt(()=>{zi();Zh();Hu=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsTimestamp(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):cn.SECOND}timezone(e){let r=this.bb.__offset(this.bb_pos,6);return r?this.bb.__string(this.bb_pos+r,e):null}static startTimestamp(e){e.startObject(2)}static addUnit(e,r){e.addFieldInt16(0,r,cn.SECOND)}static addTimezone(e,r){e.addFieldOffset(1,r,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,r,i){return t.startTimestamp(e),t.addUnit(e,r),t.addTimezone(e,i),t.endTimestamp(e)}}});var wc,I5=Dt(()=>{zi();n5();wc=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsUnion(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}mode(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):ns.Sparse}typeIds(e){let r=this.bb.__offset(this.bb_pos,6);return r?this.bb.readInt32(this.bb.__vector(this.bb_pos+r)+e*4):0}typeIdsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}typeIdsArray(){let e=this.bb.__offset(this.bb_pos,6);return e?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}static startUnion(e){e.startObject(2)}static addMode(e,r){e.addFieldInt16(0,r,ns.Sparse)}static addTypeIds(e,r){e.addFieldOffset(1,r,0)}static createTypeIdsVector(e,r){e.startVector(4,r.length,4);for(let i=r.length-1;i>=0;i--)e.addInt32(r[i]);return e.endVector()}static startTypeIdsVector(e,r){e.startVector(4,r,4)}static endUnion(e){return e.endObject()}static createUnion(e,r,i){return t.startUnion(e),t.addMode(e,r),t.addTypeIds(e,i),t.endUnion(e)}}});var fp,D7=Dt(()=>{zi();fp=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsUtf8(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return t.startUtf8(e),t.endUtf8(e)}}});var dp,R7=Dt(()=>{zi();dp=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsUtf8View(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8View(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8View(e){e.startObject(0)}static endUtf8View(e){return e.endObject()}static createUtf8View(e){return t.startUtf8View(e),t.endUtf8View(e)}}});var ri,D4=Dt(()=>{(function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.FloatingPoint=3]="FloatingPoint",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct_=13]="Struct_",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.LargeList=21]="LargeList",t[t.RunEndEncoded=22]="RunEndEncoded",t[t.BinaryView=23]="BinaryView",t[t.Utf8View=24]="Utf8View",t[t.ListView=25]="ListView",t[t.LargeListView=26]="LargeListView"})(ri||(ri={}))});var o1,O5=Dt(()=>{zi();g5();Yd();D4();o1=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsField(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}name(e){let r=this.bb.__offset(this.bb_pos,4);return r?this.bb.__string(this.bb_pos+r,e):null}nullable(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}typeType(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):ri.NONE}type(e){let r=this.bb.__offset(this.bb_pos,10);return r?this.bb.__union(e,this.bb_pos+r):null}dictionary(e){let r=this.bb.__offset(this.bb_pos,12);return r?(e||new iu).__init(this.bb.__indirect(this.bb_pos+r),this.bb):null}children(e,r){let i=this.bb.__offset(this.bb_pos,14);return i?(r||new t).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}childrenLength(){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,r){let i=this.bb.__offset(this.bb_pos,16);return i?(r||new aa).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,r){e.addFieldOffset(0,r,0)}static addNullable(e,r){e.addFieldInt8(1,+r,0)}static addTypeType(e,r){e.addFieldInt8(2,r,ri.NONE)}static addType(e,r){e.addFieldOffset(3,r,0)}static addDictionary(e,r){e.addFieldOffset(4,r,0)}static addChildren(e,r){e.addFieldOffset(5,r,0)}static createChildrenVector(e,r){e.startVector(4,r.length,4);for(let i=r.length-1;i>=0;i--)e.addOffset(r[i]);return e.endVector()}static startChildrenVector(e,r){e.startVector(4,r,4)}static addCustomMetadata(e,r){e.addFieldOffset(6,r,0)}static createCustomMetadataVector(e,r){e.startVector(4,r.length,4);for(let i=r.length-1;i>=0;i--)e.addOffset(r[i]);return e.endVector()}static startCustomMetadataVector(e,r){e.startVector(4,r,4)}static endField(e){return e.endObject()}}});var Y1,C5=Dt(()=>{zi();m5();O5();Yd();Y1=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsSchema(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}endianness(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Bf.Little}fields(e,r){let i=this.bb.__offset(this.bb_pos,6);return i?(r||new o1).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}fieldsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,r){let i=this.bb.__offset(this.bb_pos,8);return i?(r||new aa).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){let r=this.bb.__offset(this.bb_pos,10);return r?this.bb.readInt64(this.bb.__vector(this.bb_pos+r)+e*8):BigInt(0)}featuresLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,r){e.addFieldInt16(0,r,Bf.Little)}static addFields(e,r){e.addFieldOffset(1,r,0)}static createFieldsVector(e,r){e.startVector(4,r.length,4);for(let i=r.length-1;i>=0;i--)e.addOffset(r[i]);return e.endVector()}static startFieldsVector(e,r){e.startVector(4,r,4)}static addCustomMetadata(e,r){e.addFieldOffset(2,r,0)}static createCustomMetadataVector(e,r){e.startVector(4,r.length,4);for(let i=r.length-1;i>=0;i--)e.addOffset(r[i]);return e.endVector()}static startCustomMetadataVector(e,r){e.startVector(4,r,4)}static addFeatures(e,r){e.addFieldOffset(3,r,0)}static createFeaturesVector(e,r){e.startVector(8,r.length,8);for(let i=r.length-1;i>=0;i--)e.addInt64(r[i]);return e.endVector()}static startFeaturesVector(e,r){e.startVector(8,r,8)}static endSchema(e){return e.endObject()}static createSchema(e,r,i,s,a){return t.startSchema(e),t.addEndianness(e,r),t.addFields(e,i),t.addCustomMetadata(e,s),t.addFeatures(e,a),t.endSchema(e)}}});var Pi,R4=Dt(()=>{(function(t){t[t.NONE=0]="NONE",t[t.Schema=1]="Schema",t[t.DictionaryBatch=2]="DictionaryBatch",t[t.RecordBatch=3]="RecordBatch",t[t.Tensor=4]="Tensor",t[t.SparseTensor=5]="SparseTensor"})(Pi||(Pi={}))});var fe,zo,oa=Dt(()=>{T4();n5();i5();s5();Zh();a5();R4();(function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.LargeList=21]="LargeList",t[t.BinaryView=23]="BinaryView",t[t.Utf8View=24]="Utf8View",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth",t[t.DurationSecond=-27]="DurationSecond",t[t.DurationMillisecond=-28]="DurationMillisecond",t[t.DurationMicrosecond=-29]="DurationMicrosecond",t[t.DurationNanosecond=-30]="DurationNanosecond",t[t.IntervalMonthDayNano=-31]="IntervalMonthDayNano"})(fe||(fe={}));(function(t){t[t.OFFSET=0]="OFFSET",t[t.DATA=1]="DATA",t[t.VALIDITY=2]="VALIDITY",t[t.TYPE=3]="TYPE"})(zo||(zo={}))});var L5={};vc(L5,{valueToString:()=>Ac});function Ac(t){if(t===null)return"null";if(t===void 0)return"undefined";switch(typeof t){case"number":return`${t}`;case"bigint":return`${t}`;case"string":return`"${t}"`}return typeof t[Symbol.toPrimitive]=="function"?t[Symbol.toPrimitive]("string"):ArrayBuffer.isView(t)?t instanceof BigInt64Array||t instanceof BigUint64Array?`[${[...t].map(e=>Ac(e))}]`:`[${t}]`:ArrayBuffer.isView(t)?`[${t}]`:JSON.stringify(t,(e,r)=>typeof r=="bigint"?`${r}`:r)}var hp=Dt(()=>{});function Mi(t){if(typeof t=="bigint"&&(tNumber.MAX_SAFE_INTEGER))throw new TypeError(`${t} is not safe to convert to a number.`);return Number(t)}function N5(t,e){return Mi(t/e)+Mi(t%e)/Mi(e)}var au=Dt(()=>{});var B5={};vc(B5,{BN:()=>Z2,bigNumToBigInt:()=>k7,bigNumToNumber:()=>R5,bigNumToString:()=>Kd,isArrowBigNumSymbol:()=>B7});function Tc(t,...e){return e.length===0?Object.setPrototypeOf(Fi(this.TypedArray,t),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(t,...e),this.constructor.prototype)}function Xd(...t){return Tc.apply(this,t)}function Jd(...t){return Tc.apply(this,t)}function pp(...t){return Tc.apply(this,t)}function R5(t,e){let{buffer:r,byteOffset:i,byteLength:s,signed:a}=t,d=new BigUint64Array(r,i,s/8),m=a&&d.at(-1)&BigInt(1)<0){let x=BigInt("1".padEnd(e+1,"0")),w=v/x,I=m?-(v%x):v%x,O=Mi(w),z=`${I}`.padStart(e,"0");return+`${m&&O===0?"-":""}${O}.${z}`}return Mi(v)}function Kd(t){if(t.byteLength===8)return`${new t.BigIntArray(t.buffer,t.byteOffset,1)[0]}`;if(!t.signed)return D5(t);let e=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2);if(new Int16Array([e.at(-1)])[0]>=0)return D5(t);e=e.slice();let i=1;for(let a=0;a{wo();au();B7=Symbol.for("isArrowBigNum");Tc.prototype[B7]=!0;Tc.prototype.toJSON=function(){return`"${Kd(this)}"`};Tc.prototype.valueOf=function(t){return R5(this,t)};Tc.prototype.toString=function(){return Kd(this)};Tc.prototype[Symbol.toPrimitive]=function(t="default"){switch(t){case"number":return R5(this);case"string":return Kd(this);case"default":return k7(this)}return Kd(this)};Object.setPrototypeOf(Xd.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Jd.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(pp.prototype,Object.create(Uint32Array.prototype));Object.assign(Xd.prototype,Tc.prototype,{constructor:Xd,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Jd.prototype,Tc.prototype,{constructor:Jd,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(pp.prototype,Tc.prototype,{constructor:pp,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});vS=BigInt(4294967296)*BigInt(4294967296),_S=vS-BigInt(1);Z2=class t{static new(e,r){switch(r){case!0:return new Xd(e);case!1:return new Jd(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case BigInt64Array:return new Xd(e)}return e.byteLength===16?new pp(e):new Jd(e)}static signed(e){return new Xd(e)}static unsigned(e){return new Jd(e)}static decimal(e){return new pp(e)}constructor(e,r){return t.new(e,r)}}});function Al(t){let e=t;switch(t.typeId){case fe.Decimal:return t.bitWidth/32;case fe.Interval:return e.unit===Ji.MONTH_DAY_NANO?4:1+e.unit;case fe.BinaryView:case fe.Utf8View:return 16;case fe.FixedSizeList:return e.listSize;case fe.FixedSizeBinary:return e.byteWidth;default:return 1}}var F7,M7,$7,P7,U7,V7,G7,j7,q7,H7,z7,W7,Y7,X7,J7,K7,Q7,Z7,eb,tb,rb,nb,ib,sb,ab,ob,Hr,Ao,ja,Gf,jf,l1,ou,qf,Hf,zf,Wf,X1,Qd,Yf,lu,Ic,Oi,Oc,vl,A1,Cc,_l,Lc,xl,mp,gp,T1,yp,bp,vp,_p,I1,xp,e3,Sp,Ep,J1,wp,Ap,Tp,O1,Ip,Op,Cp,Lp,C1,Sl,_s,L1,Np,Dp,Nc,El,wl,xS,Wo,vs=Dt(()=>{au();oa();ob=Symbol.for("apache-arrow/DataType"),Hr=class t{static isDataType(e){return e?.[ob]===!0}static isNull(e){return e?.typeId===fe.Null}static isInt(e){return e?.typeId===fe.Int}static isFloat(e){return e?.typeId===fe.Float}static isBinary(e){return e?.typeId===fe.Binary}static isBinaryView(e){return e?.typeId===fe.BinaryView}static isLargeBinary(e){return e?.typeId===fe.LargeBinary}static isUtf8(e){return e?.typeId===fe.Utf8}static isUtf8View(e){return e?.typeId===fe.Utf8View}static isLargeUtf8(e){return e?.typeId===fe.LargeUtf8}static isBool(e){return e?.typeId===fe.Bool}static isDecimal(e){return e?.typeId===fe.Decimal}static isDate(e){return e?.typeId===fe.Date}static isTime(e){return e?.typeId===fe.Time}static isTimestamp(e){return e?.typeId===fe.Timestamp}static isInterval(e){return e?.typeId===fe.Interval}static isDuration(e){return e?.typeId===fe.Duration}static isList(e){return e?.typeId===fe.List}static isLargeList(e){return e?.typeId===fe.LargeList}static isStruct(e){return e?.typeId===fe.Struct}static isUnion(e){return e?.typeId===fe.Union}static isFixedSizeBinary(e){return e?.typeId===fe.FixedSizeBinary}static isFixedSizeList(e){return e?.typeId===fe.FixedSizeList}static isMap(e){return e?.typeId===fe.Map}static isDictionary(e){return e?.typeId===fe.Dictionary}static isDenseUnion(e){return t.isUnion(e)&&e.mode===ns.Dense}static isSparseUnion(e){return t.isUnion(e)&&e.mode===ns.Sparse}constructor(e){this.typeId=e}};F7=Symbol.toStringTag;Hr[F7]=(t=>(t.children=null,t.ArrayType=Array,t.OffsetArrayType=Int32Array,t[ob]=!0,t[Symbol.toStringTag]="DataType"))(Hr.prototype);Ao=class extends Hr{constructor(){super(fe.Null)}toString(){return"Null"}};M7=Symbol.toStringTag;Ao[M7]=(t=>t[Symbol.toStringTag]="Null")(Ao.prototype);ja=class extends Hr{constructor(e,r){super(fe.Int),this.isSigned=e,this.bitWidth=r}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}};$7=Symbol.toStringTag;ja[$7]=(t=>(t.isSigned=null,t.bitWidth=null,t[Symbol.toStringTag]="Int"))(ja.prototype);Gf=class extends ja{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},jf=class extends ja{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},l1=class extends ja{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},ou=class extends ja{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},qf=class extends ja{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},Hf=class extends ja{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},zf=class extends ja{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},Wf=class extends ja{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(Gf.prototype,"ArrayType",{value:Int8Array});Object.defineProperty(jf.prototype,"ArrayType",{value:Int16Array});Object.defineProperty(l1.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(ou.prototype,"ArrayType",{value:BigInt64Array});Object.defineProperty(qf.prototype,"ArrayType",{value:Uint8Array});Object.defineProperty(Hf.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(zf.prototype,"ArrayType",{value:Uint32Array});Object.defineProperty(Wf.prototype,"ArrayType",{value:BigUint64Array});X1=class extends Hr{constructor(e){super(fe.Float),this.precision=e}get ArrayType(){switch(this.precision){case ds.HALF:return Uint16Array;case ds.SINGLE:return Float32Array;case ds.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};P7=Symbol.toStringTag;X1[P7]=(t=>(t.precision=null,t[Symbol.toStringTag]="Float"))(X1.prototype);Qd=class extends X1{constructor(){super(ds.HALF)}},Yf=class extends X1{constructor(){super(ds.SINGLE)}},lu=class extends X1{constructor(){super(ds.DOUBLE)}};Object.defineProperty(Qd.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(Yf.prototype,"ArrayType",{value:Float32Array});Object.defineProperty(lu.prototype,"ArrayType",{value:Float64Array});Ic=class extends Hr{constructor(){super(fe.Binary)}toString(){return"Binary"}};U7=Symbol.toStringTag;Ic[U7]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Binary"))(Ic.prototype);Oi=class extends Hr{constructor(){super(fe.BinaryView)}toString(){return"BinaryView"}};V7=Symbol.toStringTag;Oi.ELEMENT_WIDTH=16;Oi.INLINE_CAPACITY=12;Oi.LENGTH_OFFSET=0;Oi.INLINE_OFFSET=4;Oi.BUFFER_INDEX_OFFSET=8;Oi.BUFFER_OFFSET_OFFSET=12;Oi[V7]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="BinaryView"))(Oi.prototype);Oc=class extends Hr{constructor(){super(fe.LargeBinary)}toString(){return"LargeBinary"}};G7=Symbol.toStringTag;Oc[G7]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeBinary"))(Oc.prototype);vl=class extends Hr{constructor(){super(fe.Utf8)}toString(){return"Utf8"}};j7=Symbol.toStringTag;vl[j7]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Utf8"))(vl.prototype);A1=class extends Hr{constructor(){super(fe.Utf8View)}toString(){return"Utf8View"}};q7=Symbol.toStringTag;A1.ELEMENT_WIDTH=Oi.ELEMENT_WIDTH;A1.INLINE_CAPACITY=Oi.INLINE_CAPACITY;A1[q7]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Utf8View"))(A1.prototype);Cc=class extends Hr{constructor(){super(fe.LargeUtf8)}toString(){return"LargeUtf8"}};H7=Symbol.toStringTag;Cc[H7]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeUtf8"))(Cc.prototype);_l=class extends Hr{constructor(){super(fe.Bool)}toString(){return"Bool"}};z7=Symbol.toStringTag;_l[z7]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Bool"))(_l.prototype);Lc=class extends Hr{constructor(e,r,i=128){super(fe.Decimal),this.scale=e,this.precision=r,this.bitWidth=i}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};W7=Symbol.toStringTag;Lc[W7]=(t=>(t.scale=null,t.precision=null,t.ArrayType=Uint32Array,t[Symbol.toStringTag]="Decimal"))(Lc.prototype);xl=class extends Hr{constructor(e){super(fe.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${Es[this.unit]}>`}get ArrayType(){return this.unit===Es.DAY?Int32Array:BigInt64Array}};Y7=Symbol.toStringTag;xl[Y7]=(t=>(t.unit=null,t[Symbol.toStringTag]="Date"))(xl.prototype);mp=class extends xl{constructor(){super(Es.DAY)}},gp=class extends xl{constructor(){super(Es.MILLISECOND)}},T1=class extends Hr{constructor(e,r){super(fe.Time),this.unit=e,this.bitWidth=r}toString(){return`Time${this.bitWidth}<${cn[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};X7=Symbol.toStringTag;T1[X7]=(t=>(t.unit=null,t.bitWidth=null,t[Symbol.toStringTag]="Time"))(T1.prototype);yp=class extends T1{constructor(){super(cn.SECOND,32)}},bp=class extends T1{constructor(){super(cn.MILLISECOND,32)}},vp=class extends T1{constructor(){super(cn.MICROSECOND,64)}},_p=class extends T1{constructor(){super(cn.NANOSECOND,64)}},I1=class extends Hr{constructor(e,r){super(fe.Timestamp),this.unit=e,this.timezone=r}toString(){return`Timestamp<${cn[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};J7=Symbol.toStringTag;I1[J7]=(t=>(t.unit=null,t.timezone=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Timestamp"))(I1.prototype);xp=class extends I1{constructor(e){super(cn.SECOND,e)}},e3=class extends I1{constructor(e){super(cn.MILLISECOND,e)}},Sp=class extends I1{constructor(e){super(cn.MICROSECOND,e)}},Ep=class extends I1{constructor(e){super(cn.NANOSECOND,e)}},J1=class extends Hr{constructor(e){super(fe.Interval),this.unit=e}toString(){return`Interval<${Ji[this.unit]}>`}};K7=Symbol.toStringTag;J1[K7]=(t=>(t.unit=null,t.ArrayType=Int32Array,t[Symbol.toStringTag]="Interval"))(J1.prototype);wp=class extends J1{constructor(){super(Ji.DAY_TIME)}},Ap=class extends J1{constructor(){super(Ji.YEAR_MONTH)}},Tp=class extends J1{constructor(){super(Ji.MONTH_DAY_NANO)}},O1=class extends Hr{constructor(e){super(fe.Duration),this.unit=e}toString(){return`Duration<${cn[this.unit]}>`}};Q7=Symbol.toStringTag;O1[Q7]=(t=>(t.unit=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Duration"))(O1.prototype);Ip=class extends O1{constructor(){super(cn.SECOND)}},Op=class extends O1{constructor(){super(cn.MILLISECOND)}},Cp=class extends O1{constructor(){super(cn.MICROSECOND)}},Lp=class extends O1{constructor(){super(cn.NANOSECOND)}},C1=class extends Hr{constructor(e){super(fe.List),this.children=[e]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};Z7=Symbol.toStringTag;C1[Z7]=(t=>(t.children=null,t[Symbol.toStringTag]="List"))(C1.prototype);Sl=class extends Hr{constructor(e){super(fe.LargeList),this.children=[e]}toString(){return`LargeList<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};eb=Symbol.toStringTag;Sl[eb]=(t=>(t.children=null,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeList"))(Sl.prototype);_s=class extends Hr{constructor(e){super(fe.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};tb=Symbol.toStringTag;_s[tb]=(t=>(t.children=null,t[Symbol.toStringTag]="Struct"))(_s.prototype);L1=class extends Hr{constructor(e,r,i){super(fe.Union),this.mode=e,this.children=i,this.typeIds=r=Int32Array.from(r),this.typeIdToChildIndex=r.reduce((s,a,d)=>(s[a]=d)&&s||s,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}};rb=Symbol.toStringTag;L1[rb]=(t=>(t.mode=null,t.typeIds=null,t.children=null,t.typeIdToChildIndex=null,t.ArrayType=Int8Array,t[Symbol.toStringTag]="Union"))(L1.prototype);Np=class extends L1{constructor(e,r){super(ns.Dense,e,r)}},Dp=class extends L1{constructor(e,r){super(ns.Sparse,e,r)}},Nc=class extends Hr{constructor(e){super(fe.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};nb=Symbol.toStringTag;Nc[nb]=(t=>(t.byteWidth=null,t.ArrayType=Uint8Array,t[Symbol.toStringTag]="FixedSizeBinary"))(Nc.prototype);El=class extends Hr{constructor(e,r){super(fe.FixedSizeList),this.listSize=e,this.children=[r]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}};ib=Symbol.toStringTag;El[ib]=(t=>(t.children=null,t.listSize=null,t[Symbol.toStringTag]="FixedSizeList"))(El.prototype);wl=class extends Hr{constructor(e,r=!1){var i,s,a;if(super(fe.Map),this.children=[e],this.keysSorted=r,e&&(e.name="entries",!((i=e?.type)===null||i===void 0)&&i.children)){let d=(s=e?.type)===null||s===void 0?void 0:s.children[0];d&&(d.name="key");let m=(a=e?.type)===null||a===void 0?void 0:a.children[1];m&&(m.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};sb=Symbol.toStringTag;wl[sb]=(t=>(t.children=null,t.keysSorted=null,t[Symbol.toStringTag]="Map_"))(wl.prototype);xS=(t=>()=>++t)(-1),Wo=class extends Hr{constructor(e,r,i,s){super(fe.Dictionary),this.indices=r,this.dictionary=e,this.isOrdered=s||!1,this.id=i==null?xS():Mi(i)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};ab=Symbol.toStringTag;Wo[ab]=(t=>(t.id=null,t.indices=null,t.isOrdered=null,t.dictionary=null,t[Symbol.toStringTag]="Dictionary"))(Wo.prototype)});function SS(t,e,r=!0){return typeof e=="number"?Zd(t,e,r):typeof e=="string"&&e in fe?Zd(t,fe[e],r):e&&e instanceof Hr?Zd(t,cb(e),r):e?.type&&e.type instanceof Hr?Zd(t,cb(e.type),r):Zd(t,fe.NONE,r)}function Zd(t,e,r=!0){let i=null;switch(e){case fe.Null:i=t.visitNull;break;case fe.Bool:i=t.visitBool;break;case fe.Int:i=t.visitInt;break;case fe.Int8:i=t.visitInt8||t.visitInt;break;case fe.Int16:i=t.visitInt16||t.visitInt;break;case fe.Int32:i=t.visitInt32||t.visitInt;break;case fe.Int64:i=t.visitInt64||t.visitInt;break;case fe.Uint8:i=t.visitUint8||t.visitInt;break;case fe.Uint16:i=t.visitUint16||t.visitInt;break;case fe.Uint32:i=t.visitUint32||t.visitInt;break;case fe.Uint64:i=t.visitUint64||t.visitInt;break;case fe.Float:i=t.visitFloat;break;case fe.Float16:i=t.visitFloat16||t.visitFloat;break;case fe.Float32:i=t.visitFloat32||t.visitFloat;break;case fe.Float64:i=t.visitFloat64||t.visitFloat;break;case fe.Utf8:i=t.visitUtf8;break;case fe.LargeUtf8:i=t.visitLargeUtf8;break;case fe.Utf8View:i=t.visitUtf8View||t.visitUtf8;break;case fe.Binary:i=t.visitBinary;break;case fe.LargeBinary:i=t.visitLargeBinary;break;case fe.BinaryView:i=t.visitBinaryView||t.visitBinary;break;case fe.FixedSizeBinary:i=t.visitFixedSizeBinary;break;case fe.Date:i=t.visitDate;break;case fe.DateDay:i=t.visitDateDay||t.visitDate;break;case fe.DateMillisecond:i=t.visitDateMillisecond||t.visitDate;break;case fe.Timestamp:i=t.visitTimestamp;break;case fe.TimestampSecond:i=t.visitTimestampSecond||t.visitTimestamp;break;case fe.TimestampMillisecond:i=t.visitTimestampMillisecond||t.visitTimestamp;break;case fe.TimestampMicrosecond:i=t.visitTimestampMicrosecond||t.visitTimestamp;break;case fe.TimestampNanosecond:i=t.visitTimestampNanosecond||t.visitTimestamp;break;case fe.Time:i=t.visitTime;break;case fe.TimeSecond:i=t.visitTimeSecond||t.visitTime;break;case fe.TimeMillisecond:i=t.visitTimeMillisecond||t.visitTime;break;case fe.TimeMicrosecond:i=t.visitTimeMicrosecond||t.visitTime;break;case fe.TimeNanosecond:i=t.visitTimeNanosecond||t.visitTime;break;case fe.Decimal:i=t.visitDecimal;break;case fe.List:i=t.visitList;break;case fe.LargeList:i=t.visitLargeList;break;case fe.Struct:i=t.visitStruct;break;case fe.Union:i=t.visitUnion;break;case fe.DenseUnion:i=t.visitDenseUnion||t.visitUnion;break;case fe.SparseUnion:i=t.visitSparseUnion||t.visitUnion;break;case fe.Dictionary:i=t.visitDictionary;break;case fe.Interval:i=t.visitInterval;break;case fe.IntervalDayTime:i=t.visitIntervalDayTime||t.visitInterval;break;case fe.IntervalYearMonth:i=t.visitIntervalYearMonth||t.visitInterval;break;case fe.IntervalMonthDayNano:i=t.visitIntervalMonthDayNano||t.visitInterval;break;case fe.Duration:i=t.visitDuration;break;case fe.DurationSecond:i=t.visitDurationSecond||t.visitDuration;break;case fe.DurationMillisecond:i=t.visitDurationMillisecond||t.visitDuration;break;case fe.DurationMicrosecond:i=t.visitDurationMicrosecond||t.visitDuration;break;case fe.DurationNanosecond:i=t.visitDurationNanosecond||t.visitDuration;break;case fe.FixedSizeList:i=t.visitFixedSizeList;break;case fe.Map:i=t.visitMap;break}if(typeof i=="function")return i;if(!r)return()=>null;throw new Error(`Unrecognized type '${fe[e]}'`)}function cb(t){switch(t.typeId){case fe.Null:return fe.Null;case fe.Int:{let{bitWidth:e,isSigned:r}=t;switch(e){case 8:return r?fe.Int8:fe.Uint8;case 16:return r?fe.Int16:fe.Uint16;case 32:return r?fe.Int32:fe.Uint32;case 64:return r?fe.Int64:fe.Uint64}return fe.Int}case fe.Float:switch(t.precision){case ds.HALF:return fe.Float16;case ds.SINGLE:return fe.Float32;case ds.DOUBLE:return fe.Float64}return fe.Float;case fe.Binary:return fe.Binary;case fe.LargeBinary:return fe.LargeBinary;case fe.BinaryView:return fe.BinaryView;case fe.Utf8:return fe.Utf8;case fe.LargeUtf8:return fe.LargeUtf8;case fe.Utf8View:return fe.Utf8View;case fe.Bool:return fe.Bool;case fe.Decimal:return fe.Decimal;case fe.Time:switch(t.unit){case cn.SECOND:return fe.TimeSecond;case cn.MILLISECOND:return fe.TimeMillisecond;case cn.MICROSECOND:return fe.TimeMicrosecond;case cn.NANOSECOND:return fe.TimeNanosecond}return fe.Time;case fe.Timestamp:switch(t.unit){case cn.SECOND:return fe.TimestampSecond;case cn.MILLISECOND:return fe.TimestampMillisecond;case cn.MICROSECOND:return fe.TimestampMicrosecond;case cn.NANOSECOND:return fe.TimestampNanosecond}return fe.Timestamp;case fe.Date:switch(t.unit){case Es.DAY:return fe.DateDay;case Es.MILLISECOND:return fe.DateMillisecond}return fe.Date;case fe.Interval:switch(t.unit){case Ji.DAY_TIME:return fe.IntervalDayTime;case Ji.YEAR_MONTH:return fe.IntervalYearMonth;case Ji.MONTH_DAY_NANO:return fe.IntervalMonthDayNano}return fe.Interval;case fe.Duration:switch(t.unit){case cn.SECOND:return fe.DurationSecond;case cn.MILLISECOND:return fe.DurationMillisecond;case cn.MICROSECOND:return fe.DurationMicrosecond;case cn.NANOSECOND:return fe.DurationNanosecond}return fe.Duration;case fe.Map:return fe.Map;case fe.List:return fe.List;case fe.LargeList:return fe.LargeList;case fe.Struct:return fe.Struct;case fe.Union:switch(t.mode){case ns.Dense:return fe.DenseUnion;case ns.Sparse:return fe.SparseUnion}return fe.Union;case fe.FixedSizeBinary:return fe.FixedSizeBinary;case fe.FixedSizeList:return fe.FixedSizeList;case fe.Dictionary:return fe.Dictionary}throw new Error(`Unrecognized type '${fe[t.typeId]}'`)}var jn,K1=Dt(()=>{oa();vs();jn=class{visitMany(e,...r){return e.map((i,s)=>this.visit(i,...r.map(a=>a[s])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,r=!0){return SS(this,e,r)}getVisitFnByTypeId(e,r=!0){return Zd(this,e,r)}visitNull(e,...r){return null}visitBool(e,...r){return null}visitInt(e,...r){return null}visitFloat(e,...r){return null}visitUtf8(e,...r){return null}visitLargeUtf8(e,...r){return null}visitUtf8View(e,...r){return null}visitBinary(e,...r){return null}visitLargeBinary(e,...r){return null}visitBinaryView(e,...r){return null}visitFixedSizeBinary(e,...r){return null}visitDate(e,...r){return null}visitTimestamp(e,...r){return null}visitTime(e,...r){return null}visitDecimal(e,...r){return null}visitList(e,...r){return null}visitLargeList(e,...r){return null}visitStruct(e,...r){return null}visitUnion(e,...r){return null}visitDictionary(e,...r){return null}visitInterval(e,...r){return null}visitDuration(e,...r){return null}visitFixedSizeList(e,...r){return null}visitMap(e,...r){return null}};jn.prototype.visitInt8=null;jn.prototype.visitInt16=null;jn.prototype.visitInt32=null;jn.prototype.visitInt64=null;jn.prototype.visitUint8=null;jn.prototype.visitUint16=null;jn.prototype.visitUint32=null;jn.prototype.visitUint64=null;jn.prototype.visitFloat16=null;jn.prototype.visitFloat32=null;jn.prototype.visitFloat64=null;jn.prototype.visitDateDay=null;jn.prototype.visitDateMillisecond=null;jn.prototype.visitTimestampSecond=null;jn.prototype.visitTimestampMillisecond=null;jn.prototype.visitTimestampMicrosecond=null;jn.prototype.visitTimestampNanosecond=null;jn.prototype.visitTimeSecond=null;jn.prototype.visitTimeMillisecond=null;jn.prototype.visitTimeMicrosecond=null;jn.prototype.visitTimeNanosecond=null;jn.prototype.visitDenseUnion=null;jn.prototype.visitSparseUnion=null;jn.prototype.visitIntervalDayTime=null;jn.prototype.visitIntervalYearMonth=null;jn.prototype.visitIntervalMonthDayNano=null;jn.prototype.visitDuration=null;jn.prototype.visitDurationSecond=null;jn.prototype.visitDurationMillisecond=null;jn.prototype.visitDurationMicrosecond=null;jn.prototype.visitDurationNanosecond=null});var k5={};vc(k5,{float64ToUint16:()=>Rp,uint16ToFloat64:()=>k4});function k4(t){let e=(t&31744)>>10,r=(t&1023)/1024,i=Math.pow(-1,(t&32768)>>15);switch(e){case 31:return i*(r?Number.NaN:1/0);case 0:return i*(r?6103515625e-14*r:0)}return i*Math.pow(2,e-15)*(1+r)}function Rp(t){if(t!==t)return 32256;ub[0]=t;let e=(eh[1]&2147483648)>>16&65535,r=eh[1]&2146435072,i=0;return r>=1089470464?eh[0]>0?r=31744:(r=(r&2080374784)>>16,i=(eh[1]&1048575)>>10):r<=1056964608?(i=1048576+(eh[1]&1048575),i=1048576+(i<<(r>>20)-998)>>21,r=0):(r=r-1056964608>>10,i=(eh[1]&1048575)+512>>10),e|r|i&65535}var ub,eh,Bp=Dt(()=>{ub=new Float64Array(1),eh=new Uint32Array(ub.buffer)});function ci(t){return(e,r,i)=>{if(e.setValid(r,i!=null))return t(e,r,i)}}var ti,ES,fb,wS,zu,F5,db,AS,F4,M4,M5,hb,TS,pb,IS,mb,OS,$5,$4,P4,U4,V4,P5,G4,j4,q4,H4,U5,V5,gb,CS,LS,NS,DS,RS,BS,kS,yb,bb,FS,G5,z4,W4,Y4,X4,J4,K4,Q4,j5,MS,Yo,Tl=Dt(()=>{c1();K1();au();Vu();Bp();oa();vs();ti=class extends jn{};ES=(t,e,r)=>{t[e]=Math.floor(r/864e5)},fb=(t,e,r,i)=>{if(r+1{let s=t+r;i?e[s>>3]|=1<>3]&=~(1<{t[e]=r},F5=({values:t},e,r)=>{t[e]=r},db=({values:t},e,r)=>{t[e]=Rp(r)},AS=(t,e,r)=>{switch(t.type.precision){case ds.HALF:return db(t,e,r);case ds.SINGLE:case ds.DOUBLE:return F5(t,e,r)}},F4=({values:t},e,r)=>{ES(t,e,r.valueOf())},M4=({values:t},e,r)=>{t[e]=BigInt(r)},M5=({stride:t,values:e},r,i)=>{e.set(i.subarray(0,t),t*r)},hb=({values:t,valueOffsets:e},r,i)=>fb(t,e,r,i),TS=t=>{let e=t.variadicBuffers;return(!Array.isArray(e)||Object.isFrozen(e))&&(e=Array.from(e),t.variadicBuffers=e),e},pb=(t,e,r)=>{var i,s,a,d;let m=t.values;if(!m)throw new Error("BinaryView data is missing view buffer");let v=Oi.ELEMENT_WIDTH,_=e*v,x=_+v;if(_<0||x>m.length)throw new RangeError(`BinaryView index ${e} out of bounds`);m.fill(0,_,x);let w=new DataView(m.buffer,m.byteOffset+_,v),I=r.length;if(w.setInt32(Oi.LENGTH_OFFSET,I,!0),I<=Oi.INLINE_CAPACITY){m.set(r,_+Oi.INLINE_OFFSET);return}let O=((i=r[0])!==null&&i!==void 0?i:0)|((s=r[1])!==null&&s!==void 0?s:0)<<8|((a=r[2])!==null&&a!==void 0?a:0)<<16|((d=r[3])!==null&&d!==void 0?d:0)<<24;w.setUint32(Oi.INLINE_OFFSET,O>>>0,!0);let z=TS(t),J=r.slice(),Q=z.push(J)-1;w.setInt32(Oi.BUFFER_INDEX_OFFSET,Q,!0),w.setInt32(Oi.BUFFER_OFFSET_OFFSET,0,!0)},IS=(t,e,r)=>{let i=r instanceof Uint8Array?r:new Uint8Array(r);pb(t,e,i)},mb=({values:t,valueOffsets:e},r,i)=>fb(t,e,r,gl(i)),OS=(t,e,r)=>{let i=gl(r);pb(t,e,i)},$5=(t,e,r)=>{t.type.unit===Es.DAY?F4(t,e,r):M4(t,e,r)},$4=({values:t},e,r)=>{t[e]=BigInt(r/1e3)},P4=({values:t},e,r)=>{t[e]=BigInt(r)},U4=({values:t},e,r)=>{t[e]=BigInt(r*1e3)},V4=({values:t},e,r)=>{t[e]=BigInt(r*1e6)},P5=(t,e,r)=>{switch(t.type.unit){case cn.SECOND:return $4(t,e,r);case cn.MILLISECOND:return P4(t,e,r);case cn.MICROSECOND:return U4(t,e,r);case cn.NANOSECOND:return V4(t,e,r)}},G4=({values:t},e,r)=>{t[e]=r},j4=({values:t},e,r)=>{t[e]=r},q4=({values:t},e,r)=>{t[e]=r},H4=({values:t},e,r)=>{t[e]=r},U5=(t,e,r)=>{switch(t.type.unit){case cn.SECOND:return G4(t,e,r);case cn.MILLISECOND:return j4(t,e,r);case cn.MICROSECOND:return q4(t,e,r);case cn.NANOSECOND:return H4(t,e,r)}},V5=({values:t,stride:e},r,i)=>{t.set(i.subarray(0,e),e*r)},gb=(t,e,r)=>{let i=t.children[0],s=t.valueOffsets,a=Yo.getVisitFn(i),d=Mi(s[e]),m=Mi(s[e+1]);if(Array.isArray(r))for(let v=-1,_=d;_{let i=t.children[0],{valueOffsets:s}=t,a=Yo.getVisitFn(i),{[e]:d,[e+1]:m}=s,v=r instanceof Map?r.entries():Object.entries(r);for(let _ of v)if(a(i,d,_),++d>=m)break},LS=(t,e)=>(r,i,s,a)=>i&&r(i,t,e[a]),NS=(t,e)=>(r,i,s,a)=>i&&r(i,t,e.get(a)),DS=(t,e)=>(r,i,s,a)=>i&&r(i,t,e.get(s.name)),RS=(t,e)=>(r,i,s,a)=>i&&r(i,t,e[s.name]),BS=(t,e,r)=>{let i=t.type.children.map(a=>Yo.getVisitFn(a.type)),s=r instanceof Map?DS(e,r):r instanceof Tn?NS(e,r):Array.isArray(r)?LS(e,r):RS(e,r);t.type.children.forEach((a,d)=>s(i[d],t.children[d],a,d))},kS=(t,e,r)=>{t.type.mode===ns.Dense?yb(t,e,r):bb(t,e,r)},yb=(t,e,r)=>{let i=t.type.typeIdToChildIndex[t.typeIds[e]],s=t.children[i];Yo.visit(s,t.valueOffsets[e],r)},bb=(t,e,r)=>{let i=t.type.typeIdToChildIndex[t.typeIds[e]],s=t.children[i];Yo.visit(s,e,r)},FS=(t,e,r)=>{var i;(i=t.dictionary)===null||i===void 0||i.set(t.values[e],r)},G5=(t,e,r)=>{switch(t.type.unit){case Ji.YEAR_MONTH:return W4(t,e,r);case Ji.DAY_TIME:return z4(t,e,r);case Ji.MONTH_DAY_NANO:return Y4(t,e,r)}},z4=({values:t},e,r)=>{t.set(r.subarray(0,2),2*e)},W4=({values:t},e,r)=>{t[e]=r[0]*12+r[1]%12},Y4=({values:t,stride:e},r,i)=>{t.set(i.subarray(0,e),e*r)},X4=({values:t},e,r)=>{t[e]=r},J4=({values:t},e,r)=>{t[e]=r},K4=({values:t},e,r)=>{t[e]=r},Q4=({values:t},e,r)=>{t[e]=r},j5=(t,e,r)=>{switch(t.type.unit){case cn.SECOND:return X4(t,e,r);case cn.MILLISECOND:return J4(t,e,r);case cn.MICROSECOND:return K4(t,e,r);case cn.NANOSECOND:return Q4(t,e,r)}},MS=(t,e,r)=>{let{stride:i}=t,s=t.children[0],a=Yo.getVisitFn(s);if(Array.isArray(r))for(let d=-1,m=e*i;++d{hp();t3();Tl();Dc=Symbol.for("parent"),th=Symbol.for("rowIndex"),cu=class{constructor(e,r){return this[Dc]=e,this[th]=r,new Proxy(this,$S)}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[th],r=this[Dc],i=r.type.children,s={};for(let a=-1,d=i.length;++a`${Ac(e)}: ${Ac(r)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new q5(this[Dc],this[th])}},q5=class{constructor(e,r){this.childIndex=0,this.children=e.children,this.rowIndex=r,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){let e=this.childIndex;return er.name)}has(e,r){return e[Dc].type.children.some(i=>i.name===r)}getOwnPropertyDescriptor(e,r){if(e[Dc].type.children.some(i=>i.name===r))return{writable:!0,enumerable:!0,configurable:!0}}get(e,r){if(Reflect.has(e,r))return e[r];let i=e[Dc].type.children.findIndex(s=>s.name===r);if(i!==-1){let s=ro.visit(e[Dc].children[i],e[th]);return Reflect.set(e,r,s),s}}set(e,r,i){let s=e[Dc].type.children.findIndex(a=>a.name===r);return s!==-1?(Yo.visit(e[Dc].children[s],e[th],i),Reflect.set(e,r,i)):Reflect.has(e,r)||typeof r=="symbol"?Reflect.set(e,r,i):!1}},$S=new H5});function ii(t){return(e,r)=>e.getValid(r)?t(e,r):null}var Kn,PS,rh,US,VS,vb,GS,_b,xb,Xf,jS,Sb,qS,Eb,wb,HS,Ab,zS,WS,YS,XS,Tb,Ib,Ob,Cb,JS,Lb,Nb,Db,Rb,KS,QS,Bb,ZS,eE,tE,kb,Fb,rE,nE,Mb,$b,Pb,Ub,Vb,Gb,jb,iE,sE,ro,t3=Dt(()=>{B4();c1();K1();kp();Z4();au();Vu();Bp();oa();Kn=class extends jn{};PS=(t,e)=>864e5*t[e],rh=16,US=12,VS=(t,e)=>null,vb=(t,e,r)=>{if(r+1>=e.length)return null;let i=Mi(e[r]),s=Mi(e[r+1]);return t.subarray(i,s)},GS=({offset:t,values:e},r)=>{let i=t+r;return(e[i>>3]&1<PS(t,e),xb=({values:t},e)=>Mi(t[e]),Xf=({stride:t,values:e},r)=>e[t*r],jS=({stride:t,values:e},r)=>k4(e[t*r]),Sb=({values:t},e)=>t[e],qS=({stride:t,values:e},r)=>e.subarray(t*r,t*(r+1)),Eb=({values:t,valueOffsets:e},r)=>vb(t,e,r),wb=(t,e)=>{var r;let i=t.values;if(!i)throw new Error("BinaryView data is missing view buffer");let s=e*rh,a=s+rh;if(s<0||a>i.length)throw new Error(`BinaryView data buffer is too short: expected ${rh} bytes, got ${Math.max(0,i.length-s)}`);let d=i.subarray(s,a);if(d.lengthwb(t,e),Ab=({values:t,valueOffsets:e},r)=>{let i=vb(t,e,r);return i!==null?jd(i):null},zS=(t,e)=>{let r=wb(t,e);return jd(r)},WS=({values:t},e)=>t[e],YS=({type:t,values:e},r)=>t.precision!==ds.HALF?e[r]:k4(e[r]),XS=(t,e)=>t.type.unit===Es.DAY?_b(t,e):xb(t,e),Tb=({values:t},e)=>1e3*Mi(t[e]),Ib=({values:t},e)=>Mi(t[e]),Ob=({values:t},e)=>N5(t[e],BigInt(1e3)),Cb=({values:t},e)=>N5(t[e],BigInt(1e6)),JS=(t,e)=>{switch(t.type.unit){case cn.SECOND:return Tb(t,e);case cn.MILLISECOND:return Ib(t,e);case cn.MICROSECOND:return Ob(t,e);case cn.NANOSECOND:return Cb(t,e)}},Lb=({values:t},e)=>t[e],Nb=({values:t},e)=>t[e],Db=({values:t},e)=>t[e],Rb=({values:t},e)=>t[e],KS=(t,e)=>{switch(t.type.unit){case cn.SECOND:return Lb(t,e);case cn.MILLISECOND:return Nb(t,e);case cn.MICROSECOND:return Db(t,e);case cn.NANOSECOND:return Rb(t,e)}},QS=({values:t,stride:e},r)=>Z2.decimal(t.subarray(e*r,e*(r+1))),Bb=(t,e)=>{let{valueOffsets:r,stride:i,children:s}=t,a=Mi(r[e*i]),d=Mi(r[e*i+1]),v=s[0].slice(a,d-a);return new Tn([v])},ZS=(t,e)=>{let{valueOffsets:r,children:i}=t,{[e]:s,[e+1]:a}=r,d=i[0];return new Wl(d.slice(s,a-s))},eE=(t,e)=>new cu(t,e),tE=(t,e)=>t.type.mode===ns.Dense?kb(t,e):Fb(t,e),kb=(t,e)=>{let r=t.type.typeIdToChildIndex[t.typeIds[e]],i=t.children[r];return ro.visit(i,t.valueOffsets[e])},Fb=(t,e)=>{let r=t.type.typeIdToChildIndex[t.typeIds[e]],i=t.children[r];return ro.visit(i,e)},rE=(t,e)=>{var r;return(r=t.dictionary)===null||r===void 0?void 0:r.get(t.values[e])},nE=(t,e)=>t.type.unit===Ji.MONTH_DAY_NANO?Pb(t,e):t.type.unit===Ji.DAY_TIME?Mb(t,e):$b(t,e),Mb=({values:t},e)=>t.subarray(2*e,2*(e+1)),$b=({values:t},e)=>{let r=t[e],i=new Int32Array(2);return i[0]=Math.trunc(r/12),i[1]=Math.trunc(r%12),i},Pb=({values:t},e)=>t.subarray(4*e,4*(e+1)),Ub=({values:t},e)=>t[e],Vb=({values:t},e)=>t[e],Gb=({values:t},e)=>t[e],jb=({values:t},e)=>t[e],iE=(t,e)=>{switch(t.type.unit){case cn.SECOND:return Ub(t,e);case cn.MILLISECOND:return Vb(t,e);case cn.MICROSECOND:return Gb(t,e);case cn.NANOSECOND:return jb(t,e)}},sE=(t,e)=>{let{stride:r,children:i}=t,a=i[0].slice(e*r,r);return new Tn([a])};Kn.prototype.visitNull=ii(VS);Kn.prototype.visitBool=ii(GS);Kn.prototype.visitInt=ii(WS);Kn.prototype.visitInt8=ii(Xf);Kn.prototype.visitInt16=ii(Xf);Kn.prototype.visitInt32=ii(Xf);Kn.prototype.visitInt64=ii(Sb);Kn.prototype.visitUint8=ii(Xf);Kn.prototype.visitUint16=ii(Xf);Kn.prototype.visitUint32=ii(Xf);Kn.prototype.visitUint64=ii(Sb);Kn.prototype.visitFloat=ii(YS);Kn.prototype.visitFloat16=ii(jS);Kn.prototype.visitFloat32=ii(Xf);Kn.prototype.visitFloat64=ii(Xf);Kn.prototype.visitUtf8=ii(Ab);Kn.prototype.visitLargeUtf8=ii(Ab);Kn.prototype.visitUtf8View=ii(zS);Kn.prototype.visitBinary=ii(Eb);Kn.prototype.visitLargeBinary=ii(Eb);Kn.prototype.visitBinaryView=ii(HS);Kn.prototype.visitFixedSizeBinary=ii(qS);Kn.prototype.visitDate=ii(XS);Kn.prototype.visitDateDay=ii(_b);Kn.prototype.visitDateMillisecond=ii(xb);Kn.prototype.visitTimestamp=ii(JS);Kn.prototype.visitTimestampSecond=ii(Tb);Kn.prototype.visitTimestampMillisecond=ii(Ib);Kn.prototype.visitTimestampMicrosecond=ii(Ob);Kn.prototype.visitTimestampNanosecond=ii(Cb);Kn.prototype.visitTime=ii(KS);Kn.prototype.visitTimeSecond=ii(Lb);Kn.prototype.visitTimeMillisecond=ii(Nb);Kn.prototype.visitTimeMicrosecond=ii(Db);Kn.prototype.visitTimeNanosecond=ii(Rb);Kn.prototype.visitDecimal=ii(QS);Kn.prototype.visitList=ii(Bb);Kn.prototype.visitLargeList=ii(Bb);Kn.prototype.visitStruct=ii(eE);Kn.prototype.visitUnion=ii(tE);Kn.prototype.visitDenseUnion=ii(kb);Kn.prototype.visitSparseUnion=ii(Fb);Kn.prototype.visitDictionary=ii(rE);Kn.prototype.visitInterval=ii(nE);Kn.prototype.visitIntervalDayTime=ii(Mb);Kn.prototype.visitIntervalYearMonth=ii($b);Kn.prototype.visitIntervalMonthDayNano=ii(Pb);Kn.prototype.visitDuration=ii(iE);Kn.prototype.visitDurationSecond=ii(Ub);Kn.prototype.visitDurationMillisecond=ii(Vb);Kn.prototype.visitDurationMicrosecond=ii(Gb);Kn.prototype.visitDurationNanosecond=ii(jb);Kn.prototype.visitFixedSizeList=ii(sE);Kn.prototype.visitMap=ii(ZS);ro=new Kn});var Jf,ih,nh,z5,Wl,W5,Y5,kp=Dt(()=>{c1();hp();t3();Tl();Jf=Symbol.for("keys"),ih=Symbol.for("vals"),nh=Symbol.for("kKeysAsStrings"),z5=Symbol.for("_kKeysAsStrings"),Wl=class{constructor(e){return this[Jf]=new Tn([e.children[0]]).memoize(),this[ih]=e.children[1],new Proxy(this,new Y5)}get[nh](){return this[z5]||(this[z5]=Array.from(this[Jf].toArray(),String))}[Symbol.iterator](){return new W5(this[Jf],this[ih])}get size(){return this[Jf].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[Jf],r=this[ih],i={};for(let s=-1,a=e.length;++s`${Ac(e)}: ${Ac(r)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}},W5=class{constructor(e,r){this.keys=e,this.vals=r,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){let e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),ro.visit(this.vals,e)]})}},Y5=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[nh]}has(e,r){return e[nh].includes(r)}getOwnPropertyDescriptor(e,r){if(e[nh].indexOf(r)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,r){if(Reflect.has(e,r))return e[r];let i=e[nh].indexOf(r);if(i!==-1){let s=ro.visit(Reflect.get(e,ih),i);return Reflect.set(e,r,s),s}}set(e,r,i){let s=e[nh].indexOf(r);return s!==-1?(Yo.visit(Reflect.get(e,ih),s,i),Reflect.set(e,r,i)):Reflect.has(e,r)?Reflect.set(e,r,i):!1}};Object.defineProperties(Wl.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Jf]:{writable:!0,enumerable:!1,configurable:!1,value:null},[ih]:{writable:!0,enumerable:!1,configurable:!1,value:null},[z5]:{writable:!0,enumerable:!1,configurable:!1,value:null}})});var X5={};vc(X5,{clampRange:()=>Fp,createElementComparator:()=>Kf,wrapIndex:()=>r3});function Fp(t,e,r,i){let{length:s=0}=t,a=typeof e!="number"?0:e,d=typeof r!="number"?s:r;return a<0&&(a=(a%s+s)%s),d<0&&(d=(d%s+s)%s),ds&&(d=s),i?i(t,a,d):[a,d]}function Kf(t){if(typeof t!=="object"||t===null)return Hb(t)?Hb:r=>r===t;if(t instanceof Date){let r=t.valueOf();return i=>i instanceof Date?i.valueOf()===r:!1}return ArrayBuffer.isView(t)?r=>r?Z6(t,r):!1:t instanceof Map?oE(t):Array.isArray(t)?aE(t):t instanceof Tn?lE(t):cE(t,!0)}function aE(t){let e=[];for(let r=-1,i=t.length;++r!1;let i=[];for(let s=-1,a=r.length;++s{if(!r||typeof r!="object")return!1;switch(r.constructor){case Array:return uE(t,r);case Map:return zb(t,r,r.keys());case Wl:case cu:case Object:case void 0:return zb(t,r,e||Object.keys(r))}return r instanceof Tn?fE(t,r):!1}}function uE(t,e){let r=t.length;if(e.length!==r)return!1;for(let i=-1;++i{c1();kp();Z4();wo();r3=(t,e)=>t<0?e+t:t,Hb=t=>t!==t});var J5={};vc(J5,{BitIterator:()=>uu,getBit:()=>rm,getBool:()=>ah,packBools:()=>i3,popcnt_array:()=>Wb,popcnt_bit_range:()=>Mp,popcnt_uint32:()=>tm,setBool:()=>dE,truncateBitmap:()=>n3});function ah(t,e,r,i){return(r&1<>i}function dE(t,e,r){return r?!!(t[e>>3]|=1<>3]&=~(1<0||r.byteLength>3):i3(new uu(r,t,e,null,ah)).subarray(0,i)),s}return r}function i3(t){let e=[],r=0,i=0,s=0;for(let d of t)d&&(s|=1<0)&&(e[r++]=s);let a=new Uint8Array(e.length+7&-8);return a.set(e),a}function Mp(t,e,r){if(r-e<=0)return 0;if(r-e<8){let a=0;for(let d of new uu(t,e,r-e,t,rm))a+=d;return a}let i=r>>3<<3,s=e+(e%8===0?0:8-e%8);return Mp(t,e,s)+Mp(t,i,r)+Wb(t,s>>3,i-s>>3)}function Wb(t,e,r){let i=0,s=Math.trunc(e),a=new DataView(t.buffer,t.byteOffset,t.byteLength),d=r===void 0?t.byteLength:s+r;for(;d-s>=4;)i+=tm(a.getUint32(s)),s+=4;for(;d-s>=2;)i+=tm(a.getUint16(s)),s+=2;for(;d-s>=1;)i+=tm(a.getUint8(s)),s+=1;return i}function tm(t){let e=Math.trunc(t);return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}var uu,s3=Dt(()=>{uu=class{constructor(e,r,i,s,a){this.bytes=e,this.length=i,this.context=s,this.get=a,this.bit=r%8,this.byteIndex=r>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index{c1();oa();vs();s3();vs();K1();wo();hE=-1,Yb=Symbol.for("apache-arrow/Data"),Ti=class t{static isData(e){return e?.[Yb]===!0}get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){let{type:e}=this;return Hr.isSparseUnion(e)?this.children.some(r=>r.nullable):Hr.isDenseUnion(e)?this.children.some(r=>r.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let e=0,{valueOffsets:r,values:i,nullBitmap:s,typeIds:a}=this;return r&&(e+=r.byteLength),i&&(e+=i.byteLength),s&&(e+=s.byteLength),a&&(e+=a.byteLength),e+=this.variadicBuffers.reduce((d,m)=>{var v;return d+((v=m?.byteLength)!==null&&v!==void 0?v:0)},0),this.children.reduce((d,m)=>d+m.byteLength,e)}get nullCount(){if(Hr.isUnion(this.type))return this.children.reduce((i,s)=>i+s.nullCount,0);let e=this._nullCount,r;return e<=hE&&(r=this.nullBitmap)&&(this._nullCount=e=r.length===0?0:this.length-Mp(r,this.offset,this.offset+this.length)),e}constructor(e,r,i,s,a,d=[],m,v=[]){var _;this.type=e,this.children=d,this.dictionary=m,this.offset=Math.floor(Math.max(r||0,0)),this.length=Math.floor(Math.max(i||0,0)),this._nullCount=Math.floor(Math.max(s||0,-1));let x;a instanceof t?(this.stride=a.stride,this.values=a.values,this.typeIds=a.typeIds,this.nullBitmap=a.nullBitmap,this.valueOffsets=a.valueOffsets,this.variadicBuffers=a.variadicBuffers):(this.stride=Al(e),a&&((x=a[0])&&(this.valueOffsets=x),(x=a[1])&&(this.values=x),(x=a[2])&&(this.nullBitmap=x),(x=a[3])&&(this.typeIds=x)),this.variadicBuffers=v),(_=this.variadicBuffers)!==null&&_!==void 0||(this.variadicBuffers=[])}getValid(e){let{type:r}=this;if(Hr.isUnion(r)){let i=r,s=this.typeIds[e],a=i.typeIdToChildIndex[s],d=this.children[a],m=this.valueOffsets,v=i.mode===ns.Dense&&m?Number(m[e]):e;return d.getValid(v)}if(this.nullable&&this.nullCount>0){let i=this.offset+e;return(this.nullBitmap[i>>3]&1<>3;(!a||a.byteLength<=x)&&(a=new Uint8Array((d+m+63&-64)>>3).fill(255),this.nullCount>0?(a.set(n3(d,m,this.nullBitmap),0),Object.assign(this,{nullBitmap:a})):Object.assign(this,{nullBitmap:a,_nullCount:0}));let w=a[x];i=(w&_)!==0,a[x]=r?w|_:w&~_}return i!==!!r&&(this._nullCount=this.nullCount+(r?-1:1)),r}clone(e=this.type,r=this.offset,i=this.length,s=this._nullCount,a=this,d=this.children,m=this.variadicBuffers){return new t(e,r,i,s,a,d,this.dictionary,m)}slice(e,r){let{stride:i,typeId:s,children:a}=this,d=+(this._nullCount===0)-1,m=s===16?i:1,v=this._sliceBuffers(e,r,i,s);return this.clone(this.type,this.offset+e,r,d,v,a.length===0||this.valueOffsets?a:this._sliceChildren(a,m*e,m*r),this.variadicBuffers)}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===fe.Null)return this.clone(this.type,0,e,0,this.buffers,this.children,this.variadicBuffers);let{length:r,nullCount:i}=this,s=new Uint8Array((e+63&-64)>>3).fill(255,0,r>>3);s[r>>3]=(1<0&&s.set(n3(this.offset,r,this.nullBitmap),0);let a=this.buffers;return a[zo.VALIDITY]=s,this.clone(this.type,0,e,i+(e-r),a,this.children,this.variadicBuffers)}_sliceBuffers(e,r,i,s){let a,{buffers:d}=this;if((a=d[zo.TYPE])&&(d[zo.TYPE]=a.subarray(e,e+r)),Hr.isBinaryView(this.type)||Hr.isUtf8View(this.type)){let m=Oi.ELEMENT_WIDTH;(a=d[zo.DATA])&&(d[zo.DATA]=a.subarray(e*m,(e+r)*m))}else(a=d[zo.OFFSET])&&(d[zo.OFFSET]=a.subarray(e,e+r+1))||(a=d[zo.DATA])&&(d[zo.DATA]=s===6?a:a.subarray(i*e,i*(e+r)));return d}_sliceChildren(e,r,i){return e.map(s=>s.slice(r,i))}};Ti.prototype.children=Object.freeze([]);Ti.prototype[Yb]=!0;Object.defineProperty(Ti,Symbol.hasInstance,{value:function(e){return Function.prototype[Symbol.hasInstance].call(this,e)||this===Ti&&Ti.isData(e)}});K5=class t extends jn{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{["type"]:r,["offset"]:i=0,["length"]:s=0}=e;return new Ti(r,i,s,s)}visitBool(e){let{["type"]:r,["offset"]:i=0}=e,s=Wn(e.nullBitmap),a=Fi(r.ArrayType,e.data),{["length"]:d=a.length>>3,["nullCount"]:m=e.nullBitmap?-1:0}=e;return new Ti(r,i,d,m,[void 0,a,s])}visitInt(e){let{["type"]:r,["offset"]:i=0}=e,s=Wn(e.nullBitmap),a=Fi(r.ArrayType,e.data),{["length"]:d=a.length,["nullCount"]:m=e.nullBitmap?-1:0}=e;return new Ti(r,i,d,m,[void 0,a,s])}visitFloat(e){let{["type"]:r,["offset"]:i=0}=e,s=Wn(e.nullBitmap),a=Fi(r.ArrayType,e.data),{["length"]:d=a.length,["nullCount"]:m=e.nullBitmap?-1:0}=e;return new Ti(r,i,d,m,[void 0,a,s])}visitUtf8(e){let{["type"]:r,["offset"]:i=0}=e,s=Wn(e.data),a=Wn(e.nullBitmap),d=J2(e.valueOffsets),{["length"]:m=d.length-1,["nullCount"]:v=e.nullBitmap?-1:0}=e;return new Ti(r,i,m,v,[d,s,a])}visitUtf8View(e){var r;let{["type"]:i,["offset"]:s=0}=e,a=Fi(i.ArrayType,e.views),d=Wn(e.nullBitmap),m=(e.variadicBuffers||[]).map(x=>Wn(x)),v=(r=e.length)!==null&&r!==void 0?r:Math.trunc(a.length/A1.ELEMENT_WIDTH),_=e.nullBitmap?-1:0;return new Ti(i,s,v,_,[void 0,a,d],[],void 0,m)}visitLargeUtf8(e){let{["type"]:r,["offset"]:i=0}=e,s=Wn(e.data),a=Wn(e.nullBitmap),d=Kh(e.valueOffsets),{["length"]:m=d.length-1,["nullCount"]:v=e.nullBitmap?-1:0}=e;return new Ti(r,i,m,v,[d,s,a])}visitBinary(e){let{["type"]:r,["offset"]:i=0}=e,s=Wn(e.data),a=Wn(e.nullBitmap),d=J2(e.valueOffsets),{["length"]:m=d.length-1,["nullCount"]:v=e.nullBitmap?-1:0}=e;return new Ti(r,i,m,v,[d,s,a])}visitBinaryView(e){var r;let{["type"]:i,["offset"]:s=0}=e,a=Fi(i.ArrayType,e.views),d=Wn(e.nullBitmap),m=(e.variadicBuffers||[]).map(x=>Wn(x)),v=(r=e.length)!==null&&r!==void 0?r:Math.trunc(a.length/Oi.ELEMENT_WIDTH),_=e.nullBitmap?-1:0;return new Ti(i,s,v,_,[void 0,a,d],[],void 0,m)}visitLargeBinary(e){let{["type"]:r,["offset"]:i=0}=e,s=Wn(e.data),a=Wn(e.nullBitmap),d=Kh(e.valueOffsets),{["length"]:m=d.length-1,["nullCount"]:v=e.nullBitmap?-1:0}=e;return new Ti(r,i,m,v,[d,s,a])}visitFixedSizeBinary(e){let{["type"]:r,["offset"]:i=0}=e,s=Wn(e.nullBitmap),a=Fi(r.ArrayType,e.data),{["length"]:d=a.length/Al(r),["nullCount"]:m=e.nullBitmap?-1:0}=e;return new Ti(r,i,d,m,[void 0,a,s])}visitDate(e){let{["type"]:r,["offset"]:i=0}=e,s=Wn(e.nullBitmap),a=Fi(r.ArrayType,e.data),{["length"]:d=a.length/Al(r),["nullCount"]:m=e.nullBitmap?-1:0}=e;return new Ti(r,i,d,m,[void 0,a,s])}visitTimestamp(e){let{["type"]:r,["offset"]:i=0}=e,s=Wn(e.nullBitmap),a=Fi(r.ArrayType,e.data),{["length"]:d=a.length/Al(r),["nullCount"]:m=e.nullBitmap?-1:0}=e;return new Ti(r,i,d,m,[void 0,a,s])}visitTime(e){let{["type"]:r,["offset"]:i=0}=e,s=Wn(e.nullBitmap),a=Fi(r.ArrayType,e.data),{["length"]:d=a.length/Al(r),["nullCount"]:m=e.nullBitmap?-1:0}=e;return new Ti(r,i,d,m,[void 0,a,s])}visitDecimal(e){let{["type"]:r,["offset"]:i=0}=e,s=Wn(e.nullBitmap),a=Fi(r.ArrayType,e.data),{["length"]:d=a.length/Al(r),["nullCount"]:m=e.nullBitmap?-1:0}=e;return new Ti(r,i,d,m,[void 0,a,s])}visitList(e){let{["type"]:r,["offset"]:i=0,["child"]:s}=e,a=Wn(e.nullBitmap),d=J2(e.valueOffsets),{["length"]:m=d.length-1,["nullCount"]:v=e.nullBitmap?-1:0}=e;return new Ti(r,i,m,v,[d,void 0,a],[s])}visitLargeList(e){let{["type"]:r,["offset"]:i=0,["child"]:s}=e,a=Wn(e.nullBitmap),d=Kh(e.valueOffsets),{["length"]:m=d.length-1,["nullCount"]:v=e.nullBitmap?-1:0}=e;return new Ti(r,i,m,v,[d,void 0,a],[s])}visitStruct(e){let{["type"]:r,["offset"]:i=0,["children"]:s=[]}=e,a=Wn(e.nullBitmap),{length:d=s.reduce((v,{length:_})=>Math.max(v,_),0),nullCount:m=e.nullBitmap?-1:0}=e;return new Ti(r,i,d,m,[void 0,void 0,a],s)}visitUnion(e){let{["type"]:r,["offset"]:i=0,["children"]:s=[]}=e,a=Fi(r.ArrayType,e.typeIds),{["length"]:d=a.length,["nullCount"]:m=-1}=e;if(Hr.isSparseUnion(r))return new Ti(r,i,d,m,[void 0,void 0,void 0,a],s);let v=J2(e.valueOffsets);return new Ti(r,i,d,m,[v,void 0,void 0,a],s)}visitDictionary(e){let{["type"]:r,["offset"]:i=0}=e,s=Wn(e.nullBitmap),a=Fi(r.indices.ArrayType,e.data),{["dictionary"]:d=new Tn([new t().visit({type:r.dictionary})])}=e,{["length"]:m=a.length,["nullCount"]:v=e.nullBitmap?-1:0}=e;return new Ti(r,i,m,v,[void 0,a,s],[],d)}visitInterval(e){let{["type"]:r,["offset"]:i=0}=e,s=Wn(e.nullBitmap),a=Fi(r.ArrayType,e.data),{["length"]:d=a.length/Al(r),["nullCount"]:m=e.nullBitmap?-1:0}=e;return new Ti(r,i,d,m,[void 0,a,s])}visitDuration(e){let{["type"]:r,["offset"]:i=0}=e,s=Wn(e.nullBitmap),a=Fi(r.ArrayType,e.data),{["length"]:d=a.length,["nullCount"]:m=e.nullBitmap?-1:0}=e;return new Ti(r,i,d,m,[void 0,a,s])}visitFixedSizeList(e){let{["type"]:r,["offset"]:i=0,["child"]:s=new t().visit({type:r.valueType})}=e,a=Wn(e.nullBitmap),{["length"]:d=s.length/Al(r),["nullCount"]:m=e.nullBitmap?-1:0}=e;return new Ti(r,i,d,m,[void 0,void 0,a],[s])}visitMap(e){let{["type"]:r,["offset"]:i=0,["child"]:s=new t().visit({type:r.childType})}=e,a=Wn(e.nullBitmap),d=J2(e.valueOffsets),{["length"]:m=d.length-1,["nullCount"]:v=e.nullBitmap?-1:0}=e;return new Ti(r,i,m,v,[d,void 0,a],[s])}},pE=new K5});function Xb(t){return t.some(e=>e.nullable)}function nm(t){return t.reduce((e,r)=>e+r.nullCount,0)}function im(t){return t.reduce((e,r,i)=>(e[i+1]=e[i]+r.length,e),new Uint32Array(t.length+1))}function sm(t,e,r,i){let s=[];for(let a=-1,d=t.length;++a=i)break;if(r>=v+_)continue;if(v>=r&&v+_<=i){s.push(m);continue}let x=Math.max(0,r-v),w=Math.min(i-v,_);s.push(m.slice(x,w-x))}return s.length===0&&s.push(t[0].slice(0,0)),s}function Q5(t,e,r,i){let s=0,a=0,d=e.length-1;do{if(s>=d-1)return r{$p=class{constructor(e=0,r){this.numChunks=e,this.getChunkIterator=r,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndex0?0:-1}function gE(t,e){let{nullBitmap:r}=t;if(!r||t.nullCount<=0)return-1;let i=0;for(let s of new uu(r,t.offset+(e||0),t.length,r,ah)){if(!s)return i;++i}return-1}function pi(t,e,r){if(e===void 0)return-1;if(e===null)switch(t.typeId){case fe.Union:break;case fe.Dictionary:break;default:return gE(t,r)}let i=ro.getVisitFn(t),s=Kf(e);for(let a=(r||0)-1,d=t.length;++a{oa();K1();t3();s3();sh();Qn=class extends jn{};Qn.prototype.visitNull=mE;Qn.prototype.visitBool=pi;Qn.prototype.visitInt=pi;Qn.prototype.visitInt8=pi;Qn.prototype.visitInt16=pi;Qn.prototype.visitInt32=pi;Qn.prototype.visitInt64=pi;Qn.prototype.visitUint8=pi;Qn.prototype.visitUint16=pi;Qn.prototype.visitUint32=pi;Qn.prototype.visitUint64=pi;Qn.prototype.visitFloat=pi;Qn.prototype.visitFloat16=pi;Qn.prototype.visitFloat32=pi;Qn.prototype.visitFloat64=pi;Qn.prototype.visitUtf8=pi;Qn.prototype.visitLargeUtf8=pi;Qn.prototype.visitUtf8View=pi;Qn.prototype.visitBinary=pi;Qn.prototype.visitLargeBinary=pi;Qn.prototype.visitBinaryView=pi;Qn.prototype.visitFixedSizeBinary=pi;Qn.prototype.visitDate=pi;Qn.prototype.visitDateDay=pi;Qn.prototype.visitDateMillisecond=pi;Qn.prototype.visitTimestamp=pi;Qn.prototype.visitTimestampSecond=pi;Qn.prototype.visitTimestampMillisecond=pi;Qn.prototype.visitTimestampMicrosecond=pi;Qn.prototype.visitTimestampNanosecond=pi;Qn.prototype.visitTime=pi;Qn.prototype.visitTimeSecond=pi;Qn.prototype.visitTimeMillisecond=pi;Qn.prototype.visitTimeMicrosecond=pi;Qn.prototype.visitTimeNanosecond=pi;Qn.prototype.visitDecimal=pi;Qn.prototype.visitList=pi;Qn.prototype.visitLargeList=pi;Qn.prototype.visitStruct=pi;Qn.prototype.visitUnion=pi;Qn.prototype.visitDenseUnion=Jb;Qn.prototype.visitSparseUnion=Jb;Qn.prototype.visitDictionary=pi;Qn.prototype.visitInterval=pi;Qn.prototype.visitIntervalDayTime=pi;Qn.prototype.visitIntervalYearMonth=pi;Qn.prototype.visitIntervalMonthDayNano=pi;Qn.prototype.visitDuration=pi;Qn.prototype.visitDurationSecond=pi;Qn.prototype.visitDurationMillisecond=pi;Qn.prototype.visitDurationMicrosecond=pi;Qn.prototype.visitDurationNanosecond=pi;Qn.prototype.visitFixedSizeList=pi;Qn.prototype.visitMap=pi;a3=new Qn});function si(t){let{type:e}=t;if(t.nullCount===0&&t.stride===1&&(Hr.isInt(e)&&e.bitWidth!==64||Hr.isTime(e)&&e.bitWidth!==64||Hr.isFloat(e)&&e.precision!==ds.HALF))return new $p(t.data.length,i=>{let s=t.data[i];return s.values.subarray(0,s.length)[Symbol.iterator]()});let r=0;return new $p(t.data.length,i=>{let a=t.data[i].length,d=t.slice(r,r+a);return r+=a,new Z5(d)})}var Zn,Z5,lh,um=Dt(()=>{K1();oa();vs();lm();Zn=class extends jn{};Z5=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexyE(e)));if(ArrayBuffer.isView(t)){t instanceof DataView&&(t=new Uint8Array(t.buffer));let e={offset:0,length:t.length,nullCount:-1,data:t};if(t instanceof Int8Array)return new Tn([kn(Object.assign(Object.assign({},e),{type:new Gf}))]);if(t instanceof Int16Array)return new Tn([kn(Object.assign(Object.assign({},e),{type:new jf}))]);if(t instanceof Int32Array)return new Tn([kn(Object.assign(Object.assign({},e),{type:new l1}))]);if(t instanceof BigInt64Array)return new Tn([kn(Object.assign(Object.assign({},e),{type:new ou}))]);if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)return new Tn([kn(Object.assign(Object.assign({},e),{type:new qf}))]);if(t instanceof Uint16Array)return new Tn([kn(Object.assign(Object.assign({},e),{type:new Hf}))]);if(t instanceof Uint32Array)return new Tn([kn(Object.assign(Object.assign({},e),{type:new zf}))]);if(t instanceof BigUint64Array)return new Tn([kn(Object.assign(Object.assign({},e),{type:new Wf}))]);if(t instanceof Float32Array)return new Tn([kn(Object.assign(Object.assign({},e),{type:new Yf}))]);if(t instanceof Float64Array)return new Tn([kn(Object.assign(Object.assign({},e),{type:new lu}))]);throw new Error("Unrecognized input")}}throw new Error("Unrecognized input")}function yE(t){return t instanceof Ti?[t]:t instanceof Tn?t.data:Qf(t).data}var Kb,Qb,Zb,ev,Tn,fm,c1=Dt(()=>{oa();sh();vs();Yl();lm();t3();Tl();cm();um();vs();Qb=Symbol.for("apache-arrow/Vector"),Zb={},ev={},Tn=class t{static isVector(e){return e?.[Qb]===!0}constructor(e){var r,i,s;let a=e[0]instanceof t?e.flatMap(m=>m.data):e;if(a.length===0||a.some(m=>!(m instanceof Ti)))throw new TypeError("Vector constructor expects an Array of Data instances.");let d=(r=a[0])===null||r===void 0?void 0:r.type;switch(a.length){case 0:this._offsets=[0];break;case 1:{let{get:m,set:v,indexOf:_}=Zb[d.typeId],x=a[0];this.isValid=w=>Pp(x,w),this.get=w=>m(x,w),this.set=(w,I)=>v(x,w,I),this.indexOf=w=>_(x,w),this._offsets=[0,x.length];break}default:Object.setPrototypeOf(this,ev[d.typeId]),this._offsets=im(a);break}this.data=a,this.type=d,this.stride=Al(d),this.numChildren=(s=(i=d.children)===null||i===void 0?void 0:i.length)!==null&&s!==void 0?s:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((e,r)=>e+r.byteLength,0)}get nullable(){return Xb(this.data)}get nullCount(){return nm(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${fe[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(r3(e,this.length))}set(e,r){}indexOf(e,r){return-1}includes(e,r){return this.indexOf(e,r)>-1}[Symbol.iterator](){return lh.visit(this)}concat(...e){return new t(this.data.concat(e.flatMap(r=>r.data).flat(Number.POSITIVE_INFINITY)))}slice(e,r){return new t(Fp(this,e,r,({data:i,_offsets:s},a,d)=>sm(i,s,a,d)))}toJSON(){return[...this]}toArray(){let{type:e,data:r,length:i,stride:s,ArrayType:a}=this;switch(e.typeId){case fe.Int:case fe.Float:case fe.Decimal:case fe.Time:case fe.Timestamp:switch(r.length){case 0:return new a;case 1:return r[0].values.subarray(0,i*s);default:return r.reduce((d,{values:m,length:v})=>(d.array.set(m.subarray(0,v*s),d.offset),d.offset+=v*s,d),{array:new a(i*s),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(e){var r;return this.getChildAt((r=this.type.children)===null||r===void 0?void 0:r.findIndex(i=>i.name===e))}getChildAt(e){return e>-1&&er[e])):null}get isMemoized(){return Hr.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(Hr.isDictionary(this.type)){let e=new fm(this.data[0].dictionary),r=this.data.map(i=>{let s=i.clone();return s.dictionary=e,s});return new t(r)}return new fm(this)}unmemoize(){if(Hr.isDictionary(this.type)&&this.isMemoized){let e=this.data[0].dictionary.unmemoize(),r=this.data.map(i=>{let s=i.clone();return s.dictionary=e,s});return new t(r)}return this}};Kb=Symbol.toStringTag;Tn[Kb]=(t=>{t.type=Hr.prototype,t.data=[],t.length=0,t.stride=1,t.numChildren=0,t._offsets=new Uint32Array([0]),t[Symbol.isConcatSpreadable]=!0,t[Qb]=!0;let e=Object.keys(fe).map(r=>fe[r]).filter(r=>typeof r=="number"&&r!==fe.NONE);for(let r of e){let i=ro.getVisitFnByTypeId(r),s=Yo.getVisitFnByTypeId(r),a=a3.getVisitFnByTypeId(r);Zb[r]={get:i,set:s,indexOf:a},ev[r]=Object.create(t,{isValid:{value:oh(Pp)},get:{value:oh(ro.getVisitFnByTypeId(r))},set:{value:am(Yo.getVisitFnByTypeId(r))},indexOf:{value:om(a3.getVisitFnByTypeId(r))}})}return"Vector"})(Tn.prototype);Object.defineProperty(Tn,Symbol.hasInstance,{value:function(e){return Function.prototype[Symbol.hasInstance].call(this,e)||this===Tn&&Tn.isVector(e)}});fm=class t extends Tn{constructor(e){super(e.data);let r=this.get,i=this.set,s=this.slice,a=new Array(this.length);Object.defineProperty(this,"get",{value(d){let m=a[d];if(m!==void 0)return m;let v=r.call(this,d);return a[d]=v,v}}),Object.defineProperty(this,"set",{value(d,m){i.call(this,d,m),a[d]=m}}),Object.defineProperty(this,"slice",{value:(d,m)=>new t(s.call(this,d,m))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new Tn(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}});function tv(t){if(!t||t.length<=0)return function(s){return!0};let e="",r=t.filter(i=>i===i);return r.length>0&&(e=` switch (x) {${r.map(i=>` - case ${cS(i)}:`).join("")} + case ${bE(i)}:`).join("")} return false; }`),t.length!==r.length&&(e=`if (x !== x) return false; ${e}`),new Function("x",`${e} -return true;`)}function cS(t){return typeof t!="bigint"?gc(t):`${gc(t)}n`}var ub=Mt(()=>{Zh()});function I5(t,e){let r=Math.ceil(t)*e-1;return(r-r%64+64||64)/e}function fb(t,e=0){return t.length>=e?t.subarray(0,e):Uh(new t.constructor(e),t,0)}var wc,Vu,Qd,Zd,Gu=Mt(()=>{Lo();wc=class{constructor(e,r=0,i=1){this.length=Math.ceil(r/i),this.buffer=new e(this.length),this.stride=i,this.BYTES_PER_ELEMENT=e.BYTES_PER_ELEMENT,this.ArrayType=e}get byteLength(){return Math.ceil(this.length*this.stride)*this.BYTES_PER_ELEMENT}get reservedLength(){return this.buffer.length/this.stride}get reservedByteLength(){return this.buffer.byteLength}set(e,r){return this}append(e){return this.set(this.length,e)}reserve(e){if(e>0){this.length+=e;let r=this.stride,i=this.length*r,s=this.buffer.length;i>=s&&this._resize(s===0?I5(i*1,this.BYTES_PER_ELEMENT):I5(i*2,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=I5(e*this.stride,this.BYTES_PER_ELEMENT);let r=fb(this.buffer,e);return this.clear(),r}clear(){return this.length=0,this.buffer=new this.ArrayType,this}_resize(e){return this.buffer=fb(this.buffer,e)}},Vu=class extends wc{last(){return this.get(this.length-1)}get(e){return this.buffer[e]}set(e,r){return this.reserve(e-this.length+1),this.buffer[e*this.stride]=r,this}},Qd=class extends Vu{constructor(){super(Uint8Array,0,1/8),this.numValid=0}get numInvalid(){return this.length-this.numValid}get(e){return this.buffer[e>>3]>>e%8&1}set(e,r){let{buffer:i}=this.reserve(e-this.length+1),s=e>>3,o=e%8,h=i[s]>>o&1;return r?h===0&&(i[s]|=1<=0&&s.fill(s[i],i,e),s[e]=s[e-1]+r,this}flush(e=this.length-1){return e>this.length&&this.set(e-1,this.BYTES_PER_ELEMENT>4?BigInt(0):0),super.flush(e+1)}}});var Is,Za,Y1,Ks=Mt(()=>{A1();su();_p();Ms();ub();Gu();Is=class{static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e){throw new Error('"throughDOM" not available in this environment')}constructor({type:e,nullValues:r}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=r,this.stride=xl(e),this._nulls=new Qd,r&&r.length>0&&(this._isValid=cb(r))}toVector(){return new Bn([this.flush()])}get ArrayType(){return this.type.ArrayType}get nullCount(){return this._nulls.numInvalid}get numChildren(){return this.children.length}get byteLength(){let e=0,{_offsets:r,_values:i,_nulls:s,_typeIds:o,children:h}=this;return r&&(e+=r.byteLength),i&&(e+=i.byteLength),s&&(e+=s.byteLength),o&&(e+=o.byteLength),h.reduce((g,v)=>g+v.byteLength,e)}get reservedLength(){return this._nulls.reservedLength}get reservedByteLength(){let e=0;return this._offsets&&(e+=this._offsets.reservedByteLength),this._values&&(e+=this._values.reservedByteLength),this._nulls&&(e+=this._nulls.reservedByteLength),this._typeIds&&(e+=this._typeIds.reservedByteLength),this.children.reduce((r,i)=>r+i.reservedByteLength,e)}get valueOffsets(){return this._offsets?this._offsets.buffer:null}get values(){return this._values?this._values.buffer:null}get nullBitmap(){return this._nulls?this._nulls.buffer:null}get typeIds(){return this._typeIds?this._typeIds.buffer:null}append(e){return this.set(this.length,e)}isValid(e){return this._isValid(e)}set(e,r){return this.setValid(e,this.isValid(r))&&this.setValue(e,r),this}setValue(e,r){this._setValue(this,e,r)}setValid(e,r){return this.length=this._nulls.set(e,+r).length,r}addChild(e,r=`${this.numChildren}`){throw new Error(`Cannot append children to non-nested type "${this.type}"`)}getChildAt(e){return this.children[e]||null}flush(){let e,r,i,s,{type:o,length:h,nullCount:g,_typeIds:v,_offsets:x,_values:_,_nulls:w}=this;(r=v?.flush(h))?s=x?.flush(h):(s=x?.flush(h))?e=_?.flush(x.last()):e=_?.flush(h),g>0&&(i=w?.flush(h));let O=this.children.map(I=>I.flush());return this.clear(),jn({type:o,length:h,nullCount:g,children:O,child:O[0],data:e,typeIds:r,nullBitmap:i,valueOffsets:s})}finish(){this.finished=!0;for(let e of this.children)e.finish();return this}clear(){var e,r,i,s;this.length=0,(e=this._nulls)===null||e===void 0||e.clear(),(r=this._values)===null||r===void 0||r.clear(),(i=this._offsets)===null||i===void 0||i.clear(),(s=this._typeIds)===null||s===void 0||s.clear();for(let o of this.children)o.clear();return this}};Is.prototype.length=1;Is.prototype.stride=1;Is.prototype.children=null;Is.prototype.finished=!1;Is.prototype.nullValues=null;Is.prototype._isValid=()=>!0;Za=class extends Is{constructor(e){super(e),this._values=new Vu(this.ArrayType,0,this.stride)}setValue(e,r){let i=this._values;return i.reserve(e-i.length+1),super.setValue(e,r)}},Y1=class extends Is{constructor(e){super(e),this._pendingLength=0,this._offsets=new Zd(e.type)}setValue(e,r){let i=this._pending||(this._pending=new Map),s=i.get(e);s&&(this._pendingLength-=s.length),this._pendingLength+=r instanceof Ul?r[V2].length:r.length,i.set(e,r)}setValid(e,r){return super.setValid(e,r)?!0:((this._pending||(this._pending=new Map)).set(e,void 0),!1)}clear(){return this._pendingLength=0,this._pending=void 0,super.clear()}flush(){return this._flush(),super.flush()}finish(){return this._flush(),super.finish()}_flush(){let e=this._pending,r=this._pendingLength;return this._pendingLength=0,this._pending=void 0,e&&e.size>0&&this._flushPending(e,r),this}}});var e3,O5=Mt(()=>{e3=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(e,r,i,s){return e.prep(8,24),e.writeInt64(BigInt(s??0)),e.pad(4),e.writeInt32(i),e.writeInt64(BigInt(r??0)),e.offset()}}});var Sl,db=Mt(()=>{Zi();O5();$d();f4();r5();Sl=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsFooter(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):us.V1}schema(e){let r=this.bb.__offset(this.bb_pos,6);return r?(e||new q1).__init(this.bb.__indirect(this.bb_pos+r),this.bb):null}dictionaries(e,r){let i=this.bb.__offset(this.bb_pos,8);return i?(r||new e3).__init(this.bb.__vector(this.bb_pos+i)+e*24,this.bb):null}dictionariesLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,r){let i=this.bb.__offset(this.bb_pos,10);return i?(r||new e3).__init(this.bb.__vector(this.bb_pos+i)+e*24,this.bb):null}recordBatchesLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,r){let i=this.bb.__offset(this.bb_pos,12);return i?(r||new So).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,r){e.addFieldInt16(0,r,us.V1)}static addSchema(e,r){e.addFieldOffset(1,r,0)}static addDictionaries(e,r){e.addFieldOffset(2,r,0)}static startDictionariesVector(e,r){e.startVector(24,r,8)}static addRecordBatches(e,r){e.addFieldOffset(3,r,0)}static startRecordBatchesVector(e,r){e.startVector(24,r,8)}static addCustomMetadata(e,r){e.addFieldOffset(4,r,0)}static createCustomMetadataVector(e,r){e.startVector(4,r.length,4);for(let i=r.length-1;i>=0;i--)e.addOffset(r[i]);return e.endVector()}static startCustomMetadataVector(e,r){e.startVector(4,r,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,r){e.finish(r)}static finishSizePrefixedFooterBuffer(e,r){e.finish(r,void 0,!0)}}});function K4(t,e){return new Map([...t||new Map,...e||new Map])}function C5(t,e=new Map){for(let r=-1,i=t.length;++r0&&C5(o.children,e)}return e}var es,Ti,X1=Mt(()=>{na();Ms();es=class t{constructor(e=[],r,i,s=us.V5){this.fields=e||[],this.metadata=r||new Map,i||(i=C5(this.fields)),this.dictionaries=i,this.metadataVersion=s}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map(e=>e.name)}toString(){return`Schema<{ ${this.fields.map((e,r)=>`${r}: ${e}`).join(", ")} }>`}select(e){let r=new Set(e),i=this.fields.filter(s=>r.has(s.name));return new t(i,this.metadata)}selectAt(e){let r=e.map(i=>this.fields[i]).filter(Boolean);return new t(r,this.metadata)}assign(...e){let r=e[0]instanceof t?e[0]:Array.isArray(e[0])?new t(e[0]):new t(e),i=[...this.fields],s=K4(K4(new Map,this.metadata),r.metadata),o=r.fields.filter(g=>{let v=i.findIndex(x=>x.name===g.name);return~v?(i[v]=g.clone({metadata:K4(K4(new Map,i[v].metadata),g.metadata)}))&&!1:!0}),h=C5(o,new Map);return new t([...i,...o],s,new Map([...this.dictionaries,...h]))}};es.prototype.fields=null;es.prototype.metadata=null;es.prototype.dictionaries=null;Ti=class t{static new(...e){let[r,i,s,o]=e;return e[0]&&typeof e[0]=="object"&&({name:r}=e[0],i===void 0&&(i=e[0].type),s===void 0&&(s=e[0].nullable),o===void 0&&(o=e[0].metadata)),new t(`${r}`,i,s,o)}constructor(e,r,i=!1,s){this.name=e,this.type=r,this.nullable=i,this.metadata=s||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[r,i,s,o]=e;return!e[0]||typeof e[0]!="object"?[r=this.name,i=this.type,s=this.nullable,o=this.metadata]=e:{name:r=this.name,type:i=this.type,nullable:s=this.nullable,metadata:o=this.metadata}=e[0],t.new(r,i,s,o)}};Ti.prototype.type=null;Ti.prototype.name=null;Ti.prototype.nullable=null;Ti.prototype.metadata=null});var uS,fS,ju,L5,Ac,N5=Mt(()=>{O5();db();Zi();X1();na();Lo();Pu();uS=qf,fS=jo,ju=class{static decode(e){e=new fS(oi(e));let r=Sl.getRootAsFooter(e),i=es.decode(r.schema(),new Map,r.version());return new L5(i,r)}static encode(e){let r=new uS,i=es.encode(r,e.schema);Sl.startRecordBatchesVector(r,e.numRecordBatches);for(let h of[...e.recordBatches()].slice().reverse())Ac.encode(r,h);let s=r.endVector();Sl.startDictionariesVector(r,e.numDictionaries);for(let h of[...e.dictionaryBatches()].slice().reverse())Ac.encode(r,h);let o=r.endVector();return Sl.startFooter(r),Sl.addSchema(r,i),Sl.addVersion(r,us.V5),Sl.addRecordBatches(r,s),Sl.addDictionaries(r,o),Sl.finishFooterBuffer(r,Sl.endFooter(r)),r.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(e,r=us.V5,i,s){this.schema=e,this.version=r,i&&(this._recordBatches=i),s&&(this._dictionaryBatches=s)}*recordBatches(){for(let e,r=-1,i=this.numRecordBatches;++r=0&&e=0&&e=0&&e=0&&e{Zi();$d();b4();f4();Tc=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsMessage(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):us.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):Bi.NONE}header(e){let r=this.bb.__offset(this.bb_pos,8);return r?this.bb.__union(e,this.bb_pos+r):null}bodyLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}customMetadata(e,r){let i=this.bb.__offset(this.bb_pos,12);return i?(r||new So).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,r){e.addFieldInt16(0,r,us.V1)}static addHeaderType(e,r){e.addFieldInt8(1,r,Bi.NONE)}static addHeader(e,r){e.addFieldOffset(2,r,0)}static addBodyLength(e,r){e.addFieldInt64(3,r,BigInt("0"))}static addCustomMetadata(e,r){e.addFieldOffset(4,r,0)}static createCustomMetadataVector(e,r){e.startVector(4,r.length,4);for(let i=r.length-1;i>=0;i--)e.addOffset(r[i]);return e.endVector()}static startCustomMetadataVector(e,r){e.startVector(4,r,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,r){e.finish(r)}static finishSizePrefixedMessageBuffer(e,r){e.finish(r,void 0,!0)}static createMessage(e,r,i,s,o,h){return t.startMessage(e),t.addVersion(e,r),t.addHeaderType(e,i),t.addHeader(e,s),t.addBodyLength(e,o),t.addCustomMetadata(e,h),t.endMessage(e)}}});var D5,Q4,pb=Mt(()=>{W1();Xy();g4();X6();qy();Hy();zy();Ky();Wy();z6();q6();Q6();Z6();J6();H6();Yy();Jy();e5();j6();W6();Y6();K6();D5=class extends Gn{visit(e,r){return e==null||r==null?void 0:super.visit(e,r)}visitNull(e,r){return Jh.startNull(r),Jh.endNull(r)}visitInt(e,r){return pc.startInt(r),pc.addBitWidth(r,e.bitWidth),pc.addIsSigned(r,e.isSigned),pc.endInt(r)}visitFloat(e,r){return L2.startFloatingPoint(r),L2.addPrecision(r,e.precision),L2.endFloatingPoint(r)}visitBinary(e,r){return zh.startBinary(r),zh.endBinary(r)}visitLargeBinary(e,r){return Wh.startLargeBinary(r),Wh.endLargeBinary(r)}visitBool(e,r){return Hh.startBool(r),Hh.endBool(r)}visitUtf8(e,r){return Qh.startUtf8(r),Qh.endUtf8(r)}visitLargeUtf8(e,r){return Yh.startLargeUtf8(r),Yh.endLargeUtf8(r)}visitDecimal(e,r){return eu.startDecimal(r),eu.addScale(r,e.scale),eu.addPrecision(r,e.precision),eu.addBitWidth(r,e.bitWidth),eu.endDecimal(r)}visitDate(e,r){return T2.startDate(r),T2.addUnit(r,e.unit),T2.endDate(r)}visitTime(e,r){return Fu.startTime(r),Fu.addUnit(r,e.unit),Fu.addBitWidth(r,e.bitWidth),Fu.endTime(r)}visitTimestamp(e,r){let i=e.timezone&&r.createString(e.timezone)||void 0;return $u.startTimestamp(r),$u.addUnit(r,e.unit),i!==void 0&&$u.addTimezone(r,i),$u.endTimestamp(r)}visitInterval(e,r){return N2.startInterval(r),N2.addUnit(r,e.unit),N2.endInterval(r)}visitDuration(e,r){return I2.startDuration(r),I2.addUnit(r,e.unit),I2.endDuration(r)}visitList(e,r){return Xh.startList(r),Xh.endList(r)}visitStruct(e,r){return Kh.startStruct_(r),Kh.endStruct_(r)}visitUnion(e,r){mc.startTypeIdsVector(r,e.typeIds.length);let i=mc.createTypeIdsVector(r,e.typeIds);return mc.startUnion(r),mc.addMode(r,e.mode),mc.addTypeIds(r,i),mc.endUnion(r)}visitDictionary(e,r){let i=this.visit(e.indices,r);return Zc.startDictionaryEncoding(r),Zc.addId(r,BigInt(e.id)),Zc.addIsOrdered(r,e.isOrdered),i!==void 0&&Zc.addIndexType(r,i),Zc.endDictionaryEncoding(r)}visitFixedSizeBinary(e,r){return O2.startFixedSizeBinary(r),O2.addByteWidth(r,e.byteWidth),O2.endFixedSizeBinary(r)}visitFixedSizeList(e,r){return C2.startFixedSizeList(r),C2.addListSize(r,e.listSize),C2.endFixedSizeList(r)}visitMap(e,r){return D2.startMap(r),D2.addKeysSorted(r,e.keysSorted),D2.endMap(r)}},Q4=new D5});function bb(t,e=new Map){return new es(dS(t,e),Z4(t.metadata),e)}function R5(t){return new to(t.count,xb(t.columns),_b(t.columns),null)}function vb(t){return new a1(R5(t.data),t.id,t.isDelta)}function dS(t,e){return(t.fields||[]).filter(Boolean).map(r=>Ti.fromJSON(r,e))}function mb(t,e){return(t.children||[]).filter(Boolean).map(r=>Ti.fromJSON(r,e))}function xb(t){return(t||[]).reduce((e,r)=>[...e,new Vl(r.count,hS(r.VALIDITY)),...xb(r.children)],[])}function _b(t,e=[]){for(let r=-1,i=(t||[]).length;++re+ +(r===0),0)}function Sb(t,e){let r,i,s,o,h,g;return!e||!(o=t.dictionary)?(h=yb(t,mb(t,e)),s=new Ti(t.name,h,t.nullable,Z4(t.metadata))):e.has(r=o.id)?(i=(i=o.indexType)?gb(i):new s1,g=new zo(e.get(r),i,r,o.isOrdered),s=new Ti(t.name,g,t.nullable,Z4(t.metadata))):(i=(i=o.indexType)?gb(i):new s1,e.set(r,h=yb(t,mb(t,e))),g=new zo(h,i,r,o.isOrdered),s=new Ti(t.name,g,t.nullable,Z4(t.metadata))),s||null}function Z4(t=[]){return new Map(t.map(({key:e,value:r})=>[e,r]))}function gb(t){return new Pa(t.isSigned,t.bitWidth)}function yb(t,e){let r=t.type.name;switch(r){case"NONE":return new Eo;case"null":return new Eo;case"binary":return new bc;case"largebinary":return new vc;case"utf8":return new ml;case"largeutf8":return new xc;case"bool":return new gl;case"list":return new E1((e||[])[0]);case"struct":return new ys(e||[]);case"struct_":return new ys(e||[])}switch(r){case"int":{let i=t.type;return new Pa(i.isSigned,i.bitWidth)}case"floatingpoint":{let i=t.type;return new z1(fs[i.precision])}case"decimal":{let i=t.type;return new _c(i.scale,i.precision,i.bitWidth)}case"date":{let i=t.type;return new yl(xs[i.unit])}case"time":{let i=t.type;return new x1(cn[i.unit],i.bitWidth)}case"timestamp":{let i=t.type;return new _1(cn[i.unit],i.timezone)}case"interval":{let i=t.type;return new H1(Hi[i.unit])}case"duration":{let i=t.type;return new S1(cn[i.unit])}case"union":{let i=t.type,[s,...o]=(i.mode+"").toLowerCase(),h=s.toUpperCase()+o.join("");return new w1(Qi[h],i.typeIds||[],e||[])}case"fixedsizebinary":{let i=t.type;return new Sc(i.byteWidth)}case"fixedsizelist":{let i=t.type;return new bl(i.listSize,(e||[])[0])}case"map":{let i=t.type;return new vl((e||[])[0],i.keysSorted)}}throw new Error(`Unrecognized type: "${r}"`)}var Eb=Mt(()=>{X1();Ms();q2();na()});function gS(t,e){return(()=>{switch(e){case Bi.Schema:return es.fromJSON(t);case Bi.RecordBatch:return to.fromJSON(t);case Bi.DictionaryBatch:return a1.fromJSON(t)}throw new Error(`Unrecognized Message type: { name: ${Bi[e]}, type: ${e} }`)})}function yS(t,e){return(()=>{switch(e){case Bi.Schema:return es.decode(t.header(new q1),new Map,t.version());case Bi.RecordBatch:return to.decode(t.header(new j1),t.version());case Bi.DictionaryBatch:return a1.decode(t.header(new Bu),t.version())}throw new Error(`Unrecognized Message type: { name: ${Bi[e]}, type: ${e} }`)})}function bS(t,e=new Map,r=us.V5){let i=AS(t,e);return new es(i,em(t),e,r)}function vS(t,e=us.V5){return new to(t.length(),ES(t),wS(t,e),Ib(t.compression()))}function xS(t,e=us.V5){return new a1(to.decode(t.data(),e),t.id(),t.isDelta())}function _S(t){return new eo(t.offset(),t.length())}function SS(t){return new Vl(t.length(),t.nullCount())}function ES(t){let e=[];for(let r,i=-1,s=-1,o=t.nodesLength();++iTi.encode(t,o));q1.startFieldsVector(t,r.length);let i=q1.createFieldsVector(t,r),s=e.metadata&&e.metadata.size>0?q1.createCustomMetadataVector(t,[...e.metadata].map(([o,h])=>{let g=t.createString(`${o}`),v=t.createString(`${h}`);return So.startKeyValue(t),So.addKey(t,g),So.addValue(t,v),So.endKeyValue(t)})):-1;return q1.startSchema(t),q1.addFields(t,i),q1.addEndianness(t,RS?A2.Little:A2.Big),s!==-1&&q1.addCustomMetadata(t,s),q1.endSchema(t)}function OS(t,e){let r=-1,i=-1,s=-1,o=e.type,h=e.typeId;ln.isDictionary(o)?(h=o.dictionary.typeId,s=Q4.visit(o,t),i=Q4.visit(o.dictionary,t)):i=Q4.visit(o,t);let g=(o.children||[]).map(_=>Ti.encode(t,_)),v=i1.createChildrenVector(t,g),x=e.metadata&&e.metadata.size>0?i1.createCustomMetadataVector(t,[...e.metadata].map(([_,w])=>{let O=t.createString(`${_}`),I=t.createString(`${w}`);return So.startKeyValue(t),So.addKey(t,O),So.addValue(t,I),So.endKeyValue(t)})):-1;return e.name&&(r=t.createString(e.name)),i1.startField(t),i1.addType(t,i),i1.addTypeType(t,h),i1.addChildren(t,v),i1.addNullable(t,!!e.nullable),r!==-1&&i1.addName(t,r),s!==-1&&i1.addDictionary(t,s),x!==-1&&i1.addCustomMetadata(t,x),i1.endField(t)}function CS(t,e){let r=e.nodes||[],i=e.buffers||[];j1.startNodesVector(t,r.length);for(let g of r.slice().reverse())Vl.encode(t,g);let s=t.endVector();j1.startBuffersVector(t,i.length);for(let g of i.slice().reverse())eo.encode(t,g);let o=t.endVector(),h=null;return e.compression!==null&&(h=Ob(t,e.compression)),j1.startRecordBatch(t),j1.addLength(t,BigInt(e.length)),j1.addNodes(t,s),j1.addBuffers(t,o),e.compression!==null&&h&&j1.addCompression(t,h),j1.endRecordBatch(t)}function Ob(t,e){return Mu.startBodyCompression(t),Mu.addCodec(t,e.type),Mu.addMethod(t,e.method),Mu.endBodyCompression(t)}function LS(t,e){let r=to.encode(t,e.data);return Bu.startDictionaryBatch(t),Bu.addId(t,BigInt(e.id)),Bu.addIsDelta(t,e.isDelta),Bu.addData(t,r),Bu.endDictionaryBatch(t)}function NS(t,e){return Fd.createFieldNode(t,BigInt(e.length),BigInt(e.nullCount))}function DS(t,e){return Bd.createBuffer(t,BigInt(e.offset),BigInt(e.length))}var pS,mS,o1,to,a1,eo,Vl,t3,RS,q2=Mt(()=>{Zi();r5();g4();V6();Gy();P6();t5();U6();y4();$d();G6();X6();z6();q6();Q6();Z6();J6();H6();e5();W6();Y6();K6();hb();$6();F6();X1();Lo();Pu();na();pb();Eb();Ms();pS=qf,mS=jo,o1=class t{static fromJSON(e,r){let i=new t(0,us.V5,r);return i._createHeader=gS(e,r),i}static decode(e){e=new mS(oi(e));let r=Tc.getRootAsMessage(e),i=r.bodyLength(),s=r.version(),o=r.headerType(),h=new t(i,s,o);return h._createHeader=yS(r,o),h}static encode(e){let r=new pS,i=-1;return e.isSchema()?i=es.encode(r,e.header()):e.isRecordBatch()?i=to.encode(r,e.header()):e.isDictionaryBatch()&&(i=a1.encode(r,e.header())),Tc.startMessage(r),Tc.addVersion(r,us.V5),Tc.addHeader(r,i),Tc.addHeaderType(r,e.headerType),Tc.addBodyLength(r,BigInt(e.bodyLength)),Tc.finishMessageBuffer(r,Tc.endMessage(r)),r.asUint8Array()}static from(e,r=0){if(e instanceof es)return new t(0,us.V5,Bi.Schema,e);if(e instanceof to)return new t(r,us.V5,Bi.RecordBatch,e);if(e instanceof a1)return new t(r,us.V5,Bi.DictionaryBatch,e);throw new Error(`Unrecognized Message header: ${e}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get compression(){return this._compression}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===Bi.Schema}isRecordBatch(){return this.headerType===Bi.RecordBatch}isDictionaryBatch(){return this.headerType===Bi.DictionaryBatch}constructor(e,r,i,s){this._version=r,this._headerType=i,this.body=new Uint8Array(0),this._compression=s?.compression,s&&(this._createHeader=()=>s),this._bodyLength=ts(e)}},to=class{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}get compression(){return this._compression}constructor(e,r,i,s){this._nodes=r,this._buffers=i,this._length=ts(e),this._compression=s}},a1=class{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(e,r,i=!1){this._data=e,this._isDelta=i,this._id=ts(r)}},eo=class{constructor(e,r){this.offset=ts(e),this.length=ts(r)}},Vl=class{constructor(e,r){this.length=ts(e),this.nullCount=ts(r)}},t3=class{constructor(e,r=zf.BUFFER){this.type=e,this.method=r}};Ti.encode=OS;Ti.decode=TS;Ti.fromJSON=Sb;es.encode=IS;es.decode=bS;es.fromJSON=bb;to.encode=CS;to.decode=vS;to.fromJSON=R5;a1.encode=LS;a1.decode=xS;a1.fromJSON=vb;Vl.encode=NS;Vl.decode=SS;eo.encode=DS;eo.decode=_S;t3.encode=Ob;t3.decode=Ib;RS=(()=>{let t=new ArrayBuffer(2);return new DataView(t).setInt16(0,256,!0),new Int16Array(t)[0]===256})()});var Bs,Tp,r3,tm,Ip=Mt(()=>{G1();Vh();Bs=Object.freeze({done:!0,value:void 0}),Tp=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}},r3=class{tee(){return this._getDOMStream().tee()}pipe(e,r){return this._getNodeStream().pipe(e,r)}pipeTo(e,r){return this._getDOMStream().pipeTo(e,r)}pipeThrough(e,r){return this._getDOMStream().pipeThrough(e,r)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}},tm=class extends r3{constructor(){super(),this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return An(this,void 0,void 0,function*(){yield this.return(e)})}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){let{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(Bs);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return Go.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return Go.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return An(this,void 0,void 0,function*(){return yield this.abort(e),Bs})}return(e){return An(this,void 0,void 0,function*(){return yield this.close(),Bs})}read(e){return An(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return An(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((r,i)=>{this.resolvers.push({resolve:r,reject:i})}):Promise.resolve(Bs)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}}});var Gl,jl,J1,k5,qu,z2=Mt(()=>{G1();Vh();E2();Ip();Lo();w2();Gl=class extends tm{write(e){if((e=oi(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?$h(this.toUint8Array(!0)):this.toUint8Array(!1).then($h)}toUint8Array(e=!1){return e?pl(this._values)[0]:An(this,void 0,void 0,function*(){var r,i,s,o;let h=[],g=0;try{for(var v=!0,x=dl(this),_;_=yield x.next(),r=_.done,!r;v=!0){o=_.value,v=!1;let w=o;h.push(w),g+=w.byteLength}}catch(w){i={error:w}}finally{try{!v&&!r&&(s=x.return)&&(yield s.call(x))}finally{if(i)throw i.error}}return pl(h,g)[0]})}},jl=class{constructor(e){e&&(this.source=new k5(Go.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}},J1=class t{constructor(e){e instanceof t?this.source=e.source:e instanceof Gl?this.source=new qu(Go.fromAsyncIterable(e)):o4(e)?this.source=new qu(Go.fromNodeStream(e)):Ph(e)?this.source=new qu(Go.fromDOMStream(e)):s4(e)?this.source=new qu(Go.fromDOMStream(e.body)):fc(e)?this.source=new qu(Go.fromIterable(e)):hl(e)?this.source=new qu(Go.fromAsyncIterable(e)):$l(e)&&(this.source=new qu(Go.fromAsyncIterable(e)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}},k5=class{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,"peek").value}read(e){return this.next(e,"read").value}next(e,r="read"){return this.source.next({cmd:r,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||Bs)}return(e){return Object.create(this.source.return&&this.source.return(e)||Bs)}},qu=class{constructor(e){this.source=e,this._closedPromise=new Promise(r=>this._closedPromiseResolve=r)}cancel(e){return An(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return An(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return An(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(e){return An(this,arguments,void 0,function*(r,i="read"){return yield this.source.next({cmd:i,size:r})})}throw(e){return An(this,void 0,void 0,function*(){let r=this.source.throw&&(yield this.source.throw(e))||Bs;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(r)})}return(e){return An(this,void 0,void 0,function*(){let r=this.source.return&&(yield this.source.return(e))||Bs;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(r)})}}});var Op,H2,M5=Mt(()=>{G1();z2();Lo();Op=class extends jl{constructor(e,r){super(),this.position=0,this.buffer=oi(e),this.size=r===void 0?this.buffer.byteLength:r}readInt32(e){let{buffer:r,byteOffset:i}=this.readAt(e,4);return new DataView(r,i).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),eCp,Int128:()=>Lp,Int64:()=>zu,Uint64:()=>ia});function eh(t){return t<0&&(t=4294967295+t+1),`0x${t.toString(16)}`}var th,B5,Cp,ia,zu,Lp,$5=Mt(()=>{th=8,B5=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],Cp=class{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){let r=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),i=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),s=r[3]*i[3];this.buffer[0]=s&65535;let o=s>>>16;return s=r[2]*i[3],o+=s,s=r[3]*i[2]>>>0,o+=s,this.buffer[0]+=o<<16,this.buffer[1]=o>>>0>>16,this.buffer[1]+=r[1]*i[3]+r[2]*i[2]+r[3]*i[1],this.buffer[1]+=r[0]*i[3]+r[1]*i[2]+r[2]*i[1]+r[3]*i[0]<<16,this}_plus(e){let r=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],r>>0&&++this.buffer[1],this.buffer[0]=r}lessThan(e){return this.buffer[1]>>0,r[2]=this.buffer[2]+e.buffer[2]>>>0,r[1]=this.buffer[1]+e.buffer[1]>>>0,r[0]=this.buffer[0]+e.buffer[0]>>>0,r[0]>>0&&++r[1],r[1]>>0&&++r[2],r[2]>>0&&++r[3],this.buffer[3]=r[3],this.buffer[2]=r[2],this.buffer[1]=r[1],this.buffer[0]=r[0],this}hex(){return`${eh(this.buffer[3])} ${eh(this.buffer[2])} ${eh(this.buffer[1])} ${eh(this.buffer[0])}`}static multiply(e,r){return new t(new Uint32Array(e.buffer)).times(r)}static add(e,r){return new t(new Uint32Array(e.buffer)).plus(r)}static from(e,r=new Uint32Array(4)){return t.fromString(typeof e=="string"?e:e.toString(),r)}static fromNumber(e,r=new Uint32Array(4)){return t.fromString(e.toString(),r)}static fromString(e,r=new Uint32Array(4)){let i=e.startsWith("-"),s=e.length,o=new t(r);for(let h=i?1:0;hP5,toIntervalDayTimeObjects:()=>V5,toIntervalMonthDayNanoInt32Array:()=>U5,toIntervalMonthDayNanoObjects:()=>G5});function P5(t){var e,r;let i=t.length,s=new Int32Array(i*2);for(let o=0,h=0;o>BigInt(32))):h+=2}return s}function V5(t){let e=t.length,r=new Array(e/2);for(let i=0,s=0;i>>0);i[o++]={months:t[s],days:t[s+1],nanoseconds:e?`${h}`:h}}return i}var rm=Mt(()=>{});function kS(t){let e=t.join(""),r=new Uint8Array(e.length/2);for(let i=0;i>1]=Number.parseInt(e.slice(i,i+2),16);return r}var rh,nm,im,Lb=Mt(()=>{su();X1();Ms();W1();Qf();E2();$5();na();Lo();rm();rh=class extends Gn{constructor(e,r,i,s,o=us.V5){super(),this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=r,this.buffers=i,this.dictionaries=s,this.metadataVersion=o}visit(e){return super.visit(e instanceof Ti?e.type:e)}visitNull(e,{length:r}=this.nextFieldNode()){return jn({type:e,length:r})}visitBool(e,{length:r,nullCount:i}=this.nextFieldNode()){return jn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),data:this.readData(e)})}visitInt(e,{length:r,nullCount:i}=this.nextFieldNode()){return jn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),data:this.readData(e)})}visitFloat(e,{length:r,nullCount:i}=this.nextFieldNode()){return jn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),data:this.readData(e)})}visitUtf8(e,{length:r,nullCount:i}=this.nextFieldNode()){return jn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitLargeUtf8(e,{length:r,nullCount:i}=this.nextFieldNode()){return jn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitBinary(e,{length:r,nullCount:i}=this.nextFieldNode()){return jn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitLargeBinary(e,{length:r,nullCount:i}=this.nextFieldNode()){return jn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitFixedSizeBinary(e,{length:r,nullCount:i}=this.nextFieldNode()){return jn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),data:this.readData(e)})}visitDate(e,{length:r,nullCount:i}=this.nextFieldNode()){return jn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),data:this.readData(e)})}visitTimestamp(e,{length:r,nullCount:i}=this.nextFieldNode()){return jn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),data:this.readData(e)})}visitTime(e,{length:r,nullCount:i}=this.nextFieldNode()){return jn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),data:this.readData(e)})}visitDecimal(e,{length:r,nullCount:i}=this.nextFieldNode()){return jn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),data:this.readData(e)})}visitList(e,{length:r,nullCount:i}=this.nextFieldNode()){return jn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),valueOffsets:this.readOffsets(e),child:this.visit(e.children[0])})}visitStruct(e,{length:r,nullCount:i}=this.nextFieldNode()){return jn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),children:this.visitMany(e.children)})}visitUnion(e,{length:r,nullCount:i}=this.nextFieldNode()){return this.metadataVersion0&&this.readData(e,i)||new Uint8Array(0)}readOffsets(e,r){return this.readData(e,r)}readTypeIds(e,r){return this.readData(e,r)}readData(e,{length:r,offset:i}=this.nextBufferRange()){return this.bytes.subarray(i,i+r)}readDictionary(e){return this.dictionaries.get(e.id)}},nm=class extends rh{constructor(e,r,i,s,o){super(new Uint8Array(0),r,i,s,o),this.sources=e}readNullBitmap(e,r,{offset:i}=this.nextBufferRange()){return r<=0?new Uint8Array(0):Kf(this.sources[i])}readOffsets(e,{offset:r}=this.nextBufferRange()){return Mi(Uint8Array,Mi(e.OffsetArrayType,this.sources[r]))}readTypeIds(e,{offset:r}=this.nextBufferRange()){return Mi(Uint8Array,Mi(e.ArrayType,this.sources[r]))}readData(e,{offset:r}=this.nextBufferRange()){let{sources:i}=this;if(ln.isTimestamp(e))return Mi(Uint8Array,zu.convertArray(i[r]));if((ln.isInt(e)||ln.isTime(e))&&e.bitWidth===64||ln.isDuration(e))return Mi(Uint8Array,zu.convertArray(i[r]));if(ln.isDate(e)&&e.unit===xs.MILLISECOND)return Mi(Uint8Array,zu.convertArray(i[r]));if(ln.isDecimal(e))return Mi(Uint8Array,Lp.convertArray(i[r]));if(ln.isBinary(e)||ln.isLargeBinary(e)||ln.isFixedSizeBinary(e))return kS(i[r]);if(ln.isBool(e))return Kf(i[r]);if(ln.isUtf8(e)||ln.isLargeUtf8(e))return Jc(i[r].join(""));if(ln.isInterval(e))switch(e.unit){case Hi.DAY_TIME:return P5(i[r]);case Hi.MONTH_DAY_NANO:return U5(i[r]);default:break}return Mi(Uint8Array,Mi(e.ArrayType,i[r].map(s=>+s)))}};im=class extends rh{constructor(e,r,i,s,o){super(new Uint8Array(0),r,i,s,o),this.bodyChunks=e}readData(e,r=this.nextBufferRange()){return this.bodyChunks[this.buffersIndex]}}});var Hu,sm=Mt(()=>{Gu();Ks();Lo();Hu=class extends Y1{constructor(e){super(e),this._values=new wc(Uint8Array)}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,r){return super.setValue(e,oi(r))}_flushPending(e,r){let i=this._offsets,s=this._values.reserve(r).buffer,o=0;for(let[h,g]of e)if(g===void 0)i.set(h,0);else{let v=g.length;s.set(g,o),i.set(h,v),o+=v}}}});var Wu,am=Mt(()=>{Lo();Gu();Ks();Wu=class extends Y1{constructor(e){super(e),this._values=new wc(Uint8Array)}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,r){return super.setValue(e,oi(r))}_flushPending(e,r){let i=this._offsets,s=this._values.reserve(r).buffer,o=0;for(let[h,g]of e)if(g===void 0)i.set(h,BigInt(0));else{let v=g.length;s.set(g,o),i.set(h,BigInt(v)),o+=v}}}});var n3,q5=Mt(()=>{Gu();Ks();n3=class extends Is{constructor(e){super(e),this._values=new Qd}setValue(e,r){this._values.set(e,+r)}}});var au,W2,Y2,z5=Mt(()=>{Ks();_l();au=class extends Za{};au.prototype._setValue=f5;W2=class extends au{};W2.prototype._setValue=_4;Y2=class extends au{};Y2.prototype._setValue=S4});var X2,H5=Mt(()=>{Ks();_l();X2=class extends Za{};X2.prototype._setValue=p5});var i3,W5=Mt(()=>{Ms();Ks();Np();i3=class extends Is{constructor({type:e,nullValues:r,dictionaryHashFunction:i}){super({type:new zo(e.dictionary,e.indices,e.id,e.isOrdered)}),this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=Ic({type:this.type.indices,nullValues:r}),this.dictionary=Ic({type:this.type.dictionary,nullValues:null}),typeof i=="function"&&(this.valueToKey=i)}get values(){return this.indices.values}get nullCount(){return this.indices.nullCount}get nullBitmap(){return this.indices.nullBitmap}get byteLength(){return this.indices.byteLength+this.dictionary.byteLength}get reservedLength(){return this.indices.reservedLength+this.dictionary.reservedLength}get reservedByteLength(){return this.indices.reservedByteLength+this.dictionary.reservedByteLength}isValid(e){return this.indices.isValid(e)}setValid(e,r){let i=this.indices;return r=i.setValid(e,r),this.length=i.length,r}setValue(e,r){let i=this._keysToIndices,s=this.valueToKey(r),o=i[s];return o===void 0&&(i[s]=o=this._dictionaryOffset+this.dictionary.append(r).length-1),this.indices.setValue(e,o)}flush(){let e=this.type,r=this._dictionary,i=this.dictionary.toVector(),s=this.indices.flush().clone(e);return s.dictionary=r?r.concat(i):i,this.finished||(this._dictionaryOffset+=i.length),this._dictionary=s.dictionary,this.clear(),s}finish(){return this.indices.finish(),this.dictionary.finish(),this._dictionaryOffset=0,this._keysToIndices=Object.create(null),super.finish()}clear(){return this.indices.clear(),this.dictionary.clear(),super.clear()}valueToKey(e){return typeof e=="string"?e:`${e}`}}});var J2,Y5=Mt(()=>{Ks();_l();J2=class extends Za{};J2.prototype._setValue=u5});var s3,X5=Mt(()=>{X1();Ks();Ms();s3=class extends Is{setValue(e,r){let[i]=this.children,s=e*this.stride;for(let o=-1,h=this.stride;++o0)throw new Error("FixedSizeListBuilder can only have one child.");let i=this.children.push(e);return this.type=new bl(this.type.listSize,new Ti(r,e.type,!0)),i}}});var ou,a3,o3,l3,J5=Mt(()=>{xp();Ks();ou=class extends Za{setValue(e,r){this._values.set(e,r)}},a3=class extends ou{setValue(e,r){super.setValue(e,vp(r))}},o3=class extends ou{},l3=class extends ou{}});var Oc,K2,Q2,Z2,K5=Mt(()=>{Ks();_l();Oc=class extends Za{};Oc.prototype._setValue=m5;K2=class extends Oc{};K2.prototype._setValue=N4;Q2=class extends Oc{};Q2.prototype._setValue=D4;Z2=class extends Oc{};Z2.prototype._setValue=R4});var ql,ef,tf,rf,nf,Q5=Mt(()=>{Ks();_l();ql=class extends Za{};ql.prototype._setValue=g5;ef=class extends ql{};ef.prototype._setValue=k4;tf=class extends ql{};tf.prototype._setValue=M4;rf=class extends ql{};rf.prototype._setValue=B4;nf=class extends ql{};nf.prototype._setValue=F4});var T1,c3,u3,f3,h3,p3,m3,g3,y3,Z5=Mt(()=>{Ks();T1=class extends Za{setValue(e,r){this._values.set(e,r)}},c3=class extends T1{},u3=class extends T1{},f3=class extends T1{},h3=class extends T1{},p3=class extends T1{},m3=class extends T1{},g3=class extends T1{},y3=class extends T1{}});var b3,e8=Mt(()=>{X1();Ms();Gu();Ks();b3=class extends Y1{constructor(e){super(e),this._offsets=new Zd(e.type)}addChild(e,r="0"){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new E1(new Ti(r,e.type,!0)),this.numChildren-1}_flushPending(e){let r=this._offsets,[i]=this.children;for(let[s,o]of e)if(typeof o>"u")r.set(s,0);else{let h=o,g=h.length,v=r.set(s,g).buffer[s];for(let x=-1;++x{X1();Ms();Ks();v3=class extends Y1{set(e,r){return super.set(e,r)}setValue(e,r){let i=r instanceof Map?r:new Map(Object.entries(r)),s=this._pending||(this._pending=new Map),o=s.get(e);o&&(this._pendingLength-=o.size),this._pendingLength+=i.size,s.set(e,i)}addChild(e,r=`${this.numChildren}`){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new vl(new Ti(r,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){let r=this._offsets,[i]=this.children;for(let[s,o]of e)if(o===void 0)r.set(s,0);else{let{[s]:h,[s+1]:g}=r.set(s,o.size).buffer;for(let v of o.entries())if(i.set(h,v),++h>=g)break}}}});var x3,r8=Mt(()=>{Ks();x3=class extends Is{setValue(e,r){}setValid(e,r){return this.length=Math.max(e+1,this.length),r}}});var _3,n8=Mt(()=>{X1();Ks();Ms();_3=class extends Is{setValue(e,r){let{children:i,type:s}=this;switch(Array.isArray(r)||r.constructor){case!0:return s.children.forEach((o,h)=>i[h].set(e,r[h]));case Map:return s.children.forEach((o,h)=>i[h].set(e,r.get(o.name)));default:return s.children.forEach((o,h)=>i[h].set(e,r[o.name]))}}setValid(e,r){return super.setValid(e,r)||this.children.forEach(i=>i.setValid(e,r)),r}addChild(e,r=`${this.numChildren}`){let i=this.children.push(e);return this.type=new ys([...this.type.children,new Ti(r,e.type,!0)]),i}}});var zl,sf,af,of,lf,i8=Mt(()=>{Ks();_l();zl=class extends Za{};zl.prototype._setValue=d5;sf=class extends zl{};sf.prototype._setValue=E4;af=class extends zl{};af.prototype._setValue=w4;of=class extends zl{};of.prototype._setValue=A4;lf=class extends zl{};lf.prototype._setValue=T4});var Hl,cf,uf,ff,df,s8=Mt(()=>{Ks();_l();Hl=class extends Za{};Hl.prototype._setValue=h5;cf=class extends Hl{};cf.prototype._setValue=I4;uf=class extends Hl{};uf.prototype._setValue=O4;ff=class extends Hl{};ff.prototype._setValue=C4;df=class extends Hl{};df.prototype._setValue=L4});var Yu,S3,E3,a8=Mt(()=>{X1();Gu();Ks();Ms();Yu=class extends Is{constructor(e){super(e),this._typeIds=new Vu(Int8Array,0,1),typeof e.valueToChildTypeId=="function"&&(this._valueToChildTypeId=e.valueToChildTypeId)}get typeIdToChildIndex(){return this.type.typeIdToChildIndex}append(e,r){return this.set(this.length,e,r)}set(e,r,i){return i===void 0&&(i=this._valueToChildTypeId(this,r,e)),this.setValue(e,r,i),this}setValue(e,r,i){this._typeIds.set(e,i);let s=this.type.typeIdToChildIndex[i],o=this.children[s];o?.set(e,r),this.length=Math.max(e+1,this.length)}addChild(e,r=`${this.children.length}`){let i=this.children.push(e),{type:{children:s,mode:o,typeIds:h}}=this,g=[...s,new Ti(r,e.type)];return this.type=new w1(o,[...h,i],g),i}_valueToChildTypeId(e,r,i){throw new Error("Cannot map UnionBuilder value to child typeId. Pass the `childTypeId` as the second argument to unionBuilder.append(), or supply a `valueToChildTypeId` function as part of the UnionBuilder constructor options.")}},S3=class extends Yu{},E3=class extends Yu{constructor(e){super(e),this._offsets=new Vu(Int32Array)}setValue(e,r,i){let s=this._typeIds.set(e,i).buffer[e],o=this.getChildAt(this.type.typeIdToChildIndex[s]),h=this._offsets.set(e,o.length).buffer[e];o?.set(h,r),this.length=Math.max(e+1,this.length)}}});var hf,o8=Mt(()=>{E2();sm();Gu();Ks();hf=class extends Y1{constructor(e){super(e),this._values=new wc(Uint8Array)}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,r){return super.setValue(e,Jc(r))}_flushPending(e,r){}};hf.prototype._flushPending=Hu.prototype._flushPending});var pf,l8=Mt(()=>{E2();Gu();Ks();am();pf=class extends Y1{constructor(e){super(e),this._values=new wc(Uint8Array)}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,r){return super.setValue(e,Jc(r))}_flushPending(e,r){}};pf.prototype._flushPending=Wu.prototype._flushPending});var c8,Nb,Db=Mt(()=>{W1();sm();am();q5();z5();H5();W5();Y5();X5();J5();K5();Q5();Z5();e8();t8();r8();n8();i8();s8();a8();o8();l8();c8=class extends Gn{visitNull(){return x3}visitBool(){return n3}visitInt(){return T1}visitInt8(){return c3}visitInt16(){return u3}visitInt32(){return f3}visitInt64(){return h3}visitUint8(){return p3}visitUint16(){return m3}visitUint32(){return g3}visitUint64(){return y3}visitFloat(){return ou}visitFloat16(){return a3}visitFloat32(){return o3}visitFloat64(){return l3}visitUtf8(){return hf}visitLargeUtf8(){return pf}visitBinary(){return Hu}visitLargeBinary(){return Wu}visitFixedSizeBinary(){return J2}visitDate(){return au}visitDateDay(){return W2}visitDateMillisecond(){return Y2}visitTimestamp(){return zl}visitTimestampSecond(){return sf}visitTimestampMillisecond(){return af}visitTimestampMicrosecond(){return of}visitTimestampNanosecond(){return lf}visitTime(){return Hl}visitTimeSecond(){return cf}visitTimeMillisecond(){return uf}visitTimeMicrosecond(){return ff}visitTimeNanosecond(){return df}visitDecimal(){return X2}visitList(){return b3}visitStruct(){return _3}visitUnion(){return Yu}visitDenseUnion(){return E3}visitSparseUnion(){return S3}visitDictionary(){return i3}visitInterval(){return Oc}visitIntervalDayTime(){return K2}visitIntervalYearMonth(){return Q2}visitIntervalMonthDayNano(){return Z2}visitDuration(){return ql}visitDurationSecond(){return ef}visitDurationMillisecond(){return tf}visitDurationMicrosecond(){return rf}visitDurationNanosecond(){return nf}visitFixedSizeList(){return s3}visitMap(){return v3}},Nb=new c8});function I1(t,e){return e instanceof t.constructor}function w3(t,e){return t===e||I1(t,e)}function Xu(t,e){return t===e||I1(t,e)&&t.bitWidth===e.bitWidth&&t.isSigned===e.isSigned}function om(t,e){return t===e||I1(t,e)&&t.precision===e.precision}function MS(t,e){return t===e||I1(t,e)&&t.byteWidth===e.byteWidth}function u8(t,e){return t===e||I1(t,e)&&t.unit===e.unit}function Dp(t,e){return t===e||I1(t,e)&&t.unit===e.unit&&t.timezone===e.timezone}function Rp(t,e){return t===e||I1(t,e)&&t.unit===e.unit&&t.bitWidth===e.bitWidth}function BS(t,e){return t===e||I1(t,e)&&t.children.length===e.children.length&&lu.compareManyFields(t.children,e.children)}function FS(t,e){return t===e||I1(t,e)&&t.children.length===e.children.length&&lu.compareManyFields(t.children,e.children)}function f8(t,e){return t===e||I1(t,e)&&t.mode===e.mode&&t.typeIds.every((r,i)=>r===e.typeIds[i])&&lu.compareManyFields(t.children,e.children)}function $S(t,e){return t===e||I1(t,e)&&t.id===e.id&&t.isOrdered===e.isOrdered&&lu.visit(t.indices,e.indices)&&lu.visit(t.dictionary,e.dictionary)}function lm(t,e){return t===e||I1(t,e)&&t.unit===e.unit}function kp(t,e){return t===e||I1(t,e)&&t.unit===e.unit}function PS(t,e){return t===e||I1(t,e)&&t.listSize===e.listSize&&t.children.length===e.children.length&&lu.compareManyFields(t.children,e.children)}function US(t,e){return t===e||I1(t,e)&&t.keysSorted===e.keysSorted&&t.children.length===e.children.length&&lu.compareManyFields(t.children,e.children)}function A3(t,e){return lu.compareSchemas(t,e)}function Rb(t,e){return lu.compareFields(t,e)}function cm(t,e){return lu.visit(t,e)}var ei,lu,Mp=Mt(()=>{W1();ei=class extends Gn{compareSchemas(e,r){return e===r||r instanceof e.constructor&&this.compareManyFields(e.fields,r.fields)}compareManyFields(e,r){return e===r||Array.isArray(e)&&Array.isArray(r)&&e.length===r.length&&e.every((i,s)=>this.compareFields(i,r[s]))}compareFields(e,r){return e===r||r instanceof e.constructor&&e.name===r.name&&e.nullable===r.nullable&&this.visit(e.type,r.type)}};ei.prototype.visitNull=w3;ei.prototype.visitBool=w3;ei.prototype.visitInt=Xu;ei.prototype.visitInt8=Xu;ei.prototype.visitInt16=Xu;ei.prototype.visitInt32=Xu;ei.prototype.visitInt64=Xu;ei.prototype.visitUint8=Xu;ei.prototype.visitUint16=Xu;ei.prototype.visitUint32=Xu;ei.prototype.visitUint64=Xu;ei.prototype.visitFloat=om;ei.prototype.visitFloat16=om;ei.prototype.visitFloat32=om;ei.prototype.visitFloat64=om;ei.prototype.visitUtf8=w3;ei.prototype.visitLargeUtf8=w3;ei.prototype.visitBinary=w3;ei.prototype.visitLargeBinary=w3;ei.prototype.visitFixedSizeBinary=MS;ei.prototype.visitDate=u8;ei.prototype.visitDateDay=u8;ei.prototype.visitDateMillisecond=u8;ei.prototype.visitTimestamp=Dp;ei.prototype.visitTimestampSecond=Dp;ei.prototype.visitTimestampMillisecond=Dp;ei.prototype.visitTimestampMicrosecond=Dp;ei.prototype.visitTimestampNanosecond=Dp;ei.prototype.visitTime=Rp;ei.prototype.visitTimeSecond=Rp;ei.prototype.visitTimeMillisecond=Rp;ei.prototype.visitTimeMicrosecond=Rp;ei.prototype.visitTimeNanosecond=Rp;ei.prototype.visitDecimal=w3;ei.prototype.visitList=BS;ei.prototype.visitStruct=FS;ei.prototype.visitUnion=f8;ei.prototype.visitDenseUnion=f8;ei.prototype.visitSparseUnion=f8;ei.prototype.visitDictionary=$S;ei.prototype.visitInterval=lm;ei.prototype.visitIntervalDayTime=lm;ei.prototype.visitIntervalYearMonth=lm;ei.prototype.visitIntervalMonthDayNano=lm;ei.prototype.visitDuration=kp;ei.prototype.visitDurationSecond=kp;ei.prototype.visitDurationMillisecond=kp;ei.prototype.visitDurationMicrosecond=kp;ei.prototype.visitDurationNanosecond=kp;ei.prototype.visitFixedSizeList=PS;ei.prototype.visitMap=US;lu=new ei});function Ic(t){let e=t.type,r=new(Nb.getVisitFn(e)())(t);if(e.children&&e.children.length>0){let i=t.children||[],s={nullValues:t.nullValues},o=Array.isArray(i)?((h,g)=>i[g]||s):(({name:h})=>i[h]||s);for(let[h,g]of e.children.entries()){let{type:v}=g,x=o(g,h);r.children.push(Ic(Object.assign(Object.assign({},x),{type:v})))}}return r}function nh(t,e){if(t instanceof Gi||t instanceof Bn||t.type instanceof ln||ArrayBuffer.isView(t))return j2(t);let r={type:e??um(t),nullValues:[null]},i=[...fm(r)(t)],s=i.length===1?i[0]:i.reduce((o,h)=>o.concat(h));return ln.isDictionary(s.type)?s.memoize():s}function d8(t){let e=nh(t),r=new Os(new es(e.type.children),e.data[0]);return new ro(r)}function um(t){if(t.length===0)return new Eo;let e=0,r=0,i=0,s=0,o=0,h=0,g=0,v=0;for(let x of t){if(x==null){++e;continue}switch(typeof x){case"bigint":++h;continue;case"boolean":++g;continue;case"number":++s;continue;case"string":++o;continue;case"object":Array.isArray(x)?++r:Object.prototype.toString.call(x)==="[object Date]"?++v:++i;continue}throw new TypeError("Unable to infer Vector type from input values, explicit type declaration expected.")}if(s+e===t.length)return new ru;if(o+e===t.length)return new zo(new ml,new s1);if(h+e===t.length)return new tu;if(g+e===t.length)return new gl;if(v+e===t.length)return new Wf;if(r+e===t.length){let x=t,_=um(x[x.findIndex(w=>w!=null)]);if(x.every(w=>w==null||cm(_,um(w))))return new E1(new Ti("",_,!0))}else if(i+e===t.length){let x=new Map;for(let _ of t)for(let w of Object.keys(_))!x.has(w)&&_[w]!=null&&x.set(w,new Ti(w,um([_[w]]),!0));return new ys([...x.values()])}throw new TypeError("Unable to infer Vector type from input values, explicit type declaration expected.")}function fm(t){let{["queueingStrategy"]:e="count"}=t,{["highWaterMark"]:r=e!=="bytes"?Number.POSITIVE_INFINITY:Math.pow(2,14)}=t,i=e!=="bytes"?"length":"byteLength";return function*(s){let o=0,h=Ic(t);for(let g of s)h.append(g)[i]>=r&&++o&&(yield h.toVector());(h.finish().length>0||o===0)&&(yield h.toVector())}}function h8(t){let{["queueingStrategy"]:e="count"}=t,{["highWaterMark"]:r=e!=="bytes"?Number.POSITIVE_INFINITY:Math.pow(2,14)}=t,i=e!=="bytes"?"length":"byteLength";return function(s){return y1(this,arguments,function*(){var o,h,g,v;let x=0,_=Ic(t);try{for(var w=!0,O=dl(s),I;I=yield bi(O.next()),o=I.done,!o;w=!0){v=I.value,w=!1;let H=v;_.append(H)[i]>=r&&++x&&(yield yield bi(_.toVector()))}}catch(H){h={error:H}}finally{try{!w&&!o&&(g=O.return)&&(yield bi(g.call(O)))}finally{if(h)throw h.error}}(_.finish().length>0||x===0)&&(yield yield bi(_.toVector()))})}}var Np=Mt(()=>{G1();X1();Ms();su();A1();Db();ih();mf();Mp()});function dm(t,e){return VS(t,e.map(r=>r.data.concat()))}function VS(t,e){let r=[...t.fields],i=[],s={numBatches:e.reduce((w,O)=>Math.max(w,O.length),0)},o=0,h=0,g=-1,v=e.length,x,_=[];for(;s.numBatches-- >0;){for(h=Number.POSITIVE_INFINITY,g=-1;++g0&&(i[o++]=jn({type:new ys(r),length:h,nullCount:0,children:_.slice()})))}return[t=t.assign(r),i.map(w=>new Os(t,w))]}function GS(t,e,r,i,s){var o;let h=(e+63&-64)>>3;for(let g=-1,v=i.length;++g=e)_===e?r[g]=x:(r[g]=x.slice(0,e),s.numBatches=Math.max(s.numBatches,i[g].unshift(x.slice(e,_-e))));else{let w=t[g];t[g]=w.clone({nullable:!0}),r[g]=(o=x?._changeLengthAndBackfillNullBitmap(e))!==null&&o!==void 0?o:jn({type:w.type,length:e,nullCount:e,nullBitmap:new Uint8Array(h)})}}return r}var kb=Mt(()=>{su();Ms();mf()});function p8(t){let e={},r=Object.entries(t);for(let[i,s]of r)e[i]=j2(s);return new ro(e)}function m8(t){let e={},r=Object.entries(t);for(let[i,s]of r)e[i]=nh(s);return new ro(e)}var Mb,ro,ih=Mt(()=>{na();su();Np();A1();X1();Ms();Mp();kb();W4();Yf();_l();Y4();X4();Yd();mf();ro=class t{constructor(...e){var r,i;if(e.length===0)return this.batches=[],this.schema=new es([]),this._offsets=[0],this;let s,o;e[0]instanceof es&&(s=e.shift()),e.at(-1)instanceof Uint32Array&&(o=e.pop());let h=v=>{if(v){if(v instanceof Os)return[v];if(v instanceof t)return v.batches;if(v instanceof Gi){if(v.type instanceof ys)return[new Os(new es(v.type.children),v)]}else{if(Array.isArray(v))return v.flatMap(x=>h(x));if(typeof v[Symbol.iterator]=="function")return[...v].flatMap(x=>h(x));if(typeof v=="object"){let x=Object.keys(v),_=x.map(I=>new Bn([v[I]])),w=s??new es(x.map((I,H)=>new Ti(String(I),_[H].type,_[H].nullable))),[,O]=dm(w,_);return O.length===0?[new Os(v)]:O}}}return[]},g=e.flatMap(v=>h(v));if(s=(i=s??((r=g[0])===null||r===void 0?void 0:r.schema))!==null&&i!==void 0?i:new es([]),!(s instanceof es))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(let v of g){if(!(v instanceof Os))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!A3(s,v.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=s,this.batches=g,this._offsets=o??j4(this.data)}get data(){return this.batches.map(({data:e})=>e)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((e,r)=>e+r.length,0)}get nullCount(){return this._nullCount===-1&&(this._nullCount=G4(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}at(e){return this.get(Xf(e,this.numRows))}set(e,r){}indexOf(e,r){return-1}[Symbol.iterator](){return this.batches.length>0?Kd.visit(new Bn(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[ +return true;`)}function bE(t){return typeof t!="bigint"?Ac(t):`${Ac(t)}n`}var rv=Dt(()=>{hp()});function e8(t,e){let r=Math.ceil(t)*e-1;return(r-r%64+64||64)/e}function nv(t,e=0){return t.length>=e?t.subarray(0,e):Jh(new t.constructor(e),t,0)}var Q1,Wu,ch,Zf,Rc=Dt(()=>{wo();Q1=class{constructor(e,r=0,i=1){this.length=Math.ceil(r/i),this.buffer=new e(this.length),this.stride=i,this.BYTES_PER_ELEMENT=e.BYTES_PER_ELEMENT,this.ArrayType=e}get byteLength(){return Math.ceil(this.length*this.stride)*this.BYTES_PER_ELEMENT}get reservedLength(){return this.buffer.length/this.stride}get reservedByteLength(){return this.buffer.byteLength}set(e,r){return this}append(e){return this.set(this.length,e)}reserve(e){if(e>0){this.length+=e;let r=this.stride,i=this.length*r,s=this.buffer.length;i>=s&&this._resize(s===0?e8(i*1,this.BYTES_PER_ELEMENT):e8(i*2,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=e8(e*this.stride,this.BYTES_PER_ELEMENT);let r=nv(this.buffer,e);return this.clear(),r}clear(){return this.length=0,this.buffer=new this.ArrayType,this}_resize(e){return this.buffer=nv(this.buffer,e)}},Wu=class extends Q1{last(){return this.get(this.length-1)}get(e){return this.buffer[e]}set(e,r){return this.reserve(e-this.length+1),this.buffer[e*this.stride]=r,this}},ch=class extends Wu{constructor(){super(Uint8Array,0,1/8),this.numValid=0}get numInvalid(){return this.length-this.numValid}get(e){return this.buffer[e>>3]>>e%8&1}set(e,r){let{buffer:i}=this.reserve(e-this.length+1),s=e>>3,a=e%8,d=i[s]>>a&1;return r?d===0&&(i[s]|=1<=0&&s.fill(s[i],i,e),s[e]=s[e-1]+r,this}flush(e=this.length-1){return e>this.length&&this.set(e-1,this.BYTES_PER_ELEMENT>4?BigInt(0):0),super.flush(e+1)}}});var ws,no,u1,Ms=Dt(()=>{c1();Yl();kp();vs();rv();Rc();ws=class{static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e){throw new Error('"throughDOM" not available in this environment')}constructor({type:e,nullValues:r}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=r,this.stride=Al(e),this._nulls=new ch,r&&r.length>0&&(this._isValid=tv(r))}toVector(){return new Tn([this.flush()])}get ArrayType(){return this.type.ArrayType}get nullCount(){return this._nulls.numInvalid}get numChildren(){return this.children.length}get byteLength(){let e=0,{_offsets:r,_values:i,_nulls:s,_typeIds:a,children:d}=this;return r&&(e+=r.byteLength),i&&(e+=i.byteLength),s&&(e+=s.byteLength),a&&(e+=a.byteLength),d.reduce((m,v)=>m+v.byteLength,e)}get reservedLength(){return this._nulls.reservedLength}get reservedByteLength(){let e=0;return this._offsets&&(e+=this._offsets.reservedByteLength),this._values&&(e+=this._values.reservedByteLength),this._nulls&&(e+=this._nulls.reservedByteLength),this._typeIds&&(e+=this._typeIds.reservedByteLength),this.children.reduce((r,i)=>r+i.reservedByteLength,e)}get valueOffsets(){return this._offsets?this._offsets.buffer:null}get values(){return this._values?this._values.buffer:null}get nullBitmap(){return this._nulls?this._nulls.buffer:null}get typeIds(){return this._typeIds?this._typeIds.buffer:null}append(e){return this.set(this.length,e)}isValid(e){return this._isValid(e)}set(e,r){return this.setValid(e,this.isValid(r))&&this.setValue(e,r),this}setValue(e,r){this._setValue(this,e,r)}setValid(e,r){return this.length=this._nulls.set(e,+r).length,r}addChild(e,r=`${this.numChildren}`){throw new Error(`Cannot append children to non-nested type "${this.type}"`)}getChildAt(e){return this.children[e]||null}flush(){let e,r,i,s,{type:a,length:d,nullCount:m,_typeIds:v,_offsets:_,_values:x,_nulls:w}=this;(r=v?.flush(d))?s=_?.flush(d):(s=_?.flush(d))?e=x?.flush(_.last()):e=x?.flush(d),m>0&&(i=w?.flush(d));let I=this.children.map(O=>O.flush());return this.clear(),kn({type:a,length:d,nullCount:m,children:I,child:I[0],data:e,typeIds:r,nullBitmap:i,valueOffsets:s})}finish(){this.finished=!0;for(let e of this.children)e.finish();return this}clear(){var e,r,i,s;this.length=0,(e=this._nulls)===null||e===void 0||e.clear(),(r=this._values)===null||r===void 0||r.clear(),(i=this._offsets)===null||i===void 0||i.clear(),(s=this._typeIds)===null||s===void 0||s.clear();for(let a of this.children)a.clear();return this}};ws.prototype.length=1;ws.prototype.stride=1;ws.prototype.children=null;ws.prototype.finished=!1;ws.prototype.nullValues=null;ws.prototype._isValid=()=>!0;no=class extends ws{constructor(e){super(e),this._values=new Wu(this.ArrayType,0,this.stride)}setValue(e,r){let i=this._values;return i.reserve(e-i.length+1),super.setValue(e,r)}},u1=class extends ws{constructor(e){super(e),this._pendingLength=0,this._offsets=new Zf(e.type)}setValue(e,r){let i=this._pending||(this._pending=new Map),s=i.get(e);s&&(this._pendingLength-=s.length),this._pendingLength+=r instanceof Wl?r[Jf].length:r.length,i.set(e,r)}setValid(e,r){return super.setValid(e,r)?!0:((this._pending||(this._pending=new Map)).set(e,void 0),!1)}clear(){return this._pendingLength=0,this._pending=void 0,super.clear()}flush(){return this._flush(),super.flush()}finish(){return this._flush(),super.finish()}_flush(){let e=this._pending,r=this._pendingLength;return this._pendingLength=0,this._pending=void 0,e&&e.size>0&&this._flushPending(e,r),this}}});var o3,t8=Dt(()=>{o3=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(e,r,i,s){return e.prep(8,24),e.writeInt64(BigInt(s??0)),e.pad(4),e.writeInt32(i),e.writeInt64(BigInt(r??0)),e.offset()}}});var Il,iv=Dt(()=>{zi();t8();Yd();T4();C5();Il=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsFooter(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):fs.V1}schema(e){let r=this.bb.__offset(this.bb_pos,6);return r?(e||new Y1).__init(this.bb.__indirect(this.bb_pos+r),this.bb):null}dictionaries(e,r){let i=this.bb.__offset(this.bb_pos,8);return i?(r||new o3).__init(this.bb.__vector(this.bb_pos+i)+e*24,this.bb):null}dictionariesLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,r){let i=this.bb.__offset(this.bb_pos,10);return i?(r||new o3).__init(this.bb.__vector(this.bb_pos+i)+e*24,this.bb):null}recordBatchesLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,r){let i=this.bb.__offset(this.bb_pos,12);return i?(r||new aa).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,r){e.addFieldInt16(0,r,fs.V1)}static addSchema(e,r){e.addFieldOffset(1,r,0)}static addDictionaries(e,r){e.addFieldOffset(2,r,0)}static startDictionariesVector(e,r){e.startVector(24,r,8)}static addRecordBatches(e,r){e.addFieldOffset(3,r,0)}static startRecordBatchesVector(e,r){e.startVector(24,r,8)}static addCustomMetadata(e,r){e.addFieldOffset(4,r,0)}static createCustomMetadataVector(e,r){e.startVector(4,r.length,4);for(let i=r.length-1;i>=0;i--)e.addOffset(r[i]);return e.endVector()}static startCustomMetadataVector(e,r){e.startVector(4,r,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,r){e.finish(r)}static finishSizePrefixedFooterBuffer(e,r){e.finish(r,void 0,!0)}}});function dm(t,e){return new Map([...t||new Map,...e||new Map])}function r8(t,e=new Map){for(let r=-1,i=t.length;++r0&&r8(a.children,e)}return e}var sv,av,Ui,ui,f1=Dt(()=>{oa();vs();sv=Symbol.for("apache-arrow/Schema"),av=Symbol.for("apache-arrow/Field"),Ui=class t{static isSchema(e){return e?.[sv]===!0}constructor(e=[],r,i,s=fs.V5){this.fields=e||[],this.metadata=r||new Map,i||(i=r8(this.fields)),this.dictionaries=i,this.metadataVersion=s}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map(e=>e.name)}toString(){return`Schema<{ ${this.fields.map((e,r)=>`${r}: ${e}`).join(", ")} }>`}select(e){let r=new Set(e),i=this.fields.filter(s=>r.has(s.name));return new t(i,this.metadata)}selectAt(e){let r=e.map(i=>this.fields[i]).filter(Boolean);return new t(r,this.metadata)}assign(...e){let r=e[0]instanceof t?e[0]:Array.isArray(e[0])?new t(e[0]):new t(e),i=[...this.fields],s=dm(dm(new Map,this.metadata),r.metadata),a=r.fields.filter(m=>{let v=i.findIndex(_=>_.name===m.name);return~v?(i[v]=m.clone({metadata:dm(dm(new Map,i[v].metadata),m.metadata)}))&&!1:!0}),d=r8(a,new Map);return new t([...i,...a],s,new Map([...this.dictionaries,...d]))}};Ui.prototype.fields=null;Ui.prototype.metadata=null;Ui.prototype.dictionaries=null;Ui.prototype[sv]=!0;Object.defineProperty(Ui,Symbol.hasInstance,{value:function(e){return Function.prototype[Symbol.hasInstance].call(this,e)||this===Ui&&Ui.isSchema(e)}});ui=class t{static isField(e){return e?.[av]===!0}static new(...e){let[r,i,s,a]=e;return e[0]&&typeof e[0]=="object"&&({name:r}=e[0],i===void 0&&(i=e[0].type),s===void 0&&(s=e[0].nullable),a===void 0&&(a=e[0].metadata)),new t(`${r}`,i,s,a)}constructor(e,r,i=!1,s){this.name=e,this.type=r,this.nullable=i,this.metadata=s||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[r,i,s,a]=e;return!e[0]||typeof e[0]!="object"?[r=this.name,i=this.type,s=this.nullable,a=this.metadata]=e:{name:r=this.name,type:i=this.type,nullable:s=this.nullable,metadata:a=this.metadata}=e[0],t.new(r,i,s,a)}};ui.prototype.type=null;ui.prototype.name=null;ui.prototype.nullable=null;ui.prototype.metadata=null;ui.prototype[av]=!0;Object.defineProperty(ui,Symbol.hasInstance,{value:function(e){return Function.prototype[Symbol.hasInstance].call(this,e)||this===ui&&ui.isField(e)}})});var vE,_E,Yu,n8,Bc,i8=Dt(()=>{t8();iv();zi();f1();oa();wo();au();vE=K2,_E=qo,Yu=class{static decode(e){e=new _E(Wn(e));let r=Il.getRootAsFooter(e),i=Ui.decode(r.schema(),new Map,r.version());return new n8(i,r)}static encode(e){let r=new vE,i=Ui.encode(r,e.schema);Il.startRecordBatchesVector(r,e.numRecordBatches);for(let d of[...e.recordBatches()].slice().reverse())Bc.encode(r,d);let s=r.endVector();Il.startDictionariesVector(r,e.numDictionaries);for(let d of[...e.dictionaryBatches()].slice().reverse())Bc.encode(r,d);let a=r.endVector();return Il.startFooter(r),Il.addSchema(r,i),Il.addVersion(r,fs.V5),Il.addRecordBatches(r,s),Il.addDictionaries(r,a),Il.finishFooterBuffer(r,Il.endFooter(r)),r.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(e,r=fs.V5,i,s){this.schema=e,this.version=r,i&&(this._recordBatches=i),s&&(this._dictionaryBatches=s)}*recordBatches(){for(let e,r=-1,i=this.numRecordBatches;++r=0&&e=0&&e=0&&e=0&&e{zi();Yd();R4();T4();Ol=class t{constructor(){this.bb=null,this.bb_pos=0}__init(e,r){return this.bb_pos=e,this.bb=r,this}static getRootAsMessage(e,r){return(r||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,r){return e.setPosition(e.position()+4),(r||new t).__init(e.readInt32(e.position())+e.position(),e)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):fs.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):Pi.NONE}header(e){let r=this.bb.__offset(this.bb_pos,8);return r?this.bb.__union(e,this.bb_pos+r):null}bodyLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}customMetadata(e,r){let i=this.bb.__offset(this.bb_pos,12);return i?(r||new aa).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,r){e.addFieldInt16(0,r,fs.V1)}static addHeaderType(e,r){e.addFieldInt8(1,r,Pi.NONE)}static addHeader(e,r){e.addFieldOffset(2,r,0)}static addBodyLength(e,r){e.addFieldInt64(3,r,BigInt("0"))}static addCustomMetadata(e,r){e.addFieldOffset(4,r,0)}static createCustomMetadataVector(e,r){e.startVector(4,r.length,4);for(let i=r.length-1;i>=0;i--)e.addOffset(r[i]);return e.endVector()}static startCustomMetadataVector(e,r){e.startVector(4,r,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,r){e.finish(r)}static finishSizePrefixedMessageBuffer(e,r){e.finish(r,void 0,!0)}static createMessage(e,r,i,s,a,d){return t.startMessage(e),t.addVersion(e,r),t.addHeaderType(e,i),t.addHeader(e,s),t.addBodyLength(e,a),t.addCustomMetadata(e,d),t.endMessage(e)}}});var s8,hm,lv=Dt(()=>{K1();L7();N4();S5();E7();w7();T7();A7();D7();R7();O7();b5();y5();A5();T5();E5();v5();C7();I7();N7();I5();g5();_5();x5();w5();s8=class extends jn{visit(e,r){return e==null||r==null?void 0:super.visit(e,r)}visitNull(e,r){return cp.startNull(r),cp.endNull(r)}visitInt(e,r){return Ec.startInt(r),Ec.addBitWidth(r,e.bitWidth),Ec.addIsSigned(r,e.isSigned),Ec.endInt(r)}visitFloat(e,r){return Pf.startFloatingPoint(r),Pf.addPrecision(r,e.precision),Pf.endFloatingPoint(r)}visitBinary(e,r){return rp.startBinary(r),rp.endBinary(r)}visitBinaryView(e,r){return np.startBinaryView(r),np.endBinaryView(r)}visitLargeBinary(e,r){return sp.startLargeBinary(r),sp.endLargeBinary(r)}visitBool(e,r){return ip.startBool(r),ip.endBool(r)}visitUtf8(e,r){return fp.startUtf8(r),fp.endUtf8(r)}visitUtf8View(e,r){return dp.startUtf8View(r),dp.endUtf8View(r)}visitLargeUtf8(e,r){return op.startLargeUtf8(r),op.endLargeUtf8(r)}visitDecimal(e,r){return su.startDecimal(r),su.addScale(r,e.scale),su.addPrecision(r,e.precision),su.addBitWidth(r,e.bitWidth),su.endDecimal(r)}visitDate(e,r){return kf.startDate(r),kf.addUnit(r,e.unit),kf.endDate(r)}visitTime(e,r){return qu.startTime(r),qu.addUnit(r,e.unit),qu.addBitWidth(r,e.bitWidth),qu.endTime(r)}visitTimestamp(e,r){let i=e.timezone&&r.createString(e.timezone)||void 0;return Hu.startTimestamp(r),Hu.addUnit(r,e.unit),i!==void 0&&Hu.addTimezone(r,i),Hu.endTimestamp(r)}visitInterval(e,r){return Uf.startInterval(r),Uf.addUnit(r,e.unit),Uf.endInterval(r)}visitDuration(e,r){return Ff.startDuration(r),Ff.addUnit(r,e.unit),Ff.endDuration(r)}visitList(e,r){return lp.startList(r),lp.endList(r)}visitLargeList(e,r){return ap.startLargeList(r),ap.endLargeList(r)}visitStruct(e,r){return up.startStruct_(r),up.endStruct_(r)}visitUnion(e,r){wc.startTypeIdsVector(r,e.typeIds.length);let i=wc.createTypeIdsVector(r,e.typeIds);return wc.startUnion(r),wc.addMode(r,e.mode),wc.addTypeIds(r,i),wc.endUnion(r)}visitDictionary(e,r){let i=this.visit(e.indices,r);return iu.startDictionaryEncoding(r),iu.addId(r,BigInt(e.id)),iu.addIsOrdered(r,e.isOrdered),i!==void 0&&iu.addIndexType(r,i),iu.endDictionaryEncoding(r)}visitFixedSizeBinary(e,r){return Mf.startFixedSizeBinary(r),Mf.addByteWidth(r,e.byteWidth),Mf.endFixedSizeBinary(r)}visitFixedSizeList(e,r){return $f.startFixedSizeList(r),$f.addListSize(r,e.listSize),$f.endFixedSizeList(r)}visitMap(e,r){return Vf.startMap(r),Vf.addKeysSorted(r,e.keysSorted),Vf.endMap(r)}},hm=new s8});function dv(t,e=new Map){return new Ui(xE(t,e),pm(t.metadata),e)}function a8(t){return new io(t.count,pv(t.columns),mv(t.columns),null,gv(t.columns))}function hv(t){return new d1(a8(t.data),t.id,t.isDelta)}function xE(t,e){return(t.fields||[]).filter(Boolean).map(r=>ui.fromJSON(r,e))}function cv(t,e){return(t.children||[]).filter(Boolean).map(r=>ui.fromJSON(r,e))}function pv(t){return(t||[]).reduce((e,r)=>[...e,new Xl(r.count,SE(r.VALIDITY)),...pv(r.children)],[])}function mv(t,e=[]){for(let r=-1,i=(t||[]).length;++re+ +(r===0),0)}function gv(t){return(t||[]).reduce((e,r)=>[...e,...r.VARIADIC_DATA_BUFFERS?[r.VARIADIC_DATA_BUFFERS.length]:[],...gv(r.children)],[])}function yv(t,e){let r,i,s,a,d,m;return!e||!(a=t.dictionary)?(d=fv(t,cv(t,e)),s=new ui(t.name,d,t.nullable,pm(t.metadata))):e.has(r=a.id)?(i=(i=a.indexType)?uv(i):new l1,m=new Wo(e.get(r),i,r,a.isOrdered),s=new ui(t.name,m,t.nullable,pm(t.metadata))):(i=(i=a.indexType)?uv(i):new l1,e.set(r,d=fv(t,cv(t,e))),m=new Wo(d,i,r,a.isOrdered),s=new ui(t.name,m,t.nullable,pm(t.metadata))),s||null}function pm(t=[]){return new Map(t.map(({key:e,value:r})=>[e,r]))}function uv(t){return new ja(t.isSigned,t.bitWidth)}function fv(t,e){let r=t.type.name;switch(r){case"NONE":return new Ao;case"null":return new Ao;case"binary":return new Ic;case"largebinary":return new Oc;case"binaryview":return new Oi;case"utf8":return new vl;case"largeutf8":return new Cc;case"utf8view":return new A1;case"bool":return new _l;case"list":return new C1((e||[])[0]);case"largelist":return new Sl((e||[])[0]);case"struct":return new _s(e||[]);case"struct_":return new _s(e||[])}switch(r){case"int":{let i=t.type;return new ja(i.isSigned,i.bitWidth)}case"floatingpoint":{let i=t.type;return new X1(ds[i.precision])}case"decimal":{let i=t.type;return new Lc(i.scale,i.precision,i.bitWidth)}case"date":{let i=t.type;return new xl(Es[i.unit])}case"time":{let i=t.type;return new T1(cn[i.unit],i.bitWidth)}case"timestamp":{let i=t.type;return new I1(cn[i.unit],i.timezone)}case"interval":{let i=t.type;return new J1(Ji[i.unit])}case"duration":{let i=t.type;return new O1(cn[i.unit])}case"union":{let i=t.type,[s,...a]=(i.mode+"").toLowerCase(),d=s.toUpperCase()+a.join("");return new L1(ns[d],i.typeIds||[],e||[])}case"fixedsizebinary":{let i=t.type;return new Nc(i.byteWidth)}case"fixedsizelist":{let i=t.type;return new El(i.listSize,(e||[])[0])}case"map":{let i=t.type;return new wl((e||[])[0],i.keysSorted)}}throw new Error(`Unrecognized type: "${r}"`)}var bv=Dt(()=>{f1();vs();e2();oa()});function AE(t,e){return(()=>{switch(e){case Pi.Schema:return Ui.fromJSON(t);case Pi.RecordBatch:return io.fromJSON(t);case Pi.DictionaryBatch:return d1.fromJSON(t)}throw new Error(`Unrecognized Message type: { name: ${Pi[e]}, type: ${e} }`)})}function TE(t,e){return(()=>{switch(e){case Pi.Schema:return Ui.decode(t.header(new Y1),new Map,t.version());case Pi.RecordBatch:return io.decode(t.header(new a1),t.version());case Pi.DictionaryBatch:return d1.decode(t.header(new ju),t.version())}throw new Error(`Unrecognized Message type: { name: ${Pi[e]}, type: ${e} }`)})}function IE(t,e=new Map,r=fs.V5){let i=kE(t,e);return new Ui(i,mm(t),e,r)}function OE(t,e=fs.V5){return new io(t.length(),DE(t),RE(t,e),Sv(t.compression()),BE(t))}function CE(t,e=fs.V5){return new d1(io.decode(t.data(),e),t.id(),t.isDelta())}function LE(t){return new va(t.offset(),t.length())}function NE(t){return new Xl(t.length(),t.nullCount())}function DE(t){let e=[];for(let r,i=-1,s=-1,a=t.nodesLength();++iui.encode(t,a));Y1.startFieldsVector(t,r.length);let i=Y1.createFieldsVector(t,r),s=e.metadata&&e.metadata.size>0?Y1.createCustomMetadataVector(t,[...e.metadata].map(([a,d])=>{let m=t.createString(`${a}`),v=t.createString(`${d}`);return aa.startKeyValue(t),aa.addKey(t,m),aa.addValue(t,v),aa.endKeyValue(t)})):-1;return Y1.startSchema(t),Y1.addFields(t,i),Y1.addEndianness(t,qE?Bf.Little:Bf.Big),s!==-1&&Y1.addCustomMetadata(t,s),Y1.endSchema(t)}function PE(t,e){let r=-1,i=-1,s=-1,a=e.type,d=e.typeId;Hr.isDictionary(a)?(d=a.dictionary.typeId,s=hm.visit(a,t),i=hm.visit(a.dictionary,t)):i=hm.visit(a,t);let m=(a.children||[]).map(x=>ui.encode(t,x)),v=o1.createChildrenVector(t,m),_=e.metadata&&e.metadata.size>0?o1.createCustomMetadataVector(t,[...e.metadata].map(([x,w])=>{let I=t.createString(`${x}`),O=t.createString(`${w}`);return aa.startKeyValue(t),aa.addKey(t,I),aa.addValue(t,O),aa.endKeyValue(t)})):-1;return e.name&&(r=t.createString(e.name)),o1.startField(t),o1.addType(t,i),o1.addTypeType(t,d),o1.addChildren(t,v),o1.addNullable(t,!!e.nullable),r!==-1&&o1.addName(t,r),s!==-1&&o1.addDictionary(t,s),_!==-1&&o1.addCustomMetadata(t,_),o1.endField(t)}function UE(t,e){let r=e.nodes||[],i=e.buffers||[],s=e.variadicBufferCounts||[];a1.startNodesVector(t,r.length);for(let _ of r.slice().reverse())Xl.encode(t,_);let a=t.endVector();a1.startBuffersVector(t,i.length);for(let _ of i.slice().reverse())va.encode(t,_);let d=t.endVector(),m=null;e.compression!==null&&(m=Ev(t,e.compression));let v=-1;return s.length>0&&(v=a1.createVariadicBufferCountsVector(t,s.map(BigInt))),a1.startRecordBatch(t),a1.addLength(t,BigInt(e.length)),a1.addNodes(t,a),a1.addBuffers(t,d),e.compression!==null&&m&&a1.addCompression(t,m),v!==-1&&a1.addVariadicBufferCounts(t,v),a1.endRecordBatch(t)}function Ev(t,e){return Gu.startBodyCompression(t),Gu.addCodec(t,e.type),Gu.addMethod(t,e.method),Gu.endBodyCompression(t)}function VE(t,e){let r=io.encode(t,e.data);return ju.startDictionaryBatch(t),ju.addId(t,BigInt(e.id)),ju.addIsDelta(t,e.isDelta),ju.addData(t,r),ju.endDictionaryBatch(t)}function GE(t,e){return Wd.createFieldNode(t,BigInt(e.length),BigInt(e.nullCount))}function jE(t,e){return zd.createBuffer(t,BigInt(e.offset),BigInt(e.length))}var EE,wE,h1,io,d1,va,Xl,l3,qE,e2=Dt(()=>{zi();C5();N4();p5();x7();d5();O5();h5();D4();Yd();m5();S5();b5();y5();A5();T5();E5();v5();I5();_5();x5();w5();ov();f5();u5();f1();wo();au();oa();lv();bv();vs();EE=K2,wE=qo,h1=class t{static fromJSON(e,r){let i=new t(0,fs.V5,r);return i._createHeader=AE(e,r),i}static decode(e){e=new wE(Wn(e));let r=Ol.getRootAsMessage(e),i=r.bodyLength(),s=r.version(),a=r.headerType(),d=ME(r),m=new t(i,s,a,void 0,d);return m._createHeader=TE(r,a),m}static encode(e){let r=new EE,i=-1;e.isSchema()?i=Ui.encode(r,e.header()):e.isRecordBatch()?i=io.encode(r,e.header()):e.isDictionaryBatch()&&(i=d1.encode(r,e.header()));let s=e.metadata&&e.metadata.size>0?Ol.createCustomMetadataVector(r,[...e.metadata].map(([a,d])=>{let m=r.createString(`${a}`),v=r.createString(`${d}`);return aa.startKeyValue(r),aa.addKey(r,m),aa.addValue(r,v),aa.endKeyValue(r)})):-1;return Ol.startMessage(r),Ol.addVersion(r,fs.V5),Ol.addHeader(r,i),Ol.addHeaderType(r,e.headerType),Ol.addBodyLength(r,BigInt(e.bodyLength)),s!==-1&&Ol.addCustomMetadata(r,s),Ol.finishMessageBuffer(r,Ol.endMessage(r)),r.asUint8Array()}static from(e,r=0){if(e instanceof Ui)return new t(0,fs.V5,Pi.Schema,e);if(e instanceof io)return new t(r,fs.V5,Pi.RecordBatch,e,e.metadata);if(e instanceof d1)return new t(r,fs.V5,Pi.DictionaryBatch,e);throw new Error(`Unrecognized Message header: ${e}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get compression(){return this._compression}get bodyLength(){return this._bodyLength}get metadata(){return this._metadata}header(){return this._createHeader()}isSchema(){return this.headerType===Pi.Schema}isRecordBatch(){return this.headerType===Pi.RecordBatch}isDictionaryBatch(){return this.headerType===Pi.DictionaryBatch}constructor(e,r,i,s,a){this._version=r,this._headerType=i,this.body=new Uint8Array(0),this._compression=s?.compression,s&&(this._createHeader=()=>s),this._bodyLength=Mi(e),this._metadata=a||new Map}},io=class{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}get compression(){return this._compression}get variadicBufferCounts(){return this._variadicBufferCounts}get metadata(){return this._metadata}constructor(e,r,i,s,a=[],d){this._nodes=r,this._buffers=i,this._length=Mi(e),this._compression=s,this._variadicBufferCounts=a,this._metadata=d||new Map}},d1=class{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(e,r,i=!1){this._data=e,this._isDelta=i,this._id=Mi(r)}},va=class{constructor(e,r){this.offset=Mi(e),this.length=Mi(r)}},Xl=class{constructor(e,r){this.length=Mi(e),this.nullCount=Mi(r)}},l3=class{constructor(e,r=Q2.BUFFER){this.type=e,this.method=r}};ui.encode=PE;ui.decode=FE;ui.fromJSON=yv;Ui.encode=$E;Ui.decode=IE;Ui.fromJSON=dv;io.encode=UE;io.decode=OE;io.fromJSON=a8;d1.encode=VE;d1.decode=CE;d1.fromJSON=hv;Xl.encode=GE;Xl.decode=NE;va.encode=jE;va.decode=LE;l3.encode=Ev;l3.decode=Sv;qE=(()=>{let t=new ArrayBuffer(2);return new DataView(t).setInt16(0,256,!0),new Int16Array(t)[0]===256})()});var $s,Up,c3,gm,Vp=Dt(()=>{W1();Qh();$s=Object.freeze({done:!0,value:void 0}),Up=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}},c3=class{tee(){return this._getDOMStream().tee()}pipe(e,r){return this._getNodeStream().pipe(e,r)}pipeTo(e,r){return this._getDOMStream().pipeTo(e,r)}pipeThrough(e,r){return this._getDOMStream().pipeThrough(e,r)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}},gm=class extends c3{constructor(){super(),this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return An(this,void 0,void 0,function*(){yield this.return(e)})}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){let{resolvers:e}=this;for(;e.length>0;)e.shift().resolve($s);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return jo.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return jo.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return An(this,void 0,void 0,function*(){return yield this.abort(e),$s})}return(e){return An(this,void 0,void 0,function*(){return yield this.close(),$s})}read(e){return An(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return An(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((r,i)=>{this.resolvers.push({resolve:r,reject:i})}):Promise.resolve($s)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}}});var Jl,Kl,Z1,o8,Xu,t2=Dt(()=>{W1();Qh();Vu();Vp();wo();Rf();Jl=class extends gm{write(e){if((e=Wn(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?jd(this.toUint8Array(!0)):this.toUint8Array(!1).then(jd)}toUint8Array(e=!1){return e?bl(this._values)[0]:An(this,void 0,void 0,function*(){var r,i,s,a;let d=[],m=0;try{for(var v=!0,_=ml(this),x;x=yield _.next(),r=x.done,!r;v=!0){a=x.value,v=!1;let w=a;d.push(w),m+=w.byteLength}}catch(w){i={error:w}}finally{try{!v&&!r&&(s=_.return)&&(yield s.call(_))}finally{if(i)throw i.error}}return bl(d,m)[0]})}},Kl=class{constructor(e){e&&(this.source=new o8(jo.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}},Z1=class t{constructor(e){e instanceof t?this.source=e.source:e instanceof Jl?this.source=new Xu(jo.fromAsyncIterable(e)):E4(e)?this.source=new Xu(jo.fromNodeStream(e)):Xh(e)?this.source=new Xu(jo.fromDOMStream(e)):x4(e)?this.source=new Xu(jo.fromDOMStream(e.body)):_c(e)?this.source=new Xu(jo.fromIterable(e)):yl(e)?this.source=new Xu(jo.fromAsyncIterable(e)):Hl(e)&&(this.source=new Xu(jo.fromAsyncIterable(e)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}},o8=class{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,"peek").value}read(e){return this.next(e,"read").value}next(e,r="read"){return this.source.next({cmd:r,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||$s)}return(e){return Object.create(this.source.return&&this.source.return(e)||$s)}},Xu=class{constructor(e){this.source=e,this._closedPromise=new Promise(r=>this._closedPromiseResolve=r)}cancel(e){return An(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return An(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return An(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(e){return An(this,arguments,void 0,function*(r,i="read"){return yield this.source.next({cmd:i,size:r})})}throw(e){return An(this,void 0,void 0,function*(){let r=this.source.throw&&(yield this.source.throw(e))||$s;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(r)})}return(e){return An(this,void 0,void 0,function*(){let r=this.source.return&&(yield this.source.return(e))||$s;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(r)})}}});var Gp,r2,l8=Dt(()=>{W1();t2();wo();Gp=class extends Kl{constructor(e,r){super(),this.position=0,this.buffer=Wn(e),this.size=r===void 0?this.buffer.byteLength:r}readInt32(e){let{buffer:r,byteOffset:i}=this.readAt(e,4);return new DataView(r,i).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),ejp,Int128:()=>qp,Int64:()=>Ju,Uint64:()=>la});function uh(t){return t<0&&(t=4294967295+t+1),`0x${t.toString(16)}`}var fh,c8,jp,la,Ju,qp,f8=Dt(()=>{fh=8,c8=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],jp=class{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){let r=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),i=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),s=r[3]*i[3];this.buffer[0]=s&65535;let a=s>>>16;return s=r[2]*i[3],a+=s,s=r[3]*i[2]>>>0,a+=s,this.buffer[0]+=a<<16,this.buffer[1]=a>>>0>>16,this.buffer[1]+=r[1]*i[3]+r[2]*i[2]+r[3]*i[1],this.buffer[1]+=r[0]*i[3]+r[1]*i[2]+r[2]*i[1]+r[3]*i[0]<<16,this}_plus(e){let r=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],r>>0&&++this.buffer[1],this.buffer[0]=r}lessThan(e){return this.buffer[1]>>0,r[2]=this.buffer[2]+e.buffer[2]>>>0,r[1]=this.buffer[1]+e.buffer[1]>>>0,r[0]=this.buffer[0]+e.buffer[0]>>>0,r[0]>>0&&++r[1],r[1]>>0&&++r[2],r[2]>>0&&++r[3],this.buffer[3]=r[3],this.buffer[2]=r[2],this.buffer[1]=r[1],this.buffer[0]=r[0],this}hex(){return`${uh(this.buffer[3])} ${uh(this.buffer[2])} ${uh(this.buffer[1])} ${uh(this.buffer[0])}`}static multiply(e,r){return new t(new Uint32Array(e.buffer)).times(r)}static add(e,r){return new t(new Uint32Array(e.buffer)).plus(r)}static from(e,r=new Uint32Array(4)){return t.fromString(typeof e=="string"?e:e.toString(),r)}static fromNumber(e,r=new Uint32Array(4)){return t.fromString(e.toString(),r)}static fromString(e,r=new Uint32Array(4)){let i=e.startsWith("-"),s=e.length,a=new t(r);for(let d=i?1:0;dd8,toIntervalDayTimeObjects:()=>p8,toIntervalMonthDayNanoInt32Array:()=>h8,toIntervalMonthDayNanoObjects:()=>m8});function d8(t){var e,r;let i=t.length,s=new Int32Array(i*2);for(let a=0,d=0;a>>0,s[d++]=Number(_>>BigInt(32))>>>0}else d+=2}return s}function p8(t){let e=t.length,r=new Array(e/2);for(let i=0,s=0;i>>0);i[a++]={months:t[s],days:t[s+1],nanoseconds:e?`${d}`:d}}return i}var ym=Dt(()=>{});function Av(t){let e=new Uint8Array(t.length/2);for(let r=0;r>1]=Number.parseInt(t.slice(r,r+2),16);return e}function HE(t){return Av(t.join(""))}function Tv(t,e){let r=new Uint8Array(t.length*16),i=new DataView(r.buffer);for(let[s,a]of t.entries()){let d=s*16,m=a.SIZE;if(i.setInt32(d,m,!0),a.INLINED!==void 0){let v=e(a.INLINED);for(let _=0;_>1)]=Number.parseInt(v.slice(_,_+2),16);i.setInt32(d+8,a.BUFFER_INDEX,!0),i.setInt32(d+12,a.OFFSET,!0)}}return r}function zE(t){return Tv(t,e=>{let r=new Uint8Array(e.length/2);for(let i=0;i>1]=Number.parseInt(e.slice(i,i+2),16);return r})}function WE(t){return Tv(t,e=>new TextEncoder().encode(e))}var dh,bm,vm,Iv=Dt(()=>{Yl();f1();vs();K1();s3();Vu();f8();oa();wo();ym();dh=class extends jn{constructor(e,r,i,s,a=fs.V5,d=[]){super(),this.nodesIndex=-1,this.buffersIndex=-1,this.variadicBufferIndex=-1,this.bytes=e,this.nodes=r,this.buffers=i,this.dictionaries=s,this.metadataVersion=a,this.variadicBufferCounts=d}visit(e){return super.visit(e instanceof ui?e.type:e)}visitNull(e,{length:r}=this.nextFieldNode()){return kn({type:e,length:r})}visitBool(e,{length:r,nullCount:i}=this.nextFieldNode()){return kn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),data:this.readData(e)})}visitInt(e,{length:r,nullCount:i}=this.nextFieldNode()){return kn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),data:this.readData(e)})}visitFloat(e,{length:r,nullCount:i}=this.nextFieldNode()){return kn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),data:this.readData(e)})}visitUtf8(e,{length:r,nullCount:i}=this.nextFieldNode()){return kn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitLargeUtf8(e,{length:r,nullCount:i}=this.nextFieldNode()){return kn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitUtf8View(e,{length:r,nullCount:i}=this.nextFieldNode()){let s=this.readNullBitmap(e,i),a=this.readData(e),d=this.readVariadicBuffers(this.nextVariadicBufferCount());return kn({type:e,length:r,nullCount:i,nullBitmap:s,views:a,variadicBuffers:d})}visitBinary(e,{length:r,nullCount:i}=this.nextFieldNode()){return kn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitLargeBinary(e,{length:r,nullCount:i}=this.nextFieldNode()){return kn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitBinaryView(e,{length:r,nullCount:i}=this.nextFieldNode()){let s=this.readNullBitmap(e,i),a=this.readData(e),d=this.readVariadicBuffers(this.nextVariadicBufferCount());return kn({type:e,length:r,nullCount:i,nullBitmap:s,views:a,variadicBuffers:d})}visitFixedSizeBinary(e,{length:r,nullCount:i}=this.nextFieldNode()){return kn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),data:this.readData(e)})}visitDate(e,{length:r,nullCount:i}=this.nextFieldNode()){return kn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),data:this.readData(e)})}visitTimestamp(e,{length:r,nullCount:i}=this.nextFieldNode()){return kn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),data:this.readData(e)})}visitTime(e,{length:r,nullCount:i}=this.nextFieldNode()){return kn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),data:this.readData(e)})}visitDecimal(e,{length:r,nullCount:i}=this.nextFieldNode()){return kn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),data:this.readData(e)})}visitList(e,{length:r,nullCount:i}=this.nextFieldNode()){return kn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),valueOffsets:this.readOffsets(e),child:this.visit(e.children[0])})}visitLargeList(e,{length:r,nullCount:i}=this.nextFieldNode()){return kn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),valueOffsets:this.readOffsets(e),child:this.visit(e.children[0])})}visitStruct(e,{length:r,nullCount:i}=this.nextFieldNode()){return kn({type:e,length:r,nullCount:i,nullBitmap:this.readNullBitmap(e,i),children:this.visitMany(e.children)})}visitUnion(e,{length:r,nullCount:i}=this.nextFieldNode()){return this.metadataVersion0&&this.readData(e,i)||new Uint8Array(0)}readOffsets(e,r){return this.readData(e,r)}readTypeIds(e,r){return this.readData(e,r)}readData(e,{length:r,offset:i}=this.nextBufferRange()){return this.bytes.subarray(i,i+r)}readVariadicBuffers(e){return Array.from({length:e},()=>this.readData(null))}nextVariadicBufferCount(){var e;return(e=this.variadicBufferCounts[++this.variadicBufferIndex])!==null&&e!==void 0?e:0}readDictionary(e){return this.dictionaries.get(e.id)}},bm=class extends dh{constructor(e,r,i,s,a,d=[]){super(new Uint8Array(0),r,i,s,a,d),this.sources=e}readNullBitmap(e,r,{offset:i}=this.nextBufferRange()){return r<=0?new Uint8Array(0):i3(this.sources[i])}readOffsets(e,{offset:r}=this.nextBufferRange()){return Fi(Uint8Array,Fi(e.OffsetArrayType,this.sources[r]))}readTypeIds(e,{offset:r}=this.nextBufferRange()){return Fi(Uint8Array,Fi(e.ArrayType,this.sources[r]))}readData(e,{offset:r}=this.nextBufferRange()){let{sources:i}=this;if(Hr.isTimestamp(e))return Fi(Uint8Array,Ju.convertArray(i[r]));if((Hr.isInt(e)||Hr.isTime(e))&&e.bitWidth===64||Hr.isDuration(e))return Fi(Uint8Array,Ju.convertArray(i[r]));if(Hr.isDate(e)&&e.unit===Es.MILLISECOND)return Fi(Uint8Array,Ju.convertArray(i[r]));if(Hr.isDecimal(e))return Fi(Uint8Array,qp.convertArray(i[r]));if(Hr.isBinary(e)||Hr.isLargeBinary(e)||Hr.isFixedSizeBinary(e))return HE(i[r]);if(Hr.isBinaryView(e))return zE(i[r]);if(Hr.isUtf8View(e))return WE(i[r]);if(Hr.isBool(e))return i3(i[r]);if(Hr.isUtf8(e)||Hr.isLargeUtf8(e))return gl(i[r].join(""));if(Hr.isInterval(e))switch(e.unit){case Ji.DAY_TIME:return d8(i[r]);case Ji.MONTH_DAY_NANO:return h8(i[r]);default:break}return Fi(Uint8Array,Fi(e.ArrayType,i[r].map(s=>+s)))}readVariadicBuffers(e){let r=[];for(let i=0;i{Rc();Ms();wo();Ku=class extends u1{constructor(e){super(e),this._values=new Q1(Uint8Array)}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,r){return super.setValue(e,Wn(r))}_flushPending(e,r){let i=this._offsets,s=this._values.reserve(r).buffer,a=0;for(let[d,m]of e)if(m===void 0)i.set(d,0);else{let v=m.length;s.set(m,a),i.set(d,v),a+=v}}}});var Qu,xm=Dt(()=>{wo();Rc();Ms();Qu=class extends u1{constructor(e){super(e),this._values=new Q1(Uint8Array)}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,r){return super.setValue(e,Wn(r))}_flushPending(e,r){let i=this._offsets,s=this._values.reserve(r).buffer,a=0;for(let[d,m]of e)if(m===void 0)i.set(d,BigInt(0));else{let v=m.length;s.set(m,a),i.set(d,BigInt(v)),a+=v}}}});var u3,y8=Dt(()=>{Rc();Ms();u3=class extends ws{constructor(e){super(e),this._values=new ch}setValue(e,r){this._values.set(e,+r)}}});var fu,n2,i2,b8=Dt(()=>{Ms();Tl();fu=class extends no{};fu.prototype._setValue=$5;n2=class extends fu{};n2.prototype._setValue=F4;i2=class extends fu{};i2.prototype._setValue=M4});var s2,v8=Dt(()=>{Ms();Tl();s2=class extends no{};s2.prototype._setValue=V5});var f3,_8=Dt(()=>{vs();Ms();Hp();f3=class extends ws{constructor({type:e,nullValues:r,dictionaryHashFunction:i}){super({type:new Wo(e.dictionary,e.indices,e.id,e.isOrdered)}),this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=kc({type:this.type.indices,nullValues:r}),this.dictionary=kc({type:this.type.dictionary,nullValues:null}),typeof i=="function"&&(this.valueToKey=i)}get values(){return this.indices.values}get nullCount(){return this.indices.nullCount}get nullBitmap(){return this.indices.nullBitmap}get byteLength(){return this.indices.byteLength+this.dictionary.byteLength}get reservedLength(){return this.indices.reservedLength+this.dictionary.reservedLength}get reservedByteLength(){return this.indices.reservedByteLength+this.dictionary.reservedByteLength}isValid(e){return this.indices.isValid(e)}setValid(e,r){let i=this.indices;return r=i.setValid(e,r),this.length=i.length,r}setValue(e,r){let i=this._keysToIndices,s=this.valueToKey(r),a=i[s];return a===void 0&&(i[s]=a=this._dictionaryOffset+this.dictionary.append(r).length-1),this.indices.setValue(e,a)}flush(){let e=this.type,r=this._dictionary,i=this.dictionary.toVector(),s=this.indices.flush().clone(e);return s.dictionary=r?r.concat(i):i,this.finished||(this._dictionaryOffset+=i.length),this._dictionary=s.dictionary,this.clear(),s}finish(){return this.indices.finish(),this.dictionary.finish(),this._dictionaryOffset=0,this._keysToIndices=Object.create(null),super.finish()}clear(){return this.indices.clear(),this.dictionary.clear(),super.clear()}valueToKey(e){return typeof e=="string"?e:`${e}`}}});var a2,x8=Dt(()=>{Ms();Tl();a2=class extends no{};a2.prototype._setValue=M5});var h3,S8=Dt(()=>{f1();Ms();vs();h3=class extends ws{setValue(e,r){let[i]=this.children,s=e*this.stride;for(let a=-1,d=this.stride;++a0)throw new Error("FixedSizeListBuilder can only have one child.");let i=this.children.push(e);return this.type=new El(this.type.listSize,new ui(r,e.type,!0)),i}}});var du,p3,m3,g3,E8=Dt(()=>{Bp();Ms();du=class extends no{setValue(e,r){this._values.set(e,r)}},p3=class extends du{setValue(e,r){super.setValue(e,Rp(r))}},m3=class extends du{},g3=class extends du{}});var Fc,o2,l2,c2,w8=Dt(()=>{Ms();Tl();Fc=class extends no{};Fc.prototype._setValue=G5;o2=class extends Fc{};o2.prototype._setValue=z4;l2=class extends Fc{};l2.prototype._setValue=W4;c2=class extends Fc{};c2.prototype._setValue=Y4});var Ql,u2,f2,d2,h2,A8=Dt(()=>{Ms();Tl();Ql=class extends no{};Ql.prototype._setValue=j5;u2=class extends Ql{};u2.prototype._setValue=X4;f2=class extends Ql{};f2.prototype._setValue=J4;d2=class extends Ql{};d2.prototype._setValue=K4;h2=class extends Ql{};h2.prototype._setValue=Q4});var N1,y3,b3,v3,_3,x3,S3,E3,w3,T8=Dt(()=>{Ms();N1=class extends no{setValue(e,r){this._values.set(e,r)}},y3=class extends N1{},b3=class extends N1{},v3=class extends N1{},_3=class extends N1{},x3=class extends N1{},S3=class extends N1{},E3=class extends N1{},w3=class extends N1{}});var A3,I8=Dt(()=>{f1();vs();Rc();Ms();A3=class extends u1{constructor(e){super(e),this._offsets=new Zf(e.type)}addChild(e,r="0"){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new C1(new ui(r,e.type,!0)),this.numChildren-1}_flushPending(e){let r=this._offsets,[i]=this.children;for(let[s,a]of e)if(typeof a>"u")r.set(s,0);else{let d=a,m=d.length,v=r.set(s,m).buffer[s];for(let _=-1;++_{f1();vs();Rc();au();Ms();T3=class extends u1{constructor(e){super(e),this._offsets=new Zf(e.type)}addChild(e,r="0"){if(this.numChildren>0)throw new Error("LargeListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new Sl(new ui(r,e.type,!0)),this.numChildren-1}_flushPending(e){let r=this._offsets,[i]=this.children;for(let[s,a]of e)if(typeof a>"u")r.set(s,BigInt(0));else{let d=a,m=d.length,v=Mi(r.set(s,BigInt(m)).buffer[s]);for(let _=-1;++_{f1();vs();Ms();I3=class extends u1{set(e,r){return super.set(e,r)}setValue(e,r){let i=r instanceof Map?r:new Map(Object.entries(r)),s=this._pending||(this._pending=new Map),a=s.get(e);a&&(this._pendingLength-=a.size),this._pendingLength+=i.size,s.set(e,i)}addChild(e,r=`${this.numChildren}`){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new wl(new ui(r,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){let r=this._offsets,[i]=this.children;for(let[s,a]of e)if(a===void 0)r.set(s,0);else{let{[s]:d,[s+1]:m}=r.set(s,a.size).buffer;for(let v of a.entries())if(i.set(d,v),++d>=m)break}}}});var O3,L8=Dt(()=>{Ms();O3=class extends ws{setValue(e,r){}setValid(e,r){return this.length=Math.max(e+1,this.length),r}}});var C3,N8=Dt(()=>{f1();Ms();vs();C3=class extends ws{setValue(e,r){let{children:i,type:s}=this;switch(Array.isArray(r)||r.constructor){case!0:return s.children.forEach((a,d)=>i[d].set(e,r[d]));case Map:return s.children.forEach((a,d)=>i[d].set(e,r.get(a.name)));default:return s.children.forEach((a,d)=>i[d].set(e,r[a.name]))}}setValid(e,r){return super.setValid(e,r)||this.children.forEach(i=>i.setValid(e,r)),r}addChild(e,r=`${this.numChildren}`){let i=this.children.push(e);return this.type=new _s([...this.type.children,new ui(r,e.type,!0)]),i}}});var Zl,p2,m2,g2,y2,D8=Dt(()=>{Ms();Tl();Zl=class extends no{};Zl.prototype._setValue=P5;p2=class extends Zl{};p2.prototype._setValue=$4;m2=class extends Zl{};m2.prototype._setValue=P4;g2=class extends Zl{};g2.prototype._setValue=U4;y2=class extends Zl{};y2.prototype._setValue=V4});var ec,b2,v2,_2,x2,R8=Dt(()=>{Ms();Tl();ec=class extends no{};ec.prototype._setValue=U5;b2=class extends ec{};b2.prototype._setValue=G4;v2=class extends ec{};v2.prototype._setValue=j4;_2=class extends ec{};_2.prototype._setValue=q4;x2=class extends ec{};x2.prototype._setValue=H4});var Zu,L3,N3,B8=Dt(()=>{f1();Rc();Ms();vs();Zu=class extends ws{constructor(e){super(e),this._typeIds=new Wu(Int8Array,0,1),typeof e.valueToChildTypeId=="function"&&(this._valueToChildTypeId=e.valueToChildTypeId)}get typeIdToChildIndex(){return this.type.typeIdToChildIndex}append(e,r){return this.set(this.length,e,r)}set(e,r,i){return i===void 0&&(i=this._valueToChildTypeId(this,r,e)),this.setValue(e,r,i),this}setValue(e,r,i){this._typeIds.set(e,i);let s=this.type.typeIdToChildIndex[i],a=this.children[s];a?.set(e,r),this.length=Math.max(e+1,this.length)}addChild(e,r=`${this.children.length}`){let i=this.children.push(e),{type:{children:s,mode:a,typeIds:d}}=this,m=[...s,new ui(r,e.type)];return this.type=new L1(a,[...d,i],m),i}_valueToChildTypeId(e,r,i){throw new Error("Cannot map UnionBuilder value to child typeId. Pass the `childTypeId` as the second argument to unionBuilder.append(), or supply a `valueToChildTypeId` function as part of the UnionBuilder constructor options.")}},L3=class extends Zu{},N3=class extends Zu{constructor(e){super(e),this._offsets=new Wu(Int32Array)}setValue(e,r,i){let s=this._typeIds.set(e,i).buffer[e],a=this.getChildAt(this.type.typeIdToChildIndex[s]),d=this._offsets.set(e,a.length).buffer[e];a?.set(d,r),this.length=Math.max(e+1,this.length)}}});var S2,k8=Dt(()=>{Vu();_m();Rc();Ms();S2=class extends u1{constructor(e){super(e),this._values=new Q1(Uint8Array)}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,r){return super.setValue(e,gl(r))}_flushPending(e,r){}};S2.prototype._flushPending=Ku.prototype._flushPending});var E2,F8=Dt(()=>{Vu();Rc();Ms();xm();E2=class extends u1{constructor(e){super(e),this._values=new Q1(Uint8Array)}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,r){return super.setValue(e,gl(r))}_flushPending(e,r){}};E2.prototype._flushPending=Qu.prototype._flushPending});var ef,Sm=Dt(()=>{vs();Ms();Rc();wo();Yl();ef=class extends ws{constructor(e){super(e),this._variadicBuffers=[],this._currentBuffer=null,this._currentBufferIndex=0,this._currentBufferOffset=0,this._bufferSize=32*1024*1024,this._views=new Q1(Uint8Array)}get byteLength(){let e=0;this._views&&(e+=this._views.byteLength),this._nulls&&(e+=this._nulls.byteLength);for(let r of this._variadicBuffers)e+=r.byteLength;return this._currentBuffer&&(e+=this._currentBuffer.byteLength),e}setValue(e,r){return this.writeBinaryValue(e,this.encodeValue(r))}writeBinaryValue(e,r){let i=r.length,s=(e+1)*Oi.ELEMENT_WIDTH,a=this._views.length;s>a&&this._views.reserve(s-a);let d=this._views.buffer,m=e*Oi.ELEMENT_WIDTH,v=new DataView(d.buffer,d.byteOffset+m,Oi.ELEMENT_WIDTH);if(v.setInt32(Oi.LENGTH_OFFSET,i,!0),i<=Oi.INLINE_CAPACITY){d.set(r,m+Oi.INLINE_OFFSET);for(let _=i;_this._bufferSize)&&(this._currentBuffer&&this._variadicBuffers.push(this._currentBuffer.buffer.slice(0,this._currentBufferOffset)),this._currentBuffer=new Q1(Uint8Array),this._currentBufferIndex=this._variadicBuffers.length,this._currentBufferOffset=0),this._currentBuffer.reserve(i).buffer.set(r,this._currentBufferOffset),v.setInt32(Oi.BUFFER_INDEX_OFFSET,this._currentBufferIndex,!0),v.setInt32(Oi.BUFFER_OFFSET_OFFSET,this._currentBufferOffset,!0),this._currentBufferOffset+=i}return this}encodeValue(e){return Wn(e)}setValid(e,r){let i=(e+1)*Oi.ELEMENT_WIDTH,s=this._views.length;i>s&&this._views.reserve(i-s);let a=super.setValid(e,r);if(!a){let d=this._views.buffer,m=e*Oi.ELEMENT_WIDTH;for(let v=0;v0&&(this._variadicBuffers.push(this._currentBuffer.buffer.slice(0,this._currentBufferOffset)),this._currentBuffer=null,this._currentBufferOffset=0);let d=s.flush(r*Oi.ELEMENT_WIDTH),m=i>0?a.flush(r):void 0,v=this._variadicBuffers.slice();return this._variadicBuffers=[],this._currentBufferIndex=0,this.clear(),kn({type:e,length:r,nullCount:i,nullBitmap:m,views:d,variadicBuffers:v})}finish(){return this.finished=!0,this}}});var D3,M8=Dt(()=>{Sm();Vu();D3=class extends ef{constructor(e){super(e)}setValue(e,r){return this.writeBinaryValue(e,gl(r))}}});var $8,Ov,Cv=Dt(()=>{K1();_m();xm();y8();b8();v8();_8();x8();S8();E8();w8();A8();T8();I8();O8();C8();L8();N8();D8();R8();B8();k8();F8();Sm();M8();$8=class extends jn{visitNull(){return O3}visitBool(){return u3}visitInt(){return N1}visitInt8(){return y3}visitInt16(){return b3}visitInt32(){return v3}visitInt64(){return _3}visitUint8(){return x3}visitUint16(){return S3}visitUint32(){return E3}visitUint64(){return w3}visitFloat(){return du}visitFloat16(){return p3}visitFloat32(){return m3}visitFloat64(){return g3}visitUtf8(){return S2}visitLargeUtf8(){return E2}visitBinary(){return Ku}visitLargeBinary(){return Qu}visitFixedSizeBinary(){return a2}visitDate(){return fu}visitDateDay(){return n2}visitDateMillisecond(){return i2}visitTimestamp(){return Zl}visitTimestampSecond(){return p2}visitTimestampMillisecond(){return m2}visitTimestampMicrosecond(){return g2}visitTimestampNanosecond(){return y2}visitTime(){return ec}visitTimeSecond(){return b2}visitTimeMillisecond(){return v2}visitTimeMicrosecond(){return _2}visitTimeNanosecond(){return x2}visitDecimal(){return s2}visitList(){return A3}visitLargeList(){return T3}visitStruct(){return C3}visitUnion(){return Zu}visitDenseUnion(){return N3}visitSparseUnion(){return L3}visitDictionary(){return f3}visitInterval(){return Fc}visitIntervalDayTime(){return o2}visitIntervalYearMonth(){return l2}visitIntervalMonthDayNano(){return c2}visitDuration(){return Ql}visitDurationSecond(){return u2}visitDurationMillisecond(){return f2}visitDurationMicrosecond(){return d2}visitDurationNanosecond(){return h2}visitFixedSizeList(){return h3}visitMap(){return I3}visitBinaryView(){return ef}visitUtf8View(){return D3}},Ov=new $8});function D1(t,e){return e instanceof t.constructor}function tf(t,e){return t===e||D1(t,e)}function rf(t,e){return t===e||D1(t,e)&&t.bitWidth===e.bitWidth&&t.isSigned===e.isSigned}function Em(t,e){return t===e||D1(t,e)&&t.precision===e.precision}function YE(t,e){return t===e||D1(t,e)&&t.byteWidth===e.byteWidth}function P8(t,e){return t===e||D1(t,e)&&t.unit===e.unit}function zp(t,e){return t===e||D1(t,e)&&t.unit===e.unit&&t.timezone===e.timezone}function Wp(t,e){return t===e||D1(t,e)&&t.unit===e.unit&&t.bitWidth===e.bitWidth}function Lv(t,e){return t===e||D1(t,e)&&t.children.length===e.children.length&&hu.compareManyFields(t.children,e.children)}function XE(t,e){return t===e||D1(t,e)&&t.children.length===e.children.length&&hu.compareManyFields(t.children,e.children)}function U8(t,e){return t===e||D1(t,e)&&t.mode===e.mode&&t.typeIds.every((r,i)=>r===e.typeIds[i])&&hu.compareManyFields(t.children,e.children)}function JE(t,e){return t===e||D1(t,e)&&t.id===e.id&&t.isOrdered===e.isOrdered&&hu.visit(t.indices,e.indices)&&hu.visit(t.dictionary,e.dictionary)}function wm(t,e){return t===e||D1(t,e)&&t.unit===e.unit}function Yp(t,e){return t===e||D1(t,e)&&t.unit===e.unit}function KE(t,e){return t===e||D1(t,e)&&t.listSize===e.listSize&&t.children.length===e.children.length&&hu.compareManyFields(t.children,e.children)}function QE(t,e){return t===e||D1(t,e)&&t.keysSorted===e.keysSorted&&t.children.length===e.children.length&&hu.compareManyFields(t.children,e.children)}function R3(t,e){return hu.compareSchemas(t,e)}function Nv(t,e){return hu.compareFields(t,e)}function Am(t,e){return hu.visit(t,e)}var ei,hu,Xp=Dt(()=>{K1();ei=class extends jn{compareSchemas(e,r){return e===r||r instanceof e.constructor&&this.compareManyFields(e.fields,r.fields)}compareManyFields(e,r){return e===r||Array.isArray(e)&&Array.isArray(r)&&e.length===r.length&&e.every((i,s)=>this.compareFields(i,r[s]))}compareFields(e,r){return e===r||r instanceof e.constructor&&e.name===r.name&&e.nullable===r.nullable&&this.visit(e.type,r.type)}};ei.prototype.visitNull=tf;ei.prototype.visitBool=tf;ei.prototype.visitInt=rf;ei.prototype.visitInt8=rf;ei.prototype.visitInt16=rf;ei.prototype.visitInt32=rf;ei.prototype.visitInt64=rf;ei.prototype.visitUint8=rf;ei.prototype.visitUint16=rf;ei.prototype.visitUint32=rf;ei.prototype.visitUint64=rf;ei.prototype.visitFloat=Em;ei.prototype.visitFloat16=Em;ei.prototype.visitFloat32=Em;ei.prototype.visitFloat64=Em;ei.prototype.visitUtf8=tf;ei.prototype.visitLargeUtf8=tf;ei.prototype.visitUtf8View=tf;ei.prototype.visitBinary=tf;ei.prototype.visitLargeBinary=tf;ei.prototype.visitBinaryView=tf;ei.prototype.visitFixedSizeBinary=YE;ei.prototype.visitDate=P8;ei.prototype.visitDateDay=P8;ei.prototype.visitDateMillisecond=P8;ei.prototype.visitTimestamp=zp;ei.prototype.visitTimestampSecond=zp;ei.prototype.visitTimestampMillisecond=zp;ei.prototype.visitTimestampMicrosecond=zp;ei.prototype.visitTimestampNanosecond=zp;ei.prototype.visitTime=Wp;ei.prototype.visitTimeSecond=Wp;ei.prototype.visitTimeMillisecond=Wp;ei.prototype.visitTimeMicrosecond=Wp;ei.prototype.visitTimeNanosecond=Wp;ei.prototype.visitDecimal=tf;ei.prototype.visitList=Lv;ei.prototype.visitLargeList=Lv;ei.prototype.visitStruct=XE;ei.prototype.visitUnion=U8;ei.prototype.visitDenseUnion=U8;ei.prototype.visitSparseUnion=U8;ei.prototype.visitDictionary=JE;ei.prototype.visitInterval=wm;ei.prototype.visitIntervalDayTime=wm;ei.prototype.visitIntervalYearMonth=wm;ei.prototype.visitIntervalMonthDayNano=wm;ei.prototype.visitDuration=Yp;ei.prototype.visitDurationSecond=Yp;ei.prototype.visitDurationMillisecond=Yp;ei.prototype.visitDurationMicrosecond=Yp;ei.prototype.visitDurationNanosecond=Yp;ei.prototype.visitFixedSizeList=KE;ei.prototype.visitMap=QE;hu=new ei});function kc(t){let e=t.type,r=new(Ov.getVisitFn(e)())(t);if(e.children&&e.children.length>0){let i=t.children||[],s={nullValues:t.nullValues},a=Array.isArray(i)?((d,m)=>i[m]||s):(({name:d})=>i[d]||s);for(let[d,m]of e.children.entries()){let{type:v}=m,_=a(m,d);r.children.push(kc(Object.assign(Object.assign({},_),{type:v})))}}return r}function hh(t,e){if(t instanceof Ti||t instanceof Tn||t.type instanceof Hr||ArrayBuffer.isView(t))return Qf(t);let r={type:e??Tm(t),nullValues:[null]},i=[...Im(r)(t)],s=i.length===1?i[0]:i.reduce((a,d)=>a.concat(d));return Hr.isDictionary(s.type)?s.memoize():s}function V8(t){let e=hh(t),r=new hs(new Ui(e.type.children),e.data[0]);return new Hs(r)}function Tm(t){if(t.length===0)return new Ao;let e=0,r=0,i=0,s=0,a=0,d=0,m=0,v=0;for(let _ of t){if(_==null){++e;continue}switch(typeof _){case"bigint":++d;continue;case"boolean":++m;continue;case"number":++s;continue;case"string":++a;continue;case"object":Array.isArray(_)?++r:Object.prototype.toString.call(_)==="[object Date]"?++v:++i;continue}throw new TypeError("Unable to infer Vector type from input values, explicit type declaration expected.")}if(s+e===t.length)return new lu;if(a+e===t.length)return new Wo(new vl,new l1);if(d+e===t.length)return new ou;if(m+e===t.length)return new _l;if(v+e===t.length)return new e3;if(r+e===t.length){let _=t,x=Tm(_[_.findIndex(w=>w!=null)]);if(_.every(w=>w==null||Am(x,Tm(w))))return new C1(new ui("",x,!0))}else if(i+e===t.length){let _=new Map;for(let x of t)for(let w of Object.keys(x))!_.has(w)&&x[w]!=null&&_.set(w,new ui(w,Tm([x[w]]),!0));return new _s([..._.values()])}throw new TypeError("Unable to infer Vector type from input values, explicit type declaration expected.")}function Im(t){let{["queueingStrategy"]:e="count"}=t,{["highWaterMark"]:r=e!=="bytes"?Number.POSITIVE_INFINITY:Math.pow(2,14)}=t,i=e!=="bytes"?"length":"byteLength";return function*(s){let a=0,d=kc(t);for(let m of s)d.append(m)[i]>=r&&++a&&(yield d.toVector());(d.finish().length>0||a===0)&&(yield d.toVector())}}function G8(t){let{["queueingStrategy"]:e="count"}=t,{["highWaterMark"]:r=e!=="bytes"?Number.POSITIVE_INFINITY:Math.pow(2,14)}=t,i=e!=="bytes"?"length":"byteLength";return function(s){return E1(this,arguments,function*(){var a,d,m,v;let _=0,x=kc(t);try{for(var w=!0,I=ml(s),O;O=yield xi(I.next()),a=O.done,!a;w=!0){v=O.value,w=!1;let z=v;x.append(z)[i]>=r&&++_&&(yield yield xi(x.toVector()))}}catch(z){d={error:z}}finally{try{!w&&!a&&(m=I.return)&&(yield xi(m.call(I)))}finally{if(d)throw d.error}}(x.finish().length>0||_===0)&&(yield yield xi(x.toVector()))})}}var Hp=Dt(()=>{W1();f1();vs();Yl();c1();Cv();B3();nf();Xp()});function Om(t,e){return ZE(t,e.map(r=>r.data.concat()))}function ZE(t,e){let r=[...t.fields],i=[],s={numBatches:e.reduce((w,I)=>Math.max(w,I.length),0)},a=0,d=0,m=-1,v=e.length,_,x=[];for(;s.numBatches-- >0;){for(d=Number.POSITIVE_INFINITY,m=-1;++m0&&(i[a++]=kn({type:new _s(r),length:d,nullCount:0,children:x.slice()})))}return[t=t.assign(r),i.map(w=>new hs(t,w))]}function ew(t,e,r,i,s){var a;let d=(e+63&-64)>>3;for(let m=-1,v=i.length;++m=e)x===e?r[m]=_:(r[m]=_.slice(0,e),s.numBatches=Math.max(s.numBatches,i[m].unshift(_.slice(e,x-e))));else{let w=t[m];t[m]=w.clone({nullable:!0}),r[m]=(a=_?._changeLengthAndBackfillNullBitmap(e))!==null&&a!==void 0?a:kn({type:w.type,length:e,nullCount:e,nullBitmap:new Uint8Array(d)})}}return r}var Dv=Dt(()=>{Yl();vs();nf()});function j8(t){let e={},r=Object.entries(t);for(let[i,s]of r)e[i]=Qf(s);return new Hs(e)}function q8(t){let e={},r=Object.entries(t);for(let[i,s]of r)e[i]=hh(s);return new Hs(e)}var Rv,Bv,Hs,B3=Dt(()=>{oa();Yl();Hp();c1();f1();vs();Xp();Dv();lm();t3();Tl();cm();um();sh();nf();Bv=Symbol.for("apache-arrow/Table"),Hs=class t{static isTable(e){return e?.[Bv]===!0}constructor(...e){var r,i;if(e.length===0)return this.batches=[],this.schema=new Ui([]),this._offsets=[0],this;let s,a;e[0]instanceof Ui&&(s=e.shift()),e.at(-1)instanceof Uint32Array&&(a=e.pop());let d=v=>{if(v){if(v instanceof hs)return[v];if(v instanceof t)return v.batches;if(v instanceof Ti){if(v.type instanceof _s)return[new hs(new Ui(v.type.children),v)]}else{if(Array.isArray(v))return v.flatMap(_=>d(_));if(typeof v[Symbol.iterator]=="function")return[...v].flatMap(_=>d(_));if(typeof v=="object"){let _=Object.keys(v),x=_.map(O=>new Tn([v[O]])),w=s??new Ui(_.map((O,z)=>new ui(String(O),x[z].type,x[z].nullable))),[,I]=Om(w,x);return I.length===0?[new hs(v)]:I}}}return[]},m=e.flatMap(v=>d(v));if(s=(i=s??((r=m[0])===null||r===void 0?void 0:r.schema))!==null&&i!==void 0?i:new Ui([]),!(s instanceof Ui))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(let v of m){if(!(v instanceof hs))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!R3(s,v.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=s,this.batches=m,this._offsets=a??im(this.data)}get data(){return this.batches.map(({data:e})=>e)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((e,r)=>e+r.length,0)}get nullCount(){return this._nullCount===-1&&(this._nullCount=nm(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}at(e){return this.get(r3(e,this.numRows))}set(e,r){}indexOf(e,r){return-1}[Symbol.iterator](){return this.batches.length>0?lh.visit(new Tn(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[ ${this.toArray().join(`, `)} -]`}concat(...e){let r=this.schema,i=this.data.concat(e.flatMap(({data:s})=>s));return new t(r,i.map(s=>new Os(r,s)))}slice(e,r){let i=this.schema;[e,r]=Sp({length:this.numRows},e,r);let s=q4(this.data,this._offsets,e,r);return new t(i,s.map(o=>new Os(i,o)))}getChild(e){return this.getChildAt(this.schema.fields.findIndex(r=>r.name===e))}getChildAt(e){if(e>-1&&ei.children[e]);if(r.length===0){let{type:i}=this.schema.fields[e],s=jn({type:i,length:0,nullCount:0});r.push(s._changeLengthAndBackfillNullBitmap(this.numRows))}return new Bn(r)}return null}setChild(e,r){var i;return this.setChildAt((i=this.schema.fields)===null||i===void 0?void 0:i.findIndex(s=>s.name===e),r)}setChildAt(e,r){let i=this.schema,s=[...this.batches];if(e>-1&&ethis.getChildAt(x));[o[e],g[e]]=[h,r],[i,s]=dm(i,g)}return new t(i,s)}select(e){let r=this.schema.fields.reduce((i,s,o)=>i.set(s.name,o),new Map);return this.selectAt(e.map(i=>r.get(i)).filter(i=>i>-1))}selectAt(e){let r=this.schema.selectAt(e),i=this.batches.map(s=>s.selectAt(e));return new t(r,i)}assign(e){let r=this.schema.fields,[i,s]=e.schema.fields.reduce((g,v,x)=>{let[_,w]=g,O=r.findIndex(I=>I.name===v.name);return~O?w[O]=x:_.push(x),g},[[],[]]),o=this.schema.assign(e.schema),h=[...r.map((g,v)=>[v,s[v]]).map(([g,v])=>v===void 0?this.getChildAt(g):e.getChildAt(v)),...i.map(g=>e.getChildAt(g))].filter(Boolean);return new t(...dm(o,h))}};Mb=Symbol.toStringTag;ro[Mb]=(t=>(t.schema=null,t.batches=[],t._offsets=new Uint32Array([0]),t._nullCount=-1,t[Symbol.isConcatSpreadable]=!0,t.isValid=Jd(Ap),t.get=Jd(Qa.getVisitFn(be.Struct)),t.set=z4(Ho.getVisitFn(be.Struct)),t.indexOf=H4(Zf.getVisitFn(be.Struct)),"Table"))(ro.prototype)});function Bb(t,e,r=e.reduce((i,s)=>Math.max(i,s.length),0)){var i;let s=[...t.fields],o=[...e],h=(r+63&-64)>>3;for(let[g,v]of t.fields.entries()){let x=e[g];(!x||x.length!==r)&&(s[g]=v.clone({nullable:!0}),o[g]=(i=x?._changeLengthAndBackfillNullBitmap(r))!==null&&i!==void 0?i:jn({type:v.type,length:r,nullCount:r,nullBitmap:new Uint8Array(h)}))}return[t.assign(s),jn({type:new ys(s),length:r,children:o})]}function $b(t,e,r=new Map){var i,s;if(((i=t?.length)!==null&&i!==void 0?i:0)>0&&t?.length===e?.length)for(let o=-1,h=t.length;++o{su();ih();A1();X1();Ms();Yd();Yf();_l();Y4();X4();Os=class t{constructor(...e){switch(e.length){case 2:{if([this.schema]=e,!(this.schema instanceof es))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=jn({nullCount:0,type:new ys(this.schema.fields),children:this.schema.fields.map(r=>jn({type:r.type,nullCount:0}))})]=e,!(this.data instanceof Gi))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=Bb(this.schema,this.data.children);break}case 1:{let[r]=e,{fields:i,children:s,length:o}=Object.keys(r).reduce((v,x,_)=>(v.children[_]=r[x],v.length=Math.max(v.length,r[x].length),v.fields[_]=Ti.new({name:x,type:r[x].type,nullable:!0}),v),{length:0,fields:new Array,children:new Array}),h=new es(i),g=jn({type:new ys(i),length:o,children:s,nullCount:0});[this.schema,this.data]=Bb(h,g.children,o);break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=$b(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(e){return this.data.getValid(e)}get(e){return Qa.visit(this.data,e)}at(e){return this.get(Xf(e,this.numRows))}set(e,r){return Ho.visit(this.data,e,r)}indexOf(e,r){return Zf.visit(this.data,e,r)}[Symbol.iterator](){return Kd.visit(new Bn([this.data]))}toArray(){return[...this]}concat(...e){return new ro(this.schema,[this,...e])}slice(e,r){let[i]=new Bn([this.data]).slice(e,r).data;return new t(this.schema,i)}getChild(e){var r;return this.getChildAt((r=this.schema.fields)===null||r===void 0?void 0:r.findIndex(i=>i.name===e))}getChildAt(e){return e>-1&&es.name===e),r)}setChildAt(e,r){let i=this.schema,s=this.data;if(e>-1&&eg.name===o);~h&&(s[h]=this.data.children[h])}return new t(r,jn({type:i,length:this.numRows,children:s}))}selectAt(e){let r=this.schema.selectAt(e),i=e.map(o=>this.data.children[o]).filter(Boolean),s=jn({type:new ys(r.fields),length:this.numRows,children:i});return new t(r,s)}};Fb=Symbol.toStringTag;Os[Fb]=(t=>(t._nullCount=-1,t[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(Os.prototype);T3=class extends Os{constructor(e){let r=e.fields.map(s=>jn({type:s.type})),i=jn({type:new ys(e.fields),nullCount:0,children:r});super(e,i)}}});function pm(t,e=0){for(let r=-1,i=sh.length;++r{G1();na();Zi();q2();w2();M5();Lo();z2();Ip();y8=t=>`Expected ${Bi[t]} Message in stream, but was null or length 0.`,b8=t=>`Header pointer of flatbuffer-encoded ${Bi[t]} Message is null or length 0.`,Pb=(t,e)=>`Expected to read ${t} metadata bytes, but only read ${e}.`,Ub=(t,e)=>`Expected to read ${t} bytes for message body, but only read ${e}.`,gf=class{constructor(e){this.source=e instanceof jl?e:new jl(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done?Bs:e.value===-1&&(e=this.readMetadataLength()).done?Bs:(e=this.readMetadata(e.value)).done?Bs:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let r;if((r=this.next()).done)return null;if(e!=null&&r.value.headerType!==e)throw new Error(y8(e));return r.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);let r=oi(this.source.read(e));if(r.byteLength[...s,...o.VALIDITY&&[o.VALIDITY]||[],...o.TYPE_ID&&[o.TYPE_ID]||[],...o.OFFSET&&[o.OFFSET]||[],...o.DATA&&[o.DATA]||[],...r(o.children)],[])}}readMessage(e){let r;if((r=this.next()).done)return null;if(e!=null&&r.value.headerType!==e)throw new Error(y8(e));return r.value}readSchema(){let e=Bi.Schema,r=this.readMessage(e),i=r?.header();if(!r||!i)throw new Error(b8(e));return i}},hm=4,g8="ARROW1",sh=new Uint8Array(g8.length);for(let t=0;t{Md();x8=class{constructor(){this.LZ4_FRAME_MAGIC=new Uint8Array([4,34,77,24]),this.MIN_HEADER_LENGTH=7}isValidCodecEncode(e){let r=new Uint8Array([1,2,3,4,5,6,7,8]),i=e.encode(r);return this._isValidCompressed(i)}_isValidCompressed(e){return this._hasMinimumLength(e)&&this._hasValidMagicNumber(e)&&this._hasValidVersion(e)}_hasMinimumLength(e){return e.length>=this.MIN_HEADER_LENGTH}_hasValidMagicNumber(e){return this.LZ4_FRAME_MAGIC.every((r,i)=>e[i]===r)}_hasValidVersion(e){return(e[4]&192)>>6===1}},_8=class{constructor(){this.ZSTD_MAGIC=new Uint8Array([40,181,47,253]),this.MIN_HEADER_LENGTH=6}isValidCodecEncode(e){let r=new Uint8Array([1,2,3,4,5,6,7,8]),i=e.encode(r);return this._isValidCompressed(i)}_isValidCompressed(e){return this._hasMinimumLength(e)&&this._hasValidMagicNumber(e)}_hasMinimumLength(e){return e.length>=this.MIN_HEADER_LENGTH}_hasValidMagicNumber(e){return this.ZSTD_MAGIC.every((r,i)=>e[i]===r)}},Gb={[qo.LZ4_FRAME]:new x8,[qo.ZSTD]:new _8}});var S8,yf,gm=Mt(()=>{Md();jb();S8=class{constructor(){this.registry={}}set(e,r){if(r?.encode&&typeof r.encode=="function"&&!Gb[e].isValidCodecEncode(r))throw new Error(`Encoder for ${qo[e]} is not valid.`);this.registry[e]=r}get(e){var r;return((r=this.registry)===null||r===void 0?void 0:r[e])||null}},yf=new S8});function Wb(t,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:t.autoDestroy}function*qb(t){let e=O1.from(t);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}function zb(t){return y1(this,arguments,function*(){let r=yield bi(O1.from(t));try{if(!(yield bi(r.open({autoDestroy:!1}))).closed)do yield yield bi(r);while(!(yield bi(r.reset().open())).closed)}finally{yield bi(r.cancel())}})}function qS(t){return new Cc(new w8(t))}function zS(t){let e=t.peek(ah+7&-8);return e&&e.byteLength>=4?pm(e)?new Ku(new bm(t.read())):new Cc(new lh(t)):new Cc(new lh((function*(){})()))}function HS(t){return An(this,void 0,void 0,function*(){let e=yield t.peek(ah+7&-8);return e&&e.byteLength>=4?pm(e)?new Ku(new bm(yield t.read())):new Ju(new ch(t)):new Ju(new ch((function(){return y1(this,arguments,function*(){})})()))})}function WS(t){return An(this,void 0,void 0,function*(){let{size:e}=yield t.stat(),r=new H2(t,e);return e>=Vb&&pm(yield r.readAt(0,ah+7&-8))?new oh(new E8(r)):new Ju(new ch(r))})}var O1,Cc,Ju,Ku,oh,ym,lh,ch,bm,E8,w8,Bp=Mt(()=>{G1();su();A1();Ms();na();N5();Vh();q2();z2();M5();Lb();mf();Ip();mm();w2();gm();Pu();Zi();O1=class t extends r3{constructor(e){super(),this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){let r=this._impl.open(e);return hl(r)?r.then(()=>this):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return Go.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Go.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,r){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof t?e:r4(e)?qS(e):i4(e)?WS(e):hl(e)?An(this,void 0,void 0,function*(){return yield t.from(yield e)}):s4(e)||Ph(e)||o4(e)||$l(e)?HS(new J1(e)):zS(new jl(e))}static readAll(e){return e instanceof t?e.isSync()?qb(e):zb(e):r4(e)||ArrayBuffer.isView(e)||fc(e)||n4(e)?qb(e):zb(e)}},Cc=class extends O1{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return y1(this,arguments,function*(){yield bi(yield*Rd(dl(this[Symbol.iterator]())))})}},Ju=class extends O1{constructor(e){super(e),this._impl=e}readAll(){return An(this,void 0,void 0,function*(){var e,r,i,s;let o=new Array;try{for(var h=!0,g=dl(this),v;v=yield g.next(),e=v.done,!e;h=!0){s=v.value,h=!1;let x=s;o.push(x)}}catch(x){r={error:x}}finally{try{!h&&!e&&(i=g.return)&&(yield i.call(g))}finally{if(r)throw r.error}}return o})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}},Ku=class extends Cc{constructor(e){super(e),this._impl=e}},oh=class extends Ju{constructor(e){super(e),this._impl=e}},ym=class{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,r){let i;if(e.compression!=null){let o=yf.get(e.compression.type);if(o?.decode&&typeof o.decode=="function"){let{decommpressedBody:h,buffers:g}=this._decompressBuffers(e,r,o);i=this._loadCompressedVectors(e,h,this.schema.fields),e=new to(e.length,e.nodes,g,null)}else throw new Error("Record batch is compressed but codec not found")}else i=this._loadVectors(e,r,this.schema.fields);let s=jn({type:new ys(this.schema.fields),length:e.length,children:i});return new Os(this.schema,s)}_loadDictionaryBatch(e,r){let{id:i,isDelta:s}=e,{dictionaries:o,schema:h}=this,g=o.get(i),v=h.dictionaries.get(i),x;if(e.data.compression!=null){let _=yf.get(e.data.compression.type);if(_?.decode&&typeof _.decode=="function"){let{decommpressedBody:w,buffers:O}=this._decompressBuffers(e.data,r,_);x=this._loadCompressedVectors(e.data,w,[v]),e=new a1(new to(e.data.length,e.data.nodes,O,null),i,s)}else throw new Error("Dictionary batch is compressed but codec not found")}else x=this._loadVectors(e.data,r,[v]);return(g&&s?g.concat(new Bn(x)):new Bn(x)).memoize()}_loadVectors(e,r,i){return new rh(r,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(i)}_loadCompressedVectors(e,r,i){return new im(r,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(i)}_decompressBuffers(e,r,i){let s=[],o=[],h=0;for(let{offset:g,length:v}of e.buffers){if(v===0){s.push(new Uint8Array(0)),o.push(new eo(h,0));continue}let x=new jo(r.subarray(g,g+v)),_=ts(x.readInt64(0)),w=x.bytes().subarray(8),O=_===-1?w:i.decode(w);s.push(O);let I=(h+7&-8)-h;h+=I,o.push(new eo(h,O.length)),h+=O.length}return{decommpressedBody:s,buffers:o}}},lh=class extends ym{constructor(e,r){super(r),this._reader=r4(e)?new O3(this._handle=e):new gf(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=Wb(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):Bs}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):Bs}next(){if(this.closed)return Bs;let e,{_reader:r}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let i=e.header(),s=r.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(i,s)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),s=r.readMessageBody(e.bodyLength),o=this._loadDictionaryBatch(i,s);this.dictionaries.set(i.id,o)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new T3(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},ch=class extends ym{constructor(e,r){super(r),this._reader=new I3(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return An(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return An(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=Wb(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return An(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):Bs})}return(e){return An(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):Bs})}next(){return An(this,void 0,void 0,function*(){if(this.closed)return Bs;let e,{_reader:r}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let i=e.header(),s=yield r.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(i,s)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),s=yield r.readMessageBody(e.bodyLength),o=this._loadDictionaryBatch(i,s);this.dictionaries.set(i.id,o)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new T3(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return An(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},bm=class extends lh{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,r){super(e instanceof Op?e:new Op(e),r)}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let r of this._footer.dictionaryBatches())r&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){var r;if(this.closed)return null;this._footer||this.open();let i=(r=this._footer)===null||r===void 0?void 0:r.getRecordBatch(e);if(i&&this._handle.seek(i.offset)){let s=this._reader.readMessage(Bi.RecordBatch);if(s?.isRecordBatch()){let o=s.header(),h=this._reader.readMessageBody(s.bodyLength);return this._loadRecordBatch(o,h)}}return null}_readDictionaryBatch(e){var r;let i=(r=this._footer)===null||r===void 0?void 0:r.getDictionaryBatch(e);if(i&&this._handle.seek(i.offset)){let s=this._reader.readMessage(Bi.DictionaryBatch);if(s?.isDictionaryBatch()){let o=s.header(),h=this._reader.readMessageBody(s.bodyLength),g=this._loadDictionaryBatch(o,h);this.dictionaries.set(o.id,g)}}}_readFooter(){let{_handle:e}=this,r=e.size-v8,i=e.readInt32(r),s=e.readAt(r-i,i);return ju.decode(s)}_readNextMessageAndValidate(e){var r;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return An(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let i of this._footer.dictionaryBatches())i&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield r.open.call(this,e)})}readRecordBatch(e){return An(this,void 0,void 0,function*(){var r;if(this.closed)return null;this._footer||(yield this.open());let i=(r=this._footer)===null||r===void 0?void 0:r.getRecordBatch(e);if(i&&(yield this._handle.seek(i.offset))){let s=yield this._reader.readMessage(Bi.RecordBatch);if(s?.isRecordBatch()){let o=s.header(),h=yield this._reader.readMessageBody(s.bodyLength);return this._loadRecordBatch(o,h)}}return null})}_readDictionaryBatch(e){return An(this,void 0,void 0,function*(){var r;let i=(r=this._footer)===null||r===void 0?void 0:r.getDictionaryBatch(e);if(i&&(yield this._handle.seek(i.offset))){let s=yield this._reader.readMessage(Bi.DictionaryBatch);if(s?.isDictionaryBatch()){let o=s.header(),h=yield this._reader.readMessageBody(s.bodyLength),g=this._loadDictionaryBatch(o,h);this.dictionaries.set(o.id,g)}}})}_readFooter(){return An(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let r=e.size-v8,i=yield e.readInt32(r),s=yield e.readAt(r-i,i);return ju.decode(s)})}_readNextMessageAndValidate(e){return An(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex{let w=r.typeIds[_],O=g[w],I=v[w];return x.slice(O,Math.min(i,I))}))}}return this}function XS(t){let e;return t.nullCount>=t.length?Lc.call(this,new Uint8Array(0)):(e=t.values)instanceof Uint8Array?Lc.call(this,Jf(t.offset,t.length,e)):Lc.call(this,Kf(t.values))}function Qu(t){return Lc.call(this,t.values.subarray(0,t.length*t.stride))}function vm(t){let{length:e,values:r,valueOffsets:i}=t,s=ts(i[0]),o=ts(i[e]),h=Math.min(o-s,r.byteLength-s);return Lc.call(this,c4(-s,e+1,i)),Lc.call(this,r.subarray(s,s+h)),this}function T8(t){let{length:e,valueOffsets:r}=t;if(r){let{[0]:i,[e]:s}=r;return Lc.call(this,c4(-i,e+1,r)),this.visit(t.children[0].slice(i,s-i))}return this.visit(t.children[0])}function A8(t){return this.visitMany(t.type.children.map((e,r)=>t.children[r]).filter(Boolean))[0]}var sa,Yb=Mt(()=>{A1();W1();na();mf();Lo();Qf();q2();Ms();Pu();sa=class t extends Gn{static assemble(...e){let r=s=>s.flatMap(o=>Array.isArray(o)?r(o):o instanceof Os?o.data.children:o.data),i=new t;return i.visitMany(r(e)),i}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(e){if(e instanceof Bn)return this.visitMany(e.data),this;let{type:r}=e;if(!ln.isDictionary(r)){let{length:i}=e;if(i>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");if(ln.isUnion(r))this.nodes.push(new Vl(i,0));else{let{nullCount:s}=e;ln.isNull(r)||Lc.call(this,s<=0?new Uint8Array(0):Jf(e.offset,i,e.nullBitmap)),this.nodes.push(new Vl(i,s))}}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.clone(e.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}};sa.prototype.visitBool=XS;sa.prototype.visitInt=Qu;sa.prototype.visitFloat=Qu;sa.prototype.visitUtf8=vm;sa.prototype.visitLargeUtf8=vm;sa.prototype.visitBinary=vm;sa.prototype.visitLargeBinary=vm;sa.prototype.visitFixedSizeBinary=Qu;sa.prototype.visitDate=Qu;sa.prototype.visitTimestamp=Qu;sa.prototype.visitTime=Qu;sa.prototype.visitDecimal=Qu;sa.prototype.visitList=T8;sa.prototype.visitStruct=A8;sa.prototype.visitUnion=YS;sa.prototype.visitInterval=Qu;sa.prototype.visitDuration=Qu;sa.prototype.visitFixedSizeList=T8;sa.prototype.visitMap=T8});var xm,Xb=Mt(()=>{W1();y4();na();xm=class extends Gn{visit(e){return e==null?void 0:super.visit(e)}visitNull({typeId:e}){return{name:vi[e].toLowerCase()}}visitInt({typeId:e,bitWidth:r,isSigned:i}){return{name:vi[e].toLowerCase(),bitWidth:r,isSigned:i}}visitFloat({typeId:e,precision:r}){return{name:vi[e].toLowerCase(),precision:fs[r]}}visitBinary({typeId:e}){return{name:vi[e].toLowerCase()}}visitLargeBinary({typeId:e}){return{name:vi[e].toLowerCase()}}visitBool({typeId:e}){return{name:vi[e].toLowerCase()}}visitUtf8({typeId:e}){return{name:vi[e].toLowerCase()}}visitLargeUtf8({typeId:e}){return{name:vi[e].toLowerCase()}}visitDecimal({typeId:e,scale:r,precision:i,bitWidth:s}){return{name:vi[e].toLowerCase(),scale:r,precision:i,bitWidth:s}}visitDate({typeId:e,unit:r}){return{name:vi[e].toLowerCase(),unit:xs[r]}}visitTime({typeId:e,unit:r,bitWidth:i}){return{name:vi[e].toLowerCase(),unit:cn[r],bitWidth:i}}visitTimestamp({typeId:e,timezone:r,unit:i}){return{name:vi[e].toLowerCase(),unit:cn[i],timezone:r}}visitInterval({typeId:e,unit:r}){return{name:vi[e].toLowerCase(),unit:Hi[r]}}visitDuration({typeId:e,unit:r}){return{name:vi[e].toLocaleLowerCase(),unit:cn[r]}}visitList({typeId:e}){return{name:vi[e].toLowerCase()}}visitStruct({typeId:e}){return{name:vi[e].toLowerCase()}}visitUnion({typeId:e,mode:r,typeIds:i}){return{name:vi[e].toLowerCase(),mode:Qi[r].toUpperCase(),typeIds:[...i]}}visitDictionary(e){return this.visit(e.dictionary)}visitFixedSizeBinary({typeId:e,byteWidth:r}){return{name:vi[e].toLowerCase(),byteWidth:r}}visitFixedSizeList({typeId:e,listSize:r}){return{name:vi[e].toLowerCase(),listSize:r}}visitMap({typeId:e,keysSorted:r}){return{name:vi[e].toLowerCase(),keysSorted:r}}}});function*I8(t){for(let e of t)yield e.reduce((r,i)=>`${r}${("0"+(i&255).toString(16)).slice(-2)}`,"").toUpperCase()}function*bf(t,e){let r=new Uint32Array(t.buffer);for(let i=-1,s=r.length/e;++i{v4();A1();W1();na();na();Qf();rm();Ms();Fp=class t extends Gn{static assemble(...e){let r=new t;return e.map(({schema:i,data:s})=>r.visitMany(i.fields,s.children))}visit({name:e},r){let{length:i}=r,{offset:s,nullCount:o,nullBitmap:h}=r,g=ln.isDictionary(r.type)?r.type.indices:r.type,v=Object.assign([],r.buffers,{[v1.VALIDITY]:void 0});return Object.assign({name:e,count:i,VALIDITY:ln.isNull(g)||ln.isUnion(g)?void 0:o<=0?Array.from({length:i},()=>1):[...new iu(h,s,i,null,V4)]},super.visit(r.clone(g,s,i,0,v)))}visitNull(){return{}}visitBool({values:e,offset:r,length:i}){return{DATA:[...new iu(e,r,i,null,Xd)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[...bf(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...new Bn([e])],OFFSET:[...e.valueOffsets]}}visitLargeUtf8(e){return{DATA:[...new Bn([e])],OFFSET:[...bf(e.valueOffsets,2)]}}visitBinary(e){return{DATA:[...I8(new Bn([e]))],OFFSET:[...e.valueOffsets]}}visitLargeBinary(e){return{DATA:[...I8(new Bn([e]))],OFFSET:[...bf(e.valueOffsets,2)]}}visitFixedSizeBinary(e){return{DATA:[...I8(new Bn([e]))]}}visitDate(e){return{DATA:e.type.unit===xs.DAY?[...e.values]:[...bf(e.values,2)]}}visitTimestamp(e){return{DATA:[...bf(e.values,2)]}}visitTime(e){return{DATA:e.type.unitKb(s)),dictionary:ln.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:i.visit(e.indices)}:void 0}}function JS(t,e,r=!1){let[i]=Fp.assemble(new Os({[e]:t}));return JSON.stringify({id:e,isDelta:r,data:{count:t.length,columns:i}},null,2)}function KS(t){let[e]=Fp.assemble(t);return JSON.stringify({count:t.numRows,columns:e},null,2)}var cu,Zu,e2,$p,_m=Mt(()=>{G1();ih();mm();A1();Ms();q2();q2();N5();na();Mp();z2();Yb();Xb();Jb();Lo();mf();Ip();w2();Md();gm();Zi();cu=class extends r3{static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,r){throw new Error('"throughDOM" not available in this environment')}constructor(e){if(super(),this._position=0,this._started=!1,this._compression=null,this._sink=new Gl,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,b1(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1,compressionType:null}),this._autoDestroy=typeof e.autoDestroy=="boolean"?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat=="boolean"?e.writeLegacyIpcFormat:!1,e.compressionType!=null){if(this._writeLegacyIpcFormat)throw new Error("Legacy IPC format does not support columnar compression. Use modern IPC format (writeLegacyIpcFormat=false).");if(Object.values(qo).includes(e.compressionType))this._compression=new t3(e.compressionType);else{let r=Object.values(qo).filter(i=>typeof i=="string");throw new Error(`Unsupported compressionType: ${e.compressionType} Available types: ${r.join(", ")}`)}}else this._compression=null}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return hl(e)?e.then(r=>this.writeAll(r)):$l(e)?C8(this,e):O8(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,r=null){return e===this._sink||e instanceof Gl?this._sink=e:(this._sink=new Gl,e&&$y(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&Py(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,(!r||!A3(r,this._schema))&&(r==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=r,this._writeSchema(r))),this}write(e){let r=null;if(this._sink){if(e==null)return this.finish()&&void 0;if(e instanceof ro&&!(r=e.schema))return this.finish()&&void 0;if(e instanceof Os&&!(r=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(r&&!A3(r,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,r)}e instanceof Os?e instanceof T3||this._writeRecordBatch(e):e instanceof ro?this.writeAll(e.batches):fc(e)&&this.writeAll(e)}_writeMessage(e,r=8){let i=r-1,s=o1.encode(e),o=s.byteLength,h=this._writeLegacyIpcFormat?4:8,g=o+h+i&~i,v=g-o-h;return e.headerType===Bi.RecordBatch?this._recordBatchBlocks.push(new Ac(g,e.bodyLength,this._position)):e.headerType===Bi.DictionaryBatch&&this._dictionaryBlocks.push(new Ac(g,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(g-h)),o>0&&this._write(s),this._writePadding(v)}_write(e){if(this._started){let r=oi(e);r&&r.byteLength>0&&(this._sink.write(r),this._position+=r.byteLength)}return this}_writeSchema(e){return this._writeMessage(o1.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(sh)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:r,nodes:i,bufferRegions:s,buffers:o}=this._assembleRecordBatch(e),h=new to(e.numRows,i,s,this._compression),g=o1.from(h,r);return this._writeDictionaries(e)._writeMessage(g)._writeBodyBuffers(o)}_assembleRecordBatch(e){let{byteLength:r,nodes:i,bufferRegions:s,buffers:o}=sa.assemble(e);return this._compression!=null&&({byteLength:r,bufferRegions:s,buffers:o}=this._compressBodyBuffers(o)),{byteLength:r,nodes:i,bufferRegions:s,buffers:o}}_compressBodyBuffers(e){let r=yf.get(this._compression.type);if(!r?.encode||typeof r.encode!="function")throw new Error(`Codec for compression type "${qo[this._compression.type]}" has invalid encode method`);let i=0,s=[],o=[];for(let g of e){let v=oi(g);if(v.length===0){s.push(new Uint8Array(0),new Uint8Array(0)),o.push(new eo(i,0));continue}let x=r.encode(v),_=x.length0&&this._writePadding(h)}return this}_writeDictionaries(e){var r,i;for(let[s,o]of e.dictionaries){let h=(r=o?.data)!==null&&r!==void 0?r:[],g=this._seenDictionaries.get(s),v=(i=this._dictionaryDeltaOffsets.get(s))!==null&&i!==void 0?i:0;if(!g||g.data[0]!==h[0])for(let[x,_]of h.entries())this._writeDictionaryBatch(_,s,x>0);else if(vi.writeAll(s)):$l(e)?C8(i,e):O8(i,e)}},e2=class t extends cu{static writeAll(e,r){let i=new t(r);return hl(e)?e.then(s=>i.writeAll(s)):$l(e)?C8(i,e):O8(i,e)}constructor(e){super(e),this._autoDestroy=!0,this._writeLegacyIpcFormat=!1}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(e,r,i=!1){if(!i&&this._seenDictionaries.has(r))throw new Error("The Arrow File format does not support replacement dictionaries. ");return super._writeDictionaryBatch(e,r,i)}_writeFooter(e){let r=ju.encode(new ju(e,us.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(r)._write(Int32Array.of(r.byteLength))._writeMagic()}},$p=class t extends cu{static writeAll(e){return new t().writeAll(e)}constructor(){super(),this._autoDestroy=!0,this._recordBatches=[],this._recordBatchesWithDictionaries=[]}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write(`{ - "schema": ${JSON.stringify({fields:e.fields.map(r=>Kb(r))},null,2)}`)}_writeDictionaries(e){return e.dictionaries.size>0&&this._recordBatchesWithDictionaries.push(e),this}_writeDictionaryBatch(e,r,i=!1){return this._write(this._dictionaryBlocks.length===0?" ":`, - `),this._write(JS(e,r,i)),this._dictionaryBlocks.push(new Ac(0,0,0)),this}_writeRecordBatch(e){return this._writeDictionaries(e),this._recordBatches.push(e),this}close(){if(this._recordBatchesWithDictionaries.length>0){this._write(`, +]`}concat(...e){let r=this.schema,i=this.data.concat(e.flatMap(({data:s})=>s));return new t(r,i.map(s=>new hs(r,s)))}slice(e,r){let i=this.schema;[e,r]=Fp({length:this.numRows},e,r);let s=sm(this.data,this._offsets,e,r);return new t(i,s.map(a=>new hs(i,a)))}getChild(e){return this.getChildAt(this.schema.fields.findIndex(r=>r.name===e))}getChildAt(e){if(e>-1&&ei.children[e]);if(r.length===0){let{type:i}=this.schema.fields[e],s=kn({type:i,length:0,nullCount:0});r.push(s._changeLengthAndBackfillNullBitmap(this.numRows))}return new Tn(r)}return null}setChild(e,r){var i;return this.setChildAt((i=this.schema.fields)===null||i===void 0?void 0:i.findIndex(s=>s.name===e),r)}setChildAt(e,r){let i=this.schema,s=[...this.batches];if(e>-1&&ethis.getChildAt(_));[a[e],m[e]]=[d,r],[i,s]=Om(i,m)}return new t(i,s)}select(e){let r=this.schema.fields.reduce((i,s,a)=>i.set(s.name,a),new Map);return this.selectAt(e.map(i=>r.get(i)).filter(i=>i>-1))}selectAt(e){let r=this.schema.selectAt(e),i=this.batches.map(s=>s.selectAt(e));return new t(r,i)}assign(e){let r=this.schema.fields,[i,s]=e.schema.fields.reduce((m,v,_)=>{let[x,w]=m,I=r.findIndex(O=>O.name===v.name);return~I?w[I]=_:x.push(_),m},[[],[]]),a=this.schema.assign(e.schema),d=[...r.map((m,v)=>[v,s[v]]).map(([m,v])=>v===void 0?this.getChildAt(m):e.getChildAt(v)),...i.map(m=>e.getChildAt(m))].filter(Boolean);return new t(...Om(a,d))}};Rv=Symbol.toStringTag;Hs[Rv]=(t=>(t.schema=null,t.batches=[],t._offsets=new Uint32Array([0]),t._nullCount=-1,t[Symbol.isConcatSpreadable]=!0,t[Bv]=!0,t.isValid=oh(Pp),t.get=oh(ro.getVisitFn(fe.Struct)),t.set=am(Yo.getVisitFn(fe.Struct)),t.indexOf=om(a3.getVisitFn(fe.Struct)),"Table"))(Hs.prototype);Object.defineProperty(Hs,Symbol.hasInstance,{value:function(e){return Function.prototype[Symbol.hasInstance].call(this,e)||this===Hs&&Hs.isTable(e)}})});function kv(t,e,r=e.reduce((i,s)=>Math.max(i,s.length),0)){var i;let s=[...t.fields],a=[...e],d=(r+63&-64)>>3;for(let[m,v]of t.fields.entries()){let _=e[m];(!_||_.length!==r)&&(s[m]=v.clone({nullable:!0}),a[m]=(i=_?._changeLengthAndBackfillNullBitmap(r))!==null&&i!==void 0?i:kn({type:v.type,length:r,nullCount:r,nullBitmap:new Uint8Array(d)}))}return[t.assign(s),kn({type:new _s(s),length:r,children:a})]}function $v(t,e,r=new Map){var i,s;if(((i=t?.length)!==null&&i!==void 0?i:0)>0&&t?.length===e?.length)for(let a=-1,d=t.length;++a{Yl();B3();c1();f1();vs();sh();t3();Tl();cm();um();Mv=Symbol.for("apache-arrow/RecordBatch"),hs=class t{static isRecordBatch(e){return e?.[Mv]===!0}constructor(...e){switch(e.length){case 3:case 2:{if([this.schema]=e,!(this.schema instanceof Ui))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=kn({nullCount:0,type:new _s(this.schema.fields),children:this.schema.fields.map(r=>kn({type:r.type,nullCount:0}))}),this._metadata=new Map]=e,!(this.data instanceof Ti))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=kv(this.schema,this.data.children,this.data.length);break}case 1:{let[r]=e,{fields:i,children:s,length:a}=Object.keys(r).reduce((v,_,x)=>(v.children[x]=r[_],v.length=Math.max(v.length,r[_].length),v.fields[x]=ui.new({name:_,type:r[_].type,nullable:!0}),v),{length:0,fields:new Array,children:new Array}),d=new Ui(i),m=kn({type:new _s(i),length:a,children:s,nullCount:0});[this.schema,this.data]=kv(d,m.children,a),this._metadata=new Map;break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get metadata(){return this._metadata}get dictionaries(){return this._dictionaries||(this._dictionaries=$v(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(e){return this.data.getValid(e)}get(e){return ro.visit(this.data,e)}at(e){return this.get(r3(e,this.numRows))}set(e,r){return Yo.visit(this.data,e,r)}indexOf(e,r){return a3.visit(this.data,e,r)}[Symbol.iterator](){return lh.visit(new Tn([this.data]))}toArray(){return[...this]}concat(...e){return new Hs(this.schema,[this,...e])}slice(e,r){let[i]=new Tn([this.data]).slice(e,r).data;return new t(this.schema,i,this._metadata)}getChild(e){var r;return this.getChildAt((r=this.schema.fields)===null||r===void 0?void 0:r.findIndex(i=>i.name===e))}getChildAt(e){return e>-1&&es.name===e),r)}setChildAt(e,r){let i=this.schema,s=this.data;if(e>-1&&em.name===a);~d&&(s[d]=this.data.children[d])}return new t(r,kn({type:i,length:this.numRows,children:s}),this._metadata)}selectAt(e){let r=this.schema.selectAt(e),i=e.map(a=>this.data.children[a]).filter(Boolean),s=kn({type:new _s(r.fields),length:this.numRows,children:i});return new t(r,s,this._metadata)}};Fv=Symbol.toStringTag;hs[Fv]=(t=>(t._nullCount=-1,t[Symbol.isConcatSpreadable]=!0,t[Mv]=!0,"RecordBatch"))(hs.prototype);Object.defineProperty(hs,Symbol.hasInstance,{value:function(e){return Function.prototype[Symbol.hasInstance].call(this,e)||this===hs&&hs.isRecordBatch(e)}});k3=class extends hs{constructor(e,r){let i=e.fields.map(a=>kn({type:a.type})),s=kn({type:new _s(e.fields),length:0,nullCount:0,children:i});super(e,s,r||new Map)}}});function Lm(t,e=0){for(let r=-1,i=ph.length;++r{W1();oa();zi();e2();Rf();l8();wo();t2();Vp();z8=t=>`Expected ${Pi[t]} Message in stream, but was null or length 0.`,W8=t=>`Header pointer of flatbuffer-encoded ${Pi[t]} Message is null or length 0.`,Pv=(t,e)=>`Expected to read ${t} metadata bytes, but only read ${e}.`,Uv=(t,e)=>`Expected to read ${t} bytes for message body, but only read ${e}.`,w2=class{constructor(e){this.source=e instanceof Kl?e:new Kl(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done?$s:e.value===-1&&(e=this.readMetadataLength()).done?$s:(e=this.readMetadata(e.value)).done?$s:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let r;if((r=this.next()).done)return null;if(e!=null&&r.value.headerType!==e)throw new Error(z8(e));return r.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);let r=Wn(this.source.read(e));if(r.byteLength[...s,...a.VALIDITY&&[a.VALIDITY]||[],...a.TYPE_ID&&[a.TYPE_ID]||[],...a.OFFSET&&[a.OFFSET]||[],...a.DATA&&[a.DATA]||[],...a.VIEWS&&[a.VIEWS]||[],...a.VARIADIC_DATA_BUFFERS||[],...r(a.children)],[])}}readMessage(e){let r;if((r=this.next()).done)return null;if(e!=null&&r.value.headerType!==e)throw new Error(z8(e));return r.value}readSchema(){let e=Pi.Schema,r=this.readMessage(e),i=r?.header();if(!r||!i)throw new Error(W8(e));return i}},Cm=4,H8="ARROW1",ph=new Uint8Array(H8.length);for(let t=0;t{Hd();X8=class{constructor(){this.LZ4_FRAME_MAGIC=new Uint8Array([4,34,77,24]),this.MIN_HEADER_LENGTH=7}isValidCodecEncode(e){let r=new Uint8Array([1,2,3,4,5,6,7,8]),i=e.encode(r);return this._isValidCompressed(i)}_isValidCompressed(e){return this._hasMinimumLength(e)&&this._hasValidMagicNumber(e)&&this._hasValidVersion(e)}_hasMinimumLength(e){return e.length>=this.MIN_HEADER_LENGTH}_hasValidMagicNumber(e){return this.LZ4_FRAME_MAGIC.every((r,i)=>e[i]===r)}_hasValidVersion(e){return(e[4]&192)>>6===1}},J8=class{constructor(){this.ZSTD_MAGIC=new Uint8Array([40,181,47,253]),this.MIN_HEADER_LENGTH=6}isValidCodecEncode(e){let r=new Uint8Array([1,2,3,4,5,6,7,8]),i=e.encode(r);return this._isValidCompressed(i)}_isValidCompressed(e){return this._hasMinimumLength(e)&&this._hasValidMagicNumber(e)}_hasMinimumLength(e){return e.length>=this.MIN_HEADER_LENGTH}_hasValidMagicNumber(e){return this.ZSTD_MAGIC.every((r,i)=>e[i]===r)}},Gv={[Ho.LZ4_FRAME]:new X8,[Ho.ZSTD]:new J8}});var K8,A2,Dm=Dt(()=>{Hd();jv();K8=class{constructor(){this.registry={}}set(e,r){if(r?.encode&&typeof r.encode=="function"&&!Gv[e].isValidCodecEncode(r))throw new Error(`Encoder for ${Ho[e]} is not valid.`);this.registry[e]=r}get(e){var r;return((r=this.registry)===null||r===void 0?void 0:r[e])||null}},A2=new K8});function Wv(t,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:t.autoDestroy}function*qv(t){let e=R1.from(t);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}function Hv(t){return E1(this,arguments,function*(){let r=yield xi(R1.from(t));try{if(!(yield xi(r.open({autoDestroy:!1}))).closed)do yield yield xi(r);while(!(yield xi(r.reset().open())).closed)}finally{yield xi(r.cancel())}})}function rw(t){return new Mc(new Z8(t))}function nw(t){let e=t.peek(mh+7&-8);return e&&e.byteLength>=4?Lm(e)?new af(new Bm(t.read())):new Mc(new yh(t)):new Mc(new yh((function*(){})()))}function iw(t){return An(this,void 0,void 0,function*(){let e=yield t.peek(mh+7&-8);return e&&e.byteLength>=4?Lm(e)?new af(new Bm(yield t.read())):new sf(new bh(t)):new sf(new bh((function(){return E1(this,arguments,function*(){})})()))})}function sw(t){return An(this,void 0,void 0,function*(){let{size:e}=yield t.stat(),r=new r2(t,e);return e>=Vv&&Lm(yield r.readAt(0,mh+7&-8))?new gh(new Q8(r)):new sf(new bh(r))})}var R1,Mc,sf,af,gh,Rm,yh,bh,Bm,Q8,Z8,Jp=Dt(()=>{W1();Yl();c1();vs();oa();i8();Qh();e2();t2();l8();Iv();nf();Vp();Nm();Rf();Dm();au();zi();R1=class t extends c3{constructor(e){super(),this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){let r=this._impl.open(e);return yl(r)?r.then(()=>this):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return jo.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return jo.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,r){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof t?e:b4(e)?rw(e):_4(e)?sw(e):yl(e)?An(this,void 0,void 0,function*(){return yield t.from(yield e)}):x4(e)||Xh(e)||E4(e)||Hl(e)?iw(new Z1(e)):nw(new Kl(e))}static readAll(e){return e instanceof t?e.isSync()?qv(e):Hv(e):b4(e)||ArrayBuffer.isView(e)||_c(e)||v4(e)?qv(e):Hv(e)}},Mc=class extends R1{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return E1(this,arguments,function*(){yield xi(yield*Gd(ml(this[Symbol.iterator]())))})}},sf=class extends R1{constructor(e){super(e),this._impl=e}readAll(){return An(this,void 0,void 0,function*(){var e,r,i,s;let a=new Array;try{for(var d=!0,m=ml(this),v;v=yield m.next(),e=v.done,!e;d=!0){s=v.value,d=!1;let _=s;a.push(_)}}catch(_){r={error:_}}finally{try{!d&&!e&&(i=m.return)&&(yield i.call(m))}finally{if(r)throw r.error}}return a})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}},af=class extends Mc{constructor(e){super(e),this._impl=e}},gh=class extends sf{constructor(e){super(e),this._impl=e}},Rm=class{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,r,i){let s;if(e.compression!=null){let d=A2.get(e.compression.type);if(d?.decode&&typeof d.decode=="function"){let{decommpressedBody:m,buffers:v}=this._decompressBuffers(e,r,d);s=this._loadCompressedVectors(e,m,this.schema.fields),e=new io(e.length,e.nodes,v,null)}else throw new Error("Record batch is compressed but codec not found")}else s=this._loadVectors(e,r,this.schema.fields);let a=kn({type:new _s(this.schema.fields),length:e.length,children:s});return new hs(this.schema,a,i)}_loadDictionaryBatch(e,r){let{id:i,isDelta:s}=e,{dictionaries:a,schema:d}=this,m=a.get(i),v=d.dictionaries.get(i),_;if(e.data.compression!=null){let x=A2.get(e.data.compression.type);if(x?.decode&&typeof x.decode=="function"){let{decommpressedBody:w,buffers:I}=this._decompressBuffers(e.data,r,x);_=this._loadCompressedVectors(e.data,w,[v]),e=new d1(new io(e.data.length,e.data.nodes,I,null,e.data.variadicBufferCounts),i,s)}else throw new Error("Dictionary batch is compressed but codec not found")}else _=this._loadVectors(e.data,r,[v]);return(m&&s?m.concat(new Tn(_)):new Tn(_)).memoize()}_loadVectors(e,r,i){return new dh(r,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion,e.variadicBufferCounts).visitMany(i)}_loadCompressedVectors(e,r,i){return new vm(r,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion,e.variadicBufferCounts).visitMany(i)}_decompressBuffers(e,r,i){let s=[],a=[],d=0;for(let{offset:m,length:v}of e.buffers){if(v===0){s.push(new Uint8Array(0)),a.push(new va(d,0));continue}let _=new qo(r.subarray(m,m+v)),x=Mi(_.readInt64(0)),w=_.bytes().subarray(8),I=x===-1?w:i.decode(w);s.push(I);let O=(d+7&-8)-d;d+=O,a.push(new va(d,I.length)),d+=I.length}return{decommpressedBody:s,buffers:a}}},yh=class extends Rm{constructor(e,r){super(r),this._reader=b4(e)?new M3(this._handle=e):new w2(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=Wv(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):$s}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):$s}next(){if(this.closed)return $s;let e,{_reader:r}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let i=e.header(),s=r.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(i,s,e.metadata)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),s=r.readMessageBody(e.bodyLength),a=this._loadDictionaryBatch(i,s);this.dictionaries.set(i.id,a)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new k3(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},bh=class extends Rm{constructor(e,r){super(r),this._reader=new F3(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return An(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return An(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=Wv(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return An(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):$s})}return(e){return An(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):$s})}next(){return An(this,void 0,void 0,function*(){if(this.closed)return $s;let e,{_reader:r}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let i=e.header(),s=yield r.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(i,s,e.metadata)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),s=yield r.readMessageBody(e.bodyLength),a=this._loadDictionaryBatch(i,s);this.dictionaries.set(i.id,a)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new k3(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return An(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},Bm=class extends yh{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,r){super(e instanceof Gp?e:new Gp(e),r)}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let r of this._footer.dictionaryBatches())r&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){var r;if(this.closed)return null;this._footer||this.open();let i=(r=this._footer)===null||r===void 0?void 0:r.getRecordBatch(e);if(i&&this._handle.seek(i.offset)){let s=this._reader.readMessage(Pi.RecordBatch);if(s?.isRecordBatch()){let a=s.header(),d=this._reader.readMessageBody(s.bodyLength);return this._loadRecordBatch(a,d,s.metadata)}}return null}_readDictionaryBatch(e){var r;let i=(r=this._footer)===null||r===void 0?void 0:r.getDictionaryBatch(e);if(i&&this._handle.seek(i.offset)){let s=this._reader.readMessage(Pi.DictionaryBatch);if(s?.isDictionaryBatch()){let a=s.header(),d=this._reader.readMessageBody(s.bodyLength),m=this._loadDictionaryBatch(a,d);this.dictionaries.set(a.id,m)}}}_readFooter(){let{_handle:e}=this,r=e.size-Y8,i=e.readInt32(r),s=e.readAt(r-i,i);return Yu.decode(s)}_readNextMessageAndValidate(e){var r;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return An(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let i of this._footer.dictionaryBatches())i&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield r.open.call(this,e)})}readRecordBatch(e){return An(this,void 0,void 0,function*(){var r;if(this.closed)return null;this._footer||(yield this.open());let i=(r=this._footer)===null||r===void 0?void 0:r.getRecordBatch(e);if(i&&(yield this._handle.seek(i.offset))){let s=yield this._reader.readMessage(Pi.RecordBatch);if(s?.isRecordBatch()){let a=s.header(),d=yield this._reader.readMessageBody(s.bodyLength);return this._loadRecordBatch(a,d,s.metadata)}}return null})}_readDictionaryBatch(e){return An(this,void 0,void 0,function*(){var r;let i=(r=this._footer)===null||r===void 0?void 0:r.getDictionaryBatch(e);if(i&&(yield this._handle.seek(i.offset))){let s=yield this._reader.readMessage(Pi.DictionaryBatch);if(s?.isDictionaryBatch()){let a=s.header(),d=yield this._reader.readMessageBody(s.bodyLength),m=this._loadDictionaryBatch(a,d);this.dictionaries.set(a.id,m)}}})}_readFooter(){return An(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let r=e.size-Y8,i=yield e.readInt32(r),s=yield e.readAt(r-i,i);return Yu.decode(s)})}_readNextMessageAndValidate(e){return An(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex{let w=r.typeIds[x],I=m[w],O=v[w];return _.slice(I,Math.min(i,O))}))}}return this}function ow(t){let e;return t.nullCount>=t.length?Cl.call(this,new Uint8Array(t.length+7>>3)):(e=t.values)instanceof Uint8Array?Cl.call(this,n3(t.offset,t.length,e)):Cl.call(this,i3(t.values))}function of(t){return Cl.call(this,t.values.subarray(0,t.length*t.stride))}function km(t){let{length:e,values:r,valueOffsets:i}=t,s=Mi(i[0]),a=Mi(i[e]),d=Math.min(a-s,r.byteLength-s);return Cl.call(this,w4(-s,e+1,i)),Cl.call(this,r.subarray(s,s+d)),this}function Yv(t){let{offset:e,length:r,stride:i,values:s,variadicBuffers:a=[]}=t;if(!s)throw new Error("BinaryView data is missing view buffer");let d=e*i,m=d+r*i;Cl.call(this,s.subarray(d,m));for(let v of a)Cl.call(this,v);return this._variadicBufferCounts.push(a.length),this}function Fm(t){let{length:e,valueOffsets:r}=t;if(r){let i=Mi(r[0]),s=Mi(r[e]);return Cl.call(this,w4(-i,e+1,r)),this.visit(t.children[0].slice(i,s-i))}return this.visit(t.children[0])}function eg(t){return this.visitMany(t.type.children.map((e,r)=>t.children[r]).filter(Boolean))[0]}var Ps,Xv=Dt(()=>{c1();K1();oa();nf();wo();s3();e2();vs();au();Ps=class t extends jn{static assemble(...e){let r=s=>s.flatMap(a=>Array.isArray(a)?r(a):a instanceof hs?a.data.children:a.data),i=new t;return i.visitMany(r(e)),i}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[],this._variadicBufferCounts=[]}visit(e){if(e instanceof Tn)return this.visitMany(e.data),this;let{type:r}=e;if(!Hr.isDictionary(r)){let{length:i}=e;if(i>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");if(Hr.isUnion(r))this.nodes.push(new Xl(i,0));else{let{nullCount:s}=e;Hr.isNull(r)||Cl.call(this,s<=0?new Uint8Array(0):n3(e.offset,i,e.nullBitmap)),this.nodes.push(new Xl(i,s))}}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.clone(e.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}get variadicBufferCounts(){return this._variadicBufferCounts}};Ps.prototype.visitBool=ow;Ps.prototype.visitInt=of;Ps.prototype.visitFloat=of;Ps.prototype.visitUtf8=km;Ps.prototype.visitLargeUtf8=km;Ps.prototype.visitUtf8View=Yv;Ps.prototype.visitBinary=km;Ps.prototype.visitLargeBinary=km;Ps.prototype.visitBinaryView=Yv;Ps.prototype.visitFixedSizeBinary=of;Ps.prototype.visitDate=of;Ps.prototype.visitTimestamp=of;Ps.prototype.visitTime=of;Ps.prototype.visitDecimal=of;Ps.prototype.visitList=Fm;Ps.prototype.visitLargeList=Fm;Ps.prototype.visitStruct=eg;Ps.prototype.visitUnion=aw;Ps.prototype.visitInterval=of;Ps.prototype.visitDuration=of;Ps.prototype.visitFixedSizeList=Fm;Ps.prototype.visitMap=Fm});var Mm,Jv=Dt(()=>{K1();D4();oa();Mm=class extends jn{visit(e){return e==null?void 0:super.visit(e)}visitNull({typeId:e}){return{name:ri[e].toLowerCase()}}visitInt({typeId:e,bitWidth:r,isSigned:i}){return{name:ri[e].toLowerCase(),bitWidth:r,isSigned:i}}visitFloat({typeId:e,precision:r}){return{name:ri[e].toLowerCase(),precision:ds[r]}}visitBinary({typeId:e}){return{name:ri[e].toLowerCase()}}visitLargeBinary({typeId:e}){return{name:ri[e].toLowerCase()}}visitBinaryView({typeId:e}){return{name:ri[e].toLowerCase()}}visitBool({typeId:e}){return{name:ri[e].toLowerCase()}}visitUtf8({typeId:e}){return{name:ri[e].toLowerCase()}}visitLargeUtf8({typeId:e}){return{name:ri[e].toLowerCase()}}visitUtf8View({typeId:e}){return{name:ri[e].toLowerCase()}}visitDecimal({typeId:e,scale:r,precision:i,bitWidth:s}){return{name:ri[e].toLowerCase(),scale:r,precision:i,bitWidth:s}}visitDate({typeId:e,unit:r}){return{name:ri[e].toLowerCase(),unit:Es[r]}}visitTime({typeId:e,unit:r,bitWidth:i}){return{name:ri[e].toLowerCase(),unit:cn[r],bitWidth:i}}visitTimestamp({typeId:e,timezone:r,unit:i}){return{name:ri[e].toLowerCase(),unit:cn[i],timezone:r}}visitInterval({typeId:e,unit:r}){return{name:ri[e].toLowerCase(),unit:Ji[r]}}visitDuration({typeId:e,unit:r}){return{name:ri[e].toLocaleLowerCase(),unit:cn[r]}}visitList({typeId:e}){return{name:ri[e].toLowerCase()}}visitLargeList({typeId:e}){return{name:ri[e].toLowerCase()}}visitStruct({typeId:e}){return{name:ri[e].toLowerCase()}}visitUnion({typeId:e,mode:r,typeIds:i}){return{name:ri[e].toLowerCase(),mode:ns[r].toUpperCase(),typeIds:[...i]}}visitDictionary(e){return this.visit(e.dictionary)}visitFixedSizeBinary({typeId:e,byteWidth:r}){return{name:ri[e].toLowerCase(),byteWidth:r}}visitFixedSizeList({typeId:e,listSize:r}){return{name:ri[e].toLowerCase(),listSize:r}}visitMap({typeId:e,keysSorted:r}){return{name:ri[e].toLowerCase(),keysSorted:r}}}});function*tg(t){for(let e of t)yield e.reduce((r,i)=>`${r}${("0"+(i&255).toString(16)).slice(-2)}`,"").toUpperCase()}function*lf(t,e){let r=new Uint32Array(t.buffer,t.byteOffset,t.byteLength/Uint32Array.BYTES_PER_ELEMENT);for(let i=-1,s=r.length/e;++iArray.from(I).map(O=>("0"+(O&255).toString(16)).slice(-2)).join("").toUpperCase(),m=Array.from({length:a},(I,O)=>{let z=O*16,J=s.getInt32(z,!0);return[z,J]}).map(([I,O])=>O>12?{SIZE:O,PREFIX_HEX:d(i.subarray(I+4,I+8)),BUFFER_INDEX:s.getInt32(I+8,!0),OFFSET:s.getInt32(I+12,!0)}:{SIZE:O,INLINED:e(i.subarray(I+4,I+4+O))}),v=[...new Set(m.map(I=>I.BUFFER_INDEX).filter(I=>I!==void 0))],_=v.map(I=>d(t.variadicBuffers[I])),x=new Map(v.map((I,O)=>[I,O]));return{VIEWS:m.map(I=>I.BUFFER_INDEX!==void 0?Object.assign(Object.assign({},I),{BUFFER_INDEX:x.get(I.BUFFER_INDEX)}):I),VARIADIC_DATA_BUFFERS:_}}var Kp,Qv=Dt(()=>{B4();c1();K1();oa();oa();s3();ym();vs();Kp=class t extends jn{static assemble(...e){let r=new t;return e.map(({schema:i,data:s})=>r.visitMany(i.fields,s.children))}visit({name:e},r){let{length:i}=r,{offset:s,nullCount:a,nullBitmap:d}=r,m=Hr.isDictionary(r.type)?r.type.indices:r.type,v=Object.assign([],r.buffers,{[zo.VALIDITY]:void 0});return Object.assign({name:e,count:i,VALIDITY:Hr.isNull(m)||Hr.isUnion(m)?void 0:a<=0?Array.from({length:i},()=>1):[...new uu(d,s,i,null,rm)]},super.visit(r.clone(m,s,i,0,v)))}visitNull(){return{}}visitBool({values:e,offset:r,length:i}){return{DATA:[...new uu(e,r,i,null,ah)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[...lf(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...new Tn([e])],OFFSET:[...e.valueOffsets]}}visitLargeUtf8(e){return{DATA:[...new Tn([e])],OFFSET:[...lf(e.valueOffsets,2)]}}visitBinary(e){return{DATA:[...tg(new Tn([e]))],OFFSET:[...e.valueOffsets]}}visitLargeBinary(e){return{DATA:[...tg(new Tn([e]))],OFFSET:[...lf(e.valueOffsets,2)]}}visitBinaryView(e){return Kv(e,r=>Array.from(r).map(i=>("0"+(i&255).toString(16)).slice(-2)).join("").toUpperCase())}visitUtf8View(e){return Kv(e,r=>Array.from(r).map(i=>String.fromCodePoint(i)).join(""))}visitFixedSizeBinary(e){return{DATA:[...tg(new Tn([e]))]}}visitDate(e){return{DATA:e.type.unit===Es.DAY?[...e.values]:[...lf(e.values,2)]}}visitTimestamp(e){return{DATA:[...lf(e.values,2)]}}visitTime(e){return{DATA:e.type.unitZv(s)),dictionary:Hr.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:i.visit(e.indices)}:void 0}}function lw(t,e,r=!1){let[i]=Kp.assemble(new hs({[e]:t}));return JSON.stringify({id:e,isDelta:r,data:{count:t.length,columns:i}},null,2)}function cw(t){let[e]=Kp.assemble(t);return JSON.stringify({count:t.numRows,columns:e},null,2)}var pu,cf,uf,Qp,$m=Dt(()=>{W1();B3();Nm();c1();vs();e2();e2();i8();oa();Xp();t2();Xv();Jv();Qv();wo();nf();Vp();Rf();Hd();Dm();zi();pu=class extends c3{static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,r){throw new Error('"throughDOM" not available in this environment')}constructor(e){if(super(),this._position=0,this._started=!1,this._compression=null,this._sink=new Jl,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,w1(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1,compressionType:null}),this._autoDestroy=typeof e.autoDestroy=="boolean"?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat=="boolean"?e.writeLegacyIpcFormat:!1,e.compressionType!=null){if(this._writeLegacyIpcFormat)throw new Error("Legacy IPC format does not support columnar compression. Use modern IPC format (writeLegacyIpcFormat=false).");if(Object.values(Ho).includes(e.compressionType))this._compression=new l3(e.compressionType);else{let r=Object.values(Ho).filter(i=>typeof i=="string");throw new Error(`Unsupported compressionType: ${e.compressionType} Available types: ${r.join(", ")}`)}}else this._compression=null}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return yl(e)?e.then(r=>this.writeAll(r)):Hl(e)?ng(this,e):rg(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,r=null){return e===this._sink||e instanceof Jl?this._sink=e:(this._sink=new Jl,e&&y7(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&b7(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,(!r||!R3(r,this._schema))&&(r==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=r,this._writeSchema(r))),this}write(e){let r=null;if(this._sink){if(e==null)return this.finish()&&void 0;if(e instanceof Hs&&!(r=e.schema))return this.finish()&&void 0;if(e instanceof hs&&!(r=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(r&&!R3(r,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,r)}e instanceof hs?e instanceof k3||this._writeRecordBatch(e):e instanceof Hs?this.writeAll(e.batches):_c(e)&&this.writeAll(e)}_writeMessage(e,r=8){let i=r-1,s=h1.encode(e),a=s.byteLength,d=this._writeLegacyIpcFormat?4:8,m=a+d+i&~i,v=m-a-d;return e.headerType===Pi.RecordBatch?this._recordBatchBlocks.push(new Bc(m,e.bodyLength,this._position)):e.headerType===Pi.DictionaryBatch&&this._dictionaryBlocks.push(new Bc(m,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(m-d)),a>0&&this._write(s),this._writePadding(v)}_write(e){if(this._started){let r=Wn(e);r&&r.byteLength>0&&(this._sink.write(r),this._position+=r.byteLength)}return this}_writeSchema(e){return this._writeMessage(h1.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(ph)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:r,nodes:i,bufferRegions:s,buffers:a,variadicBufferCounts:d}=this._assembleRecordBatch(e),m=new io(e.numRows,i,s,this._compression,d,e.metadata),v=h1.from(m,r);return this._writeDictionaries(e)._writeMessage(v)._writeBodyBuffers(a)}_assembleRecordBatch(e){let{byteLength:r,nodes:i,bufferRegions:s,buffers:a,variadicBufferCounts:d}=Ps.assemble(e);return this._compression!=null&&({byteLength:r,bufferRegions:s,buffers:a}=this._compressBodyBuffers(a)),{byteLength:r,nodes:i,bufferRegions:s,buffers:a,variadicBufferCounts:d}}_compressBodyBuffers(e){let r=A2.get(this._compression.type);if(!r?.encode||typeof r.encode!="function")throw new Error(`Codec for compression type "${Ho[this._compression.type]}" has invalid encode method`);let i=0,s=[],a=[];for(let m of e){let v=Wn(m);if(v.length===0){s.push(new Uint8Array(0),new Uint8Array(0)),a.push(new va(i,0));continue}let _=r.encode(v),x=_.length0&&this._writePadding(d)}return this}_writeDictionaries(e){var r,i;for(let[s,a]of e.dictionaries){let d=(r=a?.data)!==null&&r!==void 0?r:[],m=this._seenDictionaries.get(s),v=(i=this._dictionaryDeltaOffsets.get(s))!==null&&i!==void 0?i:0;if(!m||m.data[0]!==d[0])for(let[_,x]of d.entries())this._writeDictionaryBatch(x,s,_>0);else if(vi.writeAll(s)):Hl(e)?ng(i,e):rg(i,e)}},uf=class t extends pu{static writeAll(e,r){let i=new t(r);return yl(e)?e.then(s=>i.writeAll(s)):Hl(e)?ng(i,e):rg(i,e)}constructor(e){super(e),this._autoDestroy=!0,this._writeLegacyIpcFormat=!1}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(e,r,i=!1){if(!i&&this._seenDictionaries.has(r))throw new Error("The Arrow File format does not support replacement dictionaries. ");return super._writeDictionaryBatch(e,r,i)}_writeFooter(e){let r=Yu.encode(new Yu(e,fs.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(r)._write(Int32Array.of(r.byteLength))._writeMagic()}},Qp=class t extends pu{static writeAll(e){return new t().writeAll(e)}constructor(){super(),this._autoDestroy=!0,this._recordBatches=[],this._recordBatchesWithDictionaries=[]}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write(`{ + "schema": ${JSON.stringify({fields:e.fields.map(r=>Zv(r))},null,2)}`)}_writeDictionaries(e){return e.dictionaries.size>0&&this._recordBatchesWithDictionaries.push(e),this}_writeDictionaryBatch(e,r,i=!1){return this._write(this._dictionaryBlocks.length===0?" ":`, + `),this._write(lw(e,r,i)),this._dictionaryBlocks.push(new Bc(0,0,0)),this}_writeRecordBatch(e){return this._writeDictionaries(e),this._recordBatches.push(e),this}close(){if(this._recordBatchesWithDictionaries.length>0){this._write(`, "dictionaries": [ `);for(let e of this._recordBatchesWithDictionaries)super._writeDictionaries(e);this._write(` ]`)}if(this._recordBatches.length>0){for(let e=-1,r=this._recordBatches.length;++e{G1();Lo();w2()});function rv(t){return new L8(t)}var L8,ev,tv,nv=Mt(()=>{G1();Np();L8=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:r,["writableStrategy"]:i,["queueingStrategy"]:s="count"}=e,o=My(e,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=Ic(o),this._getSize=s!=="bytes"?ev:tv;let{["highWaterMark"]:h=s==="bytes"?Math.pow(2,14):1e3}=Object.assign({},r),{["highWaterMark"]:g=s==="bytes"?Math.pow(2,14):1e3}=Object.assign({},i);this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:v=>{this._maybeFlush(this._builder,this._controller=v)},start:v=>{this._maybeFlush(this._builder,this._controller=v)}},{highWaterMark:h,size:s!=="bytes"?ev:tv}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:g,size:v=>this._writeValueAndReturnChunkSize(v)})}_writeValueAndReturnChunkSize(e){let r=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(e)),this._bufferedSize-r}_maybeFlush(e,r){r!=null&&(this._bufferedSize>=r.desiredSize&&++this._numChunks&&this._enqueue(r,e.toVector()),e.finished&&((e.length>0||this._numChunks===0)&&++this._numChunks&&this._enqueue(r,e.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(r,null)))}_enqueue(e,r){this._bufferedSize=0,this._controller=null,r==null?e.close():e.enqueue(r)}},ev=t=>{var e;return(e=t?.length)!==null&&e!==void 0?e:0},tv=t=>{var e;return(e=t?.byteLength)!==null&&e!==void 0?e:0}});function Sm(t,e){let r=new Gl,i=null,s=new ReadableStream({cancel(){return An(this,void 0,void 0,function*(){yield r.close()})},start(g){return An(this,void 0,void 0,function*(){yield h(g,i||(i=yield o()))})},pull(g){return An(this,void 0,void 0,function*(){i?yield h(g,i):g.close()})}});return{writable:new WritableStream(r,Object.assign({highWaterMark:Math.pow(2,14)},t)),readable:s};function o(){return An(this,void 0,void 0,function*(){return yield(yield O1.from(r)).open(e)})}function h(g,v){return An(this,void 0,void 0,function*(){let x=g.desiredSize,_=null;for(;!(_=yield v.next()).done;)if(g.enqueue(_.value),x!=null&&--x<=0)return;g.close()})}}var iv=Mt(()=>{G1();z2();Bp()});function Em(t,e){let r=new this(t),i=new J1(r),s=new ReadableStream({cancel(){return An(this,void 0,void 0,function*(){yield i.cancel()})},pull(h){return An(this,void 0,void 0,function*(){yield o(h)})},start(h){return An(this,void 0,void 0,function*(){yield o(h)})}},Object.assign({highWaterMark:Math.pow(2,14)},e));return{writable:new WritableStream(r,t),readable:s};function o(h){return An(this,void 0,void 0,function*(){let g=null,v=h.desiredSize;for(;g=yield i.read(v||null);)if(h.enqueue(g),v!=null&&(v-=g.byteLength)<=0)return;h.close()})}}var sv=Mt(()=>{G1();z2()});function wm(t){let e=O1.from(t);return hl(e)?e.then(r=>wm(r)):e.isAsync()?e.readAll().then(r=>new ro(r)):new ro(e.readAll())}function N8(t,e="stream",r=null){let i={compressionType:r};return(e==="stream"?Zu:e2).writeAll(t,i).toUint8Array(!0)}var av=Mt(()=>{ih();w2();Bp();_m()});var ov,D8=Mt(()=>{b4();Md();na();su();Ms();ih();A1();W1();X1();_p();$4();Ks();Np();q5();r8();z5();H5();W5();Y5();J5();Z5();s8();i8();K5();Q5();o8();l8();sm();am();e8();X5();t8();n8();a8();z2();Bp();_m();av();gm();mm();q2();mf();v4();$5();Qf();xp();Lo();Yd();Zh();rm();Mp();ov=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o5),F5),E5),l5),I6),S5),n5),j5),{compareSchemas:A3,compareFields:Rb,compareTypes:cm})});var lv={};Xc(lv,{AsyncByteQueue:()=>Gl,AsyncByteStream:()=>J1,AsyncMessageReader:()=>I3,AsyncRecordBatchFileReader:()=>oh,AsyncRecordBatchStreamReader:()=>Ju,Binary:()=>bc,BinaryBuilder:()=>Hu,Bool:()=>gl,BoolBuilder:()=>n3,BufferType:()=>v1,Builder:()=>Is,ByteStream:()=>jl,CompressionType:()=>qo,Data:()=>Gi,DataType:()=>ln,DateBuilder:()=>au,DateDay:()=>tp,DateDayBuilder:()=>W2,DateMillisecond:()=>rp,DateMillisecondBuilder:()=>Y2,DateUnit:()=>xs,Date_:()=>yl,Decimal:()=>_c,DecimalBuilder:()=>X2,DenseUnion:()=>yp,DenseUnionBuilder:()=>E3,Dictionary:()=>zo,DictionaryBuilder:()=>i3,Duration:()=>S1,DurationBuilder:()=>ql,DurationMicrosecond:()=>mp,DurationMicrosecondBuilder:()=>rf,DurationMillisecond:()=>pp,DurationMillisecondBuilder:()=>tf,DurationNanosecond:()=>gp,DurationNanosecondBuilder:()=>nf,DurationSecond:()=>hp,DurationSecondBuilder:()=>ef,Field:()=>Ti,FixedSizeBinary:()=>Sc,FixedSizeBinaryBuilder:()=>J2,FixedSizeList:()=>bl,FixedSizeListBuilder:()=>s3,Float:()=>z1,Float16:()=>Gd,Float16Builder:()=>a3,Float32:()=>P2,Float32Builder:()=>o3,Float64:()=>ru,Float64Builder:()=>l3,FloatBuilder:()=>ou,Int:()=>Pa,Int16:()=>k2,Int16Builder:()=>u3,Int32:()=>s1,Int32Builder:()=>f3,Int64:()=>tu,Int64Builder:()=>h3,Int8:()=>R2,Int8Builder:()=>c3,IntBuilder:()=>T1,Interval:()=>H1,IntervalBuilder:()=>Oc,IntervalDayTime:()=>up,IntervalDayTimeBuilder:()=>K2,IntervalMonthDayNano:()=>dp,IntervalMonthDayNanoBuilder:()=>Z2,IntervalUnit:()=>Hi,IntervalYearMonth:()=>fp,IntervalYearMonthBuilder:()=>Q2,JSONMessageReader:()=>O3,LargeBinary:()=>vc,LargeBinaryBuilder:()=>Wu,LargeUtf8:()=>xc,LargeUtf8Builder:()=>pf,List:()=>E1,ListBuilder:()=>b3,MapBuilder:()=>v3,MapRow:()=>Ul,Map_:()=>vl,Message:()=>o1,MessageHeader:()=>Bi,MessageReader:()=>gf,MetadataVersion:()=>us,Null:()=>Eo,NullBuilder:()=>x3,Precision:()=>fs,RecordBatch:()=>Os,RecordBatchFileReader:()=>Ku,RecordBatchFileWriter:()=>e2,RecordBatchJSONWriter:()=>$p,RecordBatchReader:()=>O1,RecordBatchStreamReader:()=>Cc,RecordBatchStreamWriter:()=>Zu,RecordBatchWriter:()=>cu,Schema:()=>es,SparseUnion:()=>bp,SparseUnionBuilder:()=>S3,Struct:()=>ys,StructBuilder:()=>_3,StructRow:()=>nu,Table:()=>ro,Time:()=>x1,TimeBuilder:()=>Hl,TimeMicrosecond:()=>sp,TimeMicrosecondBuilder:()=>ff,TimeMillisecond:()=>ip,TimeMillisecondBuilder:()=>uf,TimeNanosecond:()=>ap,TimeNanosecondBuilder:()=>df,TimeSecond:()=>np,TimeSecondBuilder:()=>cf,TimeUnit:()=>cn,Timestamp:()=>_1,TimestampBuilder:()=>zl,TimestampMicrosecond:()=>lp,TimestampMicrosecondBuilder:()=>of,TimestampMillisecond:()=>Wf,TimestampMillisecondBuilder:()=>af,TimestampNanosecond:()=>cp,TimestampNanosecondBuilder:()=>lf,TimestampSecond:()=>op,TimestampSecondBuilder:()=>sf,Type:()=>be,Uint16:()=>B2,Uint16Builder:()=>m3,Uint32:()=>F2,Uint32Builder:()=>g3,Uint64:()=>$2,Uint64Builder:()=>y3,Uint8:()=>M2,Uint8Builder:()=>p3,Union:()=>w1,UnionBuilder:()=>Yu,UnionMode:()=>Qi,Utf8:()=>ml,Utf8Builder:()=>hf,Vector:()=>Bn,Visitor:()=>Gn,builderThroughAsyncIterable:()=>h8,builderThroughIterable:()=>fm,compressionRegistry:()=>yf,makeBuilder:()=>Ic,makeData:()=>jn,makeTable:()=>p8,makeVector:()=>j2,tableFromArrays:()=>m8,tableFromIPC:()=>wm,tableFromJSON:()=>d8,tableToIPC:()=>N8,util:()=>ov,vectorFromArray:()=>nh});var cv=Mt(()=>{Vh();Ks();Bp();_m();Zb();nv();iv();sv();D8();D8();Go.toDOMStream=Qb;Is.throughDOM=rv;O1.throughDOM=Sm;Ku.throughDOM=Sm;Cc.throughDOM=Sm;cu.throughDOM=Em;e2.throughDOM=Em;Zu.throughDOM=Em});var uv=Eg((uu,C3)=>{"use strict";(function(t,e){typeof define=="function"&&define.amd?define([],e):typeof uu=="object"?C3.exports=e():t.alasql=e()})(uu,function(){let t=function(n,c,a,l){if(c=c||[],typeof importScripts!="function"&&t.webworker){var f=t.lastid++;t.buffer[f]=a,t.webworker.postMessage({id:f,sql:n,params:c});return}return arguments.length===0?new V.Select({columns:[new V.Column({columnid:"*"})],from:[new V.ParamValue({param:0})]}):arguments.length===1&&n.constructor===Array?t.promise(n):(typeof c=="function"&&(l=a,a=c,c=[]),typeof c!="object"&&(c=[c]),typeof n=="string"&&n[0]==="#"&&typeof document=="object"?n=document.querySelector(n).textContent:typeof n=="object"&&n instanceof HTMLElement?n=n.textContent:typeof n=="function"&&(n=n.toString(),n=(/\/\*([\S\s]+)\*\//m.exec(n)||["","Function given as SQL. Plese Provide SQL string or have a /* ... */ syle comment with SQL in the function."])[1]),t.exec(n,c,a,l))};t.version="4.17.2",t.build="develop-f960d23a",t.debug=void 0;var e=function(){return null},r="",i=(function(){var n=function(ma,Xr,En,A){for(En=En||{},A=ma.length;A--;En[ma[A]]=Xr);return En},c=[2,17],a=[1,112],l=[1,106],f=[1,107],u=[1,108],p=[1,109],d=[1,110],b=[1,111],U=[1,6],R=[1,43],L=[1,81],T=[1,77],C=[1,78],te=[1,98],W=[1,97],Y=[1,70],B=[1,105],N=[1,87],Ae=[1,65],je=[1,72],Ot=[1,86],Oe=[1,67],Te=[1,71],ht=[1,69],Tt=[1,62],$t=[1,75],yr=[1,63],le=[1,68],mr=[1,85],Vt=[1,79],Rt=[1,88],Qr=[1,89],$n=[1,100],ki=[1,83],Di=[1,84],Wn=[1,82],Pn=[1,90],Jn=[1,91],ls=[1,92],Ls=[1,93],On=[1,94],ri=[1,95],hs=[1,96],ps=[1,102],wo=[1,66],Jo=[1,80],Ao=[1,73],Bo=[1,101],ba=[1,64],Fo=[1,74],Dc=[1,116],Ql=[1,115],io=[14,339,639,798],Ce=[14,339,343,639,798],Rc=[2,251],R1=[1,121],Zl=[1,123],Ko=[1,122],Be=[1,128],zi=[1,130],Fe=[1,129],$e=[1,131],Le=[1,132],ye=[1,133],Ne=[1,134],ec=[139,388,447],tc=[1,142],i2=[1,141],k1=[1,149],It=[1,179],De=[1,194],Pe=[1,197],vt=[1,190],ve=[1,200],it=[1,204],pt=[1,175],Ee=[1,201],Ue=[1,186],xt=[1,188],mt=[1,193],pe=[1,202],gt=[1,191],We=[1,219],qe=[1,220],at=[1,192],ct=[1,181],ot=[1,182],ut=[1,212],dt=[1,207],yt=[1,208],_t=[1,184],Xe=[1,213],Je=[1,214],rt=[1,215],Ke=[1,216],He=[1,217],Ye=[1,218],Qe=[1,221],Ze=[1,222],et=[1,195],nt=[1,196],Re=[1,198],st=[1,199],bt=[1,205],St=[1,211],we=[1,203],Et=[1,206],wt=[1,189],At=[1,187],me=[1,210],he=[1,223],Z1=[2,4,5,6,7,8,9,152,161,190,335],M1=[2,502],rc=[1,227],kc=[1,232],$o=[1,241],Al=[1,239],mu=[14,77,84,103,108,127,137,171,177,178,192,207,252,271,273,339,343,503,639,798],N3=[1,246],Mc=[2,4,5,6,7,8,9,14,77,82,83,84,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,192,194,196,207,266,267,304,313,314,315,316,317,318,319,320,339,343,457,461,503,639,798],hn=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],ms=[1,275],gu=[1,282],Bc=[1,283],B1=[1,288],yu=[1,293],va=[1,298],f1=[1,297],d1=[2,4,5,6,7,8,9,14,77,83,84,103,108,116,127,137,140,141,146,152,154,158,161,163,165,171,177,178,188,189,190,192,207,229,252,266,267,271,273,281,292,293,294,298,299,301,304,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,335,336,339,343,345,350,457,461,503,639,798],s2=[2,175],nc=[1,309],D3=[14,79,84,339,343,466,639,798],X=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,202,207,215,217,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,335,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,379,391,403,404,407,408,423,426,433,437,438,439,440,441,442,443,445,446,454,455,457,461,463,466,471,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,552,553,554,555,639,798],R3=[2,4,5,6,7,8,9,14,58,77,83,96,133,155,165,198,294,295,322,339,368,372,373,433,437,438,441,443,445,446,454,455,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,545,546,555,639,798],a2=[14,77,84,271,273,339,343,503,639,798],Af=[2,263],Tf=[1,595],Tl=[83,198],Il=[1,607],Fc=[1,609],If=[1,610],Po=[2,4,5,6,7,8,9],so=[2,534],el=[1,616],To=[1,627],F1=[1,630],h1=[1,631],Of=[14,83,84,96,141,146,155,198,329,339,343,509,639,798],ao=[14,79,339,343,639,798],bu=[2,605],o2=[1,649],tl=[2,4,5,6,7,8,9,165],Dr=[1,687],Ur=[1,659],Bt=[1,693],Dt=[1,694],tr=[1,667],l2=[1,678],ur=[1,665],nr=[1,673],fr=[1,666],fn=[1,674],sn=[1,676],wr=[1,668],Lr=[1,669],pn=[1,688],vn=[1,685],_n=[1,686],dr=[1,662],ir=[1,664],Ar=[1,656],Xt=[1,657],Br=[1,658],Vr=[1,660],Jt=[1,661],br=[1,663],Tr=[1,670],Ir=[1,671],an=[1,675],on=[1,677],tn=[1,679],jr=[1,680],rn=[1,681],Zr=[1,682],zr=[1,683],dn=[1,689],nn=[1,690],Mr=[1,691],yn=[1,692],Cf=[1,702],vu=[1,699],$c=[2,4,5,6,7,8,9,14,58,77,79,82,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],xu=[2,301],k3=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],M3=[2,299],B3=[2,300],oa=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],F3=[2,383],ic=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,335,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,379,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Lf=[1,718],_u=[1,728],oo=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Su=[1,745],Es=[1,747],bs=[1,748],Ol=[1,738],$3=[1,756],P3=[1,755],c2=[2,4,5,6,7,8,9,14,77,79,84,103,108,127,137,171,177,178,215,217,242,243,244,245,246,247,248,249,250,251,252,271,273,339,343,503,639,798],Ri=[14,77,79,84,103,108,127,137,171,177,178,215,217,242,243,244,245,246,247,248,249,250,251,252,271,273,339,343,503,639,798],Qo=[1,772],Nf=[2,206],U3=[1,781],sc=[14,77,84,103,108,127,137,171,177,178,192,252,271,273,339,343,503,639,798],Df=[2,176],Rf=[1,784],V3=[2,4,5,6,7,8,9,121,229,281],Io=[14,77,84,127,271,273,339,343,503,639,798],lo=[1,798],co=[1,817],qa=[1,797],la=[1,796],za=[1,791],xa=[1,792],uo=[1,794],ca=[1,795],fo=[1,799],ho=[1,800],po=[1,801],mo=[1,802],go=[1,803],ea=[1,804],yo=[1,805],ua=[1,806],bo=[1,807],js=[1,808],qs=[1,809],vo=[1,810],zs=[1,811],Ha=[1,812],Hs=[1,813],_a=[1,814],Sa=[1,816],Ea=[1,818],ta=[1,819],ra=[1,820],fa=[1,821],wa=[1,822],Wa=[1,823],Aa=[1,824],Ya=[1,827],Ta=[1,828],da=[1,829],ha=[1,830],Ia=[1,831],Oa=[1,832],Xa=[1,833],Ca=[1,834],La=[1,835],Ws=[1,836],Ja=[1,838],Na=[1,839],Da=[1,837],ac=[79,83,96,198],oc=[14,83,96,137,152,154,155,158,161,190,198,335,339,343,378,379,457,461,503,639,798],Li=[14,79,84,163,196,250,330,339,343,378,391,403,404,407,408,639,798],S=[1,858],P=[14,79,84,333,339,343,639,798],ee=[1,859],lt=[1,866],qt=[1,867],Gr=[1,871],Kt=[14,79,84,339,343,639,798],Or=[2,4,5,6,7,8,9,83,140,141,146,152,154,158,161,163,165,188,189,190,229,266,267,281,292,293,294,298,299,301,304,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,335,336,345,350,457,461],sr=[14,77,84,103,108,116,127,137,171,177,178,192,207,252,271,273,339,343,503,639,798],Un=[2,4,5,6,7,8,9,14,77,83,84,103,108,116,127,137,140,141,146,152,154,158,161,163,165,171,173,177,178,188,189,190,192,194,196,204,207,229,252,266,267,271,273,281,292,293,294,298,299,301,304,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,335,336,339,343,345,350,457,461,503,639,798],$i=[14,77,84,339,343,503,639,798],Ns=[2,274],rl=[1,884],Zo=[1,885],Oo=[2,4,5,6,7,8,9,141,329],Pc=[1,915],Uc=[14,79,82,84,339,343,639,798],u2=[2,783],Eu=[14,79,82,84,141,148,150,154,161,339,343,457,461,639,798],f2=[2,1238],d2=[14,79,82,84,148,150,154,161,339,343,457,461,639,798],p1=[14,79,82,84,148,150,154,339,343,457,461,639,798],wu=[14,79,84,148,150,339,343,639,798],Vc=[14,83,84,96,141,155,198,329,339,343,509,639,798],h2=[368,372,373],Qp=[2,809],ph=[1,940],mh=[1,941],gh=[1,942],Zp=[1,943],nl=[1,952],Gc=[1,951],Ds=[2,762],Rs=[1,955],jc=[173,175,367],e0=[2,468],t0=[1,1009],r0=[2,4,5,6,7,8,9,83,140,165,293,322,323,324,325,326],n0=[1,1027],i0=[1,1026],G3=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,127,131,133,137,138,139,140,141,143,144,146,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,347,348,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],yh=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],s0=[2,399],a0=[1,1038],bh=[339,341,343],j3=[79,333],e1=[79,333,463],kf=[1,1046],Mf=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Cl=[79,463],Ll=[1,1065],Nl=[1,1064],$1=[1,1072],qc=[14,77,84,103,108,127,137,171,177,178,252,271,273,339,343,503,639,798],Bf=[2,186],Ff=[1,1085],$f=[1,1095],Dl=[2,84],Ra=[1,1102],ka=[1,1103],Ma=[1,1104],Yn=[2,4,5,6,7,8,9,14,77,79,82,83,84,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,207,266,267,304,313,314,315,316,317,318,319,320,339,343,457,461,503,639,798],zc=[1,1157],Rl=[1,1156],Hc=[1,1171],vh=[1,1170],Wc=[1,1178],lc=[14,77,79,84,103,108,116,127,137,171,177,178,192,207,252,271,273,339,343,503,639,798],Pf=[2,348],Uf=[1,1203],kl=[1,1219],xh=[14,83,84,96,155,198,339,343,509,639,798],_h=[1,1239],Sh=[1,1238],o0=[1,1237],Au=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],l0=[1,1254],m1=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,347,348,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Eh=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,348,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Yc=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,127,131,133,137,138,139,140,141,142,143,144,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,347,348,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],il=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,127,131,133,137,138,139,140,141,143,144,146,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,347,348,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],sl=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,347,353,354,355,356,357,358,359,363,364,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],q3=[2,430],p2=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,116,127,131,137,138,139,140,141,143,144,146,152,154,155,157,158,159,161,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,347,363,364,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],wh=[2,320],Ys=[9,84],cc=[2,352],$s=[1,1272],Uo=[2,296],Tu=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],li=[14,84,339,343,639,798],t1=[1,1298],c0=[14,83,84,152,154,161,190,335,339,343,457,461,503,639,798],m2=[14,79,84,339,341,343,503,639,798],Ah=[1,1316],u0=[1,1319],f0=[2,1146],P1=[14,77,84,127,137,171,177,178,252,271,273,339,343,503,639,798],d0=[1,1325],h0=[1,1326],Vf=[14,77,79,84,103,108,127,137,171,177,178,192,207,252,271,273,339,343,503,639,798],xo=[2,4,5,6,7,8,9,77,82,83,84,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,194,196,266,267,304,313,314,315,316,317,318,319,320,457,461],Ml=[2,4,5,6,7,8,9,77,79,82,83,84,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,194,196,266,267,304,313,314,315,316,317,318,319,320,457,461],g2=[2,1140],p0=[2,4,5,6,7,8,9,77,79,82,83,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,194,196,266,267,304,313,314,315,316,317,318,319,320,457,461],Bl=[1,1372],Co=[14,77,79,84,103,108,127,137,171,177,178,215,217,242,243,244,245,246,247,248,249,252,271,273,339,343,503,639,798],E=[2,518],M=[1,1375],Q=[14,79,84,137,339,341,343,503,639,798],Ge=[124,125,133],Ct=[1,1392],ke=[9,14,77,79,84,271,273,339,343,503,639,798],ft=[2,622],Pt=[1,1413],Ut=[82,148],Qt=[2,769],rr=[1,1430],Zt=[1,1431],vr=[2,4,5,6,7,8,9,14,58,77,82,83,96,133,155,165,198,250,294,295,322,339,343,368,372,373,433,437,438,441,443,445,446,454,455,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,545,546,555,639,798],Gt=[1,1460],Yt=[2,354],xe=[1,1477],Ve=[79,84],zt=[1,1486],or=[14,339,341,343,503,639,798],Ft=[14,77,84,127,171,177,178,252,271,273,339,343,503,639,798],Fr=[2,237],Rr=[1,1496],Sn=[1,1500],Nt=[1,1504],Lt=[1,1505],Hr=[1,1507],gr=[1,1508],jt=[1,1509],_r=[1,1510],Sr=[1,1511],Hn=[1,1512],Rn=[1,1513],Cr=[1,1514],Nr=[1,1538],Nn=[84,127],kn=[14,77,84,127,171,177,178,271,273,339,343,503,639,798],_i=[2,239],vs=[1,1642],Ss=[1,1658],wi=[1,1660],Ji=[2,4,5,6,7,8,9,83,152,154,161,165,190,293,322,323,324,325,326,335,457,461],gs=[1,1697],Ps=[1,1699],Xs=[1,1700],Js=[1,1696],pa=[1,1695],Ba=[1,1694],ws=[1,1701],ni=[1,1691],Fa=[1,1692],Pi=[1,1693],Ln=[1,1723],gi=[2,4,5,6,7,8,9,14,58,77,83,96,133,155,165,198,294,295,322,339,343,368,372,373,433,437,438,441,443,445,446,454,455,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,545,546,555,639,798],Ni=[1,1746],As=[1,1745],Vo=[1,1797],U1=[1,1798],z=[1,1796],tt=[1,1812],Me=[1,1814],Wr=[1,1811],yi=[1,1813],G=[196,202,403,404,407],D=[2,546],ie=[1,1819],ge=[1,1836],Se=[14,77,84,339,343,452,503,639,798],ce=[1,1859],ae=[1,1866],fe=[14,77,79,84,127,171,177,178,259,271,273,339,343,503,639,798],F=[4,14,269,339,343,378,391,639,798],ne=[2,249],j=[1,1903],_e=[14,79,84,163,196,330,339,343,378,391,403,404,407,408,639,798],Ie=[2,552],kt=[1,1918],hr=[1,1966],pr=[1,1965],kr=[1,1987],lr=[1,1998],en=[1,1997],qr=[1,1999],Jr=[1,2e3],Yr=[1,2007],Kr=[1,2024],Dn=[14,79,84,250,339,343,639,798],Ki={trace:function(){},yy:{},symbols_:{error:2,Literal:3,LITERAL:4,BRALITERAL:5,KEY:6,OPEN:7,CLOSE:8,SEPARATOR:9,NonReserved:10,LiteralWithSpaces:11,main:12,Statements:13,EOF:14,Statements_group0:15,AStatement:16,ExplainStatement:17,EXPLAIN:18,QUERY:19,PLAN:20,Statement:21,AlterTable:22,AttachDatabase:23,Call:24,CreateDatabase:25,CreateIndex:26,CreateGraph:27,CreateTable:28,CreateView:29,CreateEdge:30,CreateVertex:31,Declare:32,Delete:33,DetachDatabase:34,DropDatabase:35,DropIndex:36,DropTable:37,DropView:38,If:39,Insert:40,Merge:41,Reindex:42,RenameTable:43,Select:44,ParenthesizedSelect:45,ShowCreateTable:46,ShowColumns:47,ShowDatabases:48,ShowIndex:49,ShowTables:50,TruncateTable:51,WithSelect:52,CreateTrigger:53,DropTrigger:54,BeginTransaction:55,CommitTransaction:56,RollbackTransaction:57,EndTransaction:58,UseDatabase:59,Update:60,JavaScript:61,Source:62,Assert:63,While:64,Continue:65,Break:66,BeginEnd:67,Print:68,Require:69,SetVariable:70,ExpressionStatement:71,AddRule:72,Query:73,Echo:74,CreateFunction:75,CreateAggregate:76,WITH:77,WithTablesList:78,COMMA:79,WithTable:80,RECURSIVE:81,AS:82,LPAR:83,RPAR:84,ColumnsList:85,SelectClause:86,Select_option0:87,IntoClause:88,FromClause:89,Select_option1:90,WhereClause:91,GroupClause:92,UnionClause:93,OrderClause:94,LimitClause:95,SEARCH:96,Select_repetition0:97,Select_option2:98,SelectWithoutOrderOrLimit:99,SelectWithoutOrderOrLimit_option0:100,SelectWithoutOrderOrLimit_option1:101,PivotClause:102,PIVOT:103,Expression:104,FOR:105,PivotClause_option0:106,PivotClause_option1:107,UNPIVOT:108,IN:109,PivotClause_option2:110,PivotClause2:111,AsList:112,AsLiteral:113,AsPart:114,RemoveClause:115,REMOVE:116,RemoveClause_option0:117,RemoveColumnsList:118,RemoveColumn:119,Column:120,LIKE:121,StringValue:122,ArrowDot:123,ARROW:124,DOT:125,SearchSelector:126,ORDER:127,BY:128,OrderExpressionsList:129,SearchSelector_option0:130,DOTDOT:131,CARET:132,EQ:133,SearchSelector_repetition_plus0:134,SearchSelector_repetition_plus1:135,SearchSelector_option1:136,WHERE:137,OF:138,CLASS:139,NUMBER:140,STRING:141,SLASH:142,VERTEX:143,EDGE:144,EXCLAMATION:145,SHARP:146,MODULO:147,GT:148,LT:149,GTGT:150,LTLT:151,DOLLAR:152,Json:153,AT:154,SET:155,SetColumnsList:156,TO:157,VALUE:158,ROW:159,ExprList:160,COLON:161,PlusStar:162,NOT:163,SearchSelector_repetition2:164,IF:165,SearchSelector_repetition3:166,Aggregator:167,SearchSelector_repetition4:168,SearchSelector_group0:169,SearchSelector_repetition5:170,UNION:171,SearchSelectorList:172,ALL:173,SearchSelector_repetition6:174,ANY:175,SearchSelector_repetition7:176,INTERSECT:177,EXCEPT:178,AND:179,OR:180,PATH:181,RETURN:182,ResultColumns:183,REPEAT:184,SearchSelector_repetition8:185,SearchSelectorList_repetition0:186,SearchSelectorList_repetition1:187,PLUS:188,STAR:189,QUESTION:190,SearchFrom:191,FROM:192,SelectModifier:193,DISTINCT:194,TopClause:195,UNIQUE:196,SelectClause_option0:197,SELECT:198,COLUMN:199,MATRIX:200,TEXTSTRING:201,INDEX:202,RECORDSET:203,TOP:204,NumValue:205,TopClause_option0:206,INTO:207,Table:208,FuncValue:209,ParamValue:210,VarValue:211,FromTablesList:212,JoinTablesList:213,ApplyClause:214,CROSS:215,APPLY:216,OUTER:217,FromTable:218,FromTable_option0:219,FromTable_option1:220,FromTable_option2:221,FromTable_option3:222,INDEXED:223,FromTable_option4:224,FromTable_option5:225,FromTable_option6:226,FromString:227,FromTable_option7:228,INSERTED:229,FromTableAlias:230,TargetTable:231,JoinTable:232,JoinMode:233,JoinTableAs:234,OnClause:235,JoinTableAs_option0:236,JoinTableAs_option1:237,JoinTableAs_option2:238,JoinTableAs_option3:239,JoinTableAs_option4:240,JoinModeMode:241,NATURAL:242,JOIN:243,INNER:244,LEFT:245,RIGHT:246,FULL:247,SEMI:248,ANTI:249,ON:250,USING:251,GROUP:252,GroupExpressionsList:253,HavingClause:254,ROLLUP:255,CUBE:256,GroupExpression:257,GROUPING:258,HAVING:259,UnionOp:260,UnionableSelect:261,CORRESPONDING:262,OrderExpression:263,NullsOrder:264,NULLS:265,FIRST:266,LAST:267,DIRECTION:268,COLLATE:269,NOCASE:270,LIMIT:271,OffsetClause:272,OFFSET:273,LimitClause_option0:274,FETCH:275,LimitClause_option1:276,LimitClause_option2:277,LimitClause_option3:278,ResultColumn:279,Star:280,DELETED:281,AggrValue:282,Op:283,LogicValue:284,NullValue:285,ExistsValue:286,CaseValue:287,CastClause:288,ArrayValue:289,NewClause:290,Expression_group0:291,CURRENT_TIMESTAMP:292,CURRENT_DATE:293,JAVASCRIPT:294,CREATE:295,FUNCTION:296,AGGREGATE:297,NEW:298,CAST:299,ColumnType:300,CONVERT:301,PrimitiveValue:302,OverClause:303,GROUP_CONCAT:304,GroupConcatOrderClause:305,GroupConcatSeparatorClause:306,OVER:307,OverClause_option0:308,OverClause_option1:309,OverPartitionClause:310,PARTITION:311,OverOrderByClause:312,SUM:313,TOTAL:314,COUNT:315,MIN:316,MAX:317,AVG:318,AGGR:319,ARRAY:320,FuncValue_option0:321,REPLACE:322,DATEADD:323,DATEDIFF:324,TIMESTAMPDIFF:325,INTERVAL:326,TRUE:327,FALSE:328,NSTRING:329,NULL:330,EXISTS:331,ARRAYLBRA:332,RBRA:333,ParamValue_group0:334,BRAQUESTION:335,CASE:336,WhensList:337,ElseClause:338,END:339,When:340,WHEN:341,THEN:342,ELSE:343,REGEXP:344,TILDA:345,GLOB:346,ESCAPE:347,NOT_LIKE:348,BARBAR:349,MINUS:350,AMPERSAND:351,BAR:352,GE:353,LE:354,EQEQ:355,EQEQEQ:356,NE:357,NEEQEQ:358,NEEQEQEQ:359,CondOp:360,AllSome:361,ColFunc:362,BETWEEN:363,NOT_BETWEEN:364,IS:365,DOUBLECOLON:366,SOME:367,UPDATE:368,OutputClause:369,SetColumn:370,SetColumn_group0:371,DELETE:372,INSERT:373,Into:374,Values:375,ValuesListsList:376,IGNORE:377,DEFAULT:378,VALUES:379,ValuesList:380,Value:381,DateValue:382,TemporaryClause:383,TableClass:384,IfNotExists:385,CreateTableDefClause:386,CreateTableOptionsClause:387,TABLE:388,CreateTableOptions:389,CreateTableOption:390,IDENTITY:391,TEMP:392,ColumnDefsList:393,ConstraintsList:394,Constraint:395,ConstraintName:396,PrimaryKey:397,ForeignKey:398,UniqueKey:399,IndexKey:400,Check:401,CONSTRAINT:402,CHECK:403,PRIMARY:404,PrimaryKey_option0:405,ColsList:406,FOREIGN:407,REFERENCES:408,ForeignKey_option0:409,OnReferentialActions:410,ParColsList:411,OnDeleteClause:412,OnUpdateClause:413,ReferentialAction:414,CASCADE:415,RESTRICT:416,NO:417,ACTION:418,UniqueKey_option0:419,UniqueKey_option1:420,ColumnDef:421,ColumnConstraintsClause:422,ColumnConstraints:423,SingularColumnType:424,NumberMax:425,ENUM:426,MAXNUM:427,ColumnConstraintsList:428,ColumnConstraint:429,ParLiteral:430,ColumnConstraint_option0:431,ColumnConstraint_option1:432,DROP:433,DropTable_group0:434,IfExists:435,TablesList:436,ALTER:437,RENAME:438,ADD:439,MODIFY:440,ATTACH:441,DATABASE:442,DETACH:443,AsClause:444,USE:445,SHOW:446,VIEW:447,CreateView_option0:448,CreateView_option1:449,SubqueryRestriction:450,READ:451,ONLY:452,OPTION:453,SOURCE:454,ASSERT:455,JsonObject:456,ATLBRA:457,JsonArray:458,JsonValue:459,JsonPrimitiveValue:460,LCUR:461,JsonPropertiesList:462,RCUR:463,JsonElementsList:464,JsonProperty:465,COLONDASH:466,OnOff:467,SetPropsList:468,AtDollar:469,SetProp:470,OFF:471,COMMIT:472,TRANSACTION:473,ROLLBACK:474,BEGIN:475,ElseStatement:476,WHILE:477,CONTINUE:478,ITERATE:479,BREAK:480,LEAVE:481,PRINT:482,REQUIRE:483,StringValuesList:484,PluginsList:485,Plugin:486,ECHO:487,DECLARE:488,DeclaresList:489,DeclareItem:490,TRUNCATE:491,MERGE:492,MergeInto:493,MergeUsing:494,MergeOn:495,MergeMatchedList:496,MergeMatched:497,MergeNotMatched:498,MATCHED:499,MergeMatchedAction:500,MergeNotMatchedAction:501,TARGET:502,OUTPUT:503,CreateVertex_option0:504,CreateVertex_option1:505,CreateVertex_option2:506,CreateVertexSet:507,SharpValue:508,CONTENT:509,CreateEdge_option0:510,GRAPH:511,GraphList:512,GraphVertexEdge:513,GraphElement:514,GraphVertexEdge_option0:515,GraphVertexEdge_option1:516,GraphElementVar:517,GraphVertexEdge_option2:518,GraphVertexEdge_option3:519,GraphVertexEdge_option4:520,GraphVar:521,GraphAsClause:522,GraphAtClause:523,GraphElement2:524,GraphElement2_option0:525,GraphElement2_option1:526,GraphElement2_option2:527,GraphElement2_option3:528,GraphElement_option0:529,GraphElement_option1:530,GraphElement_option2:531,SharpLiteral:532,GraphElement_option3:533,GraphElement_option4:534,GraphElement_option5:535,ColonLiteral:536,DeleteVertex:537,DeleteVertex_option0:538,DeleteEdge:539,DeleteEdge_option0:540,DeleteEdge_option1:541,DeleteEdge_option2:542,Term:543,TermsList:544,QUESTIONDASH:545,CALL:546,TRIGGER:547,BeforeAfter:548,InsertDeleteUpdate:549,CreateTrigger_option0:550,CreateTrigger_option1:551,BEFORE:552,AFTER:553,INSTEAD:554,REINDEX:555,A:556,ABSENT:557,ABSOLUTE:558,ACCORDING:559,ADA:560,ADMIN:561,ALWAYS:562,ASC:563,ASSERTION:564,ASSIGNMENT:565,ATTRIBUTE:566,ATTRIBUTES:567,BASE64:568,BERNOULLI:569,BLOCKED:570,BOM:571,BREADTH:572,C:573,CATALOG:574,CATALOG_NAME:575,CHAIN:576,CHARACTERISTICS:577,CHARACTERS:578,CHARACTER_SET_CATALOG:579,CHARACTER_SET_NAME:580,CHARACTER_SET_SCHEMA:581,CLASS_ORIGIN:582,COBOL:583,COLLATION:584,COLLATION_CATALOG:585,COLLATION_NAME:586,COLLATION_SCHEMA:587,COLUMNS:588,COLUMN_NAME:589,COMMAND_FUNCTION:590,COMMAND_FUNCTION_CODE:591,COMMITTED:592,CONDITION_NUMBER:593,CONNECTION:594,CONNECTION_NAME:595,CONSTRAINTS:596,CONSTRAINT_CATALOG:597,CONSTRAINT_NAME:598,CONSTRAINT_SCHEMA:599,CONSTRUCTOR:600,CONTROL:601,CURSOR_NAME:602,DATA:603,DATETIME_INTERVAL_CODE:604,DATETIME_INTERVAL_PRECISION:605,DB:606,DEFAULTS:607,DEFERRABLE:608,DEFERRED:609,DEFINED:610,DEFINER:611,DEGREE:612,DEPTH:613,DERIVED:614,DESC:615,DESCRIPTOR:616,DIAGNOSTICS:617,DISPATCH:618,DOCUMENT:619,DOMAIN:620,DYNAMIC_FUNCTION:621,DYNAMIC_FUNCTION_CODE:622,EMPTY:623,ENCODING:624,ENFORCED:625,EXCLUDE:626,EXCLUDING:627,EXPRESSION:628,FILE:629,FINAL:630,FLAG:631,FOLLOWING:632,FORTRAN:633,FOUND:634,FS:635,G:636,GENERAL:637,GENERATED:638,GO:639,GOTO:640,GRANTED:641,HEX:642,HIERARCHY:643,ID:644,IMMEDIATE:645,IMMEDIATELY:646,IMPLEMENTATION:647,INCLUDING:648,INCREMENT:649,INDENT:650,INITIALLY:651,INPUT:652,INSTANCE:653,INSTANTIABLE:654,INTEGRITY:655,INVOKER:656,ISOLATION:657,K:658,KEY_MEMBER:659,KEY_TYPE:660,LENGTH:661,LEVEL:662,LIBRARY:663,LINK:664,LOCATION:665,LOCATOR:666,M:667,MAP:668,MAPPING:669,MAXVALUE:670,MESSAGE_LENGTH:671,MESSAGE_OCTET_LENGTH:672,MESSAGE_TEXT:673,MINVALUE:674,MORE:675,MUMPS:676,NAME:677,NAMES:678,NAMESPACE:679,NESTING:680,NEXT:681,NFC:682,NFD:683,NFKC:684,NFKD:685,NIL:686,NORMALIZED:687,NULLABLE:688,OBJECT:689,OCTETS:690,OPTIONS:691,ORDERING:692,ORDINALITY:693,OTHERS:694,OVERRIDING:695,P:696,PAD:697,PARAMETER_MODE:698,PARAMETER_NAME:699,PARAMETER_ORDINAL_POSITION:700,PARAMETER_SPECIFIC_CATALOG:701,PARAMETER_SPECIFIC_NAME:702,PARAMETER_SPECIFIC_SCHEMA:703,PARTIAL:704,PASCAL:705,PASSING:706,PASSTHROUGH:707,PERMISSION:708,PLACING:709,PLI:710,PRECEDING:711,PRESERVE:712,PRIOR:713,PRIVILEGES:714,PUBLIC:715,RECOVERY:716,RELATIVE:717,REPEATABLE:718,REQUIRING:719,RESPECT:720,RESTART:721,RESTORE:722,RETURNED_CARDINALITY:723,RETURNED_LENGTH:724,RETURNED_OCTET_LENGTH:725,RETURNED_SQLSTATE:726,RETURNING:727,ROLE:728,ROUTINE:729,ROUTINE_CATALOG:730,ROUTINE_NAME:731,ROUTINE_SCHEMA:732,ROW_COUNT:733,SCALE:734,SCHEMA:735,SCHEMA_NAME:736,SCOPE_CATALOG:737,SCOPE_NAME:738,SCOPE_SCHEMA:739,SECTION:740,SECURITY:741,SELECTIVE:742,SELF:743,SEQUENCE:744,SERIALIZABLE:745,SERVER:746,SERVER_NAME:747,SESSION:748,SETS:749,SIMPLE:750,SIZE:751,SPACE:752,SPECIFIC_NAME:753,STANDALONE:754,STATE:755,STATEMENT:756,STRIP:757,STRUCTURE:758,STYLE:759,SUBCLASS_ORIGIN:760,T:761,TABLE_NAME:762,TEMPORARY:763,TIES:764,TOKEN:765,TOP_LEVEL_COUNT:766,TRANSACTIONS_COMMITTED:767,TRANSACTIONS_ROLLED_BACK:768,TRANSACTION_ACTIVE:769,TRANSFORM:770,TRANSFORMS:771,TRIGGER_CATALOG:772,TRIGGER_NAME:773,TRIGGER_SCHEMA:774,TYPE:775,UNBOUNDED:776,UNCOMMITTED:777,UNDER:778,UNLINK:779,UNNAMED:780,UNTYPED:781,URI:782,USAGE:783,USER_DEFINED_TYPE_CATALOG:784,USER_DEFINED_TYPE_CODE:785,USER_DEFINED_TYPE_NAME:786,USER_DEFINED_TYPE_SCHEMA:787,VALID:788,VERSION:789,WHITESPACE:790,WORK:791,WRAPPER:792,WRITE:793,XMLDECLARATION:794,XMLSCHEMA:795,YES:796,ZONE:797,SEMICOLON:798,PERCENT:799,ROWS:800,FuncValue_option0_group0:801,$accept:0,$end:1},terminals_:{2:"error",4:"LITERAL",5:"BRALITERAL",6:"KEY",7:"OPEN",8:"CLOSE",9:"SEPARATOR",14:"EOF",18:"EXPLAIN",19:"QUERY",20:"PLAN",58:"EndTransaction",77:"WITH",79:"COMMA",81:"RECURSIVE",82:"AS",83:"LPAR",84:"RPAR",96:"SEARCH",103:"PIVOT",105:"FOR",108:"UNPIVOT",109:"IN",116:"REMOVE",121:"LIKE",124:"ARROW",125:"DOT",127:"ORDER",128:"BY",131:"DOTDOT",132:"CARET",133:"EQ",137:"WHERE",138:"OF",139:"CLASS",140:"NUMBER",141:"STRING",142:"SLASH",143:"VERTEX",144:"EDGE",145:"EXCLAMATION",146:"SHARP",147:"MODULO",148:"GT",149:"LT",150:"GTGT",151:"LTLT",152:"DOLLAR",154:"AT",155:"SET",157:"TO",158:"VALUE",159:"ROW",161:"COLON",163:"NOT",165:"IF",171:"UNION",173:"ALL",175:"ANY",177:"INTERSECT",178:"EXCEPT",179:"AND",180:"OR",181:"PATH",182:"RETURN",184:"REPEAT",188:"PLUS",189:"STAR",190:"QUESTION",192:"FROM",194:"DISTINCT",196:"UNIQUE",198:"SELECT",199:"COLUMN",200:"MATRIX",201:"TEXTSTRING",202:"INDEX",203:"RECORDSET",204:"TOP",207:"INTO",215:"CROSS",216:"APPLY",217:"OUTER",223:"INDEXED",229:"INSERTED",242:"NATURAL",243:"JOIN",244:"INNER",245:"LEFT",246:"RIGHT",247:"FULL",248:"SEMI",249:"ANTI",250:"ON",251:"USING",252:"GROUP",255:"ROLLUP",256:"CUBE",258:"GROUPING",259:"HAVING",262:"CORRESPONDING",265:"NULLS",266:"FIRST",267:"LAST",268:"DIRECTION",269:"COLLATE",270:"NOCASE",271:"LIMIT",273:"OFFSET",275:"FETCH",281:"DELETED",292:"CURRENT_TIMESTAMP",293:"CURRENT_DATE",294:"JAVASCRIPT",295:"CREATE",296:"FUNCTION",297:"AGGREGATE",298:"NEW",299:"CAST",301:"CONVERT",304:"GROUP_CONCAT",307:"OVER",311:"PARTITION",313:"SUM",314:"TOTAL",315:"COUNT",316:"MIN",317:"MAX",318:"AVG",319:"AGGR",320:"ARRAY",322:"REPLACE",323:"DATEADD",324:"DATEDIFF",325:"TIMESTAMPDIFF",326:"INTERVAL",327:"TRUE",328:"FALSE",329:"NSTRING",330:"NULL",331:"EXISTS",332:"ARRAYLBRA",333:"RBRA",335:"BRAQUESTION",336:"CASE",339:"END",341:"WHEN",342:"THEN",343:"ELSE",344:"REGEXP",345:"TILDA",346:"GLOB",347:"ESCAPE",348:"NOT_LIKE",349:"BARBAR",350:"MINUS",351:"AMPERSAND",352:"BAR",353:"GE",354:"LE",355:"EQEQ",356:"EQEQEQ",357:"NE",358:"NEEQEQ",359:"NEEQEQEQ",363:"BETWEEN",364:"NOT_BETWEEN",365:"IS",366:"DOUBLECOLON",367:"SOME",368:"UPDATE",372:"DELETE",373:"INSERT",377:"IGNORE",378:"DEFAULT",379:"VALUES",382:"DateValue",388:"TABLE",391:"IDENTITY",392:"TEMP",402:"CONSTRAINT",403:"CHECK",404:"PRIMARY",407:"FOREIGN",408:"REFERENCES",415:"CASCADE",416:"RESTRICT",417:"NO",418:"ACTION",423:"ColumnConstraints",426:"ENUM",427:"MAXNUM",433:"DROP",437:"ALTER",438:"RENAME",439:"ADD",440:"MODIFY",441:"ATTACH",442:"DATABASE",443:"DETACH",445:"USE",446:"SHOW",447:"VIEW",451:"READ",452:"ONLY",453:"OPTION",454:"SOURCE",455:"ASSERT",457:"ATLBRA",461:"LCUR",463:"RCUR",466:"COLONDASH",471:"OFF",472:"COMMIT",473:"TRANSACTION",474:"ROLLBACK",475:"BEGIN",477:"WHILE",478:"CONTINUE",479:"ITERATE",480:"BREAK",481:"LEAVE",482:"PRINT",483:"REQUIRE",487:"ECHO",488:"DECLARE",491:"TRUNCATE",492:"MERGE",499:"MATCHED",502:"TARGET",503:"OUTPUT",509:"CONTENT",511:"GRAPH",545:"QUESTIONDASH",546:"CALL",547:"TRIGGER",552:"BEFORE",553:"AFTER",554:"INSTEAD",555:"REINDEX",556:"A",557:"ABSENT",558:"ABSOLUTE",559:"ACCORDING",560:"ADA",561:"ADMIN",562:"ALWAYS",563:"ASC",564:"ASSERTION",565:"ASSIGNMENT",566:"ATTRIBUTE",567:"ATTRIBUTES",568:"BASE64",569:"BERNOULLI",570:"BLOCKED",571:"BOM",572:"BREADTH",573:"C",574:"CATALOG",575:"CATALOG_NAME",576:"CHAIN",577:"CHARACTERISTICS",578:"CHARACTERS",579:"CHARACTER_SET_CATALOG",580:"CHARACTER_SET_NAME",581:"CHARACTER_SET_SCHEMA",582:"CLASS_ORIGIN",583:"COBOL",584:"COLLATION",585:"COLLATION_CATALOG",586:"COLLATION_NAME",587:"COLLATION_SCHEMA",588:"COLUMNS",589:"COLUMN_NAME",590:"COMMAND_FUNCTION",591:"COMMAND_FUNCTION_CODE",592:"COMMITTED",593:"CONDITION_NUMBER",594:"CONNECTION",595:"CONNECTION_NAME",596:"CONSTRAINTS",597:"CONSTRAINT_CATALOG",598:"CONSTRAINT_NAME",599:"CONSTRAINT_SCHEMA",600:"CONSTRUCTOR",601:"CONTROL",602:"CURSOR_NAME",603:"DATA",604:"DATETIME_INTERVAL_CODE",605:"DATETIME_INTERVAL_PRECISION",606:"DB",607:"DEFAULTS",608:"DEFERRABLE",609:"DEFERRED",610:"DEFINED",611:"DEFINER",612:"DEGREE",613:"DEPTH",614:"DERIVED",615:"DESC",616:"DESCRIPTOR",617:"DIAGNOSTICS",618:"DISPATCH",619:"DOCUMENT",620:"DOMAIN",621:"DYNAMIC_FUNCTION",622:"DYNAMIC_FUNCTION_CODE",623:"EMPTY",624:"ENCODING",625:"ENFORCED",626:"EXCLUDE",627:"EXCLUDING",628:"EXPRESSION",629:"FILE",630:"FINAL",631:"FLAG",632:"FOLLOWING",633:"FORTRAN",634:"FOUND",635:"FS",636:"G",637:"GENERAL",638:"GENERATED",639:"GO",640:"GOTO",641:"GRANTED",642:"HEX",643:"HIERARCHY",644:"ID",645:"IMMEDIATE",646:"IMMEDIATELY",647:"IMPLEMENTATION",648:"INCLUDING",649:"INCREMENT",650:"INDENT",651:"INITIALLY",652:"INPUT",653:"INSTANCE",654:"INSTANTIABLE",655:"INTEGRITY",656:"INVOKER",657:"ISOLATION",658:"K",659:"KEY_MEMBER",660:"KEY_TYPE",661:"LENGTH",662:"LEVEL",663:"LIBRARY",664:"LINK",665:"LOCATION",666:"LOCATOR",667:"M",668:"MAP",669:"MAPPING",670:"MAXVALUE",671:"MESSAGE_LENGTH",672:"MESSAGE_OCTET_LENGTH",673:"MESSAGE_TEXT",674:"MINVALUE",675:"MORE",676:"MUMPS",677:"NAME",678:"NAMES",679:"NAMESPACE",680:"NESTING",681:"NEXT",682:"NFC",683:"NFD",684:"NFKC",685:"NFKD",686:"NIL",687:"NORMALIZED",688:"NULLABLE",689:"OBJECT",690:"OCTETS",691:"OPTIONS",692:"ORDERING",693:"ORDINALITY",694:"OTHERS",695:"OVERRIDING",696:"P",697:"PAD",698:"PARAMETER_MODE",699:"PARAMETER_NAME",700:"PARAMETER_ORDINAL_POSITION",701:"PARAMETER_SPECIFIC_CATALOG",702:"PARAMETER_SPECIFIC_NAME",703:"PARAMETER_SPECIFIC_SCHEMA",704:"PARTIAL",705:"PASCAL",706:"PASSING",707:"PASSTHROUGH",708:"PERMISSION",709:"PLACING",710:"PLI",711:"PRECEDING",712:"PRESERVE",713:"PRIOR",714:"PRIVILEGES",715:"PUBLIC",716:"RECOVERY",717:"RELATIVE",718:"REPEATABLE",719:"REQUIRING",720:"RESPECT",721:"RESTART",722:"RESTORE",723:"RETURNED_CARDINALITY",724:"RETURNED_LENGTH",725:"RETURNED_OCTET_LENGTH",726:"RETURNED_SQLSTATE",727:"RETURNING",728:"ROLE",729:"ROUTINE",730:"ROUTINE_CATALOG",731:"ROUTINE_NAME",732:"ROUTINE_SCHEMA",733:"ROW_COUNT",734:"SCALE",735:"SCHEMA",736:"SCHEMA_NAME",737:"SCOPE_CATALOG",738:"SCOPE_NAME",739:"SCOPE_SCHEMA",740:"SECTION",741:"SECURITY",742:"SELECTIVE",743:"SELF",744:"SEQUENCE",745:"SERIALIZABLE",746:"SERVER",747:"SERVER_NAME",748:"SESSION",749:"SETS",750:"SIMPLE",751:"SIZE",752:"SPACE",753:"SPECIFIC_NAME",754:"STANDALONE",755:"STATE",756:"STATEMENT",757:"STRIP",758:"STRUCTURE",759:"STYLE",760:"SUBCLASS_ORIGIN",761:"T",762:"TABLE_NAME",763:"TEMPORARY",764:"TIES",765:"TOKEN",766:"TOP_LEVEL_COUNT",767:"TRANSACTIONS_COMMITTED",768:"TRANSACTIONS_ROLLED_BACK",769:"TRANSACTION_ACTIVE",770:"TRANSFORM",771:"TRANSFORMS",772:"TRIGGER_CATALOG",773:"TRIGGER_NAME",774:"TRIGGER_SCHEMA",775:"TYPE",776:"UNBOUNDED",777:"UNCOMMITTED",778:"UNDER",779:"UNLINK",780:"UNNAMED",781:"UNTYPED",782:"URI",783:"USAGE",784:"USER_DEFINED_TYPE_CATALOG",785:"USER_DEFINED_TYPE_CODE",786:"USER_DEFINED_TYPE_NAME",787:"USER_DEFINED_TYPE_SCHEMA",788:"VALID",789:"VERSION",790:"WHITESPACE",791:"WORK",792:"WRAPPER",793:"WRITE",794:"XMLDECLARATION",795:"XMLSCHEMA",796:"YES",797:"ZONE",798:"SEMICOLON",799:"PERCENT",800:"ROWS"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,2],[11,1],[11,2],[12,2],[13,3],[13,1],[13,1],[17,2],[17,4],[16,1],[21,0],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[52,3],[78,3],[78,4],[78,1],[78,2],[80,5],[80,8],[44,10],[44,6],[44,4],[44,4],[45,3],[45,3],[99,8],[102,8],[102,11],[111,4],[113,2],[113,1],[112,3],[112,1],[114,1],[114,3],[115,3],[118,3],[118,1],[119,1],[119,2],[123,1],[123,1],[126,1],[126,5],[126,5],[126,1],[126,2],[126,1],[126,2],[126,2],[126,3],[126,4],[126,4],[126,4],[126,4],[126,4],[126,1],[126,1],[126,1],[126,1],[126,1],[126,1],[126,2],[126,2],[126,2],[126,1],[126,1],[126,1],[126,1],[126,1],[126,1],[126,2],[126,3],[126,4],[126,3],[126,1],[126,4],[126,2],[126,2],[126,4],[126,4],[126,4],[126,4],[126,4],[126,5],[126,4],[126,4],[126,4],[126,4],[126,4],[126,4],[126,4],[126,4],[126,6],[172,3],[172,1],[162,1],[162,1],[162,1],[191,2],[86,4],[86,4],[86,4],[86,3],[193,1],[193,2],[193,2],[193,2],[193,2],[193,2],[193,2],[193,2],[195,3],[195,4],[195,0],[88,0],[88,2],[88,2],[88,2],[88,2],[88,2],[89,2],[89,3],[89,5],[89,5],[89,0],[214,6],[214,7],[214,6],[214,7],[212,1],[212,3],[218,4],[218,3],[218,2],[218,3],[218,2],[218,2],[218,2],[218,2],[218,1],[230,1],[230,2],[227,1],[208,3],[208,1],[231,1],[231,1],[213,2],[213,2],[213,1],[213,1],[232,3],[234,2],[234,3],[234,2],[234,4],[234,2],[234,2],[233,1],[233,2],[241,1],[241,2],[241,2],[241,3],[241,2],[241,3],[241,2],[241,3],[241,2],[241,2],[241,2],[235,2],[235,2],[235,4],[235,0],[91,0],[91,2],[92,0],[92,4],[92,6],[92,6],[253,1],[253,3],[257,5],[257,4],[257,4],[257,1],[254,0],[254,2],[93,0],[93,2],[260,1],[260,2],[260,1],[260,1],[260,2],[260,3],[260,2],[260,2],[261,1],[261,1],[94,0],[94,3],[129,1],[129,3],[264,2],[264,2],[263,1],[263,2],[263,3],[263,3],[263,4],[95,0],[95,3],[95,8],[272,0],[272,2],[183,3],[183,1],[279,3],[279,2],[279,3],[279,2],[279,3],[279,2],[279,1],[280,5],[280,3],[280,3],[280,3],[280,1],[120,5],[120,3],[120,3],[120,3],[120,3],[120,4],[120,1],[120,1],[120,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,3],[104,3],[104,3],[104,1],[104,1],[104,1],[61,1],[75,5],[76,5],[290,2],[290,2],[288,6],[288,8],[288,6],[288,8],[302,1],[302,1],[302,1],[302,1],[302,1],[302,1],[302,1],[302,1],[282,5],[282,6],[282,6],[282,6],[282,7],[303,0],[303,5],[310,3],[312,3],[305,0],[305,3],[306,0],[306,2],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[209,6],[209,4],[209,4],[209,4],[209,3],[209,8],[209,8],[209,8],[209,8],[209,8],[209,3],[160,1],[160,3],[205,1],[284,1],[284,1],[122,1],[122,1],[285,1],[211,2],[286,4],[289,3],[210,2],[210,2],[210,1],[210,1],[287,5],[287,4],[337,2],[337,1],[340,4],[338,2],[338,0],[283,3],[283,3],[283,3],[283,3],[283,5],[283,3],[283,5],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,5],[283,3],[283,3],[283,3],[283,5],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,6],[283,6],[283,3],[283,3],[283,2],[283,2],[283,2],[283,2],[283,2],[283,3],[283,5],[283,6],[283,5],[283,6],[283,4],[283,5],[283,3],[283,4],[283,3],[283,4],[283,3],[283,3],[283,3],[283,3],[283,3],[362,1],[362,1],[362,4],[360,1],[360,1],[360,1],[360,1],[360,1],[360,1],[361,1],[361,1],[361,1],[60,7],[60,5],[156,1],[156,3],[370,3],[370,4],[33,6],[33,4],[40,6],[40,5],[40,7],[40,6],[40,10],[40,9],[40,6],[40,9],[40,8],[40,7],[40,6],[40,5],[40,6],[40,9],[40,8],[40,5],[40,7],[40,8],[40,6],[375,1],[375,1],[374,0],[374,1],[376,3],[376,1],[376,1],[376,5],[376,3],[376,3],[380,1],[380,3],[381,1],[381,1],[381,1],[381,1],[381,1],[381,1],[85,1],[85,3],[28,9],[28,5],[384,1],[384,1],[387,0],[387,1],[389,2],[389,1],[390,1],[390,3],[390,3],[390,3],[383,0],[383,1],[385,0],[385,3],[386,3],[386,1],[386,2],[394,1],[394,3],[395,2],[395,2],[395,2],[395,2],[395,2],[396,0],[396,2],[401,4],[397,6],[398,9],[411,3],[410,0],[410,1],[410,1],[410,2],[410,2],[412,3],[413,3],[414,1],[414,2],[414,2],[414,1],[414,2],[399,6],[400,5],[406,1],[406,1],[406,3],[406,3],[393,1],[393,3],[421,3],[421,2],[421,1],[424,6],[424,4],[424,1],[424,4],[300,2],[300,1],[425,1],[425,1],[422,0],[422,1],[428,2],[428,1],[430,3],[429,2],[429,6],[429,4],[429,6],[429,1],[429,2],[429,4],[429,2],[429,1],[429,2],[429,1],[429,1],[429,3],[429,5],[37,4],[436,3],[436,1],[435,0],[435,2],[22,6],[22,6],[22,6],[22,8],[22,6],[43,5],[23,4],[23,7],[23,6],[23,9],[34,3],[25,4],[25,6],[25,9],[25,6],[444,0],[444,2],[59,3],[59,2],[35,4],[35,5],[35,5],[26,8],[26,9],[36,3],[48,2],[48,4],[48,3],[48,5],[50,2],[50,4],[50,4],[50,6],[47,4],[47,6],[49,4],[49,6],[46,4],[46,6],[29,11],[29,8],[450,3],[450,3],[450,5],[38,4],[71,2],[62,2],[63,2],[63,2],[63,4],[153,4],[153,2],[153,2],[153,2],[153,2],[153,1],[153,2],[153,2],[459,1],[459,1],[460,1],[460,2],[460,1],[460,1],[460,1],[460,1],[460,1],[460,1],[460,3],[456,3],[456,4],[456,2],[458,2],[458,3],[458,1],[462,3],[462,1],[465,3],[465,3],[465,3],[465,3],[465,3],[465,3],[464,3],[464,1],[70,4],[70,3],[70,4],[70,5],[70,5],[70,6],[469,1],[469,1],[468,3],[468,2],[470,1],[470,1],[470,3],[467,1],[467,1],[56,2],[57,2],[55,2],[39,4],[39,3],[476,2],[64,3],[65,1],[65,1],[66,1],[66,1],[67,3],[68,2],[68,2],[69,2],[69,2],[486,1],[486,1],[74,2],[484,3],[484,1],[485,3],[485,1],[32,2],[489,1],[489,3],[490,3],[490,4],[490,5],[490,6],[51,3],[41,6],[493,1],[493,2],[494,2],[494,4],[495,2],[496,2],[496,2],[496,1],[496,1],[497,4],[497,6],[500,1],[500,3],[498,5],[498,7],[498,7],[498,9],[498,7],[498,9],[501,3],[501,6],[501,3],[501,6],[369,0],[369,2],[369,5],[369,4],[369,7],[31,6],[508,2],[507,0],[507,2],[507,2],[507,1],[30,8],[27,3],[27,4],[512,3],[512,1],[513,3],[513,7],[513,6],[513,3],[513,4],[517,1],[517,1],[521,2],[522,3],[523,2],[524,4],[514,4],[514,3],[514,2],[514,1],[536,2],[532,2],[532,2],[537,4],[539,6],[72,3],[72,2],[544,3],[544,1],[543,1],[543,4],[73,2],[24,2],[53,9],[53,8],[53,9],[548,0],[548,1],[548,1],[548,1],[548,2],[549,1],[549,1],[549,1],[54,3],[42,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[15,1],[15,1],[87,0],[87,1],[90,0],[90,1],[97,0],[97,2],[98,0],[98,1],[100,0],[100,1],[101,0],[101,1],[106,0],[106,1],[107,0],[107,1],[110,0],[110,1],[117,0],[117,1],[130,0],[130,1],[134,1],[134,2],[135,1],[135,2],[136,0],[136,1],[164,0],[164,2],[166,0],[166,2],[168,0],[168,2],[169,1],[169,1],[170,0],[170,2],[174,0],[174,2],[176,0],[176,2],[185,0],[185,2],[186,0],[186,2],[187,0],[187,2],[197,0],[197,1],[206,0],[206,1],[219,0],[219,1],[220,0],[220,1],[221,0],[221,1],[222,0],[222,1],[224,0],[224,1],[225,0],[225,1],[226,0],[226,1],[228,0],[228,1],[236,0],[236,1],[237,0],[237,1],[238,0],[238,1],[239,0],[239,1],[240,0],[240,1],[274,0],[274,1],[276,0],[276,1],[277,0],[277,1],[278,0],[278,1],[291,1],[291,1],[308,0],[308,1],[309,0],[309,1],[801,1],[801,1],[321,0],[321,1],[334,1],[334,1],[371,1],[371,1],[405,0],[405,1],[409,0],[409,1],[419,0],[419,1],[420,0],[420,1],[431,0],[431,1],[432,0],[432,1],[434,1],[434,1],[448,0],[448,1],[449,0],[449,1],[504,0],[504,1],[505,0],[505,1],[506,0],[506,1],[510,0],[510,1],[515,0],[515,1],[516,0],[516,1],[518,0],[518,1],[519,0],[519,1],[520,0],[520,1],[525,0],[525,1],[526,0],[526,1],[527,0],[527,1],[528,0],[528,1],[529,0],[529,1],[530,0],[530,1],[531,0],[531,1],[533,0],[533,1],[534,0],[534,1],[535,0],[535,1],[538,0],[538,2],[540,0],[540,2],[541,0],[541,2],[542,0],[542,2],[550,0],[550,1],[551,0],[551,1]],performAction:function(ma,Xr,En,A,cs,m,Ka){var y=m.length-1;switch(cs){case 1:t.options.casesensitive?this.$=m[y]:this.$=m[y].toLowerCase();break;case 2:this.$=I(m[y].substr(1,m[y].length-2));break;case 3:case 4:case 5:case 6:this.$=m[y].toLowerCase();break;case 7:this.$=m[y].toLowerCase();break;case 8:this.$=m[y];break;case 9:this.$=m[y]?m[y-1]+" "+m[y]:m[y-1];break;case 10:return new A.Statements({statements:m[y-1]});case 11:this.$=m[y-2],m[y]&&m[y-2].push(m[y]);break;case 12:case 13:case 76:case 93:case 98:case 156:case 191:case 211:case 212:case 243:case 265:case 280:case 378:case 396:case 475:case 505:case 506:case 510:case 518:case 566:case 567:case 604:case 691:case 701:case 727:case 729:case 731:case 746:case 747:case 777:case 801:this.$=[m[y]];break;case 14:this.$=m[y],m[y].explain=!0;break;case 15:this.$=m[y],m[y].explain=!0;break;case 16:this.$=m[y],A.exists&&(this.$.exists=A.exists),delete A.exists,A.queries&&(this.$.queries=A.queries),delete A.queries;break;case 17:case 175:case 186:case 236:case 237:case 239:case 249:case 251:case 263:case 274:case 277:case 348:case 352:case 354:case 399:case 522:case 532:case 534:case 546:case 605:this.$=void 0;break;case 73:this.$=new A.WithSelect({withs:m[y-1],select:m[y]});break;case 74:case 603:m[y-2].push(m[y]),this.$=m[y-2];break;case 75:m[y].recursive=!0,m[y-3].push(m[y]),this.$=m[y-3];break;case 77:m[y].recursive=!0,this.$=[m[y]];break;case 78:this.$={name:m[y-4],select:m[y-1]};break;case 79:this.$={name:m[y-7],columns:m[y-5],select:m[y-1]};break;case 80:A.extend(this.$,m[y-9]),A.extend(this.$,m[y-8]),A.extend(this.$,m[y-7]),A.extend(this.$,m[y-6]),A.extend(this.$,m[y-5]),A.extend(this.$,m[y-4]),A.extend(this.$,m[y-3]),A.extend(this.$,m[y-2]),A.extend(this.$,m[y-1]),A.extend(this.$,m[y]),this.$=m[y-9],A.exists&&(this.$.exists=A.exists.slice());break;case 81:this.$=m[y-4],A.extend(this.$,m[y-2]),A.extend(this.$,m[y-1]),A.extend(this.$,m[y]),A.exists&&(this.$.exists=A.exists.slice());break;case 82:A.extend(this.$,m[y-3]),A.extend(this.$,m[y-2]),A.extend(this.$,m[y-1]),A.extend(this.$,m[y]),this.$=m[y-3],A.exists&&(this.$.exists=A.exists.slice());break;case 83:this.$=new A.Search({selectors:m[y-2],from:m[y]}),A.extend(this.$,m[y-1]);break;case 84:case 85:case 89:case 551:case 587:case 623:case 657:case 675:case 676:case 679:case 704:this.$=m[y-1];break;case 86:A.extend(this.$,m[y-7]),A.extend(this.$,m[y-6]),A.extend(this.$,m[y-5]),A.extend(this.$,m[y-4]),A.extend(this.$,m[y-3]),A.extend(this.$,m[y-2]),A.extend(this.$,m[y-1]),A.extend(this.$,m[y]),this.$=m[y-7],A.exists&&(this.$.exists=A.exists.slice());break;case 87:this.$={pivot:{expr:m[y-5],columnid:m[y-3],inlist:m[y-2],as:m[y]}};break;case 88:this.$={unpivot:{tocolumnid:m[y-8],forcolumnid:m[y-6],inlist:m[y-3],as:m[y]}};break;case 90:case 91:case 99:case 160:case 202:case 203:case 207:case 208:case 248:case 287:case 302:case 303:case 304:case 305:case 306:case 307:case 308:case 309:case 310:case 311:case 312:case 313:case 314:case 315:case 318:case 319:case 335:case 336:case 337:case 338:case 339:case 340:case 353:case 398:case 464:case 465:case 466:case 467:case 468:case 469:case 547:case 580:case 584:case 586:case 661:case 662:case 663:case 664:case 665:case 666:case 671:case 673:case 674:case 683:case 702:case 703:case 768:case 783:case 784:case 786:case 787:case 793:case 794:this.$=m[y];break;case 92:case 97:case 776:case 800:this.$=m[y-2],this.$.push(m[y]);break;case 94:this.$={expr:m[y]};break;case 95:this.$={expr:m[y-2],as:m[y]};break;case 96:this.$={removecolumns:m[y]};break;case 100:this.$={like:m[y]};break;case 103:case 117:this.$={srchid:"PROP",args:[m[y]]};break;case 104:this.$={srchid:"ORDERBY",args:m[y-1]};break;case 105:var Iu=m[y-1];Iu||(Iu="ASC"),this.$={srchid:"ORDERBY",args:[{expression:new A.Column({columnid:"_"}),direction:Iu}]};break;case 106:this.$={srchid:"PARENT"};break;case 107:this.$={srchid:"APROP",args:[m[y]]};break;case 108:this.$={selid:"ROOT"};break;case 109:this.$={srchid:"EQ",args:[m[y]]};break;case 110:this.$={srchid:"LIKE",args:[m[y]]};break;case 111:case 112:this.$={selid:"WITH",args:m[y-1]};break;case 113:this.$={srchid:m[y-3].toUpperCase(),args:m[y-1]};break;case 114:this.$={srchid:"WHERE",args:[m[y-1]]};break;case 115:this.$={selid:"OF",args:[m[y-1]]};break;case 116:this.$={srchid:"CLASS",args:[m[y-1]]};break;case 118:this.$={srchid:"NAME",args:[m[y].substr(1,m[y].length-2)]};break;case 119:this.$={srchid:"CHILD"};break;case 120:this.$={srchid:"VERTEX"};break;case 121:this.$={srchid:"EDGE"};break;case 122:this.$={srchid:"REF"};break;case 123:this.$={srchid:"SHARP",args:[m[y]]};break;case 124:this.$={srchid:"ATTR",args:typeof m[y]>"u"?void 0:[m[y]]};break;case 125:this.$={srchid:"ATTR"};break;case 126:this.$={srchid:"OUT"};break;case 127:this.$={srchid:"IN"};break;case 128:this.$={srchid:"OUTOUT"};break;case 129:this.$={srchid:"ININ"};break;case 130:this.$={srchid:"CONTENT"};break;case 131:this.$={srchid:"EX",args:[new A.Json({value:m[y]})]};break;case 132:this.$={srchid:"AT",args:[m[y]]};break;case 133:this.$={srchid:"AS",args:[m[y]]};break;case 134:this.$={srchid:"SET",args:m[y-1]};break;case 135:this.$={selid:"TO",args:[m[y]]};break;case 136:this.$={srchid:"VALUE"};break;case 137:this.$={srchid:"ROW",args:m[y-1]};break;case 138:this.$={srchid:"CLASS",args:[m[y]]};break;case 139:this.$={selid:m[y],args:[m[y-1]]};break;case 140:this.$={selid:"NOT",args:m[y-1]};break;case 141:this.$={selid:"IF",args:m[y-1]};break;case 142:this.$={selid:m[y-3],args:m[y-1]};break;case 143:this.$={selid:"DISTINCT",args:m[y-1]};break;case 144:this.$={selid:"UNION",args:m[y-1]};break;case 145:this.$={selid:"UNIONALL",args:m[y-1]};break;case 146:this.$={selid:"ALL",args:[m[y-1]]};break;case 147:this.$={selid:"ANY",args:[m[y-1]]};break;case 148:this.$={selid:"INTERSECT",args:m[y-1]};break;case 149:this.$={selid:"EXCEPT",args:m[y-1]};break;case 150:this.$={selid:"AND",args:m[y-1]};break;case 151:this.$={selid:"OR",args:m[y-1]};break;case 152:this.$={selid:"PATH",args:[m[y-1]]};break;case 153:this.$={srchid:"RETURN",args:m[y-1]};break;case 154:this.$={selid:"REPEAT",sels:m[y-3],args:m[y-1]};break;case 155:this.$=m[y-2],this.$.push(m[y]);break;case 157:this.$="PLUS";break;case 158:this.$="STAR";break;case 159:this.$="QUESTION";break;case 161:this.$=new A.Select({columns:m[y],distinct:!0}),A.extend(this.$,m[y-3]),A.extend(this.$,m[y-1]);break;case 162:this.$=new A.Select({columns:m[y],distinct:!0}),A.extend(this.$,m[y-3]),A.extend(this.$,m[y-1]);break;case 163:this.$=new A.Select({columns:m[y],all:!0}),A.extend(this.$,m[y-3]),A.extend(this.$,m[y-1]);break;case 164:m[y]?(this.$=new A.Select({columns:m[y]}),A.extend(this.$,m[y-2]),A.extend(this.$,m[y-1])):this.$=new A.Select({columns:[new A.Column({columnid:"_"})],modifier:"COLUMN"});break;case 165:m[y]=="SELECT"?this.$=void 0:this.$={modifier:m[y]};break;case 166:this.$={modifier:"VALUE"};break;case 167:this.$={modifier:"ROW"};break;case 168:this.$={modifier:"COLUMN"};break;case 169:this.$={modifier:"MATRIX"};break;case 170:this.$={modifier:"TEXTSTRING"};break;case 171:this.$={modifier:"INDEX"};break;case 172:this.$={modifier:"RECORDSET"};break;case 173:this.$={top:m[y-1],percent:typeof m[y]<"u"?!0:void 0};break;case 174:this.$={top:m[y-1]};break;case 176:case 769:this.$=void 0;break;case 177:case 178:case 179:case 180:this.$={into:m[y]};break;case 181:var Us=m[y];Us=Us.substr(1,Us.length-2);var g1=Us.substr(-3).toUpperCase(),ol=Us.substr(-4).toUpperCase();Us[0]=="#"?this.$={into:new A.FuncValue({funcid:"HTML",args:[new A.StringValue({value:Us}),new A.Json({value:{headers:!0}})]})}:g1=="XLS"||g1=="CSV"||g1=="TAB"?this.$={into:new A.FuncValue({funcid:g1,args:[new A.StringValue({value:Us}),new A.Json({value:{headers:!0}})]})}:(ol=="XLSX"||ol=="JSON")&&(this.$={into:new A.FuncValue({funcid:ol,args:[new A.StringValue({value:Us}),new A.Json({value:{headers:!0}})]})});break;case 182:this.$={from:m[y]};break;case 183:this.$={from:m[y-1],joins:m[y]};break;case 184:var z3=m[y-2];m[y].forEach(Vi=>{var r1=new A.Join({joinmode:"CROSS"});Vi.tableid?r1.table=new A.Table({databaseid:Vi.databaseid,tableid:Vi.tableid}):Vi instanceof A.Select?r1.select=Vi:Vi instanceof A.Search?r1.search=Vi:Vi instanceof A.ParamValue?r1.param=Vi:Vi instanceof A.VarValue?r1.variable=Vi.variable:Vi instanceof A.FuncValue?r1.func=Vi:Vi instanceof A.Json&&(r1.json=Vi),Vi.as&&(r1.as=Vi.as),z3.push(r1)}),this.$={from:m[y-3],joins:z3};break;case 185:this.$={from:m[y-2],joins:m[y-1]};break;case 187:this.$=new A.Apply({select:m[y-2],applymode:"CROSS",as:m[y]});break;case 188:this.$=new A.Apply({select:m[y-3],applymode:"CROSS",as:m[y]});break;case 189:this.$=new A.Apply({select:m[y-2],applymode:"OUTER",as:m[y]});break;case 190:this.$=new A.Apply({select:m[y-3],applymode:"OUTER",as:m[y]});break;case 192:case 244:case 476:case 568:case 569:this.$=m[y-2],m[y-2].push(m[y]);break;case 193:this.$=m[y-2],this.$.as=m[y]||"default";break;case 194:this.$=new A.Json({value:m[y-2]}),m[y-2].as=m[y];break;case 195:this.$=m[y-1],m[y]&&(m[y-1].as=m[y]);break;case 196:case 677:case 680:this.$=m[y-2];break;case 197:case 198:case 199:case 200:this.$=m[y-1],m[y-1].as=m[y]||"default";break;case 201:this.$={inserted:!0};break;case 204:var Us=m[y];Us=Us.substr(1,Us.length-2);var g1=Us.substr(-3).toUpperCase(),ol=Us.substr(-4).toUpperCase(),H3;if(Us[0]=="#")H3=new A.FuncValue({funcid:"HTML",args:[new A.StringValue({value:Us}),new A.Json({value:{headers:!0}})]});else if(g1=="XLS"||g1=="CSV"||g1=="TAB")H3=new A.FuncValue({funcid:g1,args:[new A.StringValue({value:Us}),new A.Json({value:{headers:!0}})]});else if(ol=="XLSX"||ol=="JSON")H3=new A.FuncValue({funcid:ol,args:[new A.StringValue({value:Us}),new A.Json({value:{headers:!0}})]});else throw new Error("Unknown string in FROM clause");this.$=H3;break;case 205:m[y-2]=="INFORMATION_SCHEMA"?this.$=new A.FuncValue({funcid:m[y-2],args:[new A.StringValue({value:m[y]})]}):this.$=new A.Table({databaseid:m[y-2],tableid:m[y]});break;case 206:this.$=new A.Table({tableid:m[y]});break;case 209:case 210:this.$=m[y-1],m[y-1].push(m[y]);break;case 213:this.$=new A.Join(m[y-2]),A.extend(this.$,m[y-1]),A.extend(this.$,m[y]);break;case 214:this.$={table:m[y-1]},m[y]&&(this.$.as=m[y]);break;case 215:this.$={json:new A.Json({value:m[y-2],as:m[y]})};break;case 216:this.$={param:m[y-1],as:m[y]};break;case 217:this.$={select:m[y-2],as:m[y]};break;case 218:this.$={func:m[y-1],as:m[y]||"default"};break;case 219:this.$={variable:m[y-1],as:m[y]||"default"};break;case 220:this.$={joinmode:m[y]};break;case 221:this.$={joinmode:m[y-1],natural:!0};break;case 222:case 223:this.$="INNER";break;case 224:case 225:this.$="LEFT";break;case 226:case 227:this.$="RIGHT";break;case 228:case 229:this.$="OUTER";break;case 230:this.$="SEMI";break;case 231:this.$="ANTI";break;case 232:this.$="CROSS";break;case 233:this.$={on:m[y]};break;case 234:case 741:this.$={using:m[y]};break;case 235:case 742:this.$={using:m[y-1]};break;case 238:this.$={where:new A.Expression({expression:m[y]})};break;case 240:this.$={group:m[y-1]},A.extend(this.$,m[y]);break;case 241:this.$={group:[new A.GroupExpression({type:"ROLLUP",group:m[y-3]})]},A.extend(this.$,m[y]);break;case 242:this.$={group:[new A.GroupExpression({type:"CUBE",group:m[y-3]})]},A.extend(this.$,m[y]);break;case 245:this.$=new A.GroupExpression({type:"GROUPING SETS",group:m[y-1]});break;case 246:this.$=new A.GroupExpression({type:"ROLLUP",group:m[y-1]});break;case 247:this.$=new A.GroupExpression({type:"CUBE",group:m[y-1]});break;case 250:this.$={having:m[y]};break;case 252:this.$={},this.$[m[y-1].op]=m[y],m[y-1].corresponding&&(this.$.corresponding=!0);break;case 253:A.queriesStack||(A.queriesStack=[]),A.queriesStack.push(A.queries||[]),A.queries=[],this.$={op:"union"};break;case 254:A.queriesStack||(A.queriesStack=[]),A.queriesStack.push(A.queries||[]),A.queries=[],this.$={op:"unionall"};break;case 255:A.queriesStack||(A.queriesStack=[]),A.queriesStack.push(A.queries||[]),A.queries=[],this.$={op:"except"};break;case 256:A.queriesStack||(A.queriesStack=[]),A.queriesStack.push(A.queries||[]),A.queries=[],this.$={op:"intersect"};break;case 257:A.queriesStack||(A.queriesStack=[]),A.queriesStack.push(A.queries||[]),A.queries=[],this.$={op:"union",corresponding:!0};break;case 258:A.queriesStack||(A.queriesStack=[]),A.queriesStack.push(A.queries||[]),A.queries=[],this.$={op:"unionall",corresponding:!0};break;case 259:A.queriesStack||(A.queriesStack=[]),A.queriesStack.push(A.queries||[]),A.queries=[],this.$={op:"except",corresponding:!0};break;case 260:A.queriesStack||(A.queriesStack=[]),A.queriesStack.push(A.queries||[]),A.queries=[],this.$={op:"intersect",corresponding:!0};break;case 261:case 262:A.queriesStack&&A.queriesStack.length>0&&(A.queries&&A.queries.length>0&&(m[y].queries=A.queries),A.queries=A.queriesStack.pop()),this.$=m[y];break;case 264:this.$={order:m[y]};break;case 266:this.$=m[y-2],m[y-2].push(m[y]);break;case 267:this.$={nullsOrder:"FIRST"};break;case 268:this.$={nullsOrder:"LAST"};break;case 269:this.$=new A.Expression({expression:m[y],direction:"ASC"});break;case 270:this.$=new A.Expression({expression:m[y-1],direction:m[y].toUpperCase()});break;case 271:this.$=new A.Expression({expression:m[y-2],direction:m[y-1].toUpperCase()}),A.extend(this.$,m[y]);break;case 272:this.$=new A.Expression({expression:m[y-2],direction:"ASC",nocase:!0});break;case 273:this.$=new A.Expression({expression:m[y-3],direction:m[y].toUpperCase(),nocase:!0});break;case 275:this.$={limit:m[y-1]},A.extend(this.$,m[y]);break;case 276:this.$={limit:m[y-2],offset:m[y-6]};break;case 278:this.$={offset:m[y]};break;case 279:case 540:case 571:case 690:case 700:case 726:case 728:case 732:m[y-2].push(m[y]),this.$=m[y-2];break;case 281:case 283:m[y-2].as=m[y],this.$=m[y-2];break;case 282:case 284:m[y-1].as=m[y],this.$=m[y-1];break;case 285:m[y-2].as=m[y].value,this.$=m[y-2];break;case 286:m[y-1].as=m[y].value,this.$=m[y-1];break;case 288:this.$=new A.Column({columid:m[y],tableid:m[y-2],databaseid:m[y-4]});break;case 289:this.$=new A.Column({columnid:m[y],tableid:m[y-2]});break;case 290:this.$=new A.Column({columnid:m[y],tableid:"INSERTED"});break;case 291:this.$=new A.Column({columnid:m[y],tableid:"DELETED"});break;case 292:this.$=new A.Column({columnid:m[y]});break;case 293:this.$=new A.Column({columnid:m[y],tableid:m[y-2],databaseid:m[y-4]});break;case 294:this.$=new A.Column({columnid:m[y],tableid:"INSERTED"});break;case 295:this.$=new A.Column({columnid:m[y],tableid:"DELETED"});break;case 296:case 297:this.$=new A.Column({columnid:m[y],tableid:m[y-2]});break;case 298:this.$=new A.Column({columnid:"@"+m[y],tableid:m[y-3]});break;case 299:this.$=new A.Column({columnid:"inserted"});break;case 300:this.$=new A.Column({columnid:"deleted"});break;case 301:this.$=new A.Column({columnid:m[y]});break;case 316:this.$=new A.DomainValueValue;break;case 317:this.$=new A.Json({value:m[y]});break;case 320:case 321:case 322:A.queries||(A.queries=[]),A.queries.push(m[y-1]),m[y-1].queriesidx=A.queries.length,this.$=m[y-1];break;case 323:this.$=m[y];break;case 324:this.$=new A.FuncValue({funcid:"CURRENT_TIMESTAMP"});break;case 325:this.$=new A.FuncValue({funcid:"CURRENT_DATE"});break;case 326:this.$=new A.JavaScript({value:m[y].substr(2,m[y].length-4)});break;case 327:this.$=new A.JavaScript({value:'alasql.fn["'+m[y-2]+'"] = '+m[y].substr(2,m[y].length-4)});break;case 328:this.$=new A.JavaScript({value:'alasql.aggr["'+m[y-2]+'"] = '+m[y].substr(2,m[y].length-4)});break;case 329:this.$=new A.FuncValue({funcid:m[y],newid:!0});break;case 330:this.$=m[y],A.extend(this.$,{newid:!0});break;case 331:this.$=new A.Convert({expression:m[y-3]}),A.extend(this.$,m[y-1]);break;case 332:this.$=new A.Convert({expression:m[y-5],style:m[y-1]}),A.extend(this.$,m[y-3]);break;case 333:this.$=new A.Convert({expression:m[y-1]}),A.extend(this.$,m[y-3]);break;case 334:this.$=new A.Convert({expression:m[y-3],style:m[y-1]}),A.extend(this.$,m[y-5]);break;case 341:this.$=new A.FuncValue({funcid:"CURRENT_TIMESTAMP"});break;case 342:this.$=new A.FuncValue({funcid:"CURRENT_DATE"});break;case 343:m[y-2].length>1&&(m[y-4].toUpperCase()=="MAX"||m[y-4].toUpperCase()=="MIN")?this.$=new A.FuncValue({funcid:m[y-4],args:m[y-2]}):this.$=new A.AggrValue({aggregatorid:m[y-4].toUpperCase(),expression:m[y-2].pop(),over:m[y]});break;case 344:this.$=new A.AggrValue({aggregatorid:m[y-5].toUpperCase(),expression:m[y-2],distinct:!0,over:m[y]});break;case 345:this.$=new A.AggrValue({aggregatorid:m[y-5].toUpperCase(),expression:m[y-2],over:m[y]});break;case 346:this.$=new A.AggrValue({aggregatorid:"REDUCE",funcid:"GROUP_CONCAT",expression:m[y-3],order:m[y-2],separator:m[y-1]});break;case 347:this.$=new A.AggrValue({aggregatorid:"REDUCE",funcid:"GROUP_CONCAT",expression:m[y-3],distinct:!0,order:m[y-2],separator:m[y-1]});break;case 349:this.$=new A.Over,A.extend(this.$,m[y-2]),A.extend(this.$,m[y-1]);break;case 350:this.$={partition:m[y]};break;case 351:this.$={order:m[y]};break;case 355:var ks=m[y].substring(1,m[y].length-1);ks=ks.replace(/\\n/g,` -`).replace(/\\t/g," ").replace(/\\r/g,"\r").replace(/\\\\/g,"\\"),this.$=ks;break;case 356:this.$="SUM";break;case 357:this.$="TOTAL";break;case 358:this.$="COUNT";break;case 359:this.$="MIN";break;case 360:case 582:this.$="MAX";break;case 361:this.$="AVG";break;case 362:this.$="FIRST";break;case 363:this.$="LAST";break;case 364:this.$="AGGR";break;case 365:this.$="ARRAY";break;case 366:this.$="GROUP_CONCAT";break;case 367:var ll=m[y-5],Ou=m[y-2];Ou.length>1&&(ll.toUpperCase()=="MIN"||ll.toUpperCase()=="MAX")?this.$=new A.FuncValue({funcid:ll,args:Ou,over:m[y]}):t.aggr[m[y-5]]?this.$=new A.AggrValue({aggregatorid:"REDUCE",funcid:ll,expression:Ou[0],args:Ou,distinct:m[y-3]=="DISTINCT",over:m[y]}):this.$=new A.FuncValue({funcid:ll,args:Ou,over:m[y]});break;case 368:this.$=new A.FuncValue({funcid:m[y-3],over:m[y]});break;case 369:this.$=new A.FuncValue({funcid:"IIF",args:m[y-1]});break;case 370:this.$=new A.FuncValue({funcid:"REPLACE",args:m[y-1]});break;case 371:this.$=new A.FuncValue({funcid:m[y-2]});break;case 372:this.$=new A.FuncValue({funcid:"DATEADD",args:[new A.StringValue({value:m[y-5]}),m[y-3],m[y-1]]});break;case 373:this.$=new A.FuncValue({funcid:"DATEADD",args:[m[y-5],m[y-3],m[y-1]]});break;case 374:this.$=new A.FuncValue({funcid:"DATEDIFF",args:[new A.StringValue({value:m[y-5]}),m[y-3],m[y-1]]});break;case 375:this.$=new A.FuncValue({funcid:"DATEDIFF",args:[m[y-5],m[y-3],m[y-1]]});break;case 376:this.$=new A.FuncValue({funcid:"TIMESTAMPDIFF",args:[new A.StringValue({value:m[y-5]}),m[y-3],m[y-1]]});break;case 377:this.$=new A.FuncValue({funcid:"INTERVAL",args:[m[y-1],new A.StringValue({value:m[y].toLowerCase()})]});break;case 379:m[y-2].push(m[y]),this.$=m[y-2];break;case 380:this.$=new A.NumValue({value:+m[y]});break;case 381:this.$=new A.LogicValue({value:!0});break;case 382:this.$=new A.LogicValue({value:!1});break;case 383:this.$=new A.StringValue({value:m[y].substr(1,m[y].length-2).replace(/(\\\')/g,"'").replace(/(\'\')/g,"'")});break;case 384:this.$=new A.StringValue({value:m[y].substr(2,m[y].length-3).replace(/(\\\')/g,"'").replace(/(\'\')/g,"'")});break;case 385:this.$=new A.NullValue({value:void 0});break;case 386:this.$=new A.VarValue({variable:m[y]});break;case 387:A.exists||(A.exists=[]),this.$=new A.ExistsValue({value:m[y-1],existsidx:A.exists.length}),A.exists.push(m[y-1]);break;case 388:this.$=new A.ArrayValue({value:m[y-1]});break;case 389:case 390:this.$=new A.ParamValue({param:m[y]});break;case 391:typeof A.question>"u"&&(A.question=0),this.$=new A.ParamValue({param:A.question++});break;case 392:typeof A.question>"u"&&(A.question=0),this.$=new A.ParamValue({param:A.question++,array:!0});break;case 393:this.$=new A.CaseValue({expression:m[y-3],whens:m[y-2],elses:m[y-1]});break;case 394:this.$=new A.CaseValue({whens:m[y-2],elses:m[y-1]});break;case 395:case 744:case 745:this.$=m[y-1],this.$.push(m[y]);break;case 397:this.$={when:m[y-2],then:m[y]};break;case 400:case 401:this.$=new A.Op({left:m[y-2],op:"REGEXP",right:m[y]});break;case 402:this.$=new A.Op({left:m[y-2],op:"GLOB",right:m[y]});break;case 403:this.$=new A.Op({left:m[y-2],op:"LIKE",right:m[y]});break;case 404:this.$=new A.Op({left:m[y-4],op:"LIKE",right:m[y-2],escape:m[y]});break;case 405:this.$=new A.Op({left:m[y-2],op:"NOT LIKE",right:m[y]});break;case 406:this.$=new A.Op({left:m[y-4],op:"NOT LIKE",right:m[y-2],escape:m[y]});break;case 407:this.$=new A.Op({left:m[y-2],op:"||",right:m[y]});break;case 408:this.$=new A.Op({left:m[y-2],op:"+",right:m[y]});break;case 409:this.$=new A.Op({left:m[y-2],op:"-",right:m[y]});break;case 410:this.$=new A.Op({left:m[y-2],op:"*",right:m[y]});break;case 411:this.$=new A.Op({left:m[y-2],op:"/",right:m[y]});break;case 412:this.$=new A.Op({left:m[y-2],op:"%",right:m[y]});break;case 413:this.$=new A.Op({left:m[y-2],op:"^",right:m[y]});break;case 414:this.$=new A.Op({left:m[y-2],op:">>",right:m[y]});break;case 415:this.$=new A.Op({left:m[y-2],op:"<<",right:m[y]});break;case 416:this.$=new A.Op({left:m[y-2],op:"&",right:m[y]});break;case 417:this.$=new A.Op({left:m[y-2],op:"|",right:m[y]});break;case 418:case 419:case 421:this.$=new A.Op({left:m[y-2],op:"->",right:m[y]});break;case 420:this.$=new A.Op({left:m[y-4],op:"->",right:m[y-1]});break;case 422:case 423:case 425:this.$=new A.Op({left:m[y-2],op:"!",right:m[y]});break;case 424:this.$=new A.Op({left:m[y-4],op:"!",right:m[y-1]});break;case 426:this.$=new A.Op({left:m[y-2],op:">",right:m[y]});break;case 427:this.$=new A.Op({left:m[y-2],op:">=",right:m[y]});break;case 428:this.$=new A.Op({left:m[y-2],op:"<",right:m[y]});break;case 429:this.$=new A.Op({left:m[y-2],op:"<=",right:m[y]});break;case 430:this.$=new A.Op({left:m[y-2],op:"=",right:m[y]});break;case 431:this.$=new A.Op({left:m[y-2],op:"==",right:m[y]});break;case 432:this.$=new A.Op({left:m[y-2],op:"===",right:m[y]});break;case 433:this.$=new A.Op({left:m[y-2],op:"!=",right:m[y]});break;case 434:this.$=new A.Op({left:m[y-2],op:"!==",right:m[y]});break;case 435:this.$=new A.Op({left:m[y-2],op:"!===",right:m[y]});break;case 436:A.queries||(A.queries=[]);var cl=A.queries.slice();A.queries=[],cl.length>0&&(m[y-1].queries=cl),A.queries.push(m[y-1]),this.$=new A.Op({left:m[y-5],op:m[y-4],allsome:m[y-3],right:m[y-1],queriesidx:A.queries.length-1});break;case 437:this.$=new A.Op({left:m[y-5],op:m[y-4],allsome:m[y-3],right:m[y-1]});break;case 438:m[y-2].op=="BETWEEN1"?m[y-2].left.op=="AND"?this.$=new A.Op({left:m[y-2].left.left,op:"AND",right:new A.Op({left:m[y-2].left.right,op:"BETWEEN",right1:m[y-2].right,right2:m[y]})}):this.$=new A.Op({left:m[y-2].left,op:"BETWEEN",right1:m[y-2].right,right2:m[y]}):m[y-2].op=="NOT BETWEEN1"?m[y-2].left.op=="AND"?this.$=new A.Op({left:m[y-2].left.left,op:"AND",right:new A.Op({left:m[y-2].left.right,op:"NOT BETWEEN",right1:m[y-2].right,right2:m[y]})}):this.$=new A.Op({left:m[y-2].left,op:"NOT BETWEEN",right1:m[y-2].right,right2:m[y]}):this.$=new A.Op({left:m[y-2],op:"AND",right:m[y]});break;case 439:this.$=new A.Op({left:m[y-2],op:"OR",right:m[y]});break;case 440:this.$=new A.UniOp({op:"NOT",right:m[y]});break;case 441:this.$=new A.UniOp({op:"-",right:m[y]});break;case 442:this.$=new A.UniOp({op:"+",right:m[y]});break;case 443:this.$=new A.UniOp({op:"~",right:m[y]});break;case 444:this.$=new A.UniOp({op:"#",right:m[y]});break;case 445:this.$=new A.UniOp({right:m[y-1]});break;case 446:A.queries||(A.queries=[]);var cl=A.queries.slice();A.queries=[],cl.length>0&&(m[y-1].queries=cl),A.queries.push(m[y-1]),this.$=new A.Op({left:m[y-4],op:"IN",right:m[y-1],queriesidx:A.queries.length-1});break;case 447:A.queries||(A.queries=[]);var cl=A.queries.slice();A.queries=[],cl.length>0&&(m[y-1].queries=cl),A.queries.push(m[y-1]),this.$=new A.Op({left:m[y-5],op:"NOT IN",right:m[y-1],queriesidx:A.queries.length-1});break;case 448:this.$=new A.Op({left:m[y-4],op:"IN",right:m[y-1]});break;case 449:this.$=new A.Op({left:m[y-5],op:"NOT IN",right:m[y-1]});break;case 450:this.$=new A.Op({left:m[y-3],op:"IN",right:[]});break;case 451:this.$=new A.Op({left:m[y-4],op:"NOT IN",right:[]});break;case 452:case 454:this.$=new A.Op({left:m[y-2],op:"IN",right:m[y]});break;case 453:case 455:this.$=new A.Op({left:m[y-3],op:"NOT IN",right:m[y]});break;case 456:this.$=new A.Op({left:m[y-2],op:"BETWEEN1",right:m[y]});break;case 457:this.$=new A.Op({left:m[y-2],op:"NOT BETWEEN1",right:m[y]});break;case 458:this.$=new A.Op({op:"IS",left:m[y-2],right:m[y]});break;case 459:this.$=new A.Op({op:"IS",left:m[y-2],right:new A.UniOp({op:"NOT",right:new A.NullValue({value:void 0})})});break;case 460:this.$=new A.Convert({expression:m[y-2]}),A.extend(this.$,m[y]);break;case 461:case 462:this.$=m[y];break;case 463:this.$=m[y-1];break;case 470:this.$="ALL";break;case 471:this.$="SOME";break;case 472:this.$="ANY";break;case 473:this.$=new A.Update({table:m[y-5],columns:m[y-3],where:m[y-1]}),A.extend(this.$,m[y]);break;case 474:this.$=new A.Update({table:m[y-3],columns:m[y-1]}),A.extend(this.$,m[y]);break;case 477:this.$=new A.SetColumn({column:m[y-2],expression:m[y]});break;case 478:this.$=new A.SetColumn({variable:m[y-2],expression:m[y],method:m[y-3]});break;case 479:this.$=new A.Delete({table:m[y-3],where:m[y-1]}),A.extend(this.$,m[y]);break;case 480:this.$=new A.Delete({table:m[y-1]}),A.extend(this.$,m[y]);break;case 481:this.$=new A.Insert({into:m[y-3],values:m[y-1]}),A.extend(this.$,m[y]);break;case 482:this.$=new A.Insert({into:m[y-2],values:m[y-1]}),A.extend(this.$,m[y]);break;case 483:this.$=new A.Insert({into:m[y-3],values:m[y-1],ignore:!0}),A.extend(this.$,m[y]);break;case 484:this.$=new A.Insert({into:m[y-2],values:m[y-1],ignore:!0}),A.extend(this.$,m[y]);break;case 485:this.$=new A.Insert({into:m[y-6],columns:m[y-4],values:m[y-1],ignore:!0}),A.extend(this.$,m[y]);break;case 486:this.$=new A.Insert({into:m[y-5],columns:m[y-3],values:m[y-1],ignore:!0}),A.extend(this.$,m[y]);break;case 487:this.$=new A.Insert({into:m[y-2],select:m[y-1],ignore:!0}),A.extend(this.$,m[y]);break;case 488:this.$=new A.Insert({into:m[y-5],columns:m[y-3],select:m[y-1],ignore:!0}),A.extend(this.$,m[y]);break;case 489:case 491:this.$=new A.Insert({into:m[y-3],values:m[y-1],orreplace:!0}),A.extend(this.$,m[y]);break;case 490:case 492:this.$=new A.Insert({into:m[y-2],values:m[y-1],orreplace:!0}),A.extend(this.$,m[y]);break;case 493:this.$=new A.Insert({into:m[y-3],default:!0}),A.extend(this.$,m[y]);break;case 494:this.$=new A.Insert({into:m[y-6],columns:m[y-4],values:m[y-1]}),A.extend(this.$,m[y]);break;case 495:this.$=new A.Insert({into:m[y-5],columns:m[y-3],values:m[y-1]}),A.extend(this.$,m[y]);break;case 496:this.$=new A.Insert({into:m[y-2],select:m[y-1]}),A.extend(this.$,m[y]);break;case 497:this.$=new A.Insert({into:m[y-2],select:m[y-1],orreplace:!0}),A.extend(this.$,m[y]);break;case 498:this.$=new A.Insert({into:m[y-5],columns:m[y-3],select:m[y-1]}),A.extend(this.$,m[y]);break;case 499:this.$=new A.Insert({into:m[y-3],setcolumns:m[y-1]}),A.extend(this.$,m[y]);break;case 504:this.$=[m[y-1]];break;case 507:this.$=m[y-4],m[y-4].push(m[y-1]);break;case 508:case 509:case 511:case 519:this.$=m[y-2],m[y-2].push(m[y]);break;case 520:this.$=new A.CreateTable({table:m[y-4]}),A.extend(this.$,m[y-7]),A.extend(this.$,m[y-6]),A.extend(this.$,m[y-5]),A.extend(this.$,m[y-2]),A.extend(this.$,m[y]);break;case 521:this.$=new A.CreateTable({table:m[y]}),A.extend(this.$,m[y-3]),A.extend(this.$,m[y-2]),A.extend(this.$,m[y-1]);break;case 523:this.$={class:!0};break;case 533:this.$={temporary:!0};break;case 535:this.$={ifnotexists:!0};break;case 536:this.$={columns:m[y-2],constraints:m[y]};break;case 537:this.$={columns:m[y]};break;case 538:this.$={as:m[y]};break;case 539:case 570:this.$=[m[y]];break;case 541:case 542:case 543:case 544:case 545:m[y].constraintid=m[y-1],this.$=m[y];break;case 548:this.$={type:"CHECK",expression:m[y-1]};break;case 549:this.$={type:"PRIMARY KEY",columns:m[y-1],clustered:(m[y-3]+"").toUpperCase()};break;case 550:this.$={type:"FOREIGN KEY",columns:m[y-5],fktable:m[y-2],fkcolumns:m[y-1]},A.extend(this.$,m[y]);break;case 552:this.$={};break;case 553:this.$={ondelete:m[y]};break;case 554:this.$={onupdate:m[y]};break;case 555:this.$={ondelete:m[y-1],onupdate:m[y]};break;case 556:this.$={ondelete:m[y],onupdate:m[y-1]};break;case 557:case 558:this.$=m[y];break;case 559:this.$="CASCADE";break;case 560:this.$="SET NULL";break;case 561:this.$="SET DEFAULT";break;case 562:this.$="RESTRICT";break;case 563:this.$="NO ACTION";break;case 564:this.$={type:"UNIQUE",columns:m[y-1],clustered:(m[y-3]+"").toUpperCase()};break;case 565:this.$={type:"INDEX",indexid:m[y-3],columns:m[y-1]};break;case 572:this.$=new A.ColumnDef({columnid:m[y-2]}),A.extend(this.$,m[y-1]),A.extend(this.$,m[y]);break;case 573:this.$=new A.ColumnDef({columnid:m[y-1]}),A.extend(this.$,m[y]);break;case 574:this.$=new A.ColumnDef({columnid:m[y],dbtypeid:""});break;case 575:this.$={dbtypeid:m[y-5],dbsize:m[y-3],dbprecision:+m[y-1]};break;case 576:this.$={dbtypeid:m[y-3],dbsize:m[y-1]};break;case 577:this.$={dbtypeid:m[y]};break;case 578:this.$={dbtypeid:"ENUM",enumvalues:m[y-1]};break;case 579:this.$=m[y-1],m[y-1].dbtypeid+="["+m[y]+"]";break;case 581:case 795:this.$=+m[y];break;case 583:this.$=void 0;break;case 585:A.extend(m[y-1],m[y]),this.$=m[y-1];break;case 588:this.$={primarykey:!0};break;case 589:case 590:this.$={foreignkey:{table:m[y-2],columnid:m[y-1]}},A.extend(this.$.foreignkey,m[y]);break;case 591:this.$={identity:{value:m[y-3],step:m[y-1]}};break;case 592:this.$={identity:{value:1,step:1}};break;case 593:case 595:this.$={default:m[y]};break;case 594:this.$={default:m[y-1]};break;case 596:this.$={null:!0};break;case 597:this.$={notnull:!0};break;case 598:this.$={check:m[y]};break;case 599:this.$={unique:!0};break;case 600:this.$={onupdate:m[y]};break;case 601:this.$={onupdate:m[y-1]};break;case 602:this.$=new A.DropTable({tables:m[y],type:m[y-2]}),A.extend(this.$,m[y-1]);break;case 606:this.$={ifexists:!0};break;case 607:this.$=new A.AlterTable({table:m[y-3],renameto:m[y]});break;case 608:this.$=new A.AlterTable({table:m[y-3],addcolumn:m[y]});break;case 609:this.$=new A.AlterTable({table:m[y-3],modifycolumn:m[y]});break;case 610:this.$=new A.AlterTable({table:m[y-5],renamecolumn:m[y-2],to:m[y]});break;case 611:this.$=new A.AlterTable({table:m[y-3],dropcolumn:m[y]});break;case 612:this.$=new A.AlterTable({table:m[y-2],renameto:m[y]});break;case 613:this.$=new A.AttachDatabase({databaseid:m[y],engineid:m[y-2].toUpperCase()});break;case 614:this.$=new A.AttachDatabase({databaseid:m[y-3],engineid:m[y-5].toUpperCase(),args:m[y-1]});break;case 615:this.$=new A.AttachDatabase({databaseid:m[y-2],engineid:m[y-4].toUpperCase(),as:m[y]});break;case 616:this.$=new A.AttachDatabase({databaseid:m[y-5],engineid:m[y-7].toUpperCase(),as:m[y],args:m[y-3]});break;case 617:this.$=new A.DetachDatabase({databaseid:m[y]});break;case 618:this.$=new A.CreateDatabase({databaseid:m[y]}),A.extend(this.$,m[y]);break;case 619:this.$=new A.CreateDatabase({engineid:m[y-4].toUpperCase(),databaseid:m[y-1],as:m[y]}),A.extend(this.$,m[y-2]);break;case 620:this.$=new A.CreateDatabase({engineid:m[y-7].toUpperCase(),databaseid:m[y-4],args:m[y-2],as:m[y]}),A.extend(this.$,m[y-5]);break;case 621:this.$=new A.CreateDatabase({engineid:m[y-4].toUpperCase(),as:m[y],args:[m[y-1]]}),A.extend(this.$,m[y-2]);break;case 622:this.$=void 0;break;case 624:case 625:this.$=new A.UseDatabase({databaseid:m[y]});break;case 626:this.$=new A.DropDatabase({databaseid:m[y]}),A.extend(this.$,m[y-1]);break;case 627:case 628:this.$=new A.DropDatabase({databaseid:m[y],engineid:m[y-3].toUpperCase()}),A.extend(this.$,m[y-1]);break;case 629:this.$=new A.CreateIndex({indexid:m[y-5],table:m[y-3],columns:m[y-1]});break;case 630:this.$=new A.CreateIndex({indexid:m[y-5],table:m[y-3],columns:m[y-1],unique:!0});break;case 631:this.$=new A.DropIndex({indexid:m[y]});break;case 632:this.$=new A.ShowDatabases;break;case 633:this.$=new A.ShowDatabases({like:m[y]});break;case 634:this.$=new A.ShowDatabases({engineid:m[y-1].toUpperCase()});break;case 635:this.$=new A.ShowDatabases({engineid:m[y-3].toUpperCase(),like:m[y]});break;case 636:this.$=new A.ShowTables;break;case 637:this.$=new A.ShowTables({like:m[y]});break;case 638:this.$=new A.ShowTables({databaseid:m[y]});break;case 639:this.$=new A.ShowTables({like:m[y],databaseid:m[y-2]});break;case 640:this.$=new A.ShowColumns({table:m[y]});break;case 641:this.$=new A.ShowColumns({table:m[y-2],databaseid:m[y]});break;case 642:this.$=new A.ShowIndex({table:m[y]});break;case 643:this.$=new A.ShowIndex({table:m[y-2],databaseid:m[y]});break;case 644:this.$=new A.ShowCreateTable({table:m[y]});break;case 645:this.$=new A.ShowCreateTable({table:m[y-2],databaseid:m[y]});break;case 646:this.$=new A.CreateTable({table:m[y-6],view:!0,select:m[y-1],viewcolumns:m[y-4]}),A.extend(this.$,m[y-9]),A.extend(this.$,m[y-7]);break;case 647:this.$=new A.CreateTable({table:m[y-3],view:!0,select:m[y-1]}),A.extend(this.$,m[y-6]),A.extend(this.$,m[y-4]);break;case 651:this.$=new A.DropTable({tables:m[y],view:!0}),A.extend(this.$,m[y-1]);break;case 652:case 805:this.$=new A.ExpressionStatement({expression:m[y]});break;case 653:this.$=new A.Source({url:m[y].value});break;case 654:this.$=new A.Assert({value:m[y]});break;case 655:this.$=new A.Assert({value:m[y].value});break;case 656:this.$=new A.Assert({value:m[y],message:m[y-2]});break;case 658:case 670:case 672:this.$=m[y].value;break;case 659:case 667:this.$=+m[y].value;break;case 660:this.$=!!m[y].value;break;case 668:this.$=-m[y].value;break;case 669:this.$=""+m[y].value;break;case 678:this.$={};break;case 681:this.$=[];break;case 682:A.extend(m[y-2],m[y]),this.$=m[y-2];break;case 684:this.$={},this.$[m[y-2].substr(1,m[y-2].length-2)]=m[y];break;case 685:case 686:this.$={},this.$[m[y-2]]=m[y];break;case 687:this.$={},this.$[m[y-2].substr(1,m[y-2].length-2)]=-m[y].value;break;case 688:case 689:this.$={},this.$[m[y-2]]=-m[y].value;break;case 692:this.$=new A.SetVariable({variable:m[y-2].toLowerCase(),value:m[y]});break;case 693:this.$=new A.SetVariable({variable:m[y-1].toLowerCase(),value:m[y]});break;case 694:this.$=new A.SetVariable({variable:m[y-2],expression:m[y]});break;case 695:this.$=new A.SetVariable({variable:m[y-3],props:m[y-2],expression:m[y]});break;case 696:this.$=new A.SetVariable({variable:m[y-2],expression:m[y],method:m[y-3]});break;case 697:this.$=new A.SetVariable({variable:m[y-3],props:m[y-2],expression:m[y],method:m[y-4]});break;case 698:this.$="@";break;case 699:this.$="$";break;case 705:this.$=!0;break;case 706:this.$=!1;break;case 707:this.$=new A.CommitTransaction;break;case 708:this.$=new A.RollbackTransaction;break;case 709:this.$=new A.BeginTransaction;break;case 710:this.$=new A.If({expression:m[y-2],thenstat:m[y-1],elsestat:m[y]}),m[y-1].exists&&(this.$.exists=m[y-1].exists),m[y-1].queries&&(this.$.queries=m[y-1].queries);break;case 711:this.$=new A.If({expression:m[y-1],thenstat:m[y]}),m[y].exists&&(this.$.exists=m[y].exists),m[y].queries&&(this.$.queries=m[y].queries);break;case 712:this.$=m[y];break;case 713:this.$=new A.While({expression:m[y-1],loopstat:m[y]}),m[y].exists&&(this.$.exists=m[y].exists),m[y].queries&&(this.$.queries=m[y].queries);break;case 714:case 715:this.$=new A.Continue;break;case 716:case 717:this.$=new A.Break;break;case 718:this.$=new A.BeginEnd({statements:m[y-1]});break;case 719:this.$=new A.Print({exprs:m[y]});break;case 720:this.$=new A.Print({select:m[y]});break;case 721:this.$=new A.Require({paths:m[y]});break;case 722:this.$=new A.Require({plugins:m[y]});break;case 723:case 724:this.$=m[y].toUpperCase();break;case 725:this.$=new A.Echo({expr:m[y]});break;case 730:this.$=new A.Declare({declares:m[y]});break;case 733:this.$={variable:m[y-1]},A.extend(this.$,m[y]);break;case 734:this.$={variable:m[y-2]},A.extend(this.$,m[y]);break;case 735:this.$={variable:m[y-3],expression:m[y]},A.extend(this.$,m[y-2]);break;case 736:this.$={variable:m[y-4],expression:m[y]},A.extend(this.$,m[y-2]);break;case 737:this.$=new A.TruncateTable({table:m[y]});break;case 738:this.$=new A.Merge,A.extend(this.$,m[y-4]),A.extend(this.$,m[y-3]),A.extend(this.$,m[y-2]),A.extend(this.$,{matches:m[y-1]}),A.extend(this.$,m[y]);break;case 739:case 740:this.$={into:m[y]};break;case 743:this.$={on:m[y]};break;case 748:this.$={matched:!0,action:m[y]};break;case 749:this.$={matched:!0,expr:m[y-2],action:m[y]};break;case 750:this.$={delete:!0};break;case 751:this.$={update:m[y]};break;case 752:case 753:this.$={matched:!1,bytarget:!0,action:m[y]};break;case 754:case 755:this.$={matched:!1,bytarget:!0,expr:m[y-2],action:m[y]};break;case 756:this.$={matched:!1,bysource:!0,action:m[y]};break;case 757:this.$={matched:!1,bysource:!0,expr:m[y-2],action:m[y]};break;case 758:this.$={insert:!0,values:m[y]};break;case 759:this.$={insert:!0,values:m[y],columns:m[y-3]};break;case 760:this.$={insert:!0,defaultvalues:!0};break;case 761:this.$={insert:!0,defaultvalues:!0,columns:m[y-3]};break;case 763:this.$={output:{columns:m[y]}};break;case 764:this.$={output:{columns:m[y-3],intovar:m[y],method:m[y-1]}};break;case 765:this.$={output:{columns:m[y-2],intotable:m[y]}};break;case 766:this.$={output:{columns:m[y-5],intotable:m[y-3],intocolumns:m[y-1]}};break;case 767:this.$=new A.CreateVertex({class:m[y-3],sharp:m[y-2],name:m[y-1]}),A.extend(this.$,m[y]);break;case 770:this.$={sets:m[y]};break;case 771:this.$={content:m[y]};break;case 772:this.$={select:m[y]};break;case 773:this.$=new A.CreateEdge({from:m[y-3],to:m[y-1],name:m[y-5]}),A.extend(this.$,m[y]);break;case 774:this.$=new A.CreateGraph({graph:m[y]});break;case 775:this.$=new A.CreateGraph({from:m[y]});break;case 778:this.$=m[y-2],m[y-1]&&(this.$.json=new A.Json({value:m[y-1]})),m[y]&&(this.$.as=m[y]);break;case 779:this.$={source:m[y-6],target:m[y]},m[y-3]&&(this.$.json=new A.Json({value:m[y-3]})),m[y-2]&&(this.$.as=m[y-2]),A.extend(this.$,m[y-4]);break;case 780:this.$={source:m[y-5],target:m[y]},m[y-2]&&(this.$.json=new A.Json({value:m[y-3]})),m[y-1]&&(this.$.as=m[y-2]);break;case 781:this.$={source:m[y-2],target:m[y]};break;case 785:this.$={vars:m[y],method:m[y-1]};break;case 788:case 789:var Th=m[y-1];this.$={prop:m[y-3],sharp:m[y-2],name:typeof Th>"u"?void 0:Th.substr(1,Th.length-2),class:m[y]};break;case 790:var Ih=m[y-1];this.$={sharp:m[y-2],name:typeof Ih>"u"?void 0:Ih.substr(1,Ih.length-2),class:m[y]};break;case 791:var W3=m[y-1];this.$={name:typeof W3>"u"?void 0:W3.substr(1,W3.length-2),class:m[y]};break;case 792:this.$={class:m[y]};break;case 798:this.$=new A.AddRule({left:m[y-2],right:m[y]});break;case 799:this.$=new A.AddRule({right:m[y]});break;case 802:this.$={termid:m[y]};break;case 803:this.$={termid:m[y-3],args:m[y-1]};break;case 806:this.$=new A.CreateTrigger({trigger:m[y-6],when:m[y-5],action:m[y-4],table:m[y-2],statement:m[y]}),m[y].exists&&(this.$.exists=m[y].exists),m[y].queries&&(this.$.queries=m[y].queries);break;case 807:this.$=new A.CreateTrigger({trigger:m[y-5],when:m[y-4],action:m[y-3],table:m[y-1],funcid:m[y]});break;case 808:this.$=new A.CreateTrigger({trigger:m[y-6],when:m[y-4],action:m[y-3],table:m[y-5],statement:m[y]}),m[y].exists&&(this.$.exists=m[y].exists),m[y].queries&&(this.$.queries=m[y].queries);break;case 809:case 810:case 812:this.$="AFTER";break;case 811:this.$="BEFORE";break;case 813:this.$="INSTEADOF";break;case 814:this.$="INSERT";break;case 815:this.$="DELETE";break;case 816:this.$="UPDATE";break;case 817:this.$=new A.DropTrigger({trigger:m[y]});break;case 818:this.$=new A.Reindex({indexid:m[y]});break;case 1098:case 1122:case 1124:case 1126:case 1130:case 1132:case 1134:case 1136:case 1138:case 1140:this.$=[];break;case 1099:case 1117:case 1119:case 1123:case 1125:case 1127:case 1131:case 1133:case 1135:case 1137:case 1139:case 1141:m[y-1].push(m[y]);break;case 1116:case 1118:this.$=[m[y]];break}},table:[n([14,639,798],c,{12:1,13:2,16:3,17:4,21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,2:a,4:l,5:f,6:u,7:p,8:d,9:b,18:U,58:R,77:L,83:T,96:C,133:te,155:W,165:Y,198:B,294:N,295:Ae,322:je,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Rt,455:Qr,466:$n,472:ki,474:Di,475:Wn,477:Pn,478:Jn,479:ls,480:Ls,481:On,482:ri,483:hs,487:ps,488:wo,491:Jo,492:Ao,545:Bo,546:ba,555:Fo}),{1:[3]},{14:[1,113],15:114,639:Dc,798:Ql},n(io,[2,12]),n(io,[2,13]),n(Ce,[2,16]),n(io,c,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,16:117,2:a,4:l,5:f,6:u,7:p,8:d,9:b,19:[1,118],58:R,77:L,83:T,96:C,133:te,155:W,165:Y,198:B,294:N,295:Ae,322:je,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Rt,455:Qr,466:$n,472:ki,474:Di,475:Wn,477:Pn,478:Jn,479:ls,480:Ls,481:On,482:ri,483:hs,487:ps,488:wo,491:Jo,492:Ao,545:Bo,546:ba,555:Fo}),n(Ce,[2,18]),n(Ce,[2,19]),n(Ce,[2,20]),n(Ce,[2,21]),n(Ce,[2,22]),n(Ce,[2,23]),n(Ce,[2,24]),n(Ce,[2,25]),n(Ce,[2,26]),n(Ce,[2,27]),n(Ce,[2,28]),n(Ce,[2,29]),n(Ce,[2,30]),n(Ce,[2,31]),n(Ce,[2,32]),n(Ce,[2,33]),n(Ce,[2,34]),n(Ce,[2,35]),n(Ce,[2,36]),n(Ce,[2,37]),n(Ce,[2,38]),n(Ce,[2,39]),n(Ce,[2,40]),n(Ce,[2,41],{93:119,260:120,127:Rc,271:Rc,273:Rc,171:R1,177:Zl,178:Ko}),n(Ce,[2,42]),n(Ce,[2,43]),n(Ce,[2,44]),n(Ce,[2,45]),n(Ce,[2,46]),n(Ce,[2,47]),n(Ce,[2,48]),n(Ce,[2,49]),n(Ce,[2,50]),n(Ce,[2,51]),n(Ce,[2,52]),n(Ce,[2,53]),n(Ce,[2,54]),n(Ce,[2,55]),n(Ce,[2,56]),n(Ce,[2,57]),n(Ce,[2,58]),n(Ce,[2,59]),n(Ce,[2,60]),n(Ce,[2,61]),n(Ce,[2,62]),n(Ce,[2,63]),n(Ce,[2,64]),n(Ce,[2,65]),n(Ce,[2,66]),n(Ce,[2,67]),n(Ce,[2,68]),n(Ce,[2,69]),n(Ce,[2,70]),n(Ce,[2,71]),n(Ce,[2,72]),{388:[1,124]},{2:a,3:125,4:l,5:f,6:u,7:p,8:d,9:b},{2:a,3:127,4:l,5:f,6:u,7:p,8:d,9:b,165:Be,209:126,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne},n(ec,[2,532],{3:136,383:140,2:a,4:l,5:f,6:u,7:p,8:d,9:b,143:tc,144:i2,196:[1,138],202:[1,137],296:[1,144],297:[1,145],392:[1,146],442:[1,135],511:[1,139],547:[1,143]}),{154:k1,489:147,490:148},{192:[1,150]},{442:[1,151]},{2:a,3:153,4:l,5:f,6:u,7:p,8:d,9:b,139:[1,159],202:[1,154],388:[1,158],434:155,442:[1,152],447:[1,156],547:[1,157]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:160,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(Z1,M1,{374:224,180:[1,226],207:rc,377:[1,225]}),n(Z1,M1,{374:228,207:rc}),{2:a,3:240,4:l,5:f,6:u,7:p,8:d,9:b,83:kc,141:$o,152:ve,153:233,154:it,161:Ee,165:Be,190:pe,207:[1,231],208:234,209:236,210:235,211:237,218:230,227:238,229:Al,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,335:we,456:209,457:me,461:he,493:229},{2:a,3:242,4:l,5:f,6:u,7:p,8:d,9:b},{388:[1,243]},n(mu,[2,1094],{87:244,115:245,116:N3}),{44:247,45:248,83:T,86:76,96:C,193:103,198:B},n(Mc,[2,1098],{97:249}),{2:a,3:253,4:l,5:f,6:u,7:p,8:d,9:b,199:[1,251],202:[1,254],295:[1,250],388:[1,255],442:[1,252]},{388:[1,256]},{2:a,3:260,4:l,5:f,6:u,7:p,8:d,9:b,78:257,80:258,81:[1,259]},n([339,639,798],c,{16:3,17:4,21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,13:262,2:a,4:l,5:f,6:u,7:p,8:d,9:b,18:U,58:R,77:L,83:T,96:C,133:te,155:W,165:Y,198:B,294:N,295:Ae,322:je,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Rt,455:Qr,466:$n,472:ki,473:[1,261],474:Di,475:Wn,477:Pn,478:Jn,479:ls,480:Ls,481:On,482:ri,483:hs,487:ps,488:wo,491:Jo,492:Ao,545:Bo,546:ba,555:Fo}),{473:[1,263]},{473:[1,264]},{2:a,3:266,4:l,5:f,6:u,7:p,8:d,9:b,442:[1,265]},{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,152:ve,161:Ee,190:pe,208:268,210:269,231:267,335:we},n(hn,[2,326]),{122:271,141:Pe,329:Re},{2:a,3:127,4:l,5:f,6:u,7:p,8:d,9:b,122:277,140:De,141:[1,274],152:ve,153:272,154:ms,161:Ee,165:Be,190:pe,205:276,209:281,210:280,284:278,285:279,292:gu,293:Bc,302:273,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,335:we,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:284,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(Ce,[2,714]),n(Ce,[2,715]),n(Ce,[2,716]),n(Ce,[2,717]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,44:286,45:248,61:180,83:B1,86:76,96:C,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:285,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,193:103,198:B,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:294,4:l,5:f,6:u,7:p,8:d,9:b,122:291,141:Pe,329:Re,484:289,485:290,486:292,487:yu},{2:a,3:295,4:l,5:f,6:u,7:p,8:d,9:b,152:va,154:f1,469:296},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:299,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{466:[1,300]},{2:a,3:104,4:l,5:f,6:u,7:p,8:d,9:b,543:302,544:301},{2:a,3:127,4:l,5:f,6:u,7:p,8:d,9:b,165:Be,209:303,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:304,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(d1,s2,{195:308,173:[1,307],194:[1,305],196:[1,306],204:nc}),n(D3,[2,802],{83:[1,310]}),n([2,4,5,6,7,8,9,14,77,83,84,103,108,116,127,137,140,141,146,152,154,161,163,165,171,173,177,178,188,189,190,192,194,196,204,207,229,252,266,267,271,273,281,292,293,294,298,299,301,304,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,335,336,339,343,345,350,457,461,503,639,798],[2,165],{158:[1,311],159:[1,312],199:[1,313],200:[1,314],201:[1,315],202:[1,316],203:[1,317]}),n(X,[2,1]),n(X,[2,2]),n(X,[2,3]),n(X,[2,4]),n(X,[2,5]),n(X,[2,6]),{6:[1,435],7:[1,474],8:[1,351],9:[1,534],10:318,127:[1,477],140:[1,470],181:[1,495],229:[1,427],265:[1,469],266:[1,403],267:[1,438],271:[1,442],281:[1,384],377:[1,418],415:[1,341],416:[1,512],418:[1,323],439:[1,325],447:[1,583],451:[1,504],453:[1,475],454:[1,543],471:[1,473],473:[1,559],478:[1,371],499:[1,449],503:[1,481],509:[1,370],552:[1,335],553:[1,327],554:[1,430],556:[1,319],557:[1,320],558:[1,321],559:[1,322],560:[1,324],561:[1,326],562:[1,328],563:[1,329],564:[1,330],565:[1,331],566:[1,332],567:[1,333],568:[1,334],569:[1,336],570:[1,337],571:[1,338],572:[1,339],573:[1,340],574:[1,342],575:[1,343],576:[1,344],577:[1,345],578:[1,346],579:[1,347],580:[1,348],581:[1,349],582:[1,350],583:[1,352],584:[1,353],585:[1,354],586:[1,355],587:[1,356],588:[1,357],589:[1,358],590:[1,359],591:[1,360],592:[1,361],593:[1,362],594:[1,363],595:[1,364],596:[1,365],597:[1,366],598:[1,367],599:[1,368],600:[1,369],601:[1,372],602:[1,373],603:[1,374],604:[1,375],605:[1,376],606:[1,377],607:[1,378],608:[1,379],609:[1,380],610:[1,381],611:[1,382],612:[1,383],613:[1,385],614:[1,386],615:[1,387],616:[1,388],617:[1,389],618:[1,390],619:[1,391],620:[1,392],621:[1,393],622:[1,394],623:[1,395],624:[1,396],625:[1,397],626:[1,398],627:[1,399],628:[1,400],629:[1,401],630:[1,402],631:[1,404],632:[1,405],633:[1,406],634:[1,407],635:[1,408],636:[1,409],637:[1,410],638:[1,411],639:[1,412],640:[1,413],641:[1,414],642:[1,415],643:[1,416],644:[1,417],645:[1,419],646:[1,420],647:[1,421],648:[1,422],649:[1,423],650:[1,424],651:[1,425],652:[1,426],653:[1,428],654:[1,429],655:[1,431],656:[1,432],657:[1,433],658:[1,434],659:[1,436],660:[1,437],661:[1,439],662:[1,440],663:[1,441],664:[1,443],665:[1,444],666:[1,445],667:[1,446],668:[1,447],669:[1,448],670:[1,450],671:[1,451],672:[1,452],673:[1,453],674:[1,454],675:[1,455],676:[1,456],677:[1,457],678:[1,458],679:[1,459],680:[1,460],681:[1,461],682:[1,462],683:[1,463],684:[1,464],685:[1,465],686:[1,466],687:[1,467],688:[1,468],689:[1,471],690:[1,472],691:[1,476],692:[1,478],693:[1,479],694:[1,480],695:[1,482],696:[1,483],697:[1,484],698:[1,485],699:[1,486],700:[1,487],701:[1,488],702:[1,489],703:[1,490],704:[1,491],705:[1,492],706:[1,493],707:[1,494],708:[1,496],709:[1,497],710:[1,498],711:[1,499],712:[1,500],713:[1,501],714:[1,502],715:[1,503],716:[1,505],717:[1,506],718:[1,507],719:[1,508],720:[1,509],721:[1,510],722:[1,511],723:[1,513],724:[1,514],725:[1,515],726:[1,516],727:[1,517],728:[1,518],729:[1,519],730:[1,520],731:[1,521],732:[1,522],733:[1,523],734:[1,524],735:[1,525],736:[1,526],737:[1,527],738:[1,528],739:[1,529],740:[1,530],741:[1,531],742:[1,532],743:[1,533],744:[1,535],745:[1,536],746:[1,537],747:[1,538],748:[1,539],749:[1,540],750:[1,541],751:[1,542],752:[1,544],753:[1,545],754:[1,546],755:[1,547],756:[1,548],757:[1,549],758:[1,550],759:[1,551],760:[1,552],761:[1,553],762:[1,554],763:[1,555],764:[1,556],765:[1,557],766:[1,558],767:[1,560],768:[1,561],769:[1,562],770:[1,563],771:[1,564],772:[1,565],773:[1,566],774:[1,567],775:[1,568],776:[1,569],777:[1,570],778:[1,571],779:[1,572],780:[1,573],781:[1,574],782:[1,575],783:[1,576],784:[1,577],785:[1,578],786:[1,579],787:[1,580],788:[1,581],789:[1,582],790:[1,584],791:[1,585],792:[1,586],793:[1,587],794:[1,588],795:[1,589],796:[1,590],797:[1,591]},{1:[2,10]},n(io,c,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,16:592,2:a,4:l,5:f,6:u,7:p,8:d,9:b,58:R,77:L,83:T,96:C,133:te,155:W,165:Y,198:B,294:N,295:Ae,322:je,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Rt,455:Qr,466:$n,472:ki,474:Di,475:Wn,477:Pn,478:Jn,479:ls,480:Ls,481:On,482:ri,483:hs,487:ps,488:wo,491:Jo,492:Ao,545:Bo,546:ba,555:Fo}),n(R3,[2,1092]),n(R3,[2,1093]),n(io,[2,14]),{20:[1,593]},n(a2,Af,{94:594,127:Tf}),{45:598,83:[1,600],86:599,99:597,193:103,198:B,261:596},n(Tl,[2,253],{173:[1,601],262:[1,602]}),n(Tl,[2,255],{262:[1,603]}),n(Tl,[2,256],{262:[1,604]}),{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:605},{442:[1,606]},n(Ce,[2,805]),{83:Il},{83:[1,608]},{83:Fc},{83:If},{83:[1,611]},{83:[1,612]},{83:[1,613]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:614,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(Po,so,{385:615,165:el}),{442:[1,617]},{2:a,3:618,4:l,5:f,6:u,7:p,8:d,9:b},{202:[1,619]},{2:a,3:625,4:l,5:f,6:u,7:p,8:d,9:b,141:To,146:F1,152:va,154:f1,161:h1,192:[1,621],469:632,512:620,513:622,514:623,517:624,521:629,532:626,536:628},{139:[1,636],384:633,388:[1,635],447:[1,634]},{122:638,141:Pe,192:[2,1218],329:Re,510:637},n(Of,[2,1212],{504:639,3:640,2:a,4:l,5:f,6:u,7:p,8:d,9:b}),{2:a,3:641,4:l,5:f,6:u,7:p,8:d,9:b},{4:[1,642]},{4:[1,643]},n(ec,[2,533]),n(Ce,[2,730],{79:[1,644]}),n(ao,[2,731]),{2:a,3:645,4:l,5:f,6:u,7:p,8:d,9:b},{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,152:ve,161:Ee,190:pe,208:268,210:269,231:646,335:we},{2:a,3:647,4:l,5:f,6:u,7:p,8:d,9:b},n(Po,bu,{435:648,165:o2}),{442:[1,650]},{2:a,3:651,4:l,5:f,6:u,7:p,8:d,9:b},n(Po,bu,{435:652,165:o2}),n(Po,bu,{435:653,165:o2}),{2:a,3:654,4:l,5:f,6:u,7:p,8:d,9:b},n(tl,[2,1206]),n(tl,[2,1207]),n(Ce,c,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,16:655,123:672,360:684,2:a,4:l,5:f,6:u,7:p,8:d,9:b,58:R,77:L,83:T,96:C,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:l2,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,155:W,163:pn,165:Y,179:vn,180:_n,188:dr,189:ir,198:B,294:N,295:Ae,322:je,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Rt,455:Qr,466:$n,472:ki,474:Di,475:Wn,477:Pn,478:Jn,479:ls,480:Ls,481:On,482:ri,483:hs,487:ps,488:wo,491:Jo,492:Ao,545:Bo,546:ba,555:Fo}),n(hn,[2,302]),n(hn,[2,303]),n(hn,[2,304]),n(hn,[2,305]),n(hn,[2,306]),n(hn,[2,307]),n(hn,[2,308]),n(hn,[2,309]),n(hn,[2,310]),n(hn,[2,311]),n(hn,[2,312]),n(hn,[2,313]),n(hn,[2,314]),n(hn,[2,315]),n(hn,[2,316]),n(hn,[2,317]),n(hn,[2,318]),n(hn,[2,319]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,30:701,31:700,40:696,44:695,45:248,61:180,83:B1,86:76,96:C,104:698,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,193:103,198:B,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,291:697,292:ct,293:ot,294:N,295:Cf,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:vu,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,373:Te,456:209,457:me,461:he},n(hn,[2,323]),n(hn,[2,324]),n($c,[2,325],{83:If}),{83:[1,703]},{83:[1,704]},n([2,4,5,6,7,8,9,14,58,77,79,82,84,96,103,105,108,109,116,121,124,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],xu,{83:Il,125:[1,705]}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:706,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:707,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:708,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:709,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:710,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(k3,M3,{125:[1,711]}),n(k3,B3,{125:[1,712]}),n(hn,[2,292]),n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,229,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,275,281,292,293,294,295,298,299,301,304,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,333,335,336,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,452,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798,799,800],[2,380]),n(oa,[2,381]),n(oa,[2,382]),n(oa,F3),n(oa,[2,384]),n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,385]),{2:a,3:714,4:l,5:f,6:u,7:p,8:d,9:b,140:[1,715],334:713},{2:a,3:716,4:l,5:f,6:u,7:p,8:d,9:b},n(ic,[2,391]),n(ic,[2,392]),{2:a,3:717,4:l,5:f,6:u,7:p,8:d,9:b,83:Lf,122:719,140:De,141:Pe,152:ve,161:Ee,190:pe,205:720,210:722,284:721,327:et,328:nt,329:Re,335:we,456:723,461:he},{83:[1,724]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:725,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,337:726,340:727,341:_u,345:wt,350:At,456:209,457:me,461:he},{83:[1,729]},{83:[1,730]},n(oo,[2,662]),{2:a,3:746,4:l,5:f,6:u,7:p,8:d,9:b,83:Su,120:741,122:739,140:De,141:Pe,152:ve,153:735,154:ms,161:Ee,165:Be,190:pe,205:737,209:744,210:743,229:Es,281:bs,284:740,285:742,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,333:[1,733],335:we,350:Ol,456:209,457:me,458:731,459:734,460:736,461:he,464:732},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:749,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:750,4:l,5:f,6:u,7:p,8:d,9:b,165:Be,209:751,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne},{83:[2,356]},{83:[2,357]},{83:[2,358]},{83:[2,359]},{83:[2,360]},{83:[2,361]},{83:[2,362]},{83:[2,363]},{83:[2,364]},{83:[2,365]},{2:a,3:757,4:l,5:f,6:u,7:p,8:d,9:b,140:$3,141:P3,462:752,463:[1,753],465:754},{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,152:ve,161:Ee,190:pe,208:268,210:269,231:758,335:we},n(Z1,M1,{374:759,207:rc}),{322:[1,760]},n(Z1,[2,503]),{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,152:ve,161:Ee,190:pe,208:268,210:269,231:761,335:we},{251:[1,763],494:762},{251:[2,739]},{2:a,3:240,4:l,5:f,6:u,7:p,8:d,9:b,83:kc,141:$o,152:ve,153:233,154:it,161:Ee,165:Be,190:pe,208:234,209:236,210:235,211:237,218:764,227:238,229:Al,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,335:we,456:209,457:me,461:he},{44:765,45:248,83:T,86:76,96:C,193:103,198:B},n(c2,[2,1148],{220:766,82:[1,767]}),n(Ri,[2,1152],{222:768,230:770,3:771,2:a,4:l,5:f,6:u,7:p,8:d,9:b,82:Qo,163:[1,769]}),n(Ri,[2,1154],{3:771,224:773,230:774,2:a,4:l,5:f,6:u,7:p,8:d,9:b,82:Qo}),n(Ri,[2,1156],{3:771,225:775,230:776,2:a,4:l,5:f,6:u,7:p,8:d,9:b,82:Qo}),n(Ri,[2,1158],{3:771,226:777,230:778,2:a,4:l,5:f,6:u,7:p,8:d,9:b,82:Qo}),n(Ri,[2,1160],{3:771,228:779,230:780,2:a,4:l,5:f,6:u,7:p,8:d,9:b,82:Qo}),n(Ri,[2,201]),n([2,4,5,6,7,8,9,14,77,79,82,84,103,108,127,137,163,171,177,178,192,215,217,242,243,244,245,246,247,248,249,250,251,252,271,273,339,343,503,639,798],Nf,{83:Il,125:U3}),n([2,4,5,6,7,8,9,14,77,79,82,84,103,108,127,137,171,177,178,215,217,242,243,244,245,246,247,248,249,250,251,252,271,273,339,343,503,639,798],[2,204]),n(Ce,[2,818]),{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:782},n(sc,Df,{88:783,207:Rf}),n(mu,[2,1095]),n(V3,[2,1112],{117:785,199:[1,786]}),{84:[1,787]},n(Io,Rc,{93:119,260:120,171:R1,177:Zl,178:Ko}),n([14,84,192,339,343,503,639,798],Df,{456:209,88:788,126:789,3:790,123:793,153:815,167:825,169:826,2:a,4:l,5:f,6:u,7:p,8:d,9:b,77:lo,82:co,83:qa,121:la,124:Bt,125:Dt,127:za,131:xa,132:uo,133:ca,137:fo,138:ho,139:po,140:mo,141:go,142:ea,143:yo,144:ua,145:bo,146:js,147:qs,148:vo,149:zs,150:Ha,151:Hs,152:_a,154:Sa,155:Ea,157:ta,158:ra,159:fa,161:wa,163:Wa,165:Aa,171:Ya,173:Ta,175:da,177:ha,178:Ia,179:Oa,180:Xa,181:Ca,182:La,184:Ws,194:Ja,196:Na,207:Rf,266:We,267:qe,304:Da,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,457:me,461:he}),{388:[1,840]},{192:[1,841]},n(Ce,[2,632],{121:[1,842]}),{442:[1,843]},{192:[1,844]},n(Ce,[2,636],{121:[1,845],192:[1,846]}),{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:847},{44:848,45:248,79:[1,849],83:T,86:76,96:C,193:103,198:B},n(ac,[2,76]),{2:a,3:260,4:l,5:f,6:u,7:p,8:d,9:b,80:850},{82:[1,851],83:[1,852]},n(Ce,[2,709]),{15:114,339:[1,853],639:Dc,798:Ql},n(Ce,[2,707]),n(Ce,[2,708]),{2:a,3:854,4:l,5:f,6:u,7:p,8:d,9:b},n(Ce,[2,625]),{155:[1,855]},n(oc,[2,207]),n(oc,[2,208]),n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,105,133,137,152,154,155,157,158,161,163,165,190,192,196,198,250,294,295,322,330,335,339,343,368,372,373,378,379,391,403,404,407,408,433,437,438,439,440,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,545,546,552,553,554,555,639,798],Nf,{125:U3}),n(Ce,[2,653]),n(Ce,[2,654]),n(Ce,[2,655]),n(Ce,F3,{79:[1,856]}),{83:Lf,122:719,140:De,141:Pe,152:ve,161:Ee,190:pe,205:720,210:722,284:721,327:et,328:nt,329:Re,335:we,456:723,461:he},n(Li,[2,335]),n(Li,[2,336]),n(Li,[2,337]),n(Li,[2,338]),n(Li,[2,339]),n(Li,[2,340]),n(Li,[2,341]),n(Li,[2,342],{83:If}),n(Ce,c,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,123:672,360:684,16:857,2:a,4:l,5:f,6:u,7:p,8:d,9:b,58:R,77:L,83:T,96:C,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:l2,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,155:W,163:pn,165:Y,179:vn,180:_n,188:dr,189:ir,198:B,294:N,295:Ae,322:je,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Rt,455:Qr,466:$n,472:ki,474:Di,475:Wn,477:Pn,478:Jn,479:ls,480:Ls,481:On,482:ri,483:hs,487:ps,488:wo,491:Jo,492:Ao,545:Bo,546:ba,555:Fo}),n(Ce,[2,719],{79:S}),n(Ce,[2,720]),n(P,[2,378],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,30:701,31:700,40:696,44:860,45:248,61:180,83:B1,86:76,96:C,104:698,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,193:103,198:B,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,291:697,292:ct,293:ot,294:N,295:Cf,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:vu,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,373:Te,456:209,457:me,461:he},n(Ce,[2,721],{79:[1,861]}),n(Ce,[2,722],{79:[1,862]}),n(ao,[2,727]),n(ao,[2,729]),n(ao,[2,723]),n(ao,[2,724]),{123:868,124:Bt,125:Dt,133:[1,863],250:lt,467:864,468:865,471:qt},{2:a,3:869,4:l,5:f,6:u,7:p,8:d,9:b},n(Po,[2,698]),n(Po,[2,699]),n(Ce,[2,652],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),{2:a,3:104,4:l,5:f,6:u,7:p,8:d,9:b,543:302,544:870},n(Ce,[2,799],{79:Gr}),n(Kt,[2,801]),n(Ce,[2,804]),n(Ce,[2,725],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),n(Or,s2,{195:872,204:nc}),n(Or,s2,{195:873,204:nc}),n(Or,s2,{195:874,204:nc}),n(sr,[2,1142],{282:161,209:162,283:163,120:164,280:165,205:166,284:167,122:168,285:169,210:170,211:171,286:172,287:173,288:174,153:176,289:177,290:178,61:180,167:183,3:185,456:209,197:875,183:876,279:877,104:878,2:a,4:l,5:f,6:u,7:p,8:d,9:b,83:It,140:De,141:Pe,146:vt,152:ve,154:it,158:pt,161:Ee,163:Ue,165:Be,188:xt,189:mt,190:pe,229:gt,266:We,267:qe,281:at,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,457:me,461:he}),{83:[1,880],140:De,205:879},{2:a,3:104,4:l,5:f,6:u,7:p,8:d,9:b,543:302,544:881},n(Un,[2,166]),n(Un,[2,167]),n(Un,[2,168]),n(Un,[2,169]),n(Un,[2,170]),n(Un,[2,171]),n(Un,[2,172]),n(X,[2,7]),n(X,[2,819]),n(X,[2,820]),n(X,[2,821]),n(X,[2,822]),n(X,[2,823]),n(X,[2,824]),n(X,[2,825]),n(X,[2,826]),n(X,[2,827]),n(X,[2,828]),n(X,[2,829]),n(X,[2,830]),n(X,[2,831]),n(X,[2,832]),n(X,[2,833]),n(X,[2,834]),n(X,[2,835]),n(X,[2,836]),n(X,[2,837]),n(X,[2,838]),n(X,[2,839]),n(X,[2,840]),n(X,[2,841]),n(X,[2,842]),n(X,[2,843]),n(X,[2,844]),n(X,[2,845]),n(X,[2,846]),n(X,[2,847]),n(X,[2,848]),n(X,[2,849]),n(X,[2,850]),n(X,[2,851]),n(X,[2,852]),n(X,[2,853]),n(X,[2,854]),n(X,[2,855]),n(X,[2,856]),n(X,[2,857]),n(X,[2,858]),n(X,[2,859]),n(X,[2,860]),n(X,[2,861]),n(X,[2,862]),n(X,[2,863]),n(X,[2,864]),n(X,[2,865]),n(X,[2,866]),n(X,[2,867]),n(X,[2,868]),n(X,[2,869]),n(X,[2,870]),n(X,[2,871]),n(X,[2,872]),n(X,[2,873]),n(X,[2,874]),n(X,[2,875]),n(X,[2,876]),n(X,[2,877]),n(X,[2,878]),n(X,[2,879]),n(X,[2,880]),n(X,[2,881]),n(X,[2,882]),n(X,[2,883]),n(X,[2,884]),n(X,[2,885]),n(X,[2,886]),n(X,[2,887]),n(X,[2,888]),n(X,[2,889]),n(X,[2,890]),n(X,[2,891]),n(X,[2,892]),n(X,[2,893]),n(X,[2,894]),n(X,[2,895]),n(X,[2,896]),n(X,[2,897]),n(X,[2,898]),n(X,[2,899]),n(X,[2,900]),n(X,[2,901]),n(X,[2,902]),n(X,[2,903]),n(X,[2,904]),n(X,[2,905]),n(X,[2,906]),n(X,[2,907]),n(X,[2,908]),n(X,[2,909]),n(X,[2,910]),n(X,[2,911]),n(X,[2,912]),n(X,[2,913]),n(X,[2,914]),n(X,[2,915]),n(X,[2,916]),n(X,[2,917]),n(X,[2,918]),n(X,[2,919]),n(X,[2,920]),n(X,[2,921]),n(X,[2,922]),n(X,[2,923]),n(X,[2,924]),n(X,[2,925]),n(X,[2,926]),n(X,[2,927]),n(X,[2,928]),n(X,[2,929]),n(X,[2,930]),n(X,[2,931]),n(X,[2,932]),n(X,[2,933]),n(X,[2,934]),n(X,[2,935]),n(X,[2,936]),n(X,[2,937]),n(X,[2,938]),n(X,[2,939]),n(X,[2,940]),n(X,[2,941]),n(X,[2,942]),n(X,[2,943]),n(X,[2,944]),n(X,[2,945]),n(X,[2,946]),n(X,[2,947]),n(X,[2,948]),n(X,[2,949]),n(X,[2,950]),n(X,[2,951]),n(X,[2,952]),n(X,[2,953]),n(X,[2,954]),n(X,[2,955]),n(X,[2,956]),n(X,[2,957]),n(X,[2,958]),n(X,[2,959]),n(X,[2,960]),n(X,[2,961]),n(X,[2,962]),n(X,[2,963]),n(X,[2,964]),n(X,[2,965]),n(X,[2,966]),n(X,[2,967]),n(X,[2,968]),n(X,[2,969]),n(X,[2,970]),n(X,[2,971]),n(X,[2,972]),n(X,[2,973]),n(X,[2,974]),n(X,[2,975]),n(X,[2,976]),n(X,[2,977]),n(X,[2,978]),n(X,[2,979]),n(X,[2,980]),n(X,[2,981]),n(X,[2,982]),n(X,[2,983]),n(X,[2,984]),n(X,[2,985]),n(X,[2,986]),n(X,[2,987]),n(X,[2,988]),n(X,[2,989]),n(X,[2,990]),n(X,[2,991]),n(X,[2,992]),n(X,[2,993]),n(X,[2,994]),n(X,[2,995]),n(X,[2,996]),n(X,[2,997]),n(X,[2,998]),n(X,[2,999]),n(X,[2,1e3]),n(X,[2,1001]),n(X,[2,1002]),n(X,[2,1003]),n(X,[2,1004]),n(X,[2,1005]),n(X,[2,1006]),n(X,[2,1007]),n(X,[2,1008]),n(X,[2,1009]),n(X,[2,1010]),n(X,[2,1011]),n(X,[2,1012]),n(X,[2,1013]),n(X,[2,1014]),n(X,[2,1015]),n(X,[2,1016]),n(X,[2,1017]),n(X,[2,1018]),n(X,[2,1019]),n(X,[2,1020]),n(X,[2,1021]),n(X,[2,1022]),n(X,[2,1023]),n(X,[2,1024]),n(X,[2,1025]),n(X,[2,1026]),n(X,[2,1027]),n(X,[2,1028]),n(X,[2,1029]),n(X,[2,1030]),n(X,[2,1031]),n(X,[2,1032]),n(X,[2,1033]),n(X,[2,1034]),n(X,[2,1035]),n(X,[2,1036]),n(X,[2,1037]),n(X,[2,1038]),n(X,[2,1039]),n(X,[2,1040]),n(X,[2,1041]),n(X,[2,1042]),n(X,[2,1043]),n(X,[2,1044]),n(X,[2,1045]),n(X,[2,1046]),n(X,[2,1047]),n(X,[2,1048]),n(X,[2,1049]),n(X,[2,1050]),n(X,[2,1051]),n(X,[2,1052]),n(X,[2,1053]),n(X,[2,1054]),n(X,[2,1055]),n(X,[2,1056]),n(X,[2,1057]),n(X,[2,1058]),n(X,[2,1059]),n(X,[2,1060]),n(X,[2,1061]),n(X,[2,1062]),n(X,[2,1063]),n(X,[2,1064]),n(X,[2,1065]),n(X,[2,1066]),n(X,[2,1067]),n(X,[2,1068]),n(X,[2,1069]),n(X,[2,1070]),n(X,[2,1071]),n(X,[2,1072]),n(X,[2,1073]),n(X,[2,1074]),n(X,[2,1075]),n(X,[2,1076]),n(X,[2,1077]),n(X,[2,1078]),n(X,[2,1079]),n(X,[2,1080]),n(X,[2,1081]),n(X,[2,1082]),n(X,[2,1083]),n(X,[2,1084]),n(X,[2,1085]),n(X,[2,1086]),n(X,[2,1087]),n(X,[2,1088]),n(X,[2,1089]),n(X,[2,1090]),n(X,[2,1091]),n(io,[2,11]),n(io,c,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,16:882,2:a,4:l,5:f,6:u,7:p,8:d,9:b,58:R,77:L,83:T,96:C,133:te,155:W,165:Y,198:B,294:N,295:Ae,322:je,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Rt,455:Qr,466:$n,472:ki,474:Di,475:Wn,477:Pn,478:Jn,479:ls,480:Ls,481:On,482:ri,483:hs,487:ps,488:wo,491:Jo,492:Ao,545:Bo,546:ba,555:Fo}),n($i,Ns,{95:883,271:rl,273:Zo}),{128:[1,886]},n(Io,[2,252]),n(Io,[2,261]),n(Io,[2,262]),n(mu,[2,1102],{100:887,115:888,116:N3}),{44:889,45:248,83:T,86:76,96:C,193:103,198:B},n(Tl,[2,254],{262:[1,890]}),n(Tl,[2,257]),n(Tl,[2,259]),n(Tl,[2,260]),{433:[1,894],438:[1,891],439:[1,892],440:[1,893]},{2:a,3:895,4:l,5:f,6:u,7:p,8:d,9:b},n(Or,[2,1188],{321:896,801:898,84:[1,897],173:[1,900],194:[1,899]}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:901,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:902,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{84:[1,903]},{2:a,3:904,4:l,5:f,6:u,7:p,8:d,9:b,141:[1,905]},{2:a,3:906,4:l,5:f,6:u,7:p,8:d,9:b,141:[1,907]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:908,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:909,4:l,5:f,6:u,7:p,8:d,9:b,109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{2:a,3:910,4:l,5:f,6:u,7:p,8:d,9:b},{163:[1,911]},n(Oo,so,{385:912,165:el}),{250:[1,913]},{2:a,3:914,4:l,5:f,6:u,7:p,8:d,9:b},n(Ce,[2,774],{79:Pc}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:916,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(Kt,[2,777]),n(Uc,[2,1220],{456:209,515:917,153:918,148:u2,150:u2,154:ms,457:me,461:he}),{148:[1,919],150:[1,920]},n(Eu,f2,{529:922,532:923,83:[1,921],146:F1}),n(d2,[2,1244],{533:924,141:[1,925]}),n(p1,[2,1248],{535:926,536:927,161:h1}),n(p1,[2,792]),n(wu,[2,784]),{2:a,3:928,4:l,5:f,6:u,7:p,8:d,9:b,140:[1,929]},{2:a,3:930,4:l,5:f,6:u,7:p,8:d,9:b},{2:a,3:931,4:l,5:f,6:u,7:p,8:d,9:b},n(Po,so,{385:932,165:el}),n(Po,so,{385:933,165:el}),n(tl,[2,522]),n(tl,[2,523]),{192:[1,934]},{192:[2,1219]},n(Vc,[2,1214],{505:935,508:936,146:[1,937]}),n(Of,[2,1213]),n(h2,Qp,{548:938,105:ph,250:[1,939],552:mh,553:gh,554:Zp}),{82:[1,944]},{82:[1,945]},{154:k1,490:946},{4:nl,11:950,82:[1,948],300:947,424:949,426:Gc},n(Ce,Ds,{369:954,137:[1,953],503:Rs}),n(Ce,[2,617]),{2:a,3:956,4:l,5:f,6:u,7:p,8:d,9:b},{331:[1,957]},n(Oo,bu,{435:958,165:o2}),n(Ce,[2,631]),{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:960,436:959},{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:960,436:961},n(Ce,[2,817]),n(io,[2,711],{476:962,343:[1,963]}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:964,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:965,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:966,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:967,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:968,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:969,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:970,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:971,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:972,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:973,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:974,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:975,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:976,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:977,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:978,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:979,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:980,4:l,5:f,6:u,7:p,8:d,9:b,83:[1,982],140:De,165:Be,205:981,209:983,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne},{2:a,3:984,4:l,5:f,6:u,7:p,8:d,9:b,83:[1,986],140:De,165:Be,205:985,209:987,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne},n(jc,[2,464],{282:161,209:162,283:163,120:164,280:165,205:166,284:167,122:168,285:169,210:170,211:171,286:172,287:173,288:174,153:176,289:177,290:178,61:180,167:183,3:185,456:209,104:988,2:a,4:l,5:f,6:u,7:p,8:d,9:b,83:It,140:De,141:Pe,146:vt,152:ve,154:it,158:pt,161:Ee,163:Ue,165:Be,188:xt,189:mt,190:pe,229:gt,266:We,267:qe,281:at,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,457:me,461:he}),n(jc,[2,465],{282:161,209:162,283:163,120:164,280:165,205:166,284:167,122:168,285:169,210:170,211:171,286:172,287:173,288:174,153:176,289:177,290:178,61:180,167:183,3:185,456:209,104:989,2:a,4:l,5:f,6:u,7:p,8:d,9:b,83:It,140:De,141:Pe,146:vt,152:ve,154:it,158:pt,161:Ee,163:Ue,165:Be,188:xt,189:mt,190:pe,229:gt,266:We,267:qe,281:at,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,457:me,461:he}),n(jc,[2,466],{282:161,209:162,283:163,120:164,280:165,205:166,284:167,122:168,285:169,210:170,211:171,286:172,287:173,288:174,153:176,289:177,290:178,61:180,167:183,3:185,456:209,104:990,2:a,4:l,5:f,6:u,7:p,8:d,9:b,83:It,140:De,141:Pe,146:vt,152:ve,154:it,158:pt,161:Ee,163:Ue,165:Be,188:xt,189:mt,190:pe,229:gt,266:We,267:qe,281:at,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,457:me,461:he}),n(jc,[2,467],{282:161,209:162,283:163,120:164,280:165,205:166,284:167,122:168,285:169,210:170,211:171,286:172,287:173,288:174,153:176,289:177,290:178,61:180,167:183,3:185,456:209,104:991,2:a,4:l,5:f,6:u,7:p,8:d,9:b,83:It,140:De,141:Pe,146:vt,152:ve,154:it,158:pt,161:Ee,163:Ue,165:Be,188:xt,189:mt,190:pe,229:gt,266:We,267:qe,281:at,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,457:me,461:he}),n(jc,e0,{282:161,209:162,283:163,120:164,280:165,205:166,284:167,122:168,285:169,210:170,211:171,286:172,287:173,288:174,153:176,289:177,290:178,61:180,167:183,3:185,456:209,104:992,2:a,4:l,5:f,6:u,7:p,8:d,9:b,83:It,140:De,141:Pe,146:vt,152:ve,154:it,158:pt,161:Ee,163:Ue,165:Be,188:xt,189:mt,190:pe,229:gt,266:We,267:qe,281:at,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,457:me,461:he}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:993,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:994,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(jc,[2,469],{282:161,209:162,283:163,120:164,280:165,205:166,284:167,122:168,285:169,210:170,211:171,286:172,287:173,288:174,153:176,289:177,290:178,61:180,167:183,3:185,456:209,104:995,2:a,4:l,5:f,6:u,7:p,8:d,9:b,83:It,140:De,141:Pe,146:vt,152:ve,154:it,158:pt,161:Ee,163:Ue,165:Be,188:xt,189:mt,190:pe,229:gt,266:We,267:qe,281:at,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,457:me,461:he}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:996,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:997,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{173:[1,999],175:[1,1001],361:998,367:[1,1e3]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1002,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1003,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:746,4:l,5:f,6:u,7:p,8:d,9:b,83:[1,1004],120:1007,154:t0,165:Be,209:1008,211:1006,229:Es,281:bs,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,362:1005},{109:[1,1010],330:[1,1011]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1012,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1013,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1014,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{4:nl,11:950,300:1015,424:949,426:Gc},n(r0,[2,101]),n(r0,[2,102]),{84:[1,1016]},{84:[1,1017]},{84:[1,1018]},{84:[1,1019],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},n(Z1,M1,{374:228,83:Fc,207:rc}),{84:[2,1180]},{84:[2,1181]},{143:tc,144:i2},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1020,161:Ee,163:Ue,165:Be,167:183,173:[1,1022],188:xt,189:mt,190:pe,194:[1,1021],205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1023,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,194:[1,1024],205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:1025,4:l,5:f,6:u,7:p,8:d,9:b,154:n0,158:i0,189:[1,1028]},n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,127,131,137,138,139,140,141,143,144,146,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,347,363,364,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,440],{123:672,360:684,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,365:Mr}),n(G3,[2,441],{123:672,360:684,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,189:ir,345:Xt,349:Jt}),n(G3,[2,442],{123:672,360:684,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,189:ir,345:Xt,349:Jt}),n(yh,[2,443],{123:672,360:684,349:Jt}),n(yh,[2,444],{123:672,360:684,349:Jt}),{2:a,3:1029,4:l,5:f,6:u,7:p,8:d,9:b,189:[1,1030]},{2:a,3:1031,4:l,5:f,6:u,7:p,8:d,9:b,189:[1,1032]},n(ic,[2,389]),n(ic,[2,1190]),n(ic,[2,1191]),n(ic,[2,390]),n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,386]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1033,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(oo,[2,658]),n(oo,[2,659]),n(oo,[2,660]),n(oo,[2,661]),n(oo,[2,663]),{44:1034,45:248,83:T,86:76,96:C,193:103,198:B},{109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,337:1035,340:727,341:_u,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{338:1036,339:s0,340:1037,341:_u,343:a0},n(bh,[2,396]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1039,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1040,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{4:nl,11:950,300:1041,424:949,426:Gc},n(oo,[2,664]),{79:[1,1043],333:[1,1042]},n(oo,[2,681]),n(j3,[2,691]),n(e1,[2,665]),n(e1,[2,666]),n(e1,[2,667]),{140:De,205:1044},n(e1,[2,669]),n(e1,[2,670]),n(e1,[2,671]),n(e1,[2,672]),n(e1,[2,673]),n(e1,[2,674]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1045,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n([2,4,5,6,7,8,9,14,58,77,79,82,84,96,103,105,108,109,116,121,124,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],xu,{83:Il,125:kf}),n(Mf,M3,{125:[1,1047]}),n(Mf,B3,{125:[1,1048]}),{79:S,333:[1,1049]},n($c,[2,329],{83:Il}),n(hn,[2,330]),{79:[1,1051],463:[1,1050]},n(oo,[2,678]),n(Cl,[2,683]),{161:[1,1052],466:[1,1053]},{161:[1,1054],466:[1,1055]},{161:[1,1056],466:[1,1057]},{44:1062,45:248,83:[1,1061],86:76,96:C,152:ve,153:1066,154:ms,155:[1,1063],158:Ll,161:Ee,190:pe,193:103,198:B,210:1067,335:we,375:1058,376:1059,378:[1,1060],379:Nl,456:209,457:me,461:he},{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,152:ve,161:Ee,190:pe,208:268,210:269,231:1068,335:we},n(Z1,M1,{374:1069,207:rc}),{83:$1,152:ve,153:1066,154:ms,158:Ll,161:Ee,190:pe,210:1067,335:we,375:1070,376:1071,379:Nl,456:209,457:me,461:he},{250:[1,1074],495:1073},{2:a,3:240,4:l,5:f,6:u,7:p,8:d,9:b,83:[1,1076],141:$o,152:ve,153:233,154:it,161:Ee,165:Be,190:pe,208:234,209:236,210:235,211:237,218:1075,227:238,229:Al,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,335:we,456:209,457:me,461:he},{251:[2,740]},{84:[1,1077]},n(Ri,[2,1150],{221:1078,3:1079,2:a,4:l,5:f,6:u,7:p,8:d,9:b}),n(c2,[2,1149]),n(Ri,[2,195]),{223:[1,1080]},n(Ri,[2,1153]),n(Ri,[2,202]),{2:a,3:1081,4:l,5:f,6:u,7:p,8:d,9:b},n(Ri,[2,197]),n(Ri,[2,1155]),n(Ri,[2,198]),n(Ri,[2,1157]),n(Ri,[2,199]),n(Ri,[2,1159]),n(Ri,[2,200]),n(Ri,[2,1161]),{2:a,3:1082,4:l,5:f,6:u,7:p,8:d,9:b},{157:[1,1083]},n(qc,Bf,{89:1084,192:Ff}),{2:a,3:240,4:l,5:f,6:u,7:p,8:d,9:b,141:[1,1090],152:ve,154:[1,1091],161:Ee,165:Be,190:pe,208:1086,209:1087,210:1088,211:1089,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,335:we},{2:a,3:1096,4:l,5:f,6:u,7:p,8:d,9:b,118:1092,119:1093,120:1094,121:$f,229:Es,281:bs},n(V3,[2,1113]),n(Io,Dl,{260:120,93:1097,171:R1,177:Zl,178:Ko}),n($i,[2,1100],{98:1098,191:1099,192:[1,1100]}),n(Mc,[2,1099],{162:1101,188:Ra,189:ka,190:Ma}),n([2,4,5,6,7,8,9,14,77,79,82,84,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,207,266,267,304,313,314,315,316,317,318,319,320,339,343,457,461,503,639,798],[2,103],{83:[1,1105]}),{128:[1,1106]},n(Yn,[2,106]),{2:a,3:1107,4:l,5:f,6:u,7:p,8:d,9:b},n(Yn,[2,108]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1108,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1109,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:790,4:l,5:f,6:u,7:p,8:d,9:b,77:lo,82:co,83:qa,121:la,123:793,124:Bt,125:Dt,126:1111,127:za,131:xa,132:uo,133:ca,134:1110,137:fo,138:ho,139:po,140:mo,141:go,142:ea,143:yo,144:ua,145:bo,146:js,147:qs,148:vo,149:zs,150:Ha,151:Hs,152:_a,153:815,154:Sa,155:Ea,157:ta,158:ra,159:fa,161:wa,163:Wa,165:Aa,167:825,169:826,171:Ya,173:Ta,175:da,177:ha,178:Ia,179:Oa,180:Xa,181:Ca,182:La,184:Ws,194:Ja,196:Na,266:We,267:qe,304:Da,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,456:209,457:me,461:he},{83:[1,1112]},{83:[1,1113]},{83:[1,1114]},{83:[1,1115]},n(Yn,[2,117]),n(Yn,[2,118]),n(Yn,[2,119]),n(Yn,[2,120]),n(Yn,[2,121]),n(Yn,[2,122]),{2:a,3:1116,4:l,5:f,6:u,7:p,8:d,9:b},{2:a,3:1117,4:l,5:f,6:u,7:p,8:d,9:b,142:[1,1118]},n(Yn,[2,126]),n(Yn,[2,127]),n(Yn,[2,128]),n(Yn,[2,129]),n(Yn,[2,130]),n(Yn,[2,131]),{2:a,3:1119,4:l,5:f,6:u,7:p,8:d,9:b,83:Lf,122:719,140:De,141:Pe,152:ve,161:Ee,190:pe,205:720,210:722,284:721,327:et,328:nt,329:Re,335:we,456:723,461:he},{154:[1,1120]},{83:[1,1121]},{154:[1,1122]},n(Yn,[2,136]),{83:[1,1123]},{2:a,3:1124,4:l,5:f,6:u,7:p,8:d,9:b},{83:[1,1125]},{83:[1,1126]},{83:[1,1127]},{83:[1,1128]},{83:[1,1129],173:[1,1130]},{83:[1,1131]},{83:[1,1132]},{83:[1,1133]},{83:[1,1134]},{83:[1,1135]},{83:[1,1136]},{83:[1,1137]},{83:[1,1138]},{83:[1,1139]},{83:[2,366]},{83:[2,1128]},{83:[2,1129]},{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:1140},{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:1141},{122:1142,141:Pe,329:Re},n(Ce,[2,634],{121:[1,1143]}),{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:1144},{122:1145,141:Pe,329:Re},{2:a,3:1146,4:l,5:f,6:u,7:p,8:d,9:b},n(Ce,[2,737]),n(Ce,[2,73]),{2:a,3:260,4:l,5:f,6:u,7:p,8:d,9:b,80:1147,81:[1,1148]},n(ac,[2,77]),{83:[1,1149]},{2:a,3:1096,4:l,5:f,6:u,7:p,8:d,9:b,85:1150,120:1151,229:Es,281:bs},n(Ce,[2,718]),n(Ce,[2,624]),{2:a,3:1096,4:l,5:f,6:u,7:p,8:d,9:b,120:1154,152:zc,154:Rl,156:1152,229:Es,281:bs,370:1153,371:1155},{153:1158,154:ms,456:209,457:me,461:he},n(Ce,[2,713]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1159,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(jc,e0,{282:161,209:162,283:163,120:164,280:165,205:166,284:167,122:168,285:169,210:170,211:171,286:172,287:173,288:174,153:176,289:177,290:178,61:180,167:183,3:185,456:209,104:1160,2:a,4:l,5:f,6:u,7:p,8:d,9:b,83:It,140:De,141:Pe,146:vt,152:ve,154:it,158:pt,161:Ee,163:Ue,165:Be,188:xt,189:mt,190:pe,229:gt,266:We,267:qe,281:at,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,457:me,461:he}),{84:[1,1161]},{122:1162,141:Pe,329:Re},{2:a,3:294,4:l,5:f,6:u,7:p,8:d,9:b,486:1163,487:yu},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1165,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,250:lt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he,467:1164,471:qt},n(Ce,[2,693]),{123:1167,124:Bt,125:Dt,133:[1,1166]},n(Ce,[2,705]),n(Ce,[2,706]),{2:a,3:1169,4:l,5:f,6:u,7:p,8:d,9:b,83:Hc,140:vh,470:1168},{123:868,124:Bt,125:Dt,133:[1,1172],468:1173},n(Ce,[2,798],{79:Gr}),{2:a,3:104,4:l,5:f,6:u,7:p,8:d,9:b,543:1174},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:878,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,183:1175,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,279:877,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:878,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,183:1176,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,279:877,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:878,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,183:1177,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,279:877,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(sr,[2,164]),n(sr,[2,1143],{79:Wc}),n(lc,[2,280]),n(lc,[2,287],{123:672,360:684,3:1180,122:1182,2:a,4:l,5:f,6:u,7:p,8:d,9:b,82:[1,1179],109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,140:[1,1181],141:Pe,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,329:Re,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),n(d1,[2,1144],{206:1183,799:[1,1184]}),{140:De,205:1185},{79:Gr,84:[1,1186]},n(io,[2,15]),n($i,[2,82]),{140:De,205:1187},{140:De,205:1188},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1191,120:164,122:168,129:1189,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,263:1190,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(sc,Df,{88:1192,207:Rf}),n(mu,[2,1103]),{84:[1,1193]},n(Tl,[2,258]),{157:[1,1194],199:[1,1195]},{199:[1,1196]},{199:[1,1197]},{199:[1,1198]},n(Ce,[2,613],{82:[1,1200],83:[1,1199]}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1201,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(oa,Pf,{303:1202,307:Uf}),n(Or,[2,1189]),n(Or,[2,1186]),n(Or,[2,1187]),{79:S,84:[1,1204]},{79:S,84:[1,1205]},n(oa,[2,371]),{79:[1,1206]},{79:[1,1207]},{79:[1,1208]},{79:[1,1209]},{79:[1,1210],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},n(oa,[2,377]),n(Ce,[2,618]),{331:[1,1211]},{2:a,3:1212,4:l,5:f,6:u,7:p,8:d,9:b,122:1213,141:Pe,329:Re},{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:1214},{250:[1,1215]},{2:a,3:625,4:l,5:f,6:u,7:p,8:d,9:b,141:To,146:F1,152:va,154:f1,161:h1,469:632,513:1216,514:623,517:624,521:629,532:626,536:628},n(Ce,[2,775],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),n(Kt,[2,1222],{516:1217,522:1218,82:kl}),n(Uc,[2,1221]),{2:a,3:1222,4:l,5:f,6:u,7:p,8:d,9:b,141:To,146:F1,153:1221,154:ms,161:h1,456:209,457:me,461:he,514:1220,532:626,536:628},{2:a,3:1222,4:l,5:f,6:u,7:p,8:d,9:b,141:To,146:F1,152:va,154:f1,161:h1,469:632,514:1224,517:1223,521:629,532:626,536:628},{2:a,3:625,4:l,5:f,6:u,7:p,8:d,9:b,141:To,146:F1,152:va,154:f1,161:h1,469:632,512:1225,513:622,514:623,517:624,521:629,532:626,536:628},n(d2,[2,1240],{530:1226,141:[1,1227]}),n(Eu,[2,1239]),n(p1,[2,1246],{534:1228,536:1229,161:h1}),n(d2,[2,1245]),n(p1,[2,791]),n(p1,[2,1249]),n(Eu,[2,794]),n(Eu,[2,795]),n(p1,[2,793]),n(wu,[2,785]),{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:1230},{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:1231},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1232,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(xh,[2,1216],{506:1233,122:1234,141:Pe,329:Re}),n(Vc,[2,1215]),{2:a,3:1235,4:l,5:f,6:u,7:p,8:d,9:b},{368:_h,372:Sh,373:o0,549:1236},{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:1240},n(h2,[2,810]),n(h2,[2,811]),n(h2,[2,812]),{138:[1,1241]},{294:[1,1242]},{294:[1,1243]},n(ao,[2,732]),n(ao,[2,733],{133:[1,1244]}),{4:nl,11:950,300:1245,424:949,426:Gc},n([2,4,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,580],{5:[1,1246]}),n([2,5,6,7,8,9,14,58,77,79,82,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,577],{4:[1,1248],83:[1,1247]}),{83:[1,1249]},n(Au,[2,8]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1250,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(Ce,[2,480]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:878,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,183:1251,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,279:877,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(Ce,[2,626]),n(Oo,[2,606]),{2:a,3:1252,4:l,5:f,6:u,7:p,8:d,9:b,122:1253,141:Pe,329:Re},n(Ce,[2,602],{79:l0}),n(ao,[2,604]),n(Ce,[2,651],{79:l0}),n(Ce,[2,710]),n(Ce,c,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,16:1255,2:a,4:l,5:f,6:u,7:p,8:d,9:b,58:R,77:L,83:T,96:C,133:te,155:W,165:Y,198:B,294:N,295:Ae,322:je,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Rt,455:Qr,466:$n,472:ki,474:Di,475:Wn,477:Pn,478:Jn,479:ls,480:Ls,481:On,482:ri,483:hs,487:ps,488:wo,491:Jo,492:Ao,545:Bo,546:ba,555:Fo}),n(m1,[2,400],{123:672,360:684,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,345:Xt,349:Jt,350:br,351:Tr,352:Ir}),n(yh,[2,401],{123:672,360:684,349:Jt}),n(m1,[2,402],{123:672,360:684,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,345:Xt,349:Jt,350:br,351:Tr,352:Ir}),n(Eh,[2,403],{123:672,360:684,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,345:Xt,347:[1,1256],349:Jt,350:br,351:Tr,352:Ir}),n(Eh,[2,405],{123:672,360:684,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,345:Xt,347:[1,1257],349:Jt,350:br,351:Tr,352:Ir}),n(hn,[2,407],{123:672,360:684}),n(G3,[2,408],{123:672,360:684,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,189:ir,345:Xt,349:Jt}),n(G3,[2,409],{123:672,360:684,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,189:ir,345:Xt,349:Jt}),n(Yc,[2,410],{123:672,360:684,124:Bt,125:Dt,132:tr,145:nr,345:Xt,349:Jt}),n(Yc,[2,411],{123:672,360:684,124:Bt,125:Dt,132:tr,145:nr,345:Xt,349:Jt}),n(Yc,[2,412],{123:672,360:684,124:Bt,125:Dt,132:tr,145:nr,345:Xt,349:Jt}),n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,127,131,132,133,137,138,139,140,141,142,143,144,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,347,348,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,413],{123:672,360:684,124:Bt,125:Dt,145:nr,345:Xt,349:Jt}),n(il,[2,414],{123:672,360:684,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,188:dr,189:ir,345:Xt,349:Jt,350:br}),n(il,[2,415],{123:672,360:684,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,188:dr,189:ir,345:Xt,349:Jt,350:br}),n(il,[2,416],{123:672,360:684,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,188:dr,189:ir,345:Xt,349:Jt,350:br}),n(il,[2,417],{123:672,360:684,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,188:dr,189:ir,345:Xt,349:Jt,350:br}),n($c,[2,418],{83:Il}),n(hn,[2,419]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1258,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(hn,[2,421]),n($c,[2,422],{83:Il}),n(hn,[2,423]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1259,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(hn,[2,425]),n(sl,[2,426],{123:672,360:684,121:Ur,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:Mr}),n(sl,[2,427],{123:672,360:684,121:Ur,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:Mr}),n(sl,[2,428],{123:672,360:684,121:Ur,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:Mr}),n(sl,[2,429],{123:672,360:684,121:Ur,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:Mr}),n([2,4,5,6,7,8,9,14,58,77,83,96,109,133,148,149,155,163,165,179,180,198,294,295,322,339,343,353,354,355,356,357,358,359,363,364,366,368,372,373,433,437,438,441,443,445,446,454,455,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,545,546,555,639,798],q3,{123:672,360:684,121:Ur,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:Mr}),n(sl,[2,431],{123:672,360:684,121:Ur,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:Mr}),n(sl,[2,432],{123:672,360:684,121:Ur,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:Mr}),n(sl,[2,433],{123:672,360:684,121:Ur,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:Mr}),n(sl,[2,434],{123:672,360:684,121:Ur,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:Mr}),n(sl,[2,435],{123:672,360:684,121:Ur,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:Mr}),{83:[1,1260]},{83:[2,470]},{83:[2,471]},{83:[2,472]},n(p2,[2,438],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,365:Mr}),n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,116,127,131,137,138,139,140,141,143,144,146,152,154,155,157,158,159,161,165,171,173,175,177,178,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,347,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,439],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,44:1261,45:248,61:180,83:B1,84:[1,1263],86:76,96:C,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1262,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,193:103,198:B,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(hn,[2,452]),n(hn,[2,454]),n(hn,[2,461]),n(hn,[2,462]),{2:a,3:717,4:l,5:f,6:u,7:p,8:d,9:b,83:[1,1264]},{2:a,3:746,4:l,5:f,6:u,7:p,8:d,9:b,83:[1,1265],120:1007,154:t0,165:Be,209:1008,211:1267,229:Es,281:bs,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,362:1266},n(hn,[2,459]),n(p2,[2,456],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,365:Mr}),n(p2,[2,457],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,365:Mr}),n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,347,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,458],{123:672,360:684,121:Ur,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir}),n(hn,[2,460]),n(hn,wh),n(hn,[2,321]),n(hn,[2,322]),n(hn,[2,445]),{79:S,84:[1,1268]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1269,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1270,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(Ys,cc,{123:672,360:684,305:1271,109:Dr,121:Ur,124:Bt,125:Dt,127:$s,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1273,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(hn,Uo),n(Tu,[2,297]),{2:a,3:1275,4:l,5:f,6:u,7:p,8:d,9:b},n(hn,[2,289]),n(Tu,[2,294]),n(hn,[2,290]),n(Tu,[2,295]),n(hn,[2,291]),{84:[1,1276],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{84:[1,1277]},{338:1278,339:s0,340:1037,341:_u,343:a0},{339:[1,1279]},n(bh,[2,395]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1280,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,342:[1,1281],344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{82:[1,1282],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{79:[1,1283]},n(oo,[2,679]),{2:a,3:746,4:l,5:f,6:u,7:p,8:d,9:b,83:Su,120:741,122:739,140:De,141:Pe,152:ve,153:735,154:ms,161:Ee,165:Be,190:pe,205:737,209:744,210:743,229:Es,281:bs,284:740,285:742,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,333:[1,1284],335:we,350:Ol,456:209,457:me,459:1285,460:736,461:he},n(e1,[2,668]),{84:[1,1286],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{2:a,3:1287,4:l,5:f,6:u,7:p,8:d,9:b,154:n0,158:i0},{2:a,3:1029,4:l,5:f,6:u,7:p,8:d,9:b},{2:a,3:1031,4:l,5:f,6:u,7:p,8:d,9:b},n(hn,[2,388]),n(oo,[2,676]),{2:a,3:757,4:l,5:f,6:u,7:p,8:d,9:b,140:$3,141:P3,463:[1,1288],465:1289},{2:a,3:746,4:l,5:f,6:u,7:p,8:d,9:b,83:Su,120:741,122:739,140:De,141:Pe,152:ve,153:735,154:ms,161:Ee,165:Be,190:pe,205:737,209:744,210:743,229:Es,281:bs,284:740,285:742,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,335:we,350:Ol,456:209,457:me,459:1290,460:736,461:he},{140:De,205:1291},{2:a,3:746,4:l,5:f,6:u,7:p,8:d,9:b,83:Su,120:741,122:739,140:De,141:Pe,152:ve,153:735,154:ms,161:Ee,165:Be,190:pe,205:737,209:744,210:743,229:Es,281:bs,284:740,285:742,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,335:we,350:Ol,456:209,457:me,459:1292,460:736,461:he},{140:De,205:1293},{2:a,3:746,4:l,5:f,6:u,7:p,8:d,9:b,83:Su,120:741,122:739,140:De,141:Pe,152:ve,153:735,154:ms,161:Ee,165:Be,190:pe,205:737,209:744,210:743,229:Es,281:bs,284:740,285:742,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,335:we,350:Ol,456:209,457:me,459:1294,460:736,461:he},{140:De,205:1295},{83:$1,152:ve,153:1066,154:ms,161:Ee,190:pe,210:1067,335:we,376:1296,456:209,457:me,461:he},n(li,Ds,{369:1297,79:t1,503:Rs}),{158:Ll,375:1299,379:Nl},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,44:247,45:248,61:180,83:B1,85:1300,86:76,96:C,104:1303,120:1302,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,193:103,198:B,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,380:1301,456:209,457:me,461:he},n(li,Ds,{369:1304,503:Rs}),{2:a,3:1096,4:l,5:f,6:u,7:p,8:d,9:b,120:1154,152:zc,154:Rl,156:1305,229:Es,281:bs,370:1153,371:1155},n(c0,[2,500]),n(c0,[2,501]),n(m2,[2,505]),n(m2,[2,506]),{44:1309,45:248,83:[1,1308],86:76,96:C,152:ve,153:1066,154:ms,158:Ll,161:Ee,190:pe,193:103,198:B,210:1067,335:we,375:1306,376:1307,379:Nl,456:209,457:me,461:he},{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,152:ve,161:Ee,190:pe,208:268,210:269,231:1310,335:we},{83:$1,152:ve,153:1066,154:ms,161:Ee,190:pe,210:1067,335:we,376:1311,456:209,457:me,461:he},n(li,Ds,{369:1312,79:t1,503:Rs}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1303,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,380:1301,456:209,457:me,461:he},{341:Ah,496:1313,497:1314,498:1315},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1317,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{250:[2,741]},{2:a,3:240,4:l,5:f,6:u,7:p,8:d,9:b,44:765,45:248,83:u0,86:76,96:C,141:$o,152:ve,153:233,154:it,161:Ee,165:Be,190:pe,193:103,198:B,208:234,209:236,210:235,211:237,218:1318,227:238,229:Al,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,335:we,456:209,457:me,461:he},n(Ri,f0,{3:771,219:1320,230:1321,2:a,4:l,5:f,6:u,7:p,8:d,9:b,82:Qo}),n(Ri,[2,194]),n(Ri,[2,1151]),n(Ri,[2,196]),n(Ri,[2,203]),n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,127,133,137,152,154,155,157,158,161,163,165,171,177,178,190,192,196,198,215,217,242,243,244,245,246,247,248,249,250,251,252,271,273,294,295,322,330,335,339,343,368,372,373,378,379,391,403,404,407,408,433,437,438,439,440,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,545,546,552,553,554,555,639,798],[2,205]),{2:a,3:1322,4:l,5:f,6:u,7:p,8:d,9:b},n(P1,[2,1096],{90:1323,102:1324,103:d0,108:h0}),{2:a,3:240,4:l,5:f,6:u,7:p,8:d,9:b,83:[1,1328],141:$o,152:ve,153:233,154:it,161:Ee,165:Be,190:pe,208:234,209:236,210:235,211:237,212:1327,218:1329,227:238,229:Al,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,335:we,456:209,457:me,461:he},n(sc,[2,177]),n(sc,[2,178]),n(sc,[2,179]),n(sc,[2,180]),n(sc,[2,181]),{2:a,3:717,4:l,5:f,6:u,7:p,8:d,9:b},n(mu,[2,96],{79:[1,1330]}),n(Vf,[2,98]),n(Vf,[2,99]),{122:1331,141:Pe,329:Re},n([14,77,79,84,103,108,127,133,137,171,177,178,192,207,215,217,242,243,244,245,246,247,248,249,252,271,273,339,343,503,639,798],xu,{125:kf}),n(a2,Af,{94:1332,127:Tf}),n($i,[2,83]),n($i,[2,1101]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1333,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(Yn,[2,139]),n(Yn,[2,157]),n(Yn,[2,158]),n(Yn,[2,159]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,84:[2,1120],104:287,120:164,122:168,136:1334,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1335,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{83:[1,1336]},n(Yn,[2,107]),n([2,4,5,6,7,8,9,14,77,79,82,83,84,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,207,266,267,304,313,314,315,316,317,318,319,320,339,343,457,461,503,639,798],[2,109],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),n([2,4,5,6,7,8,9,14,77,79,82,83,84,121,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,207,266,267,304,313,314,315,316,317,318,319,320,339,343,457,461,503,639,798],[2,110],{123:672,360:684,109:Dr,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),{2:a,3:790,4:l,5:f,6:u,7:p,8:d,9:b,77:lo,82:co,83:qa,84:[1,1337],121:la,123:793,124:Bt,125:Dt,126:1338,127:za,131:xa,132:uo,133:ca,137:fo,138:ho,139:po,140:mo,141:go,142:ea,143:yo,144:ua,145:bo,146:js,147:qs,148:vo,149:zs,150:Ha,151:Hs,152:_a,153:815,154:Sa,155:Ea,157:ta,158:ra,159:fa,161:wa,163:Wa,165:Aa,167:825,169:826,171:Ya,173:Ta,175:da,177:ha,178:Ia,179:Oa,180:Xa,181:Ca,182:La,184:Ws,194:Ja,196:Na,266:We,267:qe,304:Da,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,456:209,457:me,461:he},n(xo,[2,1116],{162:1101,188:Ra,189:ka,190:Ma}),{2:a,3:790,4:l,5:f,6:u,7:p,8:d,9:b,77:lo,82:co,83:qa,121:la,123:793,124:Bt,125:Dt,126:1340,127:za,131:xa,132:uo,133:ca,135:1339,137:fo,138:ho,139:po,140:mo,141:go,142:ea,143:yo,144:ua,145:bo,146:js,147:qs,148:vo,149:zs,150:Ha,151:Hs,152:_a,153:815,154:Sa,155:Ea,157:ta,158:ra,159:fa,161:wa,163:Wa,165:Aa,167:825,169:826,171:Ya,173:Ta,175:da,177:ha,178:Ia,179:Oa,180:Xa,181:Ca,182:La,184:Ws,194:Ja,196:Na,266:We,267:qe,304:Da,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1341,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1342,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:1343,4:l,5:f,6:u,7:p,8:d,9:b},n(Yn,[2,123]),n(Yn,[2,124]),n(Yn,[2,125]),n(Yn,[2,132]),{2:a,3:1344,4:l,5:f,6:u,7:p,8:d,9:b},{2:a,3:1096,4:l,5:f,6:u,7:p,8:d,9:b,120:1154,152:zc,154:Rl,156:1345,229:Es,281:bs,370:1153,371:1155},{2:a,3:1346,4:l,5:f,6:u,7:p,8:d,9:b},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1347,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(Yn,[2,138]),n(xo,[2,1122],{164:1348}),n(xo,[2,1124],{166:1349}),n(xo,[2,1126],{168:1350}),n(xo,[2,1130],{170:1351}),n(Ml,g2,{172:1352,187:1353}),{83:[1,1354]},n(xo,[2,1132],{174:1355}),n(xo,[2,1134],{176:1356}),n(Ml,g2,{187:1353,172:1357}),n(Ml,g2,{187:1353,172:1358}),n(Ml,g2,{187:1353,172:1359}),n(Ml,g2,{187:1353,172:1360}),{2:a,3:790,4:l,5:f,6:u,7:p,8:d,9:b,77:lo,82:co,83:qa,121:la,123:793,124:Bt,125:Dt,126:1361,127:za,131:xa,132:uo,133:ca,137:fo,138:ho,139:po,140:mo,141:go,142:ea,143:yo,144:ua,145:bo,146:js,147:qs,148:vo,149:zs,150:Ha,151:Hs,152:_a,153:815,154:Sa,155:Ea,157:ta,158:ra,159:fa,161:wa,163:Wa,165:Aa,167:825,169:826,171:Ya,173:Ta,175:da,177:ha,178:Ia,179:Oa,180:Xa,181:Ca,182:La,184:Ws,194:Ja,196:Na,266:We,267:qe,304:Da,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:878,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,183:1362,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,279:877,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(p0,[2,1136],{185:1363}),n(Ce,[2,644],{192:[1,1364]}),n(Ce,[2,640],{192:[1,1365]}),n(Ce,[2,633]),{122:1366,141:Pe,329:Re},n(Ce,[2,642],{192:[1,1367]}),n(Ce,[2,637]),n(Ce,[2,638],{121:[1,1368]}),n(ac,[2,74]),{2:a,3:260,4:l,5:f,6:u,7:p,8:d,9:b,80:1369},{44:1370,45:248,83:T,86:76,96:C,193:103,198:B},{79:Bl,84:[1,1371]},n(Co,E),n(Ce,Ds,{369:1374,79:M,137:[1,1373],503:Rs}),n(Q,[2,475]),{133:[1,1376]},{2:a,3:1377,4:l,5:f,6:u,7:p,8:d,9:b},n(Po,[2,1192]),n(Po,[2,1193]),n(Ce,[2,656]),n(P,[2,379],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),n(sl,q3,{123:672,360:684,121:Ur,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:Mr}),n([14,79,84,109,121,124,125,127,132,133,142,145,147,148,149,150,151,163,179,180,188,189,271,273,339,343,344,345,346,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,639,798],wh,{260:120,93:1097,171:R1,177:Zl,178:Ko}),n(ao,[2,726]),n(ao,[2,728]),n(Ce,[2,692]),n(Ce,[2,694],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1378,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:1169,4:l,5:f,6:u,7:p,8:d,9:b,83:Hc,140:vh,470:1379},n(Ge,[2,701]),n(Ge,[2,702]),n(Ge,[2,703]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1380,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1381,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{123:1167,124:Bt,125:Dt,133:[1,1382]},n(Kt,[2,800]),n(sr,[2,161],{79:Wc}),n(sr,[2,162],{79:Wc}),n(sr,[2,163],{79:Wc}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:878,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,279:1383,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:1384,4:l,5:f,6:u,7:p,8:d,9:b,122:1386,140:[1,1385],141:Pe,329:Re},n(lc,[2,282]),n(lc,[2,284]),n(lc,[2,286]),n(d1,[2,173]),n(d1,[2,1145]),{84:[1,1387]},n(D3,[2,803]),n($i,[2,277],{272:1388,273:[1,1389]}),{274:1390,275:[2,1172],800:[1,1391]},n(a2,[2,264],{79:Ct}),n(ke,[2,265]),n(ke,[2,269],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,268:[1,1393],269:[1,1394],344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),n(qc,Bf,{89:1395,192:Ff}),n(Io,Dl),{2:a,3:1396,4:l,5:f,6:u,7:p,8:d,9:b},{2:a,3:1397,4:l,5:f,6:u,7:p,8:d,9:b},{2:a,3:1399,4:l,5:f,6:u,7:p,8:d,9:b,421:1398},{2:a,3:1399,4:l,5:f,6:u,7:p,8:d,9:b,421:1400},{2:a,3:1401,4:l,5:f,6:u,7:p,8:d,9:b},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1402,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:1403,4:l,5:f,6:u,7:p,8:d,9:b},{79:S,84:[1,1404]},n(oa,[2,368]),{83:[1,1405]},n(oa,[2,369]),n(oa,[2,370]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1406,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1407,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1408,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1409,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1410,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(Oo,[2,535]),n(Ce,ft,{444:1411,82:Pt,83:[1,1412]}),n(Ce,ft,{444:1414,82:Pt}),{83:[1,1415]},{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:1416},n(Kt,[2,776]),n(Kt,[2,778]),n(Kt,[2,1223]),{152:va,154:f1,469:1417},n(Ut,[2,1224],{456:209,518:1418,153:1419,154:ms,457:me,461:he}),{82:kl,148:[2,1228],520:1420,522:1421},n([14,79,82,84,141,148,154,161,339,343,457,461,639,798],f2,{529:922,532:923,146:F1}),n(Kt,[2,781]),n(Kt,u2),{79:Pc,84:[1,1422]},n(p1,[2,1242],{531:1423,536:1424,161:h1}),n(d2,[2,1241]),n(p1,[2,790]),n(p1,[2,1247]),n(Ce,[2,521],{83:[1,1425]}),{82:[1,1427],83:[1,1426]},{109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,157:[1,1428],163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},n(li,Qt,{86:76,193:103,45:248,507:1429,44:1432,83:T,96:C,155:rr,198:B,509:Zt}),n(xh,[2,1217]),n(Vc,[2,768]),{250:[1,1433]},n(vr,[2,814]),n(vr,[2,815]),n(vr,[2,816]),n(h2,Qp,{548:1434,105:ph,552:mh,553:gh,554:Zp}),n(h2,[2,813]),n(Ce,[2,327]),n(Ce,[2,328]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1435,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(ao,[2,734],{133:[1,1436]}),n(Au,[2,579]),{140:[1,1438],425:1437,427:[1,1439]},n(Au,[2,9]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1303,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,380:1440,456:209,457:me,461:he},n(Ce,Ds,{123:672,360:684,369:1441,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn,503:Rs}),n(li,[2,763],{79:Wc,207:[1,1442]}),n(Ce,[2,627]),n(Ce,[2,628]),{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:1443},n(Ce,[2,712]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1444,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1445,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{84:[1,1446],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{84:[1,1447],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,44:1448,45:248,61:180,83:B1,86:76,96:C,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1449,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,193:103,198:B,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{84:[1,1450]},{79:S,84:[1,1451]},n(hn,[2,450]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1452,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,44:1453,45:248,61:180,83:B1,84:[1,1455],86:76,96:C,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1454,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,193:103,198:B,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(hn,[2,453]),n(hn,[2,455]),n(hn,Pf,{303:1456,307:Uf}),{84:[1,1457],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{84:[1,1458],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{9:Gt,84:Yt,306:1459},{128:[1,1461]},n(Ys,cc,{123:672,360:684,305:1462,109:Dr,121:Ur,124:Bt,125:Dt,127:$s,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),{2:a,3:1463,4:l,5:f,6:u,7:p,8:d,9:b,189:[1,1464]},n(Tu,[2,298]),n(oo,[2,657]),n(hn,[2,387]),{339:[1,1465]},n(hn,[2,394]),{109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,339:[2,398],344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1466,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{4:nl,11:950,300:1467,424:949,426:Gc},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1468,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(oo,[2,680]),n(j3,[2,690]),n(e1,[2,675]),n(Tu,Uo),n(oo,[2,677]),n(Cl,[2,682]),n(Cl,[2,684]),n(Cl,[2,687]),n(Cl,[2,685]),n(Cl,[2,688]),n(Cl,[2,686]),n(Cl,[2,689]),n(li,Ds,{369:1470,79:t1,503:Rs}),n(li,[2,482]),{83:[1,1471],152:ve,153:1472,154:ms,161:Ee,190:pe,210:1473,335:we,456:209,457:me,461:he},n(li,Ds,{369:1474,503:Rs}),{79:Bl,84:[1,1475]},{79:xe,84:[1,1476]},n([79,84,109,121,124,125,132,133,142,145,147,148,149,150,151,163,179,180,188,189,344,345,346,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366],E),n(Ve,[2,510],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),n(li,[2,496]),n(li,Ds,{369:1478,79:M,503:Rs}),{83:$1,152:ve,153:1066,154:ms,161:Ee,190:pe,210:1067,335:we,376:1479,456:209,457:me,461:he},n(li,Ds,{369:1480,79:t1,503:Rs}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,44:247,45:248,61:180,83:B1,85:1481,86:76,96:C,104:1303,120:1302,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,193:103,198:B,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,380:1301,456:209,457:me,461:he},n(li,Ds,{369:1482,503:Rs}),{44:1485,45:248,83:zt,86:76,96:C,152:ve,153:1066,154:ms,158:Ll,161:Ee,190:pe,193:103,198:B,210:1067,335:we,375:1483,376:1484,379:Nl,456:209,457:me,461:he},n(li,Ds,{369:1487,79:t1,503:Rs}),n(li,[2,492]),n(Ce,Ds,{369:1488,497:1489,498:1490,341:Ah,503:Rs}),n(or,[2,746]),n(or,[2,747]),{163:[1,1492],499:[1,1491]},{109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,341:[2,743],344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{84:[1,1493]},{44:1494,45:248,83:T,86:76,96:C,193:103,198:B},n(Ri,[2,193]),n(Ri,[2,1147]),n(Ce,[2,612]),n(Ft,Fr,{91:1495,137:Rr}),n(P1,[2,1097]),{83:[1,1497]},{83:[1,1498]},n(qc,[2,182],{213:1499,232:1501,214:1502,233:1503,241:1506,79:Sn,215:Nt,217:Lt,242:Hr,243:gr,244:jt,245:_r,246:Sr,247:Hn,248:Rn,249:Cr}),{2:a,3:240,4:l,5:f,6:u,7:p,8:d,9:b,44:765,45:248,83:u0,86:76,96:C,141:$o,152:ve,153:233,154:it,161:Ee,165:Be,190:pe,193:103,198:B,208:234,209:236,210:235,211:237,212:1515,218:1329,227:238,229:Al,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,335:we,456:209,457:me,461:he},n(Co,[2,191]),{2:a,3:1096,4:l,5:f,6:u,7:p,8:d,9:b,119:1516,120:1094,121:$f,229:Es,281:bs},n(Vf,[2,100]),n($i,Ns,{95:1517,271:rl,273:Zo}),n($i,[2,160],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),{84:[1,1518]},{79:S,84:[2,1121]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,84:[2,1114],104:1191,120:164,122:168,129:1519,130:1520,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,263:1190,266:We,267:qe,268:[1,1521],280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(Yn,[2,111]),n(xo,[2,1117],{162:1101,188:Ra,189:ka,190:Ma}),{2:a,3:790,4:l,5:f,6:u,7:p,8:d,9:b,77:lo,82:co,83:qa,84:[1,1522],121:la,123:793,124:Bt,125:Dt,126:1523,127:za,131:xa,132:uo,133:ca,137:fo,138:ho,139:po,140:mo,141:go,142:ea,143:yo,144:ua,145:bo,146:js,147:qs,148:vo,149:zs,150:Ha,151:Hs,152:_a,153:815,154:Sa,155:Ea,157:ta,158:ra,159:fa,161:wa,163:Wa,165:Aa,167:825,169:826,171:Ya,173:Ta,175:da,177:ha,178:Ia,179:Oa,180:Xa,181:Ca,182:La,184:Ws,194:Ja,196:Na,266:We,267:qe,304:Da,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,456:209,457:me,461:he},n(xo,[2,1118],{162:1101,188:Ra,189:ka,190:Ma}),{84:[1,1524],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{84:[1,1525],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{84:[1,1526]},n(Yn,[2,133]),{79:M,84:[1,1527]},n(Yn,[2,135]),{79:S,84:[1,1528]},{2:a,3:790,4:l,5:f,6:u,7:p,8:d,9:b,77:lo,82:co,83:qa,84:[1,1529],121:la,123:793,124:Bt,125:Dt,126:1530,127:za,131:xa,132:uo,133:ca,137:fo,138:ho,139:po,140:mo,141:go,142:ea,143:yo,144:ua,145:bo,146:js,147:qs,148:vo,149:zs,150:Ha,151:Hs,152:_a,153:815,154:Sa,155:Ea,157:ta,158:ra,159:fa,161:wa,163:Wa,165:Aa,167:825,169:826,171:Ya,173:Ta,175:da,177:ha,178:Ia,179:Oa,180:Xa,181:Ca,182:La,184:Ws,194:Ja,196:Na,266:We,267:qe,304:Da,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,456:209,457:me,461:he},{2:a,3:790,4:l,5:f,6:u,7:p,8:d,9:b,77:lo,82:co,83:qa,84:[1,1531],121:la,123:793,124:Bt,125:Dt,126:1532,127:za,131:xa,132:uo,133:ca,137:fo,138:ho,139:po,140:mo,141:go,142:ea,143:yo,144:ua,145:bo,146:js,147:qs,148:vo,149:zs,150:Ha,151:Hs,152:_a,153:815,154:Sa,155:Ea,157:ta,158:ra,159:fa,161:wa,163:Wa,165:Aa,167:825,169:826,171:Ya,173:Ta,175:da,177:ha,178:Ia,179:Oa,180:Xa,181:Ca,182:La,184:Ws,194:Ja,196:Na,266:We,267:qe,304:Da,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,456:209,457:me,461:he},{2:a,3:790,4:l,5:f,6:u,7:p,8:d,9:b,77:lo,82:co,83:qa,84:[1,1533],121:la,123:793,124:Bt,125:Dt,126:1534,127:za,131:xa,132:uo,133:ca,137:fo,138:ho,139:po,140:mo,141:go,142:ea,143:yo,144:ua,145:bo,146:js,147:qs,148:vo,149:zs,150:Ha,151:Hs,152:_a,153:815,154:Sa,155:Ea,157:ta,158:ra,159:fa,161:wa,163:Wa,165:Aa,167:825,169:826,171:Ya,173:Ta,175:da,177:ha,178:Ia,179:Oa,180:Xa,181:Ca,182:La,184:Ws,194:Ja,196:Na,266:We,267:qe,304:Da,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,456:209,457:me,461:he},{2:a,3:790,4:l,5:f,6:u,7:p,8:d,9:b,77:lo,82:co,83:qa,84:[1,1535],121:la,123:793,124:Bt,125:Dt,126:1536,127:za,131:xa,132:uo,133:ca,137:fo,138:ho,139:po,140:mo,141:go,142:ea,143:yo,144:ua,145:bo,146:js,147:qs,148:vo,149:zs,150:Ha,151:Hs,152:_a,153:815,154:Sa,155:Ea,157:ta,158:ra,159:fa,161:wa,163:Wa,165:Aa,167:825,169:826,171:Ya,173:Ta,175:da,177:ha,178:Ia,179:Oa,180:Xa,181:Ca,182:La,184:Ws,194:Ja,196:Na,266:We,267:qe,304:Da,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,456:209,457:me,461:he},{79:Nr,84:[1,1537]},n(Ve,[2,156],{456:209,3:790,123:793,153:815,167:825,169:826,126:1539,2:a,4:l,5:f,6:u,7:p,8:d,9:b,77:lo,82:co,83:qa,121:la,124:Bt,125:Dt,127:za,131:xa,132:uo,133:ca,137:fo,138:ho,139:po,140:mo,141:go,142:ea,143:yo,144:ua,145:bo,146:js,147:qs,148:vo,149:zs,150:Ha,151:Hs,152:_a,154:Sa,155:Ea,157:ta,158:ra,159:fa,161:wa,163:Wa,165:Aa,171:Ya,173:Ta,175:da,177:ha,178:Ia,179:Oa,180:Xa,181:Ca,182:La,184:Ws,194:Ja,196:Na,266:We,267:qe,304:Da,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,457:me,461:he}),n(Ml,g2,{187:1353,172:1540}),{2:a,3:790,4:l,5:f,6:u,7:p,8:d,9:b,77:lo,82:co,83:qa,84:[1,1541],121:la,123:793,124:Bt,125:Dt,126:1542,127:za,131:xa,132:uo,133:ca,137:fo,138:ho,139:po,140:mo,141:go,142:ea,143:yo,144:ua,145:bo,146:js,147:qs,148:vo,149:zs,150:Ha,151:Hs,152:_a,153:815,154:Sa,155:Ea,157:ta,158:ra,159:fa,161:wa,163:Wa,165:Aa,167:825,169:826,171:Ya,173:Ta,175:da,177:ha,178:Ia,179:Oa,180:Xa,181:Ca,182:La,184:Ws,194:Ja,196:Na,266:We,267:qe,304:Da,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,456:209,457:me,461:he},{2:a,3:790,4:l,5:f,6:u,7:p,8:d,9:b,77:lo,82:co,83:qa,84:[1,1543],121:la,123:793,124:Bt,125:Dt,126:1544,127:za,131:xa,132:uo,133:ca,137:fo,138:ho,139:po,140:mo,141:go,142:ea,143:yo,144:ua,145:bo,146:js,147:qs,148:vo,149:zs,150:Ha,151:Hs,152:_a,153:815,154:Sa,155:Ea,157:ta,158:ra,159:fa,161:wa,163:Wa,165:Aa,167:825,169:826,171:Ya,173:Ta,175:da,177:ha,178:Ia,179:Oa,180:Xa,181:Ca,182:La,184:Ws,194:Ja,196:Na,266:We,267:qe,304:Da,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,456:209,457:me,461:he},{79:Nr,84:[1,1545]},{79:Nr,84:[1,1546]},{79:Nr,84:[1,1547]},{79:Nr,84:[1,1548]},{84:[1,1549],162:1101,188:Ra,189:ka,190:Ma},{79:Wc,84:[1,1550]},{2:a,3:790,4:l,5:f,6:u,7:p,8:d,9:b,77:lo,79:[1,1551],82:co,83:qa,121:la,123:793,124:Bt,125:Dt,126:1552,127:za,131:xa,132:uo,133:ca,137:fo,138:ho,139:po,140:mo,141:go,142:ea,143:yo,144:ua,145:bo,146:js,147:qs,148:vo,149:zs,150:Ha,151:Hs,152:_a,153:815,154:Sa,155:Ea,157:ta,158:ra,159:fa,161:wa,163:Wa,165:Aa,167:825,169:826,171:Ya,173:Ta,175:da,177:ha,178:Ia,179:Oa,180:Xa,181:Ca,182:La,184:Ws,194:Ja,196:Na,266:We,267:qe,304:Da,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,456:209,457:me,461:he},{2:a,3:1553,4:l,5:f,6:u,7:p,8:d,9:b},{2:a,3:1554,4:l,5:f,6:u,7:p,8:d,9:b},n(Ce,[2,635]),{2:a,3:1555,4:l,5:f,6:u,7:p,8:d,9:b},{122:1556,141:Pe,329:Re},n(ac,[2,75]),{84:[1,1557]},{82:[1,1558]},{2:a,3:1096,4:l,5:f,6:u,7:p,8:d,9:b,120:1559,229:Es,281:bs},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1560,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(Ce,[2,474]),{2:a,3:1096,4:l,5:f,6:u,7:p,8:d,9:b,120:1154,152:zc,154:Rl,229:Es,281:bs,370:1561,371:1155},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1562,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{133:[1,1563]},n(Ce,[2,695],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),n(Ge,[2,700]),{84:[1,1564],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},n(Ce,[2,696],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1565,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(lc,[2,279]),n(lc,[2,281]),n(lc,[2,283]),n(lc,[2,285]),n(d1,[2,174]),n($i,[2,275]),{140:De,205:1566},{275:[1,1567]},{275:[2,1173]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1191,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,263:1568,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(ke,[2,270],{264:1569,265:[1,1570]}),{270:[1,1571]},n(P1,[2,1104],{101:1572,102:1573,103:d0,108:h0}),n(Ce,[2,607]),{157:[1,1574]},n(Ce,[2,608]),n(Kt,[2,574],{424:949,11:950,300:1575,4:nl,423:[1,1576],426:Gc}),n(Ce,[2,609]),n(Ce,[2,611]),{79:S,84:[1,1577]},n(Ce,[2,615]),n(oa,Pf,{303:1578,307:Uf}),n(Nn,[2,1182],{308:1579,310:1580,311:[1,1581]}),{79:[1,1582],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{79:[1,1583],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{79:[1,1584],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{79:[1,1585],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{79:[1,1586],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},n(Ce,[2,619]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1587,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:1588,4:l,5:f,6:u,7:p,8:d,9:b},n(Ce,[2,621]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1191,120:164,122:168,129:1589,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,263:1190,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{83:[1,1590]},{2:a,3:1591,4:l,5:f,6:u,7:p,8:d,9:b},{82:kl,148:[2,1226],519:1592,522:1593},n(Ut,[2,1225]),{148:[1,1594]},{148:[2,1229]},n(Kt,[2,782]),n(p1,[2,789]),n(p1,[2,1243]),{2:a,3:1399,4:l,5:f,6:u,7:p,8:d,9:b,82:[1,1597],386:1595,393:1596,421:1598},{2:a,3:1096,4:l,5:f,6:u,7:p,8:d,9:b,85:1599,120:1151,229:Es,281:bs},{44:1600,45:248,83:T,86:76,96:C,193:103,198:B},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1601,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(li,[2,767]),{2:a,3:1096,4:l,5:f,6:u,7:p,8:d,9:b,120:1154,152:zc,154:Rl,156:1602,229:Es,281:bs,370:1153,371:1155},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1603,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(li,[2,772]),{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:1604},{368:_h,372:Sh,373:o0,549:1605},n(ao,[2,735],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1606,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{79:[1,1607],84:[1,1608]},n(Ve,[2,581]),n(Ve,[2,582]),{79:xe,84:[1,1609]},n(Ce,[2,479]),{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,152:va,154:f1,208:1611,469:1610},n(ao,[2,603]),n(m1,[2,404],{123:672,360:684,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,345:Xt,349:Jt,350:br,351:Tr,352:Ir}),n(m1,[2,406],{123:672,360:684,124:Bt,125:Dt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,345:Xt,349:Jt,350:br,351:Tr,352:Ir}),n(hn,[2,420]),n(hn,[2,424]),{84:[1,1612]},{79:S,84:[1,1613]},n(hn,[2,446]),n(hn,[2,448]),{84:[1,1614],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{84:[1,1615]},{79:S,84:[1,1616]},n(hn,[2,451]),n(hn,[2,343]),n(hn,Pf,{303:1617,307:Uf}),n(hn,Pf,{303:1618,307:Uf}),{84:[1,1619]},{141:[1,1620]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1191,120:164,122:168,129:1621,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,263:1190,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{9:Gt,84:Yt,306:1622},n(Tu,[2,293]),n(hn,[2,288]),n(hn,[2,393]),n(bh,[2,397],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),{79:[1,1624],84:[1,1623]},{79:[1,1626],84:[1,1625],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{2:a,3:1463,4:l,5:f,6:u,7:p,8:d,9:b},n(li,[2,481]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1303,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,380:1627,456:209,457:me,461:he},n(m2,[2,508]),n(m2,[2,509]),n(li,[2,493]),{44:1630,45:248,83:zt,86:76,96:C,152:ve,153:1066,154:ms,158:Ll,161:Ee,190:pe,193:103,198:B,210:1067,335:we,375:1628,376:1629,379:Nl,456:209,457:me,461:he},n(m2,[2,504]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1631,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(li,[2,499]),n(li,Ds,{369:1632,79:t1,503:Rs}),n(li,[2,484]),{79:Bl,84:[1,1633]},n(li,[2,487]),{83:$1,152:ve,153:1066,154:ms,161:Ee,190:pe,210:1067,335:we,376:1634,456:209,457:me,461:he},n(li,Ds,{369:1635,79:t1,503:Rs}),n(li,Ds,{369:1636,503:Rs}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,44:247,45:248,61:180,83:B1,86:76,96:C,104:1303,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,193:103,198:B,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,380:1301,456:209,457:me,461:he},n(li,[2,491]),n(Ce,[2,738]),n(or,[2,744]),n(or,[2,745]),{179:[1,1638],342:[1,1637]},{499:[1,1639]},{250:[2,742]},{84:[1,1640]},n(kn,_i,{92:1641,252:vs}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1643,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1644,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:1645,4:l,5:f,6:u,7:p,8:d,9:b},n(qc,[2,183],{233:1503,241:1506,232:1647,214:1648,79:[1,1646],215:Nt,217:Lt,242:Hr,243:gr,244:jt,245:_r,246:Sr,247:Hn,248:Rn,249:Cr}),{2:a,3:240,4:l,5:f,6:u,7:p,8:d,9:b,83:kc,141:$o,152:ve,153:233,154:it,161:Ee,165:Be,190:pe,208:234,209:236,210:235,211:237,218:1649,227:238,229:Al,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,335:we,456:209,457:me,461:he},n(Co,[2,211]),n(Co,[2,212]),{2:a,3:240,4:l,5:f,6:u,7:p,8:d,9:b,83:[1,1654],152:ve,153:1652,154:it,161:Ee,165:Be,190:pe,208:1651,209:1655,210:1653,211:1656,234:1650,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,335:we,456:209,457:me,461:he},{216:[1,1657],243:Ss},{216:[1,1659],243:wi},n(Ji,[2,220]),{215:[1,1663],217:[1,1662],241:1661,243:gr,244:jt,245:_r,246:Sr,247:Hn,248:Rn,249:Cr},n(Ji,[2,222]),{243:[1,1664]},{217:[1,1666],243:[1,1665]},{217:[1,1668],243:[1,1667]},{217:[1,1669]},{243:[1,1670]},{243:[1,1671]},{79:Sn,213:1672,214:1502,215:Nt,217:Lt,232:1501,233:1503,241:1506,242:Hr,243:gr,244:jt,245:_r,246:Sr,247:Hn,248:Rn,249:Cr},n(Vf,[2,97]),n($i,[2,81]),n(Yn,[2,113]),{79:Ct,84:[1,1673]},{84:[1,1674]},{84:[2,1115]},n(Yn,[2,112]),n(xo,[2,1119],{162:1101,188:Ra,189:ka,190:Ma}),n(Yn,[2,114]),n(Yn,[2,115]),n(Yn,[2,116]),n(Yn,[2,134]),n(Yn,[2,137]),n(Yn,[2,140]),n(xo,[2,1123],{162:1101,188:Ra,189:ka,190:Ma}),n(Yn,[2,141]),n(xo,[2,1125],{162:1101,188:Ra,189:ka,190:Ma}),n(Yn,[2,142]),n(xo,[2,1127],{162:1101,188:Ra,189:ka,190:Ma}),n(Yn,[2,143]),n(xo,[2,1131],{162:1101,188:Ra,189:ka,190:Ma}),n(Yn,[2,144]),n(Ml,[2,1138],{186:1675}),n(Ml,[2,1141],{162:1101,188:Ra,189:ka,190:Ma}),{79:Nr,84:[1,1676]},n(Yn,[2,146]),n(xo,[2,1133],{162:1101,188:Ra,189:ka,190:Ma}),n(Yn,[2,147]),n(xo,[2,1135],{162:1101,188:Ra,189:ka,190:Ma}),n(Yn,[2,148]),n(Yn,[2,149]),n(Yn,[2,150]),n(Yn,[2,151]),n(Yn,[2,152]),n(Yn,[2,153]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1677,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(p0,[2,1137],{162:1101,188:Ra,189:ka,190:Ma}),n(Ce,[2,645]),n(Ce,[2,641]),n(Ce,[2,643]),n(Ce,[2,639]),n(ac,[2,78]),{83:[1,1678]},n(Co,[2,519]),n(Ce,Ds,{123:672,360:684,369:1679,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn,503:Rs}),n(Q,[2,476]),n(Q,[2,477],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1680,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(Ge,[2,704]),n(Ce,[2,697],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),n($i,[2,278]),{140:[2,1174],276:1681,681:[1,1682]},n(ke,[2,266]),n(ke,[2,271]),{266:[1,1683],267:[1,1684]},n(ke,[2,272],{268:[1,1685]}),n(Ft,Fr,{91:1686,137:Rr}),n(P1,[2,1105]),{2:a,3:1687,4:l,5:f,6:u,7:p,8:d,9:b},n(Kt,[2,583],{422:1688,428:1689,429:1690,401:1698,163:gs,196:Ps,250:Xs,330:Js,378:pa,391:Ba,403:ws,404:ni,407:Fa,408:Pi}),n(Kt,[2,573]),n(Ce,[2,614],{82:[1,1702]}),n(oa,[2,367]),{84:[2,1184],127:[1,1705],309:1703,312:1704},n(Nn,[2,1183]),{128:[1,1706]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1707,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1708,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1709,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1710,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1711,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{79:S,84:[1,1712]},n(Ce,[2,623]),{79:Ct,84:[1,1713]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1191,120:164,122:168,129:1714,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,263:1190,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n([14,79,84,148,339,343,639,798],[2,786]),{148:[1,1715]},{148:[2,1227]},{2:a,3:1222,4:l,5:f,6:u,7:p,8:d,9:b,141:To,146:F1,152:va,154:f1,161:h1,469:632,514:1224,517:1716,521:629,532:626,536:628},{84:[1,1717]},{79:[1,1718],84:[2,537]},{44:1719,45:248,83:T,86:76,96:C,193:103,198:B},n(Ve,[2,570]),{79:Bl,84:[1,1720]},n(Ce,[2,1210],{449:1721,450:1722,77:Ln}),n(li,Qt,{86:76,193:103,45:248,123:672,360:684,44:1432,507:1724,83:T,96:C,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,155:rr,163:pn,179:vn,180:_n,188:dr,189:ir,198:B,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn,509:Zt}),n(li,[2,770],{79:M}),n(li,[2,771],{79:S}),n([14,58,77,83,96,133,155,165,198,294,295,322,339,343,368,372,373,433,437,438,441,443,445,446,454,455,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,545,546,555,639,798],[2,1258],{550:1725,3:1726,2:a,4:l,5:f,6:u,7:p,8:d,9:b,82:[1,1727]}),n(gi,[2,1260],{551:1728,82:[1,1729]}),n(ao,[2,736],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),{140:[1,1730]},n(Au,[2,576]),n(Au,[2,578]),{2:a,3:1731,4:l,5:f,6:u,7:p,8:d,9:b},n(li,[2,765],{83:[1,1732]}),n(hn,[2,436]),n(hn,[2,437]),n(hn,[2,463]),n(hn,[2,447]),n(hn,[2,449]),n(hn,[2,344]),n(hn,[2,345]),n(hn,[2,346]),{84:[2,355]},n(Ys,[2,353],{79:Ct}),{84:[1,1733]},n(hn,[2,331]),{140:[1,1734]},n(hn,[2,333]),{140:[1,1735]},{79:xe,84:[1,1736]},{83:$1,152:ve,153:1066,154:ms,161:Ee,190:pe,210:1067,335:we,376:1737,456:209,457:me,461:he},n(li,Ds,{369:1738,79:t1,503:Rs}),n(li,Ds,{369:1739,503:Rs}),n(Ve,[2,511],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),n(li,[2,483]),{44:1742,45:248,83:zt,86:76,96:C,152:ve,153:1066,154:ms,158:Ll,161:Ee,190:pe,193:103,198:B,210:1067,335:we,375:1740,376:1741,379:Nl,456:209,457:me,461:he},n(li,Ds,{369:1743,79:t1,503:Rs}),n(li,[2,490]),n(li,[2,497]),{368:Ni,372:As,500:1744},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1747,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{128:[1,1749],179:[1,1750],342:[1,1748]},n([79,215,217,242,243,244,245,246,247,248,249],f0,{260:120,3:771,93:1097,219:1320,230:1321,2:a,4:l,5:f,6:u,7:p,8:d,9:b,82:Qo,84:Dl,127:Dl,271:Dl,273:Dl,171:R1,177:Zl,178:Ko}),n(Io,Rc,{260:120,93:1751,171:R1,177:Zl,178:Ko}),{128:[1,1752]},n(Ft,[2,238],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),{105:[1,1753],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{105:[1,1754]},{2:a,3:240,4:l,5:f,6:u,7:p,8:d,9:b,83:kc,141:$o,152:ve,153:233,154:it,161:Ee,165:Be,190:pe,208:234,209:236,210:235,211:237,212:1755,218:1329,227:238,229:Al,293:zi,322:Fe,323:$e,324:Le,325:ye,326:Ne,335:we,456:209,457:me,461:he},n(Co,[2,209]),n(Co,[2,210]),n(Co,[2,192]),n(Co,[2,236],{235:1756,250:[1,1757],251:[1,1758]}),n(Ri,[2,1162],{3:771,236:1759,230:1760,2:a,4:l,5:f,6:u,7:p,8:d,9:b,82:Qo}),n(c2,[2,1164],{237:1761,82:[1,1762]}),{2:a,3:771,4:l,5:f,6:u,7:p,8:d,9:b,82:Qo,230:1763},{44:1764,45:248,83:T,86:76,96:C,193:103,198:B},n(Ri,[2,1168],{3:771,239:1765,230:1766,2:a,4:l,5:f,6:u,7:p,8:d,9:b,82:Qo}),n(Ri,[2,1170],{3:771,240:1767,230:1768,2:a,4:l,5:f,6:u,7:p,8:d,9:b,82:Qo}),{83:[1,1769]},n(Ji,[2,232]),{83:[1,1770]},n(Ji,[2,228]),n(Ji,[2,221]),{243:wi},{243:Ss},n(Ji,[2,223]),n(Ji,[2,224]),{243:[1,1771]},n(Ji,[2,226]),{243:[1,1772]},{243:[1,1773]},n(Ji,[2,230]),n(Ji,[2,231]),{84:[1,1774],214:1648,215:Nt,217:Lt,232:1647,233:1503,241:1506,242:Hr,243:gr,244:jt,245:_r,246:Sr,247:Hn,248:Rn,249:Cr},n(Yn,[2,104]),n(Yn,[2,105]),n(Ve,[2,155],{456:209,3:790,123:793,153:815,167:825,169:826,126:1775,2:a,4:l,5:f,6:u,7:p,8:d,9:b,77:lo,82:co,83:qa,121:la,124:Bt,125:Dt,127:za,131:xa,132:uo,133:ca,137:fo,138:ho,139:po,140:mo,141:go,142:ea,143:yo,144:ua,145:bo,146:js,147:qs,148:vo,149:zs,150:Ha,151:Hs,152:_a,154:Sa,155:Ea,157:ta,158:ra,159:fa,161:wa,163:Wa,165:Aa,171:Ya,173:Ta,175:da,177:ha,178:Ia,179:Oa,180:Xa,181:Ca,182:La,184:Ws,194:Ja,196:Na,266:We,267:qe,304:Da,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,457:me,461:he}),n(Yn,[2,145]),{79:S,84:[1,1776]},{44:1777,45:248,83:T,86:76,96:C,193:103,198:B},n(Ce,[2,473]),n(Q,[2,478],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),{140:De,205:1778},{140:[2,1175]},n(ke,[2,267]),n(ke,[2,268]),n(ke,[2,273]),n(kn,_i,{92:1779,252:vs}),n(Ce,[2,610]),n(Kt,[2,572]),n(Kt,[2,584],{401:1698,429:1780,163:gs,196:Ps,250:Xs,330:Js,378:pa,391:Ba,403:ws,404:ni,407:Fa,408:Pi}),n(Li,[2,586]),{6:[1,1781]},{6:[1,1782]},{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:1783},n(Li,[2,592],{83:[1,1784]}),{2:a,3:127,4:l,5:f,6:u,7:p,8:d,9:b,83:[1,1786],122:277,140:De,141:Pe,152:ve,161:Ee,165:Be,190:pe,205:276,209:1787,210:280,284:278,285:279,292:gu,293:Bc,302:1785,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,335:we},n(Li,[2,596]),{330:[1,1788]},n(Li,[2,598]),n(Li,[2,599]),{368:[1,1789]},{83:[1,1790]},{2:a,3:1791,4:l,5:f,6:u,7:p,8:d,9:b},{84:[1,1792]},{84:[2,1185]},{128:[1,1793]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1799,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,253:1794,255:Vo,256:U1,257:1795,258:z,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{84:[1,1800],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{84:[1,1801],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{84:[1,1802],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{84:[1,1803],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{84:[1,1804],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},n(Ce,ft,{444:1805,82:Pt}),n(Ce,[2,629]),{79:Ct,84:[1,1806]},{2:a,3:1222,4:l,5:f,6:u,7:p,8:d,9:b,141:To,146:F1,152:va,154:f1,161:h1,469:632,514:1224,517:1807,521:629,532:626,536:628},n(Kt,[2,780]),n(Ce,[2,524],{387:1808,389:1809,390:1810,4:tt,269:Me,378:Wr,391:yi}),n(G,D,{3:1399,394:1815,421:1816,395:1817,396:1818,2:a,4:l,5:f,6:u,7:p,8:d,9:b,402:ie}),{84:[2,538]},{82:[1,1820]},n(Ce,[2,647]),n(Ce,[2,1211]),{403:[1,1822],451:[1,1821]},n(li,[2,773]),n(Ce,c,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,16:1823,2:a,4:l,5:f,6:u,7:p,8:d,9:b,58:R,77:L,83:T,96:C,133:te,155:W,165:Y,198:B,294:N,295:Ae,322:je,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Rt,455:Qr,466:$n,472:ki,474:Di,475:Wn,477:Pn,478:Jn,479:ls,480:Ls,481:On,482:ri,483:hs,487:ps,488:wo,491:Jo,492:Ao,545:Bo,546:ba,555:Fo}),n(Ce,[2,807]),n(gi,[2,1259]),n(Ce,c,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,16:1824,2:a,4:l,5:f,6:u,7:p,8:d,9:b,58:R,77:L,83:T,96:C,133:te,155:W,165:Y,198:B,294:N,295:Ae,322:je,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Rt,455:Qr,466:$n,472:ki,474:Di,475:Wn,477:Pn,478:Jn,479:ls,480:Ls,481:On,482:ri,483:hs,487:ps,488:wo,491:Jo,492:Ao,545:Bo,546:ba,555:Fo}),n(gi,[2,1261]),{84:[1,1825]},n(li,[2,764]),{2:a,3:1096,4:l,5:f,6:u,7:p,8:d,9:b,85:1826,120:1151,229:Es,281:bs},n(hn,[2,347]),{84:[1,1827]},{84:[1,1828]},n(m2,[2,507]),n(li,Ds,{369:1829,79:t1,503:Rs}),n(li,[2,495]),n(li,[2,498]),{83:$1,152:ve,153:1066,154:ms,161:Ee,190:pe,210:1067,335:we,376:1830,456:209,457:me,461:he},n(li,Ds,{369:1831,79:t1,503:Rs}),n(li,Ds,{369:1832,503:Rs}),n(li,[2,489]),n(or,[2,748]),n(or,[2,750]),{155:[1,1833]},{109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,342:[1,1834],344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{373:ge,501:1835},{454:[1,1838],502:[1,1837]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1839,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(a2,Af,{94:1840,127:Tf}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1799,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,253:1841,255:Vo,256:U1,257:1795,258:z,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:1842,4:l,5:f,6:u,7:p,8:d,9:b},{2:a,3:1843,4:l,5:f,6:u,7:p,8:d,9:b},n(qc,[2,184],{79:Sn}),n(Co,[2,213]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1844,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:1096,4:l,5:f,6:u,7:p,8:d,9:b,83:[1,1846],85:1845,120:1151,229:Es,281:bs},n(Ri,[2,214]),n(Ri,[2,1163]),n(Ri,[2,1166],{238:1847,3:1848,2:a,4:l,5:f,6:u,7:p,8:d,9:b}),n(c2,[2,1165]),n(Ri,[2,216]),{84:[1,1849]},n(Ri,[2,218]),n(Ri,[2,1169]),n(Ri,[2,219]),n(Ri,[2,1171]),{44:1850,45:248,83:T,86:76,96:C,193:103,198:B},{44:1851,45:248,83:T,86:76,96:C,193:103,198:B},n(Ji,[2,225]),n(Ji,[2,227]),n(Ji,[2,229]),n(qc,[2,185]),n(Ml,[2,1139],{162:1101,188:Ra,189:ka,190:Ma}),n(Yn,[2,154]),{84:[1,1852]},n(Se,[2,1176],{277:1853,800:[1,1854]}),n(Io,Rc,{260:120,93:1855,171:R1,177:Zl,178:Ko}),n(Li,[2,585]),n(Li,[2,588]),{408:[1,1856]},n(Li,[2,1204],{432:1857,430:1858,83:ce}),{140:De,205:1860},n(Li,[2,593]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1861,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(Li,[2,595]),n(Li,[2,597]),{2:a,3:127,4:l,5:f,6:u,7:p,8:d,9:b,83:[1,1863],122:277,140:De,141:Pe,152:ve,161:Ee,165:Be,190:pe,205:276,209:281,210:280,284:278,285:279,292:gu,293:Bc,302:1862,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,335:we},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1864,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(Ce,[2,616]),n(oa,[2,349]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1191,120:164,122:168,129:1865,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,263:1190,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(Nn,[2,350],{79:ae}),n(fe,[2,243]),{155:[1,1867]},{83:[1,1868]},{83:[1,1869]},n(fe,[2,248],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),n(oa,[2,372]),n(oa,[2,373]),n(oa,[2,374]),n(oa,[2,375]),n(oa,[2,376]),n(Ce,[2,620]),n(Ce,[2,630]),n(Kt,[2,779]),n(Ce,[2,520]),n(Ce,[2,525],{390:1870,4:tt,269:Me,378:Wr,391:yi}),n(F,[2,527]),n(F,[2,528]),{133:[1,1871]},{133:[1,1872]},{133:[1,1873]},{79:[1,1874],84:[2,536]},n(Ve,[2,571]),n(Ve,[2,539]),{196:[1,1882],202:[1,1883],397:1875,398:1876,399:1877,400:1878,401:1879,403:ws,404:[1,1880],407:[1,1881]},{2:a,3:1884,4:l,5:f,6:u,7:p,8:d,9:b},{44:1885,45:248,83:T,86:76,96:C,193:103,198:B},{452:[1,1886]},{453:[1,1887]},n(Ce,[2,806]),n(Ce,[2,808]),n(Au,[2,575]),{79:Bl,84:[1,1888]},n(hn,[2,332]),n(hn,[2,334]),n(li,[2,494]),n(li,Ds,{369:1889,79:t1,503:Rs}),n(li,[2,486]),n(li,[2,488]),{2:a,3:1096,4:l,5:f,6:u,7:p,8:d,9:b,120:1154,152:zc,154:Rl,156:1890,229:Es,281:bs,370:1153,371:1155},{368:Ni,372:As,500:1891},n(or,[2,752]),{83:[1,1893],378:[1,1894],379:[1,1892]},{179:[1,1896],342:[1,1895]},{179:[1,1898],342:[1,1897]},{109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,342:[1,1899],344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},n($i,Ns,{95:1900,271:rl,273:Zo}),n([14,84,127,171,177,178,271,273,339,343,503,639,798],ne,{254:1901,77:[1,1902],79:ae,259:j}),{84:[2,1106],106:1904,109:[1,1906],111:1905},{109:[1,1907]},n(Co,[2,233],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),n([14,77,84,103,108,127,137,171,177,178,215,217,242,243,244,245,246,247,248,249,252,271,273,339,343,503,639,798],[2,234],{79:Bl}),{2:a,3:1096,4:l,5:f,6:u,7:p,8:d,9:b,85:1908,120:1151,229:Es,281:bs},n(Ri,[2,215]),n(Ri,[2,1167]),{2:a,3:771,4:l,5:f,6:u,7:p,8:d,9:b,82:Qo,230:1909},{84:[1,1910]},{84:[1,1911]},n(ac,[2,79]),n($i,[2,1178],{278:1912,452:[1,1913]}),n(Se,[2,1177]),n(Io,[2,86]),{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:1914},n(_e,Ie,{410:1915,412:1916,413:1917,250:kt}),n(Li,[2,1205]),{2:a,3:1919,4:l,5:f,6:u,7:p,8:d,9:b},{79:[1,1920]},{84:[1,1921],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},n(Li,[2,600]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1922,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{84:[1,1923],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},{79:Ct,84:[2,351]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1799,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,255:Vo,256:U1,257:1924,258:z,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{83:[1,1925]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1799,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,253:1926,255:Vo,256:U1,257:1795,258:z,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1799,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,253:1927,255:Vo,256:U1,257:1795,258:z,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},n(F,[2,526]),{2:a,3:1928,4:l,5:f,6:u,7:p,8:d,9:b},{140:De,205:1929},{2:a,3:1930,4:l,5:f,6:u,7:p,8:d,9:b},n(G,D,{396:1818,395:1931,402:ie}),n(Kt,[2,541]),n(Kt,[2,542]),n(Kt,[2,543]),n(Kt,[2,544]),n(Kt,[2,545]),{6:[1,1932]},{6:[1,1933]},n([2,4,5,7,8,9,83],[2,1198],{419:1934,6:[1,1935]}),{2:a,3:1936,4:l,5:f,6:u,7:p,8:d,9:b},n(G,[2,547]),n(Ce,[2,1208],{448:1937,450:1938,77:Ln}),n(Ce,[2,648]),n(Ce,[2,649],{402:[1,1939]}),n(li,[2,766]),n(li,[2,485]),n(or,[2,751],{79:M}),n(or,[2,749]),{83:$1,152:ve,153:1066,154:ms,161:Ee,190:pe,210:1067,335:we,376:1940,456:209,457:me,461:he},{2:a,3:1096,4:l,5:f,6:u,7:p,8:d,9:b,85:1941,120:1151,229:Es,281:bs},{379:[1,1942]},{373:ge,501:1943},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1944,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{373:ge,501:1945},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1946,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{373:ge,501:1947},n($i,[2,80]),n(kn,[2,240]),{255:[1,1948],256:[1,1949]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1950,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{84:[1,1951]},{84:[2,1107]},{83:[1,1952]},{83:[1,1953]},{79:Bl,84:[1,1954]},n(Ri,[2,217]),{2:a,3:1955,4:l,5:f,6:u,7:p,8:d,9:b,82:[1,1956]},{2:a,3:1957,4:l,5:f,6:u,7:p,8:d,9:b,82:[1,1958]},n($i,[2,276]),n($i,[2,1179]),n(Li,[2,1202],{431:1959,430:1960,83:ce}),n(Li,[2,590]),n(_e,[2,553],{413:1961,250:[1,1962]}),n(_e,[2,554],{412:1963,250:[1,1964]}),{368:hr,372:pr},{84:[1,1967]},{140:De,205:1968},n(Li,[2,594]),{84:[1,1969],109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},n(Li,[2,548]),n(fe,[2,244]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1799,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,253:1970,255:Vo,256:U1,257:1795,258:z,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{79:ae,84:[1,1971]},{79:ae,84:[1,1972]},n(F,[2,529]),n(F,[2,530]),n(F,[2,531]),n(Ve,[2,540]),{2:a,3:1974,4:l,5:f,6:u,7:p,8:d,9:b,83:[2,1194],405:1973},{83:[1,1975]},{2:a,3:1977,4:l,5:f,6:u,7:p,8:d,9:b,83:[2,1200],420:1976},n([2,4,5,6,7,8,9,83],[2,1199]),{83:[1,1978]},n(Ce,[2,646]),n(Ce,[2,1209]),n(G,D,{396:1818,395:1979,402:ie}),n(or,[2,758],{79:t1}),{79:Bl,84:[1,1980]},n(or,[2,760]),n(or,[2,753]),{109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,342:[1,1981],344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},n(or,[2,756]),{109:Dr,121:Ur,123:672,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,342:[1,1982],344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,360:684,363:dn,364:nn,365:Mr,366:yn},n(or,[2,754]),n(kn,ne,{254:1983,259:j}),n(kn,ne,{254:1984,259:j}),n(kn,[2,250],{123:672,360:684,109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),n(P1,[2,1108],{107:1985,113:1986,3:1988,2:a,4:l,5:f,6:u,7:p,8:d,9:b,82:kr}),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1991,112:1989,114:1990,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:1096,4:l,5:f,6:u,7:p,8:d,9:b,85:1992,120:1151,229:Es,281:bs},n(Co,[2,235]),n(Co,[2,187]),{2:a,3:1993,4:l,5:f,6:u,7:p,8:d,9:b},n(Co,[2,189]),{2:a,3:1994,4:l,5:f,6:u,7:p,8:d,9:b},n(_e,Ie,{412:1916,413:1917,410:1995,250:kt}),n(Li,[2,1203]),n(Li,[2,555]),{368:hr},n(Li,[2,556]),{372:pr},{155:lr,414:1996,415:en,416:qr,417:Jr},{155:lr,414:2001,415:en,416:qr,417:Jr},n(Li,[2,587]),{84:[1,2002]},n(Li,[2,601]),{79:ae,84:[1,2003]},n(fe,[2,246]),n(fe,[2,247]),{83:[1,2004]},{83:[2,1195]},{2:a,3:2006,4:l,5:f,6:u,7:p,8:d,9:b,141:Yr,406:2005},{83:[1,2008]},{83:[2,1201]},{2:a,3:2006,4:l,5:f,6:u,7:p,8:d,9:b,141:Yr,406:2009},n(Ce,[2,650]),{378:[1,2011],379:[1,2010]},{373:ge,501:2012},{368:Ni,372:As,500:2013},n(kn,[2,241]),n(kn,[2,242]),n(P1,[2,87]),n(P1,[2,1109]),{2:a,3:2014,4:l,5:f,6:u,7:p,8:d,9:b},n(P1,[2,91]),{79:[1,2016],84:[1,2015]},n(Ve,[2,93]),n(Ve,[2,94],{123:672,360:684,82:[1,2017],109:Dr,121:Ur,124:Bt,125:Dt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:sn,150:wr,151:Lr,163:pn,179:vn,180:_n,188:dr,189:ir,344:Ar,345:Xt,346:Br,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:an,354:on,355:tn,356:jr,357:rn,358:Zr,359:zr,363:dn,364:nn,365:Mr,366:yn}),{79:Bl,84:[1,2018]},n(Co,[2,188]),n(Co,[2,190]),n(Li,[2,589]),n(Li,[2,557]),n(Li,[2,559]),{330:[1,2019],378:[1,2020]},n(Li,[2,562]),{418:[1,2021]},n(Li,[2,558]),n(Li,[2,591]),n(fe,[2,245]),{2:a,3:2006,4:l,5:f,6:u,7:p,8:d,9:b,141:Yr,406:2022},{79:Kr,84:[1,2023]},n(Ve,[2,566]),n(Ve,[2,567]),{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1191,120:164,122:168,129:2025,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,263:1190,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{79:Kr,84:[1,2026]},{83:$1,152:ve,153:1066,154:ms,161:Ee,190:pe,210:1067,335:we,376:2027,456:209,457:me,461:he},{379:[1,2028]},n(or,[2,755]),n(or,[2,757]),n(P1,[2,90]),{84:[2,89]},{2:a,3:185,4:l,5:f,6:u,7:p,8:d,9:b,61:180,83:It,104:1991,114:2029,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Be,167:183,188:xt,189:mt,190:pe,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:_t,313:Xe,314:Je,315:rt,316:Ke,317:He,318:Ye,319:Qe,320:Ze,322:Fe,323:$e,324:Le,325:ye,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:me,461:he},{2:a,3:2030,4:l,5:f,6:u,7:p,8:d,9:b},{84:[1,2031]},n(Li,[2,560]),n(Li,[2,561]),n(Li,[2,563]),{79:Kr,84:[1,2032]},{408:[1,2033]},{2:a,3:2034,4:l,5:f,6:u,7:p,8:d,9:b,141:[1,2035]},{79:Ct,84:[1,2036]},n(Kt,[2,565]),n(or,[2,759],{79:t1}),n(or,[2,761]),n(Ve,[2,92]),n(Ve,[2,95]),n(P1,[2,1110],{3:1988,110:2037,113:2038,2:a,4:l,5:f,6:u,7:p,8:d,9:b,82:kr}),n(Kt,[2,549]),{2:a,3:270,4:l,5:f,6:u,7:p,8:d,9:b,208:2039},n(Ve,[2,568]),n(Ve,[2,569]),n(Kt,[2,564]),n(P1,[2,88]),n(P1,[2,1111]),n(Dn,[2,1196],{409:2040,411:2041,83:[1,2042]}),n(Kt,Ie,{412:1916,413:1917,410:2043,250:kt}),n(Dn,[2,1197]),{2:a,3:2006,4:l,5:f,6:u,7:p,8:d,9:b,141:Yr,406:2044},n(Kt,[2,550]),{79:Kr,84:[1,2045]},n(Dn,[2,551])],defaultActions:{113:[2,10],213:[2,356],214:[2,357],215:[2,358],216:[2,359],217:[2,360],218:[2,361],219:[2,362],220:[2,363],221:[2,364],222:[2,365],230:[2,739],638:[2,1219],700:[2,1180],701:[2,1181],764:[2,740],837:[2,366],838:[2,1128],839:[2,1129],999:[2,470],1e3:[2,471],1001:[2,472],1075:[2,741],1391:[2,1173],1421:[2,1229],1493:[2,742],1521:[2,1115],1593:[2,1227],1620:[2,355],1682:[2,1175],1704:[2,1185],1719:[2,538],1905:[2,1107],1974:[2,1195],1977:[2,1201],2015:[2,89]},parseError:function(ma,Xr){if(Xr.recoverable)this.trace(ma);else{var En=new Error(ma);throw En.hash=Xr,En}},parse:function(ma){var Xr=this,En=[0],A=[],cs=[null],m=[],Ka=this.table,y="",Iu=0,z3=0,Us=0,g1=2,ol=1,H3=m.slice.call(arguments,1),ks=Object.create(this.lexer),ll={yy:{}};for(var Ou in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ou)&&(ll.yy[Ou]=this.yy[Ou]);ks.setInput(ma,ll.yy),ll.yy.lexer=ks,ll.yy.parser=this,typeof ks.yylloc>"u"&&(ks.yylloc={});var cl=ks.yylloc;m.push(cl);var Th=ks.options&&ks.options.ranges;typeof ll.yy.parseError=="function"?this.parseError=ll.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ih(V1){En.length=En.length-2*V1,cs.length=cs.length-V1,m.length=m.length-V1}for(var W3=function(){var V1;return V1=ks.lex()||ol,typeof V1!="number"&&(V1=Xr.symbols_[V1]||V1),V1},Vi,r1,Fl,ul,GT,Jm,Y3={},m0,Cu,xg,g0;;){if(Fl=En[En.length-1],this.defaultActions[Fl]?ul=this.defaultActions[Fl]:((Vi===null||typeof Vi>"u")&&(Vi=W3()),ul=Ka[Fl]&&Ka[Fl][Vi]),typeof ul>"u"||!ul.length||!ul[0]){var Oh,Ch="",_g=function(V1){for(var Km=En.length-1,Sg=0;;){if(g1.toString()in Ka[V1])return Sg;if(V1===0||Km<2)return!1;Km-=2,V1=En[Km],++Sg}};if(Us)r1!==ol&&(Oh=_g(Fl));else{Oh=_g(Fl),g0=[];for(m0 in Ka[Fl])this.terminals_[m0]&&m0>g1&&g0.push("'"+this.terminals_[m0]+"'");ks.showPosition?Ch="Parse error on line "+(Iu+1)+`: -`+ks.showPosition()+` -Expecting `+g0.join(", ")+", got '"+(this.terminals_[Vi]||Vi)+"'":Ch="Parse error on line "+(Iu+1)+": Unexpected "+(Vi==ol?"end of input":"'"+(this.terminals_[Vi]||Vi)+"'"),this.parseError(Ch,{text:ks.match,token:this.terminals_[Vi]||Vi,line:ks.yylineno,loc:cl,expected:g0,recoverable:Oh!==!1})}if(Us==3){if(Vi===ol||r1===ol)throw new Error(Ch||"Parsing halted while starting to recover from another error.");z3=ks.yyleng,y=ks.yytext,Iu=ks.yylineno,cl=ks.yylloc,Vi=W3()}if(Oh===!1)throw new Error(Ch||"Parsing halted. No suitable error recovery rule available.");Ih(Oh),r1=Vi==g1?null:Vi,Vi=g1,Fl=En[En.length-1],ul=Ka[Fl]&&Ka[Fl][g1],Us=3}if(ul[0]instanceof Array&&ul.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Fl+", token: "+Vi);switch(ul[0]){case 1:En.push(Vi),cs.push(ks.yytext),m.push(ks.yylloc),En.push(ul[1]),Vi=null,r1?(Vi=r1,r1=null):(z3=ks.yyleng,y=ks.yytext,Iu=ks.yylineno,cl=ks.yylloc,Us>0&&Us--);break;case 2:if(Cu=this.productions_[ul[1]][1],Y3.$=cs[cs.length-Cu],Y3._$={first_line:m[m.length-(Cu||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(Cu||1)].first_column,last_column:m[m.length-1].last_column},Th&&(Y3._$.range=[m[m.length-(Cu||1)].range[0],m[m.length-1].range[1]]),Jm=this.performAction.apply(Y3,[y,z3,Iu,ll.yy,ul[1],cs,m].concat(H3)),typeof Jm<"u")return Jm;Cu&&(En=En.slice(0,-1*Cu*2),cs=cs.slice(0,-1*Cu),m=m.slice(0,-1*Cu)),En.push(this.productions_[ul[1]][0]),cs.push(Y3.$),m.push(Y3._$),xg=Ka[En[En.length-2]][En[En.length-1]],En.push(xg);break;case 3:return!0}}return!0}},$a=["A","ABSENT","ABSOLUTE","ACCORDING","ACTION","ADA","ADD","ADMIN","AFTER","ALWAYS","ASC","ASSERTION","ASSIGNMENT","ATTRIBUTE","ATTRIBUTES","BASE64","BEFORE","BERNOULLI","BLOCKED","BOM","BREADTH","C","CASCADE","CATALOG","CATALOG_NAME","CHAIN","CHARACTERISTICS","CHARACTERS","CHARACTER_SET_CATALOG","CHARACTER_SET_NAME","CHARACTER_SET_SCHEMA","CLASS_ORIGIN","CLOSE","COBOL","COLLATION","COLLATION_CATALOG","COLLATION_NAME","COLLATION_SCHEMA","COLUMNS","COLUMN_NAME","COMMAND_FUNCTION","COMMAND_FUNCTION_CODE","COMMITTED","CONDITION_NUMBER","CONNECTION","CONNECTION_NAME","CONSTRAINTS","CONSTRAINT_CATALOG","CONSTRAINT_NAME","CONSTRAINT_SCHEMA","CONSTRUCTOR","CONTENT","CONTINUE","CONTROL","CURSOR_NAME","DATA","DATETIME_INTERVAL_CODE","DATETIME_INTERVAL_PRECISION","DB","DEFAULTS","DEFERRABLE","DEFERRED","DEFINED","DEFINER","DEGREE","DELETED","DEPTH","DERIVED","DESC","DESCRIPTOR","DIAGNOSTICS","DISPATCH","DOCUMENT","DOMAIN","DYNAMIC_FUNCTION","DYNAMIC_FUNCTION_CODE","EMPTY","ENCODING","ENFORCED","EXCLUDE","EXCLUDING","EXPRESSION","FILE","FINAL","FIRST","FLAG","FOLLOWING","FORTRAN","FOUND","FS","G","GENERAL","GENERATED","GO","GOTO","GRANTED","HEX","HIERARCHY","ID","IGNORE","IMMEDIATE","IMMEDIATELY","IMPLEMENTATION","INCLUDING","INCREMENT","INDENT","INITIALLY","INPUT","INSERTED","INSTANCE","INSTANTIABLE","INSTEAD","INTEGRITY","INVOKER","ISOLATION","K","KEY","KEY_MEMBER","KEY_TYPE","LAST","LENGTH","LEVEL","LIBRARY","LIMIT","LINK","LOCATION","LOCATOR","M","MAP","MAPPING","MATCHED","MAXVALUE","MESSAGE_LENGTH","MESSAGE_OCTET_LENGTH","MESSAGE_TEXT","MINVALUE","MORE","MUMPS","NAME","NAMES","NAMESPACE","NESTING","NEXT","NFC","NFD","NFKC","NFKD","NIL","NORMALIZED","NULLABLE","NULLS","NUMBER","OBJECT","OCTETS","OFF","OPEN","OPTION","OPTIONS","ORDER","ORDERING","ORDINALITY","OTHERS","OUTPUT","OVERRIDING","P","PAD","PARAMETER_MODE","PARAMETER_NAME","PARAMETER_ORDINAL_POSITION","PARAMETER_SPECIFIC_CATALOG","PARAMETER_SPECIFIC_NAME","PARAMETER_SPECIFIC_SCHEMA","PARTIAL","PASCAL","PASSING","PASSTHROUGH","PATH","PERMISSION","PLACING","PLI","PRECEDING","PRESERVE","PRIOR","PRIVILEGES","PUBLIC","READ","RECOVERY","RELATIVE","REPEATABLE","REQUIRING","RESPECT","RESTART","RESTORE","RESTRICT","RETURNED_CARDINALITY","RETURNED_LENGTH","RETURNED_OCTET_LENGTH","RETURNED_SQLSTATE","RETURNING","ROLE","ROUTINE","ROUTINE_CATALOG","ROUTINE_NAME","ROUTINE_SCHEMA","ROW_COUNT","SCALE","SCHEMA","SCHEMA_NAME","SCOPE_CATALOG","SCOPE_NAME","SCOPE_SCHEMA","SECTION","SECURITY","SELECTIVE","SELF","SEPARATOR","SEQUENCE","SERIALIZABLE","SERVER","SERVER_NAME","SESSION","SETS","SIMPLE","SIZE","SOURCE","SPACE","SPECIFIC_NAME","STANDALONE","STATE","STATEMENT","STRIP","STRUCTURE","STYLE","SUBCLASS_ORIGIN","T","TABLE_NAME","TEMPORARY","TIES","TOKEN","TOP_LEVEL_COUNT","TRANSACTION","TRANSACTIONS_COMMITTED","TRANSACTIONS_ROLLED_BACK","TRANSACTION_ACTIVE","TRANSFORM","TRANSFORMS","TRIGGER_CATALOG","TRIGGER_NAME","TRIGGER_SCHEMA","TYPE","UNBOUNDED","UNCOMMITTED","UNDER","UNLINK","UNNAMED","UNTYPED","URI","USAGE","USER_DEFINED_TYPE_CATALOG","USER_DEFINED_TYPE_CODE","USER_DEFINED_TYPE_NAME","USER_DEFINED_TYPE_SCHEMA","VALID","VERSION","VIEW","WHITESPACE","WORK","WRAPPER","WRITE","XMLDECLARATION","XMLSCHEMA","YES","ZONE"];Ki.parseError=function(ma,Xr){if(!(Xr.expected&&Xr.expected.indexOf("'LITERAL'")>-1&&/[a-zA-Z_][a-zA-Z_0-9]*/.test(Xr.token)&&$a.indexOf(Xr.token)>-1))throw new SyntaxError(ma)};var uc=(function(){var ma={EOF:1,parseError:function(Xr,En){if(this.yy.parser)this.yy.parser.parseError(Xr,En);else throw new Error(Xr)},setInput:function(Xr,En){return this.yy=En||this.yy||{},this._input=Xr,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var Xr=this._input[0];this.yytext+=Xr,this.yyleng++,this.offset++,this.match+=Xr,this.matched+=Xr;var En=Xr.match(/(?:\r\n?|\n).*/g);return En?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Xr},unput:function(Xr){var En=Xr.length,A=Xr.split(/(?:\r\n?|\n)/g);this._input=Xr+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-En),this.offset-=En;var cs=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var m=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===cs.length?this.yylloc.first_column:0)+cs[cs.length-A.length].length-A[0].length:this.yylloc.first_column-En},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-En]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Xr){this.unput(this.match.slice(Xr))},pastInput:function(){var Xr=this.matched.substr(0,this.matched.length-this.match.length);return(Xr.length>20?"...":"")+Xr.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Xr=this.match;return Xr.length<20&&(Xr+=this._input.substr(0,20-Xr.length)),(Xr.substr(0,20)+(Xr.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Xr=this.pastInput(),En=new Array(Xr.length+1).join("-");return Xr+this.upcomingInput()+` -`+En+"^"},test_match:function(Xr,En){var A,cs,m;if(this.options.backtrack_lexer&&(m={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(m.yylloc.range=this.yylloc.range.slice(0))),cs=Xr[0].match(/(?:\r\n?|\n).*/g),cs&&(this.yylineno+=cs.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:cs?cs[cs.length-1].length-cs[cs.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Xr[0].length},this.yytext+=Xr[0],this.match+=Xr[0],this.matches=Xr,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Xr[0].length),this.matched+=Xr[0],A=this.performAction.call(this,this.yy,this,En,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var Ka in m)this[Ka]=m[Ka];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Xr,En,A,cs;this._more||(this.yytext="",this.match="");for(var m=this._currentRules(),Ka=0;KaEn[0].length)){if(En=A,cs=Ka,this.options.backtrack_lexer){if(Xr=this.test_match(A,m[Ka]),Xr!==!1)return Xr;if(this._backtrack){En=!1;continue}else return!1}else if(!this.options.flex)break}return En?(Xr=this.test_match(En,m[cs]),Xr!==!1?Xr:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Xr=this.next();return Xr||this.lex()},begin:function(Xr){this.conditionStack.push(Xr)},popState:function(){var Xr=this.conditionStack.length-1;return Xr>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Xr){return Xr=this.conditionStack.length-1-Math.abs(Xr||0),Xr>=0?this.conditionStack[Xr]:"INITIAL"},pushState:function(Xr){this.begin(Xr)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(Xr,En,A,cs){var m=cs;switch(A){case 0:return 294;case 1:return 335;case 2:return 457;case 3:return 332;case 4:return 5;case 5:return 5;case 6:return 329;case 7:return 329;case 8:return 141;case 9:return 141;case 10:return;case 11:break;case 12:return 349;case 13:return 352;case 14:return En.yytext="VALUE",96;case 15:return En.yytext="VALUE",198;case 16:return En.yytext="ROW",198;case 17:return En.yytext="COLUMN",198;case 18:return En.yytext="MATRIX",198;case 19:return En.yytext="INDEX",198;case 20:return En.yytext="RECORDSET",198;case 21:return En.yytext="TEXT",198;case 22:return En.yytext="SELECT",198;case 23:return 558;case 24:return 418;case 25:return 439;case 26:return 553;case 27:return 319;case 28:return 297;case 29:return 297;case 30:return 173;case 31:return 437;case 32:return 179;case 33:return 249;case 34:return 175;case 35:return 216;case 36:return 320;case 37:return 82;case 38:return 455;case 39:return 268;case 40:return 441;case 41:return 391;case 42:return 318;case 43:return 552;case 44:return 475;case 45:return 363;case 46:return 480;case 47:return 364;case 48:return 348;case 49:return 128;case 50:return 121;case 51:return 348;case 52:return 121;case 53:return 348;case 54:return 121;case 55:return 348;case 56:return 546;case 57:return 336;case 58:return 415;case 59:return 299;case 60:return 403;case 61:return 139;case 62:return 8;case 63:return 269;case 64:return 199;case 65:return 199;case 66:return 472;case 67:return 402;case 68:return 509;case 69:return 478;case 70:return 301;case 71:return 262;case 72:return 315;case 73:return 295;case 74:return 215;case 75:return 256;case 76:return 292;case 77:return 293;case 78:return 293;case 79:return"CURSOR";case 80:return 442;case 81:return 323;case 82:return 324;case 83:return 325;case 84:return 488;case 85:return 378;case 86:return 372;case 87:return 281;case 88:return 268;case 89:return 443;case 90:return 194;case 91:return 433;case 92:return 487;case 93:return 144;case 94:return 339;case 95:return 426;case 96:return 343;case 97:return 347;case 98:return 178;case 99:return 546;case 100:return 546;case 101:return 331;case 102:return 18;case 103:return 328;case 104:return 275;case 105:return 266;case 106:return 105;case 107:return 407;case 108:return 192;case 109:return 247;case 110:return 296;case 111:return 346;case 112:return 639;case 113:return 511;case 114:return 252;case 115:return 304;case 116:return 258;case 117:return 259;case 118:return 165;case 119:return 391;case 120:return 377;case 121:return 365;case 122:return 109;case 123:return 202;case 124:return 223;case 125:return 244;case 126:return 554;case 127:return 373;case 128:return 229;case 129:return 177;case 130:return 326;case 131:return 207;case 132:return 479;case 133:return 243;case 134:return 6;case 135:return 267;case 136:return"LET";case 137:return 481;case 138:return 245;case 139:return 121;case 140:return 271;case 141:return 499;case 142:return 200;case 143:return 317;case 144:return 427;case 145:return 316;case 146:return 492;case 147:return 178;case 148:return 440;case 149:return 242;case 150:return 681;case 151:return 298;case 152:return 270;case 153:return 417;case 154:return 163;case 155:return 330;case 156:return 265;case 157:return 471;case 158:return 250;case 159:return 452;case 160:return 138;case 161:return 273;case 162:return 7;case 163:return 453;case 164:return 180;case 165:return 127;case 166:return 217;case 167:return 503;case 168:return 307;case 169:return 181;case 170:return 311;case 171:return 799;case 172:return 103;case 173:return 20;case 174:return 404;case 175:return 482;case 176:return 713;case 177:return 19;case 178:return 451;case 179:return 203;case 180:return"REDUCE";case 181:return 81;case 182:return 408;case 183:return 344;case 184:return 555;case 185:return 717;case 186:return 116;case 187:return 438;case 188:return 184;case 189:return 322;case 190:return 416;case 191:return 483;case 192:return 722;case 193:return 182;case 194:return 182;case 195:return 246;case 196:return 474;case 197:return 255;case 198:return 159;case 199:return 800;case 200:return 442;case 201:return 96;case 202:return 248;case 203:return 9;case 204:return 155;case 205:return 155;case 206:return 446;case 207:return 367;case 208:return 454;case 209:return"STRATEGY";case 210:return"STORE";case 211:return 313;case 212:return 314;case 213:return 388;case 214:return 388;case 215:return 502;case 216:return 392;case 217:return 392;case 218:return 201;case 219:return 342;case 220:return"TIMEOUT";case 221:return 157;case 222:return 204;case 223:return 473;case 224:return 473;case 225:return 547;case 226:return 327;case 227:return 491;case 228:return 171;case 229:return 196;case 230:return 108;case 231:return 368;case 232:return 445;case 233:return 251;case 234:return 158;case 235:return 379;case 236:return 143;case 237:return 447;case 238:return 341;case 239:return 137;case 240:return 477;case 241:return 77;case 242:return 473;case 243:return 4;case 244:return 140;case 245:return 124;case 246:return 146;case 247:return 188;case 248:return 350;case 249:return 189;case 250:return 142;case 251:return 147;case 252:return 359;case 253:return 356;case 254:return 358;case 255:return 355;case 256:return 353;case 257:return 351;case 258:return 352;case 259:return 151;case 260:return 150;case 261:return 148;case 262:return 354;case 263:return 357;case 264:return 149;case 265:return 133;case 266:return 357;case 267:return 83;case 268:return 84;case 269:return 461;case 270:return 463;case 271:return 333;case 272:return 466;case 273:return 545;case 274:return 131;case 275:return 125;case 276:return 79;case 277:return 366;case 278:return 161;case 279:return 798;case 280:return 152;case 281:return 190;case 282:return 145;case 283:return 132;case 284:return 345;case 285:return 154;case 286:return 14;case 287:return"INVALID"}},rules:[/^(?:``([^\`])+``)/i,/^(?:\[\?\])/i,/^(?:@\[)/i,/^(?:ARRAY\[)/i,/^(?:\[([^\]'])*?\])/i,/^(?:`([^\`'])*?`)/i,/^(?:N(['](\\.|[^']|\\')*?['])+)/i,/^(?:X(['](\\.|[^']|\\')*?['])+)/i,/^(?:(['](\\.|[^']|\\')*?['])+)/i,/^(?:(["](\\.|[^"]|\\")*?["])+)/i,/^(?:--(.*?)($|\r\n|\r|\n))/i,/^(?:\s+)/i,/^(?:\|\|)/i,/^(?:\|)/i,/^(?:VALUE\s+OF\s+SEARCH\b)/i,/^(?:VALUE\s+OF\s+SELECT\b)/i,/^(?:ROW\s+OF\s+SELECT\b)/i,/^(?:COLUMN\s+OF\s+SELECT\b)/i,/^(?:MATRIX\s+OF\s+SELECT\b)/i,/^(?:INDEX\s+OF\s+SELECT\b)/i,/^(?:RECORDSET\s+OF\s+SELECT\b)/i,/^(?:TEXT\s+OF\s+SELECT\b)/i,/^(?:SELECT\b)/i,/^(?:ABSOLUTE\b)/i,/^(?:ACTION\b)/i,/^(?:ADD\b)/i,/^(?:AFTER\b)/i,/^(?:AGGR\b)/i,/^(?:AGGREGATE\b)/i,/^(?:AGGREGATOR\b)/i,/^(?:ALL\b)/i,/^(?:ALTER\b)/i,/^(?:AND\b)/i,/^(?:ANTI\b)/i,/^(?:ANY\b)/i,/^(?:APPLY\b)/i,/^(?:ARRAY\b)/i,/^(?:AS\b)/i,/^(?:ASSERT\b)/i,/^(?:ASC\b)/i,/^(?:ATTACH\b)/i,/^(?:AUTO(_)?INCREMENT\b)/i,/^(?:AVG\b)/i,/^(?:BEFORE\b)/i,/^(?:BEGIN\b)/i,/^(?:BETWEEN\b)/i,/^(?:BREAK\b)/i,/^(?:NOT\s+BETWEEN\b)/i,/^(?:NOT\s+LIKE\b)/i,/^(?:BY\b)/i,/^(?:~~\*)/i,/^(?:!~~\*)/i,/^(?:~~)/i,/^(?:!~~)/i,/^(?:ILIKE\b)/i,/^(?:NOT\s+ILIKE\b)/i,/^(?:CALL\b)/i,/^(?:CASE\b)/i,/^(?:CASCADE\b)/i,/^(?:CAST\b)/i,/^(?:CHECK\b)/i,/^(?:CLASS\b)/i,/^(?:CLOSE\b)/i,/^(?:COLLATE\b)/i,/^(?:COLUMN\b)/i,/^(?:COLUMNS\b)/i,/^(?:COMMIT\b)/i,/^(?:CONSTRAINT\b)/i,/^(?:CONTENT\b)/i,/^(?:CONTINUE\b)/i,/^(?:CONVERT\b)/i,/^(?:CORRESPONDING\b)/i,/^(?:COUNT\b)/i,/^(?:CREATE\b)/i,/^(?:CROSS\b)/i,/^(?:CUBE\b)/i,/^(?:CURRENT_TIMESTAMP\b)/i,/^(?:CURRENT_DATE\b)/i,/^(?:CURDATE\b)/i,/^(?:CURSOR\b)/i,/^(?:DATABASE(S)?)/i,/^(?:DATEADD\b)/i,/^(?:DATEDIFF\b)/i,/^(?:TIMESTAMPDIFF\b)/i,/^(?:DECLARE\b)/i,/^(?:DEFAULT\b)/i,/^(?:DELETE\b)/i,/^(?:DELETED\b)/i,/^(?:DESC\b)/i,/^(?:DETACH\b)/i,/^(?:DISTINCT\b)/i,/^(?:DROP\b)/i,/^(?:ECHO\b)/i,/^(?:EDGE\b)/i,/^(?:END\b)/i,/^(?:ENUM\b)/i,/^(?:ELSE\b)/i,/^(?:ESCAPE\b)/i,/^(?:EXCEPT\b)/i,/^(?:EXEC\b)/i,/^(?:EXECUTE\b)/i,/^(?:EXISTS\b)/i,/^(?:EXPLAIN\b)/i,/^(?:FALSE\b)/i,/^(?:FETCH\b)/i,/^(?:FIRST\b)/i,/^(?:FOR\b)/i,/^(?:FOREIGN\b)/i,/^(?:FROM\b)/i,/^(?:FULL\b)/i,/^(?:FUNCTION\b)/i,/^(?:GLOB\b)/i,/^(?:GO\b)/i,/^(?:GRAPH\b)/i,/^(?:GROUP\b)/i,/^(?:GROUP_CONCAT\b)/i,/^(?:GROUPING\b)/i,/^(?:HAVING\b)/i,/^(?:IF\b)/i,/^(?:IDENTITY\b)/i,/^(?:IGNORE\b)/i,/^(?:IS\b)/i,/^(?:IN\b)/i,/^(?:INDEX\b)/i,/^(?:INDEXED\b)/i,/^(?:INNER\b)/i,/^(?:INSTEAD\b)/i,/^(?:INSERT\b)/i,/^(?:INSERTED\b)/i,/^(?:INTERSECT\b)/i,/^(?:INTERVAL\b)/i,/^(?:INTO\b)/i,/^(?:ITERATE\b)/i,/^(?:JOIN\b)/i,/^(?:KEY\b)/i,/^(?:LAST\b)/i,/^(?:LET\b)/i,/^(?:LEAVE\b)/i,/^(?:LEFT\b)/i,/^(?:LIKE\b)/i,/^(?:LIMIT\b)/i,/^(?:MATCHED\b)/i,/^(?:MATRIX\b)/i,/^(?:MAX\s*(?=\())/i,/^(?:MAX\s*(?=(,|\))))/i,/^(?:MIN\s*(?=\())/i,/^(?:MERGE\b)/i,/^(?:MINUS\b)/i,/^(?:MODIFY\b)/i,/^(?:NATURAL\b)/i,/^(?:NEXT\b)/i,/^(?:NEW\b)/i,/^(?:NOCASE\b)/i,/^(?:NO\b)/i,/^(?:NOT\b)/i,/^(?:NULL\b)/i,/^(?:NULLS\b)/i,/^(?:OFF\b)/i,/^(?:ON\b)/i,/^(?:ONLY\b)/i,/^(?:OF\b)/i,/^(?:OFFSET\b)/i,/^(?:OPEN\b)/i,/^(?:OPTION\b)/i,/^(?:OR\b)/i,/^(?:ORDER\b)/i,/^(?:OUTER\b)/i,/^(?:OUTPUT\b)/i,/^(?:OVER\b)/i,/^(?:PATH\b)/i,/^(?:PARTITION\b)/i,/^(?:PERCENT\b)/i,/^(?:PIVOT\b)/i,/^(?:PLAN\b)/i,/^(?:PRIMARY\b)/i,/^(?:PRINT\b)/i,/^(?:PRIOR\b)/i,/^(?:QUERY\b)/i,/^(?:READ\b)/i,/^(?:RECORDSET\b)/i,/^(?:REDUCE\b)/i,/^(?:RECURSIVE\b)/i,/^(?:REFERENCES\b)/i,/^(?:REGEXP\b)/i,/^(?:REINDEX\b)/i,/^(?:RELATIVE\b)/i,/^(?:REMOVE\b)/i,/^(?:RENAME\b)/i,/^(?:REPEAT\b)/i,/^(?:REPLACE\b)/i,/^(?:RESTRICT\b)/i,/^(?:REQUIRE\b)/i,/^(?:RESTORE\b)/i,/^(?:RETURN\b)/i,/^(?:RETURNS\b)/i,/^(?:RIGHT\b)/i,/^(?:ROLLBACK\b)/i,/^(?:ROLLUP\b)/i,/^(?:ROW\b)/i,/^(?:ROWS\b)/i,/^(?:SCHEMA(S)?)/i,/^(?:SEARCH\b)/i,/^(?:SEMI\b)/i,/^(?:SEPARATOR\b)/i,/^(?:SET\b)/i,/^(?:SETS\b)/i,/^(?:SHOW\b)/i,/^(?:SOME\b)/i,/^(?:SOURCE\b)/i,/^(?:STRATEGY\b)/i,/^(?:STORE\b)/i,/^(?:SUM\b)/i,/^(?:TOTAL\b)/i,/^(?:TABLE\b)/i,/^(?:TABLES\b)/i,/^(?:TARGET\b)/i,/^(?:TEMP\b)/i,/^(?:TEMPORARY\b)/i,/^(?:TEXTSTRING\b)/i,/^(?:THEN\b)/i,/^(?:TIMEOUT\b)/i,/^(?:TO\b)/i,/^(?:TOP\b)/i,/^(?:TRAN\b)/i,/^(?:TRANSACTION\b)/i,/^(?:TRIGGER\b)/i,/^(?:TRUE\b)/i,/^(?:TRUNCATE\b)/i,/^(?:UNION\b)/i,/^(?:UNIQUE\b)/i,/^(?:UNPIVOT\b)/i,/^(?:UPDATE\b)/i,/^(?:USE\b)/i,/^(?:USING\b)/i,/^(?:VALUE\b)/i,/^(?:VALUES\b)/i,/^(?:VERTEX\b)/i,/^(?:VIEW\b)/i,/^(?:WHEN\b)/i,/^(?:WHERE\b)/i,/^(?:WHILE\b)/i,/^(?:WITH\b)/i,/^(?:WORK\b)/i,/^(?:[0-9]*[a-zA-Z_]+[a-zA-Z_0-9]*)/i,/^(?:(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?(?![a-zA-Z_0-9]))/i,/^(?:->)/i,/^(?:#)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\*)/i,/^(?:\/)/i,/^(?:%)/i,/^(?:!===)/i,/^(?:===)/i,/^(?:!==)/i,/^(?:==)/i,/^(?:>=)/i,/^(?:&)/i,/^(?:\|)/i,/^(?:<<)/i,/^(?:>>)/i,/^(?:>)/i,/^(?:<=)/i,/^(?:<>)/i,/^(?:<)/i,/^(?:=)/i,/^(?:!=)/i,/^(?:\()/i,/^(?:\))/i,/^(?:\{)/i,/^(?:\})/i,/^(?:\])/i,/^(?::-)/i,/^(?:\?-)/i,/^(?:\.\.)/i,/^(?:\.)/i,/^(?:,)/i,/^(?:::)/i,/^(?::)/i,/^(?:;)/i,/^(?:\$)/i,/^(?:\?)/i,/^(?:!)/i,/^(?:\^)/i,/^(?:~)/i,/^(?:@)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287],inclusive:!0}}};return ma})();Ki.lexer=uc;function al(){this.yy={}}return al.prototype=Ki,Ki.Parser=al,new al})();typeof e<"u"&&typeof uu<"u"&&(uu.parser=i,uu.Parser=i.Parser,uu.parse=function(){return i.parse.apply(i,arguments)},uu.main=function(n){n[1]||(console.log("Usage: "+n[0]+" FILE"),process.exit(1));var c=e("fs").readFileSync(e("path").normalize(n[1]),"utf8");return uu.parser.parse(c)},typeof C3<"u"&&e.main===C3&&uu.main(process.argv.slice(1))),t.prettyflag=!1,t.pretty=function(n,c){var a=t.prettyflag;t.prettyflag=!c;var l=t.parse(n).toString();return t.prettyflag=a,l};var s=t.utils={};function o(n){return"(y="+n+",y===y?y:undefined)"}var h=o;function g(n,c){return"(y="+n+',typeof y=="undefined"?undefined:'+c+")"}var v=g;function x(){return!0}function _(){}var w=s.escapeq=function(n){return(""+n).replace(/["'\\\n\r\u2028\u2029]/g,function(c){switch(c){case'"':case"'":case"\\":return"\\"+c;case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029"}})},O=s.undoubleq=function(n){return n.replace(/(\')/g,"''")},I=s.doubleq=function(n){return n.replace(/(\'\')/g,"\\'")},H=s.doubleqq=function(n){return n.replace(/'/g,"\\'")},J=function(n){return n[0]==="\uFEFF"&&(n=n.substr(1)),n};s.global=(function(){return typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Function("return this")()})();var Z=s.isNativeFunction=function(n){return typeof n=="function"&&!!~n.toString().indexOf("[native code]")};s.isWebWorker=(function(){try{var n=s.global.importScripts;return s.isNativeFunction(n)}catch{return!1}})(),s.isNode=(function(){try{return!(typeof process>"u"||!process.versions||!process.versions.node)}catch{return!1}})(),s.isBrowser=(function(){try{return s.isNativeFunction(s.global.location.reload)}catch{return!1}})(),s.isBrowserify=(function(){return s.isBrowser&&typeof process<"u"&&process.browser})(),s.isRequireJS=(function(){return s.isBrowser&&typeof e=="function"&&typeof e.specified=="function"})(),s.isMeteor=(function(){return typeof Meteor<"u"&&Meteor.release})(),s.isMeteorClient=s.isMeteorClient=(function(){return s.isMeteor&&Meteor.isClient})(),s.isMeteorServer=(function(){return s.isMeteor&&Meteor.isServer})(),s.isCordova=(function(){return typeof cordova=="object"})(),s.isReactNative=(function(){var n=!1;return n})(),s.hasIndexedDB=(function(){return!!s.global.indexedDB})(),s.isArray=function(n){return Object.prototype.toString.call(n)==="[object Array]"};let oe=/^[a-z]+:\/\//i,se=s.loadFile=function(n,c,a,l){var f,u;if(!(s.isNode||s.isMeteorServer)){if(s.isCordova){s.global.requestFileSystem(LocalFileSystem.PERSISTENT,0,function(U){U.root.getFile(n,{create:!1},function(R){R.file(function(L){var T=new FileReader;T.onloadend=function(C){a(J(this.result))},T.readAsText(L)})})});return}if(typeof n=="string"){if(n.substr(0,1)==="#"&&typeof document<"u"){f=document.querySelector(n).textContent,a(f);return}q(n,U=>a(J(U)),l,c);return}if(n instanceof Event){var p=n.target.files,d=new FileReader,b=p[0].name;d.onload=function(U){var R=U.target.result;a(J(R))},d.readAsText(p[0])}q(n,U=>a(J(U)),l,c)}},re=typeof fetch<"u"?fetch:null;async function q(n,c,a,l){return l?ue(n,c,a):await ue(n,c,a)}function ue(n,c,a){return re(n).then(l=>l.text()).then(l=>{c(l)}).catch(l=>{if(a)return a(l);throw console.error(l),l})}function K(n,c,a){return re(n).then(l=>l.arrayBuffer()).then(l=>{var f=new Uint8Array(l),u=[...f].map(p=>String.fromCharCode(p)).join("");c(u)}).catch(l=>{if(a)return a(l);throw console.error(l),l})}var k=s.loadBinaryFile=function(n,c,a,l=f=>{throw f}){var f;if(!(s.isNode||s.isMeteorServer))if(typeof n=="string"){var u=new XMLHttpRequest;u.open("GET",n,c),u.responseType="arraybuffer",u.onload=function(){for(var U=new Uint8Array(u.response),R=[],L=0;L701){let l=((n-26)/676|0)-1;c=String.fromCharCode(65+l%26),n=n%676}var a=String.fromCharCode(65+n%26);return n>=26&&(n=(n/26|0)-1,a=String.fromCharCode(65+n%26)+a,n>26&&(n=(n/26|0)-1,a=String.fromCharCode(65+n%26)+a)),c+a},Va=s.xlscn=function(n){var c=n.charCodeAt(0)-65;return n.length>1&&(c=(c+1)*26+n.charCodeAt(1)-65,n.length>2&&(c=(c+1)*26+n.charCodeAt(2)-65)),c},ar=s.domEmptyChildren=function(n){for(var c=n.childNodes.length;c--;)n.removeChild(n.lastChild)},Wi={},Gs=s.like=function(n,c,a=""){if(!Wi[n]){for(var l="^",f=0;f-1?l+="\\"+u:l+=u,f++}l+="$",Wi[n]=RegExp(l,"i")}return(""+(c??"")).search(Wi[n])>-1};s.glob=function(n,c){for(var a=0,l="^";a-1?l+="\\"+f:l+=f,a++}return l+="$",(""+(n||"")).toUpperCase().search(RegExp(l.toUpperCase()))>-1},s.findAlaSQLPath=function(){if(s.isWebWorker)return"";if(s.isMeteorClient)return"/packages/dist/";if(s.isMeteorServer)return"assets/packages/dist/";if(s.isNode)return r;if(s.isBrowser)for(var n=document.getElementsByTagName("script"),c=0;c0&&n==+n?+n:n;if(no.str.test(c))return String(n);if(no.int.test(c)){var a=parseInt(n,10);return isNaN(a)?n:a}if(no.num.test(c)){var l=parseFloat(n);return isNaN(l)?n:l}return no.bool.test(c)?typeof n=="string"?/^(true|1|yes)$/i.test(n):!!n:no.date.test(c)?n instanceof Date?n:new Date(n):n},t.path=t.utils.findAlaSQLPath(),t.utils.uncomment=function(n){n=("__"+n+"__").split("");for(var c=!1,a,l=!1,f=!1,u=0,p=n.length;ut.MAXSQLCACHESIZE&&u.resetSqlCache(),u.sqlCacheSize++,u.sqlCache[p]=U);var d=t.res=U(a,l,f);return wn(U),d}t.precompile(b.statements[0],t.useid,a);var d=t.res=b.statements[0].execute(n,a,l,f);return d}if(l){t.adrun(n,b,a,l,f);return}return t.drun(n,b,a,l,f)}},t.drun=function(n,c,a,l,f){var u=t.useid;u!==n&&t.use(n);for(var p=[],d=0,b=c.statements.length;d{var a=c.resolve([]);return n.forEach(l=>{a=a.then(f=>Ei(l.sql,l.params,l.i,l.length).then(u=>[...f,u]))}),a};var si=function(n){if(!(n.length<1)){for(var c,a,l,f=[],u=0;u"u")throw new Error("Please include a Promise/A+ library");if(typeof n=="string")return Ei(n,c);if(!s.isArray(n)||n.length<1||typeof c<"u")throw new Error("Error in .promise parameters");return si(n)};var xi=t.Database=function(n){var c=this;if(c===t)if(n){if(c=t.databases[n],t.databases[n]=c,!c)throw new Error(`Database ${n} not found`)}else c=t.databases.alasql,t.options.tsql&&(t.databases.tempdb=t.databases.alasql);return n||(n="db"+t.databasenum++),c.databaseid=n,t.databases[n]=c,c.dbversion=0,c.tables={},c.views={},c.triggers={},c.indices={},c.objects={},c.counter=0,c.resetSqlCache(),c};xi.prototype.resetSqlCache=function(){this.sqlCache={},this.sqlCacheSize=0,this.astCache={}},xi.prototype.exec=function(n,c,a){return t.dexec(this.databaseid,n,c,a)},xi.prototype.autoval=function(n,c,a){return t.autoval(n,c,a,this.databaseid)},xi.prototype.transaction=function(n){var c=new t.Transaction(this.databaseid),a=n(c);return a};class Ui{transactionid=Date.now();committed=!1;bank;constructor(c){this.databaseid=c,this.dbversion=t.databases[c].dbversion,this.bank=JSON.stringify(t.databases[c])}commit(){this.committed=!0,t.databases[this.databaseid].dbversion=Date.now(),delete this.bank}rollback(){if(!this.committed)t.databases[this.databaseid]=JSON.parse(this.bank),delete this.bank;else throw new Error("Transaction already commited")}exec(c,a,l){return t.dexec(this.databaseid,c,a,l)}}Ui.prototype.executeSQL=Ui.prototype.exec,t.Transaction=Ui;var No=t.Table=function(n){this.data=[],this.columns=[],this.xcolumns={},this.inddefs={},this.indices={},this.uniqs={},this.uniqdefs={},this.identities={},this.checks=[],this.checkfns=[],this.beforeinsert={},this.afterinsert={},this.insteadofinsert={},this.beforedelete={},this.afterdelete={},this.insteadofdelete={},this.beforeupdate={},this.afterupdate={},this.insteadofupdate={},Object.assign(this,n)};No.prototype.indexColumns=function(){var n=this;n.xcolumns={},n.columns.forEach(function(c){n.xcolumns[c.columnid]=c})};class K1{constructor(c){this.columns=[],this.xcolumns={},this.query=[],Object.assign(this,c)}}t.View=K1;class ${constructor(c){this.alasql=t,this.columns=[],this.xcolumns={},this.selectGroup=[],this.groupColumns={},Object.assign(this,c)}}class c1{constructor(c){Object.assign(this,c)}}t.Recordset=c1,t.Query=$;class Wo{constructor(c){Object.assign(this,c)}toString(){}toType(){}toJS(){}exec(){}compile(){}}var V={extend:Object.assign,casesensitive:t.options.casesensitive,Base:Wo,compileParamValue:function(n,c,a,l,f,u){return function(p,d){var b=p[n];if(!Array.isArray(b)){var U=new Error(c+" requires an array for parameter "+n);if(d)return d(null,U);throw U}var R="__p"+n+"_"+Date.now(),L=t.databases[l||"alasql"];L.tables[R]=new t.Table({tableid:R}),L.tables[R].data=b;try{var T=f[u];f[u]=new V.Table({tableid:R,databaseid:L.databaseid});var C=f.compile(l);f[u]=T;var te=C(p,d);if(a){var W=L.tables[R].data;b.length=0,Array.prototype.push.apply(b,W)}return te}catch(Y){if(d)return d(null,Y);throw Y}finally{delete L.tables[R]}}}};i.yy=t.yy=V,V.Statements=class{constructor(n){Object.assign(this,n)}toString(){return this.statements.map(n=>n.toString()).join("; ")}compile(n){let c=this.statements.map(a=>a.compile(n));return c.length===1?c[0]:(a,l)=>{let f=c.map(u=>u(a));return l&&l(f),f}}},V.Search=class{constructor(n){Object.assign(this,n)}toString(){let n="SEARCH ";return this.selectors&&(n+=this.selectors.toString()),this.from&&(n+="FROM "+this.from.toString()),n}toJS(n){return`this.queriesfn[${this.queriesidx-1}](this.params,null,${n})`}compile(n){var c=n,a=(l,f)=>{var u;return this.#e(c,l,function(p){u=Zs(a.query,p),f&&(u=f(u))}),u};return a.query={},a}#e(n,c,a){var l,f={},u,p=mn(this.selectors);function d(C,te,W){var Y,B,Pn,N=C[te],Ae=t.options.loopbreak||1e5;if(N.selid){if(N.selid==="PATH"){for(var je=[{node:W,stack:[]}],Ot={},Oe=t.databases[t.useid].objects;je.length>0;){var Te=je.shift(),ht=Te.node,Tt=Te.stack,Pn=d(N.args,0,ht);if(Pn.length>0){if(te+1+1>C.length)return Tt;var $t=[];return Tt&&Tt.length>0&&Tt.forEach(function(On){$t=$t.concat(d(C,te+1,On))}),$t}else{if(typeof Ot[ht.$id]<"u")continue;Ot[ht.$id]=!0,ht.$out&&ht.$out.length>0&&ht.$out.forEach(function(On){var ri=Oe[On],hs=Tt.concat(ri);hs.push(Oe[ri.$out[0]]),je.push({node:Oe[ri.$out[0]],stack:hs})})}}return[]}if(N.selid==="NOT"){var B=d(N.args,0,W);return B.length>0?[]:te+1+1>C.length?[W]:d(C,te+1,W)}else if(N.selid==="DISTINCT"){var B;if(typeof N.args>"u"||N.args.length===0?B=Wt(W):B=d(N.args,0,W),B.length===0)return[];var Jn=Wt(B);return te+1+1>C.length?Jn:d(C,te+1,Jn)}else if(N.selid==="AND"){var Jn=!0;return N.args.forEach(function(On){Jn=Jn&&d(On,0,W).length>0}),Jn?te+1+1>C.length?[W]:d(C,te+1,W):[]}else if(N.selid==="OR"){var Jn=!1;return N.args.forEach(function(On){Jn=Jn||d(On,0,W).length>0}),Jn?te+1+1>C.length?[W]:d(C,te+1,W):[]}else if(N.selid==="ALL"){var B=d(N.args[0],0,W);return B.length===0?[]:te+1+1>C.length?B:d(C,te+1,B)}else if(N.selid==="ANY"){var B=d(N.args[0],0,W);return B.length===0?[]:te+1+1>C.length?[B[0]]:d(C,te+1,[B[0]])}else if(N.selid==="UNIONALL"){var B=[];return N.args.forEach(function(On){B=B.concat(d(On,0,W))}),B.length===0?[]:te+1+1>C.length?B:d(C,te+1,B)}else if(N.selid==="UNION"){var B=[];N.args.forEach(function(On){B=B.concat(d(On,0,W))});var B=Wt(B);return B.length===0?[]:te+1+1>C.length?B:d(C,te+1,B)}else if(N.selid==="IF"){var B=d(N.args,0,W);return B.length===0?[]:te+1+1>C.length?[W]:d(C,te+1,W)}else if(N.selid==="REPEAT"){var yr,le,mr=N.args[0].value;N.args[1]?le=N.args[1].value:le=mr,N.args[2]&&(yr=N.args[2].variable);var Vt=[];if(mr===0&&(te+1+1>C.length?Vt=[W]:(yr&&(t.vars[yr]=0),Vt=Vt.concat(d(C,te+1,W)))),le>0)for(var Rt=[{value:W,lvl:1}],Qr=0;Rt.length>0;){var B=Rt[0];if(Rt.shift(),B.lvl<=le){yr&&(t.vars[yr]=B.lvl);var $n=d(N.sels,0,B.value);$n.forEach(function(On){Rt.push({value:On,lvl:B.lvl+1})}),B.lvl>=mr&&(te+1+1>C.length?Vt=Vt.concat($n):$n.forEach(function(On){Vt=Vt.concat(d(C,te+1,On))}))}if(Qr++,Qr>Ae)throw new Error("Infinite loop brake. Number of iterations = "+Qr)}return Vt}else if(N.selid==="OF"){if(te+1+1>C.length)return[W];var ki=[];return Object.keys(W).forEach(function(Ls){t.vars[N.args[0].variable]=Ls,ki=ki.concat(d(C,te+1,W[Ls]))}),ki}else if(N.selid==="TO"){var Di=t.vars[N.args[0]],Wn=[];if(Di!==void 0?Wn=Di.slice(0):Wn=[],Wn.push(W),te+1+1>C.length)return[W];t.vars[N.args[0]]=Wn;var ki=d(C,te+1,W);return t.vars[N.args[0]]=Di,ki}else if(N.selid==="ARRAY"){var B=d(N.args,0,W);if(B.length>0)Y=B;else return[];return te+1+1>C.length?[Y]:d(C,te+1,Y)}else if(N.selid==="SUM"){var B=d(N.args,0,W);if(B.length>0)var Y=B.reduce(function(ri,hs){return ri+hs},0);else return[];return te+1+1>C.length?[Y]:d(C,te+1,Y)}else if(N.selid==="AVG"){if(B=d(N.args,0,W),B.length>0)Y=B.reduce(function(Ls,On){return Ls+On},0)/B.length;else return[];return te+1+1>C.length?[Y]:d(C,te+1,Y)}else if(N.selid==="COUNT"){if(B=d(N.args,0,W),B.length>0)Y=B.length;else return[];return te+1+1>C.length?[Y]:d(C,te+1,Y)}else if(N.selid==="FIRST"){if(B=d(N.args,0,W),B.length>0)Y=B[0];else return[];return te+1+1>C.length?[Y]:d(C,te+1,Y)}else if(N.selid==="LAST"){if(B=d(N.args,0,W),B.length>0)Y=B[B.length-1];else return[];return te+1+1>C.length?[Y]:d(C,te+1,Y)}else if(N.selid==="MIN"){if(B=d(N.args,0,W),B.length===0)return[];var Y=B.reduce(function(On,ri){return Math.min(On,ri)},1/0);return te+1+1>C.length?[Y]:d(C,te+1,Y)}else if(N.selid==="MAX"){var B=d(N.args,0,W);if(B.length===0)return[];var Y=B.reduce(function(ri,hs){return Math.max(ri,hs)},-1/0);return te+1+1>C.length?[Y]:d(C,te+1,Y)}else if(N.selid==="PLUS"){var Vt=[],Rt=d(N.args,0,W).slice();te+1+1>C.length?Vt=Vt.concat(Rt):Rt.forEach(function(ri){Vt=Vt.concat(d(C,te+1,ri))});for(var Qr=0;Rt.length>0;){var B=Rt.shift();if(B=d(N.args,0,B),Rt=Rt.concat(B),te+1+1>C.length?Vt=Vt.concat(B):B.forEach(function(ps){var wo=d(C,te+1,ps);Vt=Vt.concat(wo)}),Qr++,Qr>Ae)throw new Error("Infinite loop brake. Number of iterations = "+Qr)}return Vt}else if(N.selid==="STAR"){var Vt=[];Vt=d(C,te+1,W);var Rt=d(N.args,0,W).slice();te+1+1>C.length?Vt=Vt.concat(Rt):Rt.forEach(function(ri){Vt=Vt.concat(d(C,te+1,ri))});for(var Qr=0;Rt.length>0;){var B=Rt[0];if(Rt.shift(),B=d(N.args,0,B),Rt=Rt.concat(B),te+1+1<=C.length&&B.forEach(function(ps){Vt=Vt.concat(d(C,te+1,ps))}),Qr++,Qr>Ae)throw new Error("Infinite loop brake. Number of iterations = "+Qr)}return Vt}else if(N.selid==="QUESTION"){var Vt=[];Vt=Vt.concat(d(C,te+1,W));var B=d(N.args,0,W);return te+1+1<=C.length&&B.forEach(function(ri){Vt=Vt.concat(d(C,te+1,ri))}),Vt}else if(N.selid==="WITH"){var B=d(N.args,0,W);if(B.length===0)return[];var Pn={status:1,values:B}}else{if(N.selid==="ROOT")return te+1+1>C.length?[W]:d(C,te+1,u);throw new Error("Wrong selector "+N.selid)}}else if(N.srchid)var Pn=t.srch[N.srchid.toUpperCase()](W,N.args,f,c);else throw new Error("Selector not found");typeof Pn>"u"&&(Pn={status:1,values:[W]});var Jn=[];if(Pn.status===1){var ls=Pn.values;if(te+1+1>C.length)Jn=ls;else for(var Qr=0;Qr0&&(p&&p[0]&&p[0].srchid==="PROP"&&p[0].args&&p[0].args[0]&&(p[0].args[0].toUpperCase()==="XML"?(f.mode="XML",p.shift()):p[0].args[0].toUpperCase()==="HTML"?(f.mode="HTML",p.shift()):p[0].args[0].toUpperCase()==="JSON"&&(f.mode="JSON",p.shift())),p.length>0&&p[0].srchid==="VALUE"&&(f.value=!0,p.shift())),this.from instanceof V.Column){var b=this.from.databaseid||n;u=t.databases[b].tables[this.from.columnid].data}else if(this.from instanceof V.FuncValue&&t.from[this.from.funcid.toUpperCase()]){var U=this.from.args.map(function(C){var te=C.toJS(),W=new Function("params,alasql","var y;return "+te).bind(this);return W(c,t)});u=t.from[this.from.funcid.toUpperCase()].apply(this,U)}else if(typeof this.from>"u")u=t.databases[n].objects;else{var R=new Function("params,alasql","var y;return "+this.from.toJS());u=R(c,t),typeof Mongo=="object"&&typeof Mongo.Collection!="object"&&u instanceof Mongo.Collection&&(u=u.find().fetch())}if(p!==void 0&&p.length>0?l=d(p,0,u):l=u,this.into)if(this.into instanceof V.ParamValue)typeof this.into.param=="string"?c[this.into.param]=l:c[this.into.param]=l,a&&(l=a(l));else if(this.into instanceof V.VarValue)t.vars[this.into.variable]=l,a&&(l=a(l));else{var L,T;typeof this.into.args[0]<"u"&&(L=new Function("params,alasql","var y;return "+this.into.args[0].toJS())(c,t)),typeof this.into.args[1]<"u"&&(T=new Function("params,alasql","var y;return "+this.into.args[1].toJS())(c,t)),l=t.into[this.into.funcid.toUpperCase()](L,T,l,[],a)}else f.value&&l.length>0&&(l=l[0]),a&&(l=a(l));return l}},t.srch={PROP(n,c,a){if(a.mode==="XML"){let l=n.children.filter(f=>f.name.toUpperCase()===c[0].toUpperCase());return{status:l.length?1:-1,values:l}}else return typeof n!="object"||n===null||typeof c!="object"||typeof n[c[0]]>"u"?{status:-1,values:[]}:{status:1,values:[n[c[0]]]}},APROP(n,c){return typeof n!="object"||n===null||typeof c!="object"||typeof n[c[0]]>"u"?{status:1,values:[void 0]}:{status:1,values:[n[c[0]]]}},EQ(n,c,a,l){var f=c[0].toJS("x",""),u=new Function("x,alasql,params","return "+f);return n===u(n,t,l)?{status:1,values:[n]}:{status:-1,values:[]}},LIKE(n,c,a,l){var f=c[0].toJS("x",""),u=new Function("x,alasql,params","return "+f);return n.toUpperCase().match(new RegExp("^"+u(n,t,l).toUpperCase().replace(/%/g,".*").replace(/\?|_/g,".")+"$"),"g")?{status:1,values:[n]}:{status:-1,values:[]}},ATTR(n,c,a){if(a.mode==="XML")return typeof c>"u"?{status:1,values:[n.attributes]}:typeof n=="object"&&typeof n.attributes=="object"&&typeof n.attributes[c[0]]<"u"?{status:1,values:[n.attributes[c[0]]]}:{status:-1,values:[]};throw new Error("ATTR is not using in usual mode")},CONTENT(n,c,a){if(a.mode!=="XML")throw new Error("ATTR is not using in usual mode");return{status:1,values:[n.content]}},SHARP(n,c){let a=t.databases[t.useid].objects[c[0]];return n!==void 0&&n===a?{status:1,values:[n]}:{status:-1,values:[]}},PARENT(){return console.error("PARENT not implemented",arguments),{status:-1,values:[]}},CHILD(n,c,a){return typeof n=="object"?Array.isArray(n)?{status:1,values:n}:a.mode==="XML"?{status:1,values:Object.keys(n.children).map(function(l){return n.children[l]})}:{status:1,values:Object.keys(n).map(function(l){return n[l]})}:{status:1,values:[]}},KEYS(n){return typeof n=="object"&&n!==null?{status:1,values:Object.keys(n)}:{status:1,values:[]}},WHERE(n,c,a,l){var f=c[0].toJS("x",""),u=new Function("x,alasql,params","return "+f);return u(n,t,l)?{status:1,values:[n]}:{status:-1,values:[]}},NAME(n,c){return n.name===c[0]?{status:1,values:[n]}:{status:-1,values:[]}},CLASS(n,c){return n.$class==c?{status:1,values:[n]}:{status:-1,values:[]}},VERTEX(n){return n.$node==="VERTEX"?{status:1,values:[n]}:{status:-1,values:[]}},INSTANCEOF(n,c){return n instanceof t.fn[c[0]]?{status:1,values:[n]}:{status:-1,values:[]}},EDGE(n){return n.$node==="EDGE"?{status:1,values:[n]}:{status:-1,values:[]}},EX(n,c,a,l){var f=c[0].toJS("x",""),u=new Function("x,alasql,params","return "+f);return{status:1,values:[u(n,t,l)]}},RETURN(n,c,a,l){var f={};return c&&c.length>0&&c.forEach(function(u){var p=u.toJS("x",""),d=new Function("x,alasql,params","return "+p);typeof u.as>"u"&&(u.as=u.toString()),f[u.as]=d(n,t,l)}),{status:1,values:[f]}},REF(n){return{status:1,values:[t.databases[t.useid].objects[n]]}},OUT(n){if(n.$out&&n.$out.length>0){var c=n.$out.map(function(a){return t.databases[t.useid].objects[a]});return{status:1,values:c}}else return{status:-1,values:[]}},OUTOUT(n){if(n.$out&&n.$out.length>0){var c=[];return n.$out.forEach(function(a){var l=t.databases[t.useid].objects[a];l&&l.$out&&l.$out.length>0&&l.$out.forEach(function(f){c=c.concat(t.databases[t.useid].objects[f])})}),{status:1,values:c}}else return{status:-1,values:[]}},IN(n){if(n.$in&&n.$in.length>0){var c=n.$in.map(function(a){return t.databases[t.useid].objects[a]});return{status:1,values:c}}else return{status:-1,values:[]}},ININ(n){if(n.$in&&n.$in.length>0){var c=[];return n.$in.forEach(function(a){var l=t.databases[t.useid].objects[a];l&&l.$in&&l.$in.length>0&&l.$in.forEach(function(f){c=c.concat(t.databases[t.useid].objects[f])})}),{status:1,values:c}}else return{status:-1,values:[]}},AS(n,c){return t.vars[c[0]]=n,{status:1,values:[n]}},AT(n,c){var a=t.vars[c[0]];return{status:1,values:[a]}},CLONEDEEP(n){var c=mn(n);return{status:1,values:[c]}},SET(n,c,a,l){var f=c.map(function(p){return p.method==="@"?`alasql.vars[${JSON.stringify(p.variable)}]=`+p.expression.toJS("x",""):p.method==="$"?`params[${JSON.stringify(p.variable)}]=`+p.expression.toJS("x",""):`x[${JSON.stringify(p.column.columnid)}]=`+p.expression.toJS("x","")}).join(";"),u=new Function("x,params,alasql",f);return u(n,l,t),{status:1,values:[n]}},ROW(n,c,a,l){var f="var y;return [";f+=c.map(d=>d.toJS("x","")).join(","),f+="]";var u=new Function("x,params,alasql",f),p=u(n,l,t);return{status:1,values:[p]}},D3(n){return n.$node!=="VERTEX"&&n.$node==="EDGE"&&(n.source=n.$in[0],n.target=n.$out[0]),{status:1,values:[n]}},ORDERBY(n,c){var a=n.sort(ga(c));return{status:1,values:a}}};var ga=function(n){if(n){if(typeof n?.[0]?.expression=="function"){var c=n[0].expression;return function(f,u){var p=c(f),d=c(u);return p>d?1:p===d?0:-1}}var a="",l="";return n.forEach(function(f){var u="";if(f.expression instanceof V.NumValue&&(f.expression=self.columns[f.expression.value-1]),f.expression instanceof V.Column){var p=f.expression.columnid;t.options.valueof&&(u=".valueOf()"),f.nocase&&(u+=".toUpperCase()"),p==="_"?(a+="if(a"+u+(f.direction==="ASC"?">":"<")+"b"+u+")return 1;",a+="if(a"+u+"==b"+u+"){"):a+=`if ( +}`),this._recordBatchesWithDictionaries=[],this._recordBatches=[],super.close()}}});function e9(t,e){if(Hl(t))return fw(t,e);if(_c(t))return uw(t,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}function uw(t,e){let r=null,i=e?.type==="bytes"||!1,s=e?.highWaterMark||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},e),{start(d){a(d,r||(r=t[Symbol.iterator]()))},pull(d){r?a(d,r):d.close()},cancel(){r?.return&&r.return(),r=null}}),Object.assign({highWaterMark:i?s:void 0},e));function a(d,m){let v,_=null,x=d.desiredSize||null;for(;!(_=m.next(i?x:null)).done;)if(ArrayBuffer.isView(_.value)&&(v=Wn(_.value))&&(x!=null&&i&&(x=x-v.byteLength+1),_.value=v),d.enqueue(_.value),x!=null&&--x<=0)return;d.close()}}function fw(t,e){let r=null,i=e?.type==="bytes"||!1,s=e?.highWaterMark||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},e),{start(d){return An(this,void 0,void 0,function*(){yield a(d,r||(r=t[Symbol.asyncIterator]()))})},pull(d){return An(this,void 0,void 0,function*(){r?yield a(d,r):d.close()})},cancel(){return An(this,void 0,void 0,function*(){r?.return&&(yield r.return()),r=null})}}),Object.assign({highWaterMark:i?s:void 0},e));function a(d,m){return An(this,void 0,void 0,function*(){let v,_=null,x=d.desiredSize||null;for(;!(_=yield m.next(i?x:null)).done;)if(ArrayBuffer.isView(_.value)&&(v=Wn(_.value))&&(x!=null&&i&&(x=x-v.byteLength+1),_.value=v),d.enqueue(_.value),x!=null&&--x<=0)return;d.close()})}}var t9=Dt(()=>{W1();wo();Rf()});function i9(t){return new ig(t)}var ig,r9,n9,s9=Dt(()=>{W1();Hp();ig=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:r,["writableStrategy"]:i,["queueingStrategy"]:s="count"}=e,a=p7(e,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=kc(a),this._getSize=s!=="bytes"?r9:n9;let{["highWaterMark"]:d=s==="bytes"?Math.pow(2,14):1e3}=Object.assign({},r),{["highWaterMark"]:m=s==="bytes"?Math.pow(2,14):1e3}=Object.assign({},i);this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:v=>{this._maybeFlush(this._builder,this._controller=v)},start:v=>{this._maybeFlush(this._builder,this._controller=v)}},{highWaterMark:d,size:s!=="bytes"?r9:n9}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:m,size:v=>this._writeValueAndReturnChunkSize(v)})}_writeValueAndReturnChunkSize(e){let r=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(e)),this._bufferedSize-r}_maybeFlush(e,r){r!=null&&(this._bufferedSize>=r.desiredSize&&++this._numChunks&&this._enqueue(r,e.toVector()),e.finished&&((e.length>0||this._numChunks===0)&&++this._numChunks&&this._enqueue(r,e.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(r,null)))}_enqueue(e,r){this._bufferedSize=0,this._controller=null,r==null?e.close():e.enqueue(r)}},r9=t=>{var e;return(e=t?.length)!==null&&e!==void 0?e:0},n9=t=>{var e;return(e=t?.byteLength)!==null&&e!==void 0?e:0}});function Pm(t,e){let r=new Jl,i=null,s=new ReadableStream({cancel(){return An(this,void 0,void 0,function*(){yield r.close()})},start(m){return An(this,void 0,void 0,function*(){yield d(m,i||(i=yield a()))})},pull(m){return An(this,void 0,void 0,function*(){i?yield d(m,i):m.close()})}});return{writable:new WritableStream(r,Object.assign({highWaterMark:Math.pow(2,14)},t)),readable:s};function a(){return An(this,void 0,void 0,function*(){return yield(yield R1.from(r)).open(e)})}function d(m,v){return An(this,void 0,void 0,function*(){let _=m.desiredSize,x=null;for(;!(x=yield v.next()).done;)if(m.enqueue(x.value),_!=null&&--_<=0)return;m.close()})}}var a9=Dt(()=>{W1();t2();Jp()});function Um(t,e){let r=new this(t),i=new Z1(r),s=new ReadableStream({cancel(){return An(this,void 0,void 0,function*(){yield i.cancel()})},pull(d){return An(this,void 0,void 0,function*(){yield a(d)})},start(d){return An(this,void 0,void 0,function*(){yield a(d)})}},Object.assign({highWaterMark:Math.pow(2,14)},e));return{writable:new WritableStream(r,t),readable:s};function a(d){return An(this,void 0,void 0,function*(){let m=null,v=d.desiredSize;for(;m=yield i.read(v||null);)if(d.enqueue(m),v!=null&&(v-=m.byteLength)<=0)return;d.close()})}}var o9=Dt(()=>{W1();t2()});function Vm(t){let e=R1.from(t);return yl(e)?e.then(r=>Vm(r)):e.isAsync()?e.readAll().then(r=>new Hs(r)):new Hs(e.readAll())}function sg(t,e="stream",r=null){let i={compressionType:r};return(e==="stream"?cf:uf).writeAll(t,i).toUint8Array(!0)}var l9=Dt(()=>{B3();Rf();Jp();$m()});var ag={};vc(ag,{isArrowData:()=>Hm,isArrowDataType:()=>qm,isArrowField:()=>jm,isArrowRecordBatch:()=>Wm,isArrowSchema:()=>Gm,isArrowTable:()=>Ym,isArrowVector:()=>zm});function Gm(t){return Ui.isSchema(t)}function jm(t){return ui.isField(t)}function qm(t){return Hr.isDataType(t)}function Hm(t){return Ti.isData(t)}function zm(t){return Tn.isVector(t)}function Wm(t){return hs.isRecordBatch(t)}function Ym(t){return Hs.isTable(t)}var og=Dt(()=>{f1();vs();Yl();c1();nf();B3()});var c9,lg=Dt(()=>{R4();Hd();oa();Yl();vs();B3();c1();K1();f1();kp();Z4();Ms();Hp();y8();L8();b8();v8();_8();x8();E8();T8();R8();D8();w8();A8();k8();M8();F8();_m();Sm();xm();I8();O8();S8();C8();N8();B8();t2();Jp();$m();l9();Dm();Nm();e2();nf();og();B4();f8();s3();Bp();wo();sh();hp();ym();og();Xp();c9=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},B5),u8),J5),k5),e5),X5),L5),g8),ag),{compareSchemas:R3,compareFields:Nv,compareTypes:Am})});var u9={};vc(u9,{AsyncByteQueue:()=>Jl,AsyncByteStream:()=>Z1,AsyncMessageReader:()=>F3,AsyncRecordBatchFileReader:()=>gh,AsyncRecordBatchStreamReader:()=>sf,Binary:()=>Ic,BinaryBuilder:()=>Ku,BinaryView:()=>Oi,BinaryViewBuilder:()=>ef,Bool:()=>_l,BoolBuilder:()=>u3,BufferType:()=>zo,Builder:()=>ws,ByteStream:()=>Kl,CompressionType:()=>Ho,Data:()=>Ti,DataType:()=>Hr,DateBuilder:()=>fu,DateDay:()=>mp,DateDayBuilder:()=>n2,DateMillisecond:()=>gp,DateMillisecondBuilder:()=>i2,DateUnit:()=>Es,Date_:()=>xl,Decimal:()=>Lc,DecimalBuilder:()=>s2,DenseUnion:()=>Np,DenseUnionBuilder:()=>N3,Dictionary:()=>Wo,DictionaryBuilder:()=>f3,Duration:()=>O1,DurationBuilder:()=>Ql,DurationMicrosecond:()=>Cp,DurationMicrosecondBuilder:()=>d2,DurationMillisecond:()=>Op,DurationMillisecondBuilder:()=>f2,DurationNanosecond:()=>Lp,DurationNanosecondBuilder:()=>h2,DurationSecond:()=>Ip,DurationSecondBuilder:()=>u2,Field:()=>ui,FixedSizeBinary:()=>Nc,FixedSizeBinaryBuilder:()=>a2,FixedSizeList:()=>El,FixedSizeListBuilder:()=>h3,Float:()=>X1,Float16:()=>Qd,Float16Builder:()=>p3,Float32:()=>Yf,Float32Builder:()=>m3,Float64:()=>lu,Float64Builder:()=>g3,FloatBuilder:()=>du,Int:()=>ja,Int16:()=>jf,Int16Builder:()=>b3,Int32:()=>l1,Int32Builder:()=>v3,Int64:()=>ou,Int64Builder:()=>_3,Int8:()=>Gf,Int8Builder:()=>y3,IntBuilder:()=>N1,Interval:()=>J1,IntervalBuilder:()=>Fc,IntervalDayTime:()=>wp,IntervalDayTimeBuilder:()=>o2,IntervalMonthDayNano:()=>Tp,IntervalMonthDayNanoBuilder:()=>c2,IntervalUnit:()=>Ji,IntervalYearMonth:()=>Ap,IntervalYearMonthBuilder:()=>l2,JSONMessageReader:()=>M3,LargeBinary:()=>Oc,LargeBinaryBuilder:()=>Qu,LargeList:()=>Sl,LargeListBuilder:()=>T3,LargeUtf8:()=>Cc,LargeUtf8Builder:()=>E2,List:()=>C1,ListBuilder:()=>A3,MapBuilder:()=>I3,MapRow:()=>Wl,Map_:()=>wl,Message:()=>h1,MessageHeader:()=>Pi,MessageReader:()=>w2,MetadataVersion:()=>fs,Null:()=>Ao,NullBuilder:()=>O3,Precision:()=>ds,RecordBatch:()=>hs,RecordBatchFileReader:()=>af,RecordBatchFileWriter:()=>uf,RecordBatchJSONWriter:()=>Qp,RecordBatchReader:()=>R1,RecordBatchStreamReader:()=>Mc,RecordBatchStreamWriter:()=>cf,RecordBatchWriter:()=>pu,Schema:()=>Ui,SparseUnion:()=>Dp,SparseUnionBuilder:()=>L3,Struct:()=>_s,StructBuilder:()=>C3,StructRow:()=>cu,Table:()=>Hs,Time:()=>T1,TimeBuilder:()=>ec,TimeMicrosecond:()=>vp,TimeMicrosecondBuilder:()=>_2,TimeMillisecond:()=>bp,TimeMillisecondBuilder:()=>v2,TimeNanosecond:()=>_p,TimeNanosecondBuilder:()=>x2,TimeSecond:()=>yp,TimeSecondBuilder:()=>b2,TimeUnit:()=>cn,Timestamp:()=>I1,TimestampBuilder:()=>Zl,TimestampMicrosecond:()=>Sp,TimestampMicrosecondBuilder:()=>g2,TimestampMillisecond:()=>e3,TimestampMillisecondBuilder:()=>m2,TimestampNanosecond:()=>Ep,TimestampNanosecondBuilder:()=>y2,TimestampSecond:()=>xp,TimestampSecondBuilder:()=>p2,Type:()=>fe,Uint16:()=>Hf,Uint16Builder:()=>S3,Uint32:()=>zf,Uint32Builder:()=>E3,Uint64:()=>Wf,Uint64Builder:()=>w3,Uint8:()=>qf,Uint8Builder:()=>x3,Union:()=>L1,UnionBuilder:()=>Zu,UnionMode:()=>ns,Utf8:()=>vl,Utf8Builder:()=>S2,Utf8View:()=>A1,Utf8ViewBuilder:()=>D3,Vector:()=>Tn,Visitor:()=>jn,builderThroughAsyncIterable:()=>G8,builderThroughIterable:()=>Im,compressionRegistry:()=>A2,isArrowData:()=>Hm,isArrowDataType:()=>qm,isArrowField:()=>jm,isArrowRecordBatch:()=>Wm,isArrowSchema:()=>Gm,isArrowTable:()=>Ym,isArrowVector:()=>zm,makeBuilder:()=>kc,makeData:()=>kn,makeTable:()=>j8,makeVector:()=>Qf,tableFromArrays:()=>q8,tableFromIPC:()=>Vm,tableFromJSON:()=>V8,tableToIPC:()=>sg,util:()=>c9,vectorFromArray:()=>hh});var f9=Dt(()=>{Qh();Ms();Jp();$m();t9();s9();a9();o9();lg();lg();jo.toDOMStream=e9;ws.throughDOM=i9;R1.throughDOM=Pm;af.throughDOM=Pm;Mc.throughDOM=Pm;pu.throughDOM=Um;uf.throughDOM=Um;cf.throughDOM=Um});var d9=Zg((mu,$3)=>{"use strict";(function(t,e){typeof define=="function"&&define.amd?define([],e):typeof mu=="object"?$3.exports=e():t.alasql=e()})(mu,function(){let t=function(n,c,o,l){if(c=c||[],typeof importScripts!="function"&&t.webworker){var f=t.lastid++;t.buffer[f]=o,t.webworker.postMessage({id:f,sql:n,params:c});return}return arguments.length===0?new V.Select({columns:[new V.Column({columnid:"*"})],from:[new V.ParamValue({param:0})]}):arguments.length===1&&n.constructor===Array?t.promise(n):(typeof c=="function"&&(l=o,o=c,c=[]),typeof c!="object"&&(c=[c]),typeof n=="string"&&n[0]==="#"&&typeof document=="object"?n=document.querySelector(n).textContent:typeof n=="object"&&n instanceof HTMLElement?n=n.textContent:typeof n=="function"&&(n=n.toString(),n=(/\/\*([\S\s]+)\*\//m.exec(n)||["","Function given as SQL. Plese Provide SQL string or have a /* ... */ syle comment with SQL in the function."])[1]),t.exec(n,c,o,l))};t.version="4.17.2",t.build="develop-f960d23a",t.debug=void 0;var e=function(){return null},r="",i=(function(){var n=function(ba,Jr,En,A){for(En=En||{},A=ba.length;A--;En[ba[A]]=Jr);return En},c=[2,17],o=[1,112],l=[1,106],f=[1,107],u=[1,108],p=[1,109],h=[1,110],b=[1,111],U=[1,6],R=[1,43],L=[1,81],T=[1,77],C=[1,78],te=[1,98],W=[1,97],Y=[1,70],F=[1,105],N=[1,87],Ae=[1,65],je=[1,72],Ot=[1,86],Oe=[1,67],Te=[1,71],ht=[1,69],Tt=[1,62],$t=[1,75],yr=[1,63],le=[1,68],mr=[1,85],Vt=[1,79],Bt=[1,88],Zr=[1,89],Un=[1,100],$i=[1,83],Bi=[1,84],Yn=[1,82],Vn=[1,90],ni=[1,91],cs=[1,92],Ds=[1,93],Cn=[1,94],oi=[1,95],ms=[1,96],gs=[1,102],To=[1,66],Qo=[1,80],Io=[1,73],Mo=[1,101],Sa=[1,64],$o=[1,74],Pc=[1,116],ac=[1,115],ao=[14,339,639,798],Ce=[14,339,343,639,798],Uc=[2,251],$1=[1,121],oc=[1,123],Zo=[1,122],Fe=[1,128],Xi=[1,130],Me=[1,129],$e=[1,131],Le=[1,132],be=[1,133],Ne=[1,134],lc=[139,388,447],cc=[1,142],pf=[1,141],P1=[1,149],It=[1,179],De=[1,194],Pe=[1,197],vt=[1,190],ve=[1,200],it=[1,204],pt=[1,175],Ee=[1,201],Ue=[1,186],_t=[1,188],mt=[1,193],me=[1,202],gt=[1,191],We=[1,219],qe=[1,220],at=[1,192],ct=[1,181],ot=[1,182],ut=[1,212],dt=[1,207],yt=[1,208],xt=[1,184],Xe=[1,213],Je=[1,214],rt=[1,215],Ke=[1,216],ze=[1,217],Ye=[1,218],Qe=[1,221],Ze=[1,222],et=[1,195],nt=[1,196],Re=[1,198],st=[1,199],bt=[1,205],St=[1,211],we=[1,203],Et=[1,206],wt=[1,189],At=[1,187],ge=[1,210],pe=[1,223],rl=[2,4,5,6,7,8,9,152,161,190,335],U1=[2,502],uc=[1,227],Vc=[1,232],Po=[1,241],Dl=[1,239],_u=[14,77,84,103,108,127,137,171,177,178,192,207,252,271,273,339,343,503,639,798],U3=[1,246],Gc=[2,4,5,6,7,8,9,14,77,82,83,84,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,192,194,196,207,266,267,304,313,314,315,316,317,318,319,320,339,343,457,461,503,639,798],hn=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],ys=[1,275],xu=[1,282],jc=[1,283],V1=[1,288],Su=[1,293],Ea=[1,298],y1=[1,297],b1=[2,4,5,6,7,8,9,14,77,83,84,103,108,116,127,137,140,141,146,152,154,158,161,163,165,171,177,178,188,189,190,192,207,229,252,266,267,271,273,281,292,293,294,298,299,301,304,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,335,336,339,343,345,350,457,461,503,639,798],mf=[2,175],fc=[1,309],V3=[14,79,84,339,343,466,639,798],X=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,202,207,215,217,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,335,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,379,391,403,404,407,408,423,426,433,437,438,439,440,441,442,443,445,446,454,455,457,461,463,466,471,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,552,553,554,555,639,798],G3=[2,4,5,6,7,8,9,14,58,77,83,96,133,155,165,198,294,295,322,339,368,372,373,433,437,438,441,443,445,446,454,455,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,545,546,555,639,798],gf=[14,77,84,271,273,339,343,503,639,798],D2=[2,263],R2=[1,595],Rl=[83,198],Bl=[1,607],qc=[1,609],B2=[1,610],Uo=[2,4,5,6,7,8,9],oo=[2,534],nl=[1,616],Oo=[1,627],G1=[1,630],v1=[1,631],k2=[14,83,84,96,141,146,155,198,329,339,343,509,639,798],lo=[14,79,339,343,639,798],Eu=[2,605],yf=[1,649],il=[2,4,5,6,7,8,9,165],Dr=[1,687],Ur=[1,659],Ft=[1,693],Rt=[1,694],tr=[1,667],bf=[1,678],ur=[1,665],nr=[1,673],fr=[1,666],fn=[1,674],an=[1,676],wr=[1,668],Lr=[1,669],pn=[1,688],vn=[1,685],xn=[1,686],dr=[1,662],ir=[1,664],Ar=[1,656],Xt=[1,657],Fr=[1,658],Vr=[1,660],Jt=[1,661],br=[1,663],Tr=[1,670],Ir=[1,671],on=[1,675],ln=[1,677],rn=[1,679],jr=[1,680],nn=[1,681],en=[1,682],zr=[1,683],dn=[1,689],sn=[1,690],kr=[1,691],yn=[1,692],F2=[1,702],wu=[1,699],Hc=[2,4,5,6,7,8,9,14,58,77,79,82,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Au=[2,301],j3=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],q3=[2,299],H3=[2,300],ua=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],z3=[2,383],dc=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,335,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,379,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],M2=[1,718],Tu=[1,728],co=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Iu=[1,745],Is=[1,747],xs=[1,748],kl=[1,738],W3=[1,756],Y3=[1,755],vf=[2,4,5,6,7,8,9,14,77,79,84,103,108,127,137,171,177,178,215,217,242,243,244,245,246,247,248,249,250,251,252,271,273,339,343,503,639,798],ki=[14,77,79,84,103,108,127,137,171,177,178,215,217,242,243,244,245,246,247,248,249,250,251,252,271,273,339,343,503,639,798],e1=[1,772],$2=[2,206],X3=[1,781],hc=[14,77,84,103,108,127,137,171,177,178,192,252,271,273,339,343,503,639,798],P2=[2,176],U2=[1,784],J3=[2,4,5,6,7,8,9,121,229,281],Co=[14,77,84,127,271,273,339,343,503,639,798],uo=[1,798],fo=[1,817],Ya=[1,797],fa=[1,796],Xa=[1,791],wa=[1,792],ho=[1,794],da=[1,795],po=[1,799],mo=[1,800],go=[1,801],yo=[1,802],bo=[1,803],na=[1,804],vo=[1,805],ha=[1,806],_o=[1,807],Ws=[1,808],Ys=[1,809],xo=[1,810],Xs=[1,811],Ja=[1,812],Js=[1,813],Aa=[1,814],Ta=[1,816],Ia=[1,818],ia=[1,819],sa=[1,820],pa=[1,821],Oa=[1,822],Ka=[1,823],Ca=[1,824],Qa=[1,827],La=[1,828],ma=[1,829],ga=[1,830],Na=[1,831],Da=[1,832],Za=[1,833],Ra=[1,834],Ba=[1,835],Ks=[1,836],eo=[1,838],ka=[1,839],Fa=[1,837],pc=[79,83,96,198],mc=[14,83,96,137,152,154,155,158,161,190,198,335,339,343,378,379,457,461,503,639,798],Di=[14,79,84,163,196,250,330,339,343,378,391,403,404,407,408,639,798],S=[1,858],P=[14,79,84,333,339,343,639,798],ee=[1,859],lt=[1,866],qt=[1,867],Gr=[1,871],Kt=[14,79,84,339,343,639,798],Or=[2,4,5,6,7,8,9,83,140,141,146,152,154,158,161,163,165,188,189,190,229,266,267,281,292,293,294,298,299,301,304,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,335,336,345,350,457,461],sr=[14,77,84,103,108,116,127,137,171,177,178,192,207,252,271,273,339,343,503,639,798],Gn=[2,4,5,6,7,8,9,14,77,83,84,103,108,116,127,137,140,141,146,152,154,158,161,163,165,171,173,177,178,188,189,190,192,194,196,204,207,229,252,266,267,271,273,281,292,293,294,298,299,301,304,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,335,336,339,343,345,350,457,461,503,639,798],Gi=[14,77,84,339,343,503,639,798],Rs=[2,274],sl=[1,884],t1=[1,885],Lo=[2,4,5,6,7,8,9,141,329],zc=[1,915],Wc=[14,79,82,84,339,343,639,798],_f=[2,783],Ou=[14,79,82,84,141,148,150,154,161,339,343,457,461,639,798],xf=[2,1238],Sf=[14,79,82,84,148,150,154,161,339,343,457,461,639,798],_1=[14,79,82,84,148,150,154,339,343,457,461,639,798],Cu=[14,79,84,148,150,339,343,639,798],Yc=[14,83,84,96,141,155,198,329,339,343,509,639,798],Ef=[368,372,373],d0=[2,809],Eh=[1,940],wh=[1,941],Ah=[1,942],h0=[1,943],al=[1,952],Xc=[1,951],Bs=[2,762],ks=[1,955],Jc=[173,175,367],p0=[2,468],m0=[1,1009],g0=[2,4,5,6,7,8,9,83,140,165,293,322,323,324,325,326],y0=[1,1027],b0=[1,1026],K3=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,127,131,133,137,138,139,140,141,143,144,146,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,347,348,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Th=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],v0=[2,399],_0=[1,1038],Ih=[339,341,343],Q3=[79,333],r1=[79,333,463],V2=[1,1046],G2=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Fl=[79,463],Ml=[1,1065],$l=[1,1064],j1=[1,1072],Kc=[14,77,84,103,108,127,137,171,177,178,252,271,273,339,343,503,639,798],j2=[2,186],q2=[1,1085],H2=[1,1095],Pl=[2,84],Ma=[1,1102],$a=[1,1103],Pa=[1,1104],Xn=[2,4,5,6,7,8,9,14,77,79,82,83,84,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,207,266,267,304,313,314,315,316,317,318,319,320,339,343,457,461,503,639,798],Qc=[1,1157],Ul=[1,1156],Zc=[1,1171],Oh=[1,1170],eu=[1,1178],gc=[14,77,79,84,103,108,116,127,137,171,177,178,192,207,252,271,273,339,343,503,639,798],z2=[2,348],W2=[1,1203],Vl=[1,1219],Ch=[14,83,84,96,155,198,339,343,509,639,798],Lh=[1,1239],Nh=[1,1238],x0=[1,1237],Lu=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],S0=[1,1254],x1=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,347,348,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Dh=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,348,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],tu=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,127,131,133,137,138,139,140,141,142,143,144,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,347,348,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],ol=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,127,131,133,137,138,139,140,141,143,144,146,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,347,348,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],ll=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,347,353,354,355,356,357,358,359,363,364,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Z3=[2,430],wf=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,116,127,131,137,138,139,140,141,143,144,146,152,154,155,157,158,159,161,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,347,363,364,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Rh=[2,320],Qs=[9,84],yc=[2,352],Vs=[1,1272],Vo=[2,296],Nu=[2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],hi=[14,84,339,343,639,798],n1=[1,1298],E0=[14,83,84,152,154,161,190,335,339,343,457,461,503,639,798],Af=[14,79,84,339,341,343,503,639,798],Bh=[1,1316],w0=[1,1319],A0=[2,1146],q1=[14,77,84,127,137,171,177,178,252,271,273,339,343,503,639,798],T0=[1,1325],I0=[1,1326],Y2=[14,77,79,84,103,108,127,137,171,177,178,192,207,252,271,273,339,343,503,639,798],So=[2,4,5,6,7,8,9,77,82,83,84,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,194,196,266,267,304,313,314,315,316,317,318,319,320,457,461],Gl=[2,4,5,6,7,8,9,77,79,82,83,84,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,194,196,266,267,304,313,314,315,316,317,318,319,320,457,461],Tf=[2,1140],O0=[2,4,5,6,7,8,9,77,79,82,83,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,194,196,266,267,304,313,314,315,316,317,318,319,320,457,461],jl=[1,1372],No=[14,77,79,84,103,108,127,137,171,177,178,215,217,242,243,244,245,246,247,248,249,252,271,273,339,343,503,639,798],E=[2,518],k=[1,1375],Z=[14,79,84,137,339,341,343,503,639,798],Ge=[124,125,133],Ct=[1,1392],Be=[9,14,77,79,84,271,273,339,343,503,639,798],ft=[2,622],Pt=[1,1413],Ut=[82,148],Qt=[2,769],rr=[1,1430],Zt=[1,1431],vr=[2,4,5,6,7,8,9,14,58,77,82,83,96,133,155,165,198,250,294,295,322,339,343,368,372,373,433,437,438,441,443,445,446,454,455,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,545,546,555,639,798],Gt=[1,1460],Yt=[2,354],_e=[1,1477],Ve=[79,84],Ht=[1,1486],or=[14,339,341,343,503,639,798],Mt=[14,77,84,127,171,177,178,252,271,273,339,343,503,639,798],Mr=[2,237],Rr=[1,1496],Sn=[1,1500],Nt=[1,1504],Lt=[1,1505],Wr=[1,1507],gr=[1,1508],jt=[1,1509],xr=[1,1510],Sr=[1,1511],zn=[1,1512],Fn=[1,1513],Cr=[1,1514],Nr=[1,1538],Rn=[84,127],Mn=[14,77,84,127,171,177,178,271,273,339,343,503,639,798],Ei=[2,239],Ss=[1,1642],Ts=[1,1658],Ai=[1,1660],ts=[2,4,5,6,7,8,9,83,152,154,161,165,190,293,322,323,324,325,326,335,457,461],bs=[1,1697],Gs=[1,1699],Zs=[1,1700],ea=[1,1696],ya=[1,1695],Ua=[1,1694],Os=[1,1701],li=[1,1691],Va=[1,1692],ji=[1,1693],Nn=[1,1723],vi=[2,4,5,6,7,8,9,14,58,77,83,96,133,155,165,198,294,295,322,339,343,368,372,373,433,437,438,441,443,445,446,454,455,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,545,546,555,639,798],Ri=[1,1746],Cs=[1,1745],Go=[1,1797],H1=[1,1798],H=[1,1796],tt=[1,1812],ke=[1,1814],Yr=[1,1811],_i=[1,1813],G=[196,202,403,404,407],D=[2,546],ie=[1,1819],ye=[1,1836],Se=[14,77,84,339,343,452,503,639,798],ce=[1,1859],ae=[1,1866],de=[14,77,79,84,127,171,177,178,259,271,273,339,343,503,639,798],M=[4,14,269,339,343,378,391,639,798],ne=[2,249],j=[1,1903],xe=[14,79,84,163,196,330,339,343,378,391,403,404,407,408,639,798],Ie=[2,552],kt=[1,1918],hr=[1,1966],pr=[1,1965],Br=[1,1987],lr=[1,1998],tn=[1,1997],qr=[1,1999],Kr=[1,2e3],Xr=[1,2007],Qr=[1,2024],Bn=[14,79,84,250,339,343,639,798],rs={trace:function(){},yy:{},symbols_:{error:2,Literal:3,LITERAL:4,BRALITERAL:5,KEY:6,OPEN:7,CLOSE:8,SEPARATOR:9,NonReserved:10,LiteralWithSpaces:11,main:12,Statements:13,EOF:14,Statements_group0:15,AStatement:16,ExplainStatement:17,EXPLAIN:18,QUERY:19,PLAN:20,Statement:21,AlterTable:22,AttachDatabase:23,Call:24,CreateDatabase:25,CreateIndex:26,CreateGraph:27,CreateTable:28,CreateView:29,CreateEdge:30,CreateVertex:31,Declare:32,Delete:33,DetachDatabase:34,DropDatabase:35,DropIndex:36,DropTable:37,DropView:38,If:39,Insert:40,Merge:41,Reindex:42,RenameTable:43,Select:44,ParenthesizedSelect:45,ShowCreateTable:46,ShowColumns:47,ShowDatabases:48,ShowIndex:49,ShowTables:50,TruncateTable:51,WithSelect:52,CreateTrigger:53,DropTrigger:54,BeginTransaction:55,CommitTransaction:56,RollbackTransaction:57,EndTransaction:58,UseDatabase:59,Update:60,JavaScript:61,Source:62,Assert:63,While:64,Continue:65,Break:66,BeginEnd:67,Print:68,Require:69,SetVariable:70,ExpressionStatement:71,AddRule:72,Query:73,Echo:74,CreateFunction:75,CreateAggregate:76,WITH:77,WithTablesList:78,COMMA:79,WithTable:80,RECURSIVE:81,AS:82,LPAR:83,RPAR:84,ColumnsList:85,SelectClause:86,Select_option0:87,IntoClause:88,FromClause:89,Select_option1:90,WhereClause:91,GroupClause:92,UnionClause:93,OrderClause:94,LimitClause:95,SEARCH:96,Select_repetition0:97,Select_option2:98,SelectWithoutOrderOrLimit:99,SelectWithoutOrderOrLimit_option0:100,SelectWithoutOrderOrLimit_option1:101,PivotClause:102,PIVOT:103,Expression:104,FOR:105,PivotClause_option0:106,PivotClause_option1:107,UNPIVOT:108,IN:109,PivotClause_option2:110,PivotClause2:111,AsList:112,AsLiteral:113,AsPart:114,RemoveClause:115,REMOVE:116,RemoveClause_option0:117,RemoveColumnsList:118,RemoveColumn:119,Column:120,LIKE:121,StringValue:122,ArrowDot:123,ARROW:124,DOT:125,SearchSelector:126,ORDER:127,BY:128,OrderExpressionsList:129,SearchSelector_option0:130,DOTDOT:131,CARET:132,EQ:133,SearchSelector_repetition_plus0:134,SearchSelector_repetition_plus1:135,SearchSelector_option1:136,WHERE:137,OF:138,CLASS:139,NUMBER:140,STRING:141,SLASH:142,VERTEX:143,EDGE:144,EXCLAMATION:145,SHARP:146,MODULO:147,GT:148,LT:149,GTGT:150,LTLT:151,DOLLAR:152,Json:153,AT:154,SET:155,SetColumnsList:156,TO:157,VALUE:158,ROW:159,ExprList:160,COLON:161,PlusStar:162,NOT:163,SearchSelector_repetition2:164,IF:165,SearchSelector_repetition3:166,Aggregator:167,SearchSelector_repetition4:168,SearchSelector_group0:169,SearchSelector_repetition5:170,UNION:171,SearchSelectorList:172,ALL:173,SearchSelector_repetition6:174,ANY:175,SearchSelector_repetition7:176,INTERSECT:177,EXCEPT:178,AND:179,OR:180,PATH:181,RETURN:182,ResultColumns:183,REPEAT:184,SearchSelector_repetition8:185,SearchSelectorList_repetition0:186,SearchSelectorList_repetition1:187,PLUS:188,STAR:189,QUESTION:190,SearchFrom:191,FROM:192,SelectModifier:193,DISTINCT:194,TopClause:195,UNIQUE:196,SelectClause_option0:197,SELECT:198,COLUMN:199,MATRIX:200,TEXTSTRING:201,INDEX:202,RECORDSET:203,TOP:204,NumValue:205,TopClause_option0:206,INTO:207,Table:208,FuncValue:209,ParamValue:210,VarValue:211,FromTablesList:212,JoinTablesList:213,ApplyClause:214,CROSS:215,APPLY:216,OUTER:217,FromTable:218,FromTable_option0:219,FromTable_option1:220,FromTable_option2:221,FromTable_option3:222,INDEXED:223,FromTable_option4:224,FromTable_option5:225,FromTable_option6:226,FromString:227,FromTable_option7:228,INSERTED:229,FromTableAlias:230,TargetTable:231,JoinTable:232,JoinMode:233,JoinTableAs:234,OnClause:235,JoinTableAs_option0:236,JoinTableAs_option1:237,JoinTableAs_option2:238,JoinTableAs_option3:239,JoinTableAs_option4:240,JoinModeMode:241,NATURAL:242,JOIN:243,INNER:244,LEFT:245,RIGHT:246,FULL:247,SEMI:248,ANTI:249,ON:250,USING:251,GROUP:252,GroupExpressionsList:253,HavingClause:254,ROLLUP:255,CUBE:256,GroupExpression:257,GROUPING:258,HAVING:259,UnionOp:260,UnionableSelect:261,CORRESPONDING:262,OrderExpression:263,NullsOrder:264,NULLS:265,FIRST:266,LAST:267,DIRECTION:268,COLLATE:269,NOCASE:270,LIMIT:271,OffsetClause:272,OFFSET:273,LimitClause_option0:274,FETCH:275,LimitClause_option1:276,LimitClause_option2:277,LimitClause_option3:278,ResultColumn:279,Star:280,DELETED:281,AggrValue:282,Op:283,LogicValue:284,NullValue:285,ExistsValue:286,CaseValue:287,CastClause:288,ArrayValue:289,NewClause:290,Expression_group0:291,CURRENT_TIMESTAMP:292,CURRENT_DATE:293,JAVASCRIPT:294,CREATE:295,FUNCTION:296,AGGREGATE:297,NEW:298,CAST:299,ColumnType:300,CONVERT:301,PrimitiveValue:302,OverClause:303,GROUP_CONCAT:304,GroupConcatOrderClause:305,GroupConcatSeparatorClause:306,OVER:307,OverClause_option0:308,OverClause_option1:309,OverPartitionClause:310,PARTITION:311,OverOrderByClause:312,SUM:313,TOTAL:314,COUNT:315,MIN:316,MAX:317,AVG:318,AGGR:319,ARRAY:320,FuncValue_option0:321,REPLACE:322,DATEADD:323,DATEDIFF:324,TIMESTAMPDIFF:325,INTERVAL:326,TRUE:327,FALSE:328,NSTRING:329,NULL:330,EXISTS:331,ARRAYLBRA:332,RBRA:333,ParamValue_group0:334,BRAQUESTION:335,CASE:336,WhensList:337,ElseClause:338,END:339,When:340,WHEN:341,THEN:342,ELSE:343,REGEXP:344,TILDA:345,GLOB:346,ESCAPE:347,NOT_LIKE:348,BARBAR:349,MINUS:350,AMPERSAND:351,BAR:352,GE:353,LE:354,EQEQ:355,EQEQEQ:356,NE:357,NEEQEQ:358,NEEQEQEQ:359,CondOp:360,AllSome:361,ColFunc:362,BETWEEN:363,NOT_BETWEEN:364,IS:365,DOUBLECOLON:366,SOME:367,UPDATE:368,OutputClause:369,SetColumn:370,SetColumn_group0:371,DELETE:372,INSERT:373,Into:374,Values:375,ValuesListsList:376,IGNORE:377,DEFAULT:378,VALUES:379,ValuesList:380,Value:381,DateValue:382,TemporaryClause:383,TableClass:384,IfNotExists:385,CreateTableDefClause:386,CreateTableOptionsClause:387,TABLE:388,CreateTableOptions:389,CreateTableOption:390,IDENTITY:391,TEMP:392,ColumnDefsList:393,ConstraintsList:394,Constraint:395,ConstraintName:396,PrimaryKey:397,ForeignKey:398,UniqueKey:399,IndexKey:400,Check:401,CONSTRAINT:402,CHECK:403,PRIMARY:404,PrimaryKey_option0:405,ColsList:406,FOREIGN:407,REFERENCES:408,ForeignKey_option0:409,OnReferentialActions:410,ParColsList:411,OnDeleteClause:412,OnUpdateClause:413,ReferentialAction:414,CASCADE:415,RESTRICT:416,NO:417,ACTION:418,UniqueKey_option0:419,UniqueKey_option1:420,ColumnDef:421,ColumnConstraintsClause:422,ColumnConstraints:423,SingularColumnType:424,NumberMax:425,ENUM:426,MAXNUM:427,ColumnConstraintsList:428,ColumnConstraint:429,ParLiteral:430,ColumnConstraint_option0:431,ColumnConstraint_option1:432,DROP:433,DropTable_group0:434,IfExists:435,TablesList:436,ALTER:437,RENAME:438,ADD:439,MODIFY:440,ATTACH:441,DATABASE:442,DETACH:443,AsClause:444,USE:445,SHOW:446,VIEW:447,CreateView_option0:448,CreateView_option1:449,SubqueryRestriction:450,READ:451,ONLY:452,OPTION:453,SOURCE:454,ASSERT:455,JsonObject:456,ATLBRA:457,JsonArray:458,JsonValue:459,JsonPrimitiveValue:460,LCUR:461,JsonPropertiesList:462,RCUR:463,JsonElementsList:464,JsonProperty:465,COLONDASH:466,OnOff:467,SetPropsList:468,AtDollar:469,SetProp:470,OFF:471,COMMIT:472,TRANSACTION:473,ROLLBACK:474,BEGIN:475,ElseStatement:476,WHILE:477,CONTINUE:478,ITERATE:479,BREAK:480,LEAVE:481,PRINT:482,REQUIRE:483,StringValuesList:484,PluginsList:485,Plugin:486,ECHO:487,DECLARE:488,DeclaresList:489,DeclareItem:490,TRUNCATE:491,MERGE:492,MergeInto:493,MergeUsing:494,MergeOn:495,MergeMatchedList:496,MergeMatched:497,MergeNotMatched:498,MATCHED:499,MergeMatchedAction:500,MergeNotMatchedAction:501,TARGET:502,OUTPUT:503,CreateVertex_option0:504,CreateVertex_option1:505,CreateVertex_option2:506,CreateVertexSet:507,SharpValue:508,CONTENT:509,CreateEdge_option0:510,GRAPH:511,GraphList:512,GraphVertexEdge:513,GraphElement:514,GraphVertexEdge_option0:515,GraphVertexEdge_option1:516,GraphElementVar:517,GraphVertexEdge_option2:518,GraphVertexEdge_option3:519,GraphVertexEdge_option4:520,GraphVar:521,GraphAsClause:522,GraphAtClause:523,GraphElement2:524,GraphElement2_option0:525,GraphElement2_option1:526,GraphElement2_option2:527,GraphElement2_option3:528,GraphElement_option0:529,GraphElement_option1:530,GraphElement_option2:531,SharpLiteral:532,GraphElement_option3:533,GraphElement_option4:534,GraphElement_option5:535,ColonLiteral:536,DeleteVertex:537,DeleteVertex_option0:538,DeleteEdge:539,DeleteEdge_option0:540,DeleteEdge_option1:541,DeleteEdge_option2:542,Term:543,TermsList:544,QUESTIONDASH:545,CALL:546,TRIGGER:547,BeforeAfter:548,InsertDeleteUpdate:549,CreateTrigger_option0:550,CreateTrigger_option1:551,BEFORE:552,AFTER:553,INSTEAD:554,REINDEX:555,A:556,ABSENT:557,ABSOLUTE:558,ACCORDING:559,ADA:560,ADMIN:561,ALWAYS:562,ASC:563,ASSERTION:564,ASSIGNMENT:565,ATTRIBUTE:566,ATTRIBUTES:567,BASE64:568,BERNOULLI:569,BLOCKED:570,BOM:571,BREADTH:572,C:573,CATALOG:574,CATALOG_NAME:575,CHAIN:576,CHARACTERISTICS:577,CHARACTERS:578,CHARACTER_SET_CATALOG:579,CHARACTER_SET_NAME:580,CHARACTER_SET_SCHEMA:581,CLASS_ORIGIN:582,COBOL:583,COLLATION:584,COLLATION_CATALOG:585,COLLATION_NAME:586,COLLATION_SCHEMA:587,COLUMNS:588,COLUMN_NAME:589,COMMAND_FUNCTION:590,COMMAND_FUNCTION_CODE:591,COMMITTED:592,CONDITION_NUMBER:593,CONNECTION:594,CONNECTION_NAME:595,CONSTRAINTS:596,CONSTRAINT_CATALOG:597,CONSTRAINT_NAME:598,CONSTRAINT_SCHEMA:599,CONSTRUCTOR:600,CONTROL:601,CURSOR_NAME:602,DATA:603,DATETIME_INTERVAL_CODE:604,DATETIME_INTERVAL_PRECISION:605,DB:606,DEFAULTS:607,DEFERRABLE:608,DEFERRED:609,DEFINED:610,DEFINER:611,DEGREE:612,DEPTH:613,DERIVED:614,DESC:615,DESCRIPTOR:616,DIAGNOSTICS:617,DISPATCH:618,DOCUMENT:619,DOMAIN:620,DYNAMIC_FUNCTION:621,DYNAMIC_FUNCTION_CODE:622,EMPTY:623,ENCODING:624,ENFORCED:625,EXCLUDE:626,EXCLUDING:627,EXPRESSION:628,FILE:629,FINAL:630,FLAG:631,FOLLOWING:632,FORTRAN:633,FOUND:634,FS:635,G:636,GENERAL:637,GENERATED:638,GO:639,GOTO:640,GRANTED:641,HEX:642,HIERARCHY:643,ID:644,IMMEDIATE:645,IMMEDIATELY:646,IMPLEMENTATION:647,INCLUDING:648,INCREMENT:649,INDENT:650,INITIALLY:651,INPUT:652,INSTANCE:653,INSTANTIABLE:654,INTEGRITY:655,INVOKER:656,ISOLATION:657,K:658,KEY_MEMBER:659,KEY_TYPE:660,LENGTH:661,LEVEL:662,LIBRARY:663,LINK:664,LOCATION:665,LOCATOR:666,M:667,MAP:668,MAPPING:669,MAXVALUE:670,MESSAGE_LENGTH:671,MESSAGE_OCTET_LENGTH:672,MESSAGE_TEXT:673,MINVALUE:674,MORE:675,MUMPS:676,NAME:677,NAMES:678,NAMESPACE:679,NESTING:680,NEXT:681,NFC:682,NFD:683,NFKC:684,NFKD:685,NIL:686,NORMALIZED:687,NULLABLE:688,OBJECT:689,OCTETS:690,OPTIONS:691,ORDERING:692,ORDINALITY:693,OTHERS:694,OVERRIDING:695,P:696,PAD:697,PARAMETER_MODE:698,PARAMETER_NAME:699,PARAMETER_ORDINAL_POSITION:700,PARAMETER_SPECIFIC_CATALOG:701,PARAMETER_SPECIFIC_NAME:702,PARAMETER_SPECIFIC_SCHEMA:703,PARTIAL:704,PASCAL:705,PASSING:706,PASSTHROUGH:707,PERMISSION:708,PLACING:709,PLI:710,PRECEDING:711,PRESERVE:712,PRIOR:713,PRIVILEGES:714,PUBLIC:715,RECOVERY:716,RELATIVE:717,REPEATABLE:718,REQUIRING:719,RESPECT:720,RESTART:721,RESTORE:722,RETURNED_CARDINALITY:723,RETURNED_LENGTH:724,RETURNED_OCTET_LENGTH:725,RETURNED_SQLSTATE:726,RETURNING:727,ROLE:728,ROUTINE:729,ROUTINE_CATALOG:730,ROUTINE_NAME:731,ROUTINE_SCHEMA:732,ROW_COUNT:733,SCALE:734,SCHEMA:735,SCHEMA_NAME:736,SCOPE_CATALOG:737,SCOPE_NAME:738,SCOPE_SCHEMA:739,SECTION:740,SECURITY:741,SELECTIVE:742,SELF:743,SEQUENCE:744,SERIALIZABLE:745,SERVER:746,SERVER_NAME:747,SESSION:748,SETS:749,SIMPLE:750,SIZE:751,SPACE:752,SPECIFIC_NAME:753,STANDALONE:754,STATE:755,STATEMENT:756,STRIP:757,STRUCTURE:758,STYLE:759,SUBCLASS_ORIGIN:760,T:761,TABLE_NAME:762,TEMPORARY:763,TIES:764,TOKEN:765,TOP_LEVEL_COUNT:766,TRANSACTIONS_COMMITTED:767,TRANSACTIONS_ROLLED_BACK:768,TRANSACTION_ACTIVE:769,TRANSFORM:770,TRANSFORMS:771,TRIGGER_CATALOG:772,TRIGGER_NAME:773,TRIGGER_SCHEMA:774,TYPE:775,UNBOUNDED:776,UNCOMMITTED:777,UNDER:778,UNLINK:779,UNNAMED:780,UNTYPED:781,URI:782,USAGE:783,USER_DEFINED_TYPE_CATALOG:784,USER_DEFINED_TYPE_CODE:785,USER_DEFINED_TYPE_NAME:786,USER_DEFINED_TYPE_SCHEMA:787,VALID:788,VERSION:789,WHITESPACE:790,WORK:791,WRAPPER:792,WRITE:793,XMLDECLARATION:794,XMLSCHEMA:795,YES:796,ZONE:797,SEMICOLON:798,PERCENT:799,ROWS:800,FuncValue_option0_group0:801,$accept:0,$end:1},terminals_:{2:"error",4:"LITERAL",5:"BRALITERAL",6:"KEY",7:"OPEN",8:"CLOSE",9:"SEPARATOR",14:"EOF",18:"EXPLAIN",19:"QUERY",20:"PLAN",58:"EndTransaction",77:"WITH",79:"COMMA",81:"RECURSIVE",82:"AS",83:"LPAR",84:"RPAR",96:"SEARCH",103:"PIVOT",105:"FOR",108:"UNPIVOT",109:"IN",116:"REMOVE",121:"LIKE",124:"ARROW",125:"DOT",127:"ORDER",128:"BY",131:"DOTDOT",132:"CARET",133:"EQ",137:"WHERE",138:"OF",139:"CLASS",140:"NUMBER",141:"STRING",142:"SLASH",143:"VERTEX",144:"EDGE",145:"EXCLAMATION",146:"SHARP",147:"MODULO",148:"GT",149:"LT",150:"GTGT",151:"LTLT",152:"DOLLAR",154:"AT",155:"SET",157:"TO",158:"VALUE",159:"ROW",161:"COLON",163:"NOT",165:"IF",171:"UNION",173:"ALL",175:"ANY",177:"INTERSECT",178:"EXCEPT",179:"AND",180:"OR",181:"PATH",182:"RETURN",184:"REPEAT",188:"PLUS",189:"STAR",190:"QUESTION",192:"FROM",194:"DISTINCT",196:"UNIQUE",198:"SELECT",199:"COLUMN",200:"MATRIX",201:"TEXTSTRING",202:"INDEX",203:"RECORDSET",204:"TOP",207:"INTO",215:"CROSS",216:"APPLY",217:"OUTER",223:"INDEXED",229:"INSERTED",242:"NATURAL",243:"JOIN",244:"INNER",245:"LEFT",246:"RIGHT",247:"FULL",248:"SEMI",249:"ANTI",250:"ON",251:"USING",252:"GROUP",255:"ROLLUP",256:"CUBE",258:"GROUPING",259:"HAVING",262:"CORRESPONDING",265:"NULLS",266:"FIRST",267:"LAST",268:"DIRECTION",269:"COLLATE",270:"NOCASE",271:"LIMIT",273:"OFFSET",275:"FETCH",281:"DELETED",292:"CURRENT_TIMESTAMP",293:"CURRENT_DATE",294:"JAVASCRIPT",295:"CREATE",296:"FUNCTION",297:"AGGREGATE",298:"NEW",299:"CAST",301:"CONVERT",304:"GROUP_CONCAT",307:"OVER",311:"PARTITION",313:"SUM",314:"TOTAL",315:"COUNT",316:"MIN",317:"MAX",318:"AVG",319:"AGGR",320:"ARRAY",322:"REPLACE",323:"DATEADD",324:"DATEDIFF",325:"TIMESTAMPDIFF",326:"INTERVAL",327:"TRUE",328:"FALSE",329:"NSTRING",330:"NULL",331:"EXISTS",332:"ARRAYLBRA",333:"RBRA",335:"BRAQUESTION",336:"CASE",339:"END",341:"WHEN",342:"THEN",343:"ELSE",344:"REGEXP",345:"TILDA",346:"GLOB",347:"ESCAPE",348:"NOT_LIKE",349:"BARBAR",350:"MINUS",351:"AMPERSAND",352:"BAR",353:"GE",354:"LE",355:"EQEQ",356:"EQEQEQ",357:"NE",358:"NEEQEQ",359:"NEEQEQEQ",363:"BETWEEN",364:"NOT_BETWEEN",365:"IS",366:"DOUBLECOLON",367:"SOME",368:"UPDATE",372:"DELETE",373:"INSERT",377:"IGNORE",378:"DEFAULT",379:"VALUES",382:"DateValue",388:"TABLE",391:"IDENTITY",392:"TEMP",402:"CONSTRAINT",403:"CHECK",404:"PRIMARY",407:"FOREIGN",408:"REFERENCES",415:"CASCADE",416:"RESTRICT",417:"NO",418:"ACTION",423:"ColumnConstraints",426:"ENUM",427:"MAXNUM",433:"DROP",437:"ALTER",438:"RENAME",439:"ADD",440:"MODIFY",441:"ATTACH",442:"DATABASE",443:"DETACH",445:"USE",446:"SHOW",447:"VIEW",451:"READ",452:"ONLY",453:"OPTION",454:"SOURCE",455:"ASSERT",457:"ATLBRA",461:"LCUR",463:"RCUR",466:"COLONDASH",471:"OFF",472:"COMMIT",473:"TRANSACTION",474:"ROLLBACK",475:"BEGIN",477:"WHILE",478:"CONTINUE",479:"ITERATE",480:"BREAK",481:"LEAVE",482:"PRINT",483:"REQUIRE",487:"ECHO",488:"DECLARE",491:"TRUNCATE",492:"MERGE",499:"MATCHED",502:"TARGET",503:"OUTPUT",509:"CONTENT",511:"GRAPH",545:"QUESTIONDASH",546:"CALL",547:"TRIGGER",552:"BEFORE",553:"AFTER",554:"INSTEAD",555:"REINDEX",556:"A",557:"ABSENT",558:"ABSOLUTE",559:"ACCORDING",560:"ADA",561:"ADMIN",562:"ALWAYS",563:"ASC",564:"ASSERTION",565:"ASSIGNMENT",566:"ATTRIBUTE",567:"ATTRIBUTES",568:"BASE64",569:"BERNOULLI",570:"BLOCKED",571:"BOM",572:"BREADTH",573:"C",574:"CATALOG",575:"CATALOG_NAME",576:"CHAIN",577:"CHARACTERISTICS",578:"CHARACTERS",579:"CHARACTER_SET_CATALOG",580:"CHARACTER_SET_NAME",581:"CHARACTER_SET_SCHEMA",582:"CLASS_ORIGIN",583:"COBOL",584:"COLLATION",585:"COLLATION_CATALOG",586:"COLLATION_NAME",587:"COLLATION_SCHEMA",588:"COLUMNS",589:"COLUMN_NAME",590:"COMMAND_FUNCTION",591:"COMMAND_FUNCTION_CODE",592:"COMMITTED",593:"CONDITION_NUMBER",594:"CONNECTION",595:"CONNECTION_NAME",596:"CONSTRAINTS",597:"CONSTRAINT_CATALOG",598:"CONSTRAINT_NAME",599:"CONSTRAINT_SCHEMA",600:"CONSTRUCTOR",601:"CONTROL",602:"CURSOR_NAME",603:"DATA",604:"DATETIME_INTERVAL_CODE",605:"DATETIME_INTERVAL_PRECISION",606:"DB",607:"DEFAULTS",608:"DEFERRABLE",609:"DEFERRED",610:"DEFINED",611:"DEFINER",612:"DEGREE",613:"DEPTH",614:"DERIVED",615:"DESC",616:"DESCRIPTOR",617:"DIAGNOSTICS",618:"DISPATCH",619:"DOCUMENT",620:"DOMAIN",621:"DYNAMIC_FUNCTION",622:"DYNAMIC_FUNCTION_CODE",623:"EMPTY",624:"ENCODING",625:"ENFORCED",626:"EXCLUDE",627:"EXCLUDING",628:"EXPRESSION",629:"FILE",630:"FINAL",631:"FLAG",632:"FOLLOWING",633:"FORTRAN",634:"FOUND",635:"FS",636:"G",637:"GENERAL",638:"GENERATED",639:"GO",640:"GOTO",641:"GRANTED",642:"HEX",643:"HIERARCHY",644:"ID",645:"IMMEDIATE",646:"IMMEDIATELY",647:"IMPLEMENTATION",648:"INCLUDING",649:"INCREMENT",650:"INDENT",651:"INITIALLY",652:"INPUT",653:"INSTANCE",654:"INSTANTIABLE",655:"INTEGRITY",656:"INVOKER",657:"ISOLATION",658:"K",659:"KEY_MEMBER",660:"KEY_TYPE",661:"LENGTH",662:"LEVEL",663:"LIBRARY",664:"LINK",665:"LOCATION",666:"LOCATOR",667:"M",668:"MAP",669:"MAPPING",670:"MAXVALUE",671:"MESSAGE_LENGTH",672:"MESSAGE_OCTET_LENGTH",673:"MESSAGE_TEXT",674:"MINVALUE",675:"MORE",676:"MUMPS",677:"NAME",678:"NAMES",679:"NAMESPACE",680:"NESTING",681:"NEXT",682:"NFC",683:"NFD",684:"NFKC",685:"NFKD",686:"NIL",687:"NORMALIZED",688:"NULLABLE",689:"OBJECT",690:"OCTETS",691:"OPTIONS",692:"ORDERING",693:"ORDINALITY",694:"OTHERS",695:"OVERRIDING",696:"P",697:"PAD",698:"PARAMETER_MODE",699:"PARAMETER_NAME",700:"PARAMETER_ORDINAL_POSITION",701:"PARAMETER_SPECIFIC_CATALOG",702:"PARAMETER_SPECIFIC_NAME",703:"PARAMETER_SPECIFIC_SCHEMA",704:"PARTIAL",705:"PASCAL",706:"PASSING",707:"PASSTHROUGH",708:"PERMISSION",709:"PLACING",710:"PLI",711:"PRECEDING",712:"PRESERVE",713:"PRIOR",714:"PRIVILEGES",715:"PUBLIC",716:"RECOVERY",717:"RELATIVE",718:"REPEATABLE",719:"REQUIRING",720:"RESPECT",721:"RESTART",722:"RESTORE",723:"RETURNED_CARDINALITY",724:"RETURNED_LENGTH",725:"RETURNED_OCTET_LENGTH",726:"RETURNED_SQLSTATE",727:"RETURNING",728:"ROLE",729:"ROUTINE",730:"ROUTINE_CATALOG",731:"ROUTINE_NAME",732:"ROUTINE_SCHEMA",733:"ROW_COUNT",734:"SCALE",735:"SCHEMA",736:"SCHEMA_NAME",737:"SCOPE_CATALOG",738:"SCOPE_NAME",739:"SCOPE_SCHEMA",740:"SECTION",741:"SECURITY",742:"SELECTIVE",743:"SELF",744:"SEQUENCE",745:"SERIALIZABLE",746:"SERVER",747:"SERVER_NAME",748:"SESSION",749:"SETS",750:"SIMPLE",751:"SIZE",752:"SPACE",753:"SPECIFIC_NAME",754:"STANDALONE",755:"STATE",756:"STATEMENT",757:"STRIP",758:"STRUCTURE",759:"STYLE",760:"SUBCLASS_ORIGIN",761:"T",762:"TABLE_NAME",763:"TEMPORARY",764:"TIES",765:"TOKEN",766:"TOP_LEVEL_COUNT",767:"TRANSACTIONS_COMMITTED",768:"TRANSACTIONS_ROLLED_BACK",769:"TRANSACTION_ACTIVE",770:"TRANSFORM",771:"TRANSFORMS",772:"TRIGGER_CATALOG",773:"TRIGGER_NAME",774:"TRIGGER_SCHEMA",775:"TYPE",776:"UNBOUNDED",777:"UNCOMMITTED",778:"UNDER",779:"UNLINK",780:"UNNAMED",781:"UNTYPED",782:"URI",783:"USAGE",784:"USER_DEFINED_TYPE_CATALOG",785:"USER_DEFINED_TYPE_CODE",786:"USER_DEFINED_TYPE_NAME",787:"USER_DEFINED_TYPE_SCHEMA",788:"VALID",789:"VERSION",790:"WHITESPACE",791:"WORK",792:"WRAPPER",793:"WRITE",794:"XMLDECLARATION",795:"XMLSCHEMA",796:"YES",797:"ZONE",798:"SEMICOLON",799:"PERCENT",800:"ROWS"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,2],[11,1],[11,2],[12,2],[13,3],[13,1],[13,1],[17,2],[17,4],[16,1],[21,0],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[52,3],[78,3],[78,4],[78,1],[78,2],[80,5],[80,8],[44,10],[44,6],[44,4],[44,4],[45,3],[45,3],[99,8],[102,8],[102,11],[111,4],[113,2],[113,1],[112,3],[112,1],[114,1],[114,3],[115,3],[118,3],[118,1],[119,1],[119,2],[123,1],[123,1],[126,1],[126,5],[126,5],[126,1],[126,2],[126,1],[126,2],[126,2],[126,3],[126,4],[126,4],[126,4],[126,4],[126,4],[126,1],[126,1],[126,1],[126,1],[126,1],[126,1],[126,2],[126,2],[126,2],[126,1],[126,1],[126,1],[126,1],[126,1],[126,1],[126,2],[126,3],[126,4],[126,3],[126,1],[126,4],[126,2],[126,2],[126,4],[126,4],[126,4],[126,4],[126,4],[126,5],[126,4],[126,4],[126,4],[126,4],[126,4],[126,4],[126,4],[126,4],[126,6],[172,3],[172,1],[162,1],[162,1],[162,1],[191,2],[86,4],[86,4],[86,4],[86,3],[193,1],[193,2],[193,2],[193,2],[193,2],[193,2],[193,2],[193,2],[195,3],[195,4],[195,0],[88,0],[88,2],[88,2],[88,2],[88,2],[88,2],[89,2],[89,3],[89,5],[89,5],[89,0],[214,6],[214,7],[214,6],[214,7],[212,1],[212,3],[218,4],[218,3],[218,2],[218,3],[218,2],[218,2],[218,2],[218,2],[218,1],[230,1],[230,2],[227,1],[208,3],[208,1],[231,1],[231,1],[213,2],[213,2],[213,1],[213,1],[232,3],[234,2],[234,3],[234,2],[234,4],[234,2],[234,2],[233,1],[233,2],[241,1],[241,2],[241,2],[241,3],[241,2],[241,3],[241,2],[241,3],[241,2],[241,2],[241,2],[235,2],[235,2],[235,4],[235,0],[91,0],[91,2],[92,0],[92,4],[92,6],[92,6],[253,1],[253,3],[257,5],[257,4],[257,4],[257,1],[254,0],[254,2],[93,0],[93,2],[260,1],[260,2],[260,1],[260,1],[260,2],[260,3],[260,2],[260,2],[261,1],[261,1],[94,0],[94,3],[129,1],[129,3],[264,2],[264,2],[263,1],[263,2],[263,3],[263,3],[263,4],[95,0],[95,3],[95,8],[272,0],[272,2],[183,3],[183,1],[279,3],[279,2],[279,3],[279,2],[279,3],[279,2],[279,1],[280,5],[280,3],[280,3],[280,3],[280,1],[120,5],[120,3],[120,3],[120,3],[120,3],[120,4],[120,1],[120,1],[120,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,3],[104,3],[104,3],[104,1],[104,1],[104,1],[61,1],[75,5],[76,5],[290,2],[290,2],[288,6],[288,8],[288,6],[288,8],[302,1],[302,1],[302,1],[302,1],[302,1],[302,1],[302,1],[302,1],[282,5],[282,6],[282,6],[282,6],[282,7],[303,0],[303,5],[310,3],[312,3],[305,0],[305,3],[306,0],[306,2],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[167,1],[209,6],[209,4],[209,4],[209,4],[209,3],[209,8],[209,8],[209,8],[209,8],[209,8],[209,3],[160,1],[160,3],[205,1],[284,1],[284,1],[122,1],[122,1],[285,1],[211,2],[286,4],[289,3],[210,2],[210,2],[210,1],[210,1],[287,5],[287,4],[337,2],[337,1],[340,4],[338,2],[338,0],[283,3],[283,3],[283,3],[283,3],[283,5],[283,3],[283,5],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,5],[283,3],[283,3],[283,3],[283,5],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,3],[283,6],[283,6],[283,3],[283,3],[283,2],[283,2],[283,2],[283,2],[283,2],[283,3],[283,5],[283,6],[283,5],[283,6],[283,4],[283,5],[283,3],[283,4],[283,3],[283,4],[283,3],[283,3],[283,3],[283,3],[283,3],[362,1],[362,1],[362,4],[360,1],[360,1],[360,1],[360,1],[360,1],[360,1],[361,1],[361,1],[361,1],[60,7],[60,5],[156,1],[156,3],[370,3],[370,4],[33,6],[33,4],[40,6],[40,5],[40,7],[40,6],[40,10],[40,9],[40,6],[40,9],[40,8],[40,7],[40,6],[40,5],[40,6],[40,9],[40,8],[40,5],[40,7],[40,8],[40,6],[375,1],[375,1],[374,0],[374,1],[376,3],[376,1],[376,1],[376,5],[376,3],[376,3],[380,1],[380,3],[381,1],[381,1],[381,1],[381,1],[381,1],[381,1],[85,1],[85,3],[28,9],[28,5],[384,1],[384,1],[387,0],[387,1],[389,2],[389,1],[390,1],[390,3],[390,3],[390,3],[383,0],[383,1],[385,0],[385,3],[386,3],[386,1],[386,2],[394,1],[394,3],[395,2],[395,2],[395,2],[395,2],[395,2],[396,0],[396,2],[401,4],[397,6],[398,9],[411,3],[410,0],[410,1],[410,1],[410,2],[410,2],[412,3],[413,3],[414,1],[414,2],[414,2],[414,1],[414,2],[399,6],[400,5],[406,1],[406,1],[406,3],[406,3],[393,1],[393,3],[421,3],[421,2],[421,1],[424,6],[424,4],[424,1],[424,4],[300,2],[300,1],[425,1],[425,1],[422,0],[422,1],[428,2],[428,1],[430,3],[429,2],[429,6],[429,4],[429,6],[429,1],[429,2],[429,4],[429,2],[429,1],[429,2],[429,1],[429,1],[429,3],[429,5],[37,4],[436,3],[436,1],[435,0],[435,2],[22,6],[22,6],[22,6],[22,8],[22,6],[43,5],[23,4],[23,7],[23,6],[23,9],[34,3],[25,4],[25,6],[25,9],[25,6],[444,0],[444,2],[59,3],[59,2],[35,4],[35,5],[35,5],[26,8],[26,9],[36,3],[48,2],[48,4],[48,3],[48,5],[50,2],[50,4],[50,4],[50,6],[47,4],[47,6],[49,4],[49,6],[46,4],[46,6],[29,11],[29,8],[450,3],[450,3],[450,5],[38,4],[71,2],[62,2],[63,2],[63,2],[63,4],[153,4],[153,2],[153,2],[153,2],[153,2],[153,1],[153,2],[153,2],[459,1],[459,1],[460,1],[460,2],[460,1],[460,1],[460,1],[460,1],[460,1],[460,1],[460,3],[456,3],[456,4],[456,2],[458,2],[458,3],[458,1],[462,3],[462,1],[465,3],[465,3],[465,3],[465,3],[465,3],[465,3],[464,3],[464,1],[70,4],[70,3],[70,4],[70,5],[70,5],[70,6],[469,1],[469,1],[468,3],[468,2],[470,1],[470,1],[470,3],[467,1],[467,1],[56,2],[57,2],[55,2],[39,4],[39,3],[476,2],[64,3],[65,1],[65,1],[66,1],[66,1],[67,3],[68,2],[68,2],[69,2],[69,2],[486,1],[486,1],[74,2],[484,3],[484,1],[485,3],[485,1],[32,2],[489,1],[489,3],[490,3],[490,4],[490,5],[490,6],[51,3],[41,6],[493,1],[493,2],[494,2],[494,4],[495,2],[496,2],[496,2],[496,1],[496,1],[497,4],[497,6],[500,1],[500,3],[498,5],[498,7],[498,7],[498,9],[498,7],[498,9],[501,3],[501,6],[501,3],[501,6],[369,0],[369,2],[369,5],[369,4],[369,7],[31,6],[508,2],[507,0],[507,2],[507,2],[507,1],[30,8],[27,3],[27,4],[512,3],[512,1],[513,3],[513,7],[513,6],[513,3],[513,4],[517,1],[517,1],[521,2],[522,3],[523,2],[524,4],[514,4],[514,3],[514,2],[514,1],[536,2],[532,2],[532,2],[537,4],[539,6],[72,3],[72,2],[544,3],[544,1],[543,1],[543,4],[73,2],[24,2],[53,9],[53,8],[53,9],[548,0],[548,1],[548,1],[548,1],[548,2],[549,1],[549,1],[549,1],[54,3],[42,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[15,1],[15,1],[87,0],[87,1],[90,0],[90,1],[97,0],[97,2],[98,0],[98,1],[100,0],[100,1],[101,0],[101,1],[106,0],[106,1],[107,0],[107,1],[110,0],[110,1],[117,0],[117,1],[130,0],[130,1],[134,1],[134,2],[135,1],[135,2],[136,0],[136,1],[164,0],[164,2],[166,0],[166,2],[168,0],[168,2],[169,1],[169,1],[170,0],[170,2],[174,0],[174,2],[176,0],[176,2],[185,0],[185,2],[186,0],[186,2],[187,0],[187,2],[197,0],[197,1],[206,0],[206,1],[219,0],[219,1],[220,0],[220,1],[221,0],[221,1],[222,0],[222,1],[224,0],[224,1],[225,0],[225,1],[226,0],[226,1],[228,0],[228,1],[236,0],[236,1],[237,0],[237,1],[238,0],[238,1],[239,0],[239,1],[240,0],[240,1],[274,0],[274,1],[276,0],[276,1],[277,0],[277,1],[278,0],[278,1],[291,1],[291,1],[308,0],[308,1],[309,0],[309,1],[801,1],[801,1],[321,0],[321,1],[334,1],[334,1],[371,1],[371,1],[405,0],[405,1],[409,0],[409,1],[419,0],[419,1],[420,0],[420,1],[431,0],[431,1],[432,0],[432,1],[434,1],[434,1],[448,0],[448,1],[449,0],[449,1],[504,0],[504,1],[505,0],[505,1],[506,0],[506,1],[510,0],[510,1],[515,0],[515,1],[516,0],[516,1],[518,0],[518,1],[519,0],[519,1],[520,0],[520,1],[525,0],[525,1],[526,0],[526,1],[527,0],[527,1],[528,0],[528,1],[529,0],[529,1],[530,0],[530,1],[531,0],[531,1],[533,0],[533,1],[534,0],[534,1],[535,0],[535,1],[538,0],[538,2],[540,0],[540,2],[541,0],[541,2],[542,0],[542,2],[550,0],[550,1],[551,0],[551,1]],performAction:function(ba,Jr,En,A,us,g,to){var y=g.length-1;switch(us){case 1:t.options.casesensitive?this.$=g[y]:this.$=g[y].toLowerCase();break;case 2:this.$=O(g[y].substr(1,g[y].length-2));break;case 3:case 4:case 5:case 6:this.$=g[y].toLowerCase();break;case 7:this.$=g[y].toLowerCase();break;case 8:this.$=g[y];break;case 9:this.$=g[y]?g[y-1]+" "+g[y]:g[y-1];break;case 10:return new A.Statements({statements:g[y-1]});case 11:this.$=g[y-2],g[y]&&g[y-2].push(g[y]);break;case 12:case 13:case 76:case 93:case 98:case 156:case 191:case 211:case 212:case 243:case 265:case 280:case 378:case 396:case 475:case 505:case 506:case 510:case 518:case 566:case 567:case 604:case 691:case 701:case 727:case 729:case 731:case 746:case 747:case 777:case 801:this.$=[g[y]];break;case 14:this.$=g[y],g[y].explain=!0;break;case 15:this.$=g[y],g[y].explain=!0;break;case 16:this.$=g[y],A.exists&&(this.$.exists=A.exists),delete A.exists,A.queries&&(this.$.queries=A.queries),delete A.queries;break;case 17:case 175:case 186:case 236:case 237:case 239:case 249:case 251:case 263:case 274:case 277:case 348:case 352:case 354:case 399:case 522:case 532:case 534:case 546:case 605:this.$=void 0;break;case 73:this.$=new A.WithSelect({withs:g[y-1],select:g[y]});break;case 74:case 603:g[y-2].push(g[y]),this.$=g[y-2];break;case 75:g[y].recursive=!0,g[y-3].push(g[y]),this.$=g[y-3];break;case 77:g[y].recursive=!0,this.$=[g[y]];break;case 78:this.$={name:g[y-4],select:g[y-1]};break;case 79:this.$={name:g[y-7],columns:g[y-5],select:g[y-1]};break;case 80:A.extend(this.$,g[y-9]),A.extend(this.$,g[y-8]),A.extend(this.$,g[y-7]),A.extend(this.$,g[y-6]),A.extend(this.$,g[y-5]),A.extend(this.$,g[y-4]),A.extend(this.$,g[y-3]),A.extend(this.$,g[y-2]),A.extend(this.$,g[y-1]),A.extend(this.$,g[y]),this.$=g[y-9],A.exists&&(this.$.exists=A.exists.slice());break;case 81:this.$=g[y-4],A.extend(this.$,g[y-2]),A.extend(this.$,g[y-1]),A.extend(this.$,g[y]),A.exists&&(this.$.exists=A.exists.slice());break;case 82:A.extend(this.$,g[y-3]),A.extend(this.$,g[y-2]),A.extend(this.$,g[y-1]),A.extend(this.$,g[y]),this.$=g[y-3],A.exists&&(this.$.exists=A.exists.slice());break;case 83:this.$=new A.Search({selectors:g[y-2],from:g[y]}),A.extend(this.$,g[y-1]);break;case 84:case 85:case 89:case 551:case 587:case 623:case 657:case 675:case 676:case 679:case 704:this.$=g[y-1];break;case 86:A.extend(this.$,g[y-7]),A.extend(this.$,g[y-6]),A.extend(this.$,g[y-5]),A.extend(this.$,g[y-4]),A.extend(this.$,g[y-3]),A.extend(this.$,g[y-2]),A.extend(this.$,g[y-1]),A.extend(this.$,g[y]),this.$=g[y-7],A.exists&&(this.$.exists=A.exists.slice());break;case 87:this.$={pivot:{expr:g[y-5],columnid:g[y-3],inlist:g[y-2],as:g[y]}};break;case 88:this.$={unpivot:{tocolumnid:g[y-8],forcolumnid:g[y-6],inlist:g[y-3],as:g[y]}};break;case 90:case 91:case 99:case 160:case 202:case 203:case 207:case 208:case 248:case 287:case 302:case 303:case 304:case 305:case 306:case 307:case 308:case 309:case 310:case 311:case 312:case 313:case 314:case 315:case 318:case 319:case 335:case 336:case 337:case 338:case 339:case 340:case 353:case 398:case 464:case 465:case 466:case 467:case 468:case 469:case 547:case 580:case 584:case 586:case 661:case 662:case 663:case 664:case 665:case 666:case 671:case 673:case 674:case 683:case 702:case 703:case 768:case 783:case 784:case 786:case 787:case 793:case 794:this.$=g[y];break;case 92:case 97:case 776:case 800:this.$=g[y-2],this.$.push(g[y]);break;case 94:this.$={expr:g[y]};break;case 95:this.$={expr:g[y-2],as:g[y]};break;case 96:this.$={removecolumns:g[y]};break;case 100:this.$={like:g[y]};break;case 103:case 117:this.$={srchid:"PROP",args:[g[y]]};break;case 104:this.$={srchid:"ORDERBY",args:g[y-1]};break;case 105:var Du=g[y-1];Du||(Du="ASC"),this.$={srchid:"ORDERBY",args:[{expression:new A.Column({columnid:"_"}),direction:Du}]};break;case 106:this.$={srchid:"PARENT"};break;case 107:this.$={srchid:"APROP",args:[g[y]]};break;case 108:this.$={selid:"ROOT"};break;case 109:this.$={srchid:"EQ",args:[g[y]]};break;case 110:this.$={srchid:"LIKE",args:[g[y]]};break;case 111:case 112:this.$={selid:"WITH",args:g[y-1]};break;case 113:this.$={srchid:g[y-3].toUpperCase(),args:g[y-1]};break;case 114:this.$={srchid:"WHERE",args:[g[y-1]]};break;case 115:this.$={selid:"OF",args:[g[y-1]]};break;case 116:this.$={srchid:"CLASS",args:[g[y-1]]};break;case 118:this.$={srchid:"NAME",args:[g[y].substr(1,g[y].length-2)]};break;case 119:this.$={srchid:"CHILD"};break;case 120:this.$={srchid:"VERTEX"};break;case 121:this.$={srchid:"EDGE"};break;case 122:this.$={srchid:"REF"};break;case 123:this.$={srchid:"SHARP",args:[g[y]]};break;case 124:this.$={srchid:"ATTR",args:typeof g[y]>"u"?void 0:[g[y]]};break;case 125:this.$={srchid:"ATTR"};break;case 126:this.$={srchid:"OUT"};break;case 127:this.$={srchid:"IN"};break;case 128:this.$={srchid:"OUTOUT"};break;case 129:this.$={srchid:"ININ"};break;case 130:this.$={srchid:"CONTENT"};break;case 131:this.$={srchid:"EX",args:[new A.Json({value:g[y]})]};break;case 132:this.$={srchid:"AT",args:[g[y]]};break;case 133:this.$={srchid:"AS",args:[g[y]]};break;case 134:this.$={srchid:"SET",args:g[y-1]};break;case 135:this.$={selid:"TO",args:[g[y]]};break;case 136:this.$={srchid:"VALUE"};break;case 137:this.$={srchid:"ROW",args:g[y-1]};break;case 138:this.$={srchid:"CLASS",args:[g[y]]};break;case 139:this.$={selid:g[y],args:[g[y-1]]};break;case 140:this.$={selid:"NOT",args:g[y-1]};break;case 141:this.$={selid:"IF",args:g[y-1]};break;case 142:this.$={selid:g[y-3],args:g[y-1]};break;case 143:this.$={selid:"DISTINCT",args:g[y-1]};break;case 144:this.$={selid:"UNION",args:g[y-1]};break;case 145:this.$={selid:"UNIONALL",args:g[y-1]};break;case 146:this.$={selid:"ALL",args:[g[y-1]]};break;case 147:this.$={selid:"ANY",args:[g[y-1]]};break;case 148:this.$={selid:"INTERSECT",args:g[y-1]};break;case 149:this.$={selid:"EXCEPT",args:g[y-1]};break;case 150:this.$={selid:"AND",args:g[y-1]};break;case 151:this.$={selid:"OR",args:g[y-1]};break;case 152:this.$={selid:"PATH",args:[g[y-1]]};break;case 153:this.$={srchid:"RETURN",args:g[y-1]};break;case 154:this.$={selid:"REPEAT",sels:g[y-3],args:g[y-1]};break;case 155:this.$=g[y-2],this.$.push(g[y]);break;case 157:this.$="PLUS";break;case 158:this.$="STAR";break;case 159:this.$="QUESTION";break;case 161:this.$=new A.Select({columns:g[y],distinct:!0}),A.extend(this.$,g[y-3]),A.extend(this.$,g[y-1]);break;case 162:this.$=new A.Select({columns:g[y],distinct:!0}),A.extend(this.$,g[y-3]),A.extend(this.$,g[y-1]);break;case 163:this.$=new A.Select({columns:g[y],all:!0}),A.extend(this.$,g[y-3]),A.extend(this.$,g[y-1]);break;case 164:g[y]?(this.$=new A.Select({columns:g[y]}),A.extend(this.$,g[y-2]),A.extend(this.$,g[y-1])):this.$=new A.Select({columns:[new A.Column({columnid:"_"})],modifier:"COLUMN"});break;case 165:g[y]=="SELECT"?this.$=void 0:this.$={modifier:g[y]};break;case 166:this.$={modifier:"VALUE"};break;case 167:this.$={modifier:"ROW"};break;case 168:this.$={modifier:"COLUMN"};break;case 169:this.$={modifier:"MATRIX"};break;case 170:this.$={modifier:"TEXTSTRING"};break;case 171:this.$={modifier:"INDEX"};break;case 172:this.$={modifier:"RECORDSET"};break;case 173:this.$={top:g[y-1],percent:typeof g[y]<"u"?!0:void 0};break;case 174:this.$={top:g[y-1]};break;case 176:case 769:this.$=void 0;break;case 177:case 178:case 179:case 180:this.$={into:g[y]};break;case 181:var js=g[y];js=js.substr(1,js.length-2);var S1=js.substr(-3).toUpperCase(),ul=js.substr(-4).toUpperCase();js[0]=="#"?this.$={into:new A.FuncValue({funcid:"HTML",args:[new A.StringValue({value:js}),new A.Json({value:{headers:!0}})]})}:S1=="XLS"||S1=="CSV"||S1=="TAB"?this.$={into:new A.FuncValue({funcid:S1,args:[new A.StringValue({value:js}),new A.Json({value:{headers:!0}})]})}:(ul=="XLSX"||ul=="JSON")&&(this.$={into:new A.FuncValue({funcid:ul,args:[new A.StringValue({value:js}),new A.Json({value:{headers:!0}})]})});break;case 182:this.$={from:g[y]};break;case 183:this.$={from:g[y-1],joins:g[y]};break;case 184:var ed=g[y-2];g[y].forEach(Hi=>{var i1=new A.Join({joinmode:"CROSS"});Hi.tableid?i1.table=new A.Table({databaseid:Hi.databaseid,tableid:Hi.tableid}):Hi instanceof A.Select?i1.select=Hi:Hi instanceof A.Search?i1.search=Hi:Hi instanceof A.ParamValue?i1.param=Hi:Hi instanceof A.VarValue?i1.variable=Hi.variable:Hi instanceof A.FuncValue?i1.func=Hi:Hi instanceof A.Json&&(i1.json=Hi),Hi.as&&(i1.as=Hi.as),ed.push(i1)}),this.$={from:g[y-3],joins:ed};break;case 185:this.$={from:g[y-2],joins:g[y-1]};break;case 187:this.$=new A.Apply({select:g[y-2],applymode:"CROSS",as:g[y]});break;case 188:this.$=new A.Apply({select:g[y-3],applymode:"CROSS",as:g[y]});break;case 189:this.$=new A.Apply({select:g[y-2],applymode:"OUTER",as:g[y]});break;case 190:this.$=new A.Apply({select:g[y-3],applymode:"OUTER",as:g[y]});break;case 192:case 244:case 476:case 568:case 569:this.$=g[y-2],g[y-2].push(g[y]);break;case 193:this.$=g[y-2],this.$.as=g[y]||"default";break;case 194:this.$=new A.Json({value:g[y-2]}),g[y-2].as=g[y];break;case 195:this.$=g[y-1],g[y]&&(g[y-1].as=g[y]);break;case 196:case 677:case 680:this.$=g[y-2];break;case 197:case 198:case 199:case 200:this.$=g[y-1],g[y-1].as=g[y]||"default";break;case 201:this.$={inserted:!0};break;case 204:var js=g[y];js=js.substr(1,js.length-2);var S1=js.substr(-3).toUpperCase(),ul=js.substr(-4).toUpperCase(),td;if(js[0]=="#")td=new A.FuncValue({funcid:"HTML",args:[new A.StringValue({value:js}),new A.Json({value:{headers:!0}})]});else if(S1=="XLS"||S1=="CSV"||S1=="TAB")td=new A.FuncValue({funcid:S1,args:[new A.StringValue({value:js}),new A.Json({value:{headers:!0}})]});else if(ul=="XLSX"||ul=="JSON")td=new A.FuncValue({funcid:ul,args:[new A.StringValue({value:js}),new A.Json({value:{headers:!0}})]});else throw new Error("Unknown string in FROM clause");this.$=td;break;case 205:g[y-2]=="INFORMATION_SCHEMA"?this.$=new A.FuncValue({funcid:g[y-2],args:[new A.StringValue({value:g[y]})]}):this.$=new A.Table({databaseid:g[y-2],tableid:g[y]});break;case 206:this.$=new A.Table({tableid:g[y]});break;case 209:case 210:this.$=g[y-1],g[y-1].push(g[y]);break;case 213:this.$=new A.Join(g[y-2]),A.extend(this.$,g[y-1]),A.extend(this.$,g[y]);break;case 214:this.$={table:g[y-1]},g[y]&&(this.$.as=g[y]);break;case 215:this.$={json:new A.Json({value:g[y-2],as:g[y]})};break;case 216:this.$={param:g[y-1],as:g[y]};break;case 217:this.$={select:g[y-2],as:g[y]};break;case 218:this.$={func:g[y-1],as:g[y]||"default"};break;case 219:this.$={variable:g[y-1],as:g[y]||"default"};break;case 220:this.$={joinmode:g[y]};break;case 221:this.$={joinmode:g[y-1],natural:!0};break;case 222:case 223:this.$="INNER";break;case 224:case 225:this.$="LEFT";break;case 226:case 227:this.$="RIGHT";break;case 228:case 229:this.$="OUTER";break;case 230:this.$="SEMI";break;case 231:this.$="ANTI";break;case 232:this.$="CROSS";break;case 233:this.$={on:g[y]};break;case 234:case 741:this.$={using:g[y]};break;case 235:case 742:this.$={using:g[y-1]};break;case 238:this.$={where:new A.Expression({expression:g[y]})};break;case 240:this.$={group:g[y-1]},A.extend(this.$,g[y]);break;case 241:this.$={group:[new A.GroupExpression({type:"ROLLUP",group:g[y-3]})]},A.extend(this.$,g[y]);break;case 242:this.$={group:[new A.GroupExpression({type:"CUBE",group:g[y-3]})]},A.extend(this.$,g[y]);break;case 245:this.$=new A.GroupExpression({type:"GROUPING SETS",group:g[y-1]});break;case 246:this.$=new A.GroupExpression({type:"ROLLUP",group:g[y-1]});break;case 247:this.$=new A.GroupExpression({type:"CUBE",group:g[y-1]});break;case 250:this.$={having:g[y]};break;case 252:this.$={},this.$[g[y-1].op]=g[y],g[y-1].corresponding&&(this.$.corresponding=!0);break;case 253:A.queriesStack||(A.queriesStack=[]),A.queriesStack.push(A.queries||[]),A.queries=[],this.$={op:"union"};break;case 254:A.queriesStack||(A.queriesStack=[]),A.queriesStack.push(A.queries||[]),A.queries=[],this.$={op:"unionall"};break;case 255:A.queriesStack||(A.queriesStack=[]),A.queriesStack.push(A.queries||[]),A.queries=[],this.$={op:"except"};break;case 256:A.queriesStack||(A.queriesStack=[]),A.queriesStack.push(A.queries||[]),A.queries=[],this.$={op:"intersect"};break;case 257:A.queriesStack||(A.queriesStack=[]),A.queriesStack.push(A.queries||[]),A.queries=[],this.$={op:"union",corresponding:!0};break;case 258:A.queriesStack||(A.queriesStack=[]),A.queriesStack.push(A.queries||[]),A.queries=[],this.$={op:"unionall",corresponding:!0};break;case 259:A.queriesStack||(A.queriesStack=[]),A.queriesStack.push(A.queries||[]),A.queries=[],this.$={op:"except",corresponding:!0};break;case 260:A.queriesStack||(A.queriesStack=[]),A.queriesStack.push(A.queries||[]),A.queries=[],this.$={op:"intersect",corresponding:!0};break;case 261:case 262:A.queriesStack&&A.queriesStack.length>0&&(A.queries&&A.queries.length>0&&(g[y].queries=A.queries),A.queries=A.queriesStack.pop()),this.$=g[y];break;case 264:this.$={order:g[y]};break;case 266:this.$=g[y-2],g[y-2].push(g[y]);break;case 267:this.$={nullsOrder:"FIRST"};break;case 268:this.$={nullsOrder:"LAST"};break;case 269:this.$=new A.Expression({expression:g[y],direction:"ASC"});break;case 270:this.$=new A.Expression({expression:g[y-1],direction:g[y].toUpperCase()});break;case 271:this.$=new A.Expression({expression:g[y-2],direction:g[y-1].toUpperCase()}),A.extend(this.$,g[y]);break;case 272:this.$=new A.Expression({expression:g[y-2],direction:"ASC",nocase:!0});break;case 273:this.$=new A.Expression({expression:g[y-3],direction:g[y].toUpperCase(),nocase:!0});break;case 275:this.$={limit:g[y-1]},A.extend(this.$,g[y]);break;case 276:this.$={limit:g[y-2],offset:g[y-6]};break;case 278:this.$={offset:g[y]};break;case 279:case 540:case 571:case 690:case 700:case 726:case 728:case 732:g[y-2].push(g[y]),this.$=g[y-2];break;case 281:case 283:g[y-2].as=g[y],this.$=g[y-2];break;case 282:case 284:g[y-1].as=g[y],this.$=g[y-1];break;case 285:g[y-2].as=g[y].value,this.$=g[y-2];break;case 286:g[y-1].as=g[y].value,this.$=g[y-1];break;case 288:this.$=new A.Column({columid:g[y],tableid:g[y-2],databaseid:g[y-4]});break;case 289:this.$=new A.Column({columnid:g[y],tableid:g[y-2]});break;case 290:this.$=new A.Column({columnid:g[y],tableid:"INSERTED"});break;case 291:this.$=new A.Column({columnid:g[y],tableid:"DELETED"});break;case 292:this.$=new A.Column({columnid:g[y]});break;case 293:this.$=new A.Column({columnid:g[y],tableid:g[y-2],databaseid:g[y-4]});break;case 294:this.$=new A.Column({columnid:g[y],tableid:"INSERTED"});break;case 295:this.$=new A.Column({columnid:g[y],tableid:"DELETED"});break;case 296:case 297:this.$=new A.Column({columnid:g[y],tableid:g[y-2]});break;case 298:this.$=new A.Column({columnid:"@"+g[y],tableid:g[y-3]});break;case 299:this.$=new A.Column({columnid:"inserted"});break;case 300:this.$=new A.Column({columnid:"deleted"});break;case 301:this.$=new A.Column({columnid:g[y]});break;case 316:this.$=new A.DomainValueValue;break;case 317:this.$=new A.Json({value:g[y]});break;case 320:case 321:case 322:A.queries||(A.queries=[]),A.queries.push(g[y-1]),g[y-1].queriesidx=A.queries.length,this.$=g[y-1];break;case 323:this.$=g[y];break;case 324:this.$=new A.FuncValue({funcid:"CURRENT_TIMESTAMP"});break;case 325:this.$=new A.FuncValue({funcid:"CURRENT_DATE"});break;case 326:this.$=new A.JavaScript({value:g[y].substr(2,g[y].length-4)});break;case 327:this.$=new A.JavaScript({value:'alasql.fn["'+g[y-2]+'"] = '+g[y].substr(2,g[y].length-4)});break;case 328:this.$=new A.JavaScript({value:'alasql.aggr["'+g[y-2]+'"] = '+g[y].substr(2,g[y].length-4)});break;case 329:this.$=new A.FuncValue({funcid:g[y],newid:!0});break;case 330:this.$=g[y],A.extend(this.$,{newid:!0});break;case 331:this.$=new A.Convert({expression:g[y-3]}),A.extend(this.$,g[y-1]);break;case 332:this.$=new A.Convert({expression:g[y-5],style:g[y-1]}),A.extend(this.$,g[y-3]);break;case 333:this.$=new A.Convert({expression:g[y-1]}),A.extend(this.$,g[y-3]);break;case 334:this.$=new A.Convert({expression:g[y-3],style:g[y-1]}),A.extend(this.$,g[y-5]);break;case 341:this.$=new A.FuncValue({funcid:"CURRENT_TIMESTAMP"});break;case 342:this.$=new A.FuncValue({funcid:"CURRENT_DATE"});break;case 343:g[y-2].length>1&&(g[y-4].toUpperCase()=="MAX"||g[y-4].toUpperCase()=="MIN")?this.$=new A.FuncValue({funcid:g[y-4],args:g[y-2]}):this.$=new A.AggrValue({aggregatorid:g[y-4].toUpperCase(),expression:g[y-2].pop(),over:g[y]});break;case 344:this.$=new A.AggrValue({aggregatorid:g[y-5].toUpperCase(),expression:g[y-2],distinct:!0,over:g[y]});break;case 345:this.$=new A.AggrValue({aggregatorid:g[y-5].toUpperCase(),expression:g[y-2],over:g[y]});break;case 346:this.$=new A.AggrValue({aggregatorid:"REDUCE",funcid:"GROUP_CONCAT",expression:g[y-3],order:g[y-2],separator:g[y-1]});break;case 347:this.$=new A.AggrValue({aggregatorid:"REDUCE",funcid:"GROUP_CONCAT",expression:g[y-3],distinct:!0,order:g[y-2],separator:g[y-1]});break;case 349:this.$=new A.Over,A.extend(this.$,g[y-2]),A.extend(this.$,g[y-1]);break;case 350:this.$={partition:g[y]};break;case 351:this.$={order:g[y]};break;case 355:var Fs=g[y].substring(1,g[y].length-1);Fs=Fs.replace(/\\n/g,` +`).replace(/\\t/g," ").replace(/\\r/g,"\r").replace(/\\\\/g,"\\"),this.$=Fs;break;case 356:this.$="SUM";break;case 357:this.$="TOTAL";break;case 358:this.$="COUNT";break;case 359:this.$="MIN";break;case 360:case 582:this.$="MAX";break;case 361:this.$="AVG";break;case 362:this.$="FIRST";break;case 363:this.$="LAST";break;case 364:this.$="AGGR";break;case 365:this.$="ARRAY";break;case 366:this.$="GROUP_CONCAT";break;case 367:var fl=g[y-5],Ru=g[y-2];Ru.length>1&&(fl.toUpperCase()=="MIN"||fl.toUpperCase()=="MAX")?this.$=new A.FuncValue({funcid:fl,args:Ru,over:g[y]}):t.aggr[g[y-5]]?this.$=new A.AggrValue({aggregatorid:"REDUCE",funcid:fl,expression:Ru[0],args:Ru,distinct:g[y-3]=="DISTINCT",over:g[y]}):this.$=new A.FuncValue({funcid:fl,args:Ru,over:g[y]});break;case 368:this.$=new A.FuncValue({funcid:g[y-3],over:g[y]});break;case 369:this.$=new A.FuncValue({funcid:"IIF",args:g[y-1]});break;case 370:this.$=new A.FuncValue({funcid:"REPLACE",args:g[y-1]});break;case 371:this.$=new A.FuncValue({funcid:g[y-2]});break;case 372:this.$=new A.FuncValue({funcid:"DATEADD",args:[new A.StringValue({value:g[y-5]}),g[y-3],g[y-1]]});break;case 373:this.$=new A.FuncValue({funcid:"DATEADD",args:[g[y-5],g[y-3],g[y-1]]});break;case 374:this.$=new A.FuncValue({funcid:"DATEDIFF",args:[new A.StringValue({value:g[y-5]}),g[y-3],g[y-1]]});break;case 375:this.$=new A.FuncValue({funcid:"DATEDIFF",args:[g[y-5],g[y-3],g[y-1]]});break;case 376:this.$=new A.FuncValue({funcid:"TIMESTAMPDIFF",args:[new A.StringValue({value:g[y-5]}),g[y-3],g[y-1]]});break;case 377:this.$=new A.FuncValue({funcid:"INTERVAL",args:[g[y-1],new A.StringValue({value:g[y].toLowerCase()})]});break;case 379:g[y-2].push(g[y]),this.$=g[y-2];break;case 380:this.$=new A.NumValue({value:+g[y]});break;case 381:this.$=new A.LogicValue({value:!0});break;case 382:this.$=new A.LogicValue({value:!1});break;case 383:this.$=new A.StringValue({value:g[y].substr(1,g[y].length-2).replace(/(\\\')/g,"'").replace(/(\'\')/g,"'")});break;case 384:this.$=new A.StringValue({value:g[y].substr(2,g[y].length-3).replace(/(\\\')/g,"'").replace(/(\'\')/g,"'")});break;case 385:this.$=new A.NullValue({value:void 0});break;case 386:this.$=new A.VarValue({variable:g[y]});break;case 387:A.exists||(A.exists=[]),this.$=new A.ExistsValue({value:g[y-1],existsidx:A.exists.length}),A.exists.push(g[y-1]);break;case 388:this.$=new A.ArrayValue({value:g[y-1]});break;case 389:case 390:this.$=new A.ParamValue({param:g[y]});break;case 391:typeof A.question>"u"&&(A.question=0),this.$=new A.ParamValue({param:A.question++});break;case 392:typeof A.question>"u"&&(A.question=0),this.$=new A.ParamValue({param:A.question++,array:!0});break;case 393:this.$=new A.CaseValue({expression:g[y-3],whens:g[y-2],elses:g[y-1]});break;case 394:this.$=new A.CaseValue({whens:g[y-2],elses:g[y-1]});break;case 395:case 744:case 745:this.$=g[y-1],this.$.push(g[y]);break;case 397:this.$={when:g[y-2],then:g[y]};break;case 400:case 401:this.$=new A.Op({left:g[y-2],op:"REGEXP",right:g[y]});break;case 402:this.$=new A.Op({left:g[y-2],op:"GLOB",right:g[y]});break;case 403:this.$=new A.Op({left:g[y-2],op:"LIKE",right:g[y]});break;case 404:this.$=new A.Op({left:g[y-4],op:"LIKE",right:g[y-2],escape:g[y]});break;case 405:this.$=new A.Op({left:g[y-2],op:"NOT LIKE",right:g[y]});break;case 406:this.$=new A.Op({left:g[y-4],op:"NOT LIKE",right:g[y-2],escape:g[y]});break;case 407:this.$=new A.Op({left:g[y-2],op:"||",right:g[y]});break;case 408:this.$=new A.Op({left:g[y-2],op:"+",right:g[y]});break;case 409:this.$=new A.Op({left:g[y-2],op:"-",right:g[y]});break;case 410:this.$=new A.Op({left:g[y-2],op:"*",right:g[y]});break;case 411:this.$=new A.Op({left:g[y-2],op:"/",right:g[y]});break;case 412:this.$=new A.Op({left:g[y-2],op:"%",right:g[y]});break;case 413:this.$=new A.Op({left:g[y-2],op:"^",right:g[y]});break;case 414:this.$=new A.Op({left:g[y-2],op:">>",right:g[y]});break;case 415:this.$=new A.Op({left:g[y-2],op:"<<",right:g[y]});break;case 416:this.$=new A.Op({left:g[y-2],op:"&",right:g[y]});break;case 417:this.$=new A.Op({left:g[y-2],op:"|",right:g[y]});break;case 418:case 419:case 421:this.$=new A.Op({left:g[y-2],op:"->",right:g[y]});break;case 420:this.$=new A.Op({left:g[y-4],op:"->",right:g[y-1]});break;case 422:case 423:case 425:this.$=new A.Op({left:g[y-2],op:"!",right:g[y]});break;case 424:this.$=new A.Op({left:g[y-4],op:"!",right:g[y-1]});break;case 426:this.$=new A.Op({left:g[y-2],op:">",right:g[y]});break;case 427:this.$=new A.Op({left:g[y-2],op:">=",right:g[y]});break;case 428:this.$=new A.Op({left:g[y-2],op:"<",right:g[y]});break;case 429:this.$=new A.Op({left:g[y-2],op:"<=",right:g[y]});break;case 430:this.$=new A.Op({left:g[y-2],op:"=",right:g[y]});break;case 431:this.$=new A.Op({left:g[y-2],op:"==",right:g[y]});break;case 432:this.$=new A.Op({left:g[y-2],op:"===",right:g[y]});break;case 433:this.$=new A.Op({left:g[y-2],op:"!=",right:g[y]});break;case 434:this.$=new A.Op({left:g[y-2],op:"!==",right:g[y]});break;case 435:this.$=new A.Op({left:g[y-2],op:"!===",right:g[y]});break;case 436:A.queries||(A.queries=[]);var dl=A.queries.slice();A.queries=[],dl.length>0&&(g[y-1].queries=dl),A.queries.push(g[y-1]),this.$=new A.Op({left:g[y-5],op:g[y-4],allsome:g[y-3],right:g[y-1],queriesidx:A.queries.length-1});break;case 437:this.$=new A.Op({left:g[y-5],op:g[y-4],allsome:g[y-3],right:g[y-1]});break;case 438:g[y-2].op=="BETWEEN1"?g[y-2].left.op=="AND"?this.$=new A.Op({left:g[y-2].left.left,op:"AND",right:new A.Op({left:g[y-2].left.right,op:"BETWEEN",right1:g[y-2].right,right2:g[y]})}):this.$=new A.Op({left:g[y-2].left,op:"BETWEEN",right1:g[y-2].right,right2:g[y]}):g[y-2].op=="NOT BETWEEN1"?g[y-2].left.op=="AND"?this.$=new A.Op({left:g[y-2].left.left,op:"AND",right:new A.Op({left:g[y-2].left.right,op:"NOT BETWEEN",right1:g[y-2].right,right2:g[y]})}):this.$=new A.Op({left:g[y-2].left,op:"NOT BETWEEN",right1:g[y-2].right,right2:g[y]}):this.$=new A.Op({left:g[y-2],op:"AND",right:g[y]});break;case 439:this.$=new A.Op({left:g[y-2],op:"OR",right:g[y]});break;case 440:this.$=new A.UniOp({op:"NOT",right:g[y]});break;case 441:this.$=new A.UniOp({op:"-",right:g[y]});break;case 442:this.$=new A.UniOp({op:"+",right:g[y]});break;case 443:this.$=new A.UniOp({op:"~",right:g[y]});break;case 444:this.$=new A.UniOp({op:"#",right:g[y]});break;case 445:this.$=new A.UniOp({right:g[y-1]});break;case 446:A.queries||(A.queries=[]);var dl=A.queries.slice();A.queries=[],dl.length>0&&(g[y-1].queries=dl),A.queries.push(g[y-1]),this.$=new A.Op({left:g[y-4],op:"IN",right:g[y-1],queriesidx:A.queries.length-1});break;case 447:A.queries||(A.queries=[]);var dl=A.queries.slice();A.queries=[],dl.length>0&&(g[y-1].queries=dl),A.queries.push(g[y-1]),this.$=new A.Op({left:g[y-5],op:"NOT IN",right:g[y-1],queriesidx:A.queries.length-1});break;case 448:this.$=new A.Op({left:g[y-4],op:"IN",right:g[y-1]});break;case 449:this.$=new A.Op({left:g[y-5],op:"NOT IN",right:g[y-1]});break;case 450:this.$=new A.Op({left:g[y-3],op:"IN",right:[]});break;case 451:this.$=new A.Op({left:g[y-4],op:"NOT IN",right:[]});break;case 452:case 454:this.$=new A.Op({left:g[y-2],op:"IN",right:g[y]});break;case 453:case 455:this.$=new A.Op({left:g[y-3],op:"NOT IN",right:g[y]});break;case 456:this.$=new A.Op({left:g[y-2],op:"BETWEEN1",right:g[y]});break;case 457:this.$=new A.Op({left:g[y-2],op:"NOT BETWEEN1",right:g[y]});break;case 458:this.$=new A.Op({op:"IS",left:g[y-2],right:g[y]});break;case 459:this.$=new A.Op({op:"IS",left:g[y-2],right:new A.UniOp({op:"NOT",right:new A.NullValue({value:void 0})})});break;case 460:this.$=new A.Convert({expression:g[y-2]}),A.extend(this.$,g[y]);break;case 461:case 462:this.$=g[y];break;case 463:this.$=g[y-1];break;case 470:this.$="ALL";break;case 471:this.$="SOME";break;case 472:this.$="ANY";break;case 473:this.$=new A.Update({table:g[y-5],columns:g[y-3],where:g[y-1]}),A.extend(this.$,g[y]);break;case 474:this.$=new A.Update({table:g[y-3],columns:g[y-1]}),A.extend(this.$,g[y]);break;case 477:this.$=new A.SetColumn({column:g[y-2],expression:g[y]});break;case 478:this.$=new A.SetColumn({variable:g[y-2],expression:g[y],method:g[y-3]});break;case 479:this.$=new A.Delete({table:g[y-3],where:g[y-1]}),A.extend(this.$,g[y]);break;case 480:this.$=new A.Delete({table:g[y-1]}),A.extend(this.$,g[y]);break;case 481:this.$=new A.Insert({into:g[y-3],values:g[y-1]}),A.extend(this.$,g[y]);break;case 482:this.$=new A.Insert({into:g[y-2],values:g[y-1]}),A.extend(this.$,g[y]);break;case 483:this.$=new A.Insert({into:g[y-3],values:g[y-1],ignore:!0}),A.extend(this.$,g[y]);break;case 484:this.$=new A.Insert({into:g[y-2],values:g[y-1],ignore:!0}),A.extend(this.$,g[y]);break;case 485:this.$=new A.Insert({into:g[y-6],columns:g[y-4],values:g[y-1],ignore:!0}),A.extend(this.$,g[y]);break;case 486:this.$=new A.Insert({into:g[y-5],columns:g[y-3],values:g[y-1],ignore:!0}),A.extend(this.$,g[y]);break;case 487:this.$=new A.Insert({into:g[y-2],select:g[y-1],ignore:!0}),A.extend(this.$,g[y]);break;case 488:this.$=new A.Insert({into:g[y-5],columns:g[y-3],select:g[y-1],ignore:!0}),A.extend(this.$,g[y]);break;case 489:case 491:this.$=new A.Insert({into:g[y-3],values:g[y-1],orreplace:!0}),A.extend(this.$,g[y]);break;case 490:case 492:this.$=new A.Insert({into:g[y-2],values:g[y-1],orreplace:!0}),A.extend(this.$,g[y]);break;case 493:this.$=new A.Insert({into:g[y-3],default:!0}),A.extend(this.$,g[y]);break;case 494:this.$=new A.Insert({into:g[y-6],columns:g[y-4],values:g[y-1]}),A.extend(this.$,g[y]);break;case 495:this.$=new A.Insert({into:g[y-5],columns:g[y-3],values:g[y-1]}),A.extend(this.$,g[y]);break;case 496:this.$=new A.Insert({into:g[y-2],select:g[y-1]}),A.extend(this.$,g[y]);break;case 497:this.$=new A.Insert({into:g[y-2],select:g[y-1],orreplace:!0}),A.extend(this.$,g[y]);break;case 498:this.$=new A.Insert({into:g[y-5],columns:g[y-3],select:g[y-1]}),A.extend(this.$,g[y]);break;case 499:this.$=new A.Insert({into:g[y-3],setcolumns:g[y-1]}),A.extend(this.$,g[y]);break;case 504:this.$=[g[y-1]];break;case 507:this.$=g[y-4],g[y-4].push(g[y-1]);break;case 508:case 509:case 511:case 519:this.$=g[y-2],g[y-2].push(g[y]);break;case 520:this.$=new A.CreateTable({table:g[y-4]}),A.extend(this.$,g[y-7]),A.extend(this.$,g[y-6]),A.extend(this.$,g[y-5]),A.extend(this.$,g[y-2]),A.extend(this.$,g[y]);break;case 521:this.$=new A.CreateTable({table:g[y]}),A.extend(this.$,g[y-3]),A.extend(this.$,g[y-2]),A.extend(this.$,g[y-1]);break;case 523:this.$={class:!0};break;case 533:this.$={temporary:!0};break;case 535:this.$={ifnotexists:!0};break;case 536:this.$={columns:g[y-2],constraints:g[y]};break;case 537:this.$={columns:g[y]};break;case 538:this.$={as:g[y]};break;case 539:case 570:this.$=[g[y]];break;case 541:case 542:case 543:case 544:case 545:g[y].constraintid=g[y-1],this.$=g[y];break;case 548:this.$={type:"CHECK",expression:g[y-1]};break;case 549:this.$={type:"PRIMARY KEY",columns:g[y-1],clustered:(g[y-3]+"").toUpperCase()};break;case 550:this.$={type:"FOREIGN KEY",columns:g[y-5],fktable:g[y-2],fkcolumns:g[y-1]},A.extend(this.$,g[y]);break;case 552:this.$={};break;case 553:this.$={ondelete:g[y]};break;case 554:this.$={onupdate:g[y]};break;case 555:this.$={ondelete:g[y-1],onupdate:g[y]};break;case 556:this.$={ondelete:g[y],onupdate:g[y-1]};break;case 557:case 558:this.$=g[y];break;case 559:this.$="CASCADE";break;case 560:this.$="SET NULL";break;case 561:this.$="SET DEFAULT";break;case 562:this.$="RESTRICT";break;case 563:this.$="NO ACTION";break;case 564:this.$={type:"UNIQUE",columns:g[y-1],clustered:(g[y-3]+"").toUpperCase()};break;case 565:this.$={type:"INDEX",indexid:g[y-3],columns:g[y-1]};break;case 572:this.$=new A.ColumnDef({columnid:g[y-2]}),A.extend(this.$,g[y-1]),A.extend(this.$,g[y]);break;case 573:this.$=new A.ColumnDef({columnid:g[y-1]}),A.extend(this.$,g[y]);break;case 574:this.$=new A.ColumnDef({columnid:g[y],dbtypeid:""});break;case 575:this.$={dbtypeid:g[y-5],dbsize:g[y-3],dbprecision:+g[y-1]};break;case 576:this.$={dbtypeid:g[y-3],dbsize:g[y-1]};break;case 577:this.$={dbtypeid:g[y]};break;case 578:this.$={dbtypeid:"ENUM",enumvalues:g[y-1]};break;case 579:this.$=g[y-1],g[y-1].dbtypeid+="["+g[y]+"]";break;case 581:case 795:this.$=+g[y];break;case 583:this.$=void 0;break;case 585:A.extend(g[y-1],g[y]),this.$=g[y-1];break;case 588:this.$={primarykey:!0};break;case 589:case 590:this.$={foreignkey:{table:g[y-2],columnid:g[y-1]}},A.extend(this.$.foreignkey,g[y]);break;case 591:this.$={identity:{value:g[y-3],step:g[y-1]}};break;case 592:this.$={identity:{value:1,step:1}};break;case 593:case 595:this.$={default:g[y]};break;case 594:this.$={default:g[y-1]};break;case 596:this.$={null:!0};break;case 597:this.$={notnull:!0};break;case 598:this.$={check:g[y]};break;case 599:this.$={unique:!0};break;case 600:this.$={onupdate:g[y]};break;case 601:this.$={onupdate:g[y-1]};break;case 602:this.$=new A.DropTable({tables:g[y],type:g[y-2]}),A.extend(this.$,g[y-1]);break;case 606:this.$={ifexists:!0};break;case 607:this.$=new A.AlterTable({table:g[y-3],renameto:g[y]});break;case 608:this.$=new A.AlterTable({table:g[y-3],addcolumn:g[y]});break;case 609:this.$=new A.AlterTable({table:g[y-3],modifycolumn:g[y]});break;case 610:this.$=new A.AlterTable({table:g[y-5],renamecolumn:g[y-2],to:g[y]});break;case 611:this.$=new A.AlterTable({table:g[y-3],dropcolumn:g[y]});break;case 612:this.$=new A.AlterTable({table:g[y-2],renameto:g[y]});break;case 613:this.$=new A.AttachDatabase({databaseid:g[y],engineid:g[y-2].toUpperCase()});break;case 614:this.$=new A.AttachDatabase({databaseid:g[y-3],engineid:g[y-5].toUpperCase(),args:g[y-1]});break;case 615:this.$=new A.AttachDatabase({databaseid:g[y-2],engineid:g[y-4].toUpperCase(),as:g[y]});break;case 616:this.$=new A.AttachDatabase({databaseid:g[y-5],engineid:g[y-7].toUpperCase(),as:g[y],args:g[y-3]});break;case 617:this.$=new A.DetachDatabase({databaseid:g[y]});break;case 618:this.$=new A.CreateDatabase({databaseid:g[y]}),A.extend(this.$,g[y]);break;case 619:this.$=new A.CreateDatabase({engineid:g[y-4].toUpperCase(),databaseid:g[y-1],as:g[y]}),A.extend(this.$,g[y-2]);break;case 620:this.$=new A.CreateDatabase({engineid:g[y-7].toUpperCase(),databaseid:g[y-4],args:g[y-2],as:g[y]}),A.extend(this.$,g[y-5]);break;case 621:this.$=new A.CreateDatabase({engineid:g[y-4].toUpperCase(),as:g[y],args:[g[y-1]]}),A.extend(this.$,g[y-2]);break;case 622:this.$=void 0;break;case 624:case 625:this.$=new A.UseDatabase({databaseid:g[y]});break;case 626:this.$=new A.DropDatabase({databaseid:g[y]}),A.extend(this.$,g[y-1]);break;case 627:case 628:this.$=new A.DropDatabase({databaseid:g[y],engineid:g[y-3].toUpperCase()}),A.extend(this.$,g[y-1]);break;case 629:this.$=new A.CreateIndex({indexid:g[y-5],table:g[y-3],columns:g[y-1]});break;case 630:this.$=new A.CreateIndex({indexid:g[y-5],table:g[y-3],columns:g[y-1],unique:!0});break;case 631:this.$=new A.DropIndex({indexid:g[y]});break;case 632:this.$=new A.ShowDatabases;break;case 633:this.$=new A.ShowDatabases({like:g[y]});break;case 634:this.$=new A.ShowDatabases({engineid:g[y-1].toUpperCase()});break;case 635:this.$=new A.ShowDatabases({engineid:g[y-3].toUpperCase(),like:g[y]});break;case 636:this.$=new A.ShowTables;break;case 637:this.$=new A.ShowTables({like:g[y]});break;case 638:this.$=new A.ShowTables({databaseid:g[y]});break;case 639:this.$=new A.ShowTables({like:g[y],databaseid:g[y-2]});break;case 640:this.$=new A.ShowColumns({table:g[y]});break;case 641:this.$=new A.ShowColumns({table:g[y-2],databaseid:g[y]});break;case 642:this.$=new A.ShowIndex({table:g[y]});break;case 643:this.$=new A.ShowIndex({table:g[y-2],databaseid:g[y]});break;case 644:this.$=new A.ShowCreateTable({table:g[y]});break;case 645:this.$=new A.ShowCreateTable({table:g[y-2],databaseid:g[y]});break;case 646:this.$=new A.CreateTable({table:g[y-6],view:!0,select:g[y-1],viewcolumns:g[y-4]}),A.extend(this.$,g[y-9]),A.extend(this.$,g[y-7]);break;case 647:this.$=new A.CreateTable({table:g[y-3],view:!0,select:g[y-1]}),A.extend(this.$,g[y-6]),A.extend(this.$,g[y-4]);break;case 651:this.$=new A.DropTable({tables:g[y],view:!0}),A.extend(this.$,g[y-1]);break;case 652:case 805:this.$=new A.ExpressionStatement({expression:g[y]});break;case 653:this.$=new A.Source({url:g[y].value});break;case 654:this.$=new A.Assert({value:g[y]});break;case 655:this.$=new A.Assert({value:g[y].value});break;case 656:this.$=new A.Assert({value:g[y],message:g[y-2]});break;case 658:case 670:case 672:this.$=g[y].value;break;case 659:case 667:this.$=+g[y].value;break;case 660:this.$=!!g[y].value;break;case 668:this.$=-g[y].value;break;case 669:this.$=""+g[y].value;break;case 678:this.$={};break;case 681:this.$=[];break;case 682:A.extend(g[y-2],g[y]),this.$=g[y-2];break;case 684:this.$={},this.$[g[y-2].substr(1,g[y-2].length-2)]=g[y];break;case 685:case 686:this.$={},this.$[g[y-2]]=g[y];break;case 687:this.$={},this.$[g[y-2].substr(1,g[y-2].length-2)]=-g[y].value;break;case 688:case 689:this.$={},this.$[g[y-2]]=-g[y].value;break;case 692:this.$=new A.SetVariable({variable:g[y-2].toLowerCase(),value:g[y]});break;case 693:this.$=new A.SetVariable({variable:g[y-1].toLowerCase(),value:g[y]});break;case 694:this.$=new A.SetVariable({variable:g[y-2],expression:g[y]});break;case 695:this.$=new A.SetVariable({variable:g[y-3],props:g[y-2],expression:g[y]});break;case 696:this.$=new A.SetVariable({variable:g[y-2],expression:g[y],method:g[y-3]});break;case 697:this.$=new A.SetVariable({variable:g[y-3],props:g[y-2],expression:g[y],method:g[y-4]});break;case 698:this.$="@";break;case 699:this.$="$";break;case 705:this.$=!0;break;case 706:this.$=!1;break;case 707:this.$=new A.CommitTransaction;break;case 708:this.$=new A.RollbackTransaction;break;case 709:this.$=new A.BeginTransaction;break;case 710:this.$=new A.If({expression:g[y-2],thenstat:g[y-1],elsestat:g[y]}),g[y-1].exists&&(this.$.exists=g[y-1].exists),g[y-1].queries&&(this.$.queries=g[y-1].queries);break;case 711:this.$=new A.If({expression:g[y-1],thenstat:g[y]}),g[y].exists&&(this.$.exists=g[y].exists),g[y].queries&&(this.$.queries=g[y].queries);break;case 712:this.$=g[y];break;case 713:this.$=new A.While({expression:g[y-1],loopstat:g[y]}),g[y].exists&&(this.$.exists=g[y].exists),g[y].queries&&(this.$.queries=g[y].queries);break;case 714:case 715:this.$=new A.Continue;break;case 716:case 717:this.$=new A.Break;break;case 718:this.$=new A.BeginEnd({statements:g[y-1]});break;case 719:this.$=new A.Print({exprs:g[y]});break;case 720:this.$=new A.Print({select:g[y]});break;case 721:this.$=new A.Require({paths:g[y]});break;case 722:this.$=new A.Require({plugins:g[y]});break;case 723:case 724:this.$=g[y].toUpperCase();break;case 725:this.$=new A.Echo({expr:g[y]});break;case 730:this.$=new A.Declare({declares:g[y]});break;case 733:this.$={variable:g[y-1]},A.extend(this.$,g[y]);break;case 734:this.$={variable:g[y-2]},A.extend(this.$,g[y]);break;case 735:this.$={variable:g[y-3],expression:g[y]},A.extend(this.$,g[y-2]);break;case 736:this.$={variable:g[y-4],expression:g[y]},A.extend(this.$,g[y-2]);break;case 737:this.$=new A.TruncateTable({table:g[y]});break;case 738:this.$=new A.Merge,A.extend(this.$,g[y-4]),A.extend(this.$,g[y-3]),A.extend(this.$,g[y-2]),A.extend(this.$,{matches:g[y-1]}),A.extend(this.$,g[y]);break;case 739:case 740:this.$={into:g[y]};break;case 743:this.$={on:g[y]};break;case 748:this.$={matched:!0,action:g[y]};break;case 749:this.$={matched:!0,expr:g[y-2],action:g[y]};break;case 750:this.$={delete:!0};break;case 751:this.$={update:g[y]};break;case 752:case 753:this.$={matched:!1,bytarget:!0,action:g[y]};break;case 754:case 755:this.$={matched:!1,bytarget:!0,expr:g[y-2],action:g[y]};break;case 756:this.$={matched:!1,bysource:!0,action:g[y]};break;case 757:this.$={matched:!1,bysource:!0,expr:g[y-2],action:g[y]};break;case 758:this.$={insert:!0,values:g[y]};break;case 759:this.$={insert:!0,values:g[y],columns:g[y-3]};break;case 760:this.$={insert:!0,defaultvalues:!0};break;case 761:this.$={insert:!0,defaultvalues:!0,columns:g[y-3]};break;case 763:this.$={output:{columns:g[y]}};break;case 764:this.$={output:{columns:g[y-3],intovar:g[y],method:g[y-1]}};break;case 765:this.$={output:{columns:g[y-2],intotable:g[y]}};break;case 766:this.$={output:{columns:g[y-5],intotable:g[y-3],intocolumns:g[y-1]}};break;case 767:this.$=new A.CreateVertex({class:g[y-3],sharp:g[y-2],name:g[y-1]}),A.extend(this.$,g[y]);break;case 770:this.$={sets:g[y]};break;case 771:this.$={content:g[y]};break;case 772:this.$={select:g[y]};break;case 773:this.$=new A.CreateEdge({from:g[y-3],to:g[y-1],name:g[y-5]}),A.extend(this.$,g[y]);break;case 774:this.$=new A.CreateGraph({graph:g[y]});break;case 775:this.$=new A.CreateGraph({from:g[y]});break;case 778:this.$=g[y-2],g[y-1]&&(this.$.json=new A.Json({value:g[y-1]})),g[y]&&(this.$.as=g[y]);break;case 779:this.$={source:g[y-6],target:g[y]},g[y-3]&&(this.$.json=new A.Json({value:g[y-3]})),g[y-2]&&(this.$.as=g[y-2]),A.extend(this.$,g[y-4]);break;case 780:this.$={source:g[y-5],target:g[y]},g[y-2]&&(this.$.json=new A.Json({value:g[y-3]})),g[y-1]&&(this.$.as=g[y-2]);break;case 781:this.$={source:g[y-2],target:g[y]};break;case 785:this.$={vars:g[y],method:g[y-1]};break;case 788:case 789:var kh=g[y-1];this.$={prop:g[y-3],sharp:g[y-2],name:typeof kh>"u"?void 0:kh.substr(1,kh.length-2),class:g[y]};break;case 790:var Fh=g[y-1];this.$={sharp:g[y-2],name:typeof Fh>"u"?void 0:Fh.substr(1,Fh.length-2),class:g[y]};break;case 791:var rd=g[y-1];this.$={name:typeof rd>"u"?void 0:rd.substr(1,rd.length-2),class:g[y]};break;case 792:this.$={class:g[y]};break;case 798:this.$=new A.AddRule({left:g[y-2],right:g[y]});break;case 799:this.$=new A.AddRule({right:g[y]});break;case 802:this.$={termid:g[y]};break;case 803:this.$={termid:g[y-3],args:g[y-1]};break;case 806:this.$=new A.CreateTrigger({trigger:g[y-6],when:g[y-5],action:g[y-4],table:g[y-2],statement:g[y]}),g[y].exists&&(this.$.exists=g[y].exists),g[y].queries&&(this.$.queries=g[y].queries);break;case 807:this.$=new A.CreateTrigger({trigger:g[y-5],when:g[y-4],action:g[y-3],table:g[y-1],funcid:g[y]});break;case 808:this.$=new A.CreateTrigger({trigger:g[y-6],when:g[y-4],action:g[y-3],table:g[y-5],statement:g[y]}),g[y].exists&&(this.$.exists=g[y].exists),g[y].queries&&(this.$.queries=g[y].queries);break;case 809:case 810:case 812:this.$="AFTER";break;case 811:this.$="BEFORE";break;case 813:this.$="INSTEADOF";break;case 814:this.$="INSERT";break;case 815:this.$="DELETE";break;case 816:this.$="UPDATE";break;case 817:this.$=new A.DropTrigger({trigger:g[y]});break;case 818:this.$=new A.Reindex({indexid:g[y]});break;case 1098:case 1122:case 1124:case 1126:case 1130:case 1132:case 1134:case 1136:case 1138:case 1140:this.$=[];break;case 1099:case 1117:case 1119:case 1123:case 1125:case 1127:case 1131:case 1133:case 1135:case 1137:case 1139:case 1141:g[y-1].push(g[y]);break;case 1116:case 1118:this.$=[g[y]];break}},table:[n([14,639,798],c,{12:1,13:2,16:3,17:4,21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,2:o,4:l,5:f,6:u,7:p,8:h,9:b,18:U,58:R,77:L,83:T,96:C,133:te,155:W,165:Y,198:F,294:N,295:Ae,322:je,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Bt,455:Zr,466:Un,472:$i,474:Bi,475:Yn,477:Vn,478:ni,479:cs,480:Ds,481:Cn,482:oi,483:ms,487:gs,488:To,491:Qo,492:Io,545:Mo,546:Sa,555:$o}),{1:[3]},{14:[1,113],15:114,639:Pc,798:ac},n(ao,[2,12]),n(ao,[2,13]),n(Ce,[2,16]),n(ao,c,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,16:117,2:o,4:l,5:f,6:u,7:p,8:h,9:b,19:[1,118],58:R,77:L,83:T,96:C,133:te,155:W,165:Y,198:F,294:N,295:Ae,322:je,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Bt,455:Zr,466:Un,472:$i,474:Bi,475:Yn,477:Vn,478:ni,479:cs,480:Ds,481:Cn,482:oi,483:ms,487:gs,488:To,491:Qo,492:Io,545:Mo,546:Sa,555:$o}),n(Ce,[2,18]),n(Ce,[2,19]),n(Ce,[2,20]),n(Ce,[2,21]),n(Ce,[2,22]),n(Ce,[2,23]),n(Ce,[2,24]),n(Ce,[2,25]),n(Ce,[2,26]),n(Ce,[2,27]),n(Ce,[2,28]),n(Ce,[2,29]),n(Ce,[2,30]),n(Ce,[2,31]),n(Ce,[2,32]),n(Ce,[2,33]),n(Ce,[2,34]),n(Ce,[2,35]),n(Ce,[2,36]),n(Ce,[2,37]),n(Ce,[2,38]),n(Ce,[2,39]),n(Ce,[2,40]),n(Ce,[2,41],{93:119,260:120,127:Uc,271:Uc,273:Uc,171:$1,177:oc,178:Zo}),n(Ce,[2,42]),n(Ce,[2,43]),n(Ce,[2,44]),n(Ce,[2,45]),n(Ce,[2,46]),n(Ce,[2,47]),n(Ce,[2,48]),n(Ce,[2,49]),n(Ce,[2,50]),n(Ce,[2,51]),n(Ce,[2,52]),n(Ce,[2,53]),n(Ce,[2,54]),n(Ce,[2,55]),n(Ce,[2,56]),n(Ce,[2,57]),n(Ce,[2,58]),n(Ce,[2,59]),n(Ce,[2,60]),n(Ce,[2,61]),n(Ce,[2,62]),n(Ce,[2,63]),n(Ce,[2,64]),n(Ce,[2,65]),n(Ce,[2,66]),n(Ce,[2,67]),n(Ce,[2,68]),n(Ce,[2,69]),n(Ce,[2,70]),n(Ce,[2,71]),n(Ce,[2,72]),{388:[1,124]},{2:o,3:125,4:l,5:f,6:u,7:p,8:h,9:b},{2:o,3:127,4:l,5:f,6:u,7:p,8:h,9:b,165:Fe,209:126,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne},n(lc,[2,532],{3:136,383:140,2:o,4:l,5:f,6:u,7:p,8:h,9:b,143:cc,144:pf,196:[1,138],202:[1,137],296:[1,144],297:[1,145],392:[1,146],442:[1,135],511:[1,139],547:[1,143]}),{154:P1,489:147,490:148},{192:[1,150]},{442:[1,151]},{2:o,3:153,4:l,5:f,6:u,7:p,8:h,9:b,139:[1,159],202:[1,154],388:[1,158],434:155,442:[1,152],447:[1,156],547:[1,157]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:160,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(rl,U1,{374:224,180:[1,226],207:uc,377:[1,225]}),n(rl,U1,{374:228,207:uc}),{2:o,3:240,4:l,5:f,6:u,7:p,8:h,9:b,83:Vc,141:Po,152:ve,153:233,154:it,161:Ee,165:Fe,190:me,207:[1,231],208:234,209:236,210:235,211:237,218:230,227:238,229:Dl,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,335:we,456:209,457:ge,461:pe,493:229},{2:o,3:242,4:l,5:f,6:u,7:p,8:h,9:b},{388:[1,243]},n(_u,[2,1094],{87:244,115:245,116:U3}),{44:247,45:248,83:T,86:76,96:C,193:103,198:F},n(Gc,[2,1098],{97:249}),{2:o,3:253,4:l,5:f,6:u,7:p,8:h,9:b,199:[1,251],202:[1,254],295:[1,250],388:[1,255],442:[1,252]},{388:[1,256]},{2:o,3:260,4:l,5:f,6:u,7:p,8:h,9:b,78:257,80:258,81:[1,259]},n([339,639,798],c,{16:3,17:4,21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,13:262,2:o,4:l,5:f,6:u,7:p,8:h,9:b,18:U,58:R,77:L,83:T,96:C,133:te,155:W,165:Y,198:F,294:N,295:Ae,322:je,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Bt,455:Zr,466:Un,472:$i,473:[1,261],474:Bi,475:Yn,477:Vn,478:ni,479:cs,480:Ds,481:Cn,482:oi,483:ms,487:gs,488:To,491:Qo,492:Io,545:Mo,546:Sa,555:$o}),{473:[1,263]},{473:[1,264]},{2:o,3:266,4:l,5:f,6:u,7:p,8:h,9:b,442:[1,265]},{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,152:ve,161:Ee,190:me,208:268,210:269,231:267,335:we},n(hn,[2,326]),{122:271,141:Pe,329:Re},{2:o,3:127,4:l,5:f,6:u,7:p,8:h,9:b,122:277,140:De,141:[1,274],152:ve,153:272,154:ys,161:Ee,165:Fe,190:me,205:276,209:281,210:280,284:278,285:279,292:xu,293:jc,302:273,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,335:we,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:284,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Ce,[2,714]),n(Ce,[2,715]),n(Ce,[2,716]),n(Ce,[2,717]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,44:286,45:248,61:180,83:V1,86:76,96:C,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:285,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,193:103,198:F,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:294,4:l,5:f,6:u,7:p,8:h,9:b,122:291,141:Pe,329:Re,484:289,485:290,486:292,487:Su},{2:o,3:295,4:l,5:f,6:u,7:p,8:h,9:b,152:Ea,154:y1,469:296},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:299,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{466:[1,300]},{2:o,3:104,4:l,5:f,6:u,7:p,8:h,9:b,543:302,544:301},{2:o,3:127,4:l,5:f,6:u,7:p,8:h,9:b,165:Fe,209:303,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:304,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(b1,mf,{195:308,173:[1,307],194:[1,305],196:[1,306],204:fc}),n(V3,[2,802],{83:[1,310]}),n([2,4,5,6,7,8,9,14,77,83,84,103,108,116,127,137,140,141,146,152,154,161,163,165,171,173,177,178,188,189,190,192,194,196,204,207,229,252,266,267,271,273,281,292,293,294,298,299,301,304,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,335,336,339,343,345,350,457,461,503,639,798],[2,165],{158:[1,311],159:[1,312],199:[1,313],200:[1,314],201:[1,315],202:[1,316],203:[1,317]}),n(X,[2,1]),n(X,[2,2]),n(X,[2,3]),n(X,[2,4]),n(X,[2,5]),n(X,[2,6]),{6:[1,435],7:[1,474],8:[1,351],9:[1,534],10:318,127:[1,477],140:[1,470],181:[1,495],229:[1,427],265:[1,469],266:[1,403],267:[1,438],271:[1,442],281:[1,384],377:[1,418],415:[1,341],416:[1,512],418:[1,323],439:[1,325],447:[1,583],451:[1,504],453:[1,475],454:[1,543],471:[1,473],473:[1,559],478:[1,371],499:[1,449],503:[1,481],509:[1,370],552:[1,335],553:[1,327],554:[1,430],556:[1,319],557:[1,320],558:[1,321],559:[1,322],560:[1,324],561:[1,326],562:[1,328],563:[1,329],564:[1,330],565:[1,331],566:[1,332],567:[1,333],568:[1,334],569:[1,336],570:[1,337],571:[1,338],572:[1,339],573:[1,340],574:[1,342],575:[1,343],576:[1,344],577:[1,345],578:[1,346],579:[1,347],580:[1,348],581:[1,349],582:[1,350],583:[1,352],584:[1,353],585:[1,354],586:[1,355],587:[1,356],588:[1,357],589:[1,358],590:[1,359],591:[1,360],592:[1,361],593:[1,362],594:[1,363],595:[1,364],596:[1,365],597:[1,366],598:[1,367],599:[1,368],600:[1,369],601:[1,372],602:[1,373],603:[1,374],604:[1,375],605:[1,376],606:[1,377],607:[1,378],608:[1,379],609:[1,380],610:[1,381],611:[1,382],612:[1,383],613:[1,385],614:[1,386],615:[1,387],616:[1,388],617:[1,389],618:[1,390],619:[1,391],620:[1,392],621:[1,393],622:[1,394],623:[1,395],624:[1,396],625:[1,397],626:[1,398],627:[1,399],628:[1,400],629:[1,401],630:[1,402],631:[1,404],632:[1,405],633:[1,406],634:[1,407],635:[1,408],636:[1,409],637:[1,410],638:[1,411],639:[1,412],640:[1,413],641:[1,414],642:[1,415],643:[1,416],644:[1,417],645:[1,419],646:[1,420],647:[1,421],648:[1,422],649:[1,423],650:[1,424],651:[1,425],652:[1,426],653:[1,428],654:[1,429],655:[1,431],656:[1,432],657:[1,433],658:[1,434],659:[1,436],660:[1,437],661:[1,439],662:[1,440],663:[1,441],664:[1,443],665:[1,444],666:[1,445],667:[1,446],668:[1,447],669:[1,448],670:[1,450],671:[1,451],672:[1,452],673:[1,453],674:[1,454],675:[1,455],676:[1,456],677:[1,457],678:[1,458],679:[1,459],680:[1,460],681:[1,461],682:[1,462],683:[1,463],684:[1,464],685:[1,465],686:[1,466],687:[1,467],688:[1,468],689:[1,471],690:[1,472],691:[1,476],692:[1,478],693:[1,479],694:[1,480],695:[1,482],696:[1,483],697:[1,484],698:[1,485],699:[1,486],700:[1,487],701:[1,488],702:[1,489],703:[1,490],704:[1,491],705:[1,492],706:[1,493],707:[1,494],708:[1,496],709:[1,497],710:[1,498],711:[1,499],712:[1,500],713:[1,501],714:[1,502],715:[1,503],716:[1,505],717:[1,506],718:[1,507],719:[1,508],720:[1,509],721:[1,510],722:[1,511],723:[1,513],724:[1,514],725:[1,515],726:[1,516],727:[1,517],728:[1,518],729:[1,519],730:[1,520],731:[1,521],732:[1,522],733:[1,523],734:[1,524],735:[1,525],736:[1,526],737:[1,527],738:[1,528],739:[1,529],740:[1,530],741:[1,531],742:[1,532],743:[1,533],744:[1,535],745:[1,536],746:[1,537],747:[1,538],748:[1,539],749:[1,540],750:[1,541],751:[1,542],752:[1,544],753:[1,545],754:[1,546],755:[1,547],756:[1,548],757:[1,549],758:[1,550],759:[1,551],760:[1,552],761:[1,553],762:[1,554],763:[1,555],764:[1,556],765:[1,557],766:[1,558],767:[1,560],768:[1,561],769:[1,562],770:[1,563],771:[1,564],772:[1,565],773:[1,566],774:[1,567],775:[1,568],776:[1,569],777:[1,570],778:[1,571],779:[1,572],780:[1,573],781:[1,574],782:[1,575],783:[1,576],784:[1,577],785:[1,578],786:[1,579],787:[1,580],788:[1,581],789:[1,582],790:[1,584],791:[1,585],792:[1,586],793:[1,587],794:[1,588],795:[1,589],796:[1,590],797:[1,591]},{1:[2,10]},n(ao,c,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,16:592,2:o,4:l,5:f,6:u,7:p,8:h,9:b,58:R,77:L,83:T,96:C,133:te,155:W,165:Y,198:F,294:N,295:Ae,322:je,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Bt,455:Zr,466:Un,472:$i,474:Bi,475:Yn,477:Vn,478:ni,479:cs,480:Ds,481:Cn,482:oi,483:ms,487:gs,488:To,491:Qo,492:Io,545:Mo,546:Sa,555:$o}),n(G3,[2,1092]),n(G3,[2,1093]),n(ao,[2,14]),{20:[1,593]},n(gf,D2,{94:594,127:R2}),{45:598,83:[1,600],86:599,99:597,193:103,198:F,261:596},n(Rl,[2,253],{173:[1,601],262:[1,602]}),n(Rl,[2,255],{262:[1,603]}),n(Rl,[2,256],{262:[1,604]}),{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:605},{442:[1,606]},n(Ce,[2,805]),{83:Bl},{83:[1,608]},{83:qc},{83:B2},{83:[1,611]},{83:[1,612]},{83:[1,613]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:614,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Uo,oo,{385:615,165:nl}),{442:[1,617]},{2:o,3:618,4:l,5:f,6:u,7:p,8:h,9:b},{202:[1,619]},{2:o,3:625,4:l,5:f,6:u,7:p,8:h,9:b,141:Oo,146:G1,152:Ea,154:y1,161:v1,192:[1,621],469:632,512:620,513:622,514:623,517:624,521:629,532:626,536:628},{139:[1,636],384:633,388:[1,635],447:[1,634]},{122:638,141:Pe,192:[2,1218],329:Re,510:637},n(k2,[2,1212],{504:639,3:640,2:o,4:l,5:f,6:u,7:p,8:h,9:b}),{2:o,3:641,4:l,5:f,6:u,7:p,8:h,9:b},{4:[1,642]},{4:[1,643]},n(lc,[2,533]),n(Ce,[2,730],{79:[1,644]}),n(lo,[2,731]),{2:o,3:645,4:l,5:f,6:u,7:p,8:h,9:b},{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,152:ve,161:Ee,190:me,208:268,210:269,231:646,335:we},{2:o,3:647,4:l,5:f,6:u,7:p,8:h,9:b},n(Uo,Eu,{435:648,165:yf}),{442:[1,650]},{2:o,3:651,4:l,5:f,6:u,7:p,8:h,9:b},n(Uo,Eu,{435:652,165:yf}),n(Uo,Eu,{435:653,165:yf}),{2:o,3:654,4:l,5:f,6:u,7:p,8:h,9:b},n(il,[2,1206]),n(il,[2,1207]),n(Ce,c,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,16:655,123:672,360:684,2:o,4:l,5:f,6:u,7:p,8:h,9:b,58:R,77:L,83:T,96:C,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:bf,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,155:W,163:pn,165:Y,179:vn,180:xn,188:dr,189:ir,198:F,294:N,295:Ae,322:je,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Bt,455:Zr,466:Un,472:$i,474:Bi,475:Yn,477:Vn,478:ni,479:cs,480:Ds,481:Cn,482:oi,483:ms,487:gs,488:To,491:Qo,492:Io,545:Mo,546:Sa,555:$o}),n(hn,[2,302]),n(hn,[2,303]),n(hn,[2,304]),n(hn,[2,305]),n(hn,[2,306]),n(hn,[2,307]),n(hn,[2,308]),n(hn,[2,309]),n(hn,[2,310]),n(hn,[2,311]),n(hn,[2,312]),n(hn,[2,313]),n(hn,[2,314]),n(hn,[2,315]),n(hn,[2,316]),n(hn,[2,317]),n(hn,[2,318]),n(hn,[2,319]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,30:701,31:700,40:696,44:695,45:248,61:180,83:V1,86:76,96:C,104:698,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,193:103,198:F,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,291:697,292:ct,293:ot,294:N,295:F2,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:wu,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,373:Te,456:209,457:ge,461:pe},n(hn,[2,323]),n(hn,[2,324]),n(Hc,[2,325],{83:B2}),{83:[1,703]},{83:[1,704]},n([2,4,5,6,7,8,9,14,58,77,79,82,84,96,103,105,108,109,116,121,124,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Au,{83:Bl,125:[1,705]}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:706,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:707,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:708,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:709,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:710,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(j3,q3,{125:[1,711]}),n(j3,H3,{125:[1,712]}),n(hn,[2,292]),n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,229,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,275,281,292,293,294,295,298,299,301,304,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,333,335,336,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,452,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798,799,800],[2,380]),n(ua,[2,381]),n(ua,[2,382]),n(ua,z3),n(ua,[2,384]),n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,385]),{2:o,3:714,4:l,5:f,6:u,7:p,8:h,9:b,140:[1,715],334:713},{2:o,3:716,4:l,5:f,6:u,7:p,8:h,9:b},n(dc,[2,391]),n(dc,[2,392]),{2:o,3:717,4:l,5:f,6:u,7:p,8:h,9:b,83:M2,122:719,140:De,141:Pe,152:ve,161:Ee,190:me,205:720,210:722,284:721,327:et,328:nt,329:Re,335:we,456:723,461:pe},{83:[1,724]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:725,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,337:726,340:727,341:Tu,345:wt,350:At,456:209,457:ge,461:pe},{83:[1,729]},{83:[1,730]},n(co,[2,662]),{2:o,3:746,4:l,5:f,6:u,7:p,8:h,9:b,83:Iu,120:741,122:739,140:De,141:Pe,152:ve,153:735,154:ys,161:Ee,165:Fe,190:me,205:737,209:744,210:743,229:Is,281:xs,284:740,285:742,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,333:[1,733],335:we,350:kl,456:209,457:ge,458:731,459:734,460:736,461:pe,464:732},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:749,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:750,4:l,5:f,6:u,7:p,8:h,9:b,165:Fe,209:751,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne},{83:[2,356]},{83:[2,357]},{83:[2,358]},{83:[2,359]},{83:[2,360]},{83:[2,361]},{83:[2,362]},{83:[2,363]},{83:[2,364]},{83:[2,365]},{2:o,3:757,4:l,5:f,6:u,7:p,8:h,9:b,140:W3,141:Y3,462:752,463:[1,753],465:754},{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,152:ve,161:Ee,190:me,208:268,210:269,231:758,335:we},n(rl,U1,{374:759,207:uc}),{322:[1,760]},n(rl,[2,503]),{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,152:ve,161:Ee,190:me,208:268,210:269,231:761,335:we},{251:[1,763],494:762},{251:[2,739]},{2:o,3:240,4:l,5:f,6:u,7:p,8:h,9:b,83:Vc,141:Po,152:ve,153:233,154:it,161:Ee,165:Fe,190:me,208:234,209:236,210:235,211:237,218:764,227:238,229:Dl,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,335:we,456:209,457:ge,461:pe},{44:765,45:248,83:T,86:76,96:C,193:103,198:F},n(vf,[2,1148],{220:766,82:[1,767]}),n(ki,[2,1152],{222:768,230:770,3:771,2:o,4:l,5:f,6:u,7:p,8:h,9:b,82:e1,163:[1,769]}),n(ki,[2,1154],{3:771,224:773,230:774,2:o,4:l,5:f,6:u,7:p,8:h,9:b,82:e1}),n(ki,[2,1156],{3:771,225:775,230:776,2:o,4:l,5:f,6:u,7:p,8:h,9:b,82:e1}),n(ki,[2,1158],{3:771,226:777,230:778,2:o,4:l,5:f,6:u,7:p,8:h,9:b,82:e1}),n(ki,[2,1160],{3:771,228:779,230:780,2:o,4:l,5:f,6:u,7:p,8:h,9:b,82:e1}),n(ki,[2,201]),n([2,4,5,6,7,8,9,14,77,79,82,84,103,108,127,137,163,171,177,178,192,215,217,242,243,244,245,246,247,248,249,250,251,252,271,273,339,343,503,639,798],$2,{83:Bl,125:X3}),n([2,4,5,6,7,8,9,14,77,79,82,84,103,108,127,137,171,177,178,215,217,242,243,244,245,246,247,248,249,250,251,252,271,273,339,343,503,639,798],[2,204]),n(Ce,[2,818]),{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:782},n(hc,P2,{88:783,207:U2}),n(_u,[2,1095]),n(J3,[2,1112],{117:785,199:[1,786]}),{84:[1,787]},n(Co,Uc,{93:119,260:120,171:$1,177:oc,178:Zo}),n([14,84,192,339,343,503,639,798],P2,{456:209,88:788,126:789,3:790,123:793,153:815,167:825,169:826,2:o,4:l,5:f,6:u,7:p,8:h,9:b,77:uo,82:fo,83:Ya,121:fa,124:Ft,125:Rt,127:Xa,131:wa,132:ho,133:da,137:po,138:mo,139:go,140:yo,141:bo,142:na,143:vo,144:ha,145:_o,146:Ws,147:Ys,148:xo,149:Xs,150:Ja,151:Js,152:Aa,154:Ta,155:Ia,157:ia,158:sa,159:pa,161:Oa,163:Ka,165:Ca,171:Qa,173:La,175:ma,177:ga,178:Na,179:Da,180:Za,181:Ra,182:Ba,184:Ks,194:eo,196:ka,207:U2,266:We,267:qe,304:Fa,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,457:ge,461:pe}),{388:[1,840]},{192:[1,841]},n(Ce,[2,632],{121:[1,842]}),{442:[1,843]},{192:[1,844]},n(Ce,[2,636],{121:[1,845],192:[1,846]}),{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:847},{44:848,45:248,79:[1,849],83:T,86:76,96:C,193:103,198:F},n(pc,[2,76]),{2:o,3:260,4:l,5:f,6:u,7:p,8:h,9:b,80:850},{82:[1,851],83:[1,852]},n(Ce,[2,709]),{15:114,339:[1,853],639:Pc,798:ac},n(Ce,[2,707]),n(Ce,[2,708]),{2:o,3:854,4:l,5:f,6:u,7:p,8:h,9:b},n(Ce,[2,625]),{155:[1,855]},n(mc,[2,207]),n(mc,[2,208]),n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,105,133,137,152,154,155,157,158,161,163,165,190,192,196,198,250,294,295,322,330,335,339,343,368,372,373,378,379,391,403,404,407,408,433,437,438,439,440,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,545,546,552,553,554,555,639,798],$2,{125:X3}),n(Ce,[2,653]),n(Ce,[2,654]),n(Ce,[2,655]),n(Ce,z3,{79:[1,856]}),{83:M2,122:719,140:De,141:Pe,152:ve,161:Ee,190:me,205:720,210:722,284:721,327:et,328:nt,329:Re,335:we,456:723,461:pe},n(Di,[2,335]),n(Di,[2,336]),n(Di,[2,337]),n(Di,[2,338]),n(Di,[2,339]),n(Di,[2,340]),n(Di,[2,341]),n(Di,[2,342],{83:B2}),n(Ce,c,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,123:672,360:684,16:857,2:o,4:l,5:f,6:u,7:p,8:h,9:b,58:R,77:L,83:T,96:C,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:bf,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,155:W,163:pn,165:Y,179:vn,180:xn,188:dr,189:ir,198:F,294:N,295:Ae,322:je,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Bt,455:Zr,466:Un,472:$i,474:Bi,475:Yn,477:Vn,478:ni,479:cs,480:Ds,481:Cn,482:oi,483:ms,487:gs,488:To,491:Qo,492:Io,545:Mo,546:Sa,555:$o}),n(Ce,[2,719],{79:S}),n(Ce,[2,720]),n(P,[2,378],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,30:701,31:700,40:696,44:860,45:248,61:180,83:V1,86:76,96:C,104:698,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,193:103,198:F,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,291:697,292:ct,293:ot,294:N,295:F2,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:wu,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,373:Te,456:209,457:ge,461:pe},n(Ce,[2,721],{79:[1,861]}),n(Ce,[2,722],{79:[1,862]}),n(lo,[2,727]),n(lo,[2,729]),n(lo,[2,723]),n(lo,[2,724]),{123:868,124:Ft,125:Rt,133:[1,863],250:lt,467:864,468:865,471:qt},{2:o,3:869,4:l,5:f,6:u,7:p,8:h,9:b},n(Uo,[2,698]),n(Uo,[2,699]),n(Ce,[2,652],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),{2:o,3:104,4:l,5:f,6:u,7:p,8:h,9:b,543:302,544:870},n(Ce,[2,799],{79:Gr}),n(Kt,[2,801]),n(Ce,[2,804]),n(Ce,[2,725],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),n(Or,mf,{195:872,204:fc}),n(Or,mf,{195:873,204:fc}),n(Or,mf,{195:874,204:fc}),n(sr,[2,1142],{282:161,209:162,283:163,120:164,280:165,205:166,284:167,122:168,285:169,210:170,211:171,286:172,287:173,288:174,153:176,289:177,290:178,61:180,167:183,3:185,456:209,197:875,183:876,279:877,104:878,2:o,4:l,5:f,6:u,7:p,8:h,9:b,83:It,140:De,141:Pe,146:vt,152:ve,154:it,158:pt,161:Ee,163:Ue,165:Fe,188:_t,189:mt,190:me,229:gt,266:We,267:qe,281:at,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,457:ge,461:pe}),{83:[1,880],140:De,205:879},{2:o,3:104,4:l,5:f,6:u,7:p,8:h,9:b,543:302,544:881},n(Gn,[2,166]),n(Gn,[2,167]),n(Gn,[2,168]),n(Gn,[2,169]),n(Gn,[2,170]),n(Gn,[2,171]),n(Gn,[2,172]),n(X,[2,7]),n(X,[2,819]),n(X,[2,820]),n(X,[2,821]),n(X,[2,822]),n(X,[2,823]),n(X,[2,824]),n(X,[2,825]),n(X,[2,826]),n(X,[2,827]),n(X,[2,828]),n(X,[2,829]),n(X,[2,830]),n(X,[2,831]),n(X,[2,832]),n(X,[2,833]),n(X,[2,834]),n(X,[2,835]),n(X,[2,836]),n(X,[2,837]),n(X,[2,838]),n(X,[2,839]),n(X,[2,840]),n(X,[2,841]),n(X,[2,842]),n(X,[2,843]),n(X,[2,844]),n(X,[2,845]),n(X,[2,846]),n(X,[2,847]),n(X,[2,848]),n(X,[2,849]),n(X,[2,850]),n(X,[2,851]),n(X,[2,852]),n(X,[2,853]),n(X,[2,854]),n(X,[2,855]),n(X,[2,856]),n(X,[2,857]),n(X,[2,858]),n(X,[2,859]),n(X,[2,860]),n(X,[2,861]),n(X,[2,862]),n(X,[2,863]),n(X,[2,864]),n(X,[2,865]),n(X,[2,866]),n(X,[2,867]),n(X,[2,868]),n(X,[2,869]),n(X,[2,870]),n(X,[2,871]),n(X,[2,872]),n(X,[2,873]),n(X,[2,874]),n(X,[2,875]),n(X,[2,876]),n(X,[2,877]),n(X,[2,878]),n(X,[2,879]),n(X,[2,880]),n(X,[2,881]),n(X,[2,882]),n(X,[2,883]),n(X,[2,884]),n(X,[2,885]),n(X,[2,886]),n(X,[2,887]),n(X,[2,888]),n(X,[2,889]),n(X,[2,890]),n(X,[2,891]),n(X,[2,892]),n(X,[2,893]),n(X,[2,894]),n(X,[2,895]),n(X,[2,896]),n(X,[2,897]),n(X,[2,898]),n(X,[2,899]),n(X,[2,900]),n(X,[2,901]),n(X,[2,902]),n(X,[2,903]),n(X,[2,904]),n(X,[2,905]),n(X,[2,906]),n(X,[2,907]),n(X,[2,908]),n(X,[2,909]),n(X,[2,910]),n(X,[2,911]),n(X,[2,912]),n(X,[2,913]),n(X,[2,914]),n(X,[2,915]),n(X,[2,916]),n(X,[2,917]),n(X,[2,918]),n(X,[2,919]),n(X,[2,920]),n(X,[2,921]),n(X,[2,922]),n(X,[2,923]),n(X,[2,924]),n(X,[2,925]),n(X,[2,926]),n(X,[2,927]),n(X,[2,928]),n(X,[2,929]),n(X,[2,930]),n(X,[2,931]),n(X,[2,932]),n(X,[2,933]),n(X,[2,934]),n(X,[2,935]),n(X,[2,936]),n(X,[2,937]),n(X,[2,938]),n(X,[2,939]),n(X,[2,940]),n(X,[2,941]),n(X,[2,942]),n(X,[2,943]),n(X,[2,944]),n(X,[2,945]),n(X,[2,946]),n(X,[2,947]),n(X,[2,948]),n(X,[2,949]),n(X,[2,950]),n(X,[2,951]),n(X,[2,952]),n(X,[2,953]),n(X,[2,954]),n(X,[2,955]),n(X,[2,956]),n(X,[2,957]),n(X,[2,958]),n(X,[2,959]),n(X,[2,960]),n(X,[2,961]),n(X,[2,962]),n(X,[2,963]),n(X,[2,964]),n(X,[2,965]),n(X,[2,966]),n(X,[2,967]),n(X,[2,968]),n(X,[2,969]),n(X,[2,970]),n(X,[2,971]),n(X,[2,972]),n(X,[2,973]),n(X,[2,974]),n(X,[2,975]),n(X,[2,976]),n(X,[2,977]),n(X,[2,978]),n(X,[2,979]),n(X,[2,980]),n(X,[2,981]),n(X,[2,982]),n(X,[2,983]),n(X,[2,984]),n(X,[2,985]),n(X,[2,986]),n(X,[2,987]),n(X,[2,988]),n(X,[2,989]),n(X,[2,990]),n(X,[2,991]),n(X,[2,992]),n(X,[2,993]),n(X,[2,994]),n(X,[2,995]),n(X,[2,996]),n(X,[2,997]),n(X,[2,998]),n(X,[2,999]),n(X,[2,1e3]),n(X,[2,1001]),n(X,[2,1002]),n(X,[2,1003]),n(X,[2,1004]),n(X,[2,1005]),n(X,[2,1006]),n(X,[2,1007]),n(X,[2,1008]),n(X,[2,1009]),n(X,[2,1010]),n(X,[2,1011]),n(X,[2,1012]),n(X,[2,1013]),n(X,[2,1014]),n(X,[2,1015]),n(X,[2,1016]),n(X,[2,1017]),n(X,[2,1018]),n(X,[2,1019]),n(X,[2,1020]),n(X,[2,1021]),n(X,[2,1022]),n(X,[2,1023]),n(X,[2,1024]),n(X,[2,1025]),n(X,[2,1026]),n(X,[2,1027]),n(X,[2,1028]),n(X,[2,1029]),n(X,[2,1030]),n(X,[2,1031]),n(X,[2,1032]),n(X,[2,1033]),n(X,[2,1034]),n(X,[2,1035]),n(X,[2,1036]),n(X,[2,1037]),n(X,[2,1038]),n(X,[2,1039]),n(X,[2,1040]),n(X,[2,1041]),n(X,[2,1042]),n(X,[2,1043]),n(X,[2,1044]),n(X,[2,1045]),n(X,[2,1046]),n(X,[2,1047]),n(X,[2,1048]),n(X,[2,1049]),n(X,[2,1050]),n(X,[2,1051]),n(X,[2,1052]),n(X,[2,1053]),n(X,[2,1054]),n(X,[2,1055]),n(X,[2,1056]),n(X,[2,1057]),n(X,[2,1058]),n(X,[2,1059]),n(X,[2,1060]),n(X,[2,1061]),n(X,[2,1062]),n(X,[2,1063]),n(X,[2,1064]),n(X,[2,1065]),n(X,[2,1066]),n(X,[2,1067]),n(X,[2,1068]),n(X,[2,1069]),n(X,[2,1070]),n(X,[2,1071]),n(X,[2,1072]),n(X,[2,1073]),n(X,[2,1074]),n(X,[2,1075]),n(X,[2,1076]),n(X,[2,1077]),n(X,[2,1078]),n(X,[2,1079]),n(X,[2,1080]),n(X,[2,1081]),n(X,[2,1082]),n(X,[2,1083]),n(X,[2,1084]),n(X,[2,1085]),n(X,[2,1086]),n(X,[2,1087]),n(X,[2,1088]),n(X,[2,1089]),n(X,[2,1090]),n(X,[2,1091]),n(ao,[2,11]),n(ao,c,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,16:882,2:o,4:l,5:f,6:u,7:p,8:h,9:b,58:R,77:L,83:T,96:C,133:te,155:W,165:Y,198:F,294:N,295:Ae,322:je,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Bt,455:Zr,466:Un,472:$i,474:Bi,475:Yn,477:Vn,478:ni,479:cs,480:Ds,481:Cn,482:oi,483:ms,487:gs,488:To,491:Qo,492:Io,545:Mo,546:Sa,555:$o}),n(Gi,Rs,{95:883,271:sl,273:t1}),{128:[1,886]},n(Co,[2,252]),n(Co,[2,261]),n(Co,[2,262]),n(_u,[2,1102],{100:887,115:888,116:U3}),{44:889,45:248,83:T,86:76,96:C,193:103,198:F},n(Rl,[2,254],{262:[1,890]}),n(Rl,[2,257]),n(Rl,[2,259]),n(Rl,[2,260]),{433:[1,894],438:[1,891],439:[1,892],440:[1,893]},{2:o,3:895,4:l,5:f,6:u,7:p,8:h,9:b},n(Or,[2,1188],{321:896,801:898,84:[1,897],173:[1,900],194:[1,899]}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:901,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:902,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{84:[1,903]},{2:o,3:904,4:l,5:f,6:u,7:p,8:h,9:b,141:[1,905]},{2:o,3:906,4:l,5:f,6:u,7:p,8:h,9:b,141:[1,907]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:908,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:909,4:l,5:f,6:u,7:p,8:h,9:b,109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{2:o,3:910,4:l,5:f,6:u,7:p,8:h,9:b},{163:[1,911]},n(Lo,oo,{385:912,165:nl}),{250:[1,913]},{2:o,3:914,4:l,5:f,6:u,7:p,8:h,9:b},n(Ce,[2,774],{79:zc}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:916,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Kt,[2,777]),n(Wc,[2,1220],{456:209,515:917,153:918,148:_f,150:_f,154:ys,457:ge,461:pe}),{148:[1,919],150:[1,920]},n(Ou,xf,{529:922,532:923,83:[1,921],146:G1}),n(Sf,[2,1244],{533:924,141:[1,925]}),n(_1,[2,1248],{535:926,536:927,161:v1}),n(_1,[2,792]),n(Cu,[2,784]),{2:o,3:928,4:l,5:f,6:u,7:p,8:h,9:b,140:[1,929]},{2:o,3:930,4:l,5:f,6:u,7:p,8:h,9:b},{2:o,3:931,4:l,5:f,6:u,7:p,8:h,9:b},n(Uo,oo,{385:932,165:nl}),n(Uo,oo,{385:933,165:nl}),n(il,[2,522]),n(il,[2,523]),{192:[1,934]},{192:[2,1219]},n(Yc,[2,1214],{505:935,508:936,146:[1,937]}),n(k2,[2,1213]),n(Ef,d0,{548:938,105:Eh,250:[1,939],552:wh,553:Ah,554:h0}),{82:[1,944]},{82:[1,945]},{154:P1,490:946},{4:al,11:950,82:[1,948],300:947,424:949,426:Xc},n(Ce,Bs,{369:954,137:[1,953],503:ks}),n(Ce,[2,617]),{2:o,3:956,4:l,5:f,6:u,7:p,8:h,9:b},{331:[1,957]},n(Lo,Eu,{435:958,165:yf}),n(Ce,[2,631]),{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:960,436:959},{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:960,436:961},n(Ce,[2,817]),n(ao,[2,711],{476:962,343:[1,963]}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:964,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:965,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:966,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:967,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:968,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:969,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:970,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:971,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:972,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:973,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:974,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:975,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:976,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:977,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:978,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:979,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:980,4:l,5:f,6:u,7:p,8:h,9:b,83:[1,982],140:De,165:Fe,205:981,209:983,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne},{2:o,3:984,4:l,5:f,6:u,7:p,8:h,9:b,83:[1,986],140:De,165:Fe,205:985,209:987,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne},n(Jc,[2,464],{282:161,209:162,283:163,120:164,280:165,205:166,284:167,122:168,285:169,210:170,211:171,286:172,287:173,288:174,153:176,289:177,290:178,61:180,167:183,3:185,456:209,104:988,2:o,4:l,5:f,6:u,7:p,8:h,9:b,83:It,140:De,141:Pe,146:vt,152:ve,154:it,158:pt,161:Ee,163:Ue,165:Fe,188:_t,189:mt,190:me,229:gt,266:We,267:qe,281:at,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,457:ge,461:pe}),n(Jc,[2,465],{282:161,209:162,283:163,120:164,280:165,205:166,284:167,122:168,285:169,210:170,211:171,286:172,287:173,288:174,153:176,289:177,290:178,61:180,167:183,3:185,456:209,104:989,2:o,4:l,5:f,6:u,7:p,8:h,9:b,83:It,140:De,141:Pe,146:vt,152:ve,154:it,158:pt,161:Ee,163:Ue,165:Fe,188:_t,189:mt,190:me,229:gt,266:We,267:qe,281:at,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,457:ge,461:pe}),n(Jc,[2,466],{282:161,209:162,283:163,120:164,280:165,205:166,284:167,122:168,285:169,210:170,211:171,286:172,287:173,288:174,153:176,289:177,290:178,61:180,167:183,3:185,456:209,104:990,2:o,4:l,5:f,6:u,7:p,8:h,9:b,83:It,140:De,141:Pe,146:vt,152:ve,154:it,158:pt,161:Ee,163:Ue,165:Fe,188:_t,189:mt,190:me,229:gt,266:We,267:qe,281:at,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,457:ge,461:pe}),n(Jc,[2,467],{282:161,209:162,283:163,120:164,280:165,205:166,284:167,122:168,285:169,210:170,211:171,286:172,287:173,288:174,153:176,289:177,290:178,61:180,167:183,3:185,456:209,104:991,2:o,4:l,5:f,6:u,7:p,8:h,9:b,83:It,140:De,141:Pe,146:vt,152:ve,154:it,158:pt,161:Ee,163:Ue,165:Fe,188:_t,189:mt,190:me,229:gt,266:We,267:qe,281:at,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,457:ge,461:pe}),n(Jc,p0,{282:161,209:162,283:163,120:164,280:165,205:166,284:167,122:168,285:169,210:170,211:171,286:172,287:173,288:174,153:176,289:177,290:178,61:180,167:183,3:185,456:209,104:992,2:o,4:l,5:f,6:u,7:p,8:h,9:b,83:It,140:De,141:Pe,146:vt,152:ve,154:it,158:pt,161:Ee,163:Ue,165:Fe,188:_t,189:mt,190:me,229:gt,266:We,267:qe,281:at,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,457:ge,461:pe}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:993,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:994,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Jc,[2,469],{282:161,209:162,283:163,120:164,280:165,205:166,284:167,122:168,285:169,210:170,211:171,286:172,287:173,288:174,153:176,289:177,290:178,61:180,167:183,3:185,456:209,104:995,2:o,4:l,5:f,6:u,7:p,8:h,9:b,83:It,140:De,141:Pe,146:vt,152:ve,154:it,158:pt,161:Ee,163:Ue,165:Fe,188:_t,189:mt,190:me,229:gt,266:We,267:qe,281:at,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,457:ge,461:pe}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:996,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:997,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{173:[1,999],175:[1,1001],361:998,367:[1,1e3]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1002,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1003,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:746,4:l,5:f,6:u,7:p,8:h,9:b,83:[1,1004],120:1007,154:m0,165:Fe,209:1008,211:1006,229:Is,281:xs,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,362:1005},{109:[1,1010],330:[1,1011]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1012,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1013,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1014,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{4:al,11:950,300:1015,424:949,426:Xc},n(g0,[2,101]),n(g0,[2,102]),{84:[1,1016]},{84:[1,1017]},{84:[1,1018]},{84:[1,1019],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},n(rl,U1,{374:228,83:qc,207:uc}),{84:[2,1180]},{84:[2,1181]},{143:cc,144:pf},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1020,161:Ee,163:Ue,165:Fe,167:183,173:[1,1022],188:_t,189:mt,190:me,194:[1,1021],205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1023,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,194:[1,1024],205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:1025,4:l,5:f,6:u,7:p,8:h,9:b,154:y0,158:b0,189:[1,1028]},n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,127,131,137,138,139,140,141,143,144,146,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,347,363,364,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,440],{123:672,360:684,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,365:kr}),n(K3,[2,441],{123:672,360:684,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,189:ir,345:Xt,349:Jt}),n(K3,[2,442],{123:672,360:684,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,189:ir,345:Xt,349:Jt}),n(Th,[2,443],{123:672,360:684,349:Jt}),n(Th,[2,444],{123:672,360:684,349:Jt}),{2:o,3:1029,4:l,5:f,6:u,7:p,8:h,9:b,189:[1,1030]},{2:o,3:1031,4:l,5:f,6:u,7:p,8:h,9:b,189:[1,1032]},n(dc,[2,389]),n(dc,[2,1190]),n(dc,[2,1191]),n(dc,[2,390]),n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,251,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,386]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1033,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(co,[2,658]),n(co,[2,659]),n(co,[2,660]),n(co,[2,661]),n(co,[2,663]),{44:1034,45:248,83:T,86:76,96:C,193:103,198:F},{109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,337:1035,340:727,341:Tu,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{338:1036,339:v0,340:1037,341:Tu,343:_0},n(Ih,[2,396]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1039,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1040,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{4:al,11:950,300:1041,424:949,426:Xc},n(co,[2,664]),{79:[1,1043],333:[1,1042]},n(co,[2,681]),n(Q3,[2,691]),n(r1,[2,665]),n(r1,[2,666]),n(r1,[2,667]),{140:De,205:1044},n(r1,[2,669]),n(r1,[2,670]),n(r1,[2,671]),n(r1,[2,672]),n(r1,[2,673]),n(r1,[2,674]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1045,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n([2,4,5,6,7,8,9,14,58,77,79,82,84,96,103,105,108,109,116,121,124,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,463,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],Au,{83:Bl,125:V2}),n(G2,q3,{125:[1,1047]}),n(G2,H3,{125:[1,1048]}),{79:S,333:[1,1049]},n(Hc,[2,329],{83:Bl}),n(hn,[2,330]),{79:[1,1051],463:[1,1050]},n(co,[2,678]),n(Fl,[2,683]),{161:[1,1052],466:[1,1053]},{161:[1,1054],466:[1,1055]},{161:[1,1056],466:[1,1057]},{44:1062,45:248,83:[1,1061],86:76,96:C,152:ve,153:1066,154:ys,155:[1,1063],158:Ml,161:Ee,190:me,193:103,198:F,210:1067,335:we,375:1058,376:1059,378:[1,1060],379:$l,456:209,457:ge,461:pe},{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,152:ve,161:Ee,190:me,208:268,210:269,231:1068,335:we},n(rl,U1,{374:1069,207:uc}),{83:j1,152:ve,153:1066,154:ys,158:Ml,161:Ee,190:me,210:1067,335:we,375:1070,376:1071,379:$l,456:209,457:ge,461:pe},{250:[1,1074],495:1073},{2:o,3:240,4:l,5:f,6:u,7:p,8:h,9:b,83:[1,1076],141:Po,152:ve,153:233,154:it,161:Ee,165:Fe,190:me,208:234,209:236,210:235,211:237,218:1075,227:238,229:Dl,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,335:we,456:209,457:ge,461:pe},{251:[2,740]},{84:[1,1077]},n(ki,[2,1150],{221:1078,3:1079,2:o,4:l,5:f,6:u,7:p,8:h,9:b}),n(vf,[2,1149]),n(ki,[2,195]),{223:[1,1080]},n(ki,[2,1153]),n(ki,[2,202]),{2:o,3:1081,4:l,5:f,6:u,7:p,8:h,9:b},n(ki,[2,197]),n(ki,[2,1155]),n(ki,[2,198]),n(ki,[2,1157]),n(ki,[2,199]),n(ki,[2,1159]),n(ki,[2,200]),n(ki,[2,1161]),{2:o,3:1082,4:l,5:f,6:u,7:p,8:h,9:b},{157:[1,1083]},n(Kc,j2,{89:1084,192:q2}),{2:o,3:240,4:l,5:f,6:u,7:p,8:h,9:b,141:[1,1090],152:ve,154:[1,1091],161:Ee,165:Fe,190:me,208:1086,209:1087,210:1088,211:1089,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,335:we},{2:o,3:1096,4:l,5:f,6:u,7:p,8:h,9:b,118:1092,119:1093,120:1094,121:H2,229:Is,281:xs},n(J3,[2,1113]),n(Co,Pl,{260:120,93:1097,171:$1,177:oc,178:Zo}),n(Gi,[2,1100],{98:1098,191:1099,192:[1,1100]}),n(Gc,[2,1099],{162:1101,188:Ma,189:$a,190:Pa}),n([2,4,5,6,7,8,9,14,77,79,82,84,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,207,266,267,304,313,314,315,316,317,318,319,320,339,343,457,461,503,639,798],[2,103],{83:[1,1105]}),{128:[1,1106]},n(Xn,[2,106]),{2:o,3:1107,4:l,5:f,6:u,7:p,8:h,9:b},n(Xn,[2,108]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1108,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1109,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:790,4:l,5:f,6:u,7:p,8:h,9:b,77:uo,82:fo,83:Ya,121:fa,123:793,124:Ft,125:Rt,126:1111,127:Xa,131:wa,132:ho,133:da,134:1110,137:po,138:mo,139:go,140:yo,141:bo,142:na,143:vo,144:ha,145:_o,146:Ws,147:Ys,148:xo,149:Xs,150:Ja,151:Js,152:Aa,153:815,154:Ta,155:Ia,157:ia,158:sa,159:pa,161:Oa,163:Ka,165:Ca,167:825,169:826,171:Qa,173:La,175:ma,177:ga,178:Na,179:Da,180:Za,181:Ra,182:Ba,184:Ks,194:eo,196:ka,266:We,267:qe,304:Fa,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,456:209,457:ge,461:pe},{83:[1,1112]},{83:[1,1113]},{83:[1,1114]},{83:[1,1115]},n(Xn,[2,117]),n(Xn,[2,118]),n(Xn,[2,119]),n(Xn,[2,120]),n(Xn,[2,121]),n(Xn,[2,122]),{2:o,3:1116,4:l,5:f,6:u,7:p,8:h,9:b},{2:o,3:1117,4:l,5:f,6:u,7:p,8:h,9:b,142:[1,1118]},n(Xn,[2,126]),n(Xn,[2,127]),n(Xn,[2,128]),n(Xn,[2,129]),n(Xn,[2,130]),n(Xn,[2,131]),{2:o,3:1119,4:l,5:f,6:u,7:p,8:h,9:b,83:M2,122:719,140:De,141:Pe,152:ve,161:Ee,190:me,205:720,210:722,284:721,327:et,328:nt,329:Re,335:we,456:723,461:pe},{154:[1,1120]},{83:[1,1121]},{154:[1,1122]},n(Xn,[2,136]),{83:[1,1123]},{2:o,3:1124,4:l,5:f,6:u,7:p,8:h,9:b},{83:[1,1125]},{83:[1,1126]},{83:[1,1127]},{83:[1,1128]},{83:[1,1129],173:[1,1130]},{83:[1,1131]},{83:[1,1132]},{83:[1,1133]},{83:[1,1134]},{83:[1,1135]},{83:[1,1136]},{83:[1,1137]},{83:[1,1138]},{83:[1,1139]},{83:[2,366]},{83:[2,1128]},{83:[2,1129]},{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:1140},{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:1141},{122:1142,141:Pe,329:Re},n(Ce,[2,634],{121:[1,1143]}),{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:1144},{122:1145,141:Pe,329:Re},{2:o,3:1146,4:l,5:f,6:u,7:p,8:h,9:b},n(Ce,[2,737]),n(Ce,[2,73]),{2:o,3:260,4:l,5:f,6:u,7:p,8:h,9:b,80:1147,81:[1,1148]},n(pc,[2,77]),{83:[1,1149]},{2:o,3:1096,4:l,5:f,6:u,7:p,8:h,9:b,85:1150,120:1151,229:Is,281:xs},n(Ce,[2,718]),n(Ce,[2,624]),{2:o,3:1096,4:l,5:f,6:u,7:p,8:h,9:b,120:1154,152:Qc,154:Ul,156:1152,229:Is,281:xs,370:1153,371:1155},{153:1158,154:ys,456:209,457:ge,461:pe},n(Ce,[2,713]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1159,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Jc,p0,{282:161,209:162,283:163,120:164,280:165,205:166,284:167,122:168,285:169,210:170,211:171,286:172,287:173,288:174,153:176,289:177,290:178,61:180,167:183,3:185,456:209,104:1160,2:o,4:l,5:f,6:u,7:p,8:h,9:b,83:It,140:De,141:Pe,146:vt,152:ve,154:it,158:pt,161:Ee,163:Ue,165:Fe,188:_t,189:mt,190:me,229:gt,266:We,267:qe,281:at,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,457:ge,461:pe}),{84:[1,1161]},{122:1162,141:Pe,329:Re},{2:o,3:294,4:l,5:f,6:u,7:p,8:h,9:b,486:1163,487:Su},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1165,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,250:lt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe,467:1164,471:qt},n(Ce,[2,693]),{123:1167,124:Ft,125:Rt,133:[1,1166]},n(Ce,[2,705]),n(Ce,[2,706]),{2:o,3:1169,4:l,5:f,6:u,7:p,8:h,9:b,83:Zc,140:Oh,470:1168},{123:868,124:Ft,125:Rt,133:[1,1172],468:1173},n(Ce,[2,798],{79:Gr}),{2:o,3:104,4:l,5:f,6:u,7:p,8:h,9:b,543:1174},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:878,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,183:1175,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,279:877,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:878,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,183:1176,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,279:877,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:878,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,183:1177,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,279:877,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(sr,[2,164]),n(sr,[2,1143],{79:eu}),n(gc,[2,280]),n(gc,[2,287],{123:672,360:684,3:1180,122:1182,2:o,4:l,5:f,6:u,7:p,8:h,9:b,82:[1,1179],109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,140:[1,1181],141:Pe,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,329:Re,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),n(b1,[2,1144],{206:1183,799:[1,1184]}),{140:De,205:1185},{79:Gr,84:[1,1186]},n(ao,[2,15]),n(Gi,[2,82]),{140:De,205:1187},{140:De,205:1188},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1191,120:164,122:168,129:1189,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,263:1190,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(hc,P2,{88:1192,207:U2}),n(_u,[2,1103]),{84:[1,1193]},n(Rl,[2,258]),{157:[1,1194],199:[1,1195]},{199:[1,1196]},{199:[1,1197]},{199:[1,1198]},n(Ce,[2,613],{82:[1,1200],83:[1,1199]}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1201,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(ua,z2,{303:1202,307:W2}),n(Or,[2,1189]),n(Or,[2,1186]),n(Or,[2,1187]),{79:S,84:[1,1204]},{79:S,84:[1,1205]},n(ua,[2,371]),{79:[1,1206]},{79:[1,1207]},{79:[1,1208]},{79:[1,1209]},{79:[1,1210],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},n(ua,[2,377]),n(Ce,[2,618]),{331:[1,1211]},{2:o,3:1212,4:l,5:f,6:u,7:p,8:h,9:b,122:1213,141:Pe,329:Re},{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:1214},{250:[1,1215]},{2:o,3:625,4:l,5:f,6:u,7:p,8:h,9:b,141:Oo,146:G1,152:Ea,154:y1,161:v1,469:632,513:1216,514:623,517:624,521:629,532:626,536:628},n(Ce,[2,775],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),n(Kt,[2,1222],{516:1217,522:1218,82:Vl}),n(Wc,[2,1221]),{2:o,3:1222,4:l,5:f,6:u,7:p,8:h,9:b,141:Oo,146:G1,153:1221,154:ys,161:v1,456:209,457:ge,461:pe,514:1220,532:626,536:628},{2:o,3:1222,4:l,5:f,6:u,7:p,8:h,9:b,141:Oo,146:G1,152:Ea,154:y1,161:v1,469:632,514:1224,517:1223,521:629,532:626,536:628},{2:o,3:625,4:l,5:f,6:u,7:p,8:h,9:b,141:Oo,146:G1,152:Ea,154:y1,161:v1,469:632,512:1225,513:622,514:623,517:624,521:629,532:626,536:628},n(Sf,[2,1240],{530:1226,141:[1,1227]}),n(Ou,[2,1239]),n(_1,[2,1246],{534:1228,536:1229,161:v1}),n(Sf,[2,1245]),n(_1,[2,791]),n(_1,[2,1249]),n(Ou,[2,794]),n(Ou,[2,795]),n(_1,[2,793]),n(Cu,[2,785]),{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:1230},{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:1231},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1232,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Ch,[2,1216],{506:1233,122:1234,141:Pe,329:Re}),n(Yc,[2,1215]),{2:o,3:1235,4:l,5:f,6:u,7:p,8:h,9:b},{368:Lh,372:Nh,373:x0,549:1236},{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:1240},n(Ef,[2,810]),n(Ef,[2,811]),n(Ef,[2,812]),{138:[1,1241]},{294:[1,1242]},{294:[1,1243]},n(lo,[2,732]),n(lo,[2,733],{133:[1,1244]}),{4:al,11:950,300:1245,424:949,426:Xc},n([2,4,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,580],{5:[1,1246]}),n([2,5,6,7,8,9,14,58,77,79,82,84,96,103,105,108,109,116,121,124,125,127,131,132,133,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,250,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,330,333,339,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,378,391,403,404,407,408,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,577],{4:[1,1248],83:[1,1247]}),{83:[1,1249]},n(Lu,[2,8]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1250,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Ce,[2,480]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:878,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,183:1251,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,279:877,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Ce,[2,626]),n(Lo,[2,606]),{2:o,3:1252,4:l,5:f,6:u,7:p,8:h,9:b,122:1253,141:Pe,329:Re},n(Ce,[2,602],{79:S0}),n(lo,[2,604]),n(Ce,[2,651],{79:S0}),n(Ce,[2,710]),n(Ce,c,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,16:1255,2:o,4:l,5:f,6:u,7:p,8:h,9:b,58:R,77:L,83:T,96:C,133:te,155:W,165:Y,198:F,294:N,295:Ae,322:je,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Bt,455:Zr,466:Un,472:$i,474:Bi,475:Yn,477:Vn,478:ni,479:cs,480:Ds,481:Cn,482:oi,483:ms,487:gs,488:To,491:Qo,492:Io,545:Mo,546:Sa,555:$o}),n(x1,[2,400],{123:672,360:684,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,345:Xt,349:Jt,350:br,351:Tr,352:Ir}),n(Th,[2,401],{123:672,360:684,349:Jt}),n(x1,[2,402],{123:672,360:684,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,345:Xt,349:Jt,350:br,351:Tr,352:Ir}),n(Dh,[2,403],{123:672,360:684,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,345:Xt,347:[1,1256],349:Jt,350:br,351:Tr,352:Ir}),n(Dh,[2,405],{123:672,360:684,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,345:Xt,347:[1,1257],349:Jt,350:br,351:Tr,352:Ir}),n(hn,[2,407],{123:672,360:684}),n(K3,[2,408],{123:672,360:684,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,189:ir,345:Xt,349:Jt}),n(K3,[2,409],{123:672,360:684,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,189:ir,345:Xt,349:Jt}),n(tu,[2,410],{123:672,360:684,124:Ft,125:Rt,132:tr,145:nr,345:Xt,349:Jt}),n(tu,[2,411],{123:672,360:684,124:Ft,125:Rt,132:tr,145:nr,345:Xt,349:Jt}),n(tu,[2,412],{123:672,360:684,124:Ft,125:Rt,132:tr,145:nr,345:Xt,349:Jt}),n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,121,127,131,132,133,137,138,139,140,141,142,143,144,146,147,148,149,150,151,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,188,189,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,344,346,347,348,350,351,352,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,413],{123:672,360:684,124:Ft,125:Rt,145:nr,345:Xt,349:Jt}),n(ol,[2,414],{123:672,360:684,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,188:dr,189:ir,345:Xt,349:Jt,350:br}),n(ol,[2,415],{123:672,360:684,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,188:dr,189:ir,345:Xt,349:Jt,350:br}),n(ol,[2,416],{123:672,360:684,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,188:dr,189:ir,345:Xt,349:Jt,350:br}),n(ol,[2,417],{123:672,360:684,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,188:dr,189:ir,345:Xt,349:Jt,350:br}),n(Hc,[2,418],{83:Bl}),n(hn,[2,419]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1258,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(hn,[2,421]),n(Hc,[2,422],{83:Bl}),n(hn,[2,423]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1259,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(hn,[2,425]),n(ll,[2,426],{123:672,360:684,121:Ur,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:kr}),n(ll,[2,427],{123:672,360:684,121:Ur,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:kr}),n(ll,[2,428],{123:672,360:684,121:Ur,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:kr}),n(ll,[2,429],{123:672,360:684,121:Ur,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:kr}),n([2,4,5,6,7,8,9,14,58,77,83,96,109,133,148,149,155,163,165,179,180,198,294,295,322,339,343,353,354,355,356,357,358,359,363,364,366,368,372,373,433,437,438,441,443,445,446,454,455,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,545,546,555,639,798],Z3,{123:672,360:684,121:Ur,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:kr}),n(ll,[2,431],{123:672,360:684,121:Ur,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:kr}),n(ll,[2,432],{123:672,360:684,121:Ur,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:kr}),n(ll,[2,433],{123:672,360:684,121:Ur,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:kr}),n(ll,[2,434],{123:672,360:684,121:Ur,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:kr}),n(ll,[2,435],{123:672,360:684,121:Ur,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:kr}),{83:[1,1260]},{83:[2,470]},{83:[2,471]},{83:[2,472]},n(wf,[2,438],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,365:kr}),n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,116,127,131,137,138,139,140,141,143,144,146,152,154,155,157,158,159,161,165,171,173,175,177,178,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,347,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,439],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,44:1261,45:248,61:180,83:V1,84:[1,1263],86:76,96:C,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1262,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,193:103,198:F,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(hn,[2,452]),n(hn,[2,454]),n(hn,[2,461]),n(hn,[2,462]),{2:o,3:717,4:l,5:f,6:u,7:p,8:h,9:b,83:[1,1264]},{2:o,3:746,4:l,5:f,6:u,7:p,8:h,9:b,83:[1,1265],120:1007,154:m0,165:Fe,209:1008,211:1267,229:Is,281:xs,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,362:1266},n(hn,[2,459]),n(wf,[2,456],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,365:kr}),n(wf,[2,457],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,365:kr}),n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,109,116,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,198,207,215,217,242,243,244,245,246,247,248,249,252,259,266,267,268,269,271,273,294,295,304,313,314,315,316,317,318,319,320,322,329,333,339,341,342,343,347,353,354,355,356,357,358,359,363,364,365,366,368,372,373,433,437,438,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,509,545,546,555,639,798],[2,458],{123:672,360:684,121:Ur,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir}),n(hn,[2,460]),n(hn,Rh),n(hn,[2,321]),n(hn,[2,322]),n(hn,[2,445]),{79:S,84:[1,1268]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1269,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1270,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Qs,yc,{123:672,360:684,305:1271,109:Dr,121:Ur,124:Ft,125:Rt,127:Vs,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1273,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(hn,Vo),n(Nu,[2,297]),{2:o,3:1275,4:l,5:f,6:u,7:p,8:h,9:b},n(hn,[2,289]),n(Nu,[2,294]),n(hn,[2,290]),n(Nu,[2,295]),n(hn,[2,291]),{84:[1,1276],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{84:[1,1277]},{338:1278,339:v0,340:1037,341:Tu,343:_0},{339:[1,1279]},n(Ih,[2,395]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1280,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,342:[1,1281],344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{82:[1,1282],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{79:[1,1283]},n(co,[2,679]),{2:o,3:746,4:l,5:f,6:u,7:p,8:h,9:b,83:Iu,120:741,122:739,140:De,141:Pe,152:ve,153:735,154:ys,161:Ee,165:Fe,190:me,205:737,209:744,210:743,229:Is,281:xs,284:740,285:742,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,333:[1,1284],335:we,350:kl,456:209,457:ge,459:1285,460:736,461:pe},n(r1,[2,668]),{84:[1,1286],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{2:o,3:1287,4:l,5:f,6:u,7:p,8:h,9:b,154:y0,158:b0},{2:o,3:1029,4:l,5:f,6:u,7:p,8:h,9:b},{2:o,3:1031,4:l,5:f,6:u,7:p,8:h,9:b},n(hn,[2,388]),n(co,[2,676]),{2:o,3:757,4:l,5:f,6:u,7:p,8:h,9:b,140:W3,141:Y3,463:[1,1288],465:1289},{2:o,3:746,4:l,5:f,6:u,7:p,8:h,9:b,83:Iu,120:741,122:739,140:De,141:Pe,152:ve,153:735,154:ys,161:Ee,165:Fe,190:me,205:737,209:744,210:743,229:Is,281:xs,284:740,285:742,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,335:we,350:kl,456:209,457:ge,459:1290,460:736,461:pe},{140:De,205:1291},{2:o,3:746,4:l,5:f,6:u,7:p,8:h,9:b,83:Iu,120:741,122:739,140:De,141:Pe,152:ve,153:735,154:ys,161:Ee,165:Fe,190:me,205:737,209:744,210:743,229:Is,281:xs,284:740,285:742,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,335:we,350:kl,456:209,457:ge,459:1292,460:736,461:pe},{140:De,205:1293},{2:o,3:746,4:l,5:f,6:u,7:p,8:h,9:b,83:Iu,120:741,122:739,140:De,141:Pe,152:ve,153:735,154:ys,161:Ee,165:Fe,190:me,205:737,209:744,210:743,229:Is,281:xs,284:740,285:742,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,335:we,350:kl,456:209,457:ge,459:1294,460:736,461:pe},{140:De,205:1295},{83:j1,152:ve,153:1066,154:ys,161:Ee,190:me,210:1067,335:we,376:1296,456:209,457:ge,461:pe},n(hi,Bs,{369:1297,79:n1,503:ks}),{158:Ml,375:1299,379:$l},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,44:247,45:248,61:180,83:V1,85:1300,86:76,96:C,104:1303,120:1302,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,193:103,198:F,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,380:1301,456:209,457:ge,461:pe},n(hi,Bs,{369:1304,503:ks}),{2:o,3:1096,4:l,5:f,6:u,7:p,8:h,9:b,120:1154,152:Qc,154:Ul,156:1305,229:Is,281:xs,370:1153,371:1155},n(E0,[2,500]),n(E0,[2,501]),n(Af,[2,505]),n(Af,[2,506]),{44:1309,45:248,83:[1,1308],86:76,96:C,152:ve,153:1066,154:ys,158:Ml,161:Ee,190:me,193:103,198:F,210:1067,335:we,375:1306,376:1307,379:$l,456:209,457:ge,461:pe},{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,152:ve,161:Ee,190:me,208:268,210:269,231:1310,335:we},{83:j1,152:ve,153:1066,154:ys,161:Ee,190:me,210:1067,335:we,376:1311,456:209,457:ge,461:pe},n(hi,Bs,{369:1312,79:n1,503:ks}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1303,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,380:1301,456:209,457:ge,461:pe},{341:Bh,496:1313,497:1314,498:1315},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1317,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{250:[2,741]},{2:o,3:240,4:l,5:f,6:u,7:p,8:h,9:b,44:765,45:248,83:w0,86:76,96:C,141:Po,152:ve,153:233,154:it,161:Ee,165:Fe,190:me,193:103,198:F,208:234,209:236,210:235,211:237,218:1318,227:238,229:Dl,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,335:we,456:209,457:ge,461:pe},n(ki,A0,{3:771,219:1320,230:1321,2:o,4:l,5:f,6:u,7:p,8:h,9:b,82:e1}),n(ki,[2,194]),n(ki,[2,1151]),n(ki,[2,196]),n(ki,[2,203]),n([2,4,5,6,7,8,9,14,58,77,79,82,83,84,96,103,105,108,127,133,137,152,154,155,157,158,161,163,165,171,177,178,190,192,196,198,215,217,242,243,244,245,246,247,248,249,250,251,252,271,273,294,295,322,330,335,339,343,368,372,373,378,379,391,403,404,407,408,433,437,438,439,440,441,443,445,446,454,455,457,461,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,503,545,546,552,553,554,555,639,798],[2,205]),{2:o,3:1322,4:l,5:f,6:u,7:p,8:h,9:b},n(q1,[2,1096],{90:1323,102:1324,103:T0,108:I0}),{2:o,3:240,4:l,5:f,6:u,7:p,8:h,9:b,83:[1,1328],141:Po,152:ve,153:233,154:it,161:Ee,165:Fe,190:me,208:234,209:236,210:235,211:237,212:1327,218:1329,227:238,229:Dl,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,335:we,456:209,457:ge,461:pe},n(hc,[2,177]),n(hc,[2,178]),n(hc,[2,179]),n(hc,[2,180]),n(hc,[2,181]),{2:o,3:717,4:l,5:f,6:u,7:p,8:h,9:b},n(_u,[2,96],{79:[1,1330]}),n(Y2,[2,98]),n(Y2,[2,99]),{122:1331,141:Pe,329:Re},n([14,77,79,84,103,108,127,133,137,171,177,178,192,207,215,217,242,243,244,245,246,247,248,249,252,271,273,339,343,503,639,798],Au,{125:V2}),n(gf,D2,{94:1332,127:R2}),n(Gi,[2,83]),n(Gi,[2,1101]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1333,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Xn,[2,139]),n(Xn,[2,157]),n(Xn,[2,158]),n(Xn,[2,159]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,84:[2,1120],104:287,120:164,122:168,136:1334,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1335,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{83:[1,1336]},n(Xn,[2,107]),n([2,4,5,6,7,8,9,14,77,79,82,83,84,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,207,266,267,304,313,314,315,316,317,318,319,320,339,343,457,461,503,639,798],[2,109],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),n([2,4,5,6,7,8,9,14,77,79,82,83,84,121,127,131,133,137,138,139,140,141,143,144,146,148,149,152,154,155,157,158,159,161,163,165,171,173,175,177,178,179,180,181,182,184,190,192,194,196,207,266,267,304,313,314,315,316,317,318,319,320,339,343,457,461,503,639,798],[2,110],{123:672,360:684,109:Dr,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),{2:o,3:790,4:l,5:f,6:u,7:p,8:h,9:b,77:uo,82:fo,83:Ya,84:[1,1337],121:fa,123:793,124:Ft,125:Rt,126:1338,127:Xa,131:wa,132:ho,133:da,137:po,138:mo,139:go,140:yo,141:bo,142:na,143:vo,144:ha,145:_o,146:Ws,147:Ys,148:xo,149:Xs,150:Ja,151:Js,152:Aa,153:815,154:Ta,155:Ia,157:ia,158:sa,159:pa,161:Oa,163:Ka,165:Ca,167:825,169:826,171:Qa,173:La,175:ma,177:ga,178:Na,179:Da,180:Za,181:Ra,182:Ba,184:Ks,194:eo,196:ka,266:We,267:qe,304:Fa,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,456:209,457:ge,461:pe},n(So,[2,1116],{162:1101,188:Ma,189:$a,190:Pa}),{2:o,3:790,4:l,5:f,6:u,7:p,8:h,9:b,77:uo,82:fo,83:Ya,121:fa,123:793,124:Ft,125:Rt,126:1340,127:Xa,131:wa,132:ho,133:da,135:1339,137:po,138:mo,139:go,140:yo,141:bo,142:na,143:vo,144:ha,145:_o,146:Ws,147:Ys,148:xo,149:Xs,150:Ja,151:Js,152:Aa,153:815,154:Ta,155:Ia,157:ia,158:sa,159:pa,161:Oa,163:Ka,165:Ca,167:825,169:826,171:Qa,173:La,175:ma,177:ga,178:Na,179:Da,180:Za,181:Ra,182:Ba,184:Ks,194:eo,196:ka,266:We,267:qe,304:Fa,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1341,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1342,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:1343,4:l,5:f,6:u,7:p,8:h,9:b},n(Xn,[2,123]),n(Xn,[2,124]),n(Xn,[2,125]),n(Xn,[2,132]),{2:o,3:1344,4:l,5:f,6:u,7:p,8:h,9:b},{2:o,3:1096,4:l,5:f,6:u,7:p,8:h,9:b,120:1154,152:Qc,154:Ul,156:1345,229:Is,281:xs,370:1153,371:1155},{2:o,3:1346,4:l,5:f,6:u,7:p,8:h,9:b},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1347,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Xn,[2,138]),n(So,[2,1122],{164:1348}),n(So,[2,1124],{166:1349}),n(So,[2,1126],{168:1350}),n(So,[2,1130],{170:1351}),n(Gl,Tf,{172:1352,187:1353}),{83:[1,1354]},n(So,[2,1132],{174:1355}),n(So,[2,1134],{176:1356}),n(Gl,Tf,{187:1353,172:1357}),n(Gl,Tf,{187:1353,172:1358}),n(Gl,Tf,{187:1353,172:1359}),n(Gl,Tf,{187:1353,172:1360}),{2:o,3:790,4:l,5:f,6:u,7:p,8:h,9:b,77:uo,82:fo,83:Ya,121:fa,123:793,124:Ft,125:Rt,126:1361,127:Xa,131:wa,132:ho,133:da,137:po,138:mo,139:go,140:yo,141:bo,142:na,143:vo,144:ha,145:_o,146:Ws,147:Ys,148:xo,149:Xs,150:Ja,151:Js,152:Aa,153:815,154:Ta,155:Ia,157:ia,158:sa,159:pa,161:Oa,163:Ka,165:Ca,167:825,169:826,171:Qa,173:La,175:ma,177:ga,178:Na,179:Da,180:Za,181:Ra,182:Ba,184:Ks,194:eo,196:ka,266:We,267:qe,304:Fa,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:878,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,183:1362,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,279:877,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(O0,[2,1136],{185:1363}),n(Ce,[2,644],{192:[1,1364]}),n(Ce,[2,640],{192:[1,1365]}),n(Ce,[2,633]),{122:1366,141:Pe,329:Re},n(Ce,[2,642],{192:[1,1367]}),n(Ce,[2,637]),n(Ce,[2,638],{121:[1,1368]}),n(pc,[2,74]),{2:o,3:260,4:l,5:f,6:u,7:p,8:h,9:b,80:1369},{44:1370,45:248,83:T,86:76,96:C,193:103,198:F},{79:jl,84:[1,1371]},n(No,E),n(Ce,Bs,{369:1374,79:k,137:[1,1373],503:ks}),n(Z,[2,475]),{133:[1,1376]},{2:o,3:1377,4:l,5:f,6:u,7:p,8:h,9:b},n(Uo,[2,1192]),n(Uo,[2,1193]),n(Ce,[2,656]),n(P,[2,379],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),n(ll,Z3,{123:672,360:684,121:Ur,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,365:kr}),n([14,79,84,109,121,124,125,127,132,133,142,145,147,148,149,150,151,163,179,180,188,189,271,273,339,343,344,345,346,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366,639,798],Rh,{260:120,93:1097,171:$1,177:oc,178:Zo}),n(lo,[2,726]),n(lo,[2,728]),n(Ce,[2,692]),n(Ce,[2,694],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1378,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:1169,4:l,5:f,6:u,7:p,8:h,9:b,83:Zc,140:Oh,470:1379},n(Ge,[2,701]),n(Ge,[2,702]),n(Ge,[2,703]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1380,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1381,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{123:1167,124:Ft,125:Rt,133:[1,1382]},n(Kt,[2,800]),n(sr,[2,161],{79:eu}),n(sr,[2,162],{79:eu}),n(sr,[2,163],{79:eu}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:878,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,279:1383,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:1384,4:l,5:f,6:u,7:p,8:h,9:b,122:1386,140:[1,1385],141:Pe,329:Re},n(gc,[2,282]),n(gc,[2,284]),n(gc,[2,286]),n(b1,[2,173]),n(b1,[2,1145]),{84:[1,1387]},n(V3,[2,803]),n(Gi,[2,277],{272:1388,273:[1,1389]}),{274:1390,275:[2,1172],800:[1,1391]},n(gf,[2,264],{79:Ct}),n(Be,[2,265]),n(Be,[2,269],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,268:[1,1393],269:[1,1394],344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),n(Kc,j2,{89:1395,192:q2}),n(Co,Pl),{2:o,3:1396,4:l,5:f,6:u,7:p,8:h,9:b},{2:o,3:1397,4:l,5:f,6:u,7:p,8:h,9:b},{2:o,3:1399,4:l,5:f,6:u,7:p,8:h,9:b,421:1398},{2:o,3:1399,4:l,5:f,6:u,7:p,8:h,9:b,421:1400},{2:o,3:1401,4:l,5:f,6:u,7:p,8:h,9:b},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1402,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:1403,4:l,5:f,6:u,7:p,8:h,9:b},{79:S,84:[1,1404]},n(ua,[2,368]),{83:[1,1405]},n(ua,[2,369]),n(ua,[2,370]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1406,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1407,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1408,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1409,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1410,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Lo,[2,535]),n(Ce,ft,{444:1411,82:Pt,83:[1,1412]}),n(Ce,ft,{444:1414,82:Pt}),{83:[1,1415]},{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:1416},n(Kt,[2,776]),n(Kt,[2,778]),n(Kt,[2,1223]),{152:Ea,154:y1,469:1417},n(Ut,[2,1224],{456:209,518:1418,153:1419,154:ys,457:ge,461:pe}),{82:Vl,148:[2,1228],520:1420,522:1421},n([14,79,82,84,141,148,154,161,339,343,457,461,639,798],xf,{529:922,532:923,146:G1}),n(Kt,[2,781]),n(Kt,_f),{79:zc,84:[1,1422]},n(_1,[2,1242],{531:1423,536:1424,161:v1}),n(Sf,[2,1241]),n(_1,[2,790]),n(_1,[2,1247]),n(Ce,[2,521],{83:[1,1425]}),{82:[1,1427],83:[1,1426]},{109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,157:[1,1428],163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},n(hi,Qt,{86:76,193:103,45:248,507:1429,44:1432,83:T,96:C,155:rr,198:F,509:Zt}),n(Ch,[2,1217]),n(Yc,[2,768]),{250:[1,1433]},n(vr,[2,814]),n(vr,[2,815]),n(vr,[2,816]),n(Ef,d0,{548:1434,105:Eh,552:wh,553:Ah,554:h0}),n(Ef,[2,813]),n(Ce,[2,327]),n(Ce,[2,328]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1435,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(lo,[2,734],{133:[1,1436]}),n(Lu,[2,579]),{140:[1,1438],425:1437,427:[1,1439]},n(Lu,[2,9]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1303,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,380:1440,456:209,457:ge,461:pe},n(Ce,Bs,{123:672,360:684,369:1441,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn,503:ks}),n(hi,[2,763],{79:eu,207:[1,1442]}),n(Ce,[2,627]),n(Ce,[2,628]),{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:1443},n(Ce,[2,712]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1444,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1445,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{84:[1,1446],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{84:[1,1447],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,44:1448,45:248,61:180,83:V1,86:76,96:C,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1449,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,193:103,198:F,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{84:[1,1450]},{79:S,84:[1,1451]},n(hn,[2,450]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1452,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,44:1453,45:248,61:180,83:V1,84:[1,1455],86:76,96:C,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1454,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,193:103,198:F,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(hn,[2,453]),n(hn,[2,455]),n(hn,z2,{303:1456,307:W2}),{84:[1,1457],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{84:[1,1458],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{9:Gt,84:Yt,306:1459},{128:[1,1461]},n(Qs,yc,{123:672,360:684,305:1462,109:Dr,121:Ur,124:Ft,125:Rt,127:Vs,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),{2:o,3:1463,4:l,5:f,6:u,7:p,8:h,9:b,189:[1,1464]},n(Nu,[2,298]),n(co,[2,657]),n(hn,[2,387]),{339:[1,1465]},n(hn,[2,394]),{109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,339:[2,398],344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1466,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{4:al,11:950,300:1467,424:949,426:Xc},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1468,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(co,[2,680]),n(Q3,[2,690]),n(r1,[2,675]),n(Nu,Vo),n(co,[2,677]),n(Fl,[2,682]),n(Fl,[2,684]),n(Fl,[2,687]),n(Fl,[2,685]),n(Fl,[2,688]),n(Fl,[2,686]),n(Fl,[2,689]),n(hi,Bs,{369:1470,79:n1,503:ks}),n(hi,[2,482]),{83:[1,1471],152:ve,153:1472,154:ys,161:Ee,190:me,210:1473,335:we,456:209,457:ge,461:pe},n(hi,Bs,{369:1474,503:ks}),{79:jl,84:[1,1475]},{79:_e,84:[1,1476]},n([79,84,109,121,124,125,132,133,142,145,147,148,149,150,151,163,179,180,188,189,344,345,346,348,349,350,351,352,353,354,355,356,357,358,359,363,364,365,366],E),n(Ve,[2,510],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),n(hi,[2,496]),n(hi,Bs,{369:1478,79:k,503:ks}),{83:j1,152:ve,153:1066,154:ys,161:Ee,190:me,210:1067,335:we,376:1479,456:209,457:ge,461:pe},n(hi,Bs,{369:1480,79:n1,503:ks}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,44:247,45:248,61:180,83:V1,85:1481,86:76,96:C,104:1303,120:1302,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,193:103,198:F,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,380:1301,456:209,457:ge,461:pe},n(hi,Bs,{369:1482,503:ks}),{44:1485,45:248,83:Ht,86:76,96:C,152:ve,153:1066,154:ys,158:Ml,161:Ee,190:me,193:103,198:F,210:1067,335:we,375:1483,376:1484,379:$l,456:209,457:ge,461:pe},n(hi,Bs,{369:1487,79:n1,503:ks}),n(hi,[2,492]),n(Ce,Bs,{369:1488,497:1489,498:1490,341:Bh,503:ks}),n(or,[2,746]),n(or,[2,747]),{163:[1,1492],499:[1,1491]},{109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,341:[2,743],344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{84:[1,1493]},{44:1494,45:248,83:T,86:76,96:C,193:103,198:F},n(ki,[2,193]),n(ki,[2,1147]),n(Ce,[2,612]),n(Mt,Mr,{91:1495,137:Rr}),n(q1,[2,1097]),{83:[1,1497]},{83:[1,1498]},n(Kc,[2,182],{213:1499,232:1501,214:1502,233:1503,241:1506,79:Sn,215:Nt,217:Lt,242:Wr,243:gr,244:jt,245:xr,246:Sr,247:zn,248:Fn,249:Cr}),{2:o,3:240,4:l,5:f,6:u,7:p,8:h,9:b,44:765,45:248,83:w0,86:76,96:C,141:Po,152:ve,153:233,154:it,161:Ee,165:Fe,190:me,193:103,198:F,208:234,209:236,210:235,211:237,212:1515,218:1329,227:238,229:Dl,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,335:we,456:209,457:ge,461:pe},n(No,[2,191]),{2:o,3:1096,4:l,5:f,6:u,7:p,8:h,9:b,119:1516,120:1094,121:H2,229:Is,281:xs},n(Y2,[2,100]),n(Gi,Rs,{95:1517,271:sl,273:t1}),n(Gi,[2,160],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),{84:[1,1518]},{79:S,84:[2,1121]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,84:[2,1114],104:1191,120:164,122:168,129:1519,130:1520,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,263:1190,266:We,267:qe,268:[1,1521],280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Xn,[2,111]),n(So,[2,1117],{162:1101,188:Ma,189:$a,190:Pa}),{2:o,3:790,4:l,5:f,6:u,7:p,8:h,9:b,77:uo,82:fo,83:Ya,84:[1,1522],121:fa,123:793,124:Ft,125:Rt,126:1523,127:Xa,131:wa,132:ho,133:da,137:po,138:mo,139:go,140:yo,141:bo,142:na,143:vo,144:ha,145:_o,146:Ws,147:Ys,148:xo,149:Xs,150:Ja,151:Js,152:Aa,153:815,154:Ta,155:Ia,157:ia,158:sa,159:pa,161:Oa,163:Ka,165:Ca,167:825,169:826,171:Qa,173:La,175:ma,177:ga,178:Na,179:Da,180:Za,181:Ra,182:Ba,184:Ks,194:eo,196:ka,266:We,267:qe,304:Fa,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,456:209,457:ge,461:pe},n(So,[2,1118],{162:1101,188:Ma,189:$a,190:Pa}),{84:[1,1524],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{84:[1,1525],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{84:[1,1526]},n(Xn,[2,133]),{79:k,84:[1,1527]},n(Xn,[2,135]),{79:S,84:[1,1528]},{2:o,3:790,4:l,5:f,6:u,7:p,8:h,9:b,77:uo,82:fo,83:Ya,84:[1,1529],121:fa,123:793,124:Ft,125:Rt,126:1530,127:Xa,131:wa,132:ho,133:da,137:po,138:mo,139:go,140:yo,141:bo,142:na,143:vo,144:ha,145:_o,146:Ws,147:Ys,148:xo,149:Xs,150:Ja,151:Js,152:Aa,153:815,154:Ta,155:Ia,157:ia,158:sa,159:pa,161:Oa,163:Ka,165:Ca,167:825,169:826,171:Qa,173:La,175:ma,177:ga,178:Na,179:Da,180:Za,181:Ra,182:Ba,184:Ks,194:eo,196:ka,266:We,267:qe,304:Fa,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,456:209,457:ge,461:pe},{2:o,3:790,4:l,5:f,6:u,7:p,8:h,9:b,77:uo,82:fo,83:Ya,84:[1,1531],121:fa,123:793,124:Ft,125:Rt,126:1532,127:Xa,131:wa,132:ho,133:da,137:po,138:mo,139:go,140:yo,141:bo,142:na,143:vo,144:ha,145:_o,146:Ws,147:Ys,148:xo,149:Xs,150:Ja,151:Js,152:Aa,153:815,154:Ta,155:Ia,157:ia,158:sa,159:pa,161:Oa,163:Ka,165:Ca,167:825,169:826,171:Qa,173:La,175:ma,177:ga,178:Na,179:Da,180:Za,181:Ra,182:Ba,184:Ks,194:eo,196:ka,266:We,267:qe,304:Fa,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,456:209,457:ge,461:pe},{2:o,3:790,4:l,5:f,6:u,7:p,8:h,9:b,77:uo,82:fo,83:Ya,84:[1,1533],121:fa,123:793,124:Ft,125:Rt,126:1534,127:Xa,131:wa,132:ho,133:da,137:po,138:mo,139:go,140:yo,141:bo,142:na,143:vo,144:ha,145:_o,146:Ws,147:Ys,148:xo,149:Xs,150:Ja,151:Js,152:Aa,153:815,154:Ta,155:Ia,157:ia,158:sa,159:pa,161:Oa,163:Ka,165:Ca,167:825,169:826,171:Qa,173:La,175:ma,177:ga,178:Na,179:Da,180:Za,181:Ra,182:Ba,184:Ks,194:eo,196:ka,266:We,267:qe,304:Fa,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,456:209,457:ge,461:pe},{2:o,3:790,4:l,5:f,6:u,7:p,8:h,9:b,77:uo,82:fo,83:Ya,84:[1,1535],121:fa,123:793,124:Ft,125:Rt,126:1536,127:Xa,131:wa,132:ho,133:da,137:po,138:mo,139:go,140:yo,141:bo,142:na,143:vo,144:ha,145:_o,146:Ws,147:Ys,148:xo,149:Xs,150:Ja,151:Js,152:Aa,153:815,154:Ta,155:Ia,157:ia,158:sa,159:pa,161:Oa,163:Ka,165:Ca,167:825,169:826,171:Qa,173:La,175:ma,177:ga,178:Na,179:Da,180:Za,181:Ra,182:Ba,184:Ks,194:eo,196:ka,266:We,267:qe,304:Fa,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,456:209,457:ge,461:pe},{79:Nr,84:[1,1537]},n(Ve,[2,156],{456:209,3:790,123:793,153:815,167:825,169:826,126:1539,2:o,4:l,5:f,6:u,7:p,8:h,9:b,77:uo,82:fo,83:Ya,121:fa,124:Ft,125:Rt,127:Xa,131:wa,132:ho,133:da,137:po,138:mo,139:go,140:yo,141:bo,142:na,143:vo,144:ha,145:_o,146:Ws,147:Ys,148:xo,149:Xs,150:Ja,151:Js,152:Aa,154:Ta,155:Ia,157:ia,158:sa,159:pa,161:Oa,163:Ka,165:Ca,171:Qa,173:La,175:ma,177:ga,178:Na,179:Da,180:Za,181:Ra,182:Ba,184:Ks,194:eo,196:ka,266:We,267:qe,304:Fa,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,457:ge,461:pe}),n(Gl,Tf,{187:1353,172:1540}),{2:o,3:790,4:l,5:f,6:u,7:p,8:h,9:b,77:uo,82:fo,83:Ya,84:[1,1541],121:fa,123:793,124:Ft,125:Rt,126:1542,127:Xa,131:wa,132:ho,133:da,137:po,138:mo,139:go,140:yo,141:bo,142:na,143:vo,144:ha,145:_o,146:Ws,147:Ys,148:xo,149:Xs,150:Ja,151:Js,152:Aa,153:815,154:Ta,155:Ia,157:ia,158:sa,159:pa,161:Oa,163:Ka,165:Ca,167:825,169:826,171:Qa,173:La,175:ma,177:ga,178:Na,179:Da,180:Za,181:Ra,182:Ba,184:Ks,194:eo,196:ka,266:We,267:qe,304:Fa,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,456:209,457:ge,461:pe},{2:o,3:790,4:l,5:f,6:u,7:p,8:h,9:b,77:uo,82:fo,83:Ya,84:[1,1543],121:fa,123:793,124:Ft,125:Rt,126:1544,127:Xa,131:wa,132:ho,133:da,137:po,138:mo,139:go,140:yo,141:bo,142:na,143:vo,144:ha,145:_o,146:Ws,147:Ys,148:xo,149:Xs,150:Ja,151:Js,152:Aa,153:815,154:Ta,155:Ia,157:ia,158:sa,159:pa,161:Oa,163:Ka,165:Ca,167:825,169:826,171:Qa,173:La,175:ma,177:ga,178:Na,179:Da,180:Za,181:Ra,182:Ba,184:Ks,194:eo,196:ka,266:We,267:qe,304:Fa,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,456:209,457:ge,461:pe},{79:Nr,84:[1,1545]},{79:Nr,84:[1,1546]},{79:Nr,84:[1,1547]},{79:Nr,84:[1,1548]},{84:[1,1549],162:1101,188:Ma,189:$a,190:Pa},{79:eu,84:[1,1550]},{2:o,3:790,4:l,5:f,6:u,7:p,8:h,9:b,77:uo,79:[1,1551],82:fo,83:Ya,121:fa,123:793,124:Ft,125:Rt,126:1552,127:Xa,131:wa,132:ho,133:da,137:po,138:mo,139:go,140:yo,141:bo,142:na,143:vo,144:ha,145:_o,146:Ws,147:Ys,148:xo,149:Xs,150:Ja,151:Js,152:Aa,153:815,154:Ta,155:Ia,157:ia,158:sa,159:pa,161:Oa,163:Ka,165:Ca,167:825,169:826,171:Qa,173:La,175:ma,177:ga,178:Na,179:Da,180:Za,181:Ra,182:Ba,184:Ks,194:eo,196:ka,266:We,267:qe,304:Fa,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,456:209,457:ge,461:pe},{2:o,3:1553,4:l,5:f,6:u,7:p,8:h,9:b},{2:o,3:1554,4:l,5:f,6:u,7:p,8:h,9:b},n(Ce,[2,635]),{2:o,3:1555,4:l,5:f,6:u,7:p,8:h,9:b},{122:1556,141:Pe,329:Re},n(pc,[2,75]),{84:[1,1557]},{82:[1,1558]},{2:o,3:1096,4:l,5:f,6:u,7:p,8:h,9:b,120:1559,229:Is,281:xs},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1560,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Ce,[2,474]),{2:o,3:1096,4:l,5:f,6:u,7:p,8:h,9:b,120:1154,152:Qc,154:Ul,229:Is,281:xs,370:1561,371:1155},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1562,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{133:[1,1563]},n(Ce,[2,695],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),n(Ge,[2,700]),{84:[1,1564],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},n(Ce,[2,696],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1565,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(gc,[2,279]),n(gc,[2,281]),n(gc,[2,283]),n(gc,[2,285]),n(b1,[2,174]),n(Gi,[2,275]),{140:De,205:1566},{275:[1,1567]},{275:[2,1173]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1191,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,263:1568,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Be,[2,270],{264:1569,265:[1,1570]}),{270:[1,1571]},n(q1,[2,1104],{101:1572,102:1573,103:T0,108:I0}),n(Ce,[2,607]),{157:[1,1574]},n(Ce,[2,608]),n(Kt,[2,574],{424:949,11:950,300:1575,4:al,423:[1,1576],426:Xc}),n(Ce,[2,609]),n(Ce,[2,611]),{79:S,84:[1,1577]},n(Ce,[2,615]),n(ua,z2,{303:1578,307:W2}),n(Rn,[2,1182],{308:1579,310:1580,311:[1,1581]}),{79:[1,1582],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{79:[1,1583],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{79:[1,1584],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{79:[1,1585],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{79:[1,1586],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},n(Ce,[2,619]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1587,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:1588,4:l,5:f,6:u,7:p,8:h,9:b},n(Ce,[2,621]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1191,120:164,122:168,129:1589,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,263:1190,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{83:[1,1590]},{2:o,3:1591,4:l,5:f,6:u,7:p,8:h,9:b},{82:Vl,148:[2,1226],519:1592,522:1593},n(Ut,[2,1225]),{148:[1,1594]},{148:[2,1229]},n(Kt,[2,782]),n(_1,[2,789]),n(_1,[2,1243]),{2:o,3:1399,4:l,5:f,6:u,7:p,8:h,9:b,82:[1,1597],386:1595,393:1596,421:1598},{2:o,3:1096,4:l,5:f,6:u,7:p,8:h,9:b,85:1599,120:1151,229:Is,281:xs},{44:1600,45:248,83:T,86:76,96:C,193:103,198:F},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1601,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(hi,[2,767]),{2:o,3:1096,4:l,5:f,6:u,7:p,8:h,9:b,120:1154,152:Qc,154:Ul,156:1602,229:Is,281:xs,370:1153,371:1155},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1603,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(hi,[2,772]),{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:1604},{368:Lh,372:Nh,373:x0,549:1605},n(lo,[2,735],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1606,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{79:[1,1607],84:[1,1608]},n(Ve,[2,581]),n(Ve,[2,582]),{79:_e,84:[1,1609]},n(Ce,[2,479]),{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,152:Ea,154:y1,208:1611,469:1610},n(lo,[2,603]),n(x1,[2,404],{123:672,360:684,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,345:Xt,349:Jt,350:br,351:Tr,352:Ir}),n(x1,[2,406],{123:672,360:684,124:Ft,125:Rt,132:tr,142:ur,145:nr,147:fr,150:wr,151:Lr,188:dr,189:ir,345:Xt,349:Jt,350:br,351:Tr,352:Ir}),n(hn,[2,420]),n(hn,[2,424]),{84:[1,1612]},{79:S,84:[1,1613]},n(hn,[2,446]),n(hn,[2,448]),{84:[1,1614],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{84:[1,1615]},{79:S,84:[1,1616]},n(hn,[2,451]),n(hn,[2,343]),n(hn,z2,{303:1617,307:W2}),n(hn,z2,{303:1618,307:W2}),{84:[1,1619]},{141:[1,1620]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1191,120:164,122:168,129:1621,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,263:1190,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{9:Gt,84:Yt,306:1622},n(Nu,[2,293]),n(hn,[2,288]),n(hn,[2,393]),n(Ih,[2,397],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),{79:[1,1624],84:[1,1623]},{79:[1,1626],84:[1,1625],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{2:o,3:1463,4:l,5:f,6:u,7:p,8:h,9:b},n(hi,[2,481]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1303,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,380:1627,456:209,457:ge,461:pe},n(Af,[2,508]),n(Af,[2,509]),n(hi,[2,493]),{44:1630,45:248,83:Ht,86:76,96:C,152:ve,153:1066,154:ys,158:Ml,161:Ee,190:me,193:103,198:F,210:1067,335:we,375:1628,376:1629,379:$l,456:209,457:ge,461:pe},n(Af,[2,504]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1631,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(hi,[2,499]),n(hi,Bs,{369:1632,79:n1,503:ks}),n(hi,[2,484]),{79:jl,84:[1,1633]},n(hi,[2,487]),{83:j1,152:ve,153:1066,154:ys,161:Ee,190:me,210:1067,335:we,376:1634,456:209,457:ge,461:pe},n(hi,Bs,{369:1635,79:n1,503:ks}),n(hi,Bs,{369:1636,503:ks}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,44:247,45:248,61:180,83:V1,86:76,96:C,104:1303,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,193:103,198:F,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,380:1301,456:209,457:ge,461:pe},n(hi,[2,491]),n(Ce,[2,738]),n(or,[2,744]),n(or,[2,745]),{179:[1,1638],342:[1,1637]},{499:[1,1639]},{250:[2,742]},{84:[1,1640]},n(Mn,Ei,{92:1641,252:Ss}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1643,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1644,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:1645,4:l,5:f,6:u,7:p,8:h,9:b},n(Kc,[2,183],{233:1503,241:1506,232:1647,214:1648,79:[1,1646],215:Nt,217:Lt,242:Wr,243:gr,244:jt,245:xr,246:Sr,247:zn,248:Fn,249:Cr}),{2:o,3:240,4:l,5:f,6:u,7:p,8:h,9:b,83:Vc,141:Po,152:ve,153:233,154:it,161:Ee,165:Fe,190:me,208:234,209:236,210:235,211:237,218:1649,227:238,229:Dl,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,335:we,456:209,457:ge,461:pe},n(No,[2,211]),n(No,[2,212]),{2:o,3:240,4:l,5:f,6:u,7:p,8:h,9:b,83:[1,1654],152:ve,153:1652,154:it,161:Ee,165:Fe,190:me,208:1651,209:1655,210:1653,211:1656,234:1650,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,335:we,456:209,457:ge,461:pe},{216:[1,1657],243:Ts},{216:[1,1659],243:Ai},n(ts,[2,220]),{215:[1,1663],217:[1,1662],241:1661,243:gr,244:jt,245:xr,246:Sr,247:zn,248:Fn,249:Cr},n(ts,[2,222]),{243:[1,1664]},{217:[1,1666],243:[1,1665]},{217:[1,1668],243:[1,1667]},{217:[1,1669]},{243:[1,1670]},{243:[1,1671]},{79:Sn,213:1672,214:1502,215:Nt,217:Lt,232:1501,233:1503,241:1506,242:Wr,243:gr,244:jt,245:xr,246:Sr,247:zn,248:Fn,249:Cr},n(Y2,[2,97]),n(Gi,[2,81]),n(Xn,[2,113]),{79:Ct,84:[1,1673]},{84:[1,1674]},{84:[2,1115]},n(Xn,[2,112]),n(So,[2,1119],{162:1101,188:Ma,189:$a,190:Pa}),n(Xn,[2,114]),n(Xn,[2,115]),n(Xn,[2,116]),n(Xn,[2,134]),n(Xn,[2,137]),n(Xn,[2,140]),n(So,[2,1123],{162:1101,188:Ma,189:$a,190:Pa}),n(Xn,[2,141]),n(So,[2,1125],{162:1101,188:Ma,189:$a,190:Pa}),n(Xn,[2,142]),n(So,[2,1127],{162:1101,188:Ma,189:$a,190:Pa}),n(Xn,[2,143]),n(So,[2,1131],{162:1101,188:Ma,189:$a,190:Pa}),n(Xn,[2,144]),n(Gl,[2,1138],{186:1675}),n(Gl,[2,1141],{162:1101,188:Ma,189:$a,190:Pa}),{79:Nr,84:[1,1676]},n(Xn,[2,146]),n(So,[2,1133],{162:1101,188:Ma,189:$a,190:Pa}),n(Xn,[2,147]),n(So,[2,1135],{162:1101,188:Ma,189:$a,190:Pa}),n(Xn,[2,148]),n(Xn,[2,149]),n(Xn,[2,150]),n(Xn,[2,151]),n(Xn,[2,152]),n(Xn,[2,153]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:287,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,160:1677,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(O0,[2,1137],{162:1101,188:Ma,189:$a,190:Pa}),n(Ce,[2,645]),n(Ce,[2,641]),n(Ce,[2,643]),n(Ce,[2,639]),n(pc,[2,78]),{83:[1,1678]},n(No,[2,519]),n(Ce,Bs,{123:672,360:684,369:1679,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn,503:ks}),n(Z,[2,476]),n(Z,[2,477],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1680,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Ge,[2,704]),n(Ce,[2,697],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),n(Gi,[2,278]),{140:[2,1174],276:1681,681:[1,1682]},n(Be,[2,266]),n(Be,[2,271]),{266:[1,1683],267:[1,1684]},n(Be,[2,272],{268:[1,1685]}),n(Mt,Mr,{91:1686,137:Rr}),n(q1,[2,1105]),{2:o,3:1687,4:l,5:f,6:u,7:p,8:h,9:b},n(Kt,[2,583],{422:1688,428:1689,429:1690,401:1698,163:bs,196:Gs,250:Zs,330:ea,378:ya,391:Ua,403:Os,404:li,407:Va,408:ji}),n(Kt,[2,573]),n(Ce,[2,614],{82:[1,1702]}),n(ua,[2,367]),{84:[2,1184],127:[1,1705],309:1703,312:1704},n(Rn,[2,1183]),{128:[1,1706]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1707,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1708,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1709,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1710,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1711,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{79:S,84:[1,1712]},n(Ce,[2,623]),{79:Ct,84:[1,1713]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1191,120:164,122:168,129:1714,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,263:1190,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n([14,79,84,148,339,343,639,798],[2,786]),{148:[1,1715]},{148:[2,1227]},{2:o,3:1222,4:l,5:f,6:u,7:p,8:h,9:b,141:Oo,146:G1,152:Ea,154:y1,161:v1,469:632,514:1224,517:1716,521:629,532:626,536:628},{84:[1,1717]},{79:[1,1718],84:[2,537]},{44:1719,45:248,83:T,86:76,96:C,193:103,198:F},n(Ve,[2,570]),{79:jl,84:[1,1720]},n(Ce,[2,1210],{449:1721,450:1722,77:Nn}),n(hi,Qt,{86:76,193:103,45:248,123:672,360:684,44:1432,507:1724,83:T,96:C,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,155:rr,163:pn,179:vn,180:xn,188:dr,189:ir,198:F,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn,509:Zt}),n(hi,[2,770],{79:k}),n(hi,[2,771],{79:S}),n([14,58,77,83,96,133,155,165,198,294,295,322,339,343,368,372,373,433,437,438,441,443,445,446,454,455,466,472,474,475,477,478,479,480,481,482,483,487,488,491,492,545,546,555,639,798],[2,1258],{550:1725,3:1726,2:o,4:l,5:f,6:u,7:p,8:h,9:b,82:[1,1727]}),n(vi,[2,1260],{551:1728,82:[1,1729]}),n(lo,[2,736],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),{140:[1,1730]},n(Lu,[2,576]),n(Lu,[2,578]),{2:o,3:1731,4:l,5:f,6:u,7:p,8:h,9:b},n(hi,[2,765],{83:[1,1732]}),n(hn,[2,436]),n(hn,[2,437]),n(hn,[2,463]),n(hn,[2,447]),n(hn,[2,449]),n(hn,[2,344]),n(hn,[2,345]),n(hn,[2,346]),{84:[2,355]},n(Qs,[2,353],{79:Ct}),{84:[1,1733]},n(hn,[2,331]),{140:[1,1734]},n(hn,[2,333]),{140:[1,1735]},{79:_e,84:[1,1736]},{83:j1,152:ve,153:1066,154:ys,161:Ee,190:me,210:1067,335:we,376:1737,456:209,457:ge,461:pe},n(hi,Bs,{369:1738,79:n1,503:ks}),n(hi,Bs,{369:1739,503:ks}),n(Ve,[2,511],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),n(hi,[2,483]),{44:1742,45:248,83:Ht,86:76,96:C,152:ve,153:1066,154:ys,158:Ml,161:Ee,190:me,193:103,198:F,210:1067,335:we,375:1740,376:1741,379:$l,456:209,457:ge,461:pe},n(hi,Bs,{369:1743,79:n1,503:ks}),n(hi,[2,490]),n(hi,[2,497]),{368:Ri,372:Cs,500:1744},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1747,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{128:[1,1749],179:[1,1750],342:[1,1748]},n([79,215,217,242,243,244,245,246,247,248,249],A0,{260:120,3:771,93:1097,219:1320,230:1321,2:o,4:l,5:f,6:u,7:p,8:h,9:b,82:e1,84:Pl,127:Pl,271:Pl,273:Pl,171:$1,177:oc,178:Zo}),n(Co,Uc,{260:120,93:1751,171:$1,177:oc,178:Zo}),{128:[1,1752]},n(Mt,[2,238],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),{105:[1,1753],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{105:[1,1754]},{2:o,3:240,4:l,5:f,6:u,7:p,8:h,9:b,83:Vc,141:Po,152:ve,153:233,154:it,161:Ee,165:Fe,190:me,208:234,209:236,210:235,211:237,212:1755,218:1329,227:238,229:Dl,293:Xi,322:Me,323:$e,324:Le,325:be,326:Ne,335:we,456:209,457:ge,461:pe},n(No,[2,209]),n(No,[2,210]),n(No,[2,192]),n(No,[2,236],{235:1756,250:[1,1757],251:[1,1758]}),n(ki,[2,1162],{3:771,236:1759,230:1760,2:o,4:l,5:f,6:u,7:p,8:h,9:b,82:e1}),n(vf,[2,1164],{237:1761,82:[1,1762]}),{2:o,3:771,4:l,5:f,6:u,7:p,8:h,9:b,82:e1,230:1763},{44:1764,45:248,83:T,86:76,96:C,193:103,198:F},n(ki,[2,1168],{3:771,239:1765,230:1766,2:o,4:l,5:f,6:u,7:p,8:h,9:b,82:e1}),n(ki,[2,1170],{3:771,240:1767,230:1768,2:o,4:l,5:f,6:u,7:p,8:h,9:b,82:e1}),{83:[1,1769]},n(ts,[2,232]),{83:[1,1770]},n(ts,[2,228]),n(ts,[2,221]),{243:Ai},{243:Ts},n(ts,[2,223]),n(ts,[2,224]),{243:[1,1771]},n(ts,[2,226]),{243:[1,1772]},{243:[1,1773]},n(ts,[2,230]),n(ts,[2,231]),{84:[1,1774],214:1648,215:Nt,217:Lt,232:1647,233:1503,241:1506,242:Wr,243:gr,244:jt,245:xr,246:Sr,247:zn,248:Fn,249:Cr},n(Xn,[2,104]),n(Xn,[2,105]),n(Ve,[2,155],{456:209,3:790,123:793,153:815,167:825,169:826,126:1775,2:o,4:l,5:f,6:u,7:p,8:h,9:b,77:uo,82:fo,83:Ya,121:fa,124:Ft,125:Rt,127:Xa,131:wa,132:ho,133:da,137:po,138:mo,139:go,140:yo,141:bo,142:na,143:vo,144:ha,145:_o,146:Ws,147:Ys,148:xo,149:Xs,150:Ja,151:Js,152:Aa,154:Ta,155:Ia,157:ia,158:sa,159:pa,161:Oa,163:Ka,165:Ca,171:Qa,173:La,175:ma,177:ga,178:Na,179:Da,180:Za,181:Ra,182:Ba,184:Ks,194:eo,196:ka,266:We,267:qe,304:Fa,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,457:ge,461:pe}),n(Xn,[2,145]),{79:S,84:[1,1776]},{44:1777,45:248,83:T,86:76,96:C,193:103,198:F},n(Ce,[2,473]),n(Z,[2,478],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),{140:De,205:1778},{140:[2,1175]},n(Be,[2,267]),n(Be,[2,268]),n(Be,[2,273]),n(Mn,Ei,{92:1779,252:Ss}),n(Ce,[2,610]),n(Kt,[2,572]),n(Kt,[2,584],{401:1698,429:1780,163:bs,196:Gs,250:Zs,330:ea,378:ya,391:Ua,403:Os,404:li,407:Va,408:ji}),n(Di,[2,586]),{6:[1,1781]},{6:[1,1782]},{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:1783},n(Di,[2,592],{83:[1,1784]}),{2:o,3:127,4:l,5:f,6:u,7:p,8:h,9:b,83:[1,1786],122:277,140:De,141:Pe,152:ve,161:Ee,165:Fe,190:me,205:276,209:1787,210:280,284:278,285:279,292:xu,293:jc,302:1785,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,335:we},n(Di,[2,596]),{330:[1,1788]},n(Di,[2,598]),n(Di,[2,599]),{368:[1,1789]},{83:[1,1790]},{2:o,3:1791,4:l,5:f,6:u,7:p,8:h,9:b},{84:[1,1792]},{84:[2,1185]},{128:[1,1793]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1799,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,253:1794,255:Go,256:H1,257:1795,258:H,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{84:[1,1800],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{84:[1,1801],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{84:[1,1802],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{84:[1,1803],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{84:[1,1804],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},n(Ce,ft,{444:1805,82:Pt}),n(Ce,[2,629]),{79:Ct,84:[1,1806]},{2:o,3:1222,4:l,5:f,6:u,7:p,8:h,9:b,141:Oo,146:G1,152:Ea,154:y1,161:v1,469:632,514:1224,517:1807,521:629,532:626,536:628},n(Kt,[2,780]),n(Ce,[2,524],{387:1808,389:1809,390:1810,4:tt,269:ke,378:Yr,391:_i}),n(G,D,{3:1399,394:1815,421:1816,395:1817,396:1818,2:o,4:l,5:f,6:u,7:p,8:h,9:b,402:ie}),{84:[2,538]},{82:[1,1820]},n(Ce,[2,647]),n(Ce,[2,1211]),{403:[1,1822],451:[1,1821]},n(hi,[2,773]),n(Ce,c,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,16:1823,2:o,4:l,5:f,6:u,7:p,8:h,9:b,58:R,77:L,83:T,96:C,133:te,155:W,165:Y,198:F,294:N,295:Ae,322:je,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Bt,455:Zr,466:Un,472:$i,474:Bi,475:Yn,477:Vn,478:ni,479:cs,480:Ds,481:Cn,482:oi,483:ms,487:gs,488:To,491:Qo,492:Io,545:Mo,546:Sa,555:$o}),n(Ce,[2,807]),n(vi,[2,1259]),n(Ce,c,{21:5,22:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:18,34:19,35:20,36:21,37:22,38:23,39:24,40:25,41:26,42:27,43:28,44:29,45:30,46:31,47:32,48:33,49:34,50:35,51:36,52:37,53:38,54:39,55:40,56:41,57:42,59:44,60:45,61:46,62:47,63:48,64:49,65:50,66:51,67:52,68:53,69:54,70:55,71:56,72:57,73:58,74:59,75:60,76:61,86:76,543:99,193:103,3:104,16:1824,2:o,4:l,5:f,6:u,7:p,8:h,9:b,58:R,77:L,83:T,96:C,133:te,155:W,165:Y,198:F,294:N,295:Ae,322:je,368:Ot,372:Oe,373:Te,433:ht,437:Tt,438:$t,441:yr,443:le,445:mr,446:Vt,454:Bt,455:Zr,466:Un,472:$i,474:Bi,475:Yn,477:Vn,478:ni,479:cs,480:Ds,481:Cn,482:oi,483:ms,487:gs,488:To,491:Qo,492:Io,545:Mo,546:Sa,555:$o}),n(vi,[2,1261]),{84:[1,1825]},n(hi,[2,764]),{2:o,3:1096,4:l,5:f,6:u,7:p,8:h,9:b,85:1826,120:1151,229:Is,281:xs},n(hn,[2,347]),{84:[1,1827]},{84:[1,1828]},n(Af,[2,507]),n(hi,Bs,{369:1829,79:n1,503:ks}),n(hi,[2,495]),n(hi,[2,498]),{83:j1,152:ve,153:1066,154:ys,161:Ee,190:me,210:1067,335:we,376:1830,456:209,457:ge,461:pe},n(hi,Bs,{369:1831,79:n1,503:ks}),n(hi,Bs,{369:1832,503:ks}),n(hi,[2,489]),n(or,[2,748]),n(or,[2,750]),{155:[1,1833]},{109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,342:[1,1834],344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{373:ye,501:1835},{454:[1,1838],502:[1,1837]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1839,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(gf,D2,{94:1840,127:R2}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1799,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,253:1841,255:Go,256:H1,257:1795,258:H,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:1842,4:l,5:f,6:u,7:p,8:h,9:b},{2:o,3:1843,4:l,5:f,6:u,7:p,8:h,9:b},n(Kc,[2,184],{79:Sn}),n(No,[2,213]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1844,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:1096,4:l,5:f,6:u,7:p,8:h,9:b,83:[1,1846],85:1845,120:1151,229:Is,281:xs},n(ki,[2,214]),n(ki,[2,1163]),n(ki,[2,1166],{238:1847,3:1848,2:o,4:l,5:f,6:u,7:p,8:h,9:b}),n(vf,[2,1165]),n(ki,[2,216]),{84:[1,1849]},n(ki,[2,218]),n(ki,[2,1169]),n(ki,[2,219]),n(ki,[2,1171]),{44:1850,45:248,83:T,86:76,96:C,193:103,198:F},{44:1851,45:248,83:T,86:76,96:C,193:103,198:F},n(ts,[2,225]),n(ts,[2,227]),n(ts,[2,229]),n(Kc,[2,185]),n(Gl,[2,1139],{162:1101,188:Ma,189:$a,190:Pa}),n(Xn,[2,154]),{84:[1,1852]},n(Se,[2,1176],{277:1853,800:[1,1854]}),n(Co,Uc,{260:120,93:1855,171:$1,177:oc,178:Zo}),n(Di,[2,585]),n(Di,[2,588]),{408:[1,1856]},n(Di,[2,1204],{432:1857,430:1858,83:ce}),{140:De,205:1860},n(Di,[2,593]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1861,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Di,[2,595]),n(Di,[2,597]),{2:o,3:127,4:l,5:f,6:u,7:p,8:h,9:b,83:[1,1863],122:277,140:De,141:Pe,152:ve,161:Ee,165:Fe,190:me,205:276,209:281,210:280,284:278,285:279,292:xu,293:jc,302:1862,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,335:we},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1864,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Ce,[2,616]),n(ua,[2,349]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1191,120:164,122:168,129:1865,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,263:1190,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(Rn,[2,350],{79:ae}),n(de,[2,243]),{155:[1,1867]},{83:[1,1868]},{83:[1,1869]},n(de,[2,248],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),n(ua,[2,372]),n(ua,[2,373]),n(ua,[2,374]),n(ua,[2,375]),n(ua,[2,376]),n(Ce,[2,620]),n(Ce,[2,630]),n(Kt,[2,779]),n(Ce,[2,520]),n(Ce,[2,525],{390:1870,4:tt,269:ke,378:Yr,391:_i}),n(M,[2,527]),n(M,[2,528]),{133:[1,1871]},{133:[1,1872]},{133:[1,1873]},{79:[1,1874],84:[2,536]},n(Ve,[2,571]),n(Ve,[2,539]),{196:[1,1882],202:[1,1883],397:1875,398:1876,399:1877,400:1878,401:1879,403:Os,404:[1,1880],407:[1,1881]},{2:o,3:1884,4:l,5:f,6:u,7:p,8:h,9:b},{44:1885,45:248,83:T,86:76,96:C,193:103,198:F},{452:[1,1886]},{453:[1,1887]},n(Ce,[2,806]),n(Ce,[2,808]),n(Lu,[2,575]),{79:jl,84:[1,1888]},n(hn,[2,332]),n(hn,[2,334]),n(hi,[2,494]),n(hi,Bs,{369:1889,79:n1,503:ks}),n(hi,[2,486]),n(hi,[2,488]),{2:o,3:1096,4:l,5:f,6:u,7:p,8:h,9:b,120:1154,152:Qc,154:Ul,156:1890,229:Is,281:xs,370:1153,371:1155},{368:Ri,372:Cs,500:1891},n(or,[2,752]),{83:[1,1893],378:[1,1894],379:[1,1892]},{179:[1,1896],342:[1,1895]},{179:[1,1898],342:[1,1897]},{109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,342:[1,1899],344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},n(Gi,Rs,{95:1900,271:sl,273:t1}),n([14,84,127,171,177,178,271,273,339,343,503,639,798],ne,{254:1901,77:[1,1902],79:ae,259:j}),{84:[2,1106],106:1904,109:[1,1906],111:1905},{109:[1,1907]},n(No,[2,233],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),n([14,77,84,103,108,127,137,171,177,178,215,217,242,243,244,245,246,247,248,249,252,271,273,339,343,503,639,798],[2,234],{79:jl}),{2:o,3:1096,4:l,5:f,6:u,7:p,8:h,9:b,85:1908,120:1151,229:Is,281:xs},n(ki,[2,215]),n(ki,[2,1167]),{2:o,3:771,4:l,5:f,6:u,7:p,8:h,9:b,82:e1,230:1909},{84:[1,1910]},{84:[1,1911]},n(pc,[2,79]),n(Gi,[2,1178],{278:1912,452:[1,1913]}),n(Se,[2,1177]),n(Co,[2,86]),{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:1914},n(xe,Ie,{410:1915,412:1916,413:1917,250:kt}),n(Di,[2,1205]),{2:o,3:1919,4:l,5:f,6:u,7:p,8:h,9:b},{79:[1,1920]},{84:[1,1921],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},n(Di,[2,600]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1922,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{84:[1,1923],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},{79:Ct,84:[2,351]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1799,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,255:Go,256:H1,257:1924,258:H,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{83:[1,1925]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1799,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,253:1926,255:Go,256:H1,257:1795,258:H,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1799,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,253:1927,255:Go,256:H1,257:1795,258:H,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},n(M,[2,526]),{2:o,3:1928,4:l,5:f,6:u,7:p,8:h,9:b},{140:De,205:1929},{2:o,3:1930,4:l,5:f,6:u,7:p,8:h,9:b},n(G,D,{396:1818,395:1931,402:ie}),n(Kt,[2,541]),n(Kt,[2,542]),n(Kt,[2,543]),n(Kt,[2,544]),n(Kt,[2,545]),{6:[1,1932]},{6:[1,1933]},n([2,4,5,7,8,9,83],[2,1198],{419:1934,6:[1,1935]}),{2:o,3:1936,4:l,5:f,6:u,7:p,8:h,9:b},n(G,[2,547]),n(Ce,[2,1208],{448:1937,450:1938,77:Nn}),n(Ce,[2,648]),n(Ce,[2,649],{402:[1,1939]}),n(hi,[2,766]),n(hi,[2,485]),n(or,[2,751],{79:k}),n(or,[2,749]),{83:j1,152:ve,153:1066,154:ys,161:Ee,190:me,210:1067,335:we,376:1940,456:209,457:ge,461:pe},{2:o,3:1096,4:l,5:f,6:u,7:p,8:h,9:b,85:1941,120:1151,229:Is,281:xs},{379:[1,1942]},{373:ye,501:1943},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1944,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{373:ye,501:1945},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1946,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{373:ye,501:1947},n(Gi,[2,80]),n(Mn,[2,240]),{255:[1,1948],256:[1,1949]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1950,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{84:[1,1951]},{84:[2,1107]},{83:[1,1952]},{83:[1,1953]},{79:jl,84:[1,1954]},n(ki,[2,217]),{2:o,3:1955,4:l,5:f,6:u,7:p,8:h,9:b,82:[1,1956]},{2:o,3:1957,4:l,5:f,6:u,7:p,8:h,9:b,82:[1,1958]},n(Gi,[2,276]),n(Gi,[2,1179]),n(Di,[2,1202],{431:1959,430:1960,83:ce}),n(Di,[2,590]),n(xe,[2,553],{413:1961,250:[1,1962]}),n(xe,[2,554],{412:1963,250:[1,1964]}),{368:hr,372:pr},{84:[1,1967]},{140:De,205:1968},n(Di,[2,594]),{84:[1,1969],109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},n(Di,[2,548]),n(de,[2,244]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1799,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,253:1970,255:Go,256:H1,257:1795,258:H,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{79:ae,84:[1,1971]},{79:ae,84:[1,1972]},n(M,[2,529]),n(M,[2,530]),n(M,[2,531]),n(Ve,[2,540]),{2:o,3:1974,4:l,5:f,6:u,7:p,8:h,9:b,83:[2,1194],405:1973},{83:[1,1975]},{2:o,3:1977,4:l,5:f,6:u,7:p,8:h,9:b,83:[2,1200],420:1976},n([2,4,5,6,7,8,9,83],[2,1199]),{83:[1,1978]},n(Ce,[2,646]),n(Ce,[2,1209]),n(G,D,{396:1818,395:1979,402:ie}),n(or,[2,758],{79:n1}),{79:jl,84:[1,1980]},n(or,[2,760]),n(or,[2,753]),{109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,342:[1,1981],344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},n(or,[2,756]),{109:Dr,121:Ur,123:672,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,342:[1,1982],344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,360:684,363:dn,364:sn,365:kr,366:yn},n(or,[2,754]),n(Mn,ne,{254:1983,259:j}),n(Mn,ne,{254:1984,259:j}),n(Mn,[2,250],{123:672,360:684,109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),n(q1,[2,1108],{107:1985,113:1986,3:1988,2:o,4:l,5:f,6:u,7:p,8:h,9:b,82:Br}),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1991,112:1989,114:1990,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:1096,4:l,5:f,6:u,7:p,8:h,9:b,85:1992,120:1151,229:Is,281:xs},n(No,[2,235]),n(No,[2,187]),{2:o,3:1993,4:l,5:f,6:u,7:p,8:h,9:b},n(No,[2,189]),{2:o,3:1994,4:l,5:f,6:u,7:p,8:h,9:b},n(xe,Ie,{412:1916,413:1917,410:1995,250:kt}),n(Di,[2,1203]),n(Di,[2,555]),{368:hr},n(Di,[2,556]),{372:pr},{155:lr,414:1996,415:tn,416:qr,417:Kr},{155:lr,414:2001,415:tn,416:qr,417:Kr},n(Di,[2,587]),{84:[1,2002]},n(Di,[2,601]),{79:ae,84:[1,2003]},n(de,[2,246]),n(de,[2,247]),{83:[1,2004]},{83:[2,1195]},{2:o,3:2006,4:l,5:f,6:u,7:p,8:h,9:b,141:Xr,406:2005},{83:[1,2008]},{83:[2,1201]},{2:o,3:2006,4:l,5:f,6:u,7:p,8:h,9:b,141:Xr,406:2009},n(Ce,[2,650]),{378:[1,2011],379:[1,2010]},{373:ye,501:2012},{368:Ri,372:Cs,500:2013},n(Mn,[2,241]),n(Mn,[2,242]),n(q1,[2,87]),n(q1,[2,1109]),{2:o,3:2014,4:l,5:f,6:u,7:p,8:h,9:b},n(q1,[2,91]),{79:[1,2016],84:[1,2015]},n(Ve,[2,93]),n(Ve,[2,94],{123:672,360:684,82:[1,2017],109:Dr,121:Ur,124:Ft,125:Rt,132:tr,133:ee,142:ur,145:nr,147:fr,148:fn,149:an,150:wr,151:Lr,163:pn,179:vn,180:xn,188:dr,189:ir,344:Ar,345:Xt,346:Fr,348:Vr,349:Jt,350:br,351:Tr,352:Ir,353:on,354:ln,355:rn,356:jr,357:nn,358:en,359:zr,363:dn,364:sn,365:kr,366:yn}),{79:jl,84:[1,2018]},n(No,[2,188]),n(No,[2,190]),n(Di,[2,589]),n(Di,[2,557]),n(Di,[2,559]),{330:[1,2019],378:[1,2020]},n(Di,[2,562]),{418:[1,2021]},n(Di,[2,558]),n(Di,[2,591]),n(de,[2,245]),{2:o,3:2006,4:l,5:f,6:u,7:p,8:h,9:b,141:Xr,406:2022},{79:Qr,84:[1,2023]},n(Ve,[2,566]),n(Ve,[2,567]),{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1191,120:164,122:168,129:2025,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,263:1190,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{79:Qr,84:[1,2026]},{83:j1,152:ve,153:1066,154:ys,161:Ee,190:me,210:1067,335:we,376:2027,456:209,457:ge,461:pe},{379:[1,2028]},n(or,[2,755]),n(or,[2,757]),n(q1,[2,90]),{84:[2,89]},{2:o,3:185,4:l,5:f,6:u,7:p,8:h,9:b,61:180,83:It,104:1991,114:2029,120:164,122:168,140:De,141:Pe,146:vt,152:ve,153:176,154:it,158:pt,161:Ee,163:Ue,165:Fe,167:183,188:_t,189:mt,190:me,205:166,209:162,210:170,211:171,229:gt,266:We,267:qe,280:165,281:at,282:161,283:163,284:167,285:169,286:172,287:173,288:174,289:177,290:178,292:ct,293:ot,294:N,298:ut,299:dt,301:yt,304:xt,313:Xe,314:Je,315:rt,316:Ke,317:ze,318:Ye,319:Qe,320:Ze,322:Me,323:$e,324:Le,325:be,326:Ne,327:et,328:nt,329:Re,330:st,331:bt,332:St,335:we,336:Et,345:wt,350:At,456:209,457:ge,461:pe},{2:o,3:2030,4:l,5:f,6:u,7:p,8:h,9:b},{84:[1,2031]},n(Di,[2,560]),n(Di,[2,561]),n(Di,[2,563]),{79:Qr,84:[1,2032]},{408:[1,2033]},{2:o,3:2034,4:l,5:f,6:u,7:p,8:h,9:b,141:[1,2035]},{79:Ct,84:[1,2036]},n(Kt,[2,565]),n(or,[2,759],{79:n1}),n(or,[2,761]),n(Ve,[2,92]),n(Ve,[2,95]),n(q1,[2,1110],{3:1988,110:2037,113:2038,2:o,4:l,5:f,6:u,7:p,8:h,9:b,82:Br}),n(Kt,[2,549]),{2:o,3:270,4:l,5:f,6:u,7:p,8:h,9:b,208:2039},n(Ve,[2,568]),n(Ve,[2,569]),n(Kt,[2,564]),n(q1,[2,88]),n(q1,[2,1111]),n(Bn,[2,1196],{409:2040,411:2041,83:[1,2042]}),n(Kt,Ie,{412:1916,413:1917,410:2043,250:kt}),n(Bn,[2,1197]),{2:o,3:2006,4:l,5:f,6:u,7:p,8:h,9:b,141:Xr,406:2044},n(Kt,[2,550]),{79:Qr,84:[1,2045]},n(Bn,[2,551])],defaultActions:{113:[2,10],213:[2,356],214:[2,357],215:[2,358],216:[2,359],217:[2,360],218:[2,361],219:[2,362],220:[2,363],221:[2,364],222:[2,365],230:[2,739],638:[2,1219],700:[2,1180],701:[2,1181],764:[2,740],837:[2,366],838:[2,1128],839:[2,1129],999:[2,470],1e3:[2,471],1001:[2,472],1075:[2,741],1391:[2,1173],1421:[2,1229],1493:[2,742],1521:[2,1115],1593:[2,1227],1620:[2,355],1682:[2,1175],1704:[2,1185],1719:[2,538],1905:[2,1107],1974:[2,1195],1977:[2,1201],2015:[2,89]},parseError:function(ba,Jr){if(Jr.recoverable)this.trace(ba);else{var En=new Error(ba);throw En.hash=Jr,En}},parse:function(ba){var Jr=this,En=[0],A=[],us=[null],g=[],to=this.table,y="",Du=0,ed=0,js=0,S1=2,ul=1,td=g.slice.call(arguments,1),Fs=Object.create(this.lexer),fl={yy:{}};for(var Ru in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ru)&&(fl.yy[Ru]=this.yy[Ru]);Fs.setInput(ba,fl.yy),fl.yy.lexer=Fs,fl.yy.parser=this,typeof Fs.yylloc>"u"&&(Fs.yylloc={});var dl=Fs.yylloc;g.push(dl);var kh=Fs.options&&Fs.options.ranges;typeof fl.yy.parseError=="function"?this.parseError=fl.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Fh(z1){En.length=En.length-2*z1,us.length=us.length-z1,g.length=g.length-z1}for(var rd=function(){var z1;return z1=Fs.lex()||ul,typeof z1!="number"&&(z1=Jr.symbols_[z1]||z1),z1},Hi,i1,ql,hl,eO,_6,nd={},C0,Bu,Jg,L0;;){if(ql=En[En.length-1],this.defaultActions[ql]?hl=this.defaultActions[ql]:((Hi===null||typeof Hi>"u")&&(Hi=rd()),hl=to[ql]&&to[ql][Hi]),typeof hl>"u"||!hl.length||!hl[0]){var Mh,$h="",Kg=function(z1){for(var x6=En.length-1,Qg=0;;){if(S1.toString()in to[z1])return Qg;if(z1===0||x6<2)return!1;x6-=2,z1=En[x6],++Qg}};if(js)i1!==ul&&(Mh=Kg(ql));else{Mh=Kg(ql),L0=[];for(C0 in to[ql])this.terminals_[C0]&&C0>S1&&L0.push("'"+this.terminals_[C0]+"'");Fs.showPosition?$h="Parse error on line "+(Du+1)+`: +`+Fs.showPosition()+` +Expecting `+L0.join(", ")+", got '"+(this.terminals_[Hi]||Hi)+"'":$h="Parse error on line "+(Du+1)+": Unexpected "+(Hi==ul?"end of input":"'"+(this.terminals_[Hi]||Hi)+"'"),this.parseError($h,{text:Fs.match,token:this.terminals_[Hi]||Hi,line:Fs.yylineno,loc:dl,expected:L0,recoverable:Mh!==!1})}if(js==3){if(Hi===ul||i1===ul)throw new Error($h||"Parsing halted while starting to recover from another error.");ed=Fs.yyleng,y=Fs.yytext,Du=Fs.yylineno,dl=Fs.yylloc,Hi=rd()}if(Mh===!1)throw new Error($h||"Parsing halted. No suitable error recovery rule available.");Fh(Mh),i1=Hi==S1?null:Hi,Hi=S1,ql=En[En.length-1],hl=to[ql]&&to[ql][S1],js=3}if(hl[0]instanceof Array&&hl.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ql+", token: "+Hi);switch(hl[0]){case 1:En.push(Hi),us.push(Fs.yytext),g.push(Fs.yylloc),En.push(hl[1]),Hi=null,i1?(Hi=i1,i1=null):(ed=Fs.yyleng,y=Fs.yytext,Du=Fs.yylineno,dl=Fs.yylloc,js>0&&js--);break;case 2:if(Bu=this.productions_[hl[1]][1],nd.$=us[us.length-Bu],nd._$={first_line:g[g.length-(Bu||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(Bu||1)].first_column,last_column:g[g.length-1].last_column},kh&&(nd._$.range=[g[g.length-(Bu||1)].range[0],g[g.length-1].range[1]]),_6=this.performAction.apply(nd,[y,ed,Du,fl.yy,hl[1],us,g].concat(td)),typeof _6<"u")return _6;Bu&&(En=En.slice(0,-1*Bu*2),us=us.slice(0,-1*Bu),g=g.slice(0,-1*Bu)),En.push(this.productions_[hl[1]][0]),us.push(nd.$),g.push(nd._$),Jg=to[En[En.length-2]][En[En.length-1]],En.push(Jg);break;case 3:return!0}}return!0}},Ga=["A","ABSENT","ABSOLUTE","ACCORDING","ACTION","ADA","ADD","ADMIN","AFTER","ALWAYS","ASC","ASSERTION","ASSIGNMENT","ATTRIBUTE","ATTRIBUTES","BASE64","BEFORE","BERNOULLI","BLOCKED","BOM","BREADTH","C","CASCADE","CATALOG","CATALOG_NAME","CHAIN","CHARACTERISTICS","CHARACTERS","CHARACTER_SET_CATALOG","CHARACTER_SET_NAME","CHARACTER_SET_SCHEMA","CLASS_ORIGIN","CLOSE","COBOL","COLLATION","COLLATION_CATALOG","COLLATION_NAME","COLLATION_SCHEMA","COLUMNS","COLUMN_NAME","COMMAND_FUNCTION","COMMAND_FUNCTION_CODE","COMMITTED","CONDITION_NUMBER","CONNECTION","CONNECTION_NAME","CONSTRAINTS","CONSTRAINT_CATALOG","CONSTRAINT_NAME","CONSTRAINT_SCHEMA","CONSTRUCTOR","CONTENT","CONTINUE","CONTROL","CURSOR_NAME","DATA","DATETIME_INTERVAL_CODE","DATETIME_INTERVAL_PRECISION","DB","DEFAULTS","DEFERRABLE","DEFERRED","DEFINED","DEFINER","DEGREE","DELETED","DEPTH","DERIVED","DESC","DESCRIPTOR","DIAGNOSTICS","DISPATCH","DOCUMENT","DOMAIN","DYNAMIC_FUNCTION","DYNAMIC_FUNCTION_CODE","EMPTY","ENCODING","ENFORCED","EXCLUDE","EXCLUDING","EXPRESSION","FILE","FINAL","FIRST","FLAG","FOLLOWING","FORTRAN","FOUND","FS","G","GENERAL","GENERATED","GO","GOTO","GRANTED","HEX","HIERARCHY","ID","IGNORE","IMMEDIATE","IMMEDIATELY","IMPLEMENTATION","INCLUDING","INCREMENT","INDENT","INITIALLY","INPUT","INSERTED","INSTANCE","INSTANTIABLE","INSTEAD","INTEGRITY","INVOKER","ISOLATION","K","KEY","KEY_MEMBER","KEY_TYPE","LAST","LENGTH","LEVEL","LIBRARY","LIMIT","LINK","LOCATION","LOCATOR","M","MAP","MAPPING","MATCHED","MAXVALUE","MESSAGE_LENGTH","MESSAGE_OCTET_LENGTH","MESSAGE_TEXT","MINVALUE","MORE","MUMPS","NAME","NAMES","NAMESPACE","NESTING","NEXT","NFC","NFD","NFKC","NFKD","NIL","NORMALIZED","NULLABLE","NULLS","NUMBER","OBJECT","OCTETS","OFF","OPEN","OPTION","OPTIONS","ORDER","ORDERING","ORDINALITY","OTHERS","OUTPUT","OVERRIDING","P","PAD","PARAMETER_MODE","PARAMETER_NAME","PARAMETER_ORDINAL_POSITION","PARAMETER_SPECIFIC_CATALOG","PARAMETER_SPECIFIC_NAME","PARAMETER_SPECIFIC_SCHEMA","PARTIAL","PASCAL","PASSING","PASSTHROUGH","PATH","PERMISSION","PLACING","PLI","PRECEDING","PRESERVE","PRIOR","PRIVILEGES","PUBLIC","READ","RECOVERY","RELATIVE","REPEATABLE","REQUIRING","RESPECT","RESTART","RESTORE","RESTRICT","RETURNED_CARDINALITY","RETURNED_LENGTH","RETURNED_OCTET_LENGTH","RETURNED_SQLSTATE","RETURNING","ROLE","ROUTINE","ROUTINE_CATALOG","ROUTINE_NAME","ROUTINE_SCHEMA","ROW_COUNT","SCALE","SCHEMA","SCHEMA_NAME","SCOPE_CATALOG","SCOPE_NAME","SCOPE_SCHEMA","SECTION","SECURITY","SELECTIVE","SELF","SEPARATOR","SEQUENCE","SERIALIZABLE","SERVER","SERVER_NAME","SESSION","SETS","SIMPLE","SIZE","SOURCE","SPACE","SPECIFIC_NAME","STANDALONE","STATE","STATEMENT","STRIP","STRUCTURE","STYLE","SUBCLASS_ORIGIN","T","TABLE_NAME","TEMPORARY","TIES","TOKEN","TOP_LEVEL_COUNT","TRANSACTION","TRANSACTIONS_COMMITTED","TRANSACTIONS_ROLLED_BACK","TRANSACTION_ACTIVE","TRANSFORM","TRANSFORMS","TRIGGER_CATALOG","TRIGGER_NAME","TRIGGER_SCHEMA","TYPE","UNBOUNDED","UNCOMMITTED","UNDER","UNLINK","UNNAMED","UNTYPED","URI","USAGE","USER_DEFINED_TYPE_CATALOG","USER_DEFINED_TYPE_CODE","USER_DEFINED_TYPE_NAME","USER_DEFINED_TYPE_SCHEMA","VALID","VERSION","VIEW","WHITESPACE","WORK","WRAPPER","WRITE","XMLDECLARATION","XMLSCHEMA","YES","ZONE"];rs.parseError=function(ba,Jr){if(!(Jr.expected&&Jr.expected.indexOf("'LITERAL'")>-1&&/[a-zA-Z_][a-zA-Z_0-9]*/.test(Jr.token)&&Ga.indexOf(Jr.token)>-1))throw new SyntaxError(ba)};var bc=(function(){var ba={EOF:1,parseError:function(Jr,En){if(this.yy.parser)this.yy.parser.parseError(Jr,En);else throw new Error(Jr)},setInput:function(Jr,En){return this.yy=En||this.yy||{},this._input=Jr,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var Jr=this._input[0];this.yytext+=Jr,this.yyleng++,this.offset++,this.match+=Jr,this.matched+=Jr;var En=Jr.match(/(?:\r\n?|\n).*/g);return En?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Jr},unput:function(Jr){var En=Jr.length,A=Jr.split(/(?:\r\n?|\n)/g);this._input=Jr+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-En),this.offset-=En;var us=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var g=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===us.length?this.yylloc.first_column:0)+us[us.length-A.length].length-A[0].length:this.yylloc.first_column-En},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-En]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Jr){this.unput(this.match.slice(Jr))},pastInput:function(){var Jr=this.matched.substr(0,this.matched.length-this.match.length);return(Jr.length>20?"...":"")+Jr.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Jr=this.match;return Jr.length<20&&(Jr+=this._input.substr(0,20-Jr.length)),(Jr.substr(0,20)+(Jr.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Jr=this.pastInput(),En=new Array(Jr.length+1).join("-");return Jr+this.upcomingInput()+` +`+En+"^"},test_match:function(Jr,En){var A,us,g;if(this.options.backtrack_lexer&&(g={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(g.yylloc.range=this.yylloc.range.slice(0))),us=Jr[0].match(/(?:\r\n?|\n).*/g),us&&(this.yylineno+=us.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:us?us[us.length-1].length-us[us.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Jr[0].length},this.yytext+=Jr[0],this.match+=Jr[0],this.matches=Jr,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Jr[0].length),this.matched+=Jr[0],A=this.performAction.call(this,this.yy,this,En,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var to in g)this[to]=g[to];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Jr,En,A,us;this._more||(this.yytext="",this.match="");for(var g=this._currentRules(),to=0;toEn[0].length)){if(En=A,us=to,this.options.backtrack_lexer){if(Jr=this.test_match(A,g[to]),Jr!==!1)return Jr;if(this._backtrack){En=!1;continue}else return!1}else if(!this.options.flex)break}return En?(Jr=this.test_match(En,g[us]),Jr!==!1?Jr:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Jr=this.next();return Jr||this.lex()},begin:function(Jr){this.conditionStack.push(Jr)},popState:function(){var Jr=this.conditionStack.length-1;return Jr>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Jr){return Jr=this.conditionStack.length-1-Math.abs(Jr||0),Jr>=0?this.conditionStack[Jr]:"INITIAL"},pushState:function(Jr){this.begin(Jr)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(Jr,En,A,us){var g=us;switch(A){case 0:return 294;case 1:return 335;case 2:return 457;case 3:return 332;case 4:return 5;case 5:return 5;case 6:return 329;case 7:return 329;case 8:return 141;case 9:return 141;case 10:return;case 11:break;case 12:return 349;case 13:return 352;case 14:return En.yytext="VALUE",96;case 15:return En.yytext="VALUE",198;case 16:return En.yytext="ROW",198;case 17:return En.yytext="COLUMN",198;case 18:return En.yytext="MATRIX",198;case 19:return En.yytext="INDEX",198;case 20:return En.yytext="RECORDSET",198;case 21:return En.yytext="TEXT",198;case 22:return En.yytext="SELECT",198;case 23:return 558;case 24:return 418;case 25:return 439;case 26:return 553;case 27:return 319;case 28:return 297;case 29:return 297;case 30:return 173;case 31:return 437;case 32:return 179;case 33:return 249;case 34:return 175;case 35:return 216;case 36:return 320;case 37:return 82;case 38:return 455;case 39:return 268;case 40:return 441;case 41:return 391;case 42:return 318;case 43:return 552;case 44:return 475;case 45:return 363;case 46:return 480;case 47:return 364;case 48:return 348;case 49:return 128;case 50:return 121;case 51:return 348;case 52:return 121;case 53:return 348;case 54:return 121;case 55:return 348;case 56:return 546;case 57:return 336;case 58:return 415;case 59:return 299;case 60:return 403;case 61:return 139;case 62:return 8;case 63:return 269;case 64:return 199;case 65:return 199;case 66:return 472;case 67:return 402;case 68:return 509;case 69:return 478;case 70:return 301;case 71:return 262;case 72:return 315;case 73:return 295;case 74:return 215;case 75:return 256;case 76:return 292;case 77:return 293;case 78:return 293;case 79:return"CURSOR";case 80:return 442;case 81:return 323;case 82:return 324;case 83:return 325;case 84:return 488;case 85:return 378;case 86:return 372;case 87:return 281;case 88:return 268;case 89:return 443;case 90:return 194;case 91:return 433;case 92:return 487;case 93:return 144;case 94:return 339;case 95:return 426;case 96:return 343;case 97:return 347;case 98:return 178;case 99:return 546;case 100:return 546;case 101:return 331;case 102:return 18;case 103:return 328;case 104:return 275;case 105:return 266;case 106:return 105;case 107:return 407;case 108:return 192;case 109:return 247;case 110:return 296;case 111:return 346;case 112:return 639;case 113:return 511;case 114:return 252;case 115:return 304;case 116:return 258;case 117:return 259;case 118:return 165;case 119:return 391;case 120:return 377;case 121:return 365;case 122:return 109;case 123:return 202;case 124:return 223;case 125:return 244;case 126:return 554;case 127:return 373;case 128:return 229;case 129:return 177;case 130:return 326;case 131:return 207;case 132:return 479;case 133:return 243;case 134:return 6;case 135:return 267;case 136:return"LET";case 137:return 481;case 138:return 245;case 139:return 121;case 140:return 271;case 141:return 499;case 142:return 200;case 143:return 317;case 144:return 427;case 145:return 316;case 146:return 492;case 147:return 178;case 148:return 440;case 149:return 242;case 150:return 681;case 151:return 298;case 152:return 270;case 153:return 417;case 154:return 163;case 155:return 330;case 156:return 265;case 157:return 471;case 158:return 250;case 159:return 452;case 160:return 138;case 161:return 273;case 162:return 7;case 163:return 453;case 164:return 180;case 165:return 127;case 166:return 217;case 167:return 503;case 168:return 307;case 169:return 181;case 170:return 311;case 171:return 799;case 172:return 103;case 173:return 20;case 174:return 404;case 175:return 482;case 176:return 713;case 177:return 19;case 178:return 451;case 179:return 203;case 180:return"REDUCE";case 181:return 81;case 182:return 408;case 183:return 344;case 184:return 555;case 185:return 717;case 186:return 116;case 187:return 438;case 188:return 184;case 189:return 322;case 190:return 416;case 191:return 483;case 192:return 722;case 193:return 182;case 194:return 182;case 195:return 246;case 196:return 474;case 197:return 255;case 198:return 159;case 199:return 800;case 200:return 442;case 201:return 96;case 202:return 248;case 203:return 9;case 204:return 155;case 205:return 155;case 206:return 446;case 207:return 367;case 208:return 454;case 209:return"STRATEGY";case 210:return"STORE";case 211:return 313;case 212:return 314;case 213:return 388;case 214:return 388;case 215:return 502;case 216:return 392;case 217:return 392;case 218:return 201;case 219:return 342;case 220:return"TIMEOUT";case 221:return 157;case 222:return 204;case 223:return 473;case 224:return 473;case 225:return 547;case 226:return 327;case 227:return 491;case 228:return 171;case 229:return 196;case 230:return 108;case 231:return 368;case 232:return 445;case 233:return 251;case 234:return 158;case 235:return 379;case 236:return 143;case 237:return 447;case 238:return 341;case 239:return 137;case 240:return 477;case 241:return 77;case 242:return 473;case 243:return 4;case 244:return 140;case 245:return 124;case 246:return 146;case 247:return 188;case 248:return 350;case 249:return 189;case 250:return 142;case 251:return 147;case 252:return 359;case 253:return 356;case 254:return 358;case 255:return 355;case 256:return 353;case 257:return 351;case 258:return 352;case 259:return 151;case 260:return 150;case 261:return 148;case 262:return 354;case 263:return 357;case 264:return 149;case 265:return 133;case 266:return 357;case 267:return 83;case 268:return 84;case 269:return 461;case 270:return 463;case 271:return 333;case 272:return 466;case 273:return 545;case 274:return 131;case 275:return 125;case 276:return 79;case 277:return 366;case 278:return 161;case 279:return 798;case 280:return 152;case 281:return 190;case 282:return 145;case 283:return 132;case 284:return 345;case 285:return 154;case 286:return 14;case 287:return"INVALID"}},rules:[/^(?:``([^\`])+``)/i,/^(?:\[\?\])/i,/^(?:@\[)/i,/^(?:ARRAY\[)/i,/^(?:\[([^\]'])*?\])/i,/^(?:`([^\`'])*?`)/i,/^(?:N(['](\\.|[^']|\\')*?['])+)/i,/^(?:X(['](\\.|[^']|\\')*?['])+)/i,/^(?:(['](\\.|[^']|\\')*?['])+)/i,/^(?:(["](\\.|[^"]|\\")*?["])+)/i,/^(?:--(.*?)($|\r\n|\r|\n))/i,/^(?:\s+)/i,/^(?:\|\|)/i,/^(?:\|)/i,/^(?:VALUE\s+OF\s+SEARCH\b)/i,/^(?:VALUE\s+OF\s+SELECT\b)/i,/^(?:ROW\s+OF\s+SELECT\b)/i,/^(?:COLUMN\s+OF\s+SELECT\b)/i,/^(?:MATRIX\s+OF\s+SELECT\b)/i,/^(?:INDEX\s+OF\s+SELECT\b)/i,/^(?:RECORDSET\s+OF\s+SELECT\b)/i,/^(?:TEXT\s+OF\s+SELECT\b)/i,/^(?:SELECT\b)/i,/^(?:ABSOLUTE\b)/i,/^(?:ACTION\b)/i,/^(?:ADD\b)/i,/^(?:AFTER\b)/i,/^(?:AGGR\b)/i,/^(?:AGGREGATE\b)/i,/^(?:AGGREGATOR\b)/i,/^(?:ALL\b)/i,/^(?:ALTER\b)/i,/^(?:AND\b)/i,/^(?:ANTI\b)/i,/^(?:ANY\b)/i,/^(?:APPLY\b)/i,/^(?:ARRAY\b)/i,/^(?:AS\b)/i,/^(?:ASSERT\b)/i,/^(?:ASC\b)/i,/^(?:ATTACH\b)/i,/^(?:AUTO(_)?INCREMENT\b)/i,/^(?:AVG\b)/i,/^(?:BEFORE\b)/i,/^(?:BEGIN\b)/i,/^(?:BETWEEN\b)/i,/^(?:BREAK\b)/i,/^(?:NOT\s+BETWEEN\b)/i,/^(?:NOT\s+LIKE\b)/i,/^(?:BY\b)/i,/^(?:~~\*)/i,/^(?:!~~\*)/i,/^(?:~~)/i,/^(?:!~~)/i,/^(?:ILIKE\b)/i,/^(?:NOT\s+ILIKE\b)/i,/^(?:CALL\b)/i,/^(?:CASE\b)/i,/^(?:CASCADE\b)/i,/^(?:CAST\b)/i,/^(?:CHECK\b)/i,/^(?:CLASS\b)/i,/^(?:CLOSE\b)/i,/^(?:COLLATE\b)/i,/^(?:COLUMN\b)/i,/^(?:COLUMNS\b)/i,/^(?:COMMIT\b)/i,/^(?:CONSTRAINT\b)/i,/^(?:CONTENT\b)/i,/^(?:CONTINUE\b)/i,/^(?:CONVERT\b)/i,/^(?:CORRESPONDING\b)/i,/^(?:COUNT\b)/i,/^(?:CREATE\b)/i,/^(?:CROSS\b)/i,/^(?:CUBE\b)/i,/^(?:CURRENT_TIMESTAMP\b)/i,/^(?:CURRENT_DATE\b)/i,/^(?:CURDATE\b)/i,/^(?:CURSOR\b)/i,/^(?:DATABASE(S)?)/i,/^(?:DATEADD\b)/i,/^(?:DATEDIFF\b)/i,/^(?:TIMESTAMPDIFF\b)/i,/^(?:DECLARE\b)/i,/^(?:DEFAULT\b)/i,/^(?:DELETE\b)/i,/^(?:DELETED\b)/i,/^(?:DESC\b)/i,/^(?:DETACH\b)/i,/^(?:DISTINCT\b)/i,/^(?:DROP\b)/i,/^(?:ECHO\b)/i,/^(?:EDGE\b)/i,/^(?:END\b)/i,/^(?:ENUM\b)/i,/^(?:ELSE\b)/i,/^(?:ESCAPE\b)/i,/^(?:EXCEPT\b)/i,/^(?:EXEC\b)/i,/^(?:EXECUTE\b)/i,/^(?:EXISTS\b)/i,/^(?:EXPLAIN\b)/i,/^(?:FALSE\b)/i,/^(?:FETCH\b)/i,/^(?:FIRST\b)/i,/^(?:FOR\b)/i,/^(?:FOREIGN\b)/i,/^(?:FROM\b)/i,/^(?:FULL\b)/i,/^(?:FUNCTION\b)/i,/^(?:GLOB\b)/i,/^(?:GO\b)/i,/^(?:GRAPH\b)/i,/^(?:GROUP\b)/i,/^(?:GROUP_CONCAT\b)/i,/^(?:GROUPING\b)/i,/^(?:HAVING\b)/i,/^(?:IF\b)/i,/^(?:IDENTITY\b)/i,/^(?:IGNORE\b)/i,/^(?:IS\b)/i,/^(?:IN\b)/i,/^(?:INDEX\b)/i,/^(?:INDEXED\b)/i,/^(?:INNER\b)/i,/^(?:INSTEAD\b)/i,/^(?:INSERT\b)/i,/^(?:INSERTED\b)/i,/^(?:INTERSECT\b)/i,/^(?:INTERVAL\b)/i,/^(?:INTO\b)/i,/^(?:ITERATE\b)/i,/^(?:JOIN\b)/i,/^(?:KEY\b)/i,/^(?:LAST\b)/i,/^(?:LET\b)/i,/^(?:LEAVE\b)/i,/^(?:LEFT\b)/i,/^(?:LIKE\b)/i,/^(?:LIMIT\b)/i,/^(?:MATCHED\b)/i,/^(?:MATRIX\b)/i,/^(?:MAX\s*(?=\())/i,/^(?:MAX\s*(?=(,|\))))/i,/^(?:MIN\s*(?=\())/i,/^(?:MERGE\b)/i,/^(?:MINUS\b)/i,/^(?:MODIFY\b)/i,/^(?:NATURAL\b)/i,/^(?:NEXT\b)/i,/^(?:NEW\b)/i,/^(?:NOCASE\b)/i,/^(?:NO\b)/i,/^(?:NOT\b)/i,/^(?:NULL\b)/i,/^(?:NULLS\b)/i,/^(?:OFF\b)/i,/^(?:ON\b)/i,/^(?:ONLY\b)/i,/^(?:OF\b)/i,/^(?:OFFSET\b)/i,/^(?:OPEN\b)/i,/^(?:OPTION\b)/i,/^(?:OR\b)/i,/^(?:ORDER\b)/i,/^(?:OUTER\b)/i,/^(?:OUTPUT\b)/i,/^(?:OVER\b)/i,/^(?:PATH\b)/i,/^(?:PARTITION\b)/i,/^(?:PERCENT\b)/i,/^(?:PIVOT\b)/i,/^(?:PLAN\b)/i,/^(?:PRIMARY\b)/i,/^(?:PRINT\b)/i,/^(?:PRIOR\b)/i,/^(?:QUERY\b)/i,/^(?:READ\b)/i,/^(?:RECORDSET\b)/i,/^(?:REDUCE\b)/i,/^(?:RECURSIVE\b)/i,/^(?:REFERENCES\b)/i,/^(?:REGEXP\b)/i,/^(?:REINDEX\b)/i,/^(?:RELATIVE\b)/i,/^(?:REMOVE\b)/i,/^(?:RENAME\b)/i,/^(?:REPEAT\b)/i,/^(?:REPLACE\b)/i,/^(?:RESTRICT\b)/i,/^(?:REQUIRE\b)/i,/^(?:RESTORE\b)/i,/^(?:RETURN\b)/i,/^(?:RETURNS\b)/i,/^(?:RIGHT\b)/i,/^(?:ROLLBACK\b)/i,/^(?:ROLLUP\b)/i,/^(?:ROW\b)/i,/^(?:ROWS\b)/i,/^(?:SCHEMA(S)?)/i,/^(?:SEARCH\b)/i,/^(?:SEMI\b)/i,/^(?:SEPARATOR\b)/i,/^(?:SET\b)/i,/^(?:SETS\b)/i,/^(?:SHOW\b)/i,/^(?:SOME\b)/i,/^(?:SOURCE\b)/i,/^(?:STRATEGY\b)/i,/^(?:STORE\b)/i,/^(?:SUM\b)/i,/^(?:TOTAL\b)/i,/^(?:TABLE\b)/i,/^(?:TABLES\b)/i,/^(?:TARGET\b)/i,/^(?:TEMP\b)/i,/^(?:TEMPORARY\b)/i,/^(?:TEXTSTRING\b)/i,/^(?:THEN\b)/i,/^(?:TIMEOUT\b)/i,/^(?:TO\b)/i,/^(?:TOP\b)/i,/^(?:TRAN\b)/i,/^(?:TRANSACTION\b)/i,/^(?:TRIGGER\b)/i,/^(?:TRUE\b)/i,/^(?:TRUNCATE\b)/i,/^(?:UNION\b)/i,/^(?:UNIQUE\b)/i,/^(?:UNPIVOT\b)/i,/^(?:UPDATE\b)/i,/^(?:USE\b)/i,/^(?:USING\b)/i,/^(?:VALUE\b)/i,/^(?:VALUES\b)/i,/^(?:VERTEX\b)/i,/^(?:VIEW\b)/i,/^(?:WHEN\b)/i,/^(?:WHERE\b)/i,/^(?:WHILE\b)/i,/^(?:WITH\b)/i,/^(?:WORK\b)/i,/^(?:[0-9]*[a-zA-Z_]+[a-zA-Z_0-9]*)/i,/^(?:(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?(?![a-zA-Z_0-9]))/i,/^(?:->)/i,/^(?:#)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\*)/i,/^(?:\/)/i,/^(?:%)/i,/^(?:!===)/i,/^(?:===)/i,/^(?:!==)/i,/^(?:==)/i,/^(?:>=)/i,/^(?:&)/i,/^(?:\|)/i,/^(?:<<)/i,/^(?:>>)/i,/^(?:>)/i,/^(?:<=)/i,/^(?:<>)/i,/^(?:<)/i,/^(?:=)/i,/^(?:!=)/i,/^(?:\()/i,/^(?:\))/i,/^(?:\{)/i,/^(?:\})/i,/^(?:\])/i,/^(?::-)/i,/^(?:\?-)/i,/^(?:\.\.)/i,/^(?:\.)/i,/^(?:,)/i,/^(?:::)/i,/^(?::)/i,/^(?:;)/i,/^(?:\$)/i,/^(?:\?)/i,/^(?:!)/i,/^(?:\^)/i,/^(?:~)/i,/^(?:@)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287],inclusive:!0}}};return ba})();rs.lexer=bc;function cl(){this.yy={}}return cl.prototype=rs,rs.Parser=cl,new cl})();typeof e<"u"&&typeof mu<"u"&&(mu.parser=i,mu.Parser=i.Parser,mu.parse=function(){return i.parse.apply(i,arguments)},mu.main=function(n){n[1]||(console.log("Usage: "+n[0]+" FILE"),process.exit(1));var c=e("fs").readFileSync(e("path").normalize(n[1]),"utf8");return mu.parser.parse(c)},typeof $3<"u"&&e.main===$3&&mu.main(process.argv.slice(1))),t.prettyflag=!1,t.pretty=function(n,c){var o=t.prettyflag;t.prettyflag=!c;var l=t.parse(n).toString();return t.prettyflag=o,l};var s=t.utils={};function a(n){return"(y="+n+",y===y?y:undefined)"}var d=a;function m(n,c){return"(y="+n+',typeof y=="undefined"?undefined:'+c+")"}var v=m;function _(){return!0}function x(){}var w=s.escapeq=function(n){return(""+n).replace(/["'\\\n\r\u2028\u2029]/g,function(c){switch(c){case'"':case"'":case"\\":return"\\"+c;case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029"}})},I=s.undoubleq=function(n){return n.replace(/(\')/g,"''")},O=s.doubleq=function(n){return n.replace(/(\'\')/g,"\\'")},z=s.doubleqq=function(n){return n.replace(/'/g,"\\'")},J=function(n){return n[0]==="\uFEFF"&&(n=n.substr(1)),n};s.global=(function(){return typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Function("return this")()})();var Q=s.isNativeFunction=function(n){return typeof n=="function"&&!!~n.toString().indexOf("[native code]")};s.isWebWorker=(function(){try{var n=s.global.importScripts;return s.isNativeFunction(n)}catch{return!1}})(),s.isNode=(function(){try{return!(typeof process>"u"||!process.versions||!process.versions.node)}catch{return!1}})(),s.isBrowser=(function(){try{return s.isNativeFunction(s.global.location.reload)}catch{return!1}})(),s.isBrowserify=(function(){return s.isBrowser&&typeof process<"u"&&process.browser})(),s.isRequireJS=(function(){return s.isBrowser&&typeof e=="function"&&typeof e.specified=="function"})(),s.isMeteor=(function(){return typeof Meteor<"u"&&Meteor.release})(),s.isMeteorClient=s.isMeteorClient=(function(){return s.isMeteor&&Meteor.isClient})(),s.isMeteorServer=(function(){return s.isMeteor&&Meteor.isServer})(),s.isCordova=(function(){return typeof cordova=="object"})(),s.isReactNative=(function(){var n=!1;return n})(),s.hasIndexedDB=(function(){return!!s.global.indexedDB})(),s.isArray=function(n){return Object.prototype.toString.call(n)==="[object Array]"};let oe=/^[a-z]+:\/\//i,se=s.loadFile=function(n,c,o,l){var f,u;if(!(s.isNode||s.isMeteorServer)){if(s.isCordova){s.global.requestFileSystem(LocalFileSystem.PERSISTENT,0,function(U){U.root.getFile(n,{create:!1},function(R){R.file(function(L){var T=new FileReader;T.onloadend=function(C){o(J(this.result))},T.readAsText(L)})})});return}if(typeof n=="string"){if(n.substr(0,1)==="#"&&typeof document<"u"){f=document.querySelector(n).textContent,o(f);return}q(n,U=>o(J(U)),l,c);return}if(n instanceof Event){var p=n.target.files,h=new FileReader,b=p[0].name;h.onload=function(U){var R=U.target.result;o(J(R))},h.readAsText(p[0])}q(n,U=>o(J(U)),l,c)}},re=typeof fetch<"u"?fetch:null;async function q(n,c,o,l){return l?ue(n,c,o):await ue(n,c,o)}function ue(n,c,o){return re(n).then(l=>l.text()).then(l=>{c(l)}).catch(l=>{if(o)return o(l);throw console.error(l),l})}function K(n,c,o){return re(n).then(l=>l.arrayBuffer()).then(l=>{var f=new Uint8Array(l),u=[...f].map(p=>String.fromCharCode(p)).join("");c(u)}).catch(l=>{if(o)return o(l);throw console.error(l),l})}var B=s.loadBinaryFile=function(n,c,o,l=f=>{throw f}){var f;if(!(s.isNode||s.isMeteorServer))if(typeof n=="string"){var u=new XMLHttpRequest;u.open("GET",n,c),u.responseType="arraybuffer",u.onload=function(){for(var U=new Uint8Array(u.response),R=[],L=0;L701){let l=((n-26)/676|0)-1;c=String.fromCharCode(65+l%26),n=n%676}var o=String.fromCharCode(65+n%26);return n>=26&&(n=(n/26|0)-1,o=String.fromCharCode(65+n%26)+o,n>26&&(n=(n/26|0)-1,o=String.fromCharCode(65+n%26)+o)),c+o},Ha=s.xlscn=function(n){var c=n.charCodeAt(0)-65;return n.length>1&&(c=(c+1)*26+n.charCodeAt(1)-65,n.length>2&&(c=(c+1)*26+n.charCodeAt(2)-65)),c},ar=s.domEmptyChildren=function(n){for(var c=n.childNodes.length;c--;)n.removeChild(n.lastChild)},Ki={},zs=s.like=function(n,c,o=""){if(!Ki[n]){for(var l="^",f=0;f-1?l+="\\"+u:l+=u,f++}l+="$",Ki[n]=RegExp(l,"i")}return(""+(c??"")).search(Ki[n])>-1};s.glob=function(n,c){for(var o=0,l="^";o-1?l+="\\"+f:l+=f,o++}return l+="$",(""+(n||"")).toUpperCase().search(RegExp(l.toUpperCase()))>-1},s.findAlaSQLPath=function(){if(s.isWebWorker)return"";if(s.isMeteorClient)return"/packages/dist/";if(s.isMeteorServer)return"assets/packages/dist/";if(s.isNode)return r;if(s.isBrowser)for(var n=document.getElementsByTagName("script"),c=0;c0&&n==+n?+n:n;if(so.str.test(c))return String(n);if(so.int.test(c)){var o=parseInt(n,10);return isNaN(o)?n:o}if(so.num.test(c)){var l=parseFloat(n);return isNaN(l)?n:l}return so.bool.test(c)?typeof n=="string"?/^(true|1|yes)$/i.test(n):!!n:so.date.test(c)?n instanceof Date?n:new Date(n):n},t.path=t.utils.findAlaSQLPath(),t.utils.uncomment=function(n){n=("__"+n+"__").split("");for(var c=!1,o,l=!1,f=!1,u=0,p=n.length;ut.MAXSQLCACHESIZE&&u.resetSqlCache(),u.sqlCacheSize++,u.sqlCache[p]=U);var h=t.res=U(o,l,f);return wn(U),h}t.precompile(b.statements[0],t.useid,o);var h=t.res=b.statements[0].execute(n,o,l,f);return h}if(l){t.adrun(n,b,o,l,f);return}return t.drun(n,b,o,l,f)}},t.drun=function(n,c,o,l,f){var u=t.useid;u!==n&&t.use(n);for(var p=[],h=0,b=c.statements.length;h{var o=c.resolve([]);return n.forEach(l=>{o=o.then(f=>wi(l.sql,l.params,l.i,l.length).then(u=>[...f,u]))}),o};var fi=function(n){if(!(n.length<1)){for(var c,o,l,f=[],u=0;u"u")throw new Error("Please include a Promise/A+ library");if(typeof n=="string")return wi(n,c);if(!s.isArray(n)||n.length<1||typeof c<"u")throw new Error("Error in .promise parameters");return fi(n)};var Si=t.Database=function(n){var c=this;if(c===t)if(n){if(c=t.databases[n],t.databases[n]=c,!c)throw new Error(`Database ${n} not found`)}else c=t.databases.alasql,t.options.tsql&&(t.databases.tempdb=t.databases.alasql);return n||(n="db"+t.databasenum++),c.databaseid=n,t.databases[n]=c,c.dbversion=0,c.tables={},c.views={},c.triggers={},c.indices={},c.objects={},c.counter=0,c.resetSqlCache(),c};Si.prototype.resetSqlCache=function(){this.sqlCache={},this.sqlCacheSize=0,this.astCache={}},Si.prototype.exec=function(n,c,o){return t.dexec(this.databaseid,n,c,o)},Si.prototype.autoval=function(n,c,o){return t.autoval(n,c,o,this.databaseid)},Si.prototype.transaction=function(n){var c=new t.Transaction(this.databaseid),o=n(c);return o};class qi{transactionid=Date.now();committed=!1;bank;constructor(c){this.databaseid=c,this.dbversion=t.databases[c].dbversion,this.bank=JSON.stringify(t.databases[c])}commit(){this.committed=!0,t.databases[this.databaseid].dbversion=Date.now(),delete this.bank}rollback(){if(!this.committed)t.databases[this.databaseid]=JSON.parse(this.bank),delete this.bank;else throw new Error("Transaction already commited")}exec(c,o,l){return t.dexec(this.databaseid,c,o,l)}}qi.prototype.executeSQL=qi.prototype.exec,t.Transaction=qi;var Do=t.Table=function(n){this.data=[],this.columns=[],this.xcolumns={},this.inddefs={},this.indices={},this.uniqs={},this.uniqdefs={},this.identities={},this.checks=[],this.checkfns=[],this.beforeinsert={},this.afterinsert={},this.insteadofinsert={},this.beforedelete={},this.afterdelete={},this.insteadofdelete={},this.beforeupdate={},this.afterupdate={},this.insteadofupdate={},Object.assign(this,n)};Do.prototype.indexColumns=function(){var n=this;n.xcolumns={},n.columns.forEach(function(c){n.xcolumns[c.columnid]=c})};class el{constructor(c){this.columns=[],this.xcolumns={},this.query=[],Object.assign(this,c)}}t.View=el;class ${constructor(c){this.alasql=t,this.columns=[],this.xcolumns={},this.selectGroup=[],this.groupColumns={},Object.assign(this,c)}}class m1{constructor(c){Object.assign(this,c)}}t.Recordset=m1,t.Query=$;class Xo{constructor(c){Object.assign(this,c)}toString(){}toType(){}toJS(){}exec(){}compile(){}}var V={extend:Object.assign,casesensitive:t.options.casesensitive,Base:Xo,compileParamValue:function(n,c,o,l,f,u){return function(p,h){var b=p[n];if(!Array.isArray(b)){var U=new Error(c+" requires an array for parameter "+n);if(h)return h(null,U);throw U}var R="__p"+n+"_"+Date.now(),L=t.databases[l||"alasql"];L.tables[R]=new t.Table({tableid:R}),L.tables[R].data=b;try{var T=f[u];f[u]=new V.Table({tableid:R,databaseid:L.databaseid});var C=f.compile(l);f[u]=T;var te=C(p,h);if(o){var W=L.tables[R].data;b.length=0,Array.prototype.push.apply(b,W)}return te}catch(Y){if(h)return h(null,Y);throw Y}finally{delete L.tables[R]}}}};i.yy=t.yy=V,V.Statements=class{constructor(n){Object.assign(this,n)}toString(){return this.statements.map(n=>n.toString()).join("; ")}compile(n){let c=this.statements.map(o=>o.compile(n));return c.length===1?c[0]:(o,l)=>{let f=c.map(u=>u(o));return l&&l(f),f}}},V.Search=class{constructor(n){Object.assign(this,n)}toString(){let n="SEARCH ";return this.selectors&&(n+=this.selectors.toString()),this.from&&(n+="FROM "+this.from.toString()),n}toJS(n){return`this.queriesfn[${this.queriesidx-1}](this.params,null,${n})`}compile(n){var c=n,o=(l,f)=>{var u;return this.#e(c,l,function(p){u=ra(o.query,p),f&&(u=f(u))}),u};return o.query={},o}#e(n,c,o){var l,f={},u,p=mn(this.selectors);function h(C,te,W){var Y,F,Vn,N=C[te],Ae=t.options.loopbreak||1e5;if(N.selid){if(N.selid==="PATH"){for(var je=[{node:W,stack:[]}],Ot={},Oe=t.databases[t.useid].objects;je.length>0;){var Te=je.shift(),ht=Te.node,Tt=Te.stack,Vn=h(N.args,0,ht);if(Vn.length>0){if(te+1+1>C.length)return Tt;var $t=[];return Tt&&Tt.length>0&&Tt.forEach(function(Cn){$t=$t.concat(h(C,te+1,Cn))}),$t}else{if(typeof Ot[ht.$id]<"u")continue;Ot[ht.$id]=!0,ht.$out&&ht.$out.length>0&&ht.$out.forEach(function(Cn){var oi=Oe[Cn],ms=Tt.concat(oi);ms.push(Oe[oi.$out[0]]),je.push({node:Oe[oi.$out[0]],stack:ms})})}}return[]}if(N.selid==="NOT"){var F=h(N.args,0,W);return F.length>0?[]:te+1+1>C.length?[W]:h(C,te+1,W)}else if(N.selid==="DISTINCT"){var F;if(typeof N.args>"u"||N.args.length===0?F=Wt(W):F=h(N.args,0,W),F.length===0)return[];var ni=Wt(F);return te+1+1>C.length?ni:h(C,te+1,ni)}else if(N.selid==="AND"){var ni=!0;return N.args.forEach(function(Cn){ni=ni&&h(Cn,0,W).length>0}),ni?te+1+1>C.length?[W]:h(C,te+1,W):[]}else if(N.selid==="OR"){var ni=!1;return N.args.forEach(function(Cn){ni=ni||h(Cn,0,W).length>0}),ni?te+1+1>C.length?[W]:h(C,te+1,W):[]}else if(N.selid==="ALL"){var F=h(N.args[0],0,W);return F.length===0?[]:te+1+1>C.length?F:h(C,te+1,F)}else if(N.selid==="ANY"){var F=h(N.args[0],0,W);return F.length===0?[]:te+1+1>C.length?[F[0]]:h(C,te+1,[F[0]])}else if(N.selid==="UNIONALL"){var F=[];return N.args.forEach(function(Cn){F=F.concat(h(Cn,0,W))}),F.length===0?[]:te+1+1>C.length?F:h(C,te+1,F)}else if(N.selid==="UNION"){var F=[];N.args.forEach(function(Cn){F=F.concat(h(Cn,0,W))});var F=Wt(F);return F.length===0?[]:te+1+1>C.length?F:h(C,te+1,F)}else if(N.selid==="IF"){var F=h(N.args,0,W);return F.length===0?[]:te+1+1>C.length?[W]:h(C,te+1,W)}else if(N.selid==="REPEAT"){var yr,le,mr=N.args[0].value;N.args[1]?le=N.args[1].value:le=mr,N.args[2]&&(yr=N.args[2].variable);var Vt=[];if(mr===0&&(te+1+1>C.length?Vt=[W]:(yr&&(t.vars[yr]=0),Vt=Vt.concat(h(C,te+1,W)))),le>0)for(var Bt=[{value:W,lvl:1}],Zr=0;Bt.length>0;){var F=Bt[0];if(Bt.shift(),F.lvl<=le){yr&&(t.vars[yr]=F.lvl);var Un=h(N.sels,0,F.value);Un.forEach(function(Cn){Bt.push({value:Cn,lvl:F.lvl+1})}),F.lvl>=mr&&(te+1+1>C.length?Vt=Vt.concat(Un):Un.forEach(function(Cn){Vt=Vt.concat(h(C,te+1,Cn))}))}if(Zr++,Zr>Ae)throw new Error("Infinite loop brake. Number of iterations = "+Zr)}return Vt}else if(N.selid==="OF"){if(te+1+1>C.length)return[W];var $i=[];return Object.keys(W).forEach(function(Ds){t.vars[N.args[0].variable]=Ds,$i=$i.concat(h(C,te+1,W[Ds]))}),$i}else if(N.selid==="TO"){var Bi=t.vars[N.args[0]],Yn=[];if(Bi!==void 0?Yn=Bi.slice(0):Yn=[],Yn.push(W),te+1+1>C.length)return[W];t.vars[N.args[0]]=Yn;var $i=h(C,te+1,W);return t.vars[N.args[0]]=Bi,$i}else if(N.selid==="ARRAY"){var F=h(N.args,0,W);if(F.length>0)Y=F;else return[];return te+1+1>C.length?[Y]:h(C,te+1,Y)}else if(N.selid==="SUM"){var F=h(N.args,0,W);if(F.length>0)var Y=F.reduce(function(oi,ms){return oi+ms},0);else return[];return te+1+1>C.length?[Y]:h(C,te+1,Y)}else if(N.selid==="AVG"){if(F=h(N.args,0,W),F.length>0)Y=F.reduce(function(Ds,Cn){return Ds+Cn},0)/F.length;else return[];return te+1+1>C.length?[Y]:h(C,te+1,Y)}else if(N.selid==="COUNT"){if(F=h(N.args,0,W),F.length>0)Y=F.length;else return[];return te+1+1>C.length?[Y]:h(C,te+1,Y)}else if(N.selid==="FIRST"){if(F=h(N.args,0,W),F.length>0)Y=F[0];else return[];return te+1+1>C.length?[Y]:h(C,te+1,Y)}else if(N.selid==="LAST"){if(F=h(N.args,0,W),F.length>0)Y=F[F.length-1];else return[];return te+1+1>C.length?[Y]:h(C,te+1,Y)}else if(N.selid==="MIN"){if(F=h(N.args,0,W),F.length===0)return[];var Y=F.reduce(function(Cn,oi){return Math.min(Cn,oi)},1/0);return te+1+1>C.length?[Y]:h(C,te+1,Y)}else if(N.selid==="MAX"){var F=h(N.args,0,W);if(F.length===0)return[];var Y=F.reduce(function(oi,ms){return Math.max(oi,ms)},-1/0);return te+1+1>C.length?[Y]:h(C,te+1,Y)}else if(N.selid==="PLUS"){var Vt=[],Bt=h(N.args,0,W).slice();te+1+1>C.length?Vt=Vt.concat(Bt):Bt.forEach(function(oi){Vt=Vt.concat(h(C,te+1,oi))});for(var Zr=0;Bt.length>0;){var F=Bt.shift();if(F=h(N.args,0,F),Bt=Bt.concat(F),te+1+1>C.length?Vt=Vt.concat(F):F.forEach(function(gs){var To=h(C,te+1,gs);Vt=Vt.concat(To)}),Zr++,Zr>Ae)throw new Error("Infinite loop brake. Number of iterations = "+Zr)}return Vt}else if(N.selid==="STAR"){var Vt=[];Vt=h(C,te+1,W);var Bt=h(N.args,0,W).slice();te+1+1>C.length?Vt=Vt.concat(Bt):Bt.forEach(function(oi){Vt=Vt.concat(h(C,te+1,oi))});for(var Zr=0;Bt.length>0;){var F=Bt[0];if(Bt.shift(),F=h(N.args,0,F),Bt=Bt.concat(F),te+1+1<=C.length&&F.forEach(function(gs){Vt=Vt.concat(h(C,te+1,gs))}),Zr++,Zr>Ae)throw new Error("Infinite loop brake. Number of iterations = "+Zr)}return Vt}else if(N.selid==="QUESTION"){var Vt=[];Vt=Vt.concat(h(C,te+1,W));var F=h(N.args,0,W);return te+1+1<=C.length&&F.forEach(function(oi){Vt=Vt.concat(h(C,te+1,oi))}),Vt}else if(N.selid==="WITH"){var F=h(N.args,0,W);if(F.length===0)return[];var Vn={status:1,values:F}}else{if(N.selid==="ROOT")return te+1+1>C.length?[W]:h(C,te+1,u);throw new Error("Wrong selector "+N.selid)}}else if(N.srchid)var Vn=t.srch[N.srchid.toUpperCase()](W,N.args,f,c);else throw new Error("Selector not found");typeof Vn>"u"&&(Vn={status:1,values:[W]});var ni=[];if(Vn.status===1){var cs=Vn.values;if(te+1+1>C.length)ni=cs;else for(var Zr=0;Zr0&&(p&&p[0]&&p[0].srchid==="PROP"&&p[0].args&&p[0].args[0]&&(p[0].args[0].toUpperCase()==="XML"?(f.mode="XML",p.shift()):p[0].args[0].toUpperCase()==="HTML"?(f.mode="HTML",p.shift()):p[0].args[0].toUpperCase()==="JSON"&&(f.mode="JSON",p.shift())),p.length>0&&p[0].srchid==="VALUE"&&(f.value=!0,p.shift())),this.from instanceof V.Column){var b=this.from.databaseid||n;u=t.databases[b].tables[this.from.columnid].data}else if(this.from instanceof V.FuncValue&&t.from[this.from.funcid.toUpperCase()]){var U=this.from.args.map(function(C){var te=C.toJS(),W=new Function("params,alasql","var y;return "+te).bind(this);return W(c,t)});u=t.from[this.from.funcid.toUpperCase()].apply(this,U)}else if(typeof this.from>"u")u=t.databases[n].objects;else{var R=new Function("params,alasql","var y;return "+this.from.toJS());u=R(c,t),typeof Mongo=="object"&&typeof Mongo.Collection!="object"&&u instanceof Mongo.Collection&&(u=u.find().fetch())}if(p!==void 0&&p.length>0?l=h(p,0,u):l=u,this.into)if(this.into instanceof V.ParamValue)typeof this.into.param=="string"?c[this.into.param]=l:c[this.into.param]=l,o&&(l=o(l));else if(this.into instanceof V.VarValue)t.vars[this.into.variable]=l,o&&(l=o(l));else{var L,T;typeof this.into.args[0]<"u"&&(L=new Function("params,alasql","var y;return "+this.into.args[0].toJS())(c,t)),typeof this.into.args[1]<"u"&&(T=new Function("params,alasql","var y;return "+this.into.args[1].toJS())(c,t)),l=t.into[this.into.funcid.toUpperCase()](L,T,l,[],o)}else f.value&&l.length>0&&(l=l[0]),o&&(l=o(l));return l}},t.srch={PROP(n,c,o){if(o.mode==="XML"){let l=n.children.filter(f=>f.name.toUpperCase()===c[0].toUpperCase());return{status:l.length?1:-1,values:l}}else return typeof n!="object"||n===null||typeof c!="object"||typeof n[c[0]]>"u"?{status:-1,values:[]}:{status:1,values:[n[c[0]]]}},APROP(n,c){return typeof n!="object"||n===null||typeof c!="object"||typeof n[c[0]]>"u"?{status:1,values:[void 0]}:{status:1,values:[n[c[0]]]}},EQ(n,c,o,l){var f=c[0].toJS("x",""),u=new Function("x,alasql,params","return "+f);return n===u(n,t,l)?{status:1,values:[n]}:{status:-1,values:[]}},LIKE(n,c,o,l){var f=c[0].toJS("x",""),u=new Function("x,alasql,params","return "+f);return n.toUpperCase().match(new RegExp("^"+u(n,t,l).toUpperCase().replace(/%/g,".*").replace(/\?|_/g,".")+"$"),"g")?{status:1,values:[n]}:{status:-1,values:[]}},ATTR(n,c,o){if(o.mode==="XML")return typeof c>"u"?{status:1,values:[n.attributes]}:typeof n=="object"&&typeof n.attributes=="object"&&typeof n.attributes[c[0]]<"u"?{status:1,values:[n.attributes[c[0]]]}:{status:-1,values:[]};throw new Error("ATTR is not using in usual mode")},CONTENT(n,c,o){if(o.mode!=="XML")throw new Error("ATTR is not using in usual mode");return{status:1,values:[n.content]}},SHARP(n,c){let o=t.databases[t.useid].objects[c[0]];return n!==void 0&&n===o?{status:1,values:[n]}:{status:-1,values:[]}},PARENT(){return console.error("PARENT not implemented",arguments),{status:-1,values:[]}},CHILD(n,c,o){return typeof n=="object"?Array.isArray(n)?{status:1,values:n}:o.mode==="XML"?{status:1,values:Object.keys(n.children).map(function(l){return n.children[l]})}:{status:1,values:Object.keys(n).map(function(l){return n[l]})}:{status:1,values:[]}},KEYS(n){return typeof n=="object"&&n!==null?{status:1,values:Object.keys(n)}:{status:1,values:[]}},WHERE(n,c,o,l){var f=c[0].toJS("x",""),u=new Function("x,alasql,params","return "+f);return u(n,t,l)?{status:1,values:[n]}:{status:-1,values:[]}},NAME(n,c){return n.name===c[0]?{status:1,values:[n]}:{status:-1,values:[]}},CLASS(n,c){return n.$class==c?{status:1,values:[n]}:{status:-1,values:[]}},VERTEX(n){return n.$node==="VERTEX"?{status:1,values:[n]}:{status:-1,values:[]}},INSTANCEOF(n,c){return n instanceof t.fn[c[0]]?{status:1,values:[n]}:{status:-1,values:[]}},EDGE(n){return n.$node==="EDGE"?{status:1,values:[n]}:{status:-1,values:[]}},EX(n,c,o,l){var f=c[0].toJS("x",""),u=new Function("x,alasql,params","return "+f);return{status:1,values:[u(n,t,l)]}},RETURN(n,c,o,l){var f={};return c&&c.length>0&&c.forEach(function(u){var p=u.toJS("x",""),h=new Function("x,alasql,params","return "+p);typeof u.as>"u"&&(u.as=u.toString()),f[u.as]=h(n,t,l)}),{status:1,values:[f]}},REF(n){return{status:1,values:[t.databases[t.useid].objects[n]]}},OUT(n){if(n.$out&&n.$out.length>0){var c=n.$out.map(function(o){return t.databases[t.useid].objects[o]});return{status:1,values:c}}else return{status:-1,values:[]}},OUTOUT(n){if(n.$out&&n.$out.length>0){var c=[];return n.$out.forEach(function(o){var l=t.databases[t.useid].objects[o];l&&l.$out&&l.$out.length>0&&l.$out.forEach(function(f){c=c.concat(t.databases[t.useid].objects[f])})}),{status:1,values:c}}else return{status:-1,values:[]}},IN(n){if(n.$in&&n.$in.length>0){var c=n.$in.map(function(o){return t.databases[t.useid].objects[o]});return{status:1,values:c}}else return{status:-1,values:[]}},ININ(n){if(n.$in&&n.$in.length>0){var c=[];return n.$in.forEach(function(o){var l=t.databases[t.useid].objects[o];l&&l.$in&&l.$in.length>0&&l.$in.forEach(function(f){c=c.concat(t.databases[t.useid].objects[f])})}),{status:1,values:c}}else return{status:-1,values:[]}},AS(n,c){return t.vars[c[0]]=n,{status:1,values:[n]}},AT(n,c){var o=t.vars[c[0]];return{status:1,values:[o]}},CLONEDEEP(n){var c=mn(n);return{status:1,values:[c]}},SET(n,c,o,l){var f=c.map(function(p){return p.method==="@"?`alasql.vars[${JSON.stringify(p.variable)}]=`+p.expression.toJS("x",""):p.method==="$"?`params[${JSON.stringify(p.variable)}]=`+p.expression.toJS("x",""):`x[${JSON.stringify(p.column.columnid)}]=`+p.expression.toJS("x","")}).join(";"),u=new Function("x,params,alasql",f);return u(n,l,t),{status:1,values:[n]}},ROW(n,c,o,l){var f="var y;return [";f+=c.map(h=>h.toJS("x","")).join(","),f+="]";var u=new Function("x,params,alasql",f),p=u(n,l,t);return{status:1,values:[p]}},D3(n){return n.$node!=="VERTEX"&&n.$node==="EDGE"&&(n.source=n.$in[0],n.target=n.$out[0]),{status:1,values:[n]}},ORDERBY(n,c){var o=n.sort(_a(c));return{status:1,values:o}}};var _a=function(n){if(n){if(typeof n?.[0]?.expression=="function"){var c=n[0].expression;return function(f,u){var p=c(f),h=c(u);return p>h?1:p===h?0:-1}}var o="",l="";return n.forEach(function(f){var u="";if(f.expression instanceof V.NumValue&&(f.expression=self.columns[f.expression.value-1]),f.expression instanceof V.Column){var p=f.expression.columnid;t.options.valueof&&(u=".valueOf()"),f.nocase&&(u+=".toUpperCase()"),p==="_"?(o+="if(a"+u+(f.direction==="ASC"?">":"<")+"b"+u+")return 1;",o+="if(a"+u+"==b"+u+"){"):o+=`if ( (a[${JSON.stringify(p)}]||'')${u} ${f.direction==="ASC"?">":"<"} (b[${JSON.stringify(p)}]||'')${u} @@ -36,7 +36,7 @@ Expecting `+g0.join(", ")+", got '"+(this.terminals_[Vi]||Vi)+"'":Ch="Parse erro == (b[${JSON.stringify(p)}]||'')${u} ){ - `}else u=".valueOf()",f.nocase&&(u+=".toUpperCase()"),a+=` + `}else u=".valueOf()",f.nocase&&(u+=".toUpperCase()"),o+=` if ( (${f.toJS("a","")} || '')${u} ${f.direction==="ASC"?">":"<"} @@ -46,8 +46,8 @@ Expecting `+g0.join(", ")+", got '"+(this.terminals_[Vi]||Vi)+"'":Ch="Parse erro if ( (${f.toJS("a","")} || '')${u} == (${f.toJS("b","")} || '')${u} - ) {`;l+="}"}),a+="return 0;",a+=l+"return -1",new Function("a,b",a)}};function Fs(n,c,a,l,f){n.sourceslen=n.sources.length;let u=n.sourceslen;n.query=n,n.A=l,n.B=f,n.cb=a,n.oldscope=c,n.subqueryCache={},n.queriesfn&&(n.sourceslen+=n.queriesfn.length,u+=n.queriesfn.length,n.queriesdata=[],n.queriesfn.forEach(function(d,b){d.query.params=n.params,Do([],-b-1,n)})),n.scope=c?mn(c):{};let p;if(n.sources.forEach(function(d,b){d.query=n;var U=d.datafn(n,n.params,Do,b,t);typeof U<"u"&&((n.intofn||n.intoallfn)&&Array.isArray(U)&&!n.preserveArrayResult&&(U=U.length),p=U),d.queriesdata=n.queriesdata}),n.sources.length==0||u===0)try{p=ds(n)}catch(d){if(a)return a(null,d);throw d}return p}function Do(n,c,a){if(c>=0){let l=a.sources[c];l.data=n,typeof l.data=="function"&&(l.getfn=l.data,l.dontcache=l.getfn.dontcache,["OUTER","RIGHT","ANTI"].includes(l.joinmode)&&(l.dontcache=!1),l.data={})}else a.queriesdata[-c-1]=Ai(n);if(a.sourceslen--,!(a.sourceslen>0))return ds(a)}function ds(n){var c=n.scope,a;ya(n),n.data=[],n.xgroups={},n.groups=[];var l=0;if(Yi(n,c,l),n.groupfn){if(n.data=[],n.groups.length===0&&n.allgroups.length===0){var f={};n.selectGroup.length>0&&n.selectGroup.forEach(function(Tt){Tt.aggregatorid=="COUNT"||Tt.aggregatorid=="SUM"||Tt.aggregatorid=="TOTAL"?f[Tt.nick]=0:f[Tt.nick]=void 0}),n.groups=[f]}if(n.aggrKeys.length>0){var u="";n.aggrKeys.forEach(function(Tt){var $t="";Tt.args&&Tt.args.length>1?$t=Array(Tt.args.length).fill("undefined").join(",")+",":$t="undefined,",u+=` - g[${JSON.stringify(Tt.nick)}] = alasql.aggr[${JSON.stringify(Tt.funcid)}](${$t}g[${JSON.stringify(Tt.nick)}],3); `});var p=new Function("g,params,alasql","var y;"+u)}for(var d=0,b=n.groups.length;d0){var Ot=n.removeKeys;if(a=Ot.length,a>0)for(b=n.data.length,d=0;d0&&(n.columns=n.columns.filter(function(Tt){var $t=!1;return Ot.forEach(function(yr){Tt.columnid==yr&&($t=!0)}),!$t}))}if(typeof n.removeLikeKeys<"u"&&n.removeLikeKeys.length>0){for(var Oe=n.removeLikeKeys,d=0,b=n.data.length;d0&&(n.columns=n.columns.filter(function(Tt){var $t=!1;return Oe.forEach(function(yr){t.utils.like(yr,Tt.columnid)&&($t=!0)}),!$t}))}if(n.pivotfn&&n.pivotfn(),n.unpivotfn&&n.unpivotfn(),n.intoallfn){var ht=n.intoallfn(n.columns,n.cb,n.params,n.alasql);return ht}if(n.intofn){for(b=n.data.length,d=0;d0&&l.optimization=="ix"&&l.onleftfn&&l.onrightfn){if(l.databaseid&&t.databases[l.databaseid].tables[l.tableid]&&(t.databases[l.databaseid].tables[l.tableid].indices||(n.database.tables[l.tableid].indices={}),b=t.databases[l.databaseid].tables[l.tableid].indices[Ht(l.onrightfns+"`"+l.srcwherefns)],!t.databases[l.databaseid].tables[l.tableid].dirty&&b&&(l.ix=b)),!l.ix){for(l.ix={},f={},u=0,p=l.data.length;(d=l.data[u])||l.getfn&&(d=l.getfn(u))||u=n.sources.length)n.wherefn(c,n.params,t)&&(n.groupfn?n.groupfn(c,n.params,t):n.data.push(n.selectfn(c,n.params,t)));else if(n.sources[a].applyselect){var l=n.sources[a];l.applyselect(n.params,function(b){if(b.length>0)for(var U=0;U"u")throw new Error("Data source number "+a+" in undefined");let W=T.length,Y;for(;(Y=T[te])||!C&&b.getfn&&(Y=b.getfn(te))||te0&&(n+=" GROUP BY "+this.group.map(function(c){return c.toString()}).join(", ")),this.having&&(n+=" HAVING "+this.having.toString()),this.order&&this.order.length>0&&(n+=" ORDER BY "+this.order.map(function(c){return c.toString()}).join(", ")),this.limit&&(n+=" LIMIT "+this.limit.value),this.offset&&(n+=" OFFSET "+this.offset.value),this.union&&(n+=" UNION "+(this.corresponding?"CORRESPONDING ":"")+this.union.toString()),this.unionall&&(n+=" UNION ALL "+(this.corresponding?"CORRESPONDING ":"")+this.unionall.toString()),this.except&&(n+=" EXCEPT "+(this.corresponding?"CORRESPONDING ":"")+this.except.toString()),this.intersect&&(n+=" INTERSECT "+(this.corresponding?"CORRESPONDING ":"")+this.intersect.toString()),n}toJS(n){var c="alasql.utils.flatArray(this.queriesfn["+(this.queriesidx-1)+"](this.params,null,"+n+"))[0]";return c}compile(n,c){var a=t.databases[n],l=new $;if(l.removeKeys=[],l.aggrKeys=[],l.explain=this.explain,l.explaination=[],l.explid=1,l.modifier=this.modifier,l.database=a,this.compileWhereExists(l),this.compileQueries(l),l.defcols=this.compileDefCols(l,n),l.fromfn=this.compileFrom(l),this.joins&&this.compileJoins(l),l.rownums=[],l.grouprownums=[],l.windowaggrs=[],this.into instanceof V.FuncValue&&this.into.funcid.toUpperCase()==="OBJECT"&&(l.intoObject=!0),this.compileSelectGroup0(l),this.group||l.selectGroup.length>0?l.selectgfns=this.compileSelectGroup1(l):l.selectfns=this.compileSelect1(l,c),this.compileRemoveColumns(l),this.where&&this.compileWhereJoins(l),l.wherefn=this.compileWhere(l),(this.group||l.selectGroup.length>0)&&(l.groupfn=this.compileGroup(l)),this.having&&(l.havingfn=this.compileHaving(l)),this.order&&(l.orderfn=this.compileOrder(l,c),l.orderColumns=this.orderColumns),this.group||l.selectGroup.length>0?l.selectgfn=this.compileSelectGroup2(l):l.selectfn=this.compileSelect2(l,c),l.distinct=this.distinct,this.pivot&&(l.pivotfn=this.compilePivot(l)),this.unpivot&&(l.pivotfn=this.compileUnpivot(l)),this.top?l.limit=this.top.value:this.limit&&(l.limit=this.limit.value,this.offset&&(l.offset=this.offset.value)),l.percent=this.percent,l.corresponding=this.corresponding,this.union?(l.unionfn=this.union.compile(n),!l.orderfn&&this.union.order&&(l.orderfn=this.union.compileOrder(l,c))):this.unionall?(l.unionallfn=this.unionall.compile(n),!l.orderfn&&this.unionall.order&&(l.orderfn=this.unionall.compileOrder(l,c))):this.except?(l.exceptfn=this.except.compile(n),!l.orderfn&&this.except.order&&(l.orderfn=this.except.compileOrder(l,c))):this.intersect&&(l.intersectfn=this.intersect.compile(n),!l.orderfn&&this.intersect.order&&(l.orderfn=this.intersect.compileOrder(l,c))),this.into){if(this.into instanceof V.Table)if(t.options.autocommit&&t.databases[this.into.databaseid||n].engineid)l.intoallfns=`return alasql + ) {`;l+="}"}),o+="return 0;",o+=l+"return -1",new Function("a,b",o)}};function Us(n,c,o,l,f){n.sourceslen=n.sources.length;let u=n.sourceslen;n.query=n,n.A=l,n.B=f,n.cb=o,n.oldscope=c,n.subqueryCache={},n.queriesfn&&(n.sourceslen+=n.queriesfn.length,u+=n.queriesfn.length,n.queriesdata=[],n.queriesfn.forEach(function(h,b){h.query.params=n.params,Ro([],-b-1,n)})),n.scope=c?mn(c):{};let p;if(n.sources.forEach(function(h,b){h.query=n;var U=h.datafn(n,n.params,Ro,b,t);typeof U<"u"&&((n.intofn||n.intoallfn)&&Array.isArray(U)&&!n.preserveArrayResult&&(U=U.length),p=U),h.queriesdata=n.queriesdata}),n.sources.length==0||u===0)try{p=ps(n)}catch(h){if(o)return o(null,h);throw h}return p}function Ro(n,c,o){if(c>=0){let l=o.sources[c];l.data=n,typeof l.data=="function"&&(l.getfn=l.data,l.dontcache=l.getfn.dontcache,["OUTER","RIGHT","ANTI"].includes(l.joinmode)&&(l.dontcache=!1),l.data={})}else o.queriesdata[-c-1]=Ii(n);if(o.sourceslen--,!(o.sourceslen>0))return ps(o)}function ps(n){var c=n.scope,o;xa(n),n.data=[],n.xgroups={},n.groups=[];var l=0;if(Qi(n,c,l),n.groupfn){if(n.data=[],n.groups.length===0&&n.allgroups.length===0){var f={};n.selectGroup.length>0&&n.selectGroup.forEach(function(Tt){Tt.aggregatorid=="COUNT"||Tt.aggregatorid=="SUM"||Tt.aggregatorid=="TOTAL"?f[Tt.nick]=0:f[Tt.nick]=void 0}),n.groups=[f]}if(n.aggrKeys.length>0){var u="";n.aggrKeys.forEach(function(Tt){var $t="";Tt.args&&Tt.args.length>1?$t=Array(Tt.args.length).fill("undefined").join(",")+",":$t="undefined,",u+=` + g[${JSON.stringify(Tt.nick)}] = alasql.aggr[${JSON.stringify(Tt.funcid)}](${$t}g[${JSON.stringify(Tt.nick)}],3); `});var p=new Function("g,params,alasql","var y;"+u)}for(var h=0,b=n.groups.length;h0){var Ot=n.removeKeys;if(o=Ot.length,o>0)for(b=n.data.length,h=0;h0&&(n.columns=n.columns.filter(function(Tt){var $t=!1;return Ot.forEach(function(yr){Tt.columnid==yr&&($t=!0)}),!$t}))}if(typeof n.removeLikeKeys<"u"&&n.removeLikeKeys.length>0){for(var Oe=n.removeLikeKeys,h=0,b=n.data.length;h0&&(n.columns=n.columns.filter(function(Tt){var $t=!1;return Oe.forEach(function(yr){t.utils.like(yr,Tt.columnid)&&($t=!0)}),!$t}))}if(n.pivotfn&&n.pivotfn(),n.unpivotfn&&n.unpivotfn(),n.intoallfn){var ht=n.intoallfn(n.columns,n.cb,n.params,n.alasql);return ht}if(n.intofn){for(b=n.data.length,h=0;h0&&l.optimization=="ix"&&l.onleftfn&&l.onrightfn){if(l.databaseid&&t.databases[l.databaseid].tables[l.tableid]&&(t.databases[l.databaseid].tables[l.tableid].indices||(n.database.tables[l.tableid].indices={}),b=t.databases[l.databaseid].tables[l.tableid].indices[zt(l.onrightfns+"`"+l.srcwherefns)],!t.databases[l.databaseid].tables[l.tableid].dirty&&b&&(l.ix=b)),!l.ix){for(l.ix={},f={},u=0,p=l.data.length;(h=l.data[u])||l.getfn&&(h=l.getfn(u))||u=n.sources.length)n.wherefn(c,n.params,t)&&(n.groupfn?n.groupfn(c,n.params,t):n.data.push(n.selectfn(c,n.params,t)));else if(n.sources[o].applyselect){var l=n.sources[o];l.applyselect(n.params,function(b){if(b.length>0)for(var U=0;U"u")throw new Error("Data source number "+o+" in undefined");let W=T.length,Y;for(;(Y=T[te])||!C&&b.getfn&&(Y=b.getfn(te))||te0&&(n+=" GROUP BY "+this.group.map(function(c){return c.toString()}).join(", ")),this.having&&(n+=" HAVING "+this.having.toString()),this.order&&this.order.length>0&&(n+=" ORDER BY "+this.order.map(function(c){return c.toString()}).join(", ")),this.limit&&(n+=" LIMIT "+this.limit.value),this.offset&&(n+=" OFFSET "+this.offset.value),this.union&&(n+=" UNION "+(this.corresponding?"CORRESPONDING ":"")+this.union.toString()),this.unionall&&(n+=" UNION ALL "+(this.corresponding?"CORRESPONDING ":"")+this.unionall.toString()),this.except&&(n+=" EXCEPT "+(this.corresponding?"CORRESPONDING ":"")+this.except.toString()),this.intersect&&(n+=" INTERSECT "+(this.corresponding?"CORRESPONDING ":"")+this.intersect.toString()),n}toJS(n){var c="alasql.utils.flatArray(this.queriesfn["+(this.queriesidx-1)+"](this.params,null,"+n+"))[0]";return c}compile(n,c){var o=t.databases[n],l=new $;if(l.removeKeys=[],l.aggrKeys=[],l.explain=this.explain,l.explaination=[],l.explid=1,l.modifier=this.modifier,l.database=o,this.compileWhereExists(l),this.compileQueries(l),l.defcols=this.compileDefCols(l,n),l.fromfn=this.compileFrom(l),this.joins&&this.compileJoins(l),l.rownums=[],l.grouprownums=[],l.windowaggrs=[],this.into instanceof V.FuncValue&&this.into.funcid.toUpperCase()==="OBJECT"&&(l.intoObject=!0),this.compileSelectGroup0(l),this.group||l.selectGroup.length>0?l.selectgfns=this.compileSelectGroup1(l):l.selectfns=this.compileSelect1(l,c),this.compileRemoveColumns(l),this.where&&this.compileWhereJoins(l),l.wherefn=this.compileWhere(l),(this.group||l.selectGroup.length>0)&&(l.groupfn=this.compileGroup(l)),this.having&&(l.havingfn=this.compileHaving(l)),this.order&&(l.orderfn=this.compileOrder(l,c),l.orderColumns=this.orderColumns),this.group||l.selectGroup.length>0?l.selectgfn=this.compileSelectGroup2(l):l.selectfn=this.compileSelect2(l,c),l.distinct=this.distinct,this.pivot&&(l.pivotfn=this.compilePivot(l)),this.unpivot&&(l.pivotfn=this.compileUnpivot(l)),this.top?l.limit=this.top.value:this.limit&&(l.limit=this.limit.value,this.offset&&(l.offset=this.offset.value)),l.percent=this.percent,l.corresponding=this.corresponding,this.union?(l.unionfn=this.union.compile(n),!l.orderfn&&this.union.order&&(l.orderfn=this.union.compileOrder(l,c))):this.unionall?(l.unionallfn=this.unionall.compile(n),!l.orderfn&&this.unionall.order&&(l.orderfn=this.unionall.compileOrder(l,c))):this.except?(l.exceptfn=this.except.compile(n),!l.orderfn&&this.except.order&&(l.orderfn=this.except.compileOrder(l,c))):this.intersect&&(l.intersectfn=this.intersect.compile(n),!l.orderfn&&this.intersect.order&&(l.orderfn=this.intersect.compileOrder(l,c))),this.into){if(this.into instanceof V.Table)if(t.options.autocommit&&t.databases[this.into.databaseid||n].engineid)l.intoallfns=`return alasql .engines[${JSON.stringify(t.databases[this.into.databaseid||n].engineid)}] .intoTable( ${JSON.stringify(this.into.databaseid||n)}, @@ -69,35 +69,35 @@ Expecting `+g0.join(", ")+", got '"+(this.terminals_[Vi]||Vi)+"'":Ch="Parse erro res=this.data.length; if(cb) res = cb(res); return res; - `;else if(this.into instanceof V.FuncValue){var p=this.into.funcid.toUpperCase(),d="return alasql.into["+JSON.stringify(p)+"](";this.into.args&&this.into.args.length>0?(d+=this.into.args[0].toJS()+",",this.into.args.length>1?d+=this.into.args[1].toJS()+",":d+="undefined,"):d+="undefined, undefined,",l.intoallfns=d+"this.data,columns,cb)",p==="OBJECT"&&(l.preserveArrayResult=!0)}else this.into instanceof V.ParamValue&&(typeof this.into.param=="string"?l.intoallfns=` + `;else if(this.into instanceof V.FuncValue){var p=this.into.funcid.toUpperCase(),h="return alasql.into["+JSON.stringify(p)+"](";this.into.args&&this.into.args.length>0?(h+=this.into.args[0].toJS()+",",this.into.args.length>1?h+=this.into.args[1].toJS()+",":h+="undefined,"):h+="undefined, undefined,",l.intoallfns=h+"this.data,columns,cb)",p==="OBJECT"&&(l.preserveArrayResult=!0)}else this.into instanceof V.ParamValue&&(typeof this.into.param=="string"?l.intoallfns=` if(!params[${JSON.stringify(this.into.param)}]) params[${JSON.stringify(this.into.param)}]=[]; params[${JSON.stringify(this.into.param)}]=this.data; res=this.data.length; if(cb) res = cb(res); return res; - `:l.intofns=`params[${JSON.stringify(this.into.param)}].push(r)`);l.intofns?l.intofn=new Function("r,i,params,alasql","var y;"+l.intofns):l.intoallfns&&(l.intoallfn=new Function("columns,cb,params,alasql","var y;"+l.intoallfns))}var b=function(U,R,L){l.params=U;var T=Fs(l,L,function(C,te){if(te){if(R)return R(null,te);throw te}if(l.rownums.length>0)for(var W=0,Y=C.length;W0)for(var B=0,N=l.grouprownums.length;B0)je=Ae.partitionColumns;else{var Ot=Object.keys(C[0]||{});je=[Ot[0]]}for(var Oe=null,Te=0,W=0,Y=C.length;W0)for(var B=0,N=l.windowaggrs.length;B0?Ae.partitionColumns.map(function(ls){return C[W][ls]}).join("|"):"__all__";Tt[$t]||(Tt[$t]=[]),Tt[$t].push(W)}for(var $t in Tt){var yr=Tt[$t],le=[],mr=Ae.expression&&Ae.expression.columnid;if(Ae.aggregatorid!=="COUNT"||mr&&mr!=="*")for(var Vt=0;Vt0?le.reduce(function(Pn,Jn){return Pn+Jn},0)/le.length:null;break;case"MAX":Qr=le.length>0?Math.max.apply(null,le):null;break;case"MIN":Qr=le.length>0?Math.min.apply(null,le):null;break}for(var Vt=0;Vt{if(!a.from)return!1;let f=new Set;a.from.forEach(p=>{p.tableid&&f.add(p.tableid),p.as&&f.add(p.as)});let u=p=>{if(!p)return!1;if(p instanceof V.Column&&p.tableid&&!f.has(p.tableid))return!0;for(let d of Object.keys(p))if(p[d]&&typeof p[d]=="object"&&u(p[d]))return!0;return!1};return u(a.where)||u(a.columns)};n.queriesfn=this.queries.map(function(a,l){var f=a.compile(n.database.databaseid);return f.query.modifier="RECORDSET",f.query.isCorrelated=c(a,n),a.queries&&a.queries.length>0&&(f.query.queriesfn=a.queries.map(function(u){var p=u.compile(n.database.databaseid);return p.query.modifier="RECORDSET",p})),f})}};function Zs(n,c){if(typeof c>"u"||typeof c=="number"||typeof c=="string"||typeof c=="boolean")return c;var a=n.modifier||t.options.modifier,l=n.columns;if(n.dirtyColumns&&c.length>0){for(var f={},u=Math.min(c.length,t.options.columnlookup||10)-1;0<=u;u--)for(var p in c[u])f[p]=!0;var d=Object.keys(f).map(function(R){return{columnid:R}});if(!l||l.length===0)l=d;else{var b={};l.forEach(function(R){b[R.columnid]=!0}),d.forEach(function(R){b[R.columnid]||l.push(R)})}}else if(typeof l>"u"||l.length===0)if(c.length>0){for(var f={},u=Math.min(c.length,t.options.columnlookup||10)-1;0<=u;u--)for(var p in c[u])f[p]=!0;l=Object.keys(f).map(function(R){return{columnid:R}})}else l=[],n&&n.sources&&n.sources.forEach(R=>{R&&R.columns&&Array.isArray(R.columns)&&(l=l.concat(R.columns))});switch(a){case"VALUE":if(c.length===0)return;let R=l&&l.length>0?l[0].columnid:Object.keys(c[0])[0];return c[0][R];case"ROW":return c.length===0?void 0:Object.values(c[0]);case"COLUMN":if(c.length===0)return[];let L;l&&l.length>0?L=l[0].columnid:L=Object.keys(c[0])[0];let T=[];for(var u=0,U=c.length;ul.map(B=>Y[B.columnid]));case"INDEX":if(c.length===0)return;let C=l&&l.length>0?l[0].columnid:Object.keys(c[0])[0],te=l&&l.length>1?l[1].columnid:Object.keys(c[0])[1];return c.reduce((Y,B)=>({...Y,[B[C]]:B[te]}),{});case"RECORDSET":return new t.Recordset({columns:l,data:c});case"TEXTSTRING":if(c.length===0)return;let W=l&&l.length>0?l[0].columnid:Object.keys(c[0])[0];return c.map(Y=>Y[W]).join(` -`);case"ALASQL_DETAILS":return{data:c,columns:l,length:c.length}}return c}V.ExistsValue=class{constructor(n){Object.assign(this,n)}toString(){return"EXISTS("+this.value.toString()+")"}toType(){return"boolean"}toJS(n,c,a){return`!!this.existsfn[${this.existsidx}](params, null, ${n}).data.length`}},t.precompile=function(n,c,a){if(n){if(n.params=a,n.view&&n.select&&n.queries){n.select.queries=n.queries;return}n.queries&&(n.queriesfn=n.queries.map(function(l){var f=l.compile(c||n.database.databaseid);return f.query.modifier="RECORDSET",f})),n.exists&&(n.existsfn=n.exists.map(function(l){var f=l.compile(c||n.database.databaseid);return f.query.modifier="RECORDSET",f}))}},V.Select.prototype.compileFrom=function(n){let c=this;n.sources=[],n.aliases={},c.from&&(c.from.forEach(a=>{let l=a.as||a.tableid;if(a instanceof V.Table)n.aliases[l]={tableid:a.tableid,databaseid:a.databaseid||n.database.databaseid,type:"table"};else if(a instanceof V.Select)n.aliases[l]={type:"subquery"};else if(a instanceof V.Search)n.aliases[l]={type:"subsearch"};else if(a instanceof V.ParamValue)n.aliases[l]={type:"paramvalue"};else if(a instanceof V.FuncValue)n.aliases[l]={type:"funcvalue"};else if(a instanceof V.VarValue)n.aliases[l]={type:"varvalue"};else if(a instanceof V.FromData)n.aliases[l]={type:"fromdata"};else if(a instanceof V.Json)n.aliases[l]={type:"json"};else if(a.inserted)n.aliases[l]={type:"inserted"};else throw new Error("Wrong table at FROM");let f={alias:l,databaseid:a.databaseid||n.database.databaseid,tableid:a.tableid,joinmode:"INNER",onmiddlefn:x,srcwherefns:"",srcwherefn:x};if(a instanceof V.Table)f.columns=t.databases[f.databaseid].tables[f.tableid].columns,t.options.autocommit&&t.databases[f.databaseid].engineid&&!t.databases[f.databaseid].tables[f.tableid].view?f.datafn=(u,p,d,b,U)=>U.engines[U.databases[f.databaseid].engineid].fromTable(f.databaseid,f.tableid,d,b,u):t.databases[f.databaseid].tables[f.tableid].view?f.datafn=(u,p,d,b,U)=>{let R=U.databases[f.databaseid].tables[f.tableid];!R.select&&R.viewSelect&&(R.select=R.viewSelect.compile(R.viewDatabaseid));let L=R.select(p);return d&&(L=d(L,b,u)),L}:f.datafn=(u,p,d,b,U)=>{let R=U.databases[f.databaseid].tables[f.tableid].data;return d&&(R=d(R,b,u)),R};else if(a instanceof V.Select)f.subquery=a.compile(n.database.databaseid),typeof f.subquery.query.modifier>"u"&&(f.subquery.query.modifier="RECORDSET"),f.columns=f.subquery.query.columns,f.datafn=(u,p,d,b,U)=>{let R;return f.subquery(u.params,L=>{R=L.data,d&&(R=d(R,b,u))}),R};else if(a instanceof V.Search)f.subsearch=a,f.columns=[],f.datafn=(u,p,d,b,U)=>{let R;return f.subsearch.execute(u.database.databaseid,u.params,L=>{R=L,d&&(R=d(R,b,u))}),R};else if(a instanceof V.ParamValue){let u=`var res = alasql.prepareFromData(params['${a.param}']`;a.array&&(u+=",true"),u+=");if(cb)res=cb(res,idx,query);return res",f.datafn=new Function("query,params,cb,idx,alasql",u)}else if(a.inserted){let u="var res = alasql.prepareFromData(alasql.inserted";a.array&&(u+=",true"),u+=");if(cb)res=cb(res,idx,query);return res",f.datafn=new Function("query,params,cb,idx,alasql",u)}else if(a instanceof V.Json){let u="var res = alasql.prepareFromData("+a.toJS();a.array&&(u+=",true"),u+=");if(cb)res=cb(res,idx,query);return res",f.datafn=new Function("query,params,cb,idx,alasql",u)}else if(a instanceof V.VarValue){let u=`var res = alasql.prepareFromData(alasql.vars['${a.variable}']`;a.array&&(u+=",true"),u+=");if(cb)res=cb(res,idx,query);return res",f.datafn=new Function("query,params,cb,idx,alasql",u)}else if(a instanceof V.FuncValue){let u="var res=alasql.from["+JSON.stringify(a.funcid.toUpperCase())+"](";a.args&&a.args.length>0?(a.args[0]?u+=a.args[0].toJS("query.oldscope")+",":u+="null,",a.args[1]?u+=a.args[1].toJS("query.oldscope")+",":u+="null,"):u+="null,null,",u+="cb,idx,query); return res",f.datafn=new Function("query,params,cb,idx,alasql",u)}else if(a instanceof V.FromData)f.datafn=(u,p,d,b,U)=>{let R=a.data;return d&&(R=d(R,b,u)),R};else throw new Error("Wrong table at FROM");n.sources.push(f)}),n.defaultTableid=n.sources[0].alias)},t.prepareFromData=function(n,c){let a=n;if(typeof n=="string")a=n.split(/\r?\n/),c&&(a=a.map(l=>[l]));else if(c)a=n.map(l=>[l]);else if(typeof n=="object"&&!Array.isArray(n))if(typeof Mongo<"u"&&typeof Mongo.Collection<"u"&&n instanceof Mongo.Collection)a=n.find().fetch();else{a=[];for(let l in n)n.hasOwnProperty(l)&&a.push([l,n[l]])}return a},V.Select.prototype.compileJoins=function(n){let c=this;this.joins.forEach(a=>{let l,f,u;if(a.joinmode==="CROSS"&&(a.joinmode="INNER"),a instanceof V.Apply){u={alias:a.as,applymode:a.applymode,onmiddlefn:x,srcwherefns:"",srcwherefn:x,columns:[]},u.applyselect=a.select.compile(n.database.databaseid),u.columns=u.applyselect.query.columns,u.datafn=function(d,b,U,R,L){let T;return U&&(T=U(T,R,d)),T},n.sources.push(u);return}if(a.table){if(l=a.table,u={alias:a.as||l.tableid,databaseid:l.databaseid||n.database.databaseid,tableid:l.tableid,joinmode:a.joinmode,onmiddlefn:x,srcwherefns:"",srcwherefn:x,columns:[]},!t.databases[u.databaseid].tables[u.tableid])throw new Error("Table '"+u.tableid+"' is not exists in database '"+u.databaseid+"'");u.columns=t.databases[u.databaseid].tables[u.tableid].columns,t.options.autocommit&&t.databases[u.databaseid].engineid?u.datafn=function(d,b,U,R,L){return L.engines[L.databases[u.databaseid].engineid].fromTable(u.databaseid,u.tableid,U,R,d)}:t.databases[u.databaseid].tables[u.tableid].view?u.datafn=function(d,b,U,R,L){let T=L.databases[u.databaseid].tables[u.tableid].select(b);return U&&(T=U(T,R,d)),T}:u.datafn=function(d,b,U,R,L){let T=L.databases[u.databaseid].tables[u.tableid].data;return U&&(T=U(T,R,d)),T},n.aliases[u.alias]={tableid:l.tableid,databaseid:l.databaseid||n.database.databaseid}}else if(a.select)l=a.select,u={alias:a.as,joinmode:a.joinmode,onmiddlefn:x,srcwherefns:"",srcwherefn:x,columns:[]},u.subquery=l.compile(n.database.databaseid),typeof u.subquery.query.modifier>"u"&&(u.subquery.query.modifier="RECORDSET"),u.columns=u.subquery.query.columns,u.datafn=function(d,b,U,R,L){u.data=u.subquery(d.params,null,U,R).data;let T=u.data;return U&&(T=U(T,R,d)),T},n.aliases[u.alias]={type:"subquery"};else if(a.param)u={alias:a.as,joinmode:a.joinmode,onmiddlefn:x,srcwherefns:"",srcwherefn:x},f="let res=alasql.prepareFromData(params['"+a.param.param+"']",a.array&&(f+=",true"),f+="); if(cb) res=cb(res, idx, query); return res",u.datafn=new Function("query,params,cb,idx, alasql",f),n.aliases[u.alias]={type:"paramvalue"};else if(a.variable)u={alias:a.as,joinmode:a.joinmode,onmiddlefn:x,srcwherefns:"",srcwherefn:x},f="let res=alasql.prepareFromData(alasql.vars['"+a.variable+"']",a.array&&(f+=", true"),f+="); if(cb)res=cb(res, idx, query);return res",u.datafn=new Function("query,params,cb,idx, alasql",f),n.aliases[u.alias]={type:"varvalue"};else if(a.func){u={alias:a.as,joinmode:a.joinmode,onmiddlefn:x,srcwherefns:"",srcwherefn:x};let d="let res=alasql.from["+JSON.stringify(a.func.funcid.toUpperCase())+"](",b=a.func.args;b&&b.length>0?(b[0]?d+=b[0].toJS("query.oldscope")+", ":d+="null, ",b[1]?d+=b[1].toJS("query.oldscope")+", ":d+="null, "):d+="null, null, ",d+="cb, idx, query); return res",u.datafn=new Function("query, params, cb, idx, alasql",d),n.aliases[u.alias]={type:"funcvalue"}}let p=u.alias;if(a.natural){if(a.using||a.on)throw new Error("NATURAL JOIN cannot have USING or ON clauses");if(n.sources.length>0){let d=n.sources[n.sources.length-1],b=t.databases[d.databaseid].tables[d.tableid],U=t.databases[u.databaseid].tables[u.tableid];if(b&&U){let R=b.columns.map(T=>T.columnid),L=U.columns.map(T=>T.columnid);a.using=Tn(R,L).map(T=>({columnid:T}))}else throw new Error("In this version of Alasql NATURAL JOIN works for tables with predefined columns only")}}if(a.using){let d=n.sources[n.sources.length-1];u.onleftfns=a.using.map(b=>"p['"+(d.alias||d.tableid)+"']['"+b.columnid+"']").join('+"`"+'),u.onleftfn=new Function("p,params,alasql","let y;return "+u.onleftfns),u.onrightfns=a.using.map(b=>"p['"+(u.alias||u.tableid)+"']['"+b.columnid+"']").join('+"`"+'),u.onrightfn=new Function("p,params,alasql","let y;return "+u.onrightfns),u.optimization="ix"}else if(a.on)if(a.on instanceof V.Op&&a.on.op==="="&&!a.on.allsome){u.optimization="ix";let d="",b="",U="",R=!1,L=a.on.left.toJS("p",n.defaultTableid,n.defcols),T=a.on.right.toJS("p",n.defaultTableid,n.defcols);L.indexOf("p['"+p+"']")>-1&&!(T.indexOf("p['"+p+"']")>-1)?(L.match(/p\['.*?'\]/g)||[]).every(C=>C==="p['"+p+"']")?b=L:R=!0:!(L.indexOf("p['"+p+"']")>-1)&&T.indexOf("p['"+p+"']")>-1&&(T.match(/p\['.*?'\]/g)||[]).every(C=>C==="p['"+p+"']")?d=L:R=!0,T.indexOf("p['"+p+"']")>-1&&!(L.indexOf("p['"+p+"']")>-1)?(T.match(/p\['.*?'\]/g)||[]).every(C=>C==="p['"+p+"']")?b=T:R=!0:!(T.indexOf("p['"+p+"']")>-1)&&L.indexOf("p['"+p+"']")>-1&&(L.match(/p\['.*?'\]/g)||[]).every(C=>C==="p['"+p+"']")?d=T:R=!0,R&&(b="",d="",U=a.on.toJS("p",n.defaultTableid,n.defcols),u.optimization="no"),u.onleftfns=d,u.onrightfns=b,u.onmiddlefns=U||"true",u.onleftfn=new Function("p,params,alasql","let y;return "+u.onleftfns),u.onrightfn=new Function("p,params,alasql","let y;return "+u.onrightfns),u.onmiddlefn=new Function("p,params,alasql","let y;return "+u.onmiddlefns)}else u.optimization="no",u.onmiddlefns=a.on.toJS("p",n.defaultTableid,n.defcols),u.onmiddlefn=new Function("p,params,alasql","let y;return "+a.on.toJS("p",n.defaultTableid,n.defcols));n.sources.push(u)})},V.Select.prototype.compileWhere=function(n){if(this.where){if(typeof this.where=="function")return this.where;var c=this.where.toJS("p",n.defaultTableid,n.defcols);return n.wherefns=c,new Function("p,params,alasql","var y;return "+c)}else return function(){return!0}};function Ga(n,c,a){n.onleftfn||(n.onleftfns=c,n.onrightfns=a,n.onleftfn=new Function("p,params,alasql","var y;return "+c),n.onrightfn=new Function("p,params,alasql","var y;return "+a),n.optimization="ix")}function Yo(n,c,a){var l="("+c+"=="+a+")";n.srcwherefns=n.srcwherefns?n.srcwherefns+"&&"+l:l}V.Select.prototype.compileWhereJoins=function(n){if(this.where&&!(n.sources.length<=1)){var c=n.sources.some(function(f,u){return u>0&&f.onleftfn});if(!c){var a=N1(this.where),l={};n.sources.forEach(function(f,u){l[f.alias]=u}),a.forEach(function(f){if(f.op==="="&&!f.allsome){var u=Ro(f.left),p=Ro(f.right),d=f.left.toJS("p",n.defaultTableid,n.defcols),b=f.right.toJS("p",n.defaultTableid,n.defcols);if(u.length===1&&p.length===1){var U=u[0],R=p[0];if(l[U]===void 0||l[R]===void 0)return;var L=l[U],T=l[R];T>L?Ga(n.sources[T],d,b):L>T&&Ga(n.sources[L],b,d)}else u.length===1&&p.length===0?l[u[0]]!==void 0&&Yo(n.sources[l[u[0]]],d,b):u.length===0&&p.length===1&&l[p[0]]!==void 0&&Yo(n.sources[l[p[0]]],d,b)}}),n.sources.forEach(function(f){f.srcwherefns&&(f.srcwherefn=new Function("p,params,alasql","var y;return "+f.srcwherefns))})}}};function N1(n){var c=[];function a(l){if(l){if(l.expression){a(l.expression);return}l instanceof V.Op&&(l.op==="AND"?(a(l.left),a(l.right)):l.op==="="&&c.push(l))}}return a(n),c}function Ro(n){var c=[];function a(l){if(l){if(l instanceof V.Column){l.tableid&&c.indexOf(l.tableid)===-1&&c.push(l.tableid);return}l instanceof V.Op&&(a(l.left),a(l.right))}}return a(n),c}function ko(n,c){if(!c)return!1;if(c instanceof V.Op&&!(c.op!="="&&c.op!="AND")&&!c.allsome){var a=c.toJS("p",n.defaultTableid,n.defcols),l=[];if(n.sources.forEach(function(d,b){d.tableid&&a.indexOf("p['"+d.alias+"']")>-1&&l.push(d)}),l.length!=0)if(l.length==1){if(!(a.match(/p\[\'.*?\'\]/g)||[]).every(function(d){return d=="p['"+l[0].alias+"']"}))return;var f=l[0];if(f.srcwherefns=f.srcwherefns?f.srcwherefns+"&&"+a:a,c instanceof V.Op&&c.op=="="&&!c.allsome){if(c.left instanceof V.Column){var u=c.left.toJS("p",n.defaultTableid,n.defcols),p=c.right.toJS("p",n.defaultTableid,n.defcols);p.indexOf("p['"+l[0].alias+"']")==-1&&(l[0].wxleftfns=u,l[0].wxrightfns=p)}if(c.right instanceof V.Column){var u=c.left.toJS("p",n.defaultTableid,n.defcols),p=c.right.toJS("p",n.defaultTableid,n.defcols);u.indexOf("p['"+l[0].alias+"']")==-1&&(l[0].wxleftfns=p,l[0].wxrightfns=u)}}c.reduced=!0;return}else c.op=="AND"&&(ko(n,c.left),ko(n,c.right))}}function Nc(n){if(!n.funcid||n.funcid.toUpperCase()!=="GROUP_CONCAT")return"";let c=n.separator!==void 0?JSON.stringify(n.separator):"undefined",a=n.order&&n.order.length>0&&n.order[0].direction?JSON.stringify(n.order[0].direction):"undefined";return`,${c},${a}`}V.Select.prototype.compileGroup=function(n){if(n.sources.length>0)var c=n.sources[0].alias;else var c="";var a=n.defcols,l=[[]];this.group&&(l=ai(this.group,n));var f=[];l.forEach(function(p){f=xn(f,p)}),n.allgroups=f,n.ingroup=[];var u="";return l.forEach(function(p){u+="var g=this.xgroups[";var d=p.map(function(L){var T=L.split(" ")[0],C=L.split(" ")[1];return T===""?"1":(n.ingroup.push(T),C)});d.length===0&&(d=["''"]),u+=d.join('+"`"+'),u+="];if(!g) {this.groups.push((g=this.xgroups[",u+=d.join('+"`"+'),u+="] = {",u+=p.map(function(L){var T=L.split(" ")[0],C=L.split(" ")[1];return T===""?"":"'"+T+"':"+C+","}).join("");var b=$r(f,p);u+=b.map(function(L){var T=L.split(" ")[0];return"'"+T+"':null,"}).join("");var U="",R="";typeof n.groupStar<"u"&&(R+="for(var f in p['"+n.groupStar+"']) {g[f]=p['"+n.groupStar+"'][f];};"),u+=n.selectGroup.map(function(L){var T=L.expression.toJS("p",c,a),C=L.nick;let te=W=>W.args[0].toJS("p",c,a);if(L instanceof V.AggrValue){if(L.distinct&&(U+=",g['$$_VALUES_"+C+"']={},g['$$_VALUES_"+C+"']["+T+"]=true"),L.aggregatorid==="SUM"){if("funcid"in L.expression){let W=te(L.expression);return`'${C}':(__alasql_tmp = ${T}, (__alasql_tmp instanceof Date) ? undefined : ((__alasql_tmp || typeof __alasql_tmp == 'number') ? __alasql_tmp : undefined)),`}return`'${C}':(__alasql_tmp = ${T}, (__alasql_tmp instanceof Date) ? undefined : ((__alasql_tmp || typeof __alasql_tmp == 'number') ? __alasql_tmp : undefined)),`}else if(L.aggregatorid==="TOTAL"){if("funcid"in L.expression){let W=te(L.expression);return`'${C}':(${W}) || typeof ${W} == 'number' ? + `:l.intofns=`params[${JSON.stringify(this.into.param)}].push(r)`);l.intofns?l.intofn=new Function("r,i,params,alasql","var y;"+l.intofns):l.intoallfns&&(l.intoallfn=new Function("columns,cb,params,alasql","var y;"+l.intoallfns))}var b=function(U,R,L){l.params=U;var T=Us(l,L,function(C,te){if(te){if(R)return R(null,te);throw te}if(l.rownums.length>0)for(var W=0,Y=C.length;W0)for(var F=0,N=l.grouprownums.length;F0)je=Ae.partitionColumns;else{var Ot=Object.keys(C[0]||{});je=[Ot[0]]}for(var Oe=null,Te=0,W=0,Y=C.length;W0)for(var F=0,N=l.windowaggrs.length;F0?Ae.partitionColumns.map(function(cs){return C[W][cs]}).join("|"):"__all__";Tt[$t]||(Tt[$t]=[]),Tt[$t].push(W)}for(var $t in Tt){var yr=Tt[$t],le=[],mr=Ae.expression&&Ae.expression.columnid;if(Ae.aggregatorid!=="COUNT"||mr&&mr!=="*")for(var Vt=0;Vt0?le.reduce(function(Vn,ni){return Vn+ni},0)/le.length:null;break;case"MAX":Zr=le.length>0?Math.max.apply(null,le):null;break;case"MIN":Zr=le.length>0?Math.min.apply(null,le):null;break}for(var Vt=0;Vt{if(!o.from)return!1;let f=new Set;o.from.forEach(p=>{p.tableid&&f.add(p.tableid),p.as&&f.add(p.as)});let u=p=>{if(!p)return!1;if(p instanceof V.Column&&p.tableid&&!f.has(p.tableid))return!0;for(let h of Object.keys(p))if(p[h]&&typeof p[h]=="object"&&u(p[h]))return!0;return!1};return u(o.where)||u(o.columns)};n.queriesfn=this.queries.map(function(o,l){var f=o.compile(n.database.databaseid);return f.query.modifier="RECORDSET",f.query.isCorrelated=c(o,n),o.queries&&o.queries.length>0&&(f.query.queriesfn=o.queries.map(function(u){var p=u.compile(n.database.databaseid);return p.query.modifier="RECORDSET",p})),f})}};function ra(n,c){if(typeof c>"u"||typeof c=="number"||typeof c=="string"||typeof c=="boolean")return c;var o=n.modifier||t.options.modifier,l=n.columns;if(n.dirtyColumns&&c.length>0){for(var f={},u=Math.min(c.length,t.options.columnlookup||10)-1;0<=u;u--)for(var p in c[u])f[p]=!0;var h=Object.keys(f).map(function(R){return{columnid:R}});if(!l||l.length===0)l=h;else{var b={};l.forEach(function(R){b[R.columnid]=!0}),h.forEach(function(R){b[R.columnid]||l.push(R)})}}else if(typeof l>"u"||l.length===0)if(c.length>0){for(var f={},u=Math.min(c.length,t.options.columnlookup||10)-1;0<=u;u--)for(var p in c[u])f[p]=!0;l=Object.keys(f).map(function(R){return{columnid:R}})}else l=[],n&&n.sources&&n.sources.forEach(R=>{R&&R.columns&&Array.isArray(R.columns)&&(l=l.concat(R.columns))});switch(o){case"VALUE":if(c.length===0)return;let R=l&&l.length>0?l[0].columnid:Object.keys(c[0])[0];return c[0][R];case"ROW":return c.length===0?void 0:Object.values(c[0]);case"COLUMN":if(c.length===0)return[];let L;l&&l.length>0?L=l[0].columnid:L=Object.keys(c[0])[0];let T=[];for(var u=0,U=c.length;ul.map(F=>Y[F.columnid]));case"INDEX":if(c.length===0)return;let C=l&&l.length>0?l[0].columnid:Object.keys(c[0])[0],te=l&&l.length>1?l[1].columnid:Object.keys(c[0])[1];return c.reduce((Y,F)=>({...Y,[F[C]]:F[te]}),{});case"RECORDSET":return new t.Recordset({columns:l,data:c});case"TEXTSTRING":if(c.length===0)return;let W=l&&l.length>0?l[0].columnid:Object.keys(c[0])[0];return c.map(Y=>Y[W]).join(` +`);case"ALASQL_DETAILS":return{data:c,columns:l,length:c.length}}return c}V.ExistsValue=class{constructor(n){Object.assign(this,n)}toString(){return"EXISTS("+this.value.toString()+")"}toType(){return"boolean"}toJS(n,c,o){return`!!this.existsfn[${this.existsidx}](params, null, ${n}).data.length`}},t.precompile=function(n,c,o){if(n){if(n.params=o,n.view&&n.select&&n.queries){n.select.queries=n.queries;return}n.queries&&(n.queriesfn=n.queries.map(function(l){var f=l.compile(c||n.database.databaseid);return f.query.modifier="RECORDSET",f})),n.exists&&(n.existsfn=n.exists.map(function(l){var f=l.compile(c||n.database.databaseid);return f.query.modifier="RECORDSET",f}))}},V.Select.prototype.compileFrom=function(n){let c=this;n.sources=[],n.aliases={},c.from&&(c.from.forEach(o=>{let l=o.as||o.tableid;if(o instanceof V.Table)n.aliases[l]={tableid:o.tableid,databaseid:o.databaseid||n.database.databaseid,type:"table"};else if(o instanceof V.Select)n.aliases[l]={type:"subquery"};else if(o instanceof V.Search)n.aliases[l]={type:"subsearch"};else if(o instanceof V.ParamValue)n.aliases[l]={type:"paramvalue"};else if(o instanceof V.FuncValue)n.aliases[l]={type:"funcvalue"};else if(o instanceof V.VarValue)n.aliases[l]={type:"varvalue"};else if(o instanceof V.FromData)n.aliases[l]={type:"fromdata"};else if(o instanceof V.Json)n.aliases[l]={type:"json"};else if(o.inserted)n.aliases[l]={type:"inserted"};else throw new Error("Wrong table at FROM");let f={alias:l,databaseid:o.databaseid||n.database.databaseid,tableid:o.tableid,joinmode:"INNER",onmiddlefn:_,srcwherefns:"",srcwherefn:_};if(o instanceof V.Table)f.columns=t.databases[f.databaseid].tables[f.tableid].columns,t.options.autocommit&&t.databases[f.databaseid].engineid&&!t.databases[f.databaseid].tables[f.tableid].view?f.datafn=(u,p,h,b,U)=>U.engines[U.databases[f.databaseid].engineid].fromTable(f.databaseid,f.tableid,h,b,u):t.databases[f.databaseid].tables[f.tableid].view?f.datafn=(u,p,h,b,U)=>{let R=U.databases[f.databaseid].tables[f.tableid];!R.select&&R.viewSelect&&(R.select=R.viewSelect.compile(R.viewDatabaseid));let L=R.select(p);return h&&(L=h(L,b,u)),L}:f.datafn=(u,p,h,b,U)=>{let R=U.databases[f.databaseid].tables[f.tableid].data;return h&&(R=h(R,b,u)),R};else if(o instanceof V.Select)f.subquery=o.compile(n.database.databaseid),typeof f.subquery.query.modifier>"u"&&(f.subquery.query.modifier="RECORDSET"),f.columns=f.subquery.query.columns,f.datafn=(u,p,h,b,U)=>{let R;return f.subquery(u.params,L=>{R=L.data,h&&(R=h(R,b,u))}),R};else if(o instanceof V.Search)f.subsearch=o,f.columns=[],f.datafn=(u,p,h,b,U)=>{let R;return f.subsearch.execute(u.database.databaseid,u.params,L=>{R=L,h&&(R=h(R,b,u))}),R};else if(o instanceof V.ParamValue){let u=`var res = alasql.prepareFromData(params['${o.param}']`;o.array&&(u+=",true"),u+=");if(cb)res=cb(res,idx,query);return res",f.datafn=new Function("query,params,cb,idx,alasql",u)}else if(o.inserted){let u="var res = alasql.prepareFromData(alasql.inserted";o.array&&(u+=",true"),u+=");if(cb)res=cb(res,idx,query);return res",f.datafn=new Function("query,params,cb,idx,alasql",u)}else if(o instanceof V.Json){let u="var res = alasql.prepareFromData("+o.toJS();o.array&&(u+=",true"),u+=");if(cb)res=cb(res,idx,query);return res",f.datafn=new Function("query,params,cb,idx,alasql",u)}else if(o instanceof V.VarValue){let u=`var res = alasql.prepareFromData(alasql.vars['${o.variable}']`;o.array&&(u+=",true"),u+=");if(cb)res=cb(res,idx,query);return res",f.datafn=new Function("query,params,cb,idx,alasql",u)}else if(o instanceof V.FuncValue){let u="var res=alasql.from["+JSON.stringify(o.funcid.toUpperCase())+"](";o.args&&o.args.length>0?(o.args[0]?u+=o.args[0].toJS("query.oldscope")+",":u+="null,",o.args[1]?u+=o.args[1].toJS("query.oldscope")+",":u+="null,"):u+="null,null,",u+="cb,idx,query); return res",f.datafn=new Function("query,params,cb,idx,alasql",u)}else if(o instanceof V.FromData)f.datafn=(u,p,h,b,U)=>{let R=o.data;return h&&(R=h(R,b,u)),R};else throw new Error("Wrong table at FROM");n.sources.push(f)}),n.defaultTableid=n.sources[0].alias)},t.prepareFromData=function(n,c){let o=n;if(typeof n=="string")o=n.split(/\r?\n/),c&&(o=o.map(l=>[l]));else if(c)o=n.map(l=>[l]);else if(typeof n=="object"&&!Array.isArray(n))if(typeof Mongo<"u"&&typeof Mongo.Collection<"u"&&n instanceof Mongo.Collection)o=n.find().fetch();else{o=[];for(let l in n)n.hasOwnProperty(l)&&o.push([l,n[l]])}return o},V.Select.prototype.compileJoins=function(n){let c=this;this.joins.forEach(o=>{let l,f,u;if(o.joinmode==="CROSS"&&(o.joinmode="INNER"),o instanceof V.Apply){u={alias:o.as,applymode:o.applymode,onmiddlefn:_,srcwherefns:"",srcwherefn:_,columns:[]},u.applyselect=o.select.compile(n.database.databaseid),u.columns=u.applyselect.query.columns,u.datafn=function(h,b,U,R,L){let T;return U&&(T=U(T,R,h)),T},n.sources.push(u);return}if(o.table){if(l=o.table,u={alias:o.as||l.tableid,databaseid:l.databaseid||n.database.databaseid,tableid:l.tableid,joinmode:o.joinmode,onmiddlefn:_,srcwherefns:"",srcwherefn:_,columns:[]},!t.databases[u.databaseid].tables[u.tableid])throw new Error("Table '"+u.tableid+"' is not exists in database '"+u.databaseid+"'");u.columns=t.databases[u.databaseid].tables[u.tableid].columns,t.options.autocommit&&t.databases[u.databaseid].engineid?u.datafn=function(h,b,U,R,L){return L.engines[L.databases[u.databaseid].engineid].fromTable(u.databaseid,u.tableid,U,R,h)}:t.databases[u.databaseid].tables[u.tableid].view?u.datafn=function(h,b,U,R,L){let T=L.databases[u.databaseid].tables[u.tableid].select(b);return U&&(T=U(T,R,h)),T}:u.datafn=function(h,b,U,R,L){let T=L.databases[u.databaseid].tables[u.tableid].data;return U&&(T=U(T,R,h)),T},n.aliases[u.alias]={tableid:l.tableid,databaseid:l.databaseid||n.database.databaseid}}else if(o.select)l=o.select,u={alias:o.as,joinmode:o.joinmode,onmiddlefn:_,srcwherefns:"",srcwherefn:_,columns:[]},u.subquery=l.compile(n.database.databaseid),typeof u.subquery.query.modifier>"u"&&(u.subquery.query.modifier="RECORDSET"),u.columns=u.subquery.query.columns,u.datafn=function(h,b,U,R,L){u.data=u.subquery(h.params,null,U,R).data;let T=u.data;return U&&(T=U(T,R,h)),T},n.aliases[u.alias]={type:"subquery"};else if(o.param)u={alias:o.as,joinmode:o.joinmode,onmiddlefn:_,srcwherefns:"",srcwherefn:_},f="let res=alasql.prepareFromData(params['"+o.param.param+"']",o.array&&(f+=",true"),f+="); if(cb) res=cb(res, idx, query); return res",u.datafn=new Function("query,params,cb,idx, alasql",f),n.aliases[u.alias]={type:"paramvalue"};else if(o.variable)u={alias:o.as,joinmode:o.joinmode,onmiddlefn:_,srcwherefns:"",srcwherefn:_},f="let res=alasql.prepareFromData(alasql.vars['"+o.variable+"']",o.array&&(f+=", true"),f+="); if(cb)res=cb(res, idx, query);return res",u.datafn=new Function("query,params,cb,idx, alasql",f),n.aliases[u.alias]={type:"varvalue"};else if(o.func){u={alias:o.as,joinmode:o.joinmode,onmiddlefn:_,srcwherefns:"",srcwherefn:_};let h="let res=alasql.from["+JSON.stringify(o.func.funcid.toUpperCase())+"](",b=o.func.args;b&&b.length>0?(b[0]?h+=b[0].toJS("query.oldscope")+", ":h+="null, ",b[1]?h+=b[1].toJS("query.oldscope")+", ":h+="null, "):h+="null, null, ",h+="cb, idx, query); return res",u.datafn=new Function("query, params, cb, idx, alasql",h),n.aliases[u.alias]={type:"funcvalue"}}let p=u.alias;if(o.natural){if(o.using||o.on)throw new Error("NATURAL JOIN cannot have USING or ON clauses");if(n.sources.length>0){let h=n.sources[n.sources.length-1],b=t.databases[h.databaseid].tables[h.tableid],U=t.databases[u.databaseid].tables[u.tableid];if(b&&U){let R=b.columns.map(T=>T.columnid),L=U.columns.map(T=>T.columnid);o.using=In(R,L).map(T=>({columnid:T}))}else throw new Error("In this version of Alasql NATURAL JOIN works for tables with predefined columns only")}}if(o.using){let h=n.sources[n.sources.length-1];u.onleftfns=o.using.map(b=>"p['"+(h.alias||h.tableid)+"']['"+b.columnid+"']").join('+"`"+'),u.onleftfn=new Function("p,params,alasql","let y;return "+u.onleftfns),u.onrightfns=o.using.map(b=>"p['"+(u.alias||u.tableid)+"']['"+b.columnid+"']").join('+"`"+'),u.onrightfn=new Function("p,params,alasql","let y;return "+u.onrightfns),u.optimization="ix"}else if(o.on)if(o.on instanceof V.Op&&o.on.op==="="&&!o.on.allsome){u.optimization="ix";let h="",b="",U="",R=!1,L=o.on.left.toJS("p",n.defaultTableid,n.defcols),T=o.on.right.toJS("p",n.defaultTableid,n.defcols);L.indexOf("p['"+p+"']")>-1&&!(T.indexOf("p['"+p+"']")>-1)?(L.match(/p\['.*?'\]/g)||[]).every(C=>C==="p['"+p+"']")?b=L:R=!0:!(L.indexOf("p['"+p+"']")>-1)&&T.indexOf("p['"+p+"']")>-1&&(T.match(/p\['.*?'\]/g)||[]).every(C=>C==="p['"+p+"']")?h=L:R=!0,T.indexOf("p['"+p+"']")>-1&&!(L.indexOf("p['"+p+"']")>-1)?(T.match(/p\['.*?'\]/g)||[]).every(C=>C==="p['"+p+"']")?b=T:R=!0:!(T.indexOf("p['"+p+"']")>-1)&&L.indexOf("p['"+p+"']")>-1&&(L.match(/p\['.*?'\]/g)||[]).every(C=>C==="p['"+p+"']")?h=T:R=!0,R&&(b="",h="",U=o.on.toJS("p",n.defaultTableid,n.defcols),u.optimization="no"),u.onleftfns=h,u.onrightfns=b,u.onmiddlefns=U||"true",u.onleftfn=new Function("p,params,alasql","let y;return "+u.onleftfns),u.onrightfn=new Function("p,params,alasql","let y;return "+u.onrightfns),u.onmiddlefn=new Function("p,params,alasql","let y;return "+u.onmiddlefns)}else u.optimization="no",u.onmiddlefns=o.on.toJS("p",n.defaultTableid,n.defcols),u.onmiddlefn=new Function("p,params,alasql","let y;return "+o.on.toJS("p",n.defaultTableid,n.defcols));n.sources.push(u)})},V.Select.prototype.compileWhere=function(n){if(this.where){if(typeof this.where=="function")return this.where;var c=this.where.toJS("p",n.defaultTableid,n.defcols);return n.wherefns=c,new Function("p,params,alasql","var y;return "+c)}else return function(){return!0}};function za(n,c,o){n.onleftfn||(n.onleftfns=c,n.onrightfns=o,n.onleftfn=new Function("p,params,alasql","var y;return "+c),n.onrightfn=new Function("p,params,alasql","var y;return "+o),n.optimization="ix")}function Jo(n,c,o){var l="("+c+"=="+o+")";n.srcwherefns=n.srcwherefns?n.srcwherefns+"&&"+l:l}V.Select.prototype.compileWhereJoins=function(n){if(this.where&&!(n.sources.length<=1)){var c=n.sources.some(function(f,u){return u>0&&f.onleftfn});if(!c){var o=F1(this.where),l={};n.sources.forEach(function(f,u){l[f.alias]=u}),o.forEach(function(f){if(f.op==="="&&!f.allsome){var u=Bo(f.left),p=Bo(f.right),h=f.left.toJS("p",n.defaultTableid,n.defcols),b=f.right.toJS("p",n.defaultTableid,n.defcols);if(u.length===1&&p.length===1){var U=u[0],R=p[0];if(l[U]===void 0||l[R]===void 0)return;var L=l[U],T=l[R];T>L?za(n.sources[T],h,b):L>T&&za(n.sources[L],b,h)}else u.length===1&&p.length===0?l[u[0]]!==void 0&&Jo(n.sources[l[u[0]]],h,b):u.length===0&&p.length===1&&l[p[0]]!==void 0&&Jo(n.sources[l[p[0]]],h,b)}}),n.sources.forEach(function(f){f.srcwherefns&&(f.srcwherefn=new Function("p,params,alasql","var y;return "+f.srcwherefns))})}}};function F1(n){var c=[];function o(l){if(l){if(l.expression){o(l.expression);return}l instanceof V.Op&&(l.op==="AND"?(o(l.left),o(l.right)):l.op==="="&&c.push(l))}}return o(n),c}function Bo(n){var c=[];function o(l){if(l){if(l instanceof V.Column){l.tableid&&c.indexOf(l.tableid)===-1&&c.push(l.tableid);return}l instanceof V.Op&&(o(l.left),o(l.right))}}return o(n),c}function ko(n,c){if(!c)return!1;if(c instanceof V.Op&&!(c.op!="="&&c.op!="AND")&&!c.allsome){var o=c.toJS("p",n.defaultTableid,n.defcols),l=[];if(n.sources.forEach(function(h,b){h.tableid&&o.indexOf("p['"+h.alias+"']")>-1&&l.push(h)}),l.length!=0)if(l.length==1){if(!(o.match(/p\[\'.*?\'\]/g)||[]).every(function(h){return h=="p['"+l[0].alias+"']"}))return;var f=l[0];if(f.srcwherefns=f.srcwherefns?f.srcwherefns+"&&"+o:o,c instanceof V.Op&&c.op=="="&&!c.allsome){if(c.left instanceof V.Column){var u=c.left.toJS("p",n.defaultTableid,n.defcols),p=c.right.toJS("p",n.defaultTableid,n.defcols);p.indexOf("p['"+l[0].alias+"']")==-1&&(l[0].wxleftfns=u,l[0].wxrightfns=p)}if(c.right instanceof V.Column){var u=c.left.toJS("p",n.defaultTableid,n.defcols),p=c.right.toJS("p",n.defaultTableid,n.defcols);u.indexOf("p['"+l[0].alias+"']")==-1&&(l[0].wxleftfns=p,l[0].wxrightfns=u)}}c.reduced=!0;return}else c.op=="AND"&&(ko(n,c.left),ko(n,c.right))}}function $c(n){if(!n.funcid||n.funcid.toUpperCase()!=="GROUP_CONCAT")return"";let c=n.separator!==void 0?JSON.stringify(n.separator):"undefined",o=n.order&&n.order.length>0&&n.order[0].direction?JSON.stringify(n.order[0].direction):"undefined";return`,${c},${o}`}V.Select.prototype.compileGroup=function(n){if(n.sources.length>0)var c=n.sources[0].alias;else var c="";var o=n.defcols,l=[[]];this.group&&(l=di(this.group,n));var f=[];l.forEach(function(p){f=_n(f,p)}),n.allgroups=f,n.ingroup=[];var u="";return l.forEach(function(p){u+="var g=this.xgroups[";var h=p.map(function(L){var T=L.split(" ")[0],C=L.split(" ")[1];return T===""?"1":(n.ingroup.push(T),C)});h.length===0&&(h=["''"]),u+=h.join('+"`"+'),u+="];if(!g) {this.groups.push((g=this.xgroups[",u+=h.join('+"`"+'),u+="] = {",u+=p.map(function(L){var T=L.split(" ")[0],C=L.split(" ")[1];return T===""?"":"'"+T+"':"+C+","}).join("");var b=$r(f,p);u+=b.map(function(L){var T=L.split(" ")[0];return"'"+T+"':null,"}).join("");var U="",R="";typeof n.groupStar<"u"&&(R+="for(var f in p['"+n.groupStar+"']) {g[f]=p['"+n.groupStar+"'][f];};"),u+=n.selectGroup.map(function(L){var T=L.expression.toJS("p",c,o),C=L.nick;let te=W=>W.args[0].toJS("p",c,o);if(L instanceof V.AggrValue){if(L.distinct&&(U+=",g['$$_VALUES_"+C+"']={},g['$$_VALUES_"+C+"']["+T+"]=true"),L.aggregatorid==="SUM"){if("funcid"in L.expression){let W=te(L.expression);return`'${C}':(__alasql_tmp = ${T}, (__alasql_tmp instanceof Date) ? undefined : ((__alasql_tmp || typeof __alasql_tmp == 'number') ? __alasql_tmp : undefined)),`}return`'${C}':(__alasql_tmp = ${T}, (__alasql_tmp instanceof Date) ? undefined : ((__alasql_tmp || typeof __alasql_tmp == 'number') ? __alasql_tmp : undefined)),`}else if(L.aggregatorid==="TOTAL"){if("funcid"in L.expression){let W=te(L.expression);return`'${C}':(${W}) || typeof ${W} == 'number' ? ${W} : ${W} == 'string' && typeof Number(${W}) == 'number' ? Number(${W}) : typeof ${W} == 'boolean' ? Number(${W}) : 0,`}return`'${C}':(${T})|| typeof ${T} == 'number' ? ${T} : ${T} == 'string' && typeof Number(${T}) == 'number' ? Number(${T}) : typeof ${T} === 'boolean' ? Number(${T}) : 0,`}else{if(L.aggregatorid==="FIRST"||L.aggregatorid==="LAST")return"'"+C+"':"+T+",";if(L.aggregatorid==="MIN"){if("funcid"in L.expression){let W=te(L.expression);return`'${C}': (__alasql_tmp = ${T}, __alasql_tmp !== null && (typeof __alasql_tmp == 'number' || typeof __alasql_tmp == 'bigint' || (typeof __alasql_tmp == 'object' && (typeof Number(__alasql_tmp) == 'number' || __alasql_tmp instanceof Date))) ? __alasql_tmp : undefined),`}return`'${C}': (__alasql_tmp = ${T}, __alasql_tmp !== null && (typeof __alasql_tmp == 'number' || typeof __alasql_tmp == 'bigint' || (typeof __alasql_tmp == 'object' && (typeof Number(__alasql_tmp) == 'number' || __alasql_tmp instanceof Date))) ? __alasql_tmp : undefined),`}else if(L.aggregatorid==="MAX"){if("funcid"in L.expression){let W=te(L.expression);return`'${C}': (__alasql_tmp = ${T}, __alasql_tmp !== null && (typeof __alasql_tmp == 'number' || typeof __alasql_tmp == 'bigint' || (typeof __alasql_tmp == 'object' && (typeof Number(__alasql_tmp) == 'number' || __alasql_tmp instanceof Date))) ? __alasql_tmp : undefined),`}return`'${C}' : (${T} !== null && (typeof ${T} == 'number' || typeof ${T} == 'bigint') ? ${T} : ${T} !== null && typeof ${T} == 'object' ? - typeof Number(${T}) == 'number' ? ${T} : undefined : undefined),`}else{if(L.aggregatorid==="ARRAY")return`'${C}':[${T}],`;if(L.aggregatorid==="COUNT")return L.expression.columnid==="*"?`'${C}':1,`:`'${C}':(typeof ${T} == "undefined" || ${T} === null) ? 0 : 1,`;if(L.aggregatorid==="AVG")return n.removeKeys.push(`_SUM_${C}`),n.removeKeys.push(`_COUNT_${C}`),`'${C}':(function() { var t = ${T}; return (t instanceof Date) ? undefined : t; })(),'_SUM_${C}':(function() { var t = ${T}; return (t instanceof Date) ? undefined : (t || 0); })(),'_COUNT_${C}':(typeof ${T} == "undefined" || ${T} === null) ? 0 : 1,`;if(L.aggregatorid==="AGGR")return U+=`,g['${C}']=${L.expression.toJS("g",-1)}`,"";if(L.aggregatorid==="REDUCE"){n.aggrKeys.push(L);let W=Nc(L);if(L.args&&L.args.length>1){let Y=L.args.map(B=>B.toJS("p",c,a)).join(",");return`'${C}':alasql.aggr['${L.funcid}'](${Y},undefined,1${W}),`}else return`'${C}':alasql.aggr['${L.funcid}'](${T},undefined,1${W}),`}}}return""}return""}).join(""),u+="}"+U+",g));"+R+"} else {",u+=n.selectGroup.map(function(L){var T=L.nick,C=L.expression.toJS("p",c,a);let te=B=>B.args[0].toJS("p",c,a);if(L instanceof V.AggrValue){var W="",Y="";if(L.distinct&&(W=`if(typeof ${C}!="undefined" && (!g['$$_VALUES_${T}'][${C}])) {`,Y=`g['$$_VALUES_${T}'][${C}]=true;}`),L.aggregatorid==="SUM"){if("funcid"in L.expression){let B=te(L.expression);return W+` + typeof Number(${T}) == 'number' ? ${T} : undefined : undefined),`}else{if(L.aggregatorid==="ARRAY")return`'${C}':[${T}],`;if(L.aggregatorid==="COUNT")return L.expression.columnid==="*"?`'${C}':1,`:`'${C}':(typeof ${T} == "undefined" || ${T} === null) ? 0 : 1,`;if(L.aggregatorid==="AVG")return n.removeKeys.push(`_SUM_${C}`),n.removeKeys.push(`_COUNT_${C}`),`'${C}':(function() { var t = ${T}; return (t instanceof Date) ? undefined : t; })(),'_SUM_${C}':(function() { var t = ${T}; return (t instanceof Date) ? undefined : (t || 0); })(),'_COUNT_${C}':(typeof ${T} == "undefined" || ${T} === null) ? 0 : 1,`;if(L.aggregatorid==="AGGR")return U+=`,g['${C}']=${L.expression.toJS("g",-1)}`,"";if(L.aggregatorid==="REDUCE"){n.aggrKeys.push(L);let W=$c(L);if(L.args&&L.args.length>1){let Y=L.args.map(F=>F.toJS("p",c,o)).join(",");return`'${C}':alasql.aggr['${L.funcid}'](${Y},undefined,1${W}),`}else return`'${C}':alasql.aggr['${L.funcid}'](${T},undefined,1${W}),`}}}return""}return""}).join(""),u+="}"+U+",g));"+R+"} else {",u+=n.selectGroup.map(function(L){var T=L.nick,C=L.expression.toJS("p",c,o);let te=F=>F.args[0].toJS("p",c,o);if(L instanceof V.AggrValue){var W="",Y="";if(L.distinct&&(W=`if(typeof ${C}!="undefined" && (!g['$$_VALUES_${T}'][${C}])) {`,Y=`g['$$_VALUES_${T}'][${C}]=true;}`),L.aggregatorid==="SUM"){if("funcid"in L.expression){let F=te(L.expression);return W+` { const __g_colas = g['${T}']; - const __typeof_colexp1 = typeof ${B}; - const __colexp1 = ${B}; + const __typeof_colexp1 = typeof ${F}; + const __colexp1 = ${F}; - if (__g_colas == null && ${B} == null) { + if (__g_colas == null && ${F} == null) { g['${T}'] = undefined; } else if (typeof __g_colas === 'bigint' || typeof __colexp1 === 'bigint') { g['${T}'] = BigInt(__g_colas) + BigInt(__colexp); } else if ((typeof __g_colas !== 'object' && typeof __g_colas !== 'number' && __typeof_colexp1 !== 'object' && __typeof_colexp1 !== 'number') || - (__g_colas == null || (typeof __g_colas !== 'number' && typeof __g_colas !== 'object')) && (${B} == null || (__typeof_colexp1 !== 'number' && __typeof_colexp1 !== 'object'))) { + (__g_colas == null || (typeof __g_colas !== 'number' && typeof __g_colas !== 'object')) && (${F} == null || (__typeof_colexp1 !== 'number' && __typeof_colexp1 !== 'object'))) { g['${T}'] = undefined; } else if ((typeof __g_colas !== 'object' && typeof __g_colas !== 'number' && __typeof_colexp1 == 'number') || (__g_colas == null && __typeof_colexp1 == 'number')) { g['${T}'] = ${C}; - } else if (typeof __g_colas == 'number' && ${B} == null) { + } else if (typeof __g_colas == 'number' && ${F} == null) { g['${T}'] = __g_colas; } else if (__g_colas instanceof Date || __colexp1 instanceof Date) { // Date objects cause string concatenation with +=, return undefined instead @@ -132,9 +132,9 @@ Expecting `+g0.join(", ")+", got '"+(this.terminals_[Vi]||Vi)+"'":Ch="Parse erro g['${T}'] += ${C} || 0; } } - `+Y}else if(L.aggregatorid==="TOTAL"){if("funcid"in L.expression){let B=te(L.expression);return W+`{ + `+Y}else if(L.aggregatorid==="TOTAL"){if("funcid"in L.expression){let F=te(L.expression);return W+`{ const __g_colas = g['${T}']; - const __colexp1 = ${B}; + const __colexp1 = ${F}; const __typeof_g_colas = typeof __g_colas; const __typeof_colexp1 = typeof __colexp1; @@ -178,8 +178,8 @@ Expecting `+g0.join(", ")+", got '"+(this.terminals_[Vi]||Vi)+"'":Ch="Parse erro g['${T}']++; ${Y}`:`${W} if(typeof ${C}!="undefined" && ${C} !== null) g['${T}']++; - ${Y}`;if(L.aggregatorid==="ARRAY")return W+"g['"+T+"'].push("+C+");"+Y;if(L.aggregatorid==="MIN"){if("funcid"in L.expression){let B=te(L.expression);return W+`if ((g['${T}'] == null && ${B} !== null) ? y = ${C} : - (g['${T}'] !== null && ${B} == null) ? y = g['${T}'] : + ${Y}`;if(L.aggregatorid==="ARRAY")return W+"g['"+T+"'].push("+C+");"+Y;if(L.aggregatorid==="MIN"){if("funcid"in L.expression){let F=te(L.expression);return W+`if ((g['${T}'] == null && ${F} !== null) ? y = ${C} : + (g['${T}'] !== null && ${F} == null) ? y = g['${T}'] : ((y = ${C}) < g['${T}'])) { if (typeof y == 'number' || typeof y == 'bigint') { g['${T}'] = y; @@ -206,8 +206,8 @@ Expecting `+g0.join(", ")+", got '"+(this.terminals_[Vi]||Vi)+"'":Ch="Parse erro g['${T}'] = g['${T}']; } else if(g['${T}']!== null && typeof g['${T}'] == 'object') { g['${T}'] = Number(g['${T}']); - }`+Y}else if(L.aggregatorid==="MAX"){if("funcid"in L.expression){let B=te(L.expression);return W+`if ((g['${T}'] == null && ${B} !== null) ? y = ${C} : - (g['${T}'] !== null && ${B} == null) ? y = g['${T}'] : + }`+Y}else if(L.aggregatorid==="MAX"){if("funcid"in L.expression){let F=te(L.expression);return W+`if ((g['${T}'] == null && ${F} !== null) ? y = ${C} : + (g['${T}'] !== null && ${F} == null) ? y = g['${T}'] : ((y = ${C}) > g['${T}'])) { if (typeof y == 'number' || typeof y == 'bigint') { g['${T}'] = y; @@ -251,39 +251,39 @@ Expecting `+g0.join(", ")+", got '"+(this.terminals_[Vi]||Vi)+"'":Ch="Parse erro } ${Y}`;if(L.aggregatorid==="AGGR")return`${W} g['${T}']=${L.expression.toJS("g",-1)}; - ${Y}`;if(L.aggregatorid==="REDUCE"){let B=Nc(L);if(L.args&&L.args.length>1){let N=L.args.map(Ae=>Ae.toJS("p",c,a)).join(",");return`${W} - g['${T}'] = alasql.aggr.${L.funcid}(${N},g['${T}'],2${B}); + ${Y}`;if(L.aggregatorid==="REDUCE"){let F=$c(L);if(L.args&&L.args.length>1){let N=L.args.map(Ae=>Ae.toJS("p",c,o)).join(",");return`${W} + g['${T}'] = alasql.aggr.${L.funcid}(${N},g['${T}'],2${F}); ${Y}`}else return`${W} - g['${T}'] = alasql.aggr.${L.funcid}(${C},g['${T}'],2${B}); - ${Y}`}}}return""}return""}).join(""),u+="}"}),new Function("p,params,alasql","var y;"+u)};var Fn=/^(SUM|MAX|MIN|FIRST|LAST|AVG|ARRAY|REDUCE|TOTAL)$/;function un(n,c,a){var l="",f=[],u={};return c.forEach(function(p){n.ixsources={},n.sources.forEach(function(b){n.ixsources[b.alias]=b});var d;if(n.ixsources[p])var d=n.ixsources[p].columns;a&&t.options.joinstar=="json"&&(l+="r['"+p+"']={};"),d&&d.length>0?d.forEach(function(b){let U=w(b.columnid);if(a&&t.options.joinstar=="underscore")f.push("'"+p+"_"+U+"':p['"+p+"']['"+U+"']");else if(a&&t.options.joinstar=="json")l+="r['"+p+"']['"+U+"']=p['"+p+"']['"+U+"'];";else{var R="p['"+p+"']['"+U+"']";if(u[b.columnid]){var L=R+" !== undefined ? "+R+" : "+u[b.columnid].value;f[u[b.columnid].id]=u[b.columnid].key+L,u[b.columnid].value=L}else{var T="'"+U+"':";f.push(T+R),u[b.columnid]={id:f.length-1,value:R,key:T}}}n.selectColumns[U]=!0;var C={columnid:b.columnid,dbtypeid:b.dbtypeid,dbsize:b.dbsize,dbprecision:b.dbprecision,dbenum:b.dbenum};n.columns.push(C),n.xcolumns[C.columnid]=C}):(a&&t.options.joinstar=="json"?l+="r['"+w(p)+"']=p['"+w(p)+"'];":a&&t.options.joinstar=="underscore"?l+='var w=p["'+w(p)+'"];for(var k in w){r["'+w(p)+'_"+k]=w[k]};':l+='var w=p["'+w(p)+'"];for(var k in w){r[k]=w[k]};',n.dirtyColumns=!0)}),{s:f.join(","),sp:l}}function fi(n){if(!n||n.op!=="->")return null;for(var c=[],a=n;a&&a.op==="->";){if(typeof a.right=="string")c.unshift(a.right);else if(typeof a.right=="number")c.unshift(a.right);else return null;a=a.left}return a&&a.columnid?(c.unshift(a.columnid),c):null}V.Select.prototype.compileSelect1=function(n,c){var a=this;n.columns=[],n.xcolumns={},n.selectColumns={},n.dirtyColumns=!1;var l="var r={",f="",u=[];return this.columns.forEach(function(p){if(p instanceof V.Column)if(p.columnid==="*")if(p.func)f+="r=params['"+p.param+"'](p['"+n.sources[0].alias+"'],p,params,alasql);";else if(p.tableid){var d=un(n,[p.tableid],!1);d.s&&(u=u.concat(d.s)),f+=d.sp}else{var d=un(n,Object.keys(n.aliases),!0);d.s&&(u=u.concat(d.s)),f+=d.sp}else{var b=p.tableid,U=p.databaseid||n.sources[0].databaseid||n.database.databaseid;if(b||(b=n.defcols[p.columnid]),b||(b=n.defaultTableid),p.columnid!=="_"){var R=c&&c.length>1&&Array.isArray(c[0])&&c[0].length>=1&&c[0][0].hasOwnProperty("sheetid");if(R)f='var r={};var w=p["'+b+'"];var cols=['+a.columns.map(function(Tt){return"'"+Tt.columnid+"'"}).join(",")+"];var colas=["+a.columns.map(function(Tt){return"'"+(Tt.as||Tt.columnid)+"'"}).join(",")+"];for (var i=0;i1&&(!n.defcols[p.columnid]||n.defcols[p.columnid]==="-");if(L){var T=Object.keys(n.aliases),C=T.map(function(Tt){return"p['"+Tt+"']['"+p.columnid+"']"}).join(" ?? ");u.push("'"+w(p.as||p.columnid)+"':("+C+")")}else u.push("'"+w(p.as||p.columnid)+"':p['"+b+"']['"+p.columnid+"']")}}else u.push("'"+w(p.as||p.columnid)+"':p['"+b+"']");if(n.selectColumns[w(p.as||p.columnid)]=!0,n.aliases[b]&&n.aliases[b].type==="table"){if(!t.databases[U].tables[n.aliases[b].tableid])throw new Error("Table '"+b+"' does not exist in database");var te=t.databases[U].tables[n.aliases[b].tableid].columns,W=t.databases[U].tables[n.aliases[b].tableid].xcolumns;if(W&&te.length>0){var Y=W[p.columnid];if(Y===void 0)throw new Error("Column does not exist: "+p.columnid);var B={columnid:p.as||p.columnid,dbtypeid:Y.dbtypeid,dbsize:Y.dbsize,dbpecision:Y.dbprecision,dbenum:Y.dbenum};n.columns.push(B),n.xcolumns[B.columnid]=B}else{var B={columnid:p.as||p.columnid};n.columns.push(B),n.xcolumns[B.columnid]=B,n.dirtyColumns=!0}}else{var B={columnid:p.as||p.columnid};n.columns.push(B),n.xcolumns[B.columnid]=B}}else if(p instanceof V.AggrValue){p.as||(p.as=w(p.toString())),p.over?n.windowaggrs.push({as:p.as,aggregatorid:p.aggregatorid,expression:p.expression,partitionColumns:p.over.partition?p.over.partition.map(function($t){return $t.columnid||$t.toString()}):[]}):(a.group||(a.group=[""]),Fn.test(p.aggregatorid)?u.push("'"+w(p.as)+"':"+h(p.expression.toJS("p",n.defaultTableid,n.defcols))):p.aggregatorid==="COUNT"&&u.push("'"+w(p.as)+"':1"));var B={columnid:p.as||p.columnid||p.toString()};n.columns.push(B),n.xcolumns[B.columnid]=B}else{var N=n.intoObject&&!p.as?fi(p):null;if(N&&N.length>1){for(var Ae=h(p.toJS("p",n.defaultTableid,n.defcols)),je=0;je0&&!this.union&&!this.unionall&&!this.except&&!this.intersect&&this.orderColumns.forEach(function(l,f){var u="$$$"+f;l._useColumnIndex!==void 0?a+="var keys=Object.keys(r);r['"+u+"']=r[keys["+l.columnIndex+"]];":l instanceof V.Column&&n.xcolumns[l.columnid]?a+="r['"+u+"']=r['"+l.columnid+"'];":l instanceof V.ParamValue&&n.xcolumns[c[l.param]]?a+="r['"+u+"']=r['"+c[l.param]+"'];":a+="r['"+u+"']="+l.toJS("p",n.defaultTableid,n.defcols)+";",n.removeKeys.push(u)}),new Function("p,params,alasql","var y;"+a+"return r")},V.Select.prototype.compileSelectGroup0=function(n){var c=this,a=null,l=null;c.group&&(a={},c.group.forEach(function(f,u){f instanceof V.Column&&f.columnid&&!f.tableid&&(a[f.columnid]=u)}),l={},c.columns.forEach(function(f){f instanceof V.Column&&f.columnid&&(l[f.columnid]=!0)})),c.columns.forEach(function(f,u){if(f instanceof V.Column&&f.columnid==="*")n.groupStar=f.tableid||"default";else{var p;f instanceof V.Column?p=w(f.columnid):p=w(f.toString(!0));for(var d=0;d-1&&(c.group[b].nick=p),f.as&&a&&a.hasOwnProperty(f.as)&&!l[f.as]){var U=a[f.as],R=mn(f);delete R.as,R.nick=p,c.group[U]=R}}f.funcid&&(f.funcid.toUpperCase()==="ROWNUM"||f.funcid.toUpperCase()==="ROW_NUMBER")&&(f.over&&f.over.partition?n.grouprownums.push({as:f.as,partitionColumns:f.over.partition.map(function(L){return L.columnid||L.toString()})}):n.rownums.push(f.as)),f.funcid&&f.funcid.toUpperCase()==="GROUP_ROW_NUMBER"&&n.grouprownums.push({as:f.as,columnIndex:0})}}),this.columns.forEach(function(f){f.findAggregator&&f.findAggregator(n)}),this.having&&this.having.findAggregator&&this.having.findAggregator(n)},V.Select.prototype.compileSelectGroup1=function(n){var c=this,a="var r = {};";return c.columns.forEach(function(l){if(l instanceof V.Column&&l.columnid==="*")return a+="for(var k in g) {r[k]=g[k]};","";var f=l.as;f===void 0&&(l instanceof V.Column?f=w(l.columnid):f=l.nick),n.groupColumns[f]=l.nick,a+="r['"+f+"']=",a+=h(l.toJS("g",""))+";";for(var u=0;u-1;if(d){var b=u&&u.nick||f.nick;a+="r['"+(f.as||f.nick)+"']=g['"+b+"'];"}}}),this.orderColumns&&this.orderColumns.length>0&&!this.union&&!this.unionall&&!this.except&&!this.intersect&&this.orderColumns.forEach(function(f,u){var p="$$$"+u;f._useColumnIndex!==void 0?a+="var keys=Object.keys(r);r['"+p+"']=r[keys["+f.columnIndex+"]];":f instanceof V.Column&&n.groupColumns[f.columnid]?a+="r['"+p+"']=r['"+f.columnid+"'];":a+="r['"+p+"']="+f.toJS("g","")+";",n.removeKeys.push(p)}),new Function("g,params,alasql","var y;"+a+"return r")},V.Select.prototype.compileRemoveColumns=function(n){var c=this;typeof this.removecolumns<"u"&&(n.removeKeys=n.removeKeys.concat(this.removecolumns.filter(function(a){return typeof a.like>"u"}).map(function(a){return a.columnid})),n.removeLikeKeys=this.removecolumns.filter(function(a){return typeof a.like<"u"}).map(function(a){return a.like.value}))},V.Select.prototype.compileHaving=function(n){if(this.having){var c=this.having.toJS("g",-1);return n.havingfns=c,new Function("g,params,alasql","var y;return "+c)}return function(){return!0}},V.Select.prototype.compileOrder=function(n,c){var a=this;if(a.orderColumns=[],this.order){if(this.order&&this.order.length==1&&this.order[0].expression&&typeof this.order[0].expression=="function"){var l=this.order[0].expression,f=this.order[0].nullsOrder=="FIRST"?-1:this.order[0].nullsOrder=="LAST"?1:0;return function(d,b){var U=l(d),R=l(b);if(f){if(U==null)return R==null?0:f;if(R==null)return-f}return U>R?1:U==R?0:-1}}var u="",p="";return this.order.forEach(function(d,b){if(d.expression instanceof V.NumValue){if(d.expression.value<1)throw new Error(`Invalid column number ${d.expression.value}. Column numbers must be at least 1.`);var R=a.columns[d.expression.value-1],U=a.columns.length===1&&a.columns[0]instanceof V.Column&&a.columns[0].columnid==="*";if(U)R={_useColumnIndex:!0,columnIndex:d.expression.value-1};else{if(d.expression.value>a.columns.length)throw new Error(`You are trying to order by column number ${d.expression.value} but you have only selected ${a.columns.length} columns.`);R instanceof V.Column&&R.columnid==="*"&&(R={_useColumnIndex:!0,columnIndex:d.expression.value-1})}}else if(d.expression instanceof V.StringValue)var R=new V.Column({columnid:d.expression.value});else var R=d.expression;a.orderColumns.push(R);var L="$$$"+b,T="",C;if(d.expression instanceof V.Column?C=d.expression.columnid:d.expression instanceof V.ParamValue?C=c[d.expression.param]:d.expression instanceof V.StringValue&&(C=d.expression.value),C){if(t.options.valueof)T=".valueOf()";else if(n.xcolumns[C]){var te=n.xcolumns[C].dbtypeid;(te=="DATE"||te=="DATETIME"||te=="DATETIME2"||te=="STRING"||te=="NUMBER")&&(T=".valueOf()")}}d.nocase&&(T+=".toUpperCase()"),d.nullsOrder&&(d.nullsOrder=="FIRST"?u+="if((a['"+L+"'] != null) && (b['"+L+"'] == null)) return 1;":d.nullsOrder=="LAST"&&(u+="if((a['"+L+"'] == null) && (b['"+L+"'] != null)) return 1;"),u+="if((a['"+L+"'] == null) == (b['"+L+"'] == null)) {",p+="}"),u+="if((a['"+L+"']||'')"+T+(d.direction=="ASC"?">":"<")+"(b['"+L+"']||'')"+T+")return 1;",u+="if((a['"+L+"']||'')"+T+"==(b['"+L+"']||'')"+T+"){",p+="}"}),u+="return 0;",u+=p+"return -1",n.orderfns=u,new Function("a,b","var y;"+u)}},V.Select.prototype.compilePivot=function(n){var c=this,a=c.pivot.columnid,l=c.pivot.expr.aggregatorid,f=c.pivot.inlist,u=null;if(c.pivot.expr.expression.hasOwnProperty("columnid")?u=c.pivot.expr.expression.columnid:u=c.pivot.expr.expression.expression.columnid,u==null)throw"columnid not found";return f&&(f=f.map(function(p){return p.expr.columnid})),function(){var p=this;if(!p.data||p.data.length===0){p.columns=[];return}var d=Object.keys(p.data[0]),b=d.filter(function(Ae){return Ae!==a&&Ae!==u}),U=[],R={},L={},T={},C=[];if(p.data.forEach(function(Ae){if(!(f&&f.indexOf(Ae[a])===-1)){var je=b.map(function(ht){return Ae[ht]===void 0||Ae[ht]===null?"":Ae[ht]}).join("`"),Ot=L[je];Ot||(Ot={},L[je]=Ot,C.push(Ot),b.forEach(function(ht){Ot[ht]=Ae[ht]})),T[je]||(T[je]={});var Oe=Ae[a],Te=Ae[u];if(T[je][Oe]?Te!==null&&typeof Te<"u"&&T[je][Oe]++:T[je][Oe]=Te!==null&&typeof Te<"u"?1:0,R[Oe]||(R[Oe]=!0,U.push(Oe)),l=="SUM"||l=="AVG"||l=="TOTAL")Te!==null&&typeof Te<"u"?Ot[Oe]=typeof Ot[Oe]>"u"||Ot[Oe]===null?Number(Te):Ot[Oe]+Number(Te):typeof Ot[Oe]>"u"&&(Ot[Oe]=null);else if(l=="COUNT")u==="*"||Te!==null&&typeof Te<"u"?Ot[Oe]=(Ot[Oe]||0)+1:typeof Ot[Oe]>"u"&&(Ot[Oe]=0);else if(l=="MIN")Te!==null&&typeof Te<"u"?(typeof Ot[Oe]>"u"||Ot[Oe]===null||Te"u"&&(Ot[Oe]=null);else if(l=="MAX")Te!==null&&typeof Te<"u"?(typeof Ot[Oe]>"u"||Ot[Oe]===null||Te>Ot[Oe])&&(Ot[Oe]=Te):typeof Ot[Oe]>"u"&&(Ot[Oe]=null);else if(l=="FIRST")typeof Ot[Oe]>"u"&&(Ot[Oe]=Te);else if(l=="LAST")Ot[Oe]=Te;else if(t.aggr[l])typeof Ot[Oe]>"u"?Ot[Oe]=t.aggr[l](Te,void 0,1):Ot[Oe]=t.aggr[l](Te,Ot[Oe],2);else throw new Error("Unknown aggregator in PIVOT clause: "+l)}}),l=="AVG")for(var te in L){var W=L[te];for(var Y in T[te])if(W.hasOwnProperty(Y)&&W[Y]!==null){var B=T[te][Y];B>0?W[Y]=W[Y]/B:W[Y]=null}}p.data=C,f?U=f:U.sort();let N=p.columns.find(Ae=>Ae.columnid===u);if(!N&&p.sources&&p.sources.length>0){let Ae=p.sources[0].tableid,je=p.sources[0].databaseid;Ae&&je&&t.databases[je]?.tables?.[Ae]?.xcolumns&&(N=t.databases[je].tables[Ae].xcolumns[u])}N=N||{columnid:u,dbtypeid:"OBJECT"},p.columns=p.columns.filter(function(Ae){return b.includes(Ae.columnid)}),U.forEach(function(Ae){var je=mn(N);je.columnid=Ae;let Ot=(N.dbtypeid||"OBJECT").toUpperCase(),Oe=["INT","INTEGER","SMALLINT","BIGINT","SERIAL","SMALLSERIAL","BIGSERIAL"],Te=[...Oe,"NUMBER","FLOAT","DECIMAL","NUMERIC","MONEY"];l==="COUNT"?je.dbtypeid="INT":l==="AVG"?Oe.includes(Ot)?je.dbtypeid=N.dbtypeid:je.dbtypeid="FLOAT":l==="SUM"||l==="TOTAL"?Te.includes(Ot)?je.dbtypeid=N.dbtypeid:je.dbtypeid="FLOAT":l==="MIN"||l==="MAX"||l==="FIRST"||l==="LAST"?je.dbtypeid=N.dbtypeid:je.dbtypeid||(je.dbtypeid="OBJECT"),p.columns.push(je)})}},V.Select.prototype.compileUnpivot=function(n){var c=this,a=c.unpivot.tocolumnid,l=c.unpivot.forcolumnid,f=c.unpivot.inlist.map(function(u){return u.columnid});return function(){var u=[],p=n.columns.map(function(d){return d.columnid}).filter(function(d){return f.indexOf(d)==-1&&d!=l&&d!=a});n.data.forEach(function(d){f.forEach(function(b){var U={};p.forEach(function(R){U[R]=d[R]}),U[l]=b,U[a]=d[b],u.push(U)})}),n.data=u}};let mi=(n,c)=>{let a=[],l=0,f=n.length;for(let u=0;u{let a=[],l=n.length,f=1<n.reduce((a,l)=>(a=a.concat(ai(l,c)),a),[]),Oi=(n,c)=>{let a=[];for(let l=0;lf.concat(`${n[l].nick} ${n[l].toJS("p",c.sources[0].alias,c.defcols)}`));else if(n[l]instanceof V.FuncValue)c.groupColumns[w(n[l].toString())]=w(n[l].toString()),a=a.map(f=>f.concat(`${w(n[l].toString())} ${n[l].toJS("p",c.sources[0].alias,c.defcols)}`));else if(n[l]instanceof V.GroupExpression)if(n[l].type=="ROLLUP")a=Oi(a,mi(n[l].group,c));else if(n[l].type=="CUBE")a=Oi(a,ti(n[l].group,c));else if(n[l].type=="GROUPING SETS")a=Oi(a,Fi(n[l].group,c));else throw new Error("Unknown grouping function");else n[l]===""?a=[["1 1"]]:a=a.map(f=>f.concat(`${w(n[l].toString())} ${n[l].toJS("p",c.sources[0].alias,c.defcols)}`));return a}return n instanceof V.FuncValue?(c.groupColumns[w(n.toString())]=w(n.toString()),[`${n.toString()} ${n.toJS("p",c.sources[0].alias,c.defcols)}`]):n instanceof V.Column?(n.nick=w(n.columnid),c.groupColumns[n.nick]=n.nick,[`${n.nick} ${n.toJS("p",c.sources[0].alias,c.defcols)}`]):(c.groupColumns[w(n.toString())]=w(n.toString()),[`${w(n.toString())} ${n.toJS("p",c.sources[0].alias,c.defcols)}`])}V.Select.prototype.compileDefCols=function(n,c){var a={".":{}};return this.from&&this.from.forEach(function(l){if(a["."][l.as||l.tableid]=!0,l instanceof V.Table){var f=l.as||l.tableid,u=t.databases[l.databaseid||c].tables[l.tableid];if(u===void 0)throw new Error("Table does not exist: "+l.tableid);u.columns&&u.columns.forEach(function(p){a[p.columnid]?a[p.columnid]="-":a[p.columnid]=f})}else if(!(l instanceof V.Select)&&!(l instanceof V.Search)&&!(l instanceof V.ParamValue)&&!(l instanceof V.VarValue)&&!(l instanceof V.FuncValue)&&!(l instanceof V.FromData)&&!(l instanceof V.Json)&&!l.inserted)throw new Error("Unknown type of FROM clause")}),this.joins&&this.joins.forEach(function(l){if(a["."][l.as||l.table.tableid]=!0,l.table){var f=l.as||l.table.tableid,u=l.table.databaseid||c,p=t.databases[u];if(p===void 0)throw new Error("Database does not exist: "+u);var d=p.tables[l.table.tableid];if(d===void 0)throw new Error("Table does not exist: "+l.table.tableid);d.columns&&d.columns.forEach(function(b){a[b.columnid]?a[b.columnid]="-":a[b.columnid]=f})}else if(!l.select&&!l.param&&!l.func)throw new Error("Unknown type of FROM clause")}),a},V.Union=class{constructor(n){Object.assign(this,n)}toString(){return"UNION"}compile(n){return null}},V.Apply=class{constructor(n){Object.assign(this,n)}toString(){let n=`${this.applymode} APPLY (${this.select.toString()})`;return this.as&&(n+=` AS ${this.as}`),n}},V.Over=class{constructor(n){Object.assign(this,n)}toString(){let n="OVER (";return this.partition&&(n+=`PARTITION BY ${this.partition.toString()}`,this.order&&(n+=" ")),this.order&&(n+=`ORDER BY ${this.order.toString()}`),n+=")",n}};{let n=Object.assign;class c{constructor(le){n(this,le)}toString(){return this.expression.toString()}execute(le,mr,Vt){if(this.expression){t.precompile(this,le,mr);var Rt=new Function("params,alasql,p","var y;return "+this.expression.toJS("({})","",null)).bind(this),Qr=Rt(mr,t);return Vt&&(Qr=Vt(Qr)),Qr}}}class a{constructor(le){n(this,le)}toString(){var le=this.expression.toString();return this.order&&(le+=" "+this.order.toString()),this.nocase&&(le+=" COLLATE NOCASE"),this.direction&&(le+=" "+this.direction),le}findAggregator(le){this.expression.findAggregator&&this.expression.findAggregator(le)}toJS(le,mr,Vt){return this.expression.reduced?"true":this.expression.toJS(le,mr,Vt)}compile(le,mr,Vt){return this.reduced?x():new Function("p","var y;return "+this.toJS(le,mr,Vt))}}class l{constructor(le){n(this,le)}toString(){var le="``"+this.value+"``";return le}toJS(){return"("+this.value+")"}execute(le,mr,Vt){var Rt=1,Qr=new Function("params,alasql,p",this.value);return Qr(mr,t),Vt&&(Rt=Vt(Rt)),Rt}}class f{constructor(le){n(this,le)}toString(){var le=this.value;return this.value1&&(le=this.value1+"."+le),le}}class u{constructor(le){n(this,le)}toString(){var le=" ";return this.joinmode&&(le+=this.joinmode+" "),le+="JOIN "+this.table.toString(),le}}class p{constructor(le){n(this,le)}toString(){var le=this.tableid;return this.databaseid&&(le=this.databaseid+"."+le),le}}class d{constructor(le){n(this,le)}toString(){var le=this.viewid;return this.databaseid&&(le=this.databaseid+"."+le),le}}let b=new Set(["-","*","/","%","^","<<",">>","&","|"]),U=new Set(["||"]),R=/[\s.\-\[\]]/,L=new Set(["AND","OR","NOT","=","==","===","!=","!==","!===",">",">=","<","<=","IN","NOT IN","LIKE","NOT LIKE","REGEXP","GLOB","BETWEEN","NOT BETWEEN","IS NULL","IS NOT NULL"]);class T{constructor(le){n(this,le)}toString(){let le=this.left.toString(),mr;return this.op==="IN"||this.op==="NOT IN"?`${le} ${this.op} (${this.right.toString()})`:this.allsome?`${le} ${this.op} ${this.allsome} (${this.right.toString()})`:this.op==="->"||this.op==="!"?(mr=`${le}${this.op}`,typeof this.right!="string"&&typeof this.right!="number"?mr+`(${this.right.toString()})`:mr+this.right.toString()):this.op==="BETWEEN"||this.op==="NOT BETWEEN"?`${le} ${this.op} ${this.right1.toString()} AND ${this.right2.toString()}`:`${le} ${this.op} ${this.allsome?this.allsome+" ":""}${this.right.toString()}`}findAggregator(le){this.left&&this.left.findAggregator&&this.left.findAggregator(le),(this.op==="BETWEEN"||this.op==="NOT BETWEEN")&&(this.right1&&this.right1.findAggregator&&this.right1.findAggregator(le),this.right2&&this.right2.findAggregator&&this.right2.findAggregator(le)),this.right&&this.right.findAggregator&&!this.allsome&&this.right.findAggregator(le)}toType(le){if(b.has(this.op))return"number";if(U.has(this.op))return"string";if(this.op==="+"){let mr=this.left.toType(le),Vt=this.right.toType(le);if(mr==="string"||Vt==="string")return"string";if(mr==="number"||Vt==="number")return"number"}return L.has(this.op)||this.allsome?"boolean":this.op?"unknown":this.left.toType(le)}toJS(le,mr,Vt){var Rt;let Qr=[],$n=this.op,ki=!1,Di=this,Wn=function(On){return On.toJS&&(On=On.toJS(le,mr,Vt)),"y["+(Qr.push(On)-1)+"]"};var Pn=function(){return Wn(Di.left)},Jn=function(){return Wn(Di.right)};if(this.op==="=")$n="===";else if(this.op==="<>")$n="!=";else if(this.op==="OR")$n="||";else if(this.op==="->"){let On=`(${Pn()} || {})`;if(typeof this.right=="string")Rt=`${On}["${w(this.right)}"]`;else if(typeof this.right=="number")Rt=`${On}[${this.right}]`;else if(this.right instanceof V.FuncValue){let ri=[];this.right.args&&this.right.args.length>0&&(ri=this.right.args.map(Wn)),Rt=`${On}[${JSON.stringify(this.right.funcid)}](${ri.join(",")})`}else Rt=`${On}[${Jn()}]`}else if(this.op==="!")typeof this.right=="string"&&(Rt=`alasql.databases[alasql.useid].objects[${Pn()}]["${this.right}"]`);else if(this.op==="IS"){let On=Pn(),ri=Jn();this.right instanceof V.NullValue||this.right.op==="NOT"&&this.right.right instanceof V.NullValue?Rt=`((${On} == null) === (${ri} == null))`:Rt=`((${On} == ${ri}) || (${On} < 0 && true == ${ri}))`}else if(this.op==="==")Rt=`alasql.utils.deepEqual(${Pn()}, ${Jn()})`;else if(this.op==="==="||this.op==="!===")Rt=`(${this.op==="!==="?"!":""}((${Pn()}).valueOf() === (${Jn()}).valueOf()))`;else if(this.op==="!==")Rt=`(!alasql.utils.deepEqual(${Pn()}, ${Jn()}))`;else if(this.op==="||")Rt=`(''+(${Pn()} || '') + (${Jn()} || ''))`;else if(this.op==="LIKE"||this.op==="NOT LIKE")Rt=`(${this.op==="NOT LIKE"?"!":""}alasql.utils.like(${Jn()}, ${Pn()}${this.escape?`, ${Wn(this.escape)}`:""}))`;else if(this.op==="REGEXP")Rt=`alasql.stdfn.REGEXP_LIKE(${Pn()}, ${Jn()})`;else if(this.op==="GLOB")Rt=`alasql.utils.glob(${Pn()}, ${Jn()})`;else if(this.op==="BETWEEN"||this.op==="NOT BETWEEN"){let On=Pn();Rt=`(${this.op==="NOT BETWEEN"?"!":""}((${Wn(this.right1)} <= ${On}) && (${On} <= ${Wn(this.right2)})))`}else if(this.op==="IN")if(this.right instanceof V.Select){let On=`in${this.queriesidx}`,ri=`(this.queriesfn[${this.queriesidx}].query && this.queriesfn[${this.queriesidx}].query.isCorrelated)`,hs=`((this.subqueryCache = this.subqueryCache || {}, this.subqueryCache.${On} || (this.subqueryCache.${On} = new Set(alasql.utils.flatArray(this.queriesfn[${this.queriesidx}](params, null, ${le})).map(alasql.utils.getValueOf)))).has(alasql.utils.getValueOf(${Pn()})))`,ps=`(alasql.utils.flatArray(this.queriesfn[${this.queriesidx}](params, null, ${le})).indexOf(alasql.utils.getValueOf(${Pn()})) > -1)`;Rt=`(${ri} ? ${ps} : ${hs})`}else if(Array.isArray(this.right))if(this.right.length===0)Pn(),Rt="false",ki=!0;else if(!t.options.cache||this.right.some(On=>On instanceof V.ParamValue))Rt=`(new Set([${this.right.map(Wn).join(",")}]).has(alasql.utils.getValueOf(${Pn()})))`;else{t.sets=t.sets||{};let On=this.right.map(hs=>hs.value),ri=On.join(",");t.sets[ri]=t.sets[ri]||new Set(On),Rt=`alasql.sets["${ri}"].has(alasql.utils.getValueOf(${Pn()}))`}else Rt=`(${Jn()}.indexOf(${Pn()}) > -1)`;else if(this.op==="NOT IN")if(this.right instanceof V.Select){let On=`notIn${this.queriesidx}`,ri=`(this.queriesfn[${this.queriesidx}].query && this.queriesfn[${this.queriesidx}].query.isCorrelated)`,hs=`(!(this.subqueryCache = this.subqueryCache || {}, this.subqueryCache.${On} || (this.subqueryCache.${On} = new Set(alasql.utils.flatArray(this.queriesfn[${this.queriesidx}](params, null, ${le})).map(alasql.utils.getValueOf)))).has(alasql.utils.getValueOf(${Pn()})))`,ps=`(alasql.utils.flatArray(this.queriesfn[${this.queriesidx}](params, null, ${le})).indexOf(alasql.utils.getValueOf(${Pn()})) < 0)`;Rt=`(${ri} ? ${ps} : ${hs})`}else if(Array.isArray(this.right))if(this.right.length===0)Pn(),Rt="true",ki=!0;else if(!t.options.cache||this.right.some(On=>On instanceof V.ParamValue))Rt=`(!(new Set([${this.right.map(Wn).join(",")}]).has(alasql.utils.getValueOf(${Pn()}))))`;else{t.sets=t.sets||{};let On=this.right.map(hs=>hs.value),ri=On.join(",");t.sets[ri]=t.sets[ri]||new Set(On),Rt=`!alasql.sets["${ri}"].has(alasql.utils.getValueOf(${Pn()}))`}else Rt=`(${Jn()}.indexOf(${Pn()}) === -1)`;if(this.allsome==="ALL"){var Rt;if(this.right instanceof V.Select)Rt="alasql.utils.flatArray(this.query.queriesfn["+this.queriesidx+"](params,null,p))",Rt+=".every(function(b){return (",Rt+=Pn()+")"+$n+"b})";else if(Array.isArray(this.right))Rt=""+(this.right.length==1?Wn(this.right[0]):"["+this.right.map(Wn).join(",")+"]"),Rt+=".every(function(b){return (",Rt+=Pn()+")"+$n+"b})";else throw new Error("NOT IN operator without SELECT")}if(this.allsome==="SOME"||this.allsome==="ANY"){var Rt;if(this.right instanceof V.Select)Rt="alasql.utils.flatArray(this.query.queriesfn["+this.queriesidx+"](params,null,p))",Rt+=".some(function(b){return (",Rt+=Pn()+")"+$n+"b})";else if(Array.isArray(this.right))Rt=""+(this.right.length==1?Wn(this.right[0]):"["+this.right.map(Wn).join(",")+"]"),Rt+=".some(function(b){return (",Rt+=Pn()+")"+$n+"b})";else throw new Error("SOME/ANY operator without SELECT")}if(this.op==="AND"){if(this.left.reduced){if(this.right.reduced)return"true";Rt=Jn()}else this.right.reduced&&(Rt=Pn());$n="&&"}var ls=Rt||"("+Pn()+$n+Jn()+")",Ls="y=[("+Qr.join("), (")+")]";return ki||$n==="&&"||$n==="||"||$n==="IS"||$n==="IS NULL"||$n==="IS NOT NULL"?"("+Ls+", "+ls+")":`(${Ls}, y.some(e => e == null || (typeof e === 'number' && isNaN(e))) ? void 0 : ${ls})`}}class C{constructor(le){n(this,le)}toString(){return"@"+this.variable}toType(){return"unknown"}toJS(){return"alasql.vars['"+w(this.variable)+"']"}}class te{constructor(le){n(this,le)}toString(){return this.value.toString()}toType(){return"number"}toJS(){return""+this.value}}class W{constructor(le){n(this,le)}toString(){return"'"+this.value.toString()+"'"}toType(){return"string"}toJS(){return"'"+w(this.value)+"'"}}class Y{constructor(le){n(this,le)}toString(){return"VALUE"}toType(){return"object"}toJS(le,mr,Vt){return le}}class B{constructor(le){n(this,le)}toString(){return"ARRAY[]"}toType(){return"object"}toJS(le,mr,Vt){return"[("+this.value.map(function(Rt){return Rt.toJS(le,mr,Vt)}).join("), (")+")]"}}class N{constructor(le){n(this,le)}toString(){return this.value?"TRUE":"FALSE"}toType(){return"boolean"}toJS(){return this.value?"true":"false"}}class Ae{constructor(le){n(this,le)}toString(){return"NULL"}toJS(){return"undefined"}}class je{constructor(le){n(this,le)}toString(){return"$"+this.param}toJS(){return typeof this.param=="string"?"params['"+this.param+"']":"params["+this.param+"]"}}let Ot={"~":"~","-":"-","+":"+",NOT:"!"};class Oe{constructor(le){n(this,le)}toString(){let{op:le,right:mr}=this,Vt=mr.toString();switch(le){case"~":case"-":case"+":case"#":return le+Vt;case"NOT":return le+"("+Vt+")";default:return"("+Vt+")"}}findAggregator(le){this.right.findAggregator&&this.right.findAggregator(le)}toType(){switch(this.op){case"-":case"+":return"number";case"NOT":return"boolean";default:return"string"}}toJS(le,mr,Vt){if(this.right instanceof Te&&this.op==="#")return`(alasql.databases[alasql.useid].objects['${this.right.columnid}'])`;let Rt=this.right.toJS(le,mr,Vt);if(Ot.hasOwnProperty(this.op))return`(${Ot[this.op]}(${Rt}))`;if(this.op==null)return`(${Rt})`;throw new Error(`Unsupported operator: ${this.op}`)}}class Te{constructor(le){n(this,le)}static needsBrackets(le){return le==null?!1:le==+le?!0:R.test(le)}static wrapId(le){return Te.needsBrackets(le)?"["+le+"]":le}toString(){let le=Te.needsBrackets(this.columnid),mr=le?"["+this.columnid+"]":this.columnid;if(this.tableid){let Vt=le?"":".";mr=Te.wrapId(this.tableid)+Vt+mr,this.databaseid&&(mr=Te.wrapId(this.databaseid)+"."+mr)}return mr}toJS(le,mr,Vt){if(!this.tableid&&mr===""&&!Vt)return this.columnid!=="_"?`${le}['${this.columnid}']`:le==="g"?"g['_']":le;if(le==="g")return`g['${this.nick||this.columnid}']`;if(this.tableid)return this.columnid!=="_"?`${le}['${this.tableid}']['${this.columnid}']`:le==="g"?"g['_']":`${le}['${this.tableid}']`;if(Vt){let Rt=Vt[this.columnid];if(Rt==="-")throw new Error(`Cannot resolve column "${this.columnid}" because it exists in two source tables`);return Rt?this.columnid!=="_"?`${le}['${Rt}']['${this.columnid}']`:`${le}['${Rt}']`:this.columnid!=="_"?`${le}['${this.tableid||mr}']['${this.columnid}']`:`${le}['${this.tableid||mr}']`}return mr===-1?`${le}['${this.columnid}']`:this.columnid!=="_"?`${le}['${this.tableid||mr}']['${this.columnid}']`:`${le}['${this.tableid||mr}']`}}class ht{constructor(le){n(this,le)}toString(){let le=this.aggregatorid==="REDUCE"?this.funcid.replace(Xi,""):this.aggregatorid,mr=this.distinct?"DISTINCT ":"",Vt=this.expression?this.expression.toString():"",Rt=this.over?` ${this.over.toString()}`:"";return`${le}(${mr}${Vt})${Rt}`}findAggregator(le){if(this.over)return;let mr=le.selectGroup.find(Vt=>Vt.toString()===this.toString());mr?this.aggrNick=mr.nick:(this.nick||(this.nick=w(this.toString())+":"+le.selectGroup.length,le.removeKeys.includes(this.nick)||le.removeKeys.push(this.nick)),this.aggrNick=this.nick,le.selectGroup.push(this))}toType(){return["SUM","COUNT","AVG","MIN","MAX","AGGR","VAR","STDDEV","TOTAL"].includes(this.aggregatorid)?"number":this.aggregatorid==="ARRAY"?"array":this.expression.toType()}toJS(){var le=this.aggrNick||this.nick;return le===void 0&&(le=w(this.toString())),"g['"+le+"']"}}class Tt{constructor(le){n(this,le)}}Tt.prototype.toString=a.prototype.toString;class $t{constructor(le){n(this,le)}toString(){return this.type+"("+this.group.toString()+")"}}n(V,{AggrValue:ht,ArrayValue:B,Column:Te,DomainValueValue:Y,Expression:a,ExpressionStatement:c,GroupExpression:$t,JavaScript:l,Join:u,Literal:f,LogicValue:N,NullValue:Ae,NumValue:te,Op:T,OrderExpression:Tt,ParamValue:je,StringValue:W,Table:p,UniOp:Oe,VarValue:C,View:d})}V.FromData=function(n){return V.extend(this,n)},V.FromData.prototype.toString=function(){return this.data?"DATA("+(Math.random()*1e16|0)+")":"?"},V.FromData.prototype.toJS=function(){},V.Select.prototype.exec=function(n,c){this.preparams&&(n=this.preparams.concat(n));var a=t.useid,l=t.databases[a],f=this.toString(),u=Ht(f),p=this.compile(a);if(p){p.sql=f,p.dbversion=l.dbversion,l.sqlCacheSize>t.MAXSQLCACHESIZE&&l.resetSqlCache(),l.sqlCacheSize++,l.sqlCache[u]=p;var d=t.res=p(n,c);return d}},V.Select.prototype.Select=function(){var n=this,c=[];if(arguments.length>1)c=Array.prototype.slice.call(arguments);else if(arguments.length==1)Array.isArray(arguments[0])?c=arguments[0]:c=[arguments[0]];else throw new Error("Wrong number of arguments of Select() function");return n.columns=[],c.forEach(function(a){if(typeof a=="string")n.columns.push(new V.Column({columnid:a}));else if(typeof a=="function"){var l=0;n.preparams?l=n.preparams.length:n.preparams=[],n.preparams.push(a),n.columns.push(new V.Column({columnid:"*",func:a,param:l}))}}),n},V.Select.prototype.From=function(n){var c=this;if(c.from||(c.from=[]),Array.isArray(n)){var a=0;c.preparams?a=c.preparams.length:c.preparams=[],c.preparams.push(n),c.from.push(new V.ParamValue({param:a}))}else if(typeof n=="string")c.from.push(new V.Table({tableid:n}));else throw new Error("Unknown arguments in From() function");return c},V.Select.prototype.OrderBy=function(){var n=this,c=[];if(n.order=[],arguments.length==0)c=["_"];else if(arguments.length>1)c=Array.prototype.slice.call(arguments);else if(arguments.length==1)Array.isArray(arguments[0])?c=arguments[0]:c=[arguments[0]];else throw new Error("Wrong number of arguments of Select() function");return c.length>0&&c.forEach(function(a){var l=new V.Column({columnid:a});typeof a=="function"&&(l=a),n.order.push(new V.OrderExpression({expression:l,direction:"ASC"}))}),n},V.Select.prototype.Top=function(n){var c=this;return c.top=new V.NumValue({value:n}),c},V.Select.prototype.GroupBy=function(){var n=this,c=[];if(arguments.length>1)c=Array.prototype.slice.call(arguments);else if(arguments.length==1)Array.isArray(arguments[0])?c=arguments[0]:c=[arguments[0]];else throw new Error("Wrong number of arguments of Select() function");return n.group=[],c.forEach(function(a){var l=new V.Column({columnid:a});n.group.push(l)}),n},V.Select.prototype.Where=function(n){var c=this;return typeof n=="function"&&(c.where=n),c},V.FuncValue=function(n){return Object.assign(this,n)};let Xi=/[^0-9A-Z_$]+/i;V.FuncValue.prototype.toString=function(){let n="";return t.fn[this.funcid]?n+=this.funcid:t.aggr[this.funcid]?n+=this.funcid:(t.stdlib[this.funcid.toUpperCase()]||t.stdfn[this.funcid.toUpperCase()])&&(n+=this.funcid.toUpperCase().replace(Xi,"")),this.funcid!=="CURRENT_TIMESTAMP"&&(n+="(",this.args&&this.args.length>0&&(n+=this.args.map(function(c){return c.toString()}).join(",")),n+=")"),this.over&&(n+=" "+this.over.toString()),n},V.FuncValue.prototype.execute=function(n,c,a){let l=1;return t.precompile(this,n,c),new Function("params,alasql","var y;return "+this.toJS("","",null))(c,t),a&&(l=a(l)),l},V.FuncValue.prototype.findAggregator=function(n){this.args&&this.args.length>0&&this.args.forEach(function(c){c.findAggregator&&c.findAggregator(n)})},V.FuncValue.prototype.toJS=function(n,c,a){var l="",f=this.funcid;return!t.fn[f]&&t.stdlib[f.toUpperCase()]?this.args&&this.args.length>0?l+=t.stdlib[f.toUpperCase()].apply(this,this.args.map(function(u){return u.toJS(n,c)})):l+=t.stdlib[f.toUpperCase()]():!t.fn[f]&&t.stdfn[f.toUpperCase()]?(this.newid&&(l+="new "),l+="alasql.stdfn["+JSON.stringify(this.funcid.toUpperCase())+"](",this.args&&this.args.length>0&&(l+=this.args.map(function(u){return u.toJS(n,c,a)}).join(",")),l+=")"):(this.newid&&(l+="new "),l+="alasql.fn["+JSON.stringify(this.funcid)+"](",this.args&&this.args.length>0&&(l+=this.args.map(function(u){return u.toJS(n,c,a)}).join(",")),l+=")"),l};var Cn=t.stdlib={},zn=t.stdfn={};Cn.ABS=function(n){return"Math.abs("+n+")"},Cn.CLONEDEEP=function(n){return"alasql.utils.cloneDeep("+n+")"},zn.CONCAT=function(){return Array.prototype.slice.call(arguments).join("")},Cn.EXP=function(n){return"Math.pow(Math.E,"+n+")"},Cn.IIF=function(n,c,a){if(arguments.length===3)return`((${n}) ? (${c}) : (${a}))`;throw new Error("Number of arguments of IFF is not equals to 3")},Cn.IFNULL=function(n,c){return`((typeof ${n} === "undefined" || ${n} === null) ? ${c} : ${n})`},Cn.INSTR=function(n,c){return`((${n}).indexOf(${c}) + 1)`},Cn.LEN=Cn.LENGTH=function(n){return v(n,"y.length")},Cn.LOWER=Cn.LCASE=function(n){return v(n,"String(y).toLowerCase()")},Cn.LTRIM=function(n){return v(n,'y.replace(/^[ ]+/,"")')},Cn.RTRIM=function(n){return v(n,'y.replace(/[ ]+$/,"")')},Cn.MAX=Cn.GREATEST=function(){return"["+Array.prototype.join.call(arguments,",")+"].reduce(function (a, b) { return a > b ? a : b; })"},Cn.MIN=Cn.LEAST=function(){return"["+Array.prototype.join.call(arguments,",")+"].reduce(function (a, b) { return a < b ? a : b; })"},Cn.SUBSTRING=Cn.SUBSTR=Cn.MID=function(n,c,a){if(arguments.length==2)return v(n,"y.substr("+c+"-1)");if(arguments.length==3)return v(n,"y.substr("+c+"-1,"+a+")")},zn.REGEXP_LIKE=function(n,c,a){var l=c.replace(/\[\[:<:\]\]/g,"\\b").replace(/\[\[:>:\]\]/g,"\\b");return(n||"").search(RegExp(l,a))>-1},Cn.ISNULL=Cn.NULLIF=function(n,c){return"("+n+"=="+c+"?undefined:"+n+")"},Cn.POWER=function(n,c){return"Math.pow("+n+","+c+")"},Cn.RANDOM=function(n){return arguments.length==0?"Math.random()":"(Math.random()*("+n+")|0)"},Cn.ROUND=function(n,c){return arguments.length==2?"(__alasql_tmp = ("+n+'), (__alasql_tmp == null || (typeof __alasql_tmp === "string" && __alasql_tmp.trim() === "")) ? undefined : ((__alasql_tmp = Number(__alasql_tmp)), isNaN(__alasql_tmp) ? undefined : Math.round(__alasql_tmp*Math.pow(10,('+c+")))/Math.pow(10,("+c+"))))":"(__alasql_tmp = ("+n+'), (__alasql_tmp == null || (typeof __alasql_tmp === "string" && __alasql_tmp.trim() === "")) ? undefined : ((__alasql_tmp = Number(__alasql_tmp)), isNaN(__alasql_tmp) ? undefined : Math.round(__alasql_tmp)))'},Cn.CEIL=Cn.CEILING=function(n){return"Math.ceil("+n+")"},Cn.FLOOR=function(n){return"Math.floor("+n+")"},Cn.ROWNUM=function(){return"1"},Cn.ROW_NUMBER=function(){return"1"},Cn.GROUP_ROW_NUMBER=function(){return"1"},Cn.SQRT=function(n){return"Math.sqrt("+n+")"},Cn.TRIM=function(n){return v(n,"y.trim()")},Cn.UPPER=Cn.UCASE=function(n){return v(n,"String(y).toUpperCase()")},zn.CONCAT_WS=function(){var n=Array.prototype.slice.call(arguments);return n=n.filter(c=>!(c===null||typeof c>"u")),n.slice(1,n.length).join(n[0]||"")},t.aggr.group_concat=t.aggr.GROUP_CONCAT=function(n,c,a,l,f){if(l===void 0&&(l=","),a===1)return n==null?{values:[],separator:l,orderDirection:f}:{values:[n],separator:l,orderDirection:f};if(a===2)return n==null?c:c==null?{values:[n],separator:l,orderDirection:f}:(typeof c=="string"&&(c={values:c.split(","),separator:",",orderDirection:void 0}),c.values.push(n),c);{if(c==null)return;if(typeof c=="string")return c;let u=c.values;if(u.length===0)return;if(c.orderDirection&&c.orderDirection!==void 0){let p=c.orderDirection==="ASC";u=u.slice().sort((d,b)=>d===b?0:d==null?1:b==null?-1:typeof d=="string"&&typeof b=="string"?p?d.localeCompare(b):b.localeCompare(d):p?dd>b?1:dd?1:-1});let u=l*(f.length+1)/4;return Number.isInteger(u)?f[u-1]:f[Math.floor(u)]},t.aggr.QUART2=function(n,c,a){return t.aggr.QUART(n,c,a,2)},t.aggr.QUART3=function(n,c,a){return t.aggr.QUART(n,c,a,3)},t.aggr.VAR=function(n,c,a){return a===1?n===null?{sum:0,sumSq:0,count:0}:{sum:n,sumSq:n*n,count:1}:a===2?(n!==null&&(c.sum+=n,c.sumSq+=n*n,c.count++),c):c.count>1?(c.sumSq-c.sum*c.sum/c.count)/(c.count-1):0},t.aggr.STDEV=function(n,c,a){return a===1||a===2?t.aggr.VAR(n,c,a):Math.sqrt(t.aggr.VAR(n,c,a))},t.aggr.STDEV=function(n,c,a){return a===1||a===2?t.aggr.VAR(n,c,a):Math.sqrt(t.aggr.VAR(n,c,a))},t.aggr.VARP=function(n,c,a){if(a===1)return{count:1,sum:n,sumSq:n*n};if(a===2)return c.count++,c.sum+=n,c.sumSq+=n*n,c;if(c.count>0){let l=c.sum/c.count;return c.sumSq/c.count-l*l}else return 0},t.aggr.STD=t.aggr.STDDEV=t.aggr.STDEVP=function(n,c,a){return a==1||a==2?t.aggr.VARP(n,c,a):Math.sqrt(t.aggr.VARP(n,c,a))},t._aggrOriginal=t.aggr,t.aggr={},Object.keys(t._aggrOriginal).forEach(function(n){t.aggr[n]=function(c,a,l){if(!(l===3&&typeof a>"u"))return t._aggrOriginal[n].apply(null,arguments)}}),zn.REPLACE=function(n,c,a){return String(n??"").split(String(c??"")).join(String(a??""))};for(var Ci=[],rs=0;rs<256;rs++)Ci[rs]=(rs<16?"0":"")+rs.toString(16);zn.NEWID=zn.UUID=zn.GEN_RANDOM_UUID=function(){var n=Math.random()*4294967295|0,c=Math.random()*4294967295|0,a=Math.random()*4294967295|0,l=Math.random()*4294967295|0;return Ci[n&255]+Ci[n>>8&255]+Ci[n>>16&255]+Ci[n>>24&255]+"-"+Ci[c&255]+Ci[c>>8&255]+"-"+Ci[c>>16&15|64]+Ci[c>>24&255]+"-"+Ci[a&63|128]+Ci[a>>8&255]+"-"+Ci[a>>16&255]+Ci[a>>24&255]+Ci[l&255]+Ci[l>>8&255]+Ci[l>>16&255]+Ci[l>>24&255]},V.CaseValue=function(n){return Object.assign(this,n)},V.CaseValue.prototype.toString=function(){var n="CASE ";return this.expression&&(n+=this.expression.toString()),this.whens&&(n+=this.whens.map(function(c){return" WHEN "+c.when.toString()+" THEN "+c.then.toString()}).join()),n+=" END",n},V.CaseValue.prototype.findAggregator=function(n){this.expression&&this.expression.findAggregator&&this.expression.findAggregator(n),this.whens&&this.whens.length>0&&this.whens.forEach(function(c){c.when.findAggregator&&c.when.findAggregator(n),c.then.findAggregator&&c.then.findAggregator(n)}),this.elses&&this.elses.findAggregator&&this.elses.findAggregator(n)},V.CaseValue.prototype.toJS=function(n,c,a){let l=`(((${n}, params, alasql) => { - let y, r;`;return this.expression?(l+=`let v = ${this.expression.toJS(n,c,a)};`,this.whens.forEach((f,u)=>{let p=`v === ${f.when.toJS(n,c,a)}`,d=`r = ${f.then.toJS(n,c,a)}`;l+=`${u===0?"if":" else if"} (${p}) { ${d}; }`})):this.whens.forEach((f,u)=>{let p=f.when.toJS(n,c,a),d=`r = ${f.then.toJS(n,c,a)}`;l+=`${u===0?"if":" else if"} (${p}) { ${d}; }`}),this.elses&&(l+=` else { r = ${this.elses.toJS(n,c,a)}; }`),l+="; return r; }))("+n+", params, alasql)",l},V.Json=function(n){return Object.assign(this,n)},V.Json.prototype.toString=function(){var n="";return n+=os(this.value),n+="",n};let os=t.utils.JSONtoString=function(n){if(typeof n=="string")return`"${n}"`;if(typeof n=="number"||typeof n=="boolean")return String(n);if(typeof n=="bigint")return`${n.toString()}n`;if(Array.isArray(n))return`[${n.map(c=>os(c)).join(",")}]`;if(typeof n=="object")if(!n.toJS||n instanceof V.Json){let c=[];for(let a in n){let l=typeof a=="string"?`"${a}"`:String(a),f=os(n[a]);c.push(`${l}:${f}`)}return`{${c.join(",")}}`}else{if(n.toString)return n.toString();throw new Error(`1: Cannot show JSON object ${JSON.stringify(n)}`)}else throw new Error(`2: Cannot show JSON object ${JSON.stringify(n)}`)};function u1(n,c,a,l){var f="";if(typeof n=="string")f='"'+n+'"';else if(typeof n=="number")f="("+n+")";else if(typeof n=="boolean")f=n;else if(typeof n=="bigint")f=n.toString()+"n";else if(typeof n=="object")if(Array.isArray(n))f+=`[${n.map(u=>u1(u,c,a,l)).join(",")}]`;else if(!n.toJS||n instanceof V.Json){let u=[];for(let p in n){let d=typeof p=="string"?`"${p}"`:p.toString(),b=u1(n[p],c,a,l);u.push(`${d}:${b}`)}f=`{${u.join(",")}}`}else if(n.toJS)f=n.toJS(c,a,l);else throw new Error(`Cannot parse JSON object ${JSON.stringify(n)}`);else throw new Error("2Can not parse JSON object "+JSON.stringify(n));return f}V.Json.prototype.toJS=function(n,c,a){return u1(this.value,n,c,a)},V.Convert=function(n){return Object.assign(this,n)},V.Convert.prototype.toString=function(){var n="CONVERT(";return n+=this.dbtypeid,typeof this.dbsize<"u"&&(n+="("+this.dbsize,this.dbprecision&&(n+=","+this.dbprecision),n+=")"),n+=","+this.expression.toString(),this.style&&(n+=","+this.style),n+=")",n},V.Convert.prototype.toJS=function(n,c,a){return`alasql.stdfn.CONVERT(${this.expression.toJS(n,c,a)}, { + g['${T}'] = alasql.aggr.${L.funcid}(${C},g['${T}'],2${F}); + ${Y}`}}}return""}return""}).join(""),u+="}"}),new Function("p,params,alasql","var y;"+u)};var Pn=/^(SUM|MAX|MIN|FIRST|LAST|AVG|ARRAY|REDUCE|TOTAL)$/;function un(n,c,o){var l="",f=[],u={};return c.forEach(function(p){n.ixsources={},n.sources.forEach(function(b){n.ixsources[b.alias]=b});var h;if(n.ixsources[p])var h=n.ixsources[p].columns;o&&t.options.joinstar=="json"&&(l+="r['"+p+"']={};"),h&&h.length>0?h.forEach(function(b){let U=w(b.columnid);if(o&&t.options.joinstar=="underscore")f.push("'"+p+"_"+U+"':p['"+p+"']['"+U+"']");else if(o&&t.options.joinstar=="json")l+="r['"+p+"']['"+U+"']=p['"+p+"']['"+U+"'];";else{var R="p['"+p+"']['"+U+"']";if(u[b.columnid]){var L=R+" !== undefined ? "+R+" : "+u[b.columnid].value;f[u[b.columnid].id]=u[b.columnid].key+L,u[b.columnid].value=L}else{var T="'"+U+"':";f.push(T+R),u[b.columnid]={id:f.length-1,value:R,key:T}}}n.selectColumns[U]=!0;var C={columnid:b.columnid,dbtypeid:b.dbtypeid,dbsize:b.dbsize,dbprecision:b.dbprecision,dbenum:b.dbenum};n.columns.push(C),n.xcolumns[C.columnid]=C}):(o&&t.options.joinstar=="json"?l+="r['"+w(p)+"']=p['"+w(p)+"'];":o&&t.options.joinstar=="underscore"?l+='var w=p["'+w(p)+'"];for(var k in w){r["'+w(p)+'_"+k]=w[k]};':l+='var w=p["'+w(p)+'"];for(var k in w){r[k]=w[k]};',n.dirtyColumns=!0)}),{s:f.join(","),sp:l}}function mi(n){if(!n||n.op!=="->")return null;for(var c=[],o=n;o&&o.op==="->";){if(typeof o.right=="string")c.unshift(o.right);else if(typeof o.right=="number")c.unshift(o.right);else return null;o=o.left}return o&&o.columnid?(c.unshift(o.columnid),c):null}V.Select.prototype.compileSelect1=function(n,c){var o=this;n.columns=[],n.xcolumns={},n.selectColumns={},n.dirtyColumns=!1;var l="var r={",f="",u=[];return this.columns.forEach(function(p){if(p instanceof V.Column)if(p.columnid==="*")if(p.func)f+="r=params['"+p.param+"'](p['"+n.sources[0].alias+"'],p,params,alasql);";else if(p.tableid){var h=un(n,[p.tableid],!1);h.s&&(u=u.concat(h.s)),f+=h.sp}else{var h=un(n,Object.keys(n.aliases),!0);h.s&&(u=u.concat(h.s)),f+=h.sp}else{var b=p.tableid,U=p.databaseid||n.sources[0].databaseid||n.database.databaseid;if(b||(b=n.defcols[p.columnid]),b||(b=n.defaultTableid),p.columnid!=="_"){var R=c&&c.length>1&&Array.isArray(c[0])&&c[0].length>=1&&c[0][0].hasOwnProperty("sheetid");if(R)f='var r={};var w=p["'+b+'"];var cols=['+o.columns.map(function(Tt){return"'"+Tt.columnid+"'"}).join(",")+"];var colas=["+o.columns.map(function(Tt){return"'"+(Tt.as||Tt.columnid)+"'"}).join(",")+"];for (var i=0;i1&&(!n.defcols[p.columnid]||n.defcols[p.columnid]==="-");if(L){var T=Object.keys(n.aliases),C=T.map(function(Tt){return"p['"+Tt+"']['"+p.columnid+"']"}).join(" ?? ");u.push("'"+w(p.as||p.columnid)+"':("+C+")")}else u.push("'"+w(p.as||p.columnid)+"':p['"+b+"']['"+p.columnid+"']")}}else u.push("'"+w(p.as||p.columnid)+"':p['"+b+"']");if(n.selectColumns[w(p.as||p.columnid)]=!0,n.aliases[b]&&n.aliases[b].type==="table"){if(!t.databases[U].tables[n.aliases[b].tableid])throw new Error("Table '"+b+"' does not exist in database");var te=t.databases[U].tables[n.aliases[b].tableid].columns,W=t.databases[U].tables[n.aliases[b].tableid].xcolumns;if(W&&te.length>0){var Y=W[p.columnid];if(Y===void 0)throw new Error("Column does not exist: "+p.columnid);var F={columnid:p.as||p.columnid,dbtypeid:Y.dbtypeid,dbsize:Y.dbsize,dbpecision:Y.dbprecision,dbenum:Y.dbenum};n.columns.push(F),n.xcolumns[F.columnid]=F}else{var F={columnid:p.as||p.columnid};n.columns.push(F),n.xcolumns[F.columnid]=F,n.dirtyColumns=!0}}else{var F={columnid:p.as||p.columnid};n.columns.push(F),n.xcolumns[F.columnid]=F}}else if(p instanceof V.AggrValue){p.as||(p.as=w(p.toString())),p.over?n.windowaggrs.push({as:p.as,aggregatorid:p.aggregatorid,expression:p.expression,partitionColumns:p.over.partition?p.over.partition.map(function($t){return $t.columnid||$t.toString()}):[]}):(o.group||(o.group=[""]),Pn.test(p.aggregatorid)?u.push("'"+w(p.as)+"':"+d(p.expression.toJS("p",n.defaultTableid,n.defcols))):p.aggregatorid==="COUNT"&&u.push("'"+w(p.as)+"':1"));var F={columnid:p.as||p.columnid||p.toString()};n.columns.push(F),n.xcolumns[F.columnid]=F}else{var N=n.intoObject&&!p.as?mi(p):null;if(N&&N.length>1){for(var Ae=d(p.toJS("p",n.defaultTableid,n.defcols)),je=0;je0&&!this.union&&!this.unionall&&!this.except&&!this.intersect&&this.orderColumns.forEach(function(l,f){var u="$$$"+f;l._useColumnIndex!==void 0?o+="var keys=Object.keys(r);r['"+u+"']=r[keys["+l.columnIndex+"]];":l instanceof V.Column&&n.xcolumns[l.columnid]?o+="r['"+u+"']=r['"+l.columnid+"'];":l instanceof V.ParamValue&&n.xcolumns[c[l.param]]?o+="r['"+u+"']=r['"+c[l.param]+"'];":o+="r['"+u+"']="+l.toJS("p",n.defaultTableid,n.defcols)+";",n.removeKeys.push(u)}),new Function("p,params,alasql","var y;"+o+"return r")},V.Select.prototype.compileSelectGroup0=function(n){var c=this,o=null,l=null;c.group&&(o={},c.group.forEach(function(f,u){f instanceof V.Column&&f.columnid&&!f.tableid&&(o[f.columnid]=u)}),l={},c.columns.forEach(function(f){f instanceof V.Column&&f.columnid&&(l[f.columnid]=!0)})),c.columns.forEach(function(f,u){if(f instanceof V.Column&&f.columnid==="*")n.groupStar=f.tableid||"default";else{var p;f instanceof V.Column?p=w(f.columnid):p=w(f.toString(!0));for(var h=0;h-1&&(c.group[b].nick=p),f.as&&o&&o.hasOwnProperty(f.as)&&!l[f.as]){var U=o[f.as],R=mn(f);delete R.as,R.nick=p,c.group[U]=R}}f.funcid&&(f.funcid.toUpperCase()==="ROWNUM"||f.funcid.toUpperCase()==="ROW_NUMBER")&&(f.over&&f.over.partition?n.grouprownums.push({as:f.as,partitionColumns:f.over.partition.map(function(L){return L.columnid||L.toString()})}):n.rownums.push(f.as)),f.funcid&&f.funcid.toUpperCase()==="GROUP_ROW_NUMBER"&&n.grouprownums.push({as:f.as,columnIndex:0})}}),this.columns.forEach(function(f){f.findAggregator&&f.findAggregator(n)}),this.having&&this.having.findAggregator&&this.having.findAggregator(n)},V.Select.prototype.compileSelectGroup1=function(n){var c=this,o="var r = {};";return c.columns.forEach(function(l){if(l instanceof V.Column&&l.columnid==="*")return o+="for(var k in g) {r[k]=g[k]};","";var f=l.as;f===void 0&&(l instanceof V.Column?f=w(l.columnid):f=l.nick),n.groupColumns[f]=l.nick,o+="r['"+f+"']=",o+=d(l.toJS("g",""))+";";for(var u=0;u-1;if(h){var b=u&&u.nick||f.nick;o+="r['"+(f.as||f.nick)+"']=g['"+b+"'];"}}}),this.orderColumns&&this.orderColumns.length>0&&!this.union&&!this.unionall&&!this.except&&!this.intersect&&this.orderColumns.forEach(function(f,u){var p="$$$"+u;f._useColumnIndex!==void 0?o+="var keys=Object.keys(r);r['"+p+"']=r[keys["+f.columnIndex+"]];":f instanceof V.Column&&n.groupColumns[f.columnid]?o+="r['"+p+"']=r['"+f.columnid+"'];":o+="r['"+p+"']="+f.toJS("g","")+";",n.removeKeys.push(p)}),new Function("g,params,alasql","var y;"+o+"return r")},V.Select.prototype.compileRemoveColumns=function(n){var c=this;typeof this.removecolumns<"u"&&(n.removeKeys=n.removeKeys.concat(this.removecolumns.filter(function(o){return typeof o.like>"u"}).map(function(o){return o.columnid})),n.removeLikeKeys=this.removecolumns.filter(function(o){return typeof o.like<"u"}).map(function(o){return o.like.value}))},V.Select.prototype.compileHaving=function(n){if(this.having){var c=this.having.toJS("g",-1);return n.havingfns=c,new Function("g,params,alasql","var y;return "+c)}return function(){return!0}},V.Select.prototype.compileOrder=function(n,c){var o=this;if(o.orderColumns=[],this.order){if(this.order&&this.order.length==1&&this.order[0].expression&&typeof this.order[0].expression=="function"){var l=this.order[0].expression,f=this.order[0].nullsOrder=="FIRST"?-1:this.order[0].nullsOrder=="LAST"?1:0;return function(h,b){var U=l(h),R=l(b);if(f){if(U==null)return R==null?0:f;if(R==null)return-f}return U>R?1:U==R?0:-1}}var u="",p="";return this.order.forEach(function(h,b){if(h.expression instanceof V.NumValue){if(h.expression.value<1)throw new Error(`Invalid column number ${h.expression.value}. Column numbers must be at least 1.`);var R=o.columns[h.expression.value-1],U=o.columns.length===1&&o.columns[0]instanceof V.Column&&o.columns[0].columnid==="*";if(U)R={_useColumnIndex:!0,columnIndex:h.expression.value-1};else{if(h.expression.value>o.columns.length)throw new Error(`You are trying to order by column number ${h.expression.value} but you have only selected ${o.columns.length} columns.`);R instanceof V.Column&&R.columnid==="*"&&(R={_useColumnIndex:!0,columnIndex:h.expression.value-1})}}else if(h.expression instanceof V.StringValue)var R=new V.Column({columnid:h.expression.value});else var R=h.expression;o.orderColumns.push(R);var L="$$$"+b,T="",C;if(h.expression instanceof V.Column?C=h.expression.columnid:h.expression instanceof V.ParamValue?C=c[h.expression.param]:h.expression instanceof V.StringValue&&(C=h.expression.value),C){if(t.options.valueof)T=".valueOf()";else if(n.xcolumns[C]){var te=n.xcolumns[C].dbtypeid;(te=="DATE"||te=="DATETIME"||te=="DATETIME2"||te=="STRING"||te=="NUMBER")&&(T=".valueOf()")}}h.nocase&&(T+=".toUpperCase()"),h.nullsOrder&&(h.nullsOrder=="FIRST"?u+="if((a['"+L+"'] != null) && (b['"+L+"'] == null)) return 1;":h.nullsOrder=="LAST"&&(u+="if((a['"+L+"'] == null) && (b['"+L+"'] != null)) return 1;"),u+="if((a['"+L+"'] == null) == (b['"+L+"'] == null)) {",p+="}"),u+="if((a['"+L+"']||'')"+T+(h.direction=="ASC"?">":"<")+"(b['"+L+"']||'')"+T+")return 1;",u+="if((a['"+L+"']||'')"+T+"==(b['"+L+"']||'')"+T+"){",p+="}"}),u+="return 0;",u+=p+"return -1",n.orderfns=u,new Function("a,b","var y;"+u)}},V.Select.prototype.compilePivot=function(n){var c=this,o=c.pivot.columnid,l=c.pivot.expr.aggregatorid,f=c.pivot.inlist,u=null;if(c.pivot.expr.expression.hasOwnProperty("columnid")?u=c.pivot.expr.expression.columnid:u=c.pivot.expr.expression.expression.columnid,u==null)throw"columnid not found";return f&&(f=f.map(function(p){return p.expr.columnid})),function(){var p=this;if(!p.data||p.data.length===0){p.columns=[];return}var h=Object.keys(p.data[0]),b=h.filter(function(Ae){return Ae!==o&&Ae!==u}),U=[],R={},L={},T={},C=[];if(p.data.forEach(function(Ae){if(!(f&&f.indexOf(Ae[o])===-1)){var je=b.map(function(ht){return Ae[ht]===void 0||Ae[ht]===null?"":Ae[ht]}).join("`"),Ot=L[je];Ot||(Ot={},L[je]=Ot,C.push(Ot),b.forEach(function(ht){Ot[ht]=Ae[ht]})),T[je]||(T[je]={});var Oe=Ae[o],Te=Ae[u];if(T[je][Oe]?Te!==null&&typeof Te<"u"&&T[je][Oe]++:T[je][Oe]=Te!==null&&typeof Te<"u"?1:0,R[Oe]||(R[Oe]=!0,U.push(Oe)),l=="SUM"||l=="AVG"||l=="TOTAL")Te!==null&&typeof Te<"u"?Ot[Oe]=typeof Ot[Oe]>"u"||Ot[Oe]===null?Number(Te):Ot[Oe]+Number(Te):typeof Ot[Oe]>"u"&&(Ot[Oe]=null);else if(l=="COUNT")u==="*"||Te!==null&&typeof Te<"u"?Ot[Oe]=(Ot[Oe]||0)+1:typeof Ot[Oe]>"u"&&(Ot[Oe]=0);else if(l=="MIN")Te!==null&&typeof Te<"u"?(typeof Ot[Oe]>"u"||Ot[Oe]===null||Te"u"&&(Ot[Oe]=null);else if(l=="MAX")Te!==null&&typeof Te<"u"?(typeof Ot[Oe]>"u"||Ot[Oe]===null||Te>Ot[Oe])&&(Ot[Oe]=Te):typeof Ot[Oe]>"u"&&(Ot[Oe]=null);else if(l=="FIRST")typeof Ot[Oe]>"u"&&(Ot[Oe]=Te);else if(l=="LAST")Ot[Oe]=Te;else if(t.aggr[l])typeof Ot[Oe]>"u"?Ot[Oe]=t.aggr[l](Te,void 0,1):Ot[Oe]=t.aggr[l](Te,Ot[Oe],2);else throw new Error("Unknown aggregator in PIVOT clause: "+l)}}),l=="AVG")for(var te in L){var W=L[te];for(var Y in T[te])if(W.hasOwnProperty(Y)&&W[Y]!==null){var F=T[te][Y];F>0?W[Y]=W[Y]/F:W[Y]=null}}p.data=C,f?U=f:U.sort();let N=p.columns.find(Ae=>Ae.columnid===u);if(!N&&p.sources&&p.sources.length>0){let Ae=p.sources[0].tableid,je=p.sources[0].databaseid;Ae&&je&&t.databases[je]?.tables?.[Ae]?.xcolumns&&(N=t.databases[je].tables[Ae].xcolumns[u])}N=N||{columnid:u,dbtypeid:"OBJECT"},p.columns=p.columns.filter(function(Ae){return b.includes(Ae.columnid)}),U.forEach(function(Ae){var je=mn(N);je.columnid=Ae;let Ot=(N.dbtypeid||"OBJECT").toUpperCase(),Oe=["INT","INTEGER","SMALLINT","BIGINT","SERIAL","SMALLSERIAL","BIGSERIAL"],Te=[...Oe,"NUMBER","FLOAT","DECIMAL","NUMERIC","MONEY"];l==="COUNT"?je.dbtypeid="INT":l==="AVG"?Oe.includes(Ot)?je.dbtypeid=N.dbtypeid:je.dbtypeid="FLOAT":l==="SUM"||l==="TOTAL"?Te.includes(Ot)?je.dbtypeid=N.dbtypeid:je.dbtypeid="FLOAT":l==="MIN"||l==="MAX"||l==="FIRST"||l==="LAST"?je.dbtypeid=N.dbtypeid:je.dbtypeid||(je.dbtypeid="OBJECT"),p.columns.push(je)})}},V.Select.prototype.compileUnpivot=function(n){var c=this,o=c.unpivot.tocolumnid,l=c.unpivot.forcolumnid,f=c.unpivot.inlist.map(function(u){return u.columnid});return function(){var u=[],p=n.columns.map(function(h){return h.columnid}).filter(function(h){return f.indexOf(h)==-1&&h!=l&&h!=o});n.data.forEach(function(h){f.forEach(function(b){var U={};p.forEach(function(R){U[R]=h[R]}),U[l]=b,U[o]=h[b],u.push(U)})}),n.data=u}};let bi=(n,c)=>{let o=[],l=0,f=n.length;for(let u=0;u{let o=[],l=n.length,f=1<n.reduce((o,l)=>(o=o.concat(di(l,c)),o),[]),Li=(n,c)=>{let o=[];for(let l=0;lf.concat(`${n[l].nick} ${n[l].toJS("p",c.sources[0].alias,c.defcols)}`));else if(n[l]instanceof V.FuncValue)c.groupColumns[w(n[l].toString())]=w(n[l].toString()),o=o.map(f=>f.concat(`${w(n[l].toString())} ${n[l].toJS("p",c.sources[0].alias,c.defcols)}`));else if(n[l]instanceof V.GroupExpression)if(n[l].type=="ROLLUP")o=Li(o,bi(n[l].group,c));else if(n[l].type=="CUBE")o=Li(o,ai(n[l].group,c));else if(n[l].type=="GROUPING SETS")o=Li(o,Vi(n[l].group,c));else throw new Error("Unknown grouping function");else n[l]===""?o=[["1 1"]]:o=o.map(f=>f.concat(`${w(n[l].toString())} ${n[l].toJS("p",c.sources[0].alias,c.defcols)}`));return o}return n instanceof V.FuncValue?(c.groupColumns[w(n.toString())]=w(n.toString()),[`${n.toString()} ${n.toJS("p",c.sources[0].alias,c.defcols)}`]):n instanceof V.Column?(n.nick=w(n.columnid),c.groupColumns[n.nick]=n.nick,[`${n.nick} ${n.toJS("p",c.sources[0].alias,c.defcols)}`]):(c.groupColumns[w(n.toString())]=w(n.toString()),[`${w(n.toString())} ${n.toJS("p",c.sources[0].alias,c.defcols)}`])}V.Select.prototype.compileDefCols=function(n,c){var o={".":{}};return this.from&&this.from.forEach(function(l){if(o["."][l.as||l.tableid]=!0,l instanceof V.Table){var f=l.as||l.tableid,u=t.databases[l.databaseid||c].tables[l.tableid];if(u===void 0)throw new Error("Table does not exist: "+l.tableid);u.columns&&u.columns.forEach(function(p){o[p.columnid]?o[p.columnid]="-":o[p.columnid]=f})}else if(!(l instanceof V.Select)&&!(l instanceof V.Search)&&!(l instanceof V.ParamValue)&&!(l instanceof V.VarValue)&&!(l instanceof V.FuncValue)&&!(l instanceof V.FromData)&&!(l instanceof V.Json)&&!l.inserted)throw new Error("Unknown type of FROM clause")}),this.joins&&this.joins.forEach(function(l){if(o["."][l.as||l.table.tableid]=!0,l.table){var f=l.as||l.table.tableid,u=l.table.databaseid||c,p=t.databases[u];if(p===void 0)throw new Error("Database does not exist: "+u);var h=p.tables[l.table.tableid];if(h===void 0)throw new Error("Table does not exist: "+l.table.tableid);h.columns&&h.columns.forEach(function(b){o[b.columnid]?o[b.columnid]="-":o[b.columnid]=f})}else if(!l.select&&!l.param&&!l.func)throw new Error("Unknown type of FROM clause")}),o},V.Union=class{constructor(n){Object.assign(this,n)}toString(){return"UNION"}compile(n){return null}},V.Apply=class{constructor(n){Object.assign(this,n)}toString(){let n=`${this.applymode} APPLY (${this.select.toString()})`;return this.as&&(n+=` AS ${this.as}`),n}},V.Over=class{constructor(n){Object.assign(this,n)}toString(){let n="OVER (";return this.partition&&(n+=`PARTITION BY ${this.partition.toString()}`,this.order&&(n+=" ")),this.order&&(n+=`ORDER BY ${this.order.toString()}`),n+=")",n}};{let n=Object.assign;class c{constructor(le){n(this,le)}toString(){return this.expression.toString()}execute(le,mr,Vt){if(this.expression){t.precompile(this,le,mr);var Bt=new Function("params,alasql,p","var y;return "+this.expression.toJS("({})","",null)).bind(this),Zr=Bt(mr,t);return Vt&&(Zr=Vt(Zr)),Zr}}}class o{constructor(le){n(this,le)}toString(){var le=this.expression.toString();return this.order&&(le+=" "+this.order.toString()),this.nocase&&(le+=" COLLATE NOCASE"),this.direction&&(le+=" "+this.direction),le}findAggregator(le){this.expression.findAggregator&&this.expression.findAggregator(le)}toJS(le,mr,Vt){return this.expression.reduced?"true":this.expression.toJS(le,mr,Vt)}compile(le,mr,Vt){return this.reduced?_():new Function("p","var y;return "+this.toJS(le,mr,Vt))}}class l{constructor(le){n(this,le)}toString(){var le="``"+this.value+"``";return le}toJS(){return"("+this.value+")"}execute(le,mr,Vt){var Bt=1,Zr=new Function("params,alasql,p",this.value);return Zr(mr,t),Vt&&(Bt=Vt(Bt)),Bt}}class f{constructor(le){n(this,le)}toString(){var le=this.value;return this.value1&&(le=this.value1+"."+le),le}}class u{constructor(le){n(this,le)}toString(){var le=" ";return this.joinmode&&(le+=this.joinmode+" "),le+="JOIN "+this.table.toString(),le}}class p{constructor(le){n(this,le)}toString(){var le=this.tableid;return this.databaseid&&(le=this.databaseid+"."+le),le}}class h{constructor(le){n(this,le)}toString(){var le=this.viewid;return this.databaseid&&(le=this.databaseid+"."+le),le}}let b=new Set(["-","*","/","%","^","<<",">>","&","|"]),U=new Set(["||"]),R=/[\s.\-\[\]]/,L=new Set(["AND","OR","NOT","=","==","===","!=","!==","!===",">",">=","<","<=","IN","NOT IN","LIKE","NOT LIKE","REGEXP","GLOB","BETWEEN","NOT BETWEEN","IS NULL","IS NOT NULL"]);class T{constructor(le){n(this,le)}toString(){let le=this.left.toString(),mr;return this.op==="IN"||this.op==="NOT IN"?`${le} ${this.op} (${this.right.toString()})`:this.allsome?`${le} ${this.op} ${this.allsome} (${this.right.toString()})`:this.op==="->"||this.op==="!"?(mr=`${le}${this.op}`,typeof this.right!="string"&&typeof this.right!="number"?mr+`(${this.right.toString()})`:mr+this.right.toString()):this.op==="BETWEEN"||this.op==="NOT BETWEEN"?`${le} ${this.op} ${this.right1.toString()} AND ${this.right2.toString()}`:`${le} ${this.op} ${this.allsome?this.allsome+" ":""}${this.right.toString()}`}findAggregator(le){this.left&&this.left.findAggregator&&this.left.findAggregator(le),(this.op==="BETWEEN"||this.op==="NOT BETWEEN")&&(this.right1&&this.right1.findAggregator&&this.right1.findAggregator(le),this.right2&&this.right2.findAggregator&&this.right2.findAggregator(le)),this.right&&this.right.findAggregator&&!this.allsome&&this.right.findAggregator(le)}toType(le){if(b.has(this.op))return"number";if(U.has(this.op))return"string";if(this.op==="+"){let mr=this.left.toType(le),Vt=this.right.toType(le);if(mr==="string"||Vt==="string")return"string";if(mr==="number"||Vt==="number")return"number"}return L.has(this.op)||this.allsome?"boolean":this.op?"unknown":this.left.toType(le)}toJS(le,mr,Vt){var Bt;let Zr=[],Un=this.op,$i=!1,Bi=this,Yn=function(Cn){return Cn.toJS&&(Cn=Cn.toJS(le,mr,Vt)),"y["+(Zr.push(Cn)-1)+"]"};var Vn=function(){return Yn(Bi.left)},ni=function(){return Yn(Bi.right)};if(this.op==="=")Un="===";else if(this.op==="<>")Un="!=";else if(this.op==="OR")Un="||";else if(this.op==="->"){let Cn=`(${Vn()} || {})`;if(typeof this.right=="string")Bt=`${Cn}["${w(this.right)}"]`;else if(typeof this.right=="number")Bt=`${Cn}[${this.right}]`;else if(this.right instanceof V.FuncValue){let oi=[];this.right.args&&this.right.args.length>0&&(oi=this.right.args.map(Yn)),Bt=`${Cn}[${JSON.stringify(this.right.funcid)}](${oi.join(",")})`}else Bt=`${Cn}[${ni()}]`}else if(this.op==="!")typeof this.right=="string"&&(Bt=`alasql.databases[alasql.useid].objects[${Vn()}]["${this.right}"]`);else if(this.op==="IS"){let Cn=Vn(),oi=ni();this.right instanceof V.NullValue||this.right.op==="NOT"&&this.right.right instanceof V.NullValue?Bt=`((${Cn} == null) === (${oi} == null))`:Bt=`((${Cn} == ${oi}) || (${Cn} < 0 && true == ${oi}))`}else if(this.op==="==")Bt=`alasql.utils.deepEqual(${Vn()}, ${ni()})`;else if(this.op==="==="||this.op==="!===")Bt=`(${this.op==="!==="?"!":""}((${Vn()}).valueOf() === (${ni()}).valueOf()))`;else if(this.op==="!==")Bt=`(!alasql.utils.deepEqual(${Vn()}, ${ni()}))`;else if(this.op==="||")Bt=`(''+(${Vn()} || '') + (${ni()} || ''))`;else if(this.op==="LIKE"||this.op==="NOT LIKE")Bt=`(${this.op==="NOT LIKE"?"!":""}alasql.utils.like(${ni()}, ${Vn()}${this.escape?`, ${Yn(this.escape)}`:""}))`;else if(this.op==="REGEXP")Bt=`alasql.stdfn.REGEXP_LIKE(${Vn()}, ${ni()})`;else if(this.op==="GLOB")Bt=`alasql.utils.glob(${Vn()}, ${ni()})`;else if(this.op==="BETWEEN"||this.op==="NOT BETWEEN"){let Cn=Vn();Bt=`(${this.op==="NOT BETWEEN"?"!":""}((${Yn(this.right1)} <= ${Cn}) && (${Cn} <= ${Yn(this.right2)})))`}else if(this.op==="IN")if(this.right instanceof V.Select){let Cn=`in${this.queriesidx}`,oi=`(this.queriesfn[${this.queriesidx}].query && this.queriesfn[${this.queriesidx}].query.isCorrelated)`,ms=`((this.subqueryCache = this.subqueryCache || {}, this.subqueryCache.${Cn} || (this.subqueryCache.${Cn} = new Set(alasql.utils.flatArray(this.queriesfn[${this.queriesidx}](params, null, ${le})).map(alasql.utils.getValueOf)))).has(alasql.utils.getValueOf(${Vn()})))`,gs=`(alasql.utils.flatArray(this.queriesfn[${this.queriesidx}](params, null, ${le})).indexOf(alasql.utils.getValueOf(${Vn()})) > -1)`;Bt=`(${oi} ? ${gs} : ${ms})`}else if(Array.isArray(this.right))if(this.right.length===0)Vn(),Bt="false",$i=!0;else if(!t.options.cache||this.right.some(Cn=>Cn instanceof V.ParamValue))Bt=`(new Set([${this.right.map(Yn).join(",")}]).has(alasql.utils.getValueOf(${Vn()})))`;else{t.sets=t.sets||{};let Cn=this.right.map(ms=>ms.value),oi=Cn.join(",");t.sets[oi]=t.sets[oi]||new Set(Cn),Bt=`alasql.sets["${oi}"].has(alasql.utils.getValueOf(${Vn()}))`}else Bt=`(${ni()}.indexOf(${Vn()}) > -1)`;else if(this.op==="NOT IN")if(this.right instanceof V.Select){let Cn=`notIn${this.queriesidx}`,oi=`(this.queriesfn[${this.queriesidx}].query && this.queriesfn[${this.queriesidx}].query.isCorrelated)`,ms=`(!(this.subqueryCache = this.subqueryCache || {}, this.subqueryCache.${Cn} || (this.subqueryCache.${Cn} = new Set(alasql.utils.flatArray(this.queriesfn[${this.queriesidx}](params, null, ${le})).map(alasql.utils.getValueOf)))).has(alasql.utils.getValueOf(${Vn()})))`,gs=`(alasql.utils.flatArray(this.queriesfn[${this.queriesidx}](params, null, ${le})).indexOf(alasql.utils.getValueOf(${Vn()})) < 0)`;Bt=`(${oi} ? ${gs} : ${ms})`}else if(Array.isArray(this.right))if(this.right.length===0)Vn(),Bt="true",$i=!0;else if(!t.options.cache||this.right.some(Cn=>Cn instanceof V.ParamValue))Bt=`(!(new Set([${this.right.map(Yn).join(",")}]).has(alasql.utils.getValueOf(${Vn()}))))`;else{t.sets=t.sets||{};let Cn=this.right.map(ms=>ms.value),oi=Cn.join(",");t.sets[oi]=t.sets[oi]||new Set(Cn),Bt=`!alasql.sets["${oi}"].has(alasql.utils.getValueOf(${Vn()}))`}else Bt=`(${ni()}.indexOf(${Vn()}) === -1)`;if(this.allsome==="ALL"){var Bt;if(this.right instanceof V.Select)Bt="alasql.utils.flatArray(this.query.queriesfn["+this.queriesidx+"](params,null,p))",Bt+=".every(function(b){return (",Bt+=Vn()+")"+Un+"b})";else if(Array.isArray(this.right))Bt=""+(this.right.length==1?Yn(this.right[0]):"["+this.right.map(Yn).join(",")+"]"),Bt+=".every(function(b){return (",Bt+=Vn()+")"+Un+"b})";else throw new Error("NOT IN operator without SELECT")}if(this.allsome==="SOME"||this.allsome==="ANY"){var Bt;if(this.right instanceof V.Select)Bt="alasql.utils.flatArray(this.query.queriesfn["+this.queriesidx+"](params,null,p))",Bt+=".some(function(b){return (",Bt+=Vn()+")"+Un+"b})";else if(Array.isArray(this.right))Bt=""+(this.right.length==1?Yn(this.right[0]):"["+this.right.map(Yn).join(",")+"]"),Bt+=".some(function(b){return (",Bt+=Vn()+")"+Un+"b})";else throw new Error("SOME/ANY operator without SELECT")}if(this.op==="AND"){if(this.left.reduced){if(this.right.reduced)return"true";Bt=ni()}else this.right.reduced&&(Bt=Vn());Un="&&"}var cs=Bt||"("+Vn()+Un+ni()+")",Ds="y=[("+Zr.join("), (")+")]";return $i||Un==="&&"||Un==="||"||Un==="IS"||Un==="IS NULL"||Un==="IS NOT NULL"?"("+Ds+", "+cs+")":`(${Ds}, y.some(e => e == null || (typeof e === 'number' && isNaN(e))) ? void 0 : ${cs})`}}class C{constructor(le){n(this,le)}toString(){return"@"+this.variable}toType(){return"unknown"}toJS(){return"alasql.vars['"+w(this.variable)+"']"}}class te{constructor(le){n(this,le)}toString(){return this.value.toString()}toType(){return"number"}toJS(){return""+this.value}}class W{constructor(le){n(this,le)}toString(){return"'"+this.value.toString()+"'"}toType(){return"string"}toJS(){return"'"+w(this.value)+"'"}}class Y{constructor(le){n(this,le)}toString(){return"VALUE"}toType(){return"object"}toJS(le,mr,Vt){return le}}class F{constructor(le){n(this,le)}toString(){return"ARRAY[]"}toType(){return"object"}toJS(le,mr,Vt){return"[("+this.value.map(function(Bt){return Bt.toJS(le,mr,Vt)}).join("), (")+")]"}}class N{constructor(le){n(this,le)}toString(){return this.value?"TRUE":"FALSE"}toType(){return"boolean"}toJS(){return this.value?"true":"false"}}class Ae{constructor(le){n(this,le)}toString(){return"NULL"}toJS(){return"undefined"}}class je{constructor(le){n(this,le)}toString(){return"$"+this.param}toJS(){return typeof this.param=="string"?"params['"+this.param+"']":"params["+this.param+"]"}}let Ot={"~":"~","-":"-","+":"+",NOT:"!"};class Oe{constructor(le){n(this,le)}toString(){let{op:le,right:mr}=this,Vt=mr.toString();switch(le){case"~":case"-":case"+":case"#":return le+Vt;case"NOT":return le+"("+Vt+")";default:return"("+Vt+")"}}findAggregator(le){this.right.findAggregator&&this.right.findAggregator(le)}toType(){switch(this.op){case"-":case"+":return"number";case"NOT":return"boolean";default:return"string"}}toJS(le,mr,Vt){if(this.right instanceof Te&&this.op==="#")return`(alasql.databases[alasql.useid].objects['${this.right.columnid}'])`;let Bt=this.right.toJS(le,mr,Vt);if(Ot.hasOwnProperty(this.op))return`(${Ot[this.op]}(${Bt}))`;if(this.op==null)return`(${Bt})`;throw new Error(`Unsupported operator: ${this.op}`)}}class Te{constructor(le){n(this,le)}static needsBrackets(le){return le==null?!1:le==+le?!0:R.test(le)}static wrapId(le){return Te.needsBrackets(le)?"["+le+"]":le}toString(){let le=Te.needsBrackets(this.columnid),mr=le?"["+this.columnid+"]":this.columnid;if(this.tableid){let Vt=le?"":".";mr=Te.wrapId(this.tableid)+Vt+mr,this.databaseid&&(mr=Te.wrapId(this.databaseid)+"."+mr)}return mr}toJS(le,mr,Vt){if(!this.tableid&&mr===""&&!Vt)return this.columnid!=="_"?`${le}['${this.columnid}']`:le==="g"?"g['_']":le;if(le==="g")return`g['${this.nick||this.columnid}']`;if(this.tableid)return this.columnid!=="_"?`${le}['${this.tableid}']['${this.columnid}']`:le==="g"?"g['_']":`${le}['${this.tableid}']`;if(Vt){let Bt=Vt[this.columnid];if(Bt==="-")throw new Error(`Cannot resolve column "${this.columnid}" because it exists in two source tables`);return Bt?this.columnid!=="_"?`${le}['${Bt}']['${this.columnid}']`:`${le}['${Bt}']`:this.columnid!=="_"?`${le}['${this.tableid||mr}']['${this.columnid}']`:`${le}['${this.tableid||mr}']`}return mr===-1?`${le}['${this.columnid}']`:this.columnid!=="_"?`${le}['${this.tableid||mr}']['${this.columnid}']`:`${le}['${this.tableid||mr}']`}}class ht{constructor(le){n(this,le)}toString(){let le=this.aggregatorid==="REDUCE"?this.funcid.replace(es,""):this.aggregatorid,mr=this.distinct?"DISTINCT ":"",Vt=this.expression?this.expression.toString():"",Bt=this.over?` ${this.over.toString()}`:"";return`${le}(${mr}${Vt})${Bt}`}findAggregator(le){if(this.over)return;let mr=le.selectGroup.find(Vt=>Vt.toString()===this.toString());mr?this.aggrNick=mr.nick:(this.nick||(this.nick=w(this.toString())+":"+le.selectGroup.length,le.removeKeys.includes(this.nick)||le.removeKeys.push(this.nick)),this.aggrNick=this.nick,le.selectGroup.push(this))}toType(){return["SUM","COUNT","AVG","MIN","MAX","AGGR","VAR","STDDEV","TOTAL"].includes(this.aggregatorid)?"number":this.aggregatorid==="ARRAY"?"array":this.expression.toType()}toJS(){var le=this.aggrNick||this.nick;return le===void 0&&(le=w(this.toString())),"g['"+le+"']"}}class Tt{constructor(le){n(this,le)}}Tt.prototype.toString=o.prototype.toString;class $t{constructor(le){n(this,le)}toString(){return this.type+"("+this.group.toString()+")"}}n(V,{AggrValue:ht,ArrayValue:F,Column:Te,DomainValueValue:Y,Expression:o,ExpressionStatement:c,GroupExpression:$t,JavaScript:l,Join:u,Literal:f,LogicValue:N,NullValue:Ae,NumValue:te,Op:T,OrderExpression:Tt,ParamValue:je,StringValue:W,Table:p,UniOp:Oe,VarValue:C,View:h})}V.FromData=function(n){return V.extend(this,n)},V.FromData.prototype.toString=function(){return this.data?"DATA("+(Math.random()*1e16|0)+")":"?"},V.FromData.prototype.toJS=function(){},V.Select.prototype.exec=function(n,c){this.preparams&&(n=this.preparams.concat(n));var o=t.useid,l=t.databases[o],f=this.toString(),u=zt(f),p=this.compile(o);if(p){p.sql=f,p.dbversion=l.dbversion,l.sqlCacheSize>t.MAXSQLCACHESIZE&&l.resetSqlCache(),l.sqlCacheSize++,l.sqlCache[u]=p;var h=t.res=p(n,c);return h}},V.Select.prototype.Select=function(){var n=this,c=[];if(arguments.length>1)c=Array.prototype.slice.call(arguments);else if(arguments.length==1)Array.isArray(arguments[0])?c=arguments[0]:c=[arguments[0]];else throw new Error("Wrong number of arguments of Select() function");return n.columns=[],c.forEach(function(o){if(typeof o=="string")n.columns.push(new V.Column({columnid:o}));else if(typeof o=="function"){var l=0;n.preparams?l=n.preparams.length:n.preparams=[],n.preparams.push(o),n.columns.push(new V.Column({columnid:"*",func:o,param:l}))}}),n},V.Select.prototype.From=function(n){var c=this;if(c.from||(c.from=[]),Array.isArray(n)){var o=0;c.preparams?o=c.preparams.length:c.preparams=[],c.preparams.push(n),c.from.push(new V.ParamValue({param:o}))}else if(typeof n=="string")c.from.push(new V.Table({tableid:n}));else throw new Error("Unknown arguments in From() function");return c},V.Select.prototype.OrderBy=function(){var n=this,c=[];if(n.order=[],arguments.length==0)c=["_"];else if(arguments.length>1)c=Array.prototype.slice.call(arguments);else if(arguments.length==1)Array.isArray(arguments[0])?c=arguments[0]:c=[arguments[0]];else throw new Error("Wrong number of arguments of Select() function");return c.length>0&&c.forEach(function(o){var l=new V.Column({columnid:o});typeof o=="function"&&(l=o),n.order.push(new V.OrderExpression({expression:l,direction:"ASC"}))}),n},V.Select.prototype.Top=function(n){var c=this;return c.top=new V.NumValue({value:n}),c},V.Select.prototype.GroupBy=function(){var n=this,c=[];if(arguments.length>1)c=Array.prototype.slice.call(arguments);else if(arguments.length==1)Array.isArray(arguments[0])?c=arguments[0]:c=[arguments[0]];else throw new Error("Wrong number of arguments of Select() function");return n.group=[],c.forEach(function(o){var l=new V.Column({columnid:o});n.group.push(l)}),n},V.Select.prototype.Where=function(n){var c=this;return typeof n=="function"&&(c.where=n),c},V.FuncValue=function(n){return Object.assign(this,n)};let es=/[^0-9A-Z_$]+/i;V.FuncValue.prototype.toString=function(){let n="";return t.fn[this.funcid]?n+=this.funcid:t.aggr[this.funcid]?n+=this.funcid:(t.stdlib[this.funcid.toUpperCase()]||t.stdfn[this.funcid.toUpperCase()])&&(n+=this.funcid.toUpperCase().replace(es,"")),this.funcid!=="CURRENT_TIMESTAMP"&&(n+="(",this.args&&this.args.length>0&&(n+=this.args.map(function(c){return c.toString()}).join(",")),n+=")"),this.over&&(n+=" "+this.over.toString()),n},V.FuncValue.prototype.execute=function(n,c,o){let l=1;return t.precompile(this,n,c),new Function("params,alasql","var y;return "+this.toJS("","",null))(c,t),o&&(l=o(l)),l},V.FuncValue.prototype.findAggregator=function(n){this.args&&this.args.length>0&&this.args.forEach(function(c){c.findAggregator&&c.findAggregator(n)})},V.FuncValue.prototype.toJS=function(n,c,o){var l="",f=this.funcid;return!t.fn[f]&&t.stdlib[f.toUpperCase()]?this.args&&this.args.length>0?l+=t.stdlib[f.toUpperCase()].apply(this,this.args.map(function(u){return u.toJS(n,c)})):l+=t.stdlib[f.toUpperCase()]():!t.fn[f]&&t.stdfn[f.toUpperCase()]?(this.newid&&(l+="new "),l+="alasql.stdfn["+JSON.stringify(this.funcid.toUpperCase())+"](",this.args&&this.args.length>0&&(l+=this.args.map(function(u){return u.toJS(n,c,o)}).join(",")),l+=")"):(this.newid&&(l+="new "),l+="alasql.fn["+JSON.stringify(this.funcid)+"](",this.args&&this.args.length>0&&(l+=this.args.map(function(u){return u.toJS(n,c,o)}).join(",")),l+=")"),l};var Ln=t.stdlib={},Hn=t.stdfn={};Ln.ABS=function(n){return"Math.abs("+n+")"},Ln.CLONEDEEP=function(n){return"alasql.utils.cloneDeep("+n+")"},Hn.CONCAT=function(){return Array.prototype.slice.call(arguments).join("")},Ln.EXP=function(n){return"Math.pow(Math.E,"+n+")"},Ln.IIF=function(n,c,o){if(arguments.length===3)return`((${n}) ? (${c}) : (${o}))`;throw new Error("Number of arguments of IFF is not equals to 3")},Ln.IFNULL=function(n,c){return`((typeof ${n} === "undefined" || ${n} === null) ? ${c} : ${n})`},Ln.INSTR=function(n,c){return`((${n}).indexOf(${c}) + 1)`},Ln.LEN=Ln.LENGTH=function(n){return v(n,"y.length")},Ln.LOWER=Ln.LCASE=function(n){return v(n,"String(y).toLowerCase()")},Ln.LTRIM=function(n){return v(n,'y.replace(/^[ ]+/,"")')},Ln.RTRIM=function(n){return v(n,'y.replace(/[ ]+$/,"")')},Ln.MAX=Ln.GREATEST=function(){return"["+Array.prototype.join.call(arguments,",")+"].reduce(function (a, b) { return a > b ? a : b; })"},Ln.MIN=Ln.LEAST=function(){return"["+Array.prototype.join.call(arguments,",")+"].reduce(function (a, b) { return a < b ? a : b; })"},Ln.SUBSTRING=Ln.SUBSTR=Ln.MID=function(n,c,o){if(arguments.length==2)return v(n,"y.substr("+c+"-1)");if(arguments.length==3)return v(n,"y.substr("+c+"-1,"+o+")")},Hn.REGEXP_LIKE=function(n,c,o){var l=c.replace(/\[\[:<:\]\]/g,"\\b").replace(/\[\[:>:\]\]/g,"\\b");return(n||"").search(RegExp(l,o))>-1},Ln.ISNULL=Ln.NULLIF=function(n,c){return"("+n+"=="+c+"?undefined:"+n+")"},Ln.POWER=function(n,c){return"Math.pow("+n+","+c+")"},Ln.RANDOM=function(n){return arguments.length==0?"Math.random()":"(Math.random()*("+n+")|0)"},Ln.ROUND=function(n,c){return arguments.length==2?"(__alasql_tmp = ("+n+'), (__alasql_tmp == null || (typeof __alasql_tmp === "string" && __alasql_tmp.trim() === "")) ? undefined : ((__alasql_tmp = Number(__alasql_tmp)), isNaN(__alasql_tmp) ? undefined : Math.round(__alasql_tmp*Math.pow(10,('+c+")))/Math.pow(10,("+c+"))))":"(__alasql_tmp = ("+n+'), (__alasql_tmp == null || (typeof __alasql_tmp === "string" && __alasql_tmp.trim() === "")) ? undefined : ((__alasql_tmp = Number(__alasql_tmp)), isNaN(__alasql_tmp) ? undefined : Math.round(__alasql_tmp)))'},Ln.CEIL=Ln.CEILING=function(n){return"Math.ceil("+n+")"},Ln.FLOOR=function(n){return"Math.floor("+n+")"},Ln.ROWNUM=function(){return"1"},Ln.ROW_NUMBER=function(){return"1"},Ln.GROUP_ROW_NUMBER=function(){return"1"},Ln.SQRT=function(n){return"Math.sqrt("+n+")"},Ln.TRIM=function(n){return v(n,"y.trim()")},Ln.UPPER=Ln.UCASE=function(n){return v(n,"String(y).toUpperCase()")},Hn.CONCAT_WS=function(){var n=Array.prototype.slice.call(arguments);return n=n.filter(c=>!(c===null||typeof c>"u")),n.slice(1,n.length).join(n[0]||"")},t.aggr.group_concat=t.aggr.GROUP_CONCAT=function(n,c,o,l,f){if(l===void 0&&(l=","),o===1)return n==null?{values:[],separator:l,orderDirection:f}:{values:[n],separator:l,orderDirection:f};if(o===2)return n==null?c:c==null?{values:[n],separator:l,orderDirection:f}:(typeof c=="string"&&(c={values:c.split(","),separator:",",orderDirection:void 0}),c.values.push(n),c);{if(c==null)return;if(typeof c=="string")return c;let u=c.values;if(u.length===0)return;if(c.orderDirection&&c.orderDirection!==void 0){let p=c.orderDirection==="ASC";u=u.slice().sort((h,b)=>h===b?0:h==null?1:b==null?-1:typeof h=="string"&&typeof b=="string"?p?h.localeCompare(b):b.localeCompare(h):p?hh>b?1:hh?1:-1});let u=l*(f.length+1)/4;return Number.isInteger(u)?f[u-1]:f[Math.floor(u)]},t.aggr.QUART2=function(n,c,o){return t.aggr.QUART(n,c,o,2)},t.aggr.QUART3=function(n,c,o){return t.aggr.QUART(n,c,o,3)},t.aggr.VAR=function(n,c,o){return o===1?n===null?{sum:0,sumSq:0,count:0}:{sum:n,sumSq:n*n,count:1}:o===2?(n!==null&&(c.sum+=n,c.sumSq+=n*n,c.count++),c):c.count>1?(c.sumSq-c.sum*c.sum/c.count)/(c.count-1):0},t.aggr.STDEV=function(n,c,o){return o===1||o===2?t.aggr.VAR(n,c,o):Math.sqrt(t.aggr.VAR(n,c,o))},t.aggr.STDEV=function(n,c,o){return o===1||o===2?t.aggr.VAR(n,c,o):Math.sqrt(t.aggr.VAR(n,c,o))},t.aggr.VARP=function(n,c,o){if(o===1)return{count:1,sum:n,sumSq:n*n};if(o===2)return c.count++,c.sum+=n,c.sumSq+=n*n,c;if(c.count>0){let l=c.sum/c.count;return c.sumSq/c.count-l*l}else return 0},t.aggr.STD=t.aggr.STDDEV=t.aggr.STDEVP=function(n,c,o){return o==1||o==2?t.aggr.VARP(n,c,o):Math.sqrt(t.aggr.VARP(n,c,o))},t._aggrOriginal=t.aggr,t.aggr={},Object.keys(t._aggrOriginal).forEach(function(n){t.aggr[n]=function(c,o,l){if(!(l===3&&typeof o>"u"))return t._aggrOriginal[n].apply(null,arguments)}}),Hn.REPLACE=function(n,c,o){return String(n??"").split(String(c??"")).join(String(o??""))};for(var Ni=[],is=0;is<256;is++)Ni[is]=(is<16?"0":"")+is.toString(16);Hn.NEWID=Hn.UUID=Hn.GEN_RANDOM_UUID=function(){var n=Math.random()*4294967295|0,c=Math.random()*4294967295|0,o=Math.random()*4294967295|0,l=Math.random()*4294967295|0;return Ni[n&255]+Ni[n>>8&255]+Ni[n>>16&255]+Ni[n>>24&255]+"-"+Ni[c&255]+Ni[c>>8&255]+"-"+Ni[c>>16&15|64]+Ni[c>>24&255]+"-"+Ni[o&63|128]+Ni[o>>8&255]+"-"+Ni[o>>16&255]+Ni[o>>24&255]+Ni[l&255]+Ni[l>>8&255]+Ni[l>>16&255]+Ni[l>>24&255]},V.CaseValue=function(n){return Object.assign(this,n)},V.CaseValue.prototype.toString=function(){var n="CASE ";return this.expression&&(n+=this.expression.toString()),this.whens&&(n+=this.whens.map(function(c){return" WHEN "+c.when.toString()+" THEN "+c.then.toString()}).join()),n+=" END",n},V.CaseValue.prototype.findAggregator=function(n){this.expression&&this.expression.findAggregator&&this.expression.findAggregator(n),this.whens&&this.whens.length>0&&this.whens.forEach(function(c){c.when.findAggregator&&c.when.findAggregator(n),c.then.findAggregator&&c.then.findAggregator(n)}),this.elses&&this.elses.findAggregator&&this.elses.findAggregator(n)},V.CaseValue.prototype.toJS=function(n,c,o){let l=`(((${n}, params, alasql) => { + let y, r;`;return this.expression?(l+=`let v = ${this.expression.toJS(n,c,o)};`,this.whens.forEach((f,u)=>{let p=`v === ${f.when.toJS(n,c,o)}`,h=`r = ${f.then.toJS(n,c,o)}`;l+=`${u===0?"if":" else if"} (${p}) { ${h}; }`})):this.whens.forEach((f,u)=>{let p=f.when.toJS(n,c,o),h=`r = ${f.then.toJS(n,c,o)}`;l+=`${u===0?"if":" else if"} (${p}) { ${h}; }`}),this.elses&&(l+=` else { r = ${this.elses.toJS(n,c,o)}; }`),l+="; return r; }))("+n+", params, alasql)",l},V.Json=function(n){return Object.assign(this,n)},V.Json.prototype.toString=function(){var n="";return n+=ls(this.value),n+="",n};let ls=t.utils.JSONtoString=function(n){if(typeof n=="string")return`"${n}"`;if(typeof n=="number"||typeof n=="boolean")return String(n);if(typeof n=="bigint")return`${n.toString()}n`;if(Array.isArray(n))return`[${n.map(c=>ls(c)).join(",")}]`;if(typeof n=="object")if(!n.toJS||n instanceof V.Json){let c=[];for(let o in n){let l=typeof o=="string"?`"${o}"`:String(o),f=ls(n[o]);c.push(`${l}:${f}`)}return`{${c.join(",")}}`}else{if(n.toString)return n.toString();throw new Error(`1: Cannot show JSON object ${JSON.stringify(n)}`)}else throw new Error(`2: Cannot show JSON object ${JSON.stringify(n)}`)};function g1(n,c,o,l){var f="";if(typeof n=="string")f='"'+n+'"';else if(typeof n=="number")f="("+n+")";else if(typeof n=="boolean")f=n;else if(typeof n=="bigint")f=n.toString()+"n";else if(typeof n=="object")if(Array.isArray(n))f+=`[${n.map(u=>g1(u,c,o,l)).join(",")}]`;else if(!n.toJS||n instanceof V.Json){let u=[];for(let p in n){let h=typeof p=="string"?`"${p}"`:p.toString(),b=g1(n[p],c,o,l);u.push(`${h}:${b}`)}f=`{${u.join(",")}}`}else if(n.toJS)f=n.toJS(c,o,l);else throw new Error(`Cannot parse JSON object ${JSON.stringify(n)}`);else throw new Error("2Can not parse JSON object "+JSON.stringify(n));return f}V.Json.prototype.toJS=function(n,c,o){return g1(this.value,n,c,o)},V.Convert=function(n){return Object.assign(this,n)},V.Convert.prototype.toString=function(){var n="CONVERT(";return n+=this.dbtypeid,typeof this.dbsize<"u"&&(n+="("+this.dbsize,this.dbprecision&&(n+=","+this.dbprecision),n+=")"),n+=","+this.expression.toString(),this.style&&(n+=","+this.style),n+=")",n},V.Convert.prototype.toJS=function(n,c,o){return`alasql.stdfn.CONVERT(${this.expression.toJS(n,c,o)}, { dbtypeid: "${this.dbtypeid}", dbsize: ${this.dbsize}, dbprecision: ${this.dbprecision}, style: ${this.style} - })`};function ji(n){var c=n.getMonth()+1,a=n.getYear(),l=n.getFullYear(),f=n.getDate(),u=n.toString().substr(4,3),p=("0"+f).substr(-2),d=("0"+c).substr(-2),b=("0"+a).substr(-2),U=("0"+n.getHours()).substr(-2),R=("0"+n.getMinutes()).substr(-2),L=("0"+n.getSeconds()).substr(-2),T=("00"+n.getMilliseconds()).substr(-3);return{month:c,year:a,fullYear:l,date:f,day:u,formattedDate:p,formattedMonth:d,formattedYear:b,formattedHour:U,formattedMinutes:R,formattedSeconds:L,formattedMilliseconds:T}}t.stdfn.CONVERT=function(n,c){var a=n,l=c.dbtypeid?.toUpperCase(),f,u;if((c.style||c.dbtypeid=="Date"||["DATE","DATETIME","DATETIME2"].indexOf(l)>-1)&&(/\d{8}/.test(a)?f=new Date(+a.substr(0,4),+a.substr(4,2)-1,+a.substr(6,2)):f=aa(a),u=ji(f)),c.style)switch(c.style){case 1:a=u.formattedMonth+"/"+u.formattedDate+"/"+u.formattedYear;break;case 2:a=u.formattedYear+"."+u.formattedMonth+"."+u.formattedDate;break;case 3:a=u.formattedDate+"/"+u.formattedMonth+"/"+u.formattedYear;break;case 4:a=u.formattedDate+"."+u.formattedMonth+"."+u.formattedYear;break;case 5:a=u.formattedDate+"-"+u.formattedMonth+"-"+u.formattedYear;break;case 6:a=u.formattedDate+" "+u.day.toLowerCase()+" "+u.formattedYear;break;case 7:a=u.day+" "+u.formattedDate+","+u.formattedYear;break;case 8:case 108:a=u.formattedHour+":"+u.formattedMinutes+":"+u.formattedSeconds;break;case 10:a=u.formattedMonth+"-"+u.formattedDate+"-"+u.formattedYear;break;case 11:a=u.formattedYear+"/"+u.formattedMonth+"/"+u.formattedDate;break;case 12:a=u.formattedYear+u.formattedMonth+u.formattedDate;break;case 101:a=u.formattedMonth+"/"+u.formattedDate+"/"+u.fullYear;break;case 102:a=u.fullYear+"."+u.formattedMonth+"."+u.formattedDate;break;case 103:a=u.formattedDate+"/"+u.formattedMonth+"/"+u.fullYear;break;case 104:a=u.formattedDate+"."+u.formattedMonth+"."+u.fullYear;break;case 105:a=u.formattedDate+"-"+u.formattedMonth+"-"+u.fullYear;break;case 106:a=u.formattedDate+" "+u.day.toLowerCase()+" "+u.fullYear;break;case 107:a=u.day+" "+u.formattedDate+","+u.fullYear;break;case 110:a=u.formattedMonth+"-"+u.formattedDate+"-"+u.fullYear;break;case 111:a=u.fullYear+"/"+u.formattedMonth+"/"+u.formattedDate;break;case 112:a=u.fullYear+u.formattedMonth+u.formattedDate;break;default:throw new Error("The CONVERT style "+c.style+" is not realized yet.")}switch(l){case"DATE":return`${u.formattedYear}.${u.formattedMonth}.${u.formattedDate}`;case"DATETIME":case"DATETIME2":return`${u.fullYear}.${u.formattedMonth}.${u.formattedDate} ${u.formattedHour}:${u.formattedMinutes}:${u.formattedSeconds}.${u.formattedMilliseconds}`;case"MONEY":var p=+a;return(p|0)+p*100%100/100;case"BOOLEAN":return!!a;case"INT":case"INTEGER":case"SMALLINT":case"BIGINT":case"SERIAL":case"SMALLSERIAL":case"BIGSERIAL":return a|0;case"STRING":case"VARCHAR":case"NVARCHAR":case"CHARACTER VARIABLE":return c.dbsize?String(a).substr(0,c.dbsize):String(a);case"CHAR":case"CHARACTER":case"NCHAR":return(a+" ".repeat(c.dbsize)).substr(0,c.dbsize);case"NUMBER":case"FLOAT":case"DECIMAL":case"NUMERIC":var p=+a;return c.dbsize!==void 0&&(p=parseFloat(p.toPrecision(c.dbsize))),c.dbprecision!==void 0&&(p=parseFloat(p.toFixed(c.dbprecision))),p;case"JSON":if(typeof a=="object")return a;try{return JSON.parse(a)}catch{throw new Error("Cannot convert string to JSON")}case"Date":return a;default:return a}},V.ColumnDef=function(n){return Object.assign(this,n)},V.ColumnDef.prototype.toString=function(){let n=this.columnid;return this.dbtypeid&&(n+=" "+this.dbtypeid),this.dbsize&&(n+="("+this.dbsize,this.dbprecision&&(n+=","+this.dbprecision),n+=")"),this.primarykey&&(n+=" PRIMARY KEY"),this.notnull&&(n+=" NOT NULL"),n},V.CreateTable=function(n){return Object.assign(this,n)},V.CreateTable.prototype.toString=function(){let n=`CREATE${this.temporary?" TEMPORARY":""}${this.view?" VIEW":` ${this.class?"CLASS":"TABLE"}`}${this.ifnotexists?" IF NOT EXISTS":""} ${this.table.toString()}`;return this.viewcolumns&&(n+=`(${this.viewcolumns.map(c=>c.toString()).join(",")})`),this.as?n+=` AS ${this.as}`:n+=` (${this.columns.map(c=>c.toString()).join(",")})`,this.view&&this.select&&(n+=` AS ${this.select.toString()}`),n},V.CreateTable.prototype.execute=function(n,c,a){var l=t.databases[this.table.databaseid||n],f=this.table.tableid;if(!f)throw new Error("Table name is not defined");var u=this.columns,p=this.constraints||[];if(this.ifnotexists&&l.tables[f])return a?a(0):0;if(l.tables[f])throw new Error("Can not create table '"+f+"', because it already exists in the database '"+l.databaseid+"'");var d=l.tables[f]=new t.Table;this.class&&(d.isclass=!0);var b=[],U=[];if(u&&u.forEach(function(T){var C=T.dbtypeid;t.fn[C]||(C=C.toUpperCase()),["SERIAL","SMALLSERIAL","BIGSERIAL"].indexOf(C)>-1&&(T.identity={value:1,step:1});var te={columnid:T.columnid,dbtypeid:C,dbsize:T.dbsize,dbprecision:T.dbprecision,notnull:T.notnull,identity:T.identity};if(T.identity&&(d.identities[T.columnid]={value:+T.identity.value,step:+T.identity.step}),T.check&&d.checks.push({id:T.check.constrantid,fn:new Function("r,params,alasql","var y;return "+T.check.expression.toJS("r",""))}),T.default&&b.push(JSON.stringify(""+T.columnid)+":"+T.default.toJS("r","")),T.primarykey){var W=d.pk={};W.columns=[T.columnid],W.onrightfns=`r[${JSON.stringify(T.columnid)}]`,W.onrightfn=new Function("r","var y;return "+W.onrightfns),W.hh=Ht(W.onrightfns),d.uniqs[W.hh]={}}if(T.unique){var Y={};d.uk=d.uk||[],d.uk.push(Y),Y.columns=[T.columnid],Y.onrightfns=`r[${JSON.stringify(T.columnid)}]`,Y.onrightfn=new Function("r","var y;return "+Y.onrightfns),Y.hh=Ht(Y.onrightfns),d.uniqs[Y.hh]={}}if(T.foreignkey){var B=T.foreignkey.table,N=t.databases[B.databaseid||n].tables[B.tableid];if(typeof B.columnid>"u")if(N.pk.columns&&N.pk.columns.length>0)B.columnid=N.pk.columns[0];else throw new Error("FOREIGN KEY allowed only to tables with PRIMARY KEYs");te.foreignkey={tableid:B.tableid,columnid:B.columnid};var Ae=function(je){var Ot={},Oe=je[T.columnid];if(Oe!=null&&!(typeof Oe=="number"&&isNaN(Oe))){Ot[B.columnid]=Oe;var Te=N.pk.onrightfn(Ot);if(!N.uniqs[N.pk.hh][Te])throw new Error('Foreign key "'+Oe+'" not found in table "'+B.tableid+'"')}return!0};d.checks.push({fn:Ae,fk:!0})}T.onupdate&&U.push(`r[${JSON.stringify(T.columnid)}]=`+T.onupdate.toJS("r","")),d.columns.push(te),d.xcolumns[te.columnid]=te}),d.defaultfns=b.join(","),d.onupdatefns=U.join(";"),p.forEach(function(T){var C;if(T.type==="PRIMARY KEY"){if(d.pk)throw new Error("Primary key already exists");var te=d.pk={};te.columns=T.columns,te.onrightfns=te.columns.map(function(N){return`r[${JSON.stringify(N)}]`}).join("+'`'+"),te.onrightfn=new Function("r","var y;return "+te.onrightfns),te.hh=Ht(te.onrightfns),d.uniqs[te.hh]={},te.columns.forEach(function(N){d.xcolumns[N]&&(d.xcolumns[N].primarykey=!0)})}else if(T.type==="CHECK")C=new Function("r,params,alasql","var y;return "+T.expression.toJS("r",""));else if(T.type==="UNIQUE"){var W={};d.uk=d.uk||[],d.uk.push(W),W.columns=T.columns,W.onrightfns=W.columns.map(function(N){return N.expression.toJS("r","")}).join("+'`'+"),W.onrightfn=new Function("r","var y;return "+W.onrightfns),W.hh=Ht(W.onrightfns),d.uniqs[W.hh]={}}else if(T.type==="FOREIGN KEY"){var Y=T.fktable;T.fkcolumns&&T.fkcolumns.length>0&&(Y.fkcolumns=T.fkcolumns);var B=t.databases[Y.databaseid||n].tables[Y.tableid];if(typeof Y.fkcolumns>"u"&&(Y.fkcolumns=B.pk.columns),Y.columns=T.columns,Y.fkcolumns.length>Y.columns.length)throw new Error("Invalid foreign key on table "+d.tableid);Y.columns.forEach(function(N,Ae){d.xcolumns[N]&&(d.xcolumns[N].foreignkey={tableid:Y.tableid,columnid:Y.fkcolumns[Ae],constraintid:T.constraintid})}),C=function(N){var Ae={};if(Y.fkcolumns.forEach(function(Te,ht){var Tt=N[Y.columns[ht]];Tt!=null&&!(typeof Tt=="number"&&isNaN(Tt))&&(Ae[Te]=Tt)}),Object.keys(Ae).length===0)return!0;if(Object.keys(Ae).length!==Y.columns.length)throw new Error("Invalid foreign key on table "+d.tableid);var je=t.databases[Y.databaseid||n].tables[Y.tableid],Ot=je.pk.onrightfn(Ae);if(!je.uniqs[je.pk.hh][Ot]){var Oe=Y.columns.map(function(Te){return N[Te]});throw new Error('Foreign key "'+Oe.join(", ")+'" not found in table "'+Y.tableid+'"')}return!0}}C&&d.checks.push({fn:C,id:T.constraintid,fk:T.type==="FOREIGN KEY"})}),this.view&&this.viewcolumns){var R=this;this.viewcolumns.forEach(function(T,C){R.select.columns[C].as=T.columnid})}if(this.view&&this.select&&(d.view=!0,d.viewSelect=this.select,d.viewDatabaseid=this.table.databaseid||n),l.engineid)return t.engines[l.engineid].createTable(this.table.databaseid||n,f,this.ifnotexists,a);d.insert=function(T,C,te){var W=t.inserted;t.inserted=[T];var Y=this;C&&te&&(te=!1);var B=!1,N=!1;for(var Ae in Y.beforeinsert){var je=Y.beforeinsert[Ae];je&&t.executeTrigger(je,n,T)===!1&&(N=N||!0)}if(!N){var Ot=!1;for(Ae in Y.insteadofinsert)Ot=!0,je=Y.insteadofinsert[Ae],je&&t.executeTrigger(je,n,T);if(!Ot){for(var Oe in Y.identities){var Te=Y.identities[Oe];(typeof T[Oe]>"u"||T[Oe]===null)&&(T[Oe]=Te.value)}if(Y.checks&&Y.checks.length>0&&Y.checks.forEach(function(Qr){if(Qr.fn(T,{},t)===!1)throw new Error("Violation of CHECK constraint "+(Qr.id||""))}),Y.columns.forEach(function(Qr){if(Qr.notnull&&typeof T[Qr.columnid]>"u")throw new Error("Wrong NULL value in NOT NULL column "+Qr.columnid)}),Y.pk){var ht=Y.pk,Tt=ht.onrightfn(T);if(typeof Y.uniqs[ht.hh][Tt]<"u")if(C)B=Y.uniqs[ht.hh][Tt];else{if(te)return t.inserted=W,!1;throw new Error("Cannot insert record, because it already exists in primary key index")}}if(Y.uk&&Y.uk.length)for(var $t=0;$t=Te.value?Te.value=+T[Oe]+Te.step:Te.value+=Te.step}if(Y.pk){var ht=Y.pk,Tt=ht.onrightfn(T);Y.uniqs[ht.hh][Tt]=T}if(Y.uk&&Y.uk.length&&Y.uk.forEach(function(Qr){var $n=Qr.onrightfn(T);Y.uniqs[Qr.hh][$n]=T}),Y.inddefs)for(var mr in Y.inddefs){var Vt=Y.inddefs[mr],Rt=Vt.hh;if(Y.indices[Rt]){var Tt=new Function("r,params,alasql","return "+Vt.rightfns)(T,c,t);Y.indices[Rt][Tt]||(Y.indices[Rt][Tt]=[]),Y.indices[Rt][Tt].push(T)}}}for(var Ae in Y.afterinsert){var je=Y.afterinsert[Ae];je&&t.executeTrigger(je,n,T)}t.inserted=W}}},d.delete=function(T){var C=this,te=C.data[T],W=!1;for(var Y in C.beforedelete){var B=C.beforedelete[Y];B&&t.executeTrigger(B,n,te)===!1&&(W=W||!0)}if(W)return!1;var N=!1;for(var Y in C.insteadofdelete){N=!0;var B=C.insteadofdelete[Y];B&&t.executeTrigger(B,n,te)}if(!N){if(this.pk){var Ae=this.pk,je=Ae.onrightfn(te);if(typeof this.uniqs[Ae.hh][je]>"u")throw new Error("Something wrong with primary key index on table");this.uniqs[Ae.hh][je]=void 0}C.uk&&C.uk.length&&C.uk.forEach(function(Ot){var Oe=Ot.onrightfn(te);if(typeof C.uniqs[Ot.hh][Oe]>"u")throw new Error("Something wrong with unique index on table");C.uniqs[Ot.hh][Oe]=void 0})}},d.deleteall=function(){this.data.length=0,this.pk&&(this.uniqs[this.pk.hh]={}),d.uk&&d.uk.length&&d.uk.forEach(function(T){d.uniqs[T.hh]={}})},d.update=function(T,C,te){var W=mn(this.data[C]),Y;if(this.pk&&(Y=this.pk,Y.pkaddr=Y.onrightfn(W,te),typeof this.uniqs[Y.hh][Y.pkaddr]>"u")){this.uniqs[Y.hh]={};for(var B=0;B"u"){d.uniqs[Te.hh]={};for(var ht=0;ht0&&d.checks.forEach(function(Te){if(Te.fn(W,te,t)===!1)throw new Error("Violation of CHECK constraint "+(Te.id||""))}),d.columns.forEach(function(Te){if(Te.notnull&&typeof W[Te.columnid]>"u")throw new Error("Wrong NULL value in NOT NULL column "+Te.columnid)}),this.pk&&(Y.newpkaddr=Y.onrightfn(W),typeof this.uniqs[Y.hh][Y.newpkaddr]<"u"&&Y.newpkaddr!==Y.pkaddr))throw new Error("Record already exists");d.uk&&d.uk.length&&d.uk.forEach(function(Te){if(Te.newukaddr=Te.onrightfn(W),typeof d.uniqs[Te.hh][Te.newukaddr]<"u"&&Te.newukaddr!==Te.ukaddr)throw new Error("Record already exists")}),this.pk&&(this.uniqs[Y.hh][Y.pkaddr]=void 0,this.uniqs[Y.hh][Y.newpkaddr]=W),d.uk&&d.uk.length&&d.uk.forEach(function(Te){d.uniqs[Te.hh][Te.ukaddr]=void 0,d.uniqs[Te.hh][Te.newukaddr]=W}),this.data[C]=W;for(var je in d.afterupdate){var Ot=d.afterupdate[je];Ot&&t.executeTrigger(Ot,n,this.data[C],W)}}};var L;return t.options.nocount||(L=1),a&&(L=a(L)),L},t.fn.Date=Object,t.fn.Date=Date,t.fn.Number=Number,t.fn.String=String,t.fn.Boolean=Boolean,zn.EXTEND=t.utils.extend,zn.CHAR=String.fromCharCode.bind(String),zn.ASCII=function(n){return n.charCodeAt(0)},zn.COALESCE=function(){for(var n=0;n"u")&&!(typeof arguments[n]=="number"&&isNaN(arguments[n])))return arguments[n]},zn.USER=function(){return"alasql"},zn.OBJECT_ID=function(n){return!!t.tables[n]},zn.DATE=function(n){return!isNaN(n)&&n.length===8?new Date(+n.substr(0,4),+n.substr(4,2)-1,+n.substr(6,2)):aa(n)},zn.NOW=function(){if(t.options.dateAsString){var n=new Date,c=n.getFullYear()+"-"+("0"+(n.getMonth()+1)).substr(-2)+"-"+("0"+n.getDate()).substr(-2);return c+=" "+("0"+n.getHours()).substr(-2)+":"+("0"+n.getMinutes()).substr(-2)+":"+("0"+n.getSeconds()).substr(-2),c+="."+("00"+n.getMilliseconds()).substr(-3),c}return new Date},zn.GETDATE=zn.NOW,zn.CURRENT_TIMESTAMP=zn.NOW,zn.CURDATE=zn.CURRENT_DATE=function(){var n=new Date;if(n.setHours(0,0,0,0),t.options.dateAsString){var c=n.getFullYear()+"-"+("0"+(n.getMonth()+1)).substr(-2)+"-"+("0"+n.getDate()).substr(-2);return c}return n},zn.SECOND=function(c){var c=aa(c);return c.getSeconds()},zn.MINUTE=function(c){var c=aa(c);return c.getMinutes()},zn.HOUR=function(c){var c=aa(c);return c.getHours()},zn.DAYOFWEEK=zn.WEEKDAY=function(c){var c=aa(c);return c.getDay()},zn.DAY=zn.DAYOFMONTH=function(c){var c=aa(c);return c.getDate()},zn.MONTH=function(c){var c=aa(c);return c.getMonth()+1},zn.YEAR=function(c){var c=aa(c);return c.getFullYear()};var El={year:1e3*3600*24*365,quarter:1e3*3600*24*365/4,month:1e3*3600*24*30,week:1e3*3600*24*7,day:1e3*3600*24,dayofyear:1e3*3600*24,weekday:1e3*3600*24,hour:1e3*3600,minute:1e3*60,second:1e3,millisecond:1,microsecond:.001};t.stdfn.DATEDIFF=function(n,c,a){var l=aa(a).getTime()-aa(c).getTime();return l/El[n.toLowerCase()]|0},t.stdfn.DATEADD=function(f,c,a){var l=aa(a),f=f.toLowerCase();switch(f){case"year":l.setFullYear(l.getFullYear()+c);break;case"quarter":l.setMonth(l.getMonth()+c*3);break;case"month":l.setMonth(l.getMonth()+c);break;default:l=new Date(l.getTime()+c*El[f]);break}return l},t.stdfn.INTERVAL=function(n,c){return n*El[c.toLowerCase()]},t.stdfn.DATE_ADD=t.stdfn.ADDDATE=function(n,c){var a=aa(n).getTime()+c;return new Date(a)},t.stdfn.DATE_SUB=t.stdfn.SUBDATE=function(n,c){var a=aa(n).getTime()-c;return new Date(a)};var wf=/^\d{4}\.\d{2}\.\d{2} \d{2}:\d{2}:\d{2}/;function aa(n){return typeof n=="string"&&wf.test(n)&&(n=n.replace(".","-").replace(".","-")),new Date(n)}V.DropTable=function(n){return Object.assign(this,n)},V.DropTable.prototype.toString=function(){var n="DROP ";return this.view?n+="VIEW":n+="TABLE",this.ifexists&&(n+=" IF EXISTS"),n+=" "+this.tables.toString(),n},V.DropTable.prototype.execute=function(n,c,a){var l=this.ifexists,f=0,u=0,p=this.tables.length;return this.tables.forEach(function(d){var b=t.databases[d.databaseid||n],U=d.tableid;if(!l||l&&b.tables[U]){if(b.tables[U])b.engineid?t.engines[b.engineid].dropTable(d.databaseid||n,U,l,function(R){delete b.tables[U],f+=R,u++,u==p&&a&&a(f)}):(delete b.tables[U],f++,u++,u==p&&a&&a(f));else if(!t.options.dropifnotexists)throw new Error(`Can not drop table ${JSON.stringify(d.tableid)} because it does not exist in the database.`)}else u++,u==p&&a&&a(f)}),f},V.TruncateTable=function(n){return Object.assign(this,n)},V.TruncateTable.prototype.toString=function(){var n="TRUNCATE TABLE";return n+=" "+this.table.toString(),n},V.TruncateTable.prototype.execute=function(n,c,a){var l=t.databases[this.table.databaseid||n],f=this.table.tableid;if(l.engineid)return t.engines[l.engineid].truncateTable(this.table.databaseid||n,f,this.ifexists,a);if(l.tables[f])l.tables[f].data=[];else throw new Error("Cannot truncate table becaues it does not exist");return a?a(0):0},V.CreateVertex=function(n){return Object.assign(this,n)},V.CreateVertex.prototype.toString=function(){var n="CREATE VERTEX ";return this.class&&(n+=this.class+" "),this.sharp&&(n+="#"+this.sharp+" "),this.sets?n+=this.sets.toString():this.content?n+=this.content.toString():this.select&&(n+=this.select.toString()),n},V.CreateVertex.prototype.toJS=function(n){var c="this.queriesfn["+(this.queriesidx-1)+"](this.params,null,"+n+")";return c},V.CreateVertex.prototype.compile=function(n){var c=n,a=this.sharp;if(typeof this.name<"u")var f="x.name="+this.name.toJS(),l=new Function("x",f);if(this.sets&&this.sets.length>0)var f=this.sets.map(function(d){return`x[${JSON.stringify(d.column.columnid)}]=`+d.expression.toJS("x","")}).join(";"),u=new Function("x,params,alasql",f);var p=function(d,b){var U,R=t.databases[c],L;typeof a<"u"?L=a:L=R.counter++;var T={$id:L,$node:"VERTEX"};return R.objects[T.$id]=T,U=T,l&&l(T),u&&u(T,d,t),b&&(U=b(U)),U};return p},V.CreateEdge=function(n){return Object.assign(this,n)},V.CreateEdge.prototype.toString=function(){var n="CREATE EDGE ";return this.class&&(n+=this.class+" "),n},V.CreateEdge.prototype.toJS=function(n){var c="this.queriesfn["+(this.queriesidx-1)+"](this.params,null,"+n+")";return c},V.CreateEdge.prototype.compile=function(n){var c=n,a=new Function("params,alasql","var y;return "+this.from.toJS()),l=new Function("params,alasql","var y;return "+this.to.toJS());if(typeof this.name<"u")var u="x.name="+this.name.toJS(),f=new Function("x",u);if(this.sets&&this.sets.length>0)var u=this.sets.map(function(d){return`x[${JSON.stringify(d.column.columnid)}]=`+d.expression.toJS("x","")}).join(";"),p=new Function("x,params,alasql","var y;"+u);return(d,b)=>{let U=0,R=t.databases[c],L={$id:R.counter++,$node:"EDGE"},T=a(d,t),C=l(d,t);return L.$in=[T.$id],L.$out=[C.$id],T.$out=T.$out||[],T.$out.push(L.$id),C.$in=C.$in||[],C.$in.push(L.$id),R.objects[L.$id]=L,U=L,f?.(L),p?.(L,d,t),b?b(U):U}},V.CreateGraph=function(n){return Object.assign(this,n)},V.CreateGraph.prototype.toString=function(){var n="CREATE GRAPH ";return this.class&&(n+=this.class+" "),n},V.CreateGraph.prototype.execute=function(n,c,a){var l=[];return this.from&&t.from[this.from.funcid]&&(this.graph=t.from[this.from.funcid.toUpperCase()]),this.graph.forEach(p=>{if(!p.source)u(p);else{let d={};p.as!==void 0&&(t.vars[p.as]=d),p.prop!==void 0&&(d.name=p.prop),p.sharp!==void 0&&(d.$id=p.sharp),p.name!==void 0&&(d.name=p.name),p.class!==void 0&&(d.$class=p.class);let b=t.databases[n];d.$id=d.$id!==void 0?d.$id:b.counter++,d.$node="EDGE",p.json!==void 0&&Object.assign(d,new Function("params, alasql",`return ${p.json.toJS()}`)(c,t));let U=(T,C)=>{let te,W;if(T.vars)W=t.vars[T.vars],te=typeof W=="object"?W:b.objects[W];else{let Y=T.sharp||T.prop;te=b.objects[Y],te===void 0&&t.options.autovertex&&(T.prop||T.name)&&(te=f(T.prop||T.name)||u(T))}return C&&te&&typeof te.$out>"u"&&(te.$out=[]),!C&&te&&typeof te.$in>"u"&&(te.$in=[]),te},R=U(p.source,!0),L=U(p.target,!1);if(d.$in=[R.$id],d.$out=[L.$id],R.$out.push(d.$id),L.$in.push(d.$id),b.objects[d.$id]=d,d.$class!==void 0){let T=t.databases[n].tables[d.$class];if(T===void 0)throw new Error("No such class. Please use CREATE CLASS");T.data.push(d)}l.push(d.$id)}}),a&&(l=a(l)),l;function f(p){var d=t.databases[t.useid].objects;for(var b in d)if(d[b].name===p)return d[b]}function u(p){var d={};typeof p.as<"u"&&(t.vars[p.as]=d),typeof p.prop<"u"&&(d.$id=p.prop,d.name=p.prop),typeof p.sharp<"u"&&(d.$id=p.sharp),typeof p.name<"u"&&(d.name=p.name),typeof p.class<"u"&&(d.$class=p.class);var b=t.databases[n];if(typeof d.$id>"u"&&(d.$id=b.counter++),d.$node="VERTEX",typeof p.json<"u"&&Pr(d,new Function("params,alasql","var y;return "+p.json.toJS())(c,t)),b.objects[d.$id]=d,typeof d.$class<"u"){if(typeof t.databases[n].tables[d.$class]>"u")throw new Error("No such class. Pleace use CREATE CLASS");t.databases[n].tables[d.$class].data.push(d)}return l.push(d.$id),d}},V.CreateGraph.prototype.compile1=function(n){let c=n,a=new Function("params, alasql",`return ${this.from.toJS()}`),l=new Function("params, alasql",`return ${this.to.toJS()}`),f,u;if(this.name!==void 0){let p=`x.name = ${this.name.toJS()}`;f=new Function("x",p)}if(this.sets&&this.sets.length>0){let p=this.sets.map(d=>`x[${JSON.stringify(d.column.columnid)}] = ${d.expression.toJS("x","")}`).join(";");u=new Function("x, params, alasql",`var y; ${p}`)}return(p,d)=>{let b=0,U=t.databases[c],R={$id:U.counter++,$node:"EDGE"},L=a(p,t),T=l(p,t);return R.$in=[L.$id],R.$out=[T.$id],L.$out=L.$out||[],L.$out.push(R.$id),T.$in=T.$in||[],T.$in.push(R.$id),U.objects[R.$id]=R,b=R,f&&f(R),u&&u(R,p,t),d&&(b=d(b)),b}},V.AlterTable=function(n){return Object.assign(this,n)},V.AlterTable.prototype.toString=function(){let n="ALTER TABLE "+this.table.toString();return this.renameto&&(n+=" RENAME TO "+this.renameto),n},V.AlterTable.prototype.execute=function(n,c,a){let l=t.databases[n];if(l.dbversion=Date.now(),this.renameto){var f=this.table.tableid,u=this.renameto,p=1;if(l.tables[u])throw new Error(`Can not rename a table "${f}" to "${u}" because the table with this name already exists`);if(u===f)throw new Error(`Can not rename a table "${f}" to itself`);return l.tables[u]=l.tables[f],delete l.tables[f],p=1,a&&a(p),p}if(this.addcolumn){l=t.databases[this.table.databaseid||n],l.dbversion++;var d=this.table.tableid,b=l.tables[d],U=this.addcolumn.columnid;if(b.xcolumns[U])throw new Error(`Cannot add column "${U}" because it already exists in table "${d}"`);var R={columnid:U,dbtypeid:this.addcolumn.dbtypeid,dbsize:this.dbsize,dbprecision:this.dbprecision,dbenum:this.dbenum,defaultfns:null},L=function(){};b.columns.push(R),b.xcolumns[U]=R;for(let B=0,N=b.data.length;B0)for(var R=0,L=u.data.length;R0)for(var R=0,L=u.data.length;R0&&(R=n.columns.map(function(Te){return Te.columnid}));var L=new V.Select(b);L.modifier="ALASQL_DETAILS";var T=L.execute(c,a),C=T.columns.map(function(Te){return Te.columnid});R||(R=C);var te=r2(T.data,C,R);p.data=te.slice();for(var W=te,Y=te.slice(),B=0;W.length>0&&Ba.toString()).join(", ")),this.output&&(n+=" OUTPUT ",n+=this.output.columns.map(a=>a.toString()).join(", "),this.output.intovar?n+=" INTO "+this.output.method+this.output.intovar:this.output.intotable&&(n+=" INTO "+this.output.intotable.toString(),this.output.intocolumns&&(n+="("+this.output.intocolumns.map(a=>a.toString()).join(", ")+")"))),n},V.Insert.prototype.toJS=function(n,c,a){var l="this.queriesfn["+(this.queriesidx-1)+"](this.params,null,"+n+")";return l},V.Insert.prototype.compile=function(n){var c=this;if(c.into instanceof V.ParamValue)return V.compileParamValue(c.into.param,"INSERT",!0,n,c,"into");n=c.into.databaseid||n;var a=t.databases[n],l=c.into.tableid,f=a.tables[l];if(!f)throw"Table '"+l+"' could not be found";var u=function(Ot,Oe,Te){return`The number of values (${Ot}) does not match the number of ${Te} (${Oe}). If using a subquery, use INSERT INTO ... SELECT instead of INSERT INTO ... VALUES (SELECT ...)`},d="",p="",d="db.tables['"+l+"'].dirty=true;",b="var a,aa=[],x;",U;if(this.values){this.exists&&(this.existsfn=this.exists.map(function(Oe){var Te=Oe.compile(n);return Te.query.modifier="RECORDSET",Te})),this.queries&&(this.queriesfn=this.queries.map(function(Oe){var Te=Oe.compile(n);return Te.query.modifier="RECORDSET",Te})),c.values.forEach(function(Oe){var Te=[];if(c.columns){if(Oe.length!==c.columns.length)throw new Error(u(Oe.length,c.columns.length,"columns"));c.columns.forEach(function(ht,Tt){var $t="'"+ht.columnid+"':";f.xcolumns&&f.xcolumns[ht.columnid]?["INT","FLOAT","NUMBER","MONEY"].indexOf(f.xcolumns[ht.columnid].dbtypeid)>=0?$t+="(x="+Oe[Tt].toJS()+",x==undefined?undefined:+x)":t.fn[f.xcolumns[ht.columnid].dbtypeid]?($t+="(new "+f.xcolumns[ht.columnid].dbtypeid+"(",$t+=Oe[Tt].toJS(),$t+="))"):$t+=Oe[Tt].toJS():$t+=Oe[Tt].toJS(),Te.push($t)})}else if(Array.isArray(Oe)&&f.columns&&f.columns.length>0){if(Oe.length!==f.columns.length)throw new Error(u(Oe.length,f.columns.length,"table columns"));f.columns.forEach(function(ht,Tt){var $t="'"+ht.columnid+"':";["INT","FLOAT","NUMBER","MONEY"].indexOf(ht.dbtypeid)>=0?$t+="+"+Oe[Tt].toJS():t.fn[ht.dbtypeid]?($t+="(new "+ht.dbtypeid+"(",$t+=Oe[Tt].toJS(),$t+="))"):$t+=Oe[Tt].toJS(),Te.push($t)})}else p=u1(Oe);a.tables[l].defaultfns&&Te.unshift(a.tables[l].defaultfns),p?d+="a="+p+";":d+="a={"+Te.join(",")+"};",a.tables[l].isclass&&(d+="var db=alasql.databases['"+n+"'];",d+='a.$class="'+l+'";',d+="a.$id=db.counter++;",d+="db.objects[a.$id]=a;"),a.tables[l].insert?(d+="var db=alasql.databases['"+n+"'];",d+="var inserted=db.tables['"+l+"'].insert(a,"+(c.orreplace?"true":"false")+","+(c.ignore?"true":"false")+");",c.ignore&&(d+="if(inserted!==false){"),(c.output||c.ignore)&&(d+="aa.push(a);"),c.ignore&&(d+="}")):d+="aa.push(a);"}),U=b+d,a.tables[l].insert||(d+="alasql.databases['"+n+"'].tables['"+l+"'].data=alasql.databases['"+n+"'].tables['"+l+"'].data.concat(aa);"),c.output?(d+="var output = [];",d+="for(var i=0;i{delete f.tables[d][b][u]}),delete f.triggers[u];else throw new Error("Trigger Table not found")}else throw new Error("Trigger not found");return a&&(l=a(l)),l},t.executeTrigger=function(n,c,...a){if(n){if(n.funcid)return t.fn[n.funcid](...a);if(n.statement)return n.statement.expression&&n.statement.expression.funcid?t.fn[n.statement.expression.funcid](...a):n.statement.execute(c)}},V.Delete=function(n){return Object.assign(this,n)},V.Delete.prototype.toString=function(){var n="DELETE FROM "+this.table.toString();return this.where&&(n+=" WHERE "+this.where.toString()),this.output&&(n+=" OUTPUT ",n+=this.output.columns.map(c=>c.toString()).join(", "),this.output.intovar?n+=" INTO "+this.output.method+this.output.intovar:this.output.intotable&&(n+=" INTO "+this.output.intotable.toString(),this.output.intocolumns&&(n+="("+this.output.intocolumns.map(c=>c.toString()).join(", ")+")"))),n},V.Delete.prototype.compile=function(n){var c=this;if(this.table instanceof V.ParamValue)return V.compileParamValue(this.table.param,"DELETE",!0,n,c,"table");n=this.table.databaseid||n;var a=this.table.tableid,l,f=t.databases[n];if(this.where){this.exists&&(this.existsfn=this.exists.map(function(p){var d=p.compile(n);return d.query.modifier="RECORDSET",d})),this.queries&&(this.queriesfn=this.queries.map(function(p){var d=p.compile(n);return d.query.modifier="RECORDSET",d}));var u=new Function("r,params,alasql","var y;return ("+this.where.toJS("r","")+")").bind(this);l=function(p,d){if(f.engineid&&t.engines[f.engineid].deleteFromTable)return t.engines[f.engineid].deleteFromTable(n,a,u,p,d);t.options.autocommit&&f.engineid&&(f.engineid=="LOCALSTORAGE"||f.engineid=="FILESTORAGE")&&t.engines[f.engineid].loadTableData(n,a);for(var b=f.tables[a],U=b.data.length,R=[],L=[],T=0,C=b.data.length;Tc.toString()).join(", "),this.output.intovar?n+=" INTO "+this.output.method+this.output.intovar:this.output.intotable&&(n+=" INTO "+this.output.intotable.toString(),this.output.intocolumns&&(n+="("+this.output.intocolumns.map(c=>c.toString()).join(", ")+")"))),n},V.SetColumn=function(n){return Object.assign(this,n)},V.SetColumn.prototype.toString=function(){return this.column.toString()+"="+this.expression.toString()},V.Update.prototype.compile=function(n){var c=this;if(this.table instanceof V.ParamValue)return V.compileParamValue(this.table.param,"UPDATE",!1,n,c,"table");n=this.table.databaseid||n;var a=this.table.tableid;if(this.where){this.exists&&(this.existsfn=this.exists.map(function(d){var b=d.compile(n);return b.query.modifier="RECORDSET",b})),this.queries&&(this.queriesfn=this.queries.map(function(d){var b=d.compile(n);return b.query.modifier="RECORDSET",b}));var l=new Function("r,params,alasql","var y;return "+this.where.toJS("r","")).bind(this)}var f=t.databases[n].tables[a].onupdatefns||"";f+=";",this.columns.forEach(function(d){f+="r['"+d.column.columnid+"']="+d.expression.toJS("r","")+";"});var u=new Function("r,params,alasql","var y;"+f),p=function(d,b){var U=t.databases[n];if(U.engineid&&t.engines[U.engineid].updateTable)return t.engines[U.engineid].updateTable(n,a,u,l,d,b);t.options.autocommit&&U.engineid&&t.engines[U.engineid].loadTableData(n,a);var R=U.tables[a];if(!R)throw new Error("Table '"+a+"' not exists");for(var L=0,T=[],C=0,te=R.data.length;C{n+="WHEN ",c.matched||(n+="NOT "),n+="MATCHED ",c.bytarget&&(n+="BY TARGET "),c.bysource&&(n+="BY SOURCE "),c.expr&&(n+=`AND ${c.expr.toString()} `),n+="THEN ",c.action.delete&&(n+="DELETE "),c.action.insert&&(n+="INSERT ",c.action.columns&&(n+=`(${c.action.columns.toString()}) `),c.action.values&&(n+=`VALUES (${c.action.values.toString()}) `),c.action.defaultvalues&&(n+="DEFAULT VALUES ")),c.action.update&&(n+="UPDATE ",n+=c.action.update.map(a=>a.toString()).join(", ")+" ")}),n},V.Merge.prototype.execute=function(n,c,a){var l=1;return a&&(l=a(l)),l},V.CreateDatabase=function(n){return Object.assign(this,n)},V.CreateDatabase.prototype.toString=function(){let n="CREATE ";return this.engineid&&(n+=`${this.engineid} `),n+="DATABASE ",this.ifnotexists&&(n+="IF NOT EXISTS "),n+=`${this.databaseid} `,this.args&&this.args.length>0&&(n+=`(${this.args.map(c=>c.toString()).join(", ")}) `),this.as&&(n+=`AS ${this.as}`),n},V.CreateDatabase.prototype.execute=function(n,c,a){var l;if(this.args&&this.args.length>0&&(l=this.args.map(function(d){return new Function("params,alasql","var y;return "+d.toJS())(c,t)})),this.engineid){var f=t.engines[this.engineid].createDatabase(this.databaseid,this.args,this.ifnotexists,this.as,a);return f}else{var u=this.databaseid;if(t.databases[u])throw new Error("Database '"+u+"' already exists");var p=new t.Database(u),f=1;return a?a(f):f}},V.AttachDatabase=function(n){return Object.assign(this,n)},V.AttachDatabase.prototype.toString=function(n){let c="ATTACH";return this.engineid&&(c+=` ${this.engineid}`),c+=` DATABASE ${this.databaseid}`,n&&(c+="(",n.length>0&&(c+=n.map(a=>a.toString()).join(", ")),c+=")"),this.as&&(c+=` AS ${this.as}`),c},V.AttachDatabase.prototype.execute=function(n,c,a){if(!t.engines[this.engineid])throw new Error('Engine "'+this.engineid+'" is not defined.');var l=t.engines[this.engineid].attachDatabase(this.databaseid,this.as,this.args,c,a);return l},V.DetachDatabase=function(n){return Object.assign(this,n)},V.DetachDatabase.prototype.toString=function(){var n="DETACH";return n+=" DATABASE "+this.databaseid,n},V.DetachDatabase.prototype.execute=function(n,c,a){if(!t.databases[this.databaseid].engineid)throw new Error('Cannot detach database "'+this.engineid+'", because it was not attached.');var l,f=this.databaseid;if(f===t.DEFAULTDATABASEID)throw new Error("Drop of default database is prohibited");if(t.databases[f]){var u=t.databases[f].engineid&&t.databases[f].engineid=="FILESTORAGE",p=t.databases[f].filename||"";delete t.databases[f],u&&(t.databases[f]={},t.databases[f].isDetached=!0,t.databases[f].filename=p),f===t.useid&&t.use(),l=1}else if(this.ifexists)l=0;else throw new Error("Database '"+f+"' does not exist");return a&&a(l),l},V.UseDatabase=function(n){return Object.assign(this,n)},V.UseDatabase.prototype.toString=function(){return"USE DATABASE "+this.databaseid},V.UseDatabase.prototype.execute=function(n,c,a){var l=this.databaseid;if(!t.databases[l])throw new Error("Database '"+l+"' does not exist");t.use(l);var f=1;return a&&a(f),f},V.DropDatabase=function(n){return Object.assign(this,n)},V.DropDatabase.prototype.toString=function(){var n="DROP";return this.ifexists&&(n+=" IF EXISTS"),n+=" DATABASE "+this.databaseid,n},V.DropDatabase.prototype.execute=function(n,c,a){if(this.engineid)return t.engines[this.engineid].dropDatabase(this.databaseid,this.ifexists,a);let l,f=this.databaseid;if(f===t.DEFAULTDATABASEID)throw new Error("Drop of default database is prohibited");if(t.databases[f]){if(t.databases[f].engineid)throw new Error(`Cannot drop database '${f}', because it is attached. Detach it.`);delete t.databases[f],f===t.useid&&t.use(),l=1}else if(this.ifexists)l=0;else throw new Error(`Database '${f}' does not exist`);return a&&a(l),l},V.Declare=function(n){return Object.assign(this,n)},V.Declare.prototype.toString=function(){let n="DECLARE ";return this.declares&&this.declares.length>0&&(n+=this.declares.map(c=>{let a=`@${c.variable} ${c.dbtypeid}`;return c.dbsize&&(a+=`(${c.dbsize}`,c.dbprecision&&(a+=`,${c.dbprecision}`),a+=")"),c.expression&&(a+=` = ${c.expression.toString()}`),a}).join(",")),n},V.Declare.prototype.execute=function(n,c,a){var l=1,f=this;return f.declares&&f.declares.length>0&&f.declares.forEach(function(u){var p=u.dbtypeid;t.fn[p]||(p=p.toUpperCase()),t.declares[u.variable]={dbtypeid:p,dbsize:u.dbsize,dbprecision:u.dbprecision},u.expression&&(t.vars[u.variable]=new Function("params,alasql","return "+u.expression.toJS("({})","",null)).bind(f)(c,t),t.declares[u.variable]&&(t.vars[u.variable]=t.stdfn.CONVERT(t.vars[u.variable],t.declares[u.variable])))}),a&&(l=a(l)),l},V.ShowDatabases=function(n){return Object.assign(this,n)},V.ShowDatabases.prototype.toString=function(){var n="SHOW DATABASES";return this.like&&(n+="LIKE "+this.like.toString()),n},V.ShowDatabases.prototype.execute=function(n,c,a){if(this.engineid)return t.engines[this.engineid].showDatabases(this.like,a);var l=this,f=[];for(var u in t.databases)f.push({databaseid:u});return l.like&&f&&f.length>0&&(f=f.filter(function(p){return t.utils.like(l.like.value,p.databaseid)})),a&&a(f),f},V.ShowTables=function(n){return Object.assign(this,n)},V.ShowTables.prototype.toString=function(){var n="SHOW TABLES";return this.databaseid&&(n+=" FROM "+this.databaseid),this.like&&(n+=" LIKE "+this.like.toString()),n},V.ShowTables.prototype.execute=function(n,c,a){var l=t.databases[this.databaseid||n],f=this,u=[];for(var p in l.tables)u.push({tableid:p});return f.like&&u&&u.length>0&&(u=u.filter(function(d){return t.utils.like(f.like.value,d.tableid)})),a&&a(u),u},V.ShowColumns=function(n){return Object.assign(this,n)},V.ShowColumns.prototype.toString=function(){var n="SHOW COLUMNS";return this.table.tableid&&(n+=" FROM "+this.table.tableid),this.databaseid&&(n+=" FROM "+this.databaseid),n},V.ShowColumns.prototype.execute=function(n,c,a){var l=t.databases[this.table.databaseid||this.databaseid||n],f=l.tables[this.table.tableid];if(f&&f.columns){var u=f.columns.map(function(p){return{columnid:p.columnid,dbtypeid:p.dbtypeid,dbsize:p.dbsize}});return a&&a(u),u}else return a&&a([]),[]},V.ShowIndex=function(n){return Object.assign(this,n)},V.ShowIndex.prototype.toString=function(){var n="SHOW INDEX";return this.table.tableid&&(n+=" FROM "+this.table.tableid),this.databaseid&&(n+=" FROM "+this.databaseid),n},V.ShowIndex.prototype.execute=function(n,c,a){var l=t.databases[this.table.databaseid||this.databaseid||n],f=l.tables[this.table.tableid],u=[];if(f&&f.indices)for(var p in f.indices)u.push({hh:p,len:Object.keys(f.indices[p]).length});return a&&a(u),u},V.ShowCreateTable=function(n){return Object.assign(this,n)},V.ShowCreateTable.prototype.toString=function(){var n="SHOW CREATE TABLE "+this.table.tableid;return this.databaseid&&(n+=" FROM "+this.databaseid),n},V.ShowCreateTable.prototype.execute=function(n){var c=t.databases[this.databaseid||n],a=c.tables[this.table.tableid];if(a){var l="CREATE TABLE "+this.table.tableid+" (",f=[];return a.columns&&(a.columns.forEach(function(u){var p=u.columnid+" "+u.dbtypeid;u.dbsize&&(p+="("+u.dbsize+")"),u.primarykey&&(p+=" PRIMARY KEY"),f.push(p)}),l+=f.join(", ")),l+=")",l}else throw new Error('There is no such table "'+this.table.tableid+'"')},V.SetVariable=function(n){return Object.assign(this,n)},V.SetVariable.prototype.toString=function(){var n="SET ";return typeof this.value<"u"&&(n+=this.variable.toUpperCase()+" "+(this.value?"ON":"OFF")),this.expression&&(n+=this.method+this.variable+" = "+this.expression.toString()),n},V.SetVariable.prototype.execute=function(n,c,a){if(typeof this.value<"u"){let f=this.value;f==="ON"?f=!0:f==="OFF"&&(f=!1),t.options[this.variable]=f}else if(this.expression){this.exists&&(this.existsfn=this.exists.map(u=>{let p=u.compile(n);return p.query&&!p.query.modifier&&(p.query.modifier="RECORDSET"),p})),this.queries&&(this.queriesfn=this.queries.map(u=>{let p=u.compile(n);return p.query&&!p.query.modifier&&(p.query.modifier="RECORDSET"),p}));let f=new Function("params, alasql","return "+this.expression.toJS("({})","",null)).bind(this)(c,t);if(t.declares[this.variable]&&(f=t.stdfn.CONVERT(f,t.declares[this.variable])),this.props&&this.props.length>0){let u;this.method==="@"?u=`alasql.vars['${this.variable}']`:u=`params['${this.variable}']`,this.props.forEach(p=>{typeof p=="string"?u+=`['${p}']`:typeof p=="number"?u+=`[${p}]`:u+=`[${p.toJS()}]`}),new Function("value, params, alasql",`${u} = value`)(f,c,t)}else this.method==="@"?t.vars[this.variable]=f:c[this.variable]=f}let l=1;return a&&(l=a(l)),l},t.test=function(n,c,a){if(arguments.length===0){t.log(t.con.results);return}var l=Date.now();if(arguments.length===1){a(),t.con.log(Date.now()-l);return}arguments.length===2&&(a=c,c=1);for(var f=0;f",n),Array.isArray(f)&&console.table?console.table(f):console.log(os(f));else{var u;l==="output"?u=document.getElementsByTagName("output")[0]:typeof l=="string"?u=document.getElementById(l):u=l;var p="";if(typeof n=="string"&&t.options.logprompt&&(p+="
"+t.pretty(n)+"
"),Array.isArray(f))if(f.length===0)p+="

[ ]

";else if(typeof f[0]!="object"||Array.isArray(f[0]))for(var d=0,b=f.length;d"+Xo(f[d])+"

";else p+=Xo(f);else p+=Xo(f);u.innerHTML+=p}},t.clear=function(){var n=t.options.logtarget;if(s.isNode||s.isMeteorServer)console.clear&&console.clear();else{var c;n==="output"?c=document.getElementsByTagName("output")[0]:typeof n=="string"?c=document.getElementById(n):c=n,c.innerHTML=""}},t.write=function(n){var c=t.options.logtarget;if(s.isNode||s.isMeteorServer)console.log&&console.log(n);else{var a;c==="output"?a=document.getElementsByTagName("output")[0]:typeof c=="string"?a=document.getElementById(c):a=c,a.innerHTML+=n}};function Xo(n){var c="";if(n===void 0)c+="undefined";else if(Array.isArray(n)){c+="",c+="";var a=[];for(var l in n[0])a.push(l);c+="
#",a.forEach(function(p){c+=""+p});for(var f=0,u=n.length;f"+(f+1),a.forEach(function(p){c+=" ",n[f][p]==+n[f][p]?(c+='
',typeof n[f][p]>"u"?c+="NULL":c+=n[f][p],c+="
"):typeof n[f][p]>"u"?c+="NULL":typeof n[f][p]=="string"?c+=n[f][p]:c+=os(n[f][p])});c+="
"}else c+="

"+os(n)+"

";return c}function Mo(n,c,a){if(!(a<=0)){var l=c-n.scrollTop,f=l/a*10;setTimeout(function(){n.scrollTop!==c&&(n.scrollTop=n.scrollTop+f,Mo(n,c,a-10))},10)}}t.prompt=function(n,c,a){if(s.isNode)throw new Error("The prompt not realized for Node.js");var l=0;if(typeof n=="string"&&(n=document.getElementById(n)),typeof c=="string"&&(c=document.getElementById(c)),c.textContent=t.useid,a){t.prompthistory.push(a),l=t.prompthistory.length;try{var f=Date.now();t.log(a),t.write('

'+(Date.now()-f)+" ms

")}catch(p){t.write("

"+t.useid+"> "+a+"

"),t.write('

'+p+"

")}}var u=n.getBoundingClientRect().top+document.getElementsByTagName("body")[0].scrollTop;Mo(document.getElementsByTagName("body")[0],u,500),n.onkeydown=function(p){if(p.which===13){var d=n.value,b=t.useid;n.value="",t.prompthistory.push(d),l=t.prompthistory.length;try{var U=Date.now();t.log(d),t.write('

'+(Date.now()-U)+" ms

")}catch(L){t.write("

"+b+"> "+t.pretty(d,!1)+"

"),t.write('

'+L+"

")}n.focus(),c.textContent=t.useid;var R=n.getBoundingClientRect().top+document.getElementsByTagName("body")[0].scrollTop;Mo(document.getElementsByTagName("body")[0],R,500)}else p.which===38?(l--,l<0&&(l=0),t.prompthistory[l]&&(n.value=t.prompthistory[l],p.preventDefault())):p.which===40&&(l++,l>=t.prompthistory.length?(l=t.prompthistory.length,n.value=""):t.prompthistory[l]&&(n.value=t.prompthistory[l],p.preventDefault()))}},V.BeginTransaction=function(n){return Object.assign(this,n)},V.BeginTransaction.prototype.toString=function(){return"BEGIN TRANSACTION"},V.BeginTransaction.prototype.execute=function(n,c,a){var l=1;return t.databases[n].engineid?t.engines[t.databases[t.useid].engineid].begin(n,a):(a&&(l=a(l)),l)},V.CommitTransaction=function(n){return Object.assign(this,n)},V.CommitTransaction.prototype.toString=function(){return"COMMIT TRANSACTION"},V.CommitTransaction.prototype.execute=function(n,c,a){var l=1;return t.databases[n].engineid?t.engines[t.databases[t.useid].engineid].commit(n,a):(a&&(l=a(l)),l)},V.RollbackTransaction=function(n){return Object.assign(this,n)},V.RollbackTransaction.prototype.toString=function(){return"ROLLBACK TRANSACTION"},V.RollbackTransaction.prototype.execute=function(n,c,a){var l=1;return t.databases[n].engineid?t.engines[t.databases[n].engineid].rollback(n,a):(a&&(l=a(l)),l)},t.options.tsql&&(t.stdfn.OBJECT_ID=function(n,c){typeof c>"u"&&(c="T"),c=c.toUpperCase();var a=n.split("."),l=t.useid,f=a[0];a.length==2&&(l=a[0],f=a[1]);var u=t.databases[l].tables;l=t.databases[l].databaseid;for(var p in u)if(p==f)return u[p].view&&c=="V"||!u[p].view&&c=="T"?l+"."+p:void 0}),t.options.mysql&&(t.fn.TIMESTAMPDIFF=function(n,c,a){return t.stdfn.DATEDIFF(n,c,a)}),(t.options.mysql||t.options.sqlite)&&(t.from.INFORMATION_SCHEMA=function(n,c,a,l,f){if(n=="VIEWS"||n=="TABLES"){var u=[];for(var p in t.databases){var d=t.databases[p].tables;for(var b in d)(d[b].view&&n=="VIEWS"||!d[b].view&&n=="TABLES")&&u.push({TABLE_CATALOG:p,TABLE_NAME:b})}return a&&(u=a(u,l,f)),u}throw new Error("Unknown INFORMATION_SCHEMA table")}),t.options.postgres,t.options.oracle,t.options.sqlite,t.into.SQL=function(n,c,a,l,f){var u;typeof n=="object"&&(c=n,n=void 0);var p={};if(t.utils.extend(p,c),typeof p.tableid>"u")throw new Error("Table for INSERT TO is not defined.");var d="";l.length===0&&typeof a[0]=="object"&&(l=Object.keys(a[0]).map(function(R){return{columnid:R}}));for(var b=0,U=a.length;b0&&(l=Object.keys(a[0]).map(function(b){return{columnid:b}})),typeof n=="object"&&(c=n,n=void 0);var u=a.length,p="";if(a.length>0){var d=l[0].columnid;p+=a.map(function(b){return b[d]}).join(` -`)}return n=t.utils.autoExtFilename(n,"txt",c),u=t.utils.saveFile(n,p),f&&(u=f(u)),u},t.into.TAB=t.into.TSV=function(n,c,a,l,f){var u={};return t.utils.extend(u,c),u.separator=" ",n=t.utils.autoExtFilename(n,"tab",c),u.autoExt=!1,t.into.CSV(n,u,a,l,f)},t.into.CSV=function(n,c,a,l,f){l.length===0&&a.length>0&&(l=Object.keys(a[0]).map(function(b){return{columnid:b}})),typeof n=="object"&&(c=n,n=void 0);var u={headers:!0};u.separator=";",u.quote='"',u.utf8Bom=!0,c&&!c.headers&&typeof c.headers<"u"&&(u.utf8Bom=!1),t.utils.extend(u,c);var p=a.length,d=u.utf8Bom?"\uFEFF":"";return u.headers&&(d+=u.quote+l.map(function(b){return b.columnid.trim()}).join(u.quote+u.separator+u.quote)+u.quote+`\r -`),a.forEach(function(b){d+=l.map(function(U){var R=b[U.columnid];return u.quote!==""&&(R=(R+"").replace(new RegExp("\\"+u.quote,"g"),u.quote+u.quote)),+R!=R&&(R=u.quote+R+u.quote),R}).join(u.separator)+`\r -`}),n=t.utils.autoExtFilename(n,"csv",c),p=t.utils.saveFile(n,d,null,{disableAutoBom:!0}),f&&(p=f(p)),p},t.into.XLS=function(n,c,a,l,f){typeof n=="object"&&(c=n,n=void 0);var u={};c&&c.sheets&&(u=c.sheets);var p={headers:!0};typeof u.Sheet1<"u"?p=u[0]:typeof c<"u"&&(p=c),typeof p.sheetid>"u"&&(p.sheetid="Sheet1");var d=U();n=t.utils.autoExtFilename(n,"xls",c);var b=t.utils.saveFile(n,d);return f&&(b=f(b)),b;function U(){var L=' ",L+="",L+="",typeof p.caption<"u"){var T=p.caption;typeof T=="string"&&(T={title:T}),L+=""}return typeof p.columns<"u"?l=p.columns:l.length==0&&a.length>0&&typeof a[0]=="object"&&(Array.isArray(a[0])?l=a[0].map(function(C,te){return{columnid:te}}):l=Object.keys(a[0]).map(function(C){return{columnid:C}})),l.forEach(function(C,te){typeof p.column<"u"&&Pr(C,p.column),typeof C.width>"u"&&(p.column&&p.column.width!="undefined"?C.width=p.column.width:C.width="120px"),typeof C.width=="number"&&(C.width=C.width+"px"),typeof C.columnid>"u"&&(C.columnid=te),typeof C.title>"u"&&(C.title=""+C.columnid.trim()),p.headers&&Array.isArray(p.headers)&&(C.title=p.headers[te])}),L+="",l.forEach(function(C){L+=''}),L+="",p.headers&&(L+="",L+="",l.forEach(function(C,te){L+="",L+=""),L+="",a&&a.length>0&&a.forEach(function(C,te){if(!(te>p.limit)){L+=""u"&&(typeof Ae=="number"?je="number":typeof Ae=="string"?je="string":typeof Ae=="boolean"?je="boolean":typeof Ae=="object"&&Ae instanceof Date&&(je="date"));var Ot="";je=="money"?Ot='mso-number-format:"\\#\\,\\#\\#0\\\\ _\u0440_\\.";white-space:normal;':je=="number"?Ot=" ":je=="date"?Ot='mso-number-format:"Short Date";':c.types&&c.types[je]&&c.types[je].typestyle&&(Ot=c.types[je].typestyle),Ot=Ot||'mso-number-format:"\\@";',L+=""}),L+=""}}),L+="",L+="
"}),L+="
"u")L+="";else if(typeof Oe<"u")if(typeof Oe=="function")L+=Oe(Ae);else if(typeof Oe=="string")L+=Ae;else throw new Error("Unknown format type. Should be function or string");else je=="number"||je=="date"?L+=Ae.toString():je=="money"?L+=(+Ae).toFixed(2):L+=Ae;L+="
",L+="",L+="",L}function R(L){var T=' style="';return L&&typeof L.style<"u"&&(T+=L.style+";"),T+='" ',T}},t.into.XLSXML=function(n,c,a,l,f){c=c||{},typeof n=="object"&&(c=n,n=void 0);var u={},p,d;c&&c.sheets?(u=c.sheets,p=a,d=l):(u.Sheet1=c,p=[a],d=[l]),n=t.utils.autoExtFilename(n,"xls",c);var b=t.utils.saveFile(n,U());return f&&(b=f(b)),b;function U(){function R(ht){return ht==null?"":String(ht).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}var L=' 0 ',T="",C=" ",te={},W=62;function Y(ht){var Tt="";for(var $t in ht){Tt+="<"+$t;for(var yr in ht[$t])Tt+=" ",yr.substr(0,2)=="x:"?Tt+=yr:Tt+="ss:",Tt+=yr+"="+JSON.stringify(ht[$t][yr]);Tt+="/>"}var le=Ht(Tt);return te[le]||(te[le]={styleid:W},T+=`",W++),"s"+te[le].styleid}function B(ht){try{return Object.values(ht)}catch{return Object.keys(ht).map(function(Tt){return ht[Tt]})}}var N=0;for(var Ae in u){var je=u[Ae],Ot=typeof je.dataidx<"u"?je.dataidx:N++,Oe=B(p[Ot]),Te=void 0;typeof je.columns<"u"?Te=je.columns:(Te=d[Ot],(Te===void 0||Te.length==0&&Oe.length>0)&&typeof Oe[0]=="object"&&(Array.isArray(Oe[0])?Te=Oe[0].map(function(ht,Tt){return{columnid:Tt}}):Te=Object.keys(Oe[0]).map(function(ht){return{columnid:ht}}))),Te.forEach(function(ht,Tt){typeof je.column<"u"&&Pr(ht,je.column),typeof ht.width>"u"&&(je.column&&typeof je.column.width<"u"?ht.width=je.column.width:ht.width=120),typeof ht.width=="number"&&(ht.width=ht.width),typeof ht.columnid>"u"&&(ht.columnid=Tt),typeof ht.title>"u"&&(ht.title=""+ht.columnid.trim()),je.headers&&Array.isArray(je.headers)&&(ht.title=je.headers[Tt])}),C+="',Te.forEach(function(ht,Tt){C+=` + })`};function Wi(n){var c=n.getMonth()+1,o=n.getYear(),l=n.getFullYear(),f=n.getDate(),u=n.toString().substr(4,3),p=("0"+f).substr(-2),h=("0"+c).substr(-2),b=("0"+o).substr(-2),U=("0"+n.getHours()).substr(-2),R=("0"+n.getMinutes()).substr(-2),L=("0"+n.getSeconds()).substr(-2),T=("00"+n.getMilliseconds()).substr(-3);return{month:c,year:o,fullYear:l,date:f,day:u,formattedDate:p,formattedMonth:h,formattedYear:b,formattedHour:U,formattedMinutes:R,formattedSeconds:L,formattedMilliseconds:T}}t.stdfn.CONVERT=function(n,c){var o=n,l=c.dbtypeid?.toUpperCase(),f,u;if((c.style||c.dbtypeid=="Date"||["DATE","DATETIME","DATETIME2"].indexOf(l)>-1)&&(/\d{8}/.test(o)?f=new Date(+o.substr(0,4),+o.substr(4,2)-1,+o.substr(6,2)):f=ca(o),u=Wi(f)),c.style)switch(c.style){case 1:o=u.formattedMonth+"/"+u.formattedDate+"/"+u.formattedYear;break;case 2:o=u.formattedYear+"."+u.formattedMonth+"."+u.formattedDate;break;case 3:o=u.formattedDate+"/"+u.formattedMonth+"/"+u.formattedYear;break;case 4:o=u.formattedDate+"."+u.formattedMonth+"."+u.formattedYear;break;case 5:o=u.formattedDate+"-"+u.formattedMonth+"-"+u.formattedYear;break;case 6:o=u.formattedDate+" "+u.day.toLowerCase()+" "+u.formattedYear;break;case 7:o=u.day+" "+u.formattedDate+","+u.formattedYear;break;case 8:case 108:o=u.formattedHour+":"+u.formattedMinutes+":"+u.formattedSeconds;break;case 10:o=u.formattedMonth+"-"+u.formattedDate+"-"+u.formattedYear;break;case 11:o=u.formattedYear+"/"+u.formattedMonth+"/"+u.formattedDate;break;case 12:o=u.formattedYear+u.formattedMonth+u.formattedDate;break;case 101:o=u.formattedMonth+"/"+u.formattedDate+"/"+u.fullYear;break;case 102:o=u.fullYear+"."+u.formattedMonth+"."+u.formattedDate;break;case 103:o=u.formattedDate+"/"+u.formattedMonth+"/"+u.fullYear;break;case 104:o=u.formattedDate+"."+u.formattedMonth+"."+u.fullYear;break;case 105:o=u.formattedDate+"-"+u.formattedMonth+"-"+u.fullYear;break;case 106:o=u.formattedDate+" "+u.day.toLowerCase()+" "+u.fullYear;break;case 107:o=u.day+" "+u.formattedDate+","+u.fullYear;break;case 110:o=u.formattedMonth+"-"+u.formattedDate+"-"+u.fullYear;break;case 111:o=u.fullYear+"/"+u.formattedMonth+"/"+u.formattedDate;break;case 112:o=u.fullYear+u.formattedMonth+u.formattedDate;break;default:throw new Error("The CONVERT style "+c.style+" is not realized yet.")}switch(l){case"DATE":return`${u.formattedYear}.${u.formattedMonth}.${u.formattedDate}`;case"DATETIME":case"DATETIME2":return`${u.fullYear}.${u.formattedMonth}.${u.formattedDate} ${u.formattedHour}:${u.formattedMinutes}:${u.formattedSeconds}.${u.formattedMilliseconds}`;case"MONEY":var p=+o;return(p|0)+p*100%100/100;case"BOOLEAN":return!!o;case"INT":case"INTEGER":case"SMALLINT":case"BIGINT":case"SERIAL":case"SMALLSERIAL":case"BIGSERIAL":return o|0;case"STRING":case"VARCHAR":case"NVARCHAR":case"CHARACTER VARIABLE":return c.dbsize?String(o).substr(0,c.dbsize):String(o);case"CHAR":case"CHARACTER":case"NCHAR":return(o+" ".repeat(c.dbsize)).substr(0,c.dbsize);case"NUMBER":case"FLOAT":case"DECIMAL":case"NUMERIC":var p=+o;return c.dbsize!==void 0&&(p=parseFloat(p.toPrecision(c.dbsize))),c.dbprecision!==void 0&&(p=parseFloat(p.toFixed(c.dbprecision))),p;case"JSON":if(typeof o=="object")return o;try{return JSON.parse(o)}catch{throw new Error("Cannot convert string to JSON")}case"Date":return o;default:return o}},V.ColumnDef=function(n){return Object.assign(this,n)},V.ColumnDef.prototype.toString=function(){let n=this.columnid;return this.dbtypeid&&(n+=" "+this.dbtypeid),this.dbsize&&(n+="("+this.dbsize,this.dbprecision&&(n+=","+this.dbprecision),n+=")"),this.primarykey&&(n+=" PRIMARY KEY"),this.notnull&&(n+=" NOT NULL"),n},V.CreateTable=function(n){return Object.assign(this,n)},V.CreateTable.prototype.toString=function(){let n=`CREATE${this.temporary?" TEMPORARY":""}${this.view?" VIEW":` ${this.class?"CLASS":"TABLE"}`}${this.ifnotexists?" IF NOT EXISTS":""} ${this.table.toString()}`;return this.viewcolumns&&(n+=`(${this.viewcolumns.map(c=>c.toString()).join(",")})`),this.as?n+=` AS ${this.as}`:n+=` (${this.columns.map(c=>c.toString()).join(",")})`,this.view&&this.select&&(n+=` AS ${this.select.toString()}`),n},V.CreateTable.prototype.execute=function(n,c,o){var l=t.databases[this.table.databaseid||n],f=this.table.tableid;if(!f)throw new Error("Table name is not defined");var u=this.columns,p=this.constraints||[];if(this.ifnotexists&&l.tables[f])return o?o(0):0;if(l.tables[f])throw new Error("Can not create table '"+f+"', because it already exists in the database '"+l.databaseid+"'");var h=l.tables[f]=new t.Table;this.class&&(h.isclass=!0);var b=[],U=[];if(u&&u.forEach(function(T){var C=T.dbtypeid;t.fn[C]||(C=C.toUpperCase()),["SERIAL","SMALLSERIAL","BIGSERIAL"].indexOf(C)>-1&&(T.identity={value:1,step:1});var te={columnid:T.columnid,dbtypeid:C,dbsize:T.dbsize,dbprecision:T.dbprecision,notnull:T.notnull,identity:T.identity};if(T.identity&&(h.identities[T.columnid]={value:+T.identity.value,step:+T.identity.step}),T.check&&h.checks.push({id:T.check.constrantid,fn:new Function("r,params,alasql","var y;return "+T.check.expression.toJS("r",""))}),T.default&&b.push(JSON.stringify(""+T.columnid)+":"+T.default.toJS("r","")),T.primarykey){var W=h.pk={};W.columns=[T.columnid],W.onrightfns=`r[${JSON.stringify(T.columnid)}]`,W.onrightfn=new Function("r","var y;return "+W.onrightfns),W.hh=zt(W.onrightfns),h.uniqs[W.hh]={}}if(T.unique){var Y={};h.uk=h.uk||[],h.uk.push(Y),Y.columns=[T.columnid],Y.onrightfns=`r[${JSON.stringify(T.columnid)}]`,Y.onrightfn=new Function("r","var y;return "+Y.onrightfns),Y.hh=zt(Y.onrightfns),h.uniqs[Y.hh]={}}if(T.foreignkey){var F=T.foreignkey.table,N=t.databases[F.databaseid||n].tables[F.tableid];if(typeof F.columnid>"u")if(N.pk.columns&&N.pk.columns.length>0)F.columnid=N.pk.columns[0];else throw new Error("FOREIGN KEY allowed only to tables with PRIMARY KEYs");te.foreignkey={tableid:F.tableid,columnid:F.columnid};var Ae=function(je){var Ot={},Oe=je[T.columnid];if(Oe!=null&&!(typeof Oe=="number"&&isNaN(Oe))){Ot[F.columnid]=Oe;var Te=N.pk.onrightfn(Ot);if(!N.uniqs[N.pk.hh][Te])throw new Error('Foreign key "'+Oe+'" not found in table "'+F.tableid+'"')}return!0};h.checks.push({fn:Ae,fk:!0})}T.onupdate&&U.push(`r[${JSON.stringify(T.columnid)}]=`+T.onupdate.toJS("r","")),h.columns.push(te),h.xcolumns[te.columnid]=te}),h.defaultfns=b.join(","),h.onupdatefns=U.join(";"),p.forEach(function(T){var C;if(T.type==="PRIMARY KEY"){if(h.pk)throw new Error("Primary key already exists");var te=h.pk={};te.columns=T.columns,te.onrightfns=te.columns.map(function(N){return`r[${JSON.stringify(N)}]`}).join("+'`'+"),te.onrightfn=new Function("r","var y;return "+te.onrightfns),te.hh=zt(te.onrightfns),h.uniqs[te.hh]={},te.columns.forEach(function(N){h.xcolumns[N]&&(h.xcolumns[N].primarykey=!0)})}else if(T.type==="CHECK")C=new Function("r,params,alasql","var y;return "+T.expression.toJS("r",""));else if(T.type==="UNIQUE"){var W={};h.uk=h.uk||[],h.uk.push(W),W.columns=T.columns,W.onrightfns=W.columns.map(function(N){return N.expression.toJS("r","")}).join("+'`'+"),W.onrightfn=new Function("r","var y;return "+W.onrightfns),W.hh=zt(W.onrightfns),h.uniqs[W.hh]={}}else if(T.type==="FOREIGN KEY"){var Y=T.fktable;T.fkcolumns&&T.fkcolumns.length>0&&(Y.fkcolumns=T.fkcolumns);var F=t.databases[Y.databaseid||n].tables[Y.tableid];if(typeof Y.fkcolumns>"u"&&(Y.fkcolumns=F.pk.columns),Y.columns=T.columns,Y.fkcolumns.length>Y.columns.length)throw new Error("Invalid foreign key on table "+h.tableid);Y.columns.forEach(function(N,Ae){h.xcolumns[N]&&(h.xcolumns[N].foreignkey={tableid:Y.tableid,columnid:Y.fkcolumns[Ae],constraintid:T.constraintid})}),C=function(N){var Ae={};if(Y.fkcolumns.forEach(function(Te,ht){var Tt=N[Y.columns[ht]];Tt!=null&&!(typeof Tt=="number"&&isNaN(Tt))&&(Ae[Te]=Tt)}),Object.keys(Ae).length===0)return!0;if(Object.keys(Ae).length!==Y.columns.length)throw new Error("Invalid foreign key on table "+h.tableid);var je=t.databases[Y.databaseid||n].tables[Y.tableid],Ot=je.pk.onrightfn(Ae);if(!je.uniqs[je.pk.hh][Ot]){var Oe=Y.columns.map(function(Te){return N[Te]});throw new Error('Foreign key "'+Oe.join(", ")+'" not found in table "'+Y.tableid+'"')}return!0}}C&&h.checks.push({fn:C,id:T.constraintid,fk:T.type==="FOREIGN KEY"})}),this.view&&this.viewcolumns){var R=this;this.viewcolumns.forEach(function(T,C){R.select.columns[C].as=T.columnid})}if(this.view&&this.select&&(h.view=!0,h.viewSelect=this.select,h.viewDatabaseid=this.table.databaseid||n),l.engineid)return t.engines[l.engineid].createTable(this.table.databaseid||n,f,this.ifnotexists,o);h.insert=function(T,C,te){var W=t.inserted;t.inserted=[T];var Y=this;C&&te&&(te=!1);var F=!1,N=!1;for(var Ae in Y.beforeinsert){var je=Y.beforeinsert[Ae];je&&t.executeTrigger(je,n,T)===!1&&(N=N||!0)}if(!N){var Ot=!1;for(Ae in Y.insteadofinsert)Ot=!0,je=Y.insteadofinsert[Ae],je&&t.executeTrigger(je,n,T);if(!Ot){for(var Oe in Y.identities){var Te=Y.identities[Oe];(typeof T[Oe]>"u"||T[Oe]===null)&&(T[Oe]=Te.value)}if(Y.checks&&Y.checks.length>0&&Y.checks.forEach(function(Zr){if(Zr.fn(T,{},t)===!1)throw new Error("Violation of CHECK constraint "+(Zr.id||""))}),Y.columns.forEach(function(Zr){if(Zr.notnull&&typeof T[Zr.columnid]>"u")throw new Error("Wrong NULL value in NOT NULL column "+Zr.columnid)}),Y.pk){var ht=Y.pk,Tt=ht.onrightfn(T);if(typeof Y.uniqs[ht.hh][Tt]<"u")if(C)F=Y.uniqs[ht.hh][Tt];else{if(te)return t.inserted=W,!1;throw new Error("Cannot insert record, because it already exists in primary key index")}}if(Y.uk&&Y.uk.length)for(var $t=0;$t=Te.value?Te.value=+T[Oe]+Te.step:Te.value+=Te.step}if(Y.pk){var ht=Y.pk,Tt=ht.onrightfn(T);Y.uniqs[ht.hh][Tt]=T}if(Y.uk&&Y.uk.length&&Y.uk.forEach(function(Zr){var Un=Zr.onrightfn(T);Y.uniqs[Zr.hh][Un]=T}),Y.inddefs)for(var mr in Y.inddefs){var Vt=Y.inddefs[mr],Bt=Vt.hh;if(Y.indices[Bt]){var Tt=new Function("r,params,alasql","return "+Vt.rightfns)(T,c,t);Y.indices[Bt][Tt]||(Y.indices[Bt][Tt]=[]),Y.indices[Bt][Tt].push(T)}}}for(var Ae in Y.afterinsert){var je=Y.afterinsert[Ae];je&&t.executeTrigger(je,n,T)}t.inserted=W}}},h.delete=function(T){var C=this,te=C.data[T],W=!1;for(var Y in C.beforedelete){var F=C.beforedelete[Y];F&&t.executeTrigger(F,n,te)===!1&&(W=W||!0)}if(W)return!1;var N=!1;for(var Y in C.insteadofdelete){N=!0;var F=C.insteadofdelete[Y];F&&t.executeTrigger(F,n,te)}if(!N){if(this.pk){var Ae=this.pk,je=Ae.onrightfn(te);if(typeof this.uniqs[Ae.hh][je]>"u")throw new Error("Something wrong with primary key index on table");this.uniqs[Ae.hh][je]=void 0}C.uk&&C.uk.length&&C.uk.forEach(function(Ot){var Oe=Ot.onrightfn(te);if(typeof C.uniqs[Ot.hh][Oe]>"u")throw new Error("Something wrong with unique index on table");C.uniqs[Ot.hh][Oe]=void 0})}},h.deleteall=function(){this.data.length=0,this.pk&&(this.uniqs[this.pk.hh]={}),h.uk&&h.uk.length&&h.uk.forEach(function(T){h.uniqs[T.hh]={}})},h.update=function(T,C,te){var W=mn(this.data[C]),Y;if(this.pk&&(Y=this.pk,Y.pkaddr=Y.onrightfn(W,te),typeof this.uniqs[Y.hh][Y.pkaddr]>"u")){this.uniqs[Y.hh]={};for(var F=0;F"u"){h.uniqs[Te.hh]={};for(var ht=0;ht0&&h.checks.forEach(function(Te){if(Te.fn(W,te,t)===!1)throw new Error("Violation of CHECK constraint "+(Te.id||""))}),h.columns.forEach(function(Te){if(Te.notnull&&typeof W[Te.columnid]>"u")throw new Error("Wrong NULL value in NOT NULL column "+Te.columnid)}),this.pk&&(Y.newpkaddr=Y.onrightfn(W),typeof this.uniqs[Y.hh][Y.newpkaddr]<"u"&&Y.newpkaddr!==Y.pkaddr))throw new Error("Record already exists");h.uk&&h.uk.length&&h.uk.forEach(function(Te){if(Te.newukaddr=Te.onrightfn(W),typeof h.uniqs[Te.hh][Te.newukaddr]<"u"&&Te.newukaddr!==Te.ukaddr)throw new Error("Record already exists")}),this.pk&&(this.uniqs[Y.hh][Y.pkaddr]=void 0,this.uniqs[Y.hh][Y.newpkaddr]=W),h.uk&&h.uk.length&&h.uk.forEach(function(Te){h.uniqs[Te.hh][Te.ukaddr]=void 0,h.uniqs[Te.hh][Te.newukaddr]=W}),this.data[C]=W;for(var je in h.afterupdate){var Ot=h.afterupdate[je];Ot&&t.executeTrigger(Ot,n,this.data[C],W)}}};var L;return t.options.nocount||(L=1),o&&(L=o(L)),L},t.fn.Date=Object,t.fn.Date=Date,t.fn.Number=Number,t.fn.String=String,t.fn.Boolean=Boolean,Hn.EXTEND=t.utils.extend,Hn.CHAR=String.fromCharCode.bind(String),Hn.ASCII=function(n){return n.charCodeAt(0)},Hn.COALESCE=function(){for(var n=0;n"u")&&!(typeof arguments[n]=="number"&&isNaN(arguments[n])))return arguments[n]},Hn.USER=function(){return"alasql"},Hn.OBJECT_ID=function(n){return!!t.tables[n]},Hn.DATE=function(n){return!isNaN(n)&&n.length===8?new Date(+n.substr(0,4),+n.substr(4,2)-1,+n.substr(6,2)):ca(n)},Hn.NOW=function(){if(t.options.dateAsString){var n=new Date,c=n.getFullYear()+"-"+("0"+(n.getMonth()+1)).substr(-2)+"-"+("0"+n.getDate()).substr(-2);return c+=" "+("0"+n.getHours()).substr(-2)+":"+("0"+n.getMinutes()).substr(-2)+":"+("0"+n.getSeconds()).substr(-2),c+="."+("00"+n.getMilliseconds()).substr(-3),c}return new Date},Hn.GETDATE=Hn.NOW,Hn.CURRENT_TIMESTAMP=Hn.NOW,Hn.CURDATE=Hn.CURRENT_DATE=function(){var n=new Date;if(n.setHours(0,0,0,0),t.options.dateAsString){var c=n.getFullYear()+"-"+("0"+(n.getMonth()+1)).substr(-2)+"-"+("0"+n.getDate()).substr(-2);return c}return n},Hn.SECOND=function(c){var c=ca(c);return c.getSeconds()},Hn.MINUTE=function(c){var c=ca(c);return c.getMinutes()},Hn.HOUR=function(c){var c=ca(c);return c.getHours()},Hn.DAYOFWEEK=Hn.WEEKDAY=function(c){var c=ca(c);return c.getDay()},Hn.DAY=Hn.DAYOFMONTH=function(c){var c=ca(c);return c.getDate()},Hn.MONTH=function(c){var c=ca(c);return c.getMonth()+1},Hn.YEAR=function(c){var c=ca(c);return c.getFullYear()};var Ll={year:1e3*3600*24*365,quarter:1e3*3600*24*365/4,month:1e3*3600*24*30,week:1e3*3600*24*7,day:1e3*3600*24,dayofyear:1e3*3600*24,weekday:1e3*3600*24,hour:1e3*3600,minute:1e3*60,second:1e3,millisecond:1,microsecond:.001};t.stdfn.DATEDIFF=function(n,c,o){var l=ca(o).getTime()-ca(c).getTime();return l/Ll[n.toLowerCase()]|0},t.stdfn.DATEADD=function(f,c,o){var l=ca(o),f=f.toLowerCase();switch(f){case"year":l.setFullYear(l.getFullYear()+c);break;case"quarter":l.setMonth(l.getMonth()+c*3);break;case"month":l.setMonth(l.getMonth()+c);break;default:l=new Date(l.getTime()+c*Ll[f]);break}return l},t.stdfn.INTERVAL=function(n,c){return n*Ll[c.toLowerCase()]},t.stdfn.DATE_ADD=t.stdfn.ADDDATE=function(n,c){var o=ca(n).getTime()+c;return new Date(o)},t.stdfn.DATE_SUB=t.stdfn.SUBDATE=function(n,c){var o=ca(n).getTime()-c;return new Date(o)};var N2=/^\d{4}\.\d{2}\.\d{2} \d{2}:\d{2}:\d{2}/;function ca(n){return typeof n=="string"&&N2.test(n)&&(n=n.replace(".","-").replace(".","-")),new Date(n)}V.DropTable=function(n){return Object.assign(this,n)},V.DropTable.prototype.toString=function(){var n="DROP ";return this.view?n+="VIEW":n+="TABLE",this.ifexists&&(n+=" IF EXISTS"),n+=" "+this.tables.toString(),n},V.DropTable.prototype.execute=function(n,c,o){var l=this.ifexists,f=0,u=0,p=this.tables.length;return this.tables.forEach(function(h){var b=t.databases[h.databaseid||n],U=h.tableid;if(!l||l&&b.tables[U]){if(b.tables[U])b.engineid?t.engines[b.engineid].dropTable(h.databaseid||n,U,l,function(R){delete b.tables[U],f+=R,u++,u==p&&o&&o(f)}):(delete b.tables[U],f++,u++,u==p&&o&&o(f));else if(!t.options.dropifnotexists)throw new Error(`Can not drop table ${JSON.stringify(h.tableid)} because it does not exist in the database.`)}else u++,u==p&&o&&o(f)}),f},V.TruncateTable=function(n){return Object.assign(this,n)},V.TruncateTable.prototype.toString=function(){var n="TRUNCATE TABLE";return n+=" "+this.table.toString(),n},V.TruncateTable.prototype.execute=function(n,c,o){var l=t.databases[this.table.databaseid||n],f=this.table.tableid;if(l.engineid)return t.engines[l.engineid].truncateTable(this.table.databaseid||n,f,this.ifexists,o);if(l.tables[f])l.tables[f].data=[];else throw new Error("Cannot truncate table becaues it does not exist");return o?o(0):0},V.CreateVertex=function(n){return Object.assign(this,n)},V.CreateVertex.prototype.toString=function(){var n="CREATE VERTEX ";return this.class&&(n+=this.class+" "),this.sharp&&(n+="#"+this.sharp+" "),this.sets?n+=this.sets.toString():this.content?n+=this.content.toString():this.select&&(n+=this.select.toString()),n},V.CreateVertex.prototype.toJS=function(n){var c="this.queriesfn["+(this.queriesidx-1)+"](this.params,null,"+n+")";return c},V.CreateVertex.prototype.compile=function(n){var c=n,o=this.sharp;if(typeof this.name<"u")var f="x.name="+this.name.toJS(),l=new Function("x",f);if(this.sets&&this.sets.length>0)var f=this.sets.map(function(h){return`x[${JSON.stringify(h.column.columnid)}]=`+h.expression.toJS("x","")}).join(";"),u=new Function("x,params,alasql",f);var p=function(h,b){var U,R=t.databases[c],L;typeof o<"u"?L=o:L=R.counter++;var T={$id:L,$node:"VERTEX"};return R.objects[T.$id]=T,U=T,l&&l(T),u&&u(T,h,t),b&&(U=b(U)),U};return p},V.CreateEdge=function(n){return Object.assign(this,n)},V.CreateEdge.prototype.toString=function(){var n="CREATE EDGE ";return this.class&&(n+=this.class+" "),n},V.CreateEdge.prototype.toJS=function(n){var c="this.queriesfn["+(this.queriesidx-1)+"](this.params,null,"+n+")";return c},V.CreateEdge.prototype.compile=function(n){var c=n,o=new Function("params,alasql","var y;return "+this.from.toJS()),l=new Function("params,alasql","var y;return "+this.to.toJS());if(typeof this.name<"u")var u="x.name="+this.name.toJS(),f=new Function("x",u);if(this.sets&&this.sets.length>0)var u=this.sets.map(function(h){return`x[${JSON.stringify(h.column.columnid)}]=`+h.expression.toJS("x","")}).join(";"),p=new Function("x,params,alasql","var y;"+u);return(h,b)=>{let U=0,R=t.databases[c],L={$id:R.counter++,$node:"EDGE"},T=o(h,t),C=l(h,t);return L.$in=[T.$id],L.$out=[C.$id],T.$out=T.$out||[],T.$out.push(L.$id),C.$in=C.$in||[],C.$in.push(L.$id),R.objects[L.$id]=L,U=L,f?.(L),p?.(L,h,t),b?b(U):U}},V.CreateGraph=function(n){return Object.assign(this,n)},V.CreateGraph.prototype.toString=function(){var n="CREATE GRAPH ";return this.class&&(n+=this.class+" "),n},V.CreateGraph.prototype.execute=function(n,c,o){var l=[];return this.from&&t.from[this.from.funcid]&&(this.graph=t.from[this.from.funcid.toUpperCase()]),this.graph.forEach(p=>{if(!p.source)u(p);else{let h={};p.as!==void 0&&(t.vars[p.as]=h),p.prop!==void 0&&(h.name=p.prop),p.sharp!==void 0&&(h.$id=p.sharp),p.name!==void 0&&(h.name=p.name),p.class!==void 0&&(h.$class=p.class);let b=t.databases[n];h.$id=h.$id!==void 0?h.$id:b.counter++,h.$node="EDGE",p.json!==void 0&&Object.assign(h,new Function("params, alasql",`return ${p.json.toJS()}`)(c,t));let U=(T,C)=>{let te,W;if(T.vars)W=t.vars[T.vars],te=typeof W=="object"?W:b.objects[W];else{let Y=T.sharp||T.prop;te=b.objects[Y],te===void 0&&t.options.autovertex&&(T.prop||T.name)&&(te=f(T.prop||T.name)||u(T))}return C&&te&&typeof te.$out>"u"&&(te.$out=[]),!C&&te&&typeof te.$in>"u"&&(te.$in=[]),te},R=U(p.source,!0),L=U(p.target,!1);if(h.$in=[R.$id],h.$out=[L.$id],R.$out.push(h.$id),L.$in.push(h.$id),b.objects[h.$id]=h,h.$class!==void 0){let T=t.databases[n].tables[h.$class];if(T===void 0)throw new Error("No such class. Please use CREATE CLASS");T.data.push(h)}l.push(h.$id)}}),o&&(l=o(l)),l;function f(p){var h=t.databases[t.useid].objects;for(var b in h)if(h[b].name===p)return h[b]}function u(p){var h={};typeof p.as<"u"&&(t.vars[p.as]=h),typeof p.prop<"u"&&(h.$id=p.prop,h.name=p.prop),typeof p.sharp<"u"&&(h.$id=p.sharp),typeof p.name<"u"&&(h.name=p.name),typeof p.class<"u"&&(h.$class=p.class);var b=t.databases[n];if(typeof h.$id>"u"&&(h.$id=b.counter++),h.$node="VERTEX",typeof p.json<"u"&&Pr(h,new Function("params,alasql","var y;return "+p.json.toJS())(c,t)),b.objects[h.$id]=h,typeof h.$class<"u"){if(typeof t.databases[n].tables[h.$class]>"u")throw new Error("No such class. Pleace use CREATE CLASS");t.databases[n].tables[h.$class].data.push(h)}return l.push(h.$id),h}},V.CreateGraph.prototype.compile1=function(n){let c=n,o=new Function("params, alasql",`return ${this.from.toJS()}`),l=new Function("params, alasql",`return ${this.to.toJS()}`),f,u;if(this.name!==void 0){let p=`x.name = ${this.name.toJS()}`;f=new Function("x",p)}if(this.sets&&this.sets.length>0){let p=this.sets.map(h=>`x[${JSON.stringify(h.column.columnid)}] = ${h.expression.toJS("x","")}`).join(";");u=new Function("x, params, alasql",`var y; ${p}`)}return(p,h)=>{let b=0,U=t.databases[c],R={$id:U.counter++,$node:"EDGE"},L=o(p,t),T=l(p,t);return R.$in=[L.$id],R.$out=[T.$id],L.$out=L.$out||[],L.$out.push(R.$id),T.$in=T.$in||[],T.$in.push(R.$id),U.objects[R.$id]=R,b=R,f&&f(R),u&&u(R,p,t),h&&(b=h(b)),b}},V.AlterTable=function(n){return Object.assign(this,n)},V.AlterTable.prototype.toString=function(){let n="ALTER TABLE "+this.table.toString();return this.renameto&&(n+=" RENAME TO "+this.renameto),n},V.AlterTable.prototype.execute=function(n,c,o){let l=t.databases[n];if(l.dbversion=Date.now(),this.renameto){var f=this.table.tableid,u=this.renameto,p=1;if(l.tables[u])throw new Error(`Can not rename a table "${f}" to "${u}" because the table with this name already exists`);if(u===f)throw new Error(`Can not rename a table "${f}" to itself`);return l.tables[u]=l.tables[f],delete l.tables[f],p=1,o&&o(p),p}if(this.addcolumn){l=t.databases[this.table.databaseid||n],l.dbversion++;var h=this.table.tableid,b=l.tables[h],U=this.addcolumn.columnid;if(b.xcolumns[U])throw new Error(`Cannot add column "${U}" because it already exists in table "${h}"`);var R={columnid:U,dbtypeid:this.addcolumn.dbtypeid,dbsize:this.dbsize,dbprecision:this.dbprecision,dbenum:this.dbenum,defaultfns:null},L=function(){};b.columns.push(R),b.xcolumns[U]=R;for(let F=0,N=b.data.length;F0)for(var R=0,L=u.data.length;R0)for(var R=0,L=u.data.length;R0&&(R=n.columns.map(function(Te){return Te.columnid}));var L=new V.Select(b);L.modifier="ALASQL_DETAILS";var T=L.execute(c,o),C=T.columns.map(function(Te){return Te.columnid});R||(R=C);var te=df(T.data,C,R);p.data=te.slice();for(var W=te,Y=te.slice(),F=0;W.length>0&&Fo.toString()).join(", ")),this.output&&(n+=" OUTPUT ",n+=this.output.columns.map(o=>o.toString()).join(", "),this.output.intovar?n+=" INTO "+this.output.method+this.output.intovar:this.output.intotable&&(n+=" INTO "+this.output.intotable.toString(),this.output.intocolumns&&(n+="("+this.output.intocolumns.map(o=>o.toString()).join(", ")+")"))),n},V.Insert.prototype.toJS=function(n,c,o){var l="this.queriesfn["+(this.queriesidx-1)+"](this.params,null,"+n+")";return l},V.Insert.prototype.compile=function(n){var c=this;if(c.into instanceof V.ParamValue)return V.compileParamValue(c.into.param,"INSERT",!0,n,c,"into");n=c.into.databaseid||n;var o=t.databases[n],l=c.into.tableid,f=o.tables[l];if(!f)throw"Table '"+l+"' could not be found";var u=function(Ot,Oe,Te){return`The number of values (${Ot}) does not match the number of ${Te} (${Oe}). If using a subquery, use INSERT INTO ... SELECT instead of INSERT INTO ... VALUES (SELECT ...)`},h="",p="",h="db.tables['"+l+"'].dirty=true;",b="var a,aa=[],x;",U;if(this.values){this.exists&&(this.existsfn=this.exists.map(function(Oe){var Te=Oe.compile(n);return Te.query.modifier="RECORDSET",Te})),this.queries&&(this.queriesfn=this.queries.map(function(Oe){var Te=Oe.compile(n);return Te.query.modifier="RECORDSET",Te})),c.values.forEach(function(Oe){var Te=[];if(c.columns){if(Oe.length!==c.columns.length)throw new Error(u(Oe.length,c.columns.length,"columns"));c.columns.forEach(function(ht,Tt){var $t="'"+ht.columnid+"':";f.xcolumns&&f.xcolumns[ht.columnid]?["INT","FLOAT","NUMBER","MONEY"].indexOf(f.xcolumns[ht.columnid].dbtypeid)>=0?$t+="(x="+Oe[Tt].toJS()+",x==undefined?undefined:+x)":t.fn[f.xcolumns[ht.columnid].dbtypeid]?($t+="(new "+f.xcolumns[ht.columnid].dbtypeid+"(",$t+=Oe[Tt].toJS(),$t+="))"):$t+=Oe[Tt].toJS():$t+=Oe[Tt].toJS(),Te.push($t)})}else if(Array.isArray(Oe)&&f.columns&&f.columns.length>0){if(Oe.length!==f.columns.length)throw new Error(u(Oe.length,f.columns.length,"table columns"));f.columns.forEach(function(ht,Tt){var $t="'"+ht.columnid+"':";["INT","FLOAT","NUMBER","MONEY"].indexOf(ht.dbtypeid)>=0?$t+="+"+Oe[Tt].toJS():t.fn[ht.dbtypeid]?($t+="(new "+ht.dbtypeid+"(",$t+=Oe[Tt].toJS(),$t+="))"):$t+=Oe[Tt].toJS(),Te.push($t)})}else p=g1(Oe);o.tables[l].defaultfns&&Te.unshift(o.tables[l].defaultfns),p?h+="a="+p+";":h+="a={"+Te.join(",")+"};",o.tables[l].isclass&&(h+="var db=alasql.databases['"+n+"'];",h+='a.$class="'+l+'";',h+="a.$id=db.counter++;",h+="db.objects[a.$id]=a;"),o.tables[l].insert?(h+="var db=alasql.databases['"+n+"'];",h+="var inserted=db.tables['"+l+"'].insert(a,"+(c.orreplace?"true":"false")+","+(c.ignore?"true":"false")+");",c.ignore&&(h+="if(inserted!==false){"),(c.output||c.ignore)&&(h+="aa.push(a);"),c.ignore&&(h+="}")):h+="aa.push(a);"}),U=b+h,o.tables[l].insert||(h+="alasql.databases['"+n+"'].tables['"+l+"'].data=alasql.databases['"+n+"'].tables['"+l+"'].data.concat(aa);"),c.output?(h+="var output = [];",h+="for(var i=0;i{delete f.tables[h][b][u]}),delete f.triggers[u];else throw new Error("Trigger Table not found")}else throw new Error("Trigger not found");return o&&(l=o(l)),l},t.executeTrigger=function(n,c,...o){if(n){if(n.funcid)return t.fn[n.funcid](...o);if(n.statement)return n.statement.expression&&n.statement.expression.funcid?t.fn[n.statement.expression.funcid](...o):n.statement.execute(c)}},V.Delete=function(n){return Object.assign(this,n)},V.Delete.prototype.toString=function(){var n="DELETE FROM "+this.table.toString();return this.where&&(n+=" WHERE "+this.where.toString()),this.output&&(n+=" OUTPUT ",n+=this.output.columns.map(c=>c.toString()).join(", "),this.output.intovar?n+=" INTO "+this.output.method+this.output.intovar:this.output.intotable&&(n+=" INTO "+this.output.intotable.toString(),this.output.intocolumns&&(n+="("+this.output.intocolumns.map(c=>c.toString()).join(", ")+")"))),n},V.Delete.prototype.compile=function(n){var c=this;if(this.table instanceof V.ParamValue)return V.compileParamValue(this.table.param,"DELETE",!0,n,c,"table");n=this.table.databaseid||n;var o=this.table.tableid,l,f=t.databases[n];if(this.where){this.exists&&(this.existsfn=this.exists.map(function(p){var h=p.compile(n);return h.query.modifier="RECORDSET",h})),this.queries&&(this.queriesfn=this.queries.map(function(p){var h=p.compile(n);return h.query.modifier="RECORDSET",h}));var u=new Function("r,params,alasql","var y;return ("+this.where.toJS("r","")+")").bind(this);l=function(p,h){if(f.engineid&&t.engines[f.engineid].deleteFromTable)return t.engines[f.engineid].deleteFromTable(n,o,u,p,h);t.options.autocommit&&f.engineid&&(f.engineid=="LOCALSTORAGE"||f.engineid=="FILESTORAGE")&&t.engines[f.engineid].loadTableData(n,o);for(var b=f.tables[o],U=b.data.length,R=[],L=[],T=0,C=b.data.length;Tc.toString()).join(", "),this.output.intovar?n+=" INTO "+this.output.method+this.output.intovar:this.output.intotable&&(n+=" INTO "+this.output.intotable.toString(),this.output.intocolumns&&(n+="("+this.output.intocolumns.map(c=>c.toString()).join(", ")+")"))),n},V.SetColumn=function(n){return Object.assign(this,n)},V.SetColumn.prototype.toString=function(){return this.column.toString()+"="+this.expression.toString()},V.Update.prototype.compile=function(n){var c=this;if(this.table instanceof V.ParamValue)return V.compileParamValue(this.table.param,"UPDATE",!1,n,c,"table");n=this.table.databaseid||n;var o=this.table.tableid;if(this.where){this.exists&&(this.existsfn=this.exists.map(function(h){var b=h.compile(n);return b.query.modifier="RECORDSET",b})),this.queries&&(this.queriesfn=this.queries.map(function(h){var b=h.compile(n);return b.query.modifier="RECORDSET",b}));var l=new Function("r,params,alasql","var y;return "+this.where.toJS("r","")).bind(this)}var f=t.databases[n].tables[o].onupdatefns||"";f+=";",this.columns.forEach(function(h){f+="r['"+h.column.columnid+"']="+h.expression.toJS("r","")+";"});var u=new Function("r,params,alasql","var y;"+f),p=function(h,b){var U=t.databases[n];if(U.engineid&&t.engines[U.engineid].updateTable)return t.engines[U.engineid].updateTable(n,o,u,l,h,b);t.options.autocommit&&U.engineid&&t.engines[U.engineid].loadTableData(n,o);var R=U.tables[o];if(!R)throw new Error("Table '"+o+"' not exists");for(var L=0,T=[],C=0,te=R.data.length;C{n+="WHEN ",c.matched||(n+="NOT "),n+="MATCHED ",c.bytarget&&(n+="BY TARGET "),c.bysource&&(n+="BY SOURCE "),c.expr&&(n+=`AND ${c.expr.toString()} `),n+="THEN ",c.action.delete&&(n+="DELETE "),c.action.insert&&(n+="INSERT ",c.action.columns&&(n+=`(${c.action.columns.toString()}) `),c.action.values&&(n+=`VALUES (${c.action.values.toString()}) `),c.action.defaultvalues&&(n+="DEFAULT VALUES ")),c.action.update&&(n+="UPDATE ",n+=c.action.update.map(o=>o.toString()).join(", ")+" ")}),n},V.Merge.prototype.execute=function(n,c,o){var l=1;return o&&(l=o(l)),l},V.CreateDatabase=function(n){return Object.assign(this,n)},V.CreateDatabase.prototype.toString=function(){let n="CREATE ";return this.engineid&&(n+=`${this.engineid} `),n+="DATABASE ",this.ifnotexists&&(n+="IF NOT EXISTS "),n+=`${this.databaseid} `,this.args&&this.args.length>0&&(n+=`(${this.args.map(c=>c.toString()).join(", ")}) `),this.as&&(n+=`AS ${this.as}`),n},V.CreateDatabase.prototype.execute=function(n,c,o){var l;if(this.args&&this.args.length>0&&(l=this.args.map(function(h){return new Function("params,alasql","var y;return "+h.toJS())(c,t)})),this.engineid){var f=t.engines[this.engineid].createDatabase(this.databaseid,this.args,this.ifnotexists,this.as,o);return f}else{var u=this.databaseid;if(t.databases[u])throw new Error("Database '"+u+"' already exists");var p=new t.Database(u),f=1;return o?o(f):f}},V.AttachDatabase=function(n){return Object.assign(this,n)},V.AttachDatabase.prototype.toString=function(n){let c="ATTACH";return this.engineid&&(c+=` ${this.engineid}`),c+=` DATABASE ${this.databaseid}`,n&&(c+="(",n.length>0&&(c+=n.map(o=>o.toString()).join(", ")),c+=")"),this.as&&(c+=` AS ${this.as}`),c},V.AttachDatabase.prototype.execute=function(n,c,o){if(!t.engines[this.engineid])throw new Error('Engine "'+this.engineid+'" is not defined.');var l=t.engines[this.engineid].attachDatabase(this.databaseid,this.as,this.args,c,o);return l},V.DetachDatabase=function(n){return Object.assign(this,n)},V.DetachDatabase.prototype.toString=function(){var n="DETACH";return n+=" DATABASE "+this.databaseid,n},V.DetachDatabase.prototype.execute=function(n,c,o){if(!t.databases[this.databaseid].engineid)throw new Error('Cannot detach database "'+this.engineid+'", because it was not attached.');var l,f=this.databaseid;if(f===t.DEFAULTDATABASEID)throw new Error("Drop of default database is prohibited");if(t.databases[f]){var u=t.databases[f].engineid&&t.databases[f].engineid=="FILESTORAGE",p=t.databases[f].filename||"";delete t.databases[f],u&&(t.databases[f]={},t.databases[f].isDetached=!0,t.databases[f].filename=p),f===t.useid&&t.use(),l=1}else if(this.ifexists)l=0;else throw new Error("Database '"+f+"' does not exist");return o&&o(l),l},V.UseDatabase=function(n){return Object.assign(this,n)},V.UseDatabase.prototype.toString=function(){return"USE DATABASE "+this.databaseid},V.UseDatabase.prototype.execute=function(n,c,o){var l=this.databaseid;if(!t.databases[l])throw new Error("Database '"+l+"' does not exist");t.use(l);var f=1;return o&&o(f),f},V.DropDatabase=function(n){return Object.assign(this,n)},V.DropDatabase.prototype.toString=function(){var n="DROP";return this.ifexists&&(n+=" IF EXISTS"),n+=" DATABASE "+this.databaseid,n},V.DropDatabase.prototype.execute=function(n,c,o){if(this.engineid)return t.engines[this.engineid].dropDatabase(this.databaseid,this.ifexists,o);let l,f=this.databaseid;if(f===t.DEFAULTDATABASEID)throw new Error("Drop of default database is prohibited");if(t.databases[f]){if(t.databases[f].engineid)throw new Error(`Cannot drop database '${f}', because it is attached. Detach it.`);delete t.databases[f],f===t.useid&&t.use(),l=1}else if(this.ifexists)l=0;else throw new Error(`Database '${f}' does not exist`);return o&&o(l),l},V.Declare=function(n){return Object.assign(this,n)},V.Declare.prototype.toString=function(){let n="DECLARE ";return this.declares&&this.declares.length>0&&(n+=this.declares.map(c=>{let o=`@${c.variable} ${c.dbtypeid}`;return c.dbsize&&(o+=`(${c.dbsize}`,c.dbprecision&&(o+=`,${c.dbprecision}`),o+=")"),c.expression&&(o+=` = ${c.expression.toString()}`),o}).join(",")),n},V.Declare.prototype.execute=function(n,c,o){var l=1,f=this;return f.declares&&f.declares.length>0&&f.declares.forEach(function(u){var p=u.dbtypeid;t.fn[p]||(p=p.toUpperCase()),t.declares[u.variable]={dbtypeid:p,dbsize:u.dbsize,dbprecision:u.dbprecision},u.expression&&(t.vars[u.variable]=new Function("params,alasql","return "+u.expression.toJS("({})","",null)).bind(f)(c,t),t.declares[u.variable]&&(t.vars[u.variable]=t.stdfn.CONVERT(t.vars[u.variable],t.declares[u.variable])))}),o&&(l=o(l)),l},V.ShowDatabases=function(n){return Object.assign(this,n)},V.ShowDatabases.prototype.toString=function(){var n="SHOW DATABASES";return this.like&&(n+="LIKE "+this.like.toString()),n},V.ShowDatabases.prototype.execute=function(n,c,o){if(this.engineid)return t.engines[this.engineid].showDatabases(this.like,o);var l=this,f=[];for(var u in t.databases)f.push({databaseid:u});return l.like&&f&&f.length>0&&(f=f.filter(function(p){return t.utils.like(l.like.value,p.databaseid)})),o&&o(f),f},V.ShowTables=function(n){return Object.assign(this,n)},V.ShowTables.prototype.toString=function(){var n="SHOW TABLES";return this.databaseid&&(n+=" FROM "+this.databaseid),this.like&&(n+=" LIKE "+this.like.toString()),n},V.ShowTables.prototype.execute=function(n,c,o){var l=t.databases[this.databaseid||n],f=this,u=[];for(var p in l.tables)u.push({tableid:p});return f.like&&u&&u.length>0&&(u=u.filter(function(h){return t.utils.like(f.like.value,h.tableid)})),o&&o(u),u},V.ShowColumns=function(n){return Object.assign(this,n)},V.ShowColumns.prototype.toString=function(){var n="SHOW COLUMNS";return this.table.tableid&&(n+=" FROM "+this.table.tableid),this.databaseid&&(n+=" FROM "+this.databaseid),n},V.ShowColumns.prototype.execute=function(n,c,o){var l=t.databases[this.table.databaseid||this.databaseid||n],f=l.tables[this.table.tableid];if(f&&f.columns){var u=f.columns.map(function(p){return{columnid:p.columnid,dbtypeid:p.dbtypeid,dbsize:p.dbsize}});return o&&o(u),u}else return o&&o([]),[]},V.ShowIndex=function(n){return Object.assign(this,n)},V.ShowIndex.prototype.toString=function(){var n="SHOW INDEX";return this.table.tableid&&(n+=" FROM "+this.table.tableid),this.databaseid&&(n+=" FROM "+this.databaseid),n},V.ShowIndex.prototype.execute=function(n,c,o){var l=t.databases[this.table.databaseid||this.databaseid||n],f=l.tables[this.table.tableid],u=[];if(f&&f.indices)for(var p in f.indices)u.push({hh:p,len:Object.keys(f.indices[p]).length});return o&&o(u),u},V.ShowCreateTable=function(n){return Object.assign(this,n)},V.ShowCreateTable.prototype.toString=function(){var n="SHOW CREATE TABLE "+this.table.tableid;return this.databaseid&&(n+=" FROM "+this.databaseid),n},V.ShowCreateTable.prototype.execute=function(n){var c=t.databases[this.databaseid||n],o=c.tables[this.table.tableid];if(o){var l="CREATE TABLE "+this.table.tableid+" (",f=[];return o.columns&&(o.columns.forEach(function(u){var p=u.columnid+" "+u.dbtypeid;u.dbsize&&(p+="("+u.dbsize+")"),u.primarykey&&(p+=" PRIMARY KEY"),f.push(p)}),l+=f.join(", ")),l+=")",l}else throw new Error('There is no such table "'+this.table.tableid+'"')},V.SetVariable=function(n){return Object.assign(this,n)},V.SetVariable.prototype.toString=function(){var n="SET ";return typeof this.value<"u"&&(n+=this.variable.toUpperCase()+" "+(this.value?"ON":"OFF")),this.expression&&(n+=this.method+this.variable+" = "+this.expression.toString()),n},V.SetVariable.prototype.execute=function(n,c,o){if(typeof this.value<"u"){let f=this.value;f==="ON"?f=!0:f==="OFF"&&(f=!1),t.options[this.variable]=f}else if(this.expression){this.exists&&(this.existsfn=this.exists.map(u=>{let p=u.compile(n);return p.query&&!p.query.modifier&&(p.query.modifier="RECORDSET"),p})),this.queries&&(this.queriesfn=this.queries.map(u=>{let p=u.compile(n);return p.query&&!p.query.modifier&&(p.query.modifier="RECORDSET"),p}));let f=new Function("params, alasql","return "+this.expression.toJS("({})","",null)).bind(this)(c,t);if(t.declares[this.variable]&&(f=t.stdfn.CONVERT(f,t.declares[this.variable])),this.props&&this.props.length>0){let u;this.method==="@"?u=`alasql.vars['${this.variable}']`:u=`params['${this.variable}']`,this.props.forEach(p=>{typeof p=="string"?u+=`['${p}']`:typeof p=="number"?u+=`[${p}]`:u+=`[${p.toJS()}]`}),new Function("value, params, alasql",`${u} = value`)(f,c,t)}else this.method==="@"?t.vars[this.variable]=f:c[this.variable]=f}let l=1;return o&&(l=o(l)),l},t.test=function(n,c,o){if(arguments.length===0){t.log(t.con.results);return}var l=Date.now();if(arguments.length===1){o(),t.con.log(Date.now()-l);return}arguments.length===2&&(o=c,c=1);for(var f=0;f",n),Array.isArray(f)&&console.table?console.table(f):console.log(ls(f));else{var u;l==="output"?u=document.getElementsByTagName("output")[0]:typeof l=="string"?u=document.getElementById(l):u=l;var p="";if(typeof n=="string"&&t.options.logprompt&&(p+="

"+t.pretty(n)+"
"),Array.isArray(f))if(f.length===0)p+="

[ ]

";else if(typeof f[0]!="object"||Array.isArray(f[0]))for(var h=0,b=f.length;h"+Ko(f[h])+"

";else p+=Ko(f);else p+=Ko(f);u.innerHTML+=p}},t.clear=function(){var n=t.options.logtarget;if(s.isNode||s.isMeteorServer)console.clear&&console.clear();else{var c;n==="output"?c=document.getElementsByTagName("output")[0]:typeof n=="string"?c=document.getElementById(n):c=n,c.innerHTML=""}},t.write=function(n){var c=t.options.logtarget;if(s.isNode||s.isMeteorServer)console.log&&console.log(n);else{var o;c==="output"?o=document.getElementsByTagName("output")[0]:typeof c=="string"?o=document.getElementById(c):o=c,o.innerHTML+=n}};function Ko(n){var c="";if(n===void 0)c+="undefined";else if(Array.isArray(n)){c+="",c+="";var o=[];for(var l in n[0])o.push(l);c+="
#",o.forEach(function(p){c+=""+p});for(var f=0,u=n.length;f"+(f+1),o.forEach(function(p){c+=" ",n[f][p]==+n[f][p]?(c+='
',typeof n[f][p]>"u"?c+="NULL":c+=n[f][p],c+="
"):typeof n[f][p]>"u"?c+="NULL":typeof n[f][p]=="string"?c+=n[f][p]:c+=ls(n[f][p])});c+="
"}else c+="

"+ls(n)+"

";return c}function Fo(n,c,o){if(!(o<=0)){var l=c-n.scrollTop,f=l/o*10;setTimeout(function(){n.scrollTop!==c&&(n.scrollTop=n.scrollTop+f,Fo(n,c,o-10))},10)}}t.prompt=function(n,c,o){if(s.isNode)throw new Error("The prompt not realized for Node.js");var l=0;if(typeof n=="string"&&(n=document.getElementById(n)),typeof c=="string"&&(c=document.getElementById(c)),c.textContent=t.useid,o){t.prompthistory.push(o),l=t.prompthistory.length;try{var f=Date.now();t.log(o),t.write('

'+(Date.now()-f)+" ms

")}catch(p){t.write("

"+t.useid+"> "+o+"

"),t.write('

'+p+"

")}}var u=n.getBoundingClientRect().top+document.getElementsByTagName("body")[0].scrollTop;Fo(document.getElementsByTagName("body")[0],u,500),n.onkeydown=function(p){if(p.which===13){var h=n.value,b=t.useid;n.value="",t.prompthistory.push(h),l=t.prompthistory.length;try{var U=Date.now();t.log(h),t.write('

'+(Date.now()-U)+" ms

")}catch(L){t.write("

"+b+"> "+t.pretty(h,!1)+"

"),t.write('

'+L+"

")}n.focus(),c.textContent=t.useid;var R=n.getBoundingClientRect().top+document.getElementsByTagName("body")[0].scrollTop;Fo(document.getElementsByTagName("body")[0],R,500)}else p.which===38?(l--,l<0&&(l=0),t.prompthistory[l]&&(n.value=t.prompthistory[l],p.preventDefault())):p.which===40&&(l++,l>=t.prompthistory.length?(l=t.prompthistory.length,n.value=""):t.prompthistory[l]&&(n.value=t.prompthistory[l],p.preventDefault()))}},V.BeginTransaction=function(n){return Object.assign(this,n)},V.BeginTransaction.prototype.toString=function(){return"BEGIN TRANSACTION"},V.BeginTransaction.prototype.execute=function(n,c,o){var l=1;return t.databases[n].engineid?t.engines[t.databases[t.useid].engineid].begin(n,o):(o&&(l=o(l)),l)},V.CommitTransaction=function(n){return Object.assign(this,n)},V.CommitTransaction.prototype.toString=function(){return"COMMIT TRANSACTION"},V.CommitTransaction.prototype.execute=function(n,c,o){var l=1;return t.databases[n].engineid?t.engines[t.databases[t.useid].engineid].commit(n,o):(o&&(l=o(l)),l)},V.RollbackTransaction=function(n){return Object.assign(this,n)},V.RollbackTransaction.prototype.toString=function(){return"ROLLBACK TRANSACTION"},V.RollbackTransaction.prototype.execute=function(n,c,o){var l=1;return t.databases[n].engineid?t.engines[t.databases[n].engineid].rollback(n,o):(o&&(l=o(l)),l)},t.options.tsql&&(t.stdfn.OBJECT_ID=function(n,c){typeof c>"u"&&(c="T"),c=c.toUpperCase();var o=n.split("."),l=t.useid,f=o[0];o.length==2&&(l=o[0],f=o[1]);var u=t.databases[l].tables;l=t.databases[l].databaseid;for(var p in u)if(p==f)return u[p].view&&c=="V"||!u[p].view&&c=="T"?l+"."+p:void 0}),t.options.mysql&&(t.fn.TIMESTAMPDIFF=function(n,c,o){return t.stdfn.DATEDIFF(n,c,o)}),(t.options.mysql||t.options.sqlite)&&(t.from.INFORMATION_SCHEMA=function(n,c,o,l,f){if(n=="VIEWS"||n=="TABLES"){var u=[];for(var p in t.databases){var h=t.databases[p].tables;for(var b in h)(h[b].view&&n=="VIEWS"||!h[b].view&&n=="TABLES")&&u.push({TABLE_CATALOG:p,TABLE_NAME:b})}return o&&(u=o(u,l,f)),u}throw new Error("Unknown INFORMATION_SCHEMA table")}),t.options.postgres,t.options.oracle,t.options.sqlite,t.into.SQL=function(n,c,o,l,f){var u;typeof n=="object"&&(c=n,n=void 0);var p={};if(t.utils.extend(p,c),typeof p.tableid>"u")throw new Error("Table for INSERT TO is not defined.");var h="";l.length===0&&typeof o[0]=="object"&&(l=Object.keys(o[0]).map(function(R){return{columnid:R}}));for(var b=0,U=o.length;b0&&(l=Object.keys(o[0]).map(function(b){return{columnid:b}})),typeof n=="object"&&(c=n,n=void 0);var u=o.length,p="";if(o.length>0){var h=l[0].columnid;p+=o.map(function(b){return b[h]}).join(` +`)}return n=t.utils.autoExtFilename(n,"txt",c),u=t.utils.saveFile(n,p),f&&(u=f(u)),u},t.into.TAB=t.into.TSV=function(n,c,o,l,f){var u={};return t.utils.extend(u,c),u.separator=" ",n=t.utils.autoExtFilename(n,"tab",c),u.autoExt=!1,t.into.CSV(n,u,o,l,f)},t.into.CSV=function(n,c,o,l,f){l.length===0&&o.length>0&&(l=Object.keys(o[0]).map(function(b){return{columnid:b}})),typeof n=="object"&&(c=n,n=void 0);var u={headers:!0};u.separator=";",u.quote='"',u.utf8Bom=!0,c&&!c.headers&&typeof c.headers<"u"&&(u.utf8Bom=!1),t.utils.extend(u,c);var p=o.length,h=u.utf8Bom?"\uFEFF":"";return u.headers&&(h+=u.quote+l.map(function(b){return b.columnid.trim()}).join(u.quote+u.separator+u.quote)+u.quote+`\r +`),o.forEach(function(b){h+=l.map(function(U){var R=b[U.columnid];return u.quote!==""&&(R=(R+"").replace(new RegExp("\\"+u.quote,"g"),u.quote+u.quote)),+R!=R&&(R=u.quote+R+u.quote),R}).join(u.separator)+`\r +`}),n=t.utils.autoExtFilename(n,"csv",c),p=t.utils.saveFile(n,h,null,{disableAutoBom:!0}),f&&(p=f(p)),p},t.into.XLS=function(n,c,o,l,f){typeof n=="object"&&(c=n,n=void 0);var u={};c&&c.sheets&&(u=c.sheets);var p={headers:!0};typeof u.Sheet1<"u"?p=u[0]:typeof c<"u"&&(p=c),typeof p.sheetid>"u"&&(p.sheetid="Sheet1");var h=U();n=t.utils.autoExtFilename(n,"xls",c);var b=t.utils.saveFile(n,h);return f&&(b=f(b)),b;function U(){var L=' ",L+="",L+="",typeof p.caption<"u"){var T=p.caption;typeof T=="string"&&(T={title:T}),L+=""}return typeof p.columns<"u"?l=p.columns:l.length==0&&o.length>0&&typeof o[0]=="object"&&(Array.isArray(o[0])?l=o[0].map(function(C,te){return{columnid:te}}):l=Object.keys(o[0]).map(function(C){return{columnid:C}})),l.forEach(function(C,te){typeof p.column<"u"&&Pr(C,p.column),typeof C.width>"u"&&(p.column&&p.column.width!="undefined"?C.width=p.column.width:C.width="120px"),typeof C.width=="number"&&(C.width=C.width+"px"),typeof C.columnid>"u"&&(C.columnid=te),typeof C.title>"u"&&(C.title=""+C.columnid.trim()),p.headers&&Array.isArray(p.headers)&&(C.title=p.headers[te])}),L+="",l.forEach(function(C){L+=''}),L+="",p.headers&&(L+="",L+="",l.forEach(function(C,te){L+="",L+=""),L+="",o&&o.length>0&&o.forEach(function(C,te){if(!(te>p.limit)){L+=""u"&&(typeof Ae=="number"?je="number":typeof Ae=="string"?je="string":typeof Ae=="boolean"?je="boolean":typeof Ae=="object"&&Ae instanceof Date&&(je="date"));var Ot="";je=="money"?Ot='mso-number-format:"\\#\\,\\#\\#0\\\\ _\u0440_\\.";white-space:normal;':je=="number"?Ot=" ":je=="date"?Ot='mso-number-format:"Short Date";':c.types&&c.types[je]&&c.types[je].typestyle&&(Ot=c.types[je].typestyle),Ot=Ot||'mso-number-format:"\\@";',L+=""}),L+=""}}),L+="",L+="
"}),L+="
"u")L+="";else if(typeof Oe<"u")if(typeof Oe=="function")L+=Oe(Ae);else if(typeof Oe=="string")L+=Ae;else throw new Error("Unknown format type. Should be function or string");else je=="number"||je=="date"?L+=Ae.toString():je=="money"?L+=(+Ae).toFixed(2):L+=Ae;L+="
",L+="",L+="",L}function R(L){var T=' style="';return L&&typeof L.style<"u"&&(T+=L.style+";"),T+='" ',T}},t.into.XLSXML=function(n,c,o,l,f){c=c||{},typeof n=="object"&&(c=n,n=void 0);var u={},p,h;c&&c.sheets?(u=c.sheets,p=o,h=l):(u.Sheet1=c,p=[o],h=[l]),n=t.utils.autoExtFilename(n,"xls",c);var b=t.utils.saveFile(n,U());return f&&(b=f(b)),b;function U(){function R(ht){return ht==null?"":String(ht).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}var L=' 0 ',T="",C=" ",te={},W=62;function Y(ht){var Tt="";for(var $t in ht){Tt+="<"+$t;for(var yr in ht[$t])Tt+=" ",yr.substr(0,2)=="x:"?Tt+=yr:Tt+="ss:",Tt+=yr+"="+JSON.stringify(ht[$t][yr]);Tt+="/>"}var le=zt(Tt);return te[le]||(te[le]={styleid:W},T+=`",W++),"s"+te[le].styleid}function F(ht){try{return Object.values(ht)}catch{return Object.keys(ht).map(function(Tt){return ht[Tt]})}}var N=0;for(var Ae in u){var je=u[Ae],Ot=typeof je.dataidx<"u"?je.dataidx:N++,Oe=F(p[Ot]),Te=void 0;typeof je.columns<"u"?Te=je.columns:(Te=h[Ot],(Te===void 0||Te.length==0&&Oe.length>0)&&typeof Oe[0]=="object"&&(Array.isArray(Oe[0])?Te=Oe[0].map(function(ht,Tt){return{columnid:Tt}}):Te=Object.keys(Oe[0]).map(function(ht){return{columnid:ht}}))),Te.forEach(function(ht,Tt){typeof je.column<"u"&&Pr(ht,je.column),typeof ht.width>"u"&&(je.column&&typeof je.column.width<"u"?ht.width=je.column.width:ht.width=120),typeof ht.width=="number"&&(ht.width=ht.width),typeof ht.columnid>"u"&&(ht.columnid=Tt),typeof ht.title>"u"&&(ht.title=""+ht.columnid.trim()),je.headers&&Array.isArray(je.headers)&&(ht.title=je.headers[Tt])}),C+="',Te.forEach(function(ht,Tt){C+=` `}),je.headers&&(C+='',Te.forEach(function(ht,Tt){if(C+="',typeof ht.title<"u"&&(typeof ht.title=="function"?C+=R(ht.title(je,ht,Tt)):C+=R(ht.title)),C+=""}),C+=""),Oe&&Oe.length>0&&Oe.forEach(function(ht,Tt){if(!(Tt>je.limit)){var $t={};if(Pr($t,je.row),je.rows&&je.rows[Tt]&&Pr($t,je.rows[Tt]),C+="",Te.forEach(function(le,mr){var Vt={};Pr(Vt,je.cell),Pr(Vt,$t.cell),typeof je.column<"u"&&Pr(Vt,je.column.cell),Pr(Vt,le.cell),je.cells&&je.cells[Tt]&&je.cells[Tt][mr]&&Pr(Vt,je.cells[Tt][mr]);var Rt=ht[le.columnid];typeof Vt.value=="function"&&(Rt=Vt.value(Rt,je,ht,le,Vt,Tt,mr));var Qr=Vt.typeid;typeof Qr=="function"&&(Qr=Qr(Rt,je,ht,le,Vt,Tt,mr)),typeof Qr>"u"&&(typeof Rt=="number"?Qr="number":typeof Rt=="string"?Qr="string":typeof Rt=="boolean"?Qr="boolean":typeof Rt=="object"&&Rt instanceof Date&&(Qr="date"));var $n="String";Qr=="number"?$n="Number":Qr=="date"&&($n="Date");var ki="";Qr=="money"?ki='mso-number-format:"\\#\\,\\#\\#0\\\\ _\u0440_\\.";white-space:normal;':Qr=="number"?ki=" ":Qr=="date"?ki='mso-number-format:"Short Date";':c.types&&c.types[Qr]&&c.types[Qr].typestyle&&(ki=c.types[Qr].typestyle),ki=ki||'mso-number-format:"\\@";',C+="",C+="";var Wn=Vt.format;if(typeof Rt>"u")C+="";else if(typeof Wn<"u")if(typeof Wn=="function")C+=R(Wn(Rt));else if(typeof Wn=="string")C+=R(Rt);else throw new Error("Unknown format type. Should be function or string");else Qr=="number"||Qr=="date"?C+=R(Rt.toString()):Qr=="money"?C+=R((+Rt).toFixed(2)):C+=R(Rt);C+=""}),C+=""}}),C+=""}return C+="",L+T+C}},t.into.XLSX=function(n,c,a,l,f){var u=1;c=c||{},qn(l,[{columnid:"_"}])&&(a=a.map(function(L){return L._}),l=void 0),n=t.utils.autoExtFilename(n,"xlsx",c);var p=Qs();typeof n=="object"&&(c=n,n=void 0);var d={SheetNames:[],Sheets:{}};return c.sourcefilename?t.utils.loadBinaryFile(c.sourcefilename,!!f,function(L){d=p.read(L,{type:"binary",...t.options.excel,...c}),b(),f&&(u=f(u))}):(b(),f&&(u=f(u))),u;function b(){typeof c=="object"&&Array.isArray(c)?a&&a.length>0&&a.forEach(function(L,T){U(c[T],L,void 0,T+1)}):U(c,a,l,1),R(f)}function U(L,T,C,te){var W={sheetid:"Sheet "+te,headers:!0};t.utils.extend(W,L);var Y=Object.keys(T).length;(!C||C.length==0)&&(Y>0?C=Object.keys(T[0]).map(function(mr){return{columnid:mr}}):C=[]);var B={};d.SheetNames.indexOf(W.sheetid)>-1||(d.SheetNames.push(W.sheetid),d.Sheets[W.sheetid]={}),B=d.Sheets[W.sheetid];var N="A1";W.range&&(N=W.range);var Ae=t.utils.xlscn(N.match(/[A-Z]+/)[0]),je=+N.match(/[0-9]+/)[0]-1;if(d.Sheets[W.sheetid]["!ref"])var Ot=d.Sheets[W.sheetid]["!ref"],Oe=t.utils.xlscn(Ot.match(/[A-Z]+/)[0]),Te=+Ot.match(/[0-9]+/)[0]-1;else var Oe=1,Te=1;var ht=C.length?0:1,Tt=Math.max(Ae+C.length-1+ht,Oe),$t=Math.max(je+Y+2,Te),yr=je+1;d.Sheets[W.sheetid]["!ref"]="A1:"+t.utils.xlsnc(Tt)+$t,W.headers&&(C.forEach(function(mr,Vt){B[t.utils.xlsnc(Ae+Vt)+""+yr]={v:mr.columnid.trim()}}),yr++);for(var le=0;le"u")u=d;else if(T=Qs(),s.isNode||s.isMeteorServer)T.writeFile(d,n);else{var C={bookType:"xlsx",bookSST:!1,type:"binary"},te=T.write(d,C),W=function(Y){for(var B=new ArrayBuffer(Y.length),N=new Uint8Array(B),Ae=0;Ae!=Y.length;++Ae)N[Ae]=Y.charCodeAt(Ae)&255;return B};qi(new Blob([W(te)],{type:"application/octet-stream"}),n)}}},t.from.METEOR=function(n,c,a,l,f){var u=n.find(c).fetch();return a&&(u=a(u,l,f)),u},t.from.TABLETOP=function(n,c,a,l,f){var u=[],p={headers:!0,simpleSheet:!0,key:n};return t.utils.extend(p,c),p.callback=function(d){u=d,a&&(u=a(u,l,f))},Tabletop.init(p),null},t.from.HTML=function(n,c,a,l,f){var u={};t.utils.extend(u,c);var p=document.querySelector(n);if(!p||p.tagName!=="TABLE")throw new Error("Selected HTML element is not a TABLE");var d=[],b=u.headers;if(b&&!Array.isArray(b)){b=[];for(var U=p.querySelector("thead tr").children,R=0;Rfunction(c,a,l,f,u){let p=[];return c=t.utils.autoExtFilename(c,n,a),t.utils.loadFile(c,!!l,function(d){d.split(/\r?\n/).forEach((b,U)=>{let R=b.trim();if(R!=="")try{p.push(JSON.parse(R))}catch(L){throw new Error(`Could not parse JSON at line ${U}: ${L.toString()}`)}}),l&&(p=l(p,f,u))},d=>{let b=d instanceof Error?d:new Error(d);if(u&&u.cb){u.cb(null,b);return}throw b}),p};t.from.JSONL=n2("jsonl"),t.from.NDJSON=n2("ndjson"),t.from.TXT=function(n,c,a,l,f){var u;return n=t.utils.autoExtFilename(n,"txt",c),t.utils.loadFile(n,!!a,function(p){u=p.split(/\r?\n/),u[u.length-1]===""&&u.pop();for(var d=0,b=u.length;d=B)return W;if(Ot)return Ot=!1,te;var $t=N;if(L.charCodeAt($t)===C){for(var yr=$t;yr++f.cb(null,L))),p};function Kl(n,c,a,l,f,u){var p={};a=a||{},t.utils.extend(p,a),typeof p.headers>"u"&&(p.headers=!0);var d;function b(L){for(var T="",C=0,te=10240;C"u"?te=L.Sheets[T]["!ref"]:(te=C.range,L.Sheets[T][te]&&(te=L.Sheets[T][te])),te){for(var Y=te.split(":"),B=Y[0].match(/[A-Z]+/)[0],N=+Y[0].match(/[0-9]+/)[0],Ae=Y[1].match(/[A-Z]+/)[0],je=+Y[1].match(/[0-9]+/)[0],Ot={},Oe=t.utils.xlscn(B),Te=t.utils.xlscn(Ae),ht=Oe;ht<=Te;ht++){var Tt=t.utils.xlsnc(ht);C.headers?L.Sheets[T][Tt+""+N]?Ot[Tt]=U(L.Sheets[T][Tt+""+N].v):Ot[Tt]=U(Tt):Ot[Tt]=Tt}C.headers&&N++;for(var $t=N;$t<=je;$t++){for(var yr={},ht=Oe;ht<=Te;ht++){var Tt=t.utils.xlsnc(ht);L.Sheets[T][Tt+""+$t]&&(yr[Ot[Tt]]=L.Sheets[T][Tt+""+$t].v)}W.push(yr)}}else W.push([]);return W.length>0&&W[W.length-1]&&Object.keys(W[W.length-1]).length==0&&W.pop(),W}return c=t.utils.autoExtFilename(c,"xls",a),t.utils.loadBinaryFile(c,!!l,function(L){if(L instanceof ArrayBuffer)var T=b(L),C=n.read(btoa(T),{type:"base64",...t.options.excel,...a});else var C=n.read(L,{type:"binary",...t.options.excel,...a});var te=p.sheetid==="*"||Array.isArray(p.sheetid)&&p.sheetid.length>0;if(te){d=[];for(var W=p.sheetid==="*"?C.SheetNames:p.sheetid,Y=0;Y"u"?je=C.SheetNames[0]:typeof p.sheetid=="number"?je=C.SheetNames[p.sheetid]:je=p.sheetid,d=R(C,je,p)}l&&(d=l(d,f,u))},function(L){if(u&&u.cb){u.cb(null,L);return}throw L}),d}t.from.XLS=function(n,c,a,l,f){return c=c||{},n=t.utils.autoExtFilename(n,"xls",c),c.autoExt=!1,Kl(Qs(),n,c,a,l,f)},t.from.XLSX=function(n,c,a,l,f){return c=c||{},n=t.utils.autoExtFilename(n,"xlsx",c),c.autoExt=!1,Kl(Qs(),n,c,a,l,f)},t.from.ODS=function(n,c,a,l,f){return c=c||{},n=t.utils.autoExtFilename(n,"ods",c),c.autoExt=!1,Kl(Qs(),n,c,a,l,f)},t.from.XML=function(n,c,a,l,f){var u;return t.utils.loadFile(n,!!a,function(p){u=pu(p).root,a&&(u=a(u,l,f))}),u};function pu(n){return n=n.trim(),n=n.replace(//g,""),c();function c(){return{declaration:a(),root:l()}}function a(){var R=d(/^<\?xml\s*/);if(R){for(var L={attributes:{}};!(b()||U("?>"));){var T=u();if(!T)return L;L.attributes[T.name]=T.value}return d(/\?>\s*/),L}}function l(){var R=d(/^<([\w-:.]+)\s*/);if(R){for(var L={name:R[1],attributes:{},children:[]};!(b()||U(">")||U("?>")||U("/>"));){var T=u();if(!T)return L;L.attributes[T.name]=T.value}if(d(/^\s*\/>\s*/))return L;d(/\??>\s*/),L.content=f();for(var C;C=l();)L.children.push(C);return d(/^<\/[\w-:.]+>\s*/),L}}function f(){var R=d(/^([^<]*)/);return R?R[1]:""}function u(){var R=d(/([\w:-]+)\s*=\s*("[^"]*"|'[^']*'|\w+)\s*/);if(R)return{name:R[1],value:p(R[2])}}function p(R){return R.replace(/^['"]|['"]$/g,"")}function d(R){var L=n.match(R);if(L)return n=n.slice(L[0].length),L}function b(){return n.length==0}function U(R){return n.indexOf(R)==0}}t.from.GEXF=function(n,c,a,l,f){var u;return t("SEARCH FROM XML("+n+")",[],function(p){u=p,a&&(u=a(u))}),u},V.Print=function(n){return Object.assign(this,n)},V.Print.prototype.toString=function(){var n="PRINT";return this.statement&&(n+=" "+this.statement.toString()),n},V.Print.prototype.execute=function(n,c,a){var l=this,f=1;if(t.precompile(this,n,c),this.exprs&&this.exprs.length>0){var u=this.exprs.map(function(d){var b=new Function("params,alasql,p","var y;return "+d.toJS("({})","",null)).bind(l),U=b(c,t);return os(U)});console.log.apply(console,u)}else if(this.select){var p=this.select.execute(n,c);console.log(os(p))}else console.log();return a&&(f=a(f)),f},V.Source=function(n){return Object.assign(this,n)},V.Source.prototype.toString=function(){var n="SOURCE";return this.url&&(n+=" '"+this.url+" '"),n},V.Source.prototype.execute=function(n,c,a){var l;return se(this.url,!!a,function(f){return l=t(f),a&&(l=a(l)),l},function(f){throw f}),l},V.Require=function(n){return Object.assign(this,n)},V.Require.prototype.toString=function(){var n="REQUIRE";return this.paths&&this.paths.length>0&&(n+=this.paths.map(function(c){return c.toString()}).join(",")),this.plugins&&this.plugins.length>0&&(n+=this.plugins.map(function(c){return c.toUpperCase()}).join(",")),n},V.Require.prototype.execute=function(n,c,a){var l=this,f=0,u="";return this.paths&&this.paths.length>0?this.paths.forEach(function(p){se(p.value,!!a,function(d){f++,u+=d,!(f0?this.plugins.forEach(function(p){t.plugins[p]||se(t.path+"/alasql-"+p.toLowerCase()+".js",!!a,function(d){f++,u+=d,!(fl.name===n)||0;let a=c.open(n);return new Promise(function(l,f){a.onsuccess=()=>{a.result.close(),l({name:n,version:a.result.version})},a.onupgradeneeded=u=>{u.target.transaction.abort(),l(0)},a.onerror=()=>{f(new Error("IndexedDB error"))},a.onblocked=()=>{l({name:n,version:a.result.version})}})}ja.showDatabases=function(n,c){if(!indexedDB.databases){c(null,new Error("SHOW DATABASE is not supported in this browser"));return}indexedDB.databases().then(a=>{let l=[],f=n&&new RegExp(n.value.replace(/\%/g,".*"),"g");for(var u=0;u{if(f)return f(null,p),null;throw p});if(u!==null)if(u)if(a)f&&f(0);else{let p=new Error(`IndexedDB: Cannot create new database "${n}" because it already exists`);if(f){f(null,p);return}throw p}else{let p=indexedDB.open(n,1);p.onsuccess=()=>{p.result.close(),f(1)}}},ja.dropDatabase=async function(n,c,a){let l=await D1(n).catch(f=>{if(a)return a(null,f),null;throw f});if(l!==null)if(l){let f=indexedDB.deleteDatabase(n);f.onsuccess=()=>{a&&a(1)}}else if(c)a&&a(0);else{if(a){a(null,new Error(`IndexedDB: Cannot drop database "${n}" because it does not exist`));return}throw new Error(`IndexedDB: Cannot drop database "${n}" because it does not exist`)}},ja.attachDatabase=async function(n,c,a,l,f){let u=await D1(n).catch(U=>{if(f)return f(null,U),null;throw U});if(u===null)return;if(!u){let U=new Error(`IndexedDB: Cannot attach database "${n}" because it does not exist`);if(f){f(null,U);return}throw U}let p=await new Promise((U,R)=>{let L=indexedDB.open(n);L.onsuccess=()=>{U(L.result.objectStoreNames),L.result.close()}}),d=new t.Database(c||n);d.engineid="INDEXEDDB",d.ixdbid=n,d.tables=[];for(var b=0;b{if(l)return l(null,d),null;throw d});if(u===null)return;if(!u){let d=new Error('IndexedDB: Cannot create table in database "'+f+'" because it does not exist');if(l){l(null,d);return}throw d}let p=indexedDB.open(f,u.version+1);p.onupgradeneeded=function(d){p.result.createObjectStore(c,{autoIncrement:!0})},p.onsuccess=function(d){p.result.close(),l&&l(1)},p.onerror=d=>{l(null,d)},p.onblocked=function(d){l(null,new Error(`Cannot create table "${c}" because database "${n}" is blocked`))}},ja.dropTable=async function(n,c,a,l){let f=t.databases[n].ixdbid,u=await D1(f).catch(b=>{if(l)return l(null,b),null;throw b});if(u===null)return;if(!u){let b=new Error('IndexedDB: Cannot drop table in database "'+f+'" because it does not exist');if(l){l(null,b);return}throw b}let p=indexedDB.open(f,u.version+1),d;p.onupgradeneeded=function(b){var U=p.result;U.objectStoreNames.contains(c)?(U.deleteObjectStore(c),delete t.databases[n].tables[c]):a||(d=new Error(`IndexedDB: Cannot drop table "${c}" because it does not exist`),b.target.transaction.abort())},p.onsuccess=function(b){p.result.close(),l&&l(1)},p.onerror=function(b){l&&l(null,d||b)},p.onblocked=function(b){l(null,new Error(`Cannot drop table "${c}" because database "${n}" is blocked`))}},ja.intoTable=function(n,c,a,l,f){let u=t.databases[n].ixdbid,p=indexedDB.open(u);var d=t.databases[n],b=d.tables[c];p.onupgradeneeded=U=>{U.target.transaction.abort();let R=new Error(`Cannot insert into table "${c}" because database "${n}" does not exist`);f&&f(null,R)},p.onsuccess=()=>{for(var U=p.result,R=U.transaction([c],"readwrite"),L=R.objectStore(c),T=0,C=a.length;T{d.target.transaction.abort();let b=new Error(`Cannot select from table "${c}" because database "${n}" does not exist`);a&&a(null,b)},p.onsuccess=()=>{let d=[],b=p.result,U=b.transaction([c]).objectStore(c).openCursor();U.onsuccess=()=>{let R=U.result;if(R){let L=typeof R=="object"?R.value:{[R.key]:R.value};d.push(L),R.continue()}else b.close(),a&&a(d,l,f)}}},ja.deleteFromTable=function(n,c,a,l,f){let u=t.databases[n].ixdbid,p=indexedDB.open(u);p.onsuccess=()=>{let d=p.result,b=d.transaction([c],"readwrite").objectStore(c).openCursor(),U=0;b.onsuccess=()=>{var R=b.result;R?((!a||a(R.value,l,t))&&(R.delete(),U++),R.continue()):(d.close(),f&&f(U))}}},ja.updateTable=function(n,c,a,l,f,u){let p=t.databases[n].ixdbid,d=indexedDB.open(p);d.onsuccess=function(){let b=d.result,U=b.transaction([c],"readwrite").objectStore(c).openCursor(),R=0;U.onsuccess=()=>{var L=U.result;if(L){if(!l||l(L.value,f)){var T=L.value;a(T,f),L.update(T),R++}L.continue()}else b.close(),u&&u(R)}}},ja.commit=function(n,c){return c?c(1):1},ja.begin=ja.commit,ja.rollback=function(n,c){return c?c(1):1};var Xn=t.engines.LOCALSTORAGE=function(){};Xn.get=function(n){var c=localStorage.getItem(n);if(!(typeof c>"u")){var a;try{a=JSON.parse(c)}catch{throw new Error("Cannot parse JSON object from localStorage"+c)}return a}},Xn.set=function(n,c){typeof c>"u"?localStorage.removeItem(n):localStorage.setItem(n,JSON.stringify(c))},Xn.storeTable=function(n,c){var a=t.databases[n],l=a.tables[c],f={};f.columns=l.columns,f.data=l.data,f.identities=l.identities,f.defaultfns=l.defaultfns,f.onupdatefns=l.onupdatefns,Xn.set(a.lsdbid+"."+c,f)},Xn.restoreTable=function(n,c){var a=t.databases[n],l=Xn.get(a.lsdbid+"."+c),f=new t.Table;for(var u in l)f[u]=l[u];return a.tables[c]=f,f.indexColumns(),f},Xn.removeTable=function(n,c){var a=t.databases[n];localStorage.removeItem(a.lsdbid+"."+c)},Xn.createDatabase=function(n,c,a,l,f){var u=1,p=Xn.get("alasql");if(a&&p&&p.databases&&p.databases[n])u=0;else{if(p||(p={databases:{}}),p.databases&&p.databases[n])throw new Error('localStorage: Cannot create new database "'+n+'" because it already exists');p.databases[n]=!0,Xn.set("alasql",p),Xn.set(n,{databaseid:n,tables:{}})}return f&&(u=f(u)),u},Xn.dropDatabase=function(n,c,a){var l=1,f=Xn.get("alasql");if(c&&f&&f.databases&&!f.databases[n])l=0;else{if(!f){if(c)return a?a(0):0;throw new Error("There is no any AlaSQL databases in localStorage")}if(f.databases&&!f.databases[n])throw new Error('localStorage: Cannot drop database "'+n+'" because there is no such database');delete f.databases[n],Xn.set("alasql",f);var u=Xn.get(n);for(var p in u.tables)localStorage.removeItem(n+"."+p);localStorage.removeItem(n)}return a&&(l=a(l)),l},Xn.attachDatabase=function(n,c,a,l,f){var u=1;if(t.databases[c])throw new Error('Unable to attach database as "'+c+'" because it already exists');c||(c=n);var p=new t.Database(c);if(p.engineid="LOCALSTORAGE",p.lsdbid=n,p.tables=Xn.get(n).tables,!t.options.autocommit&&p.tables)for(var d in p.tables)Xn.restoreTable(c,d);return f&&(u=f(u)),u},Xn.showDatabases=function(n,c){var a=[],l=Xn.get("alasql");if(n)var f=new RegExp(n.value.replace(/%/g,".*"),"g");if(l&&l.databases){for(var u in l.databases)a.push({databaseid:u});n&&a&&a.length>0&&(a=a.filter(function(p){return p.databaseid.match(f)}))}return c&&(a=c(a)),a},Xn.createTable=function(n,c,a,l){var f=1,u=t.databases[n].lsdbid,p=Xn.get(u+"."+c);if(p&&!a)throw new Error('Table "'+c+'" alsready exists in localStorage database "'+u+'"');var d=Xn.get(u),b=t.databases[n].tables[c];return d.tables[c]=!0,Xn.set(u,d),Xn.storeTable(n,c),l&&(f=l(f)),f},Xn.truncateTable=function(n,c,a,l){var f=1,u=t.databases[n].lsdbid,p;if(t.options.autocommit?p=Xn.get(u):p=t.databases[n],!a&&!p.tables[c])throw new Error('Cannot truncate table "'+c+'" in localStorage, because it does not exist');var d=Xn.restoreTable(n,c);return d.data=[],Xn.storeTable(n,c),l&&(f=l(f)),f},Xn.dropTable=function(n,c,a,l){var f=1,u=t.databases[n].lsdbid,p;if(t.options.autocommit?p=Xn.get(u):p=t.databases[n],!a&&!p.tables[c])throw new Error('Cannot drop table "'+c+'" in localStorage, because it does not exist');return delete p.tables[c],Xn.set(u,p),Xn.removeTable(n,c),l&&(f=l(f)),f},Xn.fromTable=function(n,c,a,l,f){var u=t.databases[n].lsdbid,p=Xn.restoreTable(n,c).data;return a&&(p=a(p,l,f)),p},Xn.intoTable=function(n,c,a,l,f){var u=t.databases[n].lsdbid,p=a.length,d=Xn.restoreTable(n,c);for(var b in d.identities){var U=d.identities[b];for(var R in a)a[R][b]=U.value,U.value+=U.step}return d.data||(d.data=[]),d.data=d.data.concat(a),Xn.storeTable(n,c),f&&(p=f(p)),p},Xn.loadTableData=function(n,c){var a=t.databases[n],l=t.databases[n].lsdbid;Xn.restoreTable(n,c)},Xn.saveTableData=function(n,c){var a=t.databases[n],l=t.databases[n].lsdbid;Xn.storeTable(l,c),a.tables[c].data=void 0},Xn.commit=function(n,c){var a=t.databases[n],l=t.databases[n].lsdbid,f={databaseid:l,tables:{}};if(a.tables)for(var u in a.tables)f.tables[u]=!0,Xn.storeTable(n,u);return Xn.set(l,f),c?c(1):1},Xn.begin=Xn.commit,Xn.rollback=function(n,c){return;var a,l,f;if(f.tables)for(var u in f.tables)Xn.restoreTable(n,u)};var Q1=t.engines.SQLITE=function(){};Q1.createDatabase=function(n,c,a,l,f){throw new Error("Connot create SQLITE database in memory. Attach it.")},Q1.dropDatabase=function(n){throw new Error("This is impossible to drop SQLite database. Detach it.")},Q1.attachDatabase=function(n,c,a,l,f){var u=1;if(t.databases[c])throw new Error('Unable to attach database as "'+c+'" because it already exists');if(a[0]&&a[0]instanceof V.StringValue||a[0]instanceof V.ParamValue){if(a[0]instanceof V.StringValue)var p=a[0].value;else if(a[0]instanceof V.ParamValue)var p=l[a[0].param];return t.utils.loadBinaryFile(p,!0,function(d){var b=new t.Database(c||n);b.engineid="SQLITE",b.sqldbid=n;var U=b.sqldb=new SQL.Database(d);b.tables=[];var R=U.exec("SELECT * FROM sqlite_master WHERE type='table'")[0].values;R.forEach(function(L){b.tables[L[1]]={};var T=b.tables[L[1]].columns=[],C=t.parse(L[4]),te=C.statements[0].columns;te&&te.length>0&&te.forEach(function(W){T.push(W)})}),f(1)},function(d){throw new Error('Cannot open SQLite database file "'+a[0].value+'"')}),u}else throw new Error("Cannot attach SQLite database without a file");return u},Q1.fromTable=function(n,c,a,l,f){var u=t.databases[n].sqldb.exec("SELECT * FROM "+c),p=f.sources[l].columns=[];u[0].columns.length>0&&u[0].columns.forEach(function(b){p.push({columnid:b})});var d=[];u[0].values.length>0&&u[0].values.forEach(function(b){var U={};p.forEach(function(R,L){U[R.columnid]=b[L]}),d.push(U)}),a&&a(d,l,f)},Q1.intoTable=function(n,c,a,l,f){for(var u=t.databases[n].sqldb,p=0,d=a.length;p"u"){for(var l=document.getElementsByTagName("script"),f=0;f"u")throw new Error("Path to alasql.js is not specified");if(n!==!1){var u="importScripts('";u+=n,u+="');self.onmessage = function(event) {alasql(event.data.sql,event.data.params, function(data){postMessage({id:event.data.id, data:data});});}";var p=new Blob([u],{type:"text/plain"});if(t.webworker=new Worker(URL.createObjectURL(p)),t.webworker.onmessage=function(b){var U=b.data.id;t.buffer[U](b.data.data),delete t.buffer[U]},t.webworker.onerror=function(b){throw b},arguments.length>1){var d="REQUIRE "+c.map(function(b){return'"'+b+'"'}).join(",");t(d,[],a)}}else if(n===!1){delete t.webworker;return}});var qi=qi||(function(n){"use strict";if(!(typeof n>"u"||typeof navigator<"u"&&/MSIE [1-9]\./.test(navigator.userAgent))){var c=n.document,a=function(){return n.URL||n.webkitURL||n},l=c.createElementNS("http://www.w3.org/1999/xhtml","a"),f="download"in l,u=function(B){var N=new MouseEvent("click");B.dispatchEvent(N)},p=/constructor/i.test(n.HTMLElement)||n.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent),b=function(B){(n.setImmediate||n.setTimeout)(function(){throw B},0)},U="application/octet-stream",R=1e3*40,L=function(B){var N=function(){typeof B=="string"?a().revokeObjectURL(B):B.remove()};setTimeout(N,R)},T=function(B,N,Ae){N=[].concat(N);for(var je=N.length;je--;){var Ot=B["on"+N[je]];if(typeof Ot=="function")try{Ot.call(B,Ae||B)}catch(Oe){b(Oe)}}},C=function(B){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(B.type)?new Blob(["\uFEFF",B],{type:B.type}):B},te=function(B,N,Ae){Ae||(B=C(B));var je=this,Ot=B.type,Oe=Ot===U,Te,ht=function(){T(je,"writestart progress write writeend".split(" "))},Tt=function(){if((d||Oe&&p)&&n.FileReader){var $t=new FileReader;$t.onloadend=function(){var le=d?$t.result:$t.result.replace(/^data:[^;]*;/,"data:attachment/file;"),mr=n.open(le,"_blank");mr||(n.location.href=le),le=void 0,je.readyState=je.DONE,ht()},$t.readAsDataURL(B),je.readyState=je.INIT;return}if(Te||(Te=a().createObjectURL(B)),Oe)n.location.href=Te;else{var yr=n.open(Te,"_blank");yr||(n.location.href=Te)}je.readyState=je.DONE,ht(),L(Te)};if(je.readyState=je.INIT,f){Te=a().createObjectURL(B),setTimeout(function(){l.href=Te,l.download=N,u(l),ht(),L(Te),je.readyState=je.DONE});return}Tt()},W=te.prototype,Y=function(B,N,Ae){return new te(B,N||B.name||"download",Ae)};return typeof navigator<"u"&&navigator.msSaveOrOpenBlob?function(B,N,Ae){return N=N||B.name||"download",Ae||(B=C(B)),navigator.msSaveOrOpenBlob(B,N)}:(W.abort=function(){},W.readyState=W.INIT=0,W.WRITING=1,W.DONE=2,W.error=W.onwritestart=W.onprogress=W.onwrite=W.onabort=W.onerror=W.onwriteend=null,Y)}})(typeof self<"u"&&self||typeof window<"u"&&window||this.content);typeof C3<"u"&&C3.exports?C3.exports.saveAs=qi:typeof define<"u"&&define!==null&&define.amd!==null&&define("FileSaver.js",function(){return qi}),(s.isCordova||s.isMeteorServer||s.isNode)&&console.log("It looks like you are using the browser version of AlaSQL. Please use the alasql.fs.js file instead."),t.utils.saveAs=qi}return new xi("alasql"),t.use("alasql"),t})});function F8(t,e){function r(i,s){let o,h;dE(i)?(h=i.handler,o=i.event):(o=i,h=s);let g=B8(o,e?.caseInsensitive),v=t[g];if(!v)return;let x=v.findIndex(_=>_.handler===h);x===-1||x>=v.length||v.splice(x,1)}return r}function pE(t){return Object.keys(t)}var pv,fE,B8,mv,dE,hE,gv,yv,bv,mE,Gp,gE,vv,xv=Mt(()=>{pv=new window.BroadcastChannel("pub-sub-es"),fE=t=>typeof t=="string",B8=(t,e)=>fE(t)&&e?t.toLowerCase():t,mv=(t,e)=>(r,i,s=Number.POSITIVE_INFINITY)=>{let o=B8(r,e?.caseInsensitive),h=t[o]||[];return h.push({handler:i,times:+s||Number.POSITIVE_INFINITY}),t[o]=h,{event:o,handler:i}},dE=t=>typeof t=="object";hE=t=>!!t,gv=(t,e)=>{let r=F8(t);return(...i)=>{let[s,o,h]=i,g=B8(s,e?.caseInsensitive),v=t[g];if(!hE(v))return;let x=[...v];for(let O of x)--O.times<1&&r(g,O.handler);let _=h?.async!==void 0?h.async:e?.async,w=()=>{for(let O of x)O.handler(o)};if(_?setTimeout(w,0):w(),e?.isGlobal&&!h?.isNoGlobalBroadcast)try{pv.postMessage({event:g,news:o})}catch(O){if(O instanceof Error&&O.name==="DataCloneError")console.warn(`Could not broadcast '${g.toString()}' globally. Payload is not clonable.`);else throw O}}};yv=t=>()=>{for(let e of pE(t))delete t[e]},bv=()=>({}),mE=t=>{let e=!!t?.async,r=!!t?.caseInsensitive,i=t?.stack||bv();return{publish:gv(i,{async:e,caseInsensitive:r}),subscribe:mv(i,{caseInsensitive:r}),unsubscribe:F8(i,{caseInsensitive:r}),clear:yv(i),stack:i}},Gp=bv(),gE={publish:gv(Gp,{isGlobal:!0}),subscribe:mv(Gp),unsubscribe:F8(Gp),clear:yv(Gp),stack:Gp};pv.onmessage=({data:{event:t,news:e}})=>gE.publish(t,e,{isNoGlobalBroadcast:!0});vv=mE});var Dm=Eg(($8,P8)=>{(function(t,e){typeof $8=="object"&&typeof P8<"u"?P8.exports=e():typeof define=="function"&&define.amd?define(e):t.createREGL=e()})($8,(function(){"use strict";var t=function(E){return E instanceof Uint8Array||E instanceof Uint16Array||E instanceof Uint32Array||E instanceof Int8Array||E instanceof Int16Array||E instanceof Int32Array||E instanceof Float32Array||E instanceof Float64Array||E instanceof Uint8ClampedArray},e=function(E,M){for(var Q=Object.keys(M),Ge=0;Ge"u";case"symbol":return typeof E=="symbol"}}function _(E,M,Q){x(E,M)||s("invalid parameter type"+h(Q)+". expected "+M+", got "+typeof E)}function w(E,M){E>=0&&(E|0)===E||s("invalid parameter type, ("+E+")"+h(M)+". must be a nonnegative integer")}function O(E,M,Q){M.indexOf(E)<0&&s("invalid value"+h(Q)+". must be one of: "+M)}var I=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function H(E){Object.keys(E).forEach(function(M){I.indexOf(M)<0&&s('invalid regl constructor argument "'+M+'". must be one of '+I)})}function J(E,M){for(E=E+"";E.length0&&M.push(new se("unknown",0,Q))}}),M}function k(E,M){M.forEach(function(Q){var Ge=E[Q.file];if(Ge){var Ct=Ge.index[Q.line];if(Ct){Ct.errors.push(Q),Ge.hasErrors=!0;return}}E.unknown.hasErrors=!0,E.unknown.lines[0].errors.push(Q)})}function de(E,M,Q,Ge,Ct){if(!E.getShaderParameter(M,E.COMPILE_STATUS)){var ke=E.getShaderInfoLog(M),ft=Ge===E.FRAGMENT_SHADER?"fragment":"vertex";Tn(Q,"string",ft+" shader source must be a string",Ct);var Pt=ue(Q,Ct),Ut=K(ke);k(Pt,Ut),Object.keys(Pt).forEach(function(Qt){var rr=Pt[Qt];if(!rr.hasErrors)return;var Zt=[""],vr=[""];function Gt(Yt,xe){Zt.push(Yt),vr.push(xe||"")}Gt("file number "+Qt+": "+rr.name+` -`,"color:red;text-decoration:underline;font-weight:bold"),rr.lines.forEach(function(Yt){if(Yt.errors.length>0){Gt(J(Yt.number,4)+"| ","background-color:yellow; font-weight:bold"),Gt(Yt.line+r,"color:red; background-color:yellow; font-weight:bold");var xe=0;Yt.errors.forEach(function(Ve){var zt=Ve.message,or=/^\s*'(.*)'\s*:\s*(.*)$/.exec(zt);if(or){var Ft=or[1];zt=or[2],Ft==="assign"&&(Ft="="),xe=Math.max(Yt.line.indexOf(Ft,xe),0)}else xe=0;Gt(J("| ",6)),Gt(J("^^^",xe+3)+r,"font-weight:bold"),Gt(J("| ",6)),Gt(zt+r,"font-weight:bold")}),Gt(J("| ",6)+r)}else Gt(J(Yt.number,4)+"| "),Gt(Yt.line+r,"color:red")}),typeof document<"u"&&!window.chrome?(vr[0]=Zt.join("%c"),console.log.apply(console,vr)):console.log(Zt.join(""))}),o.raise("Error compiling "+ft+" shader, "+Pt[0].name)}}function ze(E,M,Q,Ge,Ct){if(!E.getProgramParameter(M,E.LINK_STATUS)){var ke=E.getProgramInfoLog(M),ft=ue(Q,Ct),Pt=ue(Ge,Ct),Ut='Error linking program with vertex shader, "'+Pt[0].name+'", and fragment shader "'+ft[0].name+'"';typeof document<"u"?console.log("%c"+Ut+r+"%c"+ke,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(Ut+r+ke),o.raise(Ut)}}function er(E){E._commandRef=re()}function Er(E,M,Q,Ge){er(E);function Ct(Ut){return Ut?Ge.id(Ut):0}E._fragId=Ct(E.static.frag),E._vertId=Ct(E.static.vert);function ke(Ut,Qt){Object.keys(Qt).forEach(function(rr){Ut[Ge.id(rr)]=!0})}var ft=E._uniformSet={};ke(ft,M.static),ke(ft,M.dynamic);var Pt=E._attributeSet={};ke(Pt,Q.static),ke(Pt,Q.dynamic),E._hasCount="count"in E.static||"count"in E.dynamic||"elements"in E.static||"elements"in E.dynamic}function Ht(E,M){var Q=q();s(E+" in command "+(M||re())+(Q==="unknown"?"":" called from "+Q))}function xn(E,M,Q){E||Ht(M,Q||re())}function $r(E,M,Q,Ge){E in M||Ht("unknown parameter ("+E+")"+h(Q)+". possible values: "+Object.keys(M).join(),Ge||re())}function Tn(E,M,Q,Ge){x(E,M)||Ht("invalid parameter type"+h(Q)+". expected "+M+", got "+typeof E,Ge||re())}function In(E){E()}function cr(E,M,Q){E.texture?O(E.texture._texture.internalformat,M,"unsupported texture format for attachment"):O(E.renderbuffer._renderbuffer.format,Q,"unsupported renderbuffer format for attachment")}var bn=33071,mn=9728,qn=9984,Wt=9985,Pr=9986,hi=9987,Ai=5120,pi=5121,ss=5122,Va=5123,ar=5124,Wi=5125,Gs=5126,Qs=32819,no=32820,wn=33635,Ei=34042,Ii=36193,si={};si[Ai]=si[pi]=1,si[ss]=si[Va]=si[Ii]=si[wn]=si[Qs]=si[no]=2,si[ar]=si[Wi]=si[Gs]=si[Ei]=4;function xi(E,M){return E===no||E===Qs||E===wn?2:E===Ei?4:si[E]*M}function Ui(E){return!(E&E-1)&&!!E}function No(E,M,Q){var Ge,Ct=M.width,ke=M.height,ft=M.channels;o(Ct>0&&Ct<=Q.maxTextureSize&&ke>0&&ke<=Q.maxTextureSize,"invalid texture shape"),(E.wrapS!==bn||E.wrapT!==bn)&&o(Ui(Ct)&&Ui(ke),"incompatible wrap mode for texture, both width and height must be power of 2"),M.mipmask===1?Ct!==1&&ke!==1&&o(E.minFilter!==qn&&E.minFilter!==Pr&&E.minFilter!==Wt&&E.minFilter!==hi,"min filter requires mipmap"):(o(Ui(Ct)&&Ui(ke),"texture must be a square power of 2 to support mipmapping"),o(M.mipmask===(Ct<<1)-1,"missing or incomplete mipmap data")),M.type===Gs&&(Q.extensions.indexOf("oes_texture_float_linear")<0&&o(E.minFilter===mn&&E.magFilter===mn,"filter not supported, must enable oes_texture_float_linear"),o(!E.genMipmaps,"mipmap generation not supported with float textures"));var Pt=M.images;for(Ge=0;Ge<16;++Ge)if(Pt[Ge]){var Ut=Ct>>Ge,Qt=ke>>Ge;o(M.mipmask&1<0&&Ct<=Ge.maxTextureSize&&ke>0&&ke<=Ge.maxTextureSize,"invalid texture shape"),o(Ct===ke,"cube map must be square"),o(M.wrapS===bn&&M.wrapT===bn,"wrap mode not supported by cube map");for(var Pt=0;Pt>rr,Gt=ke>>rr;o(Ut.mipmask&1<1&&M===Q&&(M==='"'||M==="'"))return['"'+Do(E.substr(1,E.length-2))+'"'];var Ge=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(E);if(Ge)return ds(E.substr(0,Ge.index)).concat(ds(Ge[1])).concat(ds(E.substr(Ge.index+Ge[0].length)));var Ct=E.split(".");if(Ct.length===1)return['"'+Do(E)+'"'];for(var ke=[],ft=0;ft"u"?1:window.devicePixelRatio,rr=!1,Zt=function(Yt){Yt&&$.raise(Yt)},vr=function(){};if(typeof M=="string"?($(typeof document<"u","selector queries only supported in DOM environments"),Q=document.querySelector(M),$(Q,"invalid query string for element")):typeof M=="object"?ko(M)?Q=M:Nc(M)?(ke=M,Ct=ke.canvas):($.constructor(M),"gl"in M?ke=M.gl:"canvas"in M?Ct=un(M.canvas):"container"in M&&(Ge=un(M.container)),"attributes"in M&&(ft=M.attributes,$.type(ft,"object","invalid context attributes")),"extensions"in M&&(Pt=Fn(M.extensions)),"optionalExtensions"in M&&(Ut=Fn(M.optionalExtensions)),"onDone"in M&&($.type(M.onDone,"function","invalid or missing onDone callback"),Zt=M.onDone),"profile"in M&&(rr=!!M.profile),"pixelRatio"in M&&(Qt=+M.pixelRatio,$(Qt>0,"invalid pixel ratio"))):$.raise("invalid arguments to regl"),Q&&(Q.nodeName.toLowerCase()==="canvas"?Ct=Q:Ge=Q),!ke){if(!Ct){$(typeof document<"u","must manually specify webgl context outside of DOM environments");var Gt=N1(Ge||document.body,Zt,Qt);if(!Gt)return null;Ct=Gt.canvas,vr=Gt.onDestroy}ft.premultipliedAlpha===void 0&&(ft.premultipliedAlpha=!0),ke=Ro(Ct,ft)}return ke?{gl:ke,canvas:Ct,container:Ge,extensions:Pt,optionalExtensions:Ut,pixelRatio:Qt,profile:rr,onDone:Zt,onDestroy:vr}:(vr(),Zt("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function mi(E,M){var Q={};function Ge(ft){$.type(ft,"string","extension name must be string");var Pt=ft.toLowerCase(),Ut;try{Ut=Q[Pt]=E.getExtension(Pt)}catch{}return!!Ut}for(var Ct=0;Ct65535)<<4,E>>>=M,Q=(E>255)<<3,E>>>=Q,M|=Q,Q=(E>15)<<2,E>>>=Q,M|=Q,Q=(E>3)<<1,E>>>=Q,M|=Q,M|E>>1}function u1(){var E=ti(8,function(){return[]});function M(ke){var ft=rs(ke),Pt=E[os(ft)>>2];return Pt.length>0?Pt.pop():new ArrayBuffer(ft)}function Q(ke){E[os(ke.byteLength)>>2].push(ke)}function Ge(ke,ft){var Pt=null;switch(ke){case Fi:Pt=new Int8Array(M(ft),0,ft);break;case Oi:Pt=new Uint8Array(M(ft),0,ft);break;case ai:Pt=new Int16Array(M(2*ft),0,ft);break;case Xi:Pt=new Uint16Array(M(2*ft),0,ft);break;case Cn:Pt=new Int32Array(M(4*ft),0,ft);break;case zn:Pt=new Uint32Array(M(4*ft),0,ft);break;case Ci:Pt=new Float32Array(M(4*ft),0,ft);break;default:return null}return Pt.length!==ft?Pt.subarray(0,ft):Pt}function Ct(ke){Q(ke.buffer)}return{alloc:M,free:Q,allocType:Ge,freeType:Ct}}var ji=u1();ji.zero=u1();var El=3408,wf=3410,aa=3411,t2=3412,r2=3413,Jl=3414,wl=3415,Xo=33901,Mo=33902,n2=3379,Kl=3386,pu=34921,ja=36347,D1=36348,Xn=35661,Q1=35660,Cs=34930,qi=36349,n=34076,c=34024,a=7936,l=7937,f=7938,u=35724,p=34047,d=36063,b=34852,U=3553,R=34067,L=34069,T=33984,C=6408,te=5126,W=5121,Y=36160,B=36053,N=36064,Ae=16384,je=function(E,M){var Q=1;M.ext_texture_filter_anisotropic&&(Q=E.getParameter(p));var Ge=1,Ct=1;M.webgl_draw_buffers&&(Ge=E.getParameter(b),Ct=E.getParameter(d));var ke=!!M.oes_texture_float;if(ke){var ft=E.createTexture();E.bindTexture(U,ft),E.texImage2D(U,0,C,1,1,0,C,te,null);var Pt=E.createFramebuffer();if(E.bindFramebuffer(Y,Pt),E.framebufferTexture2D(Y,N,U,ft,0),E.bindTexture(U,null),E.checkFramebufferStatus(Y)!==B)ke=!1;else{E.viewport(0,0,1,1),E.clearColor(1,0,0,1),E.clear(Ae);var Ut=ji.allocType(te,4);E.readPixels(0,0,1,1,C,te,Ut),E.getError()?ke=!1:(E.deleteFramebuffer(Pt),E.deleteTexture(ft),ke=Ut[0]===1),ji.freeType(Ut)}}var Qt=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),rr=!0;if(!Qt){var Zt=E.createTexture(),vr=ji.allocType(W,36);E.activeTexture(T),E.bindTexture(R,Zt),E.texImage2D(L,0,C,3,3,0,C,W,vr),ji.freeType(vr),E.bindTexture(R,null),E.deleteTexture(Zt),rr=!E.getError()}return{colorBits:[E.getParameter(wf),E.getParameter(aa),E.getParameter(t2),E.getParameter(r2)],depthBits:E.getParameter(Jl),stencilBits:E.getParameter(wl),subpixelBits:E.getParameter(El),extensions:Object.keys(M).filter(function(Gt){return!!M[Gt]}),maxAnisotropic:Q,maxDrawbuffers:Ge,maxColorAttachments:Ct,pointSizeDims:E.getParameter(Xo),lineWidthDims:E.getParameter(Mo),maxViewportDims:E.getParameter(Kl),maxCombinedTextureUnits:E.getParameter(Xn),maxCubeMapSize:E.getParameter(n),maxRenderbufferSize:E.getParameter(c),maxTextureUnits:E.getParameter(Cs),maxTextureSize:E.getParameter(n2),maxAttributes:E.getParameter(pu),maxVertexUniforms:E.getParameter(ja),maxVertexTextureUnits:E.getParameter(Q1),maxVaryingVectors:E.getParameter(D1),maxFragmentUniforms:E.getParameter(qi),glsl:E.getParameter(u),renderer:E.getParameter(l),vendor:E.getParameter(a),version:E.getParameter(f),readFloat:ke,npotTextureCube:rr}};function Ot(E){return!!E&&typeof E=="object"&&Array.isArray(E.shape)&&Array.isArray(E.stride)&&typeof E.offset=="number"&&E.shape.length===E.stride.length&&(Array.isArray(E.data)||t(E.data))}var Oe=function(E){return Object.keys(E).map(function(M){return E[M]})},Te={shape:mr,flatten:le};function ht(E,M,Q){for(var Ge=0;Ge0){var Sn;if(Array.isArray(Ve[0])){Rr=ps(Ve);for(var Nt=1,Lt=1;Lt0)if(typeof Nt[0]=="number"){var jt=ji.allocType(Ft.dtype,Nt.length);Dc(jt,Nt),Rr(jt,Hr),ji.freeType(jt)}else if(Array.isArray(Nt[0])||t(Nt[0])){gr=ps(Nt);var _r=hs(Nt,gr,Ft.dtype);Rr(_r,Hr),ji.freeType(_r)}else $.raise("invalid buffer data")}else if(Ot(Nt)){gr=Nt.shape;var Sr=Nt.stride,Hn=0,Rn=0,Cr=0,Nr=0;gr.length===1?(Hn=gr[0],Rn=1,Cr=Sr[0],Nr=0):gr.length===2?(Hn=gr[0],Rn=gr[1],Cr=Sr[0],Nr=Sr[1]):$.raise("invalid shape");var Nn=Array.isArray(Nt.data)?Ft.dtype:Fo(Nt.data),kn=ji.allocType(Nn,Hn*Rn);Ql(kn,Nt.data,Hn,Rn,Cr,Nr,Nt.offset),Rr(kn,Hr),ji.freeType(kn)}else $.raise("invalid data for buffer subdata");return Fr}return zt||Fr(xe),Fr._reglType="buffer",Fr._buffer=Ft,Fr.subdata=Sn,Q.profile&&(Fr.stats=Ft.stats),Fr.destroy=function(){vr(Ft)},Fr}function Yt(){Oe(ke).forEach(function(xe){xe.buffer=E.createBuffer(),E.bindBuffer(xe.type,xe.buffer),E.bufferData(xe.type,xe.persistentData||xe.byteLength,xe.usage)})}return Q.profile&&(M.getTotalBufferSize=function(){var xe=0;return Object.keys(ke).forEach(function(Ve){xe+=ke[Ve].stats.size}),xe}),{create:Gt,createStream:Ut,destroyStream:Qt,clear:function(){Oe(ke).forEach(vr),Pt.forEach(vr)},getBuffer:function(xe){return xe&&xe._buffer instanceof ft?xe._buffer:null},restore:Yt,_initBuffer:Zt}}var Ce=0,Rc=0,R1=1,Zl=1,Ko=4,Be=4,zi={points:Ce,point:Rc,lines:R1,line:Zl,triangles:Ko,triangle:Be,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Fe=0,$e=1,Le=4,ye=5120,Ne=5121,ec=5122,tc=5123,i2=5124,k1=5125,It=34963,De=35040,Pe=35044;function vt(E,M,Q,Ge){var Ct={},ke=0,ft={uint8:Ne,uint16:tc};M.oes_element_index_uint&&(ft.uint32=k1);function Pt(Yt){this.id=ke++,Ct[this.id]=this,this.buffer=Yt,this.primType=Le,this.vertCount=0,this.type=0}Pt.prototype.bind=function(){this.buffer.bind()};var Ut=[];function Qt(Yt){var xe=Ut.pop();return xe||(xe=new Pt(Q.create(null,It,!0,!1)._buffer)),Zt(xe,Yt,De,-1,-1,0,0),xe}function rr(Yt){Ut.push(Yt)}function Zt(Yt,xe,Ve,zt,or,Ft,Fr){Yt.buffer.bind();var Rr;if(xe){var Sn=Fr;!Fr&&(!t(xe)||Ot(xe)&&!t(xe.data))&&(Sn=M.oes_element_index_uint?k1:tc),Q._initBuffer(Yt.buffer,xe,Ve,Sn,3)}else E.bufferData(It,Ft,Ve),Yt.buffer.dtype=Rr||Ne,Yt.buffer.usage=Ve,Yt.buffer.dimension=3,Yt.buffer.byteLength=Ft;if(Rr=Fr,!Fr){switch(Yt.buffer.dtype){case Ne:case ye:Rr=Ne;break;case tc:case ec:Rr=tc;break;case k1:case i2:Rr=k1;break;default:$.raise("unsupported type for element array")}Yt.buffer.dtype=Rr}Yt.type=Rr,$(Rr!==k1||!!M.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var Nt=or;Nt<0&&(Nt=Yt.buffer.byteLength,Rr===tc?Nt>>=1:Rr===k1&&(Nt>>=2)),Yt.vertCount=Nt;var Lt=zt;if(zt<0){Lt=Le;var Hr=Yt.buffer.dimension;Hr===1&&(Lt=Fe),Hr===2&&(Lt=$e),Hr===3&&(Lt=Le)}Yt.primType=Lt}function vr(Yt){Ge.elementsCount--,$(Yt.buffer!==null,"must not double destroy elements"),delete Ct[Yt.id],Yt.buffer.destroy(),Yt.buffer=null}function Gt(Yt,xe){var Ve=Q.create(null,It,!0),zt=new Pt(Ve._buffer);Ge.elementsCount++;function or(Ft){if(!Ft)Ve(),zt.primType=Le,zt.vertCount=0,zt.type=Ne;else if(typeof Ft=="number")Ve(Ft),zt.primType=Le,zt.vertCount=Ft|0,zt.type=Ne;else{var Fr=null,Rr=Pe,Sn=-1,Nt=-1,Lt=0,Hr=0;Array.isArray(Ft)||t(Ft)||Ot(Ft)?Fr=Ft:($.type(Ft,"object","invalid arguments for elements"),"data"in Ft&&(Fr=Ft.data,$(Array.isArray(Fr)||t(Fr)||Ot(Fr),"invalid data for element buffer")),"usage"in Ft&&($.parameter(Ft.usage,ri,"invalid element buffer usage"),Rr=ri[Ft.usage]),"primitive"in Ft&&($.parameter(Ft.primitive,zi,"invalid element buffer primitive"),Sn=zi[Ft.primitive]),"count"in Ft&&($(typeof Ft.count=="number"&&Ft.count>=0,"invalid vertex count for elements"),Nt=Ft.count|0),"type"in Ft&&($.parameter(Ft.type,ft,"invalid buffer type"),Hr=ft[Ft.type]),"length"in Ft?Lt=Ft.length|0:(Lt=Nt,Hr===tc||Hr===ec?Lt*=2:(Hr===k1||Hr===i2)&&(Lt*=4))),Zt(zt,Fr,Rr,Sn,Nt,Lt,Hr)}return or}return or(Yt),or._reglType="elements",or._elements=zt,or.subdata=function(Ft,Fr){return Ve.subdata(Ft,Fr),or},or.destroy=function(){vr(zt)},or}return{create:Gt,createStream:Qt,destroyStream:rr,getElements:function(Yt){return typeof Yt=="function"&&Yt._elements instanceof Pt?Yt._elements:null},clear:function(){Oe(Ct).forEach(vr)}}}var ve=new Float32Array(1),it=new Uint32Array(ve.buffer),pt=5123;function Ee(E){for(var M=ji.allocType(pt,E.length),Q=0;Q>>31<<15,ke=(Ge<<1>>>24)-127,ft=Ge>>13&1023;if(ke<-24)M[Q]=Ct;else if(ke<-14){var Pt=-14-ke;M[Q]=Ct+(ft+1024>>Pt)}else ke>15?M[Q]=Ct+31744:M[Q]=Ct+(ke+15<<10)+ft}return M}function Ue(E){return Array.isArray(E)||t(E)}var xt=function(E){return!(E&E-1)&&!!E},mt=34467,pe=3553,gt=34067,We=34069,qe=6408,at=6406,ct=6407,ot=6409,ut=6410,dt=32854,yt=32855,_t=36194,Xe=32819,Je=32820,rt=33635,Ke=34042,He=6402,Ye=34041,Qe=35904,Ze=35906,et=36193,nt=33776,Re=33777,st=33778,bt=33779,St=35986,we=35987,Et=34798,wt=35840,At=35841,me=35842,he=35843,Z1=36196,M1=5121,rc=5123,kc=5125,$o=5126,Al=10242,mu=10243,N3=10497,Mc=33071,hn=33648,ms=10240,gu=10241,Bc=9728,B1=9729,yu=9984,va=9985,f1=9986,d1=9987,s2=33170,nc=4352,D3=4353,X=4354,R3=34046,a2=3317,Af=37440,Tf=37441,Tl=37443,Il=37444,Fc=33984,If=[yu,f1,va,d1],Po=[0,ot,ut,ct,qe],so={};so[ot]=so[at]=so[He]=1,so[Ye]=so[ut]=2,so[ct]=so[Qe]=3,so[qe]=so[Ze]=4;function el(E){return"[object "+E+"]"}var To=el("HTMLCanvasElement"),F1=el("OffscreenCanvas"),h1=el("CanvasRenderingContext2D"),Of=el("ImageBitmap"),ao=el("HTMLImageElement"),bu=el("HTMLVideoElement"),o2=Object.keys(Vt).concat([To,F1,h1,Of,ao,bu]),tl=[];tl[M1]=1,tl[$o]=4,tl[et]=2,tl[rc]=2,tl[kc]=4;var Dr=[];Dr[dt]=2,Dr[yt]=2,Dr[_t]=2,Dr[Ye]=4,Dr[nt]=.5,Dr[Re]=.5,Dr[st]=1,Dr[bt]=1,Dr[St]=.5,Dr[we]=1,Dr[Et]=1,Dr[wt]=.5,Dr[At]=.25,Dr[me]=.5,Dr[he]=.25,Dr[Z1]=.5;function Ur(E){return Array.isArray(E)&&(E.length===0||typeof E[0]=="number")}function Bt(E){if(!Array.isArray(E))return!1;var M=E.length;return!(M===0||!Ue(E[0]))}function Dt(E){return Object.prototype.toString.call(E)}function tr(E){return Dt(E)===To}function l2(E){return Dt(E)===F1}function ur(E){return Dt(E)===h1}function nr(E){return Dt(E)===Of}function fr(E){return Dt(E)===ao}function fn(E){return Dt(E)===bu}function sn(E){if(!E)return!1;var M=Dt(E);return o2.indexOf(M)>=0?!0:Ur(E)||Bt(E)||Ot(E)}function wr(E){return Vt[Object.prototype.toString.call(E)]|0}function Lr(E,M){var Q=M.length;switch(E.type){case M1:case rc:case kc:case $o:var Ge=ji.allocType(E.type,Q);Ge.set(M),E.data=Ge;break;case et:E.data=Ee(M);break;default:$.raise("unsupported texture type, must specify a typed array")}}function pn(E,M){return ji.allocType(E.type===et?$o:E.type,M)}function vn(E,M){E.type===et?(E.data=Ee(M),ji.freeType(M)):E.data=M}function _n(E,M,Q,Ge,Ct,ke){for(var ft=E.width,Pt=E.height,Ut=E.channels,Qt=ft*Pt*Ut,rr=pn(E,Qt),Zt=0,vr=0;vr=1;)Pt+=ft*Ut*Ut,Ut/=2;return Pt}else return ft*Q*Ge}function ir(E,M,Q,Ge,Ct,ke,ft){var Pt={"don't care":nc,"dont care":nc,nice:X,fast:D3},Ut={repeat:N3,clamp:Mc,mirror:hn},Qt={nearest:Bc,linear:B1},rr=e({mipmap:d1,"nearest mipmap nearest":yu,"linear mipmap nearest":va,"nearest mipmap linear":f1,"linear mipmap linear":d1},Qt),Zt={none:0,browser:Il},vr={uint8:M1,rgba4:Xe,rgb565:rt,"rgb5 a1":Je},Gt={alpha:at,luminance:ot,"luminance alpha":ut,rgb:ct,rgba:qe,rgba4:dt,"rgb5 a1":yt,rgb565:_t},Yt={};M.ext_srgb&&(Gt.srgb=Qe,Gt.srgba=Ze),M.oes_texture_float&&(vr.float32=vr.float=$o),M.oes_texture_half_float&&(vr.float16=vr["half float"]=et),M.webgl_depth_texture&&(e(Gt,{depth:He,"depth stencil":Ye}),e(vr,{uint16:rc,uint32:kc,"depth stencil":Ke})),M.webgl_compressed_texture_s3tc&&e(Yt,{"rgb s3tc dxt1":nt,"rgba s3tc dxt1":Re,"rgba s3tc dxt3":st,"rgba s3tc dxt5":bt}),M.webgl_compressed_texture_atc&&e(Yt,{"rgb atc":St,"rgba atc explicit alpha":we,"rgba atc interpolated alpha":Et}),M.webgl_compressed_texture_pvrtc&&e(Yt,{"rgb pvrtc 4bppv1":wt,"rgb pvrtc 2bppv1":At,"rgba pvrtc 4bppv1":me,"rgba pvrtc 2bppv1":he}),M.webgl_compressed_texture_etc1&&(Yt["rgb etc1"]=Z1);var xe=Array.prototype.slice.call(E.getParameter(mt));Object.keys(Yt).forEach(function(z){var tt=Yt[z];xe.indexOf(tt)>=0&&(Gt[z]=tt)});var Ve=Object.keys(Gt);Q.textureFormats=Ve;var zt=[];Object.keys(Gt).forEach(function(z){var tt=Gt[z];zt[tt]=z});var or=[];Object.keys(vr).forEach(function(z){var tt=vr[z];or[tt]=z});var Ft=[];Object.keys(Qt).forEach(function(z){var tt=Qt[z];Ft[tt]=z});var Fr=[];Object.keys(rr).forEach(function(z){var tt=rr[z];Fr[tt]=z});var Rr=[];Object.keys(Ut).forEach(function(z){var tt=Ut[z];Rr[tt]=z});var Sn=Ve.reduce(function(z,tt){var Me=Gt[tt];return Me===ot||Me===at||Me===ot||Me===ut||Me===He||Me===Ye||M.ext_srgb&&(Me===Qe||Me===Ze)?z[Me]=Me:Me===yt||tt.indexOf("rgba")>=0?z[Me]=qe:z[Me]=ct,z},{});function Nt(){this.internalformat=qe,this.format=qe,this.type=M1,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=Il,this.width=0,this.height=0,this.channels=0}function Lt(z,tt){z.internalformat=tt.internalformat,z.format=tt.format,z.type=tt.type,z.compressed=tt.compressed,z.premultiplyAlpha=tt.premultiplyAlpha,z.flipY=tt.flipY,z.unpackAlignment=tt.unpackAlignment,z.colorSpace=tt.colorSpace,z.width=tt.width,z.height=tt.height,z.channels=tt.channels}function Hr(z,tt){if(!(typeof tt!="object"||!tt)){if("premultiplyAlpha"in tt&&($.type(tt.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),z.premultiplyAlpha=tt.premultiplyAlpha),"flipY"in tt&&($.type(tt.flipY,"boolean","invalid texture flip"),z.flipY=tt.flipY),"alignment"in tt&&($.oneOf(tt.alignment,[1,2,4,8],"invalid texture unpack alignment"),z.unpackAlignment=tt.alignment),"colorSpace"in tt&&($.parameter(tt.colorSpace,Zt,"invalid colorSpace"),z.colorSpace=Zt[tt.colorSpace]),"type"in tt){var Me=tt.type;$(M.oes_texture_float||!(Me==="float"||Me==="float32"),"you must enable the OES_texture_float extension in order to use floating point textures."),$(M.oes_texture_half_float||!(Me==="half float"||Me==="float16"),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),$(M.webgl_depth_texture||!(Me==="uint16"||Me==="uint32"||Me==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),$.parameter(Me,vr,"invalid texture type"),z.type=vr[Me]}var Wr=z.width,yi=z.height,G=z.channels,D=!1;"shape"in tt?($(Array.isArray(tt.shape)&&tt.shape.length>=2,"shape must be an array"),Wr=tt.shape[0],yi=tt.shape[1],tt.shape.length===3&&(G=tt.shape[2],$(G>0&&G<=4,"invalid number of channels"),D=!0),$(Wr>=0&&Wr<=Q.maxTextureSize,"invalid width"),$(yi>=0&&yi<=Q.maxTextureSize,"invalid height")):("radius"in tt&&(Wr=yi=tt.radius,$(Wr>=0&&Wr<=Q.maxTextureSize,"invalid radius")),"width"in tt&&(Wr=tt.width,$(Wr>=0&&Wr<=Q.maxTextureSize,"invalid width")),"height"in tt&&(yi=tt.height,$(yi>=0&&yi<=Q.maxTextureSize,"invalid height")),"channels"in tt&&(G=tt.channels,$(G>0&&G<=4,"invalid number of channels"),D=!0)),z.width=Wr|0,z.height=yi|0,z.channels=G|0;var ie=!1;if("format"in tt){var ge=tt.format;$(M.webgl_depth_texture||!(ge==="depth"||ge==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),$.parameter(ge,Gt,"invalid texture format");var Se=z.internalformat=Gt[ge];z.format=Sn[Se],ge in vr&&("type"in tt||(z.type=vr[ge])),ge in Yt&&(z.compressed=!0),ie=!0}!D&&ie?z.channels=so[z.format]:D&&!ie?z.channels!==Po[z.format]&&(z.format=z.internalformat=Po[z.channels]):ie&&D&&$(z.channels===so[z.format],"number of channels inconsistent with specified format")}}function gr(z){E.pixelStorei(Af,z.flipY),E.pixelStorei(Tf,z.premultiplyAlpha),E.pixelStorei(Tl,z.colorSpace),E.pixelStorei(a2,z.unpackAlignment)}function jt(){Nt.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function _r(z,tt){var Me=null;if(sn(tt)?Me=tt:tt&&($.type(tt,"object","invalid pixel data type"),Hr(z,tt),"x"in tt&&(z.xOffset=tt.x|0),"y"in tt&&(z.yOffset=tt.y|0),sn(tt.data)&&(Me=tt.data)),$(!z.compressed||Me instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),tt.copy){$(!Me,"can not specify copy and data field for the same texture");var Wr=Ct.viewportWidth,yi=Ct.viewportHeight;z.width=z.width||Wr-z.xOffset,z.height=z.height||yi-z.yOffset,z.needsCopy=!0,$(z.xOffset>=0&&z.xOffset=0&&z.yOffset0&&z.width<=Wr&&z.height>0&&z.height<=yi,"copy texture read out of bounds")}else if(!Me)z.width=z.width||1,z.height=z.height||1,z.channels=z.channels||4;else if(t(Me))z.channels=z.channels||4,z.data=Me,!("type"in tt)&&z.type===M1&&(z.type=wr(Me));else if(Ur(Me))z.channels=z.channels||4,Lr(z,Me),z.alignment=1,z.needsFree=!0;else if(Ot(Me)){var G=Me.data;!Array.isArray(G)&&z.type===M1&&(z.type=wr(G));var D=Me.shape,ie=Me.stride,ge,Se,ce,ae,fe,F;D.length===3?(ce=D[2],F=ie[2]):($(D.length===2,"invalid ndarray pixel data, must be 2 or 3D"),ce=1,F=1),ge=D[0],Se=D[1],ae=ie[0],fe=ie[1],z.alignment=1,z.width=ge,z.height=Se,z.channels=ce,z.format=z.internalformat=Po[ce],z.needsFree=!0,_n(z,G,ae,fe,F,Me.offset)}else if(tr(Me)||l2(Me)||ur(Me))tr(Me)||l2(Me)?z.element=Me:z.element=Me.canvas,z.width=z.element.width,z.height=z.element.height,z.channels=4;else if(nr(Me))z.element=Me,z.width=Me.width,z.height=Me.height,z.channels=4;else if(fr(Me))z.element=Me,z.width=Me.naturalWidth,z.height=Me.naturalHeight,z.channels=4;else if(fn(Me))z.element=Me,z.width=Me.videoWidth,z.height=Me.videoHeight,z.channels=4;else if(Bt(Me)){var ne=z.width||Me[0].length,j=z.height||Me.length,_e=z.channels;Ue(Me[0][0])?_e=_e||Me[0][0].length:_e=_e||1;for(var Ie=Te.shape(Me),kt=1,hr=0;hr=0,"oes_texture_float extension not enabled"):z.type===et&&$(Q.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function Sr(z,tt,Me){var Wr=z.element,yi=z.data,G=z.internalformat,D=z.format,ie=z.type,ge=z.width,Se=z.height;gr(z),Wr?E.texImage2D(tt,Me,D,D,ie,Wr):z.compressed?E.compressedTexImage2D(tt,Me,G,ge,Se,0,yi):z.needsCopy?(Ge(),E.copyTexImage2D(tt,Me,D,z.xOffset,z.yOffset,ge,Se,0)):E.texImage2D(tt,Me,D,ge,Se,0,D,ie,yi||null)}function Hn(z,tt,Me,Wr,yi){var G=z.element,D=z.data,ie=z.internalformat,ge=z.format,Se=z.type,ce=z.width,ae=z.height;gr(z),G?E.texSubImage2D(tt,yi,Me,Wr,ge,Se,G):z.compressed?E.compressedTexSubImage2D(tt,yi,Me,Wr,ie,ce,ae,D):z.needsCopy?(Ge(),E.copyTexSubImage2D(tt,yi,Me,Wr,z.xOffset,z.yOffset,ce,ae)):E.texSubImage2D(tt,yi,Me,Wr,ce,ae,ge,Se,D)}var Rn=[];function Cr(){return Rn.pop()||new jt}function Nr(z){z.needsFree&&ji.freeType(z.data),jt.call(z),Rn.push(z)}function Nn(){Nt.call(this),this.genMipmaps=!1,this.mipmapHint=nc,this.mipmask=0,this.images=Array(16)}function kn(z,tt,Me){var Wr=z.images[0]=Cr();z.mipmask=1,Wr.width=z.width=tt,Wr.height=z.height=Me,Wr.channels=z.channels=4}function _i(z,tt){var Me=null;if(sn(tt))Me=z.images[0]=Cr(),Lt(Me,z),_r(Me,tt),z.mipmask=1;else if(Hr(z,tt),Array.isArray(tt.mipmap))for(var Wr=tt.mipmap,yi=0;yi>=yi,Me.height>>=yi,_r(Me,Wr[yi]),z.mipmask|=1<=0&&!("faces"in tt)&&(z.genMipmaps=!0)}if("mag"in tt){var Wr=tt.mag;$.parameter(Wr,Qt),z.magFilter=Qt[Wr]}var yi=z.wrapS,G=z.wrapT;if("wrap"in tt){var D=tt.wrap;typeof D=="string"?($.parameter(D,Ut),yi=G=Ut[D]):Array.isArray(D)&&($.parameter(D[0],Ut),$.parameter(D[1],Ut),yi=Ut[D[0]],G=Ut[D[1]])}else{if("wrapS"in tt){var ie=tt.wrapS;$.parameter(ie,Ut),yi=Ut[ie]}if("wrapT"in tt){var ge=tt.wrapT;$.parameter(ge,Ut),G=Ut[ge]}}if(z.wrapS=yi,z.wrapT=G,"anisotropic"in tt){var Se=tt.anisotropic;$(typeof Se=="number"&&Se>=1&&Se<=Q.maxAnisotropic,"aniso samples must be between 1 and "),z.anisotropic=tt.anisotropic}if("mipmap"in tt){var ce=!1;switch(typeof tt.mipmap){case"string":$.parameter(tt.mipmap,Pt,"invalid mipmap hint"),z.mipmapHint=Pt[tt.mipmap],z.genMipmaps=!0,ce=!0;break;case"boolean":ce=z.genMipmaps=tt.mipmap;break;case"object":$(Array.isArray(tt.mipmap),"invalid mipmap type"),z.genMipmaps=!1,ce=!0;break;default:$.raise("invalid mipmap type")}ce&&!("min"in tt)&&(z.minFilter=yu)}}function Xs(z,tt){E.texParameteri(tt,gu,z.minFilter),E.texParameteri(tt,ms,z.magFilter),E.texParameteri(tt,Al,z.wrapS),E.texParameteri(tt,mu,z.wrapT),M.ext_texture_filter_anisotropic&&E.texParameteri(tt,R3,z.anisotropic),z.genMipmaps&&(E.hint(s2,z.mipmapHint),E.generateMipmap(tt))}var Js=0,pa={},Ba=Q.maxTextureUnits,ws=Array(Ba).map(function(){return null});function ni(z){Nt.call(this),this.mipmask=0,this.internalformat=qe,this.id=Js++,this.refCount=1,this.target=z,this.texture=E.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new gs,ft.profile&&(this.stats={size:0})}function Fa(z){E.activeTexture(Fc),E.bindTexture(z.target,z.texture)}function Pi(){var z=ws[0];z?E.bindTexture(z.target,z.texture):E.bindTexture(pe,null)}function Ln(z){var tt=z.texture;$(tt,"must not double destroy texture");var Me=z.unit,Wr=z.target;Me>=0&&(E.activeTexture(Fc+Me),E.bindTexture(Wr,null),ws[Me]=null),E.deleteTexture(tt),z.texture=null,z.params=null,z.pixels=null,z.refCount=0,delete pa[z.id],ke.textureCount--}e(ni.prototype,{bind:function(){var z=this;z.bindCount+=1;var tt=z.unit;if(tt<0){for(var Me=0;Me0)continue;Wr.unit=-1}ws[Me]=z,tt=Me;break}tt>=Ba&&$.raise("insufficient number of texture units"),ft.profile&&ke.maxTextureUnits>fe)-ce,F.height=F.height||(Me.height>>fe)-ae,$(Me.type===F.type&&Me.format===F.format&&Me.internalformat===F.internalformat,"incompatible format for texture.subimage"),$(ce>=0&&ae>=0&&ce+F.width<=Me.width&&ae+F.height<=Me.height,"texture.subimage write out of bounds"),$(Me.mipmask&1<>ce;++ce){var ae=ge>>ce,fe=Se>>ce;if(!ae||!fe)break;E.texImage2D(pe,ce,Me.format,ae,fe,0,Me.format,Me.type,null)}return Pi(),ft.profile&&(Me.stats.size=dr(Me.internalformat,Me.type,ge,Se,!1,!1)),Wr}return Wr(z,tt),Wr.subimage=yi,Wr.resize=G,Wr._reglType="texture2d",Wr._texture=Me,ft.profile&&(Wr.stats=Me.stats),Wr.destroy=function(){Me.decRef()},Wr}function Ni(z,tt,Me,Wr,yi,G){var D=new ni(gt);pa[D.id]=D,ke.cubeCount++;var ie=new Array(6);function ge(ae,fe,F,ne,j,_e){var Ie,kt=D.texInfo;for(gs.call(kt),Ie=0;Ie<6;++Ie)ie[Ie]=wi();if(typeof ae=="number"||!ae){var hr=ae|0||1;for(Ie=0;Ie<6;++Ie)kn(ie[Ie],hr,hr)}else if(typeof ae=="object")if(fe)_i(ie[0],ae),_i(ie[1],fe),_i(ie[2],F),_i(ie[3],ne),_i(ie[4],j),_i(ie[5],_e);else if(Ps(kt,ae),Hr(D,ae),"faces"in ae){var pr=ae.faces;for($(Array.isArray(pr)&&pr.length===6,"cube faces must be a length 6 array"),Ie=0;Ie<6;++Ie)$(typeof pr[Ie]=="object"&&!!pr[Ie],"invalid input for cube map face"),Lt(ie[Ie],D),_i(ie[Ie],pr[Ie])}else for(Ie=0;Ie<6;++Ie)_i(ie[Ie],ae);else $.raise("invalid arguments to cube map");for(Lt(D,ie[0]),$.optional(function(){Q.npotTextureCube||$(xt(D.width)&&xt(D.height),"your browser does not support non power or two texture dimensions")}),kt.genMipmaps?D.mipmask=(ie[0].width<<1)-1:D.mipmask=ie[0].mipmask,$.textureCube(D,kt,ie,Q),D.internalformat=ie[0].internalformat,ge.width=ie[0].width,ge.height=ie[0].height,Fa(D),Ie=0;Ie<6;++Ie)vs(ie[Ie],We+Ie);for(Xs(kt,gt),Pi(),ft.profile&&(D.stats.size=dr(D.internalformat,D.type,ge.width,ge.height,kt.genMipmaps,!0)),ge.format=zt[D.internalformat],ge.type=or[D.type],ge.mag=Ft[kt.magFilter],ge.min=Fr[kt.minFilter],ge.wrapS=Rr[kt.wrapS],ge.wrapT=Rr[kt.wrapT],Ie=0;Ie<6;++Ie)Ji(ie[Ie]);return ge}function Se(ae,fe,F,ne,j){$(!!fe,"must specify image data"),$(typeof ae=="number"&&ae===(ae|0)&&ae>=0&&ae<6,"invalid face");var _e=F|0,Ie=ne|0,kt=j|0,hr=Cr();return Lt(hr,D),hr.width=0,hr.height=0,_r(hr,fe),hr.width=hr.width||(D.width>>kt)-_e,hr.height=hr.height||(D.height>>kt)-Ie,$(D.type===hr.type&&D.format===hr.format&&D.internalformat===hr.internalformat,"incompatible format for texture.subimage"),$(_e>=0&&Ie>=0&&_e+hr.width<=D.width&&Ie+hr.height<=D.height,"texture.subimage write out of bounds"),$(D.mipmask&1<>ne;++ne)E.texImage2D(We+F,ne,D.format,fe>>ne,fe>>ne,0,D.format,D.type,null);return Pi(),ft.profile&&(D.stats.size=dr(D.internalformat,D.type,ge.width,ge.height,!1,!0)),ge}}return ge(z,tt,Me,Wr,yi,G),ge.subimage=Se,ge.resize=ce,ge._reglType="textureCube",ge._texture=D,ft.profile&&(ge.stats=D.stats),ge.destroy=function(){D.decRef()},ge}function As(){for(var z=0;z>Wr,Me.height>>Wr,0,Me.internalformat,Me.type,null);else for(var yi=0;yi<6;++yi)E.texImage2D(We+yi,Wr,Me.internalformat,Me.width>>Wr,Me.height>>Wr,0,Me.internalformat,Me.type,null);Xs(Me.texInfo,Me.target)})}function U1(){for(var z=0;z=2,"invalid renderbuffer shape"),Fr=Lt[0]|0,Rr=Lt[1]|0}else"radius"in Nt&&(Fr=Rr=Nt.radius|0),"width"in Nt&&(Fr=Nt.width|0),"height"in Nt&&(Rr=Nt.height|0);"format"in Nt&&($.parameter(Nt.format,ke,"invalid renderbuffer format"),Sn=ke[Nt.format])}else typeof or=="number"?(Fr=or|0,typeof Ft=="number"?Rr=Ft|0:Rr=Fr):or?$.raise("invalid arguments to renderbuffer constructor"):Fr=Rr=1;if($(Fr>0&&Rr>0&&Fr<=Q.maxRenderbufferSize&&Rr<=Q.maxRenderbufferSize,"invalid renderbuffer size"),!(Fr===xe.width&&Rr===xe.height&&Sn===xe.format))return Ve.width=xe.width=Fr,Ve.height=xe.height=Rr,xe.format=Sn,E.bindRenderbuffer(Ar,xe.renderbuffer),E.renderbufferStorage(Ar,Sn,Fr,Rr),$(E.getError()===0,"invalid render buffer format"),Ct.profile&&(xe.stats.size=rn(xe.format,xe.width,xe.height)),Ve.format=ft[xe.format],Ve}function zt(or,Ft){var Fr=or|0,Rr=Ft|0||Fr;return Fr===xe.width&&Rr===xe.height||($(Fr>0&&Rr>0&&Fr<=Q.maxRenderbufferSize&&Rr<=Q.maxRenderbufferSize,"invalid renderbuffer size"),Ve.width=xe.width=Fr,Ve.height=xe.height=Rr,E.bindRenderbuffer(Ar,xe.renderbuffer),E.renderbufferStorage(Ar,xe.format,Fr,Rr),$(E.getError()===0,"invalid render buffer format"),Ct.profile&&(xe.stats.size=rn(xe.format,xe.width,xe.height))),Ve}return Ve(Gt,Yt),Ve.resize=zt,Ve._reglType="renderbuffer",Ve._renderbuffer=xe,Ct.profile&&(Ve.stats=xe.stats),Ve.destroy=function(){xe.decRef()},Ve}Ct.profile&&(Ge.getTotalRenderbufferSize=function(){var Gt=0;return Object.keys(Ut).forEach(function(Yt){Gt+=Ut[Yt].stats.size}),Gt});function vr(){Oe(Ut).forEach(function(Gt){Gt.renderbuffer=E.createRenderbuffer(),E.bindRenderbuffer(Ar,Gt.renderbuffer),E.renderbufferStorage(Ar,Gt.format,Gt.width,Gt.height)}),E.bindRenderbuffer(Ar,null)}return{create:Zt,clear:function(){Oe(Ut).forEach(rr)},restore:vr}},zr=36160,dn=36161,nn=3553,Mr=34069,yn=36064,Cf=36096,vu=36128,$c=33306,xu=36053,k3=36054,M3=36055,B3=36057,oa=36061,F3=36193,ic=5121,Lf=5126,_u=6407,oo=6408,Su=6402,Es=[_u,oo],bs=[];bs[oo]=4,bs[_u]=3;var Ol=[];Ol[ic]=1,Ol[Lf]=4,Ol[F3]=2;var $3=32854,P3=32855,c2=36194,Ri=33189,Qo=36168,Nf=34041,U3=35907,sc=34836,Df=34842,Rf=34843,V3=[$3,P3,c2,U3,Df,Rf,sc],Io={};Io[xu]="complete",Io[k3]="incomplete attachment",Io[B3]="incomplete dimensions",Io[M3]="incomplete, missing attachment",Io[oa]="unsupported";function lo(E,M,Q,Ge,Ct,ke){var ft={cur:null,next:null,dirty:!1,setFBO:null},Pt=["rgba"],Ut=["rgba4","rgb565","rgb5 a1"];M.ext_srgb&&Ut.push("srgba"),M.ext_color_buffer_half_float&&Ut.push("rgba16f","rgb16f"),M.webgl_color_buffer_float&&Ut.push("rgba32f");var Qt=["uint8"];M.oes_texture_half_float&&Qt.push("half float","float16"),M.oes_texture_float&&Qt.push("float","float32");function rr(jt,_r,Sr){this.target=jt,this.texture=_r,this.renderbuffer=Sr;var Hn=0,Rn=0;_r?(Hn=_r.width,Rn=_r.height):Sr&&(Hn=Sr.width,Rn=Sr.height),this.width=Hn,this.height=Rn}function Zt(jt){jt&&(jt.texture&&jt.texture._texture.decRef(),jt.renderbuffer&&jt.renderbuffer._renderbuffer.decRef())}function vr(jt,_r,Sr){if(jt)if(jt.texture){var Hn=jt.texture._texture,Rn=Math.max(1,Hn.width),Cr=Math.max(1,Hn.height);$(Rn===_r&&Cr===Sr,"inconsistent width/height for supplied texture"),Hn.refCount+=1}else{var Nr=jt.renderbuffer._renderbuffer;$(Nr.width===_r&&Nr.height===Sr,"inconsistent width/height for renderbuffer"),Nr.refCount+=1}}function Gt(jt,_r){_r&&(_r.texture?E.framebufferTexture2D(zr,jt,_r.target,_r.texture._texture.texture,0):E.framebufferRenderbuffer(zr,jt,dn,_r.renderbuffer._renderbuffer.renderbuffer))}function Yt(jt){var _r=nn,Sr=null,Hn=null,Rn=jt;typeof jt=="object"&&(Rn=jt.data,"target"in jt&&(_r=jt.target|0)),$.type(Rn,"function","invalid attachment data");var Cr=Rn._reglType;return Cr==="texture2d"?(Sr=Rn,$(_r===nn)):Cr==="textureCube"?(Sr=Rn,$(_r>=Mr&&_r=2,"invalid shape for framebuffer"),kn=Fa[0],_i=Fa[1]}else"radius"in ni&&(kn=_i=ni.radius),"width"in ni&&(kn=ni.width),"height"in ni&&(_i=ni.height);("color"in ni||"colors"in ni)&&(wi=ni.color||ni.colors,Array.isArray(wi)&&$(wi.length===1||M.webgl_draw_buffers,"multiple render targets not supported")),wi||("colorCount"in ni&&(Xs=ni.colorCount|0,$(Xs>0,"invalid color buffer count")),"colorTexture"in ni&&(Ji=!!ni.colorTexture,gs="rgba4"),"colorType"in ni&&(Ps=ni.colorType,Ji?($(M.oes_texture_float||!(Ps==="float"||Ps==="float32"),"you must enable OES_texture_float in order to use floating point framebuffer objects"),$(M.oes_texture_half_float||!(Ps==="half float"||Ps==="float16"),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):Ps==="half float"||Ps==="float16"?($(M.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),gs="rgba16f"):(Ps==="float"||Ps==="float32")&&($(M.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),gs="rgba32f"),$.oneOf(Ps,Qt,"invalid color type")),"colorFormat"in ni&&(gs=ni.colorFormat,Pt.indexOf(gs)>=0?Ji=!0:Ut.indexOf(gs)>=0?Ji=!1:$.optional(function(){Ji?$.oneOf(ni.colorFormat,Pt,"invalid color format for texture"):$.oneOf(ni.colorFormat,Ut,"invalid color format for renderbuffer")}))),("depthTexture"in ni||"depthStencilTexture"in ni)&&(ws=!!(ni.depthTexture||ni.depthStencilTexture),$(!ws||M.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in ni&&(typeof ni.depth=="boolean"?vs=ni.depth:(Js=ni.depth,Ss=!1)),"stencil"in ni&&(typeof ni.stencil=="boolean"?Ss=ni.stencil:(pa=ni.stencil,vs=!1)),"depthStencil"in ni&&(typeof ni.depthStencil=="boolean"?vs=Ss=ni.depthStencil:(Ba=ni.depthStencil,vs=!1,Ss=!1))}var Pi=null,Ln=null,gi=null,Ni=null;if(Array.isArray(wi))Pi=wi.map(Yt);else if(wi)Pi=[Yt(wi)];else for(Pi=new Array(Xs),Nn=0;Nn=0||Pi[Nn].renderbuffer&&V3.indexOf(Pi[Nn].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+Nn+" is invalid"),Pi[Nn]&&Pi[Nn].texture){var Vo=bs[Pi[Nn].texture._texture.format]*Ol[Pi[Nn].texture._texture.type];As===null?As=Vo:$(As===Vo,"all color attachments much have the same number of bits per pixel.")}return vr(Ln,kn,_i),$(!Ln||Ln.texture&&Ln.texture._texture.format===Su||Ln.renderbuffer&&Ln.renderbuffer._renderbuffer.format===Ri,"invalid depth attachment for framebuffer object"),vr(gi,kn,_i),$(!gi||gi.renderbuffer&&gi.renderbuffer._renderbuffer.format===Qo,"invalid stencil attachment for framebuffer object"),vr(Ni,kn,_i),$(!Ni||Ni.texture&&Ni.texture._texture.format===Nf||Ni.renderbuffer&&Ni.renderbuffer._renderbuffer.format===Nf,"invalid depth-stencil attachment for framebuffer object"),Rr(Sr),Sr.width=kn,Sr.height=_i,Sr.colorAttachments=Pi,Sr.depthAttachment=Ln,Sr.stencilAttachment=gi,Sr.depthStencilAttachment=Ni,Hn.color=Pi.map(Ve),Hn.depth=Ve(Ln),Hn.stencil=Ve(gi),Hn.depthStencil=Ve(Ni),Hn.width=Sr.width,Hn.height=Sr.height,Nt(Sr),Hn}function Rn(Cr,Nr){$(ft.next!==Sr,"can not resize a framebuffer which is currently in use");var Nn=Math.max(Cr|0,1),kn=Math.max(Nr|0||Nn,1);if(Nn===Sr.width&&kn===Sr.height)return Hn;for(var _i=Sr.colorAttachments,vs=0;vs<_i.length;++vs)zt(_i[vs],Nn,kn);return zt(Sr.depthAttachment,Nn,kn),zt(Sr.stencilAttachment,Nn,kn),zt(Sr.depthStencilAttachment,Nn,kn),Sr.width=Hn.width=Nn,Sr.height=Hn.height=kn,Nt(Sr),Hn}return Hn(jt,_r),e(Hn,{resize:Rn,_reglType:"framebuffer",_framebuffer:Sr,destroy:function(){Sn(Sr),Rr(Sr)},use:function(Cr){ft.setFBO({framebuffer:Hn},Cr)}})}function Hr(jt){var _r=Array(6);function Sr(Rn){var Cr;$(_r.indexOf(ft.next)<0,"can not update framebuffer which is currently in use");var Nr={color:null},Nn=0,kn=null,_i="rgba",vs="uint8",Ss=1;if(typeof Rn=="number")Nn=Rn|0;else if(!Rn)Nn=1;else{$.type(Rn,"object","invalid arguments for framebuffer");var wi=Rn;if("shape"in wi){var Ji=wi.shape;$(Array.isArray(Ji)&&Ji.length>=2,"invalid shape for framebuffer"),$(Ji[0]===Ji[1],"cube framebuffer must be square"),Nn=Ji[0]}else"radius"in wi&&(Nn=wi.radius|0),"width"in wi?(Nn=wi.width|0,"height"in wi&&$(wi.height===Nn,"must be square")):"height"in wi&&(Nn=wi.height|0);("color"in wi||"colors"in wi)&&(kn=wi.color||wi.colors,Array.isArray(kn)&&$(kn.length===1||M.webgl_draw_buffers,"multiple render targets not supported")),kn||("colorCount"in wi&&(Ss=wi.colorCount|0,$(Ss>0,"invalid color buffer count")),"colorType"in wi&&($.oneOf(wi.colorType,Qt,"invalid color type"),vs=wi.colorType),"colorFormat"in wi&&(_i=wi.colorFormat,$.oneOf(wi.colorFormat,Pt,"invalid color format for texture"))),"depth"in wi&&(Nr.depth=wi.depth),"stencil"in wi&&(Nr.stencil=wi.stencil),"depthStencil"in wi&&(Nr.depthStencil=wi.depthStencil)}var gs;if(kn)if(Array.isArray(kn))for(gs=[],Cr=0;Cr0&&(Nr.depth=_r[0].depth,Nr.stencil=_r[0].stencil,Nr.depthStencil=_r[0].depthStencil),_r[Cr]?_r[Cr](Nr):_r[Cr]=Lt(Nr)}return e(Sr,{width:Nn,height:Nn,color:gs})}function Hn(Rn){var Cr,Nr=Rn|0;if($(Nr>0&&Nr<=Q.maxCubeMapSize,"invalid radius for cube fbo"),Nr===Sr.width)return Sr;var Nn=Sr.color;for(Cr=0;Cr{for(var vs=Object.keys(gr),Ss=0;Ss=0,'invalid option for vao: "'+vs[Ss]+'" valid options are '+za)}),$(Array.isArray(jt),"attributes must be an array")}$(jt.length0,"must specify at least one attribute");var Sr={},Hn=Lt.attributes;Hn.length=jt.length;for(var Rn=0;Rn=Nn.byteLength?kn.subdata(Nn):(kn.destroy(),Lt.buffers[Rn]=null)),Lt.buffers[Rn]||(kn=Lt.buffers[Rn]=Ct.create(Cr,qa,!1,!0)),Nr.buffer=Ct.getBuffer(kn),Nr.size=Nr.buffer.dimension|0,Nr.normalized=!1,Nr.type=Nr.buffer.dtype,Nr.offset=0,Nr.stride=0,Nr.divisor=0,Nr.state=1,Sr[Rn]=1}else Ct.getBuffer(Cr)?(Nr.buffer=Ct.getBuffer(Cr),Nr.size=Nr.buffer.dimension|0,Nr.normalized=!1,Nr.type=Nr.buffer.dtype,Nr.offset=0,Nr.stride=0,Nr.divisor=0,Nr.state=1):Ct.getBuffer(Cr.buffer)?(Nr.buffer=Ct.getBuffer(Cr.buffer),Nr.size=(+Cr.size||Nr.buffer.dimension)|0,Nr.normalized=!!Cr.normalized||!1,"type"in Cr?($.parameter(Cr.type,ls,"invalid buffer type"),Nr.type=ls[Cr.type]):Nr.type=Nr.buffer.dtype,Nr.offset=(Cr.offset||0)|0,Nr.stride=(Cr.stride||0)|0,Nr.divisor=(Cr.divisor||0)|0,Nr.state=1,$(Nr.size>=1&&Nr.size<=4,"size must be between 1 and 4"),$(Nr.offset>=0,"invalid offset"),$(Nr.stride>=0&&Nr.stride<=255,"stride must be between 0 and 255"),$(Nr.divisor>=0,"divisor must be positive"),$(!Nr.divisor||!!M.angle_instanced_arrays,"ANGLE_instanced_arrays must be enabled to use divisor")):"x"in Cr?($(Rn>0,"first attribute must not be a constant"),Nr.x=+Cr.x||0,Nr.y=+Cr.y||0,Nr.z=+Cr.z||0,Nr.w=+Cr.w||0,Nr.state=2):$(!1,"invalid attribute spec for location "+Rn)}for(var _i=0;_i1)for(var gr=0;grxe&&(xe=Ve.stats.uniformsCount)}),xe},Q.getMaxAttributesCount=function(){var xe=0;return rr.forEach(function(Ve){Ve.stats.attributesCount>xe&&(xe=Ve.stats.attributesCount)}),xe});function Yt(){Ct={},ke={};for(var xe=0;xe=0,"missing vertex shader",zt),$.command(Ve>=0,"missing fragment shader",zt);var Ft=Qt[Ve];Ft||(Ft=Qt[Ve]={});var Fr=Ft[xe];if(Fr&&(Fr.refCount++,!or))return Fr;var Rr=new vr(Ve,xe);return Q.shaderCount++,Gt(Rr,zt,or),Fr||(Ft[xe]=Rr),rr.push(Rr),e(Rr,{destroy:function(){if(Rr.refCount--,Rr.refCount<=0){E.deleteProgram(Rr.program);var Sn=rr.indexOf(Rr);rr.splice(Sn,1),Q.shaderCount--}Ft[Rr.vertId].refCount<=0&&(E.deleteShader(ke[Rr.vertId]),delete ke[Rr.vertId],delete Qt[Rr.fragId][Rr.vertId]),Object.keys(Qt[Rr.fragId]).length||(E.deleteShader(Ct[Rr.fragId]),delete Ct[Rr.fragId],delete Qt[Rr.fragId])}})},restore:Yt,shader:Ut,frag:-1,vert:-1}}var go=6408,ea=5121,yo=3333,ua=5126;function bo(E,M,Q,Ge,Ct,ke,ft){function Pt(rr){var Zt;M.next===null?($(Ct.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),Zt=ea):($(M.next.colorAttachments[0].texture!==null,"You cannot read from a renderbuffer"),Zt=M.next.colorAttachments[0].texture._texture.type,$.optional(function(){ke.oes_texture_float?($(Zt===ea||Zt===ua,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"),Zt===ua&&$(ft.readFloat,"Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")):$(Zt===ea,"Reading from a framebuffer is only allowed for the type 'uint8'")}));var vr=0,Gt=0,Yt=Ge.framebufferWidth,xe=Ge.framebufferHeight,Ve=null;t(rr)?Ve=rr:rr&&($.type(rr,"object","invalid arguments to regl.read()"),vr=rr.x|0,Gt=rr.y|0,$(vr>=0&&vr=0&&Gt0&&Yt+vr<=Ge.framebufferWidth,"invalid width for read pixels"),$(xe>0&&xe+Gt<=Ge.framebufferHeight,"invalid height for read pixels"),Q();var zt=Yt*xe*4;return Ve||(Zt===ea?Ve=new Uint8Array(zt):Zt===ua&&(Ve=Ve||new Float32Array(zt))),$.isTypedArray(Ve,"data buffer for regl.read() must be a typedarray"),$(Ve.byteLength>=zt,"data buffer for regl.read() too small"),E.pixelStorei(yo,4),E.readPixels(vr,Gt,Yt,xe,go,Zt,Ve),Ve}function Ut(rr){var Zt;return M.setFBO({framebuffer:rr.framebuffer},function(){Zt=Pt(rr)}),Zt}function Qt(rr){return!rr||!("framebuffer"in rr)?Pt(rr):Ut(rr)}return Qt}function js(E){return Array.prototype.slice.call(E)}function qs(E){return js(E).join("")}function vo(){var E=0,M=[],Q=[];function Ge(Zt){for(var vr=0;vr0&&(Zt.push(xe,"="),Zt.push.apply(Zt,js(arguments)),Zt.push(";")),xe}return e(vr,{def:Yt,toString:function(){return qs([Gt.length>0?"var "+Gt.join(",")+";":"",qs(Zt)])}})}function ke(){var Zt=Ct(),vr=Ct(),Gt=Zt.toString,Yt=vr.toString;function xe(Ve,zt){vr(Ve,zt,"=",Zt.def(Ve,zt),";")}return e(function(){Zt.apply(Zt,js(arguments))},{def:Zt.def,entry:Zt,exit:vr,save:xe,set:function(Ve,zt,or){xe(Ve,zt),Zt(Ve,zt,"=",or,";")},toString:function(){return Gt()+Yt()}})}function ft(){var Zt=qs(arguments),vr=ke(),Gt=ke(),Yt=vr.toString,xe=Gt.toString;return e(vr,{then:function(){return vr.apply(vr,js(arguments)),this},else:function(){return Gt.apply(Gt,js(arguments)),this},toString:function(){var Ve=xe();return Ve&&(Ve="else{"+Ve+"}"),qs(["if(",Zt,"){",Yt(),"}",Ve])}})}var Pt=Ct(),Ut={};function Qt(Zt,vr){var Gt=[];function Yt(){var Ft="a"+Gt.length;return Gt.push(Ft),Ft}vr=vr||0;for(var xe=0;xe`}),je.headers&&(C+='',Te.forEach(function(ht,Tt){if(C+="',typeof ht.title<"u"&&(typeof ht.title=="function"?C+=R(ht.title(je,ht,Tt)):C+=R(ht.title)),C+=""}),C+=""),Oe&&Oe.length>0&&Oe.forEach(function(ht,Tt){if(!(Tt>je.limit)){var $t={};if(Pr($t,je.row),je.rows&&je.rows[Tt]&&Pr($t,je.rows[Tt]),C+="",Te.forEach(function(le,mr){var Vt={};Pr(Vt,je.cell),Pr(Vt,$t.cell),typeof je.column<"u"&&Pr(Vt,je.column.cell),Pr(Vt,le.cell),je.cells&&je.cells[Tt]&&je.cells[Tt][mr]&&Pr(Vt,je.cells[Tt][mr]);var Bt=ht[le.columnid];typeof Vt.value=="function"&&(Bt=Vt.value(Bt,je,ht,le,Vt,Tt,mr));var Zr=Vt.typeid;typeof Zr=="function"&&(Zr=Zr(Bt,je,ht,le,Vt,Tt,mr)),typeof Zr>"u"&&(typeof Bt=="number"?Zr="number":typeof Bt=="string"?Zr="string":typeof Bt=="boolean"?Zr="boolean":typeof Bt=="object"&&Bt instanceof Date&&(Zr="date"));var Un="String";Zr=="number"?Un="Number":Zr=="date"&&(Un="Date");var $i="";Zr=="money"?$i='mso-number-format:"\\#\\,\\#\\#0\\\\ _\u0440_\\.";white-space:normal;':Zr=="number"?$i=" ":Zr=="date"?$i='mso-number-format:"Short Date";':c.types&&c.types[Zr]&&c.types[Zr].typestyle&&($i=c.types[Zr].typestyle),$i=$i||'mso-number-format:"\\@";',C+="",C+="";var Yn=Vt.format;if(typeof Bt>"u")C+="";else if(typeof Yn<"u")if(typeof Yn=="function")C+=R(Yn(Bt));else if(typeof Yn=="string")C+=R(Bt);else throw new Error("Unknown format type. Should be function or string");else Zr=="number"||Zr=="date"?C+=R(Bt.toString()):Zr=="money"?C+=R((+Bt).toFixed(2)):C+=R(Bt);C+=""}),C+=""}}),C+=""}return C+="",L+T+C}},t.into.XLSX=function(n,c,o,l,f){var u=1;c=c||{},qn(l,[{columnid:"_"}])&&(o=o.map(function(L){return L._}),l=void 0),n=t.utils.autoExtFilename(n,"xlsx",c);var p=ta();typeof n=="object"&&(c=n,n=void 0);var h={SheetNames:[],Sheets:{}};return c.sourcefilename?t.utils.loadBinaryFile(c.sourcefilename,!!f,function(L){h=p.read(L,{type:"binary",...t.options.excel,...c}),b(),f&&(u=f(u))}):(b(),f&&(u=f(u))),u;function b(){typeof c=="object"&&Array.isArray(c)?o&&o.length>0&&o.forEach(function(L,T){U(c[T],L,void 0,T+1)}):U(c,o,l,1),R(f)}function U(L,T,C,te){var W={sheetid:"Sheet "+te,headers:!0};t.utils.extend(W,L);var Y=Object.keys(T).length;(!C||C.length==0)&&(Y>0?C=Object.keys(T[0]).map(function(mr){return{columnid:mr}}):C=[]);var F={};h.SheetNames.indexOf(W.sheetid)>-1||(h.SheetNames.push(W.sheetid),h.Sheets[W.sheetid]={}),F=h.Sheets[W.sheetid];var N="A1";W.range&&(N=W.range);var Ae=t.utils.xlscn(N.match(/[A-Z]+/)[0]),je=+N.match(/[0-9]+/)[0]-1;if(h.Sheets[W.sheetid]["!ref"])var Ot=h.Sheets[W.sheetid]["!ref"],Oe=t.utils.xlscn(Ot.match(/[A-Z]+/)[0]),Te=+Ot.match(/[0-9]+/)[0]-1;else var Oe=1,Te=1;var ht=C.length?0:1,Tt=Math.max(Ae+C.length-1+ht,Oe),$t=Math.max(je+Y+2,Te),yr=je+1;h.Sheets[W.sheetid]["!ref"]="A1:"+t.utils.xlsnc(Tt)+$t,W.headers&&(C.forEach(function(mr,Vt){F[t.utils.xlsnc(Ae+Vt)+""+yr]={v:mr.columnid.trim()}}),yr++);for(var le=0;le"u")u=h;else if(T=ta(),s.isNode||s.isMeteorServer)T.writeFile(h,n);else{var C={bookType:"xlsx",bookSST:!1,type:"binary"},te=T.write(h,C),W=function(Y){for(var F=new ArrayBuffer(Y.length),N=new Uint8Array(F),Ae=0;Ae!=Y.length;++Ae)N[Ae]=Y.charCodeAt(Ae)&255;return F};Yi(new Blob([W(te)],{type:"application/octet-stream"}),n)}}},t.from.METEOR=function(n,c,o,l,f){var u=n.find(c).fetch();return o&&(u=o(u,l,f)),u},t.from.TABLETOP=function(n,c,o,l,f){var u=[],p={headers:!0,simpleSheet:!0,key:n};return t.utils.extend(p,c),p.callback=function(h){u=h,o&&(u=o(u,l,f))},Tabletop.init(p),null},t.from.HTML=function(n,c,o,l,f){var u={};t.utils.extend(u,c);var p=document.querySelector(n);if(!p||p.tagName!=="TABLE")throw new Error("Selected HTML element is not a TABLE");var h=[],b=u.headers;if(b&&!Array.isArray(b)){b=[];for(var U=p.querySelector("thead tr").children,R=0;Rfunction(c,o,l,f,u){let p=[];return c=t.utils.autoExtFilename(c,n,o),t.utils.loadFile(c,!!l,function(h){h.split(/\r?\n/).forEach((b,U)=>{let R=b.trim();if(R!=="")try{p.push(JSON.parse(R))}catch(L){throw new Error(`Could not parse JSON at line ${U}: ${L.toString()}`)}}),l&&(p=l(p,f,u))},h=>{let b=h instanceof Error?h:new Error(h);if(u&&u.cb){u.cb(null,b);return}throw b}),p};t.from.JSONL=hf("jsonl"),t.from.NDJSON=hf("ndjson"),t.from.TXT=function(n,c,o,l,f){var u;return n=t.utils.autoExtFilename(n,"txt",c),t.utils.loadFile(n,!!o,function(p){u=p.split(/\r?\n/),u[u.length-1]===""&&u.pop();for(var h=0,b=u.length;h=F)return W;if(Ot)return Ot=!1,te;var $t=N;if(L.charCodeAt($t)===C){for(var yr=$t;yr++f.cb(null,L))),p};function sc(n,c,o,l,f,u){var p={};o=o||{},t.utils.extend(p,o),typeof p.headers>"u"&&(p.headers=!0);var h;function b(L){for(var T="",C=0,te=10240;C"u"?te=L.Sheets[T]["!ref"]:(te=C.range,L.Sheets[T][te]&&(te=L.Sheets[T][te])),te){for(var Y=te.split(":"),F=Y[0].match(/[A-Z]+/)[0],N=+Y[0].match(/[0-9]+/)[0],Ae=Y[1].match(/[A-Z]+/)[0],je=+Y[1].match(/[0-9]+/)[0],Ot={},Oe=t.utils.xlscn(F),Te=t.utils.xlscn(Ae),ht=Oe;ht<=Te;ht++){var Tt=t.utils.xlsnc(ht);C.headers?L.Sheets[T][Tt+""+N]?Ot[Tt]=U(L.Sheets[T][Tt+""+N].v):Ot[Tt]=U(Tt):Ot[Tt]=Tt}C.headers&&N++;for(var $t=N;$t<=je;$t++){for(var yr={},ht=Oe;ht<=Te;ht++){var Tt=t.utils.xlsnc(ht);L.Sheets[T][Tt+""+$t]&&(yr[Ot[Tt]]=L.Sheets[T][Tt+""+$t].v)}W.push(yr)}}else W.push([]);return W.length>0&&W[W.length-1]&&Object.keys(W[W.length-1]).length==0&&W.pop(),W}return c=t.utils.autoExtFilename(c,"xls",o),t.utils.loadBinaryFile(c,!!l,function(L){if(L instanceof ArrayBuffer)var T=b(L),C=n.read(btoa(T),{type:"base64",...t.options.excel,...o});else var C=n.read(L,{type:"binary",...t.options.excel,...o});var te=p.sheetid==="*"||Array.isArray(p.sheetid)&&p.sheetid.length>0;if(te){h=[];for(var W=p.sheetid==="*"?C.SheetNames:p.sheetid,Y=0;Y"u"?je=C.SheetNames[0]:typeof p.sheetid=="number"?je=C.SheetNames[p.sheetid]:je=p.sheetid,h=R(C,je,p)}l&&(h=l(h,f,u))},function(L){if(u&&u.cb){u.cb(null,L);return}throw L}),h}t.from.XLS=function(n,c,o,l,f){return c=c||{},n=t.utils.autoExtFilename(n,"xls",c),c.autoExt=!1,sc(ta(),n,c,o,l,f)},t.from.XLSX=function(n,c,o,l,f){return c=c||{},n=t.utils.autoExtFilename(n,"xlsx",c),c.autoExt=!1,sc(ta(),n,c,o,l,f)},t.from.ODS=function(n,c,o,l,f){return c=c||{},n=t.utils.autoExtFilename(n,"ods",c),c.autoExt=!1,sc(ta(),n,c,o,l,f)},t.from.XML=function(n,c,o,l,f){var u;return t.utils.loadFile(n,!!o,function(p){u=vu(p).root,o&&(u=o(u,l,f))}),u};function vu(n){return n=n.trim(),n=n.replace(//g,""),c();function c(){return{declaration:o(),root:l()}}function o(){var R=h(/^<\?xml\s*/);if(R){for(var L={attributes:{}};!(b()||U("?>"));){var T=u();if(!T)return L;L.attributes[T.name]=T.value}return h(/\?>\s*/),L}}function l(){var R=h(/^<([\w-:.]+)\s*/);if(R){for(var L={name:R[1],attributes:{},children:[]};!(b()||U(">")||U("?>")||U("/>"));){var T=u();if(!T)return L;L.attributes[T.name]=T.value}if(h(/^\s*\/>\s*/))return L;h(/\??>\s*/),L.content=f();for(var C;C=l();)L.children.push(C);return h(/^<\/[\w-:.]+>\s*/),L}}function f(){var R=h(/^([^<]*)/);return R?R[1]:""}function u(){var R=h(/([\w:-]+)\s*=\s*("[^"]*"|'[^']*'|\w+)\s*/);if(R)return{name:R[1],value:p(R[2])}}function p(R){return R.replace(/^['"]|['"]$/g,"")}function h(R){var L=n.match(R);if(L)return n=n.slice(L[0].length),L}function b(){return n.length==0}function U(R){return n.indexOf(R)==0}}t.from.GEXF=function(n,c,o,l,f){var u;return t("SEARCH FROM XML("+n+")",[],function(p){u=p,o&&(u=o(u))}),u},V.Print=function(n){return Object.assign(this,n)},V.Print.prototype.toString=function(){var n="PRINT";return this.statement&&(n+=" "+this.statement.toString()),n},V.Print.prototype.execute=function(n,c,o){var l=this,f=1;if(t.precompile(this,n,c),this.exprs&&this.exprs.length>0){var u=this.exprs.map(function(h){var b=new Function("params,alasql,p","var y;return "+h.toJS("({})","",null)).bind(l),U=b(c,t);return ls(U)});console.log.apply(console,u)}else if(this.select){var p=this.select.execute(n,c);console.log(ls(p))}else console.log();return o&&(f=o(f)),f},V.Source=function(n){return Object.assign(this,n)},V.Source.prototype.toString=function(){var n="SOURCE";return this.url&&(n+=" '"+this.url+" '"),n},V.Source.prototype.execute=function(n,c,o){var l;return se(this.url,!!o,function(f){return l=t(f),o&&(l=o(l)),l},function(f){throw f}),l},V.Require=function(n){return Object.assign(this,n)},V.Require.prototype.toString=function(){var n="REQUIRE";return this.paths&&this.paths.length>0&&(n+=this.paths.map(function(c){return c.toString()}).join(",")),this.plugins&&this.plugins.length>0&&(n+=this.plugins.map(function(c){return c.toUpperCase()}).join(",")),n},V.Require.prototype.execute=function(n,c,o){var l=this,f=0,u="";return this.paths&&this.paths.length>0?this.paths.forEach(function(p){se(p.value,!!o,function(h){f++,u+=h,!(f0?this.plugins.forEach(function(p){t.plugins[p]||se(t.path+"/alasql-"+p.toLowerCase()+".js",!!o,function(h){f++,u+=h,!(fl.name===n)||0;let o=c.open(n);return new Promise(function(l,f){o.onsuccess=()=>{o.result.close(),l({name:n,version:o.result.version})},o.onupgradeneeded=u=>{u.target.transaction.abort(),l(0)},o.onerror=()=>{f(new Error("IndexedDB error"))},o.onblocked=()=>{l({name:n,version:o.result.version})}})}Wa.showDatabases=function(n,c){if(!indexedDB.databases){c(null,new Error("SHOW DATABASE is not supported in this browser"));return}indexedDB.databases().then(o=>{let l=[],f=n&&new RegExp(n.value.replace(/\%/g,".*"),"g");for(var u=0;u{if(f)return f(null,p),null;throw p});if(u!==null)if(u)if(o)f&&f(0);else{let p=new Error(`IndexedDB: Cannot create new database "${n}" because it already exists`);if(f){f(null,p);return}throw p}else{let p=indexedDB.open(n,1);p.onsuccess=()=>{p.result.close(),f(1)}}},Wa.dropDatabase=async function(n,c,o){let l=await M1(n).catch(f=>{if(o)return o(null,f),null;throw f});if(l!==null)if(l){let f=indexedDB.deleteDatabase(n);f.onsuccess=()=>{o&&o(1)}}else if(c)o&&o(0);else{if(o){o(null,new Error(`IndexedDB: Cannot drop database "${n}" because it does not exist`));return}throw new Error(`IndexedDB: Cannot drop database "${n}" because it does not exist`)}},Wa.attachDatabase=async function(n,c,o,l,f){let u=await M1(n).catch(U=>{if(f)return f(null,U),null;throw U});if(u===null)return;if(!u){let U=new Error(`IndexedDB: Cannot attach database "${n}" because it does not exist`);if(f){f(null,U);return}throw U}let p=await new Promise((U,R)=>{let L=indexedDB.open(n);L.onsuccess=()=>{U(L.result.objectStoreNames),L.result.close()}}),h=new t.Database(c||n);h.engineid="INDEXEDDB",h.ixdbid=n,h.tables=[];for(var b=0;b{if(l)return l(null,h),null;throw h});if(u===null)return;if(!u){let h=new Error('IndexedDB: Cannot create table in database "'+f+'" because it does not exist');if(l){l(null,h);return}throw h}let p=indexedDB.open(f,u.version+1);p.onupgradeneeded=function(h){p.result.createObjectStore(c,{autoIncrement:!0})},p.onsuccess=function(h){p.result.close(),l&&l(1)},p.onerror=h=>{l(null,h)},p.onblocked=function(h){l(null,new Error(`Cannot create table "${c}" because database "${n}" is blocked`))}},Wa.dropTable=async function(n,c,o,l){let f=t.databases[n].ixdbid,u=await M1(f).catch(b=>{if(l)return l(null,b),null;throw b});if(u===null)return;if(!u){let b=new Error('IndexedDB: Cannot drop table in database "'+f+'" because it does not exist');if(l){l(null,b);return}throw b}let p=indexedDB.open(f,u.version+1),h;p.onupgradeneeded=function(b){var U=p.result;U.objectStoreNames.contains(c)?(U.deleteObjectStore(c),delete t.databases[n].tables[c]):o||(h=new Error(`IndexedDB: Cannot drop table "${c}" because it does not exist`),b.target.transaction.abort())},p.onsuccess=function(b){p.result.close(),l&&l(1)},p.onerror=function(b){l&&l(null,h||b)},p.onblocked=function(b){l(null,new Error(`Cannot drop table "${c}" because database "${n}" is blocked`))}},Wa.intoTable=function(n,c,o,l,f){let u=t.databases[n].ixdbid,p=indexedDB.open(u);var h=t.databases[n],b=h.tables[c];p.onupgradeneeded=U=>{U.target.transaction.abort();let R=new Error(`Cannot insert into table "${c}" because database "${n}" does not exist`);f&&f(null,R)},p.onsuccess=()=>{for(var U=p.result,R=U.transaction([c],"readwrite"),L=R.objectStore(c),T=0,C=o.length;T{h.target.transaction.abort();let b=new Error(`Cannot select from table "${c}" because database "${n}" does not exist`);o&&o(null,b)},p.onsuccess=()=>{let h=[],b=p.result,U=b.transaction([c]).objectStore(c).openCursor();U.onsuccess=()=>{let R=U.result;if(R){let L=typeof R=="object"?R.value:{[R.key]:R.value};h.push(L),R.continue()}else b.close(),o&&o(h,l,f)}}},Wa.deleteFromTable=function(n,c,o,l,f){let u=t.databases[n].ixdbid,p=indexedDB.open(u);p.onsuccess=()=>{let h=p.result,b=h.transaction([c],"readwrite").objectStore(c).openCursor(),U=0;b.onsuccess=()=>{var R=b.result;R?((!o||o(R.value,l,t))&&(R.delete(),U++),R.continue()):(h.close(),f&&f(U))}}},Wa.updateTable=function(n,c,o,l,f,u){let p=t.databases[n].ixdbid,h=indexedDB.open(p);h.onsuccess=function(){let b=h.result,U=b.transaction([c],"readwrite").objectStore(c).openCursor(),R=0;U.onsuccess=()=>{var L=U.result;if(L){if(!l||l(L.value,f)){var T=L.value;o(T,f),L.update(T),R++}L.continue()}else b.close(),u&&u(R)}}},Wa.commit=function(n,c){return c?c(1):1},Wa.begin=Wa.commit,Wa.rollback=function(n,c){return c?c(1):1};var Jn=t.engines.LOCALSTORAGE=function(){};Jn.get=function(n){var c=localStorage.getItem(n);if(!(typeof c>"u")){var o;try{o=JSON.parse(c)}catch{throw new Error("Cannot parse JSON object from localStorage"+c)}return o}},Jn.set=function(n,c){typeof c>"u"?localStorage.removeItem(n):localStorage.setItem(n,JSON.stringify(c))},Jn.storeTable=function(n,c){var o=t.databases[n],l=o.tables[c],f={};f.columns=l.columns,f.data=l.data,f.identities=l.identities,f.defaultfns=l.defaultfns,f.onupdatefns=l.onupdatefns,Jn.set(o.lsdbid+"."+c,f)},Jn.restoreTable=function(n,c){var o=t.databases[n],l=Jn.get(o.lsdbid+"."+c),f=new t.Table;for(var u in l)f[u]=l[u];return o.tables[c]=f,f.indexColumns(),f},Jn.removeTable=function(n,c){var o=t.databases[n];localStorage.removeItem(o.lsdbid+"."+c)},Jn.createDatabase=function(n,c,o,l,f){var u=1,p=Jn.get("alasql");if(o&&p&&p.databases&&p.databases[n])u=0;else{if(p||(p={databases:{}}),p.databases&&p.databases[n])throw new Error('localStorage: Cannot create new database "'+n+'" because it already exists');p.databases[n]=!0,Jn.set("alasql",p),Jn.set(n,{databaseid:n,tables:{}})}return f&&(u=f(u)),u},Jn.dropDatabase=function(n,c,o){var l=1,f=Jn.get("alasql");if(c&&f&&f.databases&&!f.databases[n])l=0;else{if(!f){if(c)return o?o(0):0;throw new Error("There is no any AlaSQL databases in localStorage")}if(f.databases&&!f.databases[n])throw new Error('localStorage: Cannot drop database "'+n+'" because there is no such database');delete f.databases[n],Jn.set("alasql",f);var u=Jn.get(n);for(var p in u.tables)localStorage.removeItem(n+"."+p);localStorage.removeItem(n)}return o&&(l=o(l)),l},Jn.attachDatabase=function(n,c,o,l,f){var u=1;if(t.databases[c])throw new Error('Unable to attach database as "'+c+'" because it already exists');c||(c=n);var p=new t.Database(c);if(p.engineid="LOCALSTORAGE",p.lsdbid=n,p.tables=Jn.get(n).tables,!t.options.autocommit&&p.tables)for(var h in p.tables)Jn.restoreTable(c,h);return f&&(u=f(u)),u},Jn.showDatabases=function(n,c){var o=[],l=Jn.get("alasql");if(n)var f=new RegExp(n.value.replace(/%/g,".*"),"g");if(l&&l.databases){for(var u in l.databases)o.push({databaseid:u});n&&o&&o.length>0&&(o=o.filter(function(p){return p.databaseid.match(f)}))}return c&&(o=c(o)),o},Jn.createTable=function(n,c,o,l){var f=1,u=t.databases[n].lsdbid,p=Jn.get(u+"."+c);if(p&&!o)throw new Error('Table "'+c+'" alsready exists in localStorage database "'+u+'"');var h=Jn.get(u),b=t.databases[n].tables[c];return h.tables[c]=!0,Jn.set(u,h),Jn.storeTable(n,c),l&&(f=l(f)),f},Jn.truncateTable=function(n,c,o,l){var f=1,u=t.databases[n].lsdbid,p;if(t.options.autocommit?p=Jn.get(u):p=t.databases[n],!o&&!p.tables[c])throw new Error('Cannot truncate table "'+c+'" in localStorage, because it does not exist');var h=Jn.restoreTable(n,c);return h.data=[],Jn.storeTable(n,c),l&&(f=l(f)),f},Jn.dropTable=function(n,c,o,l){var f=1,u=t.databases[n].lsdbid,p;if(t.options.autocommit?p=Jn.get(u):p=t.databases[n],!o&&!p.tables[c])throw new Error('Cannot drop table "'+c+'" in localStorage, because it does not exist');return delete p.tables[c],Jn.set(u,p),Jn.removeTable(n,c),l&&(f=l(f)),f},Jn.fromTable=function(n,c,o,l,f){var u=t.databases[n].lsdbid,p=Jn.restoreTable(n,c).data;return o&&(p=o(p,l,f)),p},Jn.intoTable=function(n,c,o,l,f){var u=t.databases[n].lsdbid,p=o.length,h=Jn.restoreTable(n,c);for(var b in h.identities){var U=h.identities[b];for(var R in o)o[R][b]=U.value,U.value+=U.step}return h.data||(h.data=[]),h.data=h.data.concat(o),Jn.storeTable(n,c),f&&(p=f(p)),p},Jn.loadTableData=function(n,c){var o=t.databases[n],l=t.databases[n].lsdbid;Jn.restoreTable(n,c)},Jn.saveTableData=function(n,c){var o=t.databases[n],l=t.databases[n].lsdbid;Jn.storeTable(l,c),o.tables[c].data=void 0},Jn.commit=function(n,c){var o=t.databases[n],l=t.databases[n].lsdbid,f={databaseid:l,tables:{}};if(o.tables)for(var u in o.tables)f.tables[u]=!0,Jn.storeTable(n,u);return Jn.set(l,f),c?c(1):1},Jn.begin=Jn.commit,Jn.rollback=function(n,c){return;var o,l,f;if(f.tables)for(var u in f.tables)Jn.restoreTable(n,u)};var tl=t.engines.SQLITE=function(){};tl.createDatabase=function(n,c,o,l,f){throw new Error("Connot create SQLITE database in memory. Attach it.")},tl.dropDatabase=function(n){throw new Error("This is impossible to drop SQLite database. Detach it.")},tl.attachDatabase=function(n,c,o,l,f){var u=1;if(t.databases[c])throw new Error('Unable to attach database as "'+c+'" because it already exists');if(o[0]&&o[0]instanceof V.StringValue||o[0]instanceof V.ParamValue){if(o[0]instanceof V.StringValue)var p=o[0].value;else if(o[0]instanceof V.ParamValue)var p=l[o[0].param];return t.utils.loadBinaryFile(p,!0,function(h){var b=new t.Database(c||n);b.engineid="SQLITE",b.sqldbid=n;var U=b.sqldb=new SQL.Database(h);b.tables=[];var R=U.exec("SELECT * FROM sqlite_master WHERE type='table'")[0].values;R.forEach(function(L){b.tables[L[1]]={};var T=b.tables[L[1]].columns=[],C=t.parse(L[4]),te=C.statements[0].columns;te&&te.length>0&&te.forEach(function(W){T.push(W)})}),f(1)},function(h){throw new Error('Cannot open SQLite database file "'+o[0].value+'"')}),u}else throw new Error("Cannot attach SQLite database without a file");return u},tl.fromTable=function(n,c,o,l,f){var u=t.databases[n].sqldb.exec("SELECT * FROM "+c),p=f.sources[l].columns=[];u[0].columns.length>0&&u[0].columns.forEach(function(b){p.push({columnid:b})});var h=[];u[0].values.length>0&&u[0].values.forEach(function(b){var U={};p.forEach(function(R,L){U[R.columnid]=b[L]}),h.push(U)}),o&&o(h,l,f)},tl.intoTable=function(n,c,o,l,f){for(var u=t.databases[n].sqldb,p=0,h=o.length;p"u"){for(var l=document.getElementsByTagName("script"),f=0;f"u")throw new Error("Path to alasql.js is not specified");if(n!==!1){var u="importScripts('";u+=n,u+="');self.onmessage = function(event) {alasql(event.data.sql,event.data.params, function(data){postMessage({id:event.data.id, data:data});});}";var p=new Blob([u],{type:"text/plain"});if(t.webworker=new Worker(URL.createObjectURL(p)),t.webworker.onmessage=function(b){var U=b.data.id;t.buffer[U](b.data.data),delete t.buffer[U]},t.webworker.onerror=function(b){throw b},arguments.length>1){var h="REQUIRE "+c.map(function(b){return'"'+b+'"'}).join(",");t(h,[],o)}}else if(n===!1){delete t.webworker;return}});var Yi=Yi||(function(n){"use strict";if(!(typeof n>"u"||typeof navigator<"u"&&/MSIE [1-9]\./.test(navigator.userAgent))){var c=n.document,o=function(){return n.URL||n.webkitURL||n},l=c.createElementNS("http://www.w3.org/1999/xhtml","a"),f="download"in l,u=function(F){var N=new MouseEvent("click");F.dispatchEvent(N)},p=/constructor/i.test(n.HTMLElement)||n.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent),b=function(F){(n.setImmediate||n.setTimeout)(function(){throw F},0)},U="application/octet-stream",R=1e3*40,L=function(F){var N=function(){typeof F=="string"?o().revokeObjectURL(F):F.remove()};setTimeout(N,R)},T=function(F,N,Ae){N=[].concat(N);for(var je=N.length;je--;){var Ot=F["on"+N[je]];if(typeof Ot=="function")try{Ot.call(F,Ae||F)}catch(Oe){b(Oe)}}},C=function(F){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(F.type)?new Blob(["\uFEFF",F],{type:F.type}):F},te=function(F,N,Ae){Ae||(F=C(F));var je=this,Ot=F.type,Oe=Ot===U,Te,ht=function(){T(je,"writestart progress write writeend".split(" "))},Tt=function(){if((h||Oe&&p)&&n.FileReader){var $t=new FileReader;$t.onloadend=function(){var le=h?$t.result:$t.result.replace(/^data:[^;]*;/,"data:attachment/file;"),mr=n.open(le,"_blank");mr||(n.location.href=le),le=void 0,je.readyState=je.DONE,ht()},$t.readAsDataURL(F),je.readyState=je.INIT;return}if(Te||(Te=o().createObjectURL(F)),Oe)n.location.href=Te;else{var yr=n.open(Te,"_blank");yr||(n.location.href=Te)}je.readyState=je.DONE,ht(),L(Te)};if(je.readyState=je.INIT,f){Te=o().createObjectURL(F),setTimeout(function(){l.href=Te,l.download=N,u(l),ht(),L(Te),je.readyState=je.DONE});return}Tt()},W=te.prototype,Y=function(F,N,Ae){return new te(F,N||F.name||"download",Ae)};return typeof navigator<"u"&&navigator.msSaveOrOpenBlob?function(F,N,Ae){return N=N||F.name||"download",Ae||(F=C(F)),navigator.msSaveOrOpenBlob(F,N)}:(W.abort=function(){},W.readyState=W.INIT=0,W.WRITING=1,W.DONE=2,W.error=W.onwritestart=W.onprogress=W.onwrite=W.onabort=W.onerror=W.onwriteend=null,Y)}})(typeof self<"u"&&self||typeof window<"u"&&window||this.content);typeof $3<"u"&&$3.exports?$3.exports.saveAs=Yi:typeof define<"u"&&define!==null&&define.amd!==null&&define("FileSaver.js",function(){return Yi}),(s.isCordova||s.isMeteorServer||s.isNode)&&console.log("It looks like you are using the browser version of AlaSQL. Please use the alasql.fs.js file instead."),t.utils.saveAs=Yi}return new Si("alasql"),t.use("alasql"),t})});function hg(t,e){function r(i,s){let a,d;ww(i)?(d=i.handler,a=i.event):(a=i,d=s);let m=dg(a,e?.caseInsensitive),v=t[m];if(!v)return;let _=v.findIndex(x=>x.handler===d);_===-1||_>=v.length||v.splice(_,1)}return r}function Tw(t){return Object.keys(t)}var g9,Ew,dg,y9,ww,Aw,b9,v9,_9,Iw,r0,Ow,x9,S9=Dt(()=>{g9=new window.BroadcastChannel("pub-sub-es"),Ew=t=>typeof t=="string",dg=(t,e)=>Ew(t)&&e?t.toLowerCase():t,y9=(t,e)=>(r,i,s=Number.POSITIVE_INFINITY)=>{let a=dg(r,e?.caseInsensitive),d=t[a]||[];return d.push({handler:i,times:+s||Number.POSITIVE_INFINITY}),t[a]=d,{event:a,handler:i}},ww=t=>typeof t=="object";Aw=t=>!!t,b9=(t,e)=>{let r=hg(t);return(...i)=>{let[s,a,d]=i,m=dg(s,e?.caseInsensitive),v=t[m];if(!Aw(v))return;let _=[...v];for(let I of _)--I.times<1&&r(m,I.handler);let x=d?.async!==void 0?d.async:e?.async,w=()=>{for(let I of _)I.handler(a)};if(x?setTimeout(w,0):w(),e?.isGlobal&&!d?.isNoGlobalBroadcast)try{g9.postMessage({event:m,news:a})}catch(I){if(I instanceof Error&&I.name==="DataCloneError")console.warn(`Could not broadcast '${m.toString()}' globally. Payload is not clonable.`);else throw I}}};v9=t=>()=>{for(let e of Tw(t))delete t[e]},_9=()=>({}),Iw=t=>{let e=!!t?.async,r=!!t?.caseInsensitive,i=t?.stack||_9();return{publish:b9(i,{async:e,caseInsensitive:r}),subscribe:y9(i,{caseInsensitive:r}),unsubscribe:hg(i,{caseInsensitive:r}),clear:v9(i),stack:i}},r0=_9(),Ow={publish:b9(r0,{isGlobal:!0}),subscribe:y9(r0),unsubscribe:hg(r0),clear:v9(r0),stack:r0};g9.onmessage=({data:{event:t,news:e}})=>Ow.publish(t,e,{isNoGlobalBroadcast:!0});x9=Iw});var r6=Zg((pg,mg)=>{(function(t,e){typeof pg=="object"&&typeof mg<"u"?mg.exports=e():typeof define=="function"&&define.amd?define(e):t.createREGL=e()})(pg,(function(){"use strict";var t=function(E){return E instanceof Uint8Array||E instanceof Uint16Array||E instanceof Uint32Array||E instanceof Int8Array||E instanceof Int16Array||E instanceof Int32Array||E instanceof Float32Array||E instanceof Float64Array||E instanceof Uint8ClampedArray},e=function(E,k){for(var Z=Object.keys(k),Ge=0;Ge"u";case"symbol":return typeof E=="symbol"}}function x(E,k,Z){_(E,k)||s("invalid parameter type"+d(Z)+". expected "+k+", got "+typeof E)}function w(E,k){E>=0&&(E|0)===E||s("invalid parameter type, ("+E+")"+d(k)+". must be a nonnegative integer")}function I(E,k,Z){k.indexOf(E)<0&&s("invalid value"+d(Z)+". must be one of: "+k)}var O=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function z(E){Object.keys(E).forEach(function(k){O.indexOf(k)<0&&s('invalid regl constructor argument "'+k+'". must be one of '+O)})}function J(E,k){for(E=E+"";E.length0&&k.push(new se("unknown",0,Z))}}),k}function B(E,k){k.forEach(function(Z){var Ge=E[Z.file];if(Ge){var Ct=Ge.index[Z.line];if(Ct){Ct.errors.push(Z),Ge.hasErrors=!0;return}}E.unknown.hasErrors=!0,E.unknown.lines[0].errors.push(Z)})}function he(E,k,Z,Ge,Ct){if(!E.getShaderParameter(k,E.COMPILE_STATUS)){var Be=E.getShaderInfoLog(k),ft=Ge===E.FRAGMENT_SHADER?"fragment":"vertex";In(Z,"string",ft+" shader source must be a string",Ct);var Pt=ue(Z,Ct),Ut=K(Be);B(Pt,Ut),Object.keys(Pt).forEach(function(Qt){var rr=Pt[Qt];if(!rr.hasErrors)return;var Zt=[""],vr=[""];function Gt(Yt,_e){Zt.push(Yt),vr.push(_e||"")}Gt("file number "+Qt+": "+rr.name+` +`,"color:red;text-decoration:underline;font-weight:bold"),rr.lines.forEach(function(Yt){if(Yt.errors.length>0){Gt(J(Yt.number,4)+"| ","background-color:yellow; font-weight:bold"),Gt(Yt.line+r,"color:red; background-color:yellow; font-weight:bold");var _e=0;Yt.errors.forEach(function(Ve){var Ht=Ve.message,or=/^\s*'(.*)'\s*:\s*(.*)$/.exec(Ht);if(or){var Mt=or[1];Ht=or[2],Mt==="assign"&&(Mt="="),_e=Math.max(Yt.line.indexOf(Mt,_e),0)}else _e=0;Gt(J("| ",6)),Gt(J("^^^",_e+3)+r,"font-weight:bold"),Gt(J("| ",6)),Gt(Ht+r,"font-weight:bold")}),Gt(J("| ",6)+r)}else Gt(J(Yt.number,4)+"| "),Gt(Yt.line+r,"color:red")}),typeof document<"u"&&!window.chrome?(vr[0]=Zt.join("%c"),console.log.apply(console,vr)):console.log(Zt.join(""))}),a.raise("Error compiling "+ft+" shader, "+Pt[0].name)}}function He(E,k,Z,Ge,Ct){if(!E.getProgramParameter(k,E.LINK_STATUS)){var Be=E.getProgramInfoLog(k),ft=ue(Z,Ct),Pt=ue(Ge,Ct),Ut='Error linking program with vertex shader, "'+Pt[0].name+'", and fragment shader "'+ft[0].name+'"';typeof document<"u"?console.log("%c"+Ut+r+"%c"+Be,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(Ut+r+Be),a.raise(Ut)}}function er(E){E._commandRef=re()}function Er(E,k,Z,Ge){er(E);function Ct(Ut){return Ut?Ge.id(Ut):0}E._fragId=Ct(E.static.frag),E._vertId=Ct(E.static.vert);function Be(Ut,Qt){Object.keys(Qt).forEach(function(rr){Ut[Ge.id(rr)]=!0})}var ft=E._uniformSet={};Be(ft,k.static),Be(ft,k.dynamic);var Pt=E._attributeSet={};Be(Pt,Z.static),Be(Pt,Z.dynamic),E._hasCount="count"in E.static||"count"in E.dynamic||"elements"in E.static||"elements"in E.dynamic}function zt(E,k){var Z=q();s(E+" in command "+(k||re())+(Z==="unknown"?"":" called from "+Z))}function _n(E,k,Z){E||zt(k,Z||re())}function $r(E,k,Z,Ge){E in k||zt("unknown parameter ("+E+")"+d(Z)+". possible values: "+Object.keys(k).join(),Ge||re())}function In(E,k,Z,Ge){_(E,k)||zt("invalid parameter type"+d(Z)+". expected "+k+", got "+typeof E,Ge||re())}function On(E){E()}function cr(E,k,Z){E.texture?I(E.texture._texture.internalformat,k,"unsupported texture format for attachment"):I(E.renderbuffer._renderbuffer.format,Z,"unsupported renderbuffer format for attachment")}var bn=33071,mn=9728,qn=9984,Wt=9985,Pr=9986,gi=9987,Ii=5120,yi=5121,as=5122,Ha=5123,ar=5124,Ki=5125,zs=5126,ta=32819,so=32820,wn=33635,wi=34042,Ci=36193,fi={};fi[Ii]=fi[yi]=1,fi[as]=fi[Ha]=fi[Ci]=fi[wn]=fi[ta]=fi[so]=2,fi[ar]=fi[Ki]=fi[zs]=fi[wi]=4;function Si(E,k){return E===so||E===ta||E===wn?2:E===wi?4:fi[E]*k}function qi(E){return!(E&E-1)&&!!E}function Do(E,k,Z){var Ge,Ct=k.width,Be=k.height,ft=k.channels;a(Ct>0&&Ct<=Z.maxTextureSize&&Be>0&&Be<=Z.maxTextureSize,"invalid texture shape"),(E.wrapS!==bn||E.wrapT!==bn)&&a(qi(Ct)&&qi(Be),"incompatible wrap mode for texture, both width and height must be power of 2"),k.mipmask===1?Ct!==1&&Be!==1&&a(E.minFilter!==qn&&E.minFilter!==Pr&&E.minFilter!==Wt&&E.minFilter!==gi,"min filter requires mipmap"):(a(qi(Ct)&&qi(Be),"texture must be a square power of 2 to support mipmapping"),a(k.mipmask===(Ct<<1)-1,"missing or incomplete mipmap data")),k.type===zs&&(Z.extensions.indexOf("oes_texture_float_linear")<0&&a(E.minFilter===mn&&E.magFilter===mn,"filter not supported, must enable oes_texture_float_linear"),a(!E.genMipmaps,"mipmap generation not supported with float textures"));var Pt=k.images;for(Ge=0;Ge<16;++Ge)if(Pt[Ge]){var Ut=Ct>>Ge,Qt=Be>>Ge;a(k.mipmask&1<0&&Ct<=Ge.maxTextureSize&&Be>0&&Be<=Ge.maxTextureSize,"invalid texture shape"),a(Ct===Be,"cube map must be square"),a(k.wrapS===bn&&k.wrapT===bn,"wrap mode not supported by cube map");for(var Pt=0;Pt>rr,Gt=Be>>rr;a(Ut.mipmask&1<1&&k===Z&&(k==='"'||k==="'"))return['"'+Ro(E.substr(1,E.length-2))+'"'];var Ge=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(E);if(Ge)return ps(E.substr(0,Ge.index)).concat(ps(Ge[1])).concat(ps(E.substr(Ge.index+Ge[0].length)));var Ct=E.split(".");if(Ct.length===1)return['"'+Ro(E)+'"'];for(var Be=[],ft=0;ft"u"?1:window.devicePixelRatio,rr=!1,Zt=function(Yt){Yt&&$.raise(Yt)},vr=function(){};if(typeof k=="string"?($(typeof document<"u","selector queries only supported in DOM environments"),Z=document.querySelector(k),$(Z,"invalid query string for element")):typeof k=="object"?ko(k)?Z=k:$c(k)?(Be=k,Ct=Be.canvas):($.constructor(k),"gl"in k?Be=k.gl:"canvas"in k?Ct=un(k.canvas):"container"in k&&(Ge=un(k.container)),"attributes"in k&&(ft=k.attributes,$.type(ft,"object","invalid context attributes")),"extensions"in k&&(Pt=Pn(k.extensions)),"optionalExtensions"in k&&(Ut=Pn(k.optionalExtensions)),"onDone"in k&&($.type(k.onDone,"function","invalid or missing onDone callback"),Zt=k.onDone),"profile"in k&&(rr=!!k.profile),"pixelRatio"in k&&(Qt=+k.pixelRatio,$(Qt>0,"invalid pixel ratio"))):$.raise("invalid arguments to regl"),Z&&(Z.nodeName.toLowerCase()==="canvas"?Ct=Z:Ge=Z),!Be){if(!Ct){$(typeof document<"u","must manually specify webgl context outside of DOM environments");var Gt=F1(Ge||document.body,Zt,Qt);if(!Gt)return null;Ct=Gt.canvas,vr=Gt.onDestroy}ft.premultipliedAlpha===void 0&&(ft.premultipliedAlpha=!0),Be=Bo(Ct,ft)}return Be?{gl:Be,canvas:Ct,container:Ge,extensions:Pt,optionalExtensions:Ut,pixelRatio:Qt,profile:rr,onDone:Zt,onDestroy:vr}:(vr(),Zt("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function bi(E,k){var Z={};function Ge(ft){$.type(ft,"string","extension name must be string");var Pt=ft.toLowerCase(),Ut;try{Ut=Z[Pt]=E.getExtension(Pt)}catch{}return!!Ut}for(var Ct=0;Ct65535)<<4,E>>>=k,Z=(E>255)<<3,E>>>=Z,k|=Z,Z=(E>15)<<2,E>>>=Z,k|=Z,Z=(E>3)<<1,E>>>=Z,k|=Z,k|E>>1}function g1(){var E=ai(8,function(){return[]});function k(Be){var ft=is(Be),Pt=E[ls(ft)>>2];return Pt.length>0?Pt.pop():new ArrayBuffer(ft)}function Z(Be){E[ls(Be.byteLength)>>2].push(Be)}function Ge(Be,ft){var Pt=null;switch(Be){case Vi:Pt=new Int8Array(k(ft),0,ft);break;case Li:Pt=new Uint8Array(k(ft),0,ft);break;case di:Pt=new Int16Array(k(2*ft),0,ft);break;case es:Pt=new Uint16Array(k(2*ft),0,ft);break;case Ln:Pt=new Int32Array(k(4*ft),0,ft);break;case Hn:Pt=new Uint32Array(k(4*ft),0,ft);break;case Ni:Pt=new Float32Array(k(4*ft),0,ft);break;default:return null}return Pt.length!==ft?Pt.subarray(0,ft):Pt}function Ct(Be){Z(Be.buffer)}return{alloc:k,free:Z,allocType:Ge,freeType:Ct}}var Wi=g1();Wi.zero=g1();var Ll=3408,N2=3410,ca=3411,ff=3412,df=3413,ic=3414,Nl=3415,Ko=33901,Fo=33902,hf=3379,sc=3386,vu=34921,Wa=36347,M1=36348,Jn=35661,tl=35660,Ns=34930,Yi=36349,n=34076,c=34024,o=7936,l=7937,f=7938,u=35724,p=34047,h=36063,b=34852,U=3553,R=34067,L=34069,T=33984,C=6408,te=5126,W=5121,Y=36160,F=36053,N=36064,Ae=16384,je=function(E,k){var Z=1;k.ext_texture_filter_anisotropic&&(Z=E.getParameter(p));var Ge=1,Ct=1;k.webgl_draw_buffers&&(Ge=E.getParameter(b),Ct=E.getParameter(h));var Be=!!k.oes_texture_float;if(Be){var ft=E.createTexture();E.bindTexture(U,ft),E.texImage2D(U,0,C,1,1,0,C,te,null);var Pt=E.createFramebuffer();if(E.bindFramebuffer(Y,Pt),E.framebufferTexture2D(Y,N,U,ft,0),E.bindTexture(U,null),E.checkFramebufferStatus(Y)!==F)Be=!1;else{E.viewport(0,0,1,1),E.clearColor(1,0,0,1),E.clear(Ae);var Ut=Wi.allocType(te,4);E.readPixels(0,0,1,1,C,te,Ut),E.getError()?Be=!1:(E.deleteFramebuffer(Pt),E.deleteTexture(ft),Be=Ut[0]===1),Wi.freeType(Ut)}}var Qt=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),rr=!0;if(!Qt){var Zt=E.createTexture(),vr=Wi.allocType(W,36);E.activeTexture(T),E.bindTexture(R,Zt),E.texImage2D(L,0,C,3,3,0,C,W,vr),Wi.freeType(vr),E.bindTexture(R,null),E.deleteTexture(Zt),rr=!E.getError()}return{colorBits:[E.getParameter(N2),E.getParameter(ca),E.getParameter(ff),E.getParameter(df)],depthBits:E.getParameter(ic),stencilBits:E.getParameter(Nl),subpixelBits:E.getParameter(Ll),extensions:Object.keys(k).filter(function(Gt){return!!k[Gt]}),maxAnisotropic:Z,maxDrawbuffers:Ge,maxColorAttachments:Ct,pointSizeDims:E.getParameter(Ko),lineWidthDims:E.getParameter(Fo),maxViewportDims:E.getParameter(sc),maxCombinedTextureUnits:E.getParameter(Jn),maxCubeMapSize:E.getParameter(n),maxRenderbufferSize:E.getParameter(c),maxTextureUnits:E.getParameter(Ns),maxTextureSize:E.getParameter(hf),maxAttributes:E.getParameter(vu),maxVertexUniforms:E.getParameter(Wa),maxVertexTextureUnits:E.getParameter(tl),maxVaryingVectors:E.getParameter(M1),maxFragmentUniforms:E.getParameter(Yi),glsl:E.getParameter(u),renderer:E.getParameter(l),vendor:E.getParameter(o),version:E.getParameter(f),readFloat:Be,npotTextureCube:rr}};function Ot(E){return!!E&&typeof E=="object"&&Array.isArray(E.shape)&&Array.isArray(E.stride)&&typeof E.offset=="number"&&E.shape.length===E.stride.length&&(Array.isArray(E.data)||t(E.data))}var Oe=function(E){return Object.keys(E).map(function(k){return E[k]})},Te={shape:mr,flatten:le};function ht(E,k,Z){for(var Ge=0;Ge0){var Sn;if(Array.isArray(Ve[0])){Rr=gs(Ve);for(var Nt=1,Lt=1;Lt0)if(typeof Nt[0]=="number"){var jt=Wi.allocType(Mt.dtype,Nt.length);Pc(jt,Nt),Rr(jt,Wr),Wi.freeType(jt)}else if(Array.isArray(Nt[0])||t(Nt[0])){gr=gs(Nt);var xr=ms(Nt,gr,Mt.dtype);Rr(xr,Wr),Wi.freeType(xr)}else $.raise("invalid buffer data")}else if(Ot(Nt)){gr=Nt.shape;var Sr=Nt.stride,zn=0,Fn=0,Cr=0,Nr=0;gr.length===1?(zn=gr[0],Fn=1,Cr=Sr[0],Nr=0):gr.length===2?(zn=gr[0],Fn=gr[1],Cr=Sr[0],Nr=Sr[1]):$.raise("invalid shape");var Rn=Array.isArray(Nt.data)?Mt.dtype:$o(Nt.data),Mn=Wi.allocType(Rn,zn*Fn);ac(Mn,Nt.data,zn,Fn,Cr,Nr,Nt.offset),Rr(Mn,Wr),Wi.freeType(Mn)}else $.raise("invalid data for buffer subdata");return Mr}return Ht||Mr(_e),Mr._reglType="buffer",Mr._buffer=Mt,Mr.subdata=Sn,Z.profile&&(Mr.stats=Mt.stats),Mr.destroy=function(){vr(Mt)},Mr}function Yt(){Oe(Be).forEach(function(_e){_e.buffer=E.createBuffer(),E.bindBuffer(_e.type,_e.buffer),E.bufferData(_e.type,_e.persistentData||_e.byteLength,_e.usage)})}return Z.profile&&(k.getTotalBufferSize=function(){var _e=0;return Object.keys(Be).forEach(function(Ve){_e+=Be[Ve].stats.size}),_e}),{create:Gt,createStream:Ut,destroyStream:Qt,clear:function(){Oe(Be).forEach(vr),Pt.forEach(vr)},getBuffer:function(_e){return _e&&_e._buffer instanceof ft?_e._buffer:null},restore:Yt,_initBuffer:Zt}}var Ce=0,Uc=0,$1=1,oc=1,Zo=4,Fe=4,Xi={points:Ce,point:Uc,lines:$1,line:oc,triangles:Zo,triangle:Fe,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Me=0,$e=1,Le=4,be=5120,Ne=5121,lc=5122,cc=5123,pf=5124,P1=5125,It=34963,De=35040,Pe=35044;function vt(E,k,Z,Ge){var Ct={},Be=0,ft={uint8:Ne,uint16:cc};k.oes_element_index_uint&&(ft.uint32=P1);function Pt(Yt){this.id=Be++,Ct[this.id]=this,this.buffer=Yt,this.primType=Le,this.vertCount=0,this.type=0}Pt.prototype.bind=function(){this.buffer.bind()};var Ut=[];function Qt(Yt){var _e=Ut.pop();return _e||(_e=new Pt(Z.create(null,It,!0,!1)._buffer)),Zt(_e,Yt,De,-1,-1,0,0),_e}function rr(Yt){Ut.push(Yt)}function Zt(Yt,_e,Ve,Ht,or,Mt,Mr){Yt.buffer.bind();var Rr;if(_e){var Sn=Mr;!Mr&&(!t(_e)||Ot(_e)&&!t(_e.data))&&(Sn=k.oes_element_index_uint?P1:cc),Z._initBuffer(Yt.buffer,_e,Ve,Sn,3)}else E.bufferData(It,Mt,Ve),Yt.buffer.dtype=Rr||Ne,Yt.buffer.usage=Ve,Yt.buffer.dimension=3,Yt.buffer.byteLength=Mt;if(Rr=Mr,!Mr){switch(Yt.buffer.dtype){case Ne:case be:Rr=Ne;break;case cc:case lc:Rr=cc;break;case P1:case pf:Rr=P1;break;default:$.raise("unsupported type for element array")}Yt.buffer.dtype=Rr}Yt.type=Rr,$(Rr!==P1||!!k.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var Nt=or;Nt<0&&(Nt=Yt.buffer.byteLength,Rr===cc?Nt>>=1:Rr===P1&&(Nt>>=2)),Yt.vertCount=Nt;var Lt=Ht;if(Ht<0){Lt=Le;var Wr=Yt.buffer.dimension;Wr===1&&(Lt=Me),Wr===2&&(Lt=$e),Wr===3&&(Lt=Le)}Yt.primType=Lt}function vr(Yt){Ge.elementsCount--,$(Yt.buffer!==null,"must not double destroy elements"),delete Ct[Yt.id],Yt.buffer.destroy(),Yt.buffer=null}function Gt(Yt,_e){var Ve=Z.create(null,It,!0),Ht=new Pt(Ve._buffer);Ge.elementsCount++;function or(Mt){if(!Mt)Ve(),Ht.primType=Le,Ht.vertCount=0,Ht.type=Ne;else if(typeof Mt=="number")Ve(Mt),Ht.primType=Le,Ht.vertCount=Mt|0,Ht.type=Ne;else{var Mr=null,Rr=Pe,Sn=-1,Nt=-1,Lt=0,Wr=0;Array.isArray(Mt)||t(Mt)||Ot(Mt)?Mr=Mt:($.type(Mt,"object","invalid arguments for elements"),"data"in Mt&&(Mr=Mt.data,$(Array.isArray(Mr)||t(Mr)||Ot(Mr),"invalid data for element buffer")),"usage"in Mt&&($.parameter(Mt.usage,oi,"invalid element buffer usage"),Rr=oi[Mt.usage]),"primitive"in Mt&&($.parameter(Mt.primitive,Xi,"invalid element buffer primitive"),Sn=Xi[Mt.primitive]),"count"in Mt&&($(typeof Mt.count=="number"&&Mt.count>=0,"invalid vertex count for elements"),Nt=Mt.count|0),"type"in Mt&&($.parameter(Mt.type,ft,"invalid buffer type"),Wr=ft[Mt.type]),"length"in Mt?Lt=Mt.length|0:(Lt=Nt,Wr===cc||Wr===lc?Lt*=2:(Wr===P1||Wr===pf)&&(Lt*=4))),Zt(Ht,Mr,Rr,Sn,Nt,Lt,Wr)}return or}return or(Yt),or._reglType="elements",or._elements=Ht,or.subdata=function(Mt,Mr){return Ve.subdata(Mt,Mr),or},or.destroy=function(){vr(Ht)},or}return{create:Gt,createStream:Qt,destroyStream:rr,getElements:function(Yt){return typeof Yt=="function"&&Yt._elements instanceof Pt?Yt._elements:null},clear:function(){Oe(Ct).forEach(vr)}}}var ve=new Float32Array(1),it=new Uint32Array(ve.buffer),pt=5123;function Ee(E){for(var k=Wi.allocType(pt,E.length),Z=0;Z>>31<<15,Be=(Ge<<1>>>24)-127,ft=Ge>>13&1023;if(Be<-24)k[Z]=Ct;else if(Be<-14){var Pt=-14-Be;k[Z]=Ct+(ft+1024>>Pt)}else Be>15?k[Z]=Ct+31744:k[Z]=Ct+(Be+15<<10)+ft}return k}function Ue(E){return Array.isArray(E)||t(E)}var _t=function(E){return!(E&E-1)&&!!E},mt=34467,me=3553,gt=34067,We=34069,qe=6408,at=6406,ct=6407,ot=6409,ut=6410,dt=32854,yt=32855,xt=36194,Xe=32819,Je=32820,rt=33635,Ke=34042,ze=6402,Ye=34041,Qe=35904,Ze=35906,et=36193,nt=33776,Re=33777,st=33778,bt=33779,St=35986,we=35987,Et=34798,wt=35840,At=35841,ge=35842,pe=35843,rl=36196,U1=5121,uc=5123,Vc=5125,Po=5126,Dl=10242,_u=10243,U3=10497,Gc=33071,hn=33648,ys=10240,xu=10241,jc=9728,V1=9729,Su=9984,Ea=9985,y1=9986,b1=9987,mf=33170,fc=4352,V3=4353,X=4354,G3=34046,gf=3317,D2=37440,R2=37441,Rl=37443,Bl=37444,qc=33984,B2=[Su,y1,Ea,b1],Uo=[0,ot,ut,ct,qe],oo={};oo[ot]=oo[at]=oo[ze]=1,oo[Ye]=oo[ut]=2,oo[ct]=oo[Qe]=3,oo[qe]=oo[Ze]=4;function nl(E){return"[object "+E+"]"}var Oo=nl("HTMLCanvasElement"),G1=nl("OffscreenCanvas"),v1=nl("CanvasRenderingContext2D"),k2=nl("ImageBitmap"),lo=nl("HTMLImageElement"),Eu=nl("HTMLVideoElement"),yf=Object.keys(Vt).concat([Oo,G1,v1,k2,lo,Eu]),il=[];il[U1]=1,il[Po]=4,il[et]=2,il[uc]=2,il[Vc]=4;var Dr=[];Dr[dt]=2,Dr[yt]=2,Dr[xt]=2,Dr[Ye]=4,Dr[nt]=.5,Dr[Re]=.5,Dr[st]=1,Dr[bt]=1,Dr[St]=.5,Dr[we]=1,Dr[Et]=1,Dr[wt]=.5,Dr[At]=.25,Dr[ge]=.5,Dr[pe]=.25,Dr[rl]=.5;function Ur(E){return Array.isArray(E)&&(E.length===0||typeof E[0]=="number")}function Ft(E){if(!Array.isArray(E))return!1;var k=E.length;return!(k===0||!Ue(E[0]))}function Rt(E){return Object.prototype.toString.call(E)}function tr(E){return Rt(E)===Oo}function bf(E){return Rt(E)===G1}function ur(E){return Rt(E)===v1}function nr(E){return Rt(E)===k2}function fr(E){return Rt(E)===lo}function fn(E){return Rt(E)===Eu}function an(E){if(!E)return!1;var k=Rt(E);return yf.indexOf(k)>=0?!0:Ur(E)||Ft(E)||Ot(E)}function wr(E){return Vt[Object.prototype.toString.call(E)]|0}function Lr(E,k){var Z=k.length;switch(E.type){case U1:case uc:case Vc:case Po:var Ge=Wi.allocType(E.type,Z);Ge.set(k),E.data=Ge;break;case et:E.data=Ee(k);break;default:$.raise("unsupported texture type, must specify a typed array")}}function pn(E,k){return Wi.allocType(E.type===et?Po:E.type,k)}function vn(E,k){E.type===et?(E.data=Ee(k),Wi.freeType(k)):E.data=k}function xn(E,k,Z,Ge,Ct,Be){for(var ft=E.width,Pt=E.height,Ut=E.channels,Qt=ft*Pt*Ut,rr=pn(E,Qt),Zt=0,vr=0;vr=1;)Pt+=ft*Ut*Ut,Ut/=2;return Pt}else return ft*Z*Ge}function ir(E,k,Z,Ge,Ct,Be,ft){var Pt={"don't care":fc,"dont care":fc,nice:X,fast:V3},Ut={repeat:U3,clamp:Gc,mirror:hn},Qt={nearest:jc,linear:V1},rr=e({mipmap:b1,"nearest mipmap nearest":Su,"linear mipmap nearest":Ea,"nearest mipmap linear":y1,"linear mipmap linear":b1},Qt),Zt={none:0,browser:Bl},vr={uint8:U1,rgba4:Xe,rgb565:rt,"rgb5 a1":Je},Gt={alpha:at,luminance:ot,"luminance alpha":ut,rgb:ct,rgba:qe,rgba4:dt,"rgb5 a1":yt,rgb565:xt},Yt={};k.ext_srgb&&(Gt.srgb=Qe,Gt.srgba=Ze),k.oes_texture_float&&(vr.float32=vr.float=Po),k.oes_texture_half_float&&(vr.float16=vr["half float"]=et),k.webgl_depth_texture&&(e(Gt,{depth:ze,"depth stencil":Ye}),e(vr,{uint16:uc,uint32:Vc,"depth stencil":Ke})),k.webgl_compressed_texture_s3tc&&e(Yt,{"rgb s3tc dxt1":nt,"rgba s3tc dxt1":Re,"rgba s3tc dxt3":st,"rgba s3tc dxt5":bt}),k.webgl_compressed_texture_atc&&e(Yt,{"rgb atc":St,"rgba atc explicit alpha":we,"rgba atc interpolated alpha":Et}),k.webgl_compressed_texture_pvrtc&&e(Yt,{"rgb pvrtc 4bppv1":wt,"rgb pvrtc 2bppv1":At,"rgba pvrtc 4bppv1":ge,"rgba pvrtc 2bppv1":pe}),k.webgl_compressed_texture_etc1&&(Yt["rgb etc1"]=rl);var _e=Array.prototype.slice.call(E.getParameter(mt));Object.keys(Yt).forEach(function(H){var tt=Yt[H];_e.indexOf(tt)>=0&&(Gt[H]=tt)});var Ve=Object.keys(Gt);Z.textureFormats=Ve;var Ht=[];Object.keys(Gt).forEach(function(H){var tt=Gt[H];Ht[tt]=H});var or=[];Object.keys(vr).forEach(function(H){var tt=vr[H];or[tt]=H});var Mt=[];Object.keys(Qt).forEach(function(H){var tt=Qt[H];Mt[tt]=H});var Mr=[];Object.keys(rr).forEach(function(H){var tt=rr[H];Mr[tt]=H});var Rr=[];Object.keys(Ut).forEach(function(H){var tt=Ut[H];Rr[tt]=H});var Sn=Ve.reduce(function(H,tt){var ke=Gt[tt];return ke===ot||ke===at||ke===ot||ke===ut||ke===ze||ke===Ye||k.ext_srgb&&(ke===Qe||ke===Ze)?H[ke]=ke:ke===yt||tt.indexOf("rgba")>=0?H[ke]=qe:H[ke]=ct,H},{});function Nt(){this.internalformat=qe,this.format=qe,this.type=U1,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=Bl,this.width=0,this.height=0,this.channels=0}function Lt(H,tt){H.internalformat=tt.internalformat,H.format=tt.format,H.type=tt.type,H.compressed=tt.compressed,H.premultiplyAlpha=tt.premultiplyAlpha,H.flipY=tt.flipY,H.unpackAlignment=tt.unpackAlignment,H.colorSpace=tt.colorSpace,H.width=tt.width,H.height=tt.height,H.channels=tt.channels}function Wr(H,tt){if(!(typeof tt!="object"||!tt)){if("premultiplyAlpha"in tt&&($.type(tt.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),H.premultiplyAlpha=tt.premultiplyAlpha),"flipY"in tt&&($.type(tt.flipY,"boolean","invalid texture flip"),H.flipY=tt.flipY),"alignment"in tt&&($.oneOf(tt.alignment,[1,2,4,8],"invalid texture unpack alignment"),H.unpackAlignment=tt.alignment),"colorSpace"in tt&&($.parameter(tt.colorSpace,Zt,"invalid colorSpace"),H.colorSpace=Zt[tt.colorSpace]),"type"in tt){var ke=tt.type;$(k.oes_texture_float||!(ke==="float"||ke==="float32"),"you must enable the OES_texture_float extension in order to use floating point textures."),$(k.oes_texture_half_float||!(ke==="half float"||ke==="float16"),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),$(k.webgl_depth_texture||!(ke==="uint16"||ke==="uint32"||ke==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),$.parameter(ke,vr,"invalid texture type"),H.type=vr[ke]}var Yr=H.width,_i=H.height,G=H.channels,D=!1;"shape"in tt?($(Array.isArray(tt.shape)&&tt.shape.length>=2,"shape must be an array"),Yr=tt.shape[0],_i=tt.shape[1],tt.shape.length===3&&(G=tt.shape[2],$(G>0&&G<=4,"invalid number of channels"),D=!0),$(Yr>=0&&Yr<=Z.maxTextureSize,"invalid width"),$(_i>=0&&_i<=Z.maxTextureSize,"invalid height")):("radius"in tt&&(Yr=_i=tt.radius,$(Yr>=0&&Yr<=Z.maxTextureSize,"invalid radius")),"width"in tt&&(Yr=tt.width,$(Yr>=0&&Yr<=Z.maxTextureSize,"invalid width")),"height"in tt&&(_i=tt.height,$(_i>=0&&_i<=Z.maxTextureSize,"invalid height")),"channels"in tt&&(G=tt.channels,$(G>0&&G<=4,"invalid number of channels"),D=!0)),H.width=Yr|0,H.height=_i|0,H.channels=G|0;var ie=!1;if("format"in tt){var ye=tt.format;$(k.webgl_depth_texture||!(ye==="depth"||ye==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),$.parameter(ye,Gt,"invalid texture format");var Se=H.internalformat=Gt[ye];H.format=Sn[Se],ye in vr&&("type"in tt||(H.type=vr[ye])),ye in Yt&&(H.compressed=!0),ie=!0}!D&&ie?H.channels=oo[H.format]:D&&!ie?H.channels!==Uo[H.format]&&(H.format=H.internalformat=Uo[H.channels]):ie&&D&&$(H.channels===oo[H.format],"number of channels inconsistent with specified format")}}function gr(H){E.pixelStorei(D2,H.flipY),E.pixelStorei(R2,H.premultiplyAlpha),E.pixelStorei(Rl,H.colorSpace),E.pixelStorei(gf,H.unpackAlignment)}function jt(){Nt.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function xr(H,tt){var ke=null;if(an(tt)?ke=tt:tt&&($.type(tt,"object","invalid pixel data type"),Wr(H,tt),"x"in tt&&(H.xOffset=tt.x|0),"y"in tt&&(H.yOffset=tt.y|0),an(tt.data)&&(ke=tt.data)),$(!H.compressed||ke instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),tt.copy){$(!ke,"can not specify copy and data field for the same texture");var Yr=Ct.viewportWidth,_i=Ct.viewportHeight;H.width=H.width||Yr-H.xOffset,H.height=H.height||_i-H.yOffset,H.needsCopy=!0,$(H.xOffset>=0&&H.xOffset=0&&H.yOffset<_i&&H.width>0&&H.width<=Yr&&H.height>0&&H.height<=_i,"copy texture read out of bounds")}else if(!ke)H.width=H.width||1,H.height=H.height||1,H.channels=H.channels||4;else if(t(ke))H.channels=H.channels||4,H.data=ke,!("type"in tt)&&H.type===U1&&(H.type=wr(ke));else if(Ur(ke))H.channels=H.channels||4,Lr(H,ke),H.alignment=1,H.needsFree=!0;else if(Ot(ke)){var G=ke.data;!Array.isArray(G)&&H.type===U1&&(H.type=wr(G));var D=ke.shape,ie=ke.stride,ye,Se,ce,ae,de,M;D.length===3?(ce=D[2],M=ie[2]):($(D.length===2,"invalid ndarray pixel data, must be 2 or 3D"),ce=1,M=1),ye=D[0],Se=D[1],ae=ie[0],de=ie[1],H.alignment=1,H.width=ye,H.height=Se,H.channels=ce,H.format=H.internalformat=Uo[ce],H.needsFree=!0,xn(H,G,ae,de,M,ke.offset)}else if(tr(ke)||bf(ke)||ur(ke))tr(ke)||bf(ke)?H.element=ke:H.element=ke.canvas,H.width=H.element.width,H.height=H.element.height,H.channels=4;else if(nr(ke))H.element=ke,H.width=ke.width,H.height=ke.height,H.channels=4;else if(fr(ke))H.element=ke,H.width=ke.naturalWidth,H.height=ke.naturalHeight,H.channels=4;else if(fn(ke))H.element=ke,H.width=ke.videoWidth,H.height=ke.videoHeight,H.channels=4;else if(Ft(ke)){var ne=H.width||ke[0].length,j=H.height||ke.length,xe=H.channels;Ue(ke[0][0])?xe=xe||ke[0][0].length:xe=xe||1;for(var Ie=Te.shape(ke),kt=1,hr=0;hr=0,"oes_texture_float extension not enabled"):H.type===et&&$(Z.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function Sr(H,tt,ke){var Yr=H.element,_i=H.data,G=H.internalformat,D=H.format,ie=H.type,ye=H.width,Se=H.height;gr(H),Yr?E.texImage2D(tt,ke,D,D,ie,Yr):H.compressed?E.compressedTexImage2D(tt,ke,G,ye,Se,0,_i):H.needsCopy?(Ge(),E.copyTexImage2D(tt,ke,D,H.xOffset,H.yOffset,ye,Se,0)):E.texImage2D(tt,ke,D,ye,Se,0,D,ie,_i||null)}function zn(H,tt,ke,Yr,_i){var G=H.element,D=H.data,ie=H.internalformat,ye=H.format,Se=H.type,ce=H.width,ae=H.height;gr(H),G?E.texSubImage2D(tt,_i,ke,Yr,ye,Se,G):H.compressed?E.compressedTexSubImage2D(tt,_i,ke,Yr,ie,ce,ae,D):H.needsCopy?(Ge(),E.copyTexSubImage2D(tt,_i,ke,Yr,H.xOffset,H.yOffset,ce,ae)):E.texSubImage2D(tt,_i,ke,Yr,ce,ae,ye,Se,D)}var Fn=[];function Cr(){return Fn.pop()||new jt}function Nr(H){H.needsFree&&Wi.freeType(H.data),jt.call(H),Fn.push(H)}function Rn(){Nt.call(this),this.genMipmaps=!1,this.mipmapHint=fc,this.mipmask=0,this.images=Array(16)}function Mn(H,tt,ke){var Yr=H.images[0]=Cr();H.mipmask=1,Yr.width=H.width=tt,Yr.height=H.height=ke,Yr.channels=H.channels=4}function Ei(H,tt){var ke=null;if(an(tt))ke=H.images[0]=Cr(),Lt(ke,H),xr(ke,tt),H.mipmask=1;else if(Wr(H,tt),Array.isArray(tt.mipmap))for(var Yr=tt.mipmap,_i=0;_i>=_i,ke.height>>=_i,xr(ke,Yr[_i]),H.mipmask|=1<<_i;else ke=H.images[0]=Cr(),Lt(ke,H),xr(ke,tt),H.mipmask=1;Lt(H,H.images[0]),H.compressed&&(H.internalformat===nt||H.internalformat===Re||H.internalformat===st||H.internalformat===bt)&&$(H.width%4===0&&H.height%4===0,"for compressed texture formats, mipmap level 0 must have width and height that are a multiple of 4")}function Ss(H,tt){for(var ke=H.images,Yr=0;Yr=0&&!("faces"in tt)&&(H.genMipmaps=!0)}if("mag"in tt){var Yr=tt.mag;$.parameter(Yr,Qt),H.magFilter=Qt[Yr]}var _i=H.wrapS,G=H.wrapT;if("wrap"in tt){var D=tt.wrap;typeof D=="string"?($.parameter(D,Ut),_i=G=Ut[D]):Array.isArray(D)&&($.parameter(D[0],Ut),$.parameter(D[1],Ut),_i=Ut[D[0]],G=Ut[D[1]])}else{if("wrapS"in tt){var ie=tt.wrapS;$.parameter(ie,Ut),_i=Ut[ie]}if("wrapT"in tt){var ye=tt.wrapT;$.parameter(ye,Ut),G=Ut[ye]}}if(H.wrapS=_i,H.wrapT=G,"anisotropic"in tt){var Se=tt.anisotropic;$(typeof Se=="number"&&Se>=1&&Se<=Z.maxAnisotropic,"aniso samples must be between 1 and "),H.anisotropic=tt.anisotropic}if("mipmap"in tt){var ce=!1;switch(typeof tt.mipmap){case"string":$.parameter(tt.mipmap,Pt,"invalid mipmap hint"),H.mipmapHint=Pt[tt.mipmap],H.genMipmaps=!0,ce=!0;break;case"boolean":ce=H.genMipmaps=tt.mipmap;break;case"object":$(Array.isArray(tt.mipmap),"invalid mipmap type"),H.genMipmaps=!1,ce=!0;break;default:$.raise("invalid mipmap type")}ce&&!("min"in tt)&&(H.minFilter=Su)}}function Zs(H,tt){E.texParameteri(tt,xu,H.minFilter),E.texParameteri(tt,ys,H.magFilter),E.texParameteri(tt,Dl,H.wrapS),E.texParameteri(tt,_u,H.wrapT),k.ext_texture_filter_anisotropic&&E.texParameteri(tt,G3,H.anisotropic),H.genMipmaps&&(E.hint(mf,H.mipmapHint),E.generateMipmap(tt))}var ea=0,ya={},Ua=Z.maxTextureUnits,Os=Array(Ua).map(function(){return null});function li(H){Nt.call(this),this.mipmask=0,this.internalformat=qe,this.id=ea++,this.refCount=1,this.target=H,this.texture=E.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new bs,ft.profile&&(this.stats={size:0})}function Va(H){E.activeTexture(qc),E.bindTexture(H.target,H.texture)}function ji(){var H=Os[0];H?E.bindTexture(H.target,H.texture):E.bindTexture(me,null)}function Nn(H){var tt=H.texture;$(tt,"must not double destroy texture");var ke=H.unit,Yr=H.target;ke>=0&&(E.activeTexture(qc+ke),E.bindTexture(Yr,null),Os[ke]=null),E.deleteTexture(tt),H.texture=null,H.params=null,H.pixels=null,H.refCount=0,delete ya[H.id],Be.textureCount--}e(li.prototype,{bind:function(){var H=this;H.bindCount+=1;var tt=H.unit;if(tt<0){for(var ke=0;ke0)continue;Yr.unit=-1}Os[ke]=H,tt=ke;break}tt>=Ua&&$.raise("insufficient number of texture units"),ft.profile&&Be.maxTextureUnits>de)-ce,M.height=M.height||(ke.height>>de)-ae,$(ke.type===M.type&&ke.format===M.format&&ke.internalformat===M.internalformat,"incompatible format for texture.subimage"),$(ce>=0&&ae>=0&&ce+M.width<=ke.width&&ae+M.height<=ke.height,"texture.subimage write out of bounds"),$(ke.mipmask&1<>ce;++ce){var ae=ye>>ce,de=Se>>ce;if(!ae||!de)break;E.texImage2D(me,ce,ke.format,ae,de,0,ke.format,ke.type,null)}return ji(),ft.profile&&(ke.stats.size=dr(ke.internalformat,ke.type,ye,Se,!1,!1)),Yr}return Yr(H,tt),Yr.subimage=_i,Yr.resize=G,Yr._reglType="texture2d",Yr._texture=ke,ft.profile&&(Yr.stats=ke.stats),Yr.destroy=function(){ke.decRef()},Yr}function Ri(H,tt,ke,Yr,_i,G){var D=new li(gt);ya[D.id]=D,Be.cubeCount++;var ie=new Array(6);function ye(ae,de,M,ne,j,xe){var Ie,kt=D.texInfo;for(bs.call(kt),Ie=0;Ie<6;++Ie)ie[Ie]=Ai();if(typeof ae=="number"||!ae){var hr=ae|0||1;for(Ie=0;Ie<6;++Ie)Mn(ie[Ie],hr,hr)}else if(typeof ae=="object")if(de)Ei(ie[0],ae),Ei(ie[1],de),Ei(ie[2],M),Ei(ie[3],ne),Ei(ie[4],j),Ei(ie[5],xe);else if(Gs(kt,ae),Wr(D,ae),"faces"in ae){var pr=ae.faces;for($(Array.isArray(pr)&&pr.length===6,"cube faces must be a length 6 array"),Ie=0;Ie<6;++Ie)$(typeof pr[Ie]=="object"&&!!pr[Ie],"invalid input for cube map face"),Lt(ie[Ie],D),Ei(ie[Ie],pr[Ie])}else for(Ie=0;Ie<6;++Ie)Ei(ie[Ie],ae);else $.raise("invalid arguments to cube map");for(Lt(D,ie[0]),$.optional(function(){Z.npotTextureCube||$(_t(D.width)&&_t(D.height),"your browser does not support non power or two texture dimensions")}),kt.genMipmaps?D.mipmask=(ie[0].width<<1)-1:D.mipmask=ie[0].mipmask,$.textureCube(D,kt,ie,Z),D.internalformat=ie[0].internalformat,ye.width=ie[0].width,ye.height=ie[0].height,Va(D),Ie=0;Ie<6;++Ie)Ss(ie[Ie],We+Ie);for(Zs(kt,gt),ji(),ft.profile&&(D.stats.size=dr(D.internalformat,D.type,ye.width,ye.height,kt.genMipmaps,!0)),ye.format=Ht[D.internalformat],ye.type=or[D.type],ye.mag=Mt[kt.magFilter],ye.min=Mr[kt.minFilter],ye.wrapS=Rr[kt.wrapS],ye.wrapT=Rr[kt.wrapT],Ie=0;Ie<6;++Ie)ts(ie[Ie]);return ye}function Se(ae,de,M,ne,j){$(!!de,"must specify image data"),$(typeof ae=="number"&&ae===(ae|0)&&ae>=0&&ae<6,"invalid face");var xe=M|0,Ie=ne|0,kt=j|0,hr=Cr();return Lt(hr,D),hr.width=0,hr.height=0,xr(hr,de),hr.width=hr.width||(D.width>>kt)-xe,hr.height=hr.height||(D.height>>kt)-Ie,$(D.type===hr.type&&D.format===hr.format&&D.internalformat===hr.internalformat,"incompatible format for texture.subimage"),$(xe>=0&&Ie>=0&&xe+hr.width<=D.width&&Ie+hr.height<=D.height,"texture.subimage write out of bounds"),$(D.mipmask&1<>ne;++ne)E.texImage2D(We+M,ne,D.format,de>>ne,de>>ne,0,D.format,D.type,null);return ji(),ft.profile&&(D.stats.size=dr(D.internalformat,D.type,ye.width,ye.height,!1,!0)),ye}}return ye(H,tt,ke,Yr,_i,G),ye.subimage=Se,ye.resize=ce,ye._reglType="textureCube",ye._texture=D,ft.profile&&(ye.stats=D.stats),ye.destroy=function(){D.decRef()},ye}function Cs(){for(var H=0;H>Yr,ke.height>>Yr,0,ke.internalformat,ke.type,null);else for(var _i=0;_i<6;++_i)E.texImage2D(We+_i,Yr,ke.internalformat,ke.width>>Yr,ke.height>>Yr,0,ke.internalformat,ke.type,null);Zs(ke.texInfo,ke.target)})}function H1(){for(var H=0;H=2,"invalid renderbuffer shape"),Mr=Lt[0]|0,Rr=Lt[1]|0}else"radius"in Nt&&(Mr=Rr=Nt.radius|0),"width"in Nt&&(Mr=Nt.width|0),"height"in Nt&&(Rr=Nt.height|0);"format"in Nt&&($.parameter(Nt.format,Be,"invalid renderbuffer format"),Sn=Be[Nt.format])}else typeof or=="number"?(Mr=or|0,typeof Mt=="number"?Rr=Mt|0:Rr=Mr):or?$.raise("invalid arguments to renderbuffer constructor"):Mr=Rr=1;if($(Mr>0&&Rr>0&&Mr<=Z.maxRenderbufferSize&&Rr<=Z.maxRenderbufferSize,"invalid renderbuffer size"),!(Mr===_e.width&&Rr===_e.height&&Sn===_e.format))return Ve.width=_e.width=Mr,Ve.height=_e.height=Rr,_e.format=Sn,E.bindRenderbuffer(Ar,_e.renderbuffer),E.renderbufferStorage(Ar,Sn,Mr,Rr),$(E.getError()===0,"invalid render buffer format"),Ct.profile&&(_e.stats.size=nn(_e.format,_e.width,_e.height)),Ve.format=ft[_e.format],Ve}function Ht(or,Mt){var Mr=or|0,Rr=Mt|0||Mr;return Mr===_e.width&&Rr===_e.height||($(Mr>0&&Rr>0&&Mr<=Z.maxRenderbufferSize&&Rr<=Z.maxRenderbufferSize,"invalid renderbuffer size"),Ve.width=_e.width=Mr,Ve.height=_e.height=Rr,E.bindRenderbuffer(Ar,_e.renderbuffer),E.renderbufferStorage(Ar,_e.format,Mr,Rr),$(E.getError()===0,"invalid render buffer format"),Ct.profile&&(_e.stats.size=nn(_e.format,_e.width,_e.height))),Ve}return Ve(Gt,Yt),Ve.resize=Ht,Ve._reglType="renderbuffer",Ve._renderbuffer=_e,Ct.profile&&(Ve.stats=_e.stats),Ve.destroy=function(){_e.decRef()},Ve}Ct.profile&&(Ge.getTotalRenderbufferSize=function(){var Gt=0;return Object.keys(Ut).forEach(function(Yt){Gt+=Ut[Yt].stats.size}),Gt});function vr(){Oe(Ut).forEach(function(Gt){Gt.renderbuffer=E.createRenderbuffer(),E.bindRenderbuffer(Ar,Gt.renderbuffer),E.renderbufferStorage(Ar,Gt.format,Gt.width,Gt.height)}),E.bindRenderbuffer(Ar,null)}return{create:Zt,clear:function(){Oe(Ut).forEach(rr)},restore:vr}},zr=36160,dn=36161,sn=3553,kr=34069,yn=36064,F2=36096,wu=36128,Hc=33306,Au=36053,j3=36054,q3=36055,H3=36057,ua=36061,z3=36193,dc=5121,M2=5126,Tu=6407,co=6408,Iu=6402,Is=[Tu,co],xs=[];xs[co]=4,xs[Tu]=3;var kl=[];kl[dc]=1,kl[M2]=4,kl[z3]=2;var W3=32854,Y3=32855,vf=36194,ki=33189,e1=36168,$2=34041,X3=35907,hc=34836,P2=34842,U2=34843,J3=[W3,Y3,vf,X3,P2,U2,hc],Co={};Co[Au]="complete",Co[j3]="incomplete attachment",Co[H3]="incomplete dimensions",Co[q3]="incomplete, missing attachment",Co[ua]="unsupported";function uo(E,k,Z,Ge,Ct,Be){var ft={cur:null,next:null,dirty:!1,setFBO:null},Pt=["rgba"],Ut=["rgba4","rgb565","rgb5 a1"];k.ext_srgb&&Ut.push("srgba"),k.ext_color_buffer_half_float&&Ut.push("rgba16f","rgb16f"),k.webgl_color_buffer_float&&Ut.push("rgba32f");var Qt=["uint8"];k.oes_texture_half_float&&Qt.push("half float","float16"),k.oes_texture_float&&Qt.push("float","float32");function rr(jt,xr,Sr){this.target=jt,this.texture=xr,this.renderbuffer=Sr;var zn=0,Fn=0;xr?(zn=xr.width,Fn=xr.height):Sr&&(zn=Sr.width,Fn=Sr.height),this.width=zn,this.height=Fn}function Zt(jt){jt&&(jt.texture&&jt.texture._texture.decRef(),jt.renderbuffer&&jt.renderbuffer._renderbuffer.decRef())}function vr(jt,xr,Sr){if(jt)if(jt.texture){var zn=jt.texture._texture,Fn=Math.max(1,zn.width),Cr=Math.max(1,zn.height);$(Fn===xr&&Cr===Sr,"inconsistent width/height for supplied texture"),zn.refCount+=1}else{var Nr=jt.renderbuffer._renderbuffer;$(Nr.width===xr&&Nr.height===Sr,"inconsistent width/height for renderbuffer"),Nr.refCount+=1}}function Gt(jt,xr){xr&&(xr.texture?E.framebufferTexture2D(zr,jt,xr.target,xr.texture._texture.texture,0):E.framebufferRenderbuffer(zr,jt,dn,xr.renderbuffer._renderbuffer.renderbuffer))}function Yt(jt){var xr=sn,Sr=null,zn=null,Fn=jt;typeof jt=="object"&&(Fn=jt.data,"target"in jt&&(xr=jt.target|0)),$.type(Fn,"function","invalid attachment data");var Cr=Fn._reglType;return Cr==="texture2d"?(Sr=Fn,$(xr===sn)):Cr==="textureCube"?(Sr=Fn,$(xr>=kr&&xr=2,"invalid shape for framebuffer"),Mn=Va[0],Ei=Va[1]}else"radius"in li&&(Mn=Ei=li.radius),"width"in li&&(Mn=li.width),"height"in li&&(Ei=li.height);("color"in li||"colors"in li)&&(Ai=li.color||li.colors,Array.isArray(Ai)&&$(Ai.length===1||k.webgl_draw_buffers,"multiple render targets not supported")),Ai||("colorCount"in li&&(Zs=li.colorCount|0,$(Zs>0,"invalid color buffer count")),"colorTexture"in li&&(ts=!!li.colorTexture,bs="rgba4"),"colorType"in li&&(Gs=li.colorType,ts?($(k.oes_texture_float||!(Gs==="float"||Gs==="float32"),"you must enable OES_texture_float in order to use floating point framebuffer objects"),$(k.oes_texture_half_float||!(Gs==="half float"||Gs==="float16"),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):Gs==="half float"||Gs==="float16"?($(k.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),bs="rgba16f"):(Gs==="float"||Gs==="float32")&&($(k.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),bs="rgba32f"),$.oneOf(Gs,Qt,"invalid color type")),"colorFormat"in li&&(bs=li.colorFormat,Pt.indexOf(bs)>=0?ts=!0:Ut.indexOf(bs)>=0?ts=!1:$.optional(function(){ts?$.oneOf(li.colorFormat,Pt,"invalid color format for texture"):$.oneOf(li.colorFormat,Ut,"invalid color format for renderbuffer")}))),("depthTexture"in li||"depthStencilTexture"in li)&&(Os=!!(li.depthTexture||li.depthStencilTexture),$(!Os||k.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in li&&(typeof li.depth=="boolean"?Ss=li.depth:(ea=li.depth,Ts=!1)),"stencil"in li&&(typeof li.stencil=="boolean"?Ts=li.stencil:(ya=li.stencil,Ss=!1)),"depthStencil"in li&&(typeof li.depthStencil=="boolean"?Ss=Ts=li.depthStencil:(Ua=li.depthStencil,Ss=!1,Ts=!1))}var ji=null,Nn=null,vi=null,Ri=null;if(Array.isArray(Ai))ji=Ai.map(Yt);else if(Ai)ji=[Yt(Ai)];else for(ji=new Array(Zs),Rn=0;Rn=0||ji[Rn].renderbuffer&&J3.indexOf(ji[Rn].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+Rn+" is invalid"),ji[Rn]&&ji[Rn].texture){var Go=xs[ji[Rn].texture._texture.format]*kl[ji[Rn].texture._texture.type];Cs===null?Cs=Go:$(Cs===Go,"all color attachments much have the same number of bits per pixel.")}return vr(Nn,Mn,Ei),$(!Nn||Nn.texture&&Nn.texture._texture.format===Iu||Nn.renderbuffer&&Nn.renderbuffer._renderbuffer.format===ki,"invalid depth attachment for framebuffer object"),vr(vi,Mn,Ei),$(!vi||vi.renderbuffer&&vi.renderbuffer._renderbuffer.format===e1,"invalid stencil attachment for framebuffer object"),vr(Ri,Mn,Ei),$(!Ri||Ri.texture&&Ri.texture._texture.format===$2||Ri.renderbuffer&&Ri.renderbuffer._renderbuffer.format===$2,"invalid depth-stencil attachment for framebuffer object"),Rr(Sr),Sr.width=Mn,Sr.height=Ei,Sr.colorAttachments=ji,Sr.depthAttachment=Nn,Sr.stencilAttachment=vi,Sr.depthStencilAttachment=Ri,zn.color=ji.map(Ve),zn.depth=Ve(Nn),zn.stencil=Ve(vi),zn.depthStencil=Ve(Ri),zn.width=Sr.width,zn.height=Sr.height,Nt(Sr),zn}function Fn(Cr,Nr){$(ft.next!==Sr,"can not resize a framebuffer which is currently in use");var Rn=Math.max(Cr|0,1),Mn=Math.max(Nr|0||Rn,1);if(Rn===Sr.width&&Mn===Sr.height)return zn;for(var Ei=Sr.colorAttachments,Ss=0;Ss=2,"invalid shape for framebuffer"),$(ts[0]===ts[1],"cube framebuffer must be square"),Rn=ts[0]}else"radius"in Ai&&(Rn=Ai.radius|0),"width"in Ai?(Rn=Ai.width|0,"height"in Ai&&$(Ai.height===Rn,"must be square")):"height"in Ai&&(Rn=Ai.height|0);("color"in Ai||"colors"in Ai)&&(Mn=Ai.color||Ai.colors,Array.isArray(Mn)&&$(Mn.length===1||k.webgl_draw_buffers,"multiple render targets not supported")),Mn||("colorCount"in Ai&&(Ts=Ai.colorCount|0,$(Ts>0,"invalid color buffer count")),"colorType"in Ai&&($.oneOf(Ai.colorType,Qt,"invalid color type"),Ss=Ai.colorType),"colorFormat"in Ai&&(Ei=Ai.colorFormat,$.oneOf(Ai.colorFormat,Pt,"invalid color format for texture"))),"depth"in Ai&&(Nr.depth=Ai.depth),"stencil"in Ai&&(Nr.stencil=Ai.stencil),"depthStencil"in Ai&&(Nr.depthStencil=Ai.depthStencil)}var bs;if(Mn)if(Array.isArray(Mn))for(bs=[],Cr=0;Cr0&&(Nr.depth=xr[0].depth,Nr.stencil=xr[0].stencil,Nr.depthStencil=xr[0].depthStencil),xr[Cr]?xr[Cr](Nr):xr[Cr]=Lt(Nr)}return e(Sr,{width:Rn,height:Rn,color:bs})}function zn(Fn){var Cr,Nr=Fn|0;if($(Nr>0&&Nr<=Z.maxCubeMapSize,"invalid radius for cube fbo"),Nr===Sr.width)return Sr;var Rn=Sr.color;for(Cr=0;Cr{for(var Ss=Object.keys(gr),Ts=0;Ts=0,'invalid option for vao: "'+Ss[Ts]+'" valid options are '+Xa)}),$(Array.isArray(jt),"attributes must be an array")}$(jt.length0,"must specify at least one attribute");var Sr={},zn=Lt.attributes;zn.length=jt.length;for(var Fn=0;Fn=Rn.byteLength?Mn.subdata(Rn):(Mn.destroy(),Lt.buffers[Fn]=null)),Lt.buffers[Fn]||(Mn=Lt.buffers[Fn]=Ct.create(Cr,Ya,!1,!0)),Nr.buffer=Ct.getBuffer(Mn),Nr.size=Nr.buffer.dimension|0,Nr.normalized=!1,Nr.type=Nr.buffer.dtype,Nr.offset=0,Nr.stride=0,Nr.divisor=0,Nr.state=1,Sr[Fn]=1}else Ct.getBuffer(Cr)?(Nr.buffer=Ct.getBuffer(Cr),Nr.size=Nr.buffer.dimension|0,Nr.normalized=!1,Nr.type=Nr.buffer.dtype,Nr.offset=0,Nr.stride=0,Nr.divisor=0,Nr.state=1):Ct.getBuffer(Cr.buffer)?(Nr.buffer=Ct.getBuffer(Cr.buffer),Nr.size=(+Cr.size||Nr.buffer.dimension)|0,Nr.normalized=!!Cr.normalized||!1,"type"in Cr?($.parameter(Cr.type,cs,"invalid buffer type"),Nr.type=cs[Cr.type]):Nr.type=Nr.buffer.dtype,Nr.offset=(Cr.offset||0)|0,Nr.stride=(Cr.stride||0)|0,Nr.divisor=(Cr.divisor||0)|0,Nr.state=1,$(Nr.size>=1&&Nr.size<=4,"size must be between 1 and 4"),$(Nr.offset>=0,"invalid offset"),$(Nr.stride>=0&&Nr.stride<=255,"stride must be between 0 and 255"),$(Nr.divisor>=0,"divisor must be positive"),$(!Nr.divisor||!!k.angle_instanced_arrays,"ANGLE_instanced_arrays must be enabled to use divisor")):"x"in Cr?($(Fn>0,"first attribute must not be a constant"),Nr.x=+Cr.x||0,Nr.y=+Cr.y||0,Nr.z=+Cr.z||0,Nr.w=+Cr.w||0,Nr.state=2):$(!1,"invalid attribute spec for location "+Fn)}for(var Ei=0;Ei1)for(var gr=0;gr_e&&(_e=Ve.stats.uniformsCount)}),_e},Z.getMaxAttributesCount=function(){var _e=0;return rr.forEach(function(Ve){Ve.stats.attributesCount>_e&&(_e=Ve.stats.attributesCount)}),_e});function Yt(){Ct={},Be={};for(var _e=0;_e=0,"missing vertex shader",Ht),$.command(Ve>=0,"missing fragment shader",Ht);var Mt=Qt[Ve];Mt||(Mt=Qt[Ve]={});var Mr=Mt[_e];if(Mr&&(Mr.refCount++,!or))return Mr;var Rr=new vr(Ve,_e);return Z.shaderCount++,Gt(Rr,Ht,or),Mr||(Mt[_e]=Rr),rr.push(Rr),e(Rr,{destroy:function(){if(Rr.refCount--,Rr.refCount<=0){E.deleteProgram(Rr.program);var Sn=rr.indexOf(Rr);rr.splice(Sn,1),Z.shaderCount--}Mt[Rr.vertId].refCount<=0&&(E.deleteShader(Be[Rr.vertId]),delete Be[Rr.vertId],delete Qt[Rr.fragId][Rr.vertId]),Object.keys(Qt[Rr.fragId]).length||(E.deleteShader(Ct[Rr.fragId]),delete Ct[Rr.fragId],delete Qt[Rr.fragId])}})},restore:Yt,shader:Ut,frag:-1,vert:-1}}var bo=6408,na=5121,vo=3333,ha=5126;function _o(E,k,Z,Ge,Ct,Be,ft){function Pt(rr){var Zt;k.next===null?($(Ct.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),Zt=na):($(k.next.colorAttachments[0].texture!==null,"You cannot read from a renderbuffer"),Zt=k.next.colorAttachments[0].texture._texture.type,$.optional(function(){Be.oes_texture_float?($(Zt===na||Zt===ha,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"),Zt===ha&&$(ft.readFloat,"Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")):$(Zt===na,"Reading from a framebuffer is only allowed for the type 'uint8'")}));var vr=0,Gt=0,Yt=Ge.framebufferWidth,_e=Ge.framebufferHeight,Ve=null;t(rr)?Ve=rr:rr&&($.type(rr,"object","invalid arguments to regl.read()"),vr=rr.x|0,Gt=rr.y|0,$(vr>=0&&vr=0&&Gt0&&Yt+vr<=Ge.framebufferWidth,"invalid width for read pixels"),$(_e>0&&_e+Gt<=Ge.framebufferHeight,"invalid height for read pixels"),Z();var Ht=Yt*_e*4;return Ve||(Zt===na?Ve=new Uint8Array(Ht):Zt===ha&&(Ve=Ve||new Float32Array(Ht))),$.isTypedArray(Ve,"data buffer for regl.read() must be a typedarray"),$(Ve.byteLength>=Ht,"data buffer for regl.read() too small"),E.pixelStorei(vo,4),E.readPixels(vr,Gt,Yt,_e,bo,Zt,Ve),Ve}function Ut(rr){var Zt;return k.setFBO({framebuffer:rr.framebuffer},function(){Zt=Pt(rr)}),Zt}function Qt(rr){return!rr||!("framebuffer"in rr)?Pt(rr):Ut(rr)}return Qt}function Ws(E){return Array.prototype.slice.call(E)}function Ys(E){return Ws(E).join("")}function xo(){var E=0,k=[],Z=[];function Ge(Zt){for(var vr=0;vr0&&(Zt.push(_e,"="),Zt.push.apply(Zt,Ws(arguments)),Zt.push(";")),_e}return e(vr,{def:Yt,toString:function(){return Ys([Gt.length>0?"var "+Gt.join(",")+";":"",Ys(Zt)])}})}function Be(){var Zt=Ct(),vr=Ct(),Gt=Zt.toString,Yt=vr.toString;function _e(Ve,Ht){vr(Ve,Ht,"=",Zt.def(Ve,Ht),";")}return e(function(){Zt.apply(Zt,Ws(arguments))},{def:Zt.def,entry:Zt,exit:vr,save:_e,set:function(Ve,Ht,or){_e(Ve,Ht),Zt(Ve,Ht,"=",or,";")},toString:function(){return Gt()+Yt()}})}function ft(){var Zt=Ys(arguments),vr=Be(),Gt=Be(),Yt=vr.toString,_e=Gt.toString;return e(vr,{then:function(){return vr.apply(vr,Ws(arguments)),this},else:function(){return Gt.apply(Gt,Ws(arguments)),this},toString:function(){var Ve=_e();return Ve&&(Ve="else{"+Ve+"}"),Ys(["if(",Zt,"){",Yt(),"}",Ve])}})}var Pt=Ct(),Ut={};function Qt(Zt,vr){var Gt=[];function Yt(){var Mt="a"+Gt.length;return Gt.push(Mt),Mt}vr=vr||0;for(var _e=0;_e":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},il={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},sl={frag:Ds,vert:Rs},q3={cw:vh,ccw:Wc};function p2(E){return Array.isArray(E)||t(E)||Ot(E)}function wh(E){return E.sort(function(M,Q){return M===Un?-1:Q===Un?1:M=1,Ge>=2,M)}else if(Q===fa){var Ct=E.data;return new Ys(Ct.thisDep,Ct.contextDep,Ct.propDep,M)}else{if(Q===wa)return new Ys(!1,!1,!1,M);if(Q===Wa){for(var ke=!1,ft=!1,Pt=!1,Ut=0;Ut=1&&(ft=!0),rr>=2&&(Pt=!0)}else Qt.type===fa&&(ke=ke||Qt.data.thisDep,ft=ft||Qt.data.contextDep,Pt=Pt||Qt.data.propDep)}return new Ys(ke,ft,Pt,M)}else return new Ys(Q===ra,Q===ta,Q===Ea,M)}}var Tu=new Ys(!1,!1,!1,function(){});function li(E,M,Q,Ge,Ct,ke,ft,Pt,Ut,Qt,rr,Zt,vr,Gt,Yt){var xe=Qt.Record,Ve={add:32774,subtract:32778,"reverse subtract":32779};Q.ext_blend_minmax&&(Ve.min=lc,Ve.max=Pf);var zt=Q.angle_instanced_arrays,or=Q.webgl_draw_buffers,Ft=Q.oes_vertex_array_object,Fr={dirty:!0,profile:Yt.profile},Rr={},Sn=[],Nt={},Lt={};function Hr(G){return G.replace(".","_")}function gr(G,D,ie){var ge=Hr(G);Sn.push(G),Rr[ge]=Fr[ge]=!!ie,Nt[ge]=D}function jt(G,D,ie){var ge=Hr(G);Sn.push(G),Array.isArray(ie)?(Fr[ge]=ie.slice(),Rr[ge]=ie.slice()):Fr[ge]=Rr[ge]=ie,Lt[ge]=D}gr(Aa,n0),gr(Ya,r0),jt(Ta,"blendColor",[0,0,0,0]),jt(da,"blendEquationSeparate",[Sh,Sh]),jt(ha,"blendFuncSeparate",[_h,xh,_h,xh]),gr(Ia,G3,!0),jt(Oa,"depthFunc",o0),jt(Xa,"depthRange",[0,1]),jt(Ca,"depthMask",!0),jt(La,La,[!0,!0,!0,!0]),gr(Ws,t0),jt(Ja,"cullFace",Hc),jt(Na,Na,Wc),jt(Da,Da,1),gr(ac,s0),jt(oc,"polygonOffset",[0,0]),gr(Li,a0),gr(S,bh),jt(P,"sampleCoverage",[1,!1]),gr(ee,i0),jt(lt,"stencilMask",-1),jt(qt,"stencilFunc",[Uf,0,-1]),jt(Gr,"stencilOpSeparate",[Rl,kl,kl,kl]),jt(Kt,"stencilOpSeparate",[Hc,kl,kl,kl]),gr(Or,yh),jt(sr,"scissor",[0,0,E.drawingBufferWidth,E.drawingBufferHeight]),jt(Un,Un,[0,0,E.drawingBufferWidth,E.drawingBufferHeight]);var _r={gl:E,context:vr,strings:M,next:Rr,current:Fr,draw:Zt,elements:ke,buffer:Ct,shader:rr,attributes:Qt.state,vao:Qt,uniforms:Ut,framebuffer:Pt,extensions:Q,timer:Gt,isBufferArgs:p2},Sr={primTypes:zi,compareFuncs:Yc,blendFuncs:m1,blendEquations:Ve,stencilOps:il,glTypes:ls,orientationType:q3};$.optional(function(){_r.isArrayLike=Ue}),or&&(Sr.backBuffer=[Hc],Sr.drawBuffer=ti(Ge.maxDrawbuffers,function(G){return G===0?[0]:ti(G,function(D){return l0+D})}));var Hn=0;function Rn(){var G=vo(),D=G.link,ie=G.global;G.id=Hn++,G.batchId="0";var ge=D(_r),Se=G.shared={props:"a0"};Object.keys(_r).forEach(function(ne){Se[ne]=ie.def(ge,".",ne)}),$.optional(function(){G.CHECK=D($),G.commandStr=$.guessCommand(),G.command=D(G.commandStr),G.assert=function(ne,j,_e){ne("if(!(",j,"))",this.CHECK,".commandRaise(",D(_e),",",this.command,");")},Sr.invalidBlendCombinations=Eh});var ce=G.next={},ae=G.current={};Object.keys(Lt).forEach(function(ne){Array.isArray(Fr[ne])&&(ce[ne]=ie.def(Se.next,".",ne),ae[ne]=ie.def(Se.current,".",ne))});var fe=G.constants={};Object.keys(Sr).forEach(function(ne){fe[ne]=ie.def(JSON.stringify(Sr[ne]))}),G.invoke=function(ne,j){switch(j.type){case Sa:var _e=["this",Se.context,Se.props,G.batchId];return ne.def(D(j.data),".call(",_e.slice(0,Math.max(j.data.length+1,4)),")");case Ea:return ne.def(Se.props,j.data);case ta:return ne.def(Se.context,j.data);case ra:return ne.def("this",j.data);case fa:return j.data.append(G,ne),j.data.ref;case wa:return j.data.toString();case Wa:return j.data.map(function(Ie){return G.invoke(ne,Ie)})}},G.attribCache={};var F={};return G.scopeAttrib=function(ne){var j=M.id(ne);if(j in F)return F[j];var _e=Qt.scope[j];_e||(_e=Qt.scope[j]=new xe);var Ie=F[j]=D(_e);return Ie},G}function Cr(G){var D=G.static,ie=G.dynamic,ge;if($i in D){var Se=!!D[$i];ge=$s(function(ae,fe){return Se}),ge.enable=Se}else if($i in ie){var ce=ie[$i];ge=Uo(ce,function(ae,fe){return ae.invoke(fe,ce)})}return ge}function Nr(G,D){var ie=G.static,ge=G.dynamic;if(Ns in ie){var Se=ie[Ns];return Se?(Se=Pt.getFramebuffer(Se),$.command(Se,"invalid framebuffer object"),$s(function(ae,fe){var F=ae.link(Se),ne=ae.shared;fe.set(ne.framebuffer,".next",F);var j=ne.context;return fe.set(j,"."+wu,F+".width"),fe.set(j,"."+Vc,F+".height"),F})):$s(function(ae,fe){var F=ae.shared;fe.set(F.framebuffer,".next","null");var ne=F.context;return fe.set(ne,"."+wu,ne+"."+mh),fe.set(ne,"."+Vc,ne+"."+gh),"null"})}else if(Ns in ge){var ce=ge[Ns];return Uo(ce,function(ae,fe){var F=ae.invoke(fe,ce),ne=ae.shared,j=ne.framebuffer,_e=fe.def(j,".getFramebuffer(",F,")");$.optional(function(){ae.assert(fe,"!"+F+"||"+_e,"invalid framebuffer object")}),fe.set(j,".next",_e);var Ie=ne.context;return fe.set(Ie,"."+wu,_e+"?"+_e+".width:"+Ie+"."+mh),fe.set(Ie,"."+Vc,_e+"?"+_e+".height:"+Ie+"."+gh),_e})}else return null}function Nn(G,D,ie){var ge=G.static,Se=G.dynamic;function ce(F){if(F in ge){var ne=ge[F];$.commandType(ne,"object","invalid "+F,ie.commandStr);var j=!0,_e=ne.x|0,Ie=ne.y|0,kt,hr;return"width"in ne?(kt=ne.width|0,$.command(kt>=0,"invalid "+F,ie.commandStr)):j=!1,"height"in ne?(hr=ne.height|0,$.command(hr>=0,"invalid "+F,ie.commandStr)):j=!1,new Ys(!j&&D&&D.thisDep,!j&&D&&D.contextDep,!j&&D&&D.propDep,function(lr,en){var qr=lr.shared.context,Jr=kt;"width"in ne||(Jr=en.def(qr,".",wu,"-",_e));var Yr=hr;return"height"in ne||(Yr=en.def(qr,".",Vc,"-",Ie)),[_e,Ie,Jr,Yr]})}else if(F in Se){var pr=Se[F],kr=Uo(pr,function(lr,en){var qr=lr.invoke(en,pr);$.optional(function(){lr.assert(en,qr+"&&typeof "+qr+'==="object"',"invalid "+F)});var Jr=lr.shared.context,Yr=en.def(qr,".x|0"),Kr=en.def(qr,".y|0"),Dn=en.def('"width" in ',qr,"?",qr,".width|0:","(",Jr,".",wu,"-",Yr,")"),Ki=en.def('"height" in ',qr,"?",qr,".height|0:","(",Jr,".",Vc,"-",Kr,")");return $.optional(function(){lr.assert(en,Dn+">=0&&"+Ki+">=0","invalid "+F)}),[Yr,Kr,Dn,Ki]});return D&&(kr.thisDep=kr.thisDep||D.thisDep,kr.contextDep=kr.contextDep||D.contextDep,kr.propDep=kr.propDep||D.propDep),kr}else return D?new Ys(D.thisDep,D.contextDep,D.propDep,function(lr,en){var qr=lr.shared.context;return[0,0,en.def(qr,".",wu),en.def(qr,".",Vc)]}):null}var ae=ce(Un);if(ae){var fe=ae;ae=new Ys(ae.thisDep,ae.contextDep,ae.propDep,function(F,ne){var j=fe.append(F,ne),_e=F.shared.context;return ne.set(_e,"."+h2,j[2]),ne.set(_e,"."+Qp,j[3]),j})}return{viewport:ae,scissor_box:ce(sr)}}function kn(G,D){var ie=G.static,ge=typeof ie[Zo]=="string"&&typeof ie[rl]=="string";if(ge){if(Object.keys(D.dynamic).length>0)return null;var Se=D.static,ce=Object.keys(Se);if(ce.length>0&&typeof Se[ce[0]]=="number"){for(var ae=[],fe=0;fe=0,"invalid "+en,D.commandStr),$s(function(Kr,Dn){return qr&&(Kr.OFFSET=Jr),Jr})}else if(en in ge){var Yr=ge[en];return Uo(Yr,function(Kr,Dn){var Ki=Kr.invoke(Dn,Yr);return qr&&(Kr.OFFSET=Ki,$.optional(function(){Kr.assert(Dn,Ki+">=0","invalid "+en)})),Ki})}else if(qr){if(F)return $s(function(Kr,Dn){return Kr.OFFSET=0,0});if(ce)return new Ys(fe.thisDep,fe.contextDep,fe.propDep,function(Kr,Dn){return Dn.def(Kr.shared.vao+".currentVAO?"+Kr.shared.vao+".currentVAO.offset:0")})}else if(ce)return new Ys(fe.thisDep,fe.contextDep,fe.propDep,function(Kr,Dn){return Dn.def(Kr.shared.vao+".currentVAO?"+Kr.shared.vao+".currentVAO.instances:-1")});return null}var kt=Ie(u2,!0);function hr(){if(Uc in ie){var en=ie[Uc]|0;return Se.count=en,$.command(typeof en=="number"&&en>=0,"invalid vertex count",D.commandStr),$s(function(){return en})}else if(Uc in ge){var qr=ge[Uc];return Uo(qr,function(Dn,Ki){var $a=Dn.invoke(Ki,qr);return $.optional(function(){Dn.assert(Ki,"typeof "+$a+'==="number"&&'+$a+">=0&&"+$a+"===("+$a+"|0)","invalid vertex count")}),$a})}else if(F)if(cc(j)){if(j)return kt?new Ys(kt.thisDep,kt.contextDep,kt.propDep,function(Dn,Ki){var $a=Ki.def(Dn.ELEMENTS,".vertCount-",Dn.OFFSET);return $.optional(function(){Dn.assert(Ki,$a+">=0","invalid vertex offset/element buffer too small")}),$a}):$s(function(Dn,Ki){return Ki.def(Dn.ELEMENTS,".vertCount")});var Jr=$s(function(){return-1});return $.optional(function(){Jr.MISSING=!0}),Jr}else{var Yr=new Ys(j.thisDep||kt.thisDep,j.contextDep||kt.contextDep,j.propDep||kt.propDep,function(Dn,Ki){var $a=Dn.ELEMENTS;return Dn.OFFSET?Ki.def($a,"?",$a,".vertCount-",Dn.OFFSET,":-1"):Ki.def($a,"?",$a,".vertCount:-1")});return $.optional(function(){Yr.DYNAMIC=!0}),Yr}else if(ce){var Kr=new Ys(fe.thisDep,fe.contextDep,fe.propDep,function(Dn,Ki){return Ki.def(Dn.shared.vao,".currentVAO?",Dn.shared.vao,".currentVAO.count:-1")});return Kr}return null}var pr=_e(),kr=hr(),lr=Ie(Eu,!1);return{elements:j,primitive:pr,count:kr,instances:lr,offset:kt,vao:fe,vaoActive:ce,elementsActive:F,static:Se}}function Ss(G,D){var ie=G.static,ge=G.dynamic,Se={};return Sn.forEach(function(ce){var ae=Hr(ce);function fe(F,ne){if(ce in ie){var j=F(ie[ce]);Se[ae]=$s(function(){return j})}else if(ce in ge){var _e=ge[ce];Se[ae]=Uo(_e,function(Ie,kt){return ne(Ie,kt,Ie.invoke(kt,_e))})}}switch(ce){case Ws:case Ya:case Aa:case ee:case Ia:case Or:case ac:case Li:case S:case Ca:return fe(function(F){return $.commandType(F,"boolean",ce,D.commandStr),F},function(F,ne,j){return $.optional(function(){F.assert(ne,"typeof "+j+'==="boolean"',"invalid flag "+ce,F.commandStr)}),j});case Oa:return fe(function(F){return $.commandParameter(F,Yc,"invalid "+ce,D.commandStr),Yc[F]},function(F,ne,j){var _e=F.constants.compareFuncs;return $.optional(function(){F.assert(ne,j+" in "+_e,"invalid "+ce+", must be one of "+Object.keys(Yc))}),ne.def(_e,"[",j,"]")});case Xa:return fe(function(F){return $.command(Ue(F)&&F.length===2&&typeof F[0]=="number"&&typeof F[1]=="number"&&F[0]<=F[1],"depth range is 2d array",D.commandStr),F},function(F,ne,j){$.optional(function(){F.assert(ne,F.shared.isArrayLike+"("+j+")&&"+j+".length===2&&typeof "+j+'[0]==="number"&&typeof '+j+'[1]==="number"&&'+j+"[0]<="+j+"[1]","depth range must be a 2d array")});var _e=ne.def("+",j,"[0]"),Ie=ne.def("+",j,"[1]");return[_e,Ie]});case ha:return fe(function(F){$.commandType(F,"object","blend.func",D.commandStr);var ne="srcRGB"in F?F.srcRGB:F.src,j="srcAlpha"in F?F.srcAlpha:F.src,_e="dstRGB"in F?F.dstRGB:F.dst,Ie="dstAlpha"in F?F.dstAlpha:F.dst;return $.commandParameter(ne,m1,ae+".srcRGB",D.commandStr),$.commandParameter(j,m1,ae+".srcAlpha",D.commandStr),$.commandParameter(_e,m1,ae+".dstRGB",D.commandStr),$.commandParameter(Ie,m1,ae+".dstAlpha",D.commandStr),$.command(Eh.indexOf(ne+", "+_e)===-1,"unallowed blending combination (srcRGB, dstRGB) = ("+ne+", "+_e+")",D.commandStr),[m1[ne],m1[_e],m1[j],m1[Ie]]},function(F,ne,j){var _e=F.constants.blendFuncs;$.optional(function(){F.assert(ne,j+"&&typeof "+j+'==="object"',"invalid blend func, must be an object")});function Ie(qr,Jr){var Yr=ne.def('"',qr,Jr,'" in ',j,"?",j,".",qr,Jr,":",j,".",qr);return $.optional(function(){F.assert(ne,Yr+" in "+_e,"invalid "+ce+"."+qr+Jr+", must be one of "+Object.keys(m1))}),Yr}var kt=Ie("src","RGB"),hr=Ie("dst","RGB");$.optional(function(){var qr=F.constants.invalidBlendCombinations;F.assert(ne,qr+".indexOf("+kt+'+", "+'+hr+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var pr=ne.def(_e,"[",kt,"]"),kr=ne.def(_e,"[",Ie("src","Alpha"),"]"),lr=ne.def(_e,"[",hr,"]"),en=ne.def(_e,"[",Ie("dst","Alpha"),"]");return[pr,lr,kr,en]});case da:return fe(function(F){if(typeof F=="string")return $.commandParameter(F,Ve,"invalid "+ce,D.commandStr),[Ve[F],Ve[F]];if(typeof F=="object")return $.commandParameter(F.rgb,Ve,ce+".rgb",D.commandStr),$.commandParameter(F.alpha,Ve,ce+".alpha",D.commandStr),[Ve[F.rgb],Ve[F.alpha]];$.commandRaise("invalid blend.equation",D.commandStr)},function(F,ne,j){var _e=F.constants.blendEquations,Ie=ne.def(),kt=ne.def(),hr=F.cond("typeof ",j,'==="string"');return $.optional(function(){function pr(kr,lr,en){F.assert(kr,en+" in "+_e,"invalid "+lr+", must be one of "+Object.keys(Ve))}pr(hr.then,ce,j),F.assert(hr.else,j+"&&typeof "+j+'==="object"',"invalid "+ce),pr(hr.else,ce+".rgb",j+".rgb"),pr(hr.else,ce+".alpha",j+".alpha")}),hr.then(Ie,"=",kt,"=",_e,"[",j,"];"),hr.else(Ie,"=",_e,"[",j,".rgb];",kt,"=",_e,"[",j,".alpha];"),ne(hr),[Ie,kt]});case Ta:return fe(function(F){return $.command(Ue(F)&&F.length===4,"blend.color must be a 4d array",D.commandStr),ti(4,function(ne){return+F[ne]})},function(F,ne,j){return $.optional(function(){F.assert(ne,F.shared.isArrayLike+"("+j+")&&"+j+".length===4","blend.color must be a 4d array")}),ti(4,function(_e){return ne.def("+",j,"[",_e,"]")})});case lt:return fe(function(F){return $.commandType(F,"number",ae,D.commandStr),F|0},function(F,ne,j){return $.optional(function(){F.assert(ne,"typeof "+j+'==="number"',"invalid stencil.mask")}),ne.def(j,"|0")});case qt:return fe(function(F){$.commandType(F,"object",ae,D.commandStr);var ne=F.cmp||"keep",j=F.ref||0,_e="mask"in F?F.mask:-1;return $.commandParameter(ne,Yc,ce+".cmp",D.commandStr),$.commandType(j,"number",ce+".ref",D.commandStr),$.commandType(_e,"number",ce+".mask",D.commandStr),[Yc[ne],j,_e]},function(F,ne,j){var _e=F.constants.compareFuncs;$.optional(function(){function pr(){F.assert(ne,Array.prototype.join.call(arguments,""),"invalid stencil.func")}pr(j+"&&typeof ",j,'==="object"'),pr('!("cmp" in ',j,")||(",j,".cmp in ",_e,")")});var Ie=ne.def('"cmp" in ',j,"?",_e,"[",j,".cmp]",":",kl),kt=ne.def(j,".ref|0"),hr=ne.def('"mask" in ',j,"?",j,".mask|0:-1");return[Ie,kt,hr]});case Gr:case Kt:return fe(function(F){$.commandType(F,"object",ae,D.commandStr);var ne=F.fail||"keep",j=F.zfail||"keep",_e=F.zpass||"keep";return $.commandParameter(ne,il,ce+".fail",D.commandStr),$.commandParameter(j,il,ce+".zfail",D.commandStr),$.commandParameter(_e,il,ce+".zpass",D.commandStr),[ce===Kt?Hc:Rl,il[ne],il[j],il[_e]]},function(F,ne,j){var _e=F.constants.stencilOps;$.optional(function(){F.assert(ne,j+"&&typeof "+j+'==="object"',"invalid "+ce)});function Ie(kt){return $.optional(function(){F.assert(ne,'!("'+kt+'" in '+j+")||("+j+"."+kt+" in "+_e+")","invalid "+ce+"."+kt+", must be one of "+Object.keys(il))}),ne.def('"',kt,'" in ',j,"?",_e,"[",j,".",kt,"]:",kl)}return[ce===Kt?Hc:Rl,Ie("fail"),Ie("zfail"),Ie("zpass")]});case oc:return fe(function(F){$.commandType(F,"object",ae,D.commandStr);var ne=F.factor|0,j=F.units|0;return $.commandType(ne,"number",ae+".factor",D.commandStr),$.commandType(j,"number",ae+".units",D.commandStr),[ne,j]},function(F,ne,j){$.optional(function(){F.assert(ne,j+"&&typeof "+j+'==="object"',"invalid "+ce)});var _e=ne.def(j,".factor|0"),Ie=ne.def(j,".units|0");return[_e,Ie]});case Ja:return fe(function(F){var ne=0;return F==="front"?ne=Rl:F==="back"&&(ne=Hc),$.command(!!ne,ae,D.commandStr),ne},function(F,ne,j){return $.optional(function(){F.assert(ne,j+'==="front"||'+j+'==="back"',"invalid cull.face")}),ne.def(j,'==="front"?',Rl,":",Hc)});case Da:return fe(function(F){return $.command(typeof F=="number"&&F>=Ge.lineWidthDims[0]&&F<=Ge.lineWidthDims[1],"invalid line width, must be a positive number between "+Ge.lineWidthDims[0]+" and "+Ge.lineWidthDims[1],D.commandStr),F},function(F,ne,j){return $.optional(function(){F.assert(ne,"typeof "+j+'==="number"&&'+j+">="+Ge.lineWidthDims[0]+"&&"+j+"<="+Ge.lineWidthDims[1],"invalid line width")}),j});case Na:return fe(function(F){return $.commandParameter(F,q3,ae,D.commandStr),q3[F]},function(F,ne,j){return $.optional(function(){F.assert(ne,j+'==="cw"||'+j+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),ne.def(j+'==="cw"?'+vh+":"+Wc)});case La:return fe(function(F){return $.command(Ue(F)&&F.length===4,"color.mask must be length 4 array",D.commandStr),F.map(function(ne){return!!ne})},function(F,ne,j){return $.optional(function(){F.assert(ne,F.shared.isArrayLike+"("+j+")&&"+j+".length===4","invalid color.mask")}),ti(4,function(_e){return"!!"+j+"["+_e+"]"})});case P:return fe(function(F){$.command(typeof F=="object"&&F,ae,D.commandStr);var ne="value"in F?F.value:1,j=!!F.invert;return $.command(typeof ne=="number"&&ne>=0&&ne<=1,"sample.coverage.value must be a number between 0 and 1",D.commandStr),[ne,j]},function(F,ne,j){$.optional(function(){F.assert(ne,j+"&&typeof "+j+'==="object"',"invalid sample.coverage")});var _e=ne.def('"value" in ',j,"?+",j,".value:1"),Ie=ne.def("!!",j,".invert");return[_e,Ie]})}}),Se}function wi(G,D){var ie=G.static,ge=G.dynamic,Se={};return Object.keys(ie).forEach(function(ce){var ae=ie[ce],fe;if(typeof ae=="number"||typeof ae=="boolean")fe=$s(function(){return ae});else if(typeof ae=="function"){var F=ae._reglType;F==="texture2d"||F==="textureCube"?fe=$s(function(ne){return ne.link(ae)}):F==="framebuffer"||F==="framebufferCube"?($.command(ae.color.length>0,'missing color attachment for framebuffer sent to uniform "'+ce+'"',D.commandStr),fe=$s(function(ne){return ne.link(ae.color[0])})):$.commandRaise('invalid data for uniform "'+ce+'"',D.commandStr)}else Ue(ae)?fe=$s(function(ne){var j=ne.global.def("[",ti(ae.length,function(_e){return $.command(typeof ae[_e]=="number"||typeof ae[_e]=="boolean","invalid uniform "+ce,ne.commandStr),ae[_e]}),"]");return j}):$.commandRaise('invalid or missing data for uniform "'+ce+'"',D.commandStr);fe.value=ae,Se[ce]=fe}),Object.keys(ge).forEach(function(ce){var ae=ge[ce];Se[ce]=Uo(ae,function(fe,F){return fe.invoke(F,ae)})}),Se}function Ji(G,D){var ie=G.static,ge=G.dynamic,Se={};return Object.keys(ie).forEach(function(ce){var ae=ie[ce],fe=M.id(ce),F=new xe;if(p2(ae))F.state=Hs,F.buffer=Ct.getBuffer(Ct.create(ae,nl,!1,!0)),F.type=0;else{var ne=Ct.getBuffer(ae);if(ne)F.state=Hs,F.buffer=ne,F.type=0;else if($.command(typeof ae=="object"&&ae,"invalid data for attribute "+ce,D.commandStr),"constant"in ae){var j=ae.constant;F.buffer="null",F.state=_a,typeof j=="number"?F.x=j:($.command(Ue(j)&&j.length>0&&j.length<=4,"invalid constant for attribute "+ce,D.commandStr),zs.forEach(function(lr,en){en=0,'invalid offset for attribute "'+ce+'"',D.commandStr);var Ie=ae.stride|0;$.command(Ie>=0&&Ie<256,'invalid stride for attribute "'+ce+'", must be integer betweeen [0, 255]',D.commandStr);var kt=ae.size|0;$.command(!("size"in ae)||kt>0&&kt<=4,'invalid size for attribute "'+ce+'", must be 1,2,3,4',D.commandStr);var hr=!!ae.normalized,pr=0;"type"in ae&&($.commandParameter(ae.type,ls,"invalid type for attribute "+ce,D.commandStr),pr=ls[ae.type]);var kr=ae.divisor|0;$.optional(function(){"divisor"in ae&&($.command(kr===0||zt,'cannot specify divisor for attribute "'+ce+'", instancing not supported',D.commandStr),$.command(kr>=0,'invalid divisor for attribute "'+ce+'"',D.commandStr));var lr=D.commandStr,en=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(ae).forEach(function(qr){$.command(en.indexOf(qr)>=0,'unknown parameter "'+qr+'" for attribute pointer "'+ce+'" (valid parameters are '+en+")",lr)})}),F.buffer=ne,F.state=Hs,F.size=kt,F.normalized=hr,F.type=pr||ne.dtype,F.offset=_e,F.stride=Ie,F.divisor=kr}}Se[ce]=$s(function(lr,en){var qr=lr.attribCache;if(fe in qr)return qr[fe];var Jr={isStream:!1};return Object.keys(F).forEach(function(Yr){Jr[Yr]=F[Yr]}),F.buffer&&(Jr.buffer=lr.link(F.buffer),Jr.type=Jr.type||Jr.buffer+".dtype"),qr[fe]=Jr,Jr})}),Object.keys(ge).forEach(function(ce){var ae=ge[ce];function fe(F,ne){var j=F.invoke(ne,ae),_e=F.shared,Ie=F.constants,kt=_e.isBufferArgs,hr=_e.buffer;$.optional(function(){F.assert(ne,j+"&&(typeof "+j+'==="object"||typeof '+j+'==="function")&&('+kt+"("+j+")||"+hr+".getBuffer("+j+")||"+hr+".getBuffer("+j+".buffer)||"+kt+"("+j+'.buffer)||("constant" in '+j+"&&(typeof "+j+'.constant==="number"||'+_e.isArrayLike+"("+j+".constant))))",'invalid dynamic attribute "'+ce+'"')});var pr={isStream:ne.def(!1)},kr=new xe;kr.state=Hs,Object.keys(kr).forEach(function(Jr){pr[Jr]=ne.def(""+kr[Jr])});var lr=pr.buffer,en=pr.type;ne("if(",kt,"(",j,")){",pr.isStream,"=true;",lr,"=",hr,".createStream(",nl,",",j,");",en,"=",lr,".dtype;","}else{",lr,"=",hr,".getBuffer(",j,");","if(",lr,"){",en,"=",lr,".dtype;",'}else if("constant" in ',j,"){",pr.state,"=",_a,";","if(typeof "+j+'.constant === "number"){',pr[zs[0]],"=",j,".constant;",zs.slice(1).map(function(Jr){return pr[Jr]}).join("="),"=0;","}else{",zs.map(function(Jr,Yr){return pr[Jr]+"="+j+".constant.length>"+Yr+"?"+j+".constant["+Yr+"]:0;"}).join(""),"}}else{","if(",kt,"(",j,".buffer)){",lr,"=",hr,".createStream(",nl,",",j,".buffer);","}else{",lr,"=",hr,".getBuffer(",j,".buffer);","}",en,'="type" in ',j,"?",Ie.glTypes,"[",j,".type]:",lr,".dtype;",pr.normalized,"=!!",j,".normalized;");function qr(Jr){ne(pr[Jr],"=",j,".",Jr,"|0;")}return qr("size"),qr("offset"),qr("stride"),qr("divisor"),ne("}}"),ne.exit("if(",pr.isStream,"){",hr,".destroyStream(",lr,");","}"),pr}Se[ce]=Uo(ae,fe)}),Se}function gs(G){var D=G.static,ie=G.dynamic,ge={};return Object.keys(D).forEach(function(Se){var ce=D[Se];ge[Se]=$s(function(ae,fe){return typeof ce=="number"||typeof ce=="boolean"?""+ce:ae.link(ce)})}),Object.keys(ie).forEach(function(Se){var ce=ie[Se];ge[Se]=Uo(ce,function(ae,fe){return ae.invoke(fe,ce)})}),ge}function Ps(G,D,ie,ge,Se){var ce=G.static,ae=G.dynamic;$.optional(function(){var qr=[Ns,rl,Zo,Oo,Pc,u2,Uc,Eu,$i,f2].concat(Sn);function Jr(Yr){Object.keys(Yr).forEach(function(Kr){$.command(qr.indexOf(Kr)>=0,'unknown parameter "'+Kr+'"',Se.commandStr)})}Jr(ce),Jr(ae)});var fe=kn(G,D),F=Nr(G,Se),ne=Nn(G,F,Se),j=vs(G,Se),_e=Ss(G,Se),Ie=_i(G,Se,fe);function kt(qr){var Jr=ne[qr];Jr&&(_e[qr]=Jr)}kt(Un),kt(Hr(sr));var hr=Object.keys(_e).length>0,pr={framebuffer:F,draw:j,shader:Ie,state:_e,dirty:hr,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(pr.profile=Cr(G,Se),pr.uniforms=wi(ie,Se),pr.drawVAO=pr.scopeVAO=j.vao,!pr.drawVAO&&Ie.program&&!fe&&Q.angle_instanced_arrays&&j.static.elements){var kr=!0,lr=Ie.program.attributes.map(function(qr){var Jr=D.static[qr];return kr=kr&&!!Jr,Jr});if(kr&&lr.length>0){var en=Qt.getVAO(Qt.createVAO({attributes:lr,elements:j.static.elements}));pr.drawVAO=new Ys(null,null,null,function(qr,Jr){return qr.link(en)}),pr.useVAO=!0}}return fe?pr.useVAO=!0:pr.attributes=Ji(D,Se),pr.context=gs(ge,Se),pr}function Xs(G,D,ie){var ge=G.shared,Se=ge.context,ce=G.scope();Object.keys(ie).forEach(function(ae){D.save(Se,"."+ae);var fe=ie[ae],F=fe.append(G,D);Array.isArray(F)?ce(Se,".",ae,"=[",F.join(),"];"):ce(Se,".",ae,"=",F,";")}),D(ce)}function Js(G,D,ie,ge){var Se=G.shared,ce=Se.gl,ae=Se.framebuffer,fe;or&&(fe=D.def(Se.extensions,".webgl_draw_buffers"));var F=G.constants,ne=F.drawBuffer,j=F.backBuffer,_e;ie?_e=ie.append(G,D):_e=D.def(ae,".next"),ge||D("if(",_e,"!==",ae,".cur){"),D("if(",_e,"){",ce,".bindFramebuffer(",Au,",",_e,".framebuffer);"),or&&D(fe,".drawBuffersWEBGL(",ne,"[",_e,".colorAttachments.length]);"),D("}else{",ce,".bindFramebuffer(",Au,",null);"),or&&D(fe,".drawBuffersWEBGL(",j,");"),D("}",ae,".cur=",_e,";"),ge||D("}")}function pa(G,D,ie){var ge=G.shared,Se=ge.gl,ce=G.current,ae=G.next,fe=ge.current,F=ge.next,ne=G.cond(fe,".dirty");Sn.forEach(function(j){var _e=Hr(j);if(!(_e in ie.state)){var Ie,kt;if(_e in ae){Ie=ae[_e],kt=ce[_e];var hr=ti(Fr[_e].length,function(kr){return ne.def(Ie,"[",kr,"]")});ne(G.cond(hr.map(function(kr,lr){return kr+"!=="+kt+"["+lr+"]"}).join("||")).then(Se,".",Lt[_e],"(",hr,");",hr.map(function(kr,lr){return kt+"["+lr+"]="+kr}).join(";"),";"))}else{Ie=ne.def(F,".",_e);var pr=G.cond(Ie,"!==",fe,".",_e);ne(pr),_e in Nt?pr(G.cond(Ie).then(Se,".enable(",Nt[_e],");").else(Se,".disable(",Nt[_e],");"),fe,".",_e,"=",Ie,";"):pr(Se,".",Lt[_e],"(",Ie,");",fe,".",_e,"=",Ie,";")}}}),Object.keys(ie.state).length===0&&ne(fe,".dirty=false;"),D(ne)}function Ba(G,D,ie,ge){var Se=G.shared,ce=G.current,ae=Se.current,fe=Se.gl;wh(Object.keys(ie)).forEach(function(F){var ne=ie[F];if(!(ge&&!ge(ne))){var j=ne.append(G,D);if(Nt[F]){var _e=Nt[F];cc(ne)?j?D(fe,".enable(",_e,");"):D(fe,".disable(",_e,");"):D(G.cond(j).then(fe,".enable(",_e,");").else(fe,".disable(",_e,");")),D(ae,".",F,"=",j,";")}else if(Ue(j)){var Ie=ce[F];D(fe,".",Lt[F],"(",j,");",j.map(function(kt,hr){return Ie+"["+hr+"]="+kt}).join(";"),";")}else D(fe,".",Lt[F],"(",j,");",ae,".",F,"=",j,";")}})}function ws(G,D){zt&&(G.instancing=D.def(G.shared.extensions,".angle_instanced_arrays"))}function ni(G,D,ie,ge,Se){var ce=G.shared,ae=G.stats,fe=ce.current,F=ce.timer,ne=ie.profile;function j(){return typeof performance>"u"?"Date.now()":"performance.now()"}var _e,Ie;function kt(qr){_e=D.def(),qr(_e,"=",j(),";"),typeof Se=="string"?qr(ae,".count+=",Se,";"):qr(ae,".count++;"),Gt&&(ge?(Ie=D.def(),qr(Ie,"=",F,".getNumPendingQueries();")):qr(F,".beginQuery(",ae,");"))}function hr(qr){qr(ae,".cpuTime+=",j(),"-",_e,";"),Gt&&(ge?qr(F,".pushScopeStats(",Ie,",",F,".getNumPendingQueries(),",ae,");"):qr(F,".endQuery();"))}function pr(qr){var Jr=D.def(fe,".profile");D(fe,".profile=",qr,";"),D.exit(fe,".profile=",Jr,";")}var kr;if(ne){if(cc(ne)){ne.enable?(kt(D),hr(D.exit),pr("true")):pr("false");return}kr=ne.append(G,D),pr(kr)}else kr=D.def(fe,".profile");var lr=G.block();kt(lr),D("if(",kr,"){",lr,"}");var en=G.block();hr(en),D.exit("if(",kr,"){",en,"}")}function Fa(G,D,ie,ge,Se){var ce=G.shared;function ae(F){switch(F){case e1:case Ll:case Bf:return 2;case kf:case Nl:case Ff:return 3;case Mf:case $1:case $f:return 4;default:return 1}}function fe(F,ne,j){var _e=ce.gl,Ie=D.def(F,".location"),kt=D.def(ce.attributes,"[",Ie,"]"),hr=j.state,pr=j.buffer,kr=[j.x,j.y,j.z,j.w],lr=["buffer","normalized","offset","stride"];function en(){D("if(!",kt,".buffer){",_e,".enableVertexAttribArray(",Ie,");}");var Jr=j.type,Yr;if(j.size?Yr=D.def(j.size,"||",ne):Yr=ne,D("if(",kt,".type!==",Jr,"||",kt,".size!==",Yr,"||",lr.map(function(Dn){return kt+"."+Dn+"!=="+j[Dn]}).join("||"),"){",_e,".bindBuffer(",nl,",",pr,".buffer);",_e,".vertexAttribPointer(",[Ie,Yr,Jr,j.normalized,j.stride,j.offset],");",kt,".type=",Jr,";",kt,".size=",Yr,";",lr.map(function(Dn){return kt+"."+Dn+"="+j[Dn]+";"}).join(""),"}"),zt){var Kr=j.divisor;D("if(",kt,".divisor!==",Kr,"){",G.instancing,".vertexAttribDivisorANGLE(",[Ie,Kr],");",kt,".divisor=",Kr,";}")}}function qr(){D("if(",kt,".buffer){",_e,".disableVertexAttribArray(",Ie,");",kt,".buffer=null;","}if(",zs.map(function(Jr,Yr){return kt+"."+Jr+"!=="+kr[Yr]}).join("||"),"){",_e,".vertexAttrib4f(",Ie,",",kr,");",zs.map(function(Jr,Yr){return kt+"."+Jr+"="+kr[Yr]+";"}).join(""),"}")}hr===Hs?en():hr===_a?qr():(D("if(",hr,"===",Hs,"){"),en(),D("}else{"),qr(),D("}"))}ge.forEach(function(F){var ne=F.name,j=ie.attributes[ne],_e;if(j){if(!Se(j))return;_e=j.append(G,D)}else{if(!Se(Tu))return;var Ie=G.scopeAttrib(ne);$.optional(function(){G.assert(D,Ie+".state","missing attribute "+ne)}),_e={},Object.keys(new xe).forEach(function(kt){_e[kt]=D.def(Ie,".",kt)})}fe(G.link(F),ae(F.info.type),_e)})}function Pi(G,D,ie,ge,Se,ce){for(var ae=G.shared,fe=ae.gl,F,ne=0;ne1){for(var $a=[],uc=[],al=0;al=0","missing vertex count")})):(Kr=Dn.def(ae,".",Uc),$.optional(function(){G.assert(Dn,Kr+">=0","missing vertex count")})),Kr}var j=F();function _e(Yr){var Kr=fe[Yr];return Kr?Kr.contextDep&&ge.contextDynamic||Kr.propDep?Kr.append(G,ie):Kr.append(G,D):D.def(ae,".",Yr)}var Ie=_e(Pc),kt=_e(u2),hr=ne();if(typeof hr=="number"){if(hr===0)return}else ie("if(",hr,"){"),ie.exit("}");var pr,kr;zt&&(pr=_e(Eu),kr=G.instancing);var lr=j+".type",en=fe.elements&&cc(fe.elements)&&!fe.vaoActive;function qr(){function Yr(){ie(kr,".drawElementsInstancedANGLE(",[Ie,hr,lr,kt+"<<(("+lr+"-"+Ha+")>>1)",pr],");")}function Kr(){ie(kr,".drawArraysInstancedANGLE(",[Ie,kt,hr,pr],");")}j&&j!=="null"?en?Yr():(ie("if(",j,"){"),Yr(),ie("}else{"),Kr(),ie("}")):Kr()}function Jr(){function Yr(){ie(ce+".drawElements("+[Ie,hr,lr,kt+"<<(("+lr+"-"+Ha+")>>1)"]+");")}function Kr(){ie(ce+".drawArrays("+[Ie,kt,hr]+");")}j&&j!=="null"?en?Yr():(ie("if(",j,"){"),Yr(),ie("}else{"),Kr(),ie("}")):Kr()}zt&&(typeof pr!="number"||pr>=0)?typeof pr=="string"?(ie("if(",pr,">0){"),qr(),ie("}else if(",pr,"<0){"),Jr(),ie("}")):qr():Jr()}function gi(G,D,ie,ge,Se){var ce=Rn(),ae=ce.proc("body",Se);return $.optional(function(){ce.commandStr=D.commandStr,ce.command=ce.link(D.commandStr)}),zt&&(ce.instancing=ae.def(ce.shared.extensions,".angle_instanced_arrays")),G(ce,ae,ie,ge),ce.compile().body}function Ni(G,D,ie,ge){ws(G,D),ie.useVAO?ie.drawVAO?D(G.shared.vao,".setVAO(",ie.drawVAO.append(G,D),");"):D(G.shared.vao,".setVAO(",G.shared.vao,".targetVAO);"):(D(G.shared.vao,".setVAO(null);"),Fa(G,D,ie,ge.attributes,function(){return!0})),Pi(G,D,ie,ge.uniforms,function(){return!0},!1),Ln(G,D,D,ie)}function As(G,D){var ie=G.proc("draw",1);ws(G,ie),Xs(G,ie,D.context),Js(G,ie,D.framebuffer),pa(G,ie,D),Ba(G,ie,D.state),ni(G,ie,D,!1,!0);var ge=D.shader.progVar.append(G,ie);if(ie(G.shared.gl,".useProgram(",ge,".program);"),D.shader.program)Ni(G,ie,D,D.shader.program);else{ie(G.shared.vao,".setVAO(null);");var Se=G.global.def("{}"),ce=ie.def(ge,".id"),ae=ie.def(Se,"[",ce,"]");ie(G.cond(ae).then(ae,".call(this,a0);").else(ae,"=",Se,"[",ce,"]=",G.link(function(fe){return gi(Ni,G,D,fe,1)}),"(",ge,");",ae,".call(this,a0);"))}Object.keys(D.state).length>0&&ie(G.shared.current,".dirty=true;"),G.shared.vao&&ie(G.shared.vao,".setVAO(null);")}function Vo(G,D,ie,ge){G.batchId="a1",ws(G,D);function Se(){return!0}Fa(G,D,ie,ge.attributes,Se),Pi(G,D,ie,ge.uniforms,Se,!1),Ln(G,D,D,ie)}function U1(G,D,ie,ge){ws(G,D);var Se=ie.contextDep,ce=D.def(),ae="a0",fe="a1",F=D.def();G.shared.props=F,G.batchId=ce;var ne=G.scope(),j=G.scope();D(ne.entry,"for(",ce,"=0;",ce,"<",fe,";++",ce,"){",F,"=",ae,"[",ce,"];",j,"}",ne.exit);function _e(lr){return lr.contextDep&&Se||lr.propDep}function Ie(lr){return!_e(lr)}if(ie.needsContext&&Xs(G,j,ie.context),ie.needsFramebuffer&&Js(G,j,ie.framebuffer),Ba(G,j,ie.state,_e),ie.profile&&_e(ie.profile)&&ni(G,j,ie,!1,!0),ge)ie.useVAO?ie.drawVAO?_e(ie.drawVAO)?j(G.shared.vao,".setVAO(",ie.drawVAO.append(G,j),");"):ne(G.shared.vao,".setVAO(",ie.drawVAO.append(G,ne),");"):ne(G.shared.vao,".setVAO(",G.shared.vao,".targetVAO);"):(ne(G.shared.vao,".setVAO(null);"),Fa(G,ne,ie,ge.attributes,Ie),Fa(G,j,ie,ge.attributes,_e)),Pi(G,ne,ie,ge.uniforms,Ie,!1),Pi(G,j,ie,ge.uniforms,_e,!0),Ln(G,ne,j,ie);else{var kt=G.global.def("{}"),hr=ie.shader.progVar.append(G,j),pr=j.def(hr,".id"),kr=j.def(kt,"[",pr,"]");j(G.shared.gl,".useProgram(",hr,".program);","if(!",kr,"){",kr,"=",kt,"[",pr,"]=",G.link(function(lr){return gi(Vo,G,ie,lr,2)}),"(",hr,");}",kr,".call(this,a0[",ce,"],",ce,");")}}function z(G,D){var ie=G.proc("batch",2);G.batchId="0",ws(G,ie);var ge=!1,Se=!0;Object.keys(D.context).forEach(function(kt){ge=ge||D.context[kt].propDep}),ge||(Xs(G,ie,D.context),Se=!1);var ce=D.framebuffer,ae=!1;ce?(ce.propDep?ge=ae=!0:ce.contextDep&&ge&&(ae=!0),ae||Js(G,ie,ce)):Js(G,ie,null),D.state.viewport&&D.state.viewport.propDep&&(ge=!0);function fe(kt){return kt.contextDep&&ge||kt.propDep}pa(G,ie,D),Ba(G,ie,D.state,function(kt){return!fe(kt)}),(!D.profile||!fe(D.profile))&&ni(G,ie,D,!1,"a1"),D.contextDep=ge,D.needsContext=Se,D.needsFramebuffer=ae;var F=D.shader.progVar;if(F.contextDep&&ge||F.propDep)U1(G,ie,D,null);else{var ne=F.append(G,ie);if(ie(G.shared.gl,".useProgram(",ne,".program);"),D.shader.program)U1(G,ie,D,D.shader.program);else{ie(G.shared.vao,".setVAO(null);");var j=G.global.def("{}"),_e=ie.def(ne,".id"),Ie=ie.def(j,"[",_e,"]");ie(G.cond(Ie).then(Ie,".call(this,a0,a1);").else(Ie,"=",j,"[",_e,"]=",G.link(function(kt){return gi(U1,G,D,kt,2)}),"(",ne,");",Ie,".call(this,a0,a1);"))}}Object.keys(D.state).length>0&&ie(G.shared.current,".dirty=true;"),G.shared.vao&&ie(G.shared.vao,".setVAO(null);")}function tt(G,D){var ie=G.proc("scope",3);G.batchId="a2";var ge=G.shared,Se=ge.current;Xs(G,ie,D.context),D.framebuffer&&D.framebuffer.append(G,ie),wh(Object.keys(D.state)).forEach(function(ae){var fe=D.state[ae],F=fe.append(G,ie);Ue(F)?F.forEach(function(ne,j){ie.set(G.next[ae],"["+j+"]",ne)}):ie.set(ge.next,"."+ae,F)}),ni(G,ie,D,!0,!0),[Oo,u2,Uc,Eu,Pc].forEach(function(ae){var fe=D.draw[ae];fe&&ie.set(ge.draw,"."+ae,""+fe.append(G,ie))}),Object.keys(D.uniforms).forEach(function(ae){var fe=D.uniforms[ae].append(G,ie);Array.isArray(fe)&&(fe="["+fe.join()+"]"),ie.set(ge.uniforms,"["+M.id(ae)+"]",fe)}),Object.keys(D.attributes).forEach(function(ae){var fe=D.attributes[ae].append(G,ie),F=G.scopeAttrib(ae);Object.keys(new xe).forEach(function(ne){ie.set(F,"."+ne,fe[ne])})}),D.scopeVAO&&ie.set(ge.vao,".targetVAO",D.scopeVAO.append(G,ie));function ce(ae){var fe=D.shader[ae];fe&&ie.set(ge.shader,"."+ae,fe.append(G,ie))}ce(rl),ce(Zo),Object.keys(D.state).length>0&&(ie(Se,".dirty=true;"),ie.exit(Se,".dirty=true;")),ie("a1(",G.shared.context,",a0,",G.batchId,");")}function Me(G){if(!(typeof G!="object"||Ue(G))){for(var D=Object.keys(G),ie=0;ie=0;--Ln){var gi=Sr[Ln];gi&&gi(Gt,null,0)}Q.flush(),Qt&&Qt.update()}function kn(){!Nr&&Sr.length>0&&(Nr=Zs.next(Nn))}function _i(){Nr&&(Zs.cancel(Nn),Nr=null)}function vs(Ln){Ln.preventDefault(),Ct=!0,_i(),Hn.forEach(function(gi){gi()})}function Ss(Ln){Q.getError(),Ct=!1,ke.restore(),Rr.restore(),zt.restore(),Sn.restore(),Nt.restore(),Lt.restore(),Ft.restore(),Qt&&Qt.restore(),Hr.procs.refresh(),kn(),Rn.forEach(function(gi){gi()})}_r&&(_r.addEventListener(Vf,vs,!1),_r.addEventListener(xo,Ss,!1));function wi(){Sr.length=0,_i(),_r&&(_r.removeEventListener(Vf,vs),_r.removeEventListener(xo,Ss)),Rr.clear(),Lt.clear(),Nt.clear(),Ft.clear(),Sn.clear(),or.clear(),zt.clear(),Qt&&Qt.clear(),Cr.forEach(function(Ln){Ln()})}function Ji(Ln){$(!!Ln,"invalid args to regl({...})"),$.type(Ln,"object","invalid args to regl({...})");function gi(Se){var ce=e({},Se);delete ce.uniforms,delete ce.attributes,delete ce.context,delete ce.vao,"stencil"in ce&&ce.stencil.op&&(ce.stencil.opBack=ce.stencil.opFront=ce.stencil.op,delete ce.stencil.op);function ae(fe){if(fe in ce){var F=ce[fe];delete ce[fe],Object.keys(F).forEach(function(ne){ce[fe+"."+ne]=F[ne]})}}return ae("blend"),ae("depth"),ae("cull"),ae("stencil"),ae("polygonOffset"),ae("scissor"),ae("sample"),"vao"in Se&&(ce.vao=Se.vao),ce}function Ni(Se,ce){var ae={},fe={};return Object.keys(Se).forEach(function(F){var ne=Se[F];if(as.isDynamic(ne)){fe[F]=as.unbox(ne,F);return}else if(ce&&Array.isArray(ne)){for(var j=0;j0)return yi.call(this,ie(Se|0),Se|0)}else if(Array.isArray(Se)){if(Se.length)return yi.call(this,Se,Se.length)}else return Wr.call(this,Se)}return e(ge,{stats:tt,destroy:function(){Me.destroy()}})}var gs=Lt.setFBO=Ji({framebuffer:as.define.call(null,Ml,"framebuffer")});function Ps(Ln,gi){var Ni=0;Hr.procs.poll();var As=gi.color;As&&(Q.clearColor(+As[0]||0,+As[1]||0,+As[2]||0,+As[3]||0),Ni|=f0),"depth"in gi&&(Q.clearDepth(+gi.depth),Ni|=P1),"stencil"in gi&&(Q.clearStencil(gi.stencil|0),Ni|=d0),$(!!Ni,"called regl.clear with no buffer specified"),Q.clear(Ni)}function Xs(Ln){if($(typeof Ln=="object"&&Ln,"regl.clear() takes an object as input"),"framebuffer"in Ln)if(Ln.framebuffer&&Ln.framebuffer_reglType==="framebufferCube")for(var gi=0;gi<6;++gi)gs(e({framebuffer:Ln.framebuffer.faces[gi]},Ln),Ps);else gs(Ln,Ps);else Ps(null,Ln)}function Js(Ln){$.type(Ln,"function","regl.frame() callback must be a function"),Sr.push(Ln);function gi(){var Ni=Bl(Sr,Ln);$(Ni>=0,"cannot cancel a frame twice");function As(){var Vo=Bl(Sr,As);Sr[Vo]=Sr[Sr.length-1],Sr.length-=1,Sr.length<=0&&_i()}Sr[Ni]=As}return kn(),{cancel:gi}}function pa(){var Ln=jt.viewport,gi=jt.scissor_box;Ln[0]=Ln[1]=gi[0]=gi[1]=0,Gt.viewportWidth=Gt.framebufferWidth=Gt.drawingBufferWidth=Ln[2]=gi[2]=Q.drawingBufferWidth,Gt.viewportHeight=Gt.framebufferHeight=Gt.drawingBufferHeight=Ln[3]=gi[3]=Q.drawingBufferHeight}function Ba(){Gt.tick+=1,Gt.time=ni(),pa(),Hr.procs.poll()}function ws(){Sn.refresh(),pa(),Hr.procs.refresh(),Qt&&Qt.update()}function ni(){return(Ga()-rr)/1e3}ws();function Fa(Ln,gi){$.type(gi,"function","listener callback must be a function");var Ni;switch(Ln){case"frame":return Js(gi);case"lost":Ni=Hn;break;case"restore":Ni=Rn;break;case"destroy":Ni=Cr;break;default:$.raise("invalid event, must be one of frame,lost,restore,destroy")}return Ni.push(gi),{cancel:function(){for(var As=0;As=0},read:gr,destroy:wi,_gl:Q,_refresh:ws,poll:function(){Ba(),Qt&&Qt.update()},now:ni,stats:Pt});return M.onDone(null,Pi),Pi}return Co}))});var s9={};Xc(s9,{checkSupport:()=>e9,createRegl:()=>t9,createRenderer:()=>i9,createSpatialIndex:()=>UT,createTextureFromUrl:()=>dg,default:()=>PT});function TE(...t){return e=>t.reduce((r,i)=>i(r),e)}function V8(){var t=new L3(16);return L3!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function Ev(t){var e=new L3(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function og(t,e){var r=e[0],i=e[1],s=e[2],o=e[3],h=e[4],g=e[5],v=e[6],x=e[7],_=e[8],w=e[9],O=e[10],I=e[11],H=e[12],J=e[13],Z=e[14],oe=e[15],se=r*g-i*h,re=r*v-s*h,q=r*x-o*h,ue=i*v-s*g,K=i*x-o*g,k=s*x-o*v,de=_*J-w*H,ze=_*Z-O*H,er=_*oe-I*H,Er=w*Z-O*J,Ht=w*oe-I*J,xn=O*oe-I*Z,$r=se*xn-re*Ht+q*Er+ue*er-K*ze+k*de;return $r?($r=1/$r,t[0]=(g*xn-v*Ht+x*Er)*$r,t[1]=(s*Ht-i*xn-o*Er)*$r,t[2]=(J*k-Z*K+oe*ue)*$r,t[3]=(O*K-w*k-I*ue)*$r,t[4]=(v*er-h*xn-x*ze)*$r,t[5]=(r*xn-s*er+o*ze)*$r,t[6]=(Z*q-H*k-oe*re)*$r,t[7]=(_*k-O*q+I*re)*$r,t[8]=(h*Ht-g*er+x*de)*$r,t[9]=(i*er-r*Ht-o*de)*$r,t[10]=(H*K-J*q+oe*se)*$r,t[11]=(w*q-_*K-I*se)*$r,t[12]=(g*ze-h*Er-v*de)*$r,t[13]=(r*Er-i*ze+s*de)*$r,t[14]=(J*re-H*ue-Z*se)*$r,t[15]=(_*ue-w*re+O*se)*$r,t):null}function L1(t,e,r){var i=e[0],s=e[1],o=e[2],h=e[3],g=e[4],v=e[5],x=e[6],_=e[7],w=e[8],O=e[9],I=e[10],H=e[11],J=e[12],Z=e[13],oe=e[14],se=e[15],re=r[0],q=r[1],ue=r[2],K=r[3];return t[0]=re*i+q*g+ue*w+K*J,t[1]=re*s+q*v+ue*O+K*Z,t[2]=re*o+q*x+ue*I+K*oe,t[3]=re*h+q*_+ue*H+K*se,re=r[4],q=r[5],ue=r[6],K=r[7],t[4]=re*i+q*g+ue*w+K*J,t[5]=re*s+q*v+ue*O+K*Z,t[6]=re*o+q*x+ue*I+K*oe,t[7]=re*h+q*_+ue*H+K*se,re=r[8],q=r[9],ue=r[10],K=r[11],t[8]=re*i+q*g+ue*w+K*J,t[9]=re*s+q*v+ue*O+K*Z,t[10]=re*o+q*x+ue*I+K*oe,t[11]=re*h+q*_+ue*H+K*se,re=r[12],q=r[13],ue=r[14],K=r[15],t[12]=re*i+q*g+ue*w+K*J,t[13]=re*s+q*v+ue*O+K*Z,t[14]=re*o+q*x+ue*I+K*oe,t[15]=re*h+q*_+ue*H+K*se,t}function wv(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Fm(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function NE(t,e,r){var i=r[0],s=r[1],o=r[2],h=Math.sqrt(i*i+s*s+o*o),g,v,x;return h80*r){h=t[0],g=t[1];let x=h,_=g;for(let w=r;wx&&(x=O),I>_&&(_=I)}v=Math.max(x-h,_-g),v=v!==0?32767/v:0}return Jp(s,o,r,h,g,v,0),o}function VE(t,e,r,i,s){let o;if(s===ZE(t,e,r,i)>0)for(let h=e;h=e;h-=i)o=Tv(h/i|0,t[h],t[h+1],o);return o&&Xm(o,o.next)&&(Kp(o),o=o.next),o}function Xp(t,e){if(!t)return t;e||(e=t);let r=t,i;do if(i=!1,!r.steiner&&(Xm(r,r.next)||Ua(r.prev,r,r.next)===0)){if(Kp(r),r=e=r.prev,r===r.next)break;i=!0}else r=r.next;while(i||r!==e);return e}function Jp(t,e,r,i,s,o,h){if(!t)return;!h&&o&&HE(t,i,s,o);let g=t;for(;t.prev!==t.next;){let v=t.prev,x=t.next;if(o?jE(t,i,s,o):GE(t)){e.push(v.i,t.i,x.i),Kp(t),t=x.next,g=x.next;continue}if(t=x,t===g){h?h===1?(t=qE(Xp(t),e),Jp(t,e,r,i,s,o,2)):h===2&&zE(t,e,r,i,s,o):Jp(Xp(t),e,r,i,s,o,1);break}}}function GE(t){let e=t.prev,r=t,i=t.next;if(Ua(e,r,i)>=0)return!1;let s=e.x,o=r.x,h=i.x,g=e.y,v=r.y,x=i.y,_=Math.min(s,o,h),w=Math.min(g,v,x),O=Math.max(s,o,h),I=Math.max(g,v,x),H=i.next;for(;H!==e;){if(H.x>=_&&H.x<=O&&H.y>=w&&H.y<=I&&Wp(s,g,o,v,h,x,H.x,H.y)&&Ua(H.prev,H,H.next)>=0)return!1;H=H.next}return!0}function jE(t,e,r,i){let s=t.prev,o=t,h=t.next;if(Ua(s,o,h)>=0)return!1;let g=s.x,v=o.x,x=h.x,_=s.y,w=o.y,O=h.y,I=Math.min(g,v,x),H=Math.min(_,w,O),J=Math.max(g,v,x),Z=Math.max(_,w,O),oe=lg(I,H,e,r,i),se=lg(J,Z,e,r,i),re=t.prevZ,q=t.nextZ;for(;re&&re.z>=oe&&q&&q.z<=se;){if(re.x>=I&&re.x<=J&&re.y>=H&&re.y<=Z&&re!==s&&re!==h&&Wp(g,_,v,w,x,O,re.x,re.y)&&Ua(re.prev,re,re.next)>=0||(re=re.prevZ,q.x>=I&&q.x<=J&&q.y>=H&&q.y<=Z&&q!==s&&q!==h&&Wp(g,_,v,w,x,O,q.x,q.y)&&Ua(q.prev,q,q.next)>=0))return!1;q=q.nextZ}for(;re&&re.z>=oe;){if(re.x>=I&&re.x<=J&&re.y>=H&&re.y<=Z&&re!==s&&re!==h&&Wp(g,_,v,w,x,O,re.x,re.y)&&Ua(re.prev,re,re.next)>=0)return!1;re=re.prevZ}for(;q&&q.z<=se;){if(q.x>=I&&q.x<=J&&q.y>=H&&q.y<=Z&&q!==s&&q!==h&&Wp(g,_,v,w,x,O,q.x,q.y)&&Ua(q.prev,q,q.next)>=0)return!1;q=q.nextZ}return!0}function qE(t,e){let r=t;do{let i=r.prev,s=r.next.next;!Xm(i,s)&&Vv(i,r,r.next,s)&&$m(i,s)&&$m(s,i)&&(e.push(i.i,r.i,s.i),Kp(r),Kp(r.next),r=t=s),r=r.next}while(r!==t);return Xp(r)}function zE(t,e,r,i,s,o){let h=t;do{let g=h.next.next;for(;g!==h.prev;){if(h.i!==g.i&&XE(h,g)){let v=QE(h,g);h=Xp(h,h.next),v=Xp(v,v.next),Jp(h,e,r,i,s,o,0),Jp(v,e,r,i,s,o,0);return}g=g.next}h=h.next}while(h!==t)}function HE(t,e,r,i){let s=t;do s.z===0&&(s.z=lg(s.x,s.y,e,r,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,WE(s)}function WE(t){let e,r=1;do{let i=t,s;t=null;let o=null;for(e=0;i;){e++;let h=i,g=0;for(let x=0;x0||v>0&&h;)g!==0&&(v===0||!h||i.z<=h.z)?(s=i,i=i.nextZ,g--):(s=h,h=h.nextZ,v--),o?o.nextZ=s:t=s,s.prevZ=o,o=s;i=h}o.nextZ=null,r*=2}while(e>1);return t}function lg(t,e,r,i,s){return t=(t-r)*s|0,e=(e-i)*s|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function YE(t,e,r,i,s,o,h,g){return(s-h)*(e-g)>=(t-h)*(o-g)&&(t-h)*(i-g)>=(r-h)*(e-g)&&(r-h)*(o-g)>=(s-h)*(i-g)}function Wp(t,e,r,i,s,o,h,g){return!(t===h&&e===g)&&YE(t,e,r,i,s,o,h,g)}function XE(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!JE(t,e)&&($m(t,e)&&$m(e,t)&&KE(t,e)&&(Ua(t.prev,t,e.prev)||Ua(t,e.prev,e))||Xm(t,e)&&Ua(t.prev,t,t.next)>0&&Ua(e.prev,e,e.next)>0)}function Ua(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Xm(t,e){return t.x===e.x&&t.y===e.y}function Vv(t,e,r,i){let s=km(Ua(t,e,r)),o=km(Ua(t,e,i)),h=km(Ua(r,i,t)),g=km(Ua(r,i,e));return!!(s!==o&&h!==g||s===0&&Rm(t,r,e)||o===0&&Rm(t,i,e)||h===0&&Rm(r,t,i)||g===0&&Rm(r,e,i))}function Rm(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function km(t){return t>0?1:t<0?-1:0}function JE(t,e){let r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&Vv(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function $m(t,e){return Ua(t.prev,t,t.next)<0?Ua(t,e,t.next)>=0&&Ua(t,t.prev,e)>=0:Ua(t,e,t.prev)<0||Ua(t,t.next,e)<0}function KE(t,e){let r=t,i=!1,s=(t.x+e.x)/2,o=(t.y+e.y)/2;do r.y>o!=r.next.y>o&&r.next.y!==r.y&&s<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==t);return i}function QE(t,e){let r=cg(t.i,t.x,t.y),i=cg(e.i,e.x,e.y),s=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=s,s.prev=r,i.next=r,r.prev=i,o.next=i,i.prev=o,i}function Tv(t,e,r,i){let s=cg(t,e,r);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function Kp(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function cg(t,e,r){return{i:t,x:e,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function ZE(t,e,r,i){let s=0;for(let o=e,h=r-i;o{xv();$v=y0(Dm(),1),yE=t=>t*t*t,Pv=t=>t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1,bE=t=>--t*t*t+1,vE=t=>t,xE=t=>t*t,_E=t=>t<.5?2*t*t:-1+(4-2*t)*t,SE=t=>t*(2-t),hu=t=>t,U8=(t,e)=>{if(t===e)return!0;if(t.length!==e.length)return!1;let r=new Set(t),i=new Set(e);return r.size!==i.size?!1:e.every(s=>r.has(s))},EE=t=>Math.sqrt(t.reduce((e,r)=>e+r**2,0)),wE=t=>t.reduce((e,r)=>r>e?r:e,Number.NEGATIVE_INFINITY),_v=(t,e=hu)=>{let r=[];for(let i=0;i{let r=[];return t.forEach(i=>{r[i]=!0}),e.forEach(i=>{r[i]=!0}),r.reduce((i,s,o)=>(s&&i.push(o),i),[])},pg=(t,...e)=>(e.forEach(r=>{let i=Object.keys(r).reduce((s,o)=>(s[o]=Object.getOwnPropertyDescriptor(r,o),s),{});Object.getOwnPropertySymbols(r).forEach(s=>{let o=Object.getOwnPropertyDescriptor(r,s);o?.enumerable&&(i[s]=o)}),Object.defineProperties(t,i)}),t);IE=t=>e=>pg({__proto__:{constructor:t}},e),Sv=(t,e)=>r=>pg(r,{get[t](){return e}}),OE=(t,e,r,i)=>Math.sqrt((t-r)**2+(e-i)**2),CE=t=>new Worker(window.URL.createObjectURL(new Blob([`(${t.toString()})()`],{type:"text/javascript"}))),uh=(t=1)=>new Promise(e=>{let r=0,i=()=>requestAnimationFrame(()=>{r++,r{let i,s=0;r=r===null?e:r;let o=(...v)=>{let x=()=>{s>0&&(t(...v),s=0)};clearTimeout(i),i=setTimeout(x,r)},h=!1,g=(...v)=>{h?(s++,o(...v)):(t(...v),o(...v),h=!0,s=0,setTimeout(()=>{h=!1},e))};return g.reset=()=>{h=!1},g.cancel=()=>{clearTimeout(i)},g.now=(...v)=>t(...v),g},LE=1e-6,L3=typeof Float32Array<"u"?Float32Array:Array;(function(){var t=kE();return function(e,r,i,s,o,h){var g,v;for(r||(r=4),i||(i=0),s?v=Math.min(s*r+i,e.length):v=e.length,g=i;g{let h=new Float32Array(16),g=new Float32Array(16),v=new Float32Array(16),x=V8(),_=[...i.slice(0,2),0,1],w=Array.isArray(s[0])?[...s[0]]:[...s],O=Array.isArray(s[0])?[...s[1]]:[...s],I=Array.isArray(o[0])?[...o[0]]:[...o],H=Array.isArray(o[0])?[...o[1]]:[...o],J=()=>RE(h,x).slice(0,2),Z=()=>{let Wt=J();return Math.min(Wt[0],Wt[1])},oe=()=>{let Wt=J();return Math.max(Wt[0],Wt[1])},se=()=>Math.acos(x[0]/oe()),re=()=>[[...w],[...O]],q=()=>[[...I],[...H]],ue=()=>{let Wt=J();return[1/Wt[0],1/Wt[1]]},K=()=>1/Z(),k=()=>1/oe(),de=()=>DE(h,x).slice(0,2),ze=()=>Hp(h,_,og(v,x)).slice(0,2),er=()=>x,Er=()=>_.slice(0,2),Ht=([Wt=0,Pr=0]=[],hi=1,Ai=0)=>{x=V8(),xn([-Wt,-Pr]),Tn(Ai),$r(1/hi)},xn=([Wt=0,Pr=0]=[])=>{h[0]=Wt,h[1]=Pr,h[2]=0;let hi=wv(g,h);L1(x,hi,x)},$r=(Wt,Pr)=>{let hi=Array.isArray(Wt),Ai=hi?Wt[0]:Wt,pi=hi?Wt[1]:Wt;if(Ai<=0||pi<=0||Ai===1&&pi===1)return;let ss=J(),Va=ss[0]*Ai,ar=ss[1]*pi;if(Ai=Math.max(w[0],Math.min(Va,w[1]))/ss[0],pi=Math.max(O[0],Math.min(ar,O[1]))/ss[1],Ai===1&&pi===1)return;h[0]=Ai,h[1]=pi,h[2]=1;let Wi=Fm(g,h),Gs=Pr?[...Pr,0]:_,Qs=wv(h,Gs);L1(x,Qs,L1(x,Wi,L1(x,og(v,Qs),x)))},Tn=Wt=>{let Pr=V8();NE(Pr,Wt,[0,0,1]),L1(x,Pr,x)},In=Wt=>{let Pr=Array.isArray(Wt[0]);w[0]=Pr?Wt[0][0]:Wt[0],w[1]=Pr?Wt[0][1]:Wt[1],O[0]=Pr?Wt[1][0]:Wt[0],O[1]=Pr?Wt[1][1]:Wt[1]},cr=Wt=>{let Pr=Array.isArray(Wt[0]);I[0]=Pr?Wt[0][0]:Wt[0],I[1]=Pr?Wt[0][1]:Wt[1],H[0]=Pr?Wt[1][0]:Wt[0],H[1]=Pr?Wt[1][1]:Wt[1]},bn=Wt=>{!Wt||Wt.length<16||(x=Wt)},mn=Wt=>{_=[...Wt.slice(0,2),0,1]},qn=()=>{Ht(t,e,r)};return Ht(t,e,r),{get translation(){return de()},get target(){return ze()},get scaling(){return J()},get minScaling(){return Z()},get maxScaling(){return oe()},get scaleBounds(){return re()},get translationBounds(){return q()},get distance(){return ue()},get minDistance(){return K()},get maxDistance(){return k()},get rotation(){return se()},get view(){return er()},get viewCenter(){return Er()},lookAt:Ht,translate:xn,pan:xn,rotate:Tn,scale:$r,zoom:$r,reset:qn,set:(...Wt)=>(console.warn("`set()` is deprecated. Please use `setView()` instead."),bn(...Wt)),setScaleBounds:In,setTranslationBounds:cr,setView:bn,setViewCenter:mn}},$E=["pan","rotate"],Av={alt:"altKey",cmd:"metaKey",ctrl:"ctrlKey",meta:"metaKey",shift:"shiftKey"},PE=(t,{distance:e=1,target:r=[0,0],rotation:i=0,isNdc:s=!0,isFixed:o=!1,isPan:h=!0,isPanInverted:g=[!1,!0],panSpeed:v=1,isRotate:x=!0,rotateSpeed:_=1,defaultMouseDownMoveAction:w="pan",mouseDownMoveModKey:O="alt",isZoom:I=!0,zoomSpeed:H=1,viewCenter:J,scaleBounds:Z,translationBounds:oe,onKeyDown:se=()=>{},onKeyUp:re=()=>{},onMouseDown:q=()=>{},onMouseUp:ue=()=>{},onMouseMove:K=()=>{},onWheel:k=()=>{}}={})=>{let de=FE(r,e,i,J,Z,oe),ze=0,er=0,Er=0,Ht=0,xn=0,$r=0,Tn=!1,In=0,cr=1,bn=1,mn=1,qn=!1,Wt=!1,Pr=!1,hi=w==="pan",Ai=h,pi=h,ss=g,Va=g,ar=I,Wi=I,Gs=()=>{Ai=Array.isArray(h)?!!h[0]:h,pi=Array.isArray(h)?!!h[1]:h,ss=Array.isArray(g)?!!g[0]:g,Va=Array.isArray(g)?!!g[1]:g,ar=Array.isArray(I)?!!I[0]:I,Wi=Array.isArray(I)?!!I[1]:I};Gs();let Qs=s?gn=>gn/cr*2*mn:gn=>gn,no=s?gn=>gn/bn*2:gn=>-gn,wn=s?gn=>(-1+gn/cr*2)*mn:gn=>gn,Ei=s?gn=>1-gn/bn*2:gn=>gn,Ii=()=>{if(o){let Yi=Wt;return Wt=!1,Yi}qn=!1;let gn=ze,_s=er;if((Ai||pi)&&Tn&&(hi&&!Pr||!hi&&Pr)){let Yi=ss?xn-gn:gn-xn,as=Ai?Qs(v*Yi):0,Zs=Va?$r-_s:_s-$r,Ga=pi?no(v*Zs):0;(as!==0||Ga!==0)&&(de.pan([as,Ga]),qn=!0)}if((ar||Wi)&&In){let Yi=H*Math.exp(In/bn),as=wn(Er),Zs=Ei(Ht);de.scale([ar?1/Yi:1,Wi?1/Yi:1],[as,Zs]),qn=!0}if(x&&Tn&&(hi&&Pr||!hi&&!Pr)&&Math.abs(xn-gn)+Math.abs($r-_s)>0){let Yi=cr/2,as=bn/2,Zs=xn-Yi,Ga=as-$r,Yo=gn-Yi,N1=as-_s,Ro=BE([Zs,Ga],[Yo,N1]),ko=Zs*N1-Yo*Ga;de.rotate(_*Ro*Math.sign(ko)),qn=!0}In=0,xn=gn,$r=_s;let ya=qn||Wt;return Wt=!1,ya},si=({defaultMouseDownMoveAction:gn=null,isFixed:_s=null,isPan:ya=null,isPanInverted:Yi=null,isRotate:as=null,isZoom:Zs=null,panSpeed:Ga=null,rotateSpeed:Yo=null,zoomSpeed:N1=null,mouseDownMoveModKey:Ro=null}={})=>{w=gn!==null&&$E.includes(gn)?gn:w,hi=w==="pan",o=_s!==null?_s:o,h=ya!==null?ya:h,g=Yi!==null?Yi:g,x=as!==null?as:x,I=Zs!==null?Zs:I,v=+Ga>0?Ga:v,_=+Yo>0?Yo:_,H=+N1>0?N1:H,Gs(),O=Ro!==null&&Object.keys(Av).includes(Ro)?Ro:O},xi=()=>{let gn=t.getBoundingClientRect();cr=gn.width,bn=gn.height,mn=cr/bn},Ui=gn=>{Pr=!1,re(gn)},No=gn=>{Pr=gn[Av[O]],se(gn)},K1=gn=>{Tn=!1,ue(gn)},$=gn=>{Tn=gn.buttons===1,q(gn)},Wo=document.createEvent("MouseEvent").offsetX!==void 0?gn=>{Er=gn.offsetX,Ht=gn.offsetY}:gn=>{let _s=t.getBoundingClientRect();Er=gn.clientX-_s.left,Ht=gn.clientY-_s.top},V=gn=>{ze=gn.clientX,er=gn.clientY},ga=gn=>{V(gn),K(gn)},Fs=gn=>{if((ar||Wi)&&!o){gn.preventDefault(),V(gn),Wo(gn);let _s=gn.deltaMode===1?12:1;In+=_s*(gn.deltaY||gn.deltaX||0)}k(gn)},Do=()=>{de=void 0,window.removeEventListener("keydown",No),window.removeEventListener("keyup",Ui),t.removeEventListener("mousedown",$),window.removeEventListener("mouseup",K1),window.removeEventListener("mousemove",ga),t.removeEventListener("wheel",Fs)};window.addEventListener("keydown",No,{passive:!0}),window.addEventListener("keyup",Ui,{passive:!0}),t.addEventListener("mousedown",$,{passive:!0}),window.addEventListener("mouseup",K1,{passive:!0}),window.addEventListener("mousemove",ga,{passive:!0}),t.addEventListener("wheel",Fs,{passive:!1}),de.config=si,de.dispose=Do,de.refresh=xi,de.tick=Ii;let ds=gn=>function(){gn.apply(null,arguments),Wt=!0};return de.lookAt=ds(de.lookAt),de.translate=ds(de.translate),de.pan=ds(de.pan),de.rotate=ds(de.rotate),de.scale=ds(de.scale),de.zoom=ds(de.zoom),de.reset=ds(de.reset),de.set=ds(de.set),de.setScaleBounds=ds(de.setScaleBounds),de.setTranslationBounds=ds(de.setTranslationBounds),de.setView=ds(de.setView),de.setViewCenter=ds(de.setViewCenter),xi(),de};ew=` +`),Gt=Function.apply(null,k.concat(vr));return Gt.apply(null,Z)}return{global:Pt,link:Ge,block:Ct,proc:Qt,scope:Be,cond:ft,compile:rr}}var Xs="xyzw".split(""),Ja=5121,Js=1,Aa=2,Ta=0,Ia=1,ia=2,sa=3,pa=4,Oa=5,Ka=6,Ca="dither",Qa="blend.enable",La="blend.color",ma="blend.equation",ga="blend.func",Na="depth.enable",Da="depth.func",Za="depth.range",Ra="depth.mask",Ba="colorMask",Ks="cull.enable",eo="cull.face",ka="frontFace",Fa="lineWidth",pc="polygonOffset.enable",mc="polygonOffset.offset",Di="sample.alpha",S="sample.enable",P="sample.coverage",ee="stencil.enable",lt="stencil.mask",qt="stencil.func",Gr="stencil.opFront",Kt="stencil.opBack",Or="scissor.enable",sr="scissor.box",Gn="viewport",Gi="profile",Rs="framebuffer",sl="vert",t1="frag",Lo="elements",zc="primitive",Wc="count",_f="offset",Ou="instances",xf="vao",Sf="Width",_1="Height",Cu=Rs+Sf,Yc=Rs+_1,Ef=Gn+Sf,d0=Gn+_1,Eh="drawingBuffer",wh=Eh+Sf,Ah=Eh+_1,h0=[ga,ma,qt,Gr,Kt,P,Gn,sr,mc],al=34962,Xc=34963,Bs=35632,ks=35633,Jc=3553,p0=34067,m0=2884,g0=3042,y0=3024,b0=2960,K3=2929,Th=3089,v0=32823,_0=32926,Ih=32928,Q3=5126,r1=35664,V2=35665,G2=35666,Fl=5124,Ml=35667,$l=35668,j1=35669,Kc=35670,j2=35671,q2=35672,H2=35673,Pl=35674,Ma=35675,$a=35676,Pa=35678,Xn=35680,Qc=4,Ul=1028,Zc=1029,Oh=2304,eu=2305,gc=32775,z2=32776,W2=519,Vl=7680,Ch=0,Lh=1,Nh=32774,x0=513,Lu=36160,S0=36064,x1={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Dh=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],tu={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ol={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},ll={frag:Bs,vert:ks},Z3={cw:Oh,ccw:eu};function wf(E){return Array.isArray(E)||t(E)||Ot(E)}function Rh(E){return E.sort(function(k,Z){return k===Gn?-1:Z===Gn?1:k=1,Ge>=2,k)}else if(Z===pa){var Ct=E.data;return new Qs(Ct.thisDep,Ct.contextDep,Ct.propDep,k)}else{if(Z===Oa)return new Qs(!1,!1,!1,k);if(Z===Ka){for(var Be=!1,ft=!1,Pt=!1,Ut=0;Ut=1&&(ft=!0),rr>=2&&(Pt=!0)}else Qt.type===pa&&(Be=Be||Qt.data.thisDep,ft=ft||Qt.data.contextDep,Pt=Pt||Qt.data.propDep)}return new Qs(Be,ft,Pt,k)}else return new Qs(Z===sa,Z===ia,Z===Ia,k)}}var Nu=new Qs(!1,!1,!1,function(){});function hi(E,k,Z,Ge,Ct,Be,ft,Pt,Ut,Qt,rr,Zt,vr,Gt,Yt){var _e=Qt.Record,Ve={add:32774,subtract:32778,"reverse subtract":32779};Z.ext_blend_minmax&&(Ve.min=gc,Ve.max=z2);var Ht=Z.angle_instanced_arrays,or=Z.webgl_draw_buffers,Mt=Z.oes_vertex_array_object,Mr={dirty:!0,profile:Yt.profile},Rr={},Sn=[],Nt={},Lt={};function Wr(G){return G.replace(".","_")}function gr(G,D,ie){var ye=Wr(G);Sn.push(G),Rr[ye]=Mr[ye]=!!ie,Nt[ye]=D}function jt(G,D,ie){var ye=Wr(G);Sn.push(G),Array.isArray(ie)?(Mr[ye]=ie.slice(),Rr[ye]=ie.slice()):Mr[ye]=Rr[ye]=ie,Lt[ye]=D}gr(Ca,y0),gr(Qa,g0),jt(La,"blendColor",[0,0,0,0]),jt(ma,"blendEquationSeparate",[Nh,Nh]),jt(ga,"blendFuncSeparate",[Lh,Ch,Lh,Ch]),gr(Na,K3,!0),jt(Da,"depthFunc",x0),jt(Za,"depthRange",[0,1]),jt(Ra,"depthMask",!0),jt(Ba,Ba,[!0,!0,!0,!0]),gr(Ks,m0),jt(eo,"cullFace",Zc),jt(ka,ka,eu),jt(Fa,Fa,1),gr(pc,v0),jt(mc,"polygonOffset",[0,0]),gr(Di,_0),gr(S,Ih),jt(P,"sampleCoverage",[1,!1]),gr(ee,b0),jt(lt,"stencilMask",-1),jt(qt,"stencilFunc",[W2,0,-1]),jt(Gr,"stencilOpSeparate",[Ul,Vl,Vl,Vl]),jt(Kt,"stencilOpSeparate",[Zc,Vl,Vl,Vl]),gr(Or,Th),jt(sr,"scissor",[0,0,E.drawingBufferWidth,E.drawingBufferHeight]),jt(Gn,Gn,[0,0,E.drawingBufferWidth,E.drawingBufferHeight]);var xr={gl:E,context:vr,strings:k,next:Rr,current:Mr,draw:Zt,elements:Be,buffer:Ct,shader:rr,attributes:Qt.state,vao:Qt,uniforms:Ut,framebuffer:Pt,extensions:Z,timer:Gt,isBufferArgs:wf},Sr={primTypes:Xi,compareFuncs:tu,blendFuncs:x1,blendEquations:Ve,stencilOps:ol,glTypes:cs,orientationType:Z3};$.optional(function(){xr.isArrayLike=Ue}),or&&(Sr.backBuffer=[Zc],Sr.drawBuffer=ai(Ge.maxDrawbuffers,function(G){return G===0?[0]:ai(G,function(D){return S0+D})}));var zn=0;function Fn(){var G=xo(),D=G.link,ie=G.global;G.id=zn++,G.batchId="0";var ye=D(xr),Se=G.shared={props:"a0"};Object.keys(xr).forEach(function(ne){Se[ne]=ie.def(ye,".",ne)}),$.optional(function(){G.CHECK=D($),G.commandStr=$.guessCommand(),G.command=D(G.commandStr),G.assert=function(ne,j,xe){ne("if(!(",j,"))",this.CHECK,".commandRaise(",D(xe),",",this.command,");")},Sr.invalidBlendCombinations=Dh});var ce=G.next={},ae=G.current={};Object.keys(Lt).forEach(function(ne){Array.isArray(Mr[ne])&&(ce[ne]=ie.def(Se.next,".",ne),ae[ne]=ie.def(Se.current,".",ne))});var de=G.constants={};Object.keys(Sr).forEach(function(ne){de[ne]=ie.def(JSON.stringify(Sr[ne]))}),G.invoke=function(ne,j){switch(j.type){case Ta:var xe=["this",Se.context,Se.props,G.batchId];return ne.def(D(j.data),".call(",xe.slice(0,Math.max(j.data.length+1,4)),")");case Ia:return ne.def(Se.props,j.data);case ia:return ne.def(Se.context,j.data);case sa:return ne.def("this",j.data);case pa:return j.data.append(G,ne),j.data.ref;case Oa:return j.data.toString();case Ka:return j.data.map(function(Ie){return G.invoke(ne,Ie)})}},G.attribCache={};var M={};return G.scopeAttrib=function(ne){var j=k.id(ne);if(j in M)return M[j];var xe=Qt.scope[j];xe||(xe=Qt.scope[j]=new _e);var Ie=M[j]=D(xe);return Ie},G}function Cr(G){var D=G.static,ie=G.dynamic,ye;if(Gi in D){var Se=!!D[Gi];ye=Vs(function(ae,de){return Se}),ye.enable=Se}else if(Gi in ie){var ce=ie[Gi];ye=Vo(ce,function(ae,de){return ae.invoke(de,ce)})}return ye}function Nr(G,D){var ie=G.static,ye=G.dynamic;if(Rs in ie){var Se=ie[Rs];return Se?(Se=Pt.getFramebuffer(Se),$.command(Se,"invalid framebuffer object"),Vs(function(ae,de){var M=ae.link(Se),ne=ae.shared;de.set(ne.framebuffer,".next",M);var j=ne.context;return de.set(j,"."+Cu,M+".width"),de.set(j,"."+Yc,M+".height"),M})):Vs(function(ae,de){var M=ae.shared;de.set(M.framebuffer,".next","null");var ne=M.context;return de.set(ne,"."+Cu,ne+"."+wh),de.set(ne,"."+Yc,ne+"."+Ah),"null"})}else if(Rs in ye){var ce=ye[Rs];return Vo(ce,function(ae,de){var M=ae.invoke(de,ce),ne=ae.shared,j=ne.framebuffer,xe=de.def(j,".getFramebuffer(",M,")");$.optional(function(){ae.assert(de,"!"+M+"||"+xe,"invalid framebuffer object")}),de.set(j,".next",xe);var Ie=ne.context;return de.set(Ie,"."+Cu,xe+"?"+xe+".width:"+Ie+"."+wh),de.set(Ie,"."+Yc,xe+"?"+xe+".height:"+Ie+"."+Ah),xe})}else return null}function Rn(G,D,ie){var ye=G.static,Se=G.dynamic;function ce(M){if(M in ye){var ne=ye[M];$.commandType(ne,"object","invalid "+M,ie.commandStr);var j=!0,xe=ne.x|0,Ie=ne.y|0,kt,hr;return"width"in ne?(kt=ne.width|0,$.command(kt>=0,"invalid "+M,ie.commandStr)):j=!1,"height"in ne?(hr=ne.height|0,$.command(hr>=0,"invalid "+M,ie.commandStr)):j=!1,new Qs(!j&&D&&D.thisDep,!j&&D&&D.contextDep,!j&&D&&D.propDep,function(lr,tn){var qr=lr.shared.context,Kr=kt;"width"in ne||(Kr=tn.def(qr,".",Cu,"-",xe));var Xr=hr;return"height"in ne||(Xr=tn.def(qr,".",Yc,"-",Ie)),[xe,Ie,Kr,Xr]})}else if(M in Se){var pr=Se[M],Br=Vo(pr,function(lr,tn){var qr=lr.invoke(tn,pr);$.optional(function(){lr.assert(tn,qr+"&&typeof "+qr+'==="object"',"invalid "+M)});var Kr=lr.shared.context,Xr=tn.def(qr,".x|0"),Qr=tn.def(qr,".y|0"),Bn=tn.def('"width" in ',qr,"?",qr,".width|0:","(",Kr,".",Cu,"-",Xr,")"),rs=tn.def('"height" in ',qr,"?",qr,".height|0:","(",Kr,".",Yc,"-",Qr,")");return $.optional(function(){lr.assert(tn,Bn+">=0&&"+rs+">=0","invalid "+M)}),[Xr,Qr,Bn,rs]});return D&&(Br.thisDep=Br.thisDep||D.thisDep,Br.contextDep=Br.contextDep||D.contextDep,Br.propDep=Br.propDep||D.propDep),Br}else return D?new Qs(D.thisDep,D.contextDep,D.propDep,function(lr,tn){var qr=lr.shared.context;return[0,0,tn.def(qr,".",Cu),tn.def(qr,".",Yc)]}):null}var ae=ce(Gn);if(ae){var de=ae;ae=new Qs(ae.thisDep,ae.contextDep,ae.propDep,function(M,ne){var j=de.append(M,ne),xe=M.shared.context;return ne.set(xe,"."+Ef,j[2]),ne.set(xe,"."+d0,j[3]),j})}return{viewport:ae,scissor_box:ce(sr)}}function Mn(G,D){var ie=G.static,ye=typeof ie[t1]=="string"&&typeof ie[sl]=="string";if(ye){if(Object.keys(D.dynamic).length>0)return null;var Se=D.static,ce=Object.keys(Se);if(ce.length>0&&typeof Se[ce[0]]=="number"){for(var ae=[],de=0;de=0,"invalid "+tn,D.commandStr),Vs(function(Qr,Bn){return qr&&(Qr.OFFSET=Kr),Kr})}else if(tn in ye){var Xr=ye[tn];return Vo(Xr,function(Qr,Bn){var rs=Qr.invoke(Bn,Xr);return qr&&(Qr.OFFSET=rs,$.optional(function(){Qr.assert(Bn,rs+">=0","invalid "+tn)})),rs})}else if(qr){if(M)return Vs(function(Qr,Bn){return Qr.OFFSET=0,0});if(ce)return new Qs(de.thisDep,de.contextDep,de.propDep,function(Qr,Bn){return Bn.def(Qr.shared.vao+".currentVAO?"+Qr.shared.vao+".currentVAO.offset:0")})}else if(ce)return new Qs(de.thisDep,de.contextDep,de.propDep,function(Qr,Bn){return Bn.def(Qr.shared.vao+".currentVAO?"+Qr.shared.vao+".currentVAO.instances:-1")});return null}var kt=Ie(_f,!0);function hr(){if(Wc in ie){var tn=ie[Wc]|0;return Se.count=tn,$.command(typeof tn=="number"&&tn>=0,"invalid vertex count",D.commandStr),Vs(function(){return tn})}else if(Wc in ye){var qr=ye[Wc];return Vo(qr,function(Bn,rs){var Ga=Bn.invoke(rs,qr);return $.optional(function(){Bn.assert(rs,"typeof "+Ga+'==="number"&&'+Ga+">=0&&"+Ga+"===("+Ga+"|0)","invalid vertex count")}),Ga})}else if(M)if(yc(j)){if(j)return kt?new Qs(kt.thisDep,kt.contextDep,kt.propDep,function(Bn,rs){var Ga=rs.def(Bn.ELEMENTS,".vertCount-",Bn.OFFSET);return $.optional(function(){Bn.assert(rs,Ga+">=0","invalid vertex offset/element buffer too small")}),Ga}):Vs(function(Bn,rs){return rs.def(Bn.ELEMENTS,".vertCount")});var Kr=Vs(function(){return-1});return $.optional(function(){Kr.MISSING=!0}),Kr}else{var Xr=new Qs(j.thisDep||kt.thisDep,j.contextDep||kt.contextDep,j.propDep||kt.propDep,function(Bn,rs){var Ga=Bn.ELEMENTS;return Bn.OFFSET?rs.def(Ga,"?",Ga,".vertCount-",Bn.OFFSET,":-1"):rs.def(Ga,"?",Ga,".vertCount:-1")});return $.optional(function(){Xr.DYNAMIC=!0}),Xr}else if(ce){var Qr=new Qs(de.thisDep,de.contextDep,de.propDep,function(Bn,rs){return rs.def(Bn.shared.vao,".currentVAO?",Bn.shared.vao,".currentVAO.count:-1")});return Qr}return null}var pr=xe(),Br=hr(),lr=Ie(Ou,!1);return{elements:j,primitive:pr,count:Br,instances:lr,offset:kt,vao:de,vaoActive:ce,elementsActive:M,static:Se}}function Ts(G,D){var ie=G.static,ye=G.dynamic,Se={};return Sn.forEach(function(ce){var ae=Wr(ce);function de(M,ne){if(ce in ie){var j=M(ie[ce]);Se[ae]=Vs(function(){return j})}else if(ce in ye){var xe=ye[ce];Se[ae]=Vo(xe,function(Ie,kt){return ne(Ie,kt,Ie.invoke(kt,xe))})}}switch(ce){case Ks:case Qa:case Ca:case ee:case Na:case Or:case pc:case Di:case S:case Ra:return de(function(M){return $.commandType(M,"boolean",ce,D.commandStr),M},function(M,ne,j){return $.optional(function(){M.assert(ne,"typeof "+j+'==="boolean"',"invalid flag "+ce,M.commandStr)}),j});case Da:return de(function(M){return $.commandParameter(M,tu,"invalid "+ce,D.commandStr),tu[M]},function(M,ne,j){var xe=M.constants.compareFuncs;return $.optional(function(){M.assert(ne,j+" in "+xe,"invalid "+ce+", must be one of "+Object.keys(tu))}),ne.def(xe,"[",j,"]")});case Za:return de(function(M){return $.command(Ue(M)&&M.length===2&&typeof M[0]=="number"&&typeof M[1]=="number"&&M[0]<=M[1],"depth range is 2d array",D.commandStr),M},function(M,ne,j){$.optional(function(){M.assert(ne,M.shared.isArrayLike+"("+j+")&&"+j+".length===2&&typeof "+j+'[0]==="number"&&typeof '+j+'[1]==="number"&&'+j+"[0]<="+j+"[1]","depth range must be a 2d array")});var xe=ne.def("+",j,"[0]"),Ie=ne.def("+",j,"[1]");return[xe,Ie]});case ga:return de(function(M){$.commandType(M,"object","blend.func",D.commandStr);var ne="srcRGB"in M?M.srcRGB:M.src,j="srcAlpha"in M?M.srcAlpha:M.src,xe="dstRGB"in M?M.dstRGB:M.dst,Ie="dstAlpha"in M?M.dstAlpha:M.dst;return $.commandParameter(ne,x1,ae+".srcRGB",D.commandStr),$.commandParameter(j,x1,ae+".srcAlpha",D.commandStr),$.commandParameter(xe,x1,ae+".dstRGB",D.commandStr),$.commandParameter(Ie,x1,ae+".dstAlpha",D.commandStr),$.command(Dh.indexOf(ne+", "+xe)===-1,"unallowed blending combination (srcRGB, dstRGB) = ("+ne+", "+xe+")",D.commandStr),[x1[ne],x1[xe],x1[j],x1[Ie]]},function(M,ne,j){var xe=M.constants.blendFuncs;$.optional(function(){M.assert(ne,j+"&&typeof "+j+'==="object"',"invalid blend func, must be an object")});function Ie(qr,Kr){var Xr=ne.def('"',qr,Kr,'" in ',j,"?",j,".",qr,Kr,":",j,".",qr);return $.optional(function(){M.assert(ne,Xr+" in "+xe,"invalid "+ce+"."+qr+Kr+", must be one of "+Object.keys(x1))}),Xr}var kt=Ie("src","RGB"),hr=Ie("dst","RGB");$.optional(function(){var qr=M.constants.invalidBlendCombinations;M.assert(ne,qr+".indexOf("+kt+'+", "+'+hr+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var pr=ne.def(xe,"[",kt,"]"),Br=ne.def(xe,"[",Ie("src","Alpha"),"]"),lr=ne.def(xe,"[",hr,"]"),tn=ne.def(xe,"[",Ie("dst","Alpha"),"]");return[pr,lr,Br,tn]});case ma:return de(function(M){if(typeof M=="string")return $.commandParameter(M,Ve,"invalid "+ce,D.commandStr),[Ve[M],Ve[M]];if(typeof M=="object")return $.commandParameter(M.rgb,Ve,ce+".rgb",D.commandStr),$.commandParameter(M.alpha,Ve,ce+".alpha",D.commandStr),[Ve[M.rgb],Ve[M.alpha]];$.commandRaise("invalid blend.equation",D.commandStr)},function(M,ne,j){var xe=M.constants.blendEquations,Ie=ne.def(),kt=ne.def(),hr=M.cond("typeof ",j,'==="string"');return $.optional(function(){function pr(Br,lr,tn){M.assert(Br,tn+" in "+xe,"invalid "+lr+", must be one of "+Object.keys(Ve))}pr(hr.then,ce,j),M.assert(hr.else,j+"&&typeof "+j+'==="object"',"invalid "+ce),pr(hr.else,ce+".rgb",j+".rgb"),pr(hr.else,ce+".alpha",j+".alpha")}),hr.then(Ie,"=",kt,"=",xe,"[",j,"];"),hr.else(Ie,"=",xe,"[",j,".rgb];",kt,"=",xe,"[",j,".alpha];"),ne(hr),[Ie,kt]});case La:return de(function(M){return $.command(Ue(M)&&M.length===4,"blend.color must be a 4d array",D.commandStr),ai(4,function(ne){return+M[ne]})},function(M,ne,j){return $.optional(function(){M.assert(ne,M.shared.isArrayLike+"("+j+")&&"+j+".length===4","blend.color must be a 4d array")}),ai(4,function(xe){return ne.def("+",j,"[",xe,"]")})});case lt:return de(function(M){return $.commandType(M,"number",ae,D.commandStr),M|0},function(M,ne,j){return $.optional(function(){M.assert(ne,"typeof "+j+'==="number"',"invalid stencil.mask")}),ne.def(j,"|0")});case qt:return de(function(M){$.commandType(M,"object",ae,D.commandStr);var ne=M.cmp||"keep",j=M.ref||0,xe="mask"in M?M.mask:-1;return $.commandParameter(ne,tu,ce+".cmp",D.commandStr),$.commandType(j,"number",ce+".ref",D.commandStr),$.commandType(xe,"number",ce+".mask",D.commandStr),[tu[ne],j,xe]},function(M,ne,j){var xe=M.constants.compareFuncs;$.optional(function(){function pr(){M.assert(ne,Array.prototype.join.call(arguments,""),"invalid stencil.func")}pr(j+"&&typeof ",j,'==="object"'),pr('!("cmp" in ',j,")||(",j,".cmp in ",xe,")")});var Ie=ne.def('"cmp" in ',j,"?",xe,"[",j,".cmp]",":",Vl),kt=ne.def(j,".ref|0"),hr=ne.def('"mask" in ',j,"?",j,".mask|0:-1");return[Ie,kt,hr]});case Gr:case Kt:return de(function(M){$.commandType(M,"object",ae,D.commandStr);var ne=M.fail||"keep",j=M.zfail||"keep",xe=M.zpass||"keep";return $.commandParameter(ne,ol,ce+".fail",D.commandStr),$.commandParameter(j,ol,ce+".zfail",D.commandStr),$.commandParameter(xe,ol,ce+".zpass",D.commandStr),[ce===Kt?Zc:Ul,ol[ne],ol[j],ol[xe]]},function(M,ne,j){var xe=M.constants.stencilOps;$.optional(function(){M.assert(ne,j+"&&typeof "+j+'==="object"',"invalid "+ce)});function Ie(kt){return $.optional(function(){M.assert(ne,'!("'+kt+'" in '+j+")||("+j+"."+kt+" in "+xe+")","invalid "+ce+"."+kt+", must be one of "+Object.keys(ol))}),ne.def('"',kt,'" in ',j,"?",xe,"[",j,".",kt,"]:",Vl)}return[ce===Kt?Zc:Ul,Ie("fail"),Ie("zfail"),Ie("zpass")]});case mc:return de(function(M){$.commandType(M,"object",ae,D.commandStr);var ne=M.factor|0,j=M.units|0;return $.commandType(ne,"number",ae+".factor",D.commandStr),$.commandType(j,"number",ae+".units",D.commandStr),[ne,j]},function(M,ne,j){$.optional(function(){M.assert(ne,j+"&&typeof "+j+'==="object"',"invalid "+ce)});var xe=ne.def(j,".factor|0"),Ie=ne.def(j,".units|0");return[xe,Ie]});case eo:return de(function(M){var ne=0;return M==="front"?ne=Ul:M==="back"&&(ne=Zc),$.command(!!ne,ae,D.commandStr),ne},function(M,ne,j){return $.optional(function(){M.assert(ne,j+'==="front"||'+j+'==="back"',"invalid cull.face")}),ne.def(j,'==="front"?',Ul,":",Zc)});case Fa:return de(function(M){return $.command(typeof M=="number"&&M>=Ge.lineWidthDims[0]&&M<=Ge.lineWidthDims[1],"invalid line width, must be a positive number between "+Ge.lineWidthDims[0]+" and "+Ge.lineWidthDims[1],D.commandStr),M},function(M,ne,j){return $.optional(function(){M.assert(ne,"typeof "+j+'==="number"&&'+j+">="+Ge.lineWidthDims[0]+"&&"+j+"<="+Ge.lineWidthDims[1],"invalid line width")}),j});case ka:return de(function(M){return $.commandParameter(M,Z3,ae,D.commandStr),Z3[M]},function(M,ne,j){return $.optional(function(){M.assert(ne,j+'==="cw"||'+j+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),ne.def(j+'==="cw"?'+Oh+":"+eu)});case Ba:return de(function(M){return $.command(Ue(M)&&M.length===4,"color.mask must be length 4 array",D.commandStr),M.map(function(ne){return!!ne})},function(M,ne,j){return $.optional(function(){M.assert(ne,M.shared.isArrayLike+"("+j+")&&"+j+".length===4","invalid color.mask")}),ai(4,function(xe){return"!!"+j+"["+xe+"]"})});case P:return de(function(M){$.command(typeof M=="object"&&M,ae,D.commandStr);var ne="value"in M?M.value:1,j=!!M.invert;return $.command(typeof ne=="number"&&ne>=0&&ne<=1,"sample.coverage.value must be a number between 0 and 1",D.commandStr),[ne,j]},function(M,ne,j){$.optional(function(){M.assert(ne,j+"&&typeof "+j+'==="object"',"invalid sample.coverage")});var xe=ne.def('"value" in ',j,"?+",j,".value:1"),Ie=ne.def("!!",j,".invert");return[xe,Ie]})}}),Se}function Ai(G,D){var ie=G.static,ye=G.dynamic,Se={};return Object.keys(ie).forEach(function(ce){var ae=ie[ce],de;if(typeof ae=="number"||typeof ae=="boolean")de=Vs(function(){return ae});else if(typeof ae=="function"){var M=ae._reglType;M==="texture2d"||M==="textureCube"?de=Vs(function(ne){return ne.link(ae)}):M==="framebuffer"||M==="framebufferCube"?($.command(ae.color.length>0,'missing color attachment for framebuffer sent to uniform "'+ce+'"',D.commandStr),de=Vs(function(ne){return ne.link(ae.color[0])})):$.commandRaise('invalid data for uniform "'+ce+'"',D.commandStr)}else Ue(ae)?de=Vs(function(ne){var j=ne.global.def("[",ai(ae.length,function(xe){return $.command(typeof ae[xe]=="number"||typeof ae[xe]=="boolean","invalid uniform "+ce,ne.commandStr),ae[xe]}),"]");return j}):$.commandRaise('invalid or missing data for uniform "'+ce+'"',D.commandStr);de.value=ae,Se[ce]=de}),Object.keys(ye).forEach(function(ce){var ae=ye[ce];Se[ce]=Vo(ae,function(de,M){return de.invoke(M,ae)})}),Se}function ts(G,D){var ie=G.static,ye=G.dynamic,Se={};return Object.keys(ie).forEach(function(ce){var ae=ie[ce],de=k.id(ce),M=new _e;if(wf(ae))M.state=Js,M.buffer=Ct.getBuffer(Ct.create(ae,al,!1,!0)),M.type=0;else{var ne=Ct.getBuffer(ae);if(ne)M.state=Js,M.buffer=ne,M.type=0;else if($.command(typeof ae=="object"&&ae,"invalid data for attribute "+ce,D.commandStr),"constant"in ae){var j=ae.constant;M.buffer="null",M.state=Aa,typeof j=="number"?M.x=j:($.command(Ue(j)&&j.length>0&&j.length<=4,"invalid constant for attribute "+ce,D.commandStr),Xs.forEach(function(lr,tn){tn=0,'invalid offset for attribute "'+ce+'"',D.commandStr);var Ie=ae.stride|0;$.command(Ie>=0&&Ie<256,'invalid stride for attribute "'+ce+'", must be integer betweeen [0, 255]',D.commandStr);var kt=ae.size|0;$.command(!("size"in ae)||kt>0&&kt<=4,'invalid size for attribute "'+ce+'", must be 1,2,3,4',D.commandStr);var hr=!!ae.normalized,pr=0;"type"in ae&&($.commandParameter(ae.type,cs,"invalid type for attribute "+ce,D.commandStr),pr=cs[ae.type]);var Br=ae.divisor|0;$.optional(function(){"divisor"in ae&&($.command(Br===0||Ht,'cannot specify divisor for attribute "'+ce+'", instancing not supported',D.commandStr),$.command(Br>=0,'invalid divisor for attribute "'+ce+'"',D.commandStr));var lr=D.commandStr,tn=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(ae).forEach(function(qr){$.command(tn.indexOf(qr)>=0,'unknown parameter "'+qr+'" for attribute pointer "'+ce+'" (valid parameters are '+tn+")",lr)})}),M.buffer=ne,M.state=Js,M.size=kt,M.normalized=hr,M.type=pr||ne.dtype,M.offset=xe,M.stride=Ie,M.divisor=Br}}Se[ce]=Vs(function(lr,tn){var qr=lr.attribCache;if(de in qr)return qr[de];var Kr={isStream:!1};return Object.keys(M).forEach(function(Xr){Kr[Xr]=M[Xr]}),M.buffer&&(Kr.buffer=lr.link(M.buffer),Kr.type=Kr.type||Kr.buffer+".dtype"),qr[de]=Kr,Kr})}),Object.keys(ye).forEach(function(ce){var ae=ye[ce];function de(M,ne){var j=M.invoke(ne,ae),xe=M.shared,Ie=M.constants,kt=xe.isBufferArgs,hr=xe.buffer;$.optional(function(){M.assert(ne,j+"&&(typeof "+j+'==="object"||typeof '+j+'==="function")&&('+kt+"("+j+")||"+hr+".getBuffer("+j+")||"+hr+".getBuffer("+j+".buffer)||"+kt+"("+j+'.buffer)||("constant" in '+j+"&&(typeof "+j+'.constant==="number"||'+xe.isArrayLike+"("+j+".constant))))",'invalid dynamic attribute "'+ce+'"')});var pr={isStream:ne.def(!1)},Br=new _e;Br.state=Js,Object.keys(Br).forEach(function(Kr){pr[Kr]=ne.def(""+Br[Kr])});var lr=pr.buffer,tn=pr.type;ne("if(",kt,"(",j,")){",pr.isStream,"=true;",lr,"=",hr,".createStream(",al,",",j,");",tn,"=",lr,".dtype;","}else{",lr,"=",hr,".getBuffer(",j,");","if(",lr,"){",tn,"=",lr,".dtype;",'}else if("constant" in ',j,"){",pr.state,"=",Aa,";","if(typeof "+j+'.constant === "number"){',pr[Xs[0]],"=",j,".constant;",Xs.slice(1).map(function(Kr){return pr[Kr]}).join("="),"=0;","}else{",Xs.map(function(Kr,Xr){return pr[Kr]+"="+j+".constant.length>"+Xr+"?"+j+".constant["+Xr+"]:0;"}).join(""),"}}else{","if(",kt,"(",j,".buffer)){",lr,"=",hr,".createStream(",al,",",j,".buffer);","}else{",lr,"=",hr,".getBuffer(",j,".buffer);","}",tn,'="type" in ',j,"?",Ie.glTypes,"[",j,".type]:",lr,".dtype;",pr.normalized,"=!!",j,".normalized;");function qr(Kr){ne(pr[Kr],"=",j,".",Kr,"|0;")}return qr("size"),qr("offset"),qr("stride"),qr("divisor"),ne("}}"),ne.exit("if(",pr.isStream,"){",hr,".destroyStream(",lr,");","}"),pr}Se[ce]=Vo(ae,de)}),Se}function bs(G){var D=G.static,ie=G.dynamic,ye={};return Object.keys(D).forEach(function(Se){var ce=D[Se];ye[Se]=Vs(function(ae,de){return typeof ce=="number"||typeof ce=="boolean"?""+ce:ae.link(ce)})}),Object.keys(ie).forEach(function(Se){var ce=ie[Se];ye[Se]=Vo(ce,function(ae,de){return ae.invoke(de,ce)})}),ye}function Gs(G,D,ie,ye,Se){var ce=G.static,ae=G.dynamic;$.optional(function(){var qr=[Rs,sl,t1,Lo,zc,_f,Wc,Ou,Gi,xf].concat(Sn);function Kr(Xr){Object.keys(Xr).forEach(function(Qr){$.command(qr.indexOf(Qr)>=0,'unknown parameter "'+Qr+'"',Se.commandStr)})}Kr(ce),Kr(ae)});var de=Mn(G,D),M=Nr(G,Se),ne=Rn(G,M,Se),j=Ss(G,Se),xe=Ts(G,Se),Ie=Ei(G,Se,de);function kt(qr){var Kr=ne[qr];Kr&&(xe[qr]=Kr)}kt(Gn),kt(Wr(sr));var hr=Object.keys(xe).length>0,pr={framebuffer:M,draw:j,shader:Ie,state:xe,dirty:hr,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(pr.profile=Cr(G,Se),pr.uniforms=Ai(ie,Se),pr.drawVAO=pr.scopeVAO=j.vao,!pr.drawVAO&&Ie.program&&!de&&Z.angle_instanced_arrays&&j.static.elements){var Br=!0,lr=Ie.program.attributes.map(function(qr){var Kr=D.static[qr];return Br=Br&&!!Kr,Kr});if(Br&&lr.length>0){var tn=Qt.getVAO(Qt.createVAO({attributes:lr,elements:j.static.elements}));pr.drawVAO=new Qs(null,null,null,function(qr,Kr){return qr.link(tn)}),pr.useVAO=!0}}return de?pr.useVAO=!0:pr.attributes=ts(D,Se),pr.context=bs(ye,Se),pr}function Zs(G,D,ie){var ye=G.shared,Se=ye.context,ce=G.scope();Object.keys(ie).forEach(function(ae){D.save(Se,"."+ae);var de=ie[ae],M=de.append(G,D);Array.isArray(M)?ce(Se,".",ae,"=[",M.join(),"];"):ce(Se,".",ae,"=",M,";")}),D(ce)}function ea(G,D,ie,ye){var Se=G.shared,ce=Se.gl,ae=Se.framebuffer,de;or&&(de=D.def(Se.extensions,".webgl_draw_buffers"));var M=G.constants,ne=M.drawBuffer,j=M.backBuffer,xe;ie?xe=ie.append(G,D):xe=D.def(ae,".next"),ye||D("if(",xe,"!==",ae,".cur){"),D("if(",xe,"){",ce,".bindFramebuffer(",Lu,",",xe,".framebuffer);"),or&&D(de,".drawBuffersWEBGL(",ne,"[",xe,".colorAttachments.length]);"),D("}else{",ce,".bindFramebuffer(",Lu,",null);"),or&&D(de,".drawBuffersWEBGL(",j,");"),D("}",ae,".cur=",xe,";"),ye||D("}")}function ya(G,D,ie){var ye=G.shared,Se=ye.gl,ce=G.current,ae=G.next,de=ye.current,M=ye.next,ne=G.cond(de,".dirty");Sn.forEach(function(j){var xe=Wr(j);if(!(xe in ie.state)){var Ie,kt;if(xe in ae){Ie=ae[xe],kt=ce[xe];var hr=ai(Mr[xe].length,function(Br){return ne.def(Ie,"[",Br,"]")});ne(G.cond(hr.map(function(Br,lr){return Br+"!=="+kt+"["+lr+"]"}).join("||")).then(Se,".",Lt[xe],"(",hr,");",hr.map(function(Br,lr){return kt+"["+lr+"]="+Br}).join(";"),";"))}else{Ie=ne.def(M,".",xe);var pr=G.cond(Ie,"!==",de,".",xe);ne(pr),xe in Nt?pr(G.cond(Ie).then(Se,".enable(",Nt[xe],");").else(Se,".disable(",Nt[xe],");"),de,".",xe,"=",Ie,";"):pr(Se,".",Lt[xe],"(",Ie,");",de,".",xe,"=",Ie,";")}}}),Object.keys(ie.state).length===0&&ne(de,".dirty=false;"),D(ne)}function Ua(G,D,ie,ye){var Se=G.shared,ce=G.current,ae=Se.current,de=Se.gl;Rh(Object.keys(ie)).forEach(function(M){var ne=ie[M];if(!(ye&&!ye(ne))){var j=ne.append(G,D);if(Nt[M]){var xe=Nt[M];yc(ne)?j?D(de,".enable(",xe,");"):D(de,".disable(",xe,");"):D(G.cond(j).then(de,".enable(",xe,");").else(de,".disable(",xe,");")),D(ae,".",M,"=",j,";")}else if(Ue(j)){var Ie=ce[M];D(de,".",Lt[M],"(",j,");",j.map(function(kt,hr){return Ie+"["+hr+"]="+kt}).join(";"),";")}else D(de,".",Lt[M],"(",j,");",ae,".",M,"=",j,";")}})}function Os(G,D){Ht&&(G.instancing=D.def(G.shared.extensions,".angle_instanced_arrays"))}function li(G,D,ie,ye,Se){var ce=G.shared,ae=G.stats,de=ce.current,M=ce.timer,ne=ie.profile;function j(){return typeof performance>"u"?"Date.now()":"performance.now()"}var xe,Ie;function kt(qr){xe=D.def(),qr(xe,"=",j(),";"),typeof Se=="string"?qr(ae,".count+=",Se,";"):qr(ae,".count++;"),Gt&&(ye?(Ie=D.def(),qr(Ie,"=",M,".getNumPendingQueries();")):qr(M,".beginQuery(",ae,");"))}function hr(qr){qr(ae,".cpuTime+=",j(),"-",xe,";"),Gt&&(ye?qr(M,".pushScopeStats(",Ie,",",M,".getNumPendingQueries(),",ae,");"):qr(M,".endQuery();"))}function pr(qr){var Kr=D.def(de,".profile");D(de,".profile=",qr,";"),D.exit(de,".profile=",Kr,";")}var Br;if(ne){if(yc(ne)){ne.enable?(kt(D),hr(D.exit),pr("true")):pr("false");return}Br=ne.append(G,D),pr(Br)}else Br=D.def(de,".profile");var lr=G.block();kt(lr),D("if(",Br,"){",lr,"}");var tn=G.block();hr(tn),D.exit("if(",Br,"){",tn,"}")}function Va(G,D,ie,ye,Se){var ce=G.shared;function ae(M){switch(M){case r1:case Ml:case j2:return 2;case V2:case $l:case q2:return 3;case G2:case j1:case H2:return 4;default:return 1}}function de(M,ne,j){var xe=ce.gl,Ie=D.def(M,".location"),kt=D.def(ce.attributes,"[",Ie,"]"),hr=j.state,pr=j.buffer,Br=[j.x,j.y,j.z,j.w],lr=["buffer","normalized","offset","stride"];function tn(){D("if(!",kt,".buffer){",xe,".enableVertexAttribArray(",Ie,");}");var Kr=j.type,Xr;if(j.size?Xr=D.def(j.size,"||",ne):Xr=ne,D("if(",kt,".type!==",Kr,"||",kt,".size!==",Xr,"||",lr.map(function(Bn){return kt+"."+Bn+"!=="+j[Bn]}).join("||"),"){",xe,".bindBuffer(",al,",",pr,".buffer);",xe,".vertexAttribPointer(",[Ie,Xr,Kr,j.normalized,j.stride,j.offset],");",kt,".type=",Kr,";",kt,".size=",Xr,";",lr.map(function(Bn){return kt+"."+Bn+"="+j[Bn]+";"}).join(""),"}"),Ht){var Qr=j.divisor;D("if(",kt,".divisor!==",Qr,"){",G.instancing,".vertexAttribDivisorANGLE(",[Ie,Qr],");",kt,".divisor=",Qr,";}")}}function qr(){D("if(",kt,".buffer){",xe,".disableVertexAttribArray(",Ie,");",kt,".buffer=null;","}if(",Xs.map(function(Kr,Xr){return kt+"."+Kr+"!=="+Br[Xr]}).join("||"),"){",xe,".vertexAttrib4f(",Ie,",",Br,");",Xs.map(function(Kr,Xr){return kt+"."+Kr+"="+Br[Xr]+";"}).join(""),"}")}hr===Js?tn():hr===Aa?qr():(D("if(",hr,"===",Js,"){"),tn(),D("}else{"),qr(),D("}"))}ye.forEach(function(M){var ne=M.name,j=ie.attributes[ne],xe;if(j){if(!Se(j))return;xe=j.append(G,D)}else{if(!Se(Nu))return;var Ie=G.scopeAttrib(ne);$.optional(function(){G.assert(D,Ie+".state","missing attribute "+ne)}),xe={},Object.keys(new _e).forEach(function(kt){xe[kt]=D.def(Ie,".",kt)})}de(G.link(M),ae(M.info.type),xe)})}function ji(G,D,ie,ye,Se,ce){for(var ae=G.shared,de=ae.gl,M,ne=0;ne1){for(var Ga=[],bc=[],cl=0;cl=0","missing vertex count")})):(Qr=Bn.def(ae,".",Wc),$.optional(function(){G.assert(Bn,Qr+">=0","missing vertex count")})),Qr}var j=M();function xe(Xr){var Qr=de[Xr];return Qr?Qr.contextDep&&ye.contextDynamic||Qr.propDep?Qr.append(G,ie):Qr.append(G,D):D.def(ae,".",Xr)}var Ie=xe(zc),kt=xe(_f),hr=ne();if(typeof hr=="number"){if(hr===0)return}else ie("if(",hr,"){"),ie.exit("}");var pr,Br;Ht&&(pr=xe(Ou),Br=G.instancing);var lr=j+".type",tn=de.elements&&yc(de.elements)&&!de.vaoActive;function qr(){function Xr(){ie(Br,".drawElementsInstancedANGLE(",[Ie,hr,lr,kt+"<<(("+lr+"-"+Ja+")>>1)",pr],");")}function Qr(){ie(Br,".drawArraysInstancedANGLE(",[Ie,kt,hr,pr],");")}j&&j!=="null"?tn?Xr():(ie("if(",j,"){"),Xr(),ie("}else{"),Qr(),ie("}")):Qr()}function Kr(){function Xr(){ie(ce+".drawElements("+[Ie,hr,lr,kt+"<<(("+lr+"-"+Ja+")>>1)"]+");")}function Qr(){ie(ce+".drawArrays("+[Ie,kt,hr]+");")}j&&j!=="null"?tn?Xr():(ie("if(",j,"){"),Xr(),ie("}else{"),Qr(),ie("}")):Qr()}Ht&&(typeof pr!="number"||pr>=0)?typeof pr=="string"?(ie("if(",pr,">0){"),qr(),ie("}else if(",pr,"<0){"),Kr(),ie("}")):qr():Kr()}function vi(G,D,ie,ye,Se){var ce=Fn(),ae=ce.proc("body",Se);return $.optional(function(){ce.commandStr=D.commandStr,ce.command=ce.link(D.commandStr)}),Ht&&(ce.instancing=ae.def(ce.shared.extensions,".angle_instanced_arrays")),G(ce,ae,ie,ye),ce.compile().body}function Ri(G,D,ie,ye){Os(G,D),ie.useVAO?ie.drawVAO?D(G.shared.vao,".setVAO(",ie.drawVAO.append(G,D),");"):D(G.shared.vao,".setVAO(",G.shared.vao,".targetVAO);"):(D(G.shared.vao,".setVAO(null);"),Va(G,D,ie,ye.attributes,function(){return!0})),ji(G,D,ie,ye.uniforms,function(){return!0},!1),Nn(G,D,D,ie)}function Cs(G,D){var ie=G.proc("draw",1);Os(G,ie),Zs(G,ie,D.context),ea(G,ie,D.framebuffer),ya(G,ie,D),Ua(G,ie,D.state),li(G,ie,D,!1,!0);var ye=D.shader.progVar.append(G,ie);if(ie(G.shared.gl,".useProgram(",ye,".program);"),D.shader.program)Ri(G,ie,D,D.shader.program);else{ie(G.shared.vao,".setVAO(null);");var Se=G.global.def("{}"),ce=ie.def(ye,".id"),ae=ie.def(Se,"[",ce,"]");ie(G.cond(ae).then(ae,".call(this,a0);").else(ae,"=",Se,"[",ce,"]=",G.link(function(de){return vi(Ri,G,D,de,1)}),"(",ye,");",ae,".call(this,a0);"))}Object.keys(D.state).length>0&&ie(G.shared.current,".dirty=true;"),G.shared.vao&&ie(G.shared.vao,".setVAO(null);")}function Go(G,D,ie,ye){G.batchId="a1",Os(G,D);function Se(){return!0}Va(G,D,ie,ye.attributes,Se),ji(G,D,ie,ye.uniforms,Se,!1),Nn(G,D,D,ie)}function H1(G,D,ie,ye){Os(G,D);var Se=ie.contextDep,ce=D.def(),ae="a0",de="a1",M=D.def();G.shared.props=M,G.batchId=ce;var ne=G.scope(),j=G.scope();D(ne.entry,"for(",ce,"=0;",ce,"<",de,";++",ce,"){",M,"=",ae,"[",ce,"];",j,"}",ne.exit);function xe(lr){return lr.contextDep&&Se||lr.propDep}function Ie(lr){return!xe(lr)}if(ie.needsContext&&Zs(G,j,ie.context),ie.needsFramebuffer&&ea(G,j,ie.framebuffer),Ua(G,j,ie.state,xe),ie.profile&&xe(ie.profile)&&li(G,j,ie,!1,!0),ye)ie.useVAO?ie.drawVAO?xe(ie.drawVAO)?j(G.shared.vao,".setVAO(",ie.drawVAO.append(G,j),");"):ne(G.shared.vao,".setVAO(",ie.drawVAO.append(G,ne),");"):ne(G.shared.vao,".setVAO(",G.shared.vao,".targetVAO);"):(ne(G.shared.vao,".setVAO(null);"),Va(G,ne,ie,ye.attributes,Ie),Va(G,j,ie,ye.attributes,xe)),ji(G,ne,ie,ye.uniforms,Ie,!1),ji(G,j,ie,ye.uniforms,xe,!0),Nn(G,ne,j,ie);else{var kt=G.global.def("{}"),hr=ie.shader.progVar.append(G,j),pr=j.def(hr,".id"),Br=j.def(kt,"[",pr,"]");j(G.shared.gl,".useProgram(",hr,".program);","if(!",Br,"){",Br,"=",kt,"[",pr,"]=",G.link(function(lr){return vi(Go,G,ie,lr,2)}),"(",hr,");}",Br,".call(this,a0[",ce,"],",ce,");")}}function H(G,D){var ie=G.proc("batch",2);G.batchId="0",Os(G,ie);var ye=!1,Se=!0;Object.keys(D.context).forEach(function(kt){ye=ye||D.context[kt].propDep}),ye||(Zs(G,ie,D.context),Se=!1);var ce=D.framebuffer,ae=!1;ce?(ce.propDep?ye=ae=!0:ce.contextDep&&ye&&(ae=!0),ae||ea(G,ie,ce)):ea(G,ie,null),D.state.viewport&&D.state.viewport.propDep&&(ye=!0);function de(kt){return kt.contextDep&&ye||kt.propDep}ya(G,ie,D),Ua(G,ie,D.state,function(kt){return!de(kt)}),(!D.profile||!de(D.profile))&&li(G,ie,D,!1,"a1"),D.contextDep=ye,D.needsContext=Se,D.needsFramebuffer=ae;var M=D.shader.progVar;if(M.contextDep&&ye||M.propDep)H1(G,ie,D,null);else{var ne=M.append(G,ie);if(ie(G.shared.gl,".useProgram(",ne,".program);"),D.shader.program)H1(G,ie,D,D.shader.program);else{ie(G.shared.vao,".setVAO(null);");var j=G.global.def("{}"),xe=ie.def(ne,".id"),Ie=ie.def(j,"[",xe,"]");ie(G.cond(Ie).then(Ie,".call(this,a0,a1);").else(Ie,"=",j,"[",xe,"]=",G.link(function(kt){return vi(H1,G,D,kt,2)}),"(",ne,");",Ie,".call(this,a0,a1);"))}}Object.keys(D.state).length>0&&ie(G.shared.current,".dirty=true;"),G.shared.vao&&ie(G.shared.vao,".setVAO(null);")}function tt(G,D){var ie=G.proc("scope",3);G.batchId="a2";var ye=G.shared,Se=ye.current;Zs(G,ie,D.context),D.framebuffer&&D.framebuffer.append(G,ie),Rh(Object.keys(D.state)).forEach(function(ae){var de=D.state[ae],M=de.append(G,ie);Ue(M)?M.forEach(function(ne,j){ie.set(G.next[ae],"["+j+"]",ne)}):ie.set(ye.next,"."+ae,M)}),li(G,ie,D,!0,!0),[Lo,_f,Wc,Ou,zc].forEach(function(ae){var de=D.draw[ae];de&&ie.set(ye.draw,"."+ae,""+de.append(G,ie))}),Object.keys(D.uniforms).forEach(function(ae){var de=D.uniforms[ae].append(G,ie);Array.isArray(de)&&(de="["+de.join()+"]"),ie.set(ye.uniforms,"["+k.id(ae)+"]",de)}),Object.keys(D.attributes).forEach(function(ae){var de=D.attributes[ae].append(G,ie),M=G.scopeAttrib(ae);Object.keys(new _e).forEach(function(ne){ie.set(M,"."+ne,de[ne])})}),D.scopeVAO&&ie.set(ye.vao,".targetVAO",D.scopeVAO.append(G,ie));function ce(ae){var de=D.shader[ae];de&&ie.set(ye.shader,"."+ae,de.append(G,ie))}ce(sl),ce(t1),Object.keys(D.state).length>0&&(ie(Se,".dirty=true;"),ie.exit(Se,".dirty=true;")),ie("a1(",G.shared.context,",a0,",G.batchId,");")}function ke(G){if(!(typeof G!="object"||Ue(G))){for(var D=Object.keys(G),ie=0;ie=0;--Nn){var vi=Sr[Nn];vi&&vi(Gt,null,0)}Z.flush(),Qt&&Qt.update()}function Mn(){!Nr&&Sr.length>0&&(Nr=ra.next(Rn))}function Ei(){Nr&&(ra.cancel(Rn),Nr=null)}function Ss(Nn){Nn.preventDefault(),Ct=!0,Ei(),zn.forEach(function(vi){vi()})}function Ts(Nn){Z.getError(),Ct=!1,Be.restore(),Rr.restore(),Ht.restore(),Sn.restore(),Nt.restore(),Lt.restore(),Mt.restore(),Qt&&Qt.restore(),Wr.procs.refresh(),Mn(),Fn.forEach(function(vi){vi()})}xr&&(xr.addEventListener(Y2,Ss,!1),xr.addEventListener(So,Ts,!1));function Ai(){Sr.length=0,Ei(),xr&&(xr.removeEventListener(Y2,Ss),xr.removeEventListener(So,Ts)),Rr.clear(),Lt.clear(),Nt.clear(),Mt.clear(),Sn.clear(),or.clear(),Ht.clear(),Qt&&Qt.clear(),Cr.forEach(function(Nn){Nn()})}function ts(Nn){$(!!Nn,"invalid args to regl({...})"),$.type(Nn,"object","invalid args to regl({...})");function vi(Se){var ce=e({},Se);delete ce.uniforms,delete ce.attributes,delete ce.context,delete ce.vao,"stencil"in ce&&ce.stencil.op&&(ce.stencil.opBack=ce.stencil.opFront=ce.stencil.op,delete ce.stencil.op);function ae(de){if(de in ce){var M=ce[de];delete ce[de],Object.keys(M).forEach(function(ne){ce[de+"."+ne]=M[ne]})}}return ae("blend"),ae("depth"),ae("cull"),ae("stencil"),ae("polygonOffset"),ae("scissor"),ae("sample"),"vao"in Se&&(ce.vao=Se.vao),ce}function Ri(Se,ce){var ae={},de={};return Object.keys(Se).forEach(function(M){var ne=Se[M];if(os.isDynamic(ne)){de[M]=os.unbox(ne,M);return}else if(ce&&Array.isArray(ne)){for(var j=0;j0)return _i.call(this,ie(Se|0),Se|0)}else if(Array.isArray(Se)){if(Se.length)return _i.call(this,Se,Se.length)}else return Yr.call(this,Se)}return e(ye,{stats:tt,destroy:function(){ke.destroy()}})}var bs=Lt.setFBO=ts({framebuffer:os.define.call(null,Gl,"framebuffer")});function Gs(Nn,vi){var Ri=0;Wr.procs.poll();var Cs=vi.color;Cs&&(Z.clearColor(+Cs[0]||0,+Cs[1]||0,+Cs[2]||0,+Cs[3]||0),Ri|=A0),"depth"in vi&&(Z.clearDepth(+vi.depth),Ri|=q1),"stencil"in vi&&(Z.clearStencil(vi.stencil|0),Ri|=T0),$(!!Ri,"called regl.clear with no buffer specified"),Z.clear(Ri)}function Zs(Nn){if($(typeof Nn=="object"&&Nn,"regl.clear() takes an object as input"),"framebuffer"in Nn)if(Nn.framebuffer&&Nn.framebuffer_reglType==="framebufferCube")for(var vi=0;vi<6;++vi)bs(e({framebuffer:Nn.framebuffer.faces[vi]},Nn),Gs);else bs(Nn,Gs);else Gs(null,Nn)}function ea(Nn){$.type(Nn,"function","regl.frame() callback must be a function"),Sr.push(Nn);function vi(){var Ri=jl(Sr,Nn);$(Ri>=0,"cannot cancel a frame twice");function Cs(){var Go=jl(Sr,Cs);Sr[Go]=Sr[Sr.length-1],Sr.length-=1,Sr.length<=0&&Ei()}Sr[Ri]=Cs}return Mn(),{cancel:vi}}function ya(){var Nn=jt.viewport,vi=jt.scissor_box;Nn[0]=Nn[1]=vi[0]=vi[1]=0,Gt.viewportWidth=Gt.framebufferWidth=Gt.drawingBufferWidth=Nn[2]=vi[2]=Z.drawingBufferWidth,Gt.viewportHeight=Gt.framebufferHeight=Gt.drawingBufferHeight=Nn[3]=vi[3]=Z.drawingBufferHeight}function Ua(){Gt.tick+=1,Gt.time=li(),ya(),Wr.procs.poll()}function Os(){Sn.refresh(),ya(),Wr.procs.refresh(),Qt&&Qt.update()}function li(){return(za()-rr)/1e3}Os();function Va(Nn,vi){$.type(vi,"function","listener callback must be a function");var Ri;switch(Nn){case"frame":return ea(vi);case"lost":Ri=zn;break;case"restore":Ri=Fn;break;case"destroy":Ri=Cr;break;default:$.raise("invalid event, must be one of frame,lost,restore,destroy")}return Ri.push(vi),{cancel:function(){for(var Cs=0;Cs=0},read:gr,destroy:Ai,_gl:Z,_refresh:Os,poll:function(){Ua(),Qt&&Qt.update()},now:li,stats:Pt});return k.onDone(null,ji),ji}return No}))});var o_={};vc(o_,{checkSupport:()=>r_,createRegl:()=>n_,createRenderer:()=>a_,createSpatialIndex:()=>QI,createTextureFromUrl:()=>Gg,default:()=>KI});function $w(...t){return e=>t.reduce((r,i)=>i(r),e)}function yg(){var t=new P3(16);return P3!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function A9(t){var e=new P3(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Mg(t,e){var r=e[0],i=e[1],s=e[2],a=e[3],d=e[4],m=e[5],v=e[6],_=e[7],x=e[8],w=e[9],I=e[10],O=e[11],z=e[12],J=e[13],Q=e[14],oe=e[15],se=r*m-i*d,re=r*v-s*d,q=r*_-a*d,ue=i*v-s*m,K=i*_-a*m,B=s*_-a*v,he=x*J-w*z,He=x*Q-I*z,er=x*oe-O*z,Er=w*Q-I*J,zt=w*oe-O*J,_n=I*oe-O*Q,$r=se*_n-re*zt+q*Er+ue*er-K*He+B*he;return $r?($r=1/$r,t[0]=(m*_n-v*zt+_*Er)*$r,t[1]=(s*zt-i*_n-a*Er)*$r,t[2]=(J*B-Q*K+oe*ue)*$r,t[3]=(I*K-w*B-O*ue)*$r,t[4]=(v*er-d*_n-_*He)*$r,t[5]=(r*_n-s*er+a*He)*$r,t[6]=(Q*q-z*B-oe*re)*$r,t[7]=(x*B-I*q+O*re)*$r,t[8]=(d*zt-m*er+_*he)*$r,t[9]=(i*er-r*zt-a*he)*$r,t[10]=(z*K-J*q+oe*se)*$r,t[11]=(w*q-x*K-O*se)*$r,t[12]=(m*He-d*Er-v*he)*$r,t[13]=(r*Er-i*He+s*he)*$r,t[14]=(J*re-z*ue-Q*se)*$r,t[15]=(x*ue-w*re+I*se)*$r,t):null}function k1(t,e,r){var i=e[0],s=e[1],a=e[2],d=e[3],m=e[4],v=e[5],_=e[6],x=e[7],w=e[8],I=e[9],O=e[10],z=e[11],J=e[12],Q=e[13],oe=e[14],se=e[15],re=r[0],q=r[1],ue=r[2],K=r[3];return t[0]=re*i+q*m+ue*w+K*J,t[1]=re*s+q*v+ue*I+K*Q,t[2]=re*a+q*_+ue*O+K*oe,t[3]=re*d+q*x+ue*z+K*se,re=r[4],q=r[5],ue=r[6],K=r[7],t[4]=re*i+q*m+ue*w+K*J,t[5]=re*s+q*v+ue*I+K*Q,t[6]=re*a+q*_+ue*O+K*oe,t[7]=re*d+q*x+ue*z+K*se,re=r[8],q=r[9],ue=r[10],K=r[11],t[8]=re*i+q*m+ue*w+K*J,t[9]=re*s+q*v+ue*I+K*Q,t[10]=re*a+q*_+ue*O+K*oe,t[11]=re*d+q*x+ue*z+K*se,re=r[12],q=r[13],ue=r[14],K=r[15],t[12]=re*i+q*m+ue*w+K*J,t[13]=re*s+q*v+ue*I+K*Q,t[14]=re*a+q*_+ue*O+K*oe,t[15]=re*d+q*x+ue*z+K*se,t}function T9(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function o6(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function jw(t,e,r){var i=r[0],s=r[1],a=r[2],d=Math.sqrt(i*i+s*s+a*a),m,v,_;return d80*r){d=t[0],m=t[1];let _=d,x=m;for(let w=r;w_&&(_=I),O>x&&(x=O)}v=Math.max(_-d,x-m),v=v!==0?32767/v:0}return u0(s,a,r,d,m,v,0),a}function Zw(t,e,r,i,s){let a;if(s===fA(t,e,r,i)>0)for(let d=e;d=e;d-=i)a=O9(d/i|0,t[d],t[d+1],a);return a&&v6(a,a.next)&&(f0(a),a=a.next),a}function c0(t,e){if(!t)return t;e||(e=t);let r=t,i;do if(i=!1,!r.steiner&&(v6(r,r.next)||qa(r.prev,r,r.next)===0)){if(f0(r),r=e=r.prev,r===r.next)break;i=!0}else r=r.next;while(i||r!==e);return e}function u0(t,e,r,i,s,a,d){if(!t)return;!d&&a&&iA(t,i,s,a);let m=t;for(;t.prev!==t.next;){let v=t.prev,_=t.next;if(a?tA(t,i,s,a):eA(t)){e.push(v.i,t.i,_.i),f0(t),t=_.next,m=_.next;continue}if(t=_,t===m){d?d===1?(t=rA(c0(t),e),u0(t,e,r,i,s,a,2)):d===2&&nA(t,e,r,i,s,a):u0(c0(t),e,r,i,s,a,1);break}}}function eA(t){let e=t.prev,r=t,i=t.next;if(qa(e,r,i)>=0)return!1;let s=e.x,a=r.x,d=i.x,m=e.y,v=r.y,_=i.y,x=Math.min(s,a,d),w=Math.min(m,v,_),I=Math.max(s,a,d),O=Math.max(m,v,_),z=i.next;for(;z!==e;){if(z.x>=x&&z.x<=I&&z.y>=w&&z.y<=O&&o0(s,m,a,v,d,_,z.x,z.y)&&qa(z.prev,z,z.next)>=0)return!1;z=z.next}return!0}function tA(t,e,r,i){let s=t.prev,a=t,d=t.next;if(qa(s,a,d)>=0)return!1;let m=s.x,v=a.x,_=d.x,x=s.y,w=a.y,I=d.y,O=Math.min(m,v,_),z=Math.min(x,w,I),J=Math.max(m,v,_),Q=Math.max(x,w,I),oe=$g(O,z,e,r,i),se=$g(J,Q,e,r,i),re=t.prevZ,q=t.nextZ;for(;re&&re.z>=oe&&q&&q.z<=se;){if(re.x>=O&&re.x<=J&&re.y>=z&&re.y<=Q&&re!==s&&re!==d&&o0(m,x,v,w,_,I,re.x,re.y)&&qa(re.prev,re,re.next)>=0||(re=re.prevZ,q.x>=O&&q.x<=J&&q.y>=z&&q.y<=Q&&q!==s&&q!==d&&o0(m,x,v,w,_,I,q.x,q.y)&&qa(q.prev,q,q.next)>=0))return!1;q=q.nextZ}for(;re&&re.z>=oe;){if(re.x>=O&&re.x<=J&&re.y>=z&&re.y<=Q&&re!==s&&re!==d&&o0(m,x,v,w,_,I,re.x,re.y)&&qa(re.prev,re,re.next)>=0)return!1;re=re.prevZ}for(;q&&q.z<=se;){if(q.x>=O&&q.x<=J&&q.y>=z&&q.y<=Q&&q!==s&&q!==d&&o0(m,x,v,w,_,I,q.x,q.y)&&qa(q.prev,q,q.next)>=0)return!1;q=q.nextZ}return!0}function rA(t,e){let r=t;do{let i=r.prev,s=r.next.next;!v6(i,s)&&j9(i,r,r.next,s)&&l6(i,s)&&l6(s,i)&&(e.push(i.i,r.i,s.i),f0(r),f0(r.next),r=t=s),r=r.next}while(r!==t);return c0(r)}function nA(t,e,r,i,s,a){let d=t;do{let m=d.next.next;for(;m!==d.prev;){if(d.i!==m.i&&oA(d,m)){let v=uA(d,m);d=c0(d,d.next),v=c0(v,v.next),u0(d,e,r,i,s,a,0),u0(v,e,r,i,s,a,0);return}m=m.next}d=d.next}while(d!==t)}function iA(t,e,r,i){let s=t;do s.z===0&&(s.z=$g(s.x,s.y,e,r,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,sA(s)}function sA(t){let e,r=1;do{let i=t,s;t=null;let a=null;for(e=0;i;){e++;let d=i,m=0;for(let _=0;_0||v>0&&d;)m!==0&&(v===0||!d||i.z<=d.z)?(s=i,i=i.nextZ,m--):(s=d,d=d.nextZ,v--),a?a.nextZ=s:t=s,s.prevZ=a,a=s;i=d}a.nextZ=null,r*=2}while(e>1);return t}function $g(t,e,r,i,s){return t=(t-r)*s|0,e=(e-i)*s|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function aA(t,e,r,i,s,a,d,m){return(s-d)*(e-m)>=(t-d)*(a-m)&&(t-d)*(i-m)>=(r-d)*(e-m)&&(r-d)*(a-m)>=(s-d)*(i-m)}function o0(t,e,r,i,s,a,d,m){return!(t===d&&e===m)&&aA(t,e,r,i,s,a,d,m)}function oA(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!lA(t,e)&&(l6(t,e)&&l6(e,t)&&cA(t,e)&&(qa(t.prev,t,e.prev)||qa(t,e.prev,e))||v6(t,e)&&qa(t.prev,t,t.next)>0&&qa(e.prev,e,e.next)>0)}function qa(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function v6(t,e){return t.x===e.x&&t.y===e.y}function j9(t,e,r,i){let s=i6(qa(t,e,r)),a=i6(qa(t,e,i)),d=i6(qa(r,i,t)),m=i6(qa(r,i,e));return!!(s!==a&&d!==m||s===0&&n6(t,r,e)||a===0&&n6(t,i,e)||d===0&&n6(r,t,i)||m===0&&n6(r,e,i))}function n6(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function i6(t){return t>0?1:t<0?-1:0}function lA(t,e){let r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&j9(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function l6(t,e){return qa(t.prev,t,t.next)<0?qa(t,e,t.next)>=0&&qa(t,t.prev,e)>=0:qa(t,e,t.prev)<0||qa(t,t.next,e)<0}function cA(t,e){let r=t,i=!1,s=(t.x+e.x)/2,a=(t.y+e.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&s<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==t);return i}function uA(t,e){let r=Pg(t.i,t.x,t.y),i=Pg(e.i,e.x,e.y),s=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=s,s.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function O9(t,e,r,i){let s=Pg(t,e,r);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function f0(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Pg(t,e,r){return{i:t,x:e,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function fA(t,e,r,i){let s=0;for(let a=e,d=r-i;a{S9();U9=N0(r6(),1),Cw=t=>t*t*t,V9=t=>t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1,Lw=t=>--t*t*t+1,Nw=t=>t,Dw=t=>t*t,Rw=t=>t<.5?2*t*t:-1+(4-2*t)*t,Bw=t=>t*(2-t),bu=t=>t,gg=(t,e)=>{if(t===e)return!0;if(t.length!==e.length)return!1;let r=new Set(t),i=new Set(e);return r.size!==i.size?!1:e.every(s=>r.has(s))},kw=t=>Math.sqrt(t.reduce((e,r)=>e+r**2,0)),Fw=t=>t.reduce((e,r)=>r>e?r:e,Number.NEGATIVE_INFINITY),E9=(t,e=bu)=>{let r=[];for(let i=0;i{let r=[];return t.forEach(i=>{r[i]=!0}),e.forEach(i=>{r[i]=!0}),r.reduce((i,s,a)=>(s&&i.push(a),i),[])},qg=(t,...e)=>(e.forEach(r=>{let i=Object.keys(r).reduce((s,a)=>(s[a]=Object.getOwnPropertyDescriptor(r,a),s),{});Object.getOwnPropertySymbols(r).forEach(s=>{let a=Object.getOwnPropertyDescriptor(r,s);a?.enumerable&&(i[s]=a)}),Object.defineProperties(t,i)}),t);Pw=t=>e=>qg({__proto__:{constructor:t}},e),w9=(t,e)=>r=>qg(r,{get[t](){return e}}),Uw=(t,e,r,i)=>Math.sqrt((t-r)**2+(e-i)**2),Vw=t=>new Worker(window.URL.createObjectURL(new Blob([`(${t.toString()})()`],{type:"text/javascript"}))),vh=(t=1)=>new Promise(e=>{let r=0,i=()=>requestAnimationFrame(()=>{r++,r{let i,s=0;r=r===null?e:r;let a=(...v)=>{let _=()=>{s>0&&(t(...v),s=0)};clearTimeout(i),i=setTimeout(_,r)},d=!1,m=(...v)=>{d?(s++,a(...v)):(t(...v),a(...v),d=!0,s=0,setTimeout(()=>{d=!1},e))};return m.reset=()=>{d=!1},m.cancel=()=>{clearTimeout(i)},m.now=(...v)=>t(...v),m},Gw=1e-6,P3=typeof Float32Array<"u"?Float32Array:Array;(function(){var t=zw();return function(e,r,i,s,a,d){var m,v;for(r||(r=4),i||(i=0),s?v=Math.min(s*r+i,e.length):v=e.length,m=i;m{let d=new Float32Array(16),m=new Float32Array(16),v=new Float32Array(16),_=yg(),x=[...i.slice(0,2),0,1],w=Array.isArray(s[0])?[...s[0]]:[...s],I=Array.isArray(s[0])?[...s[1]]:[...s],O=Array.isArray(a[0])?[...a[0]]:[...a],z=Array.isArray(a[0])?[...a[1]]:[...a],J=()=>Hw(d,_).slice(0,2),Q=()=>{let Wt=J();return Math.min(Wt[0],Wt[1])},oe=()=>{let Wt=J();return Math.max(Wt[0],Wt[1])},se=()=>Math.acos(_[0]/oe()),re=()=>[[...w],[...I]],q=()=>[[...O],[...z]],ue=()=>{let Wt=J();return[1/Wt[0],1/Wt[1]]},K=()=>1/Q(),B=()=>1/oe(),he=()=>qw(d,_).slice(0,2),He=()=>a0(d,x,Mg(v,_)).slice(0,2),er=()=>_,Er=()=>x.slice(0,2),zt=([Wt=0,Pr=0]=[],gi=1,Ii=0)=>{_=yg(),_n([-Wt,-Pr]),In(Ii),$r(1/gi)},_n=([Wt=0,Pr=0]=[])=>{d[0]=Wt,d[1]=Pr,d[2]=0;let gi=T9(m,d);k1(_,gi,_)},$r=(Wt,Pr)=>{let gi=Array.isArray(Wt),Ii=gi?Wt[0]:Wt,yi=gi?Wt[1]:Wt;if(Ii<=0||yi<=0||Ii===1&&yi===1)return;let as=J(),Ha=as[0]*Ii,ar=as[1]*yi;if(Ii=Math.max(w[0],Math.min(Ha,w[1]))/as[0],yi=Math.max(I[0],Math.min(ar,I[1]))/as[1],Ii===1&&yi===1)return;d[0]=Ii,d[1]=yi,d[2]=1;let Ki=o6(m,d),zs=Pr?[...Pr,0]:x,ta=T9(d,zs);k1(_,ta,k1(_,Ki,k1(_,Mg(v,ta),_)))},In=Wt=>{let Pr=yg();jw(Pr,Wt,[0,0,1]),k1(_,Pr,_)},On=Wt=>{let Pr=Array.isArray(Wt[0]);w[0]=Pr?Wt[0][0]:Wt[0],w[1]=Pr?Wt[0][1]:Wt[1],I[0]=Pr?Wt[1][0]:Wt[0],I[1]=Pr?Wt[1][1]:Wt[1]},cr=Wt=>{let Pr=Array.isArray(Wt[0]);O[0]=Pr?Wt[0][0]:Wt[0],O[1]=Pr?Wt[0][1]:Wt[1],z[0]=Pr?Wt[1][0]:Wt[0],z[1]=Pr?Wt[1][1]:Wt[1]},bn=Wt=>{!Wt||Wt.length<16||(_=Wt)},mn=Wt=>{x=[...Wt.slice(0,2),0,1]},qn=()=>{zt(t,e,r)};return zt(t,e,r),{get translation(){return he()},get target(){return He()},get scaling(){return J()},get minScaling(){return Q()},get maxScaling(){return oe()},get scaleBounds(){return re()},get translationBounds(){return q()},get distance(){return ue()},get minDistance(){return K()},get maxDistance(){return B()},get rotation(){return se()},get view(){return er()},get viewCenter(){return Er()},lookAt:zt,translate:_n,pan:_n,rotate:In,scale:$r,zoom:$r,reset:qn,set:(...Wt)=>(console.warn("`set()` is deprecated. Please use `setView()` instead."),bn(...Wt)),setScaleBounds:On,setTranslationBounds:cr,setView:bn,setViewCenter:mn}},Jw=["pan","rotate"],I9={alt:"altKey",cmd:"metaKey",ctrl:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Kw=(t,{distance:e=1,target:r=[0,0],rotation:i=0,isNdc:s=!0,isFixed:a=!1,isPan:d=!0,isPanInverted:m=[!1,!0],panSpeed:v=1,isRotate:_=!0,rotateSpeed:x=1,defaultMouseDownMoveAction:w="pan",mouseDownMoveModKey:I="alt",isZoom:O=!0,zoomSpeed:z=1,viewCenter:J,scaleBounds:Q,translationBounds:oe,onKeyDown:se=()=>{},onKeyUp:re=()=>{},onMouseDown:q=()=>{},onMouseUp:ue=()=>{},onMouseMove:K=()=>{},onWheel:B=()=>{}}={})=>{let he=Xw(r,e,i,J,Q,oe),He=0,er=0,Er=0,zt=0,_n=0,$r=0,In=!1,On=0,cr=1,bn=1,mn=1,qn=!1,Wt=!1,Pr=!1,gi=w==="pan",Ii=d,yi=d,as=m,Ha=m,ar=O,Ki=O,zs=()=>{Ii=Array.isArray(d)?!!d[0]:d,yi=Array.isArray(d)?!!d[1]:d,as=Array.isArray(m)?!!m[0]:m,Ha=Array.isArray(m)?!!m[1]:m,ar=Array.isArray(O)?!!O[0]:O,Ki=Array.isArray(O)?!!O[1]:O};zs();let ta=s?gn=>gn/cr*2*mn:gn=>gn,so=s?gn=>gn/bn*2:gn=>-gn,wn=s?gn=>(-1+gn/cr*2)*mn:gn=>gn,wi=s?gn=>1-gn/bn*2:gn=>gn,Ci=()=>{if(a){let Qi=Wt;return Wt=!1,Qi}qn=!1;let gn=He,As=er;if((Ii||yi)&&In&&(gi&&!Pr||!gi&&Pr)){let Qi=as?_n-gn:gn-_n,os=Ii?ta(v*Qi):0,ra=Ha?$r-As:As-$r,za=yi?so(v*ra):0;(os!==0||za!==0)&&(he.pan([os,za]),qn=!0)}if((ar||Ki)&&On){let Qi=z*Math.exp(On/bn),os=wn(Er),ra=wi(zt);he.scale([ar?1/Qi:1,Ki?1/Qi:1],[os,ra]),qn=!0}if(_&&In&&(gi&&Pr||!gi&&!Pr)&&Math.abs(_n-gn)+Math.abs($r-As)>0){let Qi=cr/2,os=bn/2,ra=_n-Qi,za=os-$r,Jo=gn-Qi,F1=os-As,Bo=Yw([ra,za],[Jo,F1]),ko=ra*F1-Jo*za;he.rotate(x*Bo*Math.sign(ko)),qn=!0}On=0,_n=gn,$r=As;let xa=qn||Wt;return Wt=!1,xa},fi=({defaultMouseDownMoveAction:gn=null,isFixed:As=null,isPan:xa=null,isPanInverted:Qi=null,isRotate:os=null,isZoom:ra=null,panSpeed:za=null,rotateSpeed:Jo=null,zoomSpeed:F1=null,mouseDownMoveModKey:Bo=null}={})=>{w=gn!==null&&Jw.includes(gn)?gn:w,gi=w==="pan",a=As!==null?As:a,d=xa!==null?xa:d,m=Qi!==null?Qi:m,_=os!==null?os:_,O=ra!==null?ra:O,v=+za>0?za:v,x=+Jo>0?Jo:x,z=+F1>0?F1:z,zs(),I=Bo!==null&&Object.keys(I9).includes(Bo)?Bo:I},Si=()=>{let gn=t.getBoundingClientRect();cr=gn.width,bn=gn.height,mn=cr/bn},qi=gn=>{Pr=!1,re(gn)},Do=gn=>{Pr=gn[I9[I]],se(gn)},el=gn=>{In=!1,ue(gn)},$=gn=>{In=gn.buttons===1,q(gn)},Xo=document.createEvent("MouseEvent").offsetX!==void 0?gn=>{Er=gn.offsetX,zt=gn.offsetY}:gn=>{let As=t.getBoundingClientRect();Er=gn.clientX-As.left,zt=gn.clientY-As.top},V=gn=>{He=gn.clientX,er=gn.clientY},_a=gn=>{V(gn),K(gn)},Us=gn=>{if((ar||Ki)&&!a){gn.preventDefault(),V(gn),Xo(gn);let As=gn.deltaMode===1?12:1;On+=As*(gn.deltaY||gn.deltaX||0)}B(gn)},Ro=()=>{he=void 0,window.removeEventListener("keydown",Do),window.removeEventListener("keyup",qi),t.removeEventListener("mousedown",$),window.removeEventListener("mouseup",el),window.removeEventListener("mousemove",_a),t.removeEventListener("wheel",Us)};window.addEventListener("keydown",Do,{passive:!0}),window.addEventListener("keyup",qi,{passive:!0}),t.addEventListener("mousedown",$,{passive:!0}),window.addEventListener("mouseup",el,{passive:!0}),window.addEventListener("mousemove",_a,{passive:!0}),t.addEventListener("wheel",Us,{passive:!1}),he.config=fi,he.dispose=Ro,he.refresh=Si,he.tick=Ci;let ps=gn=>function(){gn.apply(null,arguments),Wt=!0};return he.lookAt=ps(he.lookAt),he.translate=ps(he.translate),he.pan=ps(he.pan),he.rotate=ps(he.rotate),he.scale=ps(he.scale),he.zoom=ps(he.zoom),he.reset=ps(he.reset),he.set=ps(he.set),he.setScaleBounds=ps(he.setScaleBounds),he.setTranslationBounds=ps(he.setTranslationBounds),he.setView=ps(he.setView),he.setViewCenter=ps(he.setViewCenter),Si(),he};dA=` precision mediump float; varying vec4 color; void main() { gl_FragColor = color; -}`,tw=` +}`,hA=` uniform mat4 projectionViewModel; uniform float aspectRatio; @@ -357,7 +357,7 @@ void main() { color = texture2D(colorTex, colorTexIndex); color.a = useColorOpacity * color.a + useOpacity * opacity; -}`,G8=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),C1=Float32Array.BYTES_PER_ELEMENT,rw=t=>t!==void 0&&Number.isFinite(t),j8=t=>t.length>0&&Array.isArray(t[0]),{push:Gv,splice:nw}=Array.prototype,iw=(t,e=[])=>{let r=0;for(let i of t){for(let s=0;s{if(!t){console.error("Regl instance is undefined.");return}let H=new Float32Array(16),J,Z,oe,se,re,q,ue,K,k,de,ze,er,Er,Ht,xn,$r,Tn,In,cr=O?2:3,bn=()=>+(v.length===Z||g!==null),mn=()=>{de=t.buffer(),ze=t.buffer(),er=t.buffer(),xn=t.buffer(),$r={prevPosition:{buffer:(()=>de),offset:0,stride:C1*3},currPosition:{buffer:(()=>de),offset:C1*3*2,stride:C1*3},nextPosition:{buffer:(()=>de),offset:C1*3*4,stride:C1*3},opacity:{buffer:(()=>ze),offset:C1*2,stride:C1},offsetScale:{buffer:(()=>er),offset:C1*2,stride:C1},colorIndex:{buffer:(()=>xn),offset:C1*2,stride:C1}},Tn=t.elements(),In=t({attributes:$r,depth:{enable:!O},blend:{enable:!0,func:{srcRGB:"src alpha",srcAlpha:"one",dstRGB:"one minus src alpha",dstAlpha:"one minus src alpha"}},uniforms:{projectionViewModel:(wn,Ei)=>{let Ii=wn.projection||Ei.projection,si=wn.model||Ei.model,xi=wn.view||Ei.view;return L1(H,Ii,L1(H,xi,si))},aspectRatio:({viewportWidth:wn,viewportHeight:Ei})=>wn/Ei,colorTex:()=>Er,colorTexRes:()=>Ht,colorTexEps:()=>.5/Ht,pixelRatio:({pixelRatio:wn})=>wn,width:({pixelRatio:wn,viewportHeight:Ei})=>x/Ei*wn,useOpacity:bn,useColorOpacity:()=>+!bn(),miter:+!!w},elements:()=>Tn,vert:tw,frag:ew})},qn=()=>{J===1&&s.length%cr>0&&console.warn(`The length of points (${Z}) does not match the dimensions (${cr}). Incomplete points are ignored.`),se=s.flat().slice(0,Z*cr),O&&(se=sw(se,2,3,I)),o.length!==Z&&(o=new Array(Z).fill(0)),_.length!==Z&&(_=new Array(Z).fill(1));let wn=o.slice(),Ei=v.length===Z?v.slice():new Array(Z).fill(g===null?1:g),Ii=_.slice(),si=0;for(let xi of oe){let Ui=si+xi-1;vf(se,Ui,Ui,3),vf(se,si,si,3),vf(wn,Ui,Ui,1),vf(wn,si,si,1),vf(Ei,Ui,Ui,1),vf(Ei,si,si,1),vf(Ii,Ui,Ui,1),vf(Ii,si,si,1),si+=xi+2}re=new Float32Array(Mm(se,3)),q=Mm(wn),ue=Mm(Ei),K=Mm(Ii,1,-1),k=iw(oe),de({usage:"dynamic",type:"float",length:re.length*C1,data:re}),ze({usage:"dynamic",type:"float",length:ue.length*C1,data:ue}),er({usage:"dynamic",type:"float",length:K.length*C1,data:K}),xn({usage:"dynamic",type:"float",length:q.length*C1,data:q}),Tn({primitive:"triangles",usage:"dynamic",type:k.length>2**16?"uint32":"uint16",data:k})},Wt=()=>{Pr(),mn()},Pr=()=>{s=[],se=[],re=new Float32Array,K=[],k=[],de.destroy(),er.destroy(),Tn.destroy()},hi=({projection:wn,model:Ei,view:Ii}={})=>{wn&&(e=wn),Ei&&(r=Ei),Ii&&(i=Ii),s&&s.length>1&&In({projection:e,model:r,view:i})},Ai=(wn,Ei)=>{let Ii=Ei.flat(2);return Ii.length===Z?Ii:Ii.length===J?oe.flatMap((si,xi)=>Array(si).fill(Ii[xi])):wn},pi=()=>s,ss=(wn=[],{colorIndices:Ei=o,opacities:Ii=v,widths:si=_,is2d:xi=O}={})=>{s=wn,O=xi,cr=O?2:3,J=j8(s)?s.length:1,oe=j8(s)?s.map(Ui=>Math.floor(Ui.length/cr)):[Math.floor(s.length/cr)],Z=oe.reduce((Ui,No)=>Ui+No,0),o=Ai(o,Ei),v=Ai(v,Ii),_=Ai(_,si),s&&Z>1?qn():Wt()},Va=()=>{let wn=j8(h)?h:[h];Ht=Math.max(2,Math.ceil(Math.sqrt(wn.length)));let Ei=new Uint8Array(Ht**2*4);wn.forEach((Ii,si)=>{Ei[si*4]=Math.min(255,Math.max(0,Math.round(Ii[0]*255))),Ei[si*4+1]=Math.min(255,Math.max(0,Math.round(Ii[1]*255))),Ei[si*4+2]=Math.min(255,Math.max(0,Math.round(Ii[2]*255))),Ei[si*4+3]=Number.isNaN(+Ii[3])?255:Math.min(255,Math.max(0,Math.round(Ii[3]*255)))}),Er=t.texture({data:Ei,shape:[Ht,Ht,4]})},ar=(wn,Ei=g)=>{h=wn,g=Ei,Er&&Er.destroy(),Va()},Wi=()=>({color:h,miter:w,width:x}),Gs=({color:wn,opacity:Ei,miter:Ii,width:si}={})=>{wn&&ar(wn,Ei||g),Ii&&(w=!!Ii),rw(si)&&(x=si)},Qs=()=>({points:de,widths:er,opacities:ze,colorIndices:xn}),no=()=>({points:re,widths:K,opacities:ue,colorIndices:q});return mn(),Va(),s&&s.length>1&&ss(s),{clear:Wt,destroy:Pr,draw:hi,getPoints:pi,setPoints:ss,getData:no,getBuffer:Qs,getStyle:Wi,setStyle:Gs}},aw="1.16.0",ow=` +}`,bg=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),B1=Float32Array.BYTES_PER_ELEMENT,pA=t=>t!==void 0&&Number.isFinite(t),vg=t=>t.length>0&&Array.isArray(t[0]),{push:q9,splice:mA}=Array.prototype,gA=(t,e=[])=>{let r=0;for(let i of t){for(let s=0;s{if(!t){console.error("Regl instance is undefined.");return}let z=new Float32Array(16),J,Q,oe,se,re,q,ue,K,B,he,He,er,Er,zt,_n,$r,In,On,cr=I?2:3,bn=()=>+(v.length===Q||m!==null),mn=()=>{he=t.buffer(),He=t.buffer(),er=t.buffer(),_n=t.buffer(),$r={prevPosition:{buffer:(()=>he),offset:0,stride:B1*3},currPosition:{buffer:(()=>he),offset:B1*3*2,stride:B1*3},nextPosition:{buffer:(()=>he),offset:B1*3*4,stride:B1*3},opacity:{buffer:(()=>He),offset:B1*2,stride:B1},offsetScale:{buffer:(()=>er),offset:B1*2,stride:B1},colorIndex:{buffer:(()=>_n),offset:B1*2,stride:B1}},In=t.elements(),On=t({attributes:$r,depth:{enable:!I},blend:{enable:!0,func:{srcRGB:"src alpha",srcAlpha:"one",dstRGB:"one minus src alpha",dstAlpha:"one minus src alpha"}},uniforms:{projectionViewModel:(wn,wi)=>{let Ci=wn.projection||wi.projection,fi=wn.model||wi.model,Si=wn.view||wi.view;return k1(z,Ci,k1(z,Si,fi))},aspectRatio:({viewportWidth:wn,viewportHeight:wi})=>wn/wi,colorTex:()=>Er,colorTexRes:()=>zt,colorTexEps:()=>.5/zt,pixelRatio:({pixelRatio:wn})=>wn,width:({pixelRatio:wn,viewportHeight:wi})=>_/wi*wn,useOpacity:bn,useColorOpacity:()=>+!bn(),miter:+!!w},elements:()=>In,vert:hA,frag:dA})},qn=()=>{J===1&&s.length%cr>0&&console.warn(`The length of points (${Q}) does not match the dimensions (${cr}). Incomplete points are ignored.`),se=s.flat().slice(0,Q*cr),I&&(se=yA(se,2,3,O)),a.length!==Q&&(a=new Array(Q).fill(0)),x.length!==Q&&(x=new Array(Q).fill(1));let wn=a.slice(),wi=v.length===Q?v.slice():new Array(Q).fill(m===null?1:m),Ci=x.slice(),fi=0;for(let Si of oe){let qi=fi+Si-1;T2(se,qi,qi,3),T2(se,fi,fi,3),T2(wn,qi,qi,1),T2(wn,fi,fi,1),T2(wi,qi,qi,1),T2(wi,fi,fi,1),T2(Ci,qi,qi,1),T2(Ci,fi,fi,1),fi+=Si+2}re=new Float32Array(s6(se,3)),q=s6(wn),ue=s6(wi),K=s6(Ci,1,-1),B=gA(oe),he({usage:"dynamic",type:"float",length:re.length*B1,data:re}),He({usage:"dynamic",type:"float",length:ue.length*B1,data:ue}),er({usage:"dynamic",type:"float",length:K.length*B1,data:K}),_n({usage:"dynamic",type:"float",length:q.length*B1,data:q}),In({primitive:"triangles",usage:"dynamic",type:B.length>2**16?"uint32":"uint16",data:B})},Wt=()=>{Pr(),mn()},Pr=()=>{s=[],se=[],re=new Float32Array,K=[],B=[],he.destroy(),er.destroy(),In.destroy()},gi=({projection:wn,model:wi,view:Ci}={})=>{wn&&(e=wn),wi&&(r=wi),Ci&&(i=Ci),s&&s.length>1&&On({projection:e,model:r,view:i})},Ii=(wn,wi)=>{let Ci=wi.flat(2);return Ci.length===Q?Ci:Ci.length===J?oe.flatMap((fi,Si)=>Array(fi).fill(Ci[Si])):wn},yi=()=>s,as=(wn=[],{colorIndices:wi=a,opacities:Ci=v,widths:fi=x,is2d:Si=I}={})=>{s=wn,I=Si,cr=I?2:3,J=vg(s)?s.length:1,oe=vg(s)?s.map(qi=>Math.floor(qi.length/cr)):[Math.floor(s.length/cr)],Q=oe.reduce((qi,Do)=>qi+Do,0),a=Ii(a,wi),v=Ii(v,Ci),x=Ii(x,fi),s&&Q>1?qn():Wt()},Ha=()=>{let wn=vg(d)?d:[d];zt=Math.max(2,Math.ceil(Math.sqrt(wn.length)));let wi=new Uint8Array(zt**2*4);wn.forEach((Ci,fi)=>{wi[fi*4]=Math.min(255,Math.max(0,Math.round(Ci[0]*255))),wi[fi*4+1]=Math.min(255,Math.max(0,Math.round(Ci[1]*255))),wi[fi*4+2]=Math.min(255,Math.max(0,Math.round(Ci[2]*255))),wi[fi*4+3]=Number.isNaN(+Ci[3])?255:Math.min(255,Math.max(0,Math.round(Ci[3]*255)))}),Er=t.texture({data:wi,shape:[zt,zt,4]})},ar=(wn,wi=m)=>{d=wn,m=wi,Er&&Er.destroy(),Ha()},Ki=()=>({color:d,miter:w,width:_}),zs=({color:wn,opacity:wi,miter:Ci,width:fi}={})=>{wn&&ar(wn,wi||m),Ci&&(w=!!Ci),pA(fi)&&(_=fi)},ta=()=>({points:he,widths:er,opacities:He,colorIndices:_n}),so=()=>({points:re,widths:K,opacities:ue,colorIndices:q});return mn(),Ha(),s&&s.length>1&&as(s),{clear:Wt,destroy:Pr,draw:gi,getPoints:yi,setPoints:as,getData:so,getBuffer:ta,getStyle:Ki,setStyle:zs}},bA="1.16.0",vA=` precision mediump float; uniform sampler2D texture; @@ -367,7 +367,7 @@ varying vec2 uv; void main () { gl_FragColor = texture2D(texture, uv); } -`,lw=` +`,_A=` precision mediump float; uniform mat4 modelViewProjection; @@ -380,7 +380,7 @@ void main () { uv = position; gl_Position = modelViewProjection * vec4(-1.0 + 2.0 * uv.x, 1.0 - 2.0 * uv.y, 0, 1); } -`,du="auto",cw=0,q8=1,uw=2,Iv=3,fw=4,dw=Float32Array.BYTES_PER_ELEMENT,jv=["OES_texture_float","OES_element_index_uint","WEBGL_color_buffer_float","EXT_float_blend"],Ov={color:[0,0,0,0],depth:1},Pm="panZoom",qv="lasso",ug="rotate",Cv=[Pm,qv,ug],hw=Pm,pw={cubicIn:yE,cubicInOut:Pv,cubicOut:bE,linear:vE,quadIn:xE,quadInOut:_E,quadOut:SE},Lv=Pv,fu="continuous",Yp="categorical",Nv=[fu,Yp],fg="deselect",mg="lassoEnd",mw=[fg,mg],Dv=3,gw=[0,.666666667,1,1],yw=2,bw=!1,vw=10,xw=3,_w=mg,Sw=!1,Um=750,Vm=500,Gm=100,jm=250,Ew=24,gg="lasso",qm="rotate",zm="merge",Hm="remove",ww=[gg,qm,zm,Hm],Wm="alt",yg="cmd",zv="ctrl",Hv="meta",bg="shift",Aw=[Wm,yg,zv,Hv,bg],Tw={[Hm]:Wm,[qm]:Wm,[gg]:bg,[zm]:yg},Iw=1,Ow=du,Cw=du,Lw=1,z8=1,Nw="asinh",Dw=6,Rw=2,kw=2,H8=null,Mw=null,Bw=2,Fw=2,W8=null,$w=null,Y8=null,Pw=.66,Uw=1,X8=null,Vw=.15,Gw=25,jw=1,qw=1,qp=null,zw=[.66,.66,.66,Uw],Hw=[0,.55,1,1],Ww=[1,1,1,1],Yw=[0,0,0,1],J8=null,Xw=[.66,.66,.66,.2],Jw=[0,.55,1,1],Kw=[1,1,1,1],Qw=[1,1,1,.5],Zw=1,eA=1e3,tA=[0,0],rA=1,nA=0,iA=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),sA="IMAGE_LOAD_ERROR",aA=null,oA=!1,lA=[1,1,1,.5],cA=!0,uA=!0,fA=!1,dA=100,hA=1/500,pA="auto",mA=!1,gA=200,yA=500,Wv=new Set(["z","valueZ","valueA","value1","category"]),Yv=new Set(["w","valueW","valueB","value2","value"]),vg=15e3,bA=void 0,vA=!1,xA=.5,_A=!1,SA="lasso",Xv=Symbol("SKIP_DEPRECATION_VALUE_TRANSLATION"),Rv="Points have not been drawn",K8="The instance was already destroyed",EA="Ignoring draw call as the previous draw call has not yet finished. To avoid this warning `await` the draw call.";Jv=()=>{let t=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],e=1,r=8;class i{static from(_){if(!(_ instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[w,O]=new Uint8Array(_,0,2);if(w!==219)throw new Error("Data does not appear to be in a KDBush format.");let I=O>>4;if(I!==e)throw new Error(`Got v${I} data when expected v${e}.`);let H=t[O&15];if(!H)throw new Error("Unrecognized array type.");let[J]=new Uint16Array(_,2,1),[Z]=new Uint32Array(_,4,1);return new i(Z,J,H,_)}constructor(_,w=64,O=Float64Array,I){if(isNaN(_)||_<0)throw new Error(`Unexpected numItems value: ${_}.`);this.numItems=+_,this.nodeSize=Math.min(Math.max(+w,2),65535),this.ArrayType=O,this.IndexArrayType=_<65536?Uint16Array:Uint32Array;let H=t.indexOf(this.ArrayType),J=_*2*this.ArrayType.BYTES_PER_ELEMENT,Z=_*this.IndexArrayType.BYTES_PER_ELEMENT,oe=(8-Z%8)%8;if(H<0)throw new Error(`Unexpected typed array class: ${O}.`);I&&I instanceof ArrayBuffer?(this.data=I,this.ids=new this.IndexArrayType(this.data,r,_),this.coords=new this.ArrayType(this.data,r+Z+oe,_*2),this._pos=_*2,this._finished=!0):(this.data=new ArrayBuffer(r+J+Z+oe),this.ids=new this.IndexArrayType(this.data,r,_),this.coords=new this.ArrayType(this.data,r+Z+oe,_*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(e<<4)+H]),new Uint16Array(this.data,2,1)[0]=w,new Uint32Array(this.data,4,1)[0]=_)}add(_,w){let O=this._pos>>1;return this.ids[O]=O,this.coords[this._pos++]=_,this.coords[this._pos++]=w,O}finish(){let _=this._pos>>1;if(_!==this.numItems)throw new Error(`Added ${_} items when expected ${this.numItems}.`);return s(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(_,w,O,I){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:H,coords:J,nodeSize:Z}=this,oe=[0,H.length-1,0],se=[];for(;oe.length;){let re=oe.pop()||0,q=oe.pop()||0,ue=oe.pop()||0;if(q-ue<=Z){for(let ze=ue;ze<=q;ze++){let er=J[2*ze],Er=J[2*ze+1];er>=_&&er<=O&&Er>=w&&Er<=I&&se.push(H[ze])}continue}let K=ue+q>>1,k=J[2*K],de=J[2*K+1];k>=_&&k<=O&&de>=w&&de<=I&&se.push(H[K]),(re===0?_<=k:w<=de)&&(oe.push(ue),oe.push(K-1),oe.push(1-re)),(re===0?O>=k:I>=de)&&(oe.push(K+1),oe.push(q),oe.push(1-re))}return se}within(_,w,O){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:I,coords:H,nodeSize:J}=this,Z=[0,I.length-1,0],oe=[],se=O*O;for(;Z.length;){let re=Z.pop()||0,q=Z.pop()||0,ue=Z.pop()||0;if(q-ue<=J){for(let ze=ue;ze<=q;ze++)v(H[2*ze],H[2*ze+1],_,w)<=se&&oe.push(I[ze]);continue}let K=ue+q>>1,k=H[2*K],de=H[2*K+1];v(k,de,_,w)<=se&&oe.push(I[K]),(re===0?_-O<=k:w-O<=de)&&(Z.push(ue),Z.push(K-1),Z.push(1-re)),(re===0?_+O>=k:w+O>=de)&&(Z.push(K+1),Z.push(q),Z.push(1-re))}return oe}}function s(x,_,w,O,I,H){if(I-O<=w)return;let J=O+I>>1;o(x,_,J,O,I,H),s(x,_,w,O,J-1,1-H),s(x,_,w,J+1,I,1-H)}function o(x,_,w,O,I,H){for(;I>O;){if(I-O>600){let se=I-O+1,re=w-O+1,q=Math.log(se),ue=.5*Math.exp(2*q/3),K=.5*Math.sqrt(q*ue*(se-ue)/se)*(re-se/2<0?-1:1),k=Math.max(O,Math.floor(w-re*ue/se+K)),de=Math.min(I,Math.floor(w+(se-re)*ue/se+K));o(x,_,w,k,de,H)}let J=_[2*w+H],Z=O,oe=I;for(h(x,_,O,w),_[2*I+H]>J&&h(x,_,O,I);ZJ;)oe--}_[2*O+H]===J?h(x,_,O,oe):(oe++,h(x,_,oe,I)),oe<=w&&(O=oe+1),w<=oe&&(I=oe-1)}}function h(x,_,w,O){g(x,w,O),g(_,2*w,2*O),g(_,2*w+1,2*O+1)}function g(x,_,w){let O=x[_];x[_]=x[w],x[w]=O}function v(x,_,w,O){let I=x-w,H=_-O;return I*I+H*H}return i},wA=()=>{addEventListener("message",t=>{let e=t.data.points;e.length===0&&self.postMessage({error:new Error("Invalid point data")});let r=new KDBush(e.length,t.data.nodeSize);for(let[i,s]of e)r.add(i,s);r.finish(),postMessage(r.data,[r.data])})},Q8=Jv(),AA=1e6,TA=t=>{let e=Jv.toString(),r=t.toString(),i=`const createKDBushClass = ${e};KDBush = createKDBushClass();const createWorker = ${r};createWorker();`,s=new Blob([i],{type:"text/javascript"}),o=URL.createObjectURL(s),h=new Worker(o,{name:"KDBush"});return URL.revokeObjectURL(o),h},Kv=(t,e={nodeSize:16,useWorker:void 0})=>new Promise((r,i)=>{if(t instanceof ArrayBuffer)r(Q8.from(t));else if((t.length{o.data.error?i(o.data.error):r(Q8.from(o.data)),s.terminate()},s.postMessage({points:t,nodeSize:e.nodeSize})}}),IA=!0,OA=8,CA=2,LA="freeform",NA=24,DA=2500,RA=250,kA=(t,e,r)=>(1-t)*e+r,MA=(t,e)=>`${t}ms ease-out mainIn ${e}ms 1 normal forwards`,BA=(t,e)=>`${t}ms ease-out effectIn ${e}ms 1 normal forwards`,FA=(t,e)=>`${t}ms linear leftSpinIn ${e}ms 1 normal forwards`,$A=(t,e)=>`${t}ms linear rightSpinIn ${e}ms 1 normal forwards`,PA=(t,e)=>`${t}ms linear circleIn ${e}ms 1 normal forwards`,UA=(t,e,r)=>` +`,yu="auto",xA=0,_g=1,SA=2,C9=3,EA=4,wA=Float32Array.BYTES_PER_ELEMENT,H9=["OES_texture_float","OES_element_index_uint","WEBGL_color_buffer_float","EXT_float_blend"],L9={color:[0,0,0,0],depth:1},c6="panZoom",z9="lasso",Ug="rotate",N9=[c6,z9,Ug],AA=c6,TA={cubicIn:Cw,cubicInOut:V9,cubicOut:Lw,linear:Nw,quadIn:Dw,quadInOut:Rw,quadOut:Bw},D9=V9,gu="continuous",l0="categorical",R9=[gu,l0],Vg="deselect",Hg="lassoEnd",IA=[Vg,Hg],B9=3,OA=[0,.666666667,1,1],CA=2,LA=!1,NA=10,DA=3,RA=Hg,BA=!1,u6=750,f6=500,d6=100,h6=250,kA=24,zg="lasso",p6="rotate",m6="merge",g6="remove",FA=[zg,p6,m6,g6],y6="alt",Wg="cmd",W9="ctrl",Y9="meta",Yg="shift",MA=[y6,Wg,W9,Y9,Yg],$A={[g6]:y6,[p6]:y6,[zg]:Yg,[m6]:Wg},PA=1,UA=yu,VA=yu,GA=1,xg=1,jA="asinh",qA=6,HA=2,zA=2,Sg=null,WA=null,YA=2,XA=2,Eg=null,JA=null,wg=null,KA=.66,QA=1,Ag=null,ZA=.15,eT=25,tT=1,rT=1,i0=null,nT=[.66,.66,.66,QA],iT=[0,.55,1,1],sT=[1,1,1,1],aT=[0,0,0,1],Tg=null,oT=[.66,.66,.66,.2],lT=[0,.55,1,1],cT=[1,1,1,1],uT=[1,1,1,.5],fT=1,dT=1e3,hT=[0,0],pT=1,mT=0,gT=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),yT="IMAGE_LOAD_ERROR",bT=null,vT=!1,_T=[1,1,1,.5],xT=!0,ST=!0,ET=!1,wT=100,AT=1/500,TT="auto",IT=!1,OT=200,CT=500,X9=new Set(["z","valueZ","valueA","value1","category"]),J9=new Set(["w","valueW","valueB","value2","value"]),Xg=15e3,LT=void 0,NT=!1,DT=.5,RT=!1,BT="lasso",K9=Symbol("SKIP_DEPRECATION_VALUE_TRANSLATION"),k9="Points have not been drawn",Ig="The instance was already destroyed",kT="Ignoring draw call as the previous draw call has not yet finished. To avoid this warning `await` the draw call.";Q9=()=>{let t=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],e=1,r=8;class i{static from(x){if(!(x instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[w,I]=new Uint8Array(x,0,2);if(w!==219)throw new Error("Data does not appear to be in a KDBush format.");let O=I>>4;if(O!==e)throw new Error(`Got v${O} data when expected v${e}.`);let z=t[I&15];if(!z)throw new Error("Unrecognized array type.");let[J]=new Uint16Array(x,2,1),[Q]=new Uint32Array(x,4,1);return new i(Q,J,z,x)}constructor(x,w=64,I=Float64Array,O){if(isNaN(x)||x<0)throw new Error(`Unexpected numItems value: ${x}.`);this.numItems=+x,this.nodeSize=Math.min(Math.max(+w,2),65535),this.ArrayType=I,this.IndexArrayType=x<65536?Uint16Array:Uint32Array;let z=t.indexOf(this.ArrayType),J=x*2*this.ArrayType.BYTES_PER_ELEMENT,Q=x*this.IndexArrayType.BYTES_PER_ELEMENT,oe=(8-Q%8)%8;if(z<0)throw new Error(`Unexpected typed array class: ${I}.`);O&&O instanceof ArrayBuffer?(this.data=O,this.ids=new this.IndexArrayType(this.data,r,x),this.coords=new this.ArrayType(this.data,r+Q+oe,x*2),this._pos=x*2,this._finished=!0):(this.data=new ArrayBuffer(r+J+Q+oe),this.ids=new this.IndexArrayType(this.data,r,x),this.coords=new this.ArrayType(this.data,r+Q+oe,x*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(e<<4)+z]),new Uint16Array(this.data,2,1)[0]=w,new Uint32Array(this.data,4,1)[0]=x)}add(x,w){let I=this._pos>>1;return this.ids[I]=I,this.coords[this._pos++]=x,this.coords[this._pos++]=w,I}finish(){let x=this._pos>>1;if(x!==this.numItems)throw new Error(`Added ${x} items when expected ${this.numItems}.`);return s(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(x,w,I,O){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:z,coords:J,nodeSize:Q}=this,oe=[0,z.length-1,0],se=[];for(;oe.length;){let re=oe.pop()||0,q=oe.pop()||0,ue=oe.pop()||0;if(q-ue<=Q){for(let He=ue;He<=q;He++){let er=J[2*He],Er=J[2*He+1];er>=x&&er<=I&&Er>=w&&Er<=O&&se.push(z[He])}continue}let K=ue+q>>1,B=J[2*K],he=J[2*K+1];B>=x&&B<=I&&he>=w&&he<=O&&se.push(z[K]),(re===0?x<=B:w<=he)&&(oe.push(ue),oe.push(K-1),oe.push(1-re)),(re===0?I>=B:O>=he)&&(oe.push(K+1),oe.push(q),oe.push(1-re))}return se}within(x,w,I){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:O,coords:z,nodeSize:J}=this,Q=[0,O.length-1,0],oe=[],se=I*I;for(;Q.length;){let re=Q.pop()||0,q=Q.pop()||0,ue=Q.pop()||0;if(q-ue<=J){for(let He=ue;He<=q;He++)v(z[2*He],z[2*He+1],x,w)<=se&&oe.push(O[He]);continue}let K=ue+q>>1,B=z[2*K],he=z[2*K+1];v(B,he,x,w)<=se&&oe.push(O[K]),(re===0?x-I<=B:w-I<=he)&&(Q.push(ue),Q.push(K-1),Q.push(1-re)),(re===0?x+I>=B:w+I>=he)&&(Q.push(K+1),Q.push(q),Q.push(1-re))}return oe}}function s(_,x,w,I,O,z){if(O-I<=w)return;let J=I+O>>1;a(_,x,J,I,O,z),s(_,x,w,I,J-1,1-z),s(_,x,w,J+1,O,1-z)}function a(_,x,w,I,O,z){for(;O>I;){if(O-I>600){let se=O-I+1,re=w-I+1,q=Math.log(se),ue=.5*Math.exp(2*q/3),K=.5*Math.sqrt(q*ue*(se-ue)/se)*(re-se/2<0?-1:1),B=Math.max(I,Math.floor(w-re*ue/se+K)),he=Math.min(O,Math.floor(w+(se-re)*ue/se+K));a(_,x,w,B,he,z)}let J=x[2*w+z],Q=I,oe=O;for(d(_,x,I,w),x[2*O+z]>J&&d(_,x,I,O);QJ;)oe--}x[2*I+z]===J?d(_,x,I,oe):(oe++,d(_,x,oe,O)),oe<=w&&(I=oe+1),w<=oe&&(O=oe-1)}}function d(_,x,w,I){m(_,w,I),m(x,2*w,2*I),m(x,2*w+1,2*I+1)}function m(_,x,w){let I=_[x];_[x]=_[w],_[w]=I}function v(_,x,w,I){let O=_-w,z=x-I;return O*O+z*z}return i},FT=()=>{addEventListener("message",t=>{let e=t.data.points;e.length===0&&self.postMessage({error:new Error("Invalid point data")});let r=new KDBush(e.length,t.data.nodeSize);for(let[i,s]of e)r.add(i,s);r.finish(),postMessage(r.data,[r.data])})},Og=Q9(),MT=1e6,$T=t=>{let e=Q9.toString(),r=t.toString(),i=`const createKDBushClass = ${e};KDBush = createKDBushClass();const createWorker = ${r};createWorker();`,s=new Blob([i],{type:"text/javascript"}),a=URL.createObjectURL(s),d=new Worker(a,{name:"KDBush"});return URL.revokeObjectURL(a),d},Z9=(t,e={nodeSize:16,useWorker:void 0})=>new Promise((r,i)=>{if(t instanceof ArrayBuffer)r(Og.from(t));else if((t.length{a.data.error?i(a.data.error):r(Og.from(a.data)),s.terminate()},s.postMessage({points:t,nodeSize:e.nodeSize})}}),PT=!0,UT=8,VT=2,GT="freeform",jT=24,qT=2500,HT=250,zT=(t,e,r)=>(1-t)*e+r,WT=(t,e)=>`${t}ms ease-out mainIn ${e}ms 1 normal forwards`,YT=(t,e)=>`${t}ms ease-out effectIn ${e}ms 1 normal forwards`,XT=(t,e)=>`${t}ms linear leftSpinIn ${e}ms 1 normal forwards`,JT=(t,e)=>`${t}ms linear rightSpinIn ${e}ms 1 normal forwards`,KT=(t,e)=>`${t}ms linear circleIn ${e}ms 1 normal forwards`,QT=(t,e,r)=>` @keyframes mainIn { 0% { color: ${e}; @@ -395,7 +395,7 @@ void main () { opacity: 0.8; } } -`,VA=(t,e,r,i)=>` +`,ZT=(t,e,r,i)=>` @keyframes effectIn { 0%, ${t}% { opacity: ${r}; @@ -414,7 +414,7 @@ void main () { transform: scale(0); } } -`,GA=(t,e,r)=>` +`,eI=(t,e,r)=>` @keyframes circleIn { 0% { clip-path: ${e}; @@ -429,7 +429,7 @@ void main () { opacity: 1; } } -`,jA=(t,e)=>` +`,tI=(t,e)=>` @keyframes leftSpinIn { 0% { transform: rotate(${e}deg); @@ -438,7 +438,7 @@ void main () { transform: rotate(360deg); } } -`,qA=(t,e)=>` +`,rI=(t,e)=>` @keyframes rightSpinIn { 0% { transform: rotate(${e}deg); @@ -447,7 +447,7 @@ void main () { transform: rotate(180deg); } } -`,zA=({time:t=Um,extraTime:e=Vm,delay:r=Gm,currentColor:i,targetColor:s,effectOpacity:o,effectScale:h,circleLeftRotation:g,circleRightRotation:v,circleClipPath:x,circleOpacity:_})=>{let w=g/360,O=kA(w,t,e),I=Math.round((1-w)*t/O*100),H=Math.round(I/2),J=I+(100-I)/4;return{rules:{main:UA(I,i,s),effect:VA(I,J,o,h),circleRight:qA(H,v),circleLeft:jA(I,g),circle:GA(H,x,_)},names:{main:MA(O,r),effect:BA(O,r),circleLeft:FA(O,r),circleRight:$A(O,r),circle:PA(O,r)}}},HA=t=>`${t}ms linear mainOut 0s 1 normal forwards`,WA=t=>`${t}ms linear effectOut 0s 1 normal forwards`,YA=t=>`${t}ms linear leftSpinOut 0s 1 normal forwards`,XA=t=>`${t}ms linear rightSpinOut 0s 1 normal forwards`,JA=t=>`${t}ms linear circleOut 0s 1 normal forwards`,KA=(t,e)=>` +`,nI=({time:t=u6,extraTime:e=f6,delay:r=d6,currentColor:i,targetColor:s,effectOpacity:a,effectScale:d,circleLeftRotation:m,circleRightRotation:v,circleClipPath:_,circleOpacity:x})=>{let w=m/360,I=zT(w,t,e),O=Math.round((1-w)*t/I*100),z=Math.round(O/2),J=O+(100-O)/4;return{rules:{main:QT(O,i,s),effect:ZT(O,J,a,d),circleRight:rI(z,v),circleLeft:tI(O,m),circle:eI(z,_,x)},names:{main:WT(I,r),effect:YT(I,r),circleLeft:XT(I,r),circleRight:JT(I,r),circle:KT(I,r)}}},iI=t=>`${t}ms linear mainOut 0s 1 normal forwards`,sI=t=>`${t}ms linear effectOut 0s 1 normal forwards`,aI=t=>`${t}ms linear leftSpinOut 0s 1 normal forwards`,oI=t=>`${t}ms linear rightSpinOut 0s 1 normal forwards`,lI=t=>`${t}ms linear circleOut 0s 1 normal forwards`,cI=(t,e)=>` @keyframes mainOut { 0% { color: ${t}; @@ -456,7 +456,7 @@ void main () { color: ${e}; } } -`,QA=(t,e)=>` +`,uI=(t,e)=>` @keyframes effectOut { 0% { opacity: ${t}; @@ -471,7 +471,7 @@ void main () { transform: scale(0); } } -`,ZA=(t,e)=>` +`,fI=(t,e)=>` @keyframes rightSpinOut { 0%, ${t}% { transform: rotate(${e}deg); @@ -479,7 +479,7 @@ void main () { 100% { transform: rotate(0deg); } -`,eT=t=>` +`,dI=t=>` @keyframes leftSpinOut { 0% { transform: rotate(${t}deg); @@ -488,7 +488,7 @@ void main () { transform: rotate(0deg); } } -`,tT=(t,e,r)=>` +`,hI=(t,e,r)=>` @keyframes circleOut { 0%, ${t}% { clip-path: ${e}; @@ -503,7 +503,7 @@ void main () { opacity: 0; } } -`,rT=({time:t=jm,currentColor:e,targetColor:r,effectOpacity:i,effectScale:s,circleLeftRotation:o,circleRightRotation:h,circleClipPath:g,circleOpacity:v})=>{let x=o/360,_=x*t,w=Math.min(100,x*100),O=w>50?Math.round((1-50/w)*100):0;return{rules:{main:KA(e,r),effect:QA(i,s),circleRight:ZA(O,h),circleLeft:eT(o),circle:tT(O,g,v)},names:{main:HA(_),effect:WA(_),circleRight:YA(_),circleLeft:XA(_),circle:JA(_)}}},nT=()=>{let t=document.createElement("div"),e=Math.random().toString(36).substring(2,5)+Math.random().toString(36).substring(2,5);t.id=`lasso-long-press-${e}`,t.style.position="fixed",t.style.width="1.25rem",t.style.height="1.25rem",t.style.pointerEvents="none",t.style.transform="translate(-50%,-50%)";let r=document.createElement("div");r.style.position="absolute",r.style.top=0,r.style.left=0,r.style.width="1.25rem",r.style.height="1.25rem",r.style.clipPath="inset(0px 0px 0px 50%)",r.style.opacity=0,t.appendChild(r);let i=document.createElement("div");i.style.position="absolute",i.style.top=0,i.style.left=0,i.style.width="0.8rem",i.style.height="0.8rem",i.style.border="0.2rem solid currentcolor",i.style.borderRadius="0.8rem",i.style.clipPath="inset(0px 50% 0px 0px)",i.style.transform="rotate(0deg)",r.appendChild(i);let s=document.createElement("div");s.style.position="absolute",s.style.top=0,s.style.left=0,s.style.width="0.8rem",s.style.height="0.8rem",s.style.border="0.2rem solid currentcolor",s.style.borderRadius="0.8rem",s.style.clipPath="inset(0px 50% 0px 0px)",s.style.transform="rotate(0deg)",r.appendChild(s);let o=document.createElement("div");return o.style.position="absolute",o.style.top=0,o.style.left=0,o.style.width="1.25rem",o.style.height="1.25rem",o.style.borderRadius="1.25rem",o.style.background="currentcolor",o.style.transform="scale(0)",o.style.opacity=0,t.appendChild(o),{longPress:t,longPressCircle:r,longPressCircleLeft:i,longPressCircleRight:s,longPressEffect:o}},iT=(t,e,r)=>{if(t.length===0)return 0;if(t.length===1)return t[0];let i=2**(-1/e),s=Math.max(0,t.length-r),o=t.slice(s),h=0,g=0,v=0;for(let x=o.length-1;x>=0;x--){let _=o.length-1-x,w=i**_;h+=o[x][0]*w,g+=o[x][1]*w,v+=w}return[h/v,g/v]},xf=(t,e=null)=>t===null?e:t,Qv=()=>{if(!Z8){let t=document.createElement("style");document.head.appendChild(t),Z8=t.sheet}return Z8},Wl=t=>{let e=Qv(),r=e.rules.length;return e.insertRule(t,r),r},Yl=t=>{Qv().deleteRule(t)},sT=`${DA}ms ease scaleInFadeOut 0s 1 normal backwards`,aT=(t,e,r)=>` +`,pI=({time:t=h6,currentColor:e,targetColor:r,effectOpacity:i,effectScale:s,circleLeftRotation:a,circleRightRotation:d,circleClipPath:m,circleOpacity:v})=>{let _=a/360,x=_*t,w=Math.min(100,_*100),I=w>50?Math.round((1-50/w)*100):0;return{rules:{main:cI(e,r),effect:uI(i,s),circleRight:fI(I,d),circleLeft:dI(a),circle:hI(I,m,v)},names:{main:iI(x),effect:sI(x),circleRight:aI(x),circleLeft:oI(x),circle:lI(x)}}},mI=()=>{let t=document.createElement("div"),e=Math.random().toString(36).substring(2,5)+Math.random().toString(36).substring(2,5);t.id=`lasso-long-press-${e}`,t.style.position="fixed",t.style.width="1.25rem",t.style.height="1.25rem",t.style.pointerEvents="none",t.style.transform="translate(-50%,-50%)";let r=document.createElement("div");r.style.position="absolute",r.style.top=0,r.style.left=0,r.style.width="1.25rem",r.style.height="1.25rem",r.style.clipPath="inset(0px 0px 0px 50%)",r.style.opacity=0,t.appendChild(r);let i=document.createElement("div");i.style.position="absolute",i.style.top=0,i.style.left=0,i.style.width="0.8rem",i.style.height="0.8rem",i.style.border="0.2rem solid currentcolor",i.style.borderRadius="0.8rem",i.style.clipPath="inset(0px 50% 0px 0px)",i.style.transform="rotate(0deg)",r.appendChild(i);let s=document.createElement("div");s.style.position="absolute",s.style.top=0,s.style.left=0,s.style.width="0.8rem",s.style.height="0.8rem",s.style.border="0.2rem solid currentcolor",s.style.borderRadius="0.8rem",s.style.clipPath="inset(0px 50% 0px 0px)",s.style.transform="rotate(0deg)",r.appendChild(s);let a=document.createElement("div");return a.style.position="absolute",a.style.top=0,a.style.left=0,a.style.width="1.25rem",a.style.height="1.25rem",a.style.borderRadius="1.25rem",a.style.background="currentcolor",a.style.transform="scale(0)",a.style.opacity=0,t.appendChild(a),{longPress:t,longPressCircle:r,longPressCircleLeft:i,longPressCircleRight:s,longPressEffect:a}},gI=(t,e,r)=>{if(t.length===0)return 0;if(t.length===1)return t[0];let i=2**(-1/e),s=Math.max(0,t.length-r),a=t.slice(s),d=0,m=0,v=0;for(let _=a.length-1;_>=0;_--){let x=a.length-1-_,w=i**x;d+=a[_][0]*w,m+=a[_][1]*w,v+=w}return[d/v,m/v]},I2=(t,e=null)=>t===null?e:t,e_=()=>{if(!Cg){let t=document.createElement("style");document.head.appendChild(t),Cg=t.sheet}return Cg},tc=t=>{let e=e_(),r=e.rules.length;return e.insertRule(t,r),r},rc=t=>{e_().deleteRule(t)},yI=`${qT}ms ease scaleInFadeOut 0s 1 normal backwards`,bI=(t,e,r)=>` @keyframes scaleInFadeOut { 0% { opacity: ${t}; @@ -518,7 +518,7 @@ void main () { transform: translate(-50%,-50%) scale(0.9) rotate(${r+60}deg); } } -`,eg=null,oT=`${RA}ms ease fadeScaleOut 0s 1 normal backwards`,lT=(t,e,r)=>` +`,Lg=null,vI=`${HT}ms ease fadeScaleOut 0s 1 normal backwards`,_I=(t,e,r)=>` @keyframes fadeScaleOut { 0% { opacity: ${t}; @@ -529,7 +529,7 @@ void main () { transform: translate(-50%,-50%) scale(0) rotate(${r}deg); } } -`,tg=null,Zv=(t,{onDraw:e=hu,onStart:r=hu,onEnd:i=hu,enableInitiator:s=IA,initiatorParentElement:o=document.body,longPressIndicatorParentElement:h=document.body,minDelay:g=OA,minDist:v=CA,pointNorm:x=hu,type:_=LA,brushSize:w=NA}={})=>{let O=s,I=o,H=h,J=e,Z=r,oe=i,se=g,re=v,q=x,ue=_,K=w,k=document.createElement("div"),de=Math.random().toString(36).substring(2,5)+Math.random().toString(36).substring(2,5);k.id=`lasso-initiator-${de}`,k.style.position="fixed",k.style.display="flex",k.style.justifyContent="center",k.style.alignItems="center",k.style.zIndex=99,k.style.width="4rem",k.style.height="4rem",k.style.borderRadius="4rem",k.style.opacity=.5,k.style.transform="translate(-50%,-50%) scale(0) rotate(0deg)";let{longPress:ze,longPressCircle:er,longPressCircleLeft:Er,longPressCircleRight:Ht,longPressEffect:xn}=nT(),$r=!1,Tn=!1,In=[],cr=[],bn=[],mn=[],qn,Wt=!1,Pr=null,hi=null,Ai=null,pi=null,ss=null,Va=null,ar=null,Wi=null,Gs=null,Qs=null,no=()=>{$r=!1},wn=un=>{let{left:fi,top:mi}=t.getBoundingClientRect();return[un.clientX-fi,un.clientY-mi]};window.addEventListener("mouseup",no);let Ei=()=>{k.style.opacity=.5,k.style.transform="translate(-50%,-50%) scale(0) rotate(0deg)"},Ii=(un,fi)=>{let mi=getComputedStyle(un),ti=+mi.opacity,Fi=mi.transform.match(/([0-9.-]+)+/g),Oi=+Fi[0],ai=+Fi[1],Xi=Math.sqrt(Oi*Oi+ai*ai),Cn=Math.atan2(ai,Oi)*(180/Math.PI);return Cn=fi&&Cn<=0?360+Cn:Cn,{opacity:ti,scale:Xi,rotate:Cn}},si=un=>{if(!O||$r)return;let fi=un.clientX,mi=un.clientY;k.style.top=`${mi}px`,k.style.left=`${fi}px`;let ti=Ii(k),Fi=ti.opacity,Oi=ti.scale,ai=ti.rotate;k.style.opacity=Fi,k.style.transform=`translate(-50%,-50%) scale(${Oi}) rotate(${ai}deg)`,k.style.animation="none",uh().then(()=>{eg!==null&&Yl(eg),eg=Wl(aT(Fi,Oi,ai)),k.style.animation=sT,uh().then(()=>{Ei()})})},xi=()=>{let{opacity:un,scale:fi,rotate:mi}=Ii(k);k.style.opacity=un,k.style.transform=`translate(-50%,-50%) scale(${fi}) rotate(${mi}deg)`,k.style.animation="none",uh(2).then(()=>{tg!==null&&Yl(tg),tg=Wl(lT(un,fi,mi)),k.style.animation=oT,uh().then(()=>{Ei()})})},Ui=(un,fi,{time:mi=Um,extraTime:ti=Vm,delay:Fi=Gm}={time:Um,extraTime:Vm,delay:Gm})=>{Wt=!0;let Oi=getComputedStyle(ze);ze.style.color=Oi.color,ze.style.top=`${fi}px`,ze.style.left=`${un}px`,ze.style.animation="none";let ai=getComputedStyle(er);er.style.clipPath=ai.clipPath,er.style.opacity=ai.opacity,er.style.animation="none";let Xi=Ii(xn);xn.style.opacity=Xi.opacity,xn.style.transform=`scale(${Xi.scale})`,xn.style.animation="none";let Cn=Ii(Er);Er.style.transform=`rotate(${Cn.rotate}deg)`,Er.style.animation="none";let zn=Ii(Ht);Ht.style.transform=`rotate(${zn.rotate}deg)`,Ht.style.animation="none",uh().then(()=>{if(!Wt)return;ss!==null&&Yl(ss),pi!==null&&Yl(pi),Ai!==null&&Yl(Ai),hi!==null&&Yl(hi),Pr!==null&&Yl(Pr);let{rules:Ci,names:rs}=zA({time:mi,extraTime:ti,delay:Fi,currentColor:Oi.color||"currentcolor",targetColor:ze.dataset.activeColor,effectOpacity:Xi.opacity||0,effectScale:Xi.scale||0,circleLeftRotation:Cn.rotate||0,circleRightRotation:zn.rotate||0,circleClipPath:ai.clipPath||"inset(0 0 0 50%)",circleOpacity:ai.opacity||0});Pr=Wl(Ci.main),hi=Wl(Ci.effect),Ai=Wl(Ci.circleLeft),pi=Wl(Ci.circleRight),ss=Wl(Ci.circle),ze.style.animation=rs.main,xn.style.animation=rs.effect,Er.style.animation=rs.circleLeft,Ht.style.animation=rs.circleRight,er.style.animation=rs.circle})},No=({time:un=jm}={time:jm})=>{if(!Wt)return;Wt=!1;let fi=getComputedStyle(ze);ze.style.color=fi.color,ze.style.animation="none";let mi=getComputedStyle(er);er.style.clipPath=mi.clipPath,er.style.opacity=mi.opacity,er.style.animation="none";let ti=Ii(xn);xn.style.opacity=ti.opacity,xn.style.transform=`scale(${ti.scale})`,xn.style.animation="none";let Fi=mi.clipPath.slice(-2,-1)==="x",Oi=Ii(Er,Fi);Er.style.transform=`rotate(${Oi.rotate}deg)`,Er.style.animation="none";let ai=Ii(Ht);Ht.style.transform=`rotate(${ai.rotate}deg)`,Ht.style.animation="none",uh().then(()=>{Qs!==null&&Yl(Qs),Gs!==null&&Yl(Gs),Wi!==null&&Yl(Wi),ar!==null&&Yl(ar),Va!==null&&Yl(Va);let{rules:Xi,names:Cn}=rT({time:un,currentColor:fi.color||"currentcolor",targetColor:ze.dataset.color,effectOpacity:ti.opacity||0,effectScale:ti.scale||0,circleLeftRotation:Oi.rotate||0,circleRightRotation:ai.rotate||0,circleClipPath:mi.clipPath||"inset(0px)",circleOpacity:mi.opacity||1});Va=Wl(Xi.main),ar=Wl(Xi.effect),Wi=Wl(Xi.circleLeft),Gs=Wl(Xi.circleRight),Qs=Wl(Xi.circle),ze.style.animation=Cn.main,xn.style.animation=Cn.effect,Er.style.animation=Cn.circleLeft,Ht.style.animation=Cn.circleRight,er.style.animation=Cn.circle})},K1=()=>{J(In,cr)},$=un=>{In.push(un),cr.push(un[0],un[1])},c1=un=>{let[fi,mi]=un,[ti,Fi]=In[0];In[1]=[fi,Fi],In[2]=[fi,mi],In[3]=[ti,mi],In[4]=[ti,Fi],cr[2]=fi,cr[3]=Fi,cr[4]=fi,cr[5]=mi,cr[6]=ti,cr[7]=mi,cr[8]=ti,cr[9]=Fi},Wo=un=>{bn.push(un)},V=()=>Math.abs(q([0,0])[0]-q([K/2,0])[0]),ga=(un,fi,mi)=>{let[ti,Fi]=un,[Oi,ai]=fi,Xi=ti-Oi,Cn=Fi-ai,zn=EE([Xi,Cn]);return[+Cn/zn*mi,-Xi/zn*mi]},Fs=un=>{let fi=bn.at(-1),mi=V(),[ti,Fi]=ga(un,fi,mi),Oi=bn.length;if(Oi===1){let Cn=[fi[0]+ti,fi[1]+Fi],zn=[fi[0]-ti,fi[1]-Fi];In.push(Cn,zn),cr.push(Cn[0],Cn[1],zn[0],zn[1]),mn.push([ti,Fi])}else{[ti,Fi]=ga(un,fi,mi);let Cn=[...mn,[ti,Fi]];[ti,Fi]=iT(Cn,1,10);let[zn,Ci]=mn.at(-1),rs=(ti+zn)/2,os=(Fi+Ci)/2,u1=[fi[0]+rs,fi[1]+os],ji=[fi[0]-rs,fi[1]-os];In.splice(Oi-1,2,u1,ji),cr.splice(2*(Oi-1),4,u1[0],u1[1],ji[0],ji[1]),mn.splice(Oi,1,[rs,os])}let ai=[un[0]+ti,un[1]+Fi],Xi=[un[0]-ti,un[1]-Fi];In.splice(Oi,0,ai,Xi),cr.splice(2*Oi,0,ai[0],ai[1],Xi[0],Xi[1]),bn.push(un),mn.push([ti,Fi])},Do=$,ds=$,gn=un=>{if(qn)OE(un[0],un[1],qn[0],qn[1])>re&&(qn=un,Do(q(un)),In.length>1&&K1());else{Tn||(Tn=!0,Z()),qn=un;let fi=q(un);ds(fi)}},_s=Uv(gn,se,se),ya=(un,fi)=>{let mi=wn(un);return fi?_s(mi):gn(mi)},Yi=()=>{In=[],cr=[],bn=[],mn=[],qn=void 0,K1()},as=un=>{si(un)},Zs=()=>{$r=!0,Tn=!0,Yi(),Z()},Ga=()=>{xi()},Yo=({merge:un=!1,remove:fi=!1}={})=>{Tn=!1;let mi=[...In],ti=[...cr];return _s.cancel(),Yi(),mi.length>0&&oe(mi,ti,{merge:un,remove:fi}),mi},N1=un=>{switch(un){case"rectangle":{ue=un,Do=c1,ds=$;break}case"brush":{ue=un,Do=Fs,ds=Wo;break}default:{ue="freeform",Do=$,ds=$;break}}},Ro=un=>{if(un==="onDraw")return J;if(un==="onStart")return Z;if(un==="onEnd")return oe;if(un==="enableInitiator")return O;if(un==="minDelay")return se;if(un==="minDist")return re;if(un==="pointNorm")return q;if(un==="type")return ue;if(un==="brushSize")return K},ko=({onDraw:un=null,onStart:fi=null,onEnd:mi=null,enableInitiator:ti=null,initiatorParentElement:Fi=null,longPressIndicatorParentElement:Oi=null,minDelay:ai=null,minDist:Xi=null,pointNorm:Cn=null,type:zn=null,brushSize:Ci=null}={})=>{J=xf(un,J),Z=xf(fi,Z),oe=xf(mi,oe),O=xf(ti,O),se=xf(ai,se),re=xf(Xi,re),q=xf(Cn,q),K=xf(Ci,K),Fi!==null&&Fi!==I&&(I.removeChild(k),Fi.appendChild(k),I=Fi),Oi!==null&&Oi!==H&&(H.removeChild(ze),Oi.appendChild(ze),H=Oi),O?(k.addEventListener("click",as),k.addEventListener("mousedown",Zs),k.addEventListener("mouseleave",Ga)):(k.removeEventListener("mousedown",Zs),k.removeEventListener("mouseleave",Ga)),zn!==null&&N1(zn)},Nc=()=>{I.removeChild(k),H.removeChild(ze),window.removeEventListener("mouseup",no),k.removeEventListener("click",as),k.removeEventListener("mousedown",Zs),k.removeEventListener("mouseleave",Ga)},Fn=()=>un=>pg(un,{clear:Yi,destroy:Nc,end:Yo,extend:ya,get:Ro,set:ko,showInitiator:si,hideInitiator:xi,showLongPressIndicator:Ui,hideLongPressIndicator:No});return I.appendChild(k),H.appendChild(ze),ko({onDraw:J,onStart:Z,onEnd:oe,enableInitiator:O,initiatorParentElement:I,type:ue,brushSize:K}),TE(Sv("initiator",k),Sv("longPressIndicator",ze),Fn(),IE(Zv))({})},cT=` +`,Ng=null,t_=(t,{onDraw:e=bu,onStart:r=bu,onEnd:i=bu,enableInitiator:s=PT,initiatorParentElement:a=document.body,longPressIndicatorParentElement:d=document.body,minDelay:m=UT,minDist:v=VT,pointNorm:_=bu,type:x=GT,brushSize:w=jT}={})=>{let I=s,O=a,z=d,J=e,Q=r,oe=i,se=m,re=v,q=_,ue=x,K=w,B=document.createElement("div"),he=Math.random().toString(36).substring(2,5)+Math.random().toString(36).substring(2,5);B.id=`lasso-initiator-${he}`,B.style.position="fixed",B.style.display="flex",B.style.justifyContent="center",B.style.alignItems="center",B.style.zIndex=99,B.style.width="4rem",B.style.height="4rem",B.style.borderRadius="4rem",B.style.opacity=.5,B.style.transform="translate(-50%,-50%) scale(0) rotate(0deg)";let{longPress:He,longPressCircle:er,longPressCircleLeft:Er,longPressCircleRight:zt,longPressEffect:_n}=mI(),$r=!1,In=!1,On=[],cr=[],bn=[],mn=[],qn,Wt=!1,Pr=null,gi=null,Ii=null,yi=null,as=null,Ha=null,ar=null,Ki=null,zs=null,ta=null,so=()=>{$r=!1},wn=un=>{let{left:mi,top:bi}=t.getBoundingClientRect();return[un.clientX-mi,un.clientY-bi]};window.addEventListener("mouseup",so);let wi=()=>{B.style.opacity=.5,B.style.transform="translate(-50%,-50%) scale(0) rotate(0deg)"},Ci=(un,mi)=>{let bi=getComputedStyle(un),ai=+bi.opacity,Vi=bi.transform.match(/([0-9.-]+)+/g),Li=+Vi[0],di=+Vi[1],es=Math.sqrt(Li*Li+di*di),Ln=Math.atan2(di,Li)*(180/Math.PI);return Ln=mi&&Ln<=0?360+Ln:Ln,{opacity:ai,scale:es,rotate:Ln}},fi=un=>{if(!I||$r)return;let mi=un.clientX,bi=un.clientY;B.style.top=`${bi}px`,B.style.left=`${mi}px`;let ai=Ci(B),Vi=ai.opacity,Li=ai.scale,di=ai.rotate;B.style.opacity=Vi,B.style.transform=`translate(-50%,-50%) scale(${Li}) rotate(${di}deg)`,B.style.animation="none",vh().then(()=>{Lg!==null&&rc(Lg),Lg=tc(bI(Vi,Li,di)),B.style.animation=yI,vh().then(()=>{wi()})})},Si=()=>{let{opacity:un,scale:mi,rotate:bi}=Ci(B);B.style.opacity=un,B.style.transform=`translate(-50%,-50%) scale(${mi}) rotate(${bi}deg)`,B.style.animation="none",vh(2).then(()=>{Ng!==null&&rc(Ng),Ng=tc(_I(un,mi,bi)),B.style.animation=vI,vh().then(()=>{wi()})})},qi=(un,mi,{time:bi=u6,extraTime:ai=f6,delay:Vi=d6}={time:u6,extraTime:f6,delay:d6})=>{Wt=!0;let Li=getComputedStyle(He);He.style.color=Li.color,He.style.top=`${mi}px`,He.style.left=`${un}px`,He.style.animation="none";let di=getComputedStyle(er);er.style.clipPath=di.clipPath,er.style.opacity=di.opacity,er.style.animation="none";let es=Ci(_n);_n.style.opacity=es.opacity,_n.style.transform=`scale(${es.scale})`,_n.style.animation="none";let Ln=Ci(Er);Er.style.transform=`rotate(${Ln.rotate}deg)`,Er.style.animation="none";let Hn=Ci(zt);zt.style.transform=`rotate(${Hn.rotate}deg)`,zt.style.animation="none",vh().then(()=>{if(!Wt)return;as!==null&&rc(as),yi!==null&&rc(yi),Ii!==null&&rc(Ii),gi!==null&&rc(gi),Pr!==null&&rc(Pr);let{rules:Ni,names:is}=nI({time:bi,extraTime:ai,delay:Vi,currentColor:Li.color||"currentcolor",targetColor:He.dataset.activeColor,effectOpacity:es.opacity||0,effectScale:es.scale||0,circleLeftRotation:Ln.rotate||0,circleRightRotation:Hn.rotate||0,circleClipPath:di.clipPath||"inset(0 0 0 50%)",circleOpacity:di.opacity||0});Pr=tc(Ni.main),gi=tc(Ni.effect),Ii=tc(Ni.circleLeft),yi=tc(Ni.circleRight),as=tc(Ni.circle),He.style.animation=is.main,_n.style.animation=is.effect,Er.style.animation=is.circleLeft,zt.style.animation=is.circleRight,er.style.animation=is.circle})},Do=({time:un=h6}={time:h6})=>{if(!Wt)return;Wt=!1;let mi=getComputedStyle(He);He.style.color=mi.color,He.style.animation="none";let bi=getComputedStyle(er);er.style.clipPath=bi.clipPath,er.style.opacity=bi.opacity,er.style.animation="none";let ai=Ci(_n);_n.style.opacity=ai.opacity,_n.style.transform=`scale(${ai.scale})`,_n.style.animation="none";let Vi=bi.clipPath.slice(-2,-1)==="x",Li=Ci(Er,Vi);Er.style.transform=`rotate(${Li.rotate}deg)`,Er.style.animation="none";let di=Ci(zt);zt.style.transform=`rotate(${di.rotate}deg)`,zt.style.animation="none",vh().then(()=>{ta!==null&&rc(ta),zs!==null&&rc(zs),Ki!==null&&rc(Ki),ar!==null&&rc(ar),Ha!==null&&rc(Ha);let{rules:es,names:Ln}=pI({time:un,currentColor:mi.color||"currentcolor",targetColor:He.dataset.color,effectOpacity:ai.opacity||0,effectScale:ai.scale||0,circleLeftRotation:Li.rotate||0,circleRightRotation:di.rotate||0,circleClipPath:bi.clipPath||"inset(0px)",circleOpacity:bi.opacity||1});Ha=tc(es.main),ar=tc(es.effect),Ki=tc(es.circleLeft),zs=tc(es.circleRight),ta=tc(es.circle),He.style.animation=Ln.main,_n.style.animation=Ln.effect,Er.style.animation=Ln.circleLeft,zt.style.animation=Ln.circleRight,er.style.animation=Ln.circle})},el=()=>{J(On,cr)},$=un=>{On.push(un),cr.push(un[0],un[1])},m1=un=>{let[mi,bi]=un,[ai,Vi]=On[0];On[1]=[mi,Vi],On[2]=[mi,bi],On[3]=[ai,bi],On[4]=[ai,Vi],cr[2]=mi,cr[3]=Vi,cr[4]=mi,cr[5]=bi,cr[6]=ai,cr[7]=bi,cr[8]=ai,cr[9]=Vi},Xo=un=>{bn.push(un)},V=()=>Math.abs(q([0,0])[0]-q([K/2,0])[0]),_a=(un,mi,bi)=>{let[ai,Vi]=un,[Li,di]=mi,es=ai-Li,Ln=Vi-di,Hn=kw([es,Ln]);return[+Ln/Hn*bi,-es/Hn*bi]},Us=un=>{let mi=bn.at(-1),bi=V(),[ai,Vi]=_a(un,mi,bi),Li=bn.length;if(Li===1){let Ln=[mi[0]+ai,mi[1]+Vi],Hn=[mi[0]-ai,mi[1]-Vi];On.push(Ln,Hn),cr.push(Ln[0],Ln[1],Hn[0],Hn[1]),mn.push([ai,Vi])}else{[ai,Vi]=_a(un,mi,bi);let Ln=[...mn,[ai,Vi]];[ai,Vi]=gI(Ln,1,10);let[Hn,Ni]=mn.at(-1),is=(ai+Hn)/2,ls=(Vi+Ni)/2,g1=[mi[0]+is,mi[1]+ls],Wi=[mi[0]-is,mi[1]-ls];On.splice(Li-1,2,g1,Wi),cr.splice(2*(Li-1),4,g1[0],g1[1],Wi[0],Wi[1]),mn.splice(Li,1,[is,ls])}let di=[un[0]+ai,un[1]+Vi],es=[un[0]-ai,un[1]-Vi];On.splice(Li,0,di,es),cr.splice(2*Li,0,di[0],di[1],es[0],es[1]),bn.push(un),mn.push([ai,Vi])},Ro=$,ps=$,gn=un=>{if(qn)Uw(un[0],un[1],qn[0],qn[1])>re&&(qn=un,Ro(q(un)),On.length>1&&el());else{In||(In=!0,Q()),qn=un;let mi=q(un);ps(mi)}},As=G9(gn,se,se),xa=(un,mi)=>{let bi=wn(un);return mi?As(bi):gn(bi)},Qi=()=>{On=[],cr=[],bn=[],mn=[],qn=void 0,el()},os=un=>{fi(un)},ra=()=>{$r=!0,In=!0,Qi(),Q()},za=()=>{Si()},Jo=({merge:un=!1,remove:mi=!1}={})=>{In=!1;let bi=[...On],ai=[...cr];return As.cancel(),Qi(),bi.length>0&&oe(bi,ai,{merge:un,remove:mi}),bi},F1=un=>{switch(un){case"rectangle":{ue=un,Ro=m1,ps=$;break}case"brush":{ue=un,Ro=Us,ps=Xo;break}default:{ue="freeform",Ro=$,ps=$;break}}},Bo=un=>{if(un==="onDraw")return J;if(un==="onStart")return Q;if(un==="onEnd")return oe;if(un==="enableInitiator")return I;if(un==="minDelay")return se;if(un==="minDist")return re;if(un==="pointNorm")return q;if(un==="type")return ue;if(un==="brushSize")return K},ko=({onDraw:un=null,onStart:mi=null,onEnd:bi=null,enableInitiator:ai=null,initiatorParentElement:Vi=null,longPressIndicatorParentElement:Li=null,minDelay:di=null,minDist:es=null,pointNorm:Ln=null,type:Hn=null,brushSize:Ni=null}={})=>{J=I2(un,J),Q=I2(mi,Q),oe=I2(bi,oe),I=I2(ai,I),se=I2(di,se),re=I2(es,re),q=I2(Ln,q),K=I2(Ni,K),Vi!==null&&Vi!==O&&(O.removeChild(B),Vi.appendChild(B),O=Vi),Li!==null&&Li!==z&&(z.removeChild(He),Li.appendChild(He),z=Li),I?(B.addEventListener("click",os),B.addEventListener("mousedown",ra),B.addEventListener("mouseleave",za)):(B.removeEventListener("mousedown",ra),B.removeEventListener("mouseleave",za)),Hn!==null&&F1(Hn)},$c=()=>{O.removeChild(B),z.removeChild(He),window.removeEventListener("mouseup",so),B.removeEventListener("click",os),B.removeEventListener("mousedown",ra),B.removeEventListener("mouseleave",za)},Pn=()=>un=>qg(un,{clear:Qi,destroy:$c,end:Jo,extend:xa,get:Bo,set:ko,showInitiator:fi,hideInitiator:Si,showLongPressIndicator:qi,hideLongPressIndicator:Do});return O.appendChild(B),z.appendChild(He),ko({onDraw:J,onStart:Q,onEnd:oe,enableInitiator:I,initiatorParentElement:O,type:ue,brushSize:K}),$w(w9("initiator",B),w9("longPressIndicator",He),Pn(),Pw(t_))({})},xI=` precision highp float; uniform float antiAliasing; @@ -548,7 +548,7 @@ void main() { gl_FragColor = vec4(color.rgb, alpha * color.a); } -`,uT=t=>` +`,SI=t=>` precision highp float; uniform sampler2D colorTex; @@ -661,14 +661,14 @@ void main() { finalPointSize = (pointSize * pointScale) + pointSizeExtra; gl_PointSize = finalPointSize; } -`,fT=`precision highp float; +`,EI=`precision highp float; varying vec4 color; void main() { gl_FragColor = color; } -`,dT=`precision highp float; +`,wI=`precision highp float; uniform sampler2D startStateTex; uniform sampler2D endStateTex; @@ -686,7 +686,7 @@ void main() { float endCategory = texture2D(endStateTex, particleTextureIndex).z; gl_FragColor = vec4(curr.xy, endCategory, curr.z); -}`,hT=`precision highp float; +}`,AI=`precision highp float; attribute vec2 position; varying vec2 particleTextureIndex; @@ -696,7 +696,7 @@ void main() { particleTextureIndex = 0.5 * (1.0 + position); gl_Position = vec4(position, 0, 1); -}`,e9=(t,e)=>t?jv.reduce((r,i)=>t.hasExtension(i)?r:(e||console.warn(`WebGL: ${i} extension not supported. Scatterplot might not render properly`),!1),!0):!1,t9=t=>{let e=t.getContext("webgl",{antialias:!0,preserveDrawingBuffer:!0}),r=[];for(let i of jv)e.getExtension(i)?r.push(i):console.warn(`WebGL: ${i} extension not supported. Scatterplot might not render properly`);return(0,$v.default)({gl:e,extensions:r})},rg=(t,e,r,i)=>Math.sqrt((t-r)**2+(e-i)**2),pT=t=>{let e=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;for(let o=0;or?t[o]:r,i=t[o+1]s?t[o+1]:s;return[e,i,r,s]},mT=([t,e,r,i])=>Number.isFinite(t)&&Number.isFinite(e)&&Number.isFinite(r)&&Number.isFinite(i)&&r-t>0&&i-e>0,gT=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,yT=(t,e=!1)=>t.replace(gT,(r,i,s,o)=>`#${i}${i}${s}${s}${o}${o}`).substring(1).match(/.{2}/g).map(r=>Number.parseInt(r,16)/255**e),_f=(t,e,{minLength:r=0}={})=>Array.isArray(t)&&t.length>=r&&t.every(e),Sf=t=>!Number.isNaN(+t)&&+t>=0,Bm=t=>!Number.isNaN(+t)&&+t>0,ng=(t,e)=>r=>t.indexOf(r)>=0?r:e,bT=(t,e=!1,r=vg)=>new Promise((i,s)=>{let o=new Image;e&&(o.crossOrigin="anonymous"),o.src=t,o.onload=()=>{i(o)};let h=()=>{s(new Error(sA))};o.onerror=h,setTimeout(h,r)}),dg=(t,e,r=vg)=>new Promise((i,s)=>{bT(e,e.indexOf(window.location.origin)!==0&&e.indexOf("base64")===-1,r).then(o=>{i(t.texture(o))}).catch(o=>{s(o)})}),vT=(t,e=!1)=>[...yT(t,e),255**!e],xT=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i,_T=t=>xT.test(t),ST=t=>t>=0&&t<=1,Ym=t=>Array.isArray(t)&&t.every(ST);ET=(t,[e,r]=[])=>{let i=0;for(let s=0,o=t.length-2;sr&&kv(h,g,v,x,e,r)>0&&i++:x<=r&&kv(h,g,v,x,e,r)<0&&i--,o=s}return i!==0},hg=t=>typeof t=="string"||t instanceof String,wT=t=>Number.isInteger(t)&&t>=0&&t<=255,r9=t=>Array.isArray(t)&&t.every(wT),AT=t=>t.length===3&&(Ym(t)||r9(t)),TT=t=>t.length===4&&(Ym(t)||r9(t)),Ef=t=>Array.isArray(t)&&t.length>0&&(Array.isArray(t[0])||hg(t[0])),IT=(t,e)=>!(Array.isArray(t)&&Array.isArray(e))||t.length!==e.length?!1:t.length===0?!0:Array.isArray(t[0])&&Array.isArray(e[0])?t.every(([r,i,s,o],h)=>{let[g,v,x,_]=e[h];return r===g&&i===v&&s===x&&o===_}):!1,zp=(t,e)=>t>e?t:e,Mv=(t,e)=>t{if(TT(t)){let r=Ym(t);return e&&r||!(e||r)?t:e&&!r?t.map(i=>i/255):t.map(i=>i*255)}if(AT(t)){let r=255**!e,i=Ym(t);return e&&i||!(e||i)?[...t,r]:e&&!i?[...t.map(s=>s/255),r]:[...t.map(s=>s*255),r]}return _T(t)?vT(t,e):(console.warn("Only HEX, RGB, and RGBA are handled by this function. Returning white instead."),e?[1,1,1,1]:[255,255,255,255])},OT=t=>Object.entries(t).reduce((e,[r,i])=>(e[i]?e[i]=[...e[i],r]:e[i]=r,e),{}),Bv=t=>.21*t[0]+.72*t[1]+.07*t[2],CT=(t,e,r)=>Math.min(r,Math.max(e,t)),n9=t=>new Promise((e,r)=>{if(!t||Array.isArray(t))e(t);else{let i=Array.isArray(t.x)||ArrayBuffer.isView(t.x)?t.x.length:0,s=(Array.isArray(t.x)||ArrayBuffer.isView(t.x))&&(w=>t.x[w]),o=(Array.isArray(t.y)||ArrayBuffer.isView(t.y))&&(w=>t.y[w]),h=(Array.isArray(t.line)||ArrayBuffer.isView(t.line))&&(w=>t.line[w]),g=(Array.isArray(t.lineOrder)||ArrayBuffer.isView(t.lineOrder))&&(w=>t.lineOrder[w]),v=Object.keys(t),x=(()=>{let w=v.find(O=>Wv.has(O));return w&&(Array.isArray(t[w])||ArrayBuffer.isView(t[w]))&&(O=>t[w][O])})(),_=(()=>{let w=v.find(O=>Yv.has(O));return w&&(Array.isArray(t[w])||ArrayBuffer.isView(t[w]))&&(O=>t[w][O])})();s&&o&&x&&_&&h&&g?e(t.x.map((w,O)=>[w,o(O),x(O),_(O),h(O),g(O)])):s&&o&&x&&_&&h?e(Array.from({length:i},(w,O)=>[s(O),o(O),x(O),_(O),h(O)])):s&&o&&x&&_?e(Array.from({length:i},(w,O)=>[s(O),o(O),x(O),_(O)])):s&&o&&x?e(Array.from({length:i},(w,O)=>[s(O),o(O),x(O)])):s&&o?e(Array.from({length:i},(w,O)=>[s(O),o(O)])):r(new Error("You need to specify at least x and y"))}}),LT=t=>Number.isFinite(t.y)&&!("x"in t),NT=t=>Number.isFinite(t.x)&&!("y"in t),DT=t=>Number.isFinite(t.x)&&Number.isFinite(t.y)&&Number.isFinite(t.width)&&Number.isFinite(t.height),RT=t=>Number.isFinite(t.x1)&&Number.isFinite(t.y1)&&Number.isFinite(t.x2)&&Number.isFinite(t.x2),kT=t=>"vertices"in t&&t.vertices.length>1,MT=t=>{if(!Array.isArray(t)||t.length<3)return!1;for(let e of t)if(!Array.isArray(e)||e.length!==2||typeof e[0]!="number"||typeof e[1]!="number")return!1;return!0},BT=t=>{let e=[...t],r=t.at(0),i=t.at(-1);return(r[0]!==i[0]||r[1]!==i[1])&&e.push(r),e},Fv=t=>{let e=t.length;for(let r=1;r-1&&i{let{regl:e,canvas:r=document.createElement("canvas"),gamma:i=Lw}=t,s=!1;e||(e=t9(r));let o=e9(e),h=[r.width,r.height],g=e.framebuffer({width:h[0],height:h[1],colorFormat:"rgba",colorType:"float"}),v=e({vert:` +}`,r_=(t,e)=>t?H9.reduce((r,i)=>t.hasExtension(i)?r:(e||console.warn(`WebGL: ${i} extension not supported. Scatterplot might not render properly`),!1),!0):!1,n_=t=>{let e=t.getContext("webgl",{antialias:!0,preserveDrawingBuffer:!0}),r=[];for(let i of H9)e.getExtension(i)?r.push(i):console.warn(`WebGL: ${i} extension not supported. Scatterplot might not render properly`);return(0,U9.default)({gl:e,extensions:r})},Dg=(t,e,r,i)=>Math.sqrt((t-r)**2+(e-i)**2),TI=t=>{let e=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;for(let a=0;ar?t[a]:r,i=t[a+1]s?t[a+1]:s;return[e,i,r,s]},II=([t,e,r,i])=>Number.isFinite(t)&&Number.isFinite(e)&&Number.isFinite(r)&&Number.isFinite(i)&&r-t>0&&i-e>0,OI=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,CI=(t,e=!1)=>t.replace(OI,(r,i,s,a)=>`#${i}${i}${s}${s}${a}${a}`).substring(1).match(/.{2}/g).map(r=>Number.parseInt(r,16)/255**e),O2=(t,e,{minLength:r=0}={})=>Array.isArray(t)&&t.length>=r&&t.every(e),C2=t=>!Number.isNaN(+t)&&+t>=0,a6=t=>!Number.isNaN(+t)&&+t>0,Rg=(t,e)=>r=>t.indexOf(r)>=0?r:e,LI=(t,e=!1,r=Xg)=>new Promise((i,s)=>{let a=new Image;e&&(a.crossOrigin="anonymous"),a.src=t,a.onload=()=>{i(a)};let d=()=>{s(new Error(yT))};a.onerror=d,setTimeout(d,r)}),Gg=(t,e,r=Xg)=>new Promise((i,s)=>{LI(e,e.indexOf(window.location.origin)!==0&&e.indexOf("base64")===-1,r).then(a=>{i(t.texture(a))}).catch(a=>{s(a)})}),NI=(t,e=!1)=>[...CI(t,e),255**!e],DI=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i,RI=t=>DI.test(t),BI=t=>t>=0&&t<=1,b6=t=>Array.isArray(t)&&t.every(BI);kI=(t,[e,r]=[])=>{let i=0;for(let s=0,a=t.length-2;sr&&F9(d,m,v,_,e,r)>0&&i++:_<=r&&F9(d,m,v,_,e,r)<0&&i--,a=s}return i!==0},jg=t=>typeof t=="string"||t instanceof String,FI=t=>Number.isInteger(t)&&t>=0&&t<=255,i_=t=>Array.isArray(t)&&t.every(FI),MI=t=>t.length===3&&(b6(t)||i_(t)),$I=t=>t.length===4&&(b6(t)||i_(t)),L2=t=>Array.isArray(t)&&t.length>0&&(Array.isArray(t[0])||jg(t[0])),PI=(t,e)=>!(Array.isArray(t)&&Array.isArray(e))||t.length!==e.length?!1:t.length===0?!0:Array.isArray(t[0])&&Array.isArray(e[0])?t.every(([r,i,s,a],d)=>{let[m,v,_,x]=e[d];return r===m&&i===v&&s===_&&a===x}):!1,s0=(t,e)=>t>e?t:e,M9=(t,e)=>t{if($I(t)){let r=b6(t);return e&&r||!(e||r)?t:e&&!r?t.map(i=>i/255):t.map(i=>i*255)}if(MI(t)){let r=255**!e,i=b6(t);return e&&i||!(e||i)?[...t,r]:e&&!i?[...t.map(s=>s/255),r]:[...t.map(s=>s*255),r]}return RI(t)?NI(t,e):(console.warn("Only HEX, RGB, and RGBA are handled by this function. Returning white instead."),e?[1,1,1,1]:[255,255,255,255])},UI=t=>Object.entries(t).reduce((e,[r,i])=>(e[i]?e[i]=[...e[i],r]:e[i]=r,e),{}),$9=t=>.21*t[0]+.72*t[1]+.07*t[2],VI=(t,e,r)=>Math.min(r,Math.max(e,t)),s_=t=>new Promise((e,r)=>{if(!t||Array.isArray(t))e(t);else{let i=Array.isArray(t.x)||ArrayBuffer.isView(t.x)?t.x.length:0,s=(Array.isArray(t.x)||ArrayBuffer.isView(t.x))&&(w=>t.x[w]),a=(Array.isArray(t.y)||ArrayBuffer.isView(t.y))&&(w=>t.y[w]),d=(Array.isArray(t.line)||ArrayBuffer.isView(t.line))&&(w=>t.line[w]),m=(Array.isArray(t.lineOrder)||ArrayBuffer.isView(t.lineOrder))&&(w=>t.lineOrder[w]),v=Object.keys(t),_=(()=>{let w=v.find(I=>X9.has(I));return w&&(Array.isArray(t[w])||ArrayBuffer.isView(t[w]))&&(I=>t[w][I])})(),x=(()=>{let w=v.find(I=>J9.has(I));return w&&(Array.isArray(t[w])||ArrayBuffer.isView(t[w]))&&(I=>t[w][I])})();s&&a&&_&&x&&d&&m?e(t.x.map((w,I)=>[w,a(I),_(I),x(I),d(I),m(I)])):s&&a&&_&&x&&d?e(Array.from({length:i},(w,I)=>[s(I),a(I),_(I),x(I),d(I)])):s&&a&&_&&x?e(Array.from({length:i},(w,I)=>[s(I),a(I),_(I),x(I)])):s&&a&&_?e(Array.from({length:i},(w,I)=>[s(I),a(I),_(I)])):s&&a?e(Array.from({length:i},(w,I)=>[s(I),a(I)])):r(new Error("You need to specify at least x and y"))}}),GI=t=>Number.isFinite(t.y)&&!("x"in t),jI=t=>Number.isFinite(t.x)&&!("y"in t),qI=t=>Number.isFinite(t.x)&&Number.isFinite(t.y)&&Number.isFinite(t.width)&&Number.isFinite(t.height),HI=t=>Number.isFinite(t.x1)&&Number.isFinite(t.y1)&&Number.isFinite(t.x2)&&Number.isFinite(t.x2),zI=t=>"vertices"in t&&t.vertices.length>1,WI=t=>{if(!Array.isArray(t)||t.length<3)return!1;for(let e of t)if(!Array.isArray(e)||e.length!==2||typeof e[0]!="number"||typeof e[1]!="number")return!1;return!0},YI=t=>{let e=[...t],r=t.at(0),i=t.at(-1);return(r[0]!==i[0]||r[1]!==i[1])&&e.push(r),e},P9=t=>{let e=t.length;for(let r=1;r-1&&i{let{regl:e,canvas:r=document.createElement("canvas"),gamma:i=GA}=t,s=!1;e||(e=n_(r));let a=r_(e),d=[r.width,r.height],m=e.framebuffer({width:d[0],height:d[1],colorFormat:"rgba",colorType:"float"}),v=e({vert:` precision highp float; attribute vec2 xy; void main () { @@ -714,7 +714,7 @@ void main() { void main () { vec4 color = texture2D(src, gl_FragCoord.xy / srcRes); gl_FragColor = vec4(approxLinearToSRGB(color.rgb, gamma), color.a); - }`,attributes:{xy:[-4,-4,4,-4,0,4]},uniforms:{src:()=>g,srcRes:()=>h,gamma:()=>i},count:3,depth:{enable:!1},blend:{enable:!0,func:{srcRGB:"one",srcAlpha:"one",dstRGB:"one minus src alpha",dstAlpha:"one minus src alpha"}}}),x=se=>{let re=se.getContext("2d");re.clearRect(0,0,se.width,se.height),re.drawImage(r,(r.width-se.width)/2,(r.height-se.height)/2,se.width,se.height,0,0,se.width,se.height)},_=(se,re)=>{e.clear(Ov),g.use(()=>{e.clear(Ov),se()}),v(),x(re)},w=()=>{e.poll()},O=new Set,I=se=>(O.add(se),()=>{O.delete(se)}),H=e.frame(()=>{let se=O.values(),re=se.next();for(;!re.done;)re.value(),re=se.next()}),J=(se,re)=>{let q=se===void 0?Math.min(window.innerWidth,window.screen.availWidth):se,ue=re===void 0?Math.min(window.innerHeight,window.screen.availHeight):re;r.width=q*window.devicePixelRatio,r.height=ue*window.devicePixelRatio,h[0]=r.width,h[1]=r.height,g.resize(...h)},Z=()=>{J()};return t.canvas||(window.addEventListener("resize",Z),window.addEventListener("orientationchange",Z),J()),{get canvas(){return r},get regl(){return e},get gamma(){return i},set gamma(se){i=+se},get isSupported(){return o},get isDestroyed(){return s},render:_,resize:J,onFrame:I,refresh:w,destroy:()=>{s=!0,window.removeEventListener("resize",Z),window.removeEventListener("orientationchange",Z),H.cancel(),r=void 0,e.destroy(),e=void 0}}},FT=function(){let e=(x,_,w,O,I)=>{let H=(O-_)*.5,J=(I-w)*.5;return(2*w-2*O+H+J)*x*x*x+(-3*w+3*O-2*H-J)*x*x+H*x+w},r=(x,_,w)=>{let O=w*x,I=Math.floor(O),H=O-I,J=_[Math.max(0,I-1)],Z=_[I],oe=_[Math.min(w,I+1)],se=_[Math.min(w,I+2)];return[e(H,J[0],Z[0],oe[0],se[0]),e(H,J[1],Z[1],oe[1],se[1])]},i=(x,_,w,O)=>(x-w)**2+(_-O)**2;let s=(x,_,w)=>{let O=_[0],I=_[1],H=w[0]-O,J=w[1]-I;if(H!==0||J!==0){let Z=((x[0]-O)*H+(x[1]-I)*J)/(H*H+J*J);Z>1?(O=w[0],I=w[1]):Z>0&&(O+=H*Z,I+=J*Z)}return H=x[0]-O,J=x[1]-I,H*H+J*J};let o=(x,_,w,O,I)=>{let H=O,J;for(let Z=_+1;ZH&&(J=Z,H=oe)}H>O&&(J-_>1&&o(x,_,J,O,I),I.push(x[J]),w-J>1&&o(x,J,w,O,I))};let h=(x,_)=>{let w=x.length-1,O=[x[0]];return o(x,0,w,_,O),O.push(x[w]),O},g=(x,{maxIntPointsPerSegment:_=100,tolerance:w=.002}={})=>{let O=x.length,I=O-1,H=I*_+1,J=w**2,Z=[],oe;for(let se=0;seJ&&(re.push(K),oe=K)}re.push(x[se+1]),re=h(re,J),Z=Z.concat(re.slice(0,re.length-1))}return Z.push(x[x.length-1].slice(0,2)),Z.flat()},v=x=>{let _={},w=!Number.isNaN(+x[0][5]);return x.forEach(O=>{let I=O[4];_[I]||(_[I]=[]),w?_[I][O[5]]=O:_[I].push(O)}),Object.entries(_).forEach(O=>{_[O[0]]=O[1].filter(I=>I),_[O[0]].reference=O[1][0]}),_};self.onmessage=function(_){_.data.points&&+_.data.points.length||self.postMessage({error:new Error("No points provided")}),_.data.points;let O=v(_.data.points);self.postMessage({points:Object.entries(O).reduce((I,H)=>(I[H[0]]=g(H[1],_.data.options),I[H[0]].reference=H[1].reference,I),{})})}},$T=(t,e={tolerance:.002,maxIntPointsPerSegment:100})=>new Promise((r,i)=>{let s=CE(FT);s.onmessage=o=>{o.data.error?i(o.data.error):r(o.data.points),s.terminate()},s.postMessage({points:t,options:e})}),ig={showRecticle:{replacement:"showReticle",removalVersion:"2",translation:hu},recticleColor:{replacement:"reticleColor",removalVersion:"2",translation:hu},keyMap:{replacement:"actionKeyMap",removalVersion:"2",translation:OT}},sg=t=>{let e=Object.keys(t).filter(r=>ig[r]);for(let r of e){let{replacement:i,removalVersion:s,translation:o}=ig[r];console.warn(`regl-scatterplot: the "${r}" property is deprecated and will be removed in v${s}. Please use "${i}" instead.`),t[ig[r].replacement]=t[r]!==Xv?o(t[r]):t[r],delete t[r]}return t},Xl=(t,e,{allowSegment:r=!1,allowDensity:i=!1,allowInherit:s=!1}={})=>Wv.has(t)?"valueZ":Yv.has(t)?"valueW":t==="segment"?r?"segment":e:t==="density"?i?"density":e:t==="inherit"&&s?"inherit":e,ag=t=>{switch(t){case"valueZ":return 2;case"valueW":return 3;default:return null}},PT=(t={})=>{let e=vv({async:!t.syncEvents,caseInsensitive:!0}),r=new Float32Array(16),i=new Float32Array(16),s=[0,0];sg(t);let{renderer:o,antiAliasing:h=xA,pixelAligned:g=_A,backgroundColor:v=Yw,backgroundImage:x=aA,canvas:_=document.createElement("canvas"),colorBy:w=qp,deselectOnDblClick:O=cA,deselectOnEscape:I=uA,lassoColor:H=gw,lassoLineWidth:J=yw,lassoMinDelay:Z=vw,lassoMinDist:oe=xw,lassoClearEvent:se=_w,lassoInitiator:re=bw,lassoInitiatorParentElement:q=document.body,lassoLongPressIndicatorParentElement:ue=document.body,lassoOnLongPress:K=Sw,lassoLongPressTime:k=Um,lassoLongPressAfterEffectTime:de=Vm,lassoLongPressEffectDelay:ze=Gm,lassoLongPressRevertEffectTime:er=jm,lassoType:Er=SA,lassoBrushSize:Ht=Ew,actionKeyMap:xn=Tw,mouseMode:$r=hw,showReticle:Tn=oA,reticleColor:In=lA,pointColor:cr=zw,pointColorActive:bn=Hw,pointColorHover:mn=Ww,showPointConnections:qn=fA,pointConnectionColor:Wt=Xw,pointConnectionColorActive:Pr=Jw,pointConnectionColorHover:hi=Kw,pointConnectionColorBy:Ai=J8,pointConnectionOpacity:pi=$w,pointConnectionOpacityBy:ss=Y8,pointConnectionOpacityActive:Va=Pw,pointConnectionSize:ar=Bw,pointConnectionSizeActive:Wi=Fw,pointConnectionSizeBy:Gs=W8,pointConnectionMaxIntPointsPerSegment:Qs=dA,pointConnectionTolerance:no=hA,pointSize:wn=Dw,pointSizeSelected:Ei=Rw,pointSizeMouseDetection:Ii=pA,pointOutlineWidth:si=kw,opacity:xi=du,opacityBy:Ui=X8,opacityByDensityFill:No=Vw,opacityInactiveMax:K1=jw,opacityInactiveScale:$=qw,sizeBy:c1=H8,pointOrder:Wo=Mw,pointScaleMode:V=Nw,height:ga=Cw,width:Fs=Ow,annotationLineColor:Do=Qw,annotationLineWidth:ds=Zw,annotationHVLineLimit:gn=eA,cameraIsFixed:_s=vA}=t,ya=Fs===du?1:Fs,Yi=ga===du?1:ga,{performanceMode:as=mA,opacityByDensityDebounceTime:Zs=Gw,spatialIndexUseWorker:Ga=bA}=t,Yo=!!(t.renderPointsAsSquares||as),N1=!!(t.disableAlphaBlending||as);$r=ng(Cv,Pm)($r),o||(o=i9({regl:t.regl,gamma:t.gamma})),v=l1(v,!0),H=l1(H,!0),In=l1(In,!0);let Ro=!1,ko=!1,Nc=Bv(v),Fn,un,fi,mi=!1,ti=null,Fi=[0,0],Oi=-1,ai=[],Xi=new Set,Cn=new Set,zn=!1,Ci=new Set,rs=[],os=0,u1=0,ji=!1,El=[],wf,aa,t2=t.aspectRatio||Iw,r2,Jl,wl,Xo,Mo,n2,Kl,pu,ja,D1,Xn,Q1,Cs=!1,qi=!0,n=!1,c;cr=Ef(cr)?[...cr]:[cr],bn=Ef(bn)?[...bn]:[bn],mn=Ef(mn)?[...mn]:[mn],cr=cr.map(S=>l1(S,!0)),bn=bn.map(S=>l1(S,!0)),mn=mn.map(S=>l1(S,!0)),xi=!Array.isArray(xi)&&Number.isNaN(+xi)?cr[0][3]:xi,xi=_f(xi,Sf,{minLength:1})?[...xi]:[xi],wn=_f(wn,Sf,{minLength:1})?[...wn]:[wn];let a=z8/wn[0];Wt==="inherit"?Wt=[...cr]:(Wt=Ef(Wt)?[...Wt]:[Wt],Wt=Wt.map(S=>l1(S,!0))),Pr==="inherit"?Pr=[...bn]:(Pr=Ef(Pr)?[...Pr]:[Pr],Pr=Pr.map(S=>l1(S,!0))),hi==="inherit"?hi=[...mn]:(hi=Ef(hi)?[...hi]:[hi],hi=hi.map(S=>l1(S,!0))),pi==="inherit"?pi=[...xi]:pi=_f(pi,Sf,{minLength:1})?[...pi]:[pi],ar==="inherit"?ar=[...wn]:ar=_f(ar,Sf,{minLength:1})?[...ar]:[ar],w=Xl(w,qp),Ui=Xl(Ui,X8,{allowDensity:!0}),c1=Xl(c1,H8),Ai=Xl(Ai,J8,{allowSegment:!0,allowInherit:!0}),ss=Xl(ss,Y8,{allowSegment:!0}),Gs=Xl(Gs,W8,{allowSegment:!0});let l,f,u,p,d=0,b=0,U,R,L,T=null,C=null,te,W,Y,B,N=!1,Ae=null,je,Ot,Oe=Tn,Te,ht=0,Tt,$t=0,yr=!1,le=!1,mr=!1,Vt=!1,Rt=Yp,Qr=Yp,$n,ki=!1,Di=t.xScale||null,Wn=t.yScale||null,Pn=0,Jn=0,ls=0,Ls=0;Di&&(Pn=Di.domain()[0],Jn=Di.domain()[1]-Di.domain()[0],Di.range([0,ya])),Wn&&(ls=Wn.domain()[0],Ls=Wn.domain()[1]-Wn.domain()[0],Wn.range([Yi,0]));let On=S=>-1+S/ya*2,ri=S=>1+S/Yi*-2,hs=()=>[On(s[0]),ri(s[1])],ps=(S,P)=>{let ee=[S,P,1,1],lt=og(r,L1(r,r2,L1(r,Fn.view,wl)));return Hp(ee,ee,lt),ee.slice(0,2)},wo=(S=0)=>{let P=va(),lt=(Xn[1]-Q1[1])/_.height;return(ja*P+S)*lt},Jo=()=>zn?rs.filter((S,P)=>Ci.has(P)):rs,Ao=(S,P,ee,lt)=>{let qt=wf.range(S,P,ee,lt);return zn?qt.filter(Gr=>Ci.has(Gr)):qt},Bo=()=>{let[S,P]=hs(),[ee,lt]=ps(S,P),qt=wo(4),Gr=Ao(ee-qt,lt-qt,ee+qt,lt+qt),Kt=qt,Or=-1;for(let sr of Gr){let[Un,$i]=rs[sr],Ns=rg(Un,$i,ee,lt);Ns{El=S,un.setPoints(P),e.publish("lassoExtend",{coordinates:S})},Fo=S=>{let P=pT(S);if(!mT(P))return[];let ee=Ao(...P),lt=[];for(let qt of ee)ET(S,rs[qt])&<.push(qt);return lt},Dc=()=>{El=[],un&&un.clear()},Ql=S=>S&&S.length>4,io=(S,P)=>{if(n2||!qn||!Ql(rs[S[0]]))return;let ee=P===0,lt=P===1?Or=>Cn.add(Or):hu,qt=Object.keys(S.reduce((Or,sr)=>{let Un=rs[sr],Ns=Array.isArray(Un[4])?Un[4][0]:Un[4];return Or[Ns]=!0,Or},{})),Gr=Xo.getData().opacities,Kt=qt.filter(Or=>!Cn.has(+Or));for(let Or of Kt){let sr=Mo[Or][0],Un=Mo[Or][2],$i=Mo[Or][3],Ns=sr*4+$i*2,rl=Ns+Un*2+4;Gr.__original__===void 0&&(Gr.__original__=Gr.slice());for(let Zo=Ns;Zo[S%d/d+b,Math.floor(S/d)/d+b],Rc=S=>zn&&!Ci.has(S),R1=({preventEvent:S=!1}={})=>{se===fg&&Dc(),ai.length>0&&(S||e.publish("deselect"),Cn.clear(),io(ai,0),ai=[],Xi.clear(),qi=!0)},Zl=S=>{if(!(Di&&Wn))return console.warn("xScale and yScale must be defined for programmatic lasso selection"),null;let P=[];for(let[ee,lt]of S){let qt=(ee-Pn)/Jn,Gr=(lt-ls)/Ls,Kt=qt*2-1,Or=Gr*2-1,[sr,Un]=ps(Kt,Or);P.push(sr,Un)}return P},Ko=(S,{merge:P=!1,remove:ee=!1,preventEvent:lt=!1}={})=>{let qt=Array.isArray(S)?S:[S],Gr=[...ai];if(P){if(ai=AE(ai,qt),Gr.length===ai.length){qi=!0;return}}else if(ee){let Or=new Set(qt);if(ai=ai.filter(sr=>!Or.has(sr)),Gr.length===ai.length){qi=!0;return}}else{if(ai?.length>0&&io(ai,0),Gr.length>0&&qt.length===0){R1({preventEvent:lt});return}ai=qt}if(U8(Gr,ai)){qi=!0;return}let Kt=[];Xi.clear(),Cn.clear();for(let Or=ai.length-1;Or>=0;Or--){let sr=ai[Or];if(sr<0||sr>=os||Rc(sr)){ai.splice(Or,1);continue}Xi.add(sr),Kt.push.apply(Kt,Ce(sr))}R({usage:"dynamic",type:"float",data:Kt}),io(ai,1),lt||e.publish("select",{points:ai}),qi=!0},Be=(S,{merge:P=!1,remove:ee=!1,isGl:lt=!1}={})=>{if(!MT(S))throw new Error("Lasso selection requires at least 3 vertices as [x, y] coordinate pairs");let qt=BT(S),Gr,Kt;if(lt)Gr=qt,Kt=qt.flat();else{if(Kt=Zl(qt),!Kt)throw new Error("xScale and yScale must be defined to convert lasso vertices from data space to GL space");Gr=[];for(let Or=0;Or{let lt=!1;if(!(zn&&!Ci.has(S))&&S>=0&&S=0&&Kt&&!Xi.has(Gr)&&io([Gr],0),$n=S,L.subdata(Ce(S)),Xi.has(S)||io([S],2),Kt&&!ee&&e.publish("pointover",$n)}else lt=+$n>=0,lt&&(Xi.has($n)||io([$n],0),ee||e.publish("pointout",$n)),$n=void 0;lt&&(qi=!0,n=P)},Fe=S=>{let P=_.getBoundingClientRect();return s[0]=S.clientX-P.left,s[1]=S.clientY-P.top,[...s]},$e=()=>{Fn.config({isFixed:!0}),mi=!0,ji=!0,Dc(),Oi>=0&&(clearTimeout(Oi),Oi=-1),e.publish("lassoStart")},Le=(S,P,{merge:ee=!1,remove:lt=!1}={})=>{Fn.config({isFixed:_s}),El=[...S];let qt=Fo(P);Ko(qt,{merge:ee,remove:lt}),e.publish("lassoEnd",{coordinates:El}),se===mg&&Dc()},ye=Zv(_,{onStart:$e,onDraw:ba,onEnd:Le,enableInitiator:re,initiatorParentElement:q,longPressIndicatorParentElement:ue,pointNorm:([S,P])=>ps(On(S),ri(P)),minDelay:Z,minDist:Er==="brush"?Math.max(Dv,oe):oe,type:Er}),Ne=()=>$r===qv,ec=(S,P)=>{switch(xn[P]){case Wm:return S.altKey;case yg:return S.metaKey;case zv:return S.ctrlKey;case Hv:return S.metaKey;case bg:return S.shiftKey;default:return!1}},tc=S=>document.elementsFromPoint(S.clientX,S.clientY).some(P=>P===_),i2=S=>{!le||S.buttons!==1||(mi=!0,ti=performance.now(),Fi=Fe(S),ji=Ne()||ec(S,gg),!ji&&K&&(ye.showLongPressIndicator(S.clientX,S.clientY,{time:k,extraTime:de,delay:ze}),Oi=setTimeout(()=>{Oi=-1,ji=!0},k)))},k1=S=>{le&&(mi=!1,Oi>=0&&(clearTimeout(Oi),Oi=-1),ji&&(S.preventDefault(),ji=!1,ye.end({merge:ec(S,zm),remove:ec(S,Hm)})),K&&ye.hideLongPressIndicator({time:er}))},It=S=>{if(!le)return;S.preventDefault();let P=Fe(S);if(rg(...P,...Fi)>=oe)return;let ee=performance.now()-ti;if(!re||ee=0?(ai.length>0&&se===fg&&Dc(),Ko([lt],{merge:ec(S,zm),remove:ec(S,Hm)})):D1||(D1=setTimeout(()=>{D1=null,ye.showInitiator(S)},gA))}},De=S=>{ye.hideInitiator(),D1&&(clearTimeout(D1),D1=null),O&&(S.preventDefault(),R1())},Pe=S=>{if(Vt||(ki=tc(S),Vt=!0),!(le&&(ki||mi)))return;let P=Fe(S),lt=rg(...P,...Fi)>=oe;ki&&!ji&&zi(Bo()),ji?(S.preventDefault(),ye.extend(S,!0)):mi&&K&<&&ye.hideLongPressIndicator({time:er}),Oi>=0&<&&(clearTimeout(Oi),Oi=-1),mi&&(qi=!0)},vt=()=>{$n=void 0,ki=!1,Vt=!1,le&&(+$n>=0&&!Xi.has($n)&&io([$n],0),k1(),qi=!0)},ve=()=>{let S=Math.max(wn.length,xi.length);$t=Math.max(2,Math.ceil(Math.sqrt(S)));let P=new Float32Array($t**2*4);for(let ee=0;ee{let lt=S.length,qt=P.length,Gr=ee.length,Kt=[];if(lt===qt&&qt===Gr)for(let Or=0;Or{let S=it(),P=S.length;ht=Math.max(2,Math.ceil(Math.sqrt(P)));let ee=new Float32Array(ht**2*4);return S.forEach((lt,qt)=>{ee[qt*4]=lt[0],ee[qt*4+1]=lt[1],ee[qt*4+2]=lt[2],ee[qt*4+3]=lt[3]}),o.regl.texture({data:ee,shape:[ht,ht,4],type:"float"})},Ee=(S,P)=>{Jl[0]=S/aa,Jl[5]=P},Ue=()=>{aa=ya/Yi,r2=Fm([],[1/aa,1,1]),Jl=Fm([],[1/aa,1,1]),wl=Fm([],[t2,1,1])},xt=S=>{+S<=0||(t2=S)},mt=(S,P)=>ee=>{if(!ee||ee.length===0)return;let qt=[...S()],Gr=Ef(ee)?ee:[ee];if(Gr=Gr.map(Kt=>l1(Kt,!0)),!IT(qt,Gr)){Te&&Te.destroy();try{P(Gr),Te=pt()}catch{console.error("Invalid colors. Switching back to default colors."),P(qt),Te=pt()}}},pe=mt(()=>cr,S=>{cr=S}),gt=mt(()=>bn,S=>{bn=S}),We=mt(()=>mn,S=>{mn=S}),qe=()=>{let S=ps(-1,-1),P=ps(1,1),ee=(S[0]+1)/2,lt=(P[0]+1)/2,qt=(S[1]+1)/2,Gr=(P[1]+1)/2,Kt=[Pn+ee*Jn,Pn+lt*Jn],Or=[ls+qt*Ls,ls+Gr*Ls];return[Kt,Or]},at=()=>{if(!(Di||Wn))return;let[S,P]=qe();Di&&Di.domain(S),Wn&&Wn.domain(P)},ct=(S,P)=>{Yi=Math.max(1,S),_.height=Math.floor(Yi*window.devicePixelRatio),Wn&&(Wn.range([Yi,0]),P||at())},ot=S=>{if(S===du){ga=S,_.style.height="100%",window.requestAnimationFrame(()=>{_&&ct(_.getBoundingClientRect().height)});return}!+S||+S<=0||(ga=+S,ct(ga),_.style.height=`${ga}px`)},ut=()=>{ja=Ii,Ii===du&&(ja=Array.isArray(wn)?wE(wn):wn)},dt=S=>{let P=Array.isArray(wn)?[...wn]:wn;_f(S,Sf,{minLength:1})?wn=[...S]:Bm(+S)&&(wn=[+S]),!(P===wn||U8(P,wn))&&(Tt&&Tt.destroy(),a=z8/wn[0],Tt=ve(),ut())},yt=S=>{!+S||+S<0||(Ei=+S)},_t=S=>{!+S||+S<0||(si=+S)},Xe=(S,P)=>{ya=Math.max(1,S),_.width=Math.floor(ya*window.devicePixelRatio),Di&&(Di.range([0,ya]),P||at())},Je=S=>{if(S===du){Fs=S,_.style.width="100%",window.requestAnimationFrame(()=>{_&&Xe(_.getBoundingClientRect().width)});return}!+S||+S<=0||(Fs=+S,Xe(Fs),_.style.width=`${ya}px`)},rt=S=>{let P=Array.isArray(xi)?[...xi]:xi;_f(S,Sf,{minLength:1})?xi=[...S]:Bm(+S)&&(xi=[+S]),!(P===xi||U8(P,xi))&&(Tt&&Tt.destroy(),Tt=ve())},Ke=S=>{switch(S){case"valueZ":return Rt;case"valueW":return Qr;default:return null}},He=(S,P)=>S===fu?ee=>Math.round(ee*(P.length-1)):hu,Ye=S=>{w=Xl(S,qp)},Qe=S=>{Ui=Xl(S,X8,{allowDensity:!0})},Ze=S=>{c1=Xl(S,H8)},et=S=>{if(S==null)Wo=null;else if(Array.isArray(S))Wo=S;else return;if(le)if(Dt(),zn){let P=[];if(T!==null)for(let ee=0;ee{Ai=Xl(S,J8,{allowSegment:!0,allowInherit:!0})},Re=S=>{ss=Xl(S,Y8,{allowSegment:!0})},st=S=>{Gs=Xl(S,W8,{allowSegment:!0})},bt=()=>h,St=()=>[_.width,_.height],we=()=>x,Et=()=>Te,wt=()=>ht,At=()=>.5/ht,me=()=>window.devicePixelRatio,he=()=>U,Z1=()=>R,M1=()=>Tt,rc=()=>$t,kc=()=>.5/$t,$o=()=>0,Al=()=>u||l,mu=()=>d,N3=()=>.5/d,Mc=()=>Jl,hn=()=>Fn.view,ms=()=>wl,gu=()=>L1(i,Jl,L1(i,Fn.view,wl)),Bc=()=>window.devicePixelRatio,B1=()=>zp(a,Fn.scaling[0])*window.devicePixelRatio,yu=()=>Fn.scaling[0]>1?Math.asinh(zp(1,Fn.scaling[0]))/Math.asinh(1)*window.devicePixelRatio:zp(a,Fn.scaling[0])*window.devicePixelRatio,va=yu;V==="linear"?va=B1:V==="constant"&&(va=Bc);let f1=()=>zn?Ci.size:os,d1=()=>ai.length,s2=()=>d1()>0?K1:1,nc=()=>d1()>0?$:1,D3=()=>+(w==="valueZ"),X=()=>+(w==="valueW"),R3=()=>+(Ui==="valueZ"),a2=()=>+(Ui==="valueW"),Af=()=>+(Ui==="density"),Tf=()=>+(c1==="valueZ"),Tl=()=>+(c1==="valueW"),Il=()=>+g,Fc=()=>w==="valueZ"?Rt===fu?cr.length-1:1:Qr===fu?cr.length-1:1,If=()=>Ui==="valueZ"?Rt===fu?xi.length-1:1:Qr===fu?xi.length-1:1,Po=()=>c1==="valueZ"?Rt===fu?wn.length-1:1:Qr===fu?wn.length-1:1,so=S=>{if(Ui!=="density")return 1;let P=va(),ee=wn[0]*P,lt=2/(2/Fn.view[0])*(2/(2/Fn.view[5])),qt=S.viewportHeight,Gr=S.viewportWidth,Kt=No*Gr*qt/(u1*ee*ee)*Mv(1,lt);Kt*=Yo?1:1/(.25*Math.PI);let Or=zp(z8,ee)+.5;return Kt*=(ee/Or)**2,Mv(1,zp(0,Kt))},el=o.regl({framebuffer:()=>p,vert:hT,frag:dT,attributes:{position:[-4,0,4,4,4,-4]},uniforms:{startStateTex:()=>f,endStateTex:()=>l,t:(S,P)=>P.t},count:3}),To=(S,P,ee,lt=cw,qt=s2,Gr=nc)=>o.regl({frag:Yo?fT:cT,vert:uT(lt),blend:{enable:!N1,func:{srcRGB:"src alpha",srcAlpha:"one",dstRGB:"one minus src alpha",dstAlpha:"one minus src alpha"}},depth:{enable:!1},attributes:{stateIndex:{buffer:ee,size:2}},uniforms:{antiAliasing:bt,resolution:St,modelViewProjection:gu,devicePixelRatio:me,pointScale:()=>va(),encodingTex:M1,encodingTexRes:rc,encodingTexEps:kc,pointOpacityMax:qt,pointOpacityScale:Gr,pointSizeExtra:S,globalState:lt,colorTex:Et,colorTexRes:wt,colorTexEps:At,stateTex:Al,stateTexRes:mu,stateTexEps:N3,isColoredByZ:D3,isColoredByW:X,isOpacityByZ:R3,isOpacityByW:a2,isOpacityByDensity:Af,isSizedByZ:Tf,isSizedByW:Tl,isPixelAligned:Il,colorMultiplicator:Fc,opacityMultiplicator:If,opacityDensity:so,sizeMultiplicator:Po,numColorStates:fw,drawingBufferWidth:Kt=>Kt.drawingBufferWidth,drawingBufferHeight:Kt=>Kt.drawingBufferHeight},count:P,primitive:"points"}),F1=To($o,f1,he),h1=To($o,()=>1,()=>L,uw,()=>1,()=>1),Of=To(()=>(Ei+si*2)*window.devicePixelRatio,d1,Z1,q8,()=>1,()=>1),ao=To(()=>(Ei+si)*window.devicePixelRatio,d1,Z1,Iv,()=>1,()=>1),bu=To(()=>Ei*window.devicePixelRatio,d1,Z1,q8,()=>1,()=>1),o2=()=>{Of(),ao(),bu()},tl=o.regl({frag:ow,vert:lw,attributes:{position:[0,1,0,0,1,0,0,1,1,1,1,0]},uniforms:{modelViewProjection:gu,texture:we},count:6}),Dr=o.regl({vert:` + }`,attributes:{xy:[-4,-4,4,-4,0,4]},uniforms:{src:()=>m,srcRes:()=>d,gamma:()=>i},count:3,depth:{enable:!1},blend:{enable:!0,func:{srcRGB:"one",srcAlpha:"one",dstRGB:"one minus src alpha",dstAlpha:"one minus src alpha"}}}),_=se=>{let re=se.getContext("2d");re.clearRect(0,0,se.width,se.height),re.drawImage(r,(r.width-se.width)/2,(r.height-se.height)/2,se.width,se.height,0,0,se.width,se.height)},x=(se,re)=>{e.clear(L9),m.use(()=>{e.clear(L9),se()}),v(),_(re)},w=()=>{e.poll()},I=new Set,O=se=>(I.add(se),()=>{I.delete(se)}),z=e.frame(()=>{let se=I.values(),re=se.next();for(;!re.done;)re.value(),re=se.next()}),J=(se,re)=>{let q=se===void 0?Math.min(window.innerWidth,window.screen.availWidth):se,ue=re===void 0?Math.min(window.innerHeight,window.screen.availHeight):re;r.width=q*window.devicePixelRatio,r.height=ue*window.devicePixelRatio,d[0]=r.width,d[1]=r.height,m.resize(...d)},Q=()=>{J()};return t.canvas||(window.addEventListener("resize",Q),window.addEventListener("orientationchange",Q),J()),{get canvas(){return r},get regl(){return e},get gamma(){return i},set gamma(se){i=+se},get isSupported(){return a},get isDestroyed(){return s},render:x,resize:J,onFrame:O,refresh:w,destroy:()=>{s=!0,window.removeEventListener("resize",Q),window.removeEventListener("orientationchange",Q),z.cancel(),r=void 0,e.destroy(),e=void 0}}},XI=function(){let e=(_,x,w,I,O)=>{let z=(I-x)*.5,J=(O-w)*.5;return(2*w-2*I+z+J)*_*_*_+(-3*w+3*I-2*z-J)*_*_+z*_+w},r=(_,x,w)=>{let I=w*_,O=Math.floor(I),z=I-O,J=x[Math.max(0,O-1)],Q=x[O],oe=x[Math.min(w,O+1)],se=x[Math.min(w,O+2)];return[e(z,J[0],Q[0],oe[0],se[0]),e(z,J[1],Q[1],oe[1],se[1])]},i=(_,x,w,I)=>(_-w)**2+(x-I)**2;let s=(_,x,w)=>{let I=x[0],O=x[1],z=w[0]-I,J=w[1]-O;if(z!==0||J!==0){let Q=((_[0]-I)*z+(_[1]-O)*J)/(z*z+J*J);Q>1?(I=w[0],O=w[1]):Q>0&&(I+=z*Q,O+=J*Q)}return z=_[0]-I,J=_[1]-O,z*z+J*J};let a=(_,x,w,I,O)=>{let z=I,J;for(let Q=x+1;Qz&&(J=Q,z=oe)}z>I&&(J-x>1&&a(_,x,J,I,O),O.push(_[J]),w-J>1&&a(_,J,w,I,O))};let d=(_,x)=>{let w=_.length-1,I=[_[0]];return a(_,0,w,x,I),I.push(_[w]),I},m=(_,{maxIntPointsPerSegment:x=100,tolerance:w=.002}={})=>{let I=_.length,O=I-1,z=O*x+1,J=w**2,Q=[],oe;for(let se=0;seJ&&(re.push(K),oe=K)}re.push(_[se+1]),re=d(re,J),Q=Q.concat(re.slice(0,re.length-1))}return Q.push(_[_.length-1].slice(0,2)),Q.flat()},v=_=>{let x={},w=!Number.isNaN(+_[0][5]);return _.forEach(I=>{let O=I[4];x[O]||(x[O]=[]),w?x[O][I[5]]=I:x[O].push(I)}),Object.entries(x).forEach(I=>{x[I[0]]=I[1].filter(O=>O),x[I[0]].reference=I[1][0]}),x};self.onmessage=function(x){x.data.points&&+x.data.points.length||self.postMessage({error:new Error("No points provided")}),x.data.points;let I=v(x.data.points);self.postMessage({points:Object.entries(I).reduce((O,z)=>(O[z[0]]=m(z[1],x.data.options),O[z[0]].reference=z[1].reference,O),{})})}},JI=(t,e={tolerance:.002,maxIntPointsPerSegment:100})=>new Promise((r,i)=>{let s=Vw(XI);s.onmessage=a=>{a.data.error?i(a.data.error):r(a.data.points),s.terminate()},s.postMessage({points:t,options:e})}),Bg={showRecticle:{replacement:"showReticle",removalVersion:"2",translation:bu},recticleColor:{replacement:"reticleColor",removalVersion:"2",translation:bu},keyMap:{replacement:"actionKeyMap",removalVersion:"2",translation:UI}},kg=t=>{let e=Object.keys(t).filter(r=>Bg[r]);for(let r of e){let{replacement:i,removalVersion:s,translation:a}=Bg[r];console.warn(`regl-scatterplot: the "${r}" property is deprecated and will be removed in v${s}. Please use "${i}" instead.`),t[Bg[r].replacement]=t[r]!==K9?a(t[r]):t[r],delete t[r]}return t},nc=(t,e,{allowSegment:r=!1,allowDensity:i=!1,allowInherit:s=!1}={})=>X9.has(t)?"valueZ":J9.has(t)?"valueW":t==="segment"?r?"segment":e:t==="density"?i?"density":e:t==="inherit"&&s?"inherit":e,Fg=t=>{switch(t){case"valueZ":return 2;case"valueW":return 3;default:return null}},KI=(t={})=>{let e=x9({async:!t.syncEvents,caseInsensitive:!0}),r=new Float32Array(16),i=new Float32Array(16),s=[0,0];kg(t);let{renderer:a,antiAliasing:d=DT,pixelAligned:m=RT,backgroundColor:v=aT,backgroundImage:_=bT,canvas:x=document.createElement("canvas"),colorBy:w=i0,deselectOnDblClick:I=xT,deselectOnEscape:O=ST,lassoColor:z=OA,lassoLineWidth:J=CA,lassoMinDelay:Q=NA,lassoMinDist:oe=DA,lassoClearEvent:se=RA,lassoInitiator:re=LA,lassoInitiatorParentElement:q=document.body,lassoLongPressIndicatorParentElement:ue=document.body,lassoOnLongPress:K=BA,lassoLongPressTime:B=u6,lassoLongPressAfterEffectTime:he=f6,lassoLongPressEffectDelay:He=d6,lassoLongPressRevertEffectTime:er=h6,lassoType:Er=BT,lassoBrushSize:zt=kA,actionKeyMap:_n=$A,mouseMode:$r=AA,showReticle:In=vT,reticleColor:On=_T,pointColor:cr=nT,pointColorActive:bn=iT,pointColorHover:mn=sT,showPointConnections:qn=ET,pointConnectionColor:Wt=oT,pointConnectionColorActive:Pr=lT,pointConnectionColorHover:gi=cT,pointConnectionColorBy:Ii=Tg,pointConnectionOpacity:yi=JA,pointConnectionOpacityBy:as=wg,pointConnectionOpacityActive:Ha=KA,pointConnectionSize:ar=YA,pointConnectionSizeActive:Ki=XA,pointConnectionSizeBy:zs=Eg,pointConnectionMaxIntPointsPerSegment:ta=wT,pointConnectionTolerance:so=AT,pointSize:wn=qA,pointSizeSelected:wi=HA,pointSizeMouseDetection:Ci=TT,pointOutlineWidth:fi=zA,opacity:Si=yu,opacityBy:qi=Ag,opacityByDensityFill:Do=ZA,opacityInactiveMax:el=tT,opacityInactiveScale:$=rT,sizeBy:m1=Sg,pointOrder:Xo=WA,pointScaleMode:V=jA,height:_a=VA,width:Us=UA,annotationLineColor:Ro=uT,annotationLineWidth:ps=fT,annotationHVLineLimit:gn=dT,cameraIsFixed:As=NT}=t,xa=Us===yu?1:Us,Qi=_a===yu?1:_a,{performanceMode:os=IT,opacityByDensityDebounceTime:ra=eT,spatialIndexUseWorker:za=LT}=t,Jo=!!(t.renderPointsAsSquares||os),F1=!!(t.disableAlphaBlending||os);$r=Rg(N9,c6)($r),a||(a=a_({regl:t.regl,gamma:t.gamma})),v=p1(v,!0),z=p1(z,!0),On=p1(On,!0);let Bo=!1,ko=!1,$c=$9(v),Pn,un,mi,bi=!1,ai=null,Vi=[0,0],Li=-1,di=[],es=new Set,Ln=new Set,Hn=!1,Ni=new Set,is=[],ls=0,g1=0,Wi=!1,Ll=[],N2,ca,ff=t.aspectRatio||PA,df,ic,Nl,Ko,Fo,hf,sc,vu,Wa,M1,Jn,tl,Ns=!1,Yi=!0,n=!1,c;cr=L2(cr)?[...cr]:[cr],bn=L2(bn)?[...bn]:[bn],mn=L2(mn)?[...mn]:[mn],cr=cr.map(S=>p1(S,!0)),bn=bn.map(S=>p1(S,!0)),mn=mn.map(S=>p1(S,!0)),Si=!Array.isArray(Si)&&Number.isNaN(+Si)?cr[0][3]:Si,Si=O2(Si,C2,{minLength:1})?[...Si]:[Si],wn=O2(wn,C2,{minLength:1})?[...wn]:[wn];let o=xg/wn[0];Wt==="inherit"?Wt=[...cr]:(Wt=L2(Wt)?[...Wt]:[Wt],Wt=Wt.map(S=>p1(S,!0))),Pr==="inherit"?Pr=[...bn]:(Pr=L2(Pr)?[...Pr]:[Pr],Pr=Pr.map(S=>p1(S,!0))),gi==="inherit"?gi=[...mn]:(gi=L2(gi)?[...gi]:[gi],gi=gi.map(S=>p1(S,!0))),yi==="inherit"?yi=[...Si]:yi=O2(yi,C2,{minLength:1})?[...yi]:[yi],ar==="inherit"?ar=[...wn]:ar=O2(ar,C2,{minLength:1})?[...ar]:[ar],w=nc(w,i0),qi=nc(qi,Ag,{allowDensity:!0}),m1=nc(m1,Sg),Ii=nc(Ii,Tg,{allowSegment:!0,allowInherit:!0}),as=nc(as,wg,{allowSegment:!0}),zs=nc(zs,Eg,{allowSegment:!0});let l,f,u,p,h=0,b=0,U,R,L,T=null,C=null,te,W,Y,F,N=!1,Ae=null,je,Ot,Oe=In,Te,ht=0,Tt,$t=0,yr=!1,le=!1,mr=!1,Vt=!1,Bt=l0,Zr=l0,Un,$i=!1,Bi=t.xScale||null,Yn=t.yScale||null,Vn=0,ni=0,cs=0,Ds=0;Bi&&(Vn=Bi.domain()[0],ni=Bi.domain()[1]-Bi.domain()[0],Bi.range([0,xa])),Yn&&(cs=Yn.domain()[0],Ds=Yn.domain()[1]-Yn.domain()[0],Yn.range([Qi,0]));let Cn=S=>-1+S/xa*2,oi=S=>1+S/Qi*-2,ms=()=>[Cn(s[0]),oi(s[1])],gs=(S,P)=>{let ee=[S,P,1,1],lt=Mg(r,k1(r,df,k1(r,Pn.view,Nl)));return a0(ee,ee,lt),ee.slice(0,2)},To=(S=0)=>{let P=Ea(),lt=(Jn[1]-tl[1])/x.height;return(Wa*P+S)*lt},Qo=()=>Hn?is.filter((S,P)=>Ni.has(P)):is,Io=(S,P,ee,lt)=>{let qt=N2.range(S,P,ee,lt);return Hn?qt.filter(Gr=>Ni.has(Gr)):qt},Mo=()=>{let[S,P]=ms(),[ee,lt]=gs(S,P),qt=To(4),Gr=Io(ee-qt,lt-qt,ee+qt,lt+qt),Kt=qt,Or=-1;for(let sr of Gr){let[Gn,Gi]=is[sr],Rs=Dg(Gn,Gi,ee,lt);Rs{Ll=S,un.setPoints(P),e.publish("lassoExtend",{coordinates:S})},$o=S=>{let P=TI(S);if(!II(P))return[];let ee=Io(...P),lt=[];for(let qt of ee)kI(S,is[qt])&<.push(qt);return lt},Pc=()=>{Ll=[],un&&un.clear()},ac=S=>S&&S.length>4,ao=(S,P)=>{if(hf||!qn||!ac(is[S[0]]))return;let ee=P===0,lt=P===1?Or=>Ln.add(Or):bu,qt=Object.keys(S.reduce((Or,sr)=>{let Gn=is[sr],Rs=Array.isArray(Gn[4])?Gn[4][0]:Gn[4];return Or[Rs]=!0,Or},{})),Gr=Ko.getData().opacities,Kt=qt.filter(Or=>!Ln.has(+Or));for(let Or of Kt){let sr=Fo[Or][0],Gn=Fo[Or][2],Gi=Fo[Or][3],Rs=sr*4+Gi*2,sl=Rs+Gn*2+4;Gr.__original__===void 0&&(Gr.__original__=Gr.slice());for(let t1=Rs;t1[S%h/h+b,Math.floor(S/h)/h+b],Uc=S=>Hn&&!Ni.has(S),$1=({preventEvent:S=!1}={})=>{se===Vg&&Pc(),di.length>0&&(S||e.publish("deselect"),Ln.clear(),ao(di,0),di=[],es.clear(),Yi=!0)},oc=S=>{if(!(Bi&&Yn))return console.warn("xScale and yScale must be defined for programmatic lasso selection"),null;let P=[];for(let[ee,lt]of S){let qt=(ee-Vn)/ni,Gr=(lt-cs)/Ds,Kt=qt*2-1,Or=Gr*2-1,[sr,Gn]=gs(Kt,Or);P.push(sr,Gn)}return P},Zo=(S,{merge:P=!1,remove:ee=!1,preventEvent:lt=!1}={})=>{let qt=Array.isArray(S)?S:[S],Gr=[...di];if(P){if(di=Mw(di,qt),Gr.length===di.length){Yi=!0;return}}else if(ee){let Or=new Set(qt);if(di=di.filter(sr=>!Or.has(sr)),Gr.length===di.length){Yi=!0;return}}else{if(di?.length>0&&ao(di,0),Gr.length>0&&qt.length===0){$1({preventEvent:lt});return}di=qt}if(gg(Gr,di)){Yi=!0;return}let Kt=[];es.clear(),Ln.clear();for(let Or=di.length-1;Or>=0;Or--){let sr=di[Or];if(sr<0||sr>=ls||Uc(sr)){di.splice(Or,1);continue}es.add(sr),Kt.push.apply(Kt,Ce(sr))}R({usage:"dynamic",type:"float",data:Kt}),ao(di,1),lt||e.publish("select",{points:di}),Yi=!0},Fe=(S,{merge:P=!1,remove:ee=!1,isGl:lt=!1}={})=>{if(!WI(S))throw new Error("Lasso selection requires at least 3 vertices as [x, y] coordinate pairs");let qt=YI(S),Gr,Kt;if(lt)Gr=qt,Kt=qt.flat();else{if(Kt=oc(qt),!Kt)throw new Error("xScale and yScale must be defined to convert lasso vertices from data space to GL space");Gr=[];for(let Or=0;Or{let lt=!1;if(!(Hn&&!Ni.has(S))&&S>=0&&S=0&&Kt&&!es.has(Gr)&&ao([Gr],0),Un=S,L.subdata(Ce(S)),es.has(S)||ao([S],2),Kt&&!ee&&e.publish("pointover",Un)}else lt=+Un>=0,lt&&(es.has(Un)||ao([Un],0),ee||e.publish("pointout",Un)),Un=void 0;lt&&(Yi=!0,n=P)},Me=S=>{let P=x.getBoundingClientRect();return s[0]=S.clientX-P.left,s[1]=S.clientY-P.top,[...s]},$e=()=>{Pn.config({isFixed:!0}),bi=!0,Wi=!0,Pc(),Li>=0&&(clearTimeout(Li),Li=-1),e.publish("lassoStart")},Le=(S,P,{merge:ee=!1,remove:lt=!1}={})=>{Pn.config({isFixed:As}),Ll=[...S];let qt=$o(P);Zo(qt,{merge:ee,remove:lt}),e.publish("lassoEnd",{coordinates:Ll}),se===Hg&&Pc()},be=t_(x,{onStart:$e,onDraw:Sa,onEnd:Le,enableInitiator:re,initiatorParentElement:q,longPressIndicatorParentElement:ue,pointNorm:([S,P])=>gs(Cn(S),oi(P)),minDelay:Q,minDist:Er==="brush"?Math.max(B9,oe):oe,type:Er}),Ne=()=>$r===z9,lc=(S,P)=>{switch(_n[P]){case y6:return S.altKey;case Wg:return S.metaKey;case W9:return S.ctrlKey;case Y9:return S.metaKey;case Yg:return S.shiftKey;default:return!1}},cc=S=>document.elementsFromPoint(S.clientX,S.clientY).some(P=>P===x),pf=S=>{!le||S.buttons!==1||(bi=!0,ai=performance.now(),Vi=Me(S),Wi=Ne()||lc(S,zg),!Wi&&K&&(be.showLongPressIndicator(S.clientX,S.clientY,{time:B,extraTime:he,delay:He}),Li=setTimeout(()=>{Li=-1,Wi=!0},B)))},P1=S=>{le&&(bi=!1,Li>=0&&(clearTimeout(Li),Li=-1),Wi&&(S.preventDefault(),Wi=!1,be.end({merge:lc(S,m6),remove:lc(S,g6)})),K&&be.hideLongPressIndicator({time:er}))},It=S=>{if(!le)return;S.preventDefault();let P=Me(S);if(Dg(...P,...Vi)>=oe)return;let ee=performance.now()-ai;if(!re||ee=0?(di.length>0&&se===Vg&&Pc(),Zo([lt],{merge:lc(S,m6),remove:lc(S,g6)})):M1||(M1=setTimeout(()=>{M1=null,be.showInitiator(S)},OT))}},De=S=>{be.hideInitiator(),M1&&(clearTimeout(M1),M1=null),I&&(S.preventDefault(),$1())},Pe=S=>{if(Vt||($i=cc(S),Vt=!0),!(le&&($i||bi)))return;let P=Me(S),lt=Dg(...P,...Vi)>=oe;$i&&!Wi&&Xi(Mo()),Wi?(S.preventDefault(),be.extend(S,!0)):bi&&K&<&&be.hideLongPressIndicator({time:er}),Li>=0&<&&(clearTimeout(Li),Li=-1),bi&&(Yi=!0)},vt=()=>{Un=void 0,$i=!1,Vt=!1,le&&(+Un>=0&&!es.has(Un)&&ao([Un],0),P1(),Yi=!0)},ve=()=>{let S=Math.max(wn.length,Si.length);$t=Math.max(2,Math.ceil(Math.sqrt(S)));let P=new Float32Array($t**2*4);for(let ee=0;ee{let lt=S.length,qt=P.length,Gr=ee.length,Kt=[];if(lt===qt&&qt===Gr)for(let Or=0;Or{let S=it(),P=S.length;ht=Math.max(2,Math.ceil(Math.sqrt(P)));let ee=new Float32Array(ht**2*4);return S.forEach((lt,qt)=>{ee[qt*4]=lt[0],ee[qt*4+1]=lt[1],ee[qt*4+2]=lt[2],ee[qt*4+3]=lt[3]}),a.regl.texture({data:ee,shape:[ht,ht,4],type:"float"})},Ee=(S,P)=>{ic[0]=S/ca,ic[5]=P},Ue=()=>{ca=xa/Qi,df=o6([],[1/ca,1,1]),ic=o6([],[1/ca,1,1]),Nl=o6([],[ff,1,1])},_t=S=>{+S<=0||(ff=S)},mt=(S,P)=>ee=>{if(!ee||ee.length===0)return;let qt=[...S()],Gr=L2(ee)?ee:[ee];if(Gr=Gr.map(Kt=>p1(Kt,!0)),!PI(qt,Gr)){Te&&Te.destroy();try{P(Gr),Te=pt()}catch{console.error("Invalid colors. Switching back to default colors."),P(qt),Te=pt()}}},me=mt(()=>cr,S=>{cr=S}),gt=mt(()=>bn,S=>{bn=S}),We=mt(()=>mn,S=>{mn=S}),qe=()=>{let S=gs(-1,-1),P=gs(1,1),ee=(S[0]+1)/2,lt=(P[0]+1)/2,qt=(S[1]+1)/2,Gr=(P[1]+1)/2,Kt=[Vn+ee*ni,Vn+lt*ni],Or=[cs+qt*Ds,cs+Gr*Ds];return[Kt,Or]},at=()=>{if(!(Bi||Yn))return;let[S,P]=qe();Bi&&Bi.domain(S),Yn&&Yn.domain(P)},ct=(S,P)=>{Qi=Math.max(1,S),x.height=Math.floor(Qi*window.devicePixelRatio),Yn&&(Yn.range([Qi,0]),P||at())},ot=S=>{if(S===yu){_a=S,x.style.height="100%",window.requestAnimationFrame(()=>{x&&ct(x.getBoundingClientRect().height)});return}!+S||+S<=0||(_a=+S,ct(_a),x.style.height=`${_a}px`)},ut=()=>{Wa=Ci,Ci===yu&&(Wa=Array.isArray(wn)?Fw(wn):wn)},dt=S=>{let P=Array.isArray(wn)?[...wn]:wn;O2(S,C2,{minLength:1})?wn=[...S]:a6(+S)&&(wn=[+S]),!(P===wn||gg(P,wn))&&(Tt&&Tt.destroy(),o=xg/wn[0],Tt=ve(),ut())},yt=S=>{!+S||+S<0||(wi=+S)},xt=S=>{!+S||+S<0||(fi=+S)},Xe=(S,P)=>{xa=Math.max(1,S),x.width=Math.floor(xa*window.devicePixelRatio),Bi&&(Bi.range([0,xa]),P||at())},Je=S=>{if(S===yu){Us=S,x.style.width="100%",window.requestAnimationFrame(()=>{x&&Xe(x.getBoundingClientRect().width)});return}!+S||+S<=0||(Us=+S,Xe(Us),x.style.width=`${xa}px`)},rt=S=>{let P=Array.isArray(Si)?[...Si]:Si;O2(S,C2,{minLength:1})?Si=[...S]:a6(+S)&&(Si=[+S]),!(P===Si||gg(P,Si))&&(Tt&&Tt.destroy(),Tt=ve())},Ke=S=>{switch(S){case"valueZ":return Bt;case"valueW":return Zr;default:return null}},ze=(S,P)=>S===gu?ee=>Math.round(ee*(P.length-1)):bu,Ye=S=>{w=nc(S,i0)},Qe=S=>{qi=nc(S,Ag,{allowDensity:!0})},Ze=S=>{m1=nc(S,Sg)},et=S=>{if(S==null)Xo=null;else if(Array.isArray(S))Xo=S;else return;if(le)if(Rt(),Hn){let P=[];if(T!==null)for(let ee=0;ee{Ii=nc(S,Tg,{allowSegment:!0,allowInherit:!0})},Re=S=>{as=nc(S,wg,{allowSegment:!0})},st=S=>{zs=nc(S,Eg,{allowSegment:!0})},bt=()=>d,St=()=>[x.width,x.height],we=()=>_,Et=()=>Te,wt=()=>ht,At=()=>.5/ht,ge=()=>window.devicePixelRatio,pe=()=>U,rl=()=>R,U1=()=>Tt,uc=()=>$t,Vc=()=>.5/$t,Po=()=>0,Dl=()=>u||l,_u=()=>h,U3=()=>.5/h,Gc=()=>ic,hn=()=>Pn.view,ys=()=>Nl,xu=()=>k1(i,ic,k1(i,Pn.view,Nl)),jc=()=>window.devicePixelRatio,V1=()=>s0(o,Pn.scaling[0])*window.devicePixelRatio,Su=()=>Pn.scaling[0]>1?Math.asinh(s0(1,Pn.scaling[0]))/Math.asinh(1)*window.devicePixelRatio:s0(o,Pn.scaling[0])*window.devicePixelRatio,Ea=Su;V==="linear"?Ea=V1:V==="constant"&&(Ea=jc);let y1=()=>Hn?Ni.size:ls,b1=()=>di.length,mf=()=>b1()>0?el:1,fc=()=>b1()>0?$:1,V3=()=>+(w==="valueZ"),X=()=>+(w==="valueW"),G3=()=>+(qi==="valueZ"),gf=()=>+(qi==="valueW"),D2=()=>+(qi==="density"),R2=()=>+(m1==="valueZ"),Rl=()=>+(m1==="valueW"),Bl=()=>+m,qc=()=>w==="valueZ"?Bt===gu?cr.length-1:1:Zr===gu?cr.length-1:1,B2=()=>qi==="valueZ"?Bt===gu?Si.length-1:1:Zr===gu?Si.length-1:1,Uo=()=>m1==="valueZ"?Bt===gu?wn.length-1:1:Zr===gu?wn.length-1:1,oo=S=>{if(qi!=="density")return 1;let P=Ea(),ee=wn[0]*P,lt=2/(2/Pn.view[0])*(2/(2/Pn.view[5])),qt=S.viewportHeight,Gr=S.viewportWidth,Kt=Do*Gr*qt/(g1*ee*ee)*M9(1,lt);Kt*=Jo?1:1/(.25*Math.PI);let Or=s0(xg,ee)+.5;return Kt*=(ee/Or)**2,M9(1,s0(0,Kt))},nl=a.regl({framebuffer:()=>p,vert:AI,frag:wI,attributes:{position:[-4,0,4,4,4,-4]},uniforms:{startStateTex:()=>f,endStateTex:()=>l,t:(S,P)=>P.t},count:3}),Oo=(S,P,ee,lt=xA,qt=mf,Gr=fc)=>a.regl({frag:Jo?EI:xI,vert:SI(lt),blend:{enable:!F1,func:{srcRGB:"src alpha",srcAlpha:"one",dstRGB:"one minus src alpha",dstAlpha:"one minus src alpha"}},depth:{enable:!1},attributes:{stateIndex:{buffer:ee,size:2}},uniforms:{antiAliasing:bt,resolution:St,modelViewProjection:xu,devicePixelRatio:ge,pointScale:()=>Ea(),encodingTex:U1,encodingTexRes:uc,encodingTexEps:Vc,pointOpacityMax:qt,pointOpacityScale:Gr,pointSizeExtra:S,globalState:lt,colorTex:Et,colorTexRes:wt,colorTexEps:At,stateTex:Dl,stateTexRes:_u,stateTexEps:U3,isColoredByZ:V3,isColoredByW:X,isOpacityByZ:G3,isOpacityByW:gf,isOpacityByDensity:D2,isSizedByZ:R2,isSizedByW:Rl,isPixelAligned:Bl,colorMultiplicator:qc,opacityMultiplicator:B2,opacityDensity:oo,sizeMultiplicator:Uo,numColorStates:EA,drawingBufferWidth:Kt=>Kt.drawingBufferWidth,drawingBufferHeight:Kt=>Kt.drawingBufferHeight},count:P,primitive:"points"}),G1=Oo(Po,y1,pe),v1=Oo(Po,()=>1,()=>L,SA,()=>1,()=>1),k2=Oo(()=>(wi+fi*2)*window.devicePixelRatio,b1,rl,_g,()=>1,()=>1),lo=Oo(()=>(wi+fi)*window.devicePixelRatio,b1,rl,C9,()=>1,()=>1),Eu=Oo(()=>wi*window.devicePixelRatio,b1,rl,_g,()=>1,()=>1),yf=()=>{k2(),lo(),Eu()},il=a.regl({frag:vA,vert:_A,attributes:{position:[0,1,0,0,1,0,0,1,1,1,1,0]},uniforms:{modelViewProjection:xu,texture:we},count:6}),Dr=a.regl({vert:` precision mediump float; uniform mat4 modelViewProjection; attribute vec2 position; @@ -725,12 +725,12 @@ void main() { uniform vec4 color; void main () { gl_FragColor = vec4(color.rgb, 0.2); - }`,depth:{enable:!1},blend:{enable:!0,func:{srcRGB:"src alpha",srcAlpha:"one",dstRGB:"one minus src alpha",dstAlpha:"one minus src alpha"}},attributes:{position:()=>El},uniforms:{modelViewProjection:gu,color:()=>H},elements:()=>UE(un.getPoints())}),Ur=()=>{if(!($n>=0))return;let[S,P]=rs[$n].slice(0,2),ee=[S,P,0,1];L1(r,Jl,L1(r,Fn.view,wl)),Hp(ee,ee,r),Kl.setPoints([-1,ee[1],1,ee[1]]),pu.setPoints([ee[0],1,ee[0],-1]),Kl.draw(),pu.draw(),To(()=>(Ei+si*2)*window.devicePixelRatio,()=>1,L,q8)(),To(()=>(Ei+si)*window.devicePixelRatio,()=>1,L,Iv)()},Bt=S=>{let P=new Float32Array(S*2),ee=0;for(let lt=0;lt{if(Wo===null){T=null,C=null;return}let S=new Set,P=[];for(let lt=0;lt=0&&qtC!==null?C:Bt(S),l2=(S,P={})=>{let ee=S.length;d=Math.max(2,Math.ceil(Math.sqrt(ee))),b=.5/d;let lt=new Float32Array(d**2*4),qt=!0,Gr=!0,Kt=0,Or=0,sr=0;for(let Un=0;Un{if(!l)return!1;if(N){let ee=f;f=u,ee.destroy()}else f=l;return u=l2(S,P),p=o.regl.framebuffer({color:u,depth:!1,stencil:!1}),l=void 0,!0},nr=()=>!!(f&&u),fr=()=>{f&&(f.destroy(),f=void 0),u&&(u.destroy(),u=void 0)},fn=(S,P={})=>new Promise(ee=>{le=!1;let lt=P?.preventFilterReset&&S.length===os,qt=os;os=S.length,u1=os,qt>0&&os!==qt&&(Wo=null,T=null,C=null),l&&l.destroy(),l=l2(S,{z:P.zDataType,w:P.wDataType}),lt||(Dt(),U({usage:"static",type:"float",data:tr(os)})),Kv(P.spatialIndex||S,{useWorker:Ga}).then(Gr=>{wf=Gr,rs=S,le=!0}).then(ee)}),sn=(S,P)=>{te=Fn.target,W=S,Y=Fn.distance[0],B=P},wr=()=>te!==void 0&&W!==void 0&&Y!==void 0&&B!==void 0,Lr=()=>{te=void 0,W=void 0,Y=void 0,B=void 0},pn=S=>{let P=Ai==="inherit"?w:Ai;if(P==="segment"){let ee=Wt.length-1;return ee<1?[]:S.reduce((lt,qt,Gr)=>{let Kt=0,Or=[];for(let Un=2;Un(qt[Gr]=lt(Kt[ee])*4,qt),[])}return new Array(Mo.length).fill(0)},vn=()=>{let S=ss==="inherit"?Ui:ss;if(S==="segment"){let P=pi.length-1;return P<1?[]:Mo.reduce((ee,[lt,qt,Gr])=>(ee[lt]=_v(Gr,Kt=>pi[Math.floor(Kt/(Gr-1)*P)]),ee),[])}if(S){let P=ag(S),ee=ss==="inherit"?xi:pi,lt=He(Ke(S),ee);return Mo.reduce((qt,[Gr,Kt])=>(qt[Gr]=ee[lt(Kt[P])],qt),[])}},_n=()=>{let S=Gs==="inherit"?c1:Gs;if(S==="segment"){let P=ar.length-1;return P<1?[]:Mo.reduce((ee,[lt,qt,Gr])=>(ee[lt]=_v(Gr,Kt=>ar[Math.floor(Kt/(Gr-1)*P)]),ee),[])}if(S){let P=ag(S),ee=Gs==="inherit"?wn:ar,lt=He(Ke(S),ee);return Mo.reduce((qt,[Gr,Kt])=>(qt[Gr]=ee[lt(Kt[P])],qt),[])}},dr=S=>{Mo=[];let P=0;Object.keys(S).forEach((ee,lt)=>{Mo[ee]=[lt,S[ee].reference,S[ee].length/2,P],P+=S[ee].length/2})},ir=S=>new Promise(P=>{Xo.setPoints([]),S?.length>0?(n2=!0,$T(S,{maxIntPointsPerSegment:Qs,tolerance:no}).then(ee=>{dr(ee);let lt=Object.values(ee);Xo.setPoints(lt.length===1?lt[0]:lt,{colorIndices:pn(lt),opacities:vn(),widths:_n()}),n2=!1,P()})):P()}),Ar=({preventEvent:S=!1}={})=>(zn=!1,Ci.clear(),U.subdata(tr(os)),new Promise(P=>{let ee=()=>{e.subscribe("draw",()=>{S||e.publish("unfilter"),P()},1),qi=!0};qn||Ql(rs[0])?ir(Jo()).then(()=>{S||e.publish("pointConnectionsDraw"),ee()}):ee()})),Xt=(S,{preventEvent:P=!1}={})=>{zn=!0,Ci.clear();let ee=Array.isArray(S)?S:[S],lt=[],qt=[],Gr=[];for(let Or of ee)!Number.isFinite(Or)||Or<0||Or>=os||(lt.push(Or),Ci.add(Or),Xi.has(Or)&&Gr.push(Or));let Kt;if(T!==null){Kt=[];for(let Or=0;Or{let sr=()=>{e.subscribe("draw",()=>{P||e.publish("filter",{points:lt}),Or()},1),qi=!0};qn||Ql(rs[0])?ir(Jo()).then(()=>{P||e.publish("pointConnectionsDraw"),Ko(Gr,{preventEvent:P}),sr()}):sr()})},Br=()=>Ao(Q1[0],Q1[1],Xn[0],Xn[1]),Jt=Uv(()=>{u1=Br().length},Zs),br=S=>{let[P,ee]=te,[lt,qt]=W,Gr=1-S,Kt=P*Gr+lt*S,Or=ee*Gr+qt*S,sr=Y*Gr+B*S;Fn.lookAt([Kt,Or],sr)},Tr=()=>nr(),Ir=()=>wr(),an=(S,P)=>{Ae||(Ae=performance.now());let ee=performance.now()-Ae,lt=CT(P(ee/S),0,1);return Tr()&&el({t:lt}),Ir()&&br(lt),ee{N=!1,Ae=null,je=void 0,Ot=void 0,Tn=Oe,fr(),Lr(),e.publish("transitionEnd")},tn=({duration:S=500,easing:P=Lv})=>{N&&e.publish("transitionEnd"),N=!0,Ae=null,je=S,Ot=hg(P)?pw[P]||Lv:P,Oe=Tn,Tn=!1,e.publish("transitionStart")},jr=(S,P={})=>ko?Promise.reject(new Error(K8)):Ro?Promise.reject(new Error(EA)):(Ro=!0,n9(S).then(ee=>new Promise(lt=>{if(ko){lt();return}let qt=!1;(!P.preventFilterReset||ee?.length!==os)&&(zn=!1,Ci.clear());let Gr=ee&&Ql(ee[0])&&(qn||P.showPointConnectionsOnce),{zDataType:Kt,wDataType:Or}=P;new Promise(sr=>{ee?(P.transition&&(ee.length===os?qt=ur(ee,{z:Kt,w:Or}):console.warn("Cannot transition! The number of points between the previous and current draw call must be identical.")),fn(ee,{zDataType:Kt,wDataType:Or,preventFilterReset:P.preventFilterReset,spatialIndex:P.spatialIndex}).then(()=>{P.hover!==void 0&&zi(P.hover,{preventEvent:!0}),P.select!==void 0&&Ko(P.select,{preventEvent:!0}),P.filter!==void 0&&Xt(P.filter,{preventEvent:!0}),Gr?ir(ee).then(()=>{e.publish("pointConnectionsDraw"),qi=!0,n=P.showReticleOnce}).then(()=>lt()):sr()})):sr()}).then(()=>{P.transition&&qt?(Gr?Promise.all([new Promise(sr=>{e.subscribe("transitionEnd",()=>{qi=!0,n=P.showReticleOnce,sr()},1)}),new Promise(sr=>{e.subscribe("pointConnectionsDraw",sr,1)})]).then(()=>lt()):e.subscribe("transitionEnd",()=>{qi=!0,n=P.showReticleOnce,lt()},1),tn({duration:P.transitionDuration,easing:P.transitionEasing})):(Gr?Promise.all([new Promise(sr=>{e.subscribe("draw",sr,1)}),new Promise(sr=>{e.subscribe("pointConnectionsDraw",sr,1)})]).then(()=>lt()):e.subscribe("draw",()=>lt(),1),qi=!0,n=P.showReticleOnce)})}).finally(()=>{Ro=!1}))),rn=S=>ko?Promise.reject(new K8):(mr=!1,S.length===0?new Promise(P=>{fi.clear(),e.subscribe("draw",P,1),mr=!0,qi=!0}):new Promise(P=>{let ee=[],lt=new Map,qt=[],Gr=[],Kt=-1,Or=sr=>{Gr.push(sr.lineWidth||ds);let Un=l1(sr.lineColor||Do,!0),$i=`[${Un.join(",")}]`;if(lt.has($i)){let{idx:Ns}=lt.get($i);qt.push(Ns)}else{let Ns=++Kt;lt.set($i,{idx:Ns,color:Un}),qt.push(Ns)}};for(let sr of S){if(LT(sr)){ee.push([sr.x1??-gn,sr.y,sr.x2??gn,sr.y]),Or(sr);continue}if(NT(sr)){ee.push([sr.x,sr.y1??-gn,sr.x,sr.y2??gn]),Or(sr);continue}if(RT(sr)){ee.push([sr.x1,sr.y1,sr.x2,sr.y1,sr.x2,sr.y2,sr.x1,sr.y2,sr.x1,sr.y1]),Or(sr);continue}if(DT(sr)){ee.push([sr.x,sr.y,sr.x+sr.width,sr.y,sr.x+sr.width,sr.y+sr.height,sr.x,sr.y+sr.height,sr.x,sr.y]),Or(sr);continue}kT(sr)&&(ee.push(sr.vertices.flatMap(hu)),Or(sr))}fi.setStyle({color:Array.from(lt.values()).sort((sr,Un)=>sr.idx>Un.idx?1:-1).map(({color:sr})=>sr)}),fi.setPoints(ee.length===1?ee.flat():ee,{colorIndices:qt,widths:Gr}),e.subscribe("draw",P,1),mr=!0,qi=!0})),Zr=S=>(...P)=>{let ee=S(...P);return qi=!0,new Promise(lt=>{e.subscribe("draw",()=>lt(ee),1)})},zr=S=>{let P=Number.POSITIVE_INFINITY,ee=Number.NEGATIVE_INFINITY,lt=Number.POSITIVE_INFINITY,qt=Number.NEGATIVE_INFINITY;for(let Gr of S){let[Kt,Or]=rs[Gr];P=Math.min(P,Kt),ee=Math.max(ee,Kt),lt=Math.min(lt,Or),qt=Math.max(qt,Or)}return{x:P,y:lt,width:ee-P,height:qt-lt}},dn=(S,P={})=>new Promise(ee=>{let lt=Hp([],[S.x+S.width/2,S.y+S.height/2,0,0],wl).slice(0,2),qt=2*Math.atan(1),Gr=aa/t2,Kt=S.height*Gr>=S.width?S.height/2/Math.tan(qt/2):S.width/2/Math.tan(qt/2)/Gr;P.transition?(Fn.config({isFixed:!0}),sn(lt,Kt),e.subscribe("transitionEnd",()=>{ee(),Fn.config({isFixed:_s})},1),tn({duration:P.transitionDuration,easing:P.transitionEasing})):(Fn.lookAt(lt,Kt),e.subscribe("draw",ee,1),qi=!0)}),nn=(S,P={})=>{if(!le)return Promise.reject(new Error(Rv));let ee=zr(S),lt=ee.x+ee.width/2,qt=ee.y+ee.height/2,Gr=wo(),Kt=1+(P.padding||0),Or=Math.max(ee.width,Gr)*Kt,sr=Math.max(ee.height,Gr)*Kt,Un=lt-Or/2,$i=qt-sr/2;return dn({x:Un,y:$i,width:Or,height:sr},P)},Mr=(S,P,ee={})=>new Promise(lt=>{ee.transition?(Fn.config({isFixed:!0}),sn(S,P),e.subscribe("transitionEnd",()=>{lt(),Fn.config({isFixed:_s})},1),tn({duration:ee.transitionDuration,easing:ee.transitionEasing})):(Fn.lookAt(S,P),e.subscribe("draw",lt,1),qi=!0)}),yn=(S={})=>Mr([0,0],1,S),Cf=S=>{if(!le)throw new Error(Rv);let P=rs[S];if(!P)return;let ee=[P[0],P[1],0,1];L1(r,r2,L1(r,Fn.view,wl)),Hp(ee,ee,r);let lt=ya*(ee[0]+1)/2,qt=Yi*(.5-ee[1]/2);return[lt,qt]},vu=()=>{Xo.setStyle({color:it(Wt,Pr,hi),opacity:pi===null?null:pi[0],width:ar[0]})},$c=()=>{let S=Math.round(Nc)>.5?0:255;ye.initiator.style.border=`1px dashed rgba(${S}, ${S}, ${S}, 0.33)`,ye.initiator.style.background=`rgba(${S}, ${S}, ${S}, 0.1)`},xu=()=>{let S=Math.round(Nc)>.5?0:255;ye.longPressIndicator.style.color=`rgb(${S}, ${S}, ${S})`,ye.longPressIndicator.dataset.color=`rgb(${S}, ${S}, ${S})`;let P=H.map(ee=>Math.round(ee*255));ye.longPressIndicator.dataset.activeColor=`rgb(${P[0]}, ${P[1]}, ${P[2]})`},k3=S=>{S&&(v=l1(S,!0),Nc=Bv(v),$c(),xu())},M3=S=>{S?hg(S)?dg(o.regl,S).then(P=>{x=P,qi=!0,e.publish("backgroundImageReady")}).catch(()=>{console.error(`Count not create texture from ${S}`),x=null}):S._reglType==="texture2d"?x=S:x=null:x=null},B3=S=>{S>0&&Fn.lookAt(Fn.target,S,Fn.rotation)},oa=S=>{S!==null&&Fn.lookAt(Fn.target,Fn.distance[0],S)},F3=S=>{S&&Fn.lookAt(S,Fn.distance[0],Fn.rotation)},ic=S=>{S&&Fn.setView(S)},Lf=S=>{_s=!!S,Fn.config({isFixed:_s})},_u=S=>{if(!S)return;H=l1(S,!0),un.setStyle({color:H});let P=H.map(ee=>Math.round(ee*255));ye.longPressIndicator.dataset.activeColor=`rgb(${P[0]}, ${P[1]}, ${P[2]})`},oo=S=>{Number.isNaN(+S)||+S<1||(J=+S,un.setStyle({width:J}))},Su=S=>{+S&&(Z=+S,ye.set({minDelay:Z}))},Es=S=>{+S&&(oe=+S,ye.set({minDist:oe}))},bs=S=>{se=ng(mw,se)(S)},Ol=S=>{re=!!S,ye.set({enableInitiator:re})},$3=S=>{q=S,ye.set({initiatorParentElement:q})},P3=S=>{ue=S,ye.set({longPressIndicatorParentElement:ue})},c2=S=>{K=!!S},Ri=S=>{k=Number(S)},Qo=S=>{de=Number(S)},Nf=S=>{ze=Number(S)},U3=S=>{er=Number(S)},sc=S=>{S==="brush"?ye.set({type:S,minDist:Math.max(Dv,oe)}):ye.set({type:S,minDist:oe}),Er=ye.get("type")},Df=S=>{Ht=Number(S)||Ht,ye.set({brushSize:Ht})},Rf=()=>{xn[qm]?Fn.config({isRotate:!0,mouseDownMoveModKey:xn[qm]}):Fn.config({isRotate:!1})},V3=S=>{xn=Object.entries(S).reduce((P,[ee,lt])=>(Aw.includes(lt)&&ww.includes(ee)&&(P[ee]=lt),P),{}),Rf()},Io=S=>{$r=ng(Cv,Pm)(S),Fn.config({defaultMouseDownMoveAction:$r===ug?"rotate":"pan"})},lo=S=>{S!==null&&(Tn=S)},co=S=>{S&&(In=l1(S,!0),Kl.setStyle({color:In}),pu.setStyle({color:In}))},qa=S=>{S&&(Di=S,Pn=S.domain()[0],Jn=S?S.domain()[1]-S.domain()[0]:0,Di.range([0,ya]),at())},la=S=>{S&&(Wn=S,ls=Wn.domain()[0],Ls=Wn?Wn.domain()[1]-Wn.domain()[0]:0,Wn.range([Yi,0]),at())},za=S=>{O=!!S},xa=S=>{I=!!S},uo=S=>{qn=!!S,qn?le&&Ql(rs[0])&&ir(Jo()).then(()=>{e.publish("pointConnectionsDraw"),qi=!0}):ir()},ca=(S,P)=>ee=>{if(ee==="inherit")S([...P()]);else{let lt=Ef(ee)?ee:[ee];S(lt.map(qt=>l1(qt,!0)))}vu()},fo=ca(S=>{Wt=S},()=>cr),ho=ca(S=>{Pr=S},()=>bn),po=ca(S=>{hi=S},()=>mn),mo=S=>{_f(S,Sf,{minLength:1})&&(pi=[...S]),Bm(+S)&&(pi=[+S]),Wt=Wt.map(P=>(P[3]=Number.isNaN(+pi[0])?P[3]:+pi[0],P)),vu()},go=S=>{!Number.isNaN(+S)&&+S&&(Va=+S)},ea=S=>{_f(S,Sf,{minLength:1})&&(ar=[...S]),Bm(+S)&&(ar=[+S]),vu()},yo=S=>{!Number.isNaN(+S)&&+S&&(Wi=Math.max(0,S))},ua=S=>{Qs=Math.max(0,S)},bo=S=>{no=Math.max(0,S)},js=S=>{Ii=S,ut()},qs=S=>{switch(S){case"linear":{V=S,va=B1;break}case"constant":{V=S,va=Bc;break}default:{V="asinh",va=yu;break}}},vo=S=>{No=+S},zs=S=>{K1=+S},Ha=S=>{$=+S},Hs=S=>{Do=l1(S)},_a=S=>{ds=+S},Sa=S=>{gn=+S},Ea=S=>{o.gamma=S},ta=S=>{h=Number(S)||.5},ra=S=>{g=!!S},fa=S=>{let[P]=Object.keys(sg({[S]:Xv}));if(P==="aspectRatio")return t2;if(P==="background"||P==="backgroundColor")return v;if(P==="backgroundImage")return x;if(P==="camera")return Fn;if(P==="cameraTarget")return Fn.target;if(P==="cameraDistance")return Fn.distance[0];if(P==="cameraRotation")return Fn.rotation;if(P==="cameraView")return Fn.view;if(P==="cameraIsFixed")return _s;if(P==="canvas")return _;if(P==="colorBy")return w;if(P==="sizeBy")return c1;if(P==="pointOrder")return Wo!==null?[...Wo]:null;if(P==="deselectOnDblClick")return O;if(P==="deselectOnEscape")return I;if(P==="height")return ga;if(P==="lassoColor")return H;if(P==="lassoLineWidth")return J;if(P==="lassoMinDelay")return Z;if(P==="lassoMinDist")return oe;if(P==="lassoClearEvent")return se;if(P==="lassoInitiator")return re;if(P==="lassoInitiatorElement")return ye.initiator;if(P==="lassoInitiatorParentElement")return q;if(P==="lassoLongPressIndicatorParentElement")return ue;if(P==="lassoOnLongPress")return K;if(P==="lassoType")return Er;if(P==="lassoBrushSize")return Ht;if(P==="mouseMode")return $r;if(P==="opacity")return xi.length===1?xi[0]:xi;if(P==="opacityBy")return Ui;if(P==="opacityByDensityFill")return No;if(P==="opacityByDensityDebounceTime")return Zs;if(P==="opacityInactiveMax")return K1;if(P==="opacityInactiveScale")return $;if(P==="points")return rs;if(P==="hoveredPoint")return $n;if(P==="selectedPoints")return[...ai];if(P==="filteredPoints")return zn?Array.from(Ci):Array.from({length:rs.length},(ee,lt)=>lt);if(P==="pointsInView")return Br();if(P==="pointColor")return cr.length===1?cr[0]:cr;if(P==="pointColorActive")return bn.length===1?bn[0]:bn;if(P==="pointColorHover")return mn.length===1?mn[0]:mn;if(P==="pointOutlineWidth")return si;if(P==="pointSize")return wn.length===1?wn[0]:wn;if(P==="pointSizeSelected")return Ei;if(P==="pointSizeMouseDetection")return Ii;if(P==="showPointConnections")return qn;if(P==="pointConnectionColor")return Wt.length===1?Wt[0]:Wt;if(P==="pointConnectionColorActive")return Pr.length===1?Pr[0]:Pr;if(P==="pointConnectionColorHover")return hi.length===1?hi[0]:hi;if(P==="pointConnectionColorBy")return Ai;if(P==="pointConnectionOpacity")return pi.length===1?pi[0]:pi;if(P==="pointConnectionOpacityBy")return ss;if(P==="pointConnectionOpacityActive")return Va;if(P==="pointConnectionSize")return ar.length===1?ar[0]:ar;if(P==="pointConnectionSizeActive")return Wi;if(P==="pointConnectionSizeBy")return Gs;if(P==="pointConnectionMaxIntPointsPerSegment")return Qs;if(P==="pointConnectionTolerance")return no;if(P==="pointScaleMode")return V;if(P==="reticleColor")return In;if(P==="regl")return o.regl;if(P==="showReticle")return Tn;if(P==="version")return aw;if(P==="width")return Fs;if(P==="xScale")return Di;if(P==="yScale")return Wn;if(P==="performanceMode")return as;if(P==="renderPointsAsSquares")return Yo;if(P==="disableAlphaBlending")return N1;if(P==="gamma")return o.gamma;if(P==="renderer")return o;if(P==="isDestroyed")return ko;if(P==="isDrawing")return Ro;if(P==="isPointsDrawn")return le;if(P==="isPointsFiltered")return zn;if(P==="isAnnotationsDrawn")return mr;if(P==="zDataType")return Rt;if(P==="wDataType")return Qr;if(P==="spatialIndex")return wf?.data;if(P==="annotationLineColor")return Do;if(P==="annotationLineWidth")return ds;if(P==="annotationHVLineLimit")return gn;if(P==="antiAliasing")return h;if(P==="pixelAligned")return g;if(P==="actionKeyMap")return{...xn}},wa=(S={})=>ko?Promise.reject(new Error(K8)):(sg(S),(S.backgroundColor!==void 0||S.background!==void 0)&&k3(S.backgroundColor||S.background),S.backgroundImage!==void 0&&M3(S.backgroundImage),S.cameraTarget!==void 0&&F3(S.cameraTarget),S.cameraDistance!==void 0&&B3(S.cameraDistance),S.cameraRotation!==void 0&&oa(S.cameraRotation),S.cameraView!==void 0&&ic(S.cameraView),S.cameraIsFixed!==void 0&&Lf(S.cameraIsFixed),S.colorBy!==void 0&&Ye(S.colorBy),S.pointColor!==void 0&&pe(S.pointColor),S.pointColorActive!==void 0&>(S.pointColorActive),S.pointColorHover!==void 0&&We(S.pointColorHover),S.pointSize!==void 0&&dt(S.pointSize),S.pointSizeSelected!==void 0&&yt(S.pointSizeSelected),S.pointSizeMouseDetection!==void 0&&js(S.pointSizeMouseDetection),S.sizeBy!==void 0&&Ze(S.sizeBy),S.pointOrder!==void 0&&et(S.pointOrder),S.opacity!==void 0&&rt(S.opacity),S.showPointConnections!==void 0&&uo(S.showPointConnections),S.pointConnectionColor!==void 0&&fo(S.pointConnectionColor),S.pointConnectionColorActive!==void 0&&ho(S.pointConnectionColorActive),S.pointConnectionColorHover!==void 0&&po(S.pointConnectionColorHover),S.pointConnectionColorBy!==void 0&&nt(S.pointConnectionColorBy),S.pointConnectionOpacityBy!==void 0&&Re(S.pointConnectionOpacityBy),S.pointConnectionOpacity!==void 0&&mo(S.pointConnectionOpacity),S.pointConnectionOpacityActive!==void 0&&go(S.pointConnectionOpacityActive),S.pointConnectionSize!==void 0&&ea(S.pointConnectionSize),S.pointConnectionSizeActive!==void 0&&yo(S.pointConnectionSizeActive),S.pointConnectionSizeBy!==void 0&&st(S.pointConnectionSizeBy),S.pointConnectionMaxIntPointsPerSegment!==void 0&&ua(S.pointConnectionMaxIntPointsPerSegment),S.pointConnectionTolerance!==void 0&&bo(S.pointConnectionTolerance),S.pointScaleMode!==void 0&&qs(S.pointScaleMode),S.opacityBy!==void 0&&Qe(S.opacityBy),S.lassoColor!==void 0&&_u(S.lassoColor),S.lassoLineWidth!==void 0&&oo(S.lassoLineWidth),S.lassoMinDelay!==void 0&&Su(S.lassoMinDelay),S.lassoMinDist!==void 0&&Es(S.lassoMinDist),S.lassoClearEvent!==void 0&&bs(S.lassoClearEvent),S.lassoInitiator!==void 0&&Ol(S.lassoInitiator),S.lassoInitiatorParentElement!==void 0&&$3(S.lassoInitiatorParentElement),S.lassoLongPressIndicatorParentElement!==void 0&&P3(S.lassoLongPressIndicatorParentElement),S.lassoOnLongPress!==void 0&&c2(S.lassoOnLongPress),S.lassoLongPressTime!==void 0&&Ri(S.lassoLongPressTime),S.lassoLongPressAfterEffectTime!==void 0&&Qo(S.lassoLongPressAfterEffectTime),S.lassoLongPressEffectDelay!==void 0&&Nf(S.lassoLongPressEffectDelay),S.lassoLongPressRevertEffectTime!==void 0&&U3(S.lassoLongPressRevertEffectTime),S.lassoType!==void 0&&sc(S.lassoType),S.lassoBrushSize!==void 0&&Df(S.lassoBrushSize),S.actionKeyMap!==void 0&&V3(S.actionKeyMap),S.mouseMode!==void 0&&Io(S.mouseMode),S.showReticle!==void 0&&lo(S.showReticle),S.reticleColor!==void 0&&co(S.reticleColor),S.pointOutlineWidth!==void 0&&_t(S.pointOutlineWidth),S.height!==void 0&&ot(S.height),S.width!==void 0&&Je(S.width),S.aspectRatio!==void 0&&xt(S.aspectRatio),S.xScale!==void 0&&qa(S.xScale),S.yScale!==void 0&&la(S.yScale),S.deselectOnDblClick!==void 0&&za(S.deselectOnDblClick),S.deselectOnEscape!==void 0&&xa(S.deselectOnEscape),S.opacityByDensityFill!==void 0&&vo(S.opacityByDensityFill),S.opacityInactiveMax!==void 0&&zs(S.opacityInactiveMax),S.opacityInactiveScale!==void 0&&Ha(S.opacityInactiveScale),S.gamma!==void 0&&Ea(S.gamma),S.annotationLineColor!==void 0&&Hs(S.annotationLineColor),S.annotationLineWidth!==void 0&&_a(S.annotationLineWidth),S.annotationHVLineLimit!==void 0&&Sa(S.annotationHVLineLimit),S.antiAliasing!==void 0&&ta(S.antiAliasing),S.pixelAligned!==void 0&&ra(S.pixelAligned),new Promise(P=>{window.requestAnimationFrame(()=>{ko||!_||(Ue(),Fn.refresh(),o.refresh(),oc(),P())})})),Wa=(S,{preventEvent:P=!1}={})=>{ic(S),qi=!0,Cs=P},Aa=()=>{Fn||(Fn=PE(_,{isFixed:_s,isPanInverted:[!1,!0],defaultMouseDownMoveAction:$r===ug?"rotate":"pan"})),t.cameraView?Fn.setView(Ev(t.cameraView)):t.cameraTarget||t.cameraDistance||t.cameraRotation?Fn.lookAt([...t.cameraTarget||tA],t.cameraDistance||rA,t.cameraRotation||nA):Fn.setView(Ev(iA)),Xn=ps(1,1),Q1=ps(-1,-1)},Ya=({preventEvent:S=!1}={})=>{Aa(),at(),!S&&e.publish("view",{view:Fn.view,camera:Fn,xScale:Di,yScale:Wn})},Ta=({key:S})=>{S==="Escape"&&I&&R1()},da=()=>{ki=!0,Vt=!0},ha=()=>{zi(),ki=!1,Vt=!0,qi=!0},Ia=()=>{qi=!0},Oa=()=>{fn([]),Xo.clear()},Xa=()=>{Xo.clear()},Ca=()=>{rn([])},La=()=>{Oa(),Ca()},Ws=()=>{let S=Fs===du,P=ga===du;if(S||P){let{width:ee,height:lt}=_.getBoundingClientRect();S&&Xe(ee,!0),P&&ct(lt,!0),Ue(),at(),qi=!0}Fn.refresh()},Ja=async S=>{_.style.userSelect="none";let P=window.devicePixelRatio,ee=wn,lt=Fs,qt=ga,Gr=o.canvas.width/P,Kt=o.canvas.height/P,Or=g,sr=h,Un=S?.scale||1,$i=Array.isArray(wn)?wn.map(Oo=>Oo*Un):wn*Un,Ns=ya*Un,rl=Yi*Un;dt($i),Je(Ns),ot(rl),ra(S?.pixelAligned||g),ta(S?.antiAliasing||h),o.resize(Fs,ga),o.refresh(),await new Promise(Oo=>{e.subscribe("draw",Oo,1),oc()});let Zo=_.getContext("2d").getImageData(0,0,_.width,_.height);return o.resize(Gr,Kt),o.refresh(),dt(ee),Je(lt),ot(qt),ra(Or),ta(sr),await new Promise(Oo=>{e.subscribe("draw",Oo,1),oc()}),_.style.userSelect=null,Zo},Na=S=>S===void 0?_.getContext("2d").getImageData(0,0,_.width,_.height):Ja(S),Da=()=>{Ue(),Aa(),at(),un=jp(o.regl,{color:H,width:J,is2d:!0}),Xo=jp(o.regl,{color:it(Wt,Pr,hi),opacity:pi===null?null:pi[0],width:ar[0],is2d:!0}),Kl=jp(o.regl,{color:In,width:1,is2d:!0}),pu=jp(o.regl,{color:In,width:1,is2d:!0}),fi=jp(o.regl,{color:Do,width:ds,is2d:!0}),ut(),_.addEventListener("wheel",Ia),U=o.regl.buffer(),R=o.regl.buffer(),L=o.regl.buffer({usage:"dynamic",type:"float",length:dw*2}),Te=pt(),Tt=ve();let S=wa({backgroundImage:x,width:Fs,height:ga,actionKeyMap:xn});$c(),xu(),window.addEventListener("keyup",Ta,!1),window.addEventListener("blur",vt,!1),window.addEventListener("mouseup",k1,!1),window.addEventListener("mousemove",Pe,!1),_.addEventListener("mousedown",i2,!1),_.addEventListener("mouseenter",da,!1),_.addEventListener("mouseleave",ha,!1),_.addEventListener("click",It,!1),_.addEventListener("dblclick",De,!1),"ResizeObserver"in window?(c=new ResizeObserver(Ws),c.observe(_)):(window.addEventListener("resize",Ws),window.addEventListener("orientationchange",Ws)),S.then(()=>{e.publish("init")})},ac=o.onFrame(()=>{if(yr=Fn.tick(),!((le||mr)&&(qi||N)))return;N&&!an(je,Ot)&&on(),yr&&(Xn=ps(1,1),Q1=ps(-1,-1),Ui==="density"&&Jt()),o.render(()=>{let P=_.width/o.canvas.width,ee=_.height/o.canvas.height;Ee(P,ee),x?._reglType&&tl(),El.length>2&&Dr(),N||Xo.draw({projection:Mc(),model:ms(),view:hn()});let lt=f1();le&<>0&&F1(),!mi&&(Tn||n)&&Ur(),$n>=0&&h1(),ai.length>0&&o2(),fi.draw({projection:Mc(),model:ms(),view:hn()}),un.draw({projection:Mc(),model:ms(),view:hn()})},_);let S={view:Fn.view,isViewChanged:yr,camera:Fn,xScale:Di,yScale:Wn};yr&&(at(),Cs?Cs=!1:e.publish("view",S)),qi=!1,n=!1,e.publish("drawing",S,{async:!1}),e.publish("draw",S)}),oc=()=>{qi=!0},Li=()=>{le=!1,mr=!1,ko=!0,ac(),window.removeEventListener("keyup",Ta,!1),window.removeEventListener("blur",vt,!1),window.removeEventListener("mouseup",k1,!1),window.removeEventListener("mousemove",Pe,!1),_.removeEventListener("mousedown",i2,!1),_.removeEventListener("mouseenter",da,!1),_.removeEventListener("mouseleave",ha,!1),_.removeEventListener("click",It,!1),_.removeEventListener("dblclick",De,!1),_.removeEventListener("wheel",Ia,!1),c?c.disconnect():(window.removeEventListener("resize",Ws),window.removeEventListener("orientationchange",Ws)),_=void 0,Fn.dispose(),Fn=void 0,un.destroy(),ye.destroy(),Xo.destroy(),Kl.destroy(),pu.destroy(),Te&&Te.destroy(),Tt&&Tt.destroy(),t.renderer||o.isDestroyed||o.destroy(),e.publish("destroy"),e.clear()};return Da(),{get isSupported(){return o.isSupported},clear:Zr(La),clearPoints:Zr(Oa),clearPointConnections:Zr(Xa),clearAnnotations:Zr(Ca),createTextureFromUrl:(S,P=vg)=>dg(o.regl,S,P),deselect:R1,destroy:Li,draw:jr,drawAnnotations:rn,filter:Xt,get:fa,getScreenPosition:Cf,hover:zi,lassoSelect:Be,redraw:oc,refresh:o.refresh,reset:Zr(Ya),select:Ko,set:wa,export:Na,subscribe:e.subscribe,unfilter:Ar,unsubscribe:e.unsubscribe,view:Wa,zoomToLocation:Mr,zoomToArea:dn,zoomToPoints:nn,zoomToOrigin:yn}},UT=(t,e)=>n9(t).then(r=>Kv(r,{useWorker:e})).then(r=>r.data)});var Zm={linear:function(){return d3.easeLinear},quad:function(){return d3.easeQuad},cubic:function(){return d3.easeCubic},sin:function(){return d3.easeSin},exp:function(){return d3.easeExp},circle:function(){return d3.easeCircle},back:function(){return d3.easeBack},bounce:function(){return d3.easeBounce},elastic:function(){return d3.easeElastic}},qT=Object.keys(Zm);function Mn(t,e){var r=t&&t.options&&t.options.transition,i=r&&r.easing;return i&&Object.prototype.hasOwnProperty.call(Zm,i)?Zm[i]():e}function Lu(t,e,r){var i=t&&t.options&&t.options.transition,s=i&&typeof i.speed=="number"?i.speed:0;if(s<=0)return function(){return 0};var o=i&&typeof i.stagger=="number"?i.stagger:e||0,h=r||function(g,v){return v};return o<=0?function(){return 0}:function(g,v){return h(g,v)*o}}function X3(t){return t.runtime.totalWidth<=600}function Lh(t,e,r){return X3(t)?r:e}function y2(t){return Lh(t,5,3)}function e6(t){return Lh(t,3,1)}function xr(t,e,r){return"tag-"+t+"-"+e+"-"+String(r).replace(/[^a-zA-Z0-9_-]/g,"")}function Nh(t){return t.config.scales.colorScheme.enabled===!0}function Vs(t,e,r){return Nh(t)?t.derived.colorDiscrete(e):r}var J3=class{static type="line";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"overlay",scaleCapabilities:{invertX:!0}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!0,sorted:!0},y_var:{required:!0,numeric:!0}};render(e,r){var i=r.data,s=r.label,o=e.newY?e.newY:r.mapping.y_var,h=e.options.transition.speed,g=d3.line().curve(d3.curveMonotoneX).x(function(w){return e.xScale(w[r.mapping.x_var])}).y(function(w){return e.yScale(w[o])}),v=e.chart.selectAll("."+xr("line",e.element.id,s)).data([i]);v.exit().transition().duration(h).style("opacity",0).remove();var x=v.enter().append("path").attr("fill","none").attr("clip-path","url(#"+e.element.id+"clip)").style("stroke",function(w){return Vs(e,w[r.mapping.group],r.color)}).style("stroke-width",e6(e)).style("opacity",0).attr("class",xr("line",e.element.id,s));v.merge(x).transition().ease(Mn(e,d3.easeQuad)).duration(h).style("opacity",1).style("stroke-width",e6(e)).style("stroke",function(w){return Vs(e,w[0][r.mapping.group],r.color)}).attr("d",g);var _=["lm","loess","polynomial","smooth"];_.indexOf(r.transform)===-1&&this.renderPoints(e,r)}renderPoints(e,r){var i=e.options.transition.speed,s=e.chart.selectAll("."+xr("point",e.element.id,r.label)).data(r.data);s.exit().transition().remove(),s.transition().ease(Mn(e,d3.easeQuad)).duration(i).attr("r",y2(e)).style("fill",function(o){return Vs(e,o[r.mapping.group],r.color)}).attr("cx",function(o){return e.xScale(o[r.mapping.x_var])}).attr("cy",function(o){return e.yScale(o[e.newY?e.newY:r.mapping.y_var])}),s.enter().append("circle").attr("r",y2(e)).style("fill",function(o){return Vs(e,o[r.mapping.group],r.color)}).style("opacity",0).attr("clip-path","url(#"+e.element.id+"clip)").attr("cx",function(o){return e.xScale(o[r.mapping.x_var])}).attr("cy",function(o){return e.yScale(o[e.newY?e.newY:r.mapping.y_var])}).attr("class",xr("point",e.element.id,r.label)).transition().ease(Mn(e,d3.easeQuad)).duration(i).style("opacity",1)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:i.label+": "+r[e.runtime.activeY||i.mapping.y_var],color:i.color,label:i.label,value:r[e.runtime.activeY||i.mapping.y_var],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+xr("line",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+xr("point",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var K3=class{static type="point";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!0},y_var:{required:!0,numeric:!0}};render(e,r){var i=e.options.transition.speed,s=r._compositeRole==="whisker_low"||r._compositeRole==="whisker_high",o=r._compositeRole==="median";if(r.mapping.low_y&&(o?m9(e,r):s?(y9(e,r),g9(e,r)):b9(e,r)),r.mapping.low_x&&p9(e,r),!(s||o)){var h=e.chart.selectAll("."+xr("point",e.element.id,r.label)).data(r.data);if(h.exit().transition().duration(i).style("opacity",0).remove(),h.transition().ease(Mn(e,d3.easeQuad)).duration(i).delay(Lu(e,0)).attr("r",y2(e)).style("fill",function(v){return Vs(e,v[r.mapping.group],r.color)}).attr("cx",function(v){return e.xScale(v[r.mapping.x_var])}).attr("cy",function(v){return e.yScale(v[e.newY?e.newY:r.mapping.y_var])}),h.enter().append("circle").attr("r",y2(e)).style("fill",function(v){return Vs(e,v[r.mapping.group],r.color)}).style("opacity",0).attr("clip-path","url(#"+e.element.id+"clip)").attr("cx",function(v){return e.xScale(v[r.mapping.x_var])}).attr("cy",function(v){return e.yScale(v[e.newY?e.newY:r.mapping.y_var])}).attr("class",xr("point",e.element.id,r.label)).transition().ease(Mn(e,d3.easeQuad)).duration(i).delay(Lu(e,0)).style("opacity",1),e.options.dragPoints==!0){e.dragPoints(r);var g=Vs(e,r.data[r.mapping.group],r.color);setTimeout(function(){e.updateRegression(g,r.label)},i)}}}getHoverSelector(e,r){return"."+xr("point",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:i.mapping.y_var+": "+r[e.runtime.activeY||i.mapping.y_var],color:i.color,label:i.label,value:r[e.runtime.activeY||i.mapping.y_var],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+xr("point",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+xr("crosshairX",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+xr("crosshairY",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+xr("whiskerCap",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+xr("medianLine",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};function p9(t,e){var r=t.options.transition.speed,i=t.chart.selectAll("."+xr("crosshairX",t.element.id,e.label)).data(e.data);i.exit().transition().duration(r).style("opacity",0).remove(),i.transition().duration(r).ease(Mn(t,d3.easeQuad)).attr("x1",function(s){return t.xScale(s[e.mapping.low_x])}).attr("x2",function(s){return t.xScale(s[e.mapping.high_x])}).attr("y1",function(s){return t.yScale(s[e.mapping.y_var])}).attr("y2",function(s){return t.yScale(s[e.mapping.y_var])}),i.enter().append("line").style("fill","none").style("stroke","black").attr("clip-path","url(#"+t.element.id+"clip)").style("opacity",.5).attr("x1",function(s){return t.xScale(s[e.mapping.x_var])}).attr("x2",function(s){return t.xScale(s[e.mapping.x_var])}).attr("y1",function(s){return t.yScale(s[e.mapping.y_var])}).attr("y2",function(s){return t.yScale(s[e.mapping.y_var])}).attr("class",xr("crosshairX",t.element.id,e.label)).transition().delay(r).duration(r).ease(Mn(t,d3.easeQuad)).attr("x1",function(s){return t.xScale(s[e.mapping.low_x])}).attr("x2",function(s){return t.xScale(s[e.mapping.high_x])})}function m9(t,e){var r=t.options.transition.speed,i=(e.options&&e.options.rangeBarWidth?e.options.rangeBarWidth:Math.max(6,Math.min(60,(t.width-(t.margin.left+t.margin.right))/Math.max(e.data.length*3,1))))/2,s=t.chart.selectAll("."+xr("medianLine",t.element.id,e.label)).data(e.data);s.exit().transition().duration(r).style("opacity",0).remove(),s.transition().duration(r).ease(Mn(t,d3.easeQuad)).attr("x1",function(o){return t.xScale(o[e.mapping.x_var])-i}).attr("x2",function(o){return t.xScale(o[e.mapping.x_var])+i}).attr("y1",function(o){return t.yScale(o[e.mapping.y_var])}).attr("y2",function(o){return t.yScale(o[e.mapping.y_var])}),s.enter().append("line").style("fill","none").style("stroke","white").style("stroke-width","2px").attr("clip-path","url(#"+t.element.id+"clip)").attr("x1",function(o){return t.xScale(o[e.mapping.x_var])}).attr("x2",function(o){return t.xScale(o[e.mapping.x_var])}).attr("y1",function(o){return t.yScale(o[e.mapping.y_var])}).attr("y2",function(o){return t.yScale(o[e.mapping.y_var])}).attr("class",xr("medianLine",t.element.id,e.label)).transition().delay(r).duration(r).ease(Mn(t,d3.easeQuad)).style("opacity",1).attr("x1",function(o){return t.xScale(o[e.mapping.x_var])-i}).attr("x2",function(o){return t.xScale(o[e.mapping.x_var])+i})}function g9(t,e){var r=t.options.transition.speed,i=8,s=e._compositeRole==="whisker_low",o=s?e.mapping.low_y:e.mapping.high_y,h=t.chart.selectAll("."+xr("whiskerCap",t.element.id,e.label)).data(e.data);h.exit().transition().duration(r).style("opacity",0).remove(),h.transition().duration(r).ease(Mn(t,d3.easeQuad)).attr("x1",function(g){return t.xScale(g[e.mapping.x_var])-i}).attr("x2",function(g){return t.xScale(g[e.mapping.x_var])+i}).attr("y1",function(g){return t.yScale(g[o])}).attr("y2",function(g){return t.yScale(g[o])}),h.enter().append("line").style("fill","none").style("stroke","black").attr("clip-path","url(#"+t.element.id+"clip)").style("opacity",.5).attr("x1",function(g){return t.xScale(g[e.mapping.x_var])}).attr("x2",function(g){return t.xScale(g[e.mapping.x_var])}).attr("y1",function(g){return t.yScale(g[o])}).attr("y2",function(g){return t.yScale(g[o])}).attr("class",xr("whiskerCap",t.element.id,e.label)).transition().delay(r*2).duration(r).ease(Mn(t,d3.easeQuad)).attr("x1",function(g){return t.xScale(g[e.mapping.x_var])-i}).attr("x2",function(g){return t.xScale(g[e.mapping.x_var])+i})}function y9(t,e){var r=t.options.transition.speed,i=e._compositeRole==="whisker_low",s=i?e.mapping.high_y:e.mapping.low_y,o=i?e.mapping.low_y:e.mapping.high_y,h=t.chart.selectAll("."+xr("crosshairY",t.element.id,e.label)).data(e.data);h.exit().transition().duration(r).style("opacity",0).remove(),h.transition().ease(Mn(t,d3.easeQuad)).duration(r).attr("x1",function(g){return t.xScale(g[e.mapping.x_var])}).attr("x2",function(g){return t.xScale(g[e.mapping.x_var])}).attr("y1",function(g){return t.yScale(g[s])}).attr("y2",function(g){return t.yScale(g[o])}),h.enter().append("line").style("fill","none").style("stroke","black").attr("clip-path","url(#"+t.element.id+"clip)").style("opacity",.5).attr("x1",function(g){return t.xScale(g[e.mapping.x_var])}).attr("x2",function(g){return t.xScale(g[e.mapping.x_var])}).attr("y1",function(g){return t.yScale(g[s])}).attr("y2",function(g){return t.yScale(g[s])}).attr("class",xr("crosshairY",t.element.id,e.label)).transition().delay(r).ease(Mn(t,d3.easeQuad)).duration(r).attr("y2",function(g){return t.yScale(g[o])})}function b9(t,e){var r=t.options.transition.speed,i=t.chart.selectAll("."+xr("crosshairY",t.element.id,e.label)).data(e.data);i.exit().transition().duration(r).style("opacity",0).remove(),i.transition().ease(Mn(t,d3.easeQuad)).duration(r).attr("x1",function(s){return t.xScale(s[e.mapping.x_var])}).attr("x2",function(s){return t.xScale(s[e.mapping.x_var])}).attr("y1",function(s){return t.yScale(s[e.mapping.low_y])}).attr("y2",function(s){return t.yScale(s[e.mapping.high_y])}),i.enter().append("line").style("fill","none").style("stroke","black").attr("clip-path","url(#"+t.element.id+"clip)").style("opacity",.5).attr("x1",function(s){return t.xScale(s[e.mapping.x_var])}).attr("x2",function(s){return t.xScale(s[e.mapping.x_var])}).attr("y1",function(s){return t.yScale(s[e.mapping.y_var])}).attr("y2",function(s){return t.yScale(s[e.mapping.y_var])}).attr("class",xr("crosshairY",t.element.id,e.label)).transition().delay(r).ease(Mn(t,d3.easeQuad)).duration(r).attr("y1",function(s){return t.yScale(s[e.mapping.low_y])}).attr("y2",function(s){return t.yScale(s[e.mapping.high_y])})}var Q3=class{static type="area";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"overlay",scaleCapabilities:{invertX:!0}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["low_y","high_y"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!0}};render(e,r){var i=r.data,s=r.label,o=e.options.transition.speed,h=r.options&&r.options.orientation==="vertical",g=r.options&&typeof r.options.areaOpacity=="number"?r.options.areaOpacity:.4,v=!!(r.options&&r.options.boundaryStroke===!0),x;h?x=d3.area().curve(d3.curveMonotoneY).y(function(O){return e.yScale(O[r.mapping.y_var])}).x0(function(O){return e.xScale(O[r.mapping.low_x])}).x1(function(O){return e.xScale(O[r.mapping.high_x])}):x=d3.area().curve(d3.curveMonotoneX).x(function(O){return e.xScale(O[r.mapping.x_var])}).y0(function(O){return e.yScale(O[r.mapping.low_y])}).y1(function(O){return e.yScale(O[r.mapping.high_y])});var _=e.chart.selectAll("."+xr("area",e.element.id,s)).data([i]);_.exit().transition().duration(o).style("opacity",0).remove();var w=_.enter().append("path").attr("clip-path","url(#"+e.element.id+"clip)").style("fill",function(O){return Vs(e,O[0][r.mapping.group],r.color)}).style("stroke",v?r.color:"none").style("stroke-width",v?"1px":"0").style("stroke-opacity",v?.85:0).style("opacity",0).attr("class",xr("area",e.element.id,s));_.merge(w).attr("clip-path","url(#"+e.element.id+"clip)").transition().ease(Mn(e,d3.easeQuad)).duration(o).attr("d",x).style("stroke",v?r.color:"none").style("stroke-width",v?"1px":"0").style("stroke-opacity",v?.85:0).style("opacity",g)}formatTooltip(e,r,i){var s=r.density!=null?r.density:r[i.mapping.high_y],o=i.options&&i.options.orientation==="vertical"?i.mapping.y_var:i.mapping.x_var,h=r[o];return{title:o+": "+h,body:i.label+": "+s,color:i.color,label:i.label,value:s,raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+xr("area",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var Z3=class{static type="bar";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"linear",yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0},y_var:{required:!0,numeric:!0}};render(e,r){if(e.options.flipAxis===!0){x9(e,r);return}v9(e,r)}getHoverSelector(e,r){return"."+xr("bar",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:i.mapping.y_var+": "+r[i.mapping.y_var],color:i.color,label:i.label,value:r[i.mapping.y_var],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+xr("bar",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};function v9(t,e){var r=t.margin,i=e.data,s=e.label,o=e.options.barSize=="small"?.5:1,h=t.options.categoricalScale.xAxis==!0?(t.width-(r.left+r.right))/t.x_banded.length:Math.min(100,(t.width-(t.margin.right+t.margin.left))/e.data.length),g=t.options.transition.speed,v=t.chart.selectAll("."+xr("bar",t.element.id,s)).data(i);v.exit().transition().ease(Mn(t,d3.easeQuadIn)).duration(g).attr("y",t.yScale(0)).remove();var x=v.enter().append("rect").attr("class",xr("bar",t.element.id,s)).attr("clip-path","url(#"+t.element.id+"clip)").style("fill",function(_){return Vs(t,_[e.mapping.x_var],e.color)}).attr("x",function(_){return wg(t,_,e,h,o,t.options.categoricalScale.xAxis)}).attr("y",t.yScale(0)).attr("width",o*h-2).attr("height",t.yScale(0));v.merge(x).transition().ease(Mn(t,d3.easeQuadOut)).duration(g).delay(Lu(t,20)).attr("x",function(_){return wg(t,_,e,h,o,t.options.categoricalScale.xAxis)}).attr("y",function(_){return t.yScale(_[e.mapping.y_var])}).attr("width",o*h-2).attr("height",function(_){return t.height-(r.top+r.bottom)-t.yScale(_[e.mapping.y_var])})}function wg(t,e,r,i,s,o){return o===!0?s==1?t.xScale(e[r.mapping.x_var]):t.xScale(e[r.mapping.x_var])+i/4:s==1?t.xScale(e[r.mapping.x_var])-i/2:t.xScale(e[r.mapping.x_var])-i/4}function x9(t,e){var r=t.margin,i=e.data,s=e.label,o=e.options.barSize=="small"?.5:1,h=t.options.categoricalScale.yAxis==!0?(t.height-(r.top+r.bottom))/e.data.length:Math.min(100,(t.height-(t.margin.top+t.margin.bottom))/e.data.length),g=t.options.transition.speed,v=t.chart.selectAll("."+xr("bar",t.element.id,s)).data(i);v.exit().transition().ease(Mn(t,d3.easeQuadIn)).duration(g).attr("width",0).remove();var x=v.enter().append("rect").attr("class",xr("bar",t.element.id,s)).attr("clip-path","url(#"+t.element.id+"clip)").style("fill",function(_){return Vs(t,_[e.mapping.x_var],e.color)}).attr("y",function(_){return o==1?t.yScale(_[e.mapping.x_var]):t.yScale(_[e.mapping.x_var])+h/4}).attr("x",function(_){return t.xScale(Math.min(0,_[e.mapping.y_var]))}).attr("height",o*h-2).attr("width",0);v.merge(x).transition().ease(Mn(t,d3.easeQuadOut)).duration(g).delay(Lu(t,20)).attr("y",function(_){return o==1?t.yScale(_[e.mapping.x_var]):t.yScale(_[e.mapping.x_var])+h/4}).attr("x",function(_){return t.xScale(Math.min(0,_[e.mapping.y_var]))}).attr("height",o*h-2).attr("width",function(_){return Math.abs(t.xScale(_[e.mapping.y_var])-t.xScale(0))})}function n1(t){return t.height}function b0(t){d3.select(t.element).selectAll(".myIO-svg, .toolTip, .myIO-fab, .myIO-panel, .myIO-sheet-backdrop").remove(),d3.select(t.element).classed("myIO-container",!0).style("position","relative"),Ag(t),t.svg=d3.select(t.element).append("svg").attr("class","myIO-svg").attr("id","myIO-svg"+t.element.id).attr("width",t.totalWidth).attr("height",t.height).attr("viewBox","0 0 "+t.totalWidth+" "+t.height).attr("role","img").attr("aria-label",_9(t)),t.svg.append("rect").attr("class","myIO-bg").attr("width",t.totalWidth).attr("height",t.height).attr("fill","var(--chart-bg, #ffffff)"),v0(t),Ig(t),t.chart=t.plot.append("g").attr("class","myIO-chart-area")}function _9(t){var e=t.plotLayers[0];if(!e)return"Data visualization chart";var r=e.type?e.type.replace(/([A-Z])/g," $1").toLowerCase():"data visualization",i=t.options.xAxisLabel||t.options.xAxisFormat||"x-axis",s=t.options.yAxisLabel||t.options.yAxisFormat||"y-axis";return r.charAt(0).toUpperCase()+r.slice(1)+" chart showing "+s+" by "+i}function Ag(t){d3.select(t.element).classed("myIO-container--narrow",X3(t))}function Tg(t){Ag(t),t.svg.attr("width",t.totalWidth).attr("height",t.height).attr("viewBox","0 0 "+t.totalWidth+" "+t.height),Ig(t),t.plotLayers[0]&&t.plotLayers[0].type!=="gauge"&&t.plotLayers[0].type!=="donut"&&t.clipPath&&t.clipPath.attr("x",0).attr("y",0).attr("width",t.width-(t.margin.left+t.margin.right)).attr("height",n1(t)-(t.margin.top+t.margin.bottom)),v0(t)}function v0(t){if(!(!t||!t.svg)){var e=t.config&&t.config.title,r=e?[e]:[];t.svg.selectAll(".myIO-chart-title").data(r).join(function(i){return i.append("text").attr("class","myIO-chart-title").attr("x",t.margin.left).attr("y",19).text(function(s){return s})},function(i){return i.attr("x",t.margin.left).attr("y",19).text(function(s){return s})},function(i){return i.remove()})}}function Ig(t){var e=t.plotLayers[0]?t.plotLayers[0].type:null;switch(e){case"gauge":t.plot=t.plot||t.svg.append("g"),t.plot.attr("transform","translate("+t.width/2+","+Lh(t,t.height*.8,t.height*.6)+")").attr("class","myIO-chart-offset");break;case"donut":t.plot=t.plot||t.svg.append("g"),t.plot.attr("transform","translate("+t.width/2+","+Lh(t,t.height,t.height*.8)/2+")").attr("class","myIO-chart-offset");break;default:t.plot=t.plot||t.svg.append("g"),t.plot.attr("transform","translate("+t.margin.left+","+t.margin.top+")").attr("class","myIO-chart-offset")}}function x0(t,e,r){e.axesChart&&S9(t,{isInitialRender:r&&r.isInitialRender})}function S9(t,e){var r=t.margin,i=n1(t),s=t.options.transition.speed,o=t.options.xAxisFormat==="yearMon"?function(O){var I=+O,H=Number.isFinite(I)&&I>0&&I<1e6?I*864e5:I,J=new Date(H);return Number.isFinite(J.getTime())?d3.utcFormat("%b %d")(J):O}:t.options.xAxisFormat?d3.format(t.options.xAxisFormat):null,h=t.options.yAxisFormat?d3.format(t.options.yAxisFormat):null,g=t.plot.selectAll(".x-axis").data([null]).join("g").attr("class","x-axis"),v=t.plot.selectAll(".y-axis").data([null]).join("g").attr("class","y-axis"),x=e&&e.isInitialRender?g:g.transition().ease(d3.easeQuad).duration(s);if(t.options.suppressAxis&&t.options.suppressAxis.xAxis===!0)g.selectAll("*").remove();else switch(t.options.categoricalScale.xAxis){case!0:x.attr("transform","translate(0,"+(i-(r.top+r.bottom))+")").call(d3.axisBottom(t.xScale)).selectAll("text").attr("dx","-.25em").attr("text-anchor",t.width<550?"end":"center").attr("transform",t.width<550?"rotate(-65)":"rotate(-0)");break;case!1:var _=d3.axisBottom(t.xScale).tickSize(-(i-(r.top+r.bottom))),w=E9(t.options.xTickLabels);w?_.tickValues(Object.keys(w).map(function(O){return+O})).tickFormat(function(O){var I=w[String(O)];return I??O}):(_.ticks(t.width<550?5:10),o&&_.tickFormat(o)),x.attr("transform","translate(0,"+(i-(r.top+r.bottom))+")").call(_).selectAll("text").attr("dy","1.25em").attr("text-anchor",t.width<550?"end":"center").attr("transform",t.width<550?"rotate(-65)":"rotate(-0)")}Cg(g,"x"),_0(t,t.yScale,v,e),w9(t)}function _0(t,e,r,i){var s=t.options.yAxisFormat?d3.format(t.options.yAxisFormat):null,o=n1(t),h=t.options.transition.speed,g=t.newScaleY?d3.format(t.newScaleY):s,v=r||t.plot.selectAll(".y-axis"),x=i&&i.isInitialRender?v:v.transition().ease(d3.easeQuad).duration(h);if(t.options.suppressAxis&&t.options.suppressAxis.yAxis===!0){v.selectAll("*").remove();return}var _=d3.axisLeft(e).tickSize(-(t.width-(t.margin.right+t.margin.left)));typeof e.ticks=="function"&&(_.ticks(o<450?5:10),g&&_.tickFormat(g)),x.call(_).selectAll("text").attr("dx","-.25em"),Cg(t.plot.selectAll(".y-axis"),"y")}function E9(t){if(!t)return null;if(Array.isArray(t))return t.length>0?t.reduce(function(r,i){return i&&i.position!=null&&(r[Og(i.position)]=i.label),r},{}):null;var e={};return Object.keys(t).forEach(function(r){e[Og(r)]=t[r]}),Object.keys(e).length>0?e:null}function Og(t){var e=+t;return Number.isFinite(e)?String(e):String(t)}function w9(t){if(!(!t||!t.plot)){var e=t.width-(t.margin.left+t.margin.right),r=n1(t)-(t.margin.top+t.margin.bottom),i=t.options.xAxisLabel&&!(t.options.suppressAxis&&t.options.suppressAxis.xAxis===!0)?[t.options.xAxisLabel]:[],s=t.options.yAxisLabel&&!(t.options.suppressAxis&&t.options.suppressAxis.yAxis===!0)?[t.options.yAxisLabel]:[];t.plot.selectAll(".myIO-axis-title-x").data(i).join(function(o){return o.append("text").attr("class","myIO-axis-title myIO-axis-title-x").attr("text-anchor","middle").attr("x",e/2).attr("y",r+t.margin.bottom-16).text(function(h){return h})},function(o){return o.attr("x",e/2).attr("y",r+t.margin.bottom-16).text(function(h){return h})},function(o){return o.remove()}),t.plot.selectAll(".myIO-axis-title-y").data(s).join(function(o){return o.append("text").attr("class","myIO-axis-title myIO-axis-title-y").attr("text-anchor","middle").attr("transform","translate("+(-t.margin.left+6)+","+r/2+") rotate(-90)").text(function(h){return h})},function(o){return o.attr("transform","translate("+(-t.margin.left+6)+","+r/2+") rotate(-90)").text(function(h){return h})},function(o){return o.remove()})}}function Cg(t,e){t.selectAll(".domain").attr("class",e+"-axis-line"),t.selectAll(".tick line").attr("class",e+"-grid"),t.selectAll("text").attr("class",e+"-label")}function S0(t,e,r,i){var s=t.options.transition.speed;_0(t,t.yScale);var o=d3.select(t.element).selectAll(".tag-grouped-bar-g").selectAll("rect").data(function(g){return g});o.exit().transition().ease(Mn(t,d3.easeQuadIn)).duration(s).attr("y",t.yScale(0)).attr("height",0).style("opacity",0).remove();var h=o.enter().append("rect").attr("clip-path","url(#"+t.element.id+"clip)").attr("x",function(g){return t.xScale(+g.data[0])+i*g.idx}).attr("y",t.yScale(0)).attr("height",0).attr("width",i);h.merge(o).transition().ease(Mn(t,d3.easeQuad)).duration(s).delay(Lu(t,20,function(g){return g.idx})).attr("x",function(g){return t.xScale(+g.data[0])+i*g.idx}).attr("width",i).attr("y",function(g){return t.yScale(g[1]-g[0])}).attr("height",function(g){return t.yScale(0)-t.yScale(g[1]-g[0])})}function E0(t,e,r,i){var s=t.options.transition.speed,o=d3.scaleLinear().range(t.yScale.range()),h=A9(e);o.domain([0,h*1.1]),_0(t,o);var g=d3.select(t.element).selectAll(".tag-grouped-bar-g").selectAll("rect").data(function(x){return x});g.exit().transition().ease(Mn(t,d3.easeQuadIn)).duration(s).attr("y",o(0)).attr("height",0).style("opacity",0).remove();var v=g.enter().append("rect").attr("clip-path","url(#"+t.element.id+"clip)").attr("x",function(x){return t.xScale(+x.data[0])}).attr("y",o(0)).attr("height",0).attr("width",i*e.length);v.merge(g).transition().ease(Mn(t,d3.easeQuad)).duration(s).delay(Lu(t,20,function(x){return x.idx})).attr("x",function(x){return t.xScale(+x.data[0])}).attr("width",i*e.length).attr("y",function(x){return o(x[1])}).attr("height",function(x){return o(x[0])-o(x[1])})}function w0(t,e){var r=[],i=[],s=[],o=[];t.forEach(function(w){r.push(w.data),i.push(w.label),s.push(w.mapping.x_var),o.push(w.mapping.y_var)});var h=[].concat.apply([],r),g=d3.group(h,function(w){return w[s[0]]}),v=[...Array(i.length).keys()],x=e.newY?e.newY:o[0],_=d3.stack().keys(v).value(function(w,O){return w[1][O]==null?0:w[1][O][x]})(g);return _.forEach(function(w,O){w.forEach(function(I){I.idx=O})}),_}function A9(t){return d3.max(t[t.length-1],function(e){return e[1]})}var ed=class{static type="groupedBar";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"linear",yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0},y_var:{required:!0,numeric:!0},group:{required:!0}};render(e,r,i){var s=i||[r],o=w0(s,e),h=s.map(function(x){return x.color}),g=(e.width-(e.margin.right+e.margin.left))/o[0].length/h.length;typeof e.layout>"u"&&(e.layout="grouped");let v=e.chart.selectAll("g").data(o);v.exit().remove(),v.enter().append("g").style("fill",function(x,_){return Vs(e,x[r.mapping.group],h[_])}).attr("class","tag-grouped-bar-g"),v.merge(v).style("fill",function(x,_){return Vs(e,x[r.mapping.group],h[_])}).call(function(){e.layout==="grouped"?S0(e,o,h,g):E0(e,o,h,g)})}getHoverSelector(){return".tag-grouped-bar-g rect"}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r.data[0],body:i.mapping.y_var+": "+(r[1]-r[0]),color:i.color,label:i.label,value:r[1]-r[0],raw:r}}remove(e){e.dom.chartArea.selectAll(".tag-grouped-bar-g").transition().duration(500).style("opacity",0).remove()}};var td=class{static type="histogram";static traits={hasAxes:!0,referenceLines:!1,legendType:"layer",binning:!0,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["value"],domainMerge:"union"};static dataContract={value:{required:!0,numeric:!0}};render(e,r){var i=r.bins,s=r.label,o=e.options.transition.speed,h=e.chart.selectAll("."+xr("bar",e.element.id,s)).data(i);h.exit().transition().duration(o).attr("y",e.yScale(0)).remove();var g=h.enter().append("rect").attr("class",xr("bar",e.element.id,s)).attr("clip-path","url(#"+e.element.id+"clip)").style("fill",function(){return Vs(e,r.label,r.color)}).attr("x",function(v){return e.xScale(v.x0)+1}).attr("y",e.yScale(0)).attr("width",function(v){return Math.max(0,e.xScale(v.x1)-e.xScale(v.x0)-1)}).attr("height",e.yScale(0));h.merge(g).transition().ease(Mn(e,d3.easeQuad)).duration(o).attr("x",function(v){return e.xScale(v.x0)+1}).attr("width",function(v){return Math.max(0,e.xScale(v.x1)-e.xScale(v.x0)-1)}).attr("y",function(v){return e.yScale(v.length)}).attr("height",function(v){return e.yScale(0)-e.yScale(v.length)})}getHoverSelector(e,r){return"."+xr("bar",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:"Bin: "+r.x0+" to "+r.x1,body:"Count: "+r.length,color:i.color,label:"count",value:r.length,raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+xr("bar",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var rd=class{static type="hexbin";static traits={hasAxes:!0,referenceLines:!1,legendType:"continuous",binning:!1,rolloverStyle:"hex",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!0},y_var:{required:!0,numeric:!0},radius:{required:!0,numeric:!0,positive:!0}};render(e,r){var i=e.options.transition.speed,s=r.data.map(function(O){return{0:e.xScale(+O[r.mapping.x_var]),1:e.yScale(+O[r.mapping.y_var])}}).sort(function(O){return d3.ascending(O.index)}),o=d3.extent(r.data,function(O){return+O[r.mapping.x_var]}),h=d3.extent(r.data,function(O){return+O[r.mapping.y_var]}),g=typeof r.mapping.radius=="number"?r.mapping.radius:+r.mapping.radius,v=d3.hexbin().radius(g*(Math.min(e.width,e.height)/1e3)).extent([[o[0],h[0]],[o[1],h[1]]]),x=v(s);e.colorContinuous=d3.scaleSequential(d3.interpolateBuPu).domain([0,d3.max(x,function(O){return O.length})]);var _=e.chart.attr("clip-path","url(#"+e.element.id+"clip)").selectAll("."+xr("hexbin",e.element.id,r.label)).data(x);_.exit().transition().duration(i).style("opacity",0).remove();var w=_.enter().append("path").attr("class",xr("hexbin",e.element.id,r.label)).attr("d",v.hexagon()).attr("transform",function(O){return"translate("+O.x+","+O.y+")"}).attr("fill","white");_.merge(w).transition().ease(Mn(e,d3.easeQuad)).duration(i).attr("d",v.hexagon()).attr("transform",function(O){return"translate("+O.x+","+O.y+")"}).attr("fill",function(O){return e.colorContinuous(O.length)})}getHoverSelector(e,r){return"."+xr("hexbin",e.dom.element.id,r.label)}formatTooltip(e,r){return{title:"x: "+e.derived.xScale.invert(r.x)+", y: "+e.derived.yScale.invert(r.y),body:"Count: "+r.length,color:e.derived.colorContinuous(r.length),label:"count",value:r.length,raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+xr("hexbin",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};function A0(t,e){var r=JSON.stringify(e);function i(v){for(var x=typeof v!="object"?JSON.parse(v):v,_=Object.keys(x[0]).toString(),w=_+`\r -`,O=0;O-1&&i.indexOf(o)===-1,kind:s.type}})}}function I9(t){var e=t.colorContinuous||t.derived&&t.derived.colorContinuous;return{type:"continuous",items:[],colorScale:e||null,domain:e&&typeof e.domain=="function"?e.domain():null}}var Nu=16,sd=12,Dg=6,O9=18,C9=6,Dh=12,Rg=14,t6=180;function v2(t){var e=t.svg&&t.svg.node?t.svg.node():null;if(e&&e.querySelector&&e.querySelector(".myIO-inline-legend"))return{extraHeight:0,cleanup:function(){}};var r=id(t,t.runtime&&t.runtime._legendState);if(!r||!r.type)return{extraHeight:0,cleanup:function(){}};var i=r.items?r.items.filter(function(O){return O.visible!==!1}):[];if(r.type!=="continuous"&&i.length===0)return{extraHeight:0,cleanup:function(){}};var s=t.svg.node(),o=parseFloat(s.getAttribute("width"))||t.totalWidth||t.width,h=parseFloat(s.getAttribute("height"))||t.height,g=s.getAttribute("viewBox"),v=R9(t),x=document.createElementNS("http://www.w3.org/2000/svg","g");x.setAttribute("class","myIO-export-legend");var _;r.type==="continuous"?_=N9(x,r,o,v):_=L9(x,i,o,v),x.setAttribute("transform","translate(0,"+h+")");var w=h+_;return s.appendChild(x),s.setAttribute("height",w),s.setAttribute("viewBox","0 0 "+o+" "+w),{extraHeight:_,cleanup:function(){s.removeChild(x),s.setAttribute("height",h),s.setAttribute("viewBox",g)}}}function L9(t,e,r,i){var s=r-Nu*2,o=Nu,h=Nu,g=Math.max(sd,Dh);return e.forEach(function(v){var x=D9(v.label,Dh),_=sd+Dg+x;o+_>Nu+s&&o>Nu&&(o=Nu,h+=g+C9);var w=document.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",o),w.setAttribute("y",h),w.setAttribute("width",sd),w.setAttribute("height",sd),w.setAttribute("rx",2),w.setAttribute("fill",v.color||"#6b7280"),t.appendChild(w);var O=document.createElementNS("http://www.w3.org/2000/svg","text");O.setAttribute("x",o+sd+Dg),O.setAttribute("y",h+sd-1),O.setAttribute("font-family","Roboto, Arial, sans-serif"),O.setAttribute("font-size",Dh),O.setAttribute("fill",i),O.textContent=v.label,t.appendChild(O),o+=_+O9}),h+g+Nu}function N9(t,e,r,i){var s=e.colorScale;if(!s)return 0;var o=e.domain||s.domain(),h=Nu,g=(r-t6)/2,v=document.createElementNS("http://www.w3.org/2000/svg","defs"),x=document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),_="export-legend-grad-"+Date.now();x.setAttribute("id",_);for(var w=8,O=o[0],I=o[o.length-1],H=0;H"u"||!/MSIE [1-9]\./.test(navigator.userAgent)){var e=t.document,r=function(){return t.URL||t.webkitURL||t},i=e.createElementNS("http://www.w3.org/1999/xhtml","a"),s="download"in i,o=function(re){var q=new MouseEvent("click");re.dispatchEvent(q)},h=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),g=t.webkitRequestFileSystem,v=t.requestFileSystem||g||t.mozRequestFileSystem,x=function(re){(t.setImmediate||t.setTimeout)(function(){throw re},0)},_="application/octet-stream",w=0,O=4e4,I=function(re){var q=function(){typeof re=="string"?r().revokeObjectURL(re):re.remove()};setTimeout(q,O)},H=function(re,q,ue){q=[].concat(q);for(var K=q.length;K--;){var k=re["on"+q[K]];if(typeof k=="function")try{k.call(re,ue||re)}catch(de){x(de)}}},J=function(re){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(re.type)?new Blob(["\uFEFF",re],{type:re.type}):re},Z=function(re,q,ue){ue||(re=J(re));var K,k,de,ze=this,er=re.type,Er=!1,Ht=function(){H(ze,"writestart progress write writeend".split(" "))},xn=function(){if(k&&h&&typeof FileReader<"u"){var In=new FileReader;return In.onloadend=function(){var bn=In.result;k.location.href="data:attachment/file"+bn.slice(bn.search(/[,;]/)),ze.readyState=ze.DONE,Ht()},In.readAsDataURL(re),void(ze.readyState=ze.INIT)}if((Er||!K)&&(K=r().createObjectURL(re)),k)k.location.href=K;else{var cr=t.open(K,"_blank");cr===void 0&&h&&(t.location.href=K)}ze.readyState=ze.DONE,Ht(),I(K)},$r=function(In){return function(){return ze.readyState!==ze.DONE?In.apply(this,arguments):void 0}},Tn={create:!0,exclusive:!1};return ze.readyState=ze.INIT,q||(q="download"),s?(K=r().createObjectURL(re),void setTimeout(function(){i.href=K,i.download=q,o(i),Ht(),I(K),ze.readyState=ze.DONE})):(t.chrome&&er&&er!==_&&(de=re.slice||re.webkitSlice,re=de.call(re,0,re.size,_),Er=!0),g&&q!=="download"&&(q+=".download"),(er===_||g)&&(k=t),v?(w+=re.size,void v(t.TEMPORARY,w,$r(function(In){In.root.getDirectory("saved",Tn,$r(function(cr){var bn=function(){cr.getFile(q,Tn,$r(function(mn){mn.createWriter($r(function(qn){qn.onwriteend=function(Wt){k.location.href=mn.toURL(),ze.readyState=ze.DONE,H(ze,"writeend",Wt),I(mn)},qn.onerror=function(){var Wt=qn.error;Wt.code!==Wt.ABORT_ERR&&xn()},"writestart progress write abort".split(" ").forEach(function(Wt){qn["on"+Wt]=ze["on"+Wt]}),qn.write(re),ze.abort=function(){qn.abort(),ze.readyState=ze.DONE},ze.readyState=ze.WRITING}),xn)}),xn)};cr.getFile(q,{create:!1},$r(function(mn){mn.remove(),bn()}),$r(function(mn){mn.code===mn.NOT_FOUND_ERR?bn():xn()}))}),xn)}),xn)):void xn())},oe=Z.prototype,se=function(re,q,ue){return new Z(re,q,ue)};return typeof navigator<"u"&&navigator.msSaveOrOpenBlob?function(re,q,ue){return ue||(re=J(re)),navigator.msSaveOrOpenBlob(re,q||"download")}:(oe.abort=function(){var re=this;re.readyState=re.DONE,H(re,"abort")},oe.readyState=oe.INIT=0,oe.WRITING=1,oe.DONE=2,oe.error=oe.onwritestart=oe.onprogress=oe.onwrite=oe.onabort=oe.onerror=oe.onwriteend=null,se)}})(typeof self<"u"&&self||typeof window<"u"&&window||(void 0).content);var ad=null;function kg(){return window.jspdf&&window.jspdf.jsPDF?Promise.resolve(window.jspdf.jsPDF):ad||(ad=new Promise(function(t,e){for(var r=document.querySelectorAll("script[src]"),i=null,s=0;sh?"landscape":"portrait",I=O==="landscape"?842:595,H=O==="landscape"?595:842,J=36,Z=I-2*J,oe=H-2*J,se=Math.min(Z/o,oe/h),re=o*se,q=h*se,ue=new e({orientation:O,unit:"pt",format:[I,H]}),K=t.config.export&&t.config.export.title||t.config.axes&&t.config.axes.xAxisLabel||"myIO Chart";ue.setProperties({title:K,creator:"myIO"});var k=(I-re)/2,de=(H-q)/2;ue.addImage(w,"PNG",k,de,re,q),ue.save(t.element.id+".pdf"),v(!0)},_.readAsDataURL(x)})})})}async function Bg(t){var e=v2(t),r=b2(t.svg.node());e.cleanup();try{if(navigator.clipboard&&navigator.clipboard.write&&typeof ClipboardItem<"u"){var i=new Blob([r],{type:"image/svg+xml"}),s=new Blob([r],{type:"text/html"});await navigator.clipboard.write([new ClipboardItem({"text/html":s,"image/svg+xml":i})])}else await navigator.clipboard.writeText(r);return!0}catch(o){return console.warn("[myIO] Clipboard copy failed",o),!1}}async function Fg(t){var e=v2(t),r=t.height+e.extraHeight,i=b2(t.svg.node());e.cleanup();var s=(t.totalWidth||t.width)*2,o=r*2;return new Promise(function(h){nd(i,s,o,"png",function(g){navigator.clipboard&&navigator.clipboard.write&&typeof ClipboardItem<"u"?navigator.clipboard.write([new ClipboardItem({"image/png":g})]).then(function(){h(!0)}).catch(function(){h(!1)}):h(!1)})})}var Du={chart:"Download data",image:"Save image",svg:"Save as SVG",pdf:"Export as PDF",clipboard:"Copy to clipboard","clipboard-png":"Copy as PNG","clipboard-svg":"Copy as SVG",percent:"Toggle percent",group2stack:"Toggle layout"};function r6(t,e,r){if(r==="image"){var i=v2(t),s=t.height+i.extraHeight,o=b2(t.svg.node());i.cleanup(),nd(o,2*t.width,2*s,"png",function(O){I0(O,t.element.id+".png")});return}if(r==="svg"){var h=v2(t),g=b2(t.svg.node());h.cleanup();var v=new Blob([g],{type:"image/svg+xml;charset=utf-8"});I0(v,t.element.id+".svg");return}if(r==="chart"){var x=[],_=t.runtime._brushed;_&&_.data.length>0&&t.config.interactions.brush&&t.config.interactions.brush.onSelect==="export"?x.push(_.data):t.plotLayers.forEach(function(O){x.push(O.data)}),A0(t.element.id+"_data.csv",[].concat.apply([],x));return}if(r==="pdf"){Mg(t);return}if(r==="clipboard"||r==="clipboard-png"){Fg(t);return}if(r==="clipboard-svg"){Bg(t);return}if(r==="percent"){var w=t.runtime.activeY===t.options.toggleY[0]?[t.plotLayers[0].mapping.y_var,t.options.yAxisFormat]:t.options.toggleY;t.toggleVarY(w);return}r==="group2stack"&&t.toggleGroupedLayout(e)}function Gf(t){return'"}function $g(){return Gf('')}function Pg(){return Gf('')}function Ug(){return Gf('')}function n6(){return Gf('')}function Vg(){return Gf('PDF')}function i6(){return Gf('')}function s6(){return Gf('')}var k9=10,M9=2;function a6(t){return Math.min(190,46+String(t).length*7)}function O0(t){var e={};return(t||[]).filter(function(r){var i=r.key||r.label;return e[i]?!1:(e[i]=!0,!0)})}function C0(t){return String(t.label||t.key||"")}function L0(t){if(!t)return 0;var e=t.runtime&&t.runtime.totalWidth||t.totalWidth||t.width||0,r=t.margin||{};return e-(r.left||0)-(r.right||0)}function o6(t,e){if(!Array.isArray(t)||t.length===0||!(e>0))return null;for(var r=[],i=0,s=0,o=0;oe||s>0&&s+h>e&&(i+=1,s=0,i>=M9))return null;r.push({row:i,x:s}),s+=h}return{rowCount:i+1,positions:r}}function N0(t){var e=t||{},r=Array.isArray(e.labels)?e.labels:[];return e.suppressLegend===!0?{inline:!1,panel:!1,reason:"suppressed"}:e.type?e.type==="continuous"?{inline:!1,panel:!0,reason:"continuous"}:r.length<2?{inline:!1,panel:!0,reason:"too-few-items"}:r.length>k9?{inline:!1,panel:!0,reason:"too-many-items"}:o6(r,e.availableWidth)===null?{inline:!1,panel:!0,reason:"too-narrow"}:{inline:!0,panel:!1,reason:"inline-active"}:{inline:!1,panel:!1,reason:"no-legend"}}function Rh(t,e){t.runtime||(t.runtime={});var r=Array.isArray(t.runtime._hiddenLayerKeys)?t.runtime._hiddenLayerKeys.slice():[],i=r.indexOf(e.key);i===-1?r.push(e.key):r.splice(i,1),t.runtime._hiddenLayerKeys=r,t.derived=t.derived||{},t.derived.currentLayers=(t.plotLayers||[]).filter(function(s){return r.indexOf(s._composite||s.label)===-1}),t.syncLegacyAliases(),t.renderCurrentLayers()}function kh(t,e,r){t.runtime||(t.runtime={}),Array.isArray(t.runtime._hiddenOrdinalSegments)||(t.runtime._hiddenOrdinalSegments=[]);var i=t.runtime._hiddenOrdinalSegments,s=i.indexOf(e.key);s===-1?i.push(e.key):i.splice(s,1),jg(t),typeof r=="function"&&r(t)}function Gg(t,e,r){t.runtime=t.runtime||{},e==="ordinal"?(t.runtime._hiddenOrdinalSegments=[],jg(t),typeof r=="function"&&r(t)):(t.runtime._hiddenLayerKeys=[],t.derived=t.derived||{},t.derived.currentLayers=(t.plotLayers||[]).slice(),t.syncLegacyAliases(),t.renderCurrentLayers())}function jg(t){t.runtime._suppressOrdinalLegendRebuild=!0;try{t.routeLayers(t.currentLayers||t.derived&&t.derived.currentLayers||[])}finally{t.runtime._suppressOrdinalLegendRebuild=!1}}var qg="myIO-panel--open",zg="myIO-sheet-backdrop--open",B9="myIO-panel--bottom",F9="myIO-panel--side";function l6(t){if(!t||!t.element||(d3.select(t.element).select(".myIO-fab").remove(),H9(t)))return null;t.dom=t.dom||{};var e=d3.select(t.element).append("button").attr("type","button").attr("class","myIO-fab").attr("aria-label","Legend and actions").attr("aria-expanded","false").html(n6());return e.on("click",function(){D0(t)}),e.on("keydown",function(r){(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),D0(t))}),t.dom.fab=e,R0(t),e}function D0(t){if(!t||!t.element)return null;if(t.dom=t.dom||{},t.runtime=t.runtime||{},t.runtime._sheetCloseTimer&&(clearTimeout(t.runtime._sheetCloseTimer),t.runtime._sheetCloseTimer=null),t.runtime._sheetOpen)return t.dom.panel||null;Jg(t);var e=d3.select(t.element).append("div").attr("class","myIO-sheet-backdrop").attr("aria-hidden","true").on("click",function(){Ru(t)}),r=d3.select(t.element).append("div").attr("class","myIO-panel "+(X3(t)?B9:F9)).attr("role","dialog").attr("aria-modal","true").attr("aria-label",W9(t)).attr("tabindex","-1"),i=r.append("div").attr("class","myIO-sheet-header");if(i.append("div").attr("class","myIO-sheet-handle"),i.append("button").attr("type","button").attr("class","myIO-sheet-close").attr("aria-label","Close").html(Qg()).on("click",function(){Ru(t)}).on("keydown",function(o){(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),Ru(t))}),t.dom.backdrop=e,t.dom.panel=r,t.dom.sheetLegendSection=null,t.dom.sheetLegendBody=null,t.dom.sheetActionsBody=null,Wg(t).panel){var s=r.append("div").attr("class","myIO-sheet-legend-section").attr("data-sheet-section","legend");t.dom.sheetLegendSection=s,t.dom.sheetLegendBody=s.append("div").attr("class","myIO-sheet-legend"),s.append("hr").attr("class","myIO-sheet-divider")}return t.dom.sheetActionsBody=r.append("div").attr("class","myIO-sheet-actions").attr("data-sheet-section","actions"),x2(t),$9(t),t.runtime._sheetOpen=!0,z9(t),R0(t),window.requestAnimationFrame(function(){e.classed(zg,!0),r.classed(qg,!0),Y9(r.node())}),q9(t),r}function Ru(t,e){if(!(!t||!t.dom)){var r=e||{};t.runtime||(t.runtime={}),t.runtime._sheetCloseTimer&&(clearTimeout(t.runtime._sheetCloseTimer),t.runtime._sheetCloseTimer=null),t.dom.backdrop&&t.dom.backdrop.classed(zg,!1),t.dom.panel&&t.dom.panel.classed(qg,!1),Xg(t),t.runtime._sheetOpen=!1,R0(t);var i=function(){Jg(t),t.runtime._sheetCloseTimer=null,R0(t),r.returnFocus!==!1&&t.dom.fab&&typeof t.dom.fab.node=="function"&&t.dom.fab.node()&&t.dom.fab.node().focus()};if(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){i();return}var s=t.dom.panel&&t.dom.panel.node?t.dom.panel.node():null,o=t.dom.backdrop&&t.dom.backdrop.node?t.dom.backdrop.node():null;if(!s||!o){i();return}var h=!1,g=function(){h||(h=!0,i())};s.addEventListener("transitionend",g,{once:!0}),o.addEventListener("transitionend",g,{once:!0}),t.runtime._sheetCloseTimer=window.setTimeout(g,350)}}function x2(t){if(!(!t||!t.dom||!t.dom.panel)){var e=t.dom.sheetLegendBody,r=t.dom.sheetLegendSection;if(e){var i=t.dom.panel.node(),s=i?i.scrollTop:0,o=Yg(t);if(e.selectAll("*").remove(),r&&r.selectAll(".myIO-sheet-legend-reset").remove(),!Wg(t).panel){r&&r.style("display","none"),i&&(i.scrollTop=s);return}r&&r.style("display",null),o.type==="continuous"?V9(t,e,o):o.type==="ordinal"?U9(t,e,o):P9(t,e,o),i&&(i.scrollTop=s)}}}function $9(t){if(!(!t.dom||!t.dom.sheetActionsBody)){var e=G9(t),r=t.dom.sheetActionsBody;r.selectAll("*").remove(),e.forEach(function(i){var s=r.append("button").attr("type","button").attr("class","myIO-sheet-action").attr("data-action",i.name).on("click",function(){r6(t,t.currentLayers||t.derived&&t.derived.currentLayers||t.plotLayers||[],i.name)}).on("keydown",function(o){(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),r6(t,t.currentLayers||t.derived&&t.derived.currentLayers||t.plotLayers||[],i.name))});s.append("span").attr("class","myIO-sheet-action-icon").attr("aria-hidden","true").html(i.icon),s.append("span").attr("class","myIO-sheet-action-label").text(i.label)})}}function P9(t,e,r){var i=r.items.length>4;e.classed("myIO-sheet-legend--grid",i),r.items.forEach(function(s){var o=e.append("button").attr("type","button").attr("class","myIO-sheet-legend-item").attr("role","switch").attr("aria-checked",s.visible?"true":"false").attr("data-key",s.key).on("click",function(){Rh(t,s)}).on("keydown",function(h){(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),Rh(t,s))});o.append("span").attr("class","myIO-sheet-swatch").style("background-color",s.color),o.append("span").attr("class","myIO-sheet-legend-label").text(s.label)}),Hg(t,r)}function U9(t,e,r){var i=r.items.length>4;e.classed("myIO-sheet-legend--grid",i),r.items.forEach(function(s){var o=e.append("button").attr("type","button").attr("class","myIO-sheet-legend-item").attr("role","switch").attr("aria-checked",s.visible?"true":"false").attr("data-key",s.key).on("click",function(){kh(t,s,x2)}).on("keydown",function(h){(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),kh(t,s,x2))});o.append("span").attr("class","myIO-sheet-swatch").style("background-color",s.color),o.append("span").attr("class","myIO-sheet-legend-label").text(s.label)}),Hg(t,r)}function V9(t,e,r){var i=r.colorScale||t.colorContinuous;if(i){var s=r.domain||i.domain(),o=X9(i,s),h=J9(i,s);e.append("div").attr("class","myIO-sheet-gradient").style("background","linear-gradient(90deg, "+o+")");var g=e.append("div").attr("class","myIO-sheet-gradient-ticks");h.forEach(function(v){g.append("span").text(v)})}}function G9(t){var e=t.currentLayers||t.derived&&t.derived.currentLayers||t.plotLayers||[],r=e[0]?e[0].type:null,i=t.config&&t.config.export,s=[];return(!i||i.csv!==!1)&&s.push({name:"chart",label:Du.chart,icon:s6()}),(!i||i.png!==!1)&&s.push({name:"image",label:Du.image,icon:$g()}),(!i||i.svg!==!1)&&s.push({name:"svg",label:Du.svg,icon:s6()}),(!i||i.pdf!==!1)&&s.push({name:"pdf",label:Du.pdf,icon:Vg()}),(!i||i.clipboard!==!1)&&(s.push({name:"clipboard-png",label:Du["clipboard-png"],icon:i6()}),s.push({name:"clipboard-svg",label:Du["clipboard-svg"],icon:i6()})),t.options&&t.options.toggleY&&s.push({name:"percent",label:Du.percent,icon:Pg()}),t.options&&t.options.toggleY&&r==="groupedBar"&&s.push({name:"group2stack",label:Du.group2stack,icon:Ug()}),s}function Hg(t,e){var r=e.items.some(function(i){return!i.visible});r&&t.dom.sheetLegendSection&&(t.dom.sheetLegendSection.selectAll(".myIO-sheet-legend-reset").remove(),t.dom.sheetLegendSection.append("button").attr("type","button").attr("class","myIO-sheet-legend-reset").text("Show All").on("click",function(){j9(t,e.type)}))}function j9(t,e){Gg(t,e,x2)}function Wg(t){var e=Yg(t),r=e&&Array.isArray(e.items)?O0(e.items):[];return N0({type:e&&e.type,labels:r.map(C0),suppressLegend:!!(t.options&&t.options.suppressLegend===!0),availableWidth:L0(t)})}function q9(t){var e=t.dom.panel;if(!(!e||!X3(t))){var r=e.node(),i=0,s=0,o=!1;r.addEventListener("touchstart",function(h){var g=r.getBoundingClientRect(),v=h.touches[0];v.clientY-g.top>40||(i=v.clientY,s=v.clientY,o=!0,r.style.transition="none")},{passive:!0}),r.addEventListener("touchmove",function(h){if(o){s=h.touches[0].clientY;var g=Math.max(0,s-i);r.style.transform="translateY("+g+"px)"}},{passive:!0}),r.addEventListener("touchend",function(){if(o){o=!1,r.style.transition="";var h=s-i;h>80?Ru(t):r.style.transform=""}})}}function Yg(t){return t.runtime&&t.runtime._legendData?t.runtime._legendData:id(t,t.runtime&&t.runtime._legendState)}function R0(t){if(!(!t||!t.dom||!t.dom.fab)){var e=t.runtime&&t.runtime._sheetOpen===!0;t.dom.fab.attr("aria-expanded",e?"true":"false").attr("aria-label",e?"Close legend and actions":"Legend and actions").html(e?Qg():n6())}}function z9(t){Xg(t);var e=function(r){if(!(!t.runtime||!t.runtime._sheetOpen||!t.dom||!t.dom.panel)){if(r.key==="Escape"){r.preventDefault(),Ru(t);return}if(r.key==="Tab"){var i=Kg(t.dom.panel.node());if(i.length===0){r.preventDefault(),t.dom.panel.node().focus();return}var s=i[0],o=i[i.length-1],h=document.activeElement;r.shiftKey&&h===s?(r.preventDefault(),o.focus()):!r.shiftKey&&h===o&&(r.preventDefault(),s.focus())}}};t.runtime._sheetEscHandler=e,document.addEventListener("keydown",e)}function Xg(t){!t||!t.runtime||!t.runtime._sheetEscHandler||(document.removeEventListener("keydown",t.runtime._sheetEscHandler),t.runtime._sheetEscHandler=null)}function Jg(t){t.dom&&t.dom.panel&&typeof t.dom.panel.remove=="function"&&t.dom.panel.remove(),t.dom&&t.dom.backdrop&&typeof t.dom.backdrop.remove=="function"&&t.dom.backdrop.remove(),t.dom&&(t.dom.panel=null,t.dom.backdrop=null,t.dom.sheetLegendSection=null,t.dom.sheetLegendBody=null,t.dom.sheetActionsBody=null)}function H9(t){var e=t&&(t.currentLayers||t.derived&&t.derived.currentLayers||t.plotLayers||[]);return!e||e.length===0}function W9(t){if(t&&t.svg&&typeof t.svg.attr=="function"){var e=t.svg.attr("aria-label");if(e)return e+" controls"}return"Chart controls"}function Y9(t){if(t){var e=Kg(t);if(e.length>0){e[0].focus();return}t.focus()}}function Kg(t){return t?Array.from(t.querySelectorAll(["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(","))):[]}function X9(t,e){var r=e[0],i=e[e.length-1],s=8;return Array.from({length:s},function(o,h){var g=s===1?0:h/(s-1),v=r+(i-r)*g;return t(v)+" "+Math.round(g*100)+"%"}).join(", ")}function J9(t,e){return typeof t.ticks=="function"?t.ticks(5).map(function(r){return String(r)}):[String(e[0]),String(e[e.length-1])]}function K9(t){return'"}function Qg(){return K9('')}function ey(t,e){!t||!t.runtime||t.options&&t.options.suppressLegend===!0||(t.runtime._legendState=e||null,t.runtime._legendData=id(t,e),c6(t,t.runtime._legendData),t.runtime._sheetOpen&&x2(t))}function od(t,e){!t||!t.runtime||t.runtime._suppressOrdinalLegendRebuild||(t.runtime._legendState={ordinalLegend:!0},t.runtime._legendData=T0(t,e),c6(t,t.runtime._legendData),t.runtime._sheetOpen&&x2(t))}function c6(t,e){if(!(!t||!t.svg)){t.svg.selectAll(".myIO-inline-legend").remove();var r=e&&Array.isArray(e.items)?O0(e.items):[],i=r.map(C0),s=L0(t),o=N0({type:e&&e.type,labels:i,suppressLegend:!!(t.options&&t.options.suppressLegend===!0),availableWidth:s});if(o.inline){var h=o6(i,s),g=Math.max(34,t.height-8-(h.rowCount-1)*16),v=t.svg.append("g").attr("class","myIO-inline-legend").attr("transform","translate("+t.margin.left+","+g+")");r.forEach(function(x,_){var w=i[_],O=h.positions[_],I=x.visible===!1,H=a6(w),J=v.append("g").attr("class","myIO-inline-legend-item").attr("transform","translate("+O.x+","+O.row*16+")").attr("role","switch").attr("aria-checked",I?"false":"true").attr("tabindex",0).attr("data-key",x.key).on("click",function(){Zg(t,e,x)}).on("keydown",function(Z){(Z.key==="Enter"||Z.key===" ")&&(Z.preventDefault(),Zg(t,e,x))});J.append("title").text(w),J.append("rect").attr("class","myIO-inline-legend-hit").attr("x",-3).attr("y",-14).attr("width",H).attr("height",20).attr("fill","transparent"),J.append("rect").attr("width",10).attr("height",10).attr("rx",2).attr("y",-9).attr("fill",Array.isArray(x.color)?x.color[0]:x.color||"#6b7280").style("opacity",I?.35:1),J.append("text").attr("class","myIO-inline-legend-label").attr("x",15).attr("y",0).style("opacity",I?.45:1).text(w.length>24?w.substring(0,21)+"...":w)})}}}function Zg(t,e,r){e.type==="ordinal"?kh(t,r,Q9):Rh(t,r)}function Q9(t){var e=(t.currentLayers||t.derived&&t.derived.currentLayers||t.plotLayers||[])[0];t.runtime._legendData=T0(t,e),c6(t,t.runtime._legendData),t.runtime._sheetOpen&&x2(t)}var ld=class{static type="treemap";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"none",scaleCapabilities:{invertX:!1}};static scaleHints=null;static dataContract={level_1:{required:!0},level_2:{required:!0},y_var:{required:!1,numeric:!0}};render(e,r){var i=e.margin,s=d3.format(",d"),o=r.label;if(Nh(e))e.colorDiscrete=d3.scaleOrdinal().range(e.options.colorScheme[0]).domain(e.options.colorScheme[1]),e.colorContinuous=d3.scaleLinear().range(e.options.colorScheme[0]).domain(e.options.colorScheme[1]);else{var h=r.data.children.map(function(I){return I.name});e.colorDiscrete=d3.scaleOrdinal().range(r.color).domain(h)}var g=d3.hierarchy(r.data).eachBefore(function(I){I.data.id=(I.parent?I.parent.data.id+".":"")+I.data.name}).sum(function(I){return I[r.mapping.y_var]}).sort(function(I,H){return H.height-I.height||H.value-I.value});d3.treemap().tile(d3.treemapResquarify).size([e.width-(i.left+i.right),n1(e)-(i.top+i.bottom)]).round(!0).paddingInner(1)(g);var v=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0,x=e.chart.selectAll(".root").data(g.leaves(),function(I){return I.data.id});x.exit().transition().duration(v).style("opacity",0).remove();var _=x.enter().append("g").attr("class","root").attr("transform",function(I){return"translate("+I.x0+","+I.y0+")"}).style("opacity",0);_.append("rect").attr("class",xr("tree",e.element.id,o)).attr("id",function(I){return I.data.id}).attr("width",function(I){return I.x1-I.x0}).attr("height",function(I){return I.y1-I.y0}).attr("fill",function(I){for(;I.depth>1;)I=I.parent;return e.colorDiscrete(I.data.id)}),_.append("text").attr("class","inner-text").attr("fill","black"),_.append("title");var w=_.merge(x);w.transition().duration(v).ease(Mn(e,d3.easeQuad)).style("opacity",1).attr("transform",function(I){return"translate("+I.x0+","+I.y0+")"}),w.select("rect").transition().duration(v).ease(Mn(e,d3.easeQuad)).attr("width",function(I){return I.x1-I.x0}).attr("height",function(I){return I.y1-I.y0}).attr("fill",function(I){for(;I.depth>1;)I=I.parent;return e.colorDiscrete(I.data.id)});var O=w.select("text.inner-text").selectAll("tspan").data(function(I){return Z9(I,r,s)});O.exit().remove(),O.enter().append("tspan").attr("fill","black").merge(O).attr("x",3).attr("y",function(I,H,J){return(H===J.length-1)*3+16+(H-.5)*9}).attr("fill-opacity",function(){return ex(this.parentNode.parentNode)?1:0}).text(function(I){return I}),w.select("title").text(function(I){return I.data[r.mapping.level_1]+` -`+I.data[r.mapping.level_2]+` -`+I.data[r.mapping.x_var]+` -`+s(I.value)}),od(e,r)}remove(e){e.dom.chartArea.selectAll(".root").transition().duration(500).style("opacity",0).remove()}};function Z9(t,e,r){var i=String(t.data[e.mapping.x_var]||t.data[e.mapping.level_2]||t.data.name||""),s=Math.max(0,t.x1-t.x0),o=s<70&&i.length>10?i.substring(0,9)+"...":i;return o.split(/\s+/).concat(r(t.value))}function ex(t){return!t||typeof t.getBBox!="function"?!0:t.getBBox().width>40}var cd=class{static type="donut";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"none",scaleCapabilities:{invertX:!1}};static scaleHints=null;static dataContract={x_var:{required:!0},y_var:{required:!0,numeric:!0}};render(e,r){var i=e.margin,s=e.options.transition.speed,o=Math.min(e.width-(i.right+i.left),e.height-(i.top+i.bottom))/2,h=r.mapping.x_var,g=r.mapping.y_var;Nh(e)?(e.colorDiscrete=d3.scaleOrdinal().range(e.options.colorScheme[0]).domain(e.options.colorScheme[1]),e.colorContinuous=d3.scaleLinear().range(e.options.colorScheme[0]).domain(e.options.colorScheme[1])):e.colorDiscrete=d3.scaleOrdinal().range(r.color).domain(r.data.map(function(q){return q[h]}));var v=e.runtime._hiddenOrdinalSegments||[],x=r.data.filter(function(q){return v.indexOf(q[h])===-1}),_=d3.pie().sort(null).value(function(q){return q[g]}),w=d3.arc().innerRadius(o*.8).outerRadius(o*.4),O=d3.arc().innerRadius(o*.9).outerRadius(o*.9),I=e.chart.selectAll(".donut").data(_(x),function(q){return q.data[h]});I.exit().transition().duration(s).ease(Mn(e,d3.easeQuad)).attrTween("d",function(q){var ue={startAngle:q.endAngle,endAngle:q.endAngle},K=d3.interpolate(q,ue);return function(k){return w(K(k))}}).remove();var H=I.enter().append("path").attr("class","donut").attr("fill",function(q){return e.colorDiscrete(q.data[h])}).attr("d",w).each(function(q){this._current=q});I.merge(H).transition().duration(s).ease(Mn(e,d3.easeQuad)).attr("fill",function(q){return e.colorDiscrete(q.data[h])}).attrTween("d",function(q){this._current=this._current||q;var ue=d3.interpolate(this._current,q);return this._current=ue(1),function(K){return w(ue(K))}});function J(q){return q.startAngle+(q.endAngle-q.startAngle)/2}var Z=e.chart.selectAll(".inner-text").data(_(x),function(q){return q.data[h]});Z.exit().transition().duration(s).style("opacity",0).remove();var oe=Z.enter().append("text").attr("class","inner-text").style("font-size","12px").style("opacity",0).attr("dy",".35em").text(function(q){return q.data[h]});Z.merge(oe).transition().duration(s).ease(Mn(e,d3.easeQuad)).text(function(q){return q.data[h]}).style("opacity",function(q){return Math.abs(q.endAngle-q.startAngle)>.3?1:0}).attrTween("transform",function(q){this._current=this._current||q;var ue=d3.interpolate(this._current,q);return this._current=ue(1),function(K){var k=ue(K),de=O.centroid(k);return de[0]=o*(J(k).3?1:0}).attrTween("points",function(q){this._current=this._current||q;var ue=d3.interpolate(this._current,q);return this._current=ue(1),function(K){var k=ue(K),de=O.centroid(k);return de[0]=o*.95*(J(k)0?r.data[0]:{},v=r.mapping.value,x=typeof v=="string"?+g[v]:+v;Number.isFinite(x)||(x=0),x=Math.max(0,Math.min(1,x));var _=[x,1-x],w=d3.arc().innerRadius(o-h).outerRadius(o).cornerRadius(10),O=d3.arc().innerRadius(o-h).outerRadius(o),I=d3.pie().sort(null).value(function(k){return k}).startAngle(s*-.5).endAngle(s*.5),H=d3.format(".1%"),J=r.options&&Array.isArray(r.options.thresholds)?r.options.thresholds:[{min:0,max:.6,color:"#3CA951"},{min:.6,max:.85,color:"#FFB000"},{min:.85,max:1,color:"#EF603B"}];function Z(k){return O({startAngle:s*-.5+s*Math.max(0,Math.min(1,+k.min||0)),endAngle:s*-.5+s*Math.max(0,Math.min(1,+k.max||0))})}var oe=e.chart.selectAll(".myIO-gauge-threshold").data(J);oe.exit().transition().duration(i).style("opacity",0).remove();var se=oe.enter().append("path").attr("class","myIO-gauge-threshold").attr("fill",function(k){return k.color}).attr("opacity",0).attr("d",Z);se.merge(oe).transition().duration(i).ease(Mn(e,d3.easeQuad)).attr("fill",function(k){return k.color}).attr("opacity",.24).attr("d",Z);var re=e.chart.selectAll(".myIO-gauge-background").data(I([1]));re.exit().transition().duration(i).style("opacity",0).remove();var q=re.enter().append("path").attr("class","myIO-gauge-background").attr("fill","rgba(107, 114, 128, 0.22)").attr("d",w).each(function(k){this._current=k});q.merge(re).transition().duration(i).ease(Mn(e,d3.easeBack)).attr("fill","rgba(107, 114, 128, 0.22)").attrTween("d",function(k){this._current=this._current||k;var de=d3.interpolate(this._current,k);return this._current=de(1),function(ze){return w(de(ze))}});var ue=e.chart.selectAll(".myIO-gauge-value").data(I(_));ue.exit().transition().duration(i).style("opacity",0).remove();var K=ue.enter().append("path").attr("class","myIO-gauge-value").attr("fill",function(k,de){return[r.color||ty(x,J),"transparent"][de]}).attr("d",w).each(function(k){this._current=k});K.merge(ue).transition().duration(i).ease(Mn(e,d3.easeBack)).attr("fill",function(k,de){return[r.color||ty(x,J),"transparent"][de]}).attrTween("d",function(k){this._current=this._current||k;var de=d3.interpolate(this._current,k);return this._current=de(1),function(ze){return w(de(ze))}}),e.chart.selectAll(".gauge-text").data([_[0]]).join("text").attr("class","gauge-text").text(function(k){return H(k)}).attr("text-anchor","middle").attr("font-size",20).attr("dy","-0.45em"),e.chart.selectAll(".gauge-label").data([r.options&&r.options.metric?r.options.metric:r.label]).join("text").attr("class","gauge-label").text(function(k){return k}).attr("text-anchor","middle").attr("font-size",12).attr("dy","1.1em"),e.chart.selectAll(".gauge-min-label").data(["0%"]).join("text").attr("class","gauge-min-label").text(function(k){return k}).attr("text-anchor","middle").attr("font-size",11).attr("x",-o+h/2).attr("y",12),e.chart.selectAll(".gauge-max-label").data(["100%"]).join("text").attr("class","gauge-max-label").text(function(k){return k}).attr("text-anchor","middle").attr("font-size",11).attr("x",o-h/2).attr("y",12)}remove(e){e.dom.chartArea.selectAll(".myIO-gauge-threshold, .myIO-gauge-background, .myIO-gauge-value, .gauge-text, .gauge-label, .gauge-min-label, .gauge-max-label").transition().duration(500).style("opacity",0).remove()}};function ty(t,e){var r=e.find(function(i){return t>=+i.min&&t<=+i.max});return r&&r.color?r.color:"#4269D0"}var fd=class{static type="heatmap";static traits={hasAxes:!0,referenceLines:!1,legendType:"continuous",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"band",yExtentFields:["value"],domainMerge:"union"};static dataContract={x_var:{required:!0},y_var:{required:!0},value:{required:!0,numeric:!0}};render(e,r){var i=e.options.transition.speed,s=r.mapping.x_var,o=r.mapping.y_var,h=r.mapping.value,g=r.data.map(function(I){return+I[h]}),v=d3.extent(g.filter(function(I){return Number.isFinite(I)}));(!v||v[0]===void 0||v[1]===void 0)&&(v=[0,1]),e.derived.colorContinuous=d3.scaleSequential(d3.interpolateBlues).domain(v),e.colorContinuous=e.derived.colorContinuous;var x=e.chart.selectAll("."+xr("heatmap",e.element.id,r.label)).data(r.data);x.exit().transition().duration(i).style("opacity",0).remove();var _=e.xScale.bandwidth?e.xScale.bandwidth():0,w=e.yScale.bandwidth?e.yScale.bandwidth():0,O=x.enter().append("rect").attr("class",xr("heatmap",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").attr("x",function(I){return e.xScale(I[s])}).attr("y",function(I){return e.yScale(I[o])}).attr("width",_).attr("height",w).attr("fill",function(I){return e.colorContinuous(+I[h])}).style("opacity",0);x.merge(O).transition().ease(Mn(e,d3.easeQuad)).duration(i).attr("x",function(I){return e.xScale(I[s])}).attr("y",function(I){return e.yScale(I[o])}).attr("width",_).attr("height",w).attr("fill",function(I){return e.colorContinuous(+I[h])}).style("opacity",1)}getHoverSelector(e,r){return"."+xr("heatmap",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var]+", "+i.mapping.y_var+": "+r[i.mapping.y_var],body:i.mapping.value+": "+r[i.mapping.value],color:e.colorContinuous?e.colorContinuous(+r[i.mapping.value]):i.color,label:i.label,value:r[i.mapping.value],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+xr("heatmap",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var dd=class{static type="calendarHeatmap";static traits={hasAxes:!1,referenceLines:!1,legendType:"continuous",binning:!1,rolloverStyle:"element"};static dataContract={date:{required:!0},value:{required:!0,numeric:!0}};static scaleHints=null;getHoverSelector(){return".myIO-calendar-cell"}formatTooltip(e,r,i){var s=d3.utcFormat("%b %-d, %Y"),o=r.date instanceof Date?r.date:new Date((r[i.mapping.date]||"")+"T00:00:00Z"),h=r.value!=null?r.value:+r[i.mapping.value];return{title:s(o),body:i.label+": "+h,color:r.color||i.color,label:i.label,value:h,raw:r}}render(e,r){var i=r.options||{},s=i.weekStart==="monday"?1:0,o=i.showWeekdayLabels!==!1,h=r.mapping.date,g=r.mapping.value,v=(r.data||[]).map(function(ar){return{date:new Date(ar[h]+"T00:00:00Z"),value:+ar[g],raw:ar}}).filter(function(ar){return!isNaN(ar.date.getTime())}).sort(function(ar,Wi){return ar.date-Wi.date});if(v.length!==0){var x=v[0].date.getUTCFullYear(),_=new Date(Date.UTC(x,0,1)),w=new Date(Date.UTC(x,11,31)),O=function(ar){var Wi=ar.getUTCDay();return(Wi-s+7)%7},I=O(_),H=function(ar){var Wi=Math.floor((ar-_)/864e5);return Math.floor((Wi+I)/7)},J=H(w)+1,Z=e.margin||{top:0,right:0,bottom:0,left:0},oe=(e.width||0)-(Z.left||0)-(Z.right||0),se=(e.height||0)-(Z.top||0)-(Z.bottom||0),re=o?24:0,q=18,ue=Math.max(1,oe-re),K=Math.max(1,se-q),k=Math.max(4,Math.min(Math.floor(ue/J),Math.floor(K/7))),de=e.element&&typeof getComputedStyle=="function"?getComputedStyle(e.element):null,ze=de?de.getPropertyValue("--chart-calendar-cell-gap"):"",er=parseFloat(ze);isFinite(er)||(er=2);var Er=e.config&&e.config.axis&&e.config.axis.vlim,Ht=d3.max(v,function(ar){return ar.value});Ht>0||(Ht=1);var xn=Er&&Er.max!==void 0&&Er.max!==null?[Er.min||0,Er.max]:[0,Ht],$r=d3.interpolateRgb("#ffffff",r.color||"#4E79A7"),Tn=d3.scaleSequential($r).domain(xn);e.colorContinuous=Tn,e.derived&&(e.derived.colorContinuous=Tn);var In=function(ar){var Wi=ar instanceof Date?ar:new Date(ar);return re+H(Wi)*(k+er)};In.domain=function(){return[_,w]},In.range=function(){return[re,re+(J-1)*(k+er)]},In.invert=function(ar){var Wi=Math.round((ar-re)/(k+er)),Gs=Wi*7-I;return new Date(_.getTime()+Gs*864e5)},e.xScale=In;var cr=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0,bn=e.chart.selectAll(".myIO-calendar-root").data([null]).join("g").attr("class","myIO-calendar-root");if(o){var mn=s===0?["","Mon","","Wed","","Fri",""]:["","Tue","","Thu","","Sat",""],qn=mn.map(function(ar,Wi){return{t:ar,i:Wi}}).filter(function(ar){return ar.t}),Wt=bn.selectAll("text.myIO-calendar-dow").data(qn,function(ar){return ar.i});Wt.exit().remove(),Wt.enter().append("text").attr("class","myIO-calendar-dow").attr("x",0).merge(Wt).attr("y",function(ar){return q+ar.i*(k+er)+k*.75}).text(function(ar){return ar.t})}else bn.selectAll("text.myIO-calendar-dow").remove();var Pr=d3.utcFormat("%b"),hi=d3.range(12).map(function(ar){var Wi=new Date(Date.UTC(x,ar,1));return{m:ar,text:Pr(Wi),col:H(Wi)}}),Ai=bn.selectAll("text.myIO-calendar-month").data(hi,function(ar){return ar.m});Ai.exit().remove(),Ai.enter().append("text").attr("class","myIO-calendar-month").attr("y",q-4).merge(Ai).attr("x",function(ar){return re+ar.col*(k+er)}).text(function(ar){return ar.text});var pi=function(ar){return ar.date.toISOString().slice(0,10)},ss=bn.selectAll("rect.myIO-calendar-cell").data(v,function(ar){return pi(ar)});ss.exit().transition().duration(cr).style("opacity",0).remove();var Va=ss.enter().append("rect").attr("class","myIO-calendar-cell").attr("data-date",pi).attr("data-row",function(ar){return String(O(ar.date))}).attr("data-col",function(ar){return String(H(ar.date))}).attr("x",function(ar){return re+H(ar.date)*(k+er)}).attr("y",function(ar){return q+O(ar.date)*(k+er)}).attr("width",k).attr("height",k).attr("fill",function(ar){return ar.value==null||isNaN(ar.value)||ar.value===0?"var(--chart-calendar-empty-fill, #ebedf0)":Tn(ar.value)}).style("opacity",0);Va.merge(ss).each(function(ar){ar.label=r.label,ar.color=ar.value==null||isNaN(ar.value)||ar.value===0?"var(--chart-calendar-empty-fill, #ebedf0)":Tn(ar.value),ar[h]=pi({date:ar.date}),ar[g]=ar.value}).transition().duration(cr).style("opacity",1).attr("x",function(ar){return re+H(ar.date)*(k+er)}).attr("y",function(ar){return q+O(ar.date)*(k+er)}).attr("width",k).attr("height",k).attr("fill",function(ar){return ar.value==null||isNaN(ar.value)||ar.value===0?"var(--chart-calendar-empty-fill, #ebedf0)":Tn(ar.value)})}}remove(e){e&&e.chart&&typeof e.chart.selectAll=="function"&&e.chart.selectAll(".myIO-calendar-root").remove()}};var hd=class{static type="candlestick";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["open","high","low","close"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!0},open:{required:!0,numeric:!0},high:{required:!0,numeric:!0},low:{required:!0,numeric:!0},close:{required:!0,numeric:!0}};render(e,r){var i=e.options.transition.speed,s=r.mapping.x_var,o=r.mapping.open,h=r.mapping.high,g=r.mapping.low,v=r.mapping.close,x=e.width-(e.margin.left+e.margin.right),_=Math.max(6,Math.min(40,x/Math.max(r.data.length*2.5,1))),w=this;function O(q){return e.xScale(q[s])}function I(q){return+q[v]>=+q[o]?"#4CAF50":"#F44336"}function H(q){return e.yScale(Math.max(+q[o],+q[v]))}function J(q){return Math.max(Math.abs(e.yScale(+q[o])-e.yScale(+q[v])),1)}function Z(q){return e.yScale((+q[o]+ +q[v])/2)}var oe=e.chart.selectAll("."+xr("candlestick",e.element.id,r.label)).data(r.data);oe.exit().transition().duration(i).style("opacity",0).remove();var se=oe.enter().append("g").attr("class",xr("candlestick",e.element.id,r.label)).style("opacity",0);se.append("line").attr("class","wick").attr("stroke","#666").attr("stroke-width",1.5).attr("x1",O).attr("x2",O).attr("y1",Z).attr("y2",Z),se.append("rect").attr("class","body").attr("stroke-width",.5).attr("x",function(q){return O(q)-_/2}).attr("y",Z).attr("width",_).attr("height",0).attr("fill",I).attr("stroke",I);var re=oe.merge(se);re.transition().ease(Mn(e,d3.easeQuad)).duration(i).style("opacity",1),re.select("line.wick").transition().ease(Mn(e,d3.easeQuad)).duration(i).attr("x1",O).attr("x2",O).attr("y1",function(q){return e.yScale(+q[g])}).attr("y2",function(q){return e.yScale(+q[h])}),re.select("rect.body").transition().ease(Mn(e,d3.easeQuad)).duration(i).attr("x",function(q){return O(q)-_/2}).attr("y",H).attr("width",_).attr("height",J).attr("fill",I).attr("stroke",I)}getHoverSelector(e,r){return"."+xr("candlestick",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:"O: "+r[i.mapping.open]+", H: "+r[i.mapping.high]+", L: "+r[i.mapping.low]+", C: "+r[i.mapping.close],color:r[i.mapping.close]>=r[i.mapping.open]?"#4CAF50":"#F44336",label:i.label,value:r[i.mapping.close],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+xr("candlestick",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var pd=class{static type="waterfall";static traits={hasAxes:!0,referenceLines:!0,legendType:"none",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"linear",yExtentFields:["_base_y","_cumulative_y"],domainMerge:"union"};static dataContract={x_var:{required:!0},y_var:{required:!0,numeric:!0}};render(e,r){var i=e.options.transition.speed,s=r.mapping.x_var,o=r.mapping.y_var,h=e.xScale.bandwidth?e.xScale.bandwidth():0,g=h*.82,v=(h-g)/2,x=Array.isArray(r.color),_=e.chart.selectAll("."+xr("waterfall",e.element.id,r.label)).data(r.data);_.exit().transition().duration(i).style("opacity",0).remove();var w=_.enter().append("rect").attr("class",xr("waterfall",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").attr("x",function(J){return e.xScale(J[s])+v}).attr("width",g).attr("y",function(J){return e.yScale(+J._base_y)}).attr("height",0).attr("fill",function(J,Z){return x?r.color[Z%r.color.length]:J._is_total?"#888":+J._cumulative_y>=+J._base_y?"#4CAF50":"#F44336"});_.merge(w).transition().ease(Mn(e,d3.easeQuad)).duration(i).attr("x",function(J){return e.xScale(J[s])+v}).attr("width",g).attr("y",function(J){return e.yScale(Math.max(+J._base_y,+J._cumulative_y))}).attr("height",function(J){return Math.abs(e.yScale(+J._base_y)-e.yScale(+J._cumulative_y))}).attr("fill",function(J,Z){return x?r.color[Z%r.color.length]:J._is_total?"#888":+J._cumulative_y>=+J._base_y?"#4CAF50":"#F44336"});var O=r.data.slice(0,Math.max(r.data.length-1,0)),I=e.chart.selectAll("."+xr("waterfall-connector",e.element.id,r.label)).data(O);I.exit().transition().duration(i).style("opacity",0).remove();var H=I.enter().append("line").attr("class",xr("waterfall-connector",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").style("stroke","#374151").style("stroke-width",1.5).style("stroke-dasharray","4 2").attr("x1",function(J,Z){return e.xScale(r.data[Z][s])+v+g}).attr("x2",function(J,Z){return e.xScale(r.data[Z+1][s])+v}).attr("y1",function(J){return e.yScale(+J._cumulative_y)}).attr("y2",function(J){return e.yScale(+J._cumulative_y)}).style("opacity",0);I.merge(H).transition().ease(Mn(e,d3.easeQuad)).duration(i).style("opacity",1).attr("x1",function(J,Z){return e.xScale(r.data[Z][s])+v+g}).attr("x2",function(J,Z){return e.xScale(r.data[Z+1][s])+v}).attr("y1",function(J){return e.yScale(+J._cumulative_y)}).attr("y2",function(J){return e.yScale(+J._cumulative_y)})}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:"Delta: "+r[i.mapping.y_var]+", Total: "+r._cumulative_y,color:r._is_total?"#888":+r._cumulative_y>=+r._base_y?"#4CAF50":"#F44336",label:i.label,value:r._cumulative_y,raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+xr("waterfall",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+xr("waterfall-connector",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var md=class{static type="sankey";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints=null;static dataContract={source:{required:!0},target:{required:!0},value:{required:!0,numeric:!0}};render(e,r){var i=e.margin,s=e.width-(i.left+i.right),o=n1(e)-(i.top+i.bottom),h=18,g=d3.sankey().nodeId(function(se){return se.name}).nodeWidth(h).nodePadding(12).extent([[0,0],[s,o]]),v=new Map,x=r.data.map(function(se){var re=se[r.mapping.source],q=se[r.mapping.target];return v.has(re)||v.set(re,{name:re}),v.has(q)||v.set(q,{name:q}),{source:re,target:q,value:+se[r.mapping.value]}}),_=g({nodes:Array.from(v.values()),links:x});e.derived.colorDiscrete=d3.scaleOrdinal().domain(_.nodes.map(function(se){return se.name})).range(r.color||d3.schemeTableau10),e.colorDiscrete=e.derived.colorDiscrete;var w=e.chart.selectAll("."+xr("sankey",e.element.id,r.label)).data(_.links);w.exit().transition().duration(e.options.transition.speed).style("opacity",0).remove();var O=w.enter().append("path").attr("class",xr("sankey",e.element.id,r.label)).attr("fill","none").attr("stroke-opacity",.4).attr("clip-path","url(#"+e.element.id+"clip)").attr("d",d3.sankeyLinkHorizontal()).attr("stroke-width",function(se){return Math.max(1,se.width)}).attr("stroke",function(se){return e.colorDiscrete(se.source.name)}).style("opacity",0);w.merge(O).transition().ease(Mn(e,d3.easeQuad)).duration(e.options.transition.speed).style("opacity",1).attr("d",d3.sankeyLinkHorizontal()).attr("stroke-width",function(se){return Math.max(1,se.width)}).attr("stroke",function(se){return e.colorDiscrete(se.source.name)});var I=e.chart.selectAll("."+xr("sankey-node",e.element.id,r.label)).data(_.nodes);I.exit().transition().duration(e.options.transition.speed).style("opacity",0).remove();var H=I.enter().append("rect").attr("class",xr("sankey-node",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").attr("x",function(se){return se.x0}).attr("y",function(se){return se.y0}).attr("width",function(se){return se.x1-se.x0}).attr("height",function(se){return Math.max(1,se.y1-se.y0)}).attr("fill",function(se){return e.colorDiscrete(se.name)}).style("opacity",0);I.merge(H).transition().ease(Mn(e,d3.easeQuad)).duration(e.options.transition.speed).style("opacity",1).attr("x",function(se){return se.x0}).attr("y",function(se){return se.y0}).attr("width",function(se){return se.x1-se.x0}).attr("height",function(se){return Math.max(1,se.y1-se.y0)}).attr("fill",function(se){return e.colorDiscrete(se.name)});var J=xr("sankey-label",e.element.id,r.label),Z=e.chart.selectAll("."+J).data(_.nodes,function(se){return se.name});Z.exit().transition().duration(e.options.transition.speed).style("opacity",0).remove();var oe=Z.enter().append("text").attr("class",J).attr("x",function(se){return se.x0 "+r.target.name,body:"Value: "+r.value,color:e.colorDiscrete?e.colorDiscrete(r.source.name):i.color,label:i.label,value:r.value,raw:r}:{title:r.name,body:"Value: "+r.value,color:e.colorDiscrete?e.colorDiscrete(r.name):i.color,label:i.label,value:r.value,raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+xr("sankey",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+xr("sankey-node",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+xr("sankey-label",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var gd=class{static type="rangeBar";static traits={hasAxes:!0,referenceLines:!1,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["low_y","high_y"],domainMerge:"union"};static dataContract={x_var:{required:!0},low_y:{required:!0,numeric:!0},high_y:{required:!0,numeric:!0}};render(e,r){if(r.options&&r.options.style==="errorbar"){tx(e,r);return}var i=e.options.transition.speed,s=r.mapping.x_var,o=r.mapping.low_y,h=r.mapping.high_y,g=r.options&&r.options.rangeBarWidth?r.options.rangeBarWidth:Math.max(6,Math.min(60,(e.width-(e.margin.left+e.margin.right))/Math.max(r.data.length*3,1))),v=e.chart.selectAll("."+xr("rangeBar",e.element.id,r.label)).data(r.data);v.exit().transition().duration(i).style("opacity",0).remove();function x(H){return e.yScale((+H[o]+ +H[h])/2)}function _(H){return e.yScale(Math.max(+H[o],+H[h]))}function w(H){return Math.abs(e.yScale(+H[o])-e.yScale(+H[h]))}function O(H){return typeof e.colorDiscrete=="function"&&H[r.mapping.group]?e.colorDiscrete(H[r.mapping.group]):r.color||"#6b7280"}var I=v.enter().append("rect").attr("class",xr("rangeBar",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").attr("x",function(H){return e.xScale(H[s])-g/2}).attr("y",x).attr("width",g).attr("height",0).attr("fill",O);v.merge(I).transition().ease(Mn(e,d3.easeQuad)).duration(i).attr("x",function(H){return e.xScale(H[s])-g/2}).attr("y",_).attr("width",g).attr("height",w).attr("fill",O)}getHoverSelector(e,r){return"."+xr("rangeBar",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:i.mapping.low_y+": "+r[i.mapping.low_y]+", "+i.mapping.high_y+": "+r[i.mapping.high_y],color:i.color,label:i.label,value:r[i.mapping.high_y],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+xr("rangeBar",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+xr("rangeBar-error",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};function tx(t,e){var r=t.options.transition.speed,i=e.mapping.x_var,s=e.mapping.low_y,o=e.mapping.high_y,h=e.mapping.y_var;if(!h){typeof console<"u"&&console.warn&&console.warn("myIO RangeBarRenderer: style='errorbar' requires a y_var mapping for the mean point. Skipping render for layer '"+(e.label||"(unnamed)")+"'.");return}var g=e.color||"#4269D0",v=e.options&&e.options.capWidth?e.options.capWidth:18,x=e.options&&e.options.pointRadius?e.options.pointRadius:4;function _(oe){var se=t.xScale(oe[i]);return t.xScale.bandwidth&&(se+=t.xScale.bandwidth()/2),se}function w(oe){return t.yScale(+oe[s])}function O(oe){return t.yScale(+oe[o])}function I(oe){return t.yScale(+oe[h])}var H=t.chart.selectAll("."+xr("rangeBar-error",t.element.id,e.label)).data(e.data);H.exit().transition().duration(r).style("opacity",0).remove();var J=H.enter().append("g").attr("class",xr("rangeBar-error",t.element.id,e.label)).attr("clip-path","url(#"+t.element.id+"clip)").style("opacity",0);J.append("line").attr("class","mean-ci-whisker").attr("x1",_).attr("x2",_).attr("y1",I).attr("y2",I).attr("stroke",g).attr("stroke-width",2),J.append("line").attr("class","mean-ci-cap mean-ci-cap-low").attr("x1",_).attr("x2",_).attr("y1",I).attr("y2",I).attr("stroke",g).attr("stroke-width",2),J.append("line").attr("class","mean-ci-cap mean-ci-cap-high").attr("x1",_).attr("x2",_).attr("y1",I).attr("y2",I).attr("stroke",g).attr("stroke-width",2),J.append("circle").attr("class","mean-ci-point").attr("cx",_).attr("cy",I).attr("r",0).attr("fill",g).attr("stroke","var(--chart-bg, #ffffff)").attr("stroke-width",1.5);var Z=H.merge(J);Z.transition().ease(Mn(t,d3.easeQuad)).duration(r).style("opacity",1),Z.select(".mean-ci-whisker").transition().ease(Mn(t,d3.easeQuad)).duration(r).attr("x1",_).attr("x2",_).attr("y1",w).attr("y2",O).attr("stroke",g),Z.select(".mean-ci-cap-low").transition().ease(Mn(t,d3.easeQuad)).duration(r).attr("x1",function(oe){return _(oe)-v/2}).attr("x2",function(oe){return _(oe)+v/2}).attr("y1",w).attr("y2",w).attr("stroke",g),Z.select(".mean-ci-cap-high").transition().ease(Mn(t,d3.easeQuad)).duration(r).attr("x1",function(oe){return _(oe)-v/2}).attr("x2",function(oe){return _(oe)+v/2}).attr("y1",O).attr("y2",O).attr("stroke",g),Z.select(".mean-ci-point").transition().ease(Mn(t,d3.easeQuad)).duration(r).attr("cx",_).attr("cy",I).attr("r",x).attr("fill",g)}var yd=class{static type="text";static traits={hasAxes:!1,referenceLines:!1,legendType:"none",binning:!1,rolloverStyle:"none",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",xExtentFields:[],yExtentFields:[],domainMerge:"union"};static dataContract={};render(e,r){var i=r.options&&r.options.position||"top-right",s=r.label,o=xr("text-annotation",e.element.id,s);e.chart.selectAll("."+o).remove();var h=r.data.map(function(J){return J.text}),g=i.indexOf("top")!==-1,v=i.indexOf("right")!==-1,x=e.width-(e.margin.left+e.margin.right),_=e.height-(e.margin.top+e.margin.bottom),w=v?x-58:10,O=g?20:_-10,I=v?"end":"start",H=e.chart.append("g").attr("class",o).attr("transform","translate("+w+","+O+")");h.forEach(function(J,Z){H.append("text").attr("y",(g?1:-1)*Z*16).attr("text-anchor",I).style("font-size","12px").style("font-family","var(--font-family, sans-serif)").style("fill","var(--text-color, #333)").style("opacity",.8).text(J)})}formatTooltip(){return null}remove(e,r){var i=xr("text-annotation",e.dom.element.id,r.label);e.dom.chartArea.selectAll("."+i).remove()}};var bd=class{static type="bracket";static traits={hasAxes:!0,referenceLines:!1,legendType:"none",binning:!1,rolloverStyle:"none",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",xExtentFields:[],yExtentFields:["y"],domainMerge:"union"};static dataContract={x1:{required:!0,numeric:!0},x2:{required:!0,numeric:!0},y:{required:!0,numeric:!0}};render(e,r){var i=xr("bracket",e.element.id,r.label),s=6,o=4,h=e.options.transition.speed,g=r.color||"var(--text-color, #333)",v=e.chart.selectAll("g."+i+"-root").data([null]).join("g").attr("class",i+"-root").attr("clip-path","url(#"+e.element.id+"clip)"),x=function(I,H){return I.label!=null?String(I.label)+"_"+H:String(H)},_=v.selectAll("g."+i).data(r.data,x);_.exit().transition().duration(h).style("opacity",0).remove();var w=_.enter().append("g").attr("class",i).style("opacity",0);w.append("line").attr("class","bracket-bar").attr("stroke",g).attr("stroke-width",1.5),w.append("line").attr("class","bracket-tick-left").attr("stroke",g).attr("stroke-width",1.5),w.append("line").attr("class","bracket-tick-right").attr("stroke",g).attr("stroke-width",1.5),w.append("text").attr("class","bracket-label").attr("text-anchor","middle").style("font-size","11px").style("font-family","var(--font-family, sans-serif)").style("fill",g);var O=w.merge(_);O.transition().duration(h).style("opacity",1),O.select(".bracket-bar").transition().duration(h).attr("x1",function(I){return e.xScale(+I.x1)}).attr("y1",function(I){return e.yScale(+I.y)}).attr("x2",function(I){return e.xScale(+I.x2)}).attr("y2",function(I){return e.yScale(+I.y)}),O.select(".bracket-tick-left").transition().duration(h).attr("x1",function(I){return e.xScale(+I.x1)}).attr("y1",function(I){return e.yScale(+I.y)}).attr("x2",function(I){return e.xScale(+I.x1)}).attr("y2",function(I){return e.yScale(+I.y)+s}),O.select(".bracket-tick-right").transition().duration(h).attr("x1",function(I){return e.xScale(+I.x2)}).attr("y1",function(I){return e.yScale(+I.y)}).attr("x2",function(I){return e.xScale(+I.x2)}).attr("y2",function(I){return e.yScale(+I.y)+s}),O.select(".bracket-label").text(function(I){return I.label}).transition().duration(h).attr("x",function(I){return(e.xScale(+I.x1)+e.xScale(+I.x2))/2}).attr("y",function(I){return e.yScale(+I.y)-o})}formatTooltip(){return null}remove(e,r){var i=xr("bracket",e.element.id,r.label);e.chart.selectAll("."+i).remove()}};var vd=class{static type="lollipop";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"linear",xExtentFields:[],yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!1},y_var:{required:!0,numeric:!0}};render(e,r,i){var s=e.derived.xScale,o=e.derived.yScale,h=e.config.scales.flipAxis,g=e.options.transition.speed,v=e.dom.chartArea.selectAll(".tag-lollipop-"+r.id).data([null]).join("g").attr("class","tag-lollipop-"+r.id),x=r.options&&r.options.headRadius||5,_=r.options&&r.options.stemWidth||2,w=r.mapping.x_var,O=r.mapping.y_var,I=s.bandwidth?s.bandwidth()/2:0,H=typeof o(0)=="number"?o(0):o.range()[0],J=typeof s(0)=="number"?s(0):s.range()[0];function Z(K){if(h){var k=o(K[w]);return o.bandwidth&&(k+=I),{x1:J,x2:s(K[O]),y1:k,y2:k}}var de=s(K[w])+I;return{x1:de,x2:de,y1:H,y2:o(K[O])}}function oe(K){var k=Z(K);return{cx:k.x2,cy:k.y2}}var se=v.selectAll(".lollipop-stem").data(r.data,function(K){return K._source_key});se.exit().transition().duration(g).style("opacity",0).attr("x2",h?J:function(K){return s(K[w])+I}).attr("y2",h?function(K){var k=o(K[w]);return o.bandwidth?k+I:k}:H).remove();var re=se.enter().append("line").attr("class","lollipop-stem").attr("x1",function(K){return Z(K).x1}).attr("x2",function(K){return h?Z(K).x1:Z(K).x2}).attr("y1",function(K){return Z(K).y1}).attr("y2",function(K){return Z(K).y1}).attr("stroke",r.color).attr("stroke-width",_).style("opacity",0);re.merge(se).transition().duration(g).style("opacity",1).attr("x1",function(K){return Z(K).x1}).attr("x2",function(K){return Z(K).x2}).attr("y1",function(K){return Z(K).y1}).attr("y2",function(K){return Z(K).y2}).attr("stroke",r.color).attr("stroke-width",_);var q=v.selectAll(".lollipop-head").data(r.data,function(K){return K._source_key});q.exit().transition().duration(g).style("opacity",0).attr("cx",function(K){return Z(K).x1}).attr("cy",function(K){return Z(K).y1}).remove();var ue=q.enter().append("circle").attr("class","lollipop-head").attr("cx",function(K){return Z(K).x1}).attr("cy",function(K){return Z(K).y1}).attr("r",x).attr("fill",r.color).style("opacity",0);ue.merge(q).transition().duration(g).style("opacity",1).attr("cx",function(K){return oe(K).cx}).attr("cy",function(K){return oe(K).cy}).attr("r",x).attr("fill",r.color)}getHoverSelector(e,r){return".tag-lollipop-"+r.id+" .lollipop-head"}formatTooltip(e,r,i){var s=e.runtime.activeYFormat||d3.format("s");return{title:{text:String(r[i.mapping.x_var])},items:[{color:i.color,label:i.label,value:s(r[i.mapping.y_var])}]}}remove(e,r){e.dom.chartArea.selectAll(".tag-lollipop-"+r.id).remove()}};var xd=class{static type="dumbbell";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"linear",xExtentFields:[],yExtentFields:["low_y","high_y"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!1},low_y:{required:!0,numeric:!0},high_y:{required:!0,numeric:!0}};render(e,r,i){var s=e.derived.xScale,o=e.derived.yScale,h=e.config.scales.flipAxis,g=e.options.transition.speed,v=e.dom.chartArea.selectAll(".tag-dumbbell-"+r.id).data([null]).join("g").attr("class","tag-dumbbell-"+r.id),x=r.options&&r.options.dotRadius||5,_=r.options&&r.options.lineWidth||2,w=r.mapping.x_var,O=r.mapping.low_y,I=r.mapping.high_y,H=s.bandwidth?s.bandwidth()/2:0,J=o.bandwidth?o.bandwidth()/2:0;function Z(k){if(h){var de=o(k[w])+J,ze=s(k[O]),er=s(k[I]);return{lowX:ze,lowY:de,highX:er,highY:de,midX:(ze+er)/2,midY:de}}var Er=s(k[w])+H,Ht=o(k[O]),xn=o(k[I]);return{lowX:Er,lowY:Ht,highX:Er,highY:xn,midX:Er,midY:(Ht+xn)/2}}var oe=v.selectAll(".dumbbell-line").data(r.data,function(k){return k._source_key});oe.exit().transition().duration(g).style("opacity",0).attr("x1",function(k){return Z(k).midX}).attr("x2",function(k){return Z(k).midX}).attr("y1",function(k){return Z(k).midY}).attr("y2",function(k){return Z(k).midY}).remove();var se=oe.enter().append("line").attr("class","dumbbell-line").attr("x1",function(k){return Z(k).midX}).attr("x2",function(k){return Z(k).midX}).attr("y1",function(k){return Z(k).midY}).attr("y2",function(k){return Z(k).midY}).attr("stroke","var(--chart-grid-color, #ccc)").attr("stroke-width",_).style("opacity",0);se.merge(oe).transition().duration(g).style("opacity",1).attr("x1",function(k){return Z(k).lowX}).attr("x2",function(k){return Z(k).highX}).attr("y1",function(k){return Z(k).lowY}).attr("y2",function(k){return Z(k).highY}).attr("stroke","var(--chart-grid-color, #ccc)").attr("stroke-width",_);var re=v.selectAll(".dumbbell-low").data(r.data,function(k){return k._source_key});re.exit().transition().duration(g).style("opacity",0).attr("cx",function(k){return Z(k).midX}).attr("cy",function(k){return Z(k).midY}).remove();var q=re.enter().append("circle").attr("class","dumbbell-low").attr("cx",function(k){return Z(k).midX}).attr("cy",function(k){return Z(k).midY}).attr("r",x).attr("fill",r.color).attr("opacity",0);q.merge(re).transition().duration(g).attr("cx",function(k){return Z(k).lowX}).attr("cy",function(k){return Z(k).lowY}).attr("r",x).attr("fill",r.color).attr("opacity",.6);var ue=v.selectAll(".dumbbell-high").data(r.data,function(k){return k._source_key});ue.exit().transition().duration(g).style("opacity",0).attr("cx",function(k){return Z(k).midX}).attr("cy",function(k){return Z(k).midY}).remove();var K=ue.enter().append("circle").attr("class","dumbbell-high").attr("cx",function(k){return Z(k).midX}).attr("cy",function(k){return Z(k).midY}).attr("r",x).attr("fill",r.color).attr("opacity",0);K.merge(ue).transition().duration(g).attr("cx",function(k){return Z(k).highX}).attr("cy",function(k){return Z(k).highY}).attr("r",x).attr("fill",r.color).attr("opacity",1)}getHoverSelector(e,r){return".tag-dumbbell-"+r.id+" .dumbbell-high, .tag-dumbbell-"+r.id+" .dumbbell-low"}formatTooltip(e,r,i){var s=e.runtime.activeYFormat||d3.format("s");return{title:{text:String(r[i.mapping.x_var])},items:[{color:i.color,label:"Low",value:s(r[i.mapping.low_y])},{color:i.color,label:"High",value:s(r[i.mapping.high_y])}]}}remove(e,r){e.dom.chartArea.selectAll(".tag-dumbbell-"+r.id).remove()}};var _d=class{static type="waffle";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints=null;static dataContract={category:{required:!0},value:{required:!0,numeric:!0}};render(e,r){for(var i=r.options&&r.options.rows||10,s=r.options&&r.options.cols||10,o=i*s,h=r.options&&r.options.cellGap||2,g=r.options&&r.options.cellRadius||2,v=e.config.layout.margin,x=e.runtime.width-v.left-v.right,_=e.runtime.height-v.top-v.bottom,w=Math.min((x-(s-1)*h)/s,(_-(i-1)*h)/i),O=0,I=0;I=de)&&(K=Er,k=!0)}se._quantile_dot_cx=K,se._quantile_dot_cy=ue,oe.push({cx:K,cy:ue})})});var O=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0,I=e.dom.chartArea.selectAll(".tag-quantile_dots-"+r.id).data([null]).join("g").attr("class","tag-quantile_dots-"+r.id),H=I.selectAll(".quantile-dots-point").data(r.data,function(Z){return Z._source_key});H.exit().transition().duration(O).attr("fill-opacity",0).remove();var J=H.enter().append("circle").attr("class","quantile-dots-point").attr("clip-path","url(#"+e.element.id+"clip)").attr("cx",function(Z){return Z._quantile_dot_cx}).attr("cy",function(Z){return Z._quantile_dot_cy}).attr("r",o).attr("fill",r.color).attr("fill-opacity",0).attr("role","graphics-symbol");J.merge(H).transition().duration(O).attr("cx",function(Z){return Z._quantile_dot_cx}).attr("cy",function(Z){return Z._quantile_dot_cy}).attr("r",o).attr("fill",r.color).attr("fill-opacity",.75)}getHoverSelector(e,r){return".tag-quantile_dots-"+r.id+" .quantile-dots-point"}formatTooltip(e,r,i){var s=e.runtime.activeYFormat||d3.format("s"),o=i.options&&i.options.source?" ("+i.options.source+")":"";return{title:String(r[i.mapping.x_var]),items:[{color:i.color,label:i.label+o,value:"Q"+r[i.mapping.quantile_rank]+": "+s(r[i.mapping.y_var])}],value:r[i.mapping.y_var],raw:r}}remove(e,r){e.dom.chartArea.selectAll(".tag-quantile_dots-"+r.id).remove()}};var wd=class{static type="bump";static traits={hasAxes:!0,referenceLines:!1,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints={xScaleType:"point",yScaleType:"linear",xExtentFields:[],yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0},y_var:{required:!0,numeric:!0},group:{required:!0}};render(e,r){var i=e.derived.xScale,s=e.derived.yScale,o=r.mapping.x_var,h=r.mapping.y_var,g=r.mapping.group,v=r.options&&r.options.dotRadius||5,x=e.derived.colorDiscrete||d3.scaleOrdinal(d3.schemeCategory10),_=d3.group(r.data,function(J){return J[g]}),w=e.dom.chartArea.selectAll(".tag-bump-"+r.id).data([null]).join("g").attr("class","tag-bump-"+r.id),O=d3.line().x(function(J){return i(J[o])}).y(function(J){return s(J[h])}).curve(d3.curveBumpX),I=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0,H=0;_.forEach(function(J,Z){var oe=x(Z),se=J.slice().sort(function(k,de){return String(k[o]).localeCompare(String(de[o]))}),re=w.selectAll(".bump-line-"+H).data([se]),q=re.enter().append("path").attr("class","bump-line bump-line-"+H).attr("fill","none").attr("stroke",oe).attr("stroke-width",2.5).attr("stroke-opacity",0).attr("d",O);q.merge(re).transition().duration(I).attr("stroke",oe).attr("stroke-opacity",.8).attr("d",O);var ue=w.selectAll(".bump-dot-"+H).data(se,function(k){return k._source_key||k[o]});ue.exit().transition().duration(I).style("opacity",0).remove();var K=ue.enter().append("circle").attr("class","bump-dot bump-dot-"+H).attr("cx",function(k){return i(k[o])}).attr("cy",function(k){return s(k[h])}).attr("r",v).attr("fill",oe).attr("stroke","#fff").attr("stroke-width",1.5).style("opacity",0);K.merge(ue).transition().duration(I).style("opacity",1).attr("cx",function(k){return i(k[o])}).attr("cy",function(k){return s(k[h])}).attr("r",v).attr("fill",oe),H++})}getHoverSelector(e,r){return".tag-bump-"+r.id+" .bump-dot"}formatTooltip(e,r,i){return{title:{text:String(r[i.mapping.group])},items:[{color:i.color,label:String(r[i.mapping.x_var]),value:String(r[i.mapping.y_var])}]}}remove(e,r){e.dom.chartArea.selectAll(".tag-bump-"+r.id).remove()}};var Ad=class{static type="radar";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints=null;static dataContract={axis:{required:!0},value:{required:!0,numeric:!0}};render(e,r){var i=e.margin||(e.config&&e.config.layout?e.config.layout.margin:{top:0,right:0,bottom:0,left:0}),s=(e.width||e.runtime&&e.runtime.width||0)-i.left-i.right,o=(e.height||e.runtime&&e.runtime.height||0)-i.top-i.bottom,h=r.mapping.axis,g=r.mapping.value,v=r.mapping.group,x=r.options&&r.options.labelOffset||16,_=s/2,w=o/2,O=Math.max(0,Math.min(s,o)/2-x-8),I=[],H=new Set,J=d3.max(r.data,function(cr){return+cr[g]})||0,Z=d3.scaleLinear().domain([0,J>0?J:1]).range([0,O]),oe=[],se=v?d3.group(r.data,function(cr){return cr[v]}):new Map([[r.label||"Series",r.data]]),re=e.derived.colorDiscrete||d3.scaleOrdinal(d3.schemeCategory10),q,ue,K,k,de;if(r.data.forEach(function(cr){var bn=cr[h];H.has(bn)||(H.add(bn),I.push(bn))}),q=I.length,q===0)return;ue=e.dom.chartArea.selectAll(".tag-radar-"+r.id).data([null]).join("g").attr("class","tag-radar-"+r.id),K=ue.selectAll(".radar-axis-layer").data([null]).join("g").attr("class","radar-axis-layer"),k=ue.selectAll(".radar-polygon-layer").data([null]).join("g").attr("class","radar-polygon-layer");var ze=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0;function er(cr){var bn=2*Math.PI*cr/q,mn=Math.sin(bn),qn=Math.cos(bn),Wt="middle";return mn>.25?Wt="start":mn<-.25&&(Wt="end"),{lineX:_+O*mn,lineY:w-O*qn,labelX:_+(O+x)*mn,labelY:w-(O+x)*qn,textAnchor:Wt}}var Er=K.selectAll(".radar-axis").data(I,function(cr){return cr});Er.exit().transition().duration(ze).style("opacity",0).remove();var Ht=Er.enter().append("g").attr("class","radar-axis").style("opacity",0);Ht.append("line").attr("class","radar-axis-line").attr("stroke","var(--chart-grid, #cbd5e1)").attr("stroke-width",1).attr("x1",_).attr("y1",w).attr("x2",_).attr("y2",w),Ht.append("text").attr("class","radar-axis-label").attr("fill","var(--chart-fg, #1f2937)").attr("x",_).attr("y",w).attr("dy","0.35em").attr("text-anchor","middle");var xn=Ht.merge(Er);xn.transition().duration(ze).style("opacity",1),xn.each(function(cr,bn){var mn=er(bn),qn=d3.select(this);qn.select(".radar-axis-line").attr("stroke","var(--chart-grid, #cbd5e1)").attr("stroke-width",1).transition().duration(ze).attr("x1",_).attr("y1",w).attr("x2",mn.lineX).attr("y2",mn.lineY),qn.select(".radar-axis-label").text(cr).transition().duration(ze).attr("x",mn.labelX).attr("y",mn.labelY).attr("text-anchor",mn.textAnchor)}),se.forEach(function(cr,bn){var mn=new Map,qn=[];cr.forEach(function(Wt){mn.set(Wt[h],Wt)}),I.forEach(function(Wt,Pr){var hi=2*Math.PI*Pr/q,Ai=mn.get(Wt),pi=Ai?+Ai[g]:0,ss=Z(Number.isFinite(pi)?pi:0);qn.push({axis:Wt,angle:hi,value:Number.isFinite(pi)?pi:0,x:_+ss*Math.sin(hi),y:w-ss*Math.cos(hi),datum:Ai||null})}),oe.push({key:bn,color:re(bn),points:qn,rows:cr})}),e.derived.colorDiscrete=re.domain(oe.map(function(cr){return cr.key})),e.colorDiscrete=e.derived.colorDiscrete,de=d3.line().x(function(cr){return cr.x}).y(function(cr){return cr.y}).curve(d3.curveLinearClosed);function $r(cr){return de(cr.map(function(bn){return{x:_,y:w}}))}var Tn=k.selectAll(".radar-polygon").data(oe,function(cr){return cr.key});Tn.exit().transition().duration(ze).style("opacity",0).remove();var In=Tn.enter().append("path").attr("class","radar-polygon").attr("d",function(cr){return $r(cr.points)}).attr("fill",function(cr){return cr.color}).attr("fill-opacity",0).attr("stroke",function(cr){return cr.color}).attr("stroke-width",2).attr("stroke-opacity",0);In.merge(Tn).transition().duration(ze).attrTween("d",function(cr){var bn=this,mn=bn._radarPoints||cr.points.map(function(){return{x:_,y:w}}),qn=cr.points,Wt=mn.map(function(Pr,hi){var Ai=qn[hi]||Pr;return{x:d3.interpolateNumber(Pr.x,Ai.x),y:d3.interpolateNumber(Pr.y,Ai.y)}});return function(Pr){var hi=Wt.map(function(Ai){return{x:Ai.x(Pr),y:Ai.y(Pr)}});return bn._radarPoints=qn,de(hi)}}).attr("fill",function(cr){return cr.color}).attr("fill-opacity",.2).attr("stroke",function(cr){return cr.color}).attr("stroke-opacity",1)}getHoverSelector(e,r){return".tag-radar-"+r.id+" .radar-polygon"}formatTooltip(e,r){return{title:{text:String(r.key)},items:r.points.map(function(i){return{color:r.color,label:i.axis,value:String(i.value)}})}}remove(e,r){e.dom.chartArea.selectAll(".tag-radar-"+r.id).remove()}};var Td=class{static type="funnel";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints=null;static dataContract={stage:{required:!0},value:{required:!0,numeric:!0}};render(e,r){var i=e.margin||(e.config&&e.config.layout?e.config.layout.margin:{top:0,right:0,bottom:0,left:0}),s=(e.width||e.runtime&&e.runtime.width||0)-i.left-i.right,o=(e.height||e.runtime&&e.runtime.height||0)-i.top-i.bottom,h=r.mapping.stage,g=r.mapping.value,v=r.options&&r.options.stageGap||6,x=d3.max(r.data,function(ue){return+ue[g]})||0,_=d3.scaleLinear().domain([0,x>0?x:1]).range([0,s*.95]),w=e.derived.colorDiscrete||d3.scaleOrdinal(d3.schemeTableau10),O=r.data.length>0?o/r.data.length:0,I,H,J;I=r.data.map(function(ue,K){var k=r.data[K+1]||null,de=_(+ue[g]||0),ze=k?_(+k[g]||0):de*.55,er=K*O,Er=Math.max(er,er+O-v),Ht=s/2,xn=Ht-de/2,$r=Ht+de/2,Tn=Ht-ze/2,In=Ht+ze/2;return{stage:ue[h],value:+ue[g],color:w(ue[h]),datum:ue,points:[[xn,er],[$r,er],[In,Er],[Tn,Er]],labelX:Ht,labelY:(er+Er)/2}}),e.derived.colorDiscrete=w.domain(I.map(function(ue){return ue.stage})),e.colorDiscrete=e.derived.colorDiscrete;var Z=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0;function oe(ue){return"M"+ue[0][0]+","+ue[0][1]+"L"+ue[1][0]+","+ue[1][1]+"L"+ue[2][0]+","+ue[2][1]+"L"+ue[3][0]+","+ue[3][1]+"Z"}function se(ue){var K=(ue.points[0][0]+ue.points[1][0])/2,k=(ue.points[0][1]+ue.points[3][1])/2;return[[K,k],[K,k],[K,k],[K,k]]}H=e.dom.chartArea.selectAll(".tag-funnel-"+r.id).data([null]).join("g").attr("class","tag-funnel-"+r.id),J=H.selectAll(".funnel-stage-group").data(I,function(ue){return ue.stage}),J.exit().transition().duration(Z).style("opacity",0).remove();var re=J.enter().append("g").attr("class","funnel-stage-group").style("opacity",0);re.append("path").attr("class","funnel-stage").attr("d",function(ue){return oe(se(ue))}).attr("fill",function(ue){return ue.color}),re.append("text").attr("class","funnel-label").attr("x",function(ue){return ue.labelX}).attr("y",function(ue){return ue.labelY}).attr("dy","0.35em").attr("text-anchor","middle").text(function(ue){return ue.stage});var q=re.merge(J);q.transition().duration(Z).style("opacity",1),q.select(".funnel-stage").transition().duration(Z).attr("d",function(ue){return oe(ue.points)}).attr("fill",function(ue){return ue.color}),q.select(".funnel-label").text(function(ue){return ue.stage}).transition().duration(Z).attr("x",function(ue){return ue.labelX}).attr("y",function(ue){return ue.labelY})}getHoverSelector(e,r){return".tag-funnel-"+r.id+" .funnel-stage"}formatTooltip(e,r){return{title:{text:String(r.stage)},items:[{color:r.color,label:String(r.stage),value:String(r.value)}]}}remove(e,r){e.dom.chartArea.selectAll(".tag-funnel-"+r.id).remove()}};var Id=class{static type="parallel";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints=null;static dataContract={dimensions:{required:!0}};render(e,r){var i=e.margin||(e.config&&e.config.layout?e.config.layout.margin:{top:0,right:0,bottom:0,left:0}),s=(e.width||e.runtime&&e.runtime.width||0)-i.left-i.right,o=(e.height||e.runtime&&e.runtime.height||0)-i.top-i.bottom,h=r.mapping.dimensions,g=Array.isArray(h)?h.slice():[h],v=r.mapping.group,x=d3.scalePoint().domain(g).range([0,s]).padding(.5),_={},w=e.derived.colorDiscrete||d3.scaleOrdinal(d3.schemeCategory10),O,I,H;g.forEach(function(q){var ue=d3.extent(r.data,function(K){var k=+K[q];return Number.isFinite(k)?k:null});(!ue||ue[0]===void 0||ue[1]===void 0)&&(ue=[0,1]),ue[0]===ue[1]&&(ue=[ue[0]-1,ue[1]+1]),_[q]=d3.scaleLinear().domain(ue).range([o,0])}),e.derived.colorDiscrete=w.domain(Array.from(new Set(r.data.map(function(q){return v?q[v]:r.label})))),e.colorDiscrete=e.derived.colorDiscrete,O=e.dom.chartArea.selectAll(".tag-parallel-"+r.id).data([null]).join("g").attr("class","tag-parallel-"+r.id),I=O.selectAll(".parallel-axis").data(g).join(function(q){var ue=q.append("g").attr("class","parallel-axis");return ue.append("text").attr("class","parallel-axis-label"),ue}).attr("transform",function(q){return"translate("+x(q)+",0)"}).each(function(q){d3.select(this).call(d3.axisLeft(_[q]).ticks(5))}),I.select(".parallel-axis-label").attr("x",0).attr("y",-10).attr("text-anchor","middle").text(function(q){return q}),H=d3.line().defined(function(q){return q&&q[1]!==null}).x(function(q){return q[0]}).y(function(q){return q[1]});var J=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0;function Z(q){var ue=g.map(function(K){var k=+q[K];return Number.isFinite(k)?[x(K),_[K](k)]:[x(K),null]});return H(ue)}function oe(q){var ue=v?q[v]:r.label;return w(ue)}var se=O.selectAll(".parallel-line").data(r.data,function(q,ue){return q._source_key!=null?q._source_key:ue});se.exit().transition().duration(J).attr("stroke-opacity",0).remove();var re=se.enter().append("path").attr("class","parallel-line").attr("fill","none").attr("d",Z).attr("stroke",oe).attr("stroke-opacity",0);re.merge(se).transition().duration(J).attr("d",Z).attr("stroke",oe).attr("stroke-opacity",.6)}getHoverSelector(e,r){return".tag-parallel-"+r.id+" .parallel-line"}formatTooltip(e,r,i){var s=Array.isArray(i.mapping.dimensions)?i.mapping.dimensions:[i.mapping.dimensions],o=i.mapping.group?String(r[i.mapping.group]):String(i.label||"Series");return{title:{text:o},items:s.map(function(h){return{color:e.colorDiscrete?e.colorDiscrete(i.mapping.group?r[i.mapping.group]:i.label):i.color,label:h,value:String(r[h])}})}}remove(e,r){e.dom.chartArea.selectAll(".tag-parallel-"+r.id).remove()}};var ns=new Map;function Ts(t,e){if(ns.has(t))throw new Error("Renderer already registered for type: "+t);var r=e&&e.constructor?e.constructor.traits:null,i=["hasAxes","referenceLines","legendType","binning","rolloverStyle"];if(!r)throw new Error("Renderer missing static traits: "+t);i.forEach(function(s){if(!(s in r))throw new Error("Renderer trait missing '"+s+"': "+t)}),ns.set(t,e)}function u6(t){if(!ns.has(t))throw new Error("Unknown renderer type: "+t);return ns.get(t)}function fl(t){return u6(t.type)}function ry(){return ns.has(J3.type)||Ts(J3.type,new J3),ns.has(K3.type)||Ts(K3.type,new K3),ns.has(Q3.type)||Ts(Q3.type,new Q3),ns.has(Z3.type)||Ts(Z3.type,new Z3),ns.has(ed.type)||Ts(ed.type,new ed),ns.has(td.type)||Ts(td.type,new td),ns.has(rd.type)||Ts(rd.type,new rd),ns.has(ld.type)||Ts(ld.type,new ld),ns.has(cd.type)||Ts(cd.type,new cd),ns.has(ud.type)||Ts(ud.type,new ud),ns.has(fd.type)||Ts(fd.type,new fd),ns.has(dd.type)||Ts(dd.type,new dd),ns.has(hd.type)||Ts(hd.type,new hd),ns.has(pd.type)||Ts(pd.type,new pd),ns.has(md.type)||Ts(md.type,new md),ns.has(gd.type)||Ts(gd.type,new gd),ns.has(vd.type)||Ts(vd.type,new vd),ns.has(xd.type)||Ts(xd.type,new xd),ns.has(_d.type)||Ts(_d.type,new _d),ns.has(Sd.type)||Ts(Sd.type,new Sd),ns.has(Ed.type)||Ts(Ed.type,new Ed),ns.has(wd.type)||Ts(wd.type,new wd),ns.has(Ad.type)||Ts(Ad.type,new Ad),ns.has(Td.type)||Ts(Td.type,new Td),ns.has(Id.type)||Ts(Id.type,new Id),ns.has(yd.type)||Ts(yd.type,new yd),ns.has(bd.type)||Ts(bd.type,new bd),ns}function ny(){return Array.from(ns.values())}function iy(t,e){var r=Vs(t,e.label,e.color),i=d3.drag().on("start",function(){d3.select(this).raise().classed("active",!0).style("cursor","grabbing")}).on("drag",function(s,o){o[e.mapping.x_var]=t.xScale.invert(s.x),o[e.mapping.y_var]=t.yScale.invert(s.y),d3.select(this).attr("cx",t.xScale(o[e.mapping.x_var])).attr("cy",t.yScale(o[e.mapping.y_var]))}).on("end",function(s,o){d3.select(this).classed("active",!1).style("cursor","grab"),t.updateRegression(r,e.label),t.emit("dragEnd",{point:o,layerLabel:e.label})});t.chart.selectAll("."+xr("point",t.element.id,e.label)).style("cursor","grab").call(i)}function k0(t,e,r){Od(t);var i=d3.select(t.dom.element),s=i.append("div").attr("class","myIO-status-bar").attr("role","status").attr("aria-live","polite");s.append("span").attr("class","myIO-status-bar-text").text(e);var o=s.append("span").attr("class","myIO-status-bar-actions");(r||[]).forEach(function(h){o.append("button").attr("class","myIO-status-bar-btn").attr("type","button").text(h.label).on("click",h.handler)})}function Od(t){d3.select(t.dom.element).selectAll(".myIO-status-bar").remove()}var sy=["point","bar","histogram","hexbin","groupedBar"];function ay(t){var e=t.config.interactions.brush;if(!(!e||!e.enabled)){var r=(t.derived.currentLayers||[]).filter(function(g){return sy.indexOf(g.type)>-1});if(r.length!==0){B0(t);var i=e.direction==="x"?d3.brushX():e.direction==="y"?d3.brushY():d3.brush(),s=t.config.layout.margin,o=t.runtime.width-(s.left+s.right),h=t.runtime.height-(s.top+s.bottom);i.extent([[0,0],[o,h]]),i.on("brush",function(g){rx(t,g,r,e)}).on("end",function(g){nx(t,g,r,e)}),t.dom.chartArea.insert("g",":first-child").attr("class","myIO-brush").call(i),t.dom.chartArea.select(".myIO-brush .overlay").style("cursor","crosshair"),t.runtime._brushFn=i,d3.select(t.dom.element).on("keydown.brush",function(g){g.key==="Escape"&&t.runtime._brushed&&f6(t)})}}}function rx(t,e,r,i){if(e.selection){var s=e.selection,o=i.direction;r.forEach(function(h){var g=ly(t,h);t.dom.chartArea.selectAll(g).each(function(v){var x=oy(t,v,h,s,o);d3.select(this).style("opacity",x?1:"var(--chart-brush-dim-opacity)")})})}}function nx(t,e,r,i){if(!e.selection){f6(t);return}var s=e.selection,o=i.direction,h=ix(t,s,o),g=[],v=[];r.forEach(function(_){_.data.forEach(function(w){oy(t,w,_,s,o)&&(g.push(w),w._source_key&&v.push(w._source_key))})}),t.runtime._brushed={data:g,extent:h,keys:v};var x=r.reduce(function(_,w){return _+w.data.length},0);k0(t,g.length+" of "+x+" points selected",[{label:"Clear",handler:function(){f6(t)}}]),t.emit("brushed",{data:g,extent:h,keys:v,layerLabel:r.length===1?r[0].label:null})}function f6(t){(t.derived.currentLayers||[]).forEach(function(e){if(sy.indexOf(e.type)>-1){var r=ly(t,e);t.dom.chartArea.selectAll(r).style("opacity",1)}}),t.runtime._brushFn&&t.dom.chartArea.select(".myIO-brush").call(t.runtime._brushFn.move,null),t.runtime._brushed=null,Od(t),t.emit("brushed",{data:[],extent:null,keys:[],layerLabel:null})}function oy(t,e,r,i,s){var o=r.mapping.x_var,h=r.mapping.y_var,g=t.xScale(e[o]),v=t.yScale(e[h]);return isNaN(g)||isNaN(v)?!1:s==="x"?g>=i[0]&&g<=i[1]:s==="y"?v>=i[0]&&v<=i[1]:g>=i[0][0]&&g<=i[1][0]&&v>=i[0][1]&&v<=i[1][1]}function M0(t,e,r){return typeof t.invert=="function"?[t.invert(e),t.invert(r)]:null}function ix(t,e,r){return r==="x"?{x:M0(t.xScale,e[0],e[1]),y:null}:r==="y"?{x:null,y:M0(t.yScale,e[1],e[0])}:{x:M0(t.xScale,e[0][0],e[1][0]),y:M0(t.yScale,e[1][1],e[0][1])}}function ly(t,e){return e.type==="groupedBar"?".tag-grouped-bar-g rect":"."+xr(e.type,t.dom.element.id,e.label)}function B0(t){t.dom&&t.dom.chartArea&&t.dom.chartArea.selectAll(".myIO-brush").remove(),t.dom&&t.dom.element&&d3.select(t.dom.element).on("keydown.brush",null),t.runtime._brushed=null}var d6=30;function cy(t,e,r){_2(t);var i=d3.select(t.dom.element),s=i.append("div").attr("class","myIO-popover").attr("role","dialog").attr("aria-label","Annotate data point"),o=s.append("div").attr("class","myIO-popover-field");o.append("label").text("Label:");var h;r.presetLabels&&r.presetLabels.length>0?(h=o.append("select").attr("class","myIO-popover-input"),r.presetLabels.forEach(function(w){h.append("option").attr("value",w).text(w)}),r.existingLabel&&h.property("value",r.existingLabel)):(h=o.append("input").attr("class","myIO-popover-input").attr("type","text").attr("maxlength",d6).attr("placeholder","Enter label..."),r.existingLabel&&h.property("value",r.existingLabel));var g=null;if(r.categoryColors){var v=s.append("div").attr("class","myIO-popover-field");v.append("label").text("Category:");var x=v.append("div").attr("class","myIO-popover-colors");Object.keys(r.categoryColors).forEach(function(w){var O=r.categoryColors[w];x.append("button").attr("class","myIO-popover-color-btn").attr("type","button").attr("title",w).attr("aria-label",w).style("background-color",O).on("click",function(){x.selectAll(".myIO-popover-color-btn").classed("selected",!1),d3.select(this).classed("selected",!0),g=O})})}var _=s.append("div").attr("class","myIO-popover-buttons");r.existingLabel&&r.onRemove&&_.append("button").attr("class","myIO-popover-btn myIO-popover-btn--danger").attr("type","button").text("Remove").on("click",function(){_2(t),r.onRemove()}),_.append("button").attr("class","myIO-popover-btn").attr("type","button").text("Cancel").on("click",function(){_2(t),r.onCancel&&r.onCancel()}),_.append("button").attr("class","myIO-popover-btn myIO-popover-btn--primary").attr("type","button").text("Apply").on("click",function(){var w=h.property("value").trim().substring(0,d6);w&&(_2(t),r.onApply(w,g))}),sx(t,s,e),h.node().focus(),s.on("keydown",function(w){if(w.key==="Enter"){var O=h.property("value").trim().substring(0,d6);O&&(_2(t),r.onApply(O,g))}w.key==="Escape"&&(_2(t),r.onCancel&&r.onCancel())})}function sx(t,e,r){var i=t.config.layout.margin,s=r.px+i.left,o=r.py+i.top-10;e.style("left",Math.max(4,Math.min(s-80,t.runtime.totalWidth-180))+"px").style("bottom",t.runtime.height-o+8+"px")}function _2(t){d3.select(t.dom.element).selectAll(".myIO-popover").remove()}var ax=["point","bar","histogram","hexbin","groupedBar"];function uy(t){var e=t.config.interactions.annotation;if(!(!e||!e.enabled)){t.runtime._annotations||(t.runtime._annotations=[]);var r=(t.derived.currentLayers||[]).filter(function(i){return ax.indexOf(i.type)>-1});r.forEach(function(i){var s="."+xr(i.type,t.dom.element.id,i.label);t.dom.chartArea.selectAll(s).on("click.annotate",function(o,h){o.stopPropagation();var g=ux(t,h._source_key);cy(t,{px:t.xScale(h[i.mapping.x_var]),py:t.yScale(h[i.mapping.y_var])},{presetLabels:e.presetLabels,categoryColors:e.categoryColors,existingLabel:g?g.label:null,onApply:function(v,x){ox(t,h,i,v,x)},onRemove:function(){lx(t,h._source_key)},onCancel:function(){}})})}),F0(t),h6(t)}}function ox(t,e,r,i,s){t.runtime._annotations=t.runtime._annotations.filter(function(h){return h._source_key!==e._source_key});var o={_source_key:e._source_key,x:e[r.mapping.x_var],y:e[r.mapping.y_var],x_var:r.mapping.x_var,y_var:r.mapping.y_var,label:i,category:s||null,layerLabel:r.label,timestamp:new Date().toISOString()};t.runtime._annotations.push(o),F0(t),h6(t),t.emit("annotated",{annotations:t.runtime._annotations,action:"add",latest:o})}function lx(t,e){var r=t.runtime._annotations.find(function(i){return i._source_key===e});t.runtime._annotations=t.runtime._annotations.filter(function(i){return i._source_key!==e}),F0(t),h6(t),t.emit("annotated",{annotations:t.runtime._annotations,action:"remove",latest:r||null})}function cx(t){t.runtime._annotations=[],F0(t),Od(t),t.emit("annotated",{annotations:[],action:"clear",latest:null})}function F0(t){var e=t.dom.chartArea.selectAll(".myIO-annotations").data([0]);e=e.enter().append("g").attr("class","myIO-annotations").merge(e);var r=e.selectAll(".myIO-annotation-mark").data(t.runtime._annotations||[],function(o){return o._source_key});r.exit().remove();var i=r.enter().append("g").attr("class","myIO-annotation-mark");i.append("circle").attr("r",8).attr("fill","none").attr("stroke-width",2),i.append("text").attr("dy",-12).attr("text-anchor","middle").attr("class","myIO-annotation-label");var s=i.merge(r);s.attr("transform",function(o){return"translate("+t.xScale(o.x)+","+t.yScale(o.y)+")"}),s.select("circle").style("stroke",function(o){return o.category||"var(--chart-annotation-ring)"}),s.select("text").text(function(o){return o.label.length>30?o.label.substring(0,27)+"\u2026":o.label}).style("font-size","var(--chart-annotation-font-size)").style("fill","var(--chart-text-color)")}function h6(t){var e=(t.runtime._annotations||[]).length;if(e===0){Od(t);return}k0(t,e+" annotation"+(e===1?"":"s"),[{label:"Export",handler:function(){var r=t.runtime._annotations||[];r.length>0&&A0(t.dom.element.id+"_annotations.csv",r)}},{label:"Clear",handler:function(){cx(t)}}])}function ux(t,e){return(t.runtime._annotations||[]).find(function(r){return r._source_key===e})}function fy(t){_2(t)}var Mh=new Map;function p6(t){return t&&t.config&&t.config.interactions&&t.config.interactions.linked}function m6(t){var e=p6(t);return e&&e.cursor===!0&&e.group?e.group:null}function hy(t){var e=m6(t);if(e){var r=Mh.get(e);r||(r=new Set,Mh.set(e,r)),r.add(t),t.runtime=t.runtime||{},t.runtime._linkedCursor||(t.runtime._linkedCursor={lastTs:0})}}function py(t){Mh.forEach(function(e,r){e.delete(t)&&e.size===0&&Mh.delete(r)})}function my(t,e){var r=m6(t);if(r){var i=Mh.get(r);i&&i.forEach(function(s){s!==t&&dx(s,e)})}}function fx(t){var e=m6(t);e&&my(t,{sourceId:t.element&&t.element.id,group:e,ts:typeof performance<"u"?performance.now():Date.now(),clear:!0})}function $0(t,e,r,i){var s=p6(t);if(!(!s||s.cursor!==!0)){var o=s.keyColumn,h=e&&o&&e[o]!==void 0?e[o]:null;my(t,{sourceId:t.element&&t.element.id,group:s.group,keyValue:h,xValue:r,tooltip:i||null,ts:typeof performance<"u"?performance.now():Date.now()})}}function P0(t){var e=p6(t);!e||e.cursor!==!0||fx(t)}function dx(t,e){var r=t.runtime&&t.runtime._linkedCursor;if(r&&!(typeof e.ts=="number"&&e.ts+o)return null;var v=r(h);return Number.isFinite(v)?v:null}var x=typeof r.domain=="function"?r.domain():[];if(x.indexOf(e)===-1)return null;var _=r(e);return Number.isFinite(_)?_:null}function px(t,e){var r=t.plot||t.svg;if(!(!r||typeof r.select!="function")){var i=r.select("line.myIO-hover-rule");i.empty()&&(i=r.append("line").attr("class","myIO-hover-rule"));var s=t.margin||{},o=(t.height||0)-((+s.top||0)+(+s.bottom||0));i.attr("x1",e).attr("x2",e).attr("y1",0).attr("y2",o).style("display",null)}}function dy(t){var e=t.plot||t.svg;!e||typeof e.select!="function"||e.select("line.myIO-hover-rule").remove()}var gy=["point","bar","histogram","hexbin","groupedBar","waffle","beeswarm","lollipop","dumbbell"];function yy(t){var e=t.config.interactions.linked;if(!(!e||!e.enabled)&&!(typeof crosstalk>"u")){g6(t);var r=new crosstalk.SelectionHandle(e.group),i=e.filter?new crosstalk.FilterHandle(e.group):null;t.runtime._crosstalkSel=r,t.runtime._crosstalkFil=i,(e.mode==="source"||e.mode==="both")&&(t.runtime._linkedBrushHandler=function(s){s.keys&&s.keys.length>0?r.set(s.keys):r.clear()},t.on("brushed",t.runtime._linkedBrushHandler)),(e.mode==="target"||e.mode==="both")&&(r.on("change.myIO",function(s){mx(t,s.value)}),i&&i.on("change.myIO",function(s){gx(t,s.value)}))}}function mx(t,e){var r=(t.derived.currentLayers||[]).filter(function(i){return gy.indexOf(i.type)>-1});r.forEach(function(i){var s="."+xr(i.type,t.dom.element.id,i.label);t.dom.chartArea.selectAll(s).each(function(o){if(!e)d3.select(this).style("opacity",1);else{var h=e.indexOf(o._source_key)>-1;d3.select(this).style("opacity",h?1:"var(--chart-brush-dim-opacity)")}})})}function gx(t,e){var r=(t.derived.currentLayers||[]).filter(function(i){return gy.indexOf(i.type)>-1});r.forEach(function(i){var s="."+xr(i.type,t.dom.element.id,i.label);t.dom.chartArea.selectAll(s).each(function(o){if(!e)d3.select(this).style("display",null);else{var h=e.indexOf(o._source_key)>-1;d3.select(this).style("display",h?null:"none")}})})}function g6(t){t.runtime._linkedBrushHandler&&(t.off("brushed",t.runtime._linkedBrushHandler),t.runtime._linkedBrushHandler=null),t.runtime._crosstalkSel&&(t.runtime._crosstalkSel.close(),t.runtime._crosstalkSel=null),t.runtime._crosstalkFil&&(t.runtime._crosstalkFil.close(),t.runtime._crosstalkFil=null),py(t)}function vy(t){var e=t.config.interactions.sliders;if(!(!e||e.length===0)){y6(t),t.runtime._sliderTimers=[];var r=d3.select(t.dom.element),i=r.append("div").attr("class","myIO-slider-wrapper");e.forEach(function(s){var o=i.append("div").attr("class","myIO-slider-row");o.append("label").attr("class","myIO-slider-label").attr("for",t.dom.element.id+"-slider-"+s.param).text(s.label);var h=o.append("input").attr("type","range").attr("class","myIO-slider-input").attr("id",t.dom.element.id+"-slider-"+s.param).attr("min",s.min).attr("max",s.max).attr("step",s.step||"any").attr("aria-label",s.label).attr("aria-valuemin",s.min).attr("aria-valuemax",s.max).attr("aria-valuenow",s.value).property("value",s.value),g=o.append("span").attr("class","myIO-slider-value").text(by(s.value,s.step));if(!HTMLWidgets.shinyMode){h.attr("disabled",!0).attr("title","Parameter sliders require Shiny"),o.style("opacity","0.5");return}var v=t.runtime._sliderTimers.length;t.runtime._sliderTimers.push(null);var x=s.debounce||200;h.on("input",function(){var _=+this.value;g.text(by(_,s.step)),d3.select(this).attr("aria-valuenow",_),clearTimeout(t.runtime._sliderTimers[v]),t.runtime._sliderTimers[v]=setTimeout(function(){Shiny.onInputChange("myIO-"+t.dom.element.id+"-slider-"+s.param,_),t.emit("sliderChanged",{param:s.param,value:_})},x)})})}}function by(t,e){if(e&&e<1){var r=String(e).split(".")[1];return t.toFixed(r?r.length:2)}return String(t)}function y6(t){t.runtime._sliderTimers&&(t.runtime._sliderTimers.forEach(clearTimeout),t.runtime._sliderTimers=null),d3.select(t.dom.element).selectAll(".myIO-slider-wrapper").remove()}function yx(t){let e=document.createElement("div");return e.textContent=String(t),e.innerHTML}function _y(t){t.dom.tooltip=d3.select(t.dom.element).append("div").attr("class","toolTip").attr("role","status").attr("aria-live","polite").attr("aria-hidden","true"),t.dom.tooltipTitle=t.dom.tooltip.append("div").attr("class","toolTipTitle"),t.dom.tooltipBody=t.dom.tooltip.append("div").attr("class","toolTipBody"),t.runtime.tooltipHideTimer=null,t.captureLegacyAliases()}function Cd(t){d3.select(t.dom.element).select(".toolTipBox").remove(),d3.select(t.dom.element).select(".toolLine").remove(),d3.select(t.dom.element).select(".toolPointLayer").remove(),t.runtime.toolTipBox=null,t.runtime.toolLine=null,t.runtime.toolPointLayer=null,t.syncLegacyAliases()}function Sy(t,e,r){Cd(t),t.runtime.toolLine=t.dom.chartArea.append("line").attr("class","toolLine"),t.runtime.toolPointLayer=t.dom.chartArea.append("g").attr("class","toolPointLayer"),t.runtime.toolTipBox=t.dom.svg.append("rect").attr("class","toolTipBox").attr("opacity",0).attr("width",t.width-(t.margin.left+t.margin.right)).attr("height",t.height-(t.margin.top+t.margin.bottom)).attr("transform","translate("+t.margin.left+","+t.margin.top+")").on("mouseover",function(i){e(i)}).on("mousemove",function(i){e(i)}).on("mouseout",function(){typeof r=="function"&&r()}).on("touchstart",function(i){i.preventDefault(),e(i)}).on("touchmove",function(i){i.preventDefault(),e(i)}).on("touchend",function(){typeof r=="function"&&r()}),t.syncLegacyAliases()}function S2(t,e){if(!t.dom.tooltip)return;clearTimeout(t.runtime.tooltipHideTimer);let r=e.pointer||[0,0],i=e.title||{},s=e.items||[],o=s.length===1&&s[0].color?s[0].color:null;t.dom.tooltipTitle.style("border-left-color",o||null).html(""+yx(xy(i))+"");let h=t.dom.tooltipBody.selectAll(".toolTipItem").data(s);h.exit().remove();let g=h.enter().append("div").attr("class","toolTipItem");g.append("span").attr("class","dot"),g.append("span").attr("class","toolTipLabel"),g.append("span").attr("class","toolTipValue"),g.merge(h).select(".dot").style("background-color",function(v){return v.color||"transparent"}),g.merge(h).select(".toolTipLabel").text(function(v){return v.label||""}),g.merge(h).select(".toolTipValue").text(function(v){return xy(v)}),t.dom.tooltip.style("display","inline-block").style("opacity",1).attr("aria-hidden","false"),bx(t,r)}function ku(t){t.dom.tooltip&&(clearTimeout(t.runtime.tooltipHideTimer),t.runtime.tooltipHideTimer=window.setTimeout(function(){t.dom.tooltip.style("display","none").style("opacity",0).attr("aria-hidden","true")},300))}function xy(t){if(t==null)return"";if(typeof t=="string")return t;let e=typeof t.format=="function"?t.format:function(i){return i},r=t.text!=null?t.text:t.value;return r==null?"":e(r)}function bx(t,e){let r=t.dom.element.getBoundingClientRect(),i=t.dom.tooltip.node();t.dom.tooltip.style("left",e[0]+12+"px").style("top",e[1]+12+"px");let s=i.getBoundingClientRect(),o=e[0]+12,h=e[1]+12;o+s.width>r.width&&(o=Math.max(8,e[0]-s.width-12)),h+s.height>r.height&&(h=Math.max(8,e[1]-s.height-12)),t.dom.tooltip.style("left",o+"px").style("top",h+"px")}var Ld=300;function Ey(t,e){var r=e||t.currentLayers||[],i=t,s=["text","yearMon"],o=s.indexOf(t.options.xAxisFormat)>-1?function(K){return K}:d3.format(t.options.xAxisFormat||""),h=d3.format(t.options.yAxisFormat||""),g=t.newScaleY?d3.format(t.newScaleY):h;Cd(t),r.forEach(function(K){["bar","point","hexbin","histogram","calendarHeatmap"].indexOf(K.type)>-1&&v(K)}),r.some(function(K){return K.type==="groupedBar"})&&t.chart.selectAll(".tag-grouped-bar-g rect").on("mouseout",J).on("mouseover",H).on("mousemove",H).on("touchstart",function(K){K.preventDefault(),H.call(this,K)}).on("touchmove",function(K){K.preventDefault(),H.call(this,K)}).on("touchend",J),r.length>0&&r.every(function(K){return["line","area"].indexOf(K.type)>-1})&&Sy(t,Z,oe),r.some(function(K){return K.type==="donut"})&&se(".donut","donut",function(K,k){return{title:{text:k.mapping.x_var+": "+K.data[k.mapping.x_var]},items:[{color:t.colorDiscrete(K.index),label:k.mapping.y_var,value:K.data[k.mapping.y_var]}]}}),r.some(function(K){return K.type==="treemap"})&&t.chart.selectAll(".root").on("mouseout",q).on("mouseover",re).on("mousemove",re).on("touchstart",function(K){K.preventDefault(),re.call(this,K)}).on("touchmove",function(K){K.preventDefault(),re.call(this,K)}).on("touchend",q);function v(K){var k=fl(K),de=k.getHoverSelector?k.getHoverSelector(t,K):"."+xr(K.type,t.element.id,K.label);t.chart.selectAll(de).on("mouseout",function(){_.call(this,K)}).on("mouseover",function(ze){x.call(this,ze,K)}).on("mousemove",function(ze){x.call(this,ze,K)}).on("touchstart",function(ze){ze.preventDefault(),x.call(this,ze,K)}).on("touchmove",function(ze){ze.preventDefault(),x.call(this,ze,K)}).on("touchend",function(){_.call(this,K)})}function x(K,k){var de=d3.select(this).data()[0],ze=fl(k),er=w(k,ze,de,this);HTMLWidgets.shinyMode&&Shiny.onInputChange("myIO-"+i.element.id+"-rollover",JSON.stringify(de)),O(this,k,de),S2(i,{pointer:ue(K),title:er.title,items:er.items});var Er=k.type==="hexbin"?i.xScale?i.xScale.invert(de.x):null:k.type==="histogram"?de.x0:k.type==="calendarHeatmap"?de.date instanceof Date?de.date:new Date(de[k.mapping.date]+"T00:00:00Z"):de[k.mapping.x_var];$0(i,de,Er,er)}function _(K){I(this,K),ku(i),P0(i)}function w(K,k,de,ze){if(K.type==="hexbin"){var er=d3.format(",.2f");return{title:{text:"x: "+er(i.xScale.invert(de.x))+", y: "+er(i.yScale.invert(de.y))},items:[{color:d3.select(ze).attr("fill"),label:"Count",value:de.length}]}}if(K.type==="histogram")return{title:{text:"Bin: "+de.x0+" to "+de.x1},items:[{color:d3.select(ze).attr("fill"),label:"Count",value:de.length}]};if(K.type==="calendarHeatmap"){var Er=k.formatTooltip(i,de,K);return{title:{text:typeof Er.title=="string"?Er.title:Er.title.text},items:[{color:Er.color||d3.select(ze).attr("fill"),label:Er.label||K.label,value:Er.value}]}}var Ht=K.mapping.x_var+": "+o(de[K.mapping.x_var]),xn=i.newY?i.newY:K.mapping.y_var,$r=K.type==="point"||K.type==="bar"?K.mapping.y_var:K.label,Tn=Vs(i,K.label,K.color);if(k&&typeof k.formatTooltip=="function"){var In=k.formatTooltip(i,de,K);Ht=In.title||Ht,$r=In.label||$r,Tn=In.color||Tn}return{title:{text:Ht},items:[{color:Tn,label:$r,value:g(de[xn])}]}}function O(K,k){var de=d3.select(K),ze=k.type==="hexbin"?"#333":de.attr("fill")||de.style("fill")||Vs(i,k.label,k.color);if(k.type==="hexbin"){de.style("stroke",ze).style("stroke-width","2px");return}de.interrupt().style("stroke",ze).style("stroke-width","2px").style("stroke-opacity",.8),k.type==="point"&&de.attr("r",Math.max(+de.attr("r")||0,6))}function I(K,k){var de=d3.select(K);de.interrupt().transition().duration(Ld).style("stroke-width","0px").style("stroke","transparent").style("stroke-opacity",null),k.type==="point"&&de.transition().duration(Ld).attr("r",y2(i))}function H(K){var k=d3.select(this).data()[0],de=r[k.idx],ze=Vs(i,de.label,de.color);HTMLWidgets.shinyMode&&Shiny.onInputChange("myIO-"+i.element.id+"-rollover",JSON.stringify(k.data.values)),d3.select(this).interrupt().style("stroke",ze).style("stroke-width","2px").style("stroke-opacity",.8);var er={title:{text:de.mapping.x_var+": "+o(k.data[0])},items:[{color:ze,label:de.mapping.y_var,value:g(k[1]-k[0])}]};S2(i,{pointer:ue(K),title:er.title,items:er.items}),$0(i,k.data,k.data[0],er)}function J(){d3.select(this).interrupt().transition().duration(Ld).style("stroke-width","0px").style("stroke","transparent").style("stroke-opacity",null),ku(i),P0(i)}function Z(K){var k=d3.pointer(K,this),de=i.xScale.invert(k[0]),ze=[],er=d3.bisector(function($r){return+$r[0]}).left;if(r.forEach(function($r){var Tn=$r.data,In=$r.mapping.x_var,cr=i.newY?i.newY:$r.mapping.y_var||$r.mapping.high_y,bn=Tn.map(function(hi){return hi[In]}),mn=er(bn,de),qn=Tn[mn-1],Wt=Tn[mn],Pr=qn?Wt&&de-qn[In]>Wt[In]-de?Wt:qn:Wt;Pr&&ze.push({color:$r.color,label:$r.label,xVar:In,yVar:cr,displayValue:Pr.density!=null?Pr.density:Pr[cr],value:Pr})}),ze.length===0){oe();return}HTMLWidgets.shinyMode&&Shiny.onInputChange("myIO-"+i.element.id+"-rollover",JSON.stringify(ze.map(function($r){return $r.value})));var Er=ze[0].value[ze[0].xVar];i.toolLine.style("stroke","var(--chart-ref-line-color)").style("stroke-width","1px").style("stroke-dasharray","4,4").attr("x1",i.xScale(Er)).attr("x2",i.xScale(Er)).attr("y1",0).attr("y2",i.height-(i.margin.top+i.margin.bottom));var Ht=i.toolPointLayer.selectAll("circle").data(ze);Ht.exit().remove(),Ht.enter().append("circle").attr("r",4).merge(Ht).attr("cx",function($r){return i.xScale($r.value[$r.xVar])}).attr("cy",function($r){return i.yScale($r.value[$r.yVar])}).attr("fill","#ffffff").attr("stroke",function($r){return $r.color}).attr("stroke-width",2);var xn={title:{text:ze[0].xVar+": "+o(Er)},items:ze.map(function($r){return{color:$r.color,label:$r.label,value:g($r.displayValue)}})};S2(i,{pointer:ue(K),title:xn.title,items:xn.items}),$0(i,ze[0].value,Er,xn)}function oe(){i.toolLine&&i.toolLine.style("stroke","none"),i.toolPointLayer&&i.toolPointLayer.selectAll("*").remove(),ku(i),P0(i)}function se(K,k,de){var ze=r.filter(function(er){return er.type===k})[0];t.chart.selectAll(K).on("mouseout",function(){t.chart.selectAll(K).transition().duration(Ld).style("opacity",1),ku(i)}).on("mouseover",function(er,Er){t.chart.selectAll(K).style("opacity",.4),d3.select(this).style("opacity",.85);var Ht=de(Er,ze);S2(i,{pointer:ue(er),title:Ht.title,items:Ht.items})}).on("mousemove",function(er,Er){var Ht=de(Er,ze);S2(i,{pointer:ue(er),title:Ht.title,items:Ht.items})}).on("touchstart",function(er,Er){er.preventDefault(),t.chart.selectAll(K).style("opacity",.4),d3.select(this).style("opacity",.85);var Ht=de(Er,ze);S2(i,{pointer:ue(er),title:Ht.title,items:Ht.items})}).on("touchend",function(){t.chart.selectAll(K).transition().duration(Ld).style("opacity",1),ku(i)})}function re(K,k){for(var de=r.filter(function(er){return er.type==="treemap"})[0],ze=k;ze.depth>1;)ze=ze.parent;t.chart.selectAll(".root").style("opacity",.4),d3.select(this).style("opacity",.85),S2(i,{pointer:ue(K),title:{text:de.mapping.level_1+": "+k.data[de.mapping.level_1]},items:[{color:t.colorDiscrete(ze.data.id),label:k.data[de.mapping.level_2],value:k.value}]})}function q(){t.chart.selectAll(".root").transition().duration(Ld).style("opacity",1),ku(i)}function ue(K){return d3.pointer(K,i.dom.element)}}var vx=.05,xx=.15;function Ay(t,e){var r=t.margin,i=n1(t),s=[];e.forEach(function(v){var x=d3.extent(v.data,function(_){return+_[v.mapping.value]});s.push(x)});var o=d3.min(s,function(v){return v[0]}),h=d3.max(s,function(v){return v[1]}),g=d3.scaleLinear().domain([o,h]).nice().range([0,t.width-(r.left+r.right)]);e.forEach(function(v){var x=v.data.map(function(_){return _[v.mapping.value]});v.bins=d3.bin().domain(g.domain()).thresholds(g.ticks(v.mapping.bins))(x),v.max_value=d3.max(v.bins,function(_){return _.length})}),t.derived.xScale=g,t.derived.yScale=d3.scaleLinear().domain([0,d3.max(e,function(v){return v.max_value})]).nice().range([i-(r.top+r.bottom),0])}function Ty(t,e,r){var i=t.margin,s=[],o=[],h=[],g=[],v=r||{},x=v.xExtentFields||["x_var"],_=v.yExtentFields||["y_var"],w=e.filter(function(k){var de=k.scaleHints;return!(de&&Array.isArray(de.xExtentFields)&&de.xExtentFields.length===0&&Array.isArray(de.yExtentFields)&&de.yExtentFields.length===0)});w.forEach(function(k){var de=k.scaleHints&&Array.isArray(k.scaleHints.xExtentFields)?k.scaleHints.xExtentFields:x,ze=[];de.forEach(function(Tn){var In=k.mapping[Tn]||Tn,cr=k.data.map(function(bn){return+bn[In]});ze=ze.concat(cr)});var er=d3.extent(ze.length>0?ze:[0]),Er=k.scaleHints&&Array.isArray(k.scaleHints.yExtentFields)?k.scaleHints.yExtentFields:_,Ht=[];Er.forEach(function(Tn){var In=k.mapping[Tn]||Tn,cr=k.data.map(function(bn){return+bn[In]});Ht=Ht.concat(cr)});var xn=d3.extent(Ht.length>0?Ht:[0],function(Tn){return Tn});s.push(er),o.push([xn[0],xn[1]]);var $r=k.mapping.x_var;h.push(k.data.map(function(Tn){return Tn[$r]})),g.push(k.data.map(function(Tn){var In=k.mapping.y_var||"y_var";return Tn[In]}))});var O=d3.min(s,function(k){return k[0]}),I=d3.max(s,function(k){return k[1]}),H=d3.min(s,function(k){return k[0]}),J=d3.max(s,function(k){return k[1]});t.derived.xCheck=H===0&&J===0,O==I&&(O=O-1,I=I+1);var Z=Math.max(Math.abs(I-O)*vx,.5),oe=[t.config.scales.xlim.min?+t.config.scales.xlim.min:O-Z,t.config.scales.xlim.max?+t.config.scales.xlim.max:I+Z];t.derived.xBanded=[].concat.apply([],h).map(function(k){try{return Array.isArray(k)?k[0]:k}catch{return}}).filter(wy);var se=d3.min(o,function(k){return k[0]}),re=d3.max(o,function(k){return k[1]});se==re&&(se=se-1,re=re+1);var q=Math.abs(re-se)*xx,ue=[t.config.scales.ylim.min?+t.config.scales.ylim.min:se-q,t.config.scales.ylim.max?+t.config.scales.ylim.max:re+q];t.derived.yBanded=[].concat.apply([],g).map(function(k){try{return Array.isArray(k)?k[0]:k}catch{return}}).filter(wy);var K=n1(t);v.xScaleType==="band"?t.derived.xScale=d3.scaleBand().range([0,t.width-(i.left+i.right)]).domain(t.config.scales.flipAxis===!0?t.derived.yBanded:t.derived.xBanded):t.derived.xScale=d3.scaleLinear().range([0,t.width-(i.right+i.left)]).domain(t.config.scales.flipAxis===!0?ue:oe),v.yScaleType==="band"?t.derived.yScale=d3.scaleBand().range([K-(i.top+i.bottom),0]).domain(t.config.scales.flipAxis===!0?t.derived.xBanded:t.derived.yBanded):t.derived.yScale=d3.scaleLinear().range([K-(i.top+i.bottom),0]).domain(t.config.scales.flipAxis===!0?oe:ue),t.config.scales.colorScheme&&t.config.scales.colorScheme.enabled&&(t.derived.colorDiscrete=d3.scaleOrdinal().range(t.config.scales.colorScheme.colors).domain(t.config.scales.colorScheme.domain),t.derived.colorContinuous=d3.scaleLinear().range(t.config.scales.colorScheme.colors).domain(t.config.scales.colorScheme.domain)),t.syncLegacyAliases()}function wy(t,e,r){return r.indexOf(t)===e}var Bh={xScaleType:"linear",yScaleType:"linear",xExtentFields:["x_var"],yExtentFields:["y_var"],domainMerge:"union"};function Iy(t){return t?Object.assign({},Bh,t):null}function _x(t){if(t&&t.scaleHints)return Iy(t.scaleHints);try{var e=fl(t);return Iy(e.constructor.scaleHints)}catch{return null}}function U0(t,e){var r=t&&t.config&&t.config.scales&&t.config.scales.categoricalScale;return r&&r[e+"Axis"]===!0?"band":"linear"}function Oy(t,e){var r=!!(t&&t.config&&t.config.scales&&t.config.scales.flipAxis),i=new Set,s=new Set,o=new Set,h=new Set,g="union";if((e||[]).forEach(function(v){var x=_x(v),_=U0(t,"x"),w=U0(t,"y"),O=x?x.xScaleType:_,I=x?x.yScaleType:w,H=r?I:O,J=r?O:I;r||(_==="band"&&(H="band"),w==="band"&&(J="band")),i.add(H),s.add(J);var Z=x&&Array.isArray(x.xExtentFields)?x.xExtentFields:Bh.xExtentFields;Z.forEach(function(se){o.add(se)});var oe=x&&Array.isArray(x.yExtentFields)?x.yExtentFields:Bh.yExtentFields;oe.forEach(function(se){h.add(se)}),x&&x.domainMerge==="independent"&&(g="independent")}),i.size>1||s.size>1)throw new Error("Mismatched scaleTypes across layers: x="+Array.from(i).join(", ")+", y="+Array.from(s).join(", ")+".");return{xScaleType:i.size>0?Array.from(i)[0]:U0(t,"x"),yScaleType:s.size>0?Array.from(s)[0]:U0(t,"y"),xExtentFields:Array.from(o).length>0?Array.from(o):Bh.xExtentFields,yExtentFields:Array.from(h).length>0?Array.from(h):Bh.yExtentFields,domainMerge:g}}function Nd(t){var e=t.derived.currentLayers||[],r=e.map(function(o){return fl(o).constructor.traits}),i=e[0]?e[0].type:null,s=Array.from(new Set(r.map(function(o){return o.legendType})));return{type:i,axesChart:r.some(function(o){return o.hasAxes}),histogram:r.length>0&&r.every(function(o){return o.binning}),continuousLegend:s.length===1&&s[0]==="continuous",ordinalLegend:s.length===1&&s[0]==="ordinal",referenceLines:r.some(function(o){return o.referenceLines})}}function Dd(t,e){if(e.axesChart)if(e.histogram)Ay(t,t.derived.currentLayers);else{var r=Oy(t,t.derived.currentLayers);Ty(t,t.derived.currentLayers,r)}}var Sx={line:"axes-continuous",point:"axes-continuous",area:"axes-continuous",bar:"axes-categorical",groupedBar:"axes-categorical",boxplot:"axes-categorical",violin:"axes-categorical",histogram:"axes-binned",heatmap:"axes-matrix",candlestick:"axes-continuous",waterfall:"axes-categorical",ridgeline:"axes-binned",rangeBar:"axes-continuous",sankey:"standalone-flow",hexbin:"axes-hex",treemap:"standalone-treemap",donut:"standalone-donut",gauge:"standalone-gauge",text:"axes-continuous",regression:"axes-continuous",bracket:"axes-continuous",comparison:"axes-categorical",qq:"axes-continuous",lollipop:"axes-categorical",dumbbell:"axes-categorical",waffle:"standalone-waffle",beeswarm:"axes-continuous",bump:"axes-continuous",survfit:"axes-continuous",histogram_fit:"axes-binned",quantile_dots:"axes-categorical",radar:"standalone-radar",funnel:"standalone-funnel",parallel:"standalone-parallel",calendarHeatmap:"standalone-calendar",fan:"axes-continuous"},Ex=new Set(["axes-continuous:axes-categorical","axes-categorical:axes-continuous","axes-binned:axes-continuous","axes-continuous:axes-binned"]);function wx(t){if(t.length<=1)return{valid:!0,errors:[]};let e=[],r=t.map(function(o){return Sx[o.type]||"unknown"}),i=r.filter(function(o){return o.startsWith("standalone")});i.length>0&&t.length>1&&e.push("Cannot mix standalone chart types with other layers."),i.length>1&&e.push("Standalone chart types must be used alone.");let s=Array.from(new Set(r));return s.length>1&&s.forEach(function(o,h){s.slice(h+1).forEach(function(g){Ex.has(o+":"+g)||e.push("Cannot mix layer groups '"+o+"' and '"+g+"'.")})}),{valid:e.length===0,errors:e}}function Ax(t,e){let r=[],i=[];return e?(Object.entries(e).forEach(function(s){let o=s[0],h=s[1],g=t.mapping?t.mapping[o]:null;if(h.required&&!g){r.push("Layer '"+t.label+"' is missing required mapping '"+o+"'.");return}if(!g)return;let v=Array.isArray(t.data)?typeof g=="string"?t.data.map(function(_){return _[g]}):t.data.map(function(){return g}):[];if(h.numeric&&v.find(function(w){return Number.isNaN(+w)})!==void 0&&r.push("Layer '"+t.label+"' field '"+g+"' must be numeric."),h.positive&&v.find(function(w){return+w<=0})!==void 0&&r.push("Layer '"+t.label+"' field '"+g+"' must be positive."),h.sorted){for(let _=1;_0&&i.push("Layer '"+t.label+"' field '"+g+"' contains "+x+" null/NaN values.")}),{errors:r,warnings:i}):{errors:r,warnings:i}}function V0(t){let e=t.derived.currentLayers||t.config.layers||[],r=wx(e);return r.valid?e.filter(function(i){let o=fl(i).constructor.dataContract,h=Ax(i,o);return h.warnings.forEach(function(g){console.warn("[myIO]",g)}),h.errors.length>0?(h.errors.forEach(function(g){console.warn("[myIO] Layer '"+i.label+"' removed:",g),t.emit("error",{message:g,layer:i})}),!1):!0}):(r.errors.forEach(function(i){console.warn("[myIO] Composition error:",i),t.emit("error",{message:i})}),[])}function G0(t,e){e.referenceLines&&Tx(t)}function Tx(t){var e=t.margin,r=t.options.transition.speed,i=[t.options.referenceLine.x],s=[t.options.referenceLine.y];if(t.options.referenceLine.x){var o=t.plot.selectAll(".ref-x-line").data(i);o.exit().transition().duration(100).style("opacity",0).attr("y2",t.height-(e.top+e.bottom)).remove();var h=o.enter().append("line").attr("class","ref-x-line").attr("fill","none").style("stroke","gray").style("stroke-width",3).attr("x1",function(x){return t.xScale(x)}).attr("x2",function(x){return t.xScale(x)}).attr("y1",t.height-(e.top+e.bottom)).attr("y2",t.height-(e.top+e.bottom)).transition().ease(d3.easeQuad).duration(r).attr("y2",0);o.merge(h).transition().ease(d3.easeQuad).duration(r).attr("x1",function(x){return t.xScale(x)}).attr("x2",function(x){return t.xScale(x)}).attr("y1",t.height-(e.top+e.bottom)).attr("y2",0)}else t.plot.selectAll(".ref-x-line").remove();if(t.options.referenceLine.y){var g=t.plot.selectAll(".ref-y-line").data(s);g.exit().transition().duration(100).attr("y2",t.width-(e.left+e.right)).style("opacity",0).remove();var v=g.enter().append("line").attr("class","ref-y-line").attr("fill","none").style("stroke","gray").style("stroke-width",3).attr("x1",0).attr("x2",0).attr("y1",function(x){return t.yScale(x)}).attr("y2",function(x){return t.yScale(x)}).transition().ease(d3.easeQuad).duration(r).attr("x2",t.width-(e.left+e.right));g.merge(v).transition().ease(d3.easeQuad).duration(r).attr("x1",0).attr("x2",t.width-(e.left+e.right)).attr("y1",function(x){return t.yScale(x)}).attr("y2",function(x){return t.yScale(x)})}else t.plot.selectAll(".ref-y-line").remove()}function Cy(t,e,r){let i=t.map(function(O){return O[r]}),s=t.map(function(O){return O[e]}),o={},h=s.length,g=0,v=0,x=0,_=0,w=0;for(let O=0;O0)return s.length}var o=r?r.clientWidth:this.controller.chart.runtime.totalWidth;return Math.max(Math.floor(o/(this.controller.config.minWidth||200)),1)}hasPanelData(){for(var e=0;e0)return!0;return!1}addLabel(){d3.select(this.element).append("div").attr("class","myIO-facet-label").text(this.facetValue)}renderPanel(){var e=this.buildPanelChart(),r=Nd(e);r.axesChart&&(Dd(e,r),this.applySharedDomains(e)),b0(e),e.dom.svg=e.svg,e.dom.plot=e.plot,e.dom.chartArea=e.chart,r.axesChart&&this.requiresClipPath(r.type)&&(this.setClipPath(e),x0(e,r,{isInitialRender:!0}),this.applyAxisSuppression(e),G0(e,r,{isInitialRender:!0})),this.renderLayers(e,this.layers),this.panelChart=e}buildPanelChart(){var e=this.controller.chart,r=Math.max(this.element.clientWidth||this.controller.config.minWidth||200,1),i=this.buildMargin(),s=Object.assign({},e.config,{layers:this.layers}),o={margin:i,suppressLegend:!0,suppressAxis:{xAxis:this.suppressX,yAxis:this.suppressY},xlim:s.scales.xlim,ylim:s.scales.ylim,categoricalScale:s.scales.categoricalScale,flipAxis:s.scales.flipAxis,colorScheme:s.scales.colorScheme?s.scales.colorScheme.enabled?[s.scales.colorScheme.colors,s.scales.colorScheme.domain,"on"]:[s.scales.colorScheme.colors,s.scales.colorScheme.domain,"off"]:null,xAxisFormat:s.axes.xAxisFormat,yAxisFormat:s.axes.yAxisFormat,toolTipFormat:s.axes.toolTipFormat,xTickLabels:s.axes.xTickLabels,xAxisLabel:s.axes.xAxisLabel,yAxisLabel:s.axes.yAxisLabel,dragPoints:!1,toggleY:null,toolTipOptions:s.interactions.toolTipOptions,transition:{speed:0},referenceLine:s.referenceLines};return{element:this.element,dom:{element:this.element},config:s,derived:{currentLayers:this.layers.slice()},runtime:{totalWidth:r,width:r,height:Fh,layout:e.runtime.layout,activeY:e.runtime.activeY,activeYFormat:e.runtime.activeYFormat},options:o,margin:i,width:r,height:Fh,totalWidth:r,layout:e.runtime.layout,newY:e.runtime.activeY,newScaleY:e.runtime.activeYFormat,plotLayers:this.layers,emit:function(){},dragPoints:function(){},updateRegression:function(){},syncLegacyAliases:function(){this.xScale=this.derived?this.derived.xScale:null,this.yScale=this.derived?this.derived.yScale:null,this.colorDiscrete=this.derived?this.derived.colorDiscrete:null,this.colorContinuous=this.derived?this.derived.colorContinuous:null,this.x_banded=this.derived?this.derived.xBanded:null,this.y_banded=this.derived?this.derived.yBanded:null,this.x_check=this.derived?this.derived.xCheck:null,this.currentLayers=this.derived?this.derived.currentLayers:null},captureLegacyAliases:function(){}}}buildMargin(){var e=this.controller.chart.config.layout.margin||{},r={top:e.top!=null?e.top:30,right:e.right!=null?e.right:5,bottom:e.bottom!=null?e.bottom:60,left:e.left!=null?e.left:50};return this.suppressX&&(r.bottom=Math.min(r.bottom,12)),this.suppressY&&(r.left=Math.min(r.left,12)),r}applySharedDomains(e){var r=this.controller.globalScaleSnapshot;!r||!e.derived||!e.derived.xScale||!e.derived.yScale||(r.xDomain&&e.derived.xScale.domain(r.xDomain.slice()),r.yDomain&&e.derived.yScale.domain(r.yDomain.slice()),r.xBanded&&(e.derived.xBanded=r.xBanded.slice()),r.yBanded&&(e.derived.yBanded=r.yBanded.slice()),typeof r.xCheck<"u"&&(e.derived.xCheck=r.xCheck),r.colorDiscrete&&(e.derived.colorDiscrete=r.colorDiscrete),r.colorContinuous&&(e.derived.colorContinuous=r.colorContinuous),e.syncLegacyAliases())}requiresClipPath(e){return e!=="donut"&&e!=="gauge"}setClipPath(e){var r=e.height-(e.margin.top+e.margin.bottom);e.dom.clipPath=e.dom.chartArea.append("defs").append("svg:clipPath").attr("id",e.dom.element.id+"clip").append("svg:rect").attr("x",0).attr("y",0).attr("width",e.width-(e.margin.left+e.margin.right)).attr("height",r),e.dom.chartArea.attr("clip-path","url(#"+e.dom.element.id+"clip)"),e.clipPath=e.dom.clipPath}applyAxisSuppression(e){this.suppressX&&e.plot.selectAll(".x-axis").remove(),this.suppressY&&e.plot.selectAll(".y-axis").remove()}renderLayers(e,r){for(var i=0;i1?_+": ":"";e.push(O+x.below+" of "+w+" dots below threshold of "+i+".")})}}}),e}function Dy(t){return String(t).replace(/[^a-zA-Z0-9_-]/g,"")}function Nx(t,e){if(!t.dom||!t.dom.chartArea||!e)return null;for(var r=t.dom.chartArea,i=[".tag-"+e.type+"-"+e.id,".tag-"+e.type+"-"+t.dom.element.id+"-"+Dy(e.label)],s=0;s0&&e.visibility!==!1})}destroy(){this.chart.dom.svg.on("keydown.a11y",null),this.liveRegion&&this.liveRegion.remove(),clearTimeout(this.debounceTimer)}};var J0=class{constructor(e){this.chart=e,this.tableContainer=null,this.visible=!1}initialize(){this.tableContainer=d3.select(this.chart.dom.element).append("div").attr("class","myIO-data-table myIO-sr-only").attr("role","region").attr("aria-label","Chart data table")}generate(){if(this.tableContainer){this.tableContainer.selectAll("*").remove();for(var e=this.chart.config.layers,r=500,i=new Map,s=[],o=0;or&&this.tableContainer.append("p").text("Showing first "+r+" of "+w.length+" rows")}}}renderFanTable(e,r){if(!(!e||e.length===0)){var i=e[0],s=i.mapping&&i.mapping.x_var?i.mapping.x_var:"x_var",o=new Map,h=[];e.forEach(function(I){var H=I.options&&I.options.interval_pct;if(H!=null){var J=Ry(H);h.push(+H),(Array.isArray(I.data)?I.data:[]).forEach(function(Z){var oe=String(Z[s]);o.has(oe)||o.set(oe,{x_var:Z[s]});var se=o.get(oe);se["low_"+J]=Z[I.mapping.low_y],se["high_"+J]=Z[I.mapping.high_y]})}}),h=Array.from(new Set(h)).sort(function(I,H){return I-H});var g=["x_var"];h.forEach(function(I){var H=Ry(I);g.push("low_"+H),g.push("high_"+H)});var v=Array.from(o.values()),x=v.slice(0,r),_=this.tableContainer.append("table").attr("aria-label","Data for "+(i._composite||"fan")),w=_.append("thead").append("tr");g.forEach(function(I){w.append("th").attr("scope","col").text(I)});var O=_.append("tbody");x.forEach(function(I){var H=O.append("tr");g.forEach(function(J){var Z=I[J];H.append("td").text(Z!=null?String(Z):"")})}),v.length>r&&this.tableContainer.append("p").text("Showing first "+r+" of "+v.length+" rows")}}toggle(){this.visible=!this.visible,this.visible?(this.generate(),this.tableContainer.classed("myIO-sr-only",!1),this.chart.dom.svg.attr("aria-hidden","true")):(this.tableContainer.classed("myIO-sr-only",!0),this.chart.dom.svg.attr("aria-hidden",null))}destroy(){this.tableContainer&&this.tableContainer.remove()}};function Ry(t){return String(t).replace(/\.0+$/,"").replace(/(\.\d*?)0+$/,"$1")}var _6=280,Mx=100,Bx={on(t,e){return this._listeners=this._listeners||{},this._listeners[t]=this._listeners[t]||[],this._listeners[t].push(e),this},off(t,e){return!this._listeners||!this._listeners[t]?this:(this._listeners[t]=e?this._listeners[t].filter(function(r){return r!==e}):[],this)},emit(t,e){return!this._listeners||!this._listeners[t]?this:(this._listeners[t].forEach(function(r){r(e)}),this)}},K0=class{constructor(e){Object.assign(this,Bx),this._listeners={},this.config=e.config,this.dom={element:e.element},this.derived={},this.runtime={renderGen:0,resizeTimer:null,width:Math.max(e.width,_6),height:e.height,totalWidth:Math.max(e.width,_6),layout:"grouped",activeY:null,activeYFormat:null,tooltipHideTimer:null},this.config.sparkline&&this.applySparklineOverrides(),window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(this.config.transitions.speed=0),this.runtime.width=this.runtime.totalWidth,this.syncLegacyAliases(),this.draw()}syncLegacyAliases(){this.element=this.dom?this.dom.element:null,this.svg=this.dom?this.dom.svg:null,this.plot=this.dom?this.dom.plot:null,this.chart=this.dom?this.dom.chartArea:null,this.legendArea=this.dom?this.dom.legendArea:null,this.clipPath=this.dom?this.dom.clipPath:null,this.tooltip=this.dom?this.dom.tooltip:null,this.toolTipTitle=this.dom?this.dom.tooltipTitle:null,this.toolTipBody=this.dom?this.dom.tooltipBody:null,this.plotLayers=this.config?this.config.layers:null,this.options=this.config?{margin:this.config.layout.margin,suppressLegend:this.config.layout.suppressLegend,suppressAxis:this.config.layout.suppressAxis,xlim:this.config.scales.xlim,ylim:this.config.scales.ylim,categoricalScale:this.config.scales.categoricalScale,flipAxis:this.config.scales.flipAxis,colorScheme:this.config.scales.colorScheme?this.config.scales.colorScheme.enabled?[this.config.scales.colorScheme.colors,this.config.scales.colorScheme.domain,"on"]:[this.config.scales.colorScheme.colors,this.config.scales.colorScheme.domain,"off"]:null,xAxisFormat:this.config.axes.xAxisFormat,yAxisFormat:this.config.axes.yAxisFormat,toolTipFormat:this.config.axes.toolTipFormat,xTickLabels:this.config.axes.xTickLabels,xAxisLabel:this.config.axes.xAxisLabel,yAxisLabel:this.config.axes.yAxisLabel,dragPoints:this.config.interactions.dragPoints,toggleY:this.config.interactions.toggleY&&this.config.interactions.toggleY.variable?[this.config.interactions.toggleY.variable,this.config.interactions.toggleY.format]:null,toolTipOptions:this.config.interactions.toolTipOptions,transition:this.config.transitions,referenceLine:this.config.referenceLines}:null,this.margin=this.config?this.config.layout.margin:null,this.width=this.runtime?this.runtime.width:null,this.height=this.runtime?this.runtime.height:null,this.totalWidth=this.runtime?this.runtime.totalWidth:null,this.layout=this.runtime?this.runtime.layout:null,this.newY=this.runtime?this.runtime.activeY:null,this.newScaleY=this.runtime?this.runtime.activeYFormat:null,this.toolLine=this.runtime?this.runtime.toolLine:null,this.toolTipBox=this.runtime?this.runtime.toolTipBox:null,this.toolPointLayer=this.runtime?this.runtime.toolPointLayer:null,this.xScale=this.derived?this.derived.xScale:null,this.yScale=this.derived?this.derived.yScale:null,this.colorDiscrete=this.derived?this.derived.colorDiscrete:null,this.colorContinuous=this.derived?this.derived.colorContinuous:null,this.x_banded=this.derived?this.derived.xBanded:null,this.y_banded=this.derived?this.derived.yBanded:null,this.x_check=this.derived?this.derived.xCheck:null,this.currentLayers=this.derived?this.derived.currentLayers:null,this.layerIndex=this.derived?this.derived.layerIndex:null}captureLegacyAliases(){!this.dom||!this.runtime||!this.derived||(this.dom.svg=this.svg||this.dom.svg,this.dom.plot=this.plot||this.dom.plot,this.dom.chartArea=this.chart||this.dom.chartArea,this.dom.legendArea=this.legendArea||this.dom.legendArea,this.dom.clipPath=this.clipPath||this.dom.clipPath,this.dom.tooltip=this.tooltip||this.dom.tooltip,this.dom.tooltipTitle=this.toolTipTitle||this.dom.tooltipTitle,this.dom.tooltipBody=this.toolTipBody||this.dom.tooltipBody,this.runtime.layout=this.layout||this.runtime.layout,this.runtime.activeY=this.newY||this.runtime.activeY,this.runtime.activeYFormat=this.newScaleY||this.runtime.activeYFormat,this.runtime.toolLine=this.toolLine||this.runtime.toolLine,this.runtime.toolTipBox=this.toolTipBox||this.runtime.toolTipBox,this.runtime.toolPointLayer=this.toolPointLayer||this.runtime.toolPointLayer,this.derived.xScale=this.xScale||this.derived.xScale,this.derived.yScale=this.yScale||this.derived.yScale,this.derived.colorDiscrete=this.colorDiscrete||this.derived.colorDiscrete,this.derived.colorContinuous=this.colorContinuous||this.derived.colorContinuous,this.derived.xBanded=this.x_banded||this.derived.xBanded,this.derived.yBanded=this.y_banded||this.derived.yBanded,this.derived.xCheck=this.x_check||this.derived.xCheck,this.derived.currentLayers=this.currentLayers||this.derived.currentLayers,this.derived.layerIndex=this.layerIndex||this.derived.layerIndex,this.syncLegacyAliases())}draw(){b0(this),this.captureLegacyAliases(),this.initialize()}initialize(){this.derived.currentLayers=this.config.layers,this.syncLegacyAliases(),this.themeManager=new j0(this.dom.element,this.config),this.themeManager.initialize(),_y(this),this.config.sparkline||(this.keyboardNav=new X0(this),this.keyboardNav.initialize(),this.dataTable=new J0(this),this.dataTable.initialize(),Y0(this)),this.captureLegacyAliases(),this.derived.currentLayers.length>0&&this.setClipPath(this.derived.currentLayers[0].type),this.renderCurrentLayers({isInitialRender:!0})}applySparklineOverrides(){this.config.layout.margin={top:1,right:1,bottom:1,left:1},this.config.layout.suppressLegend=!0,this.config.layout.suppressAxis={xAxis:!0,yAxis:!0},this.config.interactions.brush&&(this.config.interactions.brush.enabled=!1),this.config.interactions.annotation&&(this.config.interactions.annotation.enabled=!1),this.config.interactions.linked&&(this.config.interactions.linked.enabled=!1),this.config.interactions.sliders=[],this.config.interactions.dragPoints=!1,this.config.referenceLines={x:null,y:null},this.dom.element.dataset.sparkline="true"}renderCurrentLayers(e){let r=e||{},i=++this.runtime.renderGen,s=()=>this.runtime&&this.runtime.renderGen===i;if(this.config.facet&&this.config.facet.enabled){this.facetController||(this.facetController=new z0(this)),this.facetController.initialize();return}else this.facetController&&(this.facetController.destroy(),this.facetController=null);try{if(this.dom.chartArea){this.dom.chartArea.selectAll("*").interrupt();var o=this.derived.currentLayers.map(function(x){return x.label}),h=this.config.layers.map(function(x){return x.label}),g=this.dom.chartArea;h.forEach(function(x){if(o.indexOf(x)===-1){var _=String(x).replace(/\s+/g,"");g.selectAll("[class*='tag-'][class*='-"+_+"']").remove()}})}if(this.emit("beforeRender",{options:r}),v0(this),this.derived.currentLayers=V0(this),this.syncLegacyAliases(),this.clearEmptyState(),!s())return;if(this.derived.currentLayers.length===0){this.renderEmptyState(),this.config.sparkline||Y0(this);return}let v=Nd(this);if(Dd(this,v),this.syncLegacyAliases(),!s())return;l6(this),this.emit("afterScales",{state:v}),x0(this,v,r),this.routeLayers(this.derived.currentLayers),G0(this,v,r),ey(this,v),Ey(this),B0(this),this.config.interactions.brush&&this.config.interactions.brush.enabled&&ay(this),this.config.interactions.annotation&&this.config.interactions.annotation.enabled&&uy(this),this.config.interactions.linked&&this.config.interactions.linked.enabled&&yy(this),this.config.interactions.linked&&this.config.interactions.linked.cursor===!0&&hy(this),this.config.interactions.sliders&&this.config.interactions.sliders.length>0&&vy(this),this.emit("afterRender",{state:v}),this.config.sparkline||Y0(this)}catch(v){throw console.warn("[myIO] Render error:",v.message),this.emit("error",{message:v.message,error:v}),v}}clearEmptyState(){this.dom&&this.dom.svg&&this.dom.svg.selectAll(".myIO-empty-state").remove(),this.dom&&this.dom.element&&d3.select(this.dom.element).select(".myIO-fab").style("display",null)}renderEmptyState(){this.dom.chartArea&&this.dom.chartArea.selectAll("*").interrupt().remove(),this.dom.plot&&(this.dom.plot.selectAll(".x-axis, .y-axis").interrupt().remove(),this.dom.plot.selectAll(".ref-x-line, .ref-y-line").remove()),Cd(this),ku(this),this.runtime&&this.runtime._sheetOpen&&Ru(this,{returnFocus:!1}),this.dom.element&&d3.select(this.dom.element).select(".myIO-fab").style("display","none"),this.dom.svg&&(this.dom.svg.selectAll(".myIO-empty-state").remove(),this.dom.svg.append("text").attr("class","myIO-empty-state").attr("x",this.runtime.totalWidth/2).attr("y",this.runtime.height/2).text("No data to display"))}addButtons(){l6(this)}toggleVarY(e){this.runtime.activeY=e[0],this.runtime.activeYFormat=e[1],this.syncLegacyAliases(),this.renderCurrentLayers()}toggleGroupedLayout(e){var r=w0(e,this),i=e.map(function(o){return o.color}),s=(this.runtime.width-(this.config.layout.margin.right+this.config.layout.margin.left))/(r[0].length+1)/i.length;this.runtime.layout==="stacked"?(S0(this,r,i,s),this.runtime.layout="grouped"):(E0(this,r,i,s),this.runtime.layout="stacked"),this.syncLegacyAliases()}setClipPath(e){switch(e){case"donut":case"gauge":break;default:var r=n1(this);this.dom.clipPath=this.dom.chartArea.append("defs").append("svg:clipPath").attr("id",this.dom.element.id+"clip").append("svg:rect").attr("x",0).attr("y",0).attr("width",this.runtime.width-(this.config.layout.margin.left+this.config.layout.margin.right)).attr("height",r-(this.config.layout.margin.top+this.config.layout.margin.bottom)),this.dom.chartArea.attr("clip-path","url(#"+this.dom.element.id+"clip)"),this.syncLegacyAliases()}}routeLayers(e){var r=this;this.derived.layerIndex=this.config.layers.map(function(i){return i.label}),this.syncLegacyAliases(),e.forEach(function(i){var s=fl(i);if(s&&typeof s.render=="function"){s.render(r,i,e),r.captureLegacyAliases();var o=i.options&&i.options.opacity!=null?i.options.opacity:1;if(o<1){var h=String(i.label).replace(/\s+/g,"");r.dom.chartArea.selectAll("[class*='tag-'][class*='-"+h+"']").style("opacity",o)}}})}removeLayers(e){e.forEach(r=>{ny().forEach(function(i){typeof i.remove=="function"?i.remove(this,{label:r}):["line","bar","point","regression-line","hexbin","area","crosshairY","crosshairX"].forEach(function(s){d3.selectAll("."+xr(s,this.dom.element.id,r)).transition().duration(500).style("opacity",0).remove()},this)},this)})}dragPoints(e){iy(this,e)}updateOrdinalColorLegend(e){od(this,e)}updateRegression(e,r){let i=(this.config.layers||[]).find(function(s){return s.label===r&&s.type==="point"});i&&(this.config.layers||[]).forEach(function(s){if(s.type!=="line"||s.transform!=="lm"||!s.mapping||!i.mapping||s.mapping.x_var!==i.mapping.x_var||s.mapping.y_var!==i.mapping.y_var)return;let o=Cy(i.data,i.mapping.y_var,i.mapping.x_var),h=i.data.map(function(g){return{...g,[s.mapping.y_var]:o.fn(g[s.mapping.x_var])}}).sort(function(g,v){return g[s.mapping.x_var]-v[s.mapping.x_var]});s.data=h,u6("line").render(this,{...s,color:e||s.color},this.config.layers)},this)}updateChart(e){let r=this.derived.layerIndex||[];this.config=e,this.derived.currentLayers=this.config.layers,this.syncLegacyAliases();let i=this.config.layers.map(function(o){return o.label}),s=r.filter(function(o){return!i.includes(o)});this.removeLayers(s),this.renderCurrentLayers()}updateData(e){if(!Array.isArray(e)||!this.config||!Array.isArray(this.config.layers))return;let r=Object.create(null);this.config.layers.forEach(function(i){r[i.label]=i}),e.forEach(function(i){i&&Object.prototype.hasOwnProperty.call(r,i.label)&&Array.isArray(i.data)&&(r[i.label].data=i.data)}),this.syncLegacyAliases(),this.renderCurrentLayers()}resize(e,r){if(!e||!r||e<2||r<2)return;let i=this.runtime&&this.runtime._sheetOpen===!0;i&&Ru(this,{returnFocus:!1}),this.runtime.totalWidth=Math.max(e,_6),this.runtime.width=this.runtime.totalWidth,this.runtime.height=r,this.syncLegacyAliases(),clearTimeout(this.runtime.resizeTimer),this.runtime.resizeTimer=setTimeout(()=>{Tg(this),this.captureLegacyAliases(),this.renderCurrentLayers(),i&&this.derived&&this.derived.currentLayers&&this.derived.currentLayers.length>0&&D0(this),this.emit("resize",{width:this.runtime.width,height:this.runtime.height})},Mx)}destroy(){this.emit("destroy",{}),clearTimeout(this.runtime&&this.runtime.resizeTimer),clearTimeout(this.runtime&&this.runtime.tooltipHideTimer),this.facetController&&(this.facetController.destroy(),this.facetController=null),this.keyboardNav&&this.keyboardNav.destroy(),this.dataTable&&this.dataTable.destroy(),this.themeManager&&this.themeManager.destroy(),this.runtime&&this.runtime._sheetOpen&&Ru(this,{returnFocus:!1}),clearTimeout(this.runtime&&this.runtime._sheetCloseTimer),B0(this),fy(this),g6(this),y6(this),this.dom&&this.dom.element&&d3.select(this.dom.element).on("keydown.brush",null),this.dom&&this.dom.chartArea&&this.dom.chartArea.selectAll("*").interrupt(),this.dom&&this.dom.svg&&this.dom.svg.remove(),this.dom&&this.dom.tooltip&&this.dom.tooltip.remove(),this.dom&&this.dom.element&&d3.select(this.dom.element).selectAll(".myIO-fab, .myIO-panel, .myIO-sheet-backdrop").remove(),Cd(this),this._listeners={},this.config=null,this.derived=null,this.dom=null,this.runtime=null}};var Q0=class{constructor({max:e=128}={}){this.max=e,this.lru=new Map,this.inflight=new Map}get(e){if(!this.lru.has(e))return;let r=this.lru.get(e);return this.lru.delete(e),this.lru.set(e,r),r}set(e,r){for(this.lru.has(e)&&this.lru.delete(e),this.lru.set(e,r);this.lru.size>this.max;){let i=this.lru.keys().next().value;this.lru.delete(i)}}delete(e){this.lru.delete(e)}clear(){this.lru.clear(),this.inflight.clear()}size(){return this.lru.size}inflightOrStore(e,r){if(this.inflight.has(e))return this.inflight.get(e);let i=r();return this.inflight.set(e,i),i}resolveInflight(e,r){this.set(e,r),this.inflight.delete(e)}rejectInflight(e){this.inflight.delete(e)}};var Z0=class{constructor(){this.sources=new Map}register(e){if(!e||typeof e.sourceId!="string")throw new Error("SourceRegistry.register: entry must have sourceId");e.mode!=="none"&&this.sources.set(e.sourceId,e)}unregister(e){this.sources.delete(e)}get(e){return this.sources.get(e)}has(e){return this.sources.has(e)}all(){return Array.from(this.sources.values())}clear(){this.sources.clear()}};var e4=class{constructor(e={}){}async init(e={}){}async cancel(e){}async close(){}async applyPredicateCache(e,r){}async*query({queryId:e}){yield{__trailer:!0,queryId:e,rowCount:0,elapsedMs:0}}};function t4(t){if(typeof Uint8Array.fromBase64=="function")return Uint8Array.fromBase64(t);let e=atob(t),r=e.length,i=new Uint8Array(r);for(let s=0;s(cv(),lv)),Promise.resolve().then(()=>y0(uv()))]),s=i.default||i;for(let o of e.all()){if(o.mode!=="inline_ipc"||!o.ipcB64)continue;let h=t4(o.ipcB64),g=r.tableFromIPC(h),v=g.toArray().map(x=>Object.assign({},x));s.tables[o.sourceId]={data:v},this.sources.set(o.sourceId,{table:g,rows:v})}this._alasql=s}async*query({sql:e,params:r=[],queryId:i,signal:s}){if(this._closed)throw Object.assign(new Error("engine-gone"),{queryId:i,code:"engine-gone"});if(s&&s.aborted)throw Object.assign(new Error("cancelled"),{queryId:i,code:"cancelled"});let o=Date.now(),h;try{h=this._alasql.exec(e,r)}catch(g){throw Object.assign(new Error(g.message||String(g)),{queryId:i,code:"syntax"})}yield{rows:h,queryId:i},yield{__trailer:!0,queryId:i,rowCount:Array.isArray(h)?h.length:0,elapsedMs:Date.now()-o}}async cancel(e){}async applyPredicateCache(e,r){}async close(){if(this._alasql)for(let e of this.sources.keys())delete this._alasql.tables[e];this.sources.clear(),this._closed=!0}};var Tm=class{constructor(e={}){this.config=e,this.pending=new Map,this.batchWindow=e&&e.shiny_batch_window||4,this._handlersRegistered=!1}async init({sourceRegistry:e}={}){if(typeof Shiny>"u")throw Object.assign(new Error("Shiny is not available in this context"),{code:"engine-gone"});if(this._handlersRegistered)return;let r=o=>this._route("batch",o),i=o=>this._route("end",o),s=o=>this._route("error",o);Shiny.addCustomMessageHandler("myio:batch",r),Shiny.addCustomMessageHandler("myio:end",i),Shiny.addCustomMessageHandler("myio:error",s),this._handlersRegistered=!0}_route(e,r){let i=this.pending.get(r.queryId);i&&(e==="batch"?(i.push(r),Shiny.setInputValue("myio_ack",{v:1,queryId:r.queryId,seq:r.seq},{priority:"event"})):e==="end"?(i.push({__trailer:!0,queryId:r.queryId,rowCount:r.rowCount,elapsedMs:r.elapsedMs}),i.end()):e==="error"&&i.error(Object.assign(new Error(r.message||"engine error"),{queryId:r.queryId,code:r.code||"engine-gone"})))}query({sql:e,params:r=[],queryId:i,signal:s,templateId:o,sourceId:h,bindings:g,predicateHash:v,limit:x}){if(typeof Shiny>"u")throw Object.assign(new Error("Shiny not available"),{queryId:i,code:"engine-gone"});let _=[],w=[],O=!1,I=null,H=re=>{w.length?w.shift()({value:re,done:!1}):_.push(re)},J=()=>{for(O=!0;w.length;)w.shift()({value:void 0,done:!0})},Z=re=>{for(I=re;w.length;)w.shift()({value:void 0,done:!0})};this.pending.set(i,{push:H,end:J,error:Z,seqBudget:this.batchWindow});let oe=null;s&&(oe=()=>{Shiny.setInputValue("myio_cancel",{v:1,queryId:i},{priority:"event"}),Z(Object.assign(new Error("cancelled"),{queryId:i,code:"cancelled"}))},s.aborted?oe():s.addEventListener("abort",oe)),I||Shiny.setInputValue("myio_query",{v:1,queryId:i,templateId:o||null,sourceId:h||null,predicateHash:v||null,bindings:g||{},limit:x||null,_debugSql:e},{priority:"event"});let se=this.pending;return(async function*(){try{for(;;){if(I)throw I;if(_.length){yield _.shift();continue}if(O)return;let re=await new Promise(q=>w.push(q));if(re.done){if(I)throw I;return}yield re.value}}finally{s&&oe&&s.removeEventListener("abort",oe),se.delete(i)}})()}async cancel(e){typeof Shiny<"u"&&Shiny.setInputValue("myio_cancel",{v:1,queryId:e},{priority:"event"});let r=this.pending.get(e);r&&r.error(Object.assign(new Error("cancelled"),{queryId:e,code:"cancelled"}))}async applyPredicateCache(e,r){}async close(){for(let[,e]of this.pending)e.error(Object.assign(new Error("engine closed"),{code:"engine-gone"}));this.pending.clear()}};var Im=class{constructor(e={}){this.config=e,this.cacheUrl=e.duckdb_wasm&&e.duckdb_wasm.cache_url||null,this.workerUrl=e.duckdb_wasm&&e.duckdb_wasm.worker_url||null,this.db=null,this.conn=null,this._duckdb=null,this._closed=!1}async init({sourceRegistry:e}={}){if(this._closed)throw Object.assign(new Error("engine-gone"),{code:"engine-gone"});if(!this.cacheUrl||!this.workerUrl)throw Object.assign(new Error("WasmEngineAdapter: duckdb_wasm cache_url / worker_url not set. Ensure myIO::install_duckdb_wasm() has run."),{code:"engine-gone"});let r=this.cacheUrl.replace(/\/?$/,"/")+"duckdb-browser.mjs",i;try{i=await import(r)}catch(g){throw Object.assign(new Error("WasmEngineAdapter: failed to import duckdb-wasm loader from "+r+": "+(g?.message||g)),{code:"engine-gone"})}this._duckdb=i;let s=new Worker(this.workerUrl),o=this.cacheUrl.replace(/\/?$/,"/")+"duckdb-mvp.wasm",h=new i.ConsoleLogger;if(this.db=new i.AsyncDuckDB(h,s),await this.db.instantiate(o),this.conn=await this.db.connect(),e)for(let g of e.all())await this._registerSource(g)}async _registerSource(e){if(!this._duckdb)return;let r=this._duckdb.DuckDBDataProtocol;if(e.mode==="inline_ipc"&&e.ipcB64){let i=t4(e.ipcB64),s=e.sourceId+".arrow";await this.db.registerFileBuffer(s,i),await this.conn.query('CREATE OR REPLACE VIEW "'+e.sourceId.replace(/"/g,'""')+`" AS SELECT * FROM read_arrow('`+s+"');")}else if(e.mode==="url"&&e.url){let i=e.sourceId+(/\.parquet$/i.test(e.url)?".parquet":/\.arrow$/i.test(e.url)?".arrow":/\.feather$/i.test(e.url)?".feather":".csv");await this.db.registerFileURL(i,e.url,r.HTTP,!1);let s=/\.parquet$/i.test(e.url)?"read_parquet":/\.arrow$/i.test(e.url)||/\.feather$/i.test(e.url)?"read_arrow":"read_csv_auto";await this.conn.query('CREATE OR REPLACE VIEW "'+e.sourceId.replace(/"/g,'""')+'" AS SELECT * FROM '+s+"('"+i+"');")}}async*query({sql:e,params:r=[],queryId:i,signal:s}){if(this._closed)throw Object.assign(new Error("engine-gone"),{queryId:i,code:"engine-gone"});if(s&&s.aborted)throw Object.assign(new Error("cancelled"),{queryId:i,code:"cancelled"});let o=Date.now(),h,g=null;try{h=await this.conn.send(e)}catch(x){throw Object.assign(new Error(x?.message||String(x)),{queryId:i,code:"syntax"})}s&&(g=()=>{this.conn&&this.conn.cancelSent().catch(()=>{})},s.addEventListener("abort",g));let v=0;try{for(;;){if(s&&s.aborted){try{await this.conn.cancelSent()}catch{}throw Object.assign(new Error("cancelled"),{queryId:i,code:"cancelled"})}let{done:x,value:_}=await h.next();if(x)break;_&&(v+=_.numRows||0,yield{batch:_,queryId:i})}}finally{s&&g&&s.removeEventListener("abort",g);try{await h.return()}catch{}}yield{__trailer:!0,queryId:i,rowCount:v,elapsedMs:Date.now()-o}}async cancel(e){if(this.conn)try{await this.conn.cancelSent()}catch{}}async applyPredicateCache(e,r){}async close(){if(this._closed=!0,this.conn){try{await this.conn.close()}catch{}this.conn=null}if(this.db){try{await this.db.terminate()}catch{}this.db=null}}};function Om(t,e={}){switch(t){case"svg":return new e4(e);case"memory":return new Am(e);case"wasm":return new Im(e);case"server":return new Tm(e);default:throw new Error("createEngine: unknown engine '"+t+"'")}}var Pp=class{constructor({config:e}){this.config=e||{},this.cache=new Q0({max:128}),this.sourceRegistry=new Z0,this.charts=new Map,this.selectionStore=new Map,this.adapters=new Map,this._adapterInits=new Map,this._inflightControllers=new Map,this._debouncers=new Map}ensureAdapterFor(e,r,i){if(this.adapters.has(e))return Promise.resolve(this.adapters.get(e));if(this._adapterInits.has(e))return this._adapterInits.get(e);let s=Om(r,i),o=s.init({sourceRegistry:this.sourceRegistry}).then(()=>(this.adapters.set(e,s),this._adapterInits.delete(e),s)).catch(h=>{throw this._adapterInits.delete(e),h});return this._adapterInits.set(e,o),o}registerSource(e){this.sourceRegistry.register(e)}register({chartId:e,queryTemplate:r,markSpec:i,sourceHandle:s,predicateFn:o,onResult:h}){this.charts.set(e,{chartId:e,queryTemplate:r,markSpec:i,sourceHandle:s,predicateFn:o,currentPredicate:null,onResult:h}),this.selectionStore.has(s.sourceId)||this.selectionStore.set(s.sourceId,new Map),r&&String(r).trim()&&h&&setTimeout(()=>this._dispatch(e,{preview:!1}),0)}unregister(e){let r=this.charts.get(e);if(!r)return;this.charts.delete(e);let i=this._inflightControllers.get(e);i&&(i.abort(),this._inflightControllers.delete(e));let s=r.sourceHandle.sourceId,o=this.selectionStore.get(s);o&&o.delete(e);let h=this._debouncers.get(e);if(h&&(h.preview&&clearTimeout(h.preview),h.final&&clearTimeout(h.final),this._debouncers.delete(e)),[...this.charts.values()].filter(v=>v.sourceHandle.sourceId===s).length===0){let v=this.adapters.get(s);v&&(v.close().catch(()=>{}),this.adapters.delete(s)),this._adapterInits.delete(s),this.selectionStore.delete(s)}}setSelection({chartId:e,predicate:r}){let i=this.charts.get(e);if(!i)return;let s=i.sourceHandle.sourceId,o=this.selectionStore.get(s);o||(o=new Map,this.selectionStore.set(s,o)),r==null?o.delete(e):o.set(e,r),i.currentPredicate=r;for(let h of this.charts.values())h.chartId!==e&&h.sourceHandle.sourceId===s&&this._scheduleDispatch(h.chartId);if(this._subscribers){let h=this._subscribers.get(i.sourceHandle.sourceId);if(h)for(let g of h)try{g({chartId:e,predicate:r})}catch(v){console.error("[myIO coordinator] subscriber error:",v)}}}subscribe(e,r){return this._subscribers||(this._subscribers=new Map),this._subscribers.has(e)||this._subscribers.set(e,new Set),this._subscribers.get(e).add(r),()=>{let i=this._subscribers.get(e);i&&i.delete(r)}}_scheduleDispatch(e){let r=this._debouncers.get(e);r||(r={preview:null,final:null},this._debouncers.set(e,r)),r.preview&&clearTimeout(r.preview),r.final&&clearTimeout(r.final),r.preview=setTimeout(()=>this._dispatch(e,{preview:!0}),50),r.final=setTimeout(()=>this._dispatch(e,{preview:!1}),200)}async _dispatch(e,{preview:r=!1}={}){let i=this.charts.get(e);if(!i||!i.onResult||!i.queryTemplate||!String(i.queryTemplate).trim())return;let s=i.sourceHandle.sourceId,o=this._composeOthersPredicate(e,s),h=this._substituteTemplate(i.queryTemplate,{where:o,limit:r?1e3:1e5}),g=await this._hash(o),v=i.sourceHandle.engine||this.config.engine,x=await this._hash(h+""+g+""+v),_=this.cache.get(x);if(_){this._deliverToRenderer(e,_);return}let w=this.adapters.get(s);try{if(!w&&v&&(w=await this.ensureAdapterFor(s,v,this.config)),!this.charts.has(e)||!w)return;typeof w.applyPredicateCache=="function"&&await w.applyPredicateCache(g,o)}catch(J){if(!this.charts.has(e))return;console.error("[myIO coordinator]",e,J?.code,J?.message||J),this._deliverToRenderer(e,{batches:[],trailer:{error:J?.message||String(J),code:J?.code||"engine_error"}});return}let O="q_"+Math.random().toString(36).slice(2,10),I=null;if(!this.cache.inflight.has(x)){let J=this._inflightControllers.get(e);J&&J.abort(),I=new AbortController,this._inflightControllers.set(e,I)}let H=this.cache.inflightOrStore(x,()=>(async()=>{let J=[],Z=null;for await(let oe of w.query({sql:h,params:[],queryId:O,sourceId:s,limit:r?1e3:1e5,signal:I.signal}))oe.__trailer?Z=oe:J.push(oe);return{batches:J,trailer:Z}})());try{let J=await H,Z=this._inflightControllers.get(e);if(I&&Z===I&&this._inflightControllers.delete(e),I&&I.signal.aborted){this.cache.rejectInflight(x);return}if(this.cache.resolveInflight(x,J),!this.charts.has(e))return;this._deliverToRenderer(e,J)}catch(J){this.cache.rejectInflight(x);let Z=this._inflightControllers.get(e);if(I&&Z===I&&this._inflightControllers.delete(e),I&&I.signal.aborted)return;console.error("[myIO coordinator]",e,J?.code,J?.message||J),this._deliverToRenderer(e,{batches:[],trailer:{error:J?.message||String(J),code:J?.code||"query_error"}})}}_composeOthersPredicate(e,r){let s=[...(this.selectionStore.get(r)||new Map).entries()].filter(([o])=>o!==e).map(([,o])=>o).filter(Boolean);return s.length?"("+s.join(") AND (")+")":"TRUE"}_substituteTemplate(e,{where:r,limit:i}){return e.replace(/\{\{\s*where\s*\}\}/g,r).replace(/\{\{\s*limit\s*\}\}/g,String(i)).replace(/\$where\b/g,r).replace(/\$limit\b/g,String(i))}async _hash(e){if(typeof crypto<"u"&&crypto.subtle){let i=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-1",i);return Array.from(new Uint8Array(s,0,8)).map(o=>o.toString(16).padStart(2,"0")).join("")}let r=2166136261;for(let i=0;i>>0).toString(16).padStart(8,"0")}_deliverToRenderer(e,{batches:r,trailer:i}){let s=this.charts.get(e);if(!(!s||!s.onResult))try{s.onResult({batches:r,trailer:i,markSpec:s.markSpec})}catch(o){console.error("[myIO coordinator] renderer error for",e,o)}}onChartResult(e,r){let i=this.charts.get(e);i&&(i.onResult=r)}async close(){for(let e of this._debouncers.values())e.preview&&clearTimeout(e.preview),e.final&&clearTimeout(e.final);for(let[,e]of this.adapters)await e.close().catch(()=>{});this.adapters.clear();for(let e of this._inflightControllers.values())e.abort();this._adapterInits.clear(),this._inflightControllers.clear(),this.charts.clear(),this.selectionStore.clear(),this.sourceRegistry.clear(),this.cache.clear(),this._debouncers.clear()}};function fv(t){return globalThis.__myioCoordinator||(globalThis.__myioCoordinator=new Pp({config:t})),globalThis.__myioCoordinator}var eE=new Set(["scatter","line","area"]),tE=150;function Up(t){let e=Number(t);return Number.isFinite(e)?e:null}function rE(t){if(t==="Inf"||t==="Infinity"||t===1/0)return 1/0;let e=Number(t);return Number.isFinite(e)&&e>0?e:5e4}function k8({markSpec:t,rowCount:e,threshold:r}){let i=t&&t.kind;if(!eE.has(i))return!1;let s=rE(r);if(!Number.isFinite(s))return!1;let o=Number(e);return Number.isFinite(o)&&o>=s}function nE(t,e){let r={};return["x","y","category","color","value","baseline"].forEach(i=>{let s=t.getChild?t.getChild(i):null;s&&(r[i]=s.get(e))}),r}function dv(t){if(!t)return[];if(typeof t.toArray=="function")return t.toArray().map(e=>Object.assign({},e));if(typeof t.getChild=="function"){let e=t.getChild("x"),r=t.numRows||t.length||(e?e.length:0),i=new Array(r);for(let s=0;s{r&&(Array.isArray(r)?e.push(...r):Array.isArray(r.rows)?e.push(...r.rows):r.batch?e.push(...dv(r.batch)):(typeof r.getChild=="function"||typeof r.toArray=="function")&&e.push(...dv(r)))}),e.map(r=>({...r,x:Up(r.x),y:Up(r.y),category:r.category==null?void 0:Up(r.category),color:r.color==null?void 0:r.color,value:r.value==null?void 0:Up(r.value),baseline:r.baseline==null?void 0:Up(r.baseline)})).filter(r=>r.x!=null&&r.y!=null)}function iE(t){let e=t.margin||t.config&&t.config.layout&&t.config.layout.margin||{top:0,right:0,bottom:0,left:0},r=Math.max(0,(t.width||t.runtime?.width||0)-e.left-e.right),i=Math.max(0,(t.height||t.runtime?.height||0)-e.top-e.bottom);return{left:e.left,top:e.top,width:r,height:i}}function sE(t){let e=t.dom?.element||t.element,r=t.dom?.svg?.node?t.dom.svg.node():e.querySelector("svg"),i=document.createElement("div");i.className="myIO-webgl-overlay",i.style.position="absolute",i.style.pointerEvents="none",i.style.overflow="hidden",i.style.zIndex="0";let s=document.createElement("div");return s.className="myIO-webgl-loading",s.textContent="Loading data...",s.style.position="absolute",s.style.left="50%",s.style.top="50%",s.style.transform="translate(-50%, -50%)",s.style.font="12px sans-serif",s.style.color="#666",s.style.background="rgba(255,255,255,0.85)",s.style.padding="6px 8px",s.style.border="1px solid rgba(0,0,0,0.12)",i.appendChild(s),r&&r.parentNode===e?e.insertBefore(i,r):e.appendChild(i),R8(t,i),i}function R8(t,e){let r=iE(t);return e.style.left=r.left+"px",e.style.top=r.top+"px",e.style.width=r.width+"px",e.style.height=r.height+"px",r}function Vp(t,e,r){t&&typeof t.emit=="function"&&t.emit(e,r)}function aE(t,e,r){let i=t.querySelector(".myIO-webgl-loading,.myIO-webgl-empty");if(!r){i&&i.remove();return}let s=i||document.createElement("div");s.className=e,s.textContent=r,s.style.position="absolute",s.style.left="50%",s.style.top="50%",s.style.transform="translate(-50%, -50%)",s.style.font="12px sans-serif",s.style.color="#666",s.style.background="rgba(255,255,255,0.85)",s.style.padding="6px 8px",s.style.border="1px solid rgba(0,0,0,0.12)",s.parentNode||t.appendChild(s)}function oE(t,e){return t.map(r=>{if(r.category!=null||r.color==null)return r;let i=String(r.color);return e.has(i)||e.set(i,e.size),{...r,category:e.get(i)}})}function lE(t,e){let r=t.xScale,i=t.yScale;if(typeof r!="function"||typeof i!="function")return null;let s=globalThis.window&&window.d3;return s&&typeof s.quadtree=="function"?s.quadtree().x(o=>o.__px).y(o=>o.__py).addAll(e.map(o=>({row:o,__px:r(o.x),__py:i(o.y)}))):e.map(o=>({row:o,__px:r(o.x),__py:i(o.y)}))}function cE(t,e,r){if(!t)return null;if(typeof t.find=="function")return t.find(e,r,16)?.row||null;let i=null,s=1/0;return t.forEach(o=>{let h=Math.hypot(o.__px-e,o.__py-r);h{s=!1,i||h();let x=r.getBoundingClientRect(),_=cE(i,o.clientX-x.left,o.clientY-x.top);_&&Vp(t,"rollover",{data:_,source:"webgl-bridge"})}))}return r.addEventListener("mousemove",g),{rebuild:h,destroy(){r.removeEventListener("mousemove",g)}}}function M8({chart:t,coordinator:e,chartId:r,markSpec:i,createRenderer:s,layerIndex:o=0}){let h=sE(t),g=Lm({chart:t,layerIndex:o}),v=s||globalThis.window&&window.myIO&&window.myIO.webglRenderers&&window.myIO.webglRenderers.createWebGLRenderer,x=new Map,_=null,w=[],O=null,I=!1,H=!1,J=null,Z=uE(t,()=>w);function oe(de,ze){if(!(H||I)){if(H=!0,console.warn("[myIO webgl bridge] falling back to SVG:",de,ze||""),_&&typeof _.destroy=="function")try{_.destroy()}catch{}_=null,h.remove(),O&&g.onResult(O)}}function se(){if(_||I||H)return _;if(typeof v!="function")return oe("renderer unavailable"),null;let de=R8(t,h);try{_=v({kind:i.kind,el:h,width:de.width,height:de.height,xScale:t.xScale,yScale:t.yScale})}catch(er){return oe("renderer creation failed",er),null}let ze=h.querySelector("canvas");if(!_)return oe("renderer unavailable"),null;if(ze){let er=null;try{er=ze.getContext("webgl2")||ze.getContext("webgl")}catch{er=null}if(!er)return oe("WebGL context unavailable"),null;ze.addEventListener("webglcontextlost",Er=>{Er.preventDefault(),oe("WebGL context lost")},{once:!0})}return _}function re(de){let ze=de&&de.trailer,er=ze&&(ze.error||ze.message);return er?(_&&typeof _.update=="function"&&Promise.resolve(_.update([])).catch(()=>{}),Vp(t,"error",{message:String(er),trailer:ze,chartId:r}),!0):!1}function q(de){if(I)return;if(O=de,H){g.onResult(de);return}if(re(de))return;w=oE(Cm(de&&de.batches),x),Z.rebuild();let ze=se();!ze||typeof ze.update!="function"||(aE(h,w.length?null:"myIO-webgl-empty",w.length?"":"No data in selection"),w.length||Vp(t,"emptySelection",{chartId:r}),Promise.resolve(ze.update(w)).catch(er=>{oe("render failed",er)}))}function ue(){if(I||H)return;let de=R8(t,h);_&&typeof _.resize=="function"&&_.resize(de.width,de.height),_&&typeof _.update=="function"&&Promise.resolve(_.update(w)).catch(ze=>{oe("resize render failed",ze)})}function K(){I||(J&&clearTimeout(J),J=setTimeout(ue,tE))}function k(){I||(I=!0,J&&clearTimeout(J),e&&typeof e.onChartResult=="function"&&e.onChartResult(r,null),Z.destroy(),g.destroy(),_&&typeof _.destroy=="function"&&_.destroy(),h.remove())}return t&&typeof t.on=="function"&&(t.on("resize",K),t.on("destroy",k)),{onResult:q,resize:K,destroy:k,get pointCount(){return w.length},get overlay(){return H?void 0:h},get fallbackActive(){return H}}}function Lm({chart:t,layerIndex:e=0}){let r=[],i=!1;function s(h){if(i)return;let g=h&&h.trailer,v=g&&(g.error||g.message);if(v){Vp(t,"error",{message:String(v),trailer:g});return}r=Cm(h&&h.batches),t.config&&t.config.layers&&t.config.layers[e]&&(t.config.layers[e].data=r),r.length||Vp(t,"emptySelection",{}),typeof t.renderCurrentLayers=="function"&&t.renderCurrentLayers()}function o(){i=!0}return t&&typeof t.on=="function"&&t.on("destroy",o),{onResult:s,destroy:o,get pointCount(){return r.length}}}function hv(t){return k8(t)?M8(t):t&&t.unifyDataPath?Lm(t):null}var Nm=class{constructor({coordinator:e,sourceId:r,group:i,rowkeyCol:s,threshold:o=1e5}){if(!e)throw new Error("CrosstalkAdapter: coordinator is required");if(!r)throw new Error("CrosstalkAdapter: sourceId is required");this.coordinator=e,this.sourceId=r,this.group=i||null,this.rowkeyCol=s||"__myio_rowkey__",this.threshold=Number(o)||1e5,this._selectionHandle=null,this._filterHandle=null,this._suppressedOnce=!1,this._badgeEl=null,this._mode="row-level"}attach(e){if(this.group=e||this.group,!this.group||typeof window>"u"||!window.crosstalk)return;let r=window.crosstalk.SelectionHandle,i=window.crosstalk.FilterHandle;r&&(this._selectionHandle=new r(this.group),this._selectionHandle.on("change",s=>this._onIncoming(s)),i&&(this._filterHandle=new i(this.group),this._filterHandle.on("change",s=>this._onIncoming(s))))}setBadge(e){this._badgeEl=e,this._renderBadge()}_renderBadge(){this._badgeEl&&(this._badgeEl.textContent="linked: "+this._mode)}_onIncoming(e){let r=e&&(e.value||e.keys)||null;if(!r||!Array.isArray(r)||r.length===0){this.coordinator.setSelection({chartId:"__crosstalk__:"+this.sourceId,predicate:null});return}let i=r.map(h=>h==null?"NULL":"'"+String(h).replace(/'/g,"''")+"'"),o='"'+this.rowkeyCol.replace(/"/g,'""')+'"'+" IN ("+i.join(",")+")";this.coordinator.setSelection({chartId:"__crosstalk__:"+this.sourceId,predicate:o})}async broadcast({predicate:e}){if(!this._selectionHandle)return;if(e==null){try{this._selectionHandle.set(null)}catch{}return}let r=this._countSql(e),i=this.coordinator.adapters&&this.coordinator.adapters.get(this.sourceId);if(!i)return;let s=0;try{for await(let h of i.query({sql:r,params:[],queryId:"__xcount__"+Date.now()})){if(!h||h.__trailer)continue;let g=h.rows||h.batch&&h.batch.toArray&&h.batch.toArray()||[];g[0]&&(s=Number(g[0].n??g[0][0]??g[0]["count(*)"]??0))}}catch(h){console.warn("[myIO crosstalk] count query failed:",h?.message||h);return}if(s>this.threshold){this._suppressedOnce||(console.info("myIO: selection above crosstalk_threshold ("+s+" > "+this.threshold+"); downstream row-indexed widgets will not react to this selection. myIO-to-myIO linking still works."),this._suppressedOnce=!0),this._mode="predicate-only",this._renderBadge();return}let o=await this._fetchKeys(e);if(o&&o.length>0)try{this._selectionHandle.set(o)}catch{}this._mode="row-level",this._renderBadge()}_countSql(e){return"SELECT count(*) AS n FROM "+('"'+this.sourceId.replace(/"/g,'""')+'"')+" WHERE "+e}async _fetchKeys(e){let r=this.coordinator.adapters&&this.coordinator.adapters.get(this.sourceId);if(!r)return[];let i='"'+this.sourceId.replace(/"/g,'""')+'"',o="SELECT "+('"'+this.rowkeyCol.replace(/"/g,'""')+'"')+" AS rowkey FROM "+i+" WHERE "+e,h=[];try{for await(let g of r.query({sql:o,params:[],queryId:"__xkeys__"+Date.now()})){if(!g||g.__trailer)continue;let v=g.rows||g.batch&&g.batch.toArray&&g.batch.toArray()||[];for(let x of v){let _=x&&(x.rowkey??x[0]);_!=null&&h.push(String(_))}}}catch(g){console.warn("[myIO crosstalk] key fetch failed:",g?.message||g)}return h}destroy(){try{this._selectionHandle&&this._selectionHandle.close()}catch{}try{this._filterHandle&&this._filterHandle.close()}catch{}this._selectionHandle=null,this._filterHandle=null}};var fh=class{constructor({el:e,width:r,height:i,xScale:s,yScale:o,palette:h,captureHoverEvents:g=!1}){this.el=e,this.width=r,this.height=i,this.xScale=s,this.yScale=o,this.captureHoverEvents=g!==!1,this.palette=h||["#440154","#414487","#2a788e","#22a884","#7ad151","#fde725"],this._scatterplot=null,this._destroyed=!1}_scaleCopy(e){return e&&typeof e.copy=="function"?e.copy():e}async _ensure(){if(this._scatterplot)return this._scatterplot;let e=await Promise.resolve().then(()=>(a9(),s9)),r=e.default||e.createScatterplot,i=document.createElement("canvas");return i.width=this.width,i.height=this.height,i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.pointerEvents=this.captureHoverEvents?"auto":"none",this.el.appendChild(i),this._scatterplot=r({canvas:i,width:this.width,height:this.height,pointSize:3,backgroundColor:[1,1,1,0],colorBy:"category",pointColor:this.palette,xScale:this._scaleCopy(this.xScale),yScale:this._scaleCopy(this.yScale)}),this._applyScales(),this._scatterplot}_applyScales(){!this._scatterplot||!this.xScale||!this.yScale||(typeof this._scatterplot.setXScale=="function"&&this._scatterplot.setXScale(this._scaleCopy(this.xScale)),typeof this._scatterplot.setYScale=="function"&&this._scatterplot.setYScale(this._scaleCopy(this.yScale)),typeof this._scatterplot.set=="function"&&(typeof this._scatterplot.setXScale!="function"||typeof this._scatterplot.setYScale!="function")&&this._scatterplot.set({xScale:this._scaleCopy(this.xScale),yScale:this._scaleCopy(this.yScale)}))}async update(e){if(this._destroyed)return;let r=await this._ensure();if(!e||e.length===0){r.clear();return}let i={x:new Float32Array(e.length),y:new Float32Array(e.length),category:new Float32Array(e.length),value:new Float32Array(e.length)};for(let s=0;sy0(Dm())),r=e.default||e,i=document.createElement("canvas");i.width=this.width,i.height=this.height,i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.pointerEvents="none",this.el.appendChild(i),this._regl=r({canvas:i,attributes:{antialias:!0,preserveDrawingBuffer:!1}}),this._drawLine=this._regl({vert:` + }`,depth:{enable:!1},blend:{enable:!0,func:{srcRGB:"src alpha",srcAlpha:"one",dstRGB:"one minus src alpha",dstAlpha:"one minus src alpha"}},attributes:{position:()=>Ll},uniforms:{modelViewProjection:xu,color:()=>z},elements:()=>Qw(un.getPoints())}),Ur=()=>{if(!(Un>=0))return;let[S,P]=is[Un].slice(0,2),ee=[S,P,0,1];k1(r,ic,k1(r,Pn.view,Nl)),a0(ee,ee,r),sc.setPoints([-1,ee[1],1,ee[1]]),vu.setPoints([ee[0],1,ee[0],-1]),sc.draw(),vu.draw(),Oo(()=>(wi+fi*2)*window.devicePixelRatio,()=>1,L,_g)(),Oo(()=>(wi+fi)*window.devicePixelRatio,()=>1,L,C9)()},Ft=S=>{let P=new Float32Array(S*2),ee=0;for(let lt=0;lt{if(Xo===null){T=null,C=null;return}let S=new Set,P=[];for(let lt=0;lt=0&&qtC!==null?C:Ft(S),bf=(S,P={})=>{let ee=S.length;h=Math.max(2,Math.ceil(Math.sqrt(ee))),b=.5/h;let lt=new Float32Array(h**2*4),qt=!0,Gr=!0,Kt=0,Or=0,sr=0;for(let Gn=0;Gn{if(!l)return!1;if(N){let ee=f;f=u,ee.destroy()}else f=l;return u=bf(S,P),p=a.regl.framebuffer({color:u,depth:!1,stencil:!1}),l=void 0,!0},nr=()=>!!(f&&u),fr=()=>{f&&(f.destroy(),f=void 0),u&&(u.destroy(),u=void 0)},fn=(S,P={})=>new Promise(ee=>{le=!1;let lt=P?.preventFilterReset&&S.length===ls,qt=ls;ls=S.length,g1=ls,qt>0&&ls!==qt&&(Xo=null,T=null,C=null),l&&l.destroy(),l=bf(S,{z:P.zDataType,w:P.wDataType}),lt||(Rt(),U({usage:"static",type:"float",data:tr(ls)})),Z9(P.spatialIndex||S,{useWorker:za}).then(Gr=>{N2=Gr,is=S,le=!0}).then(ee)}),an=(S,P)=>{te=Pn.target,W=S,Y=Pn.distance[0],F=P},wr=()=>te!==void 0&&W!==void 0&&Y!==void 0&&F!==void 0,Lr=()=>{te=void 0,W=void 0,Y=void 0,F=void 0},pn=S=>{let P=Ii==="inherit"?w:Ii;if(P==="segment"){let ee=Wt.length-1;return ee<1?[]:S.reduce((lt,qt,Gr)=>{let Kt=0,Or=[];for(let Gn=2;Gn(qt[Gr]=lt(Kt[ee])*4,qt),[])}return new Array(Fo.length).fill(0)},vn=()=>{let S=as==="inherit"?qi:as;if(S==="segment"){let P=yi.length-1;return P<1?[]:Fo.reduce((ee,[lt,qt,Gr])=>(ee[lt]=E9(Gr,Kt=>yi[Math.floor(Kt/(Gr-1)*P)]),ee),[])}if(S){let P=Fg(S),ee=as==="inherit"?Si:yi,lt=ze(Ke(S),ee);return Fo.reduce((qt,[Gr,Kt])=>(qt[Gr]=ee[lt(Kt[P])],qt),[])}},xn=()=>{let S=zs==="inherit"?m1:zs;if(S==="segment"){let P=ar.length-1;return P<1?[]:Fo.reduce((ee,[lt,qt,Gr])=>(ee[lt]=E9(Gr,Kt=>ar[Math.floor(Kt/(Gr-1)*P)]),ee),[])}if(S){let P=Fg(S),ee=zs==="inherit"?wn:ar,lt=ze(Ke(S),ee);return Fo.reduce((qt,[Gr,Kt])=>(qt[Gr]=ee[lt(Kt[P])],qt),[])}},dr=S=>{Fo=[];let P=0;Object.keys(S).forEach((ee,lt)=>{Fo[ee]=[lt,S[ee].reference,S[ee].length/2,P],P+=S[ee].length/2})},ir=S=>new Promise(P=>{Ko.setPoints([]),S?.length>0?(hf=!0,JI(S,{maxIntPointsPerSegment:ta,tolerance:so}).then(ee=>{dr(ee);let lt=Object.values(ee);Ko.setPoints(lt.length===1?lt[0]:lt,{colorIndices:pn(lt),opacities:vn(),widths:xn()}),hf=!1,P()})):P()}),Ar=({preventEvent:S=!1}={})=>(Hn=!1,Ni.clear(),U.subdata(tr(ls)),new Promise(P=>{let ee=()=>{e.subscribe("draw",()=>{S||e.publish("unfilter"),P()},1),Yi=!0};qn||ac(is[0])?ir(Qo()).then(()=>{S||e.publish("pointConnectionsDraw"),ee()}):ee()})),Xt=(S,{preventEvent:P=!1}={})=>{Hn=!0,Ni.clear();let ee=Array.isArray(S)?S:[S],lt=[],qt=[],Gr=[];for(let Or of ee)!Number.isFinite(Or)||Or<0||Or>=ls||(lt.push(Or),Ni.add(Or),es.has(Or)&&Gr.push(Or));let Kt;if(T!==null){Kt=[];for(let Or=0;Or{let sr=()=>{e.subscribe("draw",()=>{P||e.publish("filter",{points:lt}),Or()},1),Yi=!0};qn||ac(is[0])?ir(Qo()).then(()=>{P||e.publish("pointConnectionsDraw"),Zo(Gr,{preventEvent:P}),sr()}):sr()})},Fr=()=>Io(tl[0],tl[1],Jn[0],Jn[1]),Jt=G9(()=>{g1=Fr().length},ra),br=S=>{let[P,ee]=te,[lt,qt]=W,Gr=1-S,Kt=P*Gr+lt*S,Or=ee*Gr+qt*S,sr=Y*Gr+F*S;Pn.lookAt([Kt,Or],sr)},Tr=()=>nr(),Ir=()=>wr(),on=(S,P)=>{Ae||(Ae=performance.now());let ee=performance.now()-Ae,lt=VI(P(ee/S),0,1);return Tr()&&nl({t:lt}),Ir()&&br(lt),ee{N=!1,Ae=null,je=void 0,Ot=void 0,In=Oe,fr(),Lr(),e.publish("transitionEnd")},rn=({duration:S=500,easing:P=D9})=>{N&&e.publish("transitionEnd"),N=!0,Ae=null,je=S,Ot=jg(P)?TA[P]||D9:P,Oe=In,In=!1,e.publish("transitionStart")},jr=(S,P={})=>ko?Promise.reject(new Error(Ig)):Bo?Promise.reject(new Error(kT)):(Bo=!0,s_(S).then(ee=>new Promise(lt=>{if(ko){lt();return}let qt=!1;(!P.preventFilterReset||ee?.length!==ls)&&(Hn=!1,Ni.clear());let Gr=ee&&ac(ee[0])&&(qn||P.showPointConnectionsOnce),{zDataType:Kt,wDataType:Or}=P;new Promise(sr=>{ee?(P.transition&&(ee.length===ls?qt=ur(ee,{z:Kt,w:Or}):console.warn("Cannot transition! The number of points between the previous and current draw call must be identical.")),fn(ee,{zDataType:Kt,wDataType:Or,preventFilterReset:P.preventFilterReset,spatialIndex:P.spatialIndex}).then(()=>{P.hover!==void 0&&Xi(P.hover,{preventEvent:!0}),P.select!==void 0&&Zo(P.select,{preventEvent:!0}),P.filter!==void 0&&Xt(P.filter,{preventEvent:!0}),Gr?ir(ee).then(()=>{e.publish("pointConnectionsDraw"),Yi=!0,n=P.showReticleOnce}).then(()=>lt()):sr()})):sr()}).then(()=>{P.transition&&qt?(Gr?Promise.all([new Promise(sr=>{e.subscribe("transitionEnd",()=>{Yi=!0,n=P.showReticleOnce,sr()},1)}),new Promise(sr=>{e.subscribe("pointConnectionsDraw",sr,1)})]).then(()=>lt()):e.subscribe("transitionEnd",()=>{Yi=!0,n=P.showReticleOnce,lt()},1),rn({duration:P.transitionDuration,easing:P.transitionEasing})):(Gr?Promise.all([new Promise(sr=>{e.subscribe("draw",sr,1)}),new Promise(sr=>{e.subscribe("pointConnectionsDraw",sr,1)})]).then(()=>lt()):e.subscribe("draw",()=>lt(),1),Yi=!0,n=P.showReticleOnce)})}).finally(()=>{Bo=!1}))),nn=S=>ko?Promise.reject(new Ig):(mr=!1,S.length===0?new Promise(P=>{mi.clear(),e.subscribe("draw",P,1),mr=!0,Yi=!0}):new Promise(P=>{let ee=[],lt=new Map,qt=[],Gr=[],Kt=-1,Or=sr=>{Gr.push(sr.lineWidth||ps);let Gn=p1(sr.lineColor||Ro,!0),Gi=`[${Gn.join(",")}]`;if(lt.has(Gi)){let{idx:Rs}=lt.get(Gi);qt.push(Rs)}else{let Rs=++Kt;lt.set(Gi,{idx:Rs,color:Gn}),qt.push(Rs)}};for(let sr of S){if(GI(sr)){ee.push([sr.x1??-gn,sr.y,sr.x2??gn,sr.y]),Or(sr);continue}if(jI(sr)){ee.push([sr.x,sr.y1??-gn,sr.x,sr.y2??gn]),Or(sr);continue}if(HI(sr)){ee.push([sr.x1,sr.y1,sr.x2,sr.y1,sr.x2,sr.y2,sr.x1,sr.y2,sr.x1,sr.y1]),Or(sr);continue}if(qI(sr)){ee.push([sr.x,sr.y,sr.x+sr.width,sr.y,sr.x+sr.width,sr.y+sr.height,sr.x,sr.y+sr.height,sr.x,sr.y]),Or(sr);continue}zI(sr)&&(ee.push(sr.vertices.flatMap(bu)),Or(sr))}mi.setStyle({color:Array.from(lt.values()).sort((sr,Gn)=>sr.idx>Gn.idx?1:-1).map(({color:sr})=>sr)}),mi.setPoints(ee.length===1?ee.flat():ee,{colorIndices:qt,widths:Gr}),e.subscribe("draw",P,1),mr=!0,Yi=!0})),en=S=>(...P)=>{let ee=S(...P);return Yi=!0,new Promise(lt=>{e.subscribe("draw",()=>lt(ee),1)})},zr=S=>{let P=Number.POSITIVE_INFINITY,ee=Number.NEGATIVE_INFINITY,lt=Number.POSITIVE_INFINITY,qt=Number.NEGATIVE_INFINITY;for(let Gr of S){let[Kt,Or]=is[Gr];P=Math.min(P,Kt),ee=Math.max(ee,Kt),lt=Math.min(lt,Or),qt=Math.max(qt,Or)}return{x:P,y:lt,width:ee-P,height:qt-lt}},dn=(S,P={})=>new Promise(ee=>{let lt=a0([],[S.x+S.width/2,S.y+S.height/2,0,0],Nl).slice(0,2),qt=2*Math.atan(1),Gr=ca/ff,Kt=S.height*Gr>=S.width?S.height/2/Math.tan(qt/2):S.width/2/Math.tan(qt/2)/Gr;P.transition?(Pn.config({isFixed:!0}),an(lt,Kt),e.subscribe("transitionEnd",()=>{ee(),Pn.config({isFixed:As})},1),rn({duration:P.transitionDuration,easing:P.transitionEasing})):(Pn.lookAt(lt,Kt),e.subscribe("draw",ee,1),Yi=!0)}),sn=(S,P={})=>{if(!le)return Promise.reject(new Error(k9));let ee=zr(S),lt=ee.x+ee.width/2,qt=ee.y+ee.height/2,Gr=To(),Kt=1+(P.padding||0),Or=Math.max(ee.width,Gr)*Kt,sr=Math.max(ee.height,Gr)*Kt,Gn=lt-Or/2,Gi=qt-sr/2;return dn({x:Gn,y:Gi,width:Or,height:sr},P)},kr=(S,P,ee={})=>new Promise(lt=>{ee.transition?(Pn.config({isFixed:!0}),an(S,P),e.subscribe("transitionEnd",()=>{lt(),Pn.config({isFixed:As})},1),rn({duration:ee.transitionDuration,easing:ee.transitionEasing})):(Pn.lookAt(S,P),e.subscribe("draw",lt,1),Yi=!0)}),yn=(S={})=>kr([0,0],1,S),F2=S=>{if(!le)throw new Error(k9);let P=is[S];if(!P)return;let ee=[P[0],P[1],0,1];k1(r,df,k1(r,Pn.view,Nl)),a0(ee,ee,r);let lt=xa*(ee[0]+1)/2,qt=Qi*(.5-ee[1]/2);return[lt,qt]},wu=()=>{Ko.setStyle({color:it(Wt,Pr,gi),opacity:yi===null?null:yi[0],width:ar[0]})},Hc=()=>{let S=Math.round($c)>.5?0:255;be.initiator.style.border=`1px dashed rgba(${S}, ${S}, ${S}, 0.33)`,be.initiator.style.background=`rgba(${S}, ${S}, ${S}, 0.1)`},Au=()=>{let S=Math.round($c)>.5?0:255;be.longPressIndicator.style.color=`rgb(${S}, ${S}, ${S})`,be.longPressIndicator.dataset.color=`rgb(${S}, ${S}, ${S})`;let P=z.map(ee=>Math.round(ee*255));be.longPressIndicator.dataset.activeColor=`rgb(${P[0]}, ${P[1]}, ${P[2]})`},j3=S=>{S&&(v=p1(S,!0),$c=$9(v),Hc(),Au())},q3=S=>{S?jg(S)?Gg(a.regl,S).then(P=>{_=P,Yi=!0,e.publish("backgroundImageReady")}).catch(()=>{console.error(`Count not create texture from ${S}`),_=null}):S._reglType==="texture2d"?_=S:_=null:_=null},H3=S=>{S>0&&Pn.lookAt(Pn.target,S,Pn.rotation)},ua=S=>{S!==null&&Pn.lookAt(Pn.target,Pn.distance[0],S)},z3=S=>{S&&Pn.lookAt(S,Pn.distance[0],Pn.rotation)},dc=S=>{S&&Pn.setView(S)},M2=S=>{As=!!S,Pn.config({isFixed:As})},Tu=S=>{if(!S)return;z=p1(S,!0),un.setStyle({color:z});let P=z.map(ee=>Math.round(ee*255));be.longPressIndicator.dataset.activeColor=`rgb(${P[0]}, ${P[1]}, ${P[2]})`},co=S=>{Number.isNaN(+S)||+S<1||(J=+S,un.setStyle({width:J}))},Iu=S=>{+S&&(Q=+S,be.set({minDelay:Q}))},Is=S=>{+S&&(oe=+S,be.set({minDist:oe}))},xs=S=>{se=Rg(IA,se)(S)},kl=S=>{re=!!S,be.set({enableInitiator:re})},W3=S=>{q=S,be.set({initiatorParentElement:q})},Y3=S=>{ue=S,be.set({longPressIndicatorParentElement:ue})},vf=S=>{K=!!S},ki=S=>{B=Number(S)},e1=S=>{he=Number(S)},$2=S=>{He=Number(S)},X3=S=>{er=Number(S)},hc=S=>{S==="brush"?be.set({type:S,minDist:Math.max(B9,oe)}):be.set({type:S,minDist:oe}),Er=be.get("type")},P2=S=>{zt=Number(S)||zt,be.set({brushSize:zt})},U2=()=>{_n[p6]?Pn.config({isRotate:!0,mouseDownMoveModKey:_n[p6]}):Pn.config({isRotate:!1})},J3=S=>{_n=Object.entries(S).reduce((P,[ee,lt])=>(MA.includes(lt)&&FA.includes(ee)&&(P[ee]=lt),P),{}),U2()},Co=S=>{$r=Rg(N9,c6)(S),Pn.config({defaultMouseDownMoveAction:$r===Ug?"rotate":"pan"})},uo=S=>{S!==null&&(In=S)},fo=S=>{S&&(On=p1(S,!0),sc.setStyle({color:On}),vu.setStyle({color:On}))},Ya=S=>{S&&(Bi=S,Vn=S.domain()[0],ni=S?S.domain()[1]-S.domain()[0]:0,Bi.range([0,xa]),at())},fa=S=>{S&&(Yn=S,cs=Yn.domain()[0],Ds=Yn?Yn.domain()[1]-Yn.domain()[0]:0,Yn.range([Qi,0]),at())},Xa=S=>{I=!!S},wa=S=>{O=!!S},ho=S=>{qn=!!S,qn?le&&ac(is[0])&&ir(Qo()).then(()=>{e.publish("pointConnectionsDraw"),Yi=!0}):ir()},da=(S,P)=>ee=>{if(ee==="inherit")S([...P()]);else{let lt=L2(ee)?ee:[ee];S(lt.map(qt=>p1(qt,!0)))}wu()},po=da(S=>{Wt=S},()=>cr),mo=da(S=>{Pr=S},()=>bn),go=da(S=>{gi=S},()=>mn),yo=S=>{O2(S,C2,{minLength:1})&&(yi=[...S]),a6(+S)&&(yi=[+S]),Wt=Wt.map(P=>(P[3]=Number.isNaN(+yi[0])?P[3]:+yi[0],P)),wu()},bo=S=>{!Number.isNaN(+S)&&+S&&(Ha=+S)},na=S=>{O2(S,C2,{minLength:1})&&(ar=[...S]),a6(+S)&&(ar=[+S]),wu()},vo=S=>{!Number.isNaN(+S)&&+S&&(Ki=Math.max(0,S))},ha=S=>{ta=Math.max(0,S)},_o=S=>{so=Math.max(0,S)},Ws=S=>{Ci=S,ut()},Ys=S=>{switch(S){case"linear":{V=S,Ea=V1;break}case"constant":{V=S,Ea=jc;break}default:{V="asinh",Ea=Su;break}}},xo=S=>{Do=+S},Xs=S=>{el=+S},Ja=S=>{$=+S},Js=S=>{Ro=p1(S)},Aa=S=>{ps=+S},Ta=S=>{gn=+S},Ia=S=>{a.gamma=S},ia=S=>{d=Number(S)||.5},sa=S=>{m=!!S},pa=S=>{let[P]=Object.keys(kg({[S]:K9}));if(P==="aspectRatio")return ff;if(P==="background"||P==="backgroundColor")return v;if(P==="backgroundImage")return _;if(P==="camera")return Pn;if(P==="cameraTarget")return Pn.target;if(P==="cameraDistance")return Pn.distance[0];if(P==="cameraRotation")return Pn.rotation;if(P==="cameraView")return Pn.view;if(P==="cameraIsFixed")return As;if(P==="canvas")return x;if(P==="colorBy")return w;if(P==="sizeBy")return m1;if(P==="pointOrder")return Xo!==null?[...Xo]:null;if(P==="deselectOnDblClick")return I;if(P==="deselectOnEscape")return O;if(P==="height")return _a;if(P==="lassoColor")return z;if(P==="lassoLineWidth")return J;if(P==="lassoMinDelay")return Q;if(P==="lassoMinDist")return oe;if(P==="lassoClearEvent")return se;if(P==="lassoInitiator")return re;if(P==="lassoInitiatorElement")return be.initiator;if(P==="lassoInitiatorParentElement")return q;if(P==="lassoLongPressIndicatorParentElement")return ue;if(P==="lassoOnLongPress")return K;if(P==="lassoType")return Er;if(P==="lassoBrushSize")return zt;if(P==="mouseMode")return $r;if(P==="opacity")return Si.length===1?Si[0]:Si;if(P==="opacityBy")return qi;if(P==="opacityByDensityFill")return Do;if(P==="opacityByDensityDebounceTime")return ra;if(P==="opacityInactiveMax")return el;if(P==="opacityInactiveScale")return $;if(P==="points")return is;if(P==="hoveredPoint")return Un;if(P==="selectedPoints")return[...di];if(P==="filteredPoints")return Hn?Array.from(Ni):Array.from({length:is.length},(ee,lt)=>lt);if(P==="pointsInView")return Fr();if(P==="pointColor")return cr.length===1?cr[0]:cr;if(P==="pointColorActive")return bn.length===1?bn[0]:bn;if(P==="pointColorHover")return mn.length===1?mn[0]:mn;if(P==="pointOutlineWidth")return fi;if(P==="pointSize")return wn.length===1?wn[0]:wn;if(P==="pointSizeSelected")return wi;if(P==="pointSizeMouseDetection")return Ci;if(P==="showPointConnections")return qn;if(P==="pointConnectionColor")return Wt.length===1?Wt[0]:Wt;if(P==="pointConnectionColorActive")return Pr.length===1?Pr[0]:Pr;if(P==="pointConnectionColorHover")return gi.length===1?gi[0]:gi;if(P==="pointConnectionColorBy")return Ii;if(P==="pointConnectionOpacity")return yi.length===1?yi[0]:yi;if(P==="pointConnectionOpacityBy")return as;if(P==="pointConnectionOpacityActive")return Ha;if(P==="pointConnectionSize")return ar.length===1?ar[0]:ar;if(P==="pointConnectionSizeActive")return Ki;if(P==="pointConnectionSizeBy")return zs;if(P==="pointConnectionMaxIntPointsPerSegment")return ta;if(P==="pointConnectionTolerance")return so;if(P==="pointScaleMode")return V;if(P==="reticleColor")return On;if(P==="regl")return a.regl;if(P==="showReticle")return In;if(P==="version")return bA;if(P==="width")return Us;if(P==="xScale")return Bi;if(P==="yScale")return Yn;if(P==="performanceMode")return os;if(P==="renderPointsAsSquares")return Jo;if(P==="disableAlphaBlending")return F1;if(P==="gamma")return a.gamma;if(P==="renderer")return a;if(P==="isDestroyed")return ko;if(P==="isDrawing")return Bo;if(P==="isPointsDrawn")return le;if(P==="isPointsFiltered")return Hn;if(P==="isAnnotationsDrawn")return mr;if(P==="zDataType")return Bt;if(P==="wDataType")return Zr;if(P==="spatialIndex")return N2?.data;if(P==="annotationLineColor")return Ro;if(P==="annotationLineWidth")return ps;if(P==="annotationHVLineLimit")return gn;if(P==="antiAliasing")return d;if(P==="pixelAligned")return m;if(P==="actionKeyMap")return{..._n}},Oa=(S={})=>ko?Promise.reject(new Error(Ig)):(kg(S),(S.backgroundColor!==void 0||S.background!==void 0)&&j3(S.backgroundColor||S.background),S.backgroundImage!==void 0&&q3(S.backgroundImage),S.cameraTarget!==void 0&&z3(S.cameraTarget),S.cameraDistance!==void 0&&H3(S.cameraDistance),S.cameraRotation!==void 0&&ua(S.cameraRotation),S.cameraView!==void 0&&dc(S.cameraView),S.cameraIsFixed!==void 0&&M2(S.cameraIsFixed),S.colorBy!==void 0&&Ye(S.colorBy),S.pointColor!==void 0&&me(S.pointColor),S.pointColorActive!==void 0&>(S.pointColorActive),S.pointColorHover!==void 0&&We(S.pointColorHover),S.pointSize!==void 0&&dt(S.pointSize),S.pointSizeSelected!==void 0&&yt(S.pointSizeSelected),S.pointSizeMouseDetection!==void 0&&Ws(S.pointSizeMouseDetection),S.sizeBy!==void 0&&Ze(S.sizeBy),S.pointOrder!==void 0&&et(S.pointOrder),S.opacity!==void 0&&rt(S.opacity),S.showPointConnections!==void 0&&ho(S.showPointConnections),S.pointConnectionColor!==void 0&&po(S.pointConnectionColor),S.pointConnectionColorActive!==void 0&&mo(S.pointConnectionColorActive),S.pointConnectionColorHover!==void 0&&go(S.pointConnectionColorHover),S.pointConnectionColorBy!==void 0&&nt(S.pointConnectionColorBy),S.pointConnectionOpacityBy!==void 0&&Re(S.pointConnectionOpacityBy),S.pointConnectionOpacity!==void 0&&yo(S.pointConnectionOpacity),S.pointConnectionOpacityActive!==void 0&&bo(S.pointConnectionOpacityActive),S.pointConnectionSize!==void 0&&na(S.pointConnectionSize),S.pointConnectionSizeActive!==void 0&&vo(S.pointConnectionSizeActive),S.pointConnectionSizeBy!==void 0&&st(S.pointConnectionSizeBy),S.pointConnectionMaxIntPointsPerSegment!==void 0&&ha(S.pointConnectionMaxIntPointsPerSegment),S.pointConnectionTolerance!==void 0&&_o(S.pointConnectionTolerance),S.pointScaleMode!==void 0&&Ys(S.pointScaleMode),S.opacityBy!==void 0&&Qe(S.opacityBy),S.lassoColor!==void 0&&Tu(S.lassoColor),S.lassoLineWidth!==void 0&&co(S.lassoLineWidth),S.lassoMinDelay!==void 0&&Iu(S.lassoMinDelay),S.lassoMinDist!==void 0&&Is(S.lassoMinDist),S.lassoClearEvent!==void 0&&xs(S.lassoClearEvent),S.lassoInitiator!==void 0&&kl(S.lassoInitiator),S.lassoInitiatorParentElement!==void 0&&W3(S.lassoInitiatorParentElement),S.lassoLongPressIndicatorParentElement!==void 0&&Y3(S.lassoLongPressIndicatorParentElement),S.lassoOnLongPress!==void 0&&vf(S.lassoOnLongPress),S.lassoLongPressTime!==void 0&&ki(S.lassoLongPressTime),S.lassoLongPressAfterEffectTime!==void 0&&e1(S.lassoLongPressAfterEffectTime),S.lassoLongPressEffectDelay!==void 0&&$2(S.lassoLongPressEffectDelay),S.lassoLongPressRevertEffectTime!==void 0&&X3(S.lassoLongPressRevertEffectTime),S.lassoType!==void 0&&hc(S.lassoType),S.lassoBrushSize!==void 0&&P2(S.lassoBrushSize),S.actionKeyMap!==void 0&&J3(S.actionKeyMap),S.mouseMode!==void 0&&Co(S.mouseMode),S.showReticle!==void 0&&uo(S.showReticle),S.reticleColor!==void 0&&fo(S.reticleColor),S.pointOutlineWidth!==void 0&&xt(S.pointOutlineWidth),S.height!==void 0&&ot(S.height),S.width!==void 0&&Je(S.width),S.aspectRatio!==void 0&&_t(S.aspectRatio),S.xScale!==void 0&&Ya(S.xScale),S.yScale!==void 0&&fa(S.yScale),S.deselectOnDblClick!==void 0&&Xa(S.deselectOnDblClick),S.deselectOnEscape!==void 0&&wa(S.deselectOnEscape),S.opacityByDensityFill!==void 0&&xo(S.opacityByDensityFill),S.opacityInactiveMax!==void 0&&Xs(S.opacityInactiveMax),S.opacityInactiveScale!==void 0&&Ja(S.opacityInactiveScale),S.gamma!==void 0&&Ia(S.gamma),S.annotationLineColor!==void 0&&Js(S.annotationLineColor),S.annotationLineWidth!==void 0&&Aa(S.annotationLineWidth),S.annotationHVLineLimit!==void 0&&Ta(S.annotationHVLineLimit),S.antiAliasing!==void 0&&ia(S.antiAliasing),S.pixelAligned!==void 0&&sa(S.pixelAligned),new Promise(P=>{window.requestAnimationFrame(()=>{ko||!x||(Ue(),Pn.refresh(),a.refresh(),mc(),P())})})),Ka=(S,{preventEvent:P=!1}={})=>{dc(S),Yi=!0,Ns=P},Ca=()=>{Pn||(Pn=Kw(x,{isFixed:As,isPanInverted:[!1,!0],defaultMouseDownMoveAction:$r===Ug?"rotate":"pan"})),t.cameraView?Pn.setView(A9(t.cameraView)):t.cameraTarget||t.cameraDistance||t.cameraRotation?Pn.lookAt([...t.cameraTarget||hT],t.cameraDistance||pT,t.cameraRotation||mT):Pn.setView(A9(gT)),Jn=gs(1,1),tl=gs(-1,-1)},Qa=({preventEvent:S=!1}={})=>{Ca(),at(),!S&&e.publish("view",{view:Pn.view,camera:Pn,xScale:Bi,yScale:Yn})},La=({key:S})=>{S==="Escape"&&O&&$1()},ma=()=>{$i=!0,Vt=!0},ga=()=>{Xi(),$i=!1,Vt=!0,Yi=!0},Na=()=>{Yi=!0},Da=()=>{fn([]),Ko.clear()},Za=()=>{Ko.clear()},Ra=()=>{nn([])},Ba=()=>{Da(),Ra()},Ks=()=>{let S=Us===yu,P=_a===yu;if(S||P){let{width:ee,height:lt}=x.getBoundingClientRect();S&&Xe(ee,!0),P&&ct(lt,!0),Ue(),at(),Yi=!0}Pn.refresh()},eo=async S=>{x.style.userSelect="none";let P=window.devicePixelRatio,ee=wn,lt=Us,qt=_a,Gr=a.canvas.width/P,Kt=a.canvas.height/P,Or=m,sr=d,Gn=S?.scale||1,Gi=Array.isArray(wn)?wn.map(Lo=>Lo*Gn):wn*Gn,Rs=xa*Gn,sl=Qi*Gn;dt(Gi),Je(Rs),ot(sl),sa(S?.pixelAligned||m),ia(S?.antiAliasing||d),a.resize(Us,_a),a.refresh(),await new Promise(Lo=>{e.subscribe("draw",Lo,1),mc()});let t1=x.getContext("2d").getImageData(0,0,x.width,x.height);return a.resize(Gr,Kt),a.refresh(),dt(ee),Je(lt),ot(qt),sa(Or),ia(sr),await new Promise(Lo=>{e.subscribe("draw",Lo,1),mc()}),x.style.userSelect=null,t1},ka=S=>S===void 0?x.getContext("2d").getImageData(0,0,x.width,x.height):eo(S),Fa=()=>{Ue(),Ca(),at(),un=n0(a.regl,{color:z,width:J,is2d:!0}),Ko=n0(a.regl,{color:it(Wt,Pr,gi),opacity:yi===null?null:yi[0],width:ar[0],is2d:!0}),sc=n0(a.regl,{color:On,width:1,is2d:!0}),vu=n0(a.regl,{color:On,width:1,is2d:!0}),mi=n0(a.regl,{color:Ro,width:ps,is2d:!0}),ut(),x.addEventListener("wheel",Na),U=a.regl.buffer(),R=a.regl.buffer(),L=a.regl.buffer({usage:"dynamic",type:"float",length:wA*2}),Te=pt(),Tt=ve();let S=Oa({backgroundImage:_,width:Us,height:_a,actionKeyMap:_n});Hc(),Au(),window.addEventListener("keyup",La,!1),window.addEventListener("blur",vt,!1),window.addEventListener("mouseup",P1,!1),window.addEventListener("mousemove",Pe,!1),x.addEventListener("mousedown",pf,!1),x.addEventListener("mouseenter",ma,!1),x.addEventListener("mouseleave",ga,!1),x.addEventListener("click",It,!1),x.addEventListener("dblclick",De,!1),"ResizeObserver"in window?(c=new ResizeObserver(Ks),c.observe(x)):(window.addEventListener("resize",Ks),window.addEventListener("orientationchange",Ks)),S.then(()=>{e.publish("init")})},pc=a.onFrame(()=>{if(yr=Pn.tick(),!((le||mr)&&(Yi||N)))return;N&&!on(je,Ot)&&ln(),yr&&(Jn=gs(1,1),tl=gs(-1,-1),qi==="density"&&Jt()),a.render(()=>{let P=x.width/a.canvas.width,ee=x.height/a.canvas.height;Ee(P,ee),_?._reglType&&il(),Ll.length>2&&Dr(),N||Ko.draw({projection:Gc(),model:ys(),view:hn()});let lt=y1();le&<>0&&G1(),!bi&&(In||n)&&Ur(),Un>=0&&v1(),di.length>0&&yf(),mi.draw({projection:Gc(),model:ys(),view:hn()}),un.draw({projection:Gc(),model:ys(),view:hn()})},x);let S={view:Pn.view,isViewChanged:yr,camera:Pn,xScale:Bi,yScale:Yn};yr&&(at(),Ns?Ns=!1:e.publish("view",S)),Yi=!1,n=!1,e.publish("drawing",S,{async:!1}),e.publish("draw",S)}),mc=()=>{Yi=!0},Di=()=>{le=!1,mr=!1,ko=!0,pc(),window.removeEventListener("keyup",La,!1),window.removeEventListener("blur",vt,!1),window.removeEventListener("mouseup",P1,!1),window.removeEventListener("mousemove",Pe,!1),x.removeEventListener("mousedown",pf,!1),x.removeEventListener("mouseenter",ma,!1),x.removeEventListener("mouseleave",ga,!1),x.removeEventListener("click",It,!1),x.removeEventListener("dblclick",De,!1),x.removeEventListener("wheel",Na,!1),c?c.disconnect():(window.removeEventListener("resize",Ks),window.removeEventListener("orientationchange",Ks)),x=void 0,Pn.dispose(),Pn=void 0,un.destroy(),be.destroy(),Ko.destroy(),sc.destroy(),vu.destroy(),Te&&Te.destroy(),Tt&&Tt.destroy(),t.renderer||a.isDestroyed||a.destroy(),e.publish("destroy"),e.clear()};return Fa(),{get isSupported(){return a.isSupported},clear:en(Ba),clearPoints:en(Da),clearPointConnections:en(Za),clearAnnotations:en(Ra),createTextureFromUrl:(S,P=Xg)=>Gg(a.regl,S,P),deselect:$1,destroy:Di,draw:jr,drawAnnotations:nn,filter:Xt,get:pa,getScreenPosition:F2,hover:Xi,lassoSelect:Fe,redraw:mc,refresh:a.refresh,reset:en(Qa),select:Zo,set:Oa,export:ka,subscribe:e.subscribe,unfilter:Ar,unsubscribe:e.unsubscribe,view:Ka,zoomToLocation:kr,zoomToArea:dn,zoomToPoints:sn,zoomToOrigin:yn}},QI=(t,e)=>s_(t).then(r=>Z9(r,{useWorker:e})).then(r=>r.data)});var E6={linear:function(){return d3.easeLinear},quad:function(){return d3.easeQuad},cubic:function(){return d3.easeCubic},sin:function(){return d3.easeSin},exp:function(){return d3.easeExp},circle:function(){return d3.easeCircle},back:function(){return d3.easeBack},bounce:function(){return d3.easeBounce},elastic:function(){return d3.easeElastic}},rO=Object.keys(E6);function $n(t,e){var r=t&&t.options&&t.options.transition,i=r&&r.easing;return i&&Object.prototype.hasOwnProperty.call(E6,i)?E6[i]():e}function ku(t,e,r){var i=t&&t.options&&t.options.transition,s=i&&typeof i.speed=="number"?i.speed:0;if(s<=0)return function(){return 0};var a=i&&typeof i.stagger=="number"?i.stagger:e||0,d=r||function(m,v){return v};return a<=0?function(){return 0}:function(m,v){return d(m,v)*a}}function id(t){return t.runtime.totalWidth<=600}function Ph(t,e,r){return id(t)?r:e}function If(t){return Ph(t,5,3)}function w6(t){return Ph(t,3,1)}function _r(t,e,r){return"tag-"+t+"-"+e+"-"+String(r).replace(/[^a-zA-Z0-9_-]/g,"")}function Uh(t){return t.config.scales.colorScheme.enabled===!0}function qs(t,e,r){return Uh(t)?t.derived.colorDiscrete(e):r}var sd=class{static type="line";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"overlay",scaleCapabilities:{invertX:!0}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!0,sorted:!0},y_var:{required:!0,numeric:!0}};render(e,r){var i=r.data,s=r.label,a=e.newY?e.newY:r.mapping.y_var,d=e.options.transition.speed,m=d3.line().curve(d3.curveMonotoneX).x(function(w){return e.xScale(w[r.mapping.x_var])}).y(function(w){return e.yScale(w[a])}),v=e.chart.selectAll("."+_r("line",e.element.id,s)).data([i]);v.exit().transition().duration(d).style("opacity",0).remove();var _=v.enter().append("path").attr("fill","none").attr("clip-path","url(#"+e.element.id+"clip)").style("stroke",function(w){return qs(e,w[r.mapping.group],r.color)}).style("stroke-width",w6(e)).style("opacity",0).attr("class",_r("line",e.element.id,s));v.merge(_).transition().ease($n(e,d3.easeQuad)).duration(d).style("opacity",1).style("stroke-width",w6(e)).style("stroke",function(w){return qs(e,w[0][r.mapping.group],r.color)}).attr("d",m);var x=["lm","loess","polynomial","smooth"];x.indexOf(r.transform)===-1&&this.renderPoints(e,r)}renderPoints(e,r){var i=e.options.transition.speed,s=e.chart.selectAll("."+_r("point",e.element.id,r.label)).data(r.data);s.exit().transition().remove(),s.transition().ease($n(e,d3.easeQuad)).duration(i).attr("r",If(e)).style("fill",function(a){return qs(e,a[r.mapping.group],r.color)}).attr("cx",function(a){return e.xScale(a[r.mapping.x_var])}).attr("cy",function(a){return e.yScale(a[e.newY?e.newY:r.mapping.y_var])}),s.enter().append("circle").attr("r",If(e)).style("fill",function(a){return qs(e,a[r.mapping.group],r.color)}).style("opacity",0).attr("clip-path","url(#"+e.element.id+"clip)").attr("cx",function(a){return e.xScale(a[r.mapping.x_var])}).attr("cy",function(a){return e.yScale(a[e.newY?e.newY:r.mapping.y_var])}).attr("class",_r("point",e.element.id,r.label)).transition().ease($n(e,d3.easeQuad)).duration(i).style("opacity",1)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:i.label+": "+r[e.runtime.activeY||i.mapping.y_var],color:i.color,label:i.label,value:r[e.runtime.activeY||i.mapping.y_var],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("line",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("point",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var ad=class{static type="point";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!0},y_var:{required:!0,numeric:!0}};render(e,r){var i=e.options.transition.speed,s=r._compositeRole==="whisker_low"||r._compositeRole==="whisker_high",a=r._compositeRole==="median";if(r.mapping.low_y&&(a?y_(e,r):s?(v_(e,r),b_(e,r)):__(e,r)),r.mapping.low_x&&g_(e,r),!(s||a)){var d=e.chart.selectAll("."+_r("point",e.element.id,r.label)).data(r.data);if(d.exit().transition().duration(i).style("opacity",0).remove(),d.transition().ease($n(e,d3.easeQuad)).duration(i).delay(ku(e,0)).attr("r",If(e)).style("fill",function(v){return qs(e,v[r.mapping.group],r.color)}).attr("cx",function(v){return e.xScale(v[r.mapping.x_var])}).attr("cy",function(v){return e.yScale(v[e.newY?e.newY:r.mapping.y_var])}),d.enter().append("circle").attr("r",If(e)).style("fill",function(v){return qs(e,v[r.mapping.group],r.color)}).style("opacity",0).attr("clip-path","url(#"+e.element.id+"clip)").attr("cx",function(v){return e.xScale(v[r.mapping.x_var])}).attr("cy",function(v){return e.yScale(v[e.newY?e.newY:r.mapping.y_var])}).attr("class",_r("point",e.element.id,r.label)).transition().ease($n(e,d3.easeQuad)).duration(i).delay(ku(e,0)).style("opacity",1),e.options.dragPoints==!0){e.dragPoints(r);var m=qs(e,r.data[r.mapping.group],r.color);setTimeout(function(){e.updateRegression(m,r.label)},i)}}}getHoverSelector(e,r){return"."+_r("point",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:i.mapping.y_var+": "+r[e.runtime.activeY||i.mapping.y_var],color:i.color,label:i.label,value:r[e.runtime.activeY||i.mapping.y_var],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("point",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("crosshairX",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("crosshairY",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("whiskerCap",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("medianLine",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};function g_(t,e){var r=t.options.transition.speed,i=t.chart.selectAll("."+_r("crosshairX",t.element.id,e.label)).data(e.data);i.exit().transition().duration(r).style("opacity",0).remove(),i.transition().duration(r).ease($n(t,d3.easeQuad)).attr("x1",function(s){return t.xScale(s[e.mapping.low_x])}).attr("x2",function(s){return t.xScale(s[e.mapping.high_x])}).attr("y1",function(s){return t.yScale(s[e.mapping.y_var])}).attr("y2",function(s){return t.yScale(s[e.mapping.y_var])}),i.enter().append("line").style("fill","none").style("stroke","black").attr("clip-path","url(#"+t.element.id+"clip)").style("opacity",.5).attr("x1",function(s){return t.xScale(s[e.mapping.x_var])}).attr("x2",function(s){return t.xScale(s[e.mapping.x_var])}).attr("y1",function(s){return t.yScale(s[e.mapping.y_var])}).attr("y2",function(s){return t.yScale(s[e.mapping.y_var])}).attr("class",_r("crosshairX",t.element.id,e.label)).transition().delay(r).duration(r).ease($n(t,d3.easeQuad)).attr("x1",function(s){return t.xScale(s[e.mapping.low_x])}).attr("x2",function(s){return t.xScale(s[e.mapping.high_x])})}function y_(t,e){var r=t.options.transition.speed,i=(e.options&&e.options.rangeBarWidth?e.options.rangeBarWidth:Math.max(6,Math.min(60,(t.width-(t.margin.left+t.margin.right))/Math.max(e.data.length*3,1))))/2,s=t.chart.selectAll("."+_r("medianLine",t.element.id,e.label)).data(e.data);s.exit().transition().duration(r).style("opacity",0).remove(),s.transition().duration(r).ease($n(t,d3.easeQuad)).attr("x1",function(a){return t.xScale(a[e.mapping.x_var])-i}).attr("x2",function(a){return t.xScale(a[e.mapping.x_var])+i}).attr("y1",function(a){return t.yScale(a[e.mapping.y_var])}).attr("y2",function(a){return t.yScale(a[e.mapping.y_var])}),s.enter().append("line").style("fill","none").style("stroke","white").style("stroke-width","2px").attr("clip-path","url(#"+t.element.id+"clip)").attr("x1",function(a){return t.xScale(a[e.mapping.x_var])}).attr("x2",function(a){return t.xScale(a[e.mapping.x_var])}).attr("y1",function(a){return t.yScale(a[e.mapping.y_var])}).attr("y2",function(a){return t.yScale(a[e.mapping.y_var])}).attr("class",_r("medianLine",t.element.id,e.label)).transition().delay(r).duration(r).ease($n(t,d3.easeQuad)).style("opacity",1).attr("x1",function(a){return t.xScale(a[e.mapping.x_var])-i}).attr("x2",function(a){return t.xScale(a[e.mapping.x_var])+i})}function b_(t,e){var r=t.options.transition.speed,i=8,s=e._compositeRole==="whisker_low",a=s?e.mapping.low_y:e.mapping.high_y,d=t.chart.selectAll("."+_r("whiskerCap",t.element.id,e.label)).data(e.data);d.exit().transition().duration(r).style("opacity",0).remove(),d.transition().duration(r).ease($n(t,d3.easeQuad)).attr("x1",function(m){return t.xScale(m[e.mapping.x_var])-i}).attr("x2",function(m){return t.xScale(m[e.mapping.x_var])+i}).attr("y1",function(m){return t.yScale(m[a])}).attr("y2",function(m){return t.yScale(m[a])}),d.enter().append("line").style("fill","none").style("stroke","black").attr("clip-path","url(#"+t.element.id+"clip)").style("opacity",.5).attr("x1",function(m){return t.xScale(m[e.mapping.x_var])}).attr("x2",function(m){return t.xScale(m[e.mapping.x_var])}).attr("y1",function(m){return t.yScale(m[a])}).attr("y2",function(m){return t.yScale(m[a])}).attr("class",_r("whiskerCap",t.element.id,e.label)).transition().delay(r*2).duration(r).ease($n(t,d3.easeQuad)).attr("x1",function(m){return t.xScale(m[e.mapping.x_var])-i}).attr("x2",function(m){return t.xScale(m[e.mapping.x_var])+i})}function v_(t,e){var r=t.options.transition.speed,i=e._compositeRole==="whisker_low",s=i?e.mapping.high_y:e.mapping.low_y,a=i?e.mapping.low_y:e.mapping.high_y,d=t.chart.selectAll("."+_r("crosshairY",t.element.id,e.label)).data(e.data);d.exit().transition().duration(r).style("opacity",0).remove(),d.transition().ease($n(t,d3.easeQuad)).duration(r).attr("x1",function(m){return t.xScale(m[e.mapping.x_var])}).attr("x2",function(m){return t.xScale(m[e.mapping.x_var])}).attr("y1",function(m){return t.yScale(m[s])}).attr("y2",function(m){return t.yScale(m[a])}),d.enter().append("line").style("fill","none").style("stroke","black").attr("clip-path","url(#"+t.element.id+"clip)").style("opacity",.5).attr("x1",function(m){return t.xScale(m[e.mapping.x_var])}).attr("x2",function(m){return t.xScale(m[e.mapping.x_var])}).attr("y1",function(m){return t.yScale(m[s])}).attr("y2",function(m){return t.yScale(m[s])}).attr("class",_r("crosshairY",t.element.id,e.label)).transition().delay(r).ease($n(t,d3.easeQuad)).duration(r).attr("y2",function(m){return t.yScale(m[a])})}function __(t,e){var r=t.options.transition.speed,i=t.chart.selectAll("."+_r("crosshairY",t.element.id,e.label)).data(e.data);i.exit().transition().duration(r).style("opacity",0).remove(),i.transition().ease($n(t,d3.easeQuad)).duration(r).attr("x1",function(s){return t.xScale(s[e.mapping.x_var])}).attr("x2",function(s){return t.xScale(s[e.mapping.x_var])}).attr("y1",function(s){return t.yScale(s[e.mapping.low_y])}).attr("y2",function(s){return t.yScale(s[e.mapping.high_y])}),i.enter().append("line").style("fill","none").style("stroke","black").attr("clip-path","url(#"+t.element.id+"clip)").style("opacity",.5).attr("x1",function(s){return t.xScale(s[e.mapping.x_var])}).attr("x2",function(s){return t.xScale(s[e.mapping.x_var])}).attr("y1",function(s){return t.yScale(s[e.mapping.y_var])}).attr("y2",function(s){return t.yScale(s[e.mapping.y_var])}).attr("class",_r("crosshairY",t.element.id,e.label)).transition().delay(r).ease($n(t,d3.easeQuad)).duration(r).attr("y1",function(s){return t.yScale(s[e.mapping.low_y])}).attr("y2",function(s){return t.yScale(s[e.mapping.high_y])})}var od=class{static type="area";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"overlay",scaleCapabilities:{invertX:!0}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["low_y","high_y"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!0}};render(e,r){var i=r.data,s=r.label,a=e.options.transition.speed,d=r.options&&r.options.orientation==="vertical",m=r.options&&typeof r.options.areaOpacity=="number"?r.options.areaOpacity:.4,v=!!(r.options&&r.options.boundaryStroke===!0),_;d?_=d3.area().curve(d3.curveMonotoneY).y(function(I){return e.yScale(I[r.mapping.y_var])}).x0(function(I){return e.xScale(I[r.mapping.low_x])}).x1(function(I){return e.xScale(I[r.mapping.high_x])}):_=d3.area().curve(d3.curveMonotoneX).x(function(I){return e.xScale(I[r.mapping.x_var])}).y0(function(I){return e.yScale(I[r.mapping.low_y])}).y1(function(I){return e.yScale(I[r.mapping.high_y])});var x=e.chart.selectAll("."+_r("area",e.element.id,s)).data([i]);x.exit().transition().duration(a).style("opacity",0).remove();var w=x.enter().append("path").attr("clip-path","url(#"+e.element.id+"clip)").style("fill",function(I){return qs(e,I[0][r.mapping.group],r.color)}).style("stroke",v?r.color:"none").style("stroke-width",v?"1px":"0").style("stroke-opacity",v?.85:0).style("opacity",0).attr("class",_r("area",e.element.id,s));x.merge(w).attr("clip-path","url(#"+e.element.id+"clip)").transition().ease($n(e,d3.easeQuad)).duration(a).attr("d",_).style("stroke",v?r.color:"none").style("stroke-width",v?"1px":"0").style("stroke-opacity",v?.85:0).style("opacity",m)}formatTooltip(e,r,i){var s=r.density!=null?r.density:r[i.mapping.high_y],a=i.options&&i.options.orientation==="vertical"?i.mapping.y_var:i.mapping.x_var,d=r[a];return{title:a+": "+d,body:i.label+": "+s,color:i.color,label:i.label,value:s,raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("area",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var ld=class{static type="bar";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"linear",yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0},y_var:{required:!0,numeric:!0}};render(e,r){if(e.options.flipAxis===!0){S_(e,r);return}x_(e,r)}getHoverSelector(e,r){return"."+_r("bar",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:i.mapping.y_var+": "+r[i.mapping.y_var],color:i.color,label:i.label,value:r[i.mapping.y_var],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("bar",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};function x_(t,e){var r=t.margin,i=e.data,s=e.label,a=e.options.barSize=="small"?.5:1,d=t.options.categoricalScale.xAxis==!0?(t.width-(r.left+r.right))/t.x_banded.length:Math.min(100,(t.width-(t.margin.right+t.margin.left))/e.data.length),m=t.options.transition.speed,v=t.chart.selectAll("."+_r("bar",t.element.id,s)).data(i);v.exit().transition().ease($n(t,d3.easeQuadIn)).duration(m).attr("y",t.yScale(0)).remove();var _=v.enter().append("rect").attr("class",_r("bar",t.element.id,s)).attr("clip-path","url(#"+t.element.id+"clip)").style("fill",function(x){return qs(t,x[e.mapping.x_var],e.color)}).attr("x",function(x){return ey(t,x,e,d,a,t.options.categoricalScale.xAxis)}).attr("y",t.yScale(0)).attr("width",a*d-2).attr("height",t.yScale(0));v.merge(_).transition().ease($n(t,d3.easeQuadOut)).duration(m).delay(ku(t,20)).attr("x",function(x){return ey(t,x,e,d,a,t.options.categoricalScale.xAxis)}).attr("y",function(x){return t.yScale(x[e.mapping.y_var])}).attr("width",a*d-2).attr("height",function(x){return t.height-(r.top+r.bottom)-t.yScale(x[e.mapping.y_var])})}function ey(t,e,r,i,s,a){return a===!0?s==1?t.xScale(e[r.mapping.x_var]):t.xScale(e[r.mapping.x_var])+i/4:s==1?t.xScale(e[r.mapping.x_var])-i/2:t.xScale(e[r.mapping.x_var])-i/4}function S_(t,e){var r=t.margin,i=e.data,s=e.label,a=e.options.barSize=="small"?.5:1,d=t.options.categoricalScale.yAxis==!0?(t.height-(r.top+r.bottom))/e.data.length:Math.min(100,(t.height-(t.margin.top+t.margin.bottom))/e.data.length),m=t.options.transition.speed,v=t.chart.selectAll("."+_r("bar",t.element.id,s)).data(i);v.exit().transition().ease($n(t,d3.easeQuadIn)).duration(m).attr("width",0).remove();var _=v.enter().append("rect").attr("class",_r("bar",t.element.id,s)).attr("clip-path","url(#"+t.element.id+"clip)").style("fill",function(x){return qs(t,x[e.mapping.x_var],e.color)}).attr("y",function(x){return a==1?t.yScale(x[e.mapping.x_var]):t.yScale(x[e.mapping.x_var])+d/4}).attr("x",function(x){return t.xScale(Math.min(0,x[e.mapping.y_var]))}).attr("height",a*d-2).attr("width",0);v.merge(_).transition().ease($n(t,d3.easeQuadOut)).duration(m).delay(ku(t,20)).attr("y",function(x){return a==1?t.yScale(x[e.mapping.x_var]):t.yScale(x[e.mapping.x_var])+d/4}).attr("x",function(x){return t.xScale(Math.min(0,x[e.mapping.y_var]))}).attr("height",a*d-2).attr("width",function(x){return Math.abs(t.xScale(x[e.mapping.y_var])-t.xScale(0))})}function s1(t){return t.height}function D0(t){d3.select(t.element).selectAll(".myIO-svg, .toolTip, .myIO-fab, .myIO-panel, .myIO-sheet-backdrop").remove(),d3.select(t.element).classed("myIO-container",!0).style("position","relative"),ty(t),t.svg=d3.select(t.element).append("svg").attr("class","myIO-svg").attr("id","myIO-svg"+t.element.id).attr("width",t.totalWidth).attr("height",t.height).attr("viewBox","0 0 "+t.totalWidth+" "+t.height).attr("role","img").attr("aria-label",E_(t)),t.svg.append("rect").attr("class","myIO-bg").attr("width",t.totalWidth).attr("height",t.height).attr("fill","var(--chart-bg, #ffffff)"),R0(t),ny(t),t.chart=t.plot.append("g").attr("class","myIO-chart-area")}function E_(t){var e=t.plotLayers[0];if(!e)return"Data visualization chart";var r=e.type?e.type.replace(/([A-Z])/g," $1").toLowerCase():"data visualization",i=t.options.xAxisLabel||t.options.xAxisFormat||"x-axis",s=t.options.yAxisLabel||t.options.yAxisFormat||"y-axis";return r.charAt(0).toUpperCase()+r.slice(1)+" chart showing "+s+" by "+i}function ty(t){d3.select(t.element).classed("myIO-container--narrow",id(t))}function ry(t){ty(t),t.svg.attr("width",t.totalWidth).attr("height",t.height).attr("viewBox","0 0 "+t.totalWidth+" "+t.height),ny(t),t.plotLayers[0]&&t.plotLayers[0].type!=="gauge"&&t.plotLayers[0].type!=="donut"&&t.clipPath&&t.clipPath.attr("x",0).attr("y",0).attr("width",t.width-(t.margin.left+t.margin.right)).attr("height",s1(t)-(t.margin.top+t.margin.bottom)),R0(t)}function R0(t){if(!(!t||!t.svg)){var e=t.config&&t.config.title,r=e?[e]:[];t.svg.selectAll(".myIO-chart-title").data(r).join(function(i){return i.append("text").attr("class","myIO-chart-title").attr("x",t.margin.left).attr("y",19).text(function(s){return s})},function(i){return i.attr("x",t.margin.left).attr("y",19).text(function(s){return s})},function(i){return i.remove()})}}function ny(t){var e=t.plotLayers[0]?t.plotLayers[0].type:null;switch(e){case"gauge":t.plot=t.plot||t.svg.append("g"),t.plot.attr("transform","translate("+t.width/2+","+Ph(t,t.height*.8,t.height*.6)+")").attr("class","myIO-chart-offset");break;case"donut":t.plot=t.plot||t.svg.append("g"),t.plot.attr("transform","translate("+t.width/2+","+Ph(t,t.height,t.height*.8)/2+")").attr("class","myIO-chart-offset");break;default:t.plot=t.plot||t.svg.append("g"),t.plot.attr("transform","translate("+t.margin.left+","+t.margin.top+")").attr("class","myIO-chart-offset")}}function B0(t,e,r){e.axesChart&&w_(t,{isInitialRender:r&&r.isInitialRender})}function w_(t,e){var r=t.margin,i=s1(t),s=t.options.transition.speed,a=t.options.xAxisFormat==="yearMon"?function(I){var O=+I,z=Number.isFinite(O)&&O>0&&O<1e6?O*864e5:O,J=new Date(z);return Number.isFinite(J.getTime())?d3.utcFormat("%b %d")(J):I}:t.options.xAxisFormat?d3.format(t.options.xAxisFormat):null,d=t.options.yAxisFormat?d3.format(t.options.yAxisFormat):null,m=t.plot.selectAll(".x-axis").data([null]).join("g").attr("class","x-axis"),v=t.plot.selectAll(".y-axis").data([null]).join("g").attr("class","y-axis"),_=e&&e.isInitialRender?m:m.transition().ease(d3.easeQuad).duration(s);if(t.options.suppressAxis&&t.options.suppressAxis.xAxis===!0)m.selectAll("*").remove();else switch(t.options.categoricalScale.xAxis){case!0:_.attr("transform","translate(0,"+(i-(r.top+r.bottom))+")").call(d3.axisBottom(t.xScale)).selectAll("text").attr("dx","-.25em").attr("text-anchor",t.width<550?"end":"center").attr("transform",t.width<550?"rotate(-65)":"rotate(-0)");break;case!1:var x=d3.axisBottom(t.xScale).tickSize(-(i-(r.top+r.bottom))),w=A_(t.options.xTickLabels);w?x.tickValues(Object.keys(w).map(function(I){return+I})).tickFormat(function(I){var O=w[String(I)];return O??I}):(x.ticks(t.width<550?5:10),a&&x.tickFormat(a)),_.attr("transform","translate(0,"+(i-(r.top+r.bottom))+")").call(x).selectAll("text").attr("dy","1.25em").attr("text-anchor",t.width<550?"end":"center").attr("transform",t.width<550?"rotate(-65)":"rotate(-0)")}sy(m,"x"),k0(t,t.yScale,v,e),T_(t)}function k0(t,e,r,i){var s=t.options.yAxisFormat?d3.format(t.options.yAxisFormat):null,a=s1(t),d=t.options.transition.speed,m=t.newScaleY?d3.format(t.newScaleY):s,v=r||t.plot.selectAll(".y-axis"),_=i&&i.isInitialRender?v:v.transition().ease(d3.easeQuad).duration(d);if(t.options.suppressAxis&&t.options.suppressAxis.yAxis===!0){v.selectAll("*").remove();return}var x=d3.axisLeft(e).tickSize(-(t.width-(t.margin.right+t.margin.left)));typeof e.ticks=="function"&&(x.ticks(a<450?5:10),m&&x.tickFormat(m)),_.call(x).selectAll("text").attr("dx","-.25em"),sy(t.plot.selectAll(".y-axis"),"y")}function A_(t){if(!t)return null;if(Array.isArray(t))return t.length>0?t.reduce(function(r,i){return i&&i.position!=null&&(r[iy(i.position)]=i.label),r},{}):null;var e={};return Object.keys(t).forEach(function(r){e[iy(r)]=t[r]}),Object.keys(e).length>0?e:null}function iy(t){var e=+t;return Number.isFinite(e)?String(e):String(t)}function T_(t){if(!(!t||!t.plot)){var e=t.width-(t.margin.left+t.margin.right),r=s1(t)-(t.margin.top+t.margin.bottom),i=t.options.xAxisLabel&&!(t.options.suppressAxis&&t.options.suppressAxis.xAxis===!0)?[t.options.xAxisLabel]:[],s=t.options.yAxisLabel&&!(t.options.suppressAxis&&t.options.suppressAxis.yAxis===!0)?[t.options.yAxisLabel]:[];t.plot.selectAll(".myIO-axis-title-x").data(i).join(function(a){return a.append("text").attr("class","myIO-axis-title myIO-axis-title-x").attr("text-anchor","middle").attr("x",e/2).attr("y",r+t.margin.bottom-16).text(function(d){return d})},function(a){return a.attr("x",e/2).attr("y",r+t.margin.bottom-16).text(function(d){return d})},function(a){return a.remove()}),t.plot.selectAll(".myIO-axis-title-y").data(s).join(function(a){return a.append("text").attr("class","myIO-axis-title myIO-axis-title-y").attr("text-anchor","middle").attr("transform","translate("+(-t.margin.left+6)+","+r/2+") rotate(-90)").text(function(d){return d})},function(a){return a.attr("transform","translate("+(-t.margin.left+6)+","+r/2+") rotate(-90)").text(function(d){return d})},function(a){return a.remove()})}}function sy(t,e){t.selectAll(".domain").attr("class",e+"-axis-line"),t.selectAll(".tick line").attr("class",e+"-grid"),t.selectAll("text").attr("class",e+"-label")}function F0(t,e,r,i){var s=t.options.transition.speed;k0(t,t.yScale);var a=d3.select(t.element).selectAll(".tag-grouped-bar-g").selectAll("rect").data(function(m){return m});a.exit().transition().ease($n(t,d3.easeQuadIn)).duration(s).attr("y",t.yScale(0)).attr("height",0).style("opacity",0).remove();var d=a.enter().append("rect").attr("clip-path","url(#"+t.element.id+"clip)").attr("x",function(m){return t.xScale(+m.data[0])+i*m.idx}).attr("y",t.yScale(0)).attr("height",0).attr("width",i);d.merge(a).transition().ease($n(t,d3.easeQuad)).duration(s).delay(ku(t,20,function(m){return m.idx})).attr("x",function(m){return t.xScale(+m.data[0])+i*m.idx}).attr("width",i).attr("y",function(m){return t.yScale(m[1]-m[0])}).attr("height",function(m){return t.yScale(0)-t.yScale(m[1]-m[0])})}function M0(t,e,r,i){var s=t.options.transition.speed,a=d3.scaleLinear().range(t.yScale.range()),d=I_(e);a.domain([0,d*1.1]),k0(t,a);var m=d3.select(t.element).selectAll(".tag-grouped-bar-g").selectAll("rect").data(function(_){return _});m.exit().transition().ease($n(t,d3.easeQuadIn)).duration(s).attr("y",a(0)).attr("height",0).style("opacity",0).remove();var v=m.enter().append("rect").attr("clip-path","url(#"+t.element.id+"clip)").attr("x",function(_){return t.xScale(+_.data[0])}).attr("y",a(0)).attr("height",0).attr("width",i*e.length);v.merge(m).transition().ease($n(t,d3.easeQuad)).duration(s).delay(ku(t,20,function(_){return _.idx})).attr("x",function(_){return t.xScale(+_.data[0])}).attr("width",i*e.length).attr("y",function(_){return a(_[1])}).attr("height",function(_){return a(_[0])-a(_[1])})}function $0(t,e){var r=[],i=[],s=[],a=[];t.forEach(function(w){r.push(w.data),i.push(w.label),s.push(w.mapping.x_var),a.push(w.mapping.y_var)});var d=[].concat.apply([],r),m=d3.group(d,function(w){return w[s[0]]}),v=[...Array(i.length).keys()],_=e.newY?e.newY:a[0],x=d3.stack().keys(v).value(function(w,I){return w[1][I]==null?0:w[1][I][_]})(m);return x.forEach(function(w,I){w.forEach(function(O){O.idx=I})}),x}function I_(t){return d3.max(t[t.length-1],function(e){return e[1]})}var cd=class{static type="groupedBar";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"linear",yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0},y_var:{required:!0,numeric:!0},group:{required:!0}};render(e,r,i){var s=i||[r],a=$0(s,e),d=s.map(function(_){return _.color}),m=(e.width-(e.margin.right+e.margin.left))/a[0].length/d.length;typeof e.layout>"u"&&(e.layout="grouped");let v=e.chart.selectAll("g").data(a);v.exit().remove(),v.enter().append("g").style("fill",function(_,x){return qs(e,_[r.mapping.group],d[x])}).attr("class","tag-grouped-bar-g"),v.merge(v).style("fill",function(_,x){return qs(e,_[r.mapping.group],d[x])}).call(function(){e.layout==="grouped"?F0(e,a,d,m):M0(e,a,d,m)})}getHoverSelector(){return".tag-grouped-bar-g rect"}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r.data[0],body:i.mapping.y_var+": "+(r[1]-r[0]),color:i.color,label:i.label,value:r[1]-r[0],raw:r}}remove(e){e.dom.chartArea.selectAll(".tag-grouped-bar-g").transition().duration(500).style("opacity",0).remove()}};var ud=class{static type="histogram";static traits={hasAxes:!0,referenceLines:!1,legendType:"layer",binning:!0,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["value"],domainMerge:"union"};static dataContract={value:{required:!0,numeric:!0}};render(e,r){var i=r.bins,s=r.label,a=e.options.transition.speed,d=e.chart.selectAll("."+_r("bar",e.element.id,s)).data(i);d.exit().transition().duration(a).attr("y",e.yScale(0)).remove();var m=d.enter().append("rect").attr("class",_r("bar",e.element.id,s)).attr("clip-path","url(#"+e.element.id+"clip)").style("fill",function(){return qs(e,r.label,r.color)}).attr("x",function(v){return e.xScale(v.x0)+1}).attr("y",e.yScale(0)).attr("width",function(v){return Math.max(0,e.xScale(v.x1)-e.xScale(v.x0)-1)}).attr("height",e.yScale(0));d.merge(m).transition().ease($n(e,d3.easeQuad)).duration(a).attr("x",function(v){return e.xScale(v.x0)+1}).attr("width",function(v){return Math.max(0,e.xScale(v.x1)-e.xScale(v.x0)-1)}).attr("y",function(v){return e.yScale(v.length)}).attr("height",function(v){return e.yScale(0)-e.yScale(v.length)})}getHoverSelector(e,r){return"."+_r("bar",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:"Bin: "+r.x0+" to "+r.x1,body:"Count: "+r.length,color:i.color,label:"count",value:r.length,raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("bar",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var fd=class{static type="hexbin";static traits={hasAxes:!0,referenceLines:!1,legendType:"continuous",binning:!1,rolloverStyle:"hex",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!0},y_var:{required:!0,numeric:!0},radius:{required:!0,numeric:!0,positive:!0}};render(e,r){var i=e.options.transition.speed,s=r.data.map(function(I){return{0:e.xScale(+I[r.mapping.x_var]),1:e.yScale(+I[r.mapping.y_var])}}).sort(function(I){return d3.ascending(I.index)}),a=d3.extent(r.data,function(I){return+I[r.mapping.x_var]}),d=d3.extent(r.data,function(I){return+I[r.mapping.y_var]}),m=typeof r.mapping.radius=="number"?r.mapping.radius:+r.mapping.radius,v=d3.hexbin().radius(m*(Math.min(e.width,e.height)/1e3)).extent([[a[0],d[0]],[a[1],d[1]]]),_=v(s);e.colorContinuous=d3.scaleSequential(d3.interpolateBuPu).domain([0,d3.max(_,function(I){return I.length})]);var x=e.chart.attr("clip-path","url(#"+e.element.id+"clip)").selectAll("."+_r("hexbin",e.element.id,r.label)).data(_);x.exit().transition().duration(i).style("opacity",0).remove();var w=x.enter().append("path").attr("class",_r("hexbin",e.element.id,r.label)).attr("d",v.hexagon()).attr("transform",function(I){return"translate("+I.x+","+I.y+")"}).attr("fill","white");x.merge(w).transition().ease($n(e,d3.easeQuad)).duration(i).attr("d",v.hexagon()).attr("transform",function(I){return"translate("+I.x+","+I.y+")"}).attr("fill",function(I){return e.colorContinuous(I.length)})}getHoverSelector(e,r){return"."+_r("hexbin",e.dom.element.id,r.label)}formatTooltip(e,r){return{title:"x: "+e.derived.xScale.invert(r.x)+", y: "+e.derived.yScale.invert(r.y),body:"Count: "+r.length,color:e.derived.colorContinuous(r.length),label:"count",value:r.length,raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("hexbin",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};function P0(t,e){var r=JSON.stringify(e);function i(v){for(var _=typeof v!="object"?JSON.parse(v):v,x=Object.keys(_[0]).toString(),w=x+`\r +`,I=0;I<_.length;I++){var O="";for(var z in _[I])O!==""&&(O+=","),O+=_[I][z];w+=O+`\r +`}return w}var s=i(r),a=new Blob([s],{type:"text/csv;charset=utf-8;"}),d=document.createElement("a");if(d.download!==void 0){var m=URL.createObjectURL(a);d.setAttribute("href",m),d.setAttribute("download",t),d.style.visibility="hidden",document.body.appendChild(d),d.click(),document.body.removeChild(d)}}var ay=["--chart-text-color","--chart-font","--chart-annotation-font-size","--chart-grid-color","--chart-grid-opacity","--chart-bg","--chart-ref-line-color","--chart-ref-line-width","--chart-cursor-rule-color","--chart-cursor-rule-width","--chart-annotation-ring","--chart-primary-color","--chart-brush-fill","--chart-brush-stroke","--chart-brush-dim-opacity","--chart-legend-inactive-opacity","--chart-status-bar-color"];function oy(t,e){for(var r=getComputedStyle(e),i={},s=0;s-1&&i.indexOf(a)===-1,kind:s.type}})}}function C_(t){var e=t.colorContinuous||t.derived&&t.derived.colorContinuous;return{type:"continuous",items:[],colorScale:e||null,domain:e&&typeof e.domain=="function"?e.domain():null}}var Fu=16,pd=12,ly=6,L_=18,N_=6,Vh=12,cy=14,A6=180;function Cf(t){var e=t.svg&&t.svg.node?t.svg.node():null;if(e&&e.querySelector&&e.querySelector(".myIO-inline-legend"))return{extraHeight:0,cleanup:function(){}};var r=hd(t,t.runtime&&t.runtime._legendState);if(!r||!r.type)return{extraHeight:0,cleanup:function(){}};var i=r.items?r.items.filter(function(I){return I.visible!==!1}):[];if(r.type!=="continuous"&&i.length===0)return{extraHeight:0,cleanup:function(){}};var s=t.svg.node(),a=parseFloat(s.getAttribute("width"))||t.totalWidth||t.width,d=parseFloat(s.getAttribute("height"))||t.height,m=s.getAttribute("viewBox"),v=k_(t),_=document.createElementNS("http://www.w3.org/2000/svg","g");_.setAttribute("class","myIO-export-legend");var x;r.type==="continuous"?x=R_(_,r,a,v):x=D_(_,i,a,v),_.setAttribute("transform","translate(0,"+d+")");var w=d+x;return s.appendChild(_),s.setAttribute("height",w),s.setAttribute("viewBox","0 0 "+a+" "+w),{extraHeight:x,cleanup:function(){s.removeChild(_),s.setAttribute("height",d),s.setAttribute("viewBox",m)}}}function D_(t,e,r,i){var s=r-Fu*2,a=Fu,d=Fu,m=Math.max(pd,Vh);return e.forEach(function(v){var _=B_(v.label,Vh),x=pd+ly+_;a+x>Fu+s&&a>Fu&&(a=Fu,d+=m+N_);var w=document.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",a),w.setAttribute("y",d),w.setAttribute("width",pd),w.setAttribute("height",pd),w.setAttribute("rx",2),w.setAttribute("fill",v.color||"#6b7280"),t.appendChild(w);var I=document.createElementNS("http://www.w3.org/2000/svg","text");I.setAttribute("x",a+pd+ly),I.setAttribute("y",d+pd-1),I.setAttribute("font-family","Roboto, Arial, sans-serif"),I.setAttribute("font-size",Vh),I.setAttribute("fill",i),I.textContent=v.label,t.appendChild(I),a+=x+L_}),d+m+Fu}function R_(t,e,r,i){var s=e.colorScale;if(!s)return 0;var a=e.domain||s.domain(),d=Fu,m=(r-A6)/2,v=document.createElementNS("http://www.w3.org/2000/svg","defs"),_=document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),x="export-legend-grad-"+Date.now();_.setAttribute("id",x);for(var w=8,I=a[0],O=a[a.length-1],z=0;z"u"||!/MSIE [1-9]\./.test(navigator.userAgent)){var e=t.document,r=function(){return t.URL||t.webkitURL||t},i=e.createElementNS("http://www.w3.org/1999/xhtml","a"),s="download"in i,a=function(re){var q=new MouseEvent("click");re.dispatchEvent(q)},d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),m=t.webkitRequestFileSystem,v=t.requestFileSystem||m||t.mozRequestFileSystem,_=function(re){(t.setImmediate||t.setTimeout)(function(){throw re},0)},x="application/octet-stream",w=0,I=4e4,O=function(re){var q=function(){typeof re=="string"?r().revokeObjectURL(re):re.remove()};setTimeout(q,I)},z=function(re,q,ue){q=[].concat(q);for(var K=q.length;K--;){var B=re["on"+q[K]];if(typeof B=="function")try{B.call(re,ue||re)}catch(he){_(he)}}},J=function(re){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(re.type)?new Blob(["\uFEFF",re],{type:re.type}):re},Q=function(re,q,ue){ue||(re=J(re));var K,B,he,He=this,er=re.type,Er=!1,zt=function(){z(He,"writestart progress write writeend".split(" "))},_n=function(){if(B&&d&&typeof FileReader<"u"){var On=new FileReader;return On.onloadend=function(){var bn=On.result;B.location.href="data:attachment/file"+bn.slice(bn.search(/[,;]/)),He.readyState=He.DONE,zt()},On.readAsDataURL(re),void(He.readyState=He.INIT)}if((Er||!K)&&(K=r().createObjectURL(re)),B)B.location.href=K;else{var cr=t.open(K,"_blank");cr===void 0&&d&&(t.location.href=K)}He.readyState=He.DONE,zt(),O(K)},$r=function(On){return function(){return He.readyState!==He.DONE?On.apply(this,arguments):void 0}},In={create:!0,exclusive:!1};return He.readyState=He.INIT,q||(q="download"),s?(K=r().createObjectURL(re),void setTimeout(function(){i.href=K,i.download=q,a(i),zt(),O(K),He.readyState=He.DONE})):(t.chrome&&er&&er!==x&&(he=re.slice||re.webkitSlice,re=he.call(re,0,re.size,x),Er=!0),m&&q!=="download"&&(q+=".download"),(er===x||m)&&(B=t),v?(w+=re.size,void v(t.TEMPORARY,w,$r(function(On){On.root.getDirectory("saved",In,$r(function(cr){var bn=function(){cr.getFile(q,In,$r(function(mn){mn.createWriter($r(function(qn){qn.onwriteend=function(Wt){B.location.href=mn.toURL(),He.readyState=He.DONE,z(He,"writeend",Wt),O(mn)},qn.onerror=function(){var Wt=qn.error;Wt.code!==Wt.ABORT_ERR&&_n()},"writestart progress write abort".split(" ").forEach(function(Wt){qn["on"+Wt]=He["on"+Wt]}),qn.write(re),He.abort=function(){qn.abort(),He.readyState=He.DONE},He.readyState=He.WRITING}),_n)}),_n)};cr.getFile(q,{create:!1},$r(function(mn){mn.remove(),bn()}),$r(function(mn){mn.code===mn.NOT_FOUND_ERR?bn():_n()}))}),_n)}),_n)):void _n())},oe=Q.prototype,se=function(re,q,ue){return new Q(re,q,ue)};return typeof navigator<"u"&&navigator.msSaveOrOpenBlob?function(re,q,ue){return ue||(re=J(re)),navigator.msSaveOrOpenBlob(re,q||"download")}:(oe.abort=function(){var re=this;re.readyState=re.DONE,z(re,"abort")},oe.readyState=oe.INIT=0,oe.WRITING=1,oe.DONE=2,oe.error=oe.onwritestart=oe.onprogress=oe.onwrite=oe.onabort=oe.onerror=oe.onwriteend=null,se)}})(typeof self<"u"&&self||typeof window<"u"&&window||(void 0).content);var md=null;function uy(){return window.jspdf&&window.jspdf.jsPDF?Promise.resolve(window.jspdf.jsPDF):md||(md=new Promise(function(t,e){for(var r=document.querySelectorAll("script[src]"),i=null,s=0;sd?"landscape":"portrait",O=I==="landscape"?842:595,z=I==="landscape"?595:842,J=36,Q=O-2*J,oe=z-2*J,se=Math.min(Q/a,oe/d),re=a*se,q=d*se,ue=new e({orientation:I,unit:"pt",format:[O,z]}),K=t.config.export&&t.config.export.title||t.config.axes&&t.config.axes.xAxisLabel||"myIO Chart";ue.setProperties({title:K,creator:"myIO"});var B=(O-re)/2,he=(z-q)/2;ue.addImage(w,"PNG",B,he,re,q),ue.save(t.element.id+".pdf"),v(!0)},x.readAsDataURL(_)})})})}async function dy(t){var e=Cf(t),r=Of(t.svg.node());e.cleanup();try{if(navigator.clipboard&&navigator.clipboard.write&&typeof ClipboardItem<"u"){var i=new Blob([r],{type:"image/svg+xml"}),s=new Blob([r],{type:"text/html"});await navigator.clipboard.write([new ClipboardItem({"text/html":s,"image/svg+xml":i})])}else await navigator.clipboard.writeText(r);return!0}catch(a){return console.warn("[myIO] Clipboard copy failed",a),!1}}async function hy(t){var e=Cf(t),r=t.height+e.extraHeight,i=Of(t.svg.node());e.cleanup();var s=(t.totalWidth||t.width)*2,a=r*2;return new Promise(function(d){dd(i,s,a,"png",function(m){navigator.clipboard&&navigator.clipboard.write&&typeof ClipboardItem<"u"?navigator.clipboard.write([new ClipboardItem({"image/png":m})]).then(function(){d(!0)}).catch(function(){d(!1)}):d(!1)})})}var Mu={chart:"Download data",image:"Save image",svg:"Save as SVG",pdf:"Export as PDF",clipboard:"Copy to clipboard","clipboard-png":"Copy as PNG","clipboard-svg":"Copy as SVG",percent:"Toggle percent",group2stack:"Toggle layout"};function T6(t,e,r){if(r==="image"){var i=Cf(t),s=t.height+i.extraHeight,a=Of(t.svg.node());i.cleanup(),dd(a,2*t.width,2*s,"png",function(I){V0(I,t.element.id+".png")});return}if(r==="svg"){var d=Cf(t),m=Of(t.svg.node());d.cleanup();var v=new Blob([m],{type:"image/svg+xml;charset=utf-8"});V0(v,t.element.id+".svg");return}if(r==="chart"){var _=[],x=t.runtime._brushed;x&&x.data.length>0&&t.config.interactions.brush&&t.config.interactions.brush.onSelect==="export"?_.push(x.data):t.plotLayers.forEach(function(I){_.push(I.data)}),P0(t.element.id+"_data.csv",[].concat.apply([],_));return}if(r==="pdf"){fy(t);return}if(r==="clipboard"||r==="clipboard-png"){hy(t);return}if(r==="clipboard-svg"){dy(t);return}if(r==="percent"){var w=t.runtime.activeY===t.options.toggleY[0]?[t.plotLayers[0].mapping.y_var,t.options.yAxisFormat]:t.options.toggleY;t.toggleVarY(w);return}r==="group2stack"&&t.toggleGroupedLayout(e)}function X2(t){return'"}function py(){return X2('')}function my(){return X2('')}function gy(){return X2('')}function I6(){return X2('')}function yy(){return X2('PDF')}function O6(){return X2('')}function C6(){return X2('')}var F_=10,M_=2;function L6(t){return Math.min(190,46+String(t).length*7)}function G0(t){var e={};return(t||[]).filter(function(r){var i=r.key||r.label;return e[i]?!1:(e[i]=!0,!0)})}function j0(t){return String(t.label||t.key||"")}function q0(t){if(!t)return 0;var e=t.runtime&&t.runtime.totalWidth||t.totalWidth||t.width||0,r=t.margin||{};return e-(r.left||0)-(r.right||0)}function N6(t,e){if(!Array.isArray(t)||t.length===0||!(e>0))return null;for(var r=[],i=0,s=0,a=0;ae||s>0&&s+d>e&&(i+=1,s=0,i>=M_))return null;r.push({row:i,x:s}),s+=d}return{rowCount:i+1,positions:r}}function H0(t){var e=t||{},r=Array.isArray(e.labels)?e.labels:[];return e.suppressLegend===!0?{inline:!1,panel:!1,reason:"suppressed"}:e.type?e.type==="continuous"?{inline:!1,panel:!0,reason:"continuous"}:r.length<2?{inline:!1,panel:!0,reason:"too-few-items"}:r.length>F_?{inline:!1,panel:!0,reason:"too-many-items"}:N6(r,e.availableWidth)===null?{inline:!1,panel:!0,reason:"too-narrow"}:{inline:!0,panel:!1,reason:"inline-active"}:{inline:!1,panel:!1,reason:"no-legend"}}function Gh(t,e){t.runtime||(t.runtime={});var r=Array.isArray(t.runtime._hiddenLayerKeys)?t.runtime._hiddenLayerKeys.slice():[],i=r.indexOf(e.key);i===-1?r.push(e.key):r.splice(i,1),t.runtime._hiddenLayerKeys=r,t.derived=t.derived||{},t.derived.currentLayers=(t.plotLayers||[]).filter(function(s){return r.indexOf(s._composite||s.label)===-1}),t.syncLegacyAliases(),t.renderCurrentLayers()}function jh(t,e,r){t.runtime||(t.runtime={}),Array.isArray(t.runtime._hiddenOrdinalSegments)||(t.runtime._hiddenOrdinalSegments=[]);var i=t.runtime._hiddenOrdinalSegments,s=i.indexOf(e.key);s===-1?i.push(e.key):i.splice(s,1),vy(t),typeof r=="function"&&r(t)}function by(t,e,r){t.runtime=t.runtime||{},e==="ordinal"?(t.runtime._hiddenOrdinalSegments=[],vy(t),typeof r=="function"&&r(t)):(t.runtime._hiddenLayerKeys=[],t.derived=t.derived||{},t.derived.currentLayers=(t.plotLayers||[]).slice(),t.syncLegacyAliases(),t.renderCurrentLayers())}function vy(t){t.runtime._suppressOrdinalLegendRebuild=!0;try{t.routeLayers(t.currentLayers||t.derived&&t.derived.currentLayers||[])}finally{t.runtime._suppressOrdinalLegendRebuild=!1}}var _y="myIO-panel--open",xy="myIO-sheet-backdrop--open",$_="myIO-panel--bottom",P_="myIO-panel--side";function D6(t){if(!t||!t.element||(d3.select(t.element).select(".myIO-fab").remove(),Y_(t)))return null;t.dom=t.dom||{};var e=d3.select(t.element).append("button").attr("type","button").attr("class","myIO-fab").attr("aria-label","Legend and actions").attr("aria-expanded","false").html(I6());return e.on("click",function(){z0(t)}),e.on("keydown",function(r){(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),z0(t))}),t.dom.fab=e,W0(t),e}function z0(t){if(!t||!t.element)return null;if(t.dom=t.dom||{},t.runtime=t.runtime||{},t.runtime._sheetCloseTimer&&(clearTimeout(t.runtime._sheetCloseTimer),t.runtime._sheetCloseTimer=null),t.runtime._sheetOpen)return t.dom.panel||null;Ty(t);var e=d3.select(t.element).append("div").attr("class","myIO-sheet-backdrop").attr("aria-hidden","true").on("click",function(){$u(t)}),r=d3.select(t.element).append("div").attr("class","myIO-panel "+(id(t)?$_:P_)).attr("role","dialog").attr("aria-modal","true").attr("aria-label",X_(t)).attr("tabindex","-1"),i=r.append("div").attr("class","myIO-sheet-header");if(i.append("div").attr("class","myIO-sheet-handle"),i.append("button").attr("type","button").attr("class","myIO-sheet-close").attr("aria-label","Close").html(Oy()).on("click",function(){$u(t)}).on("keydown",function(a){(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),$u(t))}),t.dom.backdrop=e,t.dom.panel=r,t.dom.sheetLegendSection=null,t.dom.sheetLegendBody=null,t.dom.sheetActionsBody=null,Ey(t).panel){var s=r.append("div").attr("class","myIO-sheet-legend-section").attr("data-sheet-section","legend");t.dom.sheetLegendSection=s,t.dom.sheetLegendBody=s.append("div").attr("class","myIO-sheet-legend"),s.append("hr").attr("class","myIO-sheet-divider")}return t.dom.sheetActionsBody=r.append("div").attr("class","myIO-sheet-actions").attr("data-sheet-section","actions"),Lf(t),U_(t),t.runtime._sheetOpen=!0,W_(t),W0(t),window.requestAnimationFrame(function(){e.classed(xy,!0),r.classed(_y,!0),J_(r.node())}),z_(t),r}function $u(t,e){if(!(!t||!t.dom)){var r=e||{};t.runtime||(t.runtime={}),t.runtime._sheetCloseTimer&&(clearTimeout(t.runtime._sheetCloseTimer),t.runtime._sheetCloseTimer=null),t.dom.backdrop&&t.dom.backdrop.classed(xy,!1),t.dom.panel&&t.dom.panel.classed(_y,!1),Ay(t),t.runtime._sheetOpen=!1,W0(t);var i=function(){Ty(t),t.runtime._sheetCloseTimer=null,W0(t),r.returnFocus!==!1&&t.dom.fab&&typeof t.dom.fab.node=="function"&&t.dom.fab.node()&&t.dom.fab.node().focus()};if(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){i();return}var s=t.dom.panel&&t.dom.panel.node?t.dom.panel.node():null,a=t.dom.backdrop&&t.dom.backdrop.node?t.dom.backdrop.node():null;if(!s||!a){i();return}var d=!1,m=function(){d||(d=!0,i())};s.addEventListener("transitionend",m,{once:!0}),a.addEventListener("transitionend",m,{once:!0}),t.runtime._sheetCloseTimer=window.setTimeout(m,350)}}function Lf(t){if(!(!t||!t.dom||!t.dom.panel)){var e=t.dom.sheetLegendBody,r=t.dom.sheetLegendSection;if(e){var i=t.dom.panel.node(),s=i?i.scrollTop:0,a=wy(t);if(e.selectAll("*").remove(),r&&r.selectAll(".myIO-sheet-legend-reset").remove(),!Ey(t).panel){r&&r.style("display","none"),i&&(i.scrollTop=s);return}r&&r.style("display",null),a.type==="continuous"?j_(t,e,a):a.type==="ordinal"?G_(t,e,a):V_(t,e,a),i&&(i.scrollTop=s)}}}function U_(t){if(!(!t.dom||!t.dom.sheetActionsBody)){var e=q_(t),r=t.dom.sheetActionsBody;r.selectAll("*").remove(),e.forEach(function(i){var s=r.append("button").attr("type","button").attr("class","myIO-sheet-action").attr("data-action",i.name).on("click",function(){T6(t,t.currentLayers||t.derived&&t.derived.currentLayers||t.plotLayers||[],i.name)}).on("keydown",function(a){(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),T6(t,t.currentLayers||t.derived&&t.derived.currentLayers||t.plotLayers||[],i.name))});s.append("span").attr("class","myIO-sheet-action-icon").attr("aria-hidden","true").html(i.icon),s.append("span").attr("class","myIO-sheet-action-label").text(i.label)})}}function V_(t,e,r){var i=r.items.length>4;e.classed("myIO-sheet-legend--grid",i),r.items.forEach(function(s){var a=e.append("button").attr("type","button").attr("class","myIO-sheet-legend-item").attr("role","switch").attr("aria-checked",s.visible?"true":"false").attr("data-key",s.key).on("click",function(){Gh(t,s)}).on("keydown",function(d){(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),Gh(t,s))});a.append("span").attr("class","myIO-sheet-swatch").style("background-color",s.color),a.append("span").attr("class","myIO-sheet-legend-label").text(s.label)}),Sy(t,r)}function G_(t,e,r){var i=r.items.length>4;e.classed("myIO-sheet-legend--grid",i),r.items.forEach(function(s){var a=e.append("button").attr("type","button").attr("class","myIO-sheet-legend-item").attr("role","switch").attr("aria-checked",s.visible?"true":"false").attr("data-key",s.key).on("click",function(){jh(t,s,Lf)}).on("keydown",function(d){(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),jh(t,s,Lf))});a.append("span").attr("class","myIO-sheet-swatch").style("background-color",s.color),a.append("span").attr("class","myIO-sheet-legend-label").text(s.label)}),Sy(t,r)}function j_(t,e,r){var i=r.colorScale||t.colorContinuous;if(i){var s=r.domain||i.domain(),a=K_(i,s),d=Q_(i,s);e.append("div").attr("class","myIO-sheet-gradient").style("background","linear-gradient(90deg, "+a+")");var m=e.append("div").attr("class","myIO-sheet-gradient-ticks");d.forEach(function(v){m.append("span").text(v)})}}function q_(t){var e=t.currentLayers||t.derived&&t.derived.currentLayers||t.plotLayers||[],r=e[0]?e[0].type:null,i=t.config&&t.config.export,s=[];return(!i||i.csv!==!1)&&s.push({name:"chart",label:Mu.chart,icon:C6()}),(!i||i.png!==!1)&&s.push({name:"image",label:Mu.image,icon:py()}),(!i||i.svg!==!1)&&s.push({name:"svg",label:Mu.svg,icon:C6()}),(!i||i.pdf!==!1)&&s.push({name:"pdf",label:Mu.pdf,icon:yy()}),(!i||i.clipboard!==!1)&&(s.push({name:"clipboard-png",label:Mu["clipboard-png"],icon:O6()}),s.push({name:"clipboard-svg",label:Mu["clipboard-svg"],icon:O6()})),t.options&&t.options.toggleY&&s.push({name:"percent",label:Mu.percent,icon:my()}),t.options&&t.options.toggleY&&r==="groupedBar"&&s.push({name:"group2stack",label:Mu.group2stack,icon:gy()}),s}function Sy(t,e){var r=e.items.some(function(i){return!i.visible});r&&t.dom.sheetLegendSection&&(t.dom.sheetLegendSection.selectAll(".myIO-sheet-legend-reset").remove(),t.dom.sheetLegendSection.append("button").attr("type","button").attr("class","myIO-sheet-legend-reset").text("Show All").on("click",function(){H_(t,e.type)}))}function H_(t,e){by(t,e,Lf)}function Ey(t){var e=wy(t),r=e&&Array.isArray(e.items)?G0(e.items):[];return H0({type:e&&e.type,labels:r.map(j0),suppressLegend:!!(t.options&&t.options.suppressLegend===!0),availableWidth:q0(t)})}function z_(t){var e=t.dom.panel;if(!(!e||!id(t))){var r=e.node(),i=0,s=0,a=!1;r.addEventListener("touchstart",function(d){var m=r.getBoundingClientRect(),v=d.touches[0];v.clientY-m.top>40||(i=v.clientY,s=v.clientY,a=!0,r.style.transition="none")},{passive:!0}),r.addEventListener("touchmove",function(d){if(a){s=d.touches[0].clientY;var m=Math.max(0,s-i);r.style.transform="translateY("+m+"px)"}},{passive:!0}),r.addEventListener("touchend",function(){if(a){a=!1,r.style.transition="";var d=s-i;d>80?$u(t):r.style.transform=""}})}}function wy(t){return t.runtime&&t.runtime._legendData?t.runtime._legendData:hd(t,t.runtime&&t.runtime._legendState)}function W0(t){if(!(!t||!t.dom||!t.dom.fab)){var e=t.runtime&&t.runtime._sheetOpen===!0;t.dom.fab.attr("aria-expanded",e?"true":"false").attr("aria-label",e?"Close legend and actions":"Legend and actions").html(e?Oy():I6())}}function W_(t){Ay(t);var e=function(r){if(!(!t.runtime||!t.runtime._sheetOpen||!t.dom||!t.dom.panel)){if(r.key==="Escape"){r.preventDefault(),$u(t);return}if(r.key==="Tab"){var i=Iy(t.dom.panel.node());if(i.length===0){r.preventDefault(),t.dom.panel.node().focus();return}var s=i[0],a=i[i.length-1],d=document.activeElement;r.shiftKey&&d===s?(r.preventDefault(),a.focus()):!r.shiftKey&&d===a&&(r.preventDefault(),s.focus())}}};t.runtime._sheetEscHandler=e,document.addEventListener("keydown",e)}function Ay(t){!t||!t.runtime||!t.runtime._sheetEscHandler||(document.removeEventListener("keydown",t.runtime._sheetEscHandler),t.runtime._sheetEscHandler=null)}function Ty(t){t.dom&&t.dom.panel&&typeof t.dom.panel.remove=="function"&&t.dom.panel.remove(),t.dom&&t.dom.backdrop&&typeof t.dom.backdrop.remove=="function"&&t.dom.backdrop.remove(),t.dom&&(t.dom.panel=null,t.dom.backdrop=null,t.dom.sheetLegendSection=null,t.dom.sheetLegendBody=null,t.dom.sheetActionsBody=null)}function Y_(t){var e=t&&(t.currentLayers||t.derived&&t.derived.currentLayers||t.plotLayers||[]);return!e||e.length===0}function X_(t){if(t&&t.svg&&typeof t.svg.attr=="function"){var e=t.svg.attr("aria-label");if(e)return e+" controls"}return"Chart controls"}function J_(t){if(t){var e=Iy(t);if(e.length>0){e[0].focus();return}t.focus()}}function Iy(t){return t?Array.from(t.querySelectorAll(["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(","))):[]}function K_(t,e){var r=e[0],i=e[e.length-1],s=8;return Array.from({length:s},function(a,d){var m=s===1?0:d/(s-1),v=r+(i-r)*m;return t(v)+" "+Math.round(m*100)+"%"}).join(", ")}function Q_(t,e){return typeof t.ticks=="function"?t.ticks(5).map(function(r){return String(r)}):[String(e[0]),String(e[e.length-1])]}function Z_(t){return'"}function Oy(){return Z_('')}function Ly(t,e){!t||!t.runtime||t.options&&t.options.suppressLegend===!0||(t.runtime._legendState=e||null,t.runtime._legendData=hd(t,e),R6(t,t.runtime._legendData),t.runtime._sheetOpen&&Lf(t))}function gd(t,e){!t||!t.runtime||t.runtime._suppressOrdinalLegendRebuild||(t.runtime._legendState={ordinalLegend:!0},t.runtime._legendData=U0(t,e),R6(t,t.runtime._legendData),t.runtime._sheetOpen&&Lf(t))}function R6(t,e){if(!(!t||!t.svg)){t.svg.selectAll(".myIO-inline-legend").remove();var r=e&&Array.isArray(e.items)?G0(e.items):[],i=r.map(j0),s=q0(t),a=H0({type:e&&e.type,labels:i,suppressLegend:!!(t.options&&t.options.suppressLegend===!0),availableWidth:s});if(a.inline){var d=N6(i,s),m=Math.max(34,t.height-8-(d.rowCount-1)*16),v=t.svg.append("g").attr("class","myIO-inline-legend").attr("transform","translate("+t.margin.left+","+m+")");r.forEach(function(_,x){var w=i[x],I=d.positions[x],O=_.visible===!1,z=L6(w),J=v.append("g").attr("class","myIO-inline-legend-item").attr("transform","translate("+I.x+","+I.row*16+")").attr("role","switch").attr("aria-checked",O?"false":"true").attr("tabindex",0).attr("data-key",_.key).on("click",function(){Cy(t,e,_)}).on("keydown",function(Q){(Q.key==="Enter"||Q.key===" ")&&(Q.preventDefault(),Cy(t,e,_))});J.append("title").text(w),J.append("rect").attr("class","myIO-inline-legend-hit").attr("x",-3).attr("y",-14).attr("width",z).attr("height",20).attr("fill","transparent"),J.append("rect").attr("width",10).attr("height",10).attr("rx",2).attr("y",-9).attr("fill",Array.isArray(_.color)?_.color[0]:_.color||"#6b7280").style("opacity",O?.35:1),J.append("text").attr("class","myIO-inline-legend-label").attr("x",15).attr("y",0).style("opacity",O?.45:1).text(w.length>24?w.substring(0,21)+"...":w)})}}}function Cy(t,e,r){e.type==="ordinal"?jh(t,r,ex):Gh(t,r)}function ex(t){var e=(t.currentLayers||t.derived&&t.derived.currentLayers||t.plotLayers||[])[0];t.runtime._legendData=U0(t,e),R6(t,t.runtime._legendData),t.runtime._sheetOpen&&Lf(t)}var yd=class{static type="treemap";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"none",scaleCapabilities:{invertX:!1}};static scaleHints=null;static dataContract={level_1:{required:!0},level_2:{required:!0},y_var:{required:!1,numeric:!0}};render(e,r){var i=e.margin,s=d3.format(",d"),a=r.label;if(Uh(e))e.colorDiscrete=d3.scaleOrdinal().range(e.options.colorScheme[0]).domain(e.options.colorScheme[1]),e.colorContinuous=d3.scaleLinear().range(e.options.colorScheme[0]).domain(e.options.colorScheme[1]);else{var d=r.data.children.map(function(O){return O.name});e.colorDiscrete=d3.scaleOrdinal().range(r.color).domain(d)}var m=d3.hierarchy(r.data).eachBefore(function(O){O.data.id=(O.parent?O.parent.data.id+".":"")+O.data.name}).sum(function(O){return O[r.mapping.y_var]}).sort(function(O,z){return z.height-O.height||z.value-O.value});d3.treemap().tile(d3.treemapResquarify).size([e.width-(i.left+i.right),s1(e)-(i.top+i.bottom)]).round(!0).paddingInner(1)(m);var v=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0,_=e.chart.selectAll(".root").data(m.leaves(),function(O){return O.data.id});_.exit().transition().duration(v).style("opacity",0).remove();var x=_.enter().append("g").attr("class","root").attr("transform",function(O){return"translate("+O.x0+","+O.y0+")"}).style("opacity",0);x.append("rect").attr("class",_r("tree",e.element.id,a)).attr("id",function(O){return O.data.id}).attr("width",function(O){return O.x1-O.x0}).attr("height",function(O){return O.y1-O.y0}).attr("fill",function(O){for(;O.depth>1;)O=O.parent;return e.colorDiscrete(O.data.id)}),x.append("text").attr("class","inner-text").attr("fill","black"),x.append("title");var w=x.merge(_);w.transition().duration(v).ease($n(e,d3.easeQuad)).style("opacity",1).attr("transform",function(O){return"translate("+O.x0+","+O.y0+")"}),w.select("rect").transition().duration(v).ease($n(e,d3.easeQuad)).attr("width",function(O){return O.x1-O.x0}).attr("height",function(O){return O.y1-O.y0}).attr("fill",function(O){for(;O.depth>1;)O=O.parent;return e.colorDiscrete(O.data.id)});var I=w.select("text.inner-text").selectAll("tspan").data(function(O){return tx(O,r,s)});I.exit().remove(),I.enter().append("tspan").attr("fill","black").merge(I).attr("x",3).attr("y",function(O,z,J){return(z===J.length-1)*3+16+(z-.5)*9}).attr("fill-opacity",function(){return rx(this.parentNode.parentNode)?1:0}).text(function(O){return O}),w.select("title").text(function(O){return O.data[r.mapping.level_1]+` +`+O.data[r.mapping.level_2]+` +`+O.data[r.mapping.x_var]+` +`+s(O.value)}),gd(e,r)}remove(e){e.dom.chartArea.selectAll(".root").transition().duration(500).style("opacity",0).remove()}};function tx(t,e,r){var i=String(t.data[e.mapping.x_var]||t.data[e.mapping.level_2]||t.data.name||""),s=Math.max(0,t.x1-t.x0),a=s<70&&i.length>10?i.substring(0,9)+"...":i;return a.split(/\s+/).concat(r(t.value))}function rx(t){return!t||typeof t.getBBox!="function"?!0:t.getBBox().width>40}var bd=class{static type="donut";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"none",scaleCapabilities:{invertX:!1}};static scaleHints=null;static dataContract={x_var:{required:!0},y_var:{required:!0,numeric:!0}};render(e,r){var i=e.margin,s=e.options.transition.speed,a=Math.min(e.width-(i.right+i.left),e.height-(i.top+i.bottom))/2,d=r.mapping.x_var,m=r.mapping.y_var;Uh(e)?(e.colorDiscrete=d3.scaleOrdinal().range(e.options.colorScheme[0]).domain(e.options.colorScheme[1]),e.colorContinuous=d3.scaleLinear().range(e.options.colorScheme[0]).domain(e.options.colorScheme[1])):e.colorDiscrete=d3.scaleOrdinal().range(r.color).domain(r.data.map(function(q){return q[d]}));var v=e.runtime._hiddenOrdinalSegments||[],_=r.data.filter(function(q){return v.indexOf(q[d])===-1}),x=d3.pie().sort(null).value(function(q){return q[m]}),w=d3.arc().innerRadius(a*.8).outerRadius(a*.4),I=d3.arc().innerRadius(a*.9).outerRadius(a*.9),O=e.chart.selectAll(".donut").data(x(_),function(q){return q.data[d]});O.exit().transition().duration(s).ease($n(e,d3.easeQuad)).attrTween("d",function(q){var ue={startAngle:q.endAngle,endAngle:q.endAngle},K=d3.interpolate(q,ue);return function(B){return w(K(B))}}).remove();var z=O.enter().append("path").attr("class","donut").attr("fill",function(q){return e.colorDiscrete(q.data[d])}).attr("d",w).each(function(q){this._current=q});O.merge(z).transition().duration(s).ease($n(e,d3.easeQuad)).attr("fill",function(q){return e.colorDiscrete(q.data[d])}).attrTween("d",function(q){this._current=this._current||q;var ue=d3.interpolate(this._current,q);return this._current=ue(1),function(K){return w(ue(K))}});function J(q){return q.startAngle+(q.endAngle-q.startAngle)/2}var Q=e.chart.selectAll(".inner-text").data(x(_),function(q){return q.data[d]});Q.exit().transition().duration(s).style("opacity",0).remove();var oe=Q.enter().append("text").attr("class","inner-text").style("font-size","12px").style("opacity",0).attr("dy",".35em").text(function(q){return q.data[d]});Q.merge(oe).transition().duration(s).ease($n(e,d3.easeQuad)).text(function(q){return q.data[d]}).style("opacity",function(q){return Math.abs(q.endAngle-q.startAngle)>.3?1:0}).attrTween("transform",function(q){this._current=this._current||q;var ue=d3.interpolate(this._current,q);return this._current=ue(1),function(K){var B=ue(K),he=I.centroid(B);return he[0]=a*(J(B).3?1:0}).attrTween("points",function(q){this._current=this._current||q;var ue=d3.interpolate(this._current,q);return this._current=ue(1),function(K){var B=ue(K),he=I.centroid(B);return he[0]=a*.95*(J(B)0?r.data[0]:{},v=r.mapping.value,_=typeof v=="string"?+m[v]:+v;Number.isFinite(_)||(_=0),_=Math.max(0,Math.min(1,_));var x=[_,1-_],w=d3.arc().innerRadius(a-d).outerRadius(a).cornerRadius(10),I=d3.arc().innerRadius(a-d).outerRadius(a),O=d3.pie().sort(null).value(function(B){return B}).startAngle(s*-.5).endAngle(s*.5),z=d3.format(".1%"),J=r.options&&Array.isArray(r.options.thresholds)?r.options.thresholds:[{min:0,max:.6,color:"#3CA951"},{min:.6,max:.85,color:"#FFB000"},{min:.85,max:1,color:"#EF603B"}];function Q(B){return I({startAngle:s*-.5+s*Math.max(0,Math.min(1,+B.min||0)),endAngle:s*-.5+s*Math.max(0,Math.min(1,+B.max||0))})}var oe=e.chart.selectAll(".myIO-gauge-threshold").data(J);oe.exit().transition().duration(i).style("opacity",0).remove();var se=oe.enter().append("path").attr("class","myIO-gauge-threshold").attr("fill",function(B){return B.color}).attr("opacity",0).attr("d",Q);se.merge(oe).transition().duration(i).ease($n(e,d3.easeQuad)).attr("fill",function(B){return B.color}).attr("opacity",.24).attr("d",Q);var re=e.chart.selectAll(".myIO-gauge-background").data(O([1]));re.exit().transition().duration(i).style("opacity",0).remove();var q=re.enter().append("path").attr("class","myIO-gauge-background").attr("fill","rgba(107, 114, 128, 0.22)").attr("d",w).each(function(B){this._current=B});q.merge(re).transition().duration(i).ease($n(e,d3.easeBack)).attr("fill","rgba(107, 114, 128, 0.22)").attrTween("d",function(B){this._current=this._current||B;var he=d3.interpolate(this._current,B);return this._current=he(1),function(He){return w(he(He))}});var ue=e.chart.selectAll(".myIO-gauge-value").data(O(x));ue.exit().transition().duration(i).style("opacity",0).remove();var K=ue.enter().append("path").attr("class","myIO-gauge-value").attr("fill",function(B,he){return[r.color||Ny(_,J),"transparent"][he]}).attr("d",w).each(function(B){this._current=B});K.merge(ue).transition().duration(i).ease($n(e,d3.easeBack)).attr("fill",function(B,he){return[r.color||Ny(_,J),"transparent"][he]}).attrTween("d",function(B){this._current=this._current||B;var he=d3.interpolate(this._current,B);return this._current=he(1),function(He){return w(he(He))}}),e.chart.selectAll(".gauge-text").data([x[0]]).join("text").attr("class","gauge-text").text(function(B){return z(B)}).attr("text-anchor","middle").attr("font-size",20).attr("dy","-0.45em"),e.chart.selectAll(".gauge-label").data([r.options&&r.options.metric?r.options.metric:r.label]).join("text").attr("class","gauge-label").text(function(B){return B}).attr("text-anchor","middle").attr("font-size",12).attr("dy","1.1em"),e.chart.selectAll(".gauge-min-label").data(["0%"]).join("text").attr("class","gauge-min-label").text(function(B){return B}).attr("text-anchor","middle").attr("font-size",11).attr("x",-a+d/2).attr("y",12),e.chart.selectAll(".gauge-max-label").data(["100%"]).join("text").attr("class","gauge-max-label").text(function(B){return B}).attr("text-anchor","middle").attr("font-size",11).attr("x",a-d/2).attr("y",12)}remove(e){e.dom.chartArea.selectAll(".myIO-gauge-threshold, .myIO-gauge-background, .myIO-gauge-value, .gauge-text, .gauge-label, .gauge-min-label, .gauge-max-label").transition().duration(500).style("opacity",0).remove()}};function Ny(t,e){var r=e.find(function(i){return t>=+i.min&&t<=+i.max});return r&&r.color?r.color:"#4269D0"}var _d=class{static type="heatmap";static traits={hasAxes:!0,referenceLines:!1,legendType:"continuous",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"band",yExtentFields:["value"],domainMerge:"union"};static dataContract={x_var:{required:!0},y_var:{required:!0},value:{required:!0,numeric:!0}};render(e,r){var i=e.options.transition.speed,s=r.mapping.x_var,a=r.mapping.y_var,d=r.mapping.value,m=r.data.map(function(O){return+O[d]}),v=d3.extent(m.filter(function(O){return Number.isFinite(O)}));(!v||v[0]===void 0||v[1]===void 0)&&(v=[0,1]),e.derived.colorContinuous=d3.scaleSequential(d3.interpolateBlues).domain(v),e.colorContinuous=e.derived.colorContinuous;var _=e.chart.selectAll("."+_r("heatmap",e.element.id,r.label)).data(r.data);_.exit().transition().duration(i).style("opacity",0).remove();var x=e.xScale.bandwidth?e.xScale.bandwidth():0,w=e.yScale.bandwidth?e.yScale.bandwidth():0,I=_.enter().append("rect").attr("class",_r("heatmap",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").attr("x",function(O){return e.xScale(O[s])}).attr("y",function(O){return e.yScale(O[a])}).attr("width",x).attr("height",w).attr("fill",function(O){return e.colorContinuous(+O[d])}).style("opacity",0);_.merge(I).transition().ease($n(e,d3.easeQuad)).duration(i).attr("x",function(O){return e.xScale(O[s])}).attr("y",function(O){return e.yScale(O[a])}).attr("width",x).attr("height",w).attr("fill",function(O){return e.colorContinuous(+O[d])}).style("opacity",1)}getHoverSelector(e,r){return"."+_r("heatmap",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var]+", "+i.mapping.y_var+": "+r[i.mapping.y_var],body:i.mapping.value+": "+r[i.mapping.value],color:e.colorContinuous?e.colorContinuous(+r[i.mapping.value]):i.color,label:i.label,value:r[i.mapping.value],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("heatmap",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var xd=class{static type="calendarHeatmap";static traits={hasAxes:!1,referenceLines:!1,legendType:"continuous",binning:!1,rolloverStyle:"element"};static dataContract={date:{required:!0},value:{required:!0,numeric:!0}};static scaleHints=null;getHoverSelector(){return".myIO-calendar-cell"}formatTooltip(e,r,i){var s=d3.utcFormat("%b %-d, %Y"),a=r.date instanceof Date?r.date:new Date((r[i.mapping.date]||"")+"T00:00:00Z"),d=r.value!=null?r.value:+r[i.mapping.value];return{title:s(a),body:i.label+": "+d,color:r.color||i.color,label:i.label,value:d,raw:r}}render(e,r){var i=r.options||{},s=i.weekStart==="monday"?1:0,a=i.showWeekdayLabels!==!1,d=r.mapping.date,m=r.mapping.value,v=(r.data||[]).map(function(ar){return{date:new Date(ar[d]+"T00:00:00Z"),value:+ar[m],raw:ar}}).filter(function(ar){return!isNaN(ar.date.getTime())}).sort(function(ar,Ki){return ar.date-Ki.date});if(v.length!==0){var _=v[0].date.getUTCFullYear(),x=new Date(Date.UTC(_,0,1)),w=new Date(Date.UTC(_,11,31)),I=function(ar){var Ki=ar.getUTCDay();return(Ki-s+7)%7},O=I(x),z=function(ar){var Ki=Math.floor((ar-x)/864e5);return Math.floor((Ki+O)/7)},J=z(w)+1,Q=e.margin||{top:0,right:0,bottom:0,left:0},oe=(e.width||0)-(Q.left||0)-(Q.right||0),se=(e.height||0)-(Q.top||0)-(Q.bottom||0),re=a?24:0,q=18,ue=Math.max(1,oe-re),K=Math.max(1,se-q),B=Math.max(4,Math.min(Math.floor(ue/J),Math.floor(K/7))),he=e.element&&typeof getComputedStyle=="function"?getComputedStyle(e.element):null,He=he?he.getPropertyValue("--chart-calendar-cell-gap"):"",er=parseFloat(He);isFinite(er)||(er=2);var Er=e.config&&e.config.axis&&e.config.axis.vlim,zt=d3.max(v,function(ar){return ar.value});zt>0||(zt=1);var _n=Er&&Er.max!==void 0&&Er.max!==null?[Er.min||0,Er.max]:[0,zt],$r=d3.interpolateRgb("#ffffff",r.color||"#4E79A7"),In=d3.scaleSequential($r).domain(_n);e.colorContinuous=In,e.derived&&(e.derived.colorContinuous=In);var On=function(ar){var Ki=ar instanceof Date?ar:new Date(ar);return re+z(Ki)*(B+er)};On.domain=function(){return[x,w]},On.range=function(){return[re,re+(J-1)*(B+er)]},On.invert=function(ar){var Ki=Math.round((ar-re)/(B+er)),zs=Ki*7-O;return new Date(x.getTime()+zs*864e5)},e.xScale=On;var cr=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0,bn=e.chart.selectAll(".myIO-calendar-root").data([null]).join("g").attr("class","myIO-calendar-root");if(a){var mn=s===0?["","Mon","","Wed","","Fri",""]:["","Tue","","Thu","","Sat",""],qn=mn.map(function(ar,Ki){return{t:ar,i:Ki}}).filter(function(ar){return ar.t}),Wt=bn.selectAll("text.myIO-calendar-dow").data(qn,function(ar){return ar.i});Wt.exit().remove(),Wt.enter().append("text").attr("class","myIO-calendar-dow").attr("x",0).merge(Wt).attr("y",function(ar){return q+ar.i*(B+er)+B*.75}).text(function(ar){return ar.t})}else bn.selectAll("text.myIO-calendar-dow").remove();var Pr=d3.utcFormat("%b"),gi=d3.range(12).map(function(ar){var Ki=new Date(Date.UTC(_,ar,1));return{m:ar,text:Pr(Ki),col:z(Ki)}}),Ii=bn.selectAll("text.myIO-calendar-month").data(gi,function(ar){return ar.m});Ii.exit().remove(),Ii.enter().append("text").attr("class","myIO-calendar-month").attr("y",q-4).merge(Ii).attr("x",function(ar){return re+ar.col*(B+er)}).text(function(ar){return ar.text});var yi=function(ar){return ar.date.toISOString().slice(0,10)},as=bn.selectAll("rect.myIO-calendar-cell").data(v,function(ar){return yi(ar)});as.exit().transition().duration(cr).style("opacity",0).remove();var Ha=as.enter().append("rect").attr("class","myIO-calendar-cell").attr("data-date",yi).attr("data-row",function(ar){return String(I(ar.date))}).attr("data-col",function(ar){return String(z(ar.date))}).attr("x",function(ar){return re+z(ar.date)*(B+er)}).attr("y",function(ar){return q+I(ar.date)*(B+er)}).attr("width",B).attr("height",B).attr("fill",function(ar){return ar.value==null||isNaN(ar.value)||ar.value===0?"var(--chart-calendar-empty-fill, #ebedf0)":In(ar.value)}).style("opacity",0);Ha.merge(as).each(function(ar){ar.label=r.label,ar.color=ar.value==null||isNaN(ar.value)||ar.value===0?"var(--chart-calendar-empty-fill, #ebedf0)":In(ar.value),ar[d]=yi({date:ar.date}),ar[m]=ar.value}).transition().duration(cr).style("opacity",1).attr("x",function(ar){return re+z(ar.date)*(B+er)}).attr("y",function(ar){return q+I(ar.date)*(B+er)}).attr("width",B).attr("height",B).attr("fill",function(ar){return ar.value==null||isNaN(ar.value)||ar.value===0?"var(--chart-calendar-empty-fill, #ebedf0)":In(ar.value)})}}remove(e){e&&e.chart&&typeof e.chart.selectAll=="function"&&e.chart.selectAll(".myIO-calendar-root").remove()}};var Sd=class{static type="candlestick";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["open","high","low","close"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!0},open:{required:!0,numeric:!0},high:{required:!0,numeric:!0},low:{required:!0,numeric:!0},close:{required:!0,numeric:!0}};render(e,r){var i=e.options.transition.speed,s=r.mapping.x_var,a=r.mapping.open,d=r.mapping.high,m=r.mapping.low,v=r.mapping.close,_=e.width-(e.margin.left+e.margin.right),x=Math.max(6,Math.min(40,_/Math.max(r.data.length*2.5,1))),w=this;function I(q){return e.xScale(q[s])}function O(q){return+q[v]>=+q[a]?"#4CAF50":"#F44336"}function z(q){return e.yScale(Math.max(+q[a],+q[v]))}function J(q){return Math.max(Math.abs(e.yScale(+q[a])-e.yScale(+q[v])),1)}function Q(q){return e.yScale((+q[a]+ +q[v])/2)}var oe=e.chart.selectAll("."+_r("candlestick",e.element.id,r.label)).data(r.data);oe.exit().transition().duration(i).style("opacity",0).remove();var se=oe.enter().append("g").attr("class",_r("candlestick",e.element.id,r.label)).style("opacity",0);se.append("line").attr("class","wick").attr("stroke","#666").attr("stroke-width",1.5).attr("x1",I).attr("x2",I).attr("y1",Q).attr("y2",Q),se.append("rect").attr("class","body").attr("stroke-width",.5).attr("x",function(q){return I(q)-x/2}).attr("y",Q).attr("width",x).attr("height",0).attr("fill",O).attr("stroke",O);var re=oe.merge(se);re.transition().ease($n(e,d3.easeQuad)).duration(i).style("opacity",1),re.select("line.wick").transition().ease($n(e,d3.easeQuad)).duration(i).attr("x1",I).attr("x2",I).attr("y1",function(q){return e.yScale(+q[m])}).attr("y2",function(q){return e.yScale(+q[d])}),re.select("rect.body").transition().ease($n(e,d3.easeQuad)).duration(i).attr("x",function(q){return I(q)-x/2}).attr("y",z).attr("width",x).attr("height",J).attr("fill",O).attr("stroke",O)}getHoverSelector(e,r){return"."+_r("candlestick",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:"O: "+r[i.mapping.open]+", H: "+r[i.mapping.high]+", L: "+r[i.mapping.low]+", C: "+r[i.mapping.close],color:r[i.mapping.close]>=r[i.mapping.open]?"#4CAF50":"#F44336",label:i.label,value:r[i.mapping.close],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("candlestick",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var Ed=class{static type="waterfall";static traits={hasAxes:!0,referenceLines:!0,legendType:"none",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"linear",yExtentFields:["_base_y","_cumulative_y"],domainMerge:"union"};static dataContract={x_var:{required:!0},y_var:{required:!0,numeric:!0}};render(e,r){var i=e.options.transition.speed,s=r.mapping.x_var,a=r.mapping.y_var,d=e.xScale.bandwidth?e.xScale.bandwidth():0,m=d*.82,v=(d-m)/2,_=Array.isArray(r.color),x=e.chart.selectAll("."+_r("waterfall",e.element.id,r.label)).data(r.data);x.exit().transition().duration(i).style("opacity",0).remove();var w=x.enter().append("rect").attr("class",_r("waterfall",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").attr("x",function(J){return e.xScale(J[s])+v}).attr("width",m).attr("y",function(J){return e.yScale(+J._base_y)}).attr("height",0).attr("fill",function(J,Q){return _?r.color[Q%r.color.length]:J._is_total?"#888":+J._cumulative_y>=+J._base_y?"#4CAF50":"#F44336"});x.merge(w).transition().ease($n(e,d3.easeQuad)).duration(i).attr("x",function(J){return e.xScale(J[s])+v}).attr("width",m).attr("y",function(J){return e.yScale(Math.max(+J._base_y,+J._cumulative_y))}).attr("height",function(J){return Math.abs(e.yScale(+J._base_y)-e.yScale(+J._cumulative_y))}).attr("fill",function(J,Q){return _?r.color[Q%r.color.length]:J._is_total?"#888":+J._cumulative_y>=+J._base_y?"#4CAF50":"#F44336"});var I=r.data.slice(0,Math.max(r.data.length-1,0)),O=e.chart.selectAll("."+_r("waterfall-connector",e.element.id,r.label)).data(I);O.exit().transition().duration(i).style("opacity",0).remove();var z=O.enter().append("line").attr("class",_r("waterfall-connector",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").style("stroke","#374151").style("stroke-width",1.5).style("stroke-dasharray","4 2").attr("x1",function(J,Q){return e.xScale(r.data[Q][s])+v+m}).attr("x2",function(J,Q){return e.xScale(r.data[Q+1][s])+v}).attr("y1",function(J){return e.yScale(+J._cumulative_y)}).attr("y2",function(J){return e.yScale(+J._cumulative_y)}).style("opacity",0);O.merge(z).transition().ease($n(e,d3.easeQuad)).duration(i).style("opacity",1).attr("x1",function(J,Q){return e.xScale(r.data[Q][s])+v+m}).attr("x2",function(J,Q){return e.xScale(r.data[Q+1][s])+v}).attr("y1",function(J){return e.yScale(+J._cumulative_y)}).attr("y2",function(J){return e.yScale(+J._cumulative_y)})}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:"Delta: "+r[i.mapping.y_var]+", Total: "+r._cumulative_y,color:r._is_total?"#888":+r._cumulative_y>=+r._base_y?"#4CAF50":"#F44336",label:i.label,value:r._cumulative_y,raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("waterfall",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("waterfall-connector",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var wd=class{static type="sankey";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints=null;static dataContract={source:{required:!0},target:{required:!0},value:{required:!0,numeric:!0}};render(e,r){var i=e.margin,s=e.width-(i.left+i.right),a=s1(e)-(i.top+i.bottom),d=18,m=d3.sankey().nodeId(function(se){return se.name}).nodeWidth(d).nodePadding(12).extent([[0,0],[s,a]]),v=new Map,_=r.data.map(function(se){var re=se[r.mapping.source],q=se[r.mapping.target];return v.has(re)||v.set(re,{name:re}),v.has(q)||v.set(q,{name:q}),{source:re,target:q,value:+se[r.mapping.value]}}),x=m({nodes:Array.from(v.values()),links:_});e.derived.colorDiscrete=d3.scaleOrdinal().domain(x.nodes.map(function(se){return se.name})).range(r.color||d3.schemeTableau10),e.colorDiscrete=e.derived.colorDiscrete;var w=e.chart.selectAll("."+_r("sankey",e.element.id,r.label)).data(x.links);w.exit().transition().duration(e.options.transition.speed).style("opacity",0).remove();var I=w.enter().append("path").attr("class",_r("sankey",e.element.id,r.label)).attr("fill","none").attr("stroke-opacity",.4).attr("clip-path","url(#"+e.element.id+"clip)").attr("d",d3.sankeyLinkHorizontal()).attr("stroke-width",function(se){return Math.max(1,se.width)}).attr("stroke",function(se){return e.colorDiscrete(se.source.name)}).style("opacity",0);w.merge(I).transition().ease($n(e,d3.easeQuad)).duration(e.options.transition.speed).style("opacity",1).attr("d",d3.sankeyLinkHorizontal()).attr("stroke-width",function(se){return Math.max(1,se.width)}).attr("stroke",function(se){return e.colorDiscrete(se.source.name)});var O=e.chart.selectAll("."+_r("sankey-node",e.element.id,r.label)).data(x.nodes);O.exit().transition().duration(e.options.transition.speed).style("opacity",0).remove();var z=O.enter().append("rect").attr("class",_r("sankey-node",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").attr("x",function(se){return se.x0}).attr("y",function(se){return se.y0}).attr("width",function(se){return se.x1-se.x0}).attr("height",function(se){return Math.max(1,se.y1-se.y0)}).attr("fill",function(se){return e.colorDiscrete(se.name)}).style("opacity",0);O.merge(z).transition().ease($n(e,d3.easeQuad)).duration(e.options.transition.speed).style("opacity",1).attr("x",function(se){return se.x0}).attr("y",function(se){return se.y0}).attr("width",function(se){return se.x1-se.x0}).attr("height",function(se){return Math.max(1,se.y1-se.y0)}).attr("fill",function(se){return e.colorDiscrete(se.name)});var J=_r("sankey-label",e.element.id,r.label),Q=e.chart.selectAll("."+J).data(x.nodes,function(se){return se.name});Q.exit().transition().duration(e.options.transition.speed).style("opacity",0).remove();var oe=Q.enter().append("text").attr("class",J).attr("x",function(se){return se.x0 "+r.target.name,body:"Value: "+r.value,color:e.colorDiscrete?e.colorDiscrete(r.source.name):i.color,label:i.label,value:r.value,raw:r}:{title:r.name,body:"Value: "+r.value,color:e.colorDiscrete?e.colorDiscrete(r.name):i.color,label:i.label,value:r.value,raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("sankey",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("sankey-node",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("sankey-label",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var Ad=class{static type="rangeBar";static traits={hasAxes:!0,referenceLines:!1,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["low_y","high_y"],domainMerge:"union"};static dataContract={x_var:{required:!0},low_y:{required:!0,numeric:!0},high_y:{required:!0,numeric:!0}};render(e,r){if(r.options&&r.options.style==="errorbar"){nx(e,r);return}var i=e.options.transition.speed,s=r.mapping.x_var,a=r.mapping.low_y,d=r.mapping.high_y,m=r.options&&r.options.rangeBarWidth?r.options.rangeBarWidth:Math.max(6,Math.min(60,(e.width-(e.margin.left+e.margin.right))/Math.max(r.data.length*3,1))),v=e.chart.selectAll("."+_r("rangeBar",e.element.id,r.label)).data(r.data);v.exit().transition().duration(i).style("opacity",0).remove();function _(z){return e.yScale((+z[a]+ +z[d])/2)}function x(z){return e.yScale(Math.max(+z[a],+z[d]))}function w(z){return Math.abs(e.yScale(+z[a])-e.yScale(+z[d]))}function I(z){return typeof e.colorDiscrete=="function"&&z[r.mapping.group]?e.colorDiscrete(z[r.mapping.group]):r.color||"#6b7280"}var O=v.enter().append("rect").attr("class",_r("rangeBar",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").attr("x",function(z){return e.xScale(z[s])-m/2}).attr("y",_).attr("width",m).attr("height",0).attr("fill",I);v.merge(O).transition().ease($n(e,d3.easeQuad)).duration(i).attr("x",function(z){return e.xScale(z[s])-m/2}).attr("y",x).attr("width",m).attr("height",w).attr("fill",I)}getHoverSelector(e,r){return"."+_r("rangeBar",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:i.mapping.low_y+": "+r[i.mapping.low_y]+", "+i.mapping.high_y+": "+r[i.mapping.high_y],color:i.color,label:i.label,value:r[i.mapping.high_y],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("rangeBar",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("rangeBar-error",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};function nx(t,e){var r=t.options.transition.speed,i=e.mapping.x_var,s=e.mapping.low_y,a=e.mapping.high_y,d=e.mapping.y_var;if(!d){typeof console<"u"&&console.warn&&console.warn("myIO RangeBarRenderer: style='errorbar' requires a y_var mapping for the mean point. Skipping render for layer '"+(e.label||"(unnamed)")+"'.");return}var m=e.color||"#4269D0",v=e.options&&e.options.capWidth?e.options.capWidth:18,_=e.options&&e.options.pointRadius?e.options.pointRadius:4;function x(oe){var se=t.xScale(oe[i]);return t.xScale.bandwidth&&(se+=t.xScale.bandwidth()/2),se}function w(oe){return t.yScale(+oe[s])}function I(oe){return t.yScale(+oe[a])}function O(oe){return t.yScale(+oe[d])}var z=t.chart.selectAll("."+_r("rangeBar-error",t.element.id,e.label)).data(e.data);z.exit().transition().duration(r).style("opacity",0).remove();var J=z.enter().append("g").attr("class",_r("rangeBar-error",t.element.id,e.label)).attr("clip-path","url(#"+t.element.id+"clip)").style("opacity",0);J.append("line").attr("class","mean-ci-whisker").attr("x1",x).attr("x2",x).attr("y1",O).attr("y2",O).attr("stroke",m).attr("stroke-width",2),J.append("line").attr("class","mean-ci-cap mean-ci-cap-low").attr("x1",x).attr("x2",x).attr("y1",O).attr("y2",O).attr("stroke",m).attr("stroke-width",2),J.append("line").attr("class","mean-ci-cap mean-ci-cap-high").attr("x1",x).attr("x2",x).attr("y1",O).attr("y2",O).attr("stroke",m).attr("stroke-width",2),J.append("circle").attr("class","mean-ci-point").attr("cx",x).attr("cy",O).attr("r",0).attr("fill",m).attr("stroke","var(--chart-bg, #ffffff)").attr("stroke-width",1.5);var Q=z.merge(J);Q.transition().ease($n(t,d3.easeQuad)).duration(r).style("opacity",1),Q.select(".mean-ci-whisker").transition().ease($n(t,d3.easeQuad)).duration(r).attr("x1",x).attr("x2",x).attr("y1",w).attr("y2",I).attr("stroke",m),Q.select(".mean-ci-cap-low").transition().ease($n(t,d3.easeQuad)).duration(r).attr("x1",function(oe){return x(oe)-v/2}).attr("x2",function(oe){return x(oe)+v/2}).attr("y1",w).attr("y2",w).attr("stroke",m),Q.select(".mean-ci-cap-high").transition().ease($n(t,d3.easeQuad)).duration(r).attr("x1",function(oe){return x(oe)-v/2}).attr("x2",function(oe){return x(oe)+v/2}).attr("y1",I).attr("y2",I).attr("stroke",m),Q.select(".mean-ci-point").transition().ease($n(t,d3.easeQuad)).duration(r).attr("cx",x).attr("cy",O).attr("r",_).attr("fill",m)}var Td=class{static type="text";static traits={hasAxes:!1,referenceLines:!1,legendType:"none",binning:!1,rolloverStyle:"none",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",xExtentFields:[],yExtentFields:[],domainMerge:"union"};static dataContract={};render(e,r){var i=r.options&&r.options.position||"top-right",s=r.label,a=_r("text-annotation",e.element.id,s);e.chart.selectAll("."+a).remove();var d=r.data.map(function(J){return J.text}),m=i.indexOf("top")!==-1,v=i.indexOf("right")!==-1,_=e.width-(e.margin.left+e.margin.right),x=e.height-(e.margin.top+e.margin.bottom),w=v?_-58:10,I=m?20:x-10,O=v?"end":"start",z=e.chart.append("g").attr("class",a).attr("transform","translate("+w+","+I+")");d.forEach(function(J,Q){z.append("text").attr("y",(m?1:-1)*Q*16).attr("text-anchor",O).style("font-size","12px").style("font-family","var(--font-family, sans-serif)").style("fill","var(--text-color, #333)").style("opacity",.8).text(J)})}formatTooltip(){return null}remove(e,r){var i=_r("text-annotation",e.dom.element.id,r.label);e.dom.chartArea.selectAll("."+i).remove()}};var Id=class{static type="bracket";static traits={hasAxes:!0,referenceLines:!1,legendType:"none",binning:!1,rolloverStyle:"none",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",xExtentFields:[],yExtentFields:["y"],domainMerge:"union"};static dataContract={x1:{required:!0,numeric:!0},x2:{required:!0,numeric:!0},y:{required:!0,numeric:!0}};render(e,r){var i=_r("bracket",e.element.id,r.label),s=6,a=4,d=e.options.transition.speed,m=r.color||"var(--text-color, #333)",v=e.chart.selectAll("g."+i+"-root").data([null]).join("g").attr("class",i+"-root").attr("clip-path","url(#"+e.element.id+"clip)"),_=function(O,z){return O.label!=null?String(O.label)+"_"+z:String(z)},x=v.selectAll("g."+i).data(r.data,_);x.exit().transition().duration(d).style("opacity",0).remove();var w=x.enter().append("g").attr("class",i).style("opacity",0);w.append("line").attr("class","bracket-bar").attr("stroke",m).attr("stroke-width",1.5),w.append("line").attr("class","bracket-tick-left").attr("stroke",m).attr("stroke-width",1.5),w.append("line").attr("class","bracket-tick-right").attr("stroke",m).attr("stroke-width",1.5),w.append("text").attr("class","bracket-label").attr("text-anchor","middle").style("font-size","11px").style("font-family","var(--font-family, sans-serif)").style("fill",m);var I=w.merge(x);I.transition().duration(d).style("opacity",1),I.select(".bracket-bar").transition().duration(d).attr("x1",function(O){return e.xScale(+O.x1)}).attr("y1",function(O){return e.yScale(+O.y)}).attr("x2",function(O){return e.xScale(+O.x2)}).attr("y2",function(O){return e.yScale(+O.y)}),I.select(".bracket-tick-left").transition().duration(d).attr("x1",function(O){return e.xScale(+O.x1)}).attr("y1",function(O){return e.yScale(+O.y)}).attr("x2",function(O){return e.xScale(+O.x1)}).attr("y2",function(O){return e.yScale(+O.y)+s}),I.select(".bracket-tick-right").transition().duration(d).attr("x1",function(O){return e.xScale(+O.x2)}).attr("y1",function(O){return e.yScale(+O.y)}).attr("x2",function(O){return e.xScale(+O.x2)}).attr("y2",function(O){return e.yScale(+O.y)+s}),I.select(".bracket-label").text(function(O){return O.label}).transition().duration(d).attr("x",function(O){return(e.xScale(+O.x1)+e.xScale(+O.x2))/2}).attr("y",function(O){return e.yScale(+O.y)-a})}formatTooltip(){return null}remove(e,r){var i=_r("bracket",e.element.id,r.label);e.chart.selectAll("."+i).remove()}};var Od=class{static type="lollipop";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"linear",xExtentFields:[],yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!1},y_var:{required:!0,numeric:!0}};render(e,r,i){var s=e.derived.xScale,a=e.derived.yScale,d=e.config.scales.flipAxis,m=e.options.transition.speed,v=e.dom.chartArea.selectAll(".tag-lollipop-"+r.id).data([null]).join("g").attr("class","tag-lollipop-"+r.id),_=r.options&&r.options.headRadius||5,x=r.options&&r.options.stemWidth||2,w=r.mapping.x_var,I=r.mapping.y_var,O=s.bandwidth?s.bandwidth()/2:0,z=typeof a(0)=="number"?a(0):a.range()[0],J=typeof s(0)=="number"?s(0):s.range()[0];function Q(K){if(d){var B=a(K[w]);return a.bandwidth&&(B+=O),{x1:J,x2:s(K[I]),y1:B,y2:B}}var he=s(K[w])+O;return{x1:he,x2:he,y1:z,y2:a(K[I])}}function oe(K){var B=Q(K);return{cx:B.x2,cy:B.y2}}var se=v.selectAll(".lollipop-stem").data(r.data,function(K){return K._source_key});se.exit().transition().duration(m).style("opacity",0).attr("x2",d?J:function(K){return s(K[w])+O}).attr("y2",d?function(K){var B=a(K[w]);return a.bandwidth?B+O:B}:z).remove();var re=se.enter().append("line").attr("class","lollipop-stem").attr("x1",function(K){return Q(K).x1}).attr("x2",function(K){return d?Q(K).x1:Q(K).x2}).attr("y1",function(K){return Q(K).y1}).attr("y2",function(K){return Q(K).y1}).attr("stroke",r.color).attr("stroke-width",x).style("opacity",0);re.merge(se).transition().duration(m).style("opacity",1).attr("x1",function(K){return Q(K).x1}).attr("x2",function(K){return Q(K).x2}).attr("y1",function(K){return Q(K).y1}).attr("y2",function(K){return Q(K).y2}).attr("stroke",r.color).attr("stroke-width",x);var q=v.selectAll(".lollipop-head").data(r.data,function(K){return K._source_key});q.exit().transition().duration(m).style("opacity",0).attr("cx",function(K){return Q(K).x1}).attr("cy",function(K){return Q(K).y1}).remove();var ue=q.enter().append("circle").attr("class","lollipop-head").attr("cx",function(K){return Q(K).x1}).attr("cy",function(K){return Q(K).y1}).attr("r",_).attr("fill",r.color).style("opacity",0);ue.merge(q).transition().duration(m).style("opacity",1).attr("cx",function(K){return oe(K).cx}).attr("cy",function(K){return oe(K).cy}).attr("r",_).attr("fill",r.color)}getHoverSelector(e,r){return".tag-lollipop-"+r.id+" .lollipop-head"}formatTooltip(e,r,i){var s=e.runtime.activeYFormat||d3.format("s");return{title:{text:String(r[i.mapping.x_var])},items:[{color:i.color,label:i.label,value:s(r[i.mapping.y_var])}]}}remove(e,r){e.dom.chartArea.selectAll(".tag-lollipop-"+r.id).remove()}};var Cd=class{static type="dumbbell";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"linear",xExtentFields:[],yExtentFields:["low_y","high_y"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!1},low_y:{required:!0,numeric:!0},high_y:{required:!0,numeric:!0}};render(e,r,i){var s=e.derived.xScale,a=e.derived.yScale,d=e.config.scales.flipAxis,m=e.options.transition.speed,v=e.dom.chartArea.selectAll(".tag-dumbbell-"+r.id).data([null]).join("g").attr("class","tag-dumbbell-"+r.id),_=r.options&&r.options.dotRadius||5,x=r.options&&r.options.lineWidth||2,w=r.mapping.x_var,I=r.mapping.low_y,O=r.mapping.high_y,z=s.bandwidth?s.bandwidth()/2:0,J=a.bandwidth?a.bandwidth()/2:0;function Q(B){if(d){var he=a(B[w])+J,He=s(B[I]),er=s(B[O]);return{lowX:He,lowY:he,highX:er,highY:he,midX:(He+er)/2,midY:he}}var Er=s(B[w])+z,zt=a(B[I]),_n=a(B[O]);return{lowX:Er,lowY:zt,highX:Er,highY:_n,midX:Er,midY:(zt+_n)/2}}var oe=v.selectAll(".dumbbell-line").data(r.data,function(B){return B._source_key});oe.exit().transition().duration(m).style("opacity",0).attr("x1",function(B){return Q(B).midX}).attr("x2",function(B){return Q(B).midX}).attr("y1",function(B){return Q(B).midY}).attr("y2",function(B){return Q(B).midY}).remove();var se=oe.enter().append("line").attr("class","dumbbell-line").attr("x1",function(B){return Q(B).midX}).attr("x2",function(B){return Q(B).midX}).attr("y1",function(B){return Q(B).midY}).attr("y2",function(B){return Q(B).midY}).attr("stroke","var(--chart-grid-color, #ccc)").attr("stroke-width",x).style("opacity",0);se.merge(oe).transition().duration(m).style("opacity",1).attr("x1",function(B){return Q(B).lowX}).attr("x2",function(B){return Q(B).highX}).attr("y1",function(B){return Q(B).lowY}).attr("y2",function(B){return Q(B).highY}).attr("stroke","var(--chart-grid-color, #ccc)").attr("stroke-width",x);var re=v.selectAll(".dumbbell-low").data(r.data,function(B){return B._source_key});re.exit().transition().duration(m).style("opacity",0).attr("cx",function(B){return Q(B).midX}).attr("cy",function(B){return Q(B).midY}).remove();var q=re.enter().append("circle").attr("class","dumbbell-low").attr("cx",function(B){return Q(B).midX}).attr("cy",function(B){return Q(B).midY}).attr("r",_).attr("fill",r.color).attr("opacity",0);q.merge(re).transition().duration(m).attr("cx",function(B){return Q(B).lowX}).attr("cy",function(B){return Q(B).lowY}).attr("r",_).attr("fill",r.color).attr("opacity",.6);var ue=v.selectAll(".dumbbell-high").data(r.data,function(B){return B._source_key});ue.exit().transition().duration(m).style("opacity",0).attr("cx",function(B){return Q(B).midX}).attr("cy",function(B){return Q(B).midY}).remove();var K=ue.enter().append("circle").attr("class","dumbbell-high").attr("cx",function(B){return Q(B).midX}).attr("cy",function(B){return Q(B).midY}).attr("r",_).attr("fill",r.color).attr("opacity",0);K.merge(ue).transition().duration(m).attr("cx",function(B){return Q(B).highX}).attr("cy",function(B){return Q(B).highY}).attr("r",_).attr("fill",r.color).attr("opacity",1)}getHoverSelector(e,r){return".tag-dumbbell-"+r.id+" .dumbbell-high, .tag-dumbbell-"+r.id+" .dumbbell-low"}formatTooltip(e,r,i){var s=e.runtime.activeYFormat||d3.format("s");return{title:{text:String(r[i.mapping.x_var])},items:[{color:i.color,label:"Low",value:s(r[i.mapping.low_y])},{color:i.color,label:"High",value:s(r[i.mapping.high_y])}]}}remove(e,r){e.dom.chartArea.selectAll(".tag-dumbbell-"+r.id).remove()}};var Ld=class{static type="waffle";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints=null;static dataContract={category:{required:!0},value:{required:!0,numeric:!0}};render(e,r){for(var i=r.options&&r.options.rows||10,s=r.options&&r.options.cols||10,a=i*s,d=r.options&&r.options.cellGap||2,m=r.options&&r.options.cellRadius||2,v=e.config.layout.margin,_=e.runtime.width-v.left-v.right,x=e.runtime.height-v.top-v.bottom,w=Math.min((_-(s-1)*d)/s,(x-(i-1)*d)/i),I=0,O=0;O=he)&&(K=Er,B=!0)}se._quantile_dot_cx=K,se._quantile_dot_cy=ue,oe.push({cx:K,cy:ue})})});var I=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0,O=e.dom.chartArea.selectAll(".tag-quantile_dots-"+r.id).data([null]).join("g").attr("class","tag-quantile_dots-"+r.id),z=O.selectAll(".quantile-dots-point").data(r.data,function(Q){return Q._source_key});z.exit().transition().duration(I).attr("fill-opacity",0).remove();var J=z.enter().append("circle").attr("class","quantile-dots-point").attr("clip-path","url(#"+e.element.id+"clip)").attr("cx",function(Q){return Q._quantile_dot_cx}).attr("cy",function(Q){return Q._quantile_dot_cy}).attr("r",a).attr("fill",r.color).attr("fill-opacity",0).attr("role","graphics-symbol");J.merge(z).transition().duration(I).attr("cx",function(Q){return Q._quantile_dot_cx}).attr("cy",function(Q){return Q._quantile_dot_cy}).attr("r",a).attr("fill",r.color).attr("fill-opacity",.75)}getHoverSelector(e,r){return".tag-quantile_dots-"+r.id+" .quantile-dots-point"}formatTooltip(e,r,i){var s=e.runtime.activeYFormat||d3.format("s"),a=i.options&&i.options.source?" ("+i.options.source+")":"";return{title:String(r[i.mapping.x_var]),items:[{color:i.color,label:i.label+a,value:"Q"+r[i.mapping.quantile_rank]+": "+s(r[i.mapping.y_var])}],value:r[i.mapping.y_var],raw:r}}remove(e,r){e.dom.chartArea.selectAll(".tag-quantile_dots-"+r.id).remove()}};var Rd=class{static type="bump";static traits={hasAxes:!0,referenceLines:!1,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints={xScaleType:"point",yScaleType:"linear",xExtentFields:[],yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0},y_var:{required:!0,numeric:!0},group:{required:!0}};render(e,r){var i=e.derived.xScale,s=e.derived.yScale,a=r.mapping.x_var,d=r.mapping.y_var,m=r.mapping.group,v=r.options&&r.options.dotRadius||5,_=e.derived.colorDiscrete||d3.scaleOrdinal(d3.schemeCategory10),x=d3.group(r.data,function(J){return J[m]}),w=e.dom.chartArea.selectAll(".tag-bump-"+r.id).data([null]).join("g").attr("class","tag-bump-"+r.id),I=d3.line().x(function(J){return i(J[a])}).y(function(J){return s(J[d])}).curve(d3.curveBumpX),O=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0,z=0;x.forEach(function(J,Q){var oe=_(Q),se=J.slice().sort(function(B,he){return String(B[a]).localeCompare(String(he[a]))}),re=w.selectAll(".bump-line-"+z).data([se]),q=re.enter().append("path").attr("class","bump-line bump-line-"+z).attr("fill","none").attr("stroke",oe).attr("stroke-width",2.5).attr("stroke-opacity",0).attr("d",I);q.merge(re).transition().duration(O).attr("stroke",oe).attr("stroke-opacity",.8).attr("d",I);var ue=w.selectAll(".bump-dot-"+z).data(se,function(B){return B._source_key||B[a]});ue.exit().transition().duration(O).style("opacity",0).remove();var K=ue.enter().append("circle").attr("class","bump-dot bump-dot-"+z).attr("cx",function(B){return i(B[a])}).attr("cy",function(B){return s(B[d])}).attr("r",v).attr("fill",oe).attr("stroke","#fff").attr("stroke-width",1.5).style("opacity",0);K.merge(ue).transition().duration(O).style("opacity",1).attr("cx",function(B){return i(B[a])}).attr("cy",function(B){return s(B[d])}).attr("r",v).attr("fill",oe),z++})}getHoverSelector(e,r){return".tag-bump-"+r.id+" .bump-dot"}formatTooltip(e,r,i){return{title:{text:String(r[i.mapping.group])},items:[{color:i.color,label:String(r[i.mapping.x_var]),value:String(r[i.mapping.y_var])}]}}remove(e,r){e.dom.chartArea.selectAll(".tag-bump-"+r.id).remove()}};var Bd=class{static type="radar";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints=null;static dataContract={axis:{required:!0},value:{required:!0,numeric:!0}};render(e,r){var i=e.margin||(e.config&&e.config.layout?e.config.layout.margin:{top:0,right:0,bottom:0,left:0}),s=(e.width||e.runtime&&e.runtime.width||0)-i.left-i.right,a=(e.height||e.runtime&&e.runtime.height||0)-i.top-i.bottom,d=r.mapping.axis,m=r.mapping.value,v=r.mapping.group,_=r.options&&r.options.labelOffset||16,x=s/2,w=a/2,I=Math.max(0,Math.min(s,a)/2-_-8),O=[],z=new Set,J=d3.max(r.data,function(cr){return+cr[m]})||0,Q=d3.scaleLinear().domain([0,J>0?J:1]).range([0,I]),oe=[],se=v?d3.group(r.data,function(cr){return cr[v]}):new Map([[r.label||"Series",r.data]]),re=e.derived.colorDiscrete||d3.scaleOrdinal(d3.schemeCategory10),q,ue,K,B,he;if(r.data.forEach(function(cr){var bn=cr[d];z.has(bn)||(z.add(bn),O.push(bn))}),q=O.length,q===0)return;ue=e.dom.chartArea.selectAll(".tag-radar-"+r.id).data([null]).join("g").attr("class","tag-radar-"+r.id),K=ue.selectAll(".radar-axis-layer").data([null]).join("g").attr("class","radar-axis-layer"),B=ue.selectAll(".radar-polygon-layer").data([null]).join("g").attr("class","radar-polygon-layer");var He=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0;function er(cr){var bn=2*Math.PI*cr/q,mn=Math.sin(bn),qn=Math.cos(bn),Wt="middle";return mn>.25?Wt="start":mn<-.25&&(Wt="end"),{lineX:x+I*mn,lineY:w-I*qn,labelX:x+(I+_)*mn,labelY:w-(I+_)*qn,textAnchor:Wt}}var Er=K.selectAll(".radar-axis").data(O,function(cr){return cr});Er.exit().transition().duration(He).style("opacity",0).remove();var zt=Er.enter().append("g").attr("class","radar-axis").style("opacity",0);zt.append("line").attr("class","radar-axis-line").attr("stroke","var(--chart-grid, #cbd5e1)").attr("stroke-width",1).attr("x1",x).attr("y1",w).attr("x2",x).attr("y2",w),zt.append("text").attr("class","radar-axis-label").attr("fill","var(--chart-fg, #1f2937)").attr("x",x).attr("y",w).attr("dy","0.35em").attr("text-anchor","middle");var _n=zt.merge(Er);_n.transition().duration(He).style("opacity",1),_n.each(function(cr,bn){var mn=er(bn),qn=d3.select(this);qn.select(".radar-axis-line").attr("stroke","var(--chart-grid, #cbd5e1)").attr("stroke-width",1).transition().duration(He).attr("x1",x).attr("y1",w).attr("x2",mn.lineX).attr("y2",mn.lineY),qn.select(".radar-axis-label").text(cr).transition().duration(He).attr("x",mn.labelX).attr("y",mn.labelY).attr("text-anchor",mn.textAnchor)}),se.forEach(function(cr,bn){var mn=new Map,qn=[];cr.forEach(function(Wt){mn.set(Wt[d],Wt)}),O.forEach(function(Wt,Pr){var gi=2*Math.PI*Pr/q,Ii=mn.get(Wt),yi=Ii?+Ii[m]:0,as=Q(Number.isFinite(yi)?yi:0);qn.push({axis:Wt,angle:gi,value:Number.isFinite(yi)?yi:0,x:x+as*Math.sin(gi),y:w-as*Math.cos(gi),datum:Ii||null})}),oe.push({key:bn,color:re(bn),points:qn,rows:cr})}),e.derived.colorDiscrete=re.domain(oe.map(function(cr){return cr.key})),e.colorDiscrete=e.derived.colorDiscrete,he=d3.line().x(function(cr){return cr.x}).y(function(cr){return cr.y}).curve(d3.curveLinearClosed);function $r(cr){return he(cr.map(function(bn){return{x,y:w}}))}var In=B.selectAll(".radar-polygon").data(oe,function(cr){return cr.key});In.exit().transition().duration(He).style("opacity",0).remove();var On=In.enter().append("path").attr("class","radar-polygon").attr("d",function(cr){return $r(cr.points)}).attr("fill",function(cr){return cr.color}).attr("fill-opacity",0).attr("stroke",function(cr){return cr.color}).attr("stroke-width",2).attr("stroke-opacity",0);On.merge(In).transition().duration(He).attrTween("d",function(cr){var bn=this,mn=bn._radarPoints||cr.points.map(function(){return{x,y:w}}),qn=cr.points,Wt=mn.map(function(Pr,gi){var Ii=qn[gi]||Pr;return{x:d3.interpolateNumber(Pr.x,Ii.x),y:d3.interpolateNumber(Pr.y,Ii.y)}});return function(Pr){var gi=Wt.map(function(Ii){return{x:Ii.x(Pr),y:Ii.y(Pr)}});return bn._radarPoints=qn,he(gi)}}).attr("fill",function(cr){return cr.color}).attr("fill-opacity",.2).attr("stroke",function(cr){return cr.color}).attr("stroke-opacity",1)}getHoverSelector(e,r){return".tag-radar-"+r.id+" .radar-polygon"}formatTooltip(e,r){return{title:{text:String(r.key)},items:r.points.map(function(i){return{color:r.color,label:i.axis,value:String(i.value)}})}}remove(e,r){e.dom.chartArea.selectAll(".tag-radar-"+r.id).remove()}};var kd=class{static type="funnel";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints=null;static dataContract={stage:{required:!0},value:{required:!0,numeric:!0}};render(e,r){var i=e.margin||(e.config&&e.config.layout?e.config.layout.margin:{top:0,right:0,bottom:0,left:0}),s=(e.width||e.runtime&&e.runtime.width||0)-i.left-i.right,a=(e.height||e.runtime&&e.runtime.height||0)-i.top-i.bottom,d=r.mapping.stage,m=r.mapping.value,v=r.options&&r.options.stageGap||6,_=d3.max(r.data,function(ue){return+ue[m]})||0,x=d3.scaleLinear().domain([0,_>0?_:1]).range([0,s*.95]),w=e.derived.colorDiscrete||d3.scaleOrdinal(d3.schemeTableau10),I=r.data.length>0?a/r.data.length:0,O,z,J;O=r.data.map(function(ue,K){var B=r.data[K+1]||null,he=x(+ue[m]||0),He=B?x(+B[m]||0):he*.55,er=K*I,Er=Math.max(er,er+I-v),zt=s/2,_n=zt-he/2,$r=zt+he/2,In=zt-He/2,On=zt+He/2;return{stage:ue[d],value:+ue[m],color:w(ue[d]),datum:ue,points:[[_n,er],[$r,er],[On,Er],[In,Er]],labelX:zt,labelY:(er+Er)/2}}),e.derived.colorDiscrete=w.domain(O.map(function(ue){return ue.stage})),e.colorDiscrete=e.derived.colorDiscrete;var Q=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0;function oe(ue){return"M"+ue[0][0]+","+ue[0][1]+"L"+ue[1][0]+","+ue[1][1]+"L"+ue[2][0]+","+ue[2][1]+"L"+ue[3][0]+","+ue[3][1]+"Z"}function se(ue){var K=(ue.points[0][0]+ue.points[1][0])/2,B=(ue.points[0][1]+ue.points[3][1])/2;return[[K,B],[K,B],[K,B],[K,B]]}z=e.dom.chartArea.selectAll(".tag-funnel-"+r.id).data([null]).join("g").attr("class","tag-funnel-"+r.id),J=z.selectAll(".funnel-stage-group").data(O,function(ue){return ue.stage}),J.exit().transition().duration(Q).style("opacity",0).remove();var re=J.enter().append("g").attr("class","funnel-stage-group").style("opacity",0);re.append("path").attr("class","funnel-stage").attr("d",function(ue){return oe(se(ue))}).attr("fill",function(ue){return ue.color}),re.append("text").attr("class","funnel-label").attr("x",function(ue){return ue.labelX}).attr("y",function(ue){return ue.labelY}).attr("dy","0.35em").attr("text-anchor","middle").text(function(ue){return ue.stage});var q=re.merge(J);q.transition().duration(Q).style("opacity",1),q.select(".funnel-stage").transition().duration(Q).attr("d",function(ue){return oe(ue.points)}).attr("fill",function(ue){return ue.color}),q.select(".funnel-label").text(function(ue){return ue.stage}).transition().duration(Q).attr("x",function(ue){return ue.labelX}).attr("y",function(ue){return ue.labelY})}getHoverSelector(e,r){return".tag-funnel-"+r.id+" .funnel-stage"}formatTooltip(e,r){return{title:{text:String(r.stage)},items:[{color:r.color,label:String(r.stage),value:String(r.value)}]}}remove(e,r){e.dom.chartArea.selectAll(".tag-funnel-"+r.id).remove()}};var Fd=class{static type="parallel";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints=null;static dataContract={dimensions:{required:!0}};render(e,r){var i=e.margin||(e.config&&e.config.layout?e.config.layout.margin:{top:0,right:0,bottom:0,left:0}),s=(e.width||e.runtime&&e.runtime.width||0)-i.left-i.right,a=(e.height||e.runtime&&e.runtime.height||0)-i.top-i.bottom,d=r.mapping.dimensions,m=Array.isArray(d)?d.slice():[d],v=r.mapping.group,_=d3.scalePoint().domain(m).range([0,s]).padding(.5),x={},w=e.derived.colorDiscrete||d3.scaleOrdinal(d3.schemeCategory10),I,O,z;m.forEach(function(q){var ue=d3.extent(r.data,function(K){var B=+K[q];return Number.isFinite(B)?B:null});(!ue||ue[0]===void 0||ue[1]===void 0)&&(ue=[0,1]),ue[0]===ue[1]&&(ue=[ue[0]-1,ue[1]+1]),x[q]=d3.scaleLinear().domain(ue).range([a,0])}),e.derived.colorDiscrete=w.domain(Array.from(new Set(r.data.map(function(q){return v?q[v]:r.label})))),e.colorDiscrete=e.derived.colorDiscrete,I=e.dom.chartArea.selectAll(".tag-parallel-"+r.id).data([null]).join("g").attr("class","tag-parallel-"+r.id),O=I.selectAll(".parallel-axis").data(m).join(function(q){var ue=q.append("g").attr("class","parallel-axis");return ue.append("text").attr("class","parallel-axis-label"),ue}).attr("transform",function(q){return"translate("+_(q)+",0)"}).each(function(q){d3.select(this).call(d3.axisLeft(x[q]).ticks(5))}),O.select(".parallel-axis-label").attr("x",0).attr("y",-10).attr("text-anchor","middle").text(function(q){return q}),z=d3.line().defined(function(q){return q&&q[1]!==null}).x(function(q){return q[0]}).y(function(q){return q[1]});var J=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0;function Q(q){var ue=m.map(function(K){var B=+q[K];return Number.isFinite(B)?[_(K),x[K](B)]:[_(K),null]});return z(ue)}function oe(q){var ue=v?q[v]:r.label;return w(ue)}var se=I.selectAll(".parallel-line").data(r.data,function(q,ue){return q._source_key!=null?q._source_key:ue});se.exit().transition().duration(J).attr("stroke-opacity",0).remove();var re=se.enter().append("path").attr("class","parallel-line").attr("fill","none").attr("d",Q).attr("stroke",oe).attr("stroke-opacity",0);re.merge(se).transition().duration(J).attr("d",Q).attr("stroke",oe).attr("stroke-opacity",.6)}getHoverSelector(e,r){return".tag-parallel-"+r.id+" .parallel-line"}formatTooltip(e,r,i){var s=Array.isArray(i.mapping.dimensions)?i.mapping.dimensions:[i.mapping.dimensions],a=i.mapping.group?String(r[i.mapping.group]):String(i.label||"Series");return{title:{text:a},items:s.map(function(d){return{color:e.colorDiscrete?e.colorDiscrete(i.mapping.group?r[i.mapping.group]:i.label):i.color,label:d,value:String(r[d])}})}}remove(e,r){e.dom.chartArea.selectAll(".tag-parallel-"+r.id).remove()}};var ss=new Map;function Ls(t,e){if(ss.has(t))throw new Error("Renderer already registered for type: "+t);var r=e&&e.constructor?e.constructor.traits:null,i=["hasAxes","referenceLines","legendType","binning","rolloverStyle"];if(!r)throw new Error("Renderer missing static traits: "+t);i.forEach(function(s){if(!(s in r))throw new Error("Renderer trait missing '"+s+"': "+t)}),ss.set(t,e)}function B6(t){if(!ss.has(t))throw new Error("Unknown renderer type: "+t);return ss.get(t)}function pl(t){return B6(t.type)}function Dy(){return ss.has(sd.type)||Ls(sd.type,new sd),ss.has(ad.type)||Ls(ad.type,new ad),ss.has(od.type)||Ls(od.type,new od),ss.has(ld.type)||Ls(ld.type,new ld),ss.has(cd.type)||Ls(cd.type,new cd),ss.has(ud.type)||Ls(ud.type,new ud),ss.has(fd.type)||Ls(fd.type,new fd),ss.has(yd.type)||Ls(yd.type,new yd),ss.has(bd.type)||Ls(bd.type,new bd),ss.has(vd.type)||Ls(vd.type,new vd),ss.has(_d.type)||Ls(_d.type,new _d),ss.has(xd.type)||Ls(xd.type,new xd),ss.has(Sd.type)||Ls(Sd.type,new Sd),ss.has(Ed.type)||Ls(Ed.type,new Ed),ss.has(wd.type)||Ls(wd.type,new wd),ss.has(Ad.type)||Ls(Ad.type,new Ad),ss.has(Od.type)||Ls(Od.type,new Od),ss.has(Cd.type)||Ls(Cd.type,new Cd),ss.has(Ld.type)||Ls(Ld.type,new Ld),ss.has(Nd.type)||Ls(Nd.type,new Nd),ss.has(Dd.type)||Ls(Dd.type,new Dd),ss.has(Rd.type)||Ls(Rd.type,new Rd),ss.has(Bd.type)||Ls(Bd.type,new Bd),ss.has(kd.type)||Ls(kd.type,new kd),ss.has(Fd.type)||Ls(Fd.type,new Fd),ss.has(Td.type)||Ls(Td.type,new Td),ss.has(Id.type)||Ls(Id.type,new Id),ss}function Ry(){return Array.from(ss.values())}function By(t,e){var r=qs(t,e.label,e.color),i=d3.drag().on("start",function(){d3.select(this).raise().classed("active",!0).style("cursor","grabbing")}).on("drag",function(s,a){a[e.mapping.x_var]=t.xScale.invert(s.x),a[e.mapping.y_var]=t.yScale.invert(s.y),d3.select(this).attr("cx",t.xScale(a[e.mapping.x_var])).attr("cy",t.yScale(a[e.mapping.y_var]))}).on("end",function(s,a){d3.select(this).classed("active",!1).style("cursor","grab"),t.updateRegression(r,e.label),t.emit("dragEnd",{point:a,layerLabel:e.label})});t.chart.selectAll("."+_r("point",t.element.id,e.label)).style("cursor","grab").call(i)}function Y0(t,e,r){Md(t);var i=d3.select(t.dom.element),s=i.append("div").attr("class","myIO-status-bar").attr("role","status").attr("aria-live","polite");s.append("span").attr("class","myIO-status-bar-text").text(e);var a=s.append("span").attr("class","myIO-status-bar-actions");(r||[]).forEach(function(d){a.append("button").attr("class","myIO-status-bar-btn").attr("type","button").text(d.label).on("click",d.handler)})}function Md(t){d3.select(t.dom.element).selectAll(".myIO-status-bar").remove()}var ky=["point","bar","histogram","hexbin","groupedBar"];function Fy(t){var e=t.config.interactions.brush;if(!(!e||!e.enabled)){var r=(t.derived.currentLayers||[]).filter(function(m){return ky.indexOf(m.type)>-1});if(r.length!==0){J0(t);var i=e.direction==="x"?d3.brushX():e.direction==="y"?d3.brushY():d3.brush(),s=t.config.layout.margin,a=t.runtime.width-(s.left+s.right),d=t.runtime.height-(s.top+s.bottom);i.extent([[0,0],[a,d]]),i.on("brush",function(m){ix(t,m,r,e)}).on("end",function(m){sx(t,m,r,e)}),t.dom.chartArea.insert("g",":first-child").attr("class","myIO-brush").call(i),t.dom.chartArea.select(".myIO-brush .overlay").style("cursor","crosshair"),t.runtime._brushFn=i,d3.select(t.dom.element).on("keydown.brush",function(m){m.key==="Escape"&&t.runtime._brushed&&k6(t)})}}}function ix(t,e,r,i){if(e.selection){var s=e.selection,a=i.direction;r.forEach(function(d){var m=$y(t,d);t.dom.chartArea.selectAll(m).each(function(v){var _=My(t,v,d,s,a);d3.select(this).style("opacity",_?1:"var(--chart-brush-dim-opacity)")})})}}function sx(t,e,r,i){if(!e.selection){k6(t);return}var s=e.selection,a=i.direction,d=ax(t,s,a),m=[],v=[];r.forEach(function(x){x.data.forEach(function(w){My(t,w,x,s,a)&&(m.push(w),w._source_key&&v.push(w._source_key))})}),t.runtime._brushed={data:m,extent:d,keys:v};var _=r.reduce(function(x,w){return x+w.data.length},0);Y0(t,m.length+" of "+_+" points selected",[{label:"Clear",handler:function(){k6(t)}}]),t.emit("brushed",{data:m,extent:d,keys:v,layerLabel:r.length===1?r[0].label:null})}function k6(t){(t.derived.currentLayers||[]).forEach(function(e){if(ky.indexOf(e.type)>-1){var r=$y(t,e);t.dom.chartArea.selectAll(r).style("opacity",1)}}),t.runtime._brushFn&&t.dom.chartArea.select(".myIO-brush").call(t.runtime._brushFn.move,null),t.runtime._brushed=null,Md(t),t.emit("brushed",{data:[],extent:null,keys:[],layerLabel:null})}function My(t,e,r,i,s){var a=r.mapping.x_var,d=r.mapping.y_var,m=t.xScale(e[a]),v=t.yScale(e[d]);return isNaN(m)||isNaN(v)?!1:s==="x"?m>=i[0]&&m<=i[1]:s==="y"?v>=i[0]&&v<=i[1]:m>=i[0][0]&&m<=i[1][0]&&v>=i[0][1]&&v<=i[1][1]}function X0(t,e,r){return typeof t.invert=="function"?[t.invert(e),t.invert(r)]:null}function ax(t,e,r){return r==="x"?{x:X0(t.xScale,e[0],e[1]),y:null}:r==="y"?{x:null,y:X0(t.yScale,e[1],e[0])}:{x:X0(t.xScale,e[0][0],e[1][0]),y:X0(t.yScale,e[1][1],e[0][1])}}function $y(t,e){return e.type==="groupedBar"?".tag-grouped-bar-g rect":"."+_r(e.type,t.dom.element.id,e.label)}function J0(t){t.dom&&t.dom.chartArea&&t.dom.chartArea.selectAll(".myIO-brush").remove(),t.dom&&t.dom.element&&d3.select(t.dom.element).on("keydown.brush",null),t.runtime._brushed=null}var F6=30;function Py(t,e,r){Nf(t);var i=d3.select(t.dom.element),s=i.append("div").attr("class","myIO-popover").attr("role","dialog").attr("aria-label","Annotate data point"),a=s.append("div").attr("class","myIO-popover-field");a.append("label").text("Label:");var d;r.presetLabels&&r.presetLabels.length>0?(d=a.append("select").attr("class","myIO-popover-input"),r.presetLabels.forEach(function(w){d.append("option").attr("value",w).text(w)}),r.existingLabel&&d.property("value",r.existingLabel)):(d=a.append("input").attr("class","myIO-popover-input").attr("type","text").attr("maxlength",F6).attr("placeholder","Enter label..."),r.existingLabel&&d.property("value",r.existingLabel));var m=null;if(r.categoryColors){var v=s.append("div").attr("class","myIO-popover-field");v.append("label").text("Category:");var _=v.append("div").attr("class","myIO-popover-colors");Object.keys(r.categoryColors).forEach(function(w){var I=r.categoryColors[w];_.append("button").attr("class","myIO-popover-color-btn").attr("type","button").attr("title",w).attr("aria-label",w).style("background-color",I).on("click",function(){_.selectAll(".myIO-popover-color-btn").classed("selected",!1),d3.select(this).classed("selected",!0),m=I})})}var x=s.append("div").attr("class","myIO-popover-buttons");r.existingLabel&&r.onRemove&&x.append("button").attr("class","myIO-popover-btn myIO-popover-btn--danger").attr("type","button").text("Remove").on("click",function(){Nf(t),r.onRemove()}),x.append("button").attr("class","myIO-popover-btn").attr("type","button").text("Cancel").on("click",function(){Nf(t),r.onCancel&&r.onCancel()}),x.append("button").attr("class","myIO-popover-btn myIO-popover-btn--primary").attr("type","button").text("Apply").on("click",function(){var w=d.property("value").trim().substring(0,F6);w&&(Nf(t),r.onApply(w,m))}),ox(t,s,e),d.node().focus(),s.on("keydown",function(w){if(w.key==="Enter"){var I=d.property("value").trim().substring(0,F6);I&&(Nf(t),r.onApply(I,m))}w.key==="Escape"&&(Nf(t),r.onCancel&&r.onCancel())})}function ox(t,e,r){var i=t.config.layout.margin,s=r.px+i.left,a=r.py+i.top-10;e.style("left",Math.max(4,Math.min(s-80,t.runtime.totalWidth-180))+"px").style("bottom",t.runtime.height-a+8+"px")}function Nf(t){d3.select(t.dom.element).selectAll(".myIO-popover").remove()}var lx=["point","bar","histogram","hexbin","groupedBar"];function Uy(t){var e=t.config.interactions.annotation;if(!(!e||!e.enabled)){t.runtime._annotations||(t.runtime._annotations=[]);var r=(t.derived.currentLayers||[]).filter(function(i){return lx.indexOf(i.type)>-1});r.forEach(function(i){var s="."+_r(i.type,t.dom.element.id,i.label);t.dom.chartArea.selectAll(s).on("click.annotate",function(a,d){a.stopPropagation();var m=dx(t,d._source_key);Py(t,{px:t.xScale(d[i.mapping.x_var]),py:t.yScale(d[i.mapping.y_var])},{presetLabels:e.presetLabels,categoryColors:e.categoryColors,existingLabel:m?m.label:null,onApply:function(v,_){cx(t,d,i,v,_)},onRemove:function(){ux(t,d._source_key)},onCancel:function(){}})})}),K0(t),M6(t)}}function cx(t,e,r,i,s){t.runtime._annotations=t.runtime._annotations.filter(function(d){return d._source_key!==e._source_key});var a={_source_key:e._source_key,x:e[r.mapping.x_var],y:e[r.mapping.y_var],x_var:r.mapping.x_var,y_var:r.mapping.y_var,label:i,category:s||null,layerLabel:r.label,timestamp:new Date().toISOString()};t.runtime._annotations.push(a),K0(t),M6(t),t.emit("annotated",{annotations:t.runtime._annotations,action:"add",latest:a})}function ux(t,e){var r=t.runtime._annotations.find(function(i){return i._source_key===e});t.runtime._annotations=t.runtime._annotations.filter(function(i){return i._source_key!==e}),K0(t),M6(t),t.emit("annotated",{annotations:t.runtime._annotations,action:"remove",latest:r||null})}function fx(t){t.runtime._annotations=[],K0(t),Md(t),t.emit("annotated",{annotations:[],action:"clear",latest:null})}function K0(t){var e=t.dom.chartArea.selectAll(".myIO-annotations").data([0]);e=e.enter().append("g").attr("class","myIO-annotations").merge(e);var r=e.selectAll(".myIO-annotation-mark").data(t.runtime._annotations||[],function(a){return a._source_key});r.exit().remove();var i=r.enter().append("g").attr("class","myIO-annotation-mark");i.append("circle").attr("r",8).attr("fill","none").attr("stroke-width",2),i.append("text").attr("dy",-12).attr("text-anchor","middle").attr("class","myIO-annotation-label");var s=i.merge(r);s.attr("transform",function(a){return"translate("+t.xScale(a.x)+","+t.yScale(a.y)+")"}),s.select("circle").style("stroke",function(a){return a.category||"var(--chart-annotation-ring)"}),s.select("text").text(function(a){return a.label.length>30?a.label.substring(0,27)+"\u2026":a.label}).style("font-size","var(--chart-annotation-font-size)").style("fill","var(--chart-text-color)")}function M6(t){var e=(t.runtime._annotations||[]).length;if(e===0){Md(t);return}Y0(t,e+" annotation"+(e===1?"":"s"),[{label:"Export",handler:function(){var r=t.runtime._annotations||[];r.length>0&&P0(t.dom.element.id+"_annotations.csv",r)}},{label:"Clear",handler:function(){fx(t)}}])}function dx(t,e){return(t.runtime._annotations||[]).find(function(r){return r._source_key===e})}function Vy(t){Nf(t)}var qh=new Map;function $6(t){return t&&t.config&&t.config.interactions&&t.config.interactions.linked}function P6(t){var e=$6(t);return e&&e.cursor===!0&&e.group?e.group:null}function jy(t){var e=P6(t);if(e){var r=qh.get(e);r||(r=new Set,qh.set(e,r)),r.add(t),t.runtime=t.runtime||{},t.runtime._linkedCursor||(t.runtime._linkedCursor={lastTs:0})}}function qy(t){qh.forEach(function(e,r){e.delete(t)&&e.size===0&&qh.delete(r)})}function Hy(t,e){var r=P6(t);if(r){var i=qh.get(r);i&&i.forEach(function(s){s!==t&&px(s,e)})}}function hx(t){var e=P6(t);e&&Hy(t,{sourceId:t.element&&t.element.id,group:e,ts:typeof performance<"u"?performance.now():Date.now(),clear:!0})}function Q0(t,e,r,i){var s=$6(t);if(!(!s||s.cursor!==!0)){var a=s.keyColumn,d=e&&a&&e[a]!==void 0?e[a]:null;Hy(t,{sourceId:t.element&&t.element.id,group:s.group,keyValue:d,xValue:r,tooltip:i||null,ts:typeof performance<"u"?performance.now():Date.now()})}}function Z0(t){var e=$6(t);!e||e.cursor!==!0||hx(t)}function px(t,e){var r=t.runtime&&t.runtime._linkedCursor;if(r&&!(typeof e.ts=="number"&&e.ts+a)return null;var v=r(d);return Number.isFinite(v)?v:null}var _=typeof r.domain=="function"?r.domain():[];if(_.indexOf(e)===-1)return null;var x=r(e);return Number.isFinite(x)?x:null}function gx(t,e){var r=t.plot||t.svg;if(!(!r||typeof r.select!="function")){var i=r.select("line.myIO-hover-rule");i.empty()&&(i=r.append("line").attr("class","myIO-hover-rule"));var s=t.margin||{},a=(t.height||0)-((+s.top||0)+(+s.bottom||0));i.attr("x1",e).attr("x2",e).attr("y1",0).attr("y2",a).style("display",null)}}function Gy(t){var e=t.plot||t.svg;!e||typeof e.select!="function"||e.select("line.myIO-hover-rule").remove()}var zy=["point","bar","histogram","hexbin","groupedBar","waffle","beeswarm","lollipop","dumbbell"];function Wy(t){var e=t.config.interactions.linked;if(!(!e||!e.enabled)&&!(typeof crosstalk>"u")){U6(t);var r=new crosstalk.SelectionHandle(e.group),i=e.filter?new crosstalk.FilterHandle(e.group):null;t.runtime._crosstalkSel=r,t.runtime._crosstalkFil=i,(e.mode==="source"||e.mode==="both")&&(t.runtime._linkedBrushHandler=function(s){s.keys&&s.keys.length>0?r.set(s.keys):r.clear()},t.on("brushed",t.runtime._linkedBrushHandler)),(e.mode==="target"||e.mode==="both")&&(r.on("change.myIO",function(s){yx(t,s.value)}),i&&i.on("change.myIO",function(s){bx(t,s.value)}))}}function yx(t,e){var r=(t.derived.currentLayers||[]).filter(function(i){return zy.indexOf(i.type)>-1});r.forEach(function(i){var s="."+_r(i.type,t.dom.element.id,i.label);t.dom.chartArea.selectAll(s).each(function(a){if(!e)d3.select(this).style("opacity",1);else{var d=e.indexOf(a._source_key)>-1;d3.select(this).style("opacity",d?1:"var(--chart-brush-dim-opacity)")}})})}function bx(t,e){var r=(t.derived.currentLayers||[]).filter(function(i){return zy.indexOf(i.type)>-1});r.forEach(function(i){var s="."+_r(i.type,t.dom.element.id,i.label);t.dom.chartArea.selectAll(s).each(function(a){if(!e)d3.select(this).style("display",null);else{var d=e.indexOf(a._source_key)>-1;d3.select(this).style("display",d?null:"none")}})})}function U6(t){t.runtime._linkedBrushHandler&&(t.off("brushed",t.runtime._linkedBrushHandler),t.runtime._linkedBrushHandler=null),t.runtime._crosstalkSel&&(t.runtime._crosstalkSel.close(),t.runtime._crosstalkSel=null),t.runtime._crosstalkFil&&(t.runtime._crosstalkFil.close(),t.runtime._crosstalkFil=null),qy(t)}function Xy(t){var e=t.config.interactions.sliders;if(!(!e||e.length===0)){V6(t),t.runtime._sliderTimers=[];var r=d3.select(t.dom.element),i=r.append("div").attr("class","myIO-slider-wrapper");e.forEach(function(s){var a=i.append("div").attr("class","myIO-slider-row");a.append("label").attr("class","myIO-slider-label").attr("for",t.dom.element.id+"-slider-"+s.param).text(s.label);var d=a.append("input").attr("type","range").attr("class","myIO-slider-input").attr("id",t.dom.element.id+"-slider-"+s.param).attr("min",s.min).attr("max",s.max).attr("step",s.step||"any").attr("aria-label",s.label).attr("aria-valuemin",s.min).attr("aria-valuemax",s.max).attr("aria-valuenow",s.value).property("value",s.value),m=a.append("span").attr("class","myIO-slider-value").text(Yy(s.value,s.step));if(!HTMLWidgets.shinyMode){d.attr("disabled",!0).attr("title","Parameter sliders require Shiny"),a.style("opacity","0.5");return}var v=t.runtime._sliderTimers.length;t.runtime._sliderTimers.push(null);var _=s.debounce||200;d.on("input",function(){var x=+this.value;m.text(Yy(x,s.step)),d3.select(this).attr("aria-valuenow",x),clearTimeout(t.runtime._sliderTimers[v]),t.runtime._sliderTimers[v]=setTimeout(function(){Shiny.onInputChange("myIO-"+t.dom.element.id+"-slider-"+s.param,x),t.emit("sliderChanged",{param:s.param,value:x})},_)})})}}function Yy(t,e){if(e&&e<1){var r=String(e).split(".")[1];return t.toFixed(r?r.length:2)}return String(t)}function V6(t){t.runtime._sliderTimers&&(t.runtime._sliderTimers.forEach(clearTimeout),t.runtime._sliderTimers=null),d3.select(t.dom.element).selectAll(".myIO-slider-wrapper").remove()}function vx(t){let e=document.createElement("div");return e.textContent=String(t),e.innerHTML}function Ky(t){t.dom.tooltip=d3.select(t.dom.element).append("div").attr("class","toolTip").attr("role","status").attr("aria-live","polite").attr("aria-hidden","true"),t.dom.tooltipTitle=t.dom.tooltip.append("div").attr("class","toolTipTitle"),t.dom.tooltipBody=t.dom.tooltip.append("div").attr("class","toolTipBody"),t.runtime.tooltipHideTimer=null,t.captureLegacyAliases()}function $d(t){d3.select(t.dom.element).select(".toolTipBox").remove(),d3.select(t.dom.element).select(".toolLine").remove(),d3.select(t.dom.element).select(".toolPointLayer").remove(),t.runtime.toolTipBox=null,t.runtime.toolLine=null,t.runtime.toolPointLayer=null,t.syncLegacyAliases()}function Qy(t,e,r){$d(t),t.runtime.toolLine=t.dom.chartArea.append("line").attr("class","toolLine"),t.runtime.toolPointLayer=t.dom.chartArea.append("g").attr("class","toolPointLayer"),t.runtime.toolTipBox=t.dom.svg.append("rect").attr("class","toolTipBox").attr("opacity",0).attr("width",t.width-(t.margin.left+t.margin.right)).attr("height",t.height-(t.margin.top+t.margin.bottom)).attr("transform","translate("+t.margin.left+","+t.margin.top+")").on("mouseover",function(i){e(i)}).on("mousemove",function(i){e(i)}).on("mouseout",function(){typeof r=="function"&&r()}).on("touchstart",function(i){i.preventDefault(),e(i)}).on("touchmove",function(i){i.preventDefault(),e(i)}).on("touchend",function(){typeof r=="function"&&r()}),t.syncLegacyAliases()}function Df(t,e){if(!t.dom.tooltip)return;clearTimeout(t.runtime.tooltipHideTimer);let r=e.pointer||[0,0],i=e.title||{},s=e.items||[],a=s.length===1&&s[0].color?s[0].color:null;t.dom.tooltipTitle.style("border-left-color",a||null).html(""+vx(Jy(i))+"");let d=t.dom.tooltipBody.selectAll(".toolTipItem").data(s);d.exit().remove();let m=d.enter().append("div").attr("class","toolTipItem");m.append("span").attr("class","dot"),m.append("span").attr("class","toolTipLabel"),m.append("span").attr("class","toolTipValue"),m.merge(d).select(".dot").style("background-color",function(v){return v.color||"transparent"}),m.merge(d).select(".toolTipLabel").text(function(v){return v.label||""}),m.merge(d).select(".toolTipValue").text(function(v){return Jy(v)}),t.dom.tooltip.style("display","inline-block").style("opacity",1).attr("aria-hidden","false"),_x(t,r)}function Pu(t){t.dom.tooltip&&(clearTimeout(t.runtime.tooltipHideTimer),t.runtime.tooltipHideTimer=window.setTimeout(function(){t.dom.tooltip.style("display","none").style("opacity",0).attr("aria-hidden","true")},300))}function Jy(t){if(t==null)return"";if(typeof t=="string")return t;let e=typeof t.format=="function"?t.format:function(i){return i},r=t.text!=null?t.text:t.value;return r==null?"":e(r)}function _x(t,e){let r=t.dom.element.getBoundingClientRect(),i=t.dom.tooltip.node();t.dom.tooltip.style("left",e[0]+12+"px").style("top",e[1]+12+"px");let s=i.getBoundingClientRect(),a=e[0]+12,d=e[1]+12;a+s.width>r.width&&(a=Math.max(8,e[0]-s.width-12)),d+s.height>r.height&&(d=Math.max(8,e[1]-s.height-12)),t.dom.tooltip.style("left",a+"px").style("top",d+"px")}var Pd=300;function Zy(t,e){var r=e||t.currentLayers||[],i=t,s=["text","yearMon"],a=s.indexOf(t.options.xAxisFormat)>-1?function(K){return K}:d3.format(t.options.xAxisFormat||""),d=d3.format(t.options.yAxisFormat||""),m=t.newScaleY?d3.format(t.newScaleY):d;$d(t),r.forEach(function(K){["bar","point","hexbin","histogram","calendarHeatmap"].indexOf(K.type)>-1&&v(K)}),r.some(function(K){return K.type==="groupedBar"})&&t.chart.selectAll(".tag-grouped-bar-g rect").on("mouseout",J).on("mouseover",z).on("mousemove",z).on("touchstart",function(K){K.preventDefault(),z.call(this,K)}).on("touchmove",function(K){K.preventDefault(),z.call(this,K)}).on("touchend",J),r.length>0&&r.every(function(K){return["line","area"].indexOf(K.type)>-1})&&Qy(t,Q,oe),r.some(function(K){return K.type==="donut"})&&se(".donut","donut",function(K,B){return{title:{text:B.mapping.x_var+": "+K.data[B.mapping.x_var]},items:[{color:t.colorDiscrete(K.index),label:B.mapping.y_var,value:K.data[B.mapping.y_var]}]}}),r.some(function(K){return K.type==="treemap"})&&t.chart.selectAll(".root").on("mouseout",q).on("mouseover",re).on("mousemove",re).on("touchstart",function(K){K.preventDefault(),re.call(this,K)}).on("touchmove",function(K){K.preventDefault(),re.call(this,K)}).on("touchend",q);function v(K){var B=pl(K),he=B.getHoverSelector?B.getHoverSelector(t,K):"."+_r(K.type,t.element.id,K.label);t.chart.selectAll(he).on("mouseout",function(){x.call(this,K)}).on("mouseover",function(He){_.call(this,He,K)}).on("mousemove",function(He){_.call(this,He,K)}).on("touchstart",function(He){He.preventDefault(),_.call(this,He,K)}).on("touchmove",function(He){He.preventDefault(),_.call(this,He,K)}).on("touchend",function(){x.call(this,K)})}function _(K,B){var he=d3.select(this).data()[0],He=pl(B),er=w(B,He,he,this);HTMLWidgets.shinyMode&&Shiny.onInputChange("myIO-"+i.element.id+"-rollover",JSON.stringify(he)),I(this,B,he),Df(i,{pointer:ue(K),title:er.title,items:er.items});var Er=B.type==="hexbin"?i.xScale?i.xScale.invert(he.x):null:B.type==="histogram"?he.x0:B.type==="calendarHeatmap"?he.date instanceof Date?he.date:new Date(he[B.mapping.date]+"T00:00:00Z"):he[B.mapping.x_var];Q0(i,he,Er,er)}function x(K){O(this,K),Pu(i),Z0(i)}function w(K,B,he,He){if(K.type==="hexbin"){var er=d3.format(",.2f");return{title:{text:"x: "+er(i.xScale.invert(he.x))+", y: "+er(i.yScale.invert(he.y))},items:[{color:d3.select(He).attr("fill"),label:"Count",value:he.length}]}}if(K.type==="histogram")return{title:{text:"Bin: "+he.x0+" to "+he.x1},items:[{color:d3.select(He).attr("fill"),label:"Count",value:he.length}]};if(K.type==="calendarHeatmap"){var Er=B.formatTooltip(i,he,K);return{title:{text:typeof Er.title=="string"?Er.title:Er.title.text},items:[{color:Er.color||d3.select(He).attr("fill"),label:Er.label||K.label,value:Er.value}]}}var zt=K.mapping.x_var+": "+a(he[K.mapping.x_var]),_n=i.newY?i.newY:K.mapping.y_var,$r=K.type==="point"||K.type==="bar"?K.mapping.y_var:K.label,In=qs(i,K.label,K.color);if(B&&typeof B.formatTooltip=="function"){var On=B.formatTooltip(i,he,K);zt=On.title||zt,$r=On.label||$r,In=On.color||In}return{title:{text:zt},items:[{color:In,label:$r,value:m(he[_n])}]}}function I(K,B){var he=d3.select(K),He=B.type==="hexbin"?"#333":he.attr("fill")||he.style("fill")||qs(i,B.label,B.color);if(B.type==="hexbin"){he.style("stroke",He).style("stroke-width","2px");return}he.interrupt().style("stroke",He).style("stroke-width","2px").style("stroke-opacity",.8),B.type==="point"&&he.attr("r",Math.max(+he.attr("r")||0,6))}function O(K,B){var he=d3.select(K);he.interrupt().transition().duration(Pd).style("stroke-width","0px").style("stroke","transparent").style("stroke-opacity",null),B.type==="point"&&he.transition().duration(Pd).attr("r",If(i))}function z(K){var B=d3.select(this).data()[0],he=r[B.idx],He=qs(i,he.label,he.color);HTMLWidgets.shinyMode&&Shiny.onInputChange("myIO-"+i.element.id+"-rollover",JSON.stringify(B.data.values)),d3.select(this).interrupt().style("stroke",He).style("stroke-width","2px").style("stroke-opacity",.8);var er={title:{text:he.mapping.x_var+": "+a(B.data[0])},items:[{color:He,label:he.mapping.y_var,value:m(B[1]-B[0])}]};Df(i,{pointer:ue(K),title:er.title,items:er.items}),Q0(i,B.data,B.data[0],er)}function J(){d3.select(this).interrupt().transition().duration(Pd).style("stroke-width","0px").style("stroke","transparent").style("stroke-opacity",null),Pu(i),Z0(i)}function Q(K){var B=d3.pointer(K,this),he=i.xScale.invert(B[0]),He=[],er=d3.bisector(function($r){return+$r[0]}).left;if(r.forEach(function($r){var In=$r.data,On=$r.mapping.x_var,cr=i.newY?i.newY:$r.mapping.y_var||$r.mapping.high_y,bn=In.map(function(gi){return gi[On]}),mn=er(bn,he),qn=In[mn-1],Wt=In[mn],Pr=qn?Wt&&he-qn[On]>Wt[On]-he?Wt:qn:Wt;Pr&&He.push({color:$r.color,label:$r.label,xVar:On,yVar:cr,displayValue:Pr.density!=null?Pr.density:Pr[cr],value:Pr})}),He.length===0){oe();return}HTMLWidgets.shinyMode&&Shiny.onInputChange("myIO-"+i.element.id+"-rollover",JSON.stringify(He.map(function($r){return $r.value})));var Er=He[0].value[He[0].xVar];i.toolLine.style("stroke","var(--chart-ref-line-color)").style("stroke-width","1px").style("stroke-dasharray","4,4").attr("x1",i.xScale(Er)).attr("x2",i.xScale(Er)).attr("y1",0).attr("y2",i.height-(i.margin.top+i.margin.bottom));var zt=i.toolPointLayer.selectAll("circle").data(He);zt.exit().remove(),zt.enter().append("circle").attr("r",4).merge(zt).attr("cx",function($r){return i.xScale($r.value[$r.xVar])}).attr("cy",function($r){return i.yScale($r.value[$r.yVar])}).attr("fill","#ffffff").attr("stroke",function($r){return $r.color}).attr("stroke-width",2);var _n={title:{text:He[0].xVar+": "+a(Er)},items:He.map(function($r){return{color:$r.color,label:$r.label,value:m($r.displayValue)}})};Df(i,{pointer:ue(K),title:_n.title,items:_n.items}),Q0(i,He[0].value,Er,_n)}function oe(){i.toolLine&&i.toolLine.style("stroke","none"),i.toolPointLayer&&i.toolPointLayer.selectAll("*").remove(),Pu(i),Z0(i)}function se(K,B,he){var He=r.filter(function(er){return er.type===B})[0];t.chart.selectAll(K).on("mouseout",function(){t.chart.selectAll(K).transition().duration(Pd).style("opacity",1),Pu(i)}).on("mouseover",function(er,Er){t.chart.selectAll(K).style("opacity",.4),d3.select(this).style("opacity",.85);var zt=he(Er,He);Df(i,{pointer:ue(er),title:zt.title,items:zt.items})}).on("mousemove",function(er,Er){var zt=he(Er,He);Df(i,{pointer:ue(er),title:zt.title,items:zt.items})}).on("touchstart",function(er,Er){er.preventDefault(),t.chart.selectAll(K).style("opacity",.4),d3.select(this).style("opacity",.85);var zt=he(Er,He);Df(i,{pointer:ue(er),title:zt.title,items:zt.items})}).on("touchend",function(){t.chart.selectAll(K).transition().duration(Pd).style("opacity",1),Pu(i)})}function re(K,B){for(var he=r.filter(function(er){return er.type==="treemap"})[0],He=B;He.depth>1;)He=He.parent;t.chart.selectAll(".root").style("opacity",.4),d3.select(this).style("opacity",.85),Df(i,{pointer:ue(K),title:{text:he.mapping.level_1+": "+B.data[he.mapping.level_1]},items:[{color:t.colorDiscrete(He.data.id),label:B.data[he.mapping.level_2],value:B.value}]})}function q(){t.chart.selectAll(".root").transition().duration(Pd).style("opacity",1),Pu(i)}function ue(K){return d3.pointer(K,i.dom.element)}}var xx=.05,Sx=.15;function t7(t,e){var r=t.margin,i=s1(t),s=[];e.forEach(function(v){var _=d3.extent(v.data,function(x){return+x[v.mapping.value]});s.push(_)});var a=d3.min(s,function(v){return v[0]}),d=d3.max(s,function(v){return v[1]}),m=d3.scaleLinear().domain([a,d]).nice().range([0,t.width-(r.left+r.right)]);e.forEach(function(v){var _=v.data.map(function(x){return x[v.mapping.value]});v.bins=d3.bin().domain(m.domain()).thresholds(m.ticks(v.mapping.bins))(_),v.max_value=d3.max(v.bins,function(x){return x.length})}),t.derived.xScale=m,t.derived.yScale=d3.scaleLinear().domain([0,d3.max(e,function(v){return v.max_value})]).nice().range([i-(r.top+r.bottom),0])}function r7(t,e,r){var i=t.margin,s=[],a=[],d=[],m=[],v=r||{},_=v.xExtentFields||["x_var"],x=v.yExtentFields||["y_var"],w=e.filter(function(B){var he=B.scaleHints;return!(he&&Array.isArray(he.xExtentFields)&&he.xExtentFields.length===0&&Array.isArray(he.yExtentFields)&&he.yExtentFields.length===0)});w.forEach(function(B){var he=B.scaleHints&&Array.isArray(B.scaleHints.xExtentFields)?B.scaleHints.xExtentFields:_,He=[];he.forEach(function(In){var On=B.mapping[In]||In,cr=B.data.map(function(bn){return+bn[On]});He=He.concat(cr)});var er=d3.extent(He.length>0?He:[0]),Er=B.scaleHints&&Array.isArray(B.scaleHints.yExtentFields)?B.scaleHints.yExtentFields:x,zt=[];Er.forEach(function(In){var On=B.mapping[In]||In,cr=B.data.map(function(bn){return+bn[On]});zt=zt.concat(cr)});var _n=d3.extent(zt.length>0?zt:[0],function(In){return In});s.push(er),a.push([_n[0],_n[1]]);var $r=B.mapping.x_var;d.push(B.data.map(function(In){return In[$r]})),m.push(B.data.map(function(In){var On=B.mapping.y_var||"y_var";return In[On]}))});var I=d3.min(s,function(B){return B[0]}),O=d3.max(s,function(B){return B[1]}),z=d3.min(s,function(B){return B[0]}),J=d3.max(s,function(B){return B[1]});t.derived.xCheck=z===0&&J===0,I==O&&(I=I-1,O=O+1);var Q=Math.max(Math.abs(O-I)*xx,.5),oe=[t.config.scales.xlim.min?+t.config.scales.xlim.min:I-Q,t.config.scales.xlim.max?+t.config.scales.xlim.max:O+Q];t.derived.xBanded=[].concat.apply([],d).map(function(B){try{return Array.isArray(B)?B[0]:B}catch{return}}).filter(e7);var se=d3.min(a,function(B){return B[0]}),re=d3.max(a,function(B){return B[1]});se==re&&(se=se-1,re=re+1);var q=Math.abs(re-se)*Sx,ue=[t.config.scales.ylim.min?+t.config.scales.ylim.min:se-q,t.config.scales.ylim.max?+t.config.scales.ylim.max:re+q];t.derived.yBanded=[].concat.apply([],m).map(function(B){try{return Array.isArray(B)?B[0]:B}catch{return}}).filter(e7);var K=s1(t);v.xScaleType==="band"?t.derived.xScale=d3.scaleBand().range([0,t.width-(i.left+i.right)]).domain(t.config.scales.flipAxis===!0?t.derived.yBanded:t.derived.xBanded):t.derived.xScale=d3.scaleLinear().range([0,t.width-(i.right+i.left)]).domain(t.config.scales.flipAxis===!0?ue:oe),v.yScaleType==="band"?t.derived.yScale=d3.scaleBand().range([K-(i.top+i.bottom),0]).domain(t.config.scales.flipAxis===!0?t.derived.xBanded:t.derived.yBanded):t.derived.yScale=d3.scaleLinear().range([K-(i.top+i.bottom),0]).domain(t.config.scales.flipAxis===!0?oe:ue),t.config.scales.colorScheme&&t.config.scales.colorScheme.enabled&&(t.derived.colorDiscrete=d3.scaleOrdinal().range(t.config.scales.colorScheme.colors).domain(t.config.scales.colorScheme.domain),t.derived.colorContinuous=d3.scaleLinear().range(t.config.scales.colorScheme.colors).domain(t.config.scales.colorScheme.domain)),t.syncLegacyAliases()}function e7(t,e,r){return r.indexOf(t)===e}var Hh={xScaleType:"linear",yScaleType:"linear",xExtentFields:["x_var"],yExtentFields:["y_var"],domainMerge:"union"};function n7(t){return t?Object.assign({},Hh,t):null}function Ex(t){if(t&&t.scaleHints)return n7(t.scaleHints);try{var e=pl(t);return n7(e.constructor.scaleHints)}catch{return null}}function e4(t,e){var r=t&&t.config&&t.config.scales&&t.config.scales.categoricalScale;return r&&r[e+"Axis"]===!0?"band":"linear"}function i7(t,e){var r=!!(t&&t.config&&t.config.scales&&t.config.scales.flipAxis),i=new Set,s=new Set,a=new Set,d=new Set,m="union";if((e||[]).forEach(function(v){var _=Ex(v),x=e4(t,"x"),w=e4(t,"y"),I=_?_.xScaleType:x,O=_?_.yScaleType:w,z=r?O:I,J=r?I:O;r||(x==="band"&&(z="band"),w==="band"&&(J="band")),i.add(z),s.add(J);var Q=_&&Array.isArray(_.xExtentFields)?_.xExtentFields:Hh.xExtentFields;Q.forEach(function(se){a.add(se)});var oe=_&&Array.isArray(_.yExtentFields)?_.yExtentFields:Hh.yExtentFields;oe.forEach(function(se){d.add(se)}),_&&_.domainMerge==="independent"&&(m="independent")}),i.size>1||s.size>1)throw new Error("Mismatched scaleTypes across layers: x="+Array.from(i).join(", ")+", y="+Array.from(s).join(", ")+".");return{xScaleType:i.size>0?Array.from(i)[0]:e4(t,"x"),yScaleType:s.size>0?Array.from(s)[0]:e4(t,"y"),xExtentFields:Array.from(a).length>0?Array.from(a):Hh.xExtentFields,yExtentFields:Array.from(d).length>0?Array.from(d):Hh.yExtentFields,domainMerge:m}}function Ud(t){var e=t.derived.currentLayers||[],r=e.map(function(a){return pl(a).constructor.traits}),i=e[0]?e[0].type:null,s=Array.from(new Set(r.map(function(a){return a.legendType})));return{type:i,axesChart:r.some(function(a){return a.hasAxes}),histogram:r.length>0&&r.every(function(a){return a.binning}),continuousLegend:s.length===1&&s[0]==="continuous",ordinalLegend:s.length===1&&s[0]==="ordinal",referenceLines:r.some(function(a){return a.referenceLines})}}function Vd(t,e){if(e.axesChart)if(e.histogram)t7(t,t.derived.currentLayers);else{var r=i7(t,t.derived.currentLayers);r7(t,t.derived.currentLayers,r)}}var wx={line:"axes-continuous",point:"axes-continuous",area:"axes-continuous",bar:"axes-categorical",groupedBar:"axes-categorical",boxplot:"axes-categorical",violin:"axes-categorical",histogram:"axes-binned",heatmap:"axes-matrix",candlestick:"axes-continuous",waterfall:"axes-categorical",ridgeline:"axes-binned",rangeBar:"axes-continuous",sankey:"standalone-flow",hexbin:"axes-hex",treemap:"standalone-treemap",donut:"standalone-donut",gauge:"standalone-gauge",text:"axes-continuous",regression:"axes-continuous",bracket:"axes-continuous",comparison:"axes-categorical",qq:"axes-continuous",lollipop:"axes-categorical",dumbbell:"axes-categorical",waffle:"standalone-waffle",beeswarm:"axes-continuous",bump:"axes-continuous",survfit:"axes-continuous",histogram_fit:"axes-binned",quantile_dots:"axes-categorical",radar:"standalone-radar",funnel:"standalone-funnel",parallel:"standalone-parallel",calendarHeatmap:"standalone-calendar",fan:"axes-continuous"},Ax=new Set(["axes-continuous:axes-categorical","axes-categorical:axes-continuous","axes-binned:axes-continuous","axes-continuous:axes-binned"]);function Tx(t){if(t.length<=1)return{valid:!0,errors:[]};let e=[],r=t.map(function(a){return wx[a.type]||"unknown"}),i=r.filter(function(a){return a.startsWith("standalone")});i.length>0&&t.length>1&&e.push("Cannot mix standalone chart types with other layers."),i.length>1&&e.push("Standalone chart types must be used alone.");let s=Array.from(new Set(r));return s.length>1&&s.forEach(function(a,d){s.slice(d+1).forEach(function(m){Ax.has(a+":"+m)||e.push("Cannot mix layer groups '"+a+"' and '"+m+"'.")})}),{valid:e.length===0,errors:e}}function Ix(t,e){let r=[],i=[];return e?(Object.entries(e).forEach(function(s){let a=s[0],d=s[1],m=t.mapping?t.mapping[a]:null;if(d.required&&!m){r.push("Layer '"+t.label+"' is missing required mapping '"+a+"'.");return}if(!m)return;let v=Array.isArray(t.data)?typeof m=="string"?t.data.map(function(x){return x[m]}):t.data.map(function(){return m}):[];if(d.numeric&&v.find(function(w){return Number.isNaN(+w)})!==void 0&&r.push("Layer '"+t.label+"' field '"+m+"' must be numeric."),d.positive&&v.find(function(w){return+w<=0})!==void 0&&r.push("Layer '"+t.label+"' field '"+m+"' must be positive."),d.sorted){for(let x=1;x0&&i.push("Layer '"+t.label+"' field '"+m+"' contains "+_+" null/NaN values.")}),{errors:r,warnings:i}):{errors:r,warnings:i}}function t4(t){let e=t.derived.currentLayers||t.config.layers||[],r=Tx(e);return r.valid?e.filter(function(i){let a=pl(i).constructor.dataContract,d=Ix(i,a);return d.warnings.forEach(function(m){console.warn("[myIO]",m)}),d.errors.length>0?(d.errors.forEach(function(m){console.warn("[myIO] Layer '"+i.label+"' removed:",m),t.emit("error",{message:m,layer:i})}),!1):!0}):(r.errors.forEach(function(i){console.warn("[myIO] Composition error:",i),t.emit("error",{message:i})}),[])}function r4(t,e){e.referenceLines&&Ox(t)}function Ox(t){var e=t.margin,r=t.options.transition.speed,i=[t.options.referenceLine.x],s=[t.options.referenceLine.y];if(t.options.referenceLine.x){var a=t.plot.selectAll(".ref-x-line").data(i);a.exit().transition().duration(100).style("opacity",0).attr("y2",t.height-(e.top+e.bottom)).remove();var d=a.enter().append("line").attr("class","ref-x-line").attr("fill","none").style("stroke","gray").style("stroke-width",3).attr("x1",function(_){return t.xScale(_)}).attr("x2",function(_){return t.xScale(_)}).attr("y1",t.height-(e.top+e.bottom)).attr("y2",t.height-(e.top+e.bottom)).transition().ease(d3.easeQuad).duration(r).attr("y2",0);a.merge(d).transition().ease(d3.easeQuad).duration(r).attr("x1",function(_){return t.xScale(_)}).attr("x2",function(_){return t.xScale(_)}).attr("y1",t.height-(e.top+e.bottom)).attr("y2",0)}else t.plot.selectAll(".ref-x-line").remove();if(t.options.referenceLine.y){var m=t.plot.selectAll(".ref-y-line").data(s);m.exit().transition().duration(100).attr("y2",t.width-(e.left+e.right)).style("opacity",0).remove();var v=m.enter().append("line").attr("class","ref-y-line").attr("fill","none").style("stroke","gray").style("stroke-width",3).attr("x1",0).attr("x2",0).attr("y1",function(_){return t.yScale(_)}).attr("y2",function(_){return t.yScale(_)}).transition().ease(d3.easeQuad).duration(r).attr("x2",t.width-(e.left+e.right));m.merge(v).transition().ease(d3.easeQuad).duration(r).attr("x1",0).attr("x2",t.width-(e.left+e.right)).attr("y1",function(_){return t.yScale(_)}).attr("y2",function(_){return t.yScale(_)})}else t.plot.selectAll(".ref-y-line").remove()}function s7(t,e,r){let i=t.map(function(I){return I[r]}),s=t.map(function(I){return I[e]}),a={},d=s.length,m=0,v=0,_=0,x=0,w=0;for(let I=0;I0)return s.length}var a=r?r.clientWidth:this.controller.chart.runtime.totalWidth;return Math.max(Math.floor(a/(this.controller.config.minWidth||200)),1)}hasPanelData(){for(var e=0;e0)return!0;return!1}addLabel(){d3.select(this.element).append("div").attr("class","myIO-facet-label").text(this.facetValue)}renderPanel(){var e=this.buildPanelChart(),r=Ud(e);r.axesChart&&(Vd(e,r),this.applySharedDomains(e)),D0(e),e.dom.svg=e.svg,e.dom.plot=e.plot,e.dom.chartArea=e.chart,r.axesChart&&this.requiresClipPath(r.type)&&(this.setClipPath(e),B0(e,r,{isInitialRender:!0}),this.applyAxisSuppression(e),r4(e,r,{isInitialRender:!0})),this.renderLayers(e,this.layers),this.panelChart=e}buildPanelChart(){var e=this.controller.chart,r=Math.max(this.element.clientWidth||this.controller.config.minWidth||200,1),i=this.buildMargin(),s=Object.assign({},e.config,{layers:this.layers}),a={margin:i,suppressLegend:!0,suppressAxis:{xAxis:this.suppressX,yAxis:this.suppressY},xlim:s.scales.xlim,ylim:s.scales.ylim,categoricalScale:s.scales.categoricalScale,flipAxis:s.scales.flipAxis,colorScheme:s.scales.colorScheme?s.scales.colorScheme.enabled?[s.scales.colorScheme.colors,s.scales.colorScheme.domain,"on"]:[s.scales.colorScheme.colors,s.scales.colorScheme.domain,"off"]:null,xAxisFormat:s.axes.xAxisFormat,yAxisFormat:s.axes.yAxisFormat,toolTipFormat:s.axes.toolTipFormat,xTickLabels:s.axes.xTickLabels,xAxisLabel:s.axes.xAxisLabel,yAxisLabel:s.axes.yAxisLabel,dragPoints:!1,toggleY:null,toolTipOptions:s.interactions.toolTipOptions,transition:{speed:0},referenceLine:s.referenceLines};return{element:this.element,dom:{element:this.element},config:s,derived:{currentLayers:this.layers.slice()},runtime:{totalWidth:r,width:r,height:zh,layout:e.runtime.layout,activeY:e.runtime.activeY,activeYFormat:e.runtime.activeYFormat},options:a,margin:i,width:r,height:zh,totalWidth:r,layout:e.runtime.layout,newY:e.runtime.activeY,newScaleY:e.runtime.activeYFormat,plotLayers:this.layers,emit:function(){},dragPoints:function(){},updateRegression:function(){},syncLegacyAliases:function(){this.xScale=this.derived?this.derived.xScale:null,this.yScale=this.derived?this.derived.yScale:null,this.colorDiscrete=this.derived?this.derived.colorDiscrete:null,this.colorContinuous=this.derived?this.derived.colorContinuous:null,this.x_banded=this.derived?this.derived.xBanded:null,this.y_banded=this.derived?this.derived.yBanded:null,this.x_check=this.derived?this.derived.xCheck:null,this.currentLayers=this.derived?this.derived.currentLayers:null},captureLegacyAliases:function(){}}}buildMargin(){var e=this.controller.chart.config.layout.margin||{},r={top:e.top!=null?e.top:30,right:e.right!=null?e.right:5,bottom:e.bottom!=null?e.bottom:60,left:e.left!=null?e.left:50};return this.suppressX&&(r.bottom=Math.min(r.bottom,12)),this.suppressY&&(r.left=Math.min(r.left,12)),r}applySharedDomains(e){var r=this.controller.globalScaleSnapshot;!r||!e.derived||!e.derived.xScale||!e.derived.yScale||(r.xDomain&&e.derived.xScale.domain(r.xDomain.slice()),r.yDomain&&e.derived.yScale.domain(r.yDomain.slice()),r.xBanded&&(e.derived.xBanded=r.xBanded.slice()),r.yBanded&&(e.derived.yBanded=r.yBanded.slice()),typeof r.xCheck<"u"&&(e.derived.xCheck=r.xCheck),r.colorDiscrete&&(e.derived.colorDiscrete=r.colorDiscrete),r.colorContinuous&&(e.derived.colorContinuous=r.colorContinuous),e.syncLegacyAliases())}requiresClipPath(e){return e!=="donut"&&e!=="gauge"}setClipPath(e){var r=e.height-(e.margin.top+e.margin.bottom);e.dom.clipPath=e.dom.chartArea.append("defs").append("svg:clipPath").attr("id",e.dom.element.id+"clip").append("svg:rect").attr("x",0).attr("y",0).attr("width",e.width-(e.margin.left+e.margin.right)).attr("height",r),e.dom.chartArea.attr("clip-path","url(#"+e.dom.element.id+"clip)"),e.clipPath=e.dom.clipPath}applyAxisSuppression(e){this.suppressX&&e.plot.selectAll(".x-axis").remove(),this.suppressY&&e.plot.selectAll(".y-axis").remove()}renderLayers(e,r){for(var i=0;i1?x+": ":"";e.push(I+_.below+" of "+w+" dots below threshold of "+i+".")})}}}),e}function l7(t){return String(t).replace(/[^a-zA-Z0-9_-]/g,"")}function Rx(t,e){if(!t.dom||!t.dom.chartArea||!e)return null;for(var r=t.dom.chartArea,i=[".tag-"+e.type+"-"+e.id,".tag-"+e.type+"-"+t.dom.element.id+"-"+l7(e.label)],s=0;s0&&e.visibility!==!1})}destroy(){this.chart.dom.svg.on("keydown.a11y",null),this.liveRegion&&this.liveRegion.remove(),clearTimeout(this.debounceTimer)}};var u4=class{constructor(e){this.chart=e,this.tableContainer=null,this.visible=!1}initialize(){this.tableContainer=d3.select(this.chart.dom.element).append("div").attr("class","myIO-data-table myIO-sr-only").attr("role","region").attr("aria-label","Chart data table")}generate(){if(this.tableContainer){this.tableContainer.selectAll("*").remove();for(var e=this.chart.config.layers,r=500,i=new Map,s=[],a=0;ar&&this.tableContainer.append("p").text("Showing first "+r+" of "+w.length+" rows")}}}renderFanTable(e,r){if(!(!e||e.length===0)){var i=e[0],s=i.mapping&&i.mapping.x_var?i.mapping.x_var:"x_var",a=new Map,d=[];e.forEach(function(O){var z=O.options&&O.options.interval_pct;if(z!=null){var J=c7(z);d.push(+z),(Array.isArray(O.data)?O.data:[]).forEach(function(Q){var oe=String(Q[s]);a.has(oe)||a.set(oe,{x_var:Q[s]});var se=a.get(oe);se["low_"+J]=Q[O.mapping.low_y],se["high_"+J]=Q[O.mapping.high_y]})}}),d=Array.from(new Set(d)).sort(function(O,z){return O-z});var m=["x_var"];d.forEach(function(O){var z=c7(O);m.push("low_"+z),m.push("high_"+z)});var v=Array.from(a.values()),_=v.slice(0,r),x=this.tableContainer.append("table").attr("aria-label","Data for "+(i._composite||"fan")),w=x.append("thead").append("tr");m.forEach(function(O){w.append("th").attr("scope","col").text(O)});var I=x.append("tbody");_.forEach(function(O){var z=I.append("tr");m.forEach(function(J){var Q=O[J];z.append("td").text(Q!=null?String(Q):"")})}),v.length>r&&this.tableContainer.append("p").text("Showing first "+r+" of "+v.length+" rows")}}toggle(){this.visible=!this.visible,this.visible?(this.generate(),this.tableContainer.classed("myIO-sr-only",!1),this.chart.dom.svg.attr("aria-hidden","true")):(this.tableContainer.classed("myIO-sr-only",!0),this.chart.dom.svg.attr("aria-hidden",null))}destroy(){this.tableContainer&&this.tableContainer.remove()}};function c7(t){return String(t).replace(/\.0+$/,"").replace(/(\.\d*?)0+$/,"$1")}function Uu(t){return t&&t.config&&Array.isArray(t.config.keyframes)?t.config.keyframes:[]}function z6(t){!t||!t.runtime||(t.runtime.keyframeTimer!==null&&t.runtime.keyframeTimer!==void 0&&clearTimeout(t.runtime.keyframeTimer),t.runtime.keyframeTimer=null)}function u7(t,e){if(!e||!Array.isArray(e.layers)||!t.config||!Array.isArray(t.config.layers))return;let r=Object.create(null);t.config.layers.forEach(function(i){r[i.label]=i}),e.layers.forEach(function(i){i&&Array.isArray(i.data)&&Object.prototype.hasOwnProperty.call(r,i.label)&&(r[i.label].data=i.data)})}function Mx(t,e){let r=Uu(t);if(typeof e=="number"&&Number.isInteger(e)){let i=e-1;return i>=0&&i=e.length-1)}function Wh(t){!t||!t.runtime||(z6(t),t.runtime.keyframePlaying=!1,d4(t))}function f7(t){if(z6(t),!t.runtime.keyframePlaying)return;let e=Number(t.config&&t.config.transitions&&t.config.transitions.speed)||0;t.runtime.keyframeTimer=setTimeout(function(){if(!t.runtime||!t.runtime.keyframePlaying)return;let r=Uu(t),i=t.runtime.keyframeIndex+1;if(i>=r.length){Wh(t);return}Yh(t,i+1,{preservePlayback:!0}),i>=r.length-1?Wh(t):f7(t)},Math.max(0,e)+1e3)}function H6(t,e){let r=document.createElement("button");return r.type="button",r.className="myIO-keyframe-button",r.dataset.keyframeAction=t,r.textContent=e,r}function $x(t){if(Uu(t).length<2||!t.dom||!t.dom.element)return;let r=document.createElement("div");r.className="myIO-keyframe-controls",r.setAttribute("role","group"),r.setAttribute("aria-label","Keyframe playback controls");let i=H6("previous","Previous");i.setAttribute("aria-label","Previous keyframe"),i.addEventListener("click",function(){f4(t,"previous")}),r.appendChild(i);let s=H6("play","Play");s.setAttribute("aria-label","Play keyframes"),s.setAttribute("aria-pressed","false"),s.addEventListener("click",function(){Px(t)}),r.appendChild(s);let a=H6("next","Next");a.setAttribute("aria-label","Next keyframe"),a.addEventListener("click",function(){f4(t,"next")}),r.appendChild(a);let d=document.createElement("span");d.className="myIO-keyframe-label",d.setAttribute("aria-live","polite"),r.appendChild(d),t.dom.element.appendChild(r),t.runtime.keyframeControls=r,d4(t)}function d7(t){if(W6(t),!t||!t.runtime)return;let e=Uu(t);t.runtime.keyframeIndex=0,t.runtime.keyframePlaying=!1,t.runtime.keyframeTimer=null,t.runtime.keyframeControls=null,e.length!==0&&(u7(t,e[0]),$x(t))}function Yh(t,e,r){if(!t||!t.runtime)return!1;let i=Mx(t,e);if(i<0)return!1;r&&r.preservePlayback===!0||Wh(t),t.runtime.keyframeIndex=i;let a=Uu(t)[i];return typeof t.updateData=="function"?t.updateData(a.layers||[]):u7(t,a),d4(t),!0}function f4(t,e){if(!t||!t.runtime)return!1;Wh(t);let r=Uu(t);if(r.length===0)return!1;let i=e==="previous"?-1:e==="next"?1:0;if(i===0)return!1;let s=Math.max(0,Math.min(r.length-1,(t.runtime.keyframeIndex||0)+i));return Yh(t,s+1)}function Px(t){return!t||!t.runtime||Uu(t).length<2?!1:t.runtime.keyframePlaying?(Wh(t),!1):(t.runtime.keyframeIndex>=Uu(t).length-1&&Yh(t,1),t.runtime.keyframePlaying=!0,d4(t),f7(t),!0)}function W6(t){if(!t||!t.runtime)return;z6(t),t.runtime.keyframePlaying=!1;let e=t.runtime.keyframeControls||t.dom&&t.dom.element&&t.dom.element.querySelector(".myIO-keyframe-controls");e&&e.parentNode&&e.parentNode.removeChild(e),t.runtime.keyframeControls=null}var Y6=280,Ux=100,Vx={on(t,e){return this._listeners=this._listeners||{},this._listeners[t]=this._listeners[t]||[],this._listeners[t].push(e),this},off(t,e){return!this._listeners||!this._listeners[t]?this:(this._listeners[t]=e?this._listeners[t].filter(function(r){return r!==e}):[],this)},emit(t,e){return!this._listeners||!this._listeners[t]?this:(this._listeners[t].forEach(function(r){r(e)}),this)}},h4=class{constructor(e){Object.assign(this,Vx),this._listeners={},this.config=e.config,this.dom={element:e.element},this.derived={},this.runtime={renderGen:0,resizeTimer:null,width:Math.max(e.width,Y6),height:e.height,totalWidth:Math.max(e.width,Y6),layout:"grouped",activeY:null,activeYFormat:null,tooltipHideTimer:null},this.config.sparkline&&this.applySparklineOverrides(),window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(this.config.transitions.speed=0),this.runtime.width=this.runtime.totalWidth,this.syncLegacyAliases(),this.draw()}syncLegacyAliases(){this.element=this.dom?this.dom.element:null,this.svg=this.dom?this.dom.svg:null,this.plot=this.dom?this.dom.plot:null,this.chart=this.dom?this.dom.chartArea:null,this.legendArea=this.dom?this.dom.legendArea:null,this.clipPath=this.dom?this.dom.clipPath:null,this.tooltip=this.dom?this.dom.tooltip:null,this.toolTipTitle=this.dom?this.dom.tooltipTitle:null,this.toolTipBody=this.dom?this.dom.tooltipBody:null,this.plotLayers=this.config?this.config.layers:null,this.options=this.config?{margin:this.config.layout.margin,suppressLegend:this.config.layout.suppressLegend,suppressAxis:this.config.layout.suppressAxis,xlim:this.config.scales.xlim,ylim:this.config.scales.ylim,categoricalScale:this.config.scales.categoricalScale,flipAxis:this.config.scales.flipAxis,colorScheme:this.config.scales.colorScheme?this.config.scales.colorScheme.enabled?[this.config.scales.colorScheme.colors,this.config.scales.colorScheme.domain,"on"]:[this.config.scales.colorScheme.colors,this.config.scales.colorScheme.domain,"off"]:null,xAxisFormat:this.config.axes.xAxisFormat,yAxisFormat:this.config.axes.yAxisFormat,toolTipFormat:this.config.axes.toolTipFormat,xTickLabels:this.config.axes.xTickLabels,xAxisLabel:this.config.axes.xAxisLabel,yAxisLabel:this.config.axes.yAxisLabel,dragPoints:this.config.interactions.dragPoints,toggleY:this.config.interactions.toggleY&&this.config.interactions.toggleY.variable?[this.config.interactions.toggleY.variable,this.config.interactions.toggleY.format]:null,toolTipOptions:this.config.interactions.toolTipOptions,transition:this.config.transitions,referenceLine:this.config.referenceLines}:null,this.margin=this.config?this.config.layout.margin:null,this.width=this.runtime?this.runtime.width:null,this.height=this.runtime?this.runtime.height:null,this.totalWidth=this.runtime?this.runtime.totalWidth:null,this.layout=this.runtime?this.runtime.layout:null,this.newY=this.runtime?this.runtime.activeY:null,this.newScaleY=this.runtime?this.runtime.activeYFormat:null,this.toolLine=this.runtime?this.runtime.toolLine:null,this.toolTipBox=this.runtime?this.runtime.toolTipBox:null,this.toolPointLayer=this.runtime?this.runtime.toolPointLayer:null,this.xScale=this.derived?this.derived.xScale:null,this.yScale=this.derived?this.derived.yScale:null,this.colorDiscrete=this.derived?this.derived.colorDiscrete:null,this.colorContinuous=this.derived?this.derived.colorContinuous:null,this.x_banded=this.derived?this.derived.xBanded:null,this.y_banded=this.derived?this.derived.yBanded:null,this.x_check=this.derived?this.derived.xCheck:null,this.currentLayers=this.derived?this.derived.currentLayers:null,this.layerIndex=this.derived?this.derived.layerIndex:null}captureLegacyAliases(){!this.dom||!this.runtime||!this.derived||(this.dom.svg=this.svg||this.dom.svg,this.dom.plot=this.plot||this.dom.plot,this.dom.chartArea=this.chart||this.dom.chartArea,this.dom.legendArea=this.legendArea||this.dom.legendArea,this.dom.clipPath=this.clipPath||this.dom.clipPath,this.dom.tooltip=this.tooltip||this.dom.tooltip,this.dom.tooltipTitle=this.toolTipTitle||this.dom.tooltipTitle,this.dom.tooltipBody=this.toolTipBody||this.dom.tooltipBody,this.runtime.layout=this.layout||this.runtime.layout,this.runtime.activeY=this.newY||this.runtime.activeY,this.runtime.activeYFormat=this.newScaleY||this.runtime.activeYFormat,this.runtime.toolLine=this.toolLine||this.runtime.toolLine,this.runtime.toolTipBox=this.toolTipBox||this.runtime.toolTipBox,this.runtime.toolPointLayer=this.toolPointLayer||this.runtime.toolPointLayer,this.derived.xScale=this.xScale||this.derived.xScale,this.derived.yScale=this.yScale||this.derived.yScale,this.derived.colorDiscrete=this.colorDiscrete||this.derived.colorDiscrete,this.derived.colorContinuous=this.colorContinuous||this.derived.colorContinuous,this.derived.xBanded=this.x_banded||this.derived.xBanded,this.derived.yBanded=this.y_banded||this.derived.yBanded,this.derived.xCheck=this.x_check||this.derived.xCheck,this.derived.currentLayers=this.currentLayers||this.derived.currentLayers,this.derived.layerIndex=this.layerIndex||this.derived.layerIndex,this.syncLegacyAliases())}draw(){D0(this),this.captureLegacyAliases(),this.initialize()}initialize(){this.derived.currentLayers=this.config.layers,this.syncLegacyAliases(),this.themeManager=new n4(this.dom.element,this.config),this.themeManager.initialize(),Ky(this),this.config.sparkline||(this.keyboardNav=new c4(this),this.keyboardNav.initialize(),this.dataTable=new u4(this),this.dataTable.initialize(),l4(this)),d7(this),this.derived.currentLayers=this.config.layers,this.syncLegacyAliases(),this.captureLegacyAliases(),this.derived.currentLayers.length>0&&this.setClipPath(this.derived.currentLayers[0].type),this.renderCurrentLayers({isInitialRender:!0})}applySparklineOverrides(){this.config.layout.margin={top:1,right:1,bottom:1,left:1},this.config.layout.suppressLegend=!0,this.config.layout.suppressAxis={xAxis:!0,yAxis:!0},this.config.interactions.brush&&(this.config.interactions.brush.enabled=!1),this.config.interactions.annotation&&(this.config.interactions.annotation.enabled=!1),this.config.interactions.linked&&(this.config.interactions.linked.enabled=!1),this.config.interactions.sliders=[],this.config.interactions.dragPoints=!1,this.config.referenceLines={x:null,y:null},this.dom.element.dataset.sparkline="true"}renderCurrentLayers(e){let r=e||{},i=++this.runtime.renderGen,s=()=>this.runtime&&this.runtime.renderGen===i;if(this.config.facet&&this.config.facet.enabled){this.facetController||(this.facetController=new s4(this)),this.facetController.initialize();return}else this.facetController&&(this.facetController.destroy(),this.facetController=null);try{if(this.dom.chartArea){this.dom.chartArea.selectAll("*").interrupt();var a=this.derived.currentLayers.map(function(_){return _.label}),d=this.config.layers.map(function(_){return _.label}),m=this.dom.chartArea;d.forEach(function(_){if(a.indexOf(_)===-1){var x=String(_).replace(/\s+/g,"");m.selectAll("[class*='tag-'][class*='-"+x+"']").remove()}})}if(this.emit("beforeRender",{options:r}),R0(this),this.derived.currentLayers=t4(this),this.syncLegacyAliases(),this.clearEmptyState(),!s())return;if(this.derived.currentLayers.length===0){this.renderEmptyState(),this.config.sparkline||l4(this);return}let v=Ud(this);if(Vd(this,v),this.syncLegacyAliases(),!s())return;D6(this),this.emit("afterScales",{state:v}),B0(this,v,r),this.routeLayers(this.derived.currentLayers),r4(this,v,r),Ly(this,v),Zy(this),J0(this),this.config.interactions.brush&&this.config.interactions.brush.enabled&&Fy(this),this.config.interactions.annotation&&this.config.interactions.annotation.enabled&&Uy(this),this.config.interactions.linked&&this.config.interactions.linked.enabled&&Wy(this),this.config.interactions.linked&&this.config.interactions.linked.cursor===!0&&jy(this),this.config.interactions.sliders&&this.config.interactions.sliders.length>0&&Xy(this),this.emit("afterRender",{state:v}),this.config.sparkline||l4(this)}catch(v){throw console.warn("[myIO] Render error:",v.message),this.emit("error",{message:v.message,error:v}),v}}clearEmptyState(){this.dom&&this.dom.svg&&this.dom.svg.selectAll(".myIO-empty-state").remove(),this.dom&&this.dom.element&&d3.select(this.dom.element).select(".myIO-fab").style("display",null)}renderEmptyState(){this.dom.chartArea&&this.dom.chartArea.selectAll("*").interrupt().remove(),this.dom.plot&&(this.dom.plot.selectAll(".x-axis, .y-axis").interrupt().remove(),this.dom.plot.selectAll(".ref-x-line, .ref-y-line").remove()),$d(this),Pu(this),this.runtime&&this.runtime._sheetOpen&&$u(this,{returnFocus:!1}),this.dom.element&&d3.select(this.dom.element).select(".myIO-fab").style("display","none"),this.dom.svg&&(this.dom.svg.selectAll(".myIO-empty-state").remove(),this.dom.svg.append("text").attr("class","myIO-empty-state").attr("x",this.runtime.totalWidth/2).attr("y",this.runtime.height/2).text("No data to display"))}addButtons(){D6(this)}toggleVarY(e){this.runtime.activeY=e[0],this.runtime.activeYFormat=e[1],this.syncLegacyAliases(),this.renderCurrentLayers()}toggleGroupedLayout(e){var r=$0(e,this),i=e.map(function(a){return a.color}),s=(this.runtime.width-(this.config.layout.margin.right+this.config.layout.margin.left))/(r[0].length+1)/i.length;this.runtime.layout==="stacked"?(F0(this,r,i,s),this.runtime.layout="grouped"):(M0(this,r,i,s),this.runtime.layout="stacked"),this.syncLegacyAliases()}setClipPath(e){switch(e){case"donut":case"gauge":break;default:var r=s1(this);this.dom.clipPath=this.dom.chartArea.append("defs").append("svg:clipPath").attr("id",this.dom.element.id+"clip").append("svg:rect").attr("x",0).attr("y",0).attr("width",this.runtime.width-(this.config.layout.margin.left+this.config.layout.margin.right)).attr("height",r-(this.config.layout.margin.top+this.config.layout.margin.bottom)),this.dom.chartArea.attr("clip-path","url(#"+this.dom.element.id+"clip)"),this.syncLegacyAliases()}}routeLayers(e){var r=this;this.derived.layerIndex=this.config.layers.map(function(i){return i.label}),this.syncLegacyAliases(),e.forEach(function(i){var s=pl(i);if(s&&typeof s.render=="function"){s.render(r,i,e),r.captureLegacyAliases();var a=i.options&&i.options.opacity!=null?i.options.opacity:1;if(a<1){var d=String(i.label).replace(/\s+/g,"");r.dom.chartArea.selectAll("[class*='tag-'][class*='-"+d+"']").style("opacity",a)}}})}removeLayers(e){e.forEach(r=>{Ry().forEach(function(i){typeof i.remove=="function"?i.remove(this,{label:r}):["line","bar","point","regression-line","hexbin","area","crosshairY","crosshairX"].forEach(function(s){d3.selectAll("."+_r(s,this.dom.element.id,r)).transition().duration(500).style("opacity",0).remove()},this)},this)})}dragPoints(e){By(this,e)}updateOrdinalColorLegend(e){gd(this,e)}updateRegression(e,r){let i=(this.config.layers||[]).find(function(s){return s.label===r&&s.type==="point"});i&&(this.config.layers||[]).forEach(function(s){if(s.type!=="line"||s.transform!=="lm"||!s.mapping||!i.mapping||s.mapping.x_var!==i.mapping.x_var||s.mapping.y_var!==i.mapping.y_var)return;let a=s7(i.data,i.mapping.y_var,i.mapping.x_var),d=i.data.map(function(m){return{...m,[s.mapping.y_var]:a.fn(m[s.mapping.x_var])}}).sort(function(m,v){return m[s.mapping.x_var]-v[s.mapping.x_var]});s.data=d,B6("line").render(this,{...s,color:e||s.color},this.config.layers)},this)}updateChart(e){let r=this.derived.layerIndex||[];this.config=e,this.derived.currentLayers=this.config.layers,this.syncLegacyAliases();let i=this.config.layers.map(function(a){return a.label}),s=r.filter(function(a){return!i.includes(a)});this.removeLayers(s),this.renderCurrentLayers()}updateData(e){if(!Array.isArray(e)||!this.config||!Array.isArray(this.config.layers))return;let r=Object.create(null);this.config.layers.forEach(function(i){r[i.label]=i}),e.forEach(function(i){i&&Object.prototype.hasOwnProperty.call(r,i.label)&&Array.isArray(i.data)&&(r[i.label].data=i.data)}),this.syncLegacyAliases(),this.renderCurrentLayers()}resize(e,r){if(!e||!r||e<2||r<2)return;let i=this.runtime&&this.runtime._sheetOpen===!0;i&&$u(this,{returnFocus:!1}),this.runtime.totalWidth=Math.max(e,Y6),this.runtime.width=this.runtime.totalWidth,this.runtime.height=r,this.syncLegacyAliases(),clearTimeout(this.runtime.resizeTimer),this.runtime.resizeTimer=setTimeout(()=>{ry(this),this.captureLegacyAliases(),this.renderCurrentLayers(),i&&this.derived&&this.derived.currentLayers&&this.derived.currentLayers.length>0&&z0(this),this.emit("resize",{width:this.runtime.width,height:this.runtime.height})},Ux)}destroy(){this.emit("destroy",{}),W6(this),clearTimeout(this.runtime&&this.runtime.resizeTimer),clearTimeout(this.runtime&&this.runtime.tooltipHideTimer),this.facetController&&(this.facetController.destroy(),this.facetController=null),this.keyboardNav&&this.keyboardNav.destroy(),this.dataTable&&this.dataTable.destroy(),this.themeManager&&this.themeManager.destroy(),this.runtime&&this.runtime._sheetOpen&&$u(this,{returnFocus:!1}),clearTimeout(this.runtime&&this.runtime._sheetCloseTimer),J0(this),Vy(this),U6(this),V6(this),this.dom&&this.dom.element&&d3.select(this.dom.element).on("keydown.brush",null),this.dom&&this.dom.chartArea&&this.dom.chartArea.selectAll("*").interrupt(),this.dom&&this.dom.svg&&this.dom.svg.remove(),this.dom&&this.dom.tooltip&&this.dom.tooltip.remove(),this.dom&&this.dom.element&&d3.select(this.dom.element).selectAll(".myIO-fab, .myIO-panel, .myIO-sheet-backdrop").remove(),$d(this),this._listeners={},this.config=null,this.derived=null,this.dom=null,this.runtime=null}};var p4=class{constructor({max:e=128}={}){this.max=e,this.lru=new Map,this.inflight=new Map}get(e){if(!this.lru.has(e))return;let r=this.lru.get(e);return this.lru.delete(e),this.lru.set(e,r),r}set(e,r){for(this.lru.has(e)&&this.lru.delete(e),this.lru.set(e,r);this.lru.size>this.max;){let i=this.lru.keys().next().value;this.lru.delete(i)}}delete(e){this.lru.delete(e)}clear(){this.lru.clear(),this.inflight.clear()}size(){return this.lru.size}inflightOrStore(e,r){if(this.inflight.has(e))return this.inflight.get(e);let i=r();return this.inflight.set(e,i),i}resolveInflight(e,r){this.set(e,r),this.inflight.delete(e)}rejectInflight(e){this.inflight.delete(e)}};var m4=class{constructor(){this.sources=new Map}register(e){if(!e||typeof e.sourceId!="string")throw new Error("SourceRegistry.register: entry must have sourceId");e.mode!=="none"&&this.sources.set(e.sourceId,e)}unregister(e){this.sources.delete(e)}get(e){return this.sources.get(e)}has(e){return this.sources.has(e)}all(){return Array.from(this.sources.values())}clear(){this.sources.clear()}};var g4=class{constructor(e={}){}async init(e={}){}async cancel(e){}async close(){}async applyPredicateCache(e,r){}async*query({queryId:e}){yield{__trailer:!0,queryId:e,rowCount:0,elapsedMs:0}}};function y4(t){if(typeof Uint8Array.fromBase64=="function")return Uint8Array.fromBase64(t);let e=atob(t),r=e.length,i=new Uint8Array(r);for(let s=0;s(f9(),u9)),Promise.resolve().then(()=>N0(d9()))]),s=i.default||i;for(let a of e.all()){if(a.mode!=="inline_ipc"||!a.ipcB64)continue;let d=y4(a.ipcB64),m=r.tableFromIPC(d),v=m.toArray().map(_=>Object.assign({},_));s.tables[a.sourceId]={data:v},this.sources.set(a.sourceId,{table:m,rows:v})}this._alasql=s}async*query({sql:e,params:r=[],queryId:i,signal:s}){if(this._closed)throw Object.assign(new Error("engine-gone"),{queryId:i,code:"engine-gone"});if(s&&s.aborted)throw Object.assign(new Error("cancelled"),{queryId:i,code:"cancelled"});let a=Date.now(),d;try{d=this._alasql.exec(e,r)}catch(m){throw Object.assign(new Error(m.message||String(m)),{queryId:i,code:"syntax"})}yield{rows:d,queryId:i},yield{__trailer:!0,queryId:i,rowCount:Array.isArray(d)?d.length:0,elapsedMs:Date.now()-a}}async cancel(e){}async applyPredicateCache(e,r){}async close(){if(this._alasql)for(let e of this.sources.keys())delete this._alasql.tables[e];this.sources.clear(),this._closed=!0}};var Jm=class{constructor(e={}){this.config=e,this.pending=new Map,this.batchWindow=e&&e.shiny_batch_window||4,this._handlersRegistered=!1}async init({sourceRegistry:e}={}){if(typeof Shiny>"u")throw Object.assign(new Error("Shiny is not available in this context"),{code:"engine-gone"});if(this._handlersRegistered)return;let r=a=>this._route("batch",a),i=a=>this._route("end",a),s=a=>this._route("error",a);Shiny.addCustomMessageHandler("myio:batch",r),Shiny.addCustomMessageHandler("myio:end",i),Shiny.addCustomMessageHandler("myio:error",s),this._handlersRegistered=!0}_route(e,r){let i=this.pending.get(r.queryId);i&&(e==="batch"?(i.push(r),Shiny.setInputValue("myio_ack",{v:1,queryId:r.queryId,seq:r.seq},{priority:"event"})):e==="end"?(i.push({__trailer:!0,queryId:r.queryId,rowCount:r.rowCount,elapsedMs:r.elapsedMs}),i.end()):e==="error"&&i.error(Object.assign(new Error(r.message||"engine error"),{queryId:r.queryId,code:r.code||"engine-gone"})))}query({sql:e,params:r=[],queryId:i,signal:s,templateId:a,sourceId:d,bindings:m,predicateHash:v,limit:_}){if(typeof Shiny>"u")throw Object.assign(new Error("Shiny not available"),{queryId:i,code:"engine-gone"});let x=[],w=[],I=!1,O=null,z=re=>{w.length?w.shift()({value:re,done:!1}):x.push(re)},J=()=>{for(I=!0;w.length;)w.shift()({value:void 0,done:!0})},Q=re=>{for(O=re;w.length;)w.shift()({value:void 0,done:!0})};this.pending.set(i,{push:z,end:J,error:Q,seqBudget:this.batchWindow});let oe=null;s&&(oe=()=>{Shiny.setInputValue("myio_cancel",{v:1,queryId:i},{priority:"event"}),Q(Object.assign(new Error("cancelled"),{queryId:i,code:"cancelled"}))},s.aborted?oe():s.addEventListener("abort",oe)),O||Shiny.setInputValue("myio_query",{v:1,queryId:i,templateId:a||null,sourceId:d||null,predicateHash:v||null,bindings:m||{},limit:_||null,_debugSql:e},{priority:"event"});let se=this.pending;return(async function*(){try{for(;;){if(O)throw O;if(x.length){yield x.shift();continue}if(I)return;let re=await new Promise(q=>w.push(q));if(re.done){if(O)throw O;return}yield re.value}}finally{s&&oe&&s.removeEventListener("abort",oe),se.delete(i)}})()}async cancel(e){typeof Shiny<"u"&&Shiny.setInputValue("myio_cancel",{v:1,queryId:e},{priority:"event"});let r=this.pending.get(e);r&&r.error(Object.assign(new Error("cancelled"),{queryId:e,code:"cancelled"}))}async applyPredicateCache(e,r){}async close(){for(let[,e]of this.pending)e.error(Object.assign(new Error("engine closed"),{code:"engine-gone"}));this.pending.clear()}};var Km=class{constructor(e={}){this.config=e,this.cacheUrl=e.duckdb_wasm&&e.duckdb_wasm.cache_url||null,this.workerUrl=e.duckdb_wasm&&e.duckdb_wasm.worker_url||null,this.db=null,this.conn=null,this._duckdb=null,this._closed=!1}async init({sourceRegistry:e}={}){if(this._closed)throw Object.assign(new Error("engine-gone"),{code:"engine-gone"});if(!this.cacheUrl||!this.workerUrl)throw Object.assign(new Error("WasmEngineAdapter: duckdb_wasm cache_url / worker_url not set. Ensure myIO::install_duckdb_wasm() has run."),{code:"engine-gone"});let r=this.cacheUrl.replace(/\/?$/,"/")+"duckdb-browser.mjs",i;try{i=await import(r)}catch(m){throw Object.assign(new Error("WasmEngineAdapter: failed to import duckdb-wasm loader from "+r+": "+(m?.message||m)),{code:"engine-gone"})}this._duckdb=i;let s=new Worker(this.workerUrl),a=this.cacheUrl.replace(/\/?$/,"/")+"duckdb-mvp.wasm",d=new i.ConsoleLogger;if(this.db=new i.AsyncDuckDB(d,s),await this.db.instantiate(a),this.conn=await this.db.connect(),e)for(let m of e.all())await this._registerSource(m)}async _registerSource(e){if(!this._duckdb)return;let r=this._duckdb.DuckDBDataProtocol;if(e.mode==="inline_ipc"&&e.ipcB64){let i=y4(e.ipcB64),s=e.sourceId+".arrow";await this.db.registerFileBuffer(s,i),await this.conn.query('CREATE OR REPLACE VIEW "'+e.sourceId.replace(/"/g,'""')+`" AS SELECT * FROM read_arrow('`+s+"');")}else if(e.mode==="url"&&e.url){let i=e.sourceId+(/\.parquet$/i.test(e.url)?".parquet":/\.arrow$/i.test(e.url)?".arrow":/\.feather$/i.test(e.url)?".feather":".csv");await this.db.registerFileURL(i,e.url,r.HTTP,!1);let s=/\.parquet$/i.test(e.url)?"read_parquet":/\.arrow$/i.test(e.url)||/\.feather$/i.test(e.url)?"read_arrow":"read_csv_auto";await this.conn.query('CREATE OR REPLACE VIEW "'+e.sourceId.replace(/"/g,'""')+'" AS SELECT * FROM '+s+"('"+i+"');")}}async*query({sql:e,params:r=[],queryId:i,signal:s}){if(this._closed)throw Object.assign(new Error("engine-gone"),{queryId:i,code:"engine-gone"});if(s&&s.aborted)throw Object.assign(new Error("cancelled"),{queryId:i,code:"cancelled"});let a=Date.now(),d,m=null;try{d=await this.conn.send(e)}catch(_){throw Object.assign(new Error(_?.message||String(_)),{queryId:i,code:"syntax"})}s&&(m=()=>{this.conn&&this.conn.cancelSent().catch(()=>{})},s.addEventListener("abort",m));let v=0;try{for(;;){if(s&&s.aborted){try{await this.conn.cancelSent()}catch{}throw Object.assign(new Error("cancelled"),{queryId:i,code:"cancelled"})}let{done:_,value:x}=await d.next();if(_)break;x&&(v+=x.numRows||0,yield{batch:x,queryId:i})}}finally{s&&m&&s.removeEventListener("abort",m);try{await d.return()}catch{}}yield{__trailer:!0,queryId:i,rowCount:v,elapsedMs:Date.now()-a}}async cancel(e){if(this.conn)try{await this.conn.cancelSent()}catch{}}async applyPredicateCache(e,r){}async close(){if(this._closed=!0,this.conn){try{await this.conn.close()}catch{}this.conn=null}if(this.db){try{await this.db.terminate()}catch{}this.db=null}}};function Qm(t,e={}){switch(t){case"svg":return new g4(e);case"memory":return new Xm(e);case"wasm":return new Km(e);case"server":return new Jm(e);default:throw new Error("createEngine: unknown engine '"+t+"'")}}var Zp=class{constructor({config:e}){this.config=e||{},this.cache=new p4({max:128}),this.sourceRegistry=new m4,this.charts=new Map,this.selectionStore=new Map,this.adapters=new Map,this._adapterInits=new Map,this._inflightControllers=new Map,this._debouncers=new Map}ensureAdapterFor(e,r,i){if(this.adapters.has(e))return Promise.resolve(this.adapters.get(e));if(this._adapterInits.has(e))return this._adapterInits.get(e);let s=Qm(r,i),a=s.init({sourceRegistry:this.sourceRegistry}).then(()=>(this.adapters.set(e,s),this._adapterInits.delete(e),s)).catch(d=>{throw this._adapterInits.delete(e),d});return this._adapterInits.set(e,a),a}registerSource(e){this.sourceRegistry.register(e)}register({chartId:e,queryTemplate:r,markSpec:i,sourceHandle:s,predicateFn:a,onResult:d}){this.charts.set(e,{chartId:e,queryTemplate:r,markSpec:i,sourceHandle:s,predicateFn:a,currentPredicate:null,onResult:d}),this.selectionStore.has(s.sourceId)||this.selectionStore.set(s.sourceId,new Map),r&&String(r).trim()&&d&&setTimeout(()=>this._dispatch(e,{preview:!1}),0)}unregister(e){let r=this.charts.get(e);if(!r)return;this.charts.delete(e);let i=this._inflightControllers.get(e);i&&(i.abort(),this._inflightControllers.delete(e));let s=r.sourceHandle.sourceId,a=this.selectionStore.get(s);a&&a.delete(e);let d=this._debouncers.get(e);if(d&&(d.preview&&clearTimeout(d.preview),d.final&&clearTimeout(d.final),this._debouncers.delete(e)),[...this.charts.values()].filter(v=>v.sourceHandle.sourceId===s).length===0){let v=this.adapters.get(s);v&&(v.close().catch(()=>{}),this.adapters.delete(s)),this._adapterInits.delete(s),this.selectionStore.delete(s)}}setSelection({chartId:e,predicate:r}){let i=this.charts.get(e);if(!i)return;let s=i.sourceHandle.sourceId,a=this.selectionStore.get(s);a||(a=new Map,this.selectionStore.set(s,a)),r==null?a.delete(e):a.set(e,r),i.currentPredicate=r;for(let d of this.charts.values())d.chartId!==e&&d.sourceHandle.sourceId===s&&this._scheduleDispatch(d.chartId);if(this._subscribers){let d=this._subscribers.get(i.sourceHandle.sourceId);if(d)for(let m of d)try{m({chartId:e,predicate:r})}catch(v){console.error("[myIO coordinator] subscriber error:",v)}}}subscribe(e,r){return this._subscribers||(this._subscribers=new Map),this._subscribers.has(e)||this._subscribers.set(e,new Set),this._subscribers.get(e).add(r),()=>{let i=this._subscribers.get(e);i&&i.delete(r)}}_scheduleDispatch(e){let r=this._debouncers.get(e);r||(r={preview:null,final:null},this._debouncers.set(e,r)),r.preview&&clearTimeout(r.preview),r.final&&clearTimeout(r.final),r.preview=setTimeout(()=>this._dispatch(e,{preview:!0}),50),r.final=setTimeout(()=>this._dispatch(e,{preview:!1}),200)}async _dispatch(e,{preview:r=!1}={}){let i=this.charts.get(e);if(!i||!i.onResult||!i.queryTemplate||!String(i.queryTemplate).trim())return;let s=i.sourceHandle.sourceId,a=this._composeOthersPredicate(e,s),d=this._substituteTemplate(i.queryTemplate,{where:a,limit:r?1e3:1e5}),m=await this._hash(a),v=i.sourceHandle.engine||this.config.engine,_=await this._hash(d+""+m+""+v),x=this.cache.get(_);if(x){this._deliverToRenderer(e,x);return}let w=this.adapters.get(s);try{if(!w&&v&&(w=await this.ensureAdapterFor(s,v,this.config)),!this.charts.has(e)||!w)return;typeof w.applyPredicateCache=="function"&&await w.applyPredicateCache(m,a)}catch(J){if(!this.charts.has(e))return;console.error("[myIO coordinator]",e,J?.code,J?.message||J),this._deliverToRenderer(e,{batches:[],trailer:{error:J?.message||String(J),code:J?.code||"engine_error"}});return}let I="q_"+Math.random().toString(36).slice(2,10),O=null;if(!this.cache.inflight.has(_)){let J=this._inflightControllers.get(e);J&&J.abort(),O=new AbortController,this._inflightControllers.set(e,O)}let z=this.cache.inflightOrStore(_,()=>(async()=>{let J=[],Q=null;for await(let oe of w.query({sql:d,params:[],queryId:I,sourceId:s,limit:r?1e3:1e5,signal:O.signal}))oe.__trailer?Q=oe:J.push(oe);return{batches:J,trailer:Q}})());try{let J=await z,Q=this._inflightControllers.get(e);if(O&&Q===O&&this._inflightControllers.delete(e),O&&O.signal.aborted){this.cache.rejectInflight(_);return}if(this.cache.resolveInflight(_,J),!this.charts.has(e))return;this._deliverToRenderer(e,J)}catch(J){this.cache.rejectInflight(_);let Q=this._inflightControllers.get(e);if(O&&Q===O&&this._inflightControllers.delete(e),O&&O.signal.aborted)return;console.error("[myIO coordinator]",e,J?.code,J?.message||J),this._deliverToRenderer(e,{batches:[],trailer:{error:J?.message||String(J),code:J?.code||"query_error"}})}}_composeOthersPredicate(e,r){let s=[...(this.selectionStore.get(r)||new Map).entries()].filter(([a])=>a!==e).map(([,a])=>a).filter(Boolean);return s.length?"("+s.join(") AND (")+")":"TRUE"}_substituteTemplate(e,{where:r,limit:i}){return e.replace(/\{\{\s*where\s*\}\}/g,r).replace(/\{\{\s*limit\s*\}\}/g,String(i)).replace(/\$where\b/g,r).replace(/\$limit\b/g,String(i))}async _hash(e){if(typeof crypto<"u"&&crypto.subtle){let i=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-1",i);return Array.from(new Uint8Array(s,0,8)).map(a=>a.toString(16).padStart(2,"0")).join("")}let r=2166136261;for(let i=0;i>>0).toString(16).padStart(8,"0")}_deliverToRenderer(e,{batches:r,trailer:i}){let s=this.charts.get(e);if(!(!s||!s.onResult))try{s.onResult({batches:r,trailer:i,markSpec:s.markSpec})}catch(a){console.error("[myIO coordinator] renderer error for",e,a)}}onChartResult(e,r){let i=this.charts.get(e);i&&(i.onResult=r)}async close(){for(let e of this._debouncers.values())e.preview&&clearTimeout(e.preview),e.final&&clearTimeout(e.final);for(let[,e]of this.adapters)await e.close().catch(()=>{});this.adapters.clear();for(let e of this._inflightControllers.values())e.abort();this._adapterInits.clear(),this._inflightControllers.clear(),this.charts.clear(),this.selectionStore.clear(),this.sourceRegistry.clear(),this.cache.clear(),this._debouncers.clear()}};function h9(t){return globalThis.__myioCoordinator||(globalThis.__myioCoordinator=new Zp({config:t})),globalThis.__myioCoordinator}var dw=new Set(["scatter","line","area"]),hw=150;function e0(t){let e=Number(t);return Number.isFinite(e)?e:null}function pw(t){if(t==="Inf"||t==="Infinity"||t===1/0)return 1/0;let e=Number(t);return Number.isFinite(e)&&e>0?e:5e4}function ug({markSpec:t,rowCount:e,threshold:r}){let i=t&&t.kind;if(!dw.has(i))return!1;let s=pw(r);if(!Number.isFinite(s))return!1;let a=Number(e);return Number.isFinite(a)&&a>=s}function mw(t,e){let r={};return["x","y","category","color","value","baseline"].forEach(i=>{let s=t.getChild?t.getChild(i):null;s&&(r[i]=s.get(e))}),r}function p9(t){if(!t)return[];if(typeof t.toArray=="function")return t.toArray().map(e=>Object.assign({},e));if(typeof t.getChild=="function"){let e=t.getChild("x"),r=t.numRows||t.length||(e?e.length:0),i=new Array(r);for(let s=0;s{r&&(Array.isArray(r)?e.push(...r):Array.isArray(r.rows)?e.push(...r.rows):r.batch?e.push(...p9(r.batch)):(typeof r.getChild=="function"||typeof r.toArray=="function")&&e.push(...p9(r)))}),e.map(r=>({...r,x:e0(r.x),y:e0(r.y),category:r.category==null?void 0:e0(r.category),color:r.color==null?void 0:r.color,value:r.value==null?void 0:e0(r.value),baseline:r.baseline==null?void 0:e0(r.baseline)})).filter(r=>r.x!=null&&r.y!=null)}function gw(t){let e=t.margin||t.config&&t.config.layout&&t.config.layout.margin||{top:0,right:0,bottom:0,left:0},r=Math.max(0,(t.width||t.runtime?.width||0)-e.left-e.right),i=Math.max(0,(t.height||t.runtime?.height||0)-e.top-e.bottom);return{left:e.left,top:e.top,width:r,height:i}}function yw(t){let e=t.dom?.element||t.element,r=t.dom?.svg?.node?t.dom.svg.node():e.querySelector("svg"),i=document.createElement("div");i.className="myIO-webgl-overlay",i.style.position="absolute",i.style.pointerEvents="none",i.style.overflow="hidden",i.style.zIndex="0";let s=document.createElement("div");return s.className="myIO-webgl-loading",s.textContent="Loading data...",s.style.position="absolute",s.style.left="50%",s.style.top="50%",s.style.transform="translate(-50%, -50%)",s.style.font="12px sans-serif",s.style.color="#666",s.style.background="rgba(255,255,255,0.85)",s.style.padding="6px 8px",s.style.border="1px solid rgba(0,0,0,0.12)",i.appendChild(s),r&&r.parentNode===e?e.insertBefore(i,r):e.appendChild(i),cg(t,i),i}function cg(t,e){let r=gw(t);return e.style.left=r.left+"px",e.style.top=r.top+"px",e.style.width=r.width+"px",e.style.height=r.height+"px",r}function t0(t,e,r){t&&typeof t.emit=="function"&&t.emit(e,r)}function bw(t,e,r){let i=t.querySelector(".myIO-webgl-loading,.myIO-webgl-empty");if(!r){i&&i.remove();return}let s=i||document.createElement("div");s.className=e,s.textContent=r,s.style.position="absolute",s.style.left="50%",s.style.top="50%",s.style.transform="translate(-50%, -50%)",s.style.font="12px sans-serif",s.style.color="#666",s.style.background="rgba(255,255,255,0.85)",s.style.padding="6px 8px",s.style.border="1px solid rgba(0,0,0,0.12)",s.parentNode||t.appendChild(s)}function vw(t,e){return t.map(r=>{if(r.category!=null||r.color==null)return r;let i=String(r.color);return e.has(i)||e.set(i,e.size),{...r,category:e.get(i)}})}function _w(t,e){let r=t.xScale,i=t.yScale;if(typeof r!="function"||typeof i!="function")return null;let s=globalThis.window&&window.d3;return s&&typeof s.quadtree=="function"?s.quadtree().x(a=>a.__px).y(a=>a.__py).addAll(e.map(a=>({row:a,__px:r(a.x),__py:i(a.y)}))):e.map(a=>({row:a,__px:r(a.x),__py:i(a.y)}))}function xw(t,e,r){if(!t)return null;if(typeof t.find=="function")return t.find(e,r,16)?.row||null;let i=null,s=1/0;return t.forEach(a=>{let d=Math.hypot(a.__px-e,a.__py-r);d{s=!1,i||d();let _=r.getBoundingClientRect(),x=xw(i,a.clientX-_.left,a.clientY-_.top);x&&t0(t,"rollover",{data:x,source:"webgl-bridge"})}))}return r.addEventListener("mousemove",m),{rebuild:d,destroy(){r.removeEventListener("mousemove",m)}}}function fg({chart:t,coordinator:e,chartId:r,markSpec:i,createRenderer:s,layerIndex:a=0}){let d=yw(t),m=e6({chart:t,layerIndex:a}),v=s||globalThis.window&&window.myIO&&window.myIO.webglRenderers&&window.myIO.webglRenderers.createWebGLRenderer,_=new Map,x=null,w=[],I=null,O=!1,z=!1,J=null,Q=Sw(t,()=>w);function oe(he,He){if(!(z||O)){if(z=!0,console.warn("[myIO webgl bridge] falling back to SVG:",he,He||""),x&&typeof x.destroy=="function")try{x.destroy()}catch{}x=null,d.remove(),I&&m.onResult(I)}}function se(){if(x||O||z)return x;if(typeof v!="function")return oe("renderer unavailable"),null;let he=cg(t,d);try{x=v({kind:i.kind,el:d,width:he.width,height:he.height,xScale:t.xScale,yScale:t.yScale})}catch(er){return oe("renderer creation failed",er),null}let He=d.querySelector("canvas");if(!x)return oe("renderer unavailable"),null;if(He){let er=null;try{er=He.getContext("webgl2")||He.getContext("webgl")}catch{er=null}if(!er)return oe("WebGL context unavailable"),null;He.addEventListener("webglcontextlost",Er=>{Er.preventDefault(),oe("WebGL context lost")},{once:!0})}return x}function re(he){let He=he&&he.trailer,er=He&&(He.error||He.message);return er?(x&&typeof x.update=="function"&&Promise.resolve(x.update([])).catch(()=>{}),t0(t,"error",{message:String(er),trailer:He,chartId:r}),!0):!1}function q(he){if(O)return;if(I=he,z){m.onResult(he);return}if(re(he))return;w=vw(Zm(he&&he.batches),_),Q.rebuild();let He=se();!He||typeof He.update!="function"||(bw(d,w.length?null:"myIO-webgl-empty",w.length?"":"No data in selection"),w.length||t0(t,"emptySelection",{chartId:r}),Promise.resolve(He.update(w)).catch(er=>{oe("render failed",er)}))}function ue(){if(O||z)return;let he=cg(t,d);x&&typeof x.resize=="function"&&x.resize(he.width,he.height),x&&typeof x.update=="function"&&Promise.resolve(x.update(w)).catch(He=>{oe("resize render failed",He)})}function K(){O||(J&&clearTimeout(J),J=setTimeout(ue,hw))}function B(){O||(O=!0,J&&clearTimeout(J),e&&typeof e.onChartResult=="function"&&e.onChartResult(r,null),Q.destroy(),m.destroy(),x&&typeof x.destroy=="function"&&x.destroy(),d.remove())}return t&&typeof t.on=="function"&&(t.on("resize",K),t.on("destroy",B)),{onResult:q,resize:K,destroy:B,get pointCount(){return w.length},get overlay(){return z?void 0:d},get fallbackActive(){return z}}}function e6({chart:t,layerIndex:e=0}){let r=[],i=!1;function s(d){if(i)return;let m=d&&d.trailer,v=m&&(m.error||m.message);if(v){t0(t,"error",{message:String(v),trailer:m});return}r=Zm(d&&d.batches),t.config&&t.config.layers&&t.config.layers[e]&&(t.config.layers[e].data=r),r.length||t0(t,"emptySelection",{}),typeof t.renderCurrentLayers=="function"&&t.renderCurrentLayers()}function a(){i=!0}return t&&typeof t.on=="function"&&t.on("destroy",a),{onResult:s,destroy:a,get pointCount(){return r.length}}}function m9(t){return ug(t)?fg(t):t&&t.unifyDataPath?e6(t):null}var t6=class{constructor({coordinator:e,sourceId:r,group:i,rowkeyCol:s,threshold:a=1e5}){if(!e)throw new Error("CrosstalkAdapter: coordinator is required");if(!r)throw new Error("CrosstalkAdapter: sourceId is required");this.coordinator=e,this.sourceId=r,this.group=i||null,this.rowkeyCol=s||"__myio_rowkey__",this.threshold=Number(a)||1e5,this._selectionHandle=null,this._filterHandle=null,this._suppressedOnce=!1,this._badgeEl=null,this._mode="row-level"}attach(e){if(this.group=e||this.group,!this.group||typeof window>"u"||!window.crosstalk)return;let r=window.crosstalk.SelectionHandle,i=window.crosstalk.FilterHandle;r&&(this._selectionHandle=new r(this.group),this._selectionHandle.on("change",s=>this._onIncoming(s)),i&&(this._filterHandle=new i(this.group),this._filterHandle.on("change",s=>this._onIncoming(s))))}setBadge(e){this._badgeEl=e,this._renderBadge()}_renderBadge(){this._badgeEl&&(this._badgeEl.textContent="linked: "+this._mode)}_onIncoming(e){let r=e&&(e.value||e.keys)||null;if(!r||!Array.isArray(r)||r.length===0){this.coordinator.setSelection({chartId:"__crosstalk__:"+this.sourceId,predicate:null});return}let i=r.map(d=>d==null?"NULL":"'"+String(d).replace(/'/g,"''")+"'"),a='"'+this.rowkeyCol.replace(/"/g,'""')+'"'+" IN ("+i.join(",")+")";this.coordinator.setSelection({chartId:"__crosstalk__:"+this.sourceId,predicate:a})}async broadcast({predicate:e}){if(!this._selectionHandle)return;if(e==null){try{this._selectionHandle.set(null)}catch{}return}let r=this._countSql(e),i=this.coordinator.adapters&&this.coordinator.adapters.get(this.sourceId);if(!i)return;let s=0;try{for await(let d of i.query({sql:r,params:[],queryId:"__xcount__"+Date.now()})){if(!d||d.__trailer)continue;let m=d.rows||d.batch&&d.batch.toArray&&d.batch.toArray()||[];m[0]&&(s=Number(m[0].n??m[0][0]??m[0]["count(*)"]??0))}}catch(d){console.warn("[myIO crosstalk] count query failed:",d?.message||d);return}if(s>this.threshold){this._suppressedOnce||(console.info("myIO: selection above crosstalk_threshold ("+s+" > "+this.threshold+"); downstream row-indexed widgets will not react to this selection. myIO-to-myIO linking still works."),this._suppressedOnce=!0),this._mode="predicate-only",this._renderBadge();return}let a=await this._fetchKeys(e);if(a&&a.length>0)try{this._selectionHandle.set(a)}catch{}this._mode="row-level",this._renderBadge()}_countSql(e){return"SELECT count(*) AS n FROM "+('"'+this.sourceId.replace(/"/g,'""')+'"')+" WHERE "+e}async _fetchKeys(e){let r=this.coordinator.adapters&&this.coordinator.adapters.get(this.sourceId);if(!r)return[];let i='"'+this.sourceId.replace(/"/g,'""')+'"',a="SELECT "+('"'+this.rowkeyCol.replace(/"/g,'""')+'"')+" AS rowkey FROM "+i+" WHERE "+e,d=[];try{for await(let m of r.query({sql:a,params:[],queryId:"__xkeys__"+Date.now()})){if(!m||m.__trailer)continue;let v=m.rows||m.batch&&m.batch.toArray&&m.batch.toArray()||[];for(let _ of v){let x=_&&(_.rowkey??_[0]);x!=null&&d.push(String(x))}}}catch(m){console.warn("[myIO crosstalk] key fetch failed:",m?.message||m)}return d}destroy(){try{this._selectionHandle&&this._selectionHandle.close()}catch{}try{this._filterHandle&&this._filterHandle.close()}catch{}this._selectionHandle=null,this._filterHandle=null}};var _h=class{constructor({el:e,width:r,height:i,xScale:s,yScale:a,palette:d,captureHoverEvents:m=!1}){this.el=e,this.width=r,this.height=i,this.xScale=s,this.yScale=a,this.captureHoverEvents=m!==!1,this.palette=d||["#440154","#414487","#2a788e","#22a884","#7ad151","#fde725"],this._scatterplot=null,this._destroyed=!1}_scaleCopy(e){return e&&typeof e.copy=="function"?e.copy():e}async _ensure(){if(this._scatterplot)return this._scatterplot;let e=await Promise.resolve().then(()=>(l_(),o_)),r=e.default||e.createScatterplot,i=document.createElement("canvas");return i.width=this.width,i.height=this.height,i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.pointerEvents=this.captureHoverEvents?"auto":"none",this.el.appendChild(i),this._scatterplot=r({canvas:i,width:this.width,height:this.height,pointSize:3,backgroundColor:[1,1,1,0],colorBy:"category",pointColor:this.palette,xScale:this._scaleCopy(this.xScale),yScale:this._scaleCopy(this.yScale)}),this._applyScales(),this._scatterplot}_applyScales(){!this._scatterplot||!this.xScale||!this.yScale||(typeof this._scatterplot.setXScale=="function"&&this._scatterplot.setXScale(this._scaleCopy(this.xScale)),typeof this._scatterplot.setYScale=="function"&&this._scatterplot.setYScale(this._scaleCopy(this.yScale)),typeof this._scatterplot.set=="function"&&(typeof this._scatterplot.setXScale!="function"||typeof this._scatterplot.setYScale!="function")&&this._scatterplot.set({xScale:this._scaleCopy(this.xScale),yScale:this._scaleCopy(this.yScale)}))}async update(e){if(this._destroyed)return;let r=await this._ensure();if(!e||e.length===0){r.clear();return}let i={x:new Float32Array(e.length),y:new Float32Array(e.length),category:new Float32Array(e.length),value:new Float32Array(e.length)};for(let s=0;sN0(r6())),r=e.default||e,i=document.createElement("canvas");i.width=this.width,i.height=this.height,i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.pointerEvents="none",this.el.appendChild(i),this._regl=r({canvas:i,attributes:{antialias:!0,preserveDrawingBuffer:!1}}),this._drawLine=this._regl({vert:` precision mediump float; attribute vec2 position; uniform vec2 xDomain; @@ -745,7 +745,7 @@ void main() { precision mediump float; uniform vec4 color; void main() { gl_FragColor = color; } - `,attributes:{position:this._regl.prop("position")},uniforms:{xDomain:this._regl.prop("xDomain"),yDomain:this._regl.prop("yDomain"),color:this._regl.prop("color")},count:this._regl.prop("count"),primitive:"line strip"}),this._buffer=this._regl.buffer({type:"float32",usage:"dynamic",length:0})}async update(e){if(this._destroyed)return;if(await this._ensure(),!e||e.length===0){this._regl.clear({color:[0,0,0,0]}),this._vertexCount=0;return}let r=new Float32Array(e.length*2);for(let o=0;oy0(Dm())),r=e.default||e,i=document.createElement("canvas");i.width=this.width,i.height=this.height,i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.pointerEvents="none",this.el.appendChild(i),this._regl=r({canvas:i,attributes:{antialias:!0,preserveDrawingBuffer:!1}}),this._draw=this._regl({vert:` + `,attributes:{position:this._regl.prop("position")},uniforms:{xDomain:this._regl.prop("xDomain"),yDomain:this._regl.prop("yDomain"),color:this._regl.prop("color")},count:this._regl.prop("count"),primitive:"line strip"}),this._buffer=this._regl.buffer({type:"float32",usage:"dynamic",length:0})}async update(e){if(this._destroyed)return;if(await this._ensure(),!e||e.length===0){this._regl.clear({color:[0,0,0,0]}),this._vertexCount=0;return}let r=new Float32Array(e.length*2);for(let a=0;aN0(r6())),r=e.default||e,i=document.createElement("canvas");i.width=this.width,i.height=this.height,i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.pointerEvents="none",this.el.appendChild(i),this._regl=r({canvas:i,attributes:{antialias:!0,preserveDrawingBuffer:!1}}),this._draw=this._regl({vert:` precision mediump float; attribute vec2 position; uniform vec2 xDomain; @@ -759,7 +759,7 @@ void main() { precision mediump float; uniform vec4 color; void main() { gl_FragColor = color; } - `,attributes:{position:this._regl.prop("position")},uniforms:{xDomain:this._regl.prop("xDomain"),yDomain:this._regl.prop("yDomain"),color:this._regl.prop("color")},count:this._regl.prop("count"),primitive:"triangle strip"}),this._buffer=this._regl.buffer({type:"float32",usage:"dynamic",length:0})}async update(e){if(this._destroyed)return;if(await this._ensure(),!e||e.length===0){this._regl.clear({color:[0,0,0,0]});return}let r=new Float32Array(e.length*4);for(let o=0;o 0) { this.setClipPath(this.derived.currentLayers[0].type); @@ -523,6 +527,7 @@ export class myIOchart { destroy() { this.emit("destroy", {}); + destroyKeyframes(this); clearTimeout(this.runtime && this.runtime.resizeTimer); clearTimeout(this.runtime && this.runtime.tooltipHideTimer); if (this.facetController) { diff --git a/inst/htmlwidgets/myIO/src/index.js b/inst/htmlwidgets/myIO/src/index.js index dec89be4..26268e50 100644 --- a/inst/htmlwidgets/myIO/src/index.js +++ b/inst/htmlwidgets/myIO/src/index.js @@ -16,6 +16,7 @@ import { WebGLLine, WebGLArea } from "./renderers/webgl/index.js"; +import { selectKeyframe, stepKeyframe } from "./interactions/keyframes.js"; // Expose on the global namespace that the htmlwidget entry (myIO.js) consults. if (typeof window !== "undefined") { @@ -61,6 +62,13 @@ if (typeof window !== "undefined") { chart.updateData(msg.layers || []); } }); + window.Shiny.addCustomMessageHandler("myio:keyframe-control", function(msg) { + if (!msg || !msg.id) return; + var chart = window.myIO._instances[msg.id]; + if (!chart || !chart.config) return; + if (msg.action === "select") selectKeyframe(chart, msg.frame); + if (msg.action === "step") stepKeyframe(chart, msg.direction); + }); window.myIO._proxyHandlerInstalled = true; }; window.myIO.webglRenderers = { diff --git a/inst/htmlwidgets/myIO/src/interactions/keyframes.js b/inst/htmlwidgets/myIO/src/interactions/keyframes.js new file mode 100644 index 00000000..913349fc --- /dev/null +++ b/inst/htmlwidgets/myIO/src/interactions/keyframes.js @@ -0,0 +1,194 @@ +const DWELL_MS = 1000; + +function framesFor(chart) { + return chart && chart.config && Array.isArray(chart.config.keyframes) + ? chart.config.keyframes + : []; +} + +function clearPlaybackTimer(chart) { + if (!chart || !chart.runtime) return; + if (chart.runtime.keyframeTimer !== null && chart.runtime.keyframeTimer !== undefined) { + clearTimeout(chart.runtime.keyframeTimer); + } + chart.runtime.keyframeTimer = null; +} + +function applyWithoutRender(chart, frame) { + if (!frame || !Array.isArray(frame.layers) || !chart.config || + !Array.isArray(chart.config.layers)) return; + const byLabel = Object.create(null); + chart.config.layers.forEach(function(layer) { byLabel[layer.label] = layer; }); + frame.layers.forEach(function(update) { + if (update && Array.isArray(update.data) && + Object.prototype.hasOwnProperty.call(byLabel, update.label)) { + byLabel[update.label].data = update.data; + } + }); +} + +function resolveFrameIndex(chart, frame) { + const frames = framesFor(chart); + if (typeof frame === "number" && Number.isInteger(frame)) { + const index = frame - 1; + return index >= 0 && index < frames.length ? index : -1; + } + if (typeof frame === "string") { + return frames.findIndex(function(candidate) { return candidate.label === frame; }); + } + return -1; +} + +function updateControls(chart) { + if (!chart || !chart.runtime || !chart.runtime.keyframeControls) return; + const frames = framesFor(chart); + const controls = chart.runtime.keyframeControls; + const label = controls.querySelector(".myIO-keyframe-label"); + const play = controls.querySelector('[data-keyframe-action="play"]'); + const previous = controls.querySelector('[data-keyframe-action="previous"]'); + const next = controls.querySelector('[data-keyframe-action="next"]'); + const index = chart.runtime.keyframeIndex || 0; + if (label && frames[index]) label.textContent = frames[index].label; + if (play) { + play.textContent = chart.runtime.keyframePlaying ? "Pause" : "Play"; + play.setAttribute("aria-label", chart.runtime.keyframePlaying + ? "Pause keyframe playback" : "Play keyframes"); + play.setAttribute("aria-pressed", chart.runtime.keyframePlaying ? "true" : "false"); + } + if (previous) previous.disabled = index <= 0; + if (next) next.disabled = index >= frames.length - 1; +} + +function stopPlayback(chart) { + if (!chart || !chart.runtime) return; + clearPlaybackTimer(chart); + chart.runtime.keyframePlaying = false; + updateControls(chart); +} + +function scheduleNext(chart) { + clearPlaybackTimer(chart); + if (!chart.runtime.keyframePlaying) return; + const speed = Number(chart.config && chart.config.transitions && + chart.config.transitions.speed) || 0; + chart.runtime.keyframeTimer = setTimeout(function() { + if (!chart.runtime || !chart.runtime.keyframePlaying) return; + const frames = framesFor(chart); + const next = chart.runtime.keyframeIndex + 1; + if (next >= frames.length) { + stopPlayback(chart); + return; + } + selectKeyframe(chart, next + 1, { preservePlayback: true }); + if (next >= frames.length - 1) stopPlayback(chart); + else scheduleNext(chart); + }, Math.max(0, speed) + DWELL_MS); +} + +function makeButton(action, label) { + const button = document.createElement("button"); + button.type = "button"; + button.className = "myIO-keyframe-button"; + button.dataset.keyframeAction = action; + button.textContent = label; + return button; +} + +function renderControls(chart) { + const frames = framesFor(chart); + if (frames.length < 2 || !chart.dom || !chart.dom.element) return; + const controls = document.createElement("div"); + controls.className = "myIO-keyframe-controls"; + controls.setAttribute("role", "group"); + controls.setAttribute("aria-label", "Keyframe playback controls"); + + const previous = makeButton("previous", "Previous"); + previous.setAttribute("aria-label", "Previous keyframe"); + previous.addEventListener("click", function() { stepKeyframe(chart, "previous"); }); + controls.appendChild(previous); + + const play = makeButton("play", "Play"); + play.setAttribute("aria-label", "Play keyframes"); + play.setAttribute("aria-pressed", "false"); + play.addEventListener("click", function() { toggleKeyframePlayback(chart); }); + controls.appendChild(play); + + const next = makeButton("next", "Next"); + next.setAttribute("aria-label", "Next keyframe"); + next.addEventListener("click", function() { stepKeyframe(chart, "next"); }); + controls.appendChild(next); + + const label = document.createElement("span"); + label.className = "myIO-keyframe-label"; + label.setAttribute("aria-live", "polite"); + controls.appendChild(label); + + chart.dom.element.appendChild(controls); + chart.runtime.keyframeControls = controls; + updateControls(chart); +} + +export function initializeKeyframes(chart) { + destroyKeyframes(chart); + if (!chart || !chart.runtime) return; + const frames = framesFor(chart); + chart.runtime.keyframeIndex = 0; + chart.runtime.keyframePlaying = false; + chart.runtime.keyframeTimer = null; + chart.runtime.keyframeControls = null; + if (frames.length === 0) return; + applyWithoutRender(chart, frames[0]); + renderControls(chart); +} + +export function selectKeyframe(chart, frame, options) { + if (!chart || !chart.runtime) return false; + const index = resolveFrameIndex(chart, frame); + if (index < 0) return false; + const preservePlayback = options && options.preservePlayback === true; + if (!preservePlayback) stopPlayback(chart); + chart.runtime.keyframeIndex = index; + const selected = framesFor(chart)[index]; + if (typeof chart.updateData === "function") chart.updateData(selected.layers || []); + else applyWithoutRender(chart, selected); + updateControls(chart); + return true; +} + +export function stepKeyframe(chart, direction) { + if (!chart || !chart.runtime) return false; + stopPlayback(chart); + const frames = framesFor(chart); + if (frames.length === 0) return false; + const delta = direction === "previous" ? -1 : direction === "next" ? 1 : 0; + if (delta === 0) return false; + const next = Math.max(0, Math.min(frames.length - 1, + (chart.runtime.keyframeIndex || 0) + delta)); + return selectKeyframe(chart, next + 1); +} + +export function toggleKeyframePlayback(chart) { + if (!chart || !chart.runtime || framesFor(chart).length < 2) return false; + if (chart.runtime.keyframePlaying) { + stopPlayback(chart); + return false; + } + if (chart.runtime.keyframeIndex >= framesFor(chart).length - 1) { + selectKeyframe(chart, 1); + } + chart.runtime.keyframePlaying = true; + updateControls(chart); + scheduleNext(chart); + return true; +} + +export function destroyKeyframes(chart) { + if (!chart || !chart.runtime) return; + clearPlaybackTimer(chart); + chart.runtime.keyframePlaying = false; + const controls = chart.runtime.keyframeControls || + (chart.dom && chart.dom.element && + chart.dom.element.querySelector(".myIO-keyframe-controls")); + if (controls && controls.parentNode) controls.parentNode.removeChild(controls); + chart.runtime.keyframeControls = null; +} diff --git a/inst/htmlwidgets/myIO/style.css b/inst/htmlwidgets/myIO/style.css index 1bdf3dbf..b10603f9 100644 --- a/inst/htmlwidgets/myIO/style.css +++ b/inst/htmlwidgets/myIO/style.css @@ -656,6 +656,51 @@ box-shadow: var(--chart-focus-ring); } +.myIO-keyframe-controls { + display: flex; + align-items: center; + justify-content: center; + flex-wrap: wrap; + gap: var(--chart-spacing-sm); + padding: var(--chart-spacing-sm) var(--chart-spacing-md); + border-top: 1px solid var(--chart-sheet-border); + background: var(--chart-status-bar-bg); + color: var(--chart-status-bar-color); + font-family: var(--chart-font); + font-size: 12px; +} + +.myIO-keyframe-button { + min-height: 30px; + padding: 4px 10px; + border: 1px solid var(--chart-sheet-border); + border-radius: var(--chart-radius-sm); + background: var(--chart-sheet-bg); + color: var(--chart-status-bar-color); + font: inherit; + cursor: pointer; +} + +.myIO-keyframe-button:hover:not(:disabled) { + background: var(--chart-button-hover-bg); +} + +.myIO-keyframe-button:focus-visible { + outline: none; + box-shadow: var(--chart-focus-ring); +} + +.myIO-keyframe-button:disabled { + cursor: not-allowed; + opacity: 0.45; +} + +.myIO-keyframe-label { + min-width: 8ch; + font-weight: 600; + text-align: center; +} + /* Annotation marks */ .myIO-annotation-label { font-family: var(--chart-font); @@ -892,6 +937,7 @@ .myIO-sheet-backdrop { display: none !important; } .toolTip { display: none !important; } .myIO-status-bar { display: none !important; } + .myIO-keyframe-controls { display: none !important; } .myIO-popover { display: none !important; } .myIO-slider-wrapper { display: none !important; } } diff --git a/inst/myio-schema.json b/inst/myio-schema.json index 64ae30be..2852ad1d 100644 --- a/inst/myio-schema.json +++ b/inst/myio-schema.json @@ -1250,6 +1250,11 @@ "transform", "options" ], + "addKeyframe": [ + "myIO", + "data", + "label" + ], "clear_duckdb_wasm_cache": [ "version" ], @@ -1382,6 +1387,10 @@ "labelPosition", "..." ], + "setKeyframe": [ + "proxy", + "frame" + ], "setLayerOpacity": [ "myIO", "label", @@ -1458,6 +1467,10 @@ "myIO", "speed" ], + "stepKeyframe": [ + "proxy", + "direction" + ], "stop_duckdb_wasm_missing": [], "suppressAxis": [ "myIO", diff --git a/man/addKeyframe.Rd b/man/addKeyframe.Rd new file mode 100644 index 00000000..bd6faba3 --- /dev/null +++ b/man/addKeyframe.Rd @@ -0,0 +1,34 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/addKeyframe.R +\name{addKeyframe} +\alias{addKeyframe} +\title{Add a Named Data Keyframe} +\usage{ +addKeyframe(myIO, data, label) +} +\arguments{ +\item{myIO}{A widget created by \code{\link{myIO}()} with at least one layer.} + +\item{data}{A data frame for a single-layer chart, or a named list of data +frames keyed by layer label for a multi-layer chart.} + +\item{label}{A unique, non-empty keyframe label.} +} +\value{ +A modified \code{myIO} widget with the keyframe appended. +} +\description{ +Registers a named data state for sequential chart storytelling. A chart with +one serialized layer accepts a data frame directly. Multi-layer charts use a +named list of data frames keyed by existing layer labels; omitted layers +retain their data from the previous keyframe. +} +\examples{ +start <- data.frame(x = 1:3, y = c(2, 4, 3)) +finish <- data.frame(x = 1:3, y = c(5, 3, 7)) +myIO(start) |> + addIoLayer("line", label = "series", + mapping = list(x_var = "x", y_var = "y")) |> + addKeyframe(start, "Start") |> + addKeyframe(finish, "Finish") +} diff --git a/man/setKeyframe.Rd b/man/setKeyframe.Rd new file mode 100644 index 00000000..9d6696f9 --- /dev/null +++ b/man/setKeyframe.Rd @@ -0,0 +1,31 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/addKeyframe.R +\name{setKeyframe} +\alias{setKeyframe} +\alias{stepKeyframe} +\title{Control Keyframes in Shiny} +\usage{ +setKeyframe(proxy, frame) + +stepKeyframe(proxy, direction = c("next", "previous")) +} +\arguments{ +\item{proxy}{A \code{myIO_proxy} object returned by \code{\link{myIOProxy}()}.} + +\item{frame}{A unique keyframe label or positive one-based keyframe index.} + +\item{direction}{Either \code{"next"} or \code{"previous"}.} +} +\value{ +The proxy, invisibly. +} +\description{ +Select a named or numbered keyframe, or step an existing myIO widget without +re-rendering the widget. +} +\examples{ +\dontrun{ +myIOProxy("chart") |> setKeyframe("Forecast") +myIOProxy("chart") |> stepKeyframe("next") +} +} diff --git a/mcp/myio-schema.json b/mcp/myio-schema.json index 64ae30be..2852ad1d 100644 --- a/mcp/myio-schema.json +++ b/mcp/myio-schema.json @@ -1250,6 +1250,11 @@ "transform", "options" ], + "addKeyframe": [ + "myIO", + "data", + "label" + ], "clear_duckdb_wasm_cache": [ "version" ], @@ -1382,6 +1387,10 @@ "labelPosition", "..." ], + "setKeyframe": [ + "proxy", + "frame" + ], "setLayerOpacity": [ "myIO", "label", @@ -1458,6 +1467,10 @@ "myIO", "speed" ], + "stepKeyframe": [ + "proxy", + "direction" + ], "stop_duckdb_wasm_missing": [], "suppressAxis": [ "myIO", diff --git a/tests/js/keyframes.test.js b/tests/js/keyframes.test.js new file mode 100644 index 00000000..e179d5e9 --- /dev/null +++ b/tests/js/keyframes.test.js @@ -0,0 +1,111 @@ +import { beforeEach, describe, expect, test, vi } from "vitest"; +import { + initializeKeyframes, + selectKeyframe, + stepKeyframe, + toggleKeyframePlayback, + destroyKeyframes +} from "../../inst/htmlwidgets/myIO/src/interactions/keyframes.js"; + +function chartWithFrames(speed = 0) { + document.body.innerHTML = '

'; + const chart = { + dom: { element: document.getElementById("chart") }, + config: { + transitions: { speed }, + layers: [ + { label: "a", data: [{ x: 0 }] }, + { label: "b", data: [{ x: 10 }] } + ], + keyframes: [ + { label: "Start", layers: [{ label: "a", data: [{ x: 1 }] }, { label: "b", data: [{ x: 10 }] }] }, + { label: "Middle", layers: [{ label: "a", data: [{ x: 2 }] }, { label: "b", data: [{ x: 20 }] }] }, + { label: "End", layers: [{ label: "a", data: [{ x: 3 }] }, { label: "b", data: [{ x: 30 }] }] } + ] + }, + runtime: {}, + updateData: vi.fn(function(updates) { + updates.forEach((update) => { + const layer = chart.config.layers.find((candidate) => candidate.label === update.label); + if (layer) layer.data = update.data; + }); + }) + }; + return chart; +} + +describe("keyframe controller", () => { + beforeEach(() => { + vi.useFakeTimers(); + }); + + test("initializes the first frame and renders accessible controls", () => { + const chart = chartWithFrames(); + initializeKeyframes(chart); + + expect(chart.runtime.keyframeIndex).toBe(0); + expect(chart.config.layers[0].data).toEqual([{ x: 1 }]); + expect(document.querySelector(".myIO-keyframe-label").textContent).toBe("Start"); + expect(document.querySelectorAll(".myIO-keyframe-button")).toHaveLength(3); + expect(document.querySelector(".myIO-keyframe-controls").getAttribute("aria-label")) + .toBe("Keyframe playback controls"); + }); + + test("selects by label or one-based index and clamps steps", () => { + const chart = chartWithFrames(); + initializeKeyframes(chart); + + expect(selectKeyframe(chart, "End")).toBe(true); + expect(chart.runtime.keyframeIndex).toBe(2); + expect(selectKeyframe(chart, 2)).toBe(true); + expect(chart.runtime.keyframeIndex).toBe(1); + stepKeyframe(chart, "previous"); + stepKeyframe(chart, "previous"); + expect(chart.runtime.keyframeIndex).toBe(0); + stepKeyframe(chart, "next"); + expect(chart.runtime.keyframeIndex).toBe(1); + expect(selectKeyframe(chart, "missing")).toBe(false); + }); + + test("plays once, stops at the end, and restarts from the end", () => { + const chart = chartWithFrames(200); + initializeKeyframes(chart); + toggleKeyframePlayback(chart); + expect(chart.runtime.keyframePlaying).toBe(true); + + vi.advanceTimersByTime(1200); + expect(chart.runtime.keyframeIndex).toBe(1); + vi.advanceTimersByTime(1200); + expect(chart.runtime.keyframeIndex).toBe(2); + expect(chart.runtime.keyframePlaying).toBe(false); + + toggleKeyframePlayback(chart); + expect(chart.runtime.keyframeIndex).toBe(0); + expect(chart.runtime.keyframePlaying).toBe(true); + }); + + test("pause and destroy clear playback timers", () => { + const chart = chartWithFrames(); + initializeKeyframes(chart); + toggleKeyframePlayback(chart); + toggleKeyframePlayback(chart); + vi.advanceTimersByTime(5000); + expect(chart.runtime.keyframeIndex).toBe(0); + + toggleKeyframePlayback(chart); + destroyKeyframes(chart); + expect(document.querySelector(".myIO-keyframe-controls")).toBeNull(); + expect(chart.runtime.keyframeTimer).toBeNull(); + }); + + test("does nothing for zero or one frame", () => { + const chart = chartWithFrames(); + chart.config.keyframes = []; + initializeKeyframes(chart); + expect(document.querySelector(".myIO-keyframe-controls")).toBeNull(); + + chart.config.keyframes = [{ label: "Only", layers: [] }]; + initializeKeyframes(chart); + expect(document.querySelector(".myIO-keyframe-controls")).toBeNull(); + }); +}); diff --git a/tests/js/myio-proxy.test.js b/tests/js/myio-proxy.test.js index 40f2c018..2128de6b 100644 --- a/tests/js/myio-proxy.test.js +++ b/tests/js/myio-proxy.test.js @@ -88,6 +88,7 @@ describe("proxy message handler wiring", () => { window.myIO.installProxyHandler(); expect(typeof handlers["myio:proxy-update"]).toBe("function"); + expect(typeof handlers["myio:keyframe-control"]).toBe("function"); const fakeChart = { config: {}, updateData: vi.fn() }; window.myIO.registerInstance("chartA", fakeChart); @@ -96,6 +97,16 @@ describe("proxy message handler wiring", () => { handlers["myio:proxy-update"](payload); expect(fakeChart.updateData).toHaveBeenCalledWith(payload.layers); + fakeChart.config.keyframes = [ + { label: "Start", layers: payload.layers }, + { label: "End", layers: payload.layers } + ]; + fakeChart.runtime = {}; + handlers["myio:keyframe-control"]({ + id: "chartA", action: "select", frame: "End" + }); + expect(fakeChart.updateData).toHaveBeenLastCalledWith(payload.layers); + // unknown id is a no-op expect(() => handlers["myio:proxy-update"]({ id: "missing", layers: [] })).not.toThrow(); diff --git a/tests/playwright/fixtures/keyframes.html b/tests/playwright/fixtures/keyframes.html new file mode 100644 index 00000000..afc23d63 --- /dev/null +++ b/tests/playwright/fixtures/keyframes.html @@ -0,0 +1,47 @@ + + + + + + + + + +
+ + + diff --git a/tests/playwright/keyframes.spec.ts b/tests/playwright/keyframes.spec.ts new file mode 100644 index 00000000..b614c738 --- /dev/null +++ b/tests/playwright/keyframes.spec.ts @@ -0,0 +1,77 @@ +import { test, expect, type Page } from "@playwright/test"; +import { createServer, type Server } from "node:http"; +import { readFile } from "node:fs/promises"; +import { extname, join, normalize } from "node:path"; + +let server: Server; +let baseUrl: string; + +test.beforeAll(async () => { + server = createServer(async (req, res) => { + const pathname = decodeURIComponent(new URL(req.url || "/", "http://localhost").pathname); + const relative = normalize(pathname).replace(/^(\.\.[/\\])+/, "").replace(/^[/\\]/, ""); + const filePath = join(process.cwd(), relative || "tests/playwright/fixtures/keyframes.html"); + try { + const body = await readFile(filePath); + const extension = extname(filePath); + const type = extension === ".js" ? "text/javascript" : + extension === ".css" ? "text/css" : "text/html"; + res.writeHead(200, { "content-type": type }); + res.end(body); + } catch (_) { + res.writeHead(404); + res.end("not found"); + } + }); + await new Promise((resolve) => server.listen(0, resolve)); + const address = server.address(); + if (!address || typeof address === "string") throw new Error("test server did not bind"); + baseUrl = "http://127.0.0.1:" + address.port; +}); + +test.afterAll(async () => { + await new Promise((resolve) => server.close(() => resolve())); +}); + +async function ready(page: Page) { + await page.goto(baseUrl + "/tests/playwright/fixtures/keyframes.html"); + await page.waitForFunction(() => (window as any).__myioTestReady === true); + await page.evaluate(() => (window as any).__mountKeyframes()); +} + +test("renders the first frame and supports keyboard stepping", async ({ page }) => { + const errors: string[] = []; + page.on("pageerror", (error) => errors.push(String(error))); + await ready(page); + + await expect(page.locator(".myIO-keyframe-label")).toHaveText("Start"); + await expect(page.locator("circle[class^='tag-point']")).toHaveCount(2); + const next = page.getByRole("button", { name: "Next keyframe" }); + await next.focus(); + await page.keyboard.press("Enter"); + await expect(page.locator(".myIO-keyframe-label")).toHaveText("Middle"); + await expect(page.locator("circle[class^='tag-point']")).toHaveCount(3); + expect(errors).toEqual([]); +}); + +test("plays once, stops at the final frame, and restarts", async ({ page }) => { + await ready(page); + const play = page.getByRole("button", { name: "Play keyframes" }); + await play.click(); + await expect(page.locator(".myIO-keyframe-label")).toHaveText("End", { timeout: 3000 }); + await expect(page.getByRole("button", { name: "Play keyframes" })).toHaveAttribute("aria-pressed", "false"); + await expect(page.locator("circle[class^='tag-point']")).toHaveCount(4); + + await page.getByRole("button", { name: "Play keyframes" }).click(); + await expect(page.locator(".myIO-keyframe-label")).toHaveText("Start"); + await expect(page.getByRole("button", { name: "Pause keyframe playback" })).toHaveAttribute("aria-pressed", "true"); +}); + +test("reduced motion keeps playback functional with zero-duration updates", async ({ page }) => { + await page.emulateMedia({ reducedMotion: "reduce" }); + await ready(page); + await page.getByRole("button", { name: "Next keyframe" }).click(); + await expect(page.locator(".myIO-keyframe-label")).toHaveText("Middle"); + await expect(page.locator("circle[class^='tag-point']")).toHaveCount(3); + expect(await page.evaluate(() => (window as any).__chart.config.transitions.speed)).toBe(0); +}); diff --git a/tests/testthat/test_keyframes.R b/tests/testthat/test_keyframes.R new file mode 100644 index 00000000..2f399a26 --- /dev/null +++ b/tests/testthat/test_keyframes.R @@ -0,0 +1,93 @@ +test_that("charts without keyframes keep the existing config contract", { + chart <- myIO(mtcars) |> + addIoLayer("point", label = "cars", + mapping = list(x_var = "wt", y_var = "mpg")) + + expect_null(chart$x$config$keyframes) +}) + +test_that("addKeyframe serializes a transformed single-layer snapshot", { + first <- data.frame(x = 1:6, y = c(2, 8, 3, 9, 4, 10)) + second <- data.frame(x = 1:6, y = c(10, 4, 9, 3, 8, 2)) + chart <- myIO(first) |> + addIoLayer("line", label = "series", + mapping = list(x_var = "x", y_var = "y"), + transform = "lttb", options = list(threshold = 3L)) |> + addKeyframe(first, "Before") |> + addKeyframe(second, "After") + + expect_equal(vapply(chart$x$config$keyframes, `[[`, character(1), "label"), + c("Before", "After")) + expect_equal(length(chart$x$config$keyframes[[1]]$layers), 1L) + expect_equal(chart$x$config$keyframes[[1]]$layers[[1]]$label, "series") + expect_equal(length(chart$x$config$keyframes[[1]]$layers[[1]]$data), 3L) + expect_true(all(vapply(chart$x$config$keyframes[[1]]$layers[[1]]$data, + function(row) "_source_key" %in% names(row), logical(1)))) +}) + +test_that("multi-layer keyframes materialize complete snapshots", { + initial_a <- data.frame(x = 1:2, y = c(1, 2)) + initial_b <- data.frame(x = 1:2, y = c(3, 4)) + changed_a <- data.frame(x = 1:3, y = c(9, 8, 7)) + chart <- myIO() |> + addIoLayer("line", label = "a", data = initial_a, + mapping = list(x_var = "x", y_var = "y")) |> + addIoLayer("line", label = "b", data = initial_b, + mapping = list(x_var = "x", y_var = "y")) |> + addKeyframe(list(a = changed_a), "Only A changes") + + frame <- chart$x$config$keyframes[[1]] + expect_equal(vapply(frame$layers, `[[`, character(1), "label"), c("a", "b")) + expect_equal(length(frame$layers[[1]]$data), 3L) + expect_equal(frame$layers[[2]]$data, chart$x$config$layers[[2]]$data) +}) + +test_that("addKeyframe rejects ambiguous and malformed inputs", { + empty <- myIO() + expect_error(addKeyframe(empty, data.frame(x = 1), "frame"), "at least one layer") + + one <- myIO(data.frame(x = 1, y = 2)) |> + addIoLayer("point", label = "one", + mapping = list(x_var = "x", y_var = "y")) + expect_error(addKeyframe(one, data.frame(x = 1), ""), "non-empty") + expect_error(addKeyframe(one, list(missing = data.frame(x = 1)), "bad"), + "unknown layer") + expect_error(addKeyframe(one, list(one = 42), "bad"), "data frame") + + duplicate <- addKeyframe(one, data.frame(x = 1, y = 2), "same") + expect_error(addKeyframe(duplicate, data.frame(x = 2, y = 3), "same"), + "unique") + + two <- one |> + addIoLayer("point", label = "two", data = data.frame(x = 3, y = 4), + mapping = list(x_var = "x", y_var = "y")) + expect_error(addKeyframe(two, data.frame(x = 1, y = 2), "ambiguous"), + "named list") +}) + +test_that("keyframe proxy helpers emit stable Shiny message payloads", { + session <- new.env(parent = emptyenv()) + session$ns <- function(id) paste0("ns-", id) + session$sendCustomMessage <- function(type, message) { + session$type <- type + session$message <- message + } + proxy <- structure(list(id = "ns-chart", session = session), class = "myIO_proxy") + + expect_invisible(setKeyframe(proxy, "After")) + expect_equal(session$type, "myio:keyframe-control") + expect_equal(session$message, + list(id = "ns-chart", action = "select", frame = "After")) + + expect_invisible(setKeyframe(proxy, 2L)) + expect_equal(session$message$frame, 2L) + + expect_invisible(stepKeyframe(proxy, "previous")) + expect_equal(session$message, + list(id = "ns-chart", action = "step", direction = "previous")) + + expect_error(setKeyframe(list(), "After"), "myIOProxy") + expect_error(setKeyframe(proxy, 0), "positive") + expect_error(setKeyframe(proxy, c("a", "b")), "single") + expect_error(stepKeyframe(proxy, "sideways"), "arg") +}) diff --git a/tests/webr/Dockerfile b/tests/webr/Dockerfile new file mode 100644 index 00000000..d3bf8c2f --- /dev/null +++ b/tests/webr/Dockerfile @@ -0,0 +1,7 @@ +FROM ghcr.io/r-wasm/webr:v0.6.0 + +# webR 0.6.0 currently ships pkgdepends 0.9.1, which is affected by +# r-lib/pkgdepends#462 and cannot resolve local package references. This is the +# upstream-provided patched tag referenced by r-wasm/rwasm#56. Remove this pin +# after the fix is included in a released pkgdepends version and WebR image. +RUN R -q -e 'pak::pak("r-lib/pkgdepends@v0.9.0-patched", lib = .Library)' diff --git a/tests/webr/package-lock.json b/tests/webr/package-lock.json new file mode 100644 index 00000000..2fb69ecd --- /dev/null +++ b/tests/webr/package-lock.json @@ -0,0 +1,1371 @@ +{ + "name": "myio-webr-gate", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "myio-webr-gate", + "dependencies": { + "playwright": "1.62.0", + "webr": "0.6.0" + } + }, + "node_modules/@codemirror/autocomplete": { + "version": "6.20.3", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.3.tgz", + "integrity": "sha512-tlosUqb+3BbxCxZdu4tKeRghPFC+QM7q4X5YhKV2eCmPG+1r2F3f4AaSz5sCrFqUtX4Jh20VFTKecl16MgiV9g==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@codemirror/commands": { + "version": "6.10.4", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.10.4.tgz", + "integrity": "sha512-Ryk9y9T0FFVF0cUGhAknveAyUOl/A1qReTFi+qPKtOh2Z9F4AUBz3XOrYD4ZEgZirdugVzHvd/2/Wcwy5OliTg==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.7.0", + "@codemirror/view": "^6.27.0", + "@lezer/common": "^1.1.0" + } + }, + "node_modules/@codemirror/language": { + "version": "6.12.4", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.12.4.tgz", + "integrity": "sha512-1q4PaT+o6PbgpkJt4Q8Fv5XJxTy4FUZ4MWETtyiDw3J0Pyr9E2vqcKL+k9wcvjNTIsauxvE7OfmWj3FRPHQ76A==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.23.0", + "@lezer/common": "^1.5.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0", + "style-mod": "^4.0.0" + } + }, + "node_modules/@codemirror/lint": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.9.7.tgz", + "integrity": "sha512-28/+iWLYxKxsvGYhSYL7zaCZqLz5+FFFDq9tVsvGv9kv8RY4fFAchJ5WX9M3YrrRlTIsECjsXPqeNgnSmNP2dg==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.42.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/search": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.7.1.tgz", + "integrity": "sha512-uMe5UO6PamJtSHrXhhHOzSX3ReWtiJrva6GnPMwSOrZtiExb5X5eExhr2OUZQVvdxPsKpY3Ro2mFbQadpPWmHA==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.37.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/state": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.7.1.tgz", + "integrity": "sha512-9QzNDgE4EYDnAHfrTlR2lwiPciiOymLtwKK+8yHQzCc7GXhAP9xdEbEJFy2IWB1j9UGUl9BsgMmTo/ImA02T7A==", + "license": "MIT", + "dependencies": { + "@marijn/find-cluster-break": "^1.0.0" + } + }, + "node_modules/@codemirror/view": { + "version": "6.43.7", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.7.tgz", + "integrity": "sha512-FZsExxkoxnAN+d9TgqXLg5g4A1oQwzX9WlkOT5i2PKkcW7xx3Bmu0vs90g6fo9Mpdsb/l96dnAraQ8932aO4/g==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.7.0", + "crelt": "^1.0.6", + "style-mod": "^4.1.0", + "w3c-keyname": "^2.2.4" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz", + "integrity": "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.1.tgz", + "integrity": "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.1.tgz", + "integrity": "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.1.tgz", + "integrity": "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.1.tgz", + "integrity": "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.1.tgz", + "integrity": "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.1.tgz", + "integrity": "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.1.tgz", + "integrity": "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.1.tgz", + "integrity": "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.1.tgz", + "integrity": "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.1.tgz", + "integrity": "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.1.tgz", + "integrity": "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==", + "cpu": [ + "loong64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.1.tgz", + "integrity": "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==", + "cpu": [ + "mips64el" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.1.tgz", + "integrity": "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.1.tgz", + "integrity": "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.1.tgz", + "integrity": "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==", + "cpu": [ + "s390x" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz", + "integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.1.tgz", + "integrity": "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.1.tgz", + "integrity": "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.1.tgz", + "integrity": "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.1.tgz", + "integrity": "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.1.tgz", + "integrity": "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz", + "integrity": "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.1.tgz", + "integrity": "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.1.tgz", + "integrity": "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz", + "integrity": "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@lezer/common": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.5.2.tgz", + "integrity": "sha512-sxQE460fPZyU3sdc8lafxiPwJHBzZRy/udNFynGQky1SePYBdhkBl1kOagA9uT3pxR8K09bOrmTUqA9wb/PjSQ==", + "license": "MIT" + }, + "node_modules/@lezer/highlight": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.3.tgz", + "integrity": "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.3.0" + } + }, + "node_modules/@lezer/lr": { + "version": "1.4.10", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.10.tgz", + "integrity": "sha512-rnCpTIBafOx4mRp43xOxDJbFipJm/c0cia/V5TiGlhmMa+wsSdoGmUN3w5Bqrks/09Q/D4tNAmWaT8p6NRi77A==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@marijn/find-cluster-break": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.3.tgz", + "integrity": "sha512-FY+MKLBoTsLNJF/eLWaOsXGdz6uh3Iu1axjPf6TUq92IYumcTcXWHoS747JARLkcdlJ/Waiaxc5wQfFO8jC6NA==", + "license": "MIT" + }, + "node_modules/@msgpack/msgpack": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@msgpack/msgpack/-/msgpack-2.8.0.tgz", + "integrity": "sha512-h9u4u/jiIRKbq25PM+zymTyW6bhTzELvOoUd+AvYriWOAKpLGnIamaET3pnHYoI5iYphAHBI4ayx0MehR+VVPQ==", + "license": "ISC", + "engines": { + "node": ">= 10" + } + }, + "node_modules/@xterm/addon-fit": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-fit/-/addon-fit-0.10.0.tgz", + "integrity": "sha512-UFYkDm4HUahf2lnEyHvio51TNGiLK66mqP2JoATy7hRZeXaGMRDr00JiSF7m63vR5WKATF605yEggJKsw0JpMQ==", + "license": "MIT", + "peerDependencies": { + "@xterm/xterm": "^5.0.0" + } + }, + "node_modules/@xterm/xterm": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@xterm/xterm/-/xterm-5.5.0.tgz", + "integrity": "sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A==", + "license": "MIT", + "peer": true + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/classnames": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", + "license": "MIT", + "peer": true + }, + "node_modules/codemirror": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.2.tgz", + "integrity": "sha512-VhydHotNW5w1UGK0Qj96BwSk/Zqbp9WbnyK2W/eVMv4QyF41INRGpjUhFJY7/uDNuudSc33a/PKr4iDqRduvHw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/commands": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/search": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" + } + }, + "node_modules/codemirror-lang-r": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/codemirror-lang-r/-/codemirror-lang-r-0.1.1.tgz", + "integrity": "sha512-ke9Bm7IPKOoEk0p8LxZJaRlqp8CGOOZns9eKyj/WUaNV58h4uEeWbMpWeJJhVIPvfiuXYkv4FG1hD70gguWJLQ==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.10.3", + "lezer-r": "^0.1.3" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" + }, + "node_modules/crelt": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.7.tgz", + "integrity": "sha512-aK6BbWfhf4U/wCcLHKPJl/xa6VkVstRaPywWtMKGwuOLc/wZTyQYuoxgvZnNsBvv7Kg3YTBQYYBCggcviQczuA==", + "license": "MIT" + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz", + "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.1", + "@esbuild/android-arm": "0.28.1", + "@esbuild/android-arm64": "0.28.1", + "@esbuild/android-x64": "0.28.1", + "@esbuild/darwin-arm64": "0.28.1", + "@esbuild/darwin-x64": "0.28.1", + "@esbuild/freebsd-arm64": "0.28.1", + "@esbuild/freebsd-x64": "0.28.1", + "@esbuild/linux-arm": "0.28.1", + "@esbuild/linux-arm64": "0.28.1", + "@esbuild/linux-ia32": "0.28.1", + "@esbuild/linux-loong64": "0.28.1", + "@esbuild/linux-mips64el": "0.28.1", + "@esbuild/linux-ppc64": "0.28.1", + "@esbuild/linux-riscv64": "0.28.1", + "@esbuild/linux-s390x": "0.28.1", + "@esbuild/linux-x64": "0.28.1", + "@esbuild/netbsd-arm64": "0.28.1", + "@esbuild/netbsd-x64": "0.28.1", + "@esbuild/openbsd-arm64": "0.28.1", + "@esbuild/openbsd-x64": "0.28.1", + "@esbuild/openharmony-arm64": "0.28.1", + "@esbuild/sunos-x64": "0.28.1", + "@esbuild/win32-arm64": "0.28.1", + "@esbuild/win32-ia32": "0.28.1", + "@esbuild/win32-x64": "0.28.1" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "license": "MIT" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/jszip": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "license": "(MIT OR GPL-3.0-or-later)", + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "node_modules/jszip/node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "license": "(MIT AND Zlib)" + }, + "node_modules/lezer-r": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/lezer-r/-/lezer-r-0.1.3.tgz", + "integrity": "sha512-tk+7Q54+ZYHKlLZj69GuZNC8+nMYPIFhGjrSe2fTyQAk9GyUsxgRsmF8V4r7cUiB65+lRu5/SrePeTEKQx5ZAQ==", + "license": "MIT", + "dependencies": { + "@lezer/highlight": "^1.2.1", + "@lezer/lr": "^1.4.2" + } + }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "license": "MIT", + "dependencies": { + "immediate": "~3.0.5" + } + }, + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pako": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.2.0.tgz", + "integrity": "sha512-zJq6RP/5q+TO2OpFV3FHzlPnFjmkb7Nc99a5SNjJE+uu/PkpChs+NIZSSzbBoD+6kjiISXjfYdwj1ZRQ81dz/w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "(MIT AND Zlib)" + }, + "node_modules/playwright": { + "version": "1.62.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.62.0.tgz", + "integrity": "sha512-Z14dG305dgaLu6foB1TXQagFiW8JfSUIUaUuPaKQ6NtBPKF1P/qXcqfh6c6K/icPqdy37JmjbiBXf6JNg6Sylw==", + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.62.0" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=20" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.62.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.62.0.tgz", + "integrity": "sha512-nsNRyq0r2zsG8AcRHWknc9QRA5XCueC7gWMrs+Gx2tlZn9hcl8zudfh00lhJPY1DE7NmZ6bDsT9g2yey8mXljA==", + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "license": "MIT", + "peer": true, + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/react": { + "version": "19.2.8", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.8.tgz", + "integrity": "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-accessible-treeview": { + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/react-accessible-treeview/-/react-accessible-treeview-2.11.2.tgz", + "integrity": "sha512-qui0g/gBDpP7VbtqelgJezAzAjKOY3IVi1Rq1NRJ7Z627RXKyKiQ4ooxLK2yauxTvNyU0ke9S0a2d9YUMbJJbA==", + "license": "MIT", + "peerDependencies": { + "classnames": "^2.2.6", + "prop-types": "^15.7.2", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/react-data-grid": { + "version": "7.0.0-beta.61", + "resolved": "https://registry.npmjs.org/react-data-grid/-/react-data-grid-7.0.0-beta.61.tgz", + "integrity": "sha512-YTfOzvj/V/3vMoz7A/kaXFp869j7C8JW5PmH4JAnAsfaa2SMzDeOHvuoGezEDBk1G3nwOFXNVyl9tC9sosEIjA==", + "license": "MIT", + "peerDependencies": { + "react": "^19.2", + "react-dom": "^19.2" + } + }, + "node_modules/react-dom": { + "version": "19.2.8", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.8.tgz", + "integrity": "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.8" + } + }, + "node_modules/react-icons": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.12.0.tgz", + "integrity": "sha512-IBaDuHiShdZqmfc/TwHu6+d6k2ltNCf3AszxNmjJc1KUfXdEeRJOKyNvLmAHaarhzGmTSVygNdyu8/opXv2gaw==", + "license": "MIT", + "peerDependencies": { + "react": "*" + } + }, + "node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT" + }, + "node_modules/react-resizable-panels": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/react-resizable-panels/-/react-resizable-panels-2.1.9.tgz", + "integrity": "sha512-z77+X08YDIrgAes4jl8xhnUu1LNIRp4+E7cv4xHmLOxxUPO/ML7PSrE813b90vj7xvQ1lcf7g2uA9GeMZonjhQ==", + "license": "MIT", + "peerDependencies": { + "react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc", + "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT" + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "license": "MIT" + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/style-mod": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.3.tgz", + "integrity": "sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==", + "license": "MIT" + }, + "node_modules/tsx": { + "version": "4.23.1", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.1.tgz", + "integrity": "sha512-GQHnkIfxyx1wYCOS/wonik5MVRZU9hi1TEZmzGZSCJB1y9YgoZ8H6itNE/u4suE+yLmOzuE4E5S4TZ/ZX2wcWQ==", + "license": "MIT", + "dependencies": { + "esbuild": "~0.28.0" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/tsx/node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/w3c-keyname": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", + "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", + "license": "MIT" + }, + "node_modules/webr": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/webr/-/webr-0.6.0.tgz", + "integrity": "sha512-M2b8m3/ZBk7XMIR7LD97s5k/9jUla83Z0Hl4b+WnrK7XmSMpZdajCiP3XkSzHKHDUgscHKe+lVUvk3aym8q0bw==", + "license": "SEE LICENSE IN LICENCE.md", + "dependencies": { + "@codemirror/autocomplete": "^6.8.1", + "@codemirror/commands": "^6.2.4", + "@codemirror/state": "^6.2.1", + "@codemirror/view": "^6.15.0", + "@msgpack/msgpack": "^2.8.0", + "@xterm/addon-fit": "^0.10.0", + "@xterm/xterm": "^5.5.0", + "classnames": "^2.2.6", + "codemirror": "^6.0.1", + "codemirror-lang-r": "^0.1.0-2", + "jszip": "^3.10.1", + "lezer-r": "^0.1.1", + "lightningcss": "^1.21.5", + "pako": "^2.1.0", + "prop-types": "^15.7.2", + "react": "^18.2.0", + "react-accessible-treeview": "^2.6.1", + "react-data-grid": "^7.0.0-beta.44", + "react-dom": "^18.2.0", + "react-icons": "^4.10.1", + "react-resizable-panels": "^2.0.19", + "tsx": "^4.0.0", + "xmlhttprequest-ssl": "^2.1.0", + "xterm-readline": "^1.1.2" + }, + "engines": { + "node": ">=17.0.0" + } + }, + "node_modules/webr/node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webr/node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/webr/node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/xmlhttprequest-ssl": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.1.2.tgz", + "integrity": "sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/xterm-readline": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/xterm-readline/-/xterm-readline-1.2.2.tgz", + "integrity": "sha512-+jKS8fkP1kF7cNWyznAt2TvLB8/MzPMO4T/ON5FgsRQQfE87YO/Krh0sGnpPxr4B5Isipyt66RDJS+4eEy1RYw==", + "license": "MIT", + "dependencies": { + "string-width": "^4" + }, + "peerDependencies": { + "@xterm/xterm": "^5.5.0 || ^6.0.0" + } + } + } +} diff --git a/tests/webr/package.json b/tests/webr/package.json new file mode 100644 index 00000000..f65a28c4 --- /dev/null +++ b/tests/webr/package.json @@ -0,0 +1,9 @@ +{ + "name": "myio-webr-gate", + "private": true, + "type": "module", + "dependencies": { + "playwright": "1.62.0", + "webr": "0.6.0" + } +} diff --git a/tests/webr/verify.mjs b/tests/webr/verify.mjs new file mode 100644 index 00000000..97aca8e9 --- /dev/null +++ b/tests/webr/verify.mjs @@ -0,0 +1,179 @@ +import { createServer } from "node:http"; +import { readFile } from "node:fs/promises"; +import { extname, resolve, sep } from "node:path"; +import { fileURLToPath } from "node:url"; +import { chromium } from "playwright"; +import { WebR } from "webr"; + +const root = resolve(fileURLToPath(new URL("../..", import.meta.url))); +const repo = resolve(process.argv[2] || "_webr-repo"); +const testedWebR = "0.6.0"; + +function contentType(path) { + return ({ + ".css": "text/css; charset=utf-8", + ".gz": "application/gzip", + ".html": "text/html; charset=utf-8", + ".js": "text/javascript; charset=utf-8", + ".json": "application/json; charset=utf-8", + ".rds": "application/octet-stream", + ".wasm": "application/wasm" + })[extname(path).toLowerCase()] || "application/octet-stream"; +} + +function safePath(base, relative) { + const target = resolve(base, relative); + if (target !== base && !target.startsWith(base + sep)) { + throw new Error("Path escapes test root"); + } + return target; +} + +function verificationPage() { + return ` + + + + myIO WebR verification + + + + + +
+ + +`; +} + +async function listen(payload) { + const server = createServer(async (request, response) => { + response.setHeader("Access-Control-Allow-Origin", "*"); + try { + const url = new URL(request.url || "/", "http://127.0.0.1"); + if (url.pathname === "/payload.json") { + response.writeHead(200, { "content-type": "application/json; charset=utf-8" }); + response.end(payload); + return; + } + if (url.pathname === "/verify.html" || url.pathname === "/") { + response.writeHead(200, { "content-type": "text/html; charset=utf-8" }); + response.end(verificationPage()); + return; + } + + let file; + if (url.pathname.startsWith("/repo/")) { + file = safePath(repo, decodeURIComponent(url.pathname.slice("/repo/".length))); + } else if (url.pathname.startsWith("/assets/")) { + file = safePath(root, decodeURIComponent(url.pathname.slice("/assets/".length))); + } else { + response.writeHead(404); + response.end("not found"); + return; + } + const body = await readFile(file); + response.writeHead(200, { "content-type": contentType(file) }); + response.end(body); + } catch (error) { + response.writeHead(404); + response.end(String(error)); + } + }); + await new Promise((resolveListen, reject) => { + server.once("error", reject); + server.listen(0, "127.0.0.1", resolveListen); + }); + const address = server.address(); + if (!address || typeof address === "string") throw new Error("WebR test server did not bind"); + return { server, url: `http://127.0.0.1:${address.port}` }; +} + +let browser; +let server; +let webR; +try { + const bootstrap = await listen("null"); + server = bootstrap.server; + const baseUrl = bootstrap.url; + + webR = new WebR(); + await webR.init(); + if (webR.version !== testedWebR) { + throw new Error(`Expected WebR ${testedWebR}, received ${webR.version}`); + } + await webR.installPackages("myIO", { + repos: [`${baseUrl}/repo`, "https://repo.r-wasm.org"], + quiet: true + }); + const payload = await webR.evalRString(` + suppressPackageStartupMessages(library(myIO)) + widget <- myIO(data.frame(x = c(1, 2, 3), y = c(2, 4, 8))) |> + addIoLayer( + type = "point", + label = "WebR points", + mapping = list(x_var = "x", y_var = "y") + ) + jsonlite::toJSON( + widget$x, + auto_unbox = TRUE, + dataframe = "rows", + null = "null", + na = "null", + digits = NA + ) + `); + const parsed = JSON.parse(payload); + if (parsed.config.specVersion !== 2 || parsed.config.layers.length !== 1) { + throw new Error("WebR produced an invalid myIO widget payload"); + } + + await new Promise((resolveClose) => server.close(resolveClose)); + const render = await listen(payload); + server = render.server; + + browser = await chromium.launch({ headless: true }); + const page = await browser.newPage(); + const runtimeErrors = []; + page.on("pageerror", (error) => runtimeErrors.push(`page: ${error}`)); + page.on("console", (message) => { + if (message.type() === "error") runtimeErrors.push(`console: ${message.text()}`); + }); + await page.goto(`${render.url}/verify.html`); + await page.waitForFunction(() => window.__myioWebRReady === true || window.__myioWebRError, null, { + timeout: 15_000 + }); + const pageFailure = await page.evaluate(() => window.__myioWebRError || null); + if (pageFailure) runtimeErrors.push(pageFailure); + const svgVisible = await page.locator("#chart svg.myIO-svg").isVisible(); + const pointCount = await page.locator("#chart circle[class^='tag-point']").count(); + if (!svgVisible) runtimeErrors.push("production bundle did not render a visible SVG"); + if (pointCount !== 3) runtimeErrors.push(`expected 3 point marks, received ${pointCount}`); + if (runtimeErrors.length) throw new Error(runtimeErrors.join("\n")); + + console.log(`WebR ${testedWebR}: library load, payload transfer, and Chromium render passed`); +} finally { + if (browser) await browser.close(); + if (webR) webR.close(); + if (server?.listening) await new Promise((resolveClose) => server.close(resolveClose)); +} diff --git a/vignettes/articles/sequential-storytelling.Rmd b/vignettes/articles/sequential-storytelling.Rmd new file mode 100644 index 00000000..10eb4fe5 --- /dev/null +++ b/vignettes/articles/sequential-storytelling.Rmd @@ -0,0 +1,145 @@ +--- +title: "Sequential Storytelling with Keyframes" +--- + +```{r setup, include = FALSE} +knitr::opts_chunk$set(collapse = TRUE, comment = "#>") +library(myIO) +``` + +Keyframes turn a chart into a short sequence of named data states. The chart +uses its first registered frame initially. With two or more frames, myIO adds a +separate previous, play/pause, and next control surface with the active label. +Playback advances once, waits one second after each transition, and stops at +the final frame. + +## A single-layer story + +Build the layer first, then register each state with `addKeyframe()`. A data +frame is accepted directly when the chart has exactly one serialized layer. + +```{r single-layer} +start <- data.frame(year = 2024:2026, value = c(18, 22, 25)) +growth <- data.frame(year = 2024:2026, value = c(18, 28, 39)) +outlook <- data.frame(year = 2024:2026, value = c(18, 31, 48)) + +myIO(start) |> + addIoLayer( + type = "line", label = "Revenue", color = "#4E79A7", + mapping = list(x_var = "year", y_var = "value") + ) |> + addKeyframe(start, "Baseline") |> + addKeyframe(growth, "Growth case") |> + addKeyframe(outlook, "Outlook") |> + setTransition(duration = 500, easing = "cubic") |> + setAxisFormat(xLabel = "Year", yLabel = "Revenue") +``` + +Labels must be unique, non-empty strings. Registering a keyframe before any +layer exists is an error, as is passing a data frame after the chart has more +than one serialized layer. + +## Complete multi-layer snapshots + +For a multi-layer chart, pass a named list keyed by existing layer labels. Each +stored keyframe is a complete snapshot. If a frame omits a layer, that layer +retains its data from the preceding frame. + +```{r multi-layer} +actual_1 <- data.frame(month = 1:3, value = c(10, 13, 17)) +actual_2 <- data.frame(month = 1:4, value = c(10, 13, 17, 22)) +target_1 <- data.frame(month = 1:3, value = c(12, 15, 18)) +target_2 <- data.frame(month = 1:4, value = c(12, 15, 18, 21)) + +myIO() |> + addIoLayer( + type = "line", label = "Actual", data = actual_1, + mapping = list(x_var = "month", y_var = "value") + ) |> + addIoLayer( + type = "line", label = "Target", data = target_1, + mapping = list(x_var = "month", y_var = "value") + ) |> + addKeyframe( + list(Actual = actual_1, Target = target_1), + "Quarter opening" + ) |> + addKeyframe( + list(Actual = actual_2), + "Latest actuals" + ) |> + addKeyframe( + list(Actual = actual_2, Target = target_2), + "Revised target" + ) +``` + +The `Target` layer in `Latest actuals` carries forward from `Quarter opening`. +Unknown layer names, unnamed lists, non-data-frame values, and duplicate frame +labels fail in R before a widget is serialized. + +## Transforms are applied per frame + +Keyframe inputs are source data. myIO applies the layer's configured R +transform before storing the snapshot, exactly as it does when the layer is +created. + +```{r transforms} +observed <- data.frame(x = 1:20, y = (1:20) + sin(1:20)) +projected <- data.frame(x = 1:20, y = (1:20) * 1.4 + cos(1:20)) + +myIO(observed) |> + addIoLayer( + type = "line", label = "Trend", transform = "lm", + mapping = list(x_var = "x", y_var = "y") + ) |> + addKeyframe(observed, "Observed trend") |> + addKeyframe(projected, "Projected trend") +``` + +## Select and step from Shiny + +The proxy methods use the same chart instance registry as `updateMyIOData()`. +`setKeyframe()` accepts a unique label or a one-based index. Steps clamp at the +first and final frames. + +```{r shiny, eval = FALSE} +ui <- shiny::fluidPage( + myIOOutput("story"), + shiny::actionButton("next_frame", "Next"), + shiny::actionButton("show_baseline", "Baseline") +) + +server <- function(input, output, session) { + output$story <- renderMyIO({ + myIO(start) |> + addIoLayer("line", label = "Revenue", + mapping = list(x_var = "year", y_var = "value")) |> + addKeyframe(start, "Baseline") |> + addKeyframe(growth, "Growth case") |> + addKeyframe(outlook, "Outlook") + }) + + shiny::observeEvent(input$next_frame, { + myIOProxy("story", session) |> stepKeyframe("next") + }) + shiny::observeEvent(input$show_baseline, { + myIOProxy("story", session) |> setKeyframe("Baseline") + }) +} + +shiny::shinyApp(ui, server) +``` + +## Motion, accessibility, and export + +Buttons support normal keyboard activation, show a visible focus indicator, +and announce the active label through a polite live region. The controls wrap +on narrow containers and are excluded from print and chart exports. + +`setTransition(duration = 0)` renders each state immediately. The same +zero-duration behavior is applied when the viewer requests reduced motion; +manual stepping and one-pass playback remain available in both cases. Timers +are cleared on pause, widget re-render, and destruction. Legend visibility, +brush, zoom, and toggle state are preserved because frame changes use the +existing in-place data update path. From 327df6c32d897664db50924b42501564391d5e58 Mon Sep 17 00:00:00 2001 From: Ryan Morton Date: Tue, 28 Jul 2026 19:08:15 -0600 Subject: [PATCH 2/9] [engine-additive] test: harden keyframe lifecycle contracts --- R/addKeyframe.R | 3 ++- tests/js/keyframes.test.js | 27 +++++++++++++++++++++++++++ tests/js/myio-proxy.test.js | 3 +++ tests/playwright/keyframes.spec.ts | 13 +++++++++++++ tests/testthat/test_keyframes.R | 1 + 5 files changed, 46 insertions(+), 1 deletion(-) diff --git a/R/addKeyframe.R b/R/addKeyframe.R index 2e009f35..c60705a2 100644 --- a/R/addKeyframe.R +++ b/R/addKeyframe.R @@ -123,7 +123,8 @@ setKeyframe <- function(proxy, frame) { valid_character <- is.character(frame) && length(frame) == 1L && !is.na(frame) && nzchar(trimws(frame)) valid_numeric <- is.numeric(frame) && length(frame) == 1L && !is.na(frame) && - is.finite(frame) && frame >= 1 && frame == floor(frame) + is.finite(frame) && frame >= 1 && frame <= .Machine$integer.max && + frame == floor(frame) if (!valid_character && !valid_numeric) { if (is.numeric(frame) && length(frame) == 1L && !is.na(frame) && frame < 1) { stop("setKeyframe(): numeric frame must be a positive one-based index.", diff --git a/tests/js/keyframes.test.js b/tests/js/keyframes.test.js index e179d5e9..c05f29fa 100644 --- a/tests/js/keyframes.test.js +++ b/tests/js/keyframes.test.js @@ -98,6 +98,22 @@ describe("keyframe controller", () => { expect(chart.runtime.keyframeTimer).toBeNull(); }); + test("reinitializing clears playback and preserves unrelated runtime state", () => { + const chart = chartWithFrames(); + chart.runtime.brushState = { active: true }; + chart.runtime.zoomState = { k: 2 }; + initializeKeyframes(chart); + toggleKeyframePlayback(chart); + initializeKeyframes(chart); + vi.advanceTimersByTime(5000); + + expect(chart.runtime.keyframePlaying).toBe(false); + expect(chart.runtime.keyframeTimer).toBeNull(); + expect(chart.runtime.keyframeIndex).toBe(0); + expect(chart.runtime.brushState).toEqual({ active: true }); + expect(chart.runtime.zoomState).toEqual({ k: 2 }); + }); + test("does nothing for zero or one frame", () => { const chart = chartWithFrames(); chart.config.keyframes = []; @@ -108,4 +124,15 @@ describe("keyframe controller", () => { initializeKeyframes(chart); expect(document.querySelector(".myIO-keyframe-controls")).toBeNull(); }); + + test("malformed selections and steps are safe no-ops", () => { + const chart = chartWithFrames(); + initializeKeyframes(chart); + + expect(selectKeyframe(chart, null)).toBe(false); + expect(selectKeyframe(chart, 0)).toBe(false); + expect(selectKeyframe(chart, 1.5)).toBe(false); + expect(stepKeyframe(chart, "sideways")).toBe(false); + expect(chart.runtime.keyframeIndex).toBe(0); + }); }); diff --git a/tests/js/myio-proxy.test.js b/tests/js/myio-proxy.test.js index 2128de6b..2266db9e 100644 --- a/tests/js/myio-proxy.test.js +++ b/tests/js/myio-proxy.test.js @@ -106,6 +106,9 @@ describe("proxy message handler wiring", () => { id: "chartA", action: "select", frame: "End" }); expect(fakeChart.updateData).toHaveBeenLastCalledWith(payload.layers); + expect(() => handlers["myio:keyframe-control"](null)).not.toThrow(); + expect(() => handlers["myio:keyframe-control"]({ id: "missing", action: "step" })).not.toThrow(); + expect(() => handlers["myio:keyframe-control"]({ id: "chartA", action: "unknown" })).not.toThrow(); // unknown id is a no-op expect(() => handlers["myio:proxy-update"]({ id: "missing", layers: [] })).not.toThrow(); diff --git a/tests/playwright/keyframes.spec.ts b/tests/playwright/keyframes.spec.ts index b614c738..25851891 100644 --- a/tests/playwright/keyframes.spec.ts +++ b/tests/playwright/keyframes.spec.ts @@ -75,3 +75,16 @@ test("reduced motion keeps playback functional with zero-duration updates", asyn await expect(page.locator("circle[class^='tag-point']")).toHaveCount(3); expect(await page.evaluate(() => (window as any).__chart.config.transitions.speed)).toBe(0); }); + +test("controls remain accessible and contained on narrow and print layouts", async ({ page }) => { + await page.setViewportSize({ width: 280, height: 620 }); + await ready(page); + const controls = page.locator(".myIO-keyframe-controls"); + const next = page.getByRole("button", { name: "Next keyframe" }); + await next.focus(); + + expect(await controls.evaluate((node) => node.scrollWidth <= node.clientWidth)).toBe(true); + expect(await next.evaluate((node) => getComputedStyle(node).boxShadow)).not.toBe("none"); + await page.emulateMedia({ media: "print" }); + await expect(controls).toBeHidden(); +}); diff --git a/tests/testthat/test_keyframes.R b/tests/testthat/test_keyframes.R index 2f399a26..3f166824 100644 --- a/tests/testthat/test_keyframes.R +++ b/tests/testthat/test_keyframes.R @@ -88,6 +88,7 @@ test_that("keyframe proxy helpers emit stable Shiny message payloads", { expect_error(setKeyframe(list(), "After"), "myIOProxy") expect_error(setKeyframe(proxy, 0), "positive") + expect_error(setKeyframe(proxy, .Machine$integer.max + 1), "positive") expect_error(setKeyframe(proxy, c("a", "b")), "single") expect_error(stepKeyframe(proxy, "sideways"), "arg") }) From b4347a026e0aec88a5126fe4031e87e044a565cc Mon Sep 17 00:00:00 2001 From: Ryan Morton Date: Tue, 28 Jul 2026 19:09:23 -0600 Subject: [PATCH 3/9] ci: pin the WebR resolver patch by commit --- tests/webr/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/webr/Dockerfile b/tests/webr/Dockerfile index d3bf8c2f..63189a86 100644 --- a/tests/webr/Dockerfile +++ b/tests/webr/Dockerfile @@ -2,6 +2,6 @@ FROM ghcr.io/r-wasm/webr:v0.6.0 # webR 0.6.0 currently ships pkgdepends 0.9.1, which is affected by # r-lib/pkgdepends#462 and cannot resolve local package references. This is the -# upstream-provided patched tag referenced by r-wasm/rwasm#56. Remove this pin -# after the fix is included in a released pkgdepends version and WebR image. -RUN R -q -e 'pak::pak("r-lib/pkgdepends@v0.9.0-patched", lib = .Library)' +# upstream-provided patched commit referenced by r-wasm/rwasm#56. Remove this +# pin after the fix is included in a released pkgdepends version and WebR image. +RUN R -q -e 'pak::pak("r-lib/pkgdepends@fa3730e67dc3efe72949740079d50188b2ef79aa", lib = .Library)' From da7a5d56981966a53eac975203615115c80798e3 Mon Sep 17 00:00:00 2001 From: Ryan Morton Date: Tue, 28 Jul 2026 19:12:17 -0600 Subject: [PATCH 4/9] [engine-additive] fix: support treemap keyframe snapshots --- inst/htmlwidgets/myIO/myIOapi.js | 2 +- inst/htmlwidgets/myIO/src/Chart.js | 10 ++++++---- .../myIO/src/interactions/keyframes.js | 9 ++++++--- tests/js/keyframes.test.js | 14 ++++++++++++++ tests/js/myio-proxy.test.js | 12 ++++++++++++ tests/testthat/test_keyframes.R | 16 ++++++++++++++++ 6 files changed, 55 insertions(+), 8 deletions(-) diff --git a/inst/htmlwidgets/myIO/myIOapi.js b/inst/htmlwidgets/myIO/myIOapi.js index 013653d0..203b5fd7 100644 --- a/inst/htmlwidgets/myIO/myIOapi.js +++ b/inst/htmlwidgets/myIO/myIOapi.js @@ -730,7 +730,7 @@ void main() { `}return w}var s=i(r),a=new Blob([s],{type:"text/csv;charset=utf-8;"}),d=document.createElement("a");if(d.download!==void 0){var m=URL.createObjectURL(a);d.setAttribute("href",m),d.setAttribute("download",t),d.style.visibility="hidden",document.body.appendChild(d),d.click(),document.body.removeChild(d)}}var ay=["--chart-text-color","--chart-font","--chart-annotation-font-size","--chart-grid-color","--chart-grid-opacity","--chart-bg","--chart-ref-line-color","--chart-ref-line-width","--chart-cursor-rule-color","--chart-cursor-rule-width","--chart-annotation-ring","--chart-primary-color","--chart-brush-fill","--chart-brush-stroke","--chart-brush-dim-opacity","--chart-legend-inactive-opacity","--chart-status-bar-color"];function oy(t,e){for(var r=getComputedStyle(e),i={},s=0;s-1&&i.indexOf(a)===-1,kind:s.type}})}}function C_(t){var e=t.colorContinuous||t.derived&&t.derived.colorContinuous;return{type:"continuous",items:[],colorScale:e||null,domain:e&&typeof e.domain=="function"?e.domain():null}}var Fu=16,pd=12,ly=6,L_=18,N_=6,Vh=12,cy=14,A6=180;function Cf(t){var e=t.svg&&t.svg.node?t.svg.node():null;if(e&&e.querySelector&&e.querySelector(".myIO-inline-legend"))return{extraHeight:0,cleanup:function(){}};var r=hd(t,t.runtime&&t.runtime._legendState);if(!r||!r.type)return{extraHeight:0,cleanup:function(){}};var i=r.items?r.items.filter(function(I){return I.visible!==!1}):[];if(r.type!=="continuous"&&i.length===0)return{extraHeight:0,cleanup:function(){}};var s=t.svg.node(),a=parseFloat(s.getAttribute("width"))||t.totalWidth||t.width,d=parseFloat(s.getAttribute("height"))||t.height,m=s.getAttribute("viewBox"),v=k_(t),_=document.createElementNS("http://www.w3.org/2000/svg","g");_.setAttribute("class","myIO-export-legend");var x;r.type==="continuous"?x=R_(_,r,a,v):x=D_(_,i,a,v),_.setAttribute("transform","translate(0,"+d+")");var w=d+x;return s.appendChild(_),s.setAttribute("height",w),s.setAttribute("viewBox","0 0 "+a+" "+w),{extraHeight:x,cleanup:function(){s.removeChild(_),s.setAttribute("height",d),s.setAttribute("viewBox",m)}}}function D_(t,e,r,i){var s=r-Fu*2,a=Fu,d=Fu,m=Math.max(pd,Vh);return e.forEach(function(v){var _=B_(v.label,Vh),x=pd+ly+_;a+x>Fu+s&&a>Fu&&(a=Fu,d+=m+N_);var w=document.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",a),w.setAttribute("y",d),w.setAttribute("width",pd),w.setAttribute("height",pd),w.setAttribute("rx",2),w.setAttribute("fill",v.color||"#6b7280"),t.appendChild(w);var I=document.createElementNS("http://www.w3.org/2000/svg","text");I.setAttribute("x",a+pd+ly),I.setAttribute("y",d+pd-1),I.setAttribute("font-family","Roboto, Arial, sans-serif"),I.setAttribute("font-size",Vh),I.setAttribute("fill",i),I.textContent=v.label,t.appendChild(I),a+=x+L_}),d+m+Fu}function R_(t,e,r,i){var s=e.colorScale;if(!s)return 0;var a=e.domain||s.domain(),d=Fu,m=(r-A6)/2,v=document.createElementNS("http://www.w3.org/2000/svg","defs"),_=document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),x="export-legend-grad-"+Date.now();_.setAttribute("id",x);for(var w=8,I=a[0],O=a[a.length-1],z=0;z"u"||!/MSIE [1-9]\./.test(navigator.userAgent)){var e=t.document,r=function(){return t.URL||t.webkitURL||t},i=e.createElementNS("http://www.w3.org/1999/xhtml","a"),s="download"in i,a=function(re){var q=new MouseEvent("click");re.dispatchEvent(q)},d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),m=t.webkitRequestFileSystem,v=t.requestFileSystem||m||t.mozRequestFileSystem,_=function(re){(t.setImmediate||t.setTimeout)(function(){throw re},0)},x="application/octet-stream",w=0,I=4e4,O=function(re){var q=function(){typeof re=="string"?r().revokeObjectURL(re):re.remove()};setTimeout(q,I)},z=function(re,q,ue){q=[].concat(q);for(var K=q.length;K--;){var B=re["on"+q[K]];if(typeof B=="function")try{B.call(re,ue||re)}catch(he){_(he)}}},J=function(re){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(re.type)?new Blob(["\uFEFF",re],{type:re.type}):re},Q=function(re,q,ue){ue||(re=J(re));var K,B,he,He=this,er=re.type,Er=!1,zt=function(){z(He,"writestart progress write writeend".split(" "))},_n=function(){if(B&&d&&typeof FileReader<"u"){var On=new FileReader;return On.onloadend=function(){var bn=On.result;B.location.href="data:attachment/file"+bn.slice(bn.search(/[,;]/)),He.readyState=He.DONE,zt()},On.readAsDataURL(re),void(He.readyState=He.INIT)}if((Er||!K)&&(K=r().createObjectURL(re)),B)B.location.href=K;else{var cr=t.open(K,"_blank");cr===void 0&&d&&(t.location.href=K)}He.readyState=He.DONE,zt(),O(K)},$r=function(On){return function(){return He.readyState!==He.DONE?On.apply(this,arguments):void 0}},In={create:!0,exclusive:!1};return He.readyState=He.INIT,q||(q="download"),s?(K=r().createObjectURL(re),void setTimeout(function(){i.href=K,i.download=q,a(i),zt(),O(K),He.readyState=He.DONE})):(t.chrome&&er&&er!==x&&(he=re.slice||re.webkitSlice,re=he.call(re,0,re.size,x),Er=!0),m&&q!=="download"&&(q+=".download"),(er===x||m)&&(B=t),v?(w+=re.size,void v(t.TEMPORARY,w,$r(function(On){On.root.getDirectory("saved",In,$r(function(cr){var bn=function(){cr.getFile(q,In,$r(function(mn){mn.createWriter($r(function(qn){qn.onwriteend=function(Wt){B.location.href=mn.toURL(),He.readyState=He.DONE,z(He,"writeend",Wt),O(mn)},qn.onerror=function(){var Wt=qn.error;Wt.code!==Wt.ABORT_ERR&&_n()},"writestart progress write abort".split(" ").forEach(function(Wt){qn["on"+Wt]=He["on"+Wt]}),qn.write(re),He.abort=function(){qn.abort(),He.readyState=He.DONE},He.readyState=He.WRITING}),_n)}),_n)};cr.getFile(q,{create:!1},$r(function(mn){mn.remove(),bn()}),$r(function(mn){mn.code===mn.NOT_FOUND_ERR?bn():_n()}))}),_n)}),_n)):void _n())},oe=Q.prototype,se=function(re,q,ue){return new Q(re,q,ue)};return typeof navigator<"u"&&navigator.msSaveOrOpenBlob?function(re,q,ue){return ue||(re=J(re)),navigator.msSaveOrOpenBlob(re,q||"download")}:(oe.abort=function(){var re=this;re.readyState=re.DONE,z(re,"abort")},oe.readyState=oe.INIT=0,oe.WRITING=1,oe.DONE=2,oe.error=oe.onwritestart=oe.onprogress=oe.onwrite=oe.onabort=oe.onerror=oe.onwriteend=null,se)}})(typeof self<"u"&&self||typeof window<"u"&&window||(void 0).content);var md=null;function uy(){return window.jspdf&&window.jspdf.jsPDF?Promise.resolve(window.jspdf.jsPDF):md||(md=new Promise(function(t,e){for(var r=document.querySelectorAll("script[src]"),i=null,s=0;sd?"landscape":"portrait",O=I==="landscape"?842:595,z=I==="landscape"?595:842,J=36,Q=O-2*J,oe=z-2*J,se=Math.min(Q/a,oe/d),re=a*se,q=d*se,ue=new e({orientation:I,unit:"pt",format:[O,z]}),K=t.config.export&&t.config.export.title||t.config.axes&&t.config.axes.xAxisLabel||"myIO Chart";ue.setProperties({title:K,creator:"myIO"});var B=(O-re)/2,he=(z-q)/2;ue.addImage(w,"PNG",B,he,re,q),ue.save(t.element.id+".pdf"),v(!0)},x.readAsDataURL(_)})})})}async function dy(t){var e=Cf(t),r=Of(t.svg.node());e.cleanup();try{if(navigator.clipboard&&navigator.clipboard.write&&typeof ClipboardItem<"u"){var i=new Blob([r],{type:"image/svg+xml"}),s=new Blob([r],{type:"text/html"});await navigator.clipboard.write([new ClipboardItem({"text/html":s,"image/svg+xml":i})])}else await navigator.clipboard.writeText(r);return!0}catch(a){return console.warn("[myIO] Clipboard copy failed",a),!1}}async function hy(t){var e=Cf(t),r=t.height+e.extraHeight,i=Of(t.svg.node());e.cleanup();var s=(t.totalWidth||t.width)*2,a=r*2;return new Promise(function(d){dd(i,s,a,"png",function(m){navigator.clipboard&&navigator.clipboard.write&&typeof ClipboardItem<"u"?navigator.clipboard.write([new ClipboardItem({"image/png":m})]).then(function(){d(!0)}).catch(function(){d(!1)}):d(!1)})})}var Mu={chart:"Download data",image:"Save image",svg:"Save as SVG",pdf:"Export as PDF",clipboard:"Copy to clipboard","clipboard-png":"Copy as PNG","clipboard-svg":"Copy as SVG",percent:"Toggle percent",group2stack:"Toggle layout"};function T6(t,e,r){if(r==="image"){var i=Cf(t),s=t.height+i.extraHeight,a=Of(t.svg.node());i.cleanup(),dd(a,2*t.width,2*s,"png",function(I){V0(I,t.element.id+".png")});return}if(r==="svg"){var d=Cf(t),m=Of(t.svg.node());d.cleanup();var v=new Blob([m],{type:"image/svg+xml;charset=utf-8"});V0(v,t.element.id+".svg");return}if(r==="chart"){var _=[],x=t.runtime._brushed;x&&x.data.length>0&&t.config.interactions.brush&&t.config.interactions.brush.onSelect==="export"?_.push(x.data):t.plotLayers.forEach(function(I){_.push(I.data)}),P0(t.element.id+"_data.csv",[].concat.apply([],_));return}if(r==="pdf"){fy(t);return}if(r==="clipboard"||r==="clipboard-png"){hy(t);return}if(r==="clipboard-svg"){dy(t);return}if(r==="percent"){var w=t.runtime.activeY===t.options.toggleY[0]?[t.plotLayers[0].mapping.y_var,t.options.yAxisFormat]:t.options.toggleY;t.toggleVarY(w);return}r==="group2stack"&&t.toggleGroupedLayout(e)}function X2(t){return'"}function py(){return X2('')}function my(){return X2('')}function gy(){return X2('')}function I6(){return X2('')}function yy(){return X2('PDF')}function O6(){return X2('')}function C6(){return X2('')}var F_=10,M_=2;function L6(t){return Math.min(190,46+String(t).length*7)}function G0(t){var e={};return(t||[]).filter(function(r){var i=r.key||r.label;return e[i]?!1:(e[i]=!0,!0)})}function j0(t){return String(t.label||t.key||"")}function q0(t){if(!t)return 0;var e=t.runtime&&t.runtime.totalWidth||t.totalWidth||t.width||0,r=t.margin||{};return e-(r.left||0)-(r.right||0)}function N6(t,e){if(!Array.isArray(t)||t.length===0||!(e>0))return null;for(var r=[],i=0,s=0,a=0;ae||s>0&&s+d>e&&(i+=1,s=0,i>=M_))return null;r.push({row:i,x:s}),s+=d}return{rowCount:i+1,positions:r}}function H0(t){var e=t||{},r=Array.isArray(e.labels)?e.labels:[];return e.suppressLegend===!0?{inline:!1,panel:!1,reason:"suppressed"}:e.type?e.type==="continuous"?{inline:!1,panel:!0,reason:"continuous"}:r.length<2?{inline:!1,panel:!0,reason:"too-few-items"}:r.length>F_?{inline:!1,panel:!0,reason:"too-many-items"}:N6(r,e.availableWidth)===null?{inline:!1,panel:!0,reason:"too-narrow"}:{inline:!0,panel:!1,reason:"inline-active"}:{inline:!1,panel:!1,reason:"no-legend"}}function Gh(t,e){t.runtime||(t.runtime={});var r=Array.isArray(t.runtime._hiddenLayerKeys)?t.runtime._hiddenLayerKeys.slice():[],i=r.indexOf(e.key);i===-1?r.push(e.key):r.splice(i,1),t.runtime._hiddenLayerKeys=r,t.derived=t.derived||{},t.derived.currentLayers=(t.plotLayers||[]).filter(function(s){return r.indexOf(s._composite||s.label)===-1}),t.syncLegacyAliases(),t.renderCurrentLayers()}function jh(t,e,r){t.runtime||(t.runtime={}),Array.isArray(t.runtime._hiddenOrdinalSegments)||(t.runtime._hiddenOrdinalSegments=[]);var i=t.runtime._hiddenOrdinalSegments,s=i.indexOf(e.key);s===-1?i.push(e.key):i.splice(s,1),vy(t),typeof r=="function"&&r(t)}function by(t,e,r){t.runtime=t.runtime||{},e==="ordinal"?(t.runtime._hiddenOrdinalSegments=[],vy(t),typeof r=="function"&&r(t)):(t.runtime._hiddenLayerKeys=[],t.derived=t.derived||{},t.derived.currentLayers=(t.plotLayers||[]).slice(),t.syncLegacyAliases(),t.renderCurrentLayers())}function vy(t){t.runtime._suppressOrdinalLegendRebuild=!0;try{t.routeLayers(t.currentLayers||t.derived&&t.derived.currentLayers||[])}finally{t.runtime._suppressOrdinalLegendRebuild=!1}}var _y="myIO-panel--open",xy="myIO-sheet-backdrop--open",$_="myIO-panel--bottom",P_="myIO-panel--side";function D6(t){if(!t||!t.element||(d3.select(t.element).select(".myIO-fab").remove(),Y_(t)))return null;t.dom=t.dom||{};var e=d3.select(t.element).append("button").attr("type","button").attr("class","myIO-fab").attr("aria-label","Legend and actions").attr("aria-expanded","false").html(I6());return e.on("click",function(){z0(t)}),e.on("keydown",function(r){(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),z0(t))}),t.dom.fab=e,W0(t),e}function z0(t){if(!t||!t.element)return null;if(t.dom=t.dom||{},t.runtime=t.runtime||{},t.runtime._sheetCloseTimer&&(clearTimeout(t.runtime._sheetCloseTimer),t.runtime._sheetCloseTimer=null),t.runtime._sheetOpen)return t.dom.panel||null;Ty(t);var e=d3.select(t.element).append("div").attr("class","myIO-sheet-backdrop").attr("aria-hidden","true").on("click",function(){$u(t)}),r=d3.select(t.element).append("div").attr("class","myIO-panel "+(id(t)?$_:P_)).attr("role","dialog").attr("aria-modal","true").attr("aria-label",X_(t)).attr("tabindex","-1"),i=r.append("div").attr("class","myIO-sheet-header");if(i.append("div").attr("class","myIO-sheet-handle"),i.append("button").attr("type","button").attr("class","myIO-sheet-close").attr("aria-label","Close").html(Oy()).on("click",function(){$u(t)}).on("keydown",function(a){(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),$u(t))}),t.dom.backdrop=e,t.dom.panel=r,t.dom.sheetLegendSection=null,t.dom.sheetLegendBody=null,t.dom.sheetActionsBody=null,Ey(t).panel){var s=r.append("div").attr("class","myIO-sheet-legend-section").attr("data-sheet-section","legend");t.dom.sheetLegendSection=s,t.dom.sheetLegendBody=s.append("div").attr("class","myIO-sheet-legend"),s.append("hr").attr("class","myIO-sheet-divider")}return t.dom.sheetActionsBody=r.append("div").attr("class","myIO-sheet-actions").attr("data-sheet-section","actions"),Lf(t),U_(t),t.runtime._sheetOpen=!0,W_(t),W0(t),window.requestAnimationFrame(function(){e.classed(xy,!0),r.classed(_y,!0),J_(r.node())}),z_(t),r}function $u(t,e){if(!(!t||!t.dom)){var r=e||{};t.runtime||(t.runtime={}),t.runtime._sheetCloseTimer&&(clearTimeout(t.runtime._sheetCloseTimer),t.runtime._sheetCloseTimer=null),t.dom.backdrop&&t.dom.backdrop.classed(xy,!1),t.dom.panel&&t.dom.panel.classed(_y,!1),Ay(t),t.runtime._sheetOpen=!1,W0(t);var i=function(){Ty(t),t.runtime._sheetCloseTimer=null,W0(t),r.returnFocus!==!1&&t.dom.fab&&typeof t.dom.fab.node=="function"&&t.dom.fab.node()&&t.dom.fab.node().focus()};if(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){i();return}var s=t.dom.panel&&t.dom.panel.node?t.dom.panel.node():null,a=t.dom.backdrop&&t.dom.backdrop.node?t.dom.backdrop.node():null;if(!s||!a){i();return}var d=!1,m=function(){d||(d=!0,i())};s.addEventListener("transitionend",m,{once:!0}),a.addEventListener("transitionend",m,{once:!0}),t.runtime._sheetCloseTimer=window.setTimeout(m,350)}}function Lf(t){if(!(!t||!t.dom||!t.dom.panel)){var e=t.dom.sheetLegendBody,r=t.dom.sheetLegendSection;if(e){var i=t.dom.panel.node(),s=i?i.scrollTop:0,a=wy(t);if(e.selectAll("*").remove(),r&&r.selectAll(".myIO-sheet-legend-reset").remove(),!Ey(t).panel){r&&r.style("display","none"),i&&(i.scrollTop=s);return}r&&r.style("display",null),a.type==="continuous"?j_(t,e,a):a.type==="ordinal"?G_(t,e,a):V_(t,e,a),i&&(i.scrollTop=s)}}}function U_(t){if(!(!t.dom||!t.dom.sheetActionsBody)){var e=q_(t),r=t.dom.sheetActionsBody;r.selectAll("*").remove(),e.forEach(function(i){var s=r.append("button").attr("type","button").attr("class","myIO-sheet-action").attr("data-action",i.name).on("click",function(){T6(t,t.currentLayers||t.derived&&t.derived.currentLayers||t.plotLayers||[],i.name)}).on("keydown",function(a){(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),T6(t,t.currentLayers||t.derived&&t.derived.currentLayers||t.plotLayers||[],i.name))});s.append("span").attr("class","myIO-sheet-action-icon").attr("aria-hidden","true").html(i.icon),s.append("span").attr("class","myIO-sheet-action-label").text(i.label)})}}function V_(t,e,r){var i=r.items.length>4;e.classed("myIO-sheet-legend--grid",i),r.items.forEach(function(s){var a=e.append("button").attr("type","button").attr("class","myIO-sheet-legend-item").attr("role","switch").attr("aria-checked",s.visible?"true":"false").attr("data-key",s.key).on("click",function(){Gh(t,s)}).on("keydown",function(d){(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),Gh(t,s))});a.append("span").attr("class","myIO-sheet-swatch").style("background-color",s.color),a.append("span").attr("class","myIO-sheet-legend-label").text(s.label)}),Sy(t,r)}function G_(t,e,r){var i=r.items.length>4;e.classed("myIO-sheet-legend--grid",i),r.items.forEach(function(s){var a=e.append("button").attr("type","button").attr("class","myIO-sheet-legend-item").attr("role","switch").attr("aria-checked",s.visible?"true":"false").attr("data-key",s.key).on("click",function(){jh(t,s,Lf)}).on("keydown",function(d){(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),jh(t,s,Lf))});a.append("span").attr("class","myIO-sheet-swatch").style("background-color",s.color),a.append("span").attr("class","myIO-sheet-legend-label").text(s.label)}),Sy(t,r)}function j_(t,e,r){var i=r.colorScale||t.colorContinuous;if(i){var s=r.domain||i.domain(),a=K_(i,s),d=Q_(i,s);e.append("div").attr("class","myIO-sheet-gradient").style("background","linear-gradient(90deg, "+a+")");var m=e.append("div").attr("class","myIO-sheet-gradient-ticks");d.forEach(function(v){m.append("span").text(v)})}}function q_(t){var e=t.currentLayers||t.derived&&t.derived.currentLayers||t.plotLayers||[],r=e[0]?e[0].type:null,i=t.config&&t.config.export,s=[];return(!i||i.csv!==!1)&&s.push({name:"chart",label:Mu.chart,icon:C6()}),(!i||i.png!==!1)&&s.push({name:"image",label:Mu.image,icon:py()}),(!i||i.svg!==!1)&&s.push({name:"svg",label:Mu.svg,icon:C6()}),(!i||i.pdf!==!1)&&s.push({name:"pdf",label:Mu.pdf,icon:yy()}),(!i||i.clipboard!==!1)&&(s.push({name:"clipboard-png",label:Mu["clipboard-png"],icon:O6()}),s.push({name:"clipboard-svg",label:Mu["clipboard-svg"],icon:O6()})),t.options&&t.options.toggleY&&s.push({name:"percent",label:Mu.percent,icon:my()}),t.options&&t.options.toggleY&&r==="groupedBar"&&s.push({name:"group2stack",label:Mu.group2stack,icon:gy()}),s}function Sy(t,e){var r=e.items.some(function(i){return!i.visible});r&&t.dom.sheetLegendSection&&(t.dom.sheetLegendSection.selectAll(".myIO-sheet-legend-reset").remove(),t.dom.sheetLegendSection.append("button").attr("type","button").attr("class","myIO-sheet-legend-reset").text("Show All").on("click",function(){H_(t,e.type)}))}function H_(t,e){by(t,e,Lf)}function Ey(t){var e=wy(t),r=e&&Array.isArray(e.items)?G0(e.items):[];return H0({type:e&&e.type,labels:r.map(j0),suppressLegend:!!(t.options&&t.options.suppressLegend===!0),availableWidth:q0(t)})}function z_(t){var e=t.dom.panel;if(!(!e||!id(t))){var r=e.node(),i=0,s=0,a=!1;r.addEventListener("touchstart",function(d){var m=r.getBoundingClientRect(),v=d.touches[0];v.clientY-m.top>40||(i=v.clientY,s=v.clientY,a=!0,r.style.transition="none")},{passive:!0}),r.addEventListener("touchmove",function(d){if(a){s=d.touches[0].clientY;var m=Math.max(0,s-i);r.style.transform="translateY("+m+"px)"}},{passive:!0}),r.addEventListener("touchend",function(){if(a){a=!1,r.style.transition="";var d=s-i;d>80?$u(t):r.style.transform=""}})}}function wy(t){return t.runtime&&t.runtime._legendData?t.runtime._legendData:hd(t,t.runtime&&t.runtime._legendState)}function W0(t){if(!(!t||!t.dom||!t.dom.fab)){var e=t.runtime&&t.runtime._sheetOpen===!0;t.dom.fab.attr("aria-expanded",e?"true":"false").attr("aria-label",e?"Close legend and actions":"Legend and actions").html(e?Oy():I6())}}function W_(t){Ay(t);var e=function(r){if(!(!t.runtime||!t.runtime._sheetOpen||!t.dom||!t.dom.panel)){if(r.key==="Escape"){r.preventDefault(),$u(t);return}if(r.key==="Tab"){var i=Iy(t.dom.panel.node());if(i.length===0){r.preventDefault(),t.dom.panel.node().focus();return}var s=i[0],a=i[i.length-1],d=document.activeElement;r.shiftKey&&d===s?(r.preventDefault(),a.focus()):!r.shiftKey&&d===a&&(r.preventDefault(),s.focus())}}};t.runtime._sheetEscHandler=e,document.addEventListener("keydown",e)}function Ay(t){!t||!t.runtime||!t.runtime._sheetEscHandler||(document.removeEventListener("keydown",t.runtime._sheetEscHandler),t.runtime._sheetEscHandler=null)}function Ty(t){t.dom&&t.dom.panel&&typeof t.dom.panel.remove=="function"&&t.dom.panel.remove(),t.dom&&t.dom.backdrop&&typeof t.dom.backdrop.remove=="function"&&t.dom.backdrop.remove(),t.dom&&(t.dom.panel=null,t.dom.backdrop=null,t.dom.sheetLegendSection=null,t.dom.sheetLegendBody=null,t.dom.sheetActionsBody=null)}function Y_(t){var e=t&&(t.currentLayers||t.derived&&t.derived.currentLayers||t.plotLayers||[]);return!e||e.length===0}function X_(t){if(t&&t.svg&&typeof t.svg.attr=="function"){var e=t.svg.attr("aria-label");if(e)return e+" controls"}return"Chart controls"}function J_(t){if(t){var e=Iy(t);if(e.length>0){e[0].focus();return}t.focus()}}function Iy(t){return t?Array.from(t.querySelectorAll(["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(","))):[]}function K_(t,e){var r=e[0],i=e[e.length-1],s=8;return Array.from({length:s},function(a,d){var m=s===1?0:d/(s-1),v=r+(i-r)*m;return t(v)+" "+Math.round(m*100)+"%"}).join(", ")}function Q_(t,e){return typeof t.ticks=="function"?t.ticks(5).map(function(r){return String(r)}):[String(e[0]),String(e[e.length-1])]}function Z_(t){return'"}function Oy(){return Z_('')}function Ly(t,e){!t||!t.runtime||t.options&&t.options.suppressLegend===!0||(t.runtime._legendState=e||null,t.runtime._legendData=hd(t,e),R6(t,t.runtime._legendData),t.runtime._sheetOpen&&Lf(t))}function gd(t,e){!t||!t.runtime||t.runtime._suppressOrdinalLegendRebuild||(t.runtime._legendState={ordinalLegend:!0},t.runtime._legendData=U0(t,e),R6(t,t.runtime._legendData),t.runtime._sheetOpen&&Lf(t))}function R6(t,e){if(!(!t||!t.svg)){t.svg.selectAll(".myIO-inline-legend").remove();var r=e&&Array.isArray(e.items)?G0(e.items):[],i=r.map(j0),s=q0(t),a=H0({type:e&&e.type,labels:i,suppressLegend:!!(t.options&&t.options.suppressLegend===!0),availableWidth:s});if(a.inline){var d=N6(i,s),m=Math.max(34,t.height-8-(d.rowCount-1)*16),v=t.svg.append("g").attr("class","myIO-inline-legend").attr("transform","translate("+t.margin.left+","+m+")");r.forEach(function(_,x){var w=i[x],I=d.positions[x],O=_.visible===!1,z=L6(w),J=v.append("g").attr("class","myIO-inline-legend-item").attr("transform","translate("+I.x+","+I.row*16+")").attr("role","switch").attr("aria-checked",O?"false":"true").attr("tabindex",0).attr("data-key",_.key).on("click",function(){Cy(t,e,_)}).on("keydown",function(Q){(Q.key==="Enter"||Q.key===" ")&&(Q.preventDefault(),Cy(t,e,_))});J.append("title").text(w),J.append("rect").attr("class","myIO-inline-legend-hit").attr("x",-3).attr("y",-14).attr("width",z).attr("height",20).attr("fill","transparent"),J.append("rect").attr("width",10).attr("height",10).attr("rx",2).attr("y",-9).attr("fill",Array.isArray(_.color)?_.color[0]:_.color||"#6b7280").style("opacity",O?.35:1),J.append("text").attr("class","myIO-inline-legend-label").attr("x",15).attr("y",0).style("opacity",O?.45:1).text(w.length>24?w.substring(0,21)+"...":w)})}}}function Cy(t,e,r){e.type==="ordinal"?jh(t,r,ex):Gh(t,r)}function ex(t){var e=(t.currentLayers||t.derived&&t.derived.currentLayers||t.plotLayers||[])[0];t.runtime._legendData=U0(t,e),R6(t,t.runtime._legendData),t.runtime._sheetOpen&&Lf(t)}var yd=class{static type="treemap";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"none",scaleCapabilities:{invertX:!1}};static scaleHints=null;static dataContract={level_1:{required:!0},level_2:{required:!0},y_var:{required:!1,numeric:!0}};render(e,r){var i=e.margin,s=d3.format(",d"),a=r.label;if(Uh(e))e.colorDiscrete=d3.scaleOrdinal().range(e.options.colorScheme[0]).domain(e.options.colorScheme[1]),e.colorContinuous=d3.scaleLinear().range(e.options.colorScheme[0]).domain(e.options.colorScheme[1]);else{var d=r.data.children.map(function(O){return O.name});e.colorDiscrete=d3.scaleOrdinal().range(r.color).domain(d)}var m=d3.hierarchy(r.data).eachBefore(function(O){O.data.id=(O.parent?O.parent.data.id+".":"")+O.data.name}).sum(function(O){return O[r.mapping.y_var]}).sort(function(O,z){return z.height-O.height||z.value-O.value});d3.treemap().tile(d3.treemapResquarify).size([e.width-(i.left+i.right),s1(e)-(i.top+i.bottom)]).round(!0).paddingInner(1)(m);var v=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0,_=e.chart.selectAll(".root").data(m.leaves(),function(O){return O.data.id});_.exit().transition().duration(v).style("opacity",0).remove();var x=_.enter().append("g").attr("class","root").attr("transform",function(O){return"translate("+O.x0+","+O.y0+")"}).style("opacity",0);x.append("rect").attr("class",_r("tree",e.element.id,a)).attr("id",function(O){return O.data.id}).attr("width",function(O){return O.x1-O.x0}).attr("height",function(O){return O.y1-O.y0}).attr("fill",function(O){for(;O.depth>1;)O=O.parent;return e.colorDiscrete(O.data.id)}),x.append("text").attr("class","inner-text").attr("fill","black"),x.append("title");var w=x.merge(_);w.transition().duration(v).ease($n(e,d3.easeQuad)).style("opacity",1).attr("transform",function(O){return"translate("+O.x0+","+O.y0+")"}),w.select("rect").transition().duration(v).ease($n(e,d3.easeQuad)).attr("width",function(O){return O.x1-O.x0}).attr("height",function(O){return O.y1-O.y0}).attr("fill",function(O){for(;O.depth>1;)O=O.parent;return e.colorDiscrete(O.data.id)});var I=w.select("text.inner-text").selectAll("tspan").data(function(O){return tx(O,r,s)});I.exit().remove(),I.enter().append("tspan").attr("fill","black").merge(I).attr("x",3).attr("y",function(O,z,J){return(z===J.length-1)*3+16+(z-.5)*9}).attr("fill-opacity",function(){return rx(this.parentNode.parentNode)?1:0}).text(function(O){return O}),w.select("title").text(function(O){return O.data[r.mapping.level_1]+` `+O.data[r.mapping.level_2]+` `+O.data[r.mapping.x_var]+` -`+s(O.value)}),gd(e,r)}remove(e){e.dom.chartArea.selectAll(".root").transition().duration(500).style("opacity",0).remove()}};function tx(t,e,r){var i=String(t.data[e.mapping.x_var]||t.data[e.mapping.level_2]||t.data.name||""),s=Math.max(0,t.x1-t.x0),a=s<70&&i.length>10?i.substring(0,9)+"...":i;return a.split(/\s+/).concat(r(t.value))}function rx(t){return!t||typeof t.getBBox!="function"?!0:t.getBBox().width>40}var bd=class{static type="donut";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"none",scaleCapabilities:{invertX:!1}};static scaleHints=null;static dataContract={x_var:{required:!0},y_var:{required:!0,numeric:!0}};render(e,r){var i=e.margin,s=e.options.transition.speed,a=Math.min(e.width-(i.right+i.left),e.height-(i.top+i.bottom))/2,d=r.mapping.x_var,m=r.mapping.y_var;Uh(e)?(e.colorDiscrete=d3.scaleOrdinal().range(e.options.colorScheme[0]).domain(e.options.colorScheme[1]),e.colorContinuous=d3.scaleLinear().range(e.options.colorScheme[0]).domain(e.options.colorScheme[1])):e.colorDiscrete=d3.scaleOrdinal().range(r.color).domain(r.data.map(function(q){return q[d]}));var v=e.runtime._hiddenOrdinalSegments||[],_=r.data.filter(function(q){return v.indexOf(q[d])===-1}),x=d3.pie().sort(null).value(function(q){return q[m]}),w=d3.arc().innerRadius(a*.8).outerRadius(a*.4),I=d3.arc().innerRadius(a*.9).outerRadius(a*.9),O=e.chart.selectAll(".donut").data(x(_),function(q){return q.data[d]});O.exit().transition().duration(s).ease($n(e,d3.easeQuad)).attrTween("d",function(q){var ue={startAngle:q.endAngle,endAngle:q.endAngle},K=d3.interpolate(q,ue);return function(B){return w(K(B))}}).remove();var z=O.enter().append("path").attr("class","donut").attr("fill",function(q){return e.colorDiscrete(q.data[d])}).attr("d",w).each(function(q){this._current=q});O.merge(z).transition().duration(s).ease($n(e,d3.easeQuad)).attr("fill",function(q){return e.colorDiscrete(q.data[d])}).attrTween("d",function(q){this._current=this._current||q;var ue=d3.interpolate(this._current,q);return this._current=ue(1),function(K){return w(ue(K))}});function J(q){return q.startAngle+(q.endAngle-q.startAngle)/2}var Q=e.chart.selectAll(".inner-text").data(x(_),function(q){return q.data[d]});Q.exit().transition().duration(s).style("opacity",0).remove();var oe=Q.enter().append("text").attr("class","inner-text").style("font-size","12px").style("opacity",0).attr("dy",".35em").text(function(q){return q.data[d]});Q.merge(oe).transition().duration(s).ease($n(e,d3.easeQuad)).text(function(q){return q.data[d]}).style("opacity",function(q){return Math.abs(q.endAngle-q.startAngle)>.3?1:0}).attrTween("transform",function(q){this._current=this._current||q;var ue=d3.interpolate(this._current,q);return this._current=ue(1),function(K){var B=ue(K),he=I.centroid(B);return he[0]=a*(J(B).3?1:0}).attrTween("points",function(q){this._current=this._current||q;var ue=d3.interpolate(this._current,q);return this._current=ue(1),function(K){var B=ue(K),he=I.centroid(B);return he[0]=a*.95*(J(B)0?r.data[0]:{},v=r.mapping.value,_=typeof v=="string"?+m[v]:+v;Number.isFinite(_)||(_=0),_=Math.max(0,Math.min(1,_));var x=[_,1-_],w=d3.arc().innerRadius(a-d).outerRadius(a).cornerRadius(10),I=d3.arc().innerRadius(a-d).outerRadius(a),O=d3.pie().sort(null).value(function(B){return B}).startAngle(s*-.5).endAngle(s*.5),z=d3.format(".1%"),J=r.options&&Array.isArray(r.options.thresholds)?r.options.thresholds:[{min:0,max:.6,color:"#3CA951"},{min:.6,max:.85,color:"#FFB000"},{min:.85,max:1,color:"#EF603B"}];function Q(B){return I({startAngle:s*-.5+s*Math.max(0,Math.min(1,+B.min||0)),endAngle:s*-.5+s*Math.max(0,Math.min(1,+B.max||0))})}var oe=e.chart.selectAll(".myIO-gauge-threshold").data(J);oe.exit().transition().duration(i).style("opacity",0).remove();var se=oe.enter().append("path").attr("class","myIO-gauge-threshold").attr("fill",function(B){return B.color}).attr("opacity",0).attr("d",Q);se.merge(oe).transition().duration(i).ease($n(e,d3.easeQuad)).attr("fill",function(B){return B.color}).attr("opacity",.24).attr("d",Q);var re=e.chart.selectAll(".myIO-gauge-background").data(O([1]));re.exit().transition().duration(i).style("opacity",0).remove();var q=re.enter().append("path").attr("class","myIO-gauge-background").attr("fill","rgba(107, 114, 128, 0.22)").attr("d",w).each(function(B){this._current=B});q.merge(re).transition().duration(i).ease($n(e,d3.easeBack)).attr("fill","rgba(107, 114, 128, 0.22)").attrTween("d",function(B){this._current=this._current||B;var he=d3.interpolate(this._current,B);return this._current=he(1),function(He){return w(he(He))}});var ue=e.chart.selectAll(".myIO-gauge-value").data(O(x));ue.exit().transition().duration(i).style("opacity",0).remove();var K=ue.enter().append("path").attr("class","myIO-gauge-value").attr("fill",function(B,he){return[r.color||Ny(_,J),"transparent"][he]}).attr("d",w).each(function(B){this._current=B});K.merge(ue).transition().duration(i).ease($n(e,d3.easeBack)).attr("fill",function(B,he){return[r.color||Ny(_,J),"transparent"][he]}).attrTween("d",function(B){this._current=this._current||B;var he=d3.interpolate(this._current,B);return this._current=he(1),function(He){return w(he(He))}}),e.chart.selectAll(".gauge-text").data([x[0]]).join("text").attr("class","gauge-text").text(function(B){return z(B)}).attr("text-anchor","middle").attr("font-size",20).attr("dy","-0.45em"),e.chart.selectAll(".gauge-label").data([r.options&&r.options.metric?r.options.metric:r.label]).join("text").attr("class","gauge-label").text(function(B){return B}).attr("text-anchor","middle").attr("font-size",12).attr("dy","1.1em"),e.chart.selectAll(".gauge-min-label").data(["0%"]).join("text").attr("class","gauge-min-label").text(function(B){return B}).attr("text-anchor","middle").attr("font-size",11).attr("x",-a+d/2).attr("y",12),e.chart.selectAll(".gauge-max-label").data(["100%"]).join("text").attr("class","gauge-max-label").text(function(B){return B}).attr("text-anchor","middle").attr("font-size",11).attr("x",a-d/2).attr("y",12)}remove(e){e.dom.chartArea.selectAll(".myIO-gauge-threshold, .myIO-gauge-background, .myIO-gauge-value, .gauge-text, .gauge-label, .gauge-min-label, .gauge-max-label").transition().duration(500).style("opacity",0).remove()}};function Ny(t,e){var r=e.find(function(i){return t>=+i.min&&t<=+i.max});return r&&r.color?r.color:"#4269D0"}var _d=class{static type="heatmap";static traits={hasAxes:!0,referenceLines:!1,legendType:"continuous",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"band",yExtentFields:["value"],domainMerge:"union"};static dataContract={x_var:{required:!0},y_var:{required:!0},value:{required:!0,numeric:!0}};render(e,r){var i=e.options.transition.speed,s=r.mapping.x_var,a=r.mapping.y_var,d=r.mapping.value,m=r.data.map(function(O){return+O[d]}),v=d3.extent(m.filter(function(O){return Number.isFinite(O)}));(!v||v[0]===void 0||v[1]===void 0)&&(v=[0,1]),e.derived.colorContinuous=d3.scaleSequential(d3.interpolateBlues).domain(v),e.colorContinuous=e.derived.colorContinuous;var _=e.chart.selectAll("."+_r("heatmap",e.element.id,r.label)).data(r.data);_.exit().transition().duration(i).style("opacity",0).remove();var x=e.xScale.bandwidth?e.xScale.bandwidth():0,w=e.yScale.bandwidth?e.yScale.bandwidth():0,I=_.enter().append("rect").attr("class",_r("heatmap",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").attr("x",function(O){return e.xScale(O[s])}).attr("y",function(O){return e.yScale(O[a])}).attr("width",x).attr("height",w).attr("fill",function(O){return e.colorContinuous(+O[d])}).style("opacity",0);_.merge(I).transition().ease($n(e,d3.easeQuad)).duration(i).attr("x",function(O){return e.xScale(O[s])}).attr("y",function(O){return e.yScale(O[a])}).attr("width",x).attr("height",w).attr("fill",function(O){return e.colorContinuous(+O[d])}).style("opacity",1)}getHoverSelector(e,r){return"."+_r("heatmap",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var]+", "+i.mapping.y_var+": "+r[i.mapping.y_var],body:i.mapping.value+": "+r[i.mapping.value],color:e.colorContinuous?e.colorContinuous(+r[i.mapping.value]):i.color,label:i.label,value:r[i.mapping.value],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("heatmap",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var xd=class{static type="calendarHeatmap";static traits={hasAxes:!1,referenceLines:!1,legendType:"continuous",binning:!1,rolloverStyle:"element"};static dataContract={date:{required:!0},value:{required:!0,numeric:!0}};static scaleHints=null;getHoverSelector(){return".myIO-calendar-cell"}formatTooltip(e,r,i){var s=d3.utcFormat("%b %-d, %Y"),a=r.date instanceof Date?r.date:new Date((r[i.mapping.date]||"")+"T00:00:00Z"),d=r.value!=null?r.value:+r[i.mapping.value];return{title:s(a),body:i.label+": "+d,color:r.color||i.color,label:i.label,value:d,raw:r}}render(e,r){var i=r.options||{},s=i.weekStart==="monday"?1:0,a=i.showWeekdayLabels!==!1,d=r.mapping.date,m=r.mapping.value,v=(r.data||[]).map(function(ar){return{date:new Date(ar[d]+"T00:00:00Z"),value:+ar[m],raw:ar}}).filter(function(ar){return!isNaN(ar.date.getTime())}).sort(function(ar,Ki){return ar.date-Ki.date});if(v.length!==0){var _=v[0].date.getUTCFullYear(),x=new Date(Date.UTC(_,0,1)),w=new Date(Date.UTC(_,11,31)),I=function(ar){var Ki=ar.getUTCDay();return(Ki-s+7)%7},O=I(x),z=function(ar){var Ki=Math.floor((ar-x)/864e5);return Math.floor((Ki+O)/7)},J=z(w)+1,Q=e.margin||{top:0,right:0,bottom:0,left:0},oe=(e.width||0)-(Q.left||0)-(Q.right||0),se=(e.height||0)-(Q.top||0)-(Q.bottom||0),re=a?24:0,q=18,ue=Math.max(1,oe-re),K=Math.max(1,se-q),B=Math.max(4,Math.min(Math.floor(ue/J),Math.floor(K/7))),he=e.element&&typeof getComputedStyle=="function"?getComputedStyle(e.element):null,He=he?he.getPropertyValue("--chart-calendar-cell-gap"):"",er=parseFloat(He);isFinite(er)||(er=2);var Er=e.config&&e.config.axis&&e.config.axis.vlim,zt=d3.max(v,function(ar){return ar.value});zt>0||(zt=1);var _n=Er&&Er.max!==void 0&&Er.max!==null?[Er.min||0,Er.max]:[0,zt],$r=d3.interpolateRgb("#ffffff",r.color||"#4E79A7"),In=d3.scaleSequential($r).domain(_n);e.colorContinuous=In,e.derived&&(e.derived.colorContinuous=In);var On=function(ar){var Ki=ar instanceof Date?ar:new Date(ar);return re+z(Ki)*(B+er)};On.domain=function(){return[x,w]},On.range=function(){return[re,re+(J-1)*(B+er)]},On.invert=function(ar){var Ki=Math.round((ar-re)/(B+er)),zs=Ki*7-O;return new Date(x.getTime()+zs*864e5)},e.xScale=On;var cr=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0,bn=e.chart.selectAll(".myIO-calendar-root").data([null]).join("g").attr("class","myIO-calendar-root");if(a){var mn=s===0?["","Mon","","Wed","","Fri",""]:["","Tue","","Thu","","Sat",""],qn=mn.map(function(ar,Ki){return{t:ar,i:Ki}}).filter(function(ar){return ar.t}),Wt=bn.selectAll("text.myIO-calendar-dow").data(qn,function(ar){return ar.i});Wt.exit().remove(),Wt.enter().append("text").attr("class","myIO-calendar-dow").attr("x",0).merge(Wt).attr("y",function(ar){return q+ar.i*(B+er)+B*.75}).text(function(ar){return ar.t})}else bn.selectAll("text.myIO-calendar-dow").remove();var Pr=d3.utcFormat("%b"),gi=d3.range(12).map(function(ar){var Ki=new Date(Date.UTC(_,ar,1));return{m:ar,text:Pr(Ki),col:z(Ki)}}),Ii=bn.selectAll("text.myIO-calendar-month").data(gi,function(ar){return ar.m});Ii.exit().remove(),Ii.enter().append("text").attr("class","myIO-calendar-month").attr("y",q-4).merge(Ii).attr("x",function(ar){return re+ar.col*(B+er)}).text(function(ar){return ar.text});var yi=function(ar){return ar.date.toISOString().slice(0,10)},as=bn.selectAll("rect.myIO-calendar-cell").data(v,function(ar){return yi(ar)});as.exit().transition().duration(cr).style("opacity",0).remove();var Ha=as.enter().append("rect").attr("class","myIO-calendar-cell").attr("data-date",yi).attr("data-row",function(ar){return String(I(ar.date))}).attr("data-col",function(ar){return String(z(ar.date))}).attr("x",function(ar){return re+z(ar.date)*(B+er)}).attr("y",function(ar){return q+I(ar.date)*(B+er)}).attr("width",B).attr("height",B).attr("fill",function(ar){return ar.value==null||isNaN(ar.value)||ar.value===0?"var(--chart-calendar-empty-fill, #ebedf0)":In(ar.value)}).style("opacity",0);Ha.merge(as).each(function(ar){ar.label=r.label,ar.color=ar.value==null||isNaN(ar.value)||ar.value===0?"var(--chart-calendar-empty-fill, #ebedf0)":In(ar.value),ar[d]=yi({date:ar.date}),ar[m]=ar.value}).transition().duration(cr).style("opacity",1).attr("x",function(ar){return re+z(ar.date)*(B+er)}).attr("y",function(ar){return q+I(ar.date)*(B+er)}).attr("width",B).attr("height",B).attr("fill",function(ar){return ar.value==null||isNaN(ar.value)||ar.value===0?"var(--chart-calendar-empty-fill, #ebedf0)":In(ar.value)})}}remove(e){e&&e.chart&&typeof e.chart.selectAll=="function"&&e.chart.selectAll(".myIO-calendar-root").remove()}};var Sd=class{static type="candlestick";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["open","high","low","close"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!0},open:{required:!0,numeric:!0},high:{required:!0,numeric:!0},low:{required:!0,numeric:!0},close:{required:!0,numeric:!0}};render(e,r){var i=e.options.transition.speed,s=r.mapping.x_var,a=r.mapping.open,d=r.mapping.high,m=r.mapping.low,v=r.mapping.close,_=e.width-(e.margin.left+e.margin.right),x=Math.max(6,Math.min(40,_/Math.max(r.data.length*2.5,1))),w=this;function I(q){return e.xScale(q[s])}function O(q){return+q[v]>=+q[a]?"#4CAF50":"#F44336"}function z(q){return e.yScale(Math.max(+q[a],+q[v]))}function J(q){return Math.max(Math.abs(e.yScale(+q[a])-e.yScale(+q[v])),1)}function Q(q){return e.yScale((+q[a]+ +q[v])/2)}var oe=e.chart.selectAll("."+_r("candlestick",e.element.id,r.label)).data(r.data);oe.exit().transition().duration(i).style("opacity",0).remove();var se=oe.enter().append("g").attr("class",_r("candlestick",e.element.id,r.label)).style("opacity",0);se.append("line").attr("class","wick").attr("stroke","#666").attr("stroke-width",1.5).attr("x1",I).attr("x2",I).attr("y1",Q).attr("y2",Q),se.append("rect").attr("class","body").attr("stroke-width",.5).attr("x",function(q){return I(q)-x/2}).attr("y",Q).attr("width",x).attr("height",0).attr("fill",O).attr("stroke",O);var re=oe.merge(se);re.transition().ease($n(e,d3.easeQuad)).duration(i).style("opacity",1),re.select("line.wick").transition().ease($n(e,d3.easeQuad)).duration(i).attr("x1",I).attr("x2",I).attr("y1",function(q){return e.yScale(+q[m])}).attr("y2",function(q){return e.yScale(+q[d])}),re.select("rect.body").transition().ease($n(e,d3.easeQuad)).duration(i).attr("x",function(q){return I(q)-x/2}).attr("y",z).attr("width",x).attr("height",J).attr("fill",O).attr("stroke",O)}getHoverSelector(e,r){return"."+_r("candlestick",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:"O: "+r[i.mapping.open]+", H: "+r[i.mapping.high]+", L: "+r[i.mapping.low]+", C: "+r[i.mapping.close],color:r[i.mapping.close]>=r[i.mapping.open]?"#4CAF50":"#F44336",label:i.label,value:r[i.mapping.close],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("candlestick",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var Ed=class{static type="waterfall";static traits={hasAxes:!0,referenceLines:!0,legendType:"none",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"linear",yExtentFields:["_base_y","_cumulative_y"],domainMerge:"union"};static dataContract={x_var:{required:!0},y_var:{required:!0,numeric:!0}};render(e,r){var i=e.options.transition.speed,s=r.mapping.x_var,a=r.mapping.y_var,d=e.xScale.bandwidth?e.xScale.bandwidth():0,m=d*.82,v=(d-m)/2,_=Array.isArray(r.color),x=e.chart.selectAll("."+_r("waterfall",e.element.id,r.label)).data(r.data);x.exit().transition().duration(i).style("opacity",0).remove();var w=x.enter().append("rect").attr("class",_r("waterfall",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").attr("x",function(J){return e.xScale(J[s])+v}).attr("width",m).attr("y",function(J){return e.yScale(+J._base_y)}).attr("height",0).attr("fill",function(J,Q){return _?r.color[Q%r.color.length]:J._is_total?"#888":+J._cumulative_y>=+J._base_y?"#4CAF50":"#F44336"});x.merge(w).transition().ease($n(e,d3.easeQuad)).duration(i).attr("x",function(J){return e.xScale(J[s])+v}).attr("width",m).attr("y",function(J){return e.yScale(Math.max(+J._base_y,+J._cumulative_y))}).attr("height",function(J){return Math.abs(e.yScale(+J._base_y)-e.yScale(+J._cumulative_y))}).attr("fill",function(J,Q){return _?r.color[Q%r.color.length]:J._is_total?"#888":+J._cumulative_y>=+J._base_y?"#4CAF50":"#F44336"});var I=r.data.slice(0,Math.max(r.data.length-1,0)),O=e.chart.selectAll("."+_r("waterfall-connector",e.element.id,r.label)).data(I);O.exit().transition().duration(i).style("opacity",0).remove();var z=O.enter().append("line").attr("class",_r("waterfall-connector",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").style("stroke","#374151").style("stroke-width",1.5).style("stroke-dasharray","4 2").attr("x1",function(J,Q){return e.xScale(r.data[Q][s])+v+m}).attr("x2",function(J,Q){return e.xScale(r.data[Q+1][s])+v}).attr("y1",function(J){return e.yScale(+J._cumulative_y)}).attr("y2",function(J){return e.yScale(+J._cumulative_y)}).style("opacity",0);O.merge(z).transition().ease($n(e,d3.easeQuad)).duration(i).style("opacity",1).attr("x1",function(J,Q){return e.xScale(r.data[Q][s])+v+m}).attr("x2",function(J,Q){return e.xScale(r.data[Q+1][s])+v}).attr("y1",function(J){return e.yScale(+J._cumulative_y)}).attr("y2",function(J){return e.yScale(+J._cumulative_y)})}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:"Delta: "+r[i.mapping.y_var]+", Total: "+r._cumulative_y,color:r._is_total?"#888":+r._cumulative_y>=+r._base_y?"#4CAF50":"#F44336",label:i.label,value:r._cumulative_y,raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("waterfall",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("waterfall-connector",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var wd=class{static type="sankey";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints=null;static dataContract={source:{required:!0},target:{required:!0},value:{required:!0,numeric:!0}};render(e,r){var i=e.margin,s=e.width-(i.left+i.right),a=s1(e)-(i.top+i.bottom),d=18,m=d3.sankey().nodeId(function(se){return se.name}).nodeWidth(d).nodePadding(12).extent([[0,0],[s,a]]),v=new Map,_=r.data.map(function(se){var re=se[r.mapping.source],q=se[r.mapping.target];return v.has(re)||v.set(re,{name:re}),v.has(q)||v.set(q,{name:q}),{source:re,target:q,value:+se[r.mapping.value]}}),x=m({nodes:Array.from(v.values()),links:_});e.derived.colorDiscrete=d3.scaleOrdinal().domain(x.nodes.map(function(se){return se.name})).range(r.color||d3.schemeTableau10),e.colorDiscrete=e.derived.colorDiscrete;var w=e.chart.selectAll("."+_r("sankey",e.element.id,r.label)).data(x.links);w.exit().transition().duration(e.options.transition.speed).style("opacity",0).remove();var I=w.enter().append("path").attr("class",_r("sankey",e.element.id,r.label)).attr("fill","none").attr("stroke-opacity",.4).attr("clip-path","url(#"+e.element.id+"clip)").attr("d",d3.sankeyLinkHorizontal()).attr("stroke-width",function(se){return Math.max(1,se.width)}).attr("stroke",function(se){return e.colorDiscrete(se.source.name)}).style("opacity",0);w.merge(I).transition().ease($n(e,d3.easeQuad)).duration(e.options.transition.speed).style("opacity",1).attr("d",d3.sankeyLinkHorizontal()).attr("stroke-width",function(se){return Math.max(1,se.width)}).attr("stroke",function(se){return e.colorDiscrete(se.source.name)});var O=e.chart.selectAll("."+_r("sankey-node",e.element.id,r.label)).data(x.nodes);O.exit().transition().duration(e.options.transition.speed).style("opacity",0).remove();var z=O.enter().append("rect").attr("class",_r("sankey-node",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").attr("x",function(se){return se.x0}).attr("y",function(se){return se.y0}).attr("width",function(se){return se.x1-se.x0}).attr("height",function(se){return Math.max(1,se.y1-se.y0)}).attr("fill",function(se){return e.colorDiscrete(se.name)}).style("opacity",0);O.merge(z).transition().ease($n(e,d3.easeQuad)).duration(e.options.transition.speed).style("opacity",1).attr("x",function(se){return se.x0}).attr("y",function(se){return se.y0}).attr("width",function(se){return se.x1-se.x0}).attr("height",function(se){return Math.max(1,se.y1-se.y0)}).attr("fill",function(se){return e.colorDiscrete(se.name)});var J=_r("sankey-label",e.element.id,r.label),Q=e.chart.selectAll("."+J).data(x.nodes,function(se){return se.name});Q.exit().transition().duration(e.options.transition.speed).style("opacity",0).remove();var oe=Q.enter().append("text").attr("class",J).attr("x",function(se){return se.x0 "+r.target.name,body:"Value: "+r.value,color:e.colorDiscrete?e.colorDiscrete(r.source.name):i.color,label:i.label,value:r.value,raw:r}:{title:r.name,body:"Value: "+r.value,color:e.colorDiscrete?e.colorDiscrete(r.name):i.color,label:i.label,value:r.value,raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("sankey",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("sankey-node",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("sankey-label",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var Ad=class{static type="rangeBar";static traits={hasAxes:!0,referenceLines:!1,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["low_y","high_y"],domainMerge:"union"};static dataContract={x_var:{required:!0},low_y:{required:!0,numeric:!0},high_y:{required:!0,numeric:!0}};render(e,r){if(r.options&&r.options.style==="errorbar"){nx(e,r);return}var i=e.options.transition.speed,s=r.mapping.x_var,a=r.mapping.low_y,d=r.mapping.high_y,m=r.options&&r.options.rangeBarWidth?r.options.rangeBarWidth:Math.max(6,Math.min(60,(e.width-(e.margin.left+e.margin.right))/Math.max(r.data.length*3,1))),v=e.chart.selectAll("."+_r("rangeBar",e.element.id,r.label)).data(r.data);v.exit().transition().duration(i).style("opacity",0).remove();function _(z){return e.yScale((+z[a]+ +z[d])/2)}function x(z){return e.yScale(Math.max(+z[a],+z[d]))}function w(z){return Math.abs(e.yScale(+z[a])-e.yScale(+z[d]))}function I(z){return typeof e.colorDiscrete=="function"&&z[r.mapping.group]?e.colorDiscrete(z[r.mapping.group]):r.color||"#6b7280"}var O=v.enter().append("rect").attr("class",_r("rangeBar",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").attr("x",function(z){return e.xScale(z[s])-m/2}).attr("y",_).attr("width",m).attr("height",0).attr("fill",I);v.merge(O).transition().ease($n(e,d3.easeQuad)).duration(i).attr("x",function(z){return e.xScale(z[s])-m/2}).attr("y",x).attr("width",m).attr("height",w).attr("fill",I)}getHoverSelector(e,r){return"."+_r("rangeBar",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:i.mapping.low_y+": "+r[i.mapping.low_y]+", "+i.mapping.high_y+": "+r[i.mapping.high_y],color:i.color,label:i.label,value:r[i.mapping.high_y],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("rangeBar",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("rangeBar-error",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};function nx(t,e){var r=t.options.transition.speed,i=e.mapping.x_var,s=e.mapping.low_y,a=e.mapping.high_y,d=e.mapping.y_var;if(!d){typeof console<"u"&&console.warn&&console.warn("myIO RangeBarRenderer: style='errorbar' requires a y_var mapping for the mean point. Skipping render for layer '"+(e.label||"(unnamed)")+"'.");return}var m=e.color||"#4269D0",v=e.options&&e.options.capWidth?e.options.capWidth:18,_=e.options&&e.options.pointRadius?e.options.pointRadius:4;function x(oe){var se=t.xScale(oe[i]);return t.xScale.bandwidth&&(se+=t.xScale.bandwidth()/2),se}function w(oe){return t.yScale(+oe[s])}function I(oe){return t.yScale(+oe[a])}function O(oe){return t.yScale(+oe[d])}var z=t.chart.selectAll("."+_r("rangeBar-error",t.element.id,e.label)).data(e.data);z.exit().transition().duration(r).style("opacity",0).remove();var J=z.enter().append("g").attr("class",_r("rangeBar-error",t.element.id,e.label)).attr("clip-path","url(#"+t.element.id+"clip)").style("opacity",0);J.append("line").attr("class","mean-ci-whisker").attr("x1",x).attr("x2",x).attr("y1",O).attr("y2",O).attr("stroke",m).attr("stroke-width",2),J.append("line").attr("class","mean-ci-cap mean-ci-cap-low").attr("x1",x).attr("x2",x).attr("y1",O).attr("y2",O).attr("stroke",m).attr("stroke-width",2),J.append("line").attr("class","mean-ci-cap mean-ci-cap-high").attr("x1",x).attr("x2",x).attr("y1",O).attr("y2",O).attr("stroke",m).attr("stroke-width",2),J.append("circle").attr("class","mean-ci-point").attr("cx",x).attr("cy",O).attr("r",0).attr("fill",m).attr("stroke","var(--chart-bg, #ffffff)").attr("stroke-width",1.5);var Q=z.merge(J);Q.transition().ease($n(t,d3.easeQuad)).duration(r).style("opacity",1),Q.select(".mean-ci-whisker").transition().ease($n(t,d3.easeQuad)).duration(r).attr("x1",x).attr("x2",x).attr("y1",w).attr("y2",I).attr("stroke",m),Q.select(".mean-ci-cap-low").transition().ease($n(t,d3.easeQuad)).duration(r).attr("x1",function(oe){return x(oe)-v/2}).attr("x2",function(oe){return x(oe)+v/2}).attr("y1",w).attr("y2",w).attr("stroke",m),Q.select(".mean-ci-cap-high").transition().ease($n(t,d3.easeQuad)).duration(r).attr("x1",function(oe){return x(oe)-v/2}).attr("x2",function(oe){return x(oe)+v/2}).attr("y1",I).attr("y2",I).attr("stroke",m),Q.select(".mean-ci-point").transition().ease($n(t,d3.easeQuad)).duration(r).attr("cx",x).attr("cy",O).attr("r",_).attr("fill",m)}var Td=class{static type="text";static traits={hasAxes:!1,referenceLines:!1,legendType:"none",binning:!1,rolloverStyle:"none",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",xExtentFields:[],yExtentFields:[],domainMerge:"union"};static dataContract={};render(e,r){var i=r.options&&r.options.position||"top-right",s=r.label,a=_r("text-annotation",e.element.id,s);e.chart.selectAll("."+a).remove();var d=r.data.map(function(J){return J.text}),m=i.indexOf("top")!==-1,v=i.indexOf("right")!==-1,_=e.width-(e.margin.left+e.margin.right),x=e.height-(e.margin.top+e.margin.bottom),w=v?_-58:10,I=m?20:x-10,O=v?"end":"start",z=e.chart.append("g").attr("class",a).attr("transform","translate("+w+","+I+")");d.forEach(function(J,Q){z.append("text").attr("y",(m?1:-1)*Q*16).attr("text-anchor",O).style("font-size","12px").style("font-family","var(--font-family, sans-serif)").style("fill","var(--text-color, #333)").style("opacity",.8).text(J)})}formatTooltip(){return null}remove(e,r){var i=_r("text-annotation",e.dom.element.id,r.label);e.dom.chartArea.selectAll("."+i).remove()}};var Id=class{static type="bracket";static traits={hasAxes:!0,referenceLines:!1,legendType:"none",binning:!1,rolloverStyle:"none",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",xExtentFields:[],yExtentFields:["y"],domainMerge:"union"};static dataContract={x1:{required:!0,numeric:!0},x2:{required:!0,numeric:!0},y:{required:!0,numeric:!0}};render(e,r){var i=_r("bracket",e.element.id,r.label),s=6,a=4,d=e.options.transition.speed,m=r.color||"var(--text-color, #333)",v=e.chart.selectAll("g."+i+"-root").data([null]).join("g").attr("class",i+"-root").attr("clip-path","url(#"+e.element.id+"clip)"),_=function(O,z){return O.label!=null?String(O.label)+"_"+z:String(z)},x=v.selectAll("g."+i).data(r.data,_);x.exit().transition().duration(d).style("opacity",0).remove();var w=x.enter().append("g").attr("class",i).style("opacity",0);w.append("line").attr("class","bracket-bar").attr("stroke",m).attr("stroke-width",1.5),w.append("line").attr("class","bracket-tick-left").attr("stroke",m).attr("stroke-width",1.5),w.append("line").attr("class","bracket-tick-right").attr("stroke",m).attr("stroke-width",1.5),w.append("text").attr("class","bracket-label").attr("text-anchor","middle").style("font-size","11px").style("font-family","var(--font-family, sans-serif)").style("fill",m);var I=w.merge(x);I.transition().duration(d).style("opacity",1),I.select(".bracket-bar").transition().duration(d).attr("x1",function(O){return e.xScale(+O.x1)}).attr("y1",function(O){return e.yScale(+O.y)}).attr("x2",function(O){return e.xScale(+O.x2)}).attr("y2",function(O){return e.yScale(+O.y)}),I.select(".bracket-tick-left").transition().duration(d).attr("x1",function(O){return e.xScale(+O.x1)}).attr("y1",function(O){return e.yScale(+O.y)}).attr("x2",function(O){return e.xScale(+O.x1)}).attr("y2",function(O){return e.yScale(+O.y)+s}),I.select(".bracket-tick-right").transition().duration(d).attr("x1",function(O){return e.xScale(+O.x2)}).attr("y1",function(O){return e.yScale(+O.y)}).attr("x2",function(O){return e.xScale(+O.x2)}).attr("y2",function(O){return e.yScale(+O.y)+s}),I.select(".bracket-label").text(function(O){return O.label}).transition().duration(d).attr("x",function(O){return(e.xScale(+O.x1)+e.xScale(+O.x2))/2}).attr("y",function(O){return e.yScale(+O.y)-a})}formatTooltip(){return null}remove(e,r){var i=_r("bracket",e.element.id,r.label);e.chart.selectAll("."+i).remove()}};var Od=class{static type="lollipop";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"linear",xExtentFields:[],yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!1},y_var:{required:!0,numeric:!0}};render(e,r,i){var s=e.derived.xScale,a=e.derived.yScale,d=e.config.scales.flipAxis,m=e.options.transition.speed,v=e.dom.chartArea.selectAll(".tag-lollipop-"+r.id).data([null]).join("g").attr("class","tag-lollipop-"+r.id),_=r.options&&r.options.headRadius||5,x=r.options&&r.options.stemWidth||2,w=r.mapping.x_var,I=r.mapping.y_var,O=s.bandwidth?s.bandwidth()/2:0,z=typeof a(0)=="number"?a(0):a.range()[0],J=typeof s(0)=="number"?s(0):s.range()[0];function Q(K){if(d){var B=a(K[w]);return a.bandwidth&&(B+=O),{x1:J,x2:s(K[I]),y1:B,y2:B}}var he=s(K[w])+O;return{x1:he,x2:he,y1:z,y2:a(K[I])}}function oe(K){var B=Q(K);return{cx:B.x2,cy:B.y2}}var se=v.selectAll(".lollipop-stem").data(r.data,function(K){return K._source_key});se.exit().transition().duration(m).style("opacity",0).attr("x2",d?J:function(K){return s(K[w])+O}).attr("y2",d?function(K){var B=a(K[w]);return a.bandwidth?B+O:B}:z).remove();var re=se.enter().append("line").attr("class","lollipop-stem").attr("x1",function(K){return Q(K).x1}).attr("x2",function(K){return d?Q(K).x1:Q(K).x2}).attr("y1",function(K){return Q(K).y1}).attr("y2",function(K){return Q(K).y1}).attr("stroke",r.color).attr("stroke-width",x).style("opacity",0);re.merge(se).transition().duration(m).style("opacity",1).attr("x1",function(K){return Q(K).x1}).attr("x2",function(K){return Q(K).x2}).attr("y1",function(K){return Q(K).y1}).attr("y2",function(K){return Q(K).y2}).attr("stroke",r.color).attr("stroke-width",x);var q=v.selectAll(".lollipop-head").data(r.data,function(K){return K._source_key});q.exit().transition().duration(m).style("opacity",0).attr("cx",function(K){return Q(K).x1}).attr("cy",function(K){return Q(K).y1}).remove();var ue=q.enter().append("circle").attr("class","lollipop-head").attr("cx",function(K){return Q(K).x1}).attr("cy",function(K){return Q(K).y1}).attr("r",_).attr("fill",r.color).style("opacity",0);ue.merge(q).transition().duration(m).style("opacity",1).attr("cx",function(K){return oe(K).cx}).attr("cy",function(K){return oe(K).cy}).attr("r",_).attr("fill",r.color)}getHoverSelector(e,r){return".tag-lollipop-"+r.id+" .lollipop-head"}formatTooltip(e,r,i){var s=e.runtime.activeYFormat||d3.format("s");return{title:{text:String(r[i.mapping.x_var])},items:[{color:i.color,label:i.label,value:s(r[i.mapping.y_var])}]}}remove(e,r){e.dom.chartArea.selectAll(".tag-lollipop-"+r.id).remove()}};var Cd=class{static type="dumbbell";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"linear",xExtentFields:[],yExtentFields:["low_y","high_y"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!1},low_y:{required:!0,numeric:!0},high_y:{required:!0,numeric:!0}};render(e,r,i){var s=e.derived.xScale,a=e.derived.yScale,d=e.config.scales.flipAxis,m=e.options.transition.speed,v=e.dom.chartArea.selectAll(".tag-dumbbell-"+r.id).data([null]).join("g").attr("class","tag-dumbbell-"+r.id),_=r.options&&r.options.dotRadius||5,x=r.options&&r.options.lineWidth||2,w=r.mapping.x_var,I=r.mapping.low_y,O=r.mapping.high_y,z=s.bandwidth?s.bandwidth()/2:0,J=a.bandwidth?a.bandwidth()/2:0;function Q(B){if(d){var he=a(B[w])+J,He=s(B[I]),er=s(B[O]);return{lowX:He,lowY:he,highX:er,highY:he,midX:(He+er)/2,midY:he}}var Er=s(B[w])+z,zt=a(B[I]),_n=a(B[O]);return{lowX:Er,lowY:zt,highX:Er,highY:_n,midX:Er,midY:(zt+_n)/2}}var oe=v.selectAll(".dumbbell-line").data(r.data,function(B){return B._source_key});oe.exit().transition().duration(m).style("opacity",0).attr("x1",function(B){return Q(B).midX}).attr("x2",function(B){return Q(B).midX}).attr("y1",function(B){return Q(B).midY}).attr("y2",function(B){return Q(B).midY}).remove();var se=oe.enter().append("line").attr("class","dumbbell-line").attr("x1",function(B){return Q(B).midX}).attr("x2",function(B){return Q(B).midX}).attr("y1",function(B){return Q(B).midY}).attr("y2",function(B){return Q(B).midY}).attr("stroke","var(--chart-grid-color, #ccc)").attr("stroke-width",x).style("opacity",0);se.merge(oe).transition().duration(m).style("opacity",1).attr("x1",function(B){return Q(B).lowX}).attr("x2",function(B){return Q(B).highX}).attr("y1",function(B){return Q(B).lowY}).attr("y2",function(B){return Q(B).highY}).attr("stroke","var(--chart-grid-color, #ccc)").attr("stroke-width",x);var re=v.selectAll(".dumbbell-low").data(r.data,function(B){return B._source_key});re.exit().transition().duration(m).style("opacity",0).attr("cx",function(B){return Q(B).midX}).attr("cy",function(B){return Q(B).midY}).remove();var q=re.enter().append("circle").attr("class","dumbbell-low").attr("cx",function(B){return Q(B).midX}).attr("cy",function(B){return Q(B).midY}).attr("r",_).attr("fill",r.color).attr("opacity",0);q.merge(re).transition().duration(m).attr("cx",function(B){return Q(B).lowX}).attr("cy",function(B){return Q(B).lowY}).attr("r",_).attr("fill",r.color).attr("opacity",.6);var ue=v.selectAll(".dumbbell-high").data(r.data,function(B){return B._source_key});ue.exit().transition().duration(m).style("opacity",0).attr("cx",function(B){return Q(B).midX}).attr("cy",function(B){return Q(B).midY}).remove();var K=ue.enter().append("circle").attr("class","dumbbell-high").attr("cx",function(B){return Q(B).midX}).attr("cy",function(B){return Q(B).midY}).attr("r",_).attr("fill",r.color).attr("opacity",0);K.merge(ue).transition().duration(m).attr("cx",function(B){return Q(B).highX}).attr("cy",function(B){return Q(B).highY}).attr("r",_).attr("fill",r.color).attr("opacity",1)}getHoverSelector(e,r){return".tag-dumbbell-"+r.id+" .dumbbell-high, .tag-dumbbell-"+r.id+" .dumbbell-low"}formatTooltip(e,r,i){var s=e.runtime.activeYFormat||d3.format("s");return{title:{text:String(r[i.mapping.x_var])},items:[{color:i.color,label:"Low",value:s(r[i.mapping.low_y])},{color:i.color,label:"High",value:s(r[i.mapping.high_y])}]}}remove(e,r){e.dom.chartArea.selectAll(".tag-dumbbell-"+r.id).remove()}};var Ld=class{static type="waffle";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints=null;static dataContract={category:{required:!0},value:{required:!0,numeric:!0}};render(e,r){for(var i=r.options&&r.options.rows||10,s=r.options&&r.options.cols||10,a=i*s,d=r.options&&r.options.cellGap||2,m=r.options&&r.options.cellRadius||2,v=e.config.layout.margin,_=e.runtime.width-v.left-v.right,x=e.runtime.height-v.top-v.bottom,w=Math.min((_-(s-1)*d)/s,(x-(i-1)*d)/i),I=0,O=0;O=he)&&(K=Er,B=!0)}se._quantile_dot_cx=K,se._quantile_dot_cy=ue,oe.push({cx:K,cy:ue})})});var I=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0,O=e.dom.chartArea.selectAll(".tag-quantile_dots-"+r.id).data([null]).join("g").attr("class","tag-quantile_dots-"+r.id),z=O.selectAll(".quantile-dots-point").data(r.data,function(Q){return Q._source_key});z.exit().transition().duration(I).attr("fill-opacity",0).remove();var J=z.enter().append("circle").attr("class","quantile-dots-point").attr("clip-path","url(#"+e.element.id+"clip)").attr("cx",function(Q){return Q._quantile_dot_cx}).attr("cy",function(Q){return Q._quantile_dot_cy}).attr("r",a).attr("fill",r.color).attr("fill-opacity",0).attr("role","graphics-symbol");J.merge(z).transition().duration(I).attr("cx",function(Q){return Q._quantile_dot_cx}).attr("cy",function(Q){return Q._quantile_dot_cy}).attr("r",a).attr("fill",r.color).attr("fill-opacity",.75)}getHoverSelector(e,r){return".tag-quantile_dots-"+r.id+" .quantile-dots-point"}formatTooltip(e,r,i){var s=e.runtime.activeYFormat||d3.format("s"),a=i.options&&i.options.source?" ("+i.options.source+")":"";return{title:String(r[i.mapping.x_var]),items:[{color:i.color,label:i.label+a,value:"Q"+r[i.mapping.quantile_rank]+": "+s(r[i.mapping.y_var])}],value:r[i.mapping.y_var],raw:r}}remove(e,r){e.dom.chartArea.selectAll(".tag-quantile_dots-"+r.id).remove()}};var Rd=class{static type="bump";static traits={hasAxes:!0,referenceLines:!1,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints={xScaleType:"point",yScaleType:"linear",xExtentFields:[],yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0},y_var:{required:!0,numeric:!0},group:{required:!0}};render(e,r){var i=e.derived.xScale,s=e.derived.yScale,a=r.mapping.x_var,d=r.mapping.y_var,m=r.mapping.group,v=r.options&&r.options.dotRadius||5,_=e.derived.colorDiscrete||d3.scaleOrdinal(d3.schemeCategory10),x=d3.group(r.data,function(J){return J[m]}),w=e.dom.chartArea.selectAll(".tag-bump-"+r.id).data([null]).join("g").attr("class","tag-bump-"+r.id),I=d3.line().x(function(J){return i(J[a])}).y(function(J){return s(J[d])}).curve(d3.curveBumpX),O=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0,z=0;x.forEach(function(J,Q){var oe=_(Q),se=J.slice().sort(function(B,he){return String(B[a]).localeCompare(String(he[a]))}),re=w.selectAll(".bump-line-"+z).data([se]),q=re.enter().append("path").attr("class","bump-line bump-line-"+z).attr("fill","none").attr("stroke",oe).attr("stroke-width",2.5).attr("stroke-opacity",0).attr("d",I);q.merge(re).transition().duration(O).attr("stroke",oe).attr("stroke-opacity",.8).attr("d",I);var ue=w.selectAll(".bump-dot-"+z).data(se,function(B){return B._source_key||B[a]});ue.exit().transition().duration(O).style("opacity",0).remove();var K=ue.enter().append("circle").attr("class","bump-dot bump-dot-"+z).attr("cx",function(B){return i(B[a])}).attr("cy",function(B){return s(B[d])}).attr("r",v).attr("fill",oe).attr("stroke","#fff").attr("stroke-width",1.5).style("opacity",0);K.merge(ue).transition().duration(O).style("opacity",1).attr("cx",function(B){return i(B[a])}).attr("cy",function(B){return s(B[d])}).attr("r",v).attr("fill",oe),z++})}getHoverSelector(e,r){return".tag-bump-"+r.id+" .bump-dot"}formatTooltip(e,r,i){return{title:{text:String(r[i.mapping.group])},items:[{color:i.color,label:String(r[i.mapping.x_var]),value:String(r[i.mapping.y_var])}]}}remove(e,r){e.dom.chartArea.selectAll(".tag-bump-"+r.id).remove()}};var Bd=class{static type="radar";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints=null;static dataContract={axis:{required:!0},value:{required:!0,numeric:!0}};render(e,r){var i=e.margin||(e.config&&e.config.layout?e.config.layout.margin:{top:0,right:0,bottom:0,left:0}),s=(e.width||e.runtime&&e.runtime.width||0)-i.left-i.right,a=(e.height||e.runtime&&e.runtime.height||0)-i.top-i.bottom,d=r.mapping.axis,m=r.mapping.value,v=r.mapping.group,_=r.options&&r.options.labelOffset||16,x=s/2,w=a/2,I=Math.max(0,Math.min(s,a)/2-_-8),O=[],z=new Set,J=d3.max(r.data,function(cr){return+cr[m]})||0,Q=d3.scaleLinear().domain([0,J>0?J:1]).range([0,I]),oe=[],se=v?d3.group(r.data,function(cr){return cr[v]}):new Map([[r.label||"Series",r.data]]),re=e.derived.colorDiscrete||d3.scaleOrdinal(d3.schemeCategory10),q,ue,K,B,he;if(r.data.forEach(function(cr){var bn=cr[d];z.has(bn)||(z.add(bn),O.push(bn))}),q=O.length,q===0)return;ue=e.dom.chartArea.selectAll(".tag-radar-"+r.id).data([null]).join("g").attr("class","tag-radar-"+r.id),K=ue.selectAll(".radar-axis-layer").data([null]).join("g").attr("class","radar-axis-layer"),B=ue.selectAll(".radar-polygon-layer").data([null]).join("g").attr("class","radar-polygon-layer");var He=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0;function er(cr){var bn=2*Math.PI*cr/q,mn=Math.sin(bn),qn=Math.cos(bn),Wt="middle";return mn>.25?Wt="start":mn<-.25&&(Wt="end"),{lineX:x+I*mn,lineY:w-I*qn,labelX:x+(I+_)*mn,labelY:w-(I+_)*qn,textAnchor:Wt}}var Er=K.selectAll(".radar-axis").data(O,function(cr){return cr});Er.exit().transition().duration(He).style("opacity",0).remove();var zt=Er.enter().append("g").attr("class","radar-axis").style("opacity",0);zt.append("line").attr("class","radar-axis-line").attr("stroke","var(--chart-grid, #cbd5e1)").attr("stroke-width",1).attr("x1",x).attr("y1",w).attr("x2",x).attr("y2",w),zt.append("text").attr("class","radar-axis-label").attr("fill","var(--chart-fg, #1f2937)").attr("x",x).attr("y",w).attr("dy","0.35em").attr("text-anchor","middle");var _n=zt.merge(Er);_n.transition().duration(He).style("opacity",1),_n.each(function(cr,bn){var mn=er(bn),qn=d3.select(this);qn.select(".radar-axis-line").attr("stroke","var(--chart-grid, #cbd5e1)").attr("stroke-width",1).transition().duration(He).attr("x1",x).attr("y1",w).attr("x2",mn.lineX).attr("y2",mn.lineY),qn.select(".radar-axis-label").text(cr).transition().duration(He).attr("x",mn.labelX).attr("y",mn.labelY).attr("text-anchor",mn.textAnchor)}),se.forEach(function(cr,bn){var mn=new Map,qn=[];cr.forEach(function(Wt){mn.set(Wt[d],Wt)}),O.forEach(function(Wt,Pr){var gi=2*Math.PI*Pr/q,Ii=mn.get(Wt),yi=Ii?+Ii[m]:0,as=Q(Number.isFinite(yi)?yi:0);qn.push({axis:Wt,angle:gi,value:Number.isFinite(yi)?yi:0,x:x+as*Math.sin(gi),y:w-as*Math.cos(gi),datum:Ii||null})}),oe.push({key:bn,color:re(bn),points:qn,rows:cr})}),e.derived.colorDiscrete=re.domain(oe.map(function(cr){return cr.key})),e.colorDiscrete=e.derived.colorDiscrete,he=d3.line().x(function(cr){return cr.x}).y(function(cr){return cr.y}).curve(d3.curveLinearClosed);function $r(cr){return he(cr.map(function(bn){return{x,y:w}}))}var In=B.selectAll(".radar-polygon").data(oe,function(cr){return cr.key});In.exit().transition().duration(He).style("opacity",0).remove();var On=In.enter().append("path").attr("class","radar-polygon").attr("d",function(cr){return $r(cr.points)}).attr("fill",function(cr){return cr.color}).attr("fill-opacity",0).attr("stroke",function(cr){return cr.color}).attr("stroke-width",2).attr("stroke-opacity",0);On.merge(In).transition().duration(He).attrTween("d",function(cr){var bn=this,mn=bn._radarPoints||cr.points.map(function(){return{x,y:w}}),qn=cr.points,Wt=mn.map(function(Pr,gi){var Ii=qn[gi]||Pr;return{x:d3.interpolateNumber(Pr.x,Ii.x),y:d3.interpolateNumber(Pr.y,Ii.y)}});return function(Pr){var gi=Wt.map(function(Ii){return{x:Ii.x(Pr),y:Ii.y(Pr)}});return bn._radarPoints=qn,he(gi)}}).attr("fill",function(cr){return cr.color}).attr("fill-opacity",.2).attr("stroke",function(cr){return cr.color}).attr("stroke-opacity",1)}getHoverSelector(e,r){return".tag-radar-"+r.id+" .radar-polygon"}formatTooltip(e,r){return{title:{text:String(r.key)},items:r.points.map(function(i){return{color:r.color,label:i.axis,value:String(i.value)}})}}remove(e,r){e.dom.chartArea.selectAll(".tag-radar-"+r.id).remove()}};var kd=class{static type="funnel";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints=null;static dataContract={stage:{required:!0},value:{required:!0,numeric:!0}};render(e,r){var i=e.margin||(e.config&&e.config.layout?e.config.layout.margin:{top:0,right:0,bottom:0,left:0}),s=(e.width||e.runtime&&e.runtime.width||0)-i.left-i.right,a=(e.height||e.runtime&&e.runtime.height||0)-i.top-i.bottom,d=r.mapping.stage,m=r.mapping.value,v=r.options&&r.options.stageGap||6,_=d3.max(r.data,function(ue){return+ue[m]})||0,x=d3.scaleLinear().domain([0,_>0?_:1]).range([0,s*.95]),w=e.derived.colorDiscrete||d3.scaleOrdinal(d3.schemeTableau10),I=r.data.length>0?a/r.data.length:0,O,z,J;O=r.data.map(function(ue,K){var B=r.data[K+1]||null,he=x(+ue[m]||0),He=B?x(+B[m]||0):he*.55,er=K*I,Er=Math.max(er,er+I-v),zt=s/2,_n=zt-he/2,$r=zt+he/2,In=zt-He/2,On=zt+He/2;return{stage:ue[d],value:+ue[m],color:w(ue[d]),datum:ue,points:[[_n,er],[$r,er],[On,Er],[In,Er]],labelX:zt,labelY:(er+Er)/2}}),e.derived.colorDiscrete=w.domain(O.map(function(ue){return ue.stage})),e.colorDiscrete=e.derived.colorDiscrete;var Q=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0;function oe(ue){return"M"+ue[0][0]+","+ue[0][1]+"L"+ue[1][0]+","+ue[1][1]+"L"+ue[2][0]+","+ue[2][1]+"L"+ue[3][0]+","+ue[3][1]+"Z"}function se(ue){var K=(ue.points[0][0]+ue.points[1][0])/2,B=(ue.points[0][1]+ue.points[3][1])/2;return[[K,B],[K,B],[K,B],[K,B]]}z=e.dom.chartArea.selectAll(".tag-funnel-"+r.id).data([null]).join("g").attr("class","tag-funnel-"+r.id),J=z.selectAll(".funnel-stage-group").data(O,function(ue){return ue.stage}),J.exit().transition().duration(Q).style("opacity",0).remove();var re=J.enter().append("g").attr("class","funnel-stage-group").style("opacity",0);re.append("path").attr("class","funnel-stage").attr("d",function(ue){return oe(se(ue))}).attr("fill",function(ue){return ue.color}),re.append("text").attr("class","funnel-label").attr("x",function(ue){return ue.labelX}).attr("y",function(ue){return ue.labelY}).attr("dy","0.35em").attr("text-anchor","middle").text(function(ue){return ue.stage});var q=re.merge(J);q.transition().duration(Q).style("opacity",1),q.select(".funnel-stage").transition().duration(Q).attr("d",function(ue){return oe(ue.points)}).attr("fill",function(ue){return ue.color}),q.select(".funnel-label").text(function(ue){return ue.stage}).transition().duration(Q).attr("x",function(ue){return ue.labelX}).attr("y",function(ue){return ue.labelY})}getHoverSelector(e,r){return".tag-funnel-"+r.id+" .funnel-stage"}formatTooltip(e,r){return{title:{text:String(r.stage)},items:[{color:r.color,label:String(r.stage),value:String(r.value)}]}}remove(e,r){e.dom.chartArea.selectAll(".tag-funnel-"+r.id).remove()}};var Fd=class{static type="parallel";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints=null;static dataContract={dimensions:{required:!0}};render(e,r){var i=e.margin||(e.config&&e.config.layout?e.config.layout.margin:{top:0,right:0,bottom:0,left:0}),s=(e.width||e.runtime&&e.runtime.width||0)-i.left-i.right,a=(e.height||e.runtime&&e.runtime.height||0)-i.top-i.bottom,d=r.mapping.dimensions,m=Array.isArray(d)?d.slice():[d],v=r.mapping.group,_=d3.scalePoint().domain(m).range([0,s]).padding(.5),x={},w=e.derived.colorDiscrete||d3.scaleOrdinal(d3.schemeCategory10),I,O,z;m.forEach(function(q){var ue=d3.extent(r.data,function(K){var B=+K[q];return Number.isFinite(B)?B:null});(!ue||ue[0]===void 0||ue[1]===void 0)&&(ue=[0,1]),ue[0]===ue[1]&&(ue=[ue[0]-1,ue[1]+1]),x[q]=d3.scaleLinear().domain(ue).range([a,0])}),e.derived.colorDiscrete=w.domain(Array.from(new Set(r.data.map(function(q){return v?q[v]:r.label})))),e.colorDiscrete=e.derived.colorDiscrete,I=e.dom.chartArea.selectAll(".tag-parallel-"+r.id).data([null]).join("g").attr("class","tag-parallel-"+r.id),O=I.selectAll(".parallel-axis").data(m).join(function(q){var ue=q.append("g").attr("class","parallel-axis");return ue.append("text").attr("class","parallel-axis-label"),ue}).attr("transform",function(q){return"translate("+_(q)+",0)"}).each(function(q){d3.select(this).call(d3.axisLeft(x[q]).ticks(5))}),O.select(".parallel-axis-label").attr("x",0).attr("y",-10).attr("text-anchor","middle").text(function(q){return q}),z=d3.line().defined(function(q){return q&&q[1]!==null}).x(function(q){return q[0]}).y(function(q){return q[1]});var J=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0;function Q(q){var ue=m.map(function(K){var B=+q[K];return Number.isFinite(B)?[_(K),x[K](B)]:[_(K),null]});return z(ue)}function oe(q){var ue=v?q[v]:r.label;return w(ue)}var se=I.selectAll(".parallel-line").data(r.data,function(q,ue){return q._source_key!=null?q._source_key:ue});se.exit().transition().duration(J).attr("stroke-opacity",0).remove();var re=se.enter().append("path").attr("class","parallel-line").attr("fill","none").attr("d",Q).attr("stroke",oe).attr("stroke-opacity",0);re.merge(se).transition().duration(J).attr("d",Q).attr("stroke",oe).attr("stroke-opacity",.6)}getHoverSelector(e,r){return".tag-parallel-"+r.id+" .parallel-line"}formatTooltip(e,r,i){var s=Array.isArray(i.mapping.dimensions)?i.mapping.dimensions:[i.mapping.dimensions],a=i.mapping.group?String(r[i.mapping.group]):String(i.label||"Series");return{title:{text:a},items:s.map(function(d){return{color:e.colorDiscrete?e.colorDiscrete(i.mapping.group?r[i.mapping.group]:i.label):i.color,label:d,value:String(r[d])}})}}remove(e,r){e.dom.chartArea.selectAll(".tag-parallel-"+r.id).remove()}};var ss=new Map;function Ls(t,e){if(ss.has(t))throw new Error("Renderer already registered for type: "+t);var r=e&&e.constructor?e.constructor.traits:null,i=["hasAxes","referenceLines","legendType","binning","rolloverStyle"];if(!r)throw new Error("Renderer missing static traits: "+t);i.forEach(function(s){if(!(s in r))throw new Error("Renderer trait missing '"+s+"': "+t)}),ss.set(t,e)}function B6(t){if(!ss.has(t))throw new Error("Unknown renderer type: "+t);return ss.get(t)}function pl(t){return B6(t.type)}function Dy(){return ss.has(sd.type)||Ls(sd.type,new sd),ss.has(ad.type)||Ls(ad.type,new ad),ss.has(od.type)||Ls(od.type,new od),ss.has(ld.type)||Ls(ld.type,new ld),ss.has(cd.type)||Ls(cd.type,new cd),ss.has(ud.type)||Ls(ud.type,new ud),ss.has(fd.type)||Ls(fd.type,new fd),ss.has(yd.type)||Ls(yd.type,new yd),ss.has(bd.type)||Ls(bd.type,new bd),ss.has(vd.type)||Ls(vd.type,new vd),ss.has(_d.type)||Ls(_d.type,new _d),ss.has(xd.type)||Ls(xd.type,new xd),ss.has(Sd.type)||Ls(Sd.type,new Sd),ss.has(Ed.type)||Ls(Ed.type,new Ed),ss.has(wd.type)||Ls(wd.type,new wd),ss.has(Ad.type)||Ls(Ad.type,new Ad),ss.has(Od.type)||Ls(Od.type,new Od),ss.has(Cd.type)||Ls(Cd.type,new Cd),ss.has(Ld.type)||Ls(Ld.type,new Ld),ss.has(Nd.type)||Ls(Nd.type,new Nd),ss.has(Dd.type)||Ls(Dd.type,new Dd),ss.has(Rd.type)||Ls(Rd.type,new Rd),ss.has(Bd.type)||Ls(Bd.type,new Bd),ss.has(kd.type)||Ls(kd.type,new kd),ss.has(Fd.type)||Ls(Fd.type,new Fd),ss.has(Td.type)||Ls(Td.type,new Td),ss.has(Id.type)||Ls(Id.type,new Id),ss}function Ry(){return Array.from(ss.values())}function By(t,e){var r=qs(t,e.label,e.color),i=d3.drag().on("start",function(){d3.select(this).raise().classed("active",!0).style("cursor","grabbing")}).on("drag",function(s,a){a[e.mapping.x_var]=t.xScale.invert(s.x),a[e.mapping.y_var]=t.yScale.invert(s.y),d3.select(this).attr("cx",t.xScale(a[e.mapping.x_var])).attr("cy",t.yScale(a[e.mapping.y_var]))}).on("end",function(s,a){d3.select(this).classed("active",!1).style("cursor","grab"),t.updateRegression(r,e.label),t.emit("dragEnd",{point:a,layerLabel:e.label})});t.chart.selectAll("."+_r("point",t.element.id,e.label)).style("cursor","grab").call(i)}function Y0(t,e,r){Md(t);var i=d3.select(t.dom.element),s=i.append("div").attr("class","myIO-status-bar").attr("role","status").attr("aria-live","polite");s.append("span").attr("class","myIO-status-bar-text").text(e);var a=s.append("span").attr("class","myIO-status-bar-actions");(r||[]).forEach(function(d){a.append("button").attr("class","myIO-status-bar-btn").attr("type","button").text(d.label).on("click",d.handler)})}function Md(t){d3.select(t.dom.element).selectAll(".myIO-status-bar").remove()}var ky=["point","bar","histogram","hexbin","groupedBar"];function Fy(t){var e=t.config.interactions.brush;if(!(!e||!e.enabled)){var r=(t.derived.currentLayers||[]).filter(function(m){return ky.indexOf(m.type)>-1});if(r.length!==0){J0(t);var i=e.direction==="x"?d3.brushX():e.direction==="y"?d3.brushY():d3.brush(),s=t.config.layout.margin,a=t.runtime.width-(s.left+s.right),d=t.runtime.height-(s.top+s.bottom);i.extent([[0,0],[a,d]]),i.on("brush",function(m){ix(t,m,r,e)}).on("end",function(m){sx(t,m,r,e)}),t.dom.chartArea.insert("g",":first-child").attr("class","myIO-brush").call(i),t.dom.chartArea.select(".myIO-brush .overlay").style("cursor","crosshair"),t.runtime._brushFn=i,d3.select(t.dom.element).on("keydown.brush",function(m){m.key==="Escape"&&t.runtime._brushed&&k6(t)})}}}function ix(t,e,r,i){if(e.selection){var s=e.selection,a=i.direction;r.forEach(function(d){var m=$y(t,d);t.dom.chartArea.selectAll(m).each(function(v){var _=My(t,v,d,s,a);d3.select(this).style("opacity",_?1:"var(--chart-brush-dim-opacity)")})})}}function sx(t,e,r,i){if(!e.selection){k6(t);return}var s=e.selection,a=i.direction,d=ax(t,s,a),m=[],v=[];r.forEach(function(x){x.data.forEach(function(w){My(t,w,x,s,a)&&(m.push(w),w._source_key&&v.push(w._source_key))})}),t.runtime._brushed={data:m,extent:d,keys:v};var _=r.reduce(function(x,w){return x+w.data.length},0);Y0(t,m.length+" of "+_+" points selected",[{label:"Clear",handler:function(){k6(t)}}]),t.emit("brushed",{data:m,extent:d,keys:v,layerLabel:r.length===1?r[0].label:null})}function k6(t){(t.derived.currentLayers||[]).forEach(function(e){if(ky.indexOf(e.type)>-1){var r=$y(t,e);t.dom.chartArea.selectAll(r).style("opacity",1)}}),t.runtime._brushFn&&t.dom.chartArea.select(".myIO-brush").call(t.runtime._brushFn.move,null),t.runtime._brushed=null,Md(t),t.emit("brushed",{data:[],extent:null,keys:[],layerLabel:null})}function My(t,e,r,i,s){var a=r.mapping.x_var,d=r.mapping.y_var,m=t.xScale(e[a]),v=t.yScale(e[d]);return isNaN(m)||isNaN(v)?!1:s==="x"?m>=i[0]&&m<=i[1]:s==="y"?v>=i[0]&&v<=i[1]:m>=i[0][0]&&m<=i[1][0]&&v>=i[0][1]&&v<=i[1][1]}function X0(t,e,r){return typeof t.invert=="function"?[t.invert(e),t.invert(r)]:null}function ax(t,e,r){return r==="x"?{x:X0(t.xScale,e[0],e[1]),y:null}:r==="y"?{x:null,y:X0(t.yScale,e[1],e[0])}:{x:X0(t.xScale,e[0][0],e[1][0]),y:X0(t.yScale,e[1][1],e[0][1])}}function $y(t,e){return e.type==="groupedBar"?".tag-grouped-bar-g rect":"."+_r(e.type,t.dom.element.id,e.label)}function J0(t){t.dom&&t.dom.chartArea&&t.dom.chartArea.selectAll(".myIO-brush").remove(),t.dom&&t.dom.element&&d3.select(t.dom.element).on("keydown.brush",null),t.runtime._brushed=null}var F6=30;function Py(t,e,r){Nf(t);var i=d3.select(t.dom.element),s=i.append("div").attr("class","myIO-popover").attr("role","dialog").attr("aria-label","Annotate data point"),a=s.append("div").attr("class","myIO-popover-field");a.append("label").text("Label:");var d;r.presetLabels&&r.presetLabels.length>0?(d=a.append("select").attr("class","myIO-popover-input"),r.presetLabels.forEach(function(w){d.append("option").attr("value",w).text(w)}),r.existingLabel&&d.property("value",r.existingLabel)):(d=a.append("input").attr("class","myIO-popover-input").attr("type","text").attr("maxlength",F6).attr("placeholder","Enter label..."),r.existingLabel&&d.property("value",r.existingLabel));var m=null;if(r.categoryColors){var v=s.append("div").attr("class","myIO-popover-field");v.append("label").text("Category:");var _=v.append("div").attr("class","myIO-popover-colors");Object.keys(r.categoryColors).forEach(function(w){var I=r.categoryColors[w];_.append("button").attr("class","myIO-popover-color-btn").attr("type","button").attr("title",w).attr("aria-label",w).style("background-color",I).on("click",function(){_.selectAll(".myIO-popover-color-btn").classed("selected",!1),d3.select(this).classed("selected",!0),m=I})})}var x=s.append("div").attr("class","myIO-popover-buttons");r.existingLabel&&r.onRemove&&x.append("button").attr("class","myIO-popover-btn myIO-popover-btn--danger").attr("type","button").text("Remove").on("click",function(){Nf(t),r.onRemove()}),x.append("button").attr("class","myIO-popover-btn").attr("type","button").text("Cancel").on("click",function(){Nf(t),r.onCancel&&r.onCancel()}),x.append("button").attr("class","myIO-popover-btn myIO-popover-btn--primary").attr("type","button").text("Apply").on("click",function(){var w=d.property("value").trim().substring(0,F6);w&&(Nf(t),r.onApply(w,m))}),ox(t,s,e),d.node().focus(),s.on("keydown",function(w){if(w.key==="Enter"){var I=d.property("value").trim().substring(0,F6);I&&(Nf(t),r.onApply(I,m))}w.key==="Escape"&&(Nf(t),r.onCancel&&r.onCancel())})}function ox(t,e,r){var i=t.config.layout.margin,s=r.px+i.left,a=r.py+i.top-10;e.style("left",Math.max(4,Math.min(s-80,t.runtime.totalWidth-180))+"px").style("bottom",t.runtime.height-a+8+"px")}function Nf(t){d3.select(t.dom.element).selectAll(".myIO-popover").remove()}var lx=["point","bar","histogram","hexbin","groupedBar"];function Uy(t){var e=t.config.interactions.annotation;if(!(!e||!e.enabled)){t.runtime._annotations||(t.runtime._annotations=[]);var r=(t.derived.currentLayers||[]).filter(function(i){return lx.indexOf(i.type)>-1});r.forEach(function(i){var s="."+_r(i.type,t.dom.element.id,i.label);t.dom.chartArea.selectAll(s).on("click.annotate",function(a,d){a.stopPropagation();var m=dx(t,d._source_key);Py(t,{px:t.xScale(d[i.mapping.x_var]),py:t.yScale(d[i.mapping.y_var])},{presetLabels:e.presetLabels,categoryColors:e.categoryColors,existingLabel:m?m.label:null,onApply:function(v,_){cx(t,d,i,v,_)},onRemove:function(){ux(t,d._source_key)},onCancel:function(){}})})}),K0(t),M6(t)}}function cx(t,e,r,i,s){t.runtime._annotations=t.runtime._annotations.filter(function(d){return d._source_key!==e._source_key});var a={_source_key:e._source_key,x:e[r.mapping.x_var],y:e[r.mapping.y_var],x_var:r.mapping.x_var,y_var:r.mapping.y_var,label:i,category:s||null,layerLabel:r.label,timestamp:new Date().toISOString()};t.runtime._annotations.push(a),K0(t),M6(t),t.emit("annotated",{annotations:t.runtime._annotations,action:"add",latest:a})}function ux(t,e){var r=t.runtime._annotations.find(function(i){return i._source_key===e});t.runtime._annotations=t.runtime._annotations.filter(function(i){return i._source_key!==e}),K0(t),M6(t),t.emit("annotated",{annotations:t.runtime._annotations,action:"remove",latest:r||null})}function fx(t){t.runtime._annotations=[],K0(t),Md(t),t.emit("annotated",{annotations:[],action:"clear",latest:null})}function K0(t){var e=t.dom.chartArea.selectAll(".myIO-annotations").data([0]);e=e.enter().append("g").attr("class","myIO-annotations").merge(e);var r=e.selectAll(".myIO-annotation-mark").data(t.runtime._annotations||[],function(a){return a._source_key});r.exit().remove();var i=r.enter().append("g").attr("class","myIO-annotation-mark");i.append("circle").attr("r",8).attr("fill","none").attr("stroke-width",2),i.append("text").attr("dy",-12).attr("text-anchor","middle").attr("class","myIO-annotation-label");var s=i.merge(r);s.attr("transform",function(a){return"translate("+t.xScale(a.x)+","+t.yScale(a.y)+")"}),s.select("circle").style("stroke",function(a){return a.category||"var(--chart-annotation-ring)"}),s.select("text").text(function(a){return a.label.length>30?a.label.substring(0,27)+"\u2026":a.label}).style("font-size","var(--chart-annotation-font-size)").style("fill","var(--chart-text-color)")}function M6(t){var e=(t.runtime._annotations||[]).length;if(e===0){Md(t);return}Y0(t,e+" annotation"+(e===1?"":"s"),[{label:"Export",handler:function(){var r=t.runtime._annotations||[];r.length>0&&P0(t.dom.element.id+"_annotations.csv",r)}},{label:"Clear",handler:function(){fx(t)}}])}function dx(t,e){return(t.runtime._annotations||[]).find(function(r){return r._source_key===e})}function Vy(t){Nf(t)}var qh=new Map;function $6(t){return t&&t.config&&t.config.interactions&&t.config.interactions.linked}function P6(t){var e=$6(t);return e&&e.cursor===!0&&e.group?e.group:null}function jy(t){var e=P6(t);if(e){var r=qh.get(e);r||(r=new Set,qh.set(e,r)),r.add(t),t.runtime=t.runtime||{},t.runtime._linkedCursor||(t.runtime._linkedCursor={lastTs:0})}}function qy(t){qh.forEach(function(e,r){e.delete(t)&&e.size===0&&qh.delete(r)})}function Hy(t,e){var r=P6(t);if(r){var i=qh.get(r);i&&i.forEach(function(s){s!==t&&px(s,e)})}}function hx(t){var e=P6(t);e&&Hy(t,{sourceId:t.element&&t.element.id,group:e,ts:typeof performance<"u"?performance.now():Date.now(),clear:!0})}function Q0(t,e,r,i){var s=$6(t);if(!(!s||s.cursor!==!0)){var a=s.keyColumn,d=e&&a&&e[a]!==void 0?e[a]:null;Hy(t,{sourceId:t.element&&t.element.id,group:s.group,keyValue:d,xValue:r,tooltip:i||null,ts:typeof performance<"u"?performance.now():Date.now()})}}function Z0(t){var e=$6(t);!e||e.cursor!==!0||hx(t)}function px(t,e){var r=t.runtime&&t.runtime._linkedCursor;if(r&&!(typeof e.ts=="number"&&e.ts+a)return null;var v=r(d);return Number.isFinite(v)?v:null}var _=typeof r.domain=="function"?r.domain():[];if(_.indexOf(e)===-1)return null;var x=r(e);return Number.isFinite(x)?x:null}function gx(t,e){var r=t.plot||t.svg;if(!(!r||typeof r.select!="function")){var i=r.select("line.myIO-hover-rule");i.empty()&&(i=r.append("line").attr("class","myIO-hover-rule"));var s=t.margin||{},a=(t.height||0)-((+s.top||0)+(+s.bottom||0));i.attr("x1",e).attr("x2",e).attr("y1",0).attr("y2",a).style("display",null)}}function Gy(t){var e=t.plot||t.svg;!e||typeof e.select!="function"||e.select("line.myIO-hover-rule").remove()}var zy=["point","bar","histogram","hexbin","groupedBar","waffle","beeswarm","lollipop","dumbbell"];function Wy(t){var e=t.config.interactions.linked;if(!(!e||!e.enabled)&&!(typeof crosstalk>"u")){U6(t);var r=new crosstalk.SelectionHandle(e.group),i=e.filter?new crosstalk.FilterHandle(e.group):null;t.runtime._crosstalkSel=r,t.runtime._crosstalkFil=i,(e.mode==="source"||e.mode==="both")&&(t.runtime._linkedBrushHandler=function(s){s.keys&&s.keys.length>0?r.set(s.keys):r.clear()},t.on("brushed",t.runtime._linkedBrushHandler)),(e.mode==="target"||e.mode==="both")&&(r.on("change.myIO",function(s){yx(t,s.value)}),i&&i.on("change.myIO",function(s){bx(t,s.value)}))}}function yx(t,e){var r=(t.derived.currentLayers||[]).filter(function(i){return zy.indexOf(i.type)>-1});r.forEach(function(i){var s="."+_r(i.type,t.dom.element.id,i.label);t.dom.chartArea.selectAll(s).each(function(a){if(!e)d3.select(this).style("opacity",1);else{var d=e.indexOf(a._source_key)>-1;d3.select(this).style("opacity",d?1:"var(--chart-brush-dim-opacity)")}})})}function bx(t,e){var r=(t.derived.currentLayers||[]).filter(function(i){return zy.indexOf(i.type)>-1});r.forEach(function(i){var s="."+_r(i.type,t.dom.element.id,i.label);t.dom.chartArea.selectAll(s).each(function(a){if(!e)d3.select(this).style("display",null);else{var d=e.indexOf(a._source_key)>-1;d3.select(this).style("display",d?null:"none")}})})}function U6(t){t.runtime._linkedBrushHandler&&(t.off("brushed",t.runtime._linkedBrushHandler),t.runtime._linkedBrushHandler=null),t.runtime._crosstalkSel&&(t.runtime._crosstalkSel.close(),t.runtime._crosstalkSel=null),t.runtime._crosstalkFil&&(t.runtime._crosstalkFil.close(),t.runtime._crosstalkFil=null),qy(t)}function Xy(t){var e=t.config.interactions.sliders;if(!(!e||e.length===0)){V6(t),t.runtime._sliderTimers=[];var r=d3.select(t.dom.element),i=r.append("div").attr("class","myIO-slider-wrapper");e.forEach(function(s){var a=i.append("div").attr("class","myIO-slider-row");a.append("label").attr("class","myIO-slider-label").attr("for",t.dom.element.id+"-slider-"+s.param).text(s.label);var d=a.append("input").attr("type","range").attr("class","myIO-slider-input").attr("id",t.dom.element.id+"-slider-"+s.param).attr("min",s.min).attr("max",s.max).attr("step",s.step||"any").attr("aria-label",s.label).attr("aria-valuemin",s.min).attr("aria-valuemax",s.max).attr("aria-valuenow",s.value).property("value",s.value),m=a.append("span").attr("class","myIO-slider-value").text(Yy(s.value,s.step));if(!HTMLWidgets.shinyMode){d.attr("disabled",!0).attr("title","Parameter sliders require Shiny"),a.style("opacity","0.5");return}var v=t.runtime._sliderTimers.length;t.runtime._sliderTimers.push(null);var _=s.debounce||200;d.on("input",function(){var x=+this.value;m.text(Yy(x,s.step)),d3.select(this).attr("aria-valuenow",x),clearTimeout(t.runtime._sliderTimers[v]),t.runtime._sliderTimers[v]=setTimeout(function(){Shiny.onInputChange("myIO-"+t.dom.element.id+"-slider-"+s.param,x),t.emit("sliderChanged",{param:s.param,value:x})},_)})})}}function Yy(t,e){if(e&&e<1){var r=String(e).split(".")[1];return t.toFixed(r?r.length:2)}return String(t)}function V6(t){t.runtime._sliderTimers&&(t.runtime._sliderTimers.forEach(clearTimeout),t.runtime._sliderTimers=null),d3.select(t.dom.element).selectAll(".myIO-slider-wrapper").remove()}function vx(t){let e=document.createElement("div");return e.textContent=String(t),e.innerHTML}function Ky(t){t.dom.tooltip=d3.select(t.dom.element).append("div").attr("class","toolTip").attr("role","status").attr("aria-live","polite").attr("aria-hidden","true"),t.dom.tooltipTitle=t.dom.tooltip.append("div").attr("class","toolTipTitle"),t.dom.tooltipBody=t.dom.tooltip.append("div").attr("class","toolTipBody"),t.runtime.tooltipHideTimer=null,t.captureLegacyAliases()}function $d(t){d3.select(t.dom.element).select(".toolTipBox").remove(),d3.select(t.dom.element).select(".toolLine").remove(),d3.select(t.dom.element).select(".toolPointLayer").remove(),t.runtime.toolTipBox=null,t.runtime.toolLine=null,t.runtime.toolPointLayer=null,t.syncLegacyAliases()}function Qy(t,e,r){$d(t),t.runtime.toolLine=t.dom.chartArea.append("line").attr("class","toolLine"),t.runtime.toolPointLayer=t.dom.chartArea.append("g").attr("class","toolPointLayer"),t.runtime.toolTipBox=t.dom.svg.append("rect").attr("class","toolTipBox").attr("opacity",0).attr("width",t.width-(t.margin.left+t.margin.right)).attr("height",t.height-(t.margin.top+t.margin.bottom)).attr("transform","translate("+t.margin.left+","+t.margin.top+")").on("mouseover",function(i){e(i)}).on("mousemove",function(i){e(i)}).on("mouseout",function(){typeof r=="function"&&r()}).on("touchstart",function(i){i.preventDefault(),e(i)}).on("touchmove",function(i){i.preventDefault(),e(i)}).on("touchend",function(){typeof r=="function"&&r()}),t.syncLegacyAliases()}function Df(t,e){if(!t.dom.tooltip)return;clearTimeout(t.runtime.tooltipHideTimer);let r=e.pointer||[0,0],i=e.title||{},s=e.items||[],a=s.length===1&&s[0].color?s[0].color:null;t.dom.tooltipTitle.style("border-left-color",a||null).html(""+vx(Jy(i))+"");let d=t.dom.tooltipBody.selectAll(".toolTipItem").data(s);d.exit().remove();let m=d.enter().append("div").attr("class","toolTipItem");m.append("span").attr("class","dot"),m.append("span").attr("class","toolTipLabel"),m.append("span").attr("class","toolTipValue"),m.merge(d).select(".dot").style("background-color",function(v){return v.color||"transparent"}),m.merge(d).select(".toolTipLabel").text(function(v){return v.label||""}),m.merge(d).select(".toolTipValue").text(function(v){return Jy(v)}),t.dom.tooltip.style("display","inline-block").style("opacity",1).attr("aria-hidden","false"),_x(t,r)}function Pu(t){t.dom.tooltip&&(clearTimeout(t.runtime.tooltipHideTimer),t.runtime.tooltipHideTimer=window.setTimeout(function(){t.dom.tooltip.style("display","none").style("opacity",0).attr("aria-hidden","true")},300))}function Jy(t){if(t==null)return"";if(typeof t=="string")return t;let e=typeof t.format=="function"?t.format:function(i){return i},r=t.text!=null?t.text:t.value;return r==null?"":e(r)}function _x(t,e){let r=t.dom.element.getBoundingClientRect(),i=t.dom.tooltip.node();t.dom.tooltip.style("left",e[0]+12+"px").style("top",e[1]+12+"px");let s=i.getBoundingClientRect(),a=e[0]+12,d=e[1]+12;a+s.width>r.width&&(a=Math.max(8,e[0]-s.width-12)),d+s.height>r.height&&(d=Math.max(8,e[1]-s.height-12)),t.dom.tooltip.style("left",a+"px").style("top",d+"px")}var Pd=300;function Zy(t,e){var r=e||t.currentLayers||[],i=t,s=["text","yearMon"],a=s.indexOf(t.options.xAxisFormat)>-1?function(K){return K}:d3.format(t.options.xAxisFormat||""),d=d3.format(t.options.yAxisFormat||""),m=t.newScaleY?d3.format(t.newScaleY):d;$d(t),r.forEach(function(K){["bar","point","hexbin","histogram","calendarHeatmap"].indexOf(K.type)>-1&&v(K)}),r.some(function(K){return K.type==="groupedBar"})&&t.chart.selectAll(".tag-grouped-bar-g rect").on("mouseout",J).on("mouseover",z).on("mousemove",z).on("touchstart",function(K){K.preventDefault(),z.call(this,K)}).on("touchmove",function(K){K.preventDefault(),z.call(this,K)}).on("touchend",J),r.length>0&&r.every(function(K){return["line","area"].indexOf(K.type)>-1})&&Qy(t,Q,oe),r.some(function(K){return K.type==="donut"})&&se(".donut","donut",function(K,B){return{title:{text:B.mapping.x_var+": "+K.data[B.mapping.x_var]},items:[{color:t.colorDiscrete(K.index),label:B.mapping.y_var,value:K.data[B.mapping.y_var]}]}}),r.some(function(K){return K.type==="treemap"})&&t.chart.selectAll(".root").on("mouseout",q).on("mouseover",re).on("mousemove",re).on("touchstart",function(K){K.preventDefault(),re.call(this,K)}).on("touchmove",function(K){K.preventDefault(),re.call(this,K)}).on("touchend",q);function v(K){var B=pl(K),he=B.getHoverSelector?B.getHoverSelector(t,K):"."+_r(K.type,t.element.id,K.label);t.chart.selectAll(he).on("mouseout",function(){x.call(this,K)}).on("mouseover",function(He){_.call(this,He,K)}).on("mousemove",function(He){_.call(this,He,K)}).on("touchstart",function(He){He.preventDefault(),_.call(this,He,K)}).on("touchmove",function(He){He.preventDefault(),_.call(this,He,K)}).on("touchend",function(){x.call(this,K)})}function _(K,B){var he=d3.select(this).data()[0],He=pl(B),er=w(B,He,he,this);HTMLWidgets.shinyMode&&Shiny.onInputChange("myIO-"+i.element.id+"-rollover",JSON.stringify(he)),I(this,B,he),Df(i,{pointer:ue(K),title:er.title,items:er.items});var Er=B.type==="hexbin"?i.xScale?i.xScale.invert(he.x):null:B.type==="histogram"?he.x0:B.type==="calendarHeatmap"?he.date instanceof Date?he.date:new Date(he[B.mapping.date]+"T00:00:00Z"):he[B.mapping.x_var];Q0(i,he,Er,er)}function x(K){O(this,K),Pu(i),Z0(i)}function w(K,B,he,He){if(K.type==="hexbin"){var er=d3.format(",.2f");return{title:{text:"x: "+er(i.xScale.invert(he.x))+", y: "+er(i.yScale.invert(he.y))},items:[{color:d3.select(He).attr("fill"),label:"Count",value:he.length}]}}if(K.type==="histogram")return{title:{text:"Bin: "+he.x0+" to "+he.x1},items:[{color:d3.select(He).attr("fill"),label:"Count",value:he.length}]};if(K.type==="calendarHeatmap"){var Er=B.formatTooltip(i,he,K);return{title:{text:typeof Er.title=="string"?Er.title:Er.title.text},items:[{color:Er.color||d3.select(He).attr("fill"),label:Er.label||K.label,value:Er.value}]}}var zt=K.mapping.x_var+": "+a(he[K.mapping.x_var]),_n=i.newY?i.newY:K.mapping.y_var,$r=K.type==="point"||K.type==="bar"?K.mapping.y_var:K.label,In=qs(i,K.label,K.color);if(B&&typeof B.formatTooltip=="function"){var On=B.formatTooltip(i,he,K);zt=On.title||zt,$r=On.label||$r,In=On.color||In}return{title:{text:zt},items:[{color:In,label:$r,value:m(he[_n])}]}}function I(K,B){var he=d3.select(K),He=B.type==="hexbin"?"#333":he.attr("fill")||he.style("fill")||qs(i,B.label,B.color);if(B.type==="hexbin"){he.style("stroke",He).style("stroke-width","2px");return}he.interrupt().style("stroke",He).style("stroke-width","2px").style("stroke-opacity",.8),B.type==="point"&&he.attr("r",Math.max(+he.attr("r")||0,6))}function O(K,B){var he=d3.select(K);he.interrupt().transition().duration(Pd).style("stroke-width","0px").style("stroke","transparent").style("stroke-opacity",null),B.type==="point"&&he.transition().duration(Pd).attr("r",If(i))}function z(K){var B=d3.select(this).data()[0],he=r[B.idx],He=qs(i,he.label,he.color);HTMLWidgets.shinyMode&&Shiny.onInputChange("myIO-"+i.element.id+"-rollover",JSON.stringify(B.data.values)),d3.select(this).interrupt().style("stroke",He).style("stroke-width","2px").style("stroke-opacity",.8);var er={title:{text:he.mapping.x_var+": "+a(B.data[0])},items:[{color:He,label:he.mapping.y_var,value:m(B[1]-B[0])}]};Df(i,{pointer:ue(K),title:er.title,items:er.items}),Q0(i,B.data,B.data[0],er)}function J(){d3.select(this).interrupt().transition().duration(Pd).style("stroke-width","0px").style("stroke","transparent").style("stroke-opacity",null),Pu(i),Z0(i)}function Q(K){var B=d3.pointer(K,this),he=i.xScale.invert(B[0]),He=[],er=d3.bisector(function($r){return+$r[0]}).left;if(r.forEach(function($r){var In=$r.data,On=$r.mapping.x_var,cr=i.newY?i.newY:$r.mapping.y_var||$r.mapping.high_y,bn=In.map(function(gi){return gi[On]}),mn=er(bn,he),qn=In[mn-1],Wt=In[mn],Pr=qn?Wt&&he-qn[On]>Wt[On]-he?Wt:qn:Wt;Pr&&He.push({color:$r.color,label:$r.label,xVar:On,yVar:cr,displayValue:Pr.density!=null?Pr.density:Pr[cr],value:Pr})}),He.length===0){oe();return}HTMLWidgets.shinyMode&&Shiny.onInputChange("myIO-"+i.element.id+"-rollover",JSON.stringify(He.map(function($r){return $r.value})));var Er=He[0].value[He[0].xVar];i.toolLine.style("stroke","var(--chart-ref-line-color)").style("stroke-width","1px").style("stroke-dasharray","4,4").attr("x1",i.xScale(Er)).attr("x2",i.xScale(Er)).attr("y1",0).attr("y2",i.height-(i.margin.top+i.margin.bottom));var zt=i.toolPointLayer.selectAll("circle").data(He);zt.exit().remove(),zt.enter().append("circle").attr("r",4).merge(zt).attr("cx",function($r){return i.xScale($r.value[$r.xVar])}).attr("cy",function($r){return i.yScale($r.value[$r.yVar])}).attr("fill","#ffffff").attr("stroke",function($r){return $r.color}).attr("stroke-width",2);var _n={title:{text:He[0].xVar+": "+a(Er)},items:He.map(function($r){return{color:$r.color,label:$r.label,value:m($r.displayValue)}})};Df(i,{pointer:ue(K),title:_n.title,items:_n.items}),Q0(i,He[0].value,Er,_n)}function oe(){i.toolLine&&i.toolLine.style("stroke","none"),i.toolPointLayer&&i.toolPointLayer.selectAll("*").remove(),Pu(i),Z0(i)}function se(K,B,he){var He=r.filter(function(er){return er.type===B})[0];t.chart.selectAll(K).on("mouseout",function(){t.chart.selectAll(K).transition().duration(Pd).style("opacity",1),Pu(i)}).on("mouseover",function(er,Er){t.chart.selectAll(K).style("opacity",.4),d3.select(this).style("opacity",.85);var zt=he(Er,He);Df(i,{pointer:ue(er),title:zt.title,items:zt.items})}).on("mousemove",function(er,Er){var zt=he(Er,He);Df(i,{pointer:ue(er),title:zt.title,items:zt.items})}).on("touchstart",function(er,Er){er.preventDefault(),t.chart.selectAll(K).style("opacity",.4),d3.select(this).style("opacity",.85);var zt=he(Er,He);Df(i,{pointer:ue(er),title:zt.title,items:zt.items})}).on("touchend",function(){t.chart.selectAll(K).transition().duration(Pd).style("opacity",1),Pu(i)})}function re(K,B){for(var he=r.filter(function(er){return er.type==="treemap"})[0],He=B;He.depth>1;)He=He.parent;t.chart.selectAll(".root").style("opacity",.4),d3.select(this).style("opacity",.85),Df(i,{pointer:ue(K),title:{text:he.mapping.level_1+": "+B.data[he.mapping.level_1]},items:[{color:t.colorDiscrete(He.data.id),label:B.data[he.mapping.level_2],value:B.value}]})}function q(){t.chart.selectAll(".root").transition().duration(Pd).style("opacity",1),Pu(i)}function ue(K){return d3.pointer(K,i.dom.element)}}var xx=.05,Sx=.15;function t7(t,e){var r=t.margin,i=s1(t),s=[];e.forEach(function(v){var _=d3.extent(v.data,function(x){return+x[v.mapping.value]});s.push(_)});var a=d3.min(s,function(v){return v[0]}),d=d3.max(s,function(v){return v[1]}),m=d3.scaleLinear().domain([a,d]).nice().range([0,t.width-(r.left+r.right)]);e.forEach(function(v){var _=v.data.map(function(x){return x[v.mapping.value]});v.bins=d3.bin().domain(m.domain()).thresholds(m.ticks(v.mapping.bins))(_),v.max_value=d3.max(v.bins,function(x){return x.length})}),t.derived.xScale=m,t.derived.yScale=d3.scaleLinear().domain([0,d3.max(e,function(v){return v.max_value})]).nice().range([i-(r.top+r.bottom),0])}function r7(t,e,r){var i=t.margin,s=[],a=[],d=[],m=[],v=r||{},_=v.xExtentFields||["x_var"],x=v.yExtentFields||["y_var"],w=e.filter(function(B){var he=B.scaleHints;return!(he&&Array.isArray(he.xExtentFields)&&he.xExtentFields.length===0&&Array.isArray(he.yExtentFields)&&he.yExtentFields.length===0)});w.forEach(function(B){var he=B.scaleHints&&Array.isArray(B.scaleHints.xExtentFields)?B.scaleHints.xExtentFields:_,He=[];he.forEach(function(In){var On=B.mapping[In]||In,cr=B.data.map(function(bn){return+bn[On]});He=He.concat(cr)});var er=d3.extent(He.length>0?He:[0]),Er=B.scaleHints&&Array.isArray(B.scaleHints.yExtentFields)?B.scaleHints.yExtentFields:x,zt=[];Er.forEach(function(In){var On=B.mapping[In]||In,cr=B.data.map(function(bn){return+bn[On]});zt=zt.concat(cr)});var _n=d3.extent(zt.length>0?zt:[0],function(In){return In});s.push(er),a.push([_n[0],_n[1]]);var $r=B.mapping.x_var;d.push(B.data.map(function(In){return In[$r]})),m.push(B.data.map(function(In){var On=B.mapping.y_var||"y_var";return In[On]}))});var I=d3.min(s,function(B){return B[0]}),O=d3.max(s,function(B){return B[1]}),z=d3.min(s,function(B){return B[0]}),J=d3.max(s,function(B){return B[1]});t.derived.xCheck=z===0&&J===0,I==O&&(I=I-1,O=O+1);var Q=Math.max(Math.abs(O-I)*xx,.5),oe=[t.config.scales.xlim.min?+t.config.scales.xlim.min:I-Q,t.config.scales.xlim.max?+t.config.scales.xlim.max:O+Q];t.derived.xBanded=[].concat.apply([],d).map(function(B){try{return Array.isArray(B)?B[0]:B}catch{return}}).filter(e7);var se=d3.min(a,function(B){return B[0]}),re=d3.max(a,function(B){return B[1]});se==re&&(se=se-1,re=re+1);var q=Math.abs(re-se)*Sx,ue=[t.config.scales.ylim.min?+t.config.scales.ylim.min:se-q,t.config.scales.ylim.max?+t.config.scales.ylim.max:re+q];t.derived.yBanded=[].concat.apply([],m).map(function(B){try{return Array.isArray(B)?B[0]:B}catch{return}}).filter(e7);var K=s1(t);v.xScaleType==="band"?t.derived.xScale=d3.scaleBand().range([0,t.width-(i.left+i.right)]).domain(t.config.scales.flipAxis===!0?t.derived.yBanded:t.derived.xBanded):t.derived.xScale=d3.scaleLinear().range([0,t.width-(i.right+i.left)]).domain(t.config.scales.flipAxis===!0?ue:oe),v.yScaleType==="band"?t.derived.yScale=d3.scaleBand().range([K-(i.top+i.bottom),0]).domain(t.config.scales.flipAxis===!0?t.derived.xBanded:t.derived.yBanded):t.derived.yScale=d3.scaleLinear().range([K-(i.top+i.bottom),0]).domain(t.config.scales.flipAxis===!0?oe:ue),t.config.scales.colorScheme&&t.config.scales.colorScheme.enabled&&(t.derived.colorDiscrete=d3.scaleOrdinal().range(t.config.scales.colorScheme.colors).domain(t.config.scales.colorScheme.domain),t.derived.colorContinuous=d3.scaleLinear().range(t.config.scales.colorScheme.colors).domain(t.config.scales.colorScheme.domain)),t.syncLegacyAliases()}function e7(t,e,r){return r.indexOf(t)===e}var Hh={xScaleType:"linear",yScaleType:"linear",xExtentFields:["x_var"],yExtentFields:["y_var"],domainMerge:"union"};function n7(t){return t?Object.assign({},Hh,t):null}function Ex(t){if(t&&t.scaleHints)return n7(t.scaleHints);try{var e=pl(t);return n7(e.constructor.scaleHints)}catch{return null}}function e4(t,e){var r=t&&t.config&&t.config.scales&&t.config.scales.categoricalScale;return r&&r[e+"Axis"]===!0?"band":"linear"}function i7(t,e){var r=!!(t&&t.config&&t.config.scales&&t.config.scales.flipAxis),i=new Set,s=new Set,a=new Set,d=new Set,m="union";if((e||[]).forEach(function(v){var _=Ex(v),x=e4(t,"x"),w=e4(t,"y"),I=_?_.xScaleType:x,O=_?_.yScaleType:w,z=r?O:I,J=r?I:O;r||(x==="band"&&(z="band"),w==="band"&&(J="band")),i.add(z),s.add(J);var Q=_&&Array.isArray(_.xExtentFields)?_.xExtentFields:Hh.xExtentFields;Q.forEach(function(se){a.add(se)});var oe=_&&Array.isArray(_.yExtentFields)?_.yExtentFields:Hh.yExtentFields;oe.forEach(function(se){d.add(se)}),_&&_.domainMerge==="independent"&&(m="independent")}),i.size>1||s.size>1)throw new Error("Mismatched scaleTypes across layers: x="+Array.from(i).join(", ")+", y="+Array.from(s).join(", ")+".");return{xScaleType:i.size>0?Array.from(i)[0]:e4(t,"x"),yScaleType:s.size>0?Array.from(s)[0]:e4(t,"y"),xExtentFields:Array.from(a).length>0?Array.from(a):Hh.xExtentFields,yExtentFields:Array.from(d).length>0?Array.from(d):Hh.yExtentFields,domainMerge:m}}function Ud(t){var e=t.derived.currentLayers||[],r=e.map(function(a){return pl(a).constructor.traits}),i=e[0]?e[0].type:null,s=Array.from(new Set(r.map(function(a){return a.legendType})));return{type:i,axesChart:r.some(function(a){return a.hasAxes}),histogram:r.length>0&&r.every(function(a){return a.binning}),continuousLegend:s.length===1&&s[0]==="continuous",ordinalLegend:s.length===1&&s[0]==="ordinal",referenceLines:r.some(function(a){return a.referenceLines})}}function Vd(t,e){if(e.axesChart)if(e.histogram)t7(t,t.derived.currentLayers);else{var r=i7(t,t.derived.currentLayers);r7(t,t.derived.currentLayers,r)}}var wx={line:"axes-continuous",point:"axes-continuous",area:"axes-continuous",bar:"axes-categorical",groupedBar:"axes-categorical",boxplot:"axes-categorical",violin:"axes-categorical",histogram:"axes-binned",heatmap:"axes-matrix",candlestick:"axes-continuous",waterfall:"axes-categorical",ridgeline:"axes-binned",rangeBar:"axes-continuous",sankey:"standalone-flow",hexbin:"axes-hex",treemap:"standalone-treemap",donut:"standalone-donut",gauge:"standalone-gauge",text:"axes-continuous",regression:"axes-continuous",bracket:"axes-continuous",comparison:"axes-categorical",qq:"axes-continuous",lollipop:"axes-categorical",dumbbell:"axes-categorical",waffle:"standalone-waffle",beeswarm:"axes-continuous",bump:"axes-continuous",survfit:"axes-continuous",histogram_fit:"axes-binned",quantile_dots:"axes-categorical",radar:"standalone-radar",funnel:"standalone-funnel",parallel:"standalone-parallel",calendarHeatmap:"standalone-calendar",fan:"axes-continuous"},Ax=new Set(["axes-continuous:axes-categorical","axes-categorical:axes-continuous","axes-binned:axes-continuous","axes-continuous:axes-binned"]);function Tx(t){if(t.length<=1)return{valid:!0,errors:[]};let e=[],r=t.map(function(a){return wx[a.type]||"unknown"}),i=r.filter(function(a){return a.startsWith("standalone")});i.length>0&&t.length>1&&e.push("Cannot mix standalone chart types with other layers."),i.length>1&&e.push("Standalone chart types must be used alone.");let s=Array.from(new Set(r));return s.length>1&&s.forEach(function(a,d){s.slice(d+1).forEach(function(m){Ax.has(a+":"+m)||e.push("Cannot mix layer groups '"+a+"' and '"+m+"'.")})}),{valid:e.length===0,errors:e}}function Ix(t,e){let r=[],i=[];return e?(Object.entries(e).forEach(function(s){let a=s[0],d=s[1],m=t.mapping?t.mapping[a]:null;if(d.required&&!m){r.push("Layer '"+t.label+"' is missing required mapping '"+a+"'.");return}if(!m)return;let v=Array.isArray(t.data)?typeof m=="string"?t.data.map(function(x){return x[m]}):t.data.map(function(){return m}):[];if(d.numeric&&v.find(function(w){return Number.isNaN(+w)})!==void 0&&r.push("Layer '"+t.label+"' field '"+m+"' must be numeric."),d.positive&&v.find(function(w){return+w<=0})!==void 0&&r.push("Layer '"+t.label+"' field '"+m+"' must be positive."),d.sorted){for(let x=1;x0&&i.push("Layer '"+t.label+"' field '"+m+"' contains "+_+" null/NaN values.")}),{errors:r,warnings:i}):{errors:r,warnings:i}}function t4(t){let e=t.derived.currentLayers||t.config.layers||[],r=Tx(e);return r.valid?e.filter(function(i){let a=pl(i).constructor.dataContract,d=Ix(i,a);return d.warnings.forEach(function(m){console.warn("[myIO]",m)}),d.errors.length>0?(d.errors.forEach(function(m){console.warn("[myIO] Layer '"+i.label+"' removed:",m),t.emit("error",{message:m,layer:i})}),!1):!0}):(r.errors.forEach(function(i){console.warn("[myIO] Composition error:",i),t.emit("error",{message:i})}),[])}function r4(t,e){e.referenceLines&&Ox(t)}function Ox(t){var e=t.margin,r=t.options.transition.speed,i=[t.options.referenceLine.x],s=[t.options.referenceLine.y];if(t.options.referenceLine.x){var a=t.plot.selectAll(".ref-x-line").data(i);a.exit().transition().duration(100).style("opacity",0).attr("y2",t.height-(e.top+e.bottom)).remove();var d=a.enter().append("line").attr("class","ref-x-line").attr("fill","none").style("stroke","gray").style("stroke-width",3).attr("x1",function(_){return t.xScale(_)}).attr("x2",function(_){return t.xScale(_)}).attr("y1",t.height-(e.top+e.bottom)).attr("y2",t.height-(e.top+e.bottom)).transition().ease(d3.easeQuad).duration(r).attr("y2",0);a.merge(d).transition().ease(d3.easeQuad).duration(r).attr("x1",function(_){return t.xScale(_)}).attr("x2",function(_){return t.xScale(_)}).attr("y1",t.height-(e.top+e.bottom)).attr("y2",0)}else t.plot.selectAll(".ref-x-line").remove();if(t.options.referenceLine.y){var m=t.plot.selectAll(".ref-y-line").data(s);m.exit().transition().duration(100).attr("y2",t.width-(e.left+e.right)).style("opacity",0).remove();var v=m.enter().append("line").attr("class","ref-y-line").attr("fill","none").style("stroke","gray").style("stroke-width",3).attr("x1",0).attr("x2",0).attr("y1",function(_){return t.yScale(_)}).attr("y2",function(_){return t.yScale(_)}).transition().ease(d3.easeQuad).duration(r).attr("x2",t.width-(e.left+e.right));m.merge(v).transition().ease(d3.easeQuad).duration(r).attr("x1",0).attr("x2",t.width-(e.left+e.right)).attr("y1",function(_){return t.yScale(_)}).attr("y2",function(_){return t.yScale(_)})}else t.plot.selectAll(".ref-y-line").remove()}function s7(t,e,r){let i=t.map(function(I){return I[r]}),s=t.map(function(I){return I[e]}),a={},d=s.length,m=0,v=0,_=0,x=0,w=0;for(let I=0;I0)return s.length}var a=r?r.clientWidth:this.controller.chart.runtime.totalWidth;return Math.max(Math.floor(a/(this.controller.config.minWidth||200)),1)}hasPanelData(){for(var e=0;e0)return!0;return!1}addLabel(){d3.select(this.element).append("div").attr("class","myIO-facet-label").text(this.facetValue)}renderPanel(){var e=this.buildPanelChart(),r=Ud(e);r.axesChart&&(Vd(e,r),this.applySharedDomains(e)),D0(e),e.dom.svg=e.svg,e.dom.plot=e.plot,e.dom.chartArea=e.chart,r.axesChart&&this.requiresClipPath(r.type)&&(this.setClipPath(e),B0(e,r,{isInitialRender:!0}),this.applyAxisSuppression(e),r4(e,r,{isInitialRender:!0})),this.renderLayers(e,this.layers),this.panelChart=e}buildPanelChart(){var e=this.controller.chart,r=Math.max(this.element.clientWidth||this.controller.config.minWidth||200,1),i=this.buildMargin(),s=Object.assign({},e.config,{layers:this.layers}),a={margin:i,suppressLegend:!0,suppressAxis:{xAxis:this.suppressX,yAxis:this.suppressY},xlim:s.scales.xlim,ylim:s.scales.ylim,categoricalScale:s.scales.categoricalScale,flipAxis:s.scales.flipAxis,colorScheme:s.scales.colorScheme?s.scales.colorScheme.enabled?[s.scales.colorScheme.colors,s.scales.colorScheme.domain,"on"]:[s.scales.colorScheme.colors,s.scales.colorScheme.domain,"off"]:null,xAxisFormat:s.axes.xAxisFormat,yAxisFormat:s.axes.yAxisFormat,toolTipFormat:s.axes.toolTipFormat,xTickLabels:s.axes.xTickLabels,xAxisLabel:s.axes.xAxisLabel,yAxisLabel:s.axes.yAxisLabel,dragPoints:!1,toggleY:null,toolTipOptions:s.interactions.toolTipOptions,transition:{speed:0},referenceLine:s.referenceLines};return{element:this.element,dom:{element:this.element},config:s,derived:{currentLayers:this.layers.slice()},runtime:{totalWidth:r,width:r,height:zh,layout:e.runtime.layout,activeY:e.runtime.activeY,activeYFormat:e.runtime.activeYFormat},options:a,margin:i,width:r,height:zh,totalWidth:r,layout:e.runtime.layout,newY:e.runtime.activeY,newScaleY:e.runtime.activeYFormat,plotLayers:this.layers,emit:function(){},dragPoints:function(){},updateRegression:function(){},syncLegacyAliases:function(){this.xScale=this.derived?this.derived.xScale:null,this.yScale=this.derived?this.derived.yScale:null,this.colorDiscrete=this.derived?this.derived.colorDiscrete:null,this.colorContinuous=this.derived?this.derived.colorContinuous:null,this.x_banded=this.derived?this.derived.xBanded:null,this.y_banded=this.derived?this.derived.yBanded:null,this.x_check=this.derived?this.derived.xCheck:null,this.currentLayers=this.derived?this.derived.currentLayers:null},captureLegacyAliases:function(){}}}buildMargin(){var e=this.controller.chart.config.layout.margin||{},r={top:e.top!=null?e.top:30,right:e.right!=null?e.right:5,bottom:e.bottom!=null?e.bottom:60,left:e.left!=null?e.left:50};return this.suppressX&&(r.bottom=Math.min(r.bottom,12)),this.suppressY&&(r.left=Math.min(r.left,12)),r}applySharedDomains(e){var r=this.controller.globalScaleSnapshot;!r||!e.derived||!e.derived.xScale||!e.derived.yScale||(r.xDomain&&e.derived.xScale.domain(r.xDomain.slice()),r.yDomain&&e.derived.yScale.domain(r.yDomain.slice()),r.xBanded&&(e.derived.xBanded=r.xBanded.slice()),r.yBanded&&(e.derived.yBanded=r.yBanded.slice()),typeof r.xCheck<"u"&&(e.derived.xCheck=r.xCheck),r.colorDiscrete&&(e.derived.colorDiscrete=r.colorDiscrete),r.colorContinuous&&(e.derived.colorContinuous=r.colorContinuous),e.syncLegacyAliases())}requiresClipPath(e){return e!=="donut"&&e!=="gauge"}setClipPath(e){var r=e.height-(e.margin.top+e.margin.bottom);e.dom.clipPath=e.dom.chartArea.append("defs").append("svg:clipPath").attr("id",e.dom.element.id+"clip").append("svg:rect").attr("x",0).attr("y",0).attr("width",e.width-(e.margin.left+e.margin.right)).attr("height",r),e.dom.chartArea.attr("clip-path","url(#"+e.dom.element.id+"clip)"),e.clipPath=e.dom.clipPath}applyAxisSuppression(e){this.suppressX&&e.plot.selectAll(".x-axis").remove(),this.suppressY&&e.plot.selectAll(".y-axis").remove()}renderLayers(e,r){for(var i=0;i1?x+": ":"";e.push(I+_.below+" of "+w+" dots below threshold of "+i+".")})}}}),e}function l7(t){return String(t).replace(/[^a-zA-Z0-9_-]/g,"")}function Rx(t,e){if(!t.dom||!t.dom.chartArea||!e)return null;for(var r=t.dom.chartArea,i=[".tag-"+e.type+"-"+e.id,".tag-"+e.type+"-"+t.dom.element.id+"-"+l7(e.label)],s=0;s0&&e.visibility!==!1})}destroy(){this.chart.dom.svg.on("keydown.a11y",null),this.liveRegion&&this.liveRegion.remove(),clearTimeout(this.debounceTimer)}};var u4=class{constructor(e){this.chart=e,this.tableContainer=null,this.visible=!1}initialize(){this.tableContainer=d3.select(this.chart.dom.element).append("div").attr("class","myIO-data-table myIO-sr-only").attr("role","region").attr("aria-label","Chart data table")}generate(){if(this.tableContainer){this.tableContainer.selectAll("*").remove();for(var e=this.chart.config.layers,r=500,i=new Map,s=[],a=0;ar&&this.tableContainer.append("p").text("Showing first "+r+" of "+w.length+" rows")}}}renderFanTable(e,r){if(!(!e||e.length===0)){var i=e[0],s=i.mapping&&i.mapping.x_var?i.mapping.x_var:"x_var",a=new Map,d=[];e.forEach(function(O){var z=O.options&&O.options.interval_pct;if(z!=null){var J=c7(z);d.push(+z),(Array.isArray(O.data)?O.data:[]).forEach(function(Q){var oe=String(Q[s]);a.has(oe)||a.set(oe,{x_var:Q[s]});var se=a.get(oe);se["low_"+J]=Q[O.mapping.low_y],se["high_"+J]=Q[O.mapping.high_y]})}}),d=Array.from(new Set(d)).sort(function(O,z){return O-z});var m=["x_var"];d.forEach(function(O){var z=c7(O);m.push("low_"+z),m.push("high_"+z)});var v=Array.from(a.values()),_=v.slice(0,r),x=this.tableContainer.append("table").attr("aria-label","Data for "+(i._composite||"fan")),w=x.append("thead").append("tr");m.forEach(function(O){w.append("th").attr("scope","col").text(O)});var I=x.append("tbody");_.forEach(function(O){var z=I.append("tr");m.forEach(function(J){var Q=O[J];z.append("td").text(Q!=null?String(Q):"")})}),v.length>r&&this.tableContainer.append("p").text("Showing first "+r+" of "+v.length+" rows")}}toggle(){this.visible=!this.visible,this.visible?(this.generate(),this.tableContainer.classed("myIO-sr-only",!1),this.chart.dom.svg.attr("aria-hidden","true")):(this.tableContainer.classed("myIO-sr-only",!0),this.chart.dom.svg.attr("aria-hidden",null))}destroy(){this.tableContainer&&this.tableContainer.remove()}};function c7(t){return String(t).replace(/\.0+$/,"").replace(/(\.\d*?)0+$/,"$1")}function Uu(t){return t&&t.config&&Array.isArray(t.config.keyframes)?t.config.keyframes:[]}function z6(t){!t||!t.runtime||(t.runtime.keyframeTimer!==null&&t.runtime.keyframeTimer!==void 0&&clearTimeout(t.runtime.keyframeTimer),t.runtime.keyframeTimer=null)}function u7(t,e){if(!e||!Array.isArray(e.layers)||!t.config||!Array.isArray(t.config.layers))return;let r=Object.create(null);t.config.layers.forEach(function(i){r[i.label]=i}),e.layers.forEach(function(i){i&&Array.isArray(i.data)&&Object.prototype.hasOwnProperty.call(r,i.label)&&(r[i.label].data=i.data)})}function Mx(t,e){let r=Uu(t);if(typeof e=="number"&&Number.isInteger(e)){let i=e-1;return i>=0&&i=e.length-1)}function Wh(t){!t||!t.runtime||(z6(t),t.runtime.keyframePlaying=!1,d4(t))}function f7(t){if(z6(t),!t.runtime.keyframePlaying)return;let e=Number(t.config&&t.config.transitions&&t.config.transitions.speed)||0;t.runtime.keyframeTimer=setTimeout(function(){if(!t.runtime||!t.runtime.keyframePlaying)return;let r=Uu(t),i=t.runtime.keyframeIndex+1;if(i>=r.length){Wh(t);return}Yh(t,i+1,{preservePlayback:!0}),i>=r.length-1?Wh(t):f7(t)},Math.max(0,e)+1e3)}function H6(t,e){let r=document.createElement("button");return r.type="button",r.className="myIO-keyframe-button",r.dataset.keyframeAction=t,r.textContent=e,r}function $x(t){if(Uu(t).length<2||!t.dom||!t.dom.element)return;let r=document.createElement("div");r.className="myIO-keyframe-controls",r.setAttribute("role","group"),r.setAttribute("aria-label","Keyframe playback controls");let i=H6("previous","Previous");i.setAttribute("aria-label","Previous keyframe"),i.addEventListener("click",function(){f4(t,"previous")}),r.appendChild(i);let s=H6("play","Play");s.setAttribute("aria-label","Play keyframes"),s.setAttribute("aria-pressed","false"),s.addEventListener("click",function(){Px(t)}),r.appendChild(s);let a=H6("next","Next");a.setAttribute("aria-label","Next keyframe"),a.addEventListener("click",function(){f4(t,"next")}),r.appendChild(a);let d=document.createElement("span");d.className="myIO-keyframe-label",d.setAttribute("aria-live","polite"),r.appendChild(d),t.dom.element.appendChild(r),t.runtime.keyframeControls=r,d4(t)}function d7(t){if(W6(t),!t||!t.runtime)return;let e=Uu(t);t.runtime.keyframeIndex=0,t.runtime.keyframePlaying=!1,t.runtime.keyframeTimer=null,t.runtime.keyframeControls=null,e.length!==0&&(u7(t,e[0]),$x(t))}function Yh(t,e,r){if(!t||!t.runtime)return!1;let i=Mx(t,e);if(i<0)return!1;r&&r.preservePlayback===!0||Wh(t),t.runtime.keyframeIndex=i;let a=Uu(t)[i];return typeof t.updateData=="function"?t.updateData(a.layers||[]):u7(t,a),d4(t),!0}function f4(t,e){if(!t||!t.runtime)return!1;Wh(t);let r=Uu(t);if(r.length===0)return!1;let i=e==="previous"?-1:e==="next"?1:0;if(i===0)return!1;let s=Math.max(0,Math.min(r.length-1,(t.runtime.keyframeIndex||0)+i));return Yh(t,s+1)}function Px(t){return!t||!t.runtime||Uu(t).length<2?!1:t.runtime.keyframePlaying?(Wh(t),!1):(t.runtime.keyframeIndex>=Uu(t).length-1&&Yh(t,1),t.runtime.keyframePlaying=!0,d4(t),f7(t),!0)}function W6(t){if(!t||!t.runtime)return;z6(t),t.runtime.keyframePlaying=!1;let e=t.runtime.keyframeControls||t.dom&&t.dom.element&&t.dom.element.querySelector(".myIO-keyframe-controls");e&&e.parentNode&&e.parentNode.removeChild(e),t.runtime.keyframeControls=null}var Y6=280,Ux=100,Vx={on(t,e){return this._listeners=this._listeners||{},this._listeners[t]=this._listeners[t]||[],this._listeners[t].push(e),this},off(t,e){return!this._listeners||!this._listeners[t]?this:(this._listeners[t]=e?this._listeners[t].filter(function(r){return r!==e}):[],this)},emit(t,e){return!this._listeners||!this._listeners[t]?this:(this._listeners[t].forEach(function(r){r(e)}),this)}},h4=class{constructor(e){Object.assign(this,Vx),this._listeners={},this.config=e.config,this.dom={element:e.element},this.derived={},this.runtime={renderGen:0,resizeTimer:null,width:Math.max(e.width,Y6),height:e.height,totalWidth:Math.max(e.width,Y6),layout:"grouped",activeY:null,activeYFormat:null,tooltipHideTimer:null},this.config.sparkline&&this.applySparklineOverrides(),window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(this.config.transitions.speed=0),this.runtime.width=this.runtime.totalWidth,this.syncLegacyAliases(),this.draw()}syncLegacyAliases(){this.element=this.dom?this.dom.element:null,this.svg=this.dom?this.dom.svg:null,this.plot=this.dom?this.dom.plot:null,this.chart=this.dom?this.dom.chartArea:null,this.legendArea=this.dom?this.dom.legendArea:null,this.clipPath=this.dom?this.dom.clipPath:null,this.tooltip=this.dom?this.dom.tooltip:null,this.toolTipTitle=this.dom?this.dom.tooltipTitle:null,this.toolTipBody=this.dom?this.dom.tooltipBody:null,this.plotLayers=this.config?this.config.layers:null,this.options=this.config?{margin:this.config.layout.margin,suppressLegend:this.config.layout.suppressLegend,suppressAxis:this.config.layout.suppressAxis,xlim:this.config.scales.xlim,ylim:this.config.scales.ylim,categoricalScale:this.config.scales.categoricalScale,flipAxis:this.config.scales.flipAxis,colorScheme:this.config.scales.colorScheme?this.config.scales.colorScheme.enabled?[this.config.scales.colorScheme.colors,this.config.scales.colorScheme.domain,"on"]:[this.config.scales.colorScheme.colors,this.config.scales.colorScheme.domain,"off"]:null,xAxisFormat:this.config.axes.xAxisFormat,yAxisFormat:this.config.axes.yAxisFormat,toolTipFormat:this.config.axes.toolTipFormat,xTickLabels:this.config.axes.xTickLabels,xAxisLabel:this.config.axes.xAxisLabel,yAxisLabel:this.config.axes.yAxisLabel,dragPoints:this.config.interactions.dragPoints,toggleY:this.config.interactions.toggleY&&this.config.interactions.toggleY.variable?[this.config.interactions.toggleY.variable,this.config.interactions.toggleY.format]:null,toolTipOptions:this.config.interactions.toolTipOptions,transition:this.config.transitions,referenceLine:this.config.referenceLines}:null,this.margin=this.config?this.config.layout.margin:null,this.width=this.runtime?this.runtime.width:null,this.height=this.runtime?this.runtime.height:null,this.totalWidth=this.runtime?this.runtime.totalWidth:null,this.layout=this.runtime?this.runtime.layout:null,this.newY=this.runtime?this.runtime.activeY:null,this.newScaleY=this.runtime?this.runtime.activeYFormat:null,this.toolLine=this.runtime?this.runtime.toolLine:null,this.toolTipBox=this.runtime?this.runtime.toolTipBox:null,this.toolPointLayer=this.runtime?this.runtime.toolPointLayer:null,this.xScale=this.derived?this.derived.xScale:null,this.yScale=this.derived?this.derived.yScale:null,this.colorDiscrete=this.derived?this.derived.colorDiscrete:null,this.colorContinuous=this.derived?this.derived.colorContinuous:null,this.x_banded=this.derived?this.derived.xBanded:null,this.y_banded=this.derived?this.derived.yBanded:null,this.x_check=this.derived?this.derived.xCheck:null,this.currentLayers=this.derived?this.derived.currentLayers:null,this.layerIndex=this.derived?this.derived.layerIndex:null}captureLegacyAliases(){!this.dom||!this.runtime||!this.derived||(this.dom.svg=this.svg||this.dom.svg,this.dom.plot=this.plot||this.dom.plot,this.dom.chartArea=this.chart||this.dom.chartArea,this.dom.legendArea=this.legendArea||this.dom.legendArea,this.dom.clipPath=this.clipPath||this.dom.clipPath,this.dom.tooltip=this.tooltip||this.dom.tooltip,this.dom.tooltipTitle=this.toolTipTitle||this.dom.tooltipTitle,this.dom.tooltipBody=this.toolTipBody||this.dom.tooltipBody,this.runtime.layout=this.layout||this.runtime.layout,this.runtime.activeY=this.newY||this.runtime.activeY,this.runtime.activeYFormat=this.newScaleY||this.runtime.activeYFormat,this.runtime.toolLine=this.toolLine||this.runtime.toolLine,this.runtime.toolTipBox=this.toolTipBox||this.runtime.toolTipBox,this.runtime.toolPointLayer=this.toolPointLayer||this.runtime.toolPointLayer,this.derived.xScale=this.xScale||this.derived.xScale,this.derived.yScale=this.yScale||this.derived.yScale,this.derived.colorDiscrete=this.colorDiscrete||this.derived.colorDiscrete,this.derived.colorContinuous=this.colorContinuous||this.derived.colorContinuous,this.derived.xBanded=this.x_banded||this.derived.xBanded,this.derived.yBanded=this.y_banded||this.derived.yBanded,this.derived.xCheck=this.x_check||this.derived.xCheck,this.derived.currentLayers=this.currentLayers||this.derived.currentLayers,this.derived.layerIndex=this.layerIndex||this.derived.layerIndex,this.syncLegacyAliases())}draw(){D0(this),this.captureLegacyAliases(),this.initialize()}initialize(){this.derived.currentLayers=this.config.layers,this.syncLegacyAliases(),this.themeManager=new n4(this.dom.element,this.config),this.themeManager.initialize(),Ky(this),this.config.sparkline||(this.keyboardNav=new c4(this),this.keyboardNav.initialize(),this.dataTable=new u4(this),this.dataTable.initialize(),l4(this)),d7(this),this.derived.currentLayers=this.config.layers,this.syncLegacyAliases(),this.captureLegacyAliases(),this.derived.currentLayers.length>0&&this.setClipPath(this.derived.currentLayers[0].type),this.renderCurrentLayers({isInitialRender:!0})}applySparklineOverrides(){this.config.layout.margin={top:1,right:1,bottom:1,left:1},this.config.layout.suppressLegend=!0,this.config.layout.suppressAxis={xAxis:!0,yAxis:!0},this.config.interactions.brush&&(this.config.interactions.brush.enabled=!1),this.config.interactions.annotation&&(this.config.interactions.annotation.enabled=!1),this.config.interactions.linked&&(this.config.interactions.linked.enabled=!1),this.config.interactions.sliders=[],this.config.interactions.dragPoints=!1,this.config.referenceLines={x:null,y:null},this.dom.element.dataset.sparkline="true"}renderCurrentLayers(e){let r=e||{},i=++this.runtime.renderGen,s=()=>this.runtime&&this.runtime.renderGen===i;if(this.config.facet&&this.config.facet.enabled){this.facetController||(this.facetController=new s4(this)),this.facetController.initialize();return}else this.facetController&&(this.facetController.destroy(),this.facetController=null);try{if(this.dom.chartArea){this.dom.chartArea.selectAll("*").interrupt();var a=this.derived.currentLayers.map(function(_){return _.label}),d=this.config.layers.map(function(_){return _.label}),m=this.dom.chartArea;d.forEach(function(_){if(a.indexOf(_)===-1){var x=String(_).replace(/\s+/g,"");m.selectAll("[class*='tag-'][class*='-"+x+"']").remove()}})}if(this.emit("beforeRender",{options:r}),R0(this),this.derived.currentLayers=t4(this),this.syncLegacyAliases(),this.clearEmptyState(),!s())return;if(this.derived.currentLayers.length===0){this.renderEmptyState(),this.config.sparkline||l4(this);return}let v=Ud(this);if(Vd(this,v),this.syncLegacyAliases(),!s())return;D6(this),this.emit("afterScales",{state:v}),B0(this,v,r),this.routeLayers(this.derived.currentLayers),r4(this,v,r),Ly(this,v),Zy(this),J0(this),this.config.interactions.brush&&this.config.interactions.brush.enabled&&Fy(this),this.config.interactions.annotation&&this.config.interactions.annotation.enabled&&Uy(this),this.config.interactions.linked&&this.config.interactions.linked.enabled&&Wy(this),this.config.interactions.linked&&this.config.interactions.linked.cursor===!0&&jy(this),this.config.interactions.sliders&&this.config.interactions.sliders.length>0&&Xy(this),this.emit("afterRender",{state:v}),this.config.sparkline||l4(this)}catch(v){throw console.warn("[myIO] Render error:",v.message),this.emit("error",{message:v.message,error:v}),v}}clearEmptyState(){this.dom&&this.dom.svg&&this.dom.svg.selectAll(".myIO-empty-state").remove(),this.dom&&this.dom.element&&d3.select(this.dom.element).select(".myIO-fab").style("display",null)}renderEmptyState(){this.dom.chartArea&&this.dom.chartArea.selectAll("*").interrupt().remove(),this.dom.plot&&(this.dom.plot.selectAll(".x-axis, .y-axis").interrupt().remove(),this.dom.plot.selectAll(".ref-x-line, .ref-y-line").remove()),$d(this),Pu(this),this.runtime&&this.runtime._sheetOpen&&$u(this,{returnFocus:!1}),this.dom.element&&d3.select(this.dom.element).select(".myIO-fab").style("display","none"),this.dom.svg&&(this.dom.svg.selectAll(".myIO-empty-state").remove(),this.dom.svg.append("text").attr("class","myIO-empty-state").attr("x",this.runtime.totalWidth/2).attr("y",this.runtime.height/2).text("No data to display"))}addButtons(){D6(this)}toggleVarY(e){this.runtime.activeY=e[0],this.runtime.activeYFormat=e[1],this.syncLegacyAliases(),this.renderCurrentLayers()}toggleGroupedLayout(e){var r=$0(e,this),i=e.map(function(a){return a.color}),s=(this.runtime.width-(this.config.layout.margin.right+this.config.layout.margin.left))/(r[0].length+1)/i.length;this.runtime.layout==="stacked"?(F0(this,r,i,s),this.runtime.layout="grouped"):(M0(this,r,i,s),this.runtime.layout="stacked"),this.syncLegacyAliases()}setClipPath(e){switch(e){case"donut":case"gauge":break;default:var r=s1(this);this.dom.clipPath=this.dom.chartArea.append("defs").append("svg:clipPath").attr("id",this.dom.element.id+"clip").append("svg:rect").attr("x",0).attr("y",0).attr("width",this.runtime.width-(this.config.layout.margin.left+this.config.layout.margin.right)).attr("height",r-(this.config.layout.margin.top+this.config.layout.margin.bottom)),this.dom.chartArea.attr("clip-path","url(#"+this.dom.element.id+"clip)"),this.syncLegacyAliases()}}routeLayers(e){var r=this;this.derived.layerIndex=this.config.layers.map(function(i){return i.label}),this.syncLegacyAliases(),e.forEach(function(i){var s=pl(i);if(s&&typeof s.render=="function"){s.render(r,i,e),r.captureLegacyAliases();var a=i.options&&i.options.opacity!=null?i.options.opacity:1;if(a<1){var d=String(i.label).replace(/\s+/g,"");r.dom.chartArea.selectAll("[class*='tag-'][class*='-"+d+"']").style("opacity",a)}}})}removeLayers(e){e.forEach(r=>{Ry().forEach(function(i){typeof i.remove=="function"?i.remove(this,{label:r}):["line","bar","point","regression-line","hexbin","area","crosshairY","crosshairX"].forEach(function(s){d3.selectAll("."+_r(s,this.dom.element.id,r)).transition().duration(500).style("opacity",0).remove()},this)},this)})}dragPoints(e){By(this,e)}updateOrdinalColorLegend(e){gd(this,e)}updateRegression(e,r){let i=(this.config.layers||[]).find(function(s){return s.label===r&&s.type==="point"});i&&(this.config.layers||[]).forEach(function(s){if(s.type!=="line"||s.transform!=="lm"||!s.mapping||!i.mapping||s.mapping.x_var!==i.mapping.x_var||s.mapping.y_var!==i.mapping.y_var)return;let a=s7(i.data,i.mapping.y_var,i.mapping.x_var),d=i.data.map(function(m){return{...m,[s.mapping.y_var]:a.fn(m[s.mapping.x_var])}}).sort(function(m,v){return m[s.mapping.x_var]-v[s.mapping.x_var]});s.data=d,B6("line").render(this,{...s,color:e||s.color},this.config.layers)},this)}updateChart(e){let r=this.derived.layerIndex||[];this.config=e,this.derived.currentLayers=this.config.layers,this.syncLegacyAliases();let i=this.config.layers.map(function(a){return a.label}),s=r.filter(function(a){return!i.includes(a)});this.removeLayers(s),this.renderCurrentLayers()}updateData(e){if(!Array.isArray(e)||!this.config||!Array.isArray(this.config.layers))return;let r=Object.create(null);this.config.layers.forEach(function(i){r[i.label]=i}),e.forEach(function(i){i&&Object.prototype.hasOwnProperty.call(r,i.label)&&Array.isArray(i.data)&&(r[i.label].data=i.data)}),this.syncLegacyAliases(),this.renderCurrentLayers()}resize(e,r){if(!e||!r||e<2||r<2)return;let i=this.runtime&&this.runtime._sheetOpen===!0;i&&$u(this,{returnFocus:!1}),this.runtime.totalWidth=Math.max(e,Y6),this.runtime.width=this.runtime.totalWidth,this.runtime.height=r,this.syncLegacyAliases(),clearTimeout(this.runtime.resizeTimer),this.runtime.resizeTimer=setTimeout(()=>{ry(this),this.captureLegacyAliases(),this.renderCurrentLayers(),i&&this.derived&&this.derived.currentLayers&&this.derived.currentLayers.length>0&&z0(this),this.emit("resize",{width:this.runtime.width,height:this.runtime.height})},Ux)}destroy(){this.emit("destroy",{}),W6(this),clearTimeout(this.runtime&&this.runtime.resizeTimer),clearTimeout(this.runtime&&this.runtime.tooltipHideTimer),this.facetController&&(this.facetController.destroy(),this.facetController=null),this.keyboardNav&&this.keyboardNav.destroy(),this.dataTable&&this.dataTable.destroy(),this.themeManager&&this.themeManager.destroy(),this.runtime&&this.runtime._sheetOpen&&$u(this,{returnFocus:!1}),clearTimeout(this.runtime&&this.runtime._sheetCloseTimer),J0(this),Vy(this),U6(this),V6(this),this.dom&&this.dom.element&&d3.select(this.dom.element).on("keydown.brush",null),this.dom&&this.dom.chartArea&&this.dom.chartArea.selectAll("*").interrupt(),this.dom&&this.dom.svg&&this.dom.svg.remove(),this.dom&&this.dom.tooltip&&this.dom.tooltip.remove(),this.dom&&this.dom.element&&d3.select(this.dom.element).selectAll(".myIO-fab, .myIO-panel, .myIO-sheet-backdrop").remove(),$d(this),this._listeners={},this.config=null,this.derived=null,this.dom=null,this.runtime=null}};var p4=class{constructor({max:e=128}={}){this.max=e,this.lru=new Map,this.inflight=new Map}get(e){if(!this.lru.has(e))return;let r=this.lru.get(e);return this.lru.delete(e),this.lru.set(e,r),r}set(e,r){for(this.lru.has(e)&&this.lru.delete(e),this.lru.set(e,r);this.lru.size>this.max;){let i=this.lru.keys().next().value;this.lru.delete(i)}}delete(e){this.lru.delete(e)}clear(){this.lru.clear(),this.inflight.clear()}size(){return this.lru.size}inflightOrStore(e,r){if(this.inflight.has(e))return this.inflight.get(e);let i=r();return this.inflight.set(e,i),i}resolveInflight(e,r){this.set(e,r),this.inflight.delete(e)}rejectInflight(e){this.inflight.delete(e)}};var m4=class{constructor(){this.sources=new Map}register(e){if(!e||typeof e.sourceId!="string")throw new Error("SourceRegistry.register: entry must have sourceId");e.mode!=="none"&&this.sources.set(e.sourceId,e)}unregister(e){this.sources.delete(e)}get(e){return this.sources.get(e)}has(e){return this.sources.has(e)}all(){return Array.from(this.sources.values())}clear(){this.sources.clear()}};var g4=class{constructor(e={}){}async init(e={}){}async cancel(e){}async close(){}async applyPredicateCache(e,r){}async*query({queryId:e}){yield{__trailer:!0,queryId:e,rowCount:0,elapsedMs:0}}};function y4(t){if(typeof Uint8Array.fromBase64=="function")return Uint8Array.fromBase64(t);let e=atob(t),r=e.length,i=new Uint8Array(r);for(let s=0;s(f9(),u9)),Promise.resolve().then(()=>N0(d9()))]),s=i.default||i;for(let a of e.all()){if(a.mode!=="inline_ipc"||!a.ipcB64)continue;let d=y4(a.ipcB64),m=r.tableFromIPC(d),v=m.toArray().map(_=>Object.assign({},_));s.tables[a.sourceId]={data:v},this.sources.set(a.sourceId,{table:m,rows:v})}this._alasql=s}async*query({sql:e,params:r=[],queryId:i,signal:s}){if(this._closed)throw Object.assign(new Error("engine-gone"),{queryId:i,code:"engine-gone"});if(s&&s.aborted)throw Object.assign(new Error("cancelled"),{queryId:i,code:"cancelled"});let a=Date.now(),d;try{d=this._alasql.exec(e,r)}catch(m){throw Object.assign(new Error(m.message||String(m)),{queryId:i,code:"syntax"})}yield{rows:d,queryId:i},yield{__trailer:!0,queryId:i,rowCount:Array.isArray(d)?d.length:0,elapsedMs:Date.now()-a}}async cancel(e){}async applyPredicateCache(e,r){}async close(){if(this._alasql)for(let e of this.sources.keys())delete this._alasql.tables[e];this.sources.clear(),this._closed=!0}};var Jm=class{constructor(e={}){this.config=e,this.pending=new Map,this.batchWindow=e&&e.shiny_batch_window||4,this._handlersRegistered=!1}async init({sourceRegistry:e}={}){if(typeof Shiny>"u")throw Object.assign(new Error("Shiny is not available in this context"),{code:"engine-gone"});if(this._handlersRegistered)return;let r=a=>this._route("batch",a),i=a=>this._route("end",a),s=a=>this._route("error",a);Shiny.addCustomMessageHandler("myio:batch",r),Shiny.addCustomMessageHandler("myio:end",i),Shiny.addCustomMessageHandler("myio:error",s),this._handlersRegistered=!0}_route(e,r){let i=this.pending.get(r.queryId);i&&(e==="batch"?(i.push(r),Shiny.setInputValue("myio_ack",{v:1,queryId:r.queryId,seq:r.seq},{priority:"event"})):e==="end"?(i.push({__trailer:!0,queryId:r.queryId,rowCount:r.rowCount,elapsedMs:r.elapsedMs}),i.end()):e==="error"&&i.error(Object.assign(new Error(r.message||"engine error"),{queryId:r.queryId,code:r.code||"engine-gone"})))}query({sql:e,params:r=[],queryId:i,signal:s,templateId:a,sourceId:d,bindings:m,predicateHash:v,limit:_}){if(typeof Shiny>"u")throw Object.assign(new Error("Shiny not available"),{queryId:i,code:"engine-gone"});let x=[],w=[],I=!1,O=null,z=re=>{w.length?w.shift()({value:re,done:!1}):x.push(re)},J=()=>{for(I=!0;w.length;)w.shift()({value:void 0,done:!0})},Q=re=>{for(O=re;w.length;)w.shift()({value:void 0,done:!0})};this.pending.set(i,{push:z,end:J,error:Q,seqBudget:this.batchWindow});let oe=null;s&&(oe=()=>{Shiny.setInputValue("myio_cancel",{v:1,queryId:i},{priority:"event"}),Q(Object.assign(new Error("cancelled"),{queryId:i,code:"cancelled"}))},s.aborted?oe():s.addEventListener("abort",oe)),O||Shiny.setInputValue("myio_query",{v:1,queryId:i,templateId:a||null,sourceId:d||null,predicateHash:v||null,bindings:m||{},limit:_||null,_debugSql:e},{priority:"event"});let se=this.pending;return(async function*(){try{for(;;){if(O)throw O;if(x.length){yield x.shift();continue}if(I)return;let re=await new Promise(q=>w.push(q));if(re.done){if(O)throw O;return}yield re.value}}finally{s&&oe&&s.removeEventListener("abort",oe),se.delete(i)}})()}async cancel(e){typeof Shiny<"u"&&Shiny.setInputValue("myio_cancel",{v:1,queryId:e},{priority:"event"});let r=this.pending.get(e);r&&r.error(Object.assign(new Error("cancelled"),{queryId:e,code:"cancelled"}))}async applyPredicateCache(e,r){}async close(){for(let[,e]of this.pending)e.error(Object.assign(new Error("engine closed"),{code:"engine-gone"}));this.pending.clear()}};var Km=class{constructor(e={}){this.config=e,this.cacheUrl=e.duckdb_wasm&&e.duckdb_wasm.cache_url||null,this.workerUrl=e.duckdb_wasm&&e.duckdb_wasm.worker_url||null,this.db=null,this.conn=null,this._duckdb=null,this._closed=!1}async init({sourceRegistry:e}={}){if(this._closed)throw Object.assign(new Error("engine-gone"),{code:"engine-gone"});if(!this.cacheUrl||!this.workerUrl)throw Object.assign(new Error("WasmEngineAdapter: duckdb_wasm cache_url / worker_url not set. Ensure myIO::install_duckdb_wasm() has run."),{code:"engine-gone"});let r=this.cacheUrl.replace(/\/?$/,"/")+"duckdb-browser.mjs",i;try{i=await import(r)}catch(m){throw Object.assign(new Error("WasmEngineAdapter: failed to import duckdb-wasm loader from "+r+": "+(m?.message||m)),{code:"engine-gone"})}this._duckdb=i;let s=new Worker(this.workerUrl),a=this.cacheUrl.replace(/\/?$/,"/")+"duckdb-mvp.wasm",d=new i.ConsoleLogger;if(this.db=new i.AsyncDuckDB(d,s),await this.db.instantiate(a),this.conn=await this.db.connect(),e)for(let m of e.all())await this._registerSource(m)}async _registerSource(e){if(!this._duckdb)return;let r=this._duckdb.DuckDBDataProtocol;if(e.mode==="inline_ipc"&&e.ipcB64){let i=y4(e.ipcB64),s=e.sourceId+".arrow";await this.db.registerFileBuffer(s,i),await this.conn.query('CREATE OR REPLACE VIEW "'+e.sourceId.replace(/"/g,'""')+`" AS SELECT * FROM read_arrow('`+s+"');")}else if(e.mode==="url"&&e.url){let i=e.sourceId+(/\.parquet$/i.test(e.url)?".parquet":/\.arrow$/i.test(e.url)?".arrow":/\.feather$/i.test(e.url)?".feather":".csv");await this.db.registerFileURL(i,e.url,r.HTTP,!1);let s=/\.parquet$/i.test(e.url)?"read_parquet":/\.arrow$/i.test(e.url)||/\.feather$/i.test(e.url)?"read_arrow":"read_csv_auto";await this.conn.query('CREATE OR REPLACE VIEW "'+e.sourceId.replace(/"/g,'""')+'" AS SELECT * FROM '+s+"('"+i+"');")}}async*query({sql:e,params:r=[],queryId:i,signal:s}){if(this._closed)throw Object.assign(new Error("engine-gone"),{queryId:i,code:"engine-gone"});if(s&&s.aborted)throw Object.assign(new Error("cancelled"),{queryId:i,code:"cancelled"});let a=Date.now(),d,m=null;try{d=await this.conn.send(e)}catch(_){throw Object.assign(new Error(_?.message||String(_)),{queryId:i,code:"syntax"})}s&&(m=()=>{this.conn&&this.conn.cancelSent().catch(()=>{})},s.addEventListener("abort",m));let v=0;try{for(;;){if(s&&s.aborted){try{await this.conn.cancelSent()}catch{}throw Object.assign(new Error("cancelled"),{queryId:i,code:"cancelled"})}let{done:_,value:x}=await d.next();if(_)break;x&&(v+=x.numRows||0,yield{batch:x,queryId:i})}}finally{s&&m&&s.removeEventListener("abort",m);try{await d.return()}catch{}}yield{__trailer:!0,queryId:i,rowCount:v,elapsedMs:Date.now()-a}}async cancel(e){if(this.conn)try{await this.conn.cancelSent()}catch{}}async applyPredicateCache(e,r){}async close(){if(this._closed=!0,this.conn){try{await this.conn.close()}catch{}this.conn=null}if(this.db){try{await this.db.terminate()}catch{}this.db=null}}};function Qm(t,e={}){switch(t){case"svg":return new g4(e);case"memory":return new Xm(e);case"wasm":return new Km(e);case"server":return new Jm(e);default:throw new Error("createEngine: unknown engine '"+t+"'")}}var Zp=class{constructor({config:e}){this.config=e||{},this.cache=new p4({max:128}),this.sourceRegistry=new m4,this.charts=new Map,this.selectionStore=new Map,this.adapters=new Map,this._adapterInits=new Map,this._inflightControllers=new Map,this._debouncers=new Map}ensureAdapterFor(e,r,i){if(this.adapters.has(e))return Promise.resolve(this.adapters.get(e));if(this._adapterInits.has(e))return this._adapterInits.get(e);let s=Qm(r,i),a=s.init({sourceRegistry:this.sourceRegistry}).then(()=>(this.adapters.set(e,s),this._adapterInits.delete(e),s)).catch(d=>{throw this._adapterInits.delete(e),d});return this._adapterInits.set(e,a),a}registerSource(e){this.sourceRegistry.register(e)}register({chartId:e,queryTemplate:r,markSpec:i,sourceHandle:s,predicateFn:a,onResult:d}){this.charts.set(e,{chartId:e,queryTemplate:r,markSpec:i,sourceHandle:s,predicateFn:a,currentPredicate:null,onResult:d}),this.selectionStore.has(s.sourceId)||this.selectionStore.set(s.sourceId,new Map),r&&String(r).trim()&&d&&setTimeout(()=>this._dispatch(e,{preview:!1}),0)}unregister(e){let r=this.charts.get(e);if(!r)return;this.charts.delete(e);let i=this._inflightControllers.get(e);i&&(i.abort(),this._inflightControllers.delete(e));let s=r.sourceHandle.sourceId,a=this.selectionStore.get(s);a&&a.delete(e);let d=this._debouncers.get(e);if(d&&(d.preview&&clearTimeout(d.preview),d.final&&clearTimeout(d.final),this._debouncers.delete(e)),[...this.charts.values()].filter(v=>v.sourceHandle.sourceId===s).length===0){let v=this.adapters.get(s);v&&(v.close().catch(()=>{}),this.adapters.delete(s)),this._adapterInits.delete(s),this.selectionStore.delete(s)}}setSelection({chartId:e,predicate:r}){let i=this.charts.get(e);if(!i)return;let s=i.sourceHandle.sourceId,a=this.selectionStore.get(s);a||(a=new Map,this.selectionStore.set(s,a)),r==null?a.delete(e):a.set(e,r),i.currentPredicate=r;for(let d of this.charts.values())d.chartId!==e&&d.sourceHandle.sourceId===s&&this._scheduleDispatch(d.chartId);if(this._subscribers){let d=this._subscribers.get(i.sourceHandle.sourceId);if(d)for(let m of d)try{m({chartId:e,predicate:r})}catch(v){console.error("[myIO coordinator] subscriber error:",v)}}}subscribe(e,r){return this._subscribers||(this._subscribers=new Map),this._subscribers.has(e)||this._subscribers.set(e,new Set),this._subscribers.get(e).add(r),()=>{let i=this._subscribers.get(e);i&&i.delete(r)}}_scheduleDispatch(e){let r=this._debouncers.get(e);r||(r={preview:null,final:null},this._debouncers.set(e,r)),r.preview&&clearTimeout(r.preview),r.final&&clearTimeout(r.final),r.preview=setTimeout(()=>this._dispatch(e,{preview:!0}),50),r.final=setTimeout(()=>this._dispatch(e,{preview:!1}),200)}async _dispatch(e,{preview:r=!1}={}){let i=this.charts.get(e);if(!i||!i.onResult||!i.queryTemplate||!String(i.queryTemplate).trim())return;let s=i.sourceHandle.sourceId,a=this._composeOthersPredicate(e,s),d=this._substituteTemplate(i.queryTemplate,{where:a,limit:r?1e3:1e5}),m=await this._hash(a),v=i.sourceHandle.engine||this.config.engine,_=await this._hash(d+""+m+""+v),x=this.cache.get(_);if(x){this._deliverToRenderer(e,x);return}let w=this.adapters.get(s);try{if(!w&&v&&(w=await this.ensureAdapterFor(s,v,this.config)),!this.charts.has(e)||!w)return;typeof w.applyPredicateCache=="function"&&await w.applyPredicateCache(m,a)}catch(J){if(!this.charts.has(e))return;console.error("[myIO coordinator]",e,J?.code,J?.message||J),this._deliverToRenderer(e,{batches:[],trailer:{error:J?.message||String(J),code:J?.code||"engine_error"}});return}let I="q_"+Math.random().toString(36).slice(2,10),O=null;if(!this.cache.inflight.has(_)){let J=this._inflightControllers.get(e);J&&J.abort(),O=new AbortController,this._inflightControllers.set(e,O)}let z=this.cache.inflightOrStore(_,()=>(async()=>{let J=[],Q=null;for await(let oe of w.query({sql:d,params:[],queryId:I,sourceId:s,limit:r?1e3:1e5,signal:O.signal}))oe.__trailer?Q=oe:J.push(oe);return{batches:J,trailer:Q}})());try{let J=await z,Q=this._inflightControllers.get(e);if(O&&Q===O&&this._inflightControllers.delete(e),O&&O.signal.aborted){this.cache.rejectInflight(_);return}if(this.cache.resolveInflight(_,J),!this.charts.has(e))return;this._deliverToRenderer(e,J)}catch(J){this.cache.rejectInflight(_);let Q=this._inflightControllers.get(e);if(O&&Q===O&&this._inflightControllers.delete(e),O&&O.signal.aborted)return;console.error("[myIO coordinator]",e,J?.code,J?.message||J),this._deliverToRenderer(e,{batches:[],trailer:{error:J?.message||String(J),code:J?.code||"query_error"}})}}_composeOthersPredicate(e,r){let s=[...(this.selectionStore.get(r)||new Map).entries()].filter(([a])=>a!==e).map(([,a])=>a).filter(Boolean);return s.length?"("+s.join(") AND (")+")":"TRUE"}_substituteTemplate(e,{where:r,limit:i}){return e.replace(/\{\{\s*where\s*\}\}/g,r).replace(/\{\{\s*limit\s*\}\}/g,String(i)).replace(/\$where\b/g,r).replace(/\$limit\b/g,String(i))}async _hash(e){if(typeof crypto<"u"&&crypto.subtle){let i=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-1",i);return Array.from(new Uint8Array(s,0,8)).map(a=>a.toString(16).padStart(2,"0")).join("")}let r=2166136261;for(let i=0;i>>0).toString(16).padStart(8,"0")}_deliverToRenderer(e,{batches:r,trailer:i}){let s=this.charts.get(e);if(!(!s||!s.onResult))try{s.onResult({batches:r,trailer:i,markSpec:s.markSpec})}catch(a){console.error("[myIO coordinator] renderer error for",e,a)}}onChartResult(e,r){let i=this.charts.get(e);i&&(i.onResult=r)}async close(){for(let e of this._debouncers.values())e.preview&&clearTimeout(e.preview),e.final&&clearTimeout(e.final);for(let[,e]of this.adapters)await e.close().catch(()=>{});this.adapters.clear();for(let e of this._inflightControllers.values())e.abort();this._adapterInits.clear(),this._inflightControllers.clear(),this.charts.clear(),this.selectionStore.clear(),this.sourceRegistry.clear(),this.cache.clear(),this._debouncers.clear()}};function h9(t){return globalThis.__myioCoordinator||(globalThis.__myioCoordinator=new Zp({config:t})),globalThis.__myioCoordinator}var dw=new Set(["scatter","line","area"]),hw=150;function e0(t){let e=Number(t);return Number.isFinite(e)?e:null}function pw(t){if(t==="Inf"||t==="Infinity"||t===1/0)return 1/0;let e=Number(t);return Number.isFinite(e)&&e>0?e:5e4}function ug({markSpec:t,rowCount:e,threshold:r}){let i=t&&t.kind;if(!dw.has(i))return!1;let s=pw(r);if(!Number.isFinite(s))return!1;let a=Number(e);return Number.isFinite(a)&&a>=s}function mw(t,e){let r={};return["x","y","category","color","value","baseline"].forEach(i=>{let s=t.getChild?t.getChild(i):null;s&&(r[i]=s.get(e))}),r}function p9(t){if(!t)return[];if(typeof t.toArray=="function")return t.toArray().map(e=>Object.assign({},e));if(typeof t.getChild=="function"){let e=t.getChild("x"),r=t.numRows||t.length||(e?e.length:0),i=new Array(r);for(let s=0;s{r&&(Array.isArray(r)?e.push(...r):Array.isArray(r.rows)?e.push(...r.rows):r.batch?e.push(...p9(r.batch)):(typeof r.getChild=="function"||typeof r.toArray=="function")&&e.push(...p9(r)))}),e.map(r=>({...r,x:e0(r.x),y:e0(r.y),category:r.category==null?void 0:e0(r.category),color:r.color==null?void 0:r.color,value:r.value==null?void 0:e0(r.value),baseline:r.baseline==null?void 0:e0(r.baseline)})).filter(r=>r.x!=null&&r.y!=null)}function gw(t){let e=t.margin||t.config&&t.config.layout&&t.config.layout.margin||{top:0,right:0,bottom:0,left:0},r=Math.max(0,(t.width||t.runtime?.width||0)-e.left-e.right),i=Math.max(0,(t.height||t.runtime?.height||0)-e.top-e.bottom);return{left:e.left,top:e.top,width:r,height:i}}function yw(t){let e=t.dom?.element||t.element,r=t.dom?.svg?.node?t.dom.svg.node():e.querySelector("svg"),i=document.createElement("div");i.className="myIO-webgl-overlay",i.style.position="absolute",i.style.pointerEvents="none",i.style.overflow="hidden",i.style.zIndex="0";let s=document.createElement("div");return s.className="myIO-webgl-loading",s.textContent="Loading data...",s.style.position="absolute",s.style.left="50%",s.style.top="50%",s.style.transform="translate(-50%, -50%)",s.style.font="12px sans-serif",s.style.color="#666",s.style.background="rgba(255,255,255,0.85)",s.style.padding="6px 8px",s.style.border="1px solid rgba(0,0,0,0.12)",i.appendChild(s),r&&r.parentNode===e?e.insertBefore(i,r):e.appendChild(i),cg(t,i),i}function cg(t,e){let r=gw(t);return e.style.left=r.left+"px",e.style.top=r.top+"px",e.style.width=r.width+"px",e.style.height=r.height+"px",r}function t0(t,e,r){t&&typeof t.emit=="function"&&t.emit(e,r)}function bw(t,e,r){let i=t.querySelector(".myIO-webgl-loading,.myIO-webgl-empty");if(!r){i&&i.remove();return}let s=i||document.createElement("div");s.className=e,s.textContent=r,s.style.position="absolute",s.style.left="50%",s.style.top="50%",s.style.transform="translate(-50%, -50%)",s.style.font="12px sans-serif",s.style.color="#666",s.style.background="rgba(255,255,255,0.85)",s.style.padding="6px 8px",s.style.border="1px solid rgba(0,0,0,0.12)",s.parentNode||t.appendChild(s)}function vw(t,e){return t.map(r=>{if(r.category!=null||r.color==null)return r;let i=String(r.color);return e.has(i)||e.set(i,e.size),{...r,category:e.get(i)}})}function _w(t,e){let r=t.xScale,i=t.yScale;if(typeof r!="function"||typeof i!="function")return null;let s=globalThis.window&&window.d3;return s&&typeof s.quadtree=="function"?s.quadtree().x(a=>a.__px).y(a=>a.__py).addAll(e.map(a=>({row:a,__px:r(a.x),__py:i(a.y)}))):e.map(a=>({row:a,__px:r(a.x),__py:i(a.y)}))}function xw(t,e,r){if(!t)return null;if(typeof t.find=="function")return t.find(e,r,16)?.row||null;let i=null,s=1/0;return t.forEach(a=>{let d=Math.hypot(a.__px-e,a.__py-r);d{s=!1,i||d();let _=r.getBoundingClientRect(),x=xw(i,a.clientX-_.left,a.clientY-_.top);x&&t0(t,"rollover",{data:x,source:"webgl-bridge"})}))}return r.addEventListener("mousemove",m),{rebuild:d,destroy(){r.removeEventListener("mousemove",m)}}}function fg({chart:t,coordinator:e,chartId:r,markSpec:i,createRenderer:s,layerIndex:a=0}){let d=yw(t),m=e6({chart:t,layerIndex:a}),v=s||globalThis.window&&window.myIO&&window.myIO.webglRenderers&&window.myIO.webglRenderers.createWebGLRenderer,_=new Map,x=null,w=[],I=null,O=!1,z=!1,J=null,Q=Sw(t,()=>w);function oe(he,He){if(!(z||O)){if(z=!0,console.warn("[myIO webgl bridge] falling back to SVG:",he,He||""),x&&typeof x.destroy=="function")try{x.destroy()}catch{}x=null,d.remove(),I&&m.onResult(I)}}function se(){if(x||O||z)return x;if(typeof v!="function")return oe("renderer unavailable"),null;let he=cg(t,d);try{x=v({kind:i.kind,el:d,width:he.width,height:he.height,xScale:t.xScale,yScale:t.yScale})}catch(er){return oe("renderer creation failed",er),null}let He=d.querySelector("canvas");if(!x)return oe("renderer unavailable"),null;if(He){let er=null;try{er=He.getContext("webgl2")||He.getContext("webgl")}catch{er=null}if(!er)return oe("WebGL context unavailable"),null;He.addEventListener("webglcontextlost",Er=>{Er.preventDefault(),oe("WebGL context lost")},{once:!0})}return x}function re(he){let He=he&&he.trailer,er=He&&(He.error||He.message);return er?(x&&typeof x.update=="function"&&Promise.resolve(x.update([])).catch(()=>{}),t0(t,"error",{message:String(er),trailer:He,chartId:r}),!0):!1}function q(he){if(O)return;if(I=he,z){m.onResult(he);return}if(re(he))return;w=vw(Zm(he&&he.batches),_),Q.rebuild();let He=se();!He||typeof He.update!="function"||(bw(d,w.length?null:"myIO-webgl-empty",w.length?"":"No data in selection"),w.length||t0(t,"emptySelection",{chartId:r}),Promise.resolve(He.update(w)).catch(er=>{oe("render failed",er)}))}function ue(){if(O||z)return;let he=cg(t,d);x&&typeof x.resize=="function"&&x.resize(he.width,he.height),x&&typeof x.update=="function"&&Promise.resolve(x.update(w)).catch(He=>{oe("resize render failed",He)})}function K(){O||(J&&clearTimeout(J),J=setTimeout(ue,hw))}function B(){O||(O=!0,J&&clearTimeout(J),e&&typeof e.onChartResult=="function"&&e.onChartResult(r,null),Q.destroy(),m.destroy(),x&&typeof x.destroy=="function"&&x.destroy(),d.remove())}return t&&typeof t.on=="function"&&(t.on("resize",K),t.on("destroy",B)),{onResult:q,resize:K,destroy:B,get pointCount(){return w.length},get overlay(){return z?void 0:d},get fallbackActive(){return z}}}function e6({chart:t,layerIndex:e=0}){let r=[],i=!1;function s(d){if(i)return;let m=d&&d.trailer,v=m&&(m.error||m.message);if(v){t0(t,"error",{message:String(v),trailer:m});return}r=Zm(d&&d.batches),t.config&&t.config.layers&&t.config.layers[e]&&(t.config.layers[e].data=r),r.length||t0(t,"emptySelection",{}),typeof t.renderCurrentLayers=="function"&&t.renderCurrentLayers()}function a(){i=!0}return t&&typeof t.on=="function"&&t.on("destroy",a),{onResult:s,destroy:a,get pointCount(){return r.length}}}function m9(t){return ug(t)?fg(t):t&&t.unifyDataPath?e6(t):null}var t6=class{constructor({coordinator:e,sourceId:r,group:i,rowkeyCol:s,threshold:a=1e5}){if(!e)throw new Error("CrosstalkAdapter: coordinator is required");if(!r)throw new Error("CrosstalkAdapter: sourceId is required");this.coordinator=e,this.sourceId=r,this.group=i||null,this.rowkeyCol=s||"__myio_rowkey__",this.threshold=Number(a)||1e5,this._selectionHandle=null,this._filterHandle=null,this._suppressedOnce=!1,this._badgeEl=null,this._mode="row-level"}attach(e){if(this.group=e||this.group,!this.group||typeof window>"u"||!window.crosstalk)return;let r=window.crosstalk.SelectionHandle,i=window.crosstalk.FilterHandle;r&&(this._selectionHandle=new r(this.group),this._selectionHandle.on("change",s=>this._onIncoming(s)),i&&(this._filterHandle=new i(this.group),this._filterHandle.on("change",s=>this._onIncoming(s))))}setBadge(e){this._badgeEl=e,this._renderBadge()}_renderBadge(){this._badgeEl&&(this._badgeEl.textContent="linked: "+this._mode)}_onIncoming(e){let r=e&&(e.value||e.keys)||null;if(!r||!Array.isArray(r)||r.length===0){this.coordinator.setSelection({chartId:"__crosstalk__:"+this.sourceId,predicate:null});return}let i=r.map(d=>d==null?"NULL":"'"+String(d).replace(/'/g,"''")+"'"),a='"'+this.rowkeyCol.replace(/"/g,'""')+'"'+" IN ("+i.join(",")+")";this.coordinator.setSelection({chartId:"__crosstalk__:"+this.sourceId,predicate:a})}async broadcast({predicate:e}){if(!this._selectionHandle)return;if(e==null){try{this._selectionHandle.set(null)}catch{}return}let r=this._countSql(e),i=this.coordinator.adapters&&this.coordinator.adapters.get(this.sourceId);if(!i)return;let s=0;try{for await(let d of i.query({sql:r,params:[],queryId:"__xcount__"+Date.now()})){if(!d||d.__trailer)continue;let m=d.rows||d.batch&&d.batch.toArray&&d.batch.toArray()||[];m[0]&&(s=Number(m[0].n??m[0][0]??m[0]["count(*)"]??0))}}catch(d){console.warn("[myIO crosstalk] count query failed:",d?.message||d);return}if(s>this.threshold){this._suppressedOnce||(console.info("myIO: selection above crosstalk_threshold ("+s+" > "+this.threshold+"); downstream row-indexed widgets will not react to this selection. myIO-to-myIO linking still works."),this._suppressedOnce=!0),this._mode="predicate-only",this._renderBadge();return}let a=await this._fetchKeys(e);if(a&&a.length>0)try{this._selectionHandle.set(a)}catch{}this._mode="row-level",this._renderBadge()}_countSql(e){return"SELECT count(*) AS n FROM "+('"'+this.sourceId.replace(/"/g,'""')+'"')+" WHERE "+e}async _fetchKeys(e){let r=this.coordinator.adapters&&this.coordinator.adapters.get(this.sourceId);if(!r)return[];let i='"'+this.sourceId.replace(/"/g,'""')+'"',a="SELECT "+('"'+this.rowkeyCol.replace(/"/g,'""')+'"')+" AS rowkey FROM "+i+" WHERE "+e,d=[];try{for await(let m of r.query({sql:a,params:[],queryId:"__xkeys__"+Date.now()})){if(!m||m.__trailer)continue;let v=m.rows||m.batch&&m.batch.toArray&&m.batch.toArray()||[];for(let _ of v){let x=_&&(_.rowkey??_[0]);x!=null&&d.push(String(x))}}}catch(m){console.warn("[myIO crosstalk] key fetch failed:",m?.message||m)}return d}destroy(){try{this._selectionHandle&&this._selectionHandle.close()}catch{}try{this._filterHandle&&this._filterHandle.close()}catch{}this._selectionHandle=null,this._filterHandle=null}};var _h=class{constructor({el:e,width:r,height:i,xScale:s,yScale:a,palette:d,captureHoverEvents:m=!1}){this.el=e,this.width=r,this.height=i,this.xScale=s,this.yScale=a,this.captureHoverEvents=m!==!1,this.palette=d||["#440154","#414487","#2a788e","#22a884","#7ad151","#fde725"],this._scatterplot=null,this._destroyed=!1}_scaleCopy(e){return e&&typeof e.copy=="function"?e.copy():e}async _ensure(){if(this._scatterplot)return this._scatterplot;let e=await Promise.resolve().then(()=>(l_(),o_)),r=e.default||e.createScatterplot,i=document.createElement("canvas");return i.width=this.width,i.height=this.height,i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.pointerEvents=this.captureHoverEvents?"auto":"none",this.el.appendChild(i),this._scatterplot=r({canvas:i,width:this.width,height:this.height,pointSize:3,backgroundColor:[1,1,1,0],colorBy:"category",pointColor:this.palette,xScale:this._scaleCopy(this.xScale),yScale:this._scaleCopy(this.yScale)}),this._applyScales(),this._scatterplot}_applyScales(){!this._scatterplot||!this.xScale||!this.yScale||(typeof this._scatterplot.setXScale=="function"&&this._scatterplot.setXScale(this._scaleCopy(this.xScale)),typeof this._scatterplot.setYScale=="function"&&this._scatterplot.setYScale(this._scaleCopy(this.yScale)),typeof this._scatterplot.set=="function"&&(typeof this._scatterplot.setXScale!="function"||typeof this._scatterplot.setYScale!="function")&&this._scatterplot.set({xScale:this._scaleCopy(this.xScale),yScale:this._scaleCopy(this.yScale)}))}async update(e){if(this._destroyed)return;let r=await this._ensure();if(!e||e.length===0){r.clear();return}let i={x:new Float32Array(e.length),y:new Float32Array(e.length),category:new Float32Array(e.length),value:new Float32Array(e.length)};for(let s=0;sN0(r6())),r=e.default||e,i=document.createElement("canvas");i.width=this.width,i.height=this.height,i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.pointerEvents="none",this.el.appendChild(i),this._regl=r({canvas:i,attributes:{antialias:!0,preserveDrawingBuffer:!1}}),this._drawLine=this._regl({vert:` +`+s(O.value)}),gd(e,r)}remove(e){e.dom.chartArea.selectAll(".root").transition().duration(500).style("opacity",0).remove()}};function tx(t,e,r){var i=String(t.data[e.mapping.x_var]||t.data[e.mapping.level_2]||t.data.name||""),s=Math.max(0,t.x1-t.x0),a=s<70&&i.length>10?i.substring(0,9)+"...":i;return a.split(/\s+/).concat(r(t.value))}function rx(t){return!t||typeof t.getBBox!="function"?!0:t.getBBox().width>40}var bd=class{static type="donut";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"none",scaleCapabilities:{invertX:!1}};static scaleHints=null;static dataContract={x_var:{required:!0},y_var:{required:!0,numeric:!0}};render(e,r){var i=e.margin,s=e.options.transition.speed,a=Math.min(e.width-(i.right+i.left),e.height-(i.top+i.bottom))/2,d=r.mapping.x_var,m=r.mapping.y_var;Uh(e)?(e.colorDiscrete=d3.scaleOrdinal().range(e.options.colorScheme[0]).domain(e.options.colorScheme[1]),e.colorContinuous=d3.scaleLinear().range(e.options.colorScheme[0]).domain(e.options.colorScheme[1])):e.colorDiscrete=d3.scaleOrdinal().range(r.color).domain(r.data.map(function(q){return q[d]}));var v=e.runtime._hiddenOrdinalSegments||[],_=r.data.filter(function(q){return v.indexOf(q[d])===-1}),x=d3.pie().sort(null).value(function(q){return q[m]}),w=d3.arc().innerRadius(a*.8).outerRadius(a*.4),I=d3.arc().innerRadius(a*.9).outerRadius(a*.9),O=e.chart.selectAll(".donut").data(x(_),function(q){return q.data[d]});O.exit().transition().duration(s).ease($n(e,d3.easeQuad)).attrTween("d",function(q){var ue={startAngle:q.endAngle,endAngle:q.endAngle},K=d3.interpolate(q,ue);return function(B){return w(K(B))}}).remove();var z=O.enter().append("path").attr("class","donut").attr("fill",function(q){return e.colorDiscrete(q.data[d])}).attr("d",w).each(function(q){this._current=q});O.merge(z).transition().duration(s).ease($n(e,d3.easeQuad)).attr("fill",function(q){return e.colorDiscrete(q.data[d])}).attrTween("d",function(q){this._current=this._current||q;var ue=d3.interpolate(this._current,q);return this._current=ue(1),function(K){return w(ue(K))}});function J(q){return q.startAngle+(q.endAngle-q.startAngle)/2}var Q=e.chart.selectAll(".inner-text").data(x(_),function(q){return q.data[d]});Q.exit().transition().duration(s).style("opacity",0).remove();var oe=Q.enter().append("text").attr("class","inner-text").style("font-size","12px").style("opacity",0).attr("dy",".35em").text(function(q){return q.data[d]});Q.merge(oe).transition().duration(s).ease($n(e,d3.easeQuad)).text(function(q){return q.data[d]}).style("opacity",function(q){return Math.abs(q.endAngle-q.startAngle)>.3?1:0}).attrTween("transform",function(q){this._current=this._current||q;var ue=d3.interpolate(this._current,q);return this._current=ue(1),function(K){var B=ue(K),he=I.centroid(B);return he[0]=a*(J(B).3?1:0}).attrTween("points",function(q){this._current=this._current||q;var ue=d3.interpolate(this._current,q);return this._current=ue(1),function(K){var B=ue(K),he=I.centroid(B);return he[0]=a*.95*(J(B)0?r.data[0]:{},v=r.mapping.value,_=typeof v=="string"?+m[v]:+v;Number.isFinite(_)||(_=0),_=Math.max(0,Math.min(1,_));var x=[_,1-_],w=d3.arc().innerRadius(a-d).outerRadius(a).cornerRadius(10),I=d3.arc().innerRadius(a-d).outerRadius(a),O=d3.pie().sort(null).value(function(B){return B}).startAngle(s*-.5).endAngle(s*.5),z=d3.format(".1%"),J=r.options&&Array.isArray(r.options.thresholds)?r.options.thresholds:[{min:0,max:.6,color:"#3CA951"},{min:.6,max:.85,color:"#FFB000"},{min:.85,max:1,color:"#EF603B"}];function Q(B){return I({startAngle:s*-.5+s*Math.max(0,Math.min(1,+B.min||0)),endAngle:s*-.5+s*Math.max(0,Math.min(1,+B.max||0))})}var oe=e.chart.selectAll(".myIO-gauge-threshold").data(J);oe.exit().transition().duration(i).style("opacity",0).remove();var se=oe.enter().append("path").attr("class","myIO-gauge-threshold").attr("fill",function(B){return B.color}).attr("opacity",0).attr("d",Q);se.merge(oe).transition().duration(i).ease($n(e,d3.easeQuad)).attr("fill",function(B){return B.color}).attr("opacity",.24).attr("d",Q);var re=e.chart.selectAll(".myIO-gauge-background").data(O([1]));re.exit().transition().duration(i).style("opacity",0).remove();var q=re.enter().append("path").attr("class","myIO-gauge-background").attr("fill","rgba(107, 114, 128, 0.22)").attr("d",w).each(function(B){this._current=B});q.merge(re).transition().duration(i).ease($n(e,d3.easeBack)).attr("fill","rgba(107, 114, 128, 0.22)").attrTween("d",function(B){this._current=this._current||B;var he=d3.interpolate(this._current,B);return this._current=he(1),function(He){return w(he(He))}});var ue=e.chart.selectAll(".myIO-gauge-value").data(O(x));ue.exit().transition().duration(i).style("opacity",0).remove();var K=ue.enter().append("path").attr("class","myIO-gauge-value").attr("fill",function(B,he){return[r.color||Ny(_,J),"transparent"][he]}).attr("d",w).each(function(B){this._current=B});K.merge(ue).transition().duration(i).ease($n(e,d3.easeBack)).attr("fill",function(B,he){return[r.color||Ny(_,J),"transparent"][he]}).attrTween("d",function(B){this._current=this._current||B;var he=d3.interpolate(this._current,B);return this._current=he(1),function(He){return w(he(He))}}),e.chart.selectAll(".gauge-text").data([x[0]]).join("text").attr("class","gauge-text").text(function(B){return z(B)}).attr("text-anchor","middle").attr("font-size",20).attr("dy","-0.45em"),e.chart.selectAll(".gauge-label").data([r.options&&r.options.metric?r.options.metric:r.label]).join("text").attr("class","gauge-label").text(function(B){return B}).attr("text-anchor","middle").attr("font-size",12).attr("dy","1.1em"),e.chart.selectAll(".gauge-min-label").data(["0%"]).join("text").attr("class","gauge-min-label").text(function(B){return B}).attr("text-anchor","middle").attr("font-size",11).attr("x",-a+d/2).attr("y",12),e.chart.selectAll(".gauge-max-label").data(["100%"]).join("text").attr("class","gauge-max-label").text(function(B){return B}).attr("text-anchor","middle").attr("font-size",11).attr("x",a-d/2).attr("y",12)}remove(e){e.dom.chartArea.selectAll(".myIO-gauge-threshold, .myIO-gauge-background, .myIO-gauge-value, .gauge-text, .gauge-label, .gauge-min-label, .gauge-max-label").transition().duration(500).style("opacity",0).remove()}};function Ny(t,e){var r=e.find(function(i){return t>=+i.min&&t<=+i.max});return r&&r.color?r.color:"#4269D0"}var _d=class{static type="heatmap";static traits={hasAxes:!0,referenceLines:!1,legendType:"continuous",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"band",yExtentFields:["value"],domainMerge:"union"};static dataContract={x_var:{required:!0},y_var:{required:!0},value:{required:!0,numeric:!0}};render(e,r){var i=e.options.transition.speed,s=r.mapping.x_var,a=r.mapping.y_var,d=r.mapping.value,m=r.data.map(function(O){return+O[d]}),v=d3.extent(m.filter(function(O){return Number.isFinite(O)}));(!v||v[0]===void 0||v[1]===void 0)&&(v=[0,1]),e.derived.colorContinuous=d3.scaleSequential(d3.interpolateBlues).domain(v),e.colorContinuous=e.derived.colorContinuous;var _=e.chart.selectAll("."+_r("heatmap",e.element.id,r.label)).data(r.data);_.exit().transition().duration(i).style("opacity",0).remove();var x=e.xScale.bandwidth?e.xScale.bandwidth():0,w=e.yScale.bandwidth?e.yScale.bandwidth():0,I=_.enter().append("rect").attr("class",_r("heatmap",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").attr("x",function(O){return e.xScale(O[s])}).attr("y",function(O){return e.yScale(O[a])}).attr("width",x).attr("height",w).attr("fill",function(O){return e.colorContinuous(+O[d])}).style("opacity",0);_.merge(I).transition().ease($n(e,d3.easeQuad)).duration(i).attr("x",function(O){return e.xScale(O[s])}).attr("y",function(O){return e.yScale(O[a])}).attr("width",x).attr("height",w).attr("fill",function(O){return e.colorContinuous(+O[d])}).style("opacity",1)}getHoverSelector(e,r){return"."+_r("heatmap",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var]+", "+i.mapping.y_var+": "+r[i.mapping.y_var],body:i.mapping.value+": "+r[i.mapping.value],color:e.colorContinuous?e.colorContinuous(+r[i.mapping.value]):i.color,label:i.label,value:r[i.mapping.value],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("heatmap",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var xd=class{static type="calendarHeatmap";static traits={hasAxes:!1,referenceLines:!1,legendType:"continuous",binning:!1,rolloverStyle:"element"};static dataContract={date:{required:!0},value:{required:!0,numeric:!0}};static scaleHints=null;getHoverSelector(){return".myIO-calendar-cell"}formatTooltip(e,r,i){var s=d3.utcFormat("%b %-d, %Y"),a=r.date instanceof Date?r.date:new Date((r[i.mapping.date]||"")+"T00:00:00Z"),d=r.value!=null?r.value:+r[i.mapping.value];return{title:s(a),body:i.label+": "+d,color:r.color||i.color,label:i.label,value:d,raw:r}}render(e,r){var i=r.options||{},s=i.weekStart==="monday"?1:0,a=i.showWeekdayLabels!==!1,d=r.mapping.date,m=r.mapping.value,v=(r.data||[]).map(function(ar){return{date:new Date(ar[d]+"T00:00:00Z"),value:+ar[m],raw:ar}}).filter(function(ar){return!isNaN(ar.date.getTime())}).sort(function(ar,Ki){return ar.date-Ki.date});if(v.length!==0){var _=v[0].date.getUTCFullYear(),x=new Date(Date.UTC(_,0,1)),w=new Date(Date.UTC(_,11,31)),I=function(ar){var Ki=ar.getUTCDay();return(Ki-s+7)%7},O=I(x),z=function(ar){var Ki=Math.floor((ar-x)/864e5);return Math.floor((Ki+O)/7)},J=z(w)+1,Q=e.margin||{top:0,right:0,bottom:0,left:0},oe=(e.width||0)-(Q.left||0)-(Q.right||0),se=(e.height||0)-(Q.top||0)-(Q.bottom||0),re=a?24:0,q=18,ue=Math.max(1,oe-re),K=Math.max(1,se-q),B=Math.max(4,Math.min(Math.floor(ue/J),Math.floor(K/7))),he=e.element&&typeof getComputedStyle=="function"?getComputedStyle(e.element):null,He=he?he.getPropertyValue("--chart-calendar-cell-gap"):"",er=parseFloat(He);isFinite(er)||(er=2);var Er=e.config&&e.config.axis&&e.config.axis.vlim,zt=d3.max(v,function(ar){return ar.value});zt>0||(zt=1);var _n=Er&&Er.max!==void 0&&Er.max!==null?[Er.min||0,Er.max]:[0,zt],$r=d3.interpolateRgb("#ffffff",r.color||"#4E79A7"),In=d3.scaleSequential($r).domain(_n);e.colorContinuous=In,e.derived&&(e.derived.colorContinuous=In);var On=function(ar){var Ki=ar instanceof Date?ar:new Date(ar);return re+z(Ki)*(B+er)};On.domain=function(){return[x,w]},On.range=function(){return[re,re+(J-1)*(B+er)]},On.invert=function(ar){var Ki=Math.round((ar-re)/(B+er)),zs=Ki*7-O;return new Date(x.getTime()+zs*864e5)},e.xScale=On;var cr=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0,bn=e.chart.selectAll(".myIO-calendar-root").data([null]).join("g").attr("class","myIO-calendar-root");if(a){var mn=s===0?["","Mon","","Wed","","Fri",""]:["","Tue","","Thu","","Sat",""],qn=mn.map(function(ar,Ki){return{t:ar,i:Ki}}).filter(function(ar){return ar.t}),Wt=bn.selectAll("text.myIO-calendar-dow").data(qn,function(ar){return ar.i});Wt.exit().remove(),Wt.enter().append("text").attr("class","myIO-calendar-dow").attr("x",0).merge(Wt).attr("y",function(ar){return q+ar.i*(B+er)+B*.75}).text(function(ar){return ar.t})}else bn.selectAll("text.myIO-calendar-dow").remove();var Pr=d3.utcFormat("%b"),gi=d3.range(12).map(function(ar){var Ki=new Date(Date.UTC(_,ar,1));return{m:ar,text:Pr(Ki),col:z(Ki)}}),Ii=bn.selectAll("text.myIO-calendar-month").data(gi,function(ar){return ar.m});Ii.exit().remove(),Ii.enter().append("text").attr("class","myIO-calendar-month").attr("y",q-4).merge(Ii).attr("x",function(ar){return re+ar.col*(B+er)}).text(function(ar){return ar.text});var yi=function(ar){return ar.date.toISOString().slice(0,10)},as=bn.selectAll("rect.myIO-calendar-cell").data(v,function(ar){return yi(ar)});as.exit().transition().duration(cr).style("opacity",0).remove();var Ha=as.enter().append("rect").attr("class","myIO-calendar-cell").attr("data-date",yi).attr("data-row",function(ar){return String(I(ar.date))}).attr("data-col",function(ar){return String(z(ar.date))}).attr("x",function(ar){return re+z(ar.date)*(B+er)}).attr("y",function(ar){return q+I(ar.date)*(B+er)}).attr("width",B).attr("height",B).attr("fill",function(ar){return ar.value==null||isNaN(ar.value)||ar.value===0?"var(--chart-calendar-empty-fill, #ebedf0)":In(ar.value)}).style("opacity",0);Ha.merge(as).each(function(ar){ar.label=r.label,ar.color=ar.value==null||isNaN(ar.value)||ar.value===0?"var(--chart-calendar-empty-fill, #ebedf0)":In(ar.value),ar[d]=yi({date:ar.date}),ar[m]=ar.value}).transition().duration(cr).style("opacity",1).attr("x",function(ar){return re+z(ar.date)*(B+er)}).attr("y",function(ar){return q+I(ar.date)*(B+er)}).attr("width",B).attr("height",B).attr("fill",function(ar){return ar.value==null||isNaN(ar.value)||ar.value===0?"var(--chart-calendar-empty-fill, #ebedf0)":In(ar.value)})}}remove(e){e&&e.chart&&typeof e.chart.selectAll=="function"&&e.chart.selectAll(".myIO-calendar-root").remove()}};var Sd=class{static type="candlestick";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["open","high","low","close"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!0},open:{required:!0,numeric:!0},high:{required:!0,numeric:!0},low:{required:!0,numeric:!0},close:{required:!0,numeric:!0}};render(e,r){var i=e.options.transition.speed,s=r.mapping.x_var,a=r.mapping.open,d=r.mapping.high,m=r.mapping.low,v=r.mapping.close,_=e.width-(e.margin.left+e.margin.right),x=Math.max(6,Math.min(40,_/Math.max(r.data.length*2.5,1))),w=this;function I(q){return e.xScale(q[s])}function O(q){return+q[v]>=+q[a]?"#4CAF50":"#F44336"}function z(q){return e.yScale(Math.max(+q[a],+q[v]))}function J(q){return Math.max(Math.abs(e.yScale(+q[a])-e.yScale(+q[v])),1)}function Q(q){return e.yScale((+q[a]+ +q[v])/2)}var oe=e.chart.selectAll("."+_r("candlestick",e.element.id,r.label)).data(r.data);oe.exit().transition().duration(i).style("opacity",0).remove();var se=oe.enter().append("g").attr("class",_r("candlestick",e.element.id,r.label)).style("opacity",0);se.append("line").attr("class","wick").attr("stroke","#666").attr("stroke-width",1.5).attr("x1",I).attr("x2",I).attr("y1",Q).attr("y2",Q),se.append("rect").attr("class","body").attr("stroke-width",.5).attr("x",function(q){return I(q)-x/2}).attr("y",Q).attr("width",x).attr("height",0).attr("fill",O).attr("stroke",O);var re=oe.merge(se);re.transition().ease($n(e,d3.easeQuad)).duration(i).style("opacity",1),re.select("line.wick").transition().ease($n(e,d3.easeQuad)).duration(i).attr("x1",I).attr("x2",I).attr("y1",function(q){return e.yScale(+q[m])}).attr("y2",function(q){return e.yScale(+q[d])}),re.select("rect.body").transition().ease($n(e,d3.easeQuad)).duration(i).attr("x",function(q){return I(q)-x/2}).attr("y",z).attr("width",x).attr("height",J).attr("fill",O).attr("stroke",O)}getHoverSelector(e,r){return"."+_r("candlestick",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:"O: "+r[i.mapping.open]+", H: "+r[i.mapping.high]+", L: "+r[i.mapping.low]+", C: "+r[i.mapping.close],color:r[i.mapping.close]>=r[i.mapping.open]?"#4CAF50":"#F44336",label:i.label,value:r[i.mapping.close],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("candlestick",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var Ed=class{static type="waterfall";static traits={hasAxes:!0,referenceLines:!0,legendType:"none",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"linear",yExtentFields:["_base_y","_cumulative_y"],domainMerge:"union"};static dataContract={x_var:{required:!0},y_var:{required:!0,numeric:!0}};render(e,r){var i=e.options.transition.speed,s=r.mapping.x_var,a=r.mapping.y_var,d=e.xScale.bandwidth?e.xScale.bandwidth():0,m=d*.82,v=(d-m)/2,_=Array.isArray(r.color),x=e.chart.selectAll("."+_r("waterfall",e.element.id,r.label)).data(r.data);x.exit().transition().duration(i).style("opacity",0).remove();var w=x.enter().append("rect").attr("class",_r("waterfall",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").attr("x",function(J){return e.xScale(J[s])+v}).attr("width",m).attr("y",function(J){return e.yScale(+J._base_y)}).attr("height",0).attr("fill",function(J,Q){return _?r.color[Q%r.color.length]:J._is_total?"#888":+J._cumulative_y>=+J._base_y?"#4CAF50":"#F44336"});x.merge(w).transition().ease($n(e,d3.easeQuad)).duration(i).attr("x",function(J){return e.xScale(J[s])+v}).attr("width",m).attr("y",function(J){return e.yScale(Math.max(+J._base_y,+J._cumulative_y))}).attr("height",function(J){return Math.abs(e.yScale(+J._base_y)-e.yScale(+J._cumulative_y))}).attr("fill",function(J,Q){return _?r.color[Q%r.color.length]:J._is_total?"#888":+J._cumulative_y>=+J._base_y?"#4CAF50":"#F44336"});var I=r.data.slice(0,Math.max(r.data.length-1,0)),O=e.chart.selectAll("."+_r("waterfall-connector",e.element.id,r.label)).data(I);O.exit().transition().duration(i).style("opacity",0).remove();var z=O.enter().append("line").attr("class",_r("waterfall-connector",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").style("stroke","#374151").style("stroke-width",1.5).style("stroke-dasharray","4 2").attr("x1",function(J,Q){return e.xScale(r.data[Q][s])+v+m}).attr("x2",function(J,Q){return e.xScale(r.data[Q+1][s])+v}).attr("y1",function(J){return e.yScale(+J._cumulative_y)}).attr("y2",function(J){return e.yScale(+J._cumulative_y)}).style("opacity",0);O.merge(z).transition().ease($n(e,d3.easeQuad)).duration(i).style("opacity",1).attr("x1",function(J,Q){return e.xScale(r.data[Q][s])+v+m}).attr("x2",function(J,Q){return e.xScale(r.data[Q+1][s])+v}).attr("y1",function(J){return e.yScale(+J._cumulative_y)}).attr("y2",function(J){return e.yScale(+J._cumulative_y)})}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:"Delta: "+r[i.mapping.y_var]+", Total: "+r._cumulative_y,color:r._is_total?"#888":+r._cumulative_y>=+r._base_y?"#4CAF50":"#F44336",label:i.label,value:r._cumulative_y,raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("waterfall",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("waterfall-connector",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var wd=class{static type="sankey";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints=null;static dataContract={source:{required:!0},target:{required:!0},value:{required:!0,numeric:!0}};render(e,r){var i=e.margin,s=e.width-(i.left+i.right),a=s1(e)-(i.top+i.bottom),d=18,m=d3.sankey().nodeId(function(se){return se.name}).nodeWidth(d).nodePadding(12).extent([[0,0],[s,a]]),v=new Map,_=r.data.map(function(se){var re=se[r.mapping.source],q=se[r.mapping.target];return v.has(re)||v.set(re,{name:re}),v.has(q)||v.set(q,{name:q}),{source:re,target:q,value:+se[r.mapping.value]}}),x=m({nodes:Array.from(v.values()),links:_});e.derived.colorDiscrete=d3.scaleOrdinal().domain(x.nodes.map(function(se){return se.name})).range(r.color||d3.schemeTableau10),e.colorDiscrete=e.derived.colorDiscrete;var w=e.chart.selectAll("."+_r("sankey",e.element.id,r.label)).data(x.links);w.exit().transition().duration(e.options.transition.speed).style("opacity",0).remove();var I=w.enter().append("path").attr("class",_r("sankey",e.element.id,r.label)).attr("fill","none").attr("stroke-opacity",.4).attr("clip-path","url(#"+e.element.id+"clip)").attr("d",d3.sankeyLinkHorizontal()).attr("stroke-width",function(se){return Math.max(1,se.width)}).attr("stroke",function(se){return e.colorDiscrete(se.source.name)}).style("opacity",0);w.merge(I).transition().ease($n(e,d3.easeQuad)).duration(e.options.transition.speed).style("opacity",1).attr("d",d3.sankeyLinkHorizontal()).attr("stroke-width",function(se){return Math.max(1,se.width)}).attr("stroke",function(se){return e.colorDiscrete(se.source.name)});var O=e.chart.selectAll("."+_r("sankey-node",e.element.id,r.label)).data(x.nodes);O.exit().transition().duration(e.options.transition.speed).style("opacity",0).remove();var z=O.enter().append("rect").attr("class",_r("sankey-node",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").attr("x",function(se){return se.x0}).attr("y",function(se){return se.y0}).attr("width",function(se){return se.x1-se.x0}).attr("height",function(se){return Math.max(1,se.y1-se.y0)}).attr("fill",function(se){return e.colorDiscrete(se.name)}).style("opacity",0);O.merge(z).transition().ease($n(e,d3.easeQuad)).duration(e.options.transition.speed).style("opacity",1).attr("x",function(se){return se.x0}).attr("y",function(se){return se.y0}).attr("width",function(se){return se.x1-se.x0}).attr("height",function(se){return Math.max(1,se.y1-se.y0)}).attr("fill",function(se){return e.colorDiscrete(se.name)});var J=_r("sankey-label",e.element.id,r.label),Q=e.chart.selectAll("."+J).data(x.nodes,function(se){return se.name});Q.exit().transition().duration(e.options.transition.speed).style("opacity",0).remove();var oe=Q.enter().append("text").attr("class",J).attr("x",function(se){return se.x0 "+r.target.name,body:"Value: "+r.value,color:e.colorDiscrete?e.colorDiscrete(r.source.name):i.color,label:i.label,value:r.value,raw:r}:{title:r.name,body:"Value: "+r.value,color:e.colorDiscrete?e.colorDiscrete(r.name):i.color,label:i.label,value:r.value,raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("sankey",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("sankey-node",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("sankey-label",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};var Ad=class{static type="rangeBar";static traits={hasAxes:!0,referenceLines:!1,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",yExtentFields:["low_y","high_y"],domainMerge:"union"};static dataContract={x_var:{required:!0},low_y:{required:!0,numeric:!0},high_y:{required:!0,numeric:!0}};render(e,r){if(r.options&&r.options.style==="errorbar"){nx(e,r);return}var i=e.options.transition.speed,s=r.mapping.x_var,a=r.mapping.low_y,d=r.mapping.high_y,m=r.options&&r.options.rangeBarWidth?r.options.rangeBarWidth:Math.max(6,Math.min(60,(e.width-(e.margin.left+e.margin.right))/Math.max(r.data.length*3,1))),v=e.chart.selectAll("."+_r("rangeBar",e.element.id,r.label)).data(r.data);v.exit().transition().duration(i).style("opacity",0).remove();function _(z){return e.yScale((+z[a]+ +z[d])/2)}function x(z){return e.yScale(Math.max(+z[a],+z[d]))}function w(z){return Math.abs(e.yScale(+z[a])-e.yScale(+z[d]))}function I(z){return typeof e.colorDiscrete=="function"&&z[r.mapping.group]?e.colorDiscrete(z[r.mapping.group]):r.color||"#6b7280"}var O=v.enter().append("rect").attr("class",_r("rangeBar",e.element.id,r.label)).attr("clip-path","url(#"+e.element.id+"clip)").attr("x",function(z){return e.xScale(z[s])-m/2}).attr("y",_).attr("width",m).attr("height",0).attr("fill",I);v.merge(O).transition().ease($n(e,d3.easeQuad)).duration(i).attr("x",function(z){return e.xScale(z[s])-m/2}).attr("y",x).attr("width",m).attr("height",w).attr("fill",I)}getHoverSelector(e,r){return"."+_r("rangeBar",e.dom.element.id,r.label)}formatTooltip(e,r,i){return{title:i.mapping.x_var+": "+r[i.mapping.x_var],body:i.mapping.low_y+": "+r[i.mapping.low_y]+", "+i.mapping.high_y+": "+r[i.mapping.high_y],color:i.color,label:i.label,value:r[i.mapping.high_y],raw:r}}remove(e,r){e.dom.chartArea.selectAll("."+_r("rangeBar",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove(),e.dom.chartArea.selectAll("."+_r("rangeBar-error",e.dom.element.id,r.label)).transition().duration(500).style("opacity",0).remove()}};function nx(t,e){var r=t.options.transition.speed,i=e.mapping.x_var,s=e.mapping.low_y,a=e.mapping.high_y,d=e.mapping.y_var;if(!d){typeof console<"u"&&console.warn&&console.warn("myIO RangeBarRenderer: style='errorbar' requires a y_var mapping for the mean point. Skipping render for layer '"+(e.label||"(unnamed)")+"'.");return}var m=e.color||"#4269D0",v=e.options&&e.options.capWidth?e.options.capWidth:18,_=e.options&&e.options.pointRadius?e.options.pointRadius:4;function x(oe){var se=t.xScale(oe[i]);return t.xScale.bandwidth&&(se+=t.xScale.bandwidth()/2),se}function w(oe){return t.yScale(+oe[s])}function I(oe){return t.yScale(+oe[a])}function O(oe){return t.yScale(+oe[d])}var z=t.chart.selectAll("."+_r("rangeBar-error",t.element.id,e.label)).data(e.data);z.exit().transition().duration(r).style("opacity",0).remove();var J=z.enter().append("g").attr("class",_r("rangeBar-error",t.element.id,e.label)).attr("clip-path","url(#"+t.element.id+"clip)").style("opacity",0);J.append("line").attr("class","mean-ci-whisker").attr("x1",x).attr("x2",x).attr("y1",O).attr("y2",O).attr("stroke",m).attr("stroke-width",2),J.append("line").attr("class","mean-ci-cap mean-ci-cap-low").attr("x1",x).attr("x2",x).attr("y1",O).attr("y2",O).attr("stroke",m).attr("stroke-width",2),J.append("line").attr("class","mean-ci-cap mean-ci-cap-high").attr("x1",x).attr("x2",x).attr("y1",O).attr("y2",O).attr("stroke",m).attr("stroke-width",2),J.append("circle").attr("class","mean-ci-point").attr("cx",x).attr("cy",O).attr("r",0).attr("fill",m).attr("stroke","var(--chart-bg, #ffffff)").attr("stroke-width",1.5);var Q=z.merge(J);Q.transition().ease($n(t,d3.easeQuad)).duration(r).style("opacity",1),Q.select(".mean-ci-whisker").transition().ease($n(t,d3.easeQuad)).duration(r).attr("x1",x).attr("x2",x).attr("y1",w).attr("y2",I).attr("stroke",m),Q.select(".mean-ci-cap-low").transition().ease($n(t,d3.easeQuad)).duration(r).attr("x1",function(oe){return x(oe)-v/2}).attr("x2",function(oe){return x(oe)+v/2}).attr("y1",w).attr("y2",w).attr("stroke",m),Q.select(".mean-ci-cap-high").transition().ease($n(t,d3.easeQuad)).duration(r).attr("x1",function(oe){return x(oe)-v/2}).attr("x2",function(oe){return x(oe)+v/2}).attr("y1",I).attr("y2",I).attr("stroke",m),Q.select(".mean-ci-point").transition().ease($n(t,d3.easeQuad)).duration(r).attr("cx",x).attr("cy",O).attr("r",_).attr("fill",m)}var Td=class{static type="text";static traits={hasAxes:!1,referenceLines:!1,legendType:"none",binning:!1,rolloverStyle:"none",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",xExtentFields:[],yExtentFields:[],domainMerge:"union"};static dataContract={};render(e,r){var i=r.options&&r.options.position||"top-right",s=r.label,a=_r("text-annotation",e.element.id,s);e.chart.selectAll("."+a).remove();var d=r.data.map(function(J){return J.text}),m=i.indexOf("top")!==-1,v=i.indexOf("right")!==-1,_=e.width-(e.margin.left+e.margin.right),x=e.height-(e.margin.top+e.margin.bottom),w=v?_-58:10,I=m?20:x-10,O=v?"end":"start",z=e.chart.append("g").attr("class",a).attr("transform","translate("+w+","+I+")");d.forEach(function(J,Q){z.append("text").attr("y",(m?1:-1)*Q*16).attr("text-anchor",O).style("font-size","12px").style("font-family","var(--font-family, sans-serif)").style("fill","var(--text-color, #333)").style("opacity",.8).text(J)})}formatTooltip(){return null}remove(e,r){var i=_r("text-annotation",e.dom.element.id,r.label);e.dom.chartArea.selectAll("."+i).remove()}};var Id=class{static type="bracket";static traits={hasAxes:!0,referenceLines:!1,legendType:"none",binning:!1,rolloverStyle:"none",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"linear",yScaleType:"linear",xExtentFields:[],yExtentFields:["y"],domainMerge:"union"};static dataContract={x1:{required:!0,numeric:!0},x2:{required:!0,numeric:!0},y:{required:!0,numeric:!0}};render(e,r){var i=_r("bracket",e.element.id,r.label),s=6,a=4,d=e.options.transition.speed,m=r.color||"var(--text-color, #333)",v=e.chart.selectAll("g."+i+"-root").data([null]).join("g").attr("class",i+"-root").attr("clip-path","url(#"+e.element.id+"clip)"),_=function(O,z){return O.label!=null?String(O.label)+"_"+z:String(z)},x=v.selectAll("g."+i).data(r.data,_);x.exit().transition().duration(d).style("opacity",0).remove();var w=x.enter().append("g").attr("class",i).style("opacity",0);w.append("line").attr("class","bracket-bar").attr("stroke",m).attr("stroke-width",1.5),w.append("line").attr("class","bracket-tick-left").attr("stroke",m).attr("stroke-width",1.5),w.append("line").attr("class","bracket-tick-right").attr("stroke",m).attr("stroke-width",1.5),w.append("text").attr("class","bracket-label").attr("text-anchor","middle").style("font-size","11px").style("font-family","var(--font-family, sans-serif)").style("fill",m);var I=w.merge(x);I.transition().duration(d).style("opacity",1),I.select(".bracket-bar").transition().duration(d).attr("x1",function(O){return e.xScale(+O.x1)}).attr("y1",function(O){return e.yScale(+O.y)}).attr("x2",function(O){return e.xScale(+O.x2)}).attr("y2",function(O){return e.yScale(+O.y)}),I.select(".bracket-tick-left").transition().duration(d).attr("x1",function(O){return e.xScale(+O.x1)}).attr("y1",function(O){return e.yScale(+O.y)}).attr("x2",function(O){return e.xScale(+O.x1)}).attr("y2",function(O){return e.yScale(+O.y)+s}),I.select(".bracket-tick-right").transition().duration(d).attr("x1",function(O){return e.xScale(+O.x2)}).attr("y1",function(O){return e.yScale(+O.y)}).attr("x2",function(O){return e.xScale(+O.x2)}).attr("y2",function(O){return e.yScale(+O.y)+s}),I.select(".bracket-label").text(function(O){return O.label}).transition().duration(d).attr("x",function(O){return(e.xScale(+O.x1)+e.xScale(+O.x2))/2}).attr("y",function(O){return e.yScale(+O.y)-a})}formatTooltip(){return null}remove(e,r){var i=_r("bracket",e.element.id,r.label);e.chart.selectAll("."+i).remove()}};var Od=class{static type="lollipop";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"linear",xExtentFields:[],yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!1},y_var:{required:!0,numeric:!0}};render(e,r,i){var s=e.derived.xScale,a=e.derived.yScale,d=e.config.scales.flipAxis,m=e.options.transition.speed,v=e.dom.chartArea.selectAll(".tag-lollipop-"+r.id).data([null]).join("g").attr("class","tag-lollipop-"+r.id),_=r.options&&r.options.headRadius||5,x=r.options&&r.options.stemWidth||2,w=r.mapping.x_var,I=r.mapping.y_var,O=s.bandwidth?s.bandwidth()/2:0,z=typeof a(0)=="number"?a(0):a.range()[0],J=typeof s(0)=="number"?s(0):s.range()[0];function Q(K){if(d){var B=a(K[w]);return a.bandwidth&&(B+=O),{x1:J,x2:s(K[I]),y1:B,y2:B}}var he=s(K[w])+O;return{x1:he,x2:he,y1:z,y2:a(K[I])}}function oe(K){var B=Q(K);return{cx:B.x2,cy:B.y2}}var se=v.selectAll(".lollipop-stem").data(r.data,function(K){return K._source_key});se.exit().transition().duration(m).style("opacity",0).attr("x2",d?J:function(K){return s(K[w])+O}).attr("y2",d?function(K){var B=a(K[w]);return a.bandwidth?B+O:B}:z).remove();var re=se.enter().append("line").attr("class","lollipop-stem").attr("x1",function(K){return Q(K).x1}).attr("x2",function(K){return d?Q(K).x1:Q(K).x2}).attr("y1",function(K){return Q(K).y1}).attr("y2",function(K){return Q(K).y1}).attr("stroke",r.color).attr("stroke-width",x).style("opacity",0);re.merge(se).transition().duration(m).style("opacity",1).attr("x1",function(K){return Q(K).x1}).attr("x2",function(K){return Q(K).x2}).attr("y1",function(K){return Q(K).y1}).attr("y2",function(K){return Q(K).y2}).attr("stroke",r.color).attr("stroke-width",x);var q=v.selectAll(".lollipop-head").data(r.data,function(K){return K._source_key});q.exit().transition().duration(m).style("opacity",0).attr("cx",function(K){return Q(K).x1}).attr("cy",function(K){return Q(K).y1}).remove();var ue=q.enter().append("circle").attr("class","lollipop-head").attr("cx",function(K){return Q(K).x1}).attr("cy",function(K){return Q(K).y1}).attr("r",_).attr("fill",r.color).style("opacity",0);ue.merge(q).transition().duration(m).style("opacity",1).attr("cx",function(K){return oe(K).cx}).attr("cy",function(K){return oe(K).cy}).attr("r",_).attr("fill",r.color)}getHoverSelector(e,r){return".tag-lollipop-"+r.id+" .lollipop-head"}formatTooltip(e,r,i){var s=e.runtime.activeYFormat||d3.format("s");return{title:{text:String(r[i.mapping.x_var])},items:[{color:i.color,label:i.label,value:s(r[i.mapping.y_var])}]}}remove(e,r){e.dom.chartArea.selectAll(".tag-lollipop-"+r.id).remove()}};var Cd=class{static type="dumbbell";static traits={hasAxes:!0,referenceLines:!0,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{invertX:!1}};static scaleHints={xScaleType:"band",yScaleType:"linear",xExtentFields:[],yExtentFields:["low_y","high_y"],domainMerge:"union"};static dataContract={x_var:{required:!0,numeric:!1},low_y:{required:!0,numeric:!0},high_y:{required:!0,numeric:!0}};render(e,r,i){var s=e.derived.xScale,a=e.derived.yScale,d=e.config.scales.flipAxis,m=e.options.transition.speed,v=e.dom.chartArea.selectAll(".tag-dumbbell-"+r.id).data([null]).join("g").attr("class","tag-dumbbell-"+r.id),_=r.options&&r.options.dotRadius||5,x=r.options&&r.options.lineWidth||2,w=r.mapping.x_var,I=r.mapping.low_y,O=r.mapping.high_y,z=s.bandwidth?s.bandwidth()/2:0,J=a.bandwidth?a.bandwidth()/2:0;function Q(B){if(d){var he=a(B[w])+J,He=s(B[I]),er=s(B[O]);return{lowX:He,lowY:he,highX:er,highY:he,midX:(He+er)/2,midY:he}}var Er=s(B[w])+z,zt=a(B[I]),_n=a(B[O]);return{lowX:Er,lowY:zt,highX:Er,highY:_n,midX:Er,midY:(zt+_n)/2}}var oe=v.selectAll(".dumbbell-line").data(r.data,function(B){return B._source_key});oe.exit().transition().duration(m).style("opacity",0).attr("x1",function(B){return Q(B).midX}).attr("x2",function(B){return Q(B).midX}).attr("y1",function(B){return Q(B).midY}).attr("y2",function(B){return Q(B).midY}).remove();var se=oe.enter().append("line").attr("class","dumbbell-line").attr("x1",function(B){return Q(B).midX}).attr("x2",function(B){return Q(B).midX}).attr("y1",function(B){return Q(B).midY}).attr("y2",function(B){return Q(B).midY}).attr("stroke","var(--chart-grid-color, #ccc)").attr("stroke-width",x).style("opacity",0);se.merge(oe).transition().duration(m).style("opacity",1).attr("x1",function(B){return Q(B).lowX}).attr("x2",function(B){return Q(B).highX}).attr("y1",function(B){return Q(B).lowY}).attr("y2",function(B){return Q(B).highY}).attr("stroke","var(--chart-grid-color, #ccc)").attr("stroke-width",x);var re=v.selectAll(".dumbbell-low").data(r.data,function(B){return B._source_key});re.exit().transition().duration(m).style("opacity",0).attr("cx",function(B){return Q(B).midX}).attr("cy",function(B){return Q(B).midY}).remove();var q=re.enter().append("circle").attr("class","dumbbell-low").attr("cx",function(B){return Q(B).midX}).attr("cy",function(B){return Q(B).midY}).attr("r",_).attr("fill",r.color).attr("opacity",0);q.merge(re).transition().duration(m).attr("cx",function(B){return Q(B).lowX}).attr("cy",function(B){return Q(B).lowY}).attr("r",_).attr("fill",r.color).attr("opacity",.6);var ue=v.selectAll(".dumbbell-high").data(r.data,function(B){return B._source_key});ue.exit().transition().duration(m).style("opacity",0).attr("cx",function(B){return Q(B).midX}).attr("cy",function(B){return Q(B).midY}).remove();var K=ue.enter().append("circle").attr("class","dumbbell-high").attr("cx",function(B){return Q(B).midX}).attr("cy",function(B){return Q(B).midY}).attr("r",_).attr("fill",r.color).attr("opacity",0);K.merge(ue).transition().duration(m).attr("cx",function(B){return Q(B).highX}).attr("cy",function(B){return Q(B).highY}).attr("r",_).attr("fill",r.color).attr("opacity",1)}getHoverSelector(e,r){return".tag-dumbbell-"+r.id+" .dumbbell-high, .tag-dumbbell-"+r.id+" .dumbbell-low"}formatTooltip(e,r,i){var s=e.runtime.activeYFormat||d3.format("s");return{title:{text:String(r[i.mapping.x_var])},items:[{color:i.color,label:"Low",value:s(r[i.mapping.low_y])},{color:i.color,label:"High",value:s(r[i.mapping.high_y])}]}}remove(e,r){e.dom.chartArea.selectAll(".tag-dumbbell-"+r.id).remove()}};var Ld=class{static type="waffle";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints=null;static dataContract={category:{required:!0},value:{required:!0,numeric:!0}};render(e,r){for(var i=r.options&&r.options.rows||10,s=r.options&&r.options.cols||10,a=i*s,d=r.options&&r.options.cellGap||2,m=r.options&&r.options.cellRadius||2,v=e.config.layout.margin,_=e.runtime.width-v.left-v.right,x=e.runtime.height-v.top-v.bottom,w=Math.min((_-(s-1)*d)/s,(x-(i-1)*d)/i),I=0,O=0;O=he)&&(K=Er,B=!0)}se._quantile_dot_cx=K,se._quantile_dot_cy=ue,oe.push({cx:K,cy:ue})})});var I=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0,O=e.dom.chartArea.selectAll(".tag-quantile_dots-"+r.id).data([null]).join("g").attr("class","tag-quantile_dots-"+r.id),z=O.selectAll(".quantile-dots-point").data(r.data,function(Q){return Q._source_key});z.exit().transition().duration(I).attr("fill-opacity",0).remove();var J=z.enter().append("circle").attr("class","quantile-dots-point").attr("clip-path","url(#"+e.element.id+"clip)").attr("cx",function(Q){return Q._quantile_dot_cx}).attr("cy",function(Q){return Q._quantile_dot_cy}).attr("r",a).attr("fill",r.color).attr("fill-opacity",0).attr("role","graphics-symbol");J.merge(z).transition().duration(I).attr("cx",function(Q){return Q._quantile_dot_cx}).attr("cy",function(Q){return Q._quantile_dot_cy}).attr("r",a).attr("fill",r.color).attr("fill-opacity",.75)}getHoverSelector(e,r){return".tag-quantile_dots-"+r.id+" .quantile-dots-point"}formatTooltip(e,r,i){var s=e.runtime.activeYFormat||d3.format("s"),a=i.options&&i.options.source?" ("+i.options.source+")":"";return{title:String(r[i.mapping.x_var]),items:[{color:i.color,label:i.label+a,value:"Q"+r[i.mapping.quantile_rank]+": "+s(r[i.mapping.y_var])}],value:r[i.mapping.y_var],raw:r}}remove(e,r){e.dom.chartArea.selectAll(".tag-quantile_dots-"+r.id).remove()}};var Rd=class{static type="bump";static traits={hasAxes:!0,referenceLines:!1,legendType:"layer",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints={xScaleType:"point",yScaleType:"linear",xExtentFields:[],yExtentFields:["y_var"],domainMerge:"union"};static dataContract={x_var:{required:!0},y_var:{required:!0,numeric:!0},group:{required:!0}};render(e,r){var i=e.derived.xScale,s=e.derived.yScale,a=r.mapping.x_var,d=r.mapping.y_var,m=r.mapping.group,v=r.options&&r.options.dotRadius||5,_=e.derived.colorDiscrete||d3.scaleOrdinal(d3.schemeCategory10),x=d3.group(r.data,function(J){return J[m]}),w=e.dom.chartArea.selectAll(".tag-bump-"+r.id).data([null]).join("g").attr("class","tag-bump-"+r.id),I=d3.line().x(function(J){return i(J[a])}).y(function(J){return s(J[d])}).curve(d3.curveBumpX),O=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0,z=0;x.forEach(function(J,Q){var oe=_(Q),se=J.slice().sort(function(B,he){return String(B[a]).localeCompare(String(he[a]))}),re=w.selectAll(".bump-line-"+z).data([se]),q=re.enter().append("path").attr("class","bump-line bump-line-"+z).attr("fill","none").attr("stroke",oe).attr("stroke-width",2.5).attr("stroke-opacity",0).attr("d",I);q.merge(re).transition().duration(O).attr("stroke",oe).attr("stroke-opacity",.8).attr("d",I);var ue=w.selectAll(".bump-dot-"+z).data(se,function(B){return B._source_key||B[a]});ue.exit().transition().duration(O).style("opacity",0).remove();var K=ue.enter().append("circle").attr("class","bump-dot bump-dot-"+z).attr("cx",function(B){return i(B[a])}).attr("cy",function(B){return s(B[d])}).attr("r",v).attr("fill",oe).attr("stroke","#fff").attr("stroke-width",1.5).style("opacity",0);K.merge(ue).transition().duration(O).style("opacity",1).attr("cx",function(B){return i(B[a])}).attr("cy",function(B){return s(B[d])}).attr("r",v).attr("fill",oe),z++})}getHoverSelector(e,r){return".tag-bump-"+r.id+" .bump-dot"}formatTooltip(e,r,i){return{title:{text:String(r[i.mapping.group])},items:[{color:i.color,label:String(r[i.mapping.x_var]),value:String(r[i.mapping.y_var])}]}}remove(e,r){e.dom.chartArea.selectAll(".tag-bump-"+r.id).remove()}};var Bd=class{static type="radar";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints=null;static dataContract={axis:{required:!0},value:{required:!0,numeric:!0}};render(e,r){var i=e.margin||(e.config&&e.config.layout?e.config.layout.margin:{top:0,right:0,bottom:0,left:0}),s=(e.width||e.runtime&&e.runtime.width||0)-i.left-i.right,a=(e.height||e.runtime&&e.runtime.height||0)-i.top-i.bottom,d=r.mapping.axis,m=r.mapping.value,v=r.mapping.group,_=r.options&&r.options.labelOffset||16,x=s/2,w=a/2,I=Math.max(0,Math.min(s,a)/2-_-8),O=[],z=new Set,J=d3.max(r.data,function(cr){return+cr[m]})||0,Q=d3.scaleLinear().domain([0,J>0?J:1]).range([0,I]),oe=[],se=v?d3.group(r.data,function(cr){return cr[v]}):new Map([[r.label||"Series",r.data]]),re=e.derived.colorDiscrete||d3.scaleOrdinal(d3.schemeCategory10),q,ue,K,B,he;if(r.data.forEach(function(cr){var bn=cr[d];z.has(bn)||(z.add(bn),O.push(bn))}),q=O.length,q===0)return;ue=e.dom.chartArea.selectAll(".tag-radar-"+r.id).data([null]).join("g").attr("class","tag-radar-"+r.id),K=ue.selectAll(".radar-axis-layer").data([null]).join("g").attr("class","radar-axis-layer"),B=ue.selectAll(".radar-polygon-layer").data([null]).join("g").attr("class","radar-polygon-layer");var He=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0;function er(cr){var bn=2*Math.PI*cr/q,mn=Math.sin(bn),qn=Math.cos(bn),Wt="middle";return mn>.25?Wt="start":mn<-.25&&(Wt="end"),{lineX:x+I*mn,lineY:w-I*qn,labelX:x+(I+_)*mn,labelY:w-(I+_)*qn,textAnchor:Wt}}var Er=K.selectAll(".radar-axis").data(O,function(cr){return cr});Er.exit().transition().duration(He).style("opacity",0).remove();var zt=Er.enter().append("g").attr("class","radar-axis").style("opacity",0);zt.append("line").attr("class","radar-axis-line").attr("stroke","var(--chart-grid, #cbd5e1)").attr("stroke-width",1).attr("x1",x).attr("y1",w).attr("x2",x).attr("y2",w),zt.append("text").attr("class","radar-axis-label").attr("fill","var(--chart-fg, #1f2937)").attr("x",x).attr("y",w).attr("dy","0.35em").attr("text-anchor","middle");var _n=zt.merge(Er);_n.transition().duration(He).style("opacity",1),_n.each(function(cr,bn){var mn=er(bn),qn=d3.select(this);qn.select(".radar-axis-line").attr("stroke","var(--chart-grid, #cbd5e1)").attr("stroke-width",1).transition().duration(He).attr("x1",x).attr("y1",w).attr("x2",mn.lineX).attr("y2",mn.lineY),qn.select(".radar-axis-label").text(cr).transition().duration(He).attr("x",mn.labelX).attr("y",mn.labelY).attr("text-anchor",mn.textAnchor)}),se.forEach(function(cr,bn){var mn=new Map,qn=[];cr.forEach(function(Wt){mn.set(Wt[d],Wt)}),O.forEach(function(Wt,Pr){var gi=2*Math.PI*Pr/q,Ii=mn.get(Wt),yi=Ii?+Ii[m]:0,as=Q(Number.isFinite(yi)?yi:0);qn.push({axis:Wt,angle:gi,value:Number.isFinite(yi)?yi:0,x:x+as*Math.sin(gi),y:w-as*Math.cos(gi),datum:Ii||null})}),oe.push({key:bn,color:re(bn),points:qn,rows:cr})}),e.derived.colorDiscrete=re.domain(oe.map(function(cr){return cr.key})),e.colorDiscrete=e.derived.colorDiscrete,he=d3.line().x(function(cr){return cr.x}).y(function(cr){return cr.y}).curve(d3.curveLinearClosed);function $r(cr){return he(cr.map(function(bn){return{x,y:w}}))}var In=B.selectAll(".radar-polygon").data(oe,function(cr){return cr.key});In.exit().transition().duration(He).style("opacity",0).remove();var On=In.enter().append("path").attr("class","radar-polygon").attr("d",function(cr){return $r(cr.points)}).attr("fill",function(cr){return cr.color}).attr("fill-opacity",0).attr("stroke",function(cr){return cr.color}).attr("stroke-width",2).attr("stroke-opacity",0);On.merge(In).transition().duration(He).attrTween("d",function(cr){var bn=this,mn=bn._radarPoints||cr.points.map(function(){return{x,y:w}}),qn=cr.points,Wt=mn.map(function(Pr,gi){var Ii=qn[gi]||Pr;return{x:d3.interpolateNumber(Pr.x,Ii.x),y:d3.interpolateNumber(Pr.y,Ii.y)}});return function(Pr){var gi=Wt.map(function(Ii){return{x:Ii.x(Pr),y:Ii.y(Pr)}});return bn._radarPoints=qn,he(gi)}}).attr("fill",function(cr){return cr.color}).attr("fill-opacity",.2).attr("stroke",function(cr){return cr.color}).attr("stroke-opacity",1)}getHoverSelector(e,r){return".tag-radar-"+r.id+" .radar-polygon"}formatTooltip(e,r){return{title:{text:String(r.key)},items:r.points.map(function(i){return{color:r.color,label:i.axis,value:String(i.value)}})}}remove(e,r){e.dom.chartArea.selectAll(".tag-radar-"+r.id).remove()}};var kd=class{static type="funnel";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints=null;static dataContract={stage:{required:!0},value:{required:!0,numeric:!0}};render(e,r){var i=e.margin||(e.config&&e.config.layout?e.config.layout.margin:{top:0,right:0,bottom:0,left:0}),s=(e.width||e.runtime&&e.runtime.width||0)-i.left-i.right,a=(e.height||e.runtime&&e.runtime.height||0)-i.top-i.bottom,d=r.mapping.stage,m=r.mapping.value,v=r.options&&r.options.stageGap||6,_=d3.max(r.data,function(ue){return+ue[m]})||0,x=d3.scaleLinear().domain([0,_>0?_:1]).range([0,s*.95]),w=e.derived.colorDiscrete||d3.scaleOrdinal(d3.schemeTableau10),I=r.data.length>0?a/r.data.length:0,O,z,J;O=r.data.map(function(ue,K){var B=r.data[K+1]||null,he=x(+ue[m]||0),He=B?x(+B[m]||0):he*.55,er=K*I,Er=Math.max(er,er+I-v),zt=s/2,_n=zt-he/2,$r=zt+he/2,In=zt-He/2,On=zt+He/2;return{stage:ue[d],value:+ue[m],color:w(ue[d]),datum:ue,points:[[_n,er],[$r,er],[On,Er],[In,Er]],labelX:zt,labelY:(er+Er)/2}}),e.derived.colorDiscrete=w.domain(O.map(function(ue){return ue.stage})),e.colorDiscrete=e.derived.colorDiscrete;var Q=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0;function oe(ue){return"M"+ue[0][0]+","+ue[0][1]+"L"+ue[1][0]+","+ue[1][1]+"L"+ue[2][0]+","+ue[2][1]+"L"+ue[3][0]+","+ue[3][1]+"Z"}function se(ue){var K=(ue.points[0][0]+ue.points[1][0])/2,B=(ue.points[0][1]+ue.points[3][1])/2;return[[K,B],[K,B],[K,B],[K,B]]}z=e.dom.chartArea.selectAll(".tag-funnel-"+r.id).data([null]).join("g").attr("class","tag-funnel-"+r.id),J=z.selectAll(".funnel-stage-group").data(O,function(ue){return ue.stage}),J.exit().transition().duration(Q).style("opacity",0).remove();var re=J.enter().append("g").attr("class","funnel-stage-group").style("opacity",0);re.append("path").attr("class","funnel-stage").attr("d",function(ue){return oe(se(ue))}).attr("fill",function(ue){return ue.color}),re.append("text").attr("class","funnel-label").attr("x",function(ue){return ue.labelX}).attr("y",function(ue){return ue.labelY}).attr("dy","0.35em").attr("text-anchor","middle").text(function(ue){return ue.stage});var q=re.merge(J);q.transition().duration(Q).style("opacity",1),q.select(".funnel-stage").transition().duration(Q).attr("d",function(ue){return oe(ue.points)}).attr("fill",function(ue){return ue.color}),q.select(".funnel-label").text(function(ue){return ue.stage}).transition().duration(Q).attr("x",function(ue){return ue.labelX}).attr("y",function(ue){return ue.labelY})}getHoverSelector(e,r){return".tag-funnel-"+r.id+" .funnel-stage"}formatTooltip(e,r){return{title:{text:String(r.stage)},items:[{color:r.color,label:String(r.stage),value:String(r.value)}]}}remove(e,r){e.dom.chartArea.selectAll(".tag-funnel-"+r.id).remove()}};var Fd=class{static type="parallel";static traits={hasAxes:!1,referenceLines:!1,legendType:"ordinal",binning:!1,rolloverStyle:"element",scaleCapabilities:{}};static scaleHints=null;static dataContract={dimensions:{required:!0}};render(e,r){var i=e.margin||(e.config&&e.config.layout?e.config.layout.margin:{top:0,right:0,bottom:0,left:0}),s=(e.width||e.runtime&&e.runtime.width||0)-i.left-i.right,a=(e.height||e.runtime&&e.runtime.height||0)-i.top-i.bottom,d=r.mapping.dimensions,m=Array.isArray(d)?d.slice():[d],v=r.mapping.group,_=d3.scalePoint().domain(m).range([0,s]).padding(.5),x={},w=e.derived.colorDiscrete||d3.scaleOrdinal(d3.schemeCategory10),I,O,z;m.forEach(function(q){var ue=d3.extent(r.data,function(K){var B=+K[q];return Number.isFinite(B)?B:null});(!ue||ue[0]===void 0||ue[1]===void 0)&&(ue=[0,1]),ue[0]===ue[1]&&(ue=[ue[0]-1,ue[1]+1]),x[q]=d3.scaleLinear().domain(ue).range([a,0])}),e.derived.colorDiscrete=w.domain(Array.from(new Set(r.data.map(function(q){return v?q[v]:r.label})))),e.colorDiscrete=e.derived.colorDiscrete,I=e.dom.chartArea.selectAll(".tag-parallel-"+r.id).data([null]).join("g").attr("class","tag-parallel-"+r.id),O=I.selectAll(".parallel-axis").data(m).join(function(q){var ue=q.append("g").attr("class","parallel-axis");return ue.append("text").attr("class","parallel-axis-label"),ue}).attr("transform",function(q){return"translate("+_(q)+",0)"}).each(function(q){d3.select(this).call(d3.axisLeft(x[q]).ticks(5))}),O.select(".parallel-axis-label").attr("x",0).attr("y",-10).attr("text-anchor","middle").text(function(q){return q}),z=d3.line().defined(function(q){return q&&q[1]!==null}).x(function(q){return q[0]}).y(function(q){return q[1]});var J=e.options&&e.options.transition&&typeof e.options.transition.speed=="number"?e.options.transition.speed:0;function Q(q){var ue=m.map(function(K){var B=+q[K];return Number.isFinite(B)?[_(K),x[K](B)]:[_(K),null]});return z(ue)}function oe(q){var ue=v?q[v]:r.label;return w(ue)}var se=I.selectAll(".parallel-line").data(r.data,function(q,ue){return q._source_key!=null?q._source_key:ue});se.exit().transition().duration(J).attr("stroke-opacity",0).remove();var re=se.enter().append("path").attr("class","parallel-line").attr("fill","none").attr("d",Q).attr("stroke",oe).attr("stroke-opacity",0);re.merge(se).transition().duration(J).attr("d",Q).attr("stroke",oe).attr("stroke-opacity",.6)}getHoverSelector(e,r){return".tag-parallel-"+r.id+" .parallel-line"}formatTooltip(e,r,i){var s=Array.isArray(i.mapping.dimensions)?i.mapping.dimensions:[i.mapping.dimensions],a=i.mapping.group?String(r[i.mapping.group]):String(i.label||"Series");return{title:{text:a},items:s.map(function(d){return{color:e.colorDiscrete?e.colorDiscrete(i.mapping.group?r[i.mapping.group]:i.label):i.color,label:d,value:String(r[d])}})}}remove(e,r){e.dom.chartArea.selectAll(".tag-parallel-"+r.id).remove()}};var ss=new Map;function Ls(t,e){if(ss.has(t))throw new Error("Renderer already registered for type: "+t);var r=e&&e.constructor?e.constructor.traits:null,i=["hasAxes","referenceLines","legendType","binning","rolloverStyle"];if(!r)throw new Error("Renderer missing static traits: "+t);i.forEach(function(s){if(!(s in r))throw new Error("Renderer trait missing '"+s+"': "+t)}),ss.set(t,e)}function B6(t){if(!ss.has(t))throw new Error("Unknown renderer type: "+t);return ss.get(t)}function pl(t){return B6(t.type)}function Dy(){return ss.has(sd.type)||Ls(sd.type,new sd),ss.has(ad.type)||Ls(ad.type,new ad),ss.has(od.type)||Ls(od.type,new od),ss.has(ld.type)||Ls(ld.type,new ld),ss.has(cd.type)||Ls(cd.type,new cd),ss.has(ud.type)||Ls(ud.type,new ud),ss.has(fd.type)||Ls(fd.type,new fd),ss.has(yd.type)||Ls(yd.type,new yd),ss.has(bd.type)||Ls(bd.type,new bd),ss.has(vd.type)||Ls(vd.type,new vd),ss.has(_d.type)||Ls(_d.type,new _d),ss.has(xd.type)||Ls(xd.type,new xd),ss.has(Sd.type)||Ls(Sd.type,new Sd),ss.has(Ed.type)||Ls(Ed.type,new Ed),ss.has(wd.type)||Ls(wd.type,new wd),ss.has(Ad.type)||Ls(Ad.type,new Ad),ss.has(Od.type)||Ls(Od.type,new Od),ss.has(Cd.type)||Ls(Cd.type,new Cd),ss.has(Ld.type)||Ls(Ld.type,new Ld),ss.has(Nd.type)||Ls(Nd.type,new Nd),ss.has(Dd.type)||Ls(Dd.type,new Dd),ss.has(Rd.type)||Ls(Rd.type,new Rd),ss.has(Bd.type)||Ls(Bd.type,new Bd),ss.has(kd.type)||Ls(kd.type,new kd),ss.has(Fd.type)||Ls(Fd.type,new Fd),ss.has(Td.type)||Ls(Td.type,new Td),ss.has(Id.type)||Ls(Id.type,new Id),ss}function Ry(){return Array.from(ss.values())}function By(t,e){var r=qs(t,e.label,e.color),i=d3.drag().on("start",function(){d3.select(this).raise().classed("active",!0).style("cursor","grabbing")}).on("drag",function(s,a){a[e.mapping.x_var]=t.xScale.invert(s.x),a[e.mapping.y_var]=t.yScale.invert(s.y),d3.select(this).attr("cx",t.xScale(a[e.mapping.x_var])).attr("cy",t.yScale(a[e.mapping.y_var]))}).on("end",function(s,a){d3.select(this).classed("active",!1).style("cursor","grab"),t.updateRegression(r,e.label),t.emit("dragEnd",{point:a,layerLabel:e.label})});t.chart.selectAll("."+_r("point",t.element.id,e.label)).style("cursor","grab").call(i)}function Y0(t,e,r){Md(t);var i=d3.select(t.dom.element),s=i.append("div").attr("class","myIO-status-bar").attr("role","status").attr("aria-live","polite");s.append("span").attr("class","myIO-status-bar-text").text(e);var a=s.append("span").attr("class","myIO-status-bar-actions");(r||[]).forEach(function(d){a.append("button").attr("class","myIO-status-bar-btn").attr("type","button").text(d.label).on("click",d.handler)})}function Md(t){d3.select(t.dom.element).selectAll(".myIO-status-bar").remove()}var ky=["point","bar","histogram","hexbin","groupedBar"];function Fy(t){var e=t.config.interactions.brush;if(!(!e||!e.enabled)){var r=(t.derived.currentLayers||[]).filter(function(m){return ky.indexOf(m.type)>-1});if(r.length!==0){J0(t);var i=e.direction==="x"?d3.brushX():e.direction==="y"?d3.brushY():d3.brush(),s=t.config.layout.margin,a=t.runtime.width-(s.left+s.right),d=t.runtime.height-(s.top+s.bottom);i.extent([[0,0],[a,d]]),i.on("brush",function(m){ix(t,m,r,e)}).on("end",function(m){sx(t,m,r,e)}),t.dom.chartArea.insert("g",":first-child").attr("class","myIO-brush").call(i),t.dom.chartArea.select(".myIO-brush .overlay").style("cursor","crosshair"),t.runtime._brushFn=i,d3.select(t.dom.element).on("keydown.brush",function(m){m.key==="Escape"&&t.runtime._brushed&&k6(t)})}}}function ix(t,e,r,i){if(e.selection){var s=e.selection,a=i.direction;r.forEach(function(d){var m=$y(t,d);t.dom.chartArea.selectAll(m).each(function(v){var _=My(t,v,d,s,a);d3.select(this).style("opacity",_?1:"var(--chart-brush-dim-opacity)")})})}}function sx(t,e,r,i){if(!e.selection){k6(t);return}var s=e.selection,a=i.direction,d=ax(t,s,a),m=[],v=[];r.forEach(function(x){x.data.forEach(function(w){My(t,w,x,s,a)&&(m.push(w),w._source_key&&v.push(w._source_key))})}),t.runtime._brushed={data:m,extent:d,keys:v};var _=r.reduce(function(x,w){return x+w.data.length},0);Y0(t,m.length+" of "+_+" points selected",[{label:"Clear",handler:function(){k6(t)}}]),t.emit("brushed",{data:m,extent:d,keys:v,layerLabel:r.length===1?r[0].label:null})}function k6(t){(t.derived.currentLayers||[]).forEach(function(e){if(ky.indexOf(e.type)>-1){var r=$y(t,e);t.dom.chartArea.selectAll(r).style("opacity",1)}}),t.runtime._brushFn&&t.dom.chartArea.select(".myIO-brush").call(t.runtime._brushFn.move,null),t.runtime._brushed=null,Md(t),t.emit("brushed",{data:[],extent:null,keys:[],layerLabel:null})}function My(t,e,r,i,s){var a=r.mapping.x_var,d=r.mapping.y_var,m=t.xScale(e[a]),v=t.yScale(e[d]);return isNaN(m)||isNaN(v)?!1:s==="x"?m>=i[0]&&m<=i[1]:s==="y"?v>=i[0]&&v<=i[1]:m>=i[0][0]&&m<=i[1][0]&&v>=i[0][1]&&v<=i[1][1]}function X0(t,e,r){return typeof t.invert=="function"?[t.invert(e),t.invert(r)]:null}function ax(t,e,r){return r==="x"?{x:X0(t.xScale,e[0],e[1]),y:null}:r==="y"?{x:null,y:X0(t.yScale,e[1],e[0])}:{x:X0(t.xScale,e[0][0],e[1][0]),y:X0(t.yScale,e[1][1],e[0][1])}}function $y(t,e){return e.type==="groupedBar"?".tag-grouped-bar-g rect":"."+_r(e.type,t.dom.element.id,e.label)}function J0(t){t.dom&&t.dom.chartArea&&t.dom.chartArea.selectAll(".myIO-brush").remove(),t.dom&&t.dom.element&&d3.select(t.dom.element).on("keydown.brush",null),t.runtime._brushed=null}var F6=30;function Py(t,e,r){Nf(t);var i=d3.select(t.dom.element),s=i.append("div").attr("class","myIO-popover").attr("role","dialog").attr("aria-label","Annotate data point"),a=s.append("div").attr("class","myIO-popover-field");a.append("label").text("Label:");var d;r.presetLabels&&r.presetLabels.length>0?(d=a.append("select").attr("class","myIO-popover-input"),r.presetLabels.forEach(function(w){d.append("option").attr("value",w).text(w)}),r.existingLabel&&d.property("value",r.existingLabel)):(d=a.append("input").attr("class","myIO-popover-input").attr("type","text").attr("maxlength",F6).attr("placeholder","Enter label..."),r.existingLabel&&d.property("value",r.existingLabel));var m=null;if(r.categoryColors){var v=s.append("div").attr("class","myIO-popover-field");v.append("label").text("Category:");var _=v.append("div").attr("class","myIO-popover-colors");Object.keys(r.categoryColors).forEach(function(w){var I=r.categoryColors[w];_.append("button").attr("class","myIO-popover-color-btn").attr("type","button").attr("title",w).attr("aria-label",w).style("background-color",I).on("click",function(){_.selectAll(".myIO-popover-color-btn").classed("selected",!1),d3.select(this).classed("selected",!0),m=I})})}var x=s.append("div").attr("class","myIO-popover-buttons");r.existingLabel&&r.onRemove&&x.append("button").attr("class","myIO-popover-btn myIO-popover-btn--danger").attr("type","button").text("Remove").on("click",function(){Nf(t),r.onRemove()}),x.append("button").attr("class","myIO-popover-btn").attr("type","button").text("Cancel").on("click",function(){Nf(t),r.onCancel&&r.onCancel()}),x.append("button").attr("class","myIO-popover-btn myIO-popover-btn--primary").attr("type","button").text("Apply").on("click",function(){var w=d.property("value").trim().substring(0,F6);w&&(Nf(t),r.onApply(w,m))}),ox(t,s,e),d.node().focus(),s.on("keydown",function(w){if(w.key==="Enter"){var I=d.property("value").trim().substring(0,F6);I&&(Nf(t),r.onApply(I,m))}w.key==="Escape"&&(Nf(t),r.onCancel&&r.onCancel())})}function ox(t,e,r){var i=t.config.layout.margin,s=r.px+i.left,a=r.py+i.top-10;e.style("left",Math.max(4,Math.min(s-80,t.runtime.totalWidth-180))+"px").style("bottom",t.runtime.height-a+8+"px")}function Nf(t){d3.select(t.dom.element).selectAll(".myIO-popover").remove()}var lx=["point","bar","histogram","hexbin","groupedBar"];function Uy(t){var e=t.config.interactions.annotation;if(!(!e||!e.enabled)){t.runtime._annotations||(t.runtime._annotations=[]);var r=(t.derived.currentLayers||[]).filter(function(i){return lx.indexOf(i.type)>-1});r.forEach(function(i){var s="."+_r(i.type,t.dom.element.id,i.label);t.dom.chartArea.selectAll(s).on("click.annotate",function(a,d){a.stopPropagation();var m=dx(t,d._source_key);Py(t,{px:t.xScale(d[i.mapping.x_var]),py:t.yScale(d[i.mapping.y_var])},{presetLabels:e.presetLabels,categoryColors:e.categoryColors,existingLabel:m?m.label:null,onApply:function(v,_){cx(t,d,i,v,_)},onRemove:function(){ux(t,d._source_key)},onCancel:function(){}})})}),K0(t),M6(t)}}function cx(t,e,r,i,s){t.runtime._annotations=t.runtime._annotations.filter(function(d){return d._source_key!==e._source_key});var a={_source_key:e._source_key,x:e[r.mapping.x_var],y:e[r.mapping.y_var],x_var:r.mapping.x_var,y_var:r.mapping.y_var,label:i,category:s||null,layerLabel:r.label,timestamp:new Date().toISOString()};t.runtime._annotations.push(a),K0(t),M6(t),t.emit("annotated",{annotations:t.runtime._annotations,action:"add",latest:a})}function ux(t,e){var r=t.runtime._annotations.find(function(i){return i._source_key===e});t.runtime._annotations=t.runtime._annotations.filter(function(i){return i._source_key!==e}),K0(t),M6(t),t.emit("annotated",{annotations:t.runtime._annotations,action:"remove",latest:r||null})}function fx(t){t.runtime._annotations=[],K0(t),Md(t),t.emit("annotated",{annotations:[],action:"clear",latest:null})}function K0(t){var e=t.dom.chartArea.selectAll(".myIO-annotations").data([0]);e=e.enter().append("g").attr("class","myIO-annotations").merge(e);var r=e.selectAll(".myIO-annotation-mark").data(t.runtime._annotations||[],function(a){return a._source_key});r.exit().remove();var i=r.enter().append("g").attr("class","myIO-annotation-mark");i.append("circle").attr("r",8).attr("fill","none").attr("stroke-width",2),i.append("text").attr("dy",-12).attr("text-anchor","middle").attr("class","myIO-annotation-label");var s=i.merge(r);s.attr("transform",function(a){return"translate("+t.xScale(a.x)+","+t.yScale(a.y)+")"}),s.select("circle").style("stroke",function(a){return a.category||"var(--chart-annotation-ring)"}),s.select("text").text(function(a){return a.label.length>30?a.label.substring(0,27)+"\u2026":a.label}).style("font-size","var(--chart-annotation-font-size)").style("fill","var(--chart-text-color)")}function M6(t){var e=(t.runtime._annotations||[]).length;if(e===0){Md(t);return}Y0(t,e+" annotation"+(e===1?"":"s"),[{label:"Export",handler:function(){var r=t.runtime._annotations||[];r.length>0&&P0(t.dom.element.id+"_annotations.csv",r)}},{label:"Clear",handler:function(){fx(t)}}])}function dx(t,e){return(t.runtime._annotations||[]).find(function(r){return r._source_key===e})}function Vy(t){Nf(t)}var qh=new Map;function $6(t){return t&&t.config&&t.config.interactions&&t.config.interactions.linked}function P6(t){var e=$6(t);return e&&e.cursor===!0&&e.group?e.group:null}function jy(t){var e=P6(t);if(e){var r=qh.get(e);r||(r=new Set,qh.set(e,r)),r.add(t),t.runtime=t.runtime||{},t.runtime._linkedCursor||(t.runtime._linkedCursor={lastTs:0})}}function qy(t){qh.forEach(function(e,r){e.delete(t)&&e.size===0&&qh.delete(r)})}function Hy(t,e){var r=P6(t);if(r){var i=qh.get(r);i&&i.forEach(function(s){s!==t&&px(s,e)})}}function hx(t){var e=P6(t);e&&Hy(t,{sourceId:t.element&&t.element.id,group:e,ts:typeof performance<"u"?performance.now():Date.now(),clear:!0})}function Q0(t,e,r,i){var s=$6(t);if(!(!s||s.cursor!==!0)){var a=s.keyColumn,d=e&&a&&e[a]!==void 0?e[a]:null;Hy(t,{sourceId:t.element&&t.element.id,group:s.group,keyValue:d,xValue:r,tooltip:i||null,ts:typeof performance<"u"?performance.now():Date.now()})}}function Z0(t){var e=$6(t);!e||e.cursor!==!0||hx(t)}function px(t,e){var r=t.runtime&&t.runtime._linkedCursor;if(r&&!(typeof e.ts=="number"&&e.ts+a)return null;var v=r(d);return Number.isFinite(v)?v:null}var _=typeof r.domain=="function"?r.domain():[];if(_.indexOf(e)===-1)return null;var x=r(e);return Number.isFinite(x)?x:null}function gx(t,e){var r=t.plot||t.svg;if(!(!r||typeof r.select!="function")){var i=r.select("line.myIO-hover-rule");i.empty()&&(i=r.append("line").attr("class","myIO-hover-rule"));var s=t.margin||{},a=(t.height||0)-((+s.top||0)+(+s.bottom||0));i.attr("x1",e).attr("x2",e).attr("y1",0).attr("y2",a).style("display",null)}}function Gy(t){var e=t.plot||t.svg;!e||typeof e.select!="function"||e.select("line.myIO-hover-rule").remove()}var zy=["point","bar","histogram","hexbin","groupedBar","waffle","beeswarm","lollipop","dumbbell"];function Wy(t){var e=t.config.interactions.linked;if(!(!e||!e.enabled)&&!(typeof crosstalk>"u")){U6(t);var r=new crosstalk.SelectionHandle(e.group),i=e.filter?new crosstalk.FilterHandle(e.group):null;t.runtime._crosstalkSel=r,t.runtime._crosstalkFil=i,(e.mode==="source"||e.mode==="both")&&(t.runtime._linkedBrushHandler=function(s){s.keys&&s.keys.length>0?r.set(s.keys):r.clear()},t.on("brushed",t.runtime._linkedBrushHandler)),(e.mode==="target"||e.mode==="both")&&(r.on("change.myIO",function(s){yx(t,s.value)}),i&&i.on("change.myIO",function(s){bx(t,s.value)}))}}function yx(t,e){var r=(t.derived.currentLayers||[]).filter(function(i){return zy.indexOf(i.type)>-1});r.forEach(function(i){var s="."+_r(i.type,t.dom.element.id,i.label);t.dom.chartArea.selectAll(s).each(function(a){if(!e)d3.select(this).style("opacity",1);else{var d=e.indexOf(a._source_key)>-1;d3.select(this).style("opacity",d?1:"var(--chart-brush-dim-opacity)")}})})}function bx(t,e){var r=(t.derived.currentLayers||[]).filter(function(i){return zy.indexOf(i.type)>-1});r.forEach(function(i){var s="."+_r(i.type,t.dom.element.id,i.label);t.dom.chartArea.selectAll(s).each(function(a){if(!e)d3.select(this).style("display",null);else{var d=e.indexOf(a._source_key)>-1;d3.select(this).style("display",d?null:"none")}})})}function U6(t){t.runtime._linkedBrushHandler&&(t.off("brushed",t.runtime._linkedBrushHandler),t.runtime._linkedBrushHandler=null),t.runtime._crosstalkSel&&(t.runtime._crosstalkSel.close(),t.runtime._crosstalkSel=null),t.runtime._crosstalkFil&&(t.runtime._crosstalkFil.close(),t.runtime._crosstalkFil=null),qy(t)}function Xy(t){var e=t.config.interactions.sliders;if(!(!e||e.length===0)){V6(t),t.runtime._sliderTimers=[];var r=d3.select(t.dom.element),i=r.append("div").attr("class","myIO-slider-wrapper");e.forEach(function(s){var a=i.append("div").attr("class","myIO-slider-row");a.append("label").attr("class","myIO-slider-label").attr("for",t.dom.element.id+"-slider-"+s.param).text(s.label);var d=a.append("input").attr("type","range").attr("class","myIO-slider-input").attr("id",t.dom.element.id+"-slider-"+s.param).attr("min",s.min).attr("max",s.max).attr("step",s.step||"any").attr("aria-label",s.label).attr("aria-valuemin",s.min).attr("aria-valuemax",s.max).attr("aria-valuenow",s.value).property("value",s.value),m=a.append("span").attr("class","myIO-slider-value").text(Yy(s.value,s.step));if(!HTMLWidgets.shinyMode){d.attr("disabled",!0).attr("title","Parameter sliders require Shiny"),a.style("opacity","0.5");return}var v=t.runtime._sliderTimers.length;t.runtime._sliderTimers.push(null);var _=s.debounce||200;d.on("input",function(){var x=+this.value;m.text(Yy(x,s.step)),d3.select(this).attr("aria-valuenow",x),clearTimeout(t.runtime._sliderTimers[v]),t.runtime._sliderTimers[v]=setTimeout(function(){Shiny.onInputChange("myIO-"+t.dom.element.id+"-slider-"+s.param,x),t.emit("sliderChanged",{param:s.param,value:x})},_)})})}}function Yy(t,e){if(e&&e<1){var r=String(e).split(".")[1];return t.toFixed(r?r.length:2)}return String(t)}function V6(t){t.runtime._sliderTimers&&(t.runtime._sliderTimers.forEach(clearTimeout),t.runtime._sliderTimers=null),d3.select(t.dom.element).selectAll(".myIO-slider-wrapper").remove()}function vx(t){let e=document.createElement("div");return e.textContent=String(t),e.innerHTML}function Ky(t){t.dom.tooltip=d3.select(t.dom.element).append("div").attr("class","toolTip").attr("role","status").attr("aria-live","polite").attr("aria-hidden","true"),t.dom.tooltipTitle=t.dom.tooltip.append("div").attr("class","toolTipTitle"),t.dom.tooltipBody=t.dom.tooltip.append("div").attr("class","toolTipBody"),t.runtime.tooltipHideTimer=null,t.captureLegacyAliases()}function $d(t){d3.select(t.dom.element).select(".toolTipBox").remove(),d3.select(t.dom.element).select(".toolLine").remove(),d3.select(t.dom.element).select(".toolPointLayer").remove(),t.runtime.toolTipBox=null,t.runtime.toolLine=null,t.runtime.toolPointLayer=null,t.syncLegacyAliases()}function Qy(t,e,r){$d(t),t.runtime.toolLine=t.dom.chartArea.append("line").attr("class","toolLine"),t.runtime.toolPointLayer=t.dom.chartArea.append("g").attr("class","toolPointLayer"),t.runtime.toolTipBox=t.dom.svg.append("rect").attr("class","toolTipBox").attr("opacity",0).attr("width",t.width-(t.margin.left+t.margin.right)).attr("height",t.height-(t.margin.top+t.margin.bottom)).attr("transform","translate("+t.margin.left+","+t.margin.top+")").on("mouseover",function(i){e(i)}).on("mousemove",function(i){e(i)}).on("mouseout",function(){typeof r=="function"&&r()}).on("touchstart",function(i){i.preventDefault(),e(i)}).on("touchmove",function(i){i.preventDefault(),e(i)}).on("touchend",function(){typeof r=="function"&&r()}),t.syncLegacyAliases()}function Df(t,e){if(!t.dom.tooltip)return;clearTimeout(t.runtime.tooltipHideTimer);let r=e.pointer||[0,0],i=e.title||{},s=e.items||[],a=s.length===1&&s[0].color?s[0].color:null;t.dom.tooltipTitle.style("border-left-color",a||null).html(""+vx(Jy(i))+"");let d=t.dom.tooltipBody.selectAll(".toolTipItem").data(s);d.exit().remove();let m=d.enter().append("div").attr("class","toolTipItem");m.append("span").attr("class","dot"),m.append("span").attr("class","toolTipLabel"),m.append("span").attr("class","toolTipValue"),m.merge(d).select(".dot").style("background-color",function(v){return v.color||"transparent"}),m.merge(d).select(".toolTipLabel").text(function(v){return v.label||""}),m.merge(d).select(".toolTipValue").text(function(v){return Jy(v)}),t.dom.tooltip.style("display","inline-block").style("opacity",1).attr("aria-hidden","false"),_x(t,r)}function Pu(t){t.dom.tooltip&&(clearTimeout(t.runtime.tooltipHideTimer),t.runtime.tooltipHideTimer=window.setTimeout(function(){t.dom.tooltip.style("display","none").style("opacity",0).attr("aria-hidden","true")},300))}function Jy(t){if(t==null)return"";if(typeof t=="string")return t;let e=typeof t.format=="function"?t.format:function(i){return i},r=t.text!=null?t.text:t.value;return r==null?"":e(r)}function _x(t,e){let r=t.dom.element.getBoundingClientRect(),i=t.dom.tooltip.node();t.dom.tooltip.style("left",e[0]+12+"px").style("top",e[1]+12+"px");let s=i.getBoundingClientRect(),a=e[0]+12,d=e[1]+12;a+s.width>r.width&&(a=Math.max(8,e[0]-s.width-12)),d+s.height>r.height&&(d=Math.max(8,e[1]-s.height-12)),t.dom.tooltip.style("left",a+"px").style("top",d+"px")}var Pd=300;function Zy(t,e){var r=e||t.currentLayers||[],i=t,s=["text","yearMon"],a=s.indexOf(t.options.xAxisFormat)>-1?function(K){return K}:d3.format(t.options.xAxisFormat||""),d=d3.format(t.options.yAxisFormat||""),m=t.newScaleY?d3.format(t.newScaleY):d;$d(t),r.forEach(function(K){["bar","point","hexbin","histogram","calendarHeatmap"].indexOf(K.type)>-1&&v(K)}),r.some(function(K){return K.type==="groupedBar"})&&t.chart.selectAll(".tag-grouped-bar-g rect").on("mouseout",J).on("mouseover",z).on("mousemove",z).on("touchstart",function(K){K.preventDefault(),z.call(this,K)}).on("touchmove",function(K){K.preventDefault(),z.call(this,K)}).on("touchend",J),r.length>0&&r.every(function(K){return["line","area"].indexOf(K.type)>-1})&&Qy(t,Q,oe),r.some(function(K){return K.type==="donut"})&&se(".donut","donut",function(K,B){return{title:{text:B.mapping.x_var+": "+K.data[B.mapping.x_var]},items:[{color:t.colorDiscrete(K.index),label:B.mapping.y_var,value:K.data[B.mapping.y_var]}]}}),r.some(function(K){return K.type==="treemap"})&&t.chart.selectAll(".root").on("mouseout",q).on("mouseover",re).on("mousemove",re).on("touchstart",function(K){K.preventDefault(),re.call(this,K)}).on("touchmove",function(K){K.preventDefault(),re.call(this,K)}).on("touchend",q);function v(K){var B=pl(K),he=B.getHoverSelector?B.getHoverSelector(t,K):"."+_r(K.type,t.element.id,K.label);t.chart.selectAll(he).on("mouseout",function(){x.call(this,K)}).on("mouseover",function(He){_.call(this,He,K)}).on("mousemove",function(He){_.call(this,He,K)}).on("touchstart",function(He){He.preventDefault(),_.call(this,He,K)}).on("touchmove",function(He){He.preventDefault(),_.call(this,He,K)}).on("touchend",function(){x.call(this,K)})}function _(K,B){var he=d3.select(this).data()[0],He=pl(B),er=w(B,He,he,this);HTMLWidgets.shinyMode&&Shiny.onInputChange("myIO-"+i.element.id+"-rollover",JSON.stringify(he)),I(this,B,he),Df(i,{pointer:ue(K),title:er.title,items:er.items});var Er=B.type==="hexbin"?i.xScale?i.xScale.invert(he.x):null:B.type==="histogram"?he.x0:B.type==="calendarHeatmap"?he.date instanceof Date?he.date:new Date(he[B.mapping.date]+"T00:00:00Z"):he[B.mapping.x_var];Q0(i,he,Er,er)}function x(K){O(this,K),Pu(i),Z0(i)}function w(K,B,he,He){if(K.type==="hexbin"){var er=d3.format(",.2f");return{title:{text:"x: "+er(i.xScale.invert(he.x))+", y: "+er(i.yScale.invert(he.y))},items:[{color:d3.select(He).attr("fill"),label:"Count",value:he.length}]}}if(K.type==="histogram")return{title:{text:"Bin: "+he.x0+" to "+he.x1},items:[{color:d3.select(He).attr("fill"),label:"Count",value:he.length}]};if(K.type==="calendarHeatmap"){var Er=B.formatTooltip(i,he,K);return{title:{text:typeof Er.title=="string"?Er.title:Er.title.text},items:[{color:Er.color||d3.select(He).attr("fill"),label:Er.label||K.label,value:Er.value}]}}var zt=K.mapping.x_var+": "+a(he[K.mapping.x_var]),_n=i.newY?i.newY:K.mapping.y_var,$r=K.type==="point"||K.type==="bar"?K.mapping.y_var:K.label,In=qs(i,K.label,K.color);if(B&&typeof B.formatTooltip=="function"){var On=B.formatTooltip(i,he,K);zt=On.title||zt,$r=On.label||$r,In=On.color||In}return{title:{text:zt},items:[{color:In,label:$r,value:m(he[_n])}]}}function I(K,B){var he=d3.select(K),He=B.type==="hexbin"?"#333":he.attr("fill")||he.style("fill")||qs(i,B.label,B.color);if(B.type==="hexbin"){he.style("stroke",He).style("stroke-width","2px");return}he.interrupt().style("stroke",He).style("stroke-width","2px").style("stroke-opacity",.8),B.type==="point"&&he.attr("r",Math.max(+he.attr("r")||0,6))}function O(K,B){var he=d3.select(K);he.interrupt().transition().duration(Pd).style("stroke-width","0px").style("stroke","transparent").style("stroke-opacity",null),B.type==="point"&&he.transition().duration(Pd).attr("r",If(i))}function z(K){var B=d3.select(this).data()[0],he=r[B.idx],He=qs(i,he.label,he.color);HTMLWidgets.shinyMode&&Shiny.onInputChange("myIO-"+i.element.id+"-rollover",JSON.stringify(B.data.values)),d3.select(this).interrupt().style("stroke",He).style("stroke-width","2px").style("stroke-opacity",.8);var er={title:{text:he.mapping.x_var+": "+a(B.data[0])},items:[{color:He,label:he.mapping.y_var,value:m(B[1]-B[0])}]};Df(i,{pointer:ue(K),title:er.title,items:er.items}),Q0(i,B.data,B.data[0],er)}function J(){d3.select(this).interrupt().transition().duration(Pd).style("stroke-width","0px").style("stroke","transparent").style("stroke-opacity",null),Pu(i),Z0(i)}function Q(K){var B=d3.pointer(K,this),he=i.xScale.invert(B[0]),He=[],er=d3.bisector(function($r){return+$r[0]}).left;if(r.forEach(function($r){var In=$r.data,On=$r.mapping.x_var,cr=i.newY?i.newY:$r.mapping.y_var||$r.mapping.high_y,bn=In.map(function(gi){return gi[On]}),mn=er(bn,he),qn=In[mn-1],Wt=In[mn],Pr=qn?Wt&&he-qn[On]>Wt[On]-he?Wt:qn:Wt;Pr&&He.push({color:$r.color,label:$r.label,xVar:On,yVar:cr,displayValue:Pr.density!=null?Pr.density:Pr[cr],value:Pr})}),He.length===0){oe();return}HTMLWidgets.shinyMode&&Shiny.onInputChange("myIO-"+i.element.id+"-rollover",JSON.stringify(He.map(function($r){return $r.value})));var Er=He[0].value[He[0].xVar];i.toolLine.style("stroke","var(--chart-ref-line-color)").style("stroke-width","1px").style("stroke-dasharray","4,4").attr("x1",i.xScale(Er)).attr("x2",i.xScale(Er)).attr("y1",0).attr("y2",i.height-(i.margin.top+i.margin.bottom));var zt=i.toolPointLayer.selectAll("circle").data(He);zt.exit().remove(),zt.enter().append("circle").attr("r",4).merge(zt).attr("cx",function($r){return i.xScale($r.value[$r.xVar])}).attr("cy",function($r){return i.yScale($r.value[$r.yVar])}).attr("fill","#ffffff").attr("stroke",function($r){return $r.color}).attr("stroke-width",2);var _n={title:{text:He[0].xVar+": "+a(Er)},items:He.map(function($r){return{color:$r.color,label:$r.label,value:m($r.displayValue)}})};Df(i,{pointer:ue(K),title:_n.title,items:_n.items}),Q0(i,He[0].value,Er,_n)}function oe(){i.toolLine&&i.toolLine.style("stroke","none"),i.toolPointLayer&&i.toolPointLayer.selectAll("*").remove(),Pu(i),Z0(i)}function se(K,B,he){var He=r.filter(function(er){return er.type===B})[0];t.chart.selectAll(K).on("mouseout",function(){t.chart.selectAll(K).transition().duration(Pd).style("opacity",1),Pu(i)}).on("mouseover",function(er,Er){t.chart.selectAll(K).style("opacity",.4),d3.select(this).style("opacity",.85);var zt=he(Er,He);Df(i,{pointer:ue(er),title:zt.title,items:zt.items})}).on("mousemove",function(er,Er){var zt=he(Er,He);Df(i,{pointer:ue(er),title:zt.title,items:zt.items})}).on("touchstart",function(er,Er){er.preventDefault(),t.chart.selectAll(K).style("opacity",.4),d3.select(this).style("opacity",.85);var zt=he(Er,He);Df(i,{pointer:ue(er),title:zt.title,items:zt.items})}).on("touchend",function(){t.chart.selectAll(K).transition().duration(Pd).style("opacity",1),Pu(i)})}function re(K,B){for(var he=r.filter(function(er){return er.type==="treemap"})[0],He=B;He.depth>1;)He=He.parent;t.chart.selectAll(".root").style("opacity",.4),d3.select(this).style("opacity",.85),Df(i,{pointer:ue(K),title:{text:he.mapping.level_1+": "+B.data[he.mapping.level_1]},items:[{color:t.colorDiscrete(He.data.id),label:B.data[he.mapping.level_2],value:B.value}]})}function q(){t.chart.selectAll(".root").transition().duration(Pd).style("opacity",1),Pu(i)}function ue(K){return d3.pointer(K,i.dom.element)}}var xx=.05,Sx=.15;function t7(t,e){var r=t.margin,i=s1(t),s=[];e.forEach(function(v){var _=d3.extent(v.data,function(x){return+x[v.mapping.value]});s.push(_)});var a=d3.min(s,function(v){return v[0]}),d=d3.max(s,function(v){return v[1]}),m=d3.scaleLinear().domain([a,d]).nice().range([0,t.width-(r.left+r.right)]);e.forEach(function(v){var _=v.data.map(function(x){return x[v.mapping.value]});v.bins=d3.bin().domain(m.domain()).thresholds(m.ticks(v.mapping.bins))(_),v.max_value=d3.max(v.bins,function(x){return x.length})}),t.derived.xScale=m,t.derived.yScale=d3.scaleLinear().domain([0,d3.max(e,function(v){return v.max_value})]).nice().range([i-(r.top+r.bottom),0])}function r7(t,e,r){var i=t.margin,s=[],a=[],d=[],m=[],v=r||{},_=v.xExtentFields||["x_var"],x=v.yExtentFields||["y_var"],w=e.filter(function(B){var he=B.scaleHints;return!(he&&Array.isArray(he.xExtentFields)&&he.xExtentFields.length===0&&Array.isArray(he.yExtentFields)&&he.yExtentFields.length===0)});w.forEach(function(B){var he=B.scaleHints&&Array.isArray(B.scaleHints.xExtentFields)?B.scaleHints.xExtentFields:_,He=[];he.forEach(function(In){var On=B.mapping[In]||In,cr=B.data.map(function(bn){return+bn[On]});He=He.concat(cr)});var er=d3.extent(He.length>0?He:[0]),Er=B.scaleHints&&Array.isArray(B.scaleHints.yExtentFields)?B.scaleHints.yExtentFields:x,zt=[];Er.forEach(function(In){var On=B.mapping[In]||In,cr=B.data.map(function(bn){return+bn[On]});zt=zt.concat(cr)});var _n=d3.extent(zt.length>0?zt:[0],function(In){return In});s.push(er),a.push([_n[0],_n[1]]);var $r=B.mapping.x_var;d.push(B.data.map(function(In){return In[$r]})),m.push(B.data.map(function(In){var On=B.mapping.y_var||"y_var";return In[On]}))});var I=d3.min(s,function(B){return B[0]}),O=d3.max(s,function(B){return B[1]}),z=d3.min(s,function(B){return B[0]}),J=d3.max(s,function(B){return B[1]});t.derived.xCheck=z===0&&J===0,I==O&&(I=I-1,O=O+1);var Q=Math.max(Math.abs(O-I)*xx,.5),oe=[t.config.scales.xlim.min?+t.config.scales.xlim.min:I-Q,t.config.scales.xlim.max?+t.config.scales.xlim.max:O+Q];t.derived.xBanded=[].concat.apply([],d).map(function(B){try{return Array.isArray(B)?B[0]:B}catch{return}}).filter(e7);var se=d3.min(a,function(B){return B[0]}),re=d3.max(a,function(B){return B[1]});se==re&&(se=se-1,re=re+1);var q=Math.abs(re-se)*Sx,ue=[t.config.scales.ylim.min?+t.config.scales.ylim.min:se-q,t.config.scales.ylim.max?+t.config.scales.ylim.max:re+q];t.derived.yBanded=[].concat.apply([],m).map(function(B){try{return Array.isArray(B)?B[0]:B}catch{return}}).filter(e7);var K=s1(t);v.xScaleType==="band"?t.derived.xScale=d3.scaleBand().range([0,t.width-(i.left+i.right)]).domain(t.config.scales.flipAxis===!0?t.derived.yBanded:t.derived.xBanded):t.derived.xScale=d3.scaleLinear().range([0,t.width-(i.right+i.left)]).domain(t.config.scales.flipAxis===!0?ue:oe),v.yScaleType==="band"?t.derived.yScale=d3.scaleBand().range([K-(i.top+i.bottom),0]).domain(t.config.scales.flipAxis===!0?t.derived.xBanded:t.derived.yBanded):t.derived.yScale=d3.scaleLinear().range([K-(i.top+i.bottom),0]).domain(t.config.scales.flipAxis===!0?oe:ue),t.config.scales.colorScheme&&t.config.scales.colorScheme.enabled&&(t.derived.colorDiscrete=d3.scaleOrdinal().range(t.config.scales.colorScheme.colors).domain(t.config.scales.colorScheme.domain),t.derived.colorContinuous=d3.scaleLinear().range(t.config.scales.colorScheme.colors).domain(t.config.scales.colorScheme.domain)),t.syncLegacyAliases()}function e7(t,e,r){return r.indexOf(t)===e}var Hh={xScaleType:"linear",yScaleType:"linear",xExtentFields:["x_var"],yExtentFields:["y_var"],domainMerge:"union"};function n7(t){return t?Object.assign({},Hh,t):null}function Ex(t){if(t&&t.scaleHints)return n7(t.scaleHints);try{var e=pl(t);return n7(e.constructor.scaleHints)}catch{return null}}function e4(t,e){var r=t&&t.config&&t.config.scales&&t.config.scales.categoricalScale;return r&&r[e+"Axis"]===!0?"band":"linear"}function i7(t,e){var r=!!(t&&t.config&&t.config.scales&&t.config.scales.flipAxis),i=new Set,s=new Set,a=new Set,d=new Set,m="union";if((e||[]).forEach(function(v){var _=Ex(v),x=e4(t,"x"),w=e4(t,"y"),I=_?_.xScaleType:x,O=_?_.yScaleType:w,z=r?O:I,J=r?I:O;r||(x==="band"&&(z="band"),w==="band"&&(J="band")),i.add(z),s.add(J);var Q=_&&Array.isArray(_.xExtentFields)?_.xExtentFields:Hh.xExtentFields;Q.forEach(function(se){a.add(se)});var oe=_&&Array.isArray(_.yExtentFields)?_.yExtentFields:Hh.yExtentFields;oe.forEach(function(se){d.add(se)}),_&&_.domainMerge==="independent"&&(m="independent")}),i.size>1||s.size>1)throw new Error("Mismatched scaleTypes across layers: x="+Array.from(i).join(", ")+", y="+Array.from(s).join(", ")+".");return{xScaleType:i.size>0?Array.from(i)[0]:e4(t,"x"),yScaleType:s.size>0?Array.from(s)[0]:e4(t,"y"),xExtentFields:Array.from(a).length>0?Array.from(a):Hh.xExtentFields,yExtentFields:Array.from(d).length>0?Array.from(d):Hh.yExtentFields,domainMerge:m}}function Ud(t){var e=t.derived.currentLayers||[],r=e.map(function(a){return pl(a).constructor.traits}),i=e[0]?e[0].type:null,s=Array.from(new Set(r.map(function(a){return a.legendType})));return{type:i,axesChart:r.some(function(a){return a.hasAxes}),histogram:r.length>0&&r.every(function(a){return a.binning}),continuousLegend:s.length===1&&s[0]==="continuous",ordinalLegend:s.length===1&&s[0]==="ordinal",referenceLines:r.some(function(a){return a.referenceLines})}}function Vd(t,e){if(e.axesChart)if(e.histogram)t7(t,t.derived.currentLayers);else{var r=i7(t,t.derived.currentLayers);r7(t,t.derived.currentLayers,r)}}var wx={line:"axes-continuous",point:"axes-continuous",area:"axes-continuous",bar:"axes-categorical",groupedBar:"axes-categorical",boxplot:"axes-categorical",violin:"axes-categorical",histogram:"axes-binned",heatmap:"axes-matrix",candlestick:"axes-continuous",waterfall:"axes-categorical",ridgeline:"axes-binned",rangeBar:"axes-continuous",sankey:"standalone-flow",hexbin:"axes-hex",treemap:"standalone-treemap",donut:"standalone-donut",gauge:"standalone-gauge",text:"axes-continuous",regression:"axes-continuous",bracket:"axes-continuous",comparison:"axes-categorical",qq:"axes-continuous",lollipop:"axes-categorical",dumbbell:"axes-categorical",waffle:"standalone-waffle",beeswarm:"axes-continuous",bump:"axes-continuous",survfit:"axes-continuous",histogram_fit:"axes-binned",quantile_dots:"axes-categorical",radar:"standalone-radar",funnel:"standalone-funnel",parallel:"standalone-parallel",calendarHeatmap:"standalone-calendar",fan:"axes-continuous"},Ax=new Set(["axes-continuous:axes-categorical","axes-categorical:axes-continuous","axes-binned:axes-continuous","axes-continuous:axes-binned"]);function Tx(t){if(t.length<=1)return{valid:!0,errors:[]};let e=[],r=t.map(function(a){return wx[a.type]||"unknown"}),i=r.filter(function(a){return a.startsWith("standalone")});i.length>0&&t.length>1&&e.push("Cannot mix standalone chart types with other layers."),i.length>1&&e.push("Standalone chart types must be used alone.");let s=Array.from(new Set(r));return s.length>1&&s.forEach(function(a,d){s.slice(d+1).forEach(function(m){Ax.has(a+":"+m)||e.push("Cannot mix layer groups '"+a+"' and '"+m+"'.")})}),{valid:e.length===0,errors:e}}function Ix(t,e){let r=[],i=[];return e?(Object.entries(e).forEach(function(s){let a=s[0],d=s[1],m=t.mapping?t.mapping[a]:null;if(d.required&&!m){r.push("Layer '"+t.label+"' is missing required mapping '"+a+"'.");return}if(!m)return;let v=Array.isArray(t.data)?typeof m=="string"?t.data.map(function(x){return x[m]}):t.data.map(function(){return m}):[];if(d.numeric&&v.find(function(w){return Number.isNaN(+w)})!==void 0&&r.push("Layer '"+t.label+"' field '"+m+"' must be numeric."),d.positive&&v.find(function(w){return+w<=0})!==void 0&&r.push("Layer '"+t.label+"' field '"+m+"' must be positive."),d.sorted){for(let x=1;x0&&i.push("Layer '"+t.label+"' field '"+m+"' contains "+_+" null/NaN values.")}),{errors:r,warnings:i}):{errors:r,warnings:i}}function t4(t){let e=t.derived.currentLayers||t.config.layers||[],r=Tx(e);return r.valid?e.filter(function(i){let a=pl(i).constructor.dataContract,d=Ix(i,a);return d.warnings.forEach(function(m){console.warn("[myIO]",m)}),d.errors.length>0?(d.errors.forEach(function(m){console.warn("[myIO] Layer '"+i.label+"' removed:",m),t.emit("error",{message:m,layer:i})}),!1):!0}):(r.errors.forEach(function(i){console.warn("[myIO] Composition error:",i),t.emit("error",{message:i})}),[])}function r4(t,e){e.referenceLines&&Ox(t)}function Ox(t){var e=t.margin,r=t.options.transition.speed,i=[t.options.referenceLine.x],s=[t.options.referenceLine.y];if(t.options.referenceLine.x){var a=t.plot.selectAll(".ref-x-line").data(i);a.exit().transition().duration(100).style("opacity",0).attr("y2",t.height-(e.top+e.bottom)).remove();var d=a.enter().append("line").attr("class","ref-x-line").attr("fill","none").style("stroke","gray").style("stroke-width",3).attr("x1",function(_){return t.xScale(_)}).attr("x2",function(_){return t.xScale(_)}).attr("y1",t.height-(e.top+e.bottom)).attr("y2",t.height-(e.top+e.bottom)).transition().ease(d3.easeQuad).duration(r).attr("y2",0);a.merge(d).transition().ease(d3.easeQuad).duration(r).attr("x1",function(_){return t.xScale(_)}).attr("x2",function(_){return t.xScale(_)}).attr("y1",t.height-(e.top+e.bottom)).attr("y2",0)}else t.plot.selectAll(".ref-x-line").remove();if(t.options.referenceLine.y){var m=t.plot.selectAll(".ref-y-line").data(s);m.exit().transition().duration(100).attr("y2",t.width-(e.left+e.right)).style("opacity",0).remove();var v=m.enter().append("line").attr("class","ref-y-line").attr("fill","none").style("stroke","gray").style("stroke-width",3).attr("x1",0).attr("x2",0).attr("y1",function(_){return t.yScale(_)}).attr("y2",function(_){return t.yScale(_)}).transition().ease(d3.easeQuad).duration(r).attr("x2",t.width-(e.left+e.right));m.merge(v).transition().ease(d3.easeQuad).duration(r).attr("x1",0).attr("x2",t.width-(e.left+e.right)).attr("y1",function(_){return t.yScale(_)}).attr("y2",function(_){return t.yScale(_)})}else t.plot.selectAll(".ref-y-line").remove()}function s7(t,e,r){let i=t.map(function(I){return I[r]}),s=t.map(function(I){return I[e]}),a={},d=s.length,m=0,v=0,_=0,x=0,w=0;for(let I=0;I0)return s.length}var a=r?r.clientWidth:this.controller.chart.runtime.totalWidth;return Math.max(Math.floor(a/(this.controller.config.minWidth||200)),1)}hasPanelData(){for(var e=0;e0)return!0;return!1}addLabel(){d3.select(this.element).append("div").attr("class","myIO-facet-label").text(this.facetValue)}renderPanel(){var e=this.buildPanelChart(),r=Ud(e);r.axesChart&&(Vd(e,r),this.applySharedDomains(e)),D0(e),e.dom.svg=e.svg,e.dom.plot=e.plot,e.dom.chartArea=e.chart,r.axesChart&&this.requiresClipPath(r.type)&&(this.setClipPath(e),B0(e,r,{isInitialRender:!0}),this.applyAxisSuppression(e),r4(e,r,{isInitialRender:!0})),this.renderLayers(e,this.layers),this.panelChart=e}buildPanelChart(){var e=this.controller.chart,r=Math.max(this.element.clientWidth||this.controller.config.minWidth||200,1),i=this.buildMargin(),s=Object.assign({},e.config,{layers:this.layers}),a={margin:i,suppressLegend:!0,suppressAxis:{xAxis:this.suppressX,yAxis:this.suppressY},xlim:s.scales.xlim,ylim:s.scales.ylim,categoricalScale:s.scales.categoricalScale,flipAxis:s.scales.flipAxis,colorScheme:s.scales.colorScheme?s.scales.colorScheme.enabled?[s.scales.colorScheme.colors,s.scales.colorScheme.domain,"on"]:[s.scales.colorScheme.colors,s.scales.colorScheme.domain,"off"]:null,xAxisFormat:s.axes.xAxisFormat,yAxisFormat:s.axes.yAxisFormat,toolTipFormat:s.axes.toolTipFormat,xTickLabels:s.axes.xTickLabels,xAxisLabel:s.axes.xAxisLabel,yAxisLabel:s.axes.yAxisLabel,dragPoints:!1,toggleY:null,toolTipOptions:s.interactions.toolTipOptions,transition:{speed:0},referenceLine:s.referenceLines};return{element:this.element,dom:{element:this.element},config:s,derived:{currentLayers:this.layers.slice()},runtime:{totalWidth:r,width:r,height:zh,layout:e.runtime.layout,activeY:e.runtime.activeY,activeYFormat:e.runtime.activeYFormat},options:a,margin:i,width:r,height:zh,totalWidth:r,layout:e.runtime.layout,newY:e.runtime.activeY,newScaleY:e.runtime.activeYFormat,plotLayers:this.layers,emit:function(){},dragPoints:function(){},updateRegression:function(){},syncLegacyAliases:function(){this.xScale=this.derived?this.derived.xScale:null,this.yScale=this.derived?this.derived.yScale:null,this.colorDiscrete=this.derived?this.derived.colorDiscrete:null,this.colorContinuous=this.derived?this.derived.colorContinuous:null,this.x_banded=this.derived?this.derived.xBanded:null,this.y_banded=this.derived?this.derived.yBanded:null,this.x_check=this.derived?this.derived.xCheck:null,this.currentLayers=this.derived?this.derived.currentLayers:null},captureLegacyAliases:function(){}}}buildMargin(){var e=this.controller.chart.config.layout.margin||{},r={top:e.top!=null?e.top:30,right:e.right!=null?e.right:5,bottom:e.bottom!=null?e.bottom:60,left:e.left!=null?e.left:50};return this.suppressX&&(r.bottom=Math.min(r.bottom,12)),this.suppressY&&(r.left=Math.min(r.left,12)),r}applySharedDomains(e){var r=this.controller.globalScaleSnapshot;!r||!e.derived||!e.derived.xScale||!e.derived.yScale||(r.xDomain&&e.derived.xScale.domain(r.xDomain.slice()),r.yDomain&&e.derived.yScale.domain(r.yDomain.slice()),r.xBanded&&(e.derived.xBanded=r.xBanded.slice()),r.yBanded&&(e.derived.yBanded=r.yBanded.slice()),typeof r.xCheck<"u"&&(e.derived.xCheck=r.xCheck),r.colorDiscrete&&(e.derived.colorDiscrete=r.colorDiscrete),r.colorContinuous&&(e.derived.colorContinuous=r.colorContinuous),e.syncLegacyAliases())}requiresClipPath(e){return e!=="donut"&&e!=="gauge"}setClipPath(e){var r=e.height-(e.margin.top+e.margin.bottom);e.dom.clipPath=e.dom.chartArea.append("defs").append("svg:clipPath").attr("id",e.dom.element.id+"clip").append("svg:rect").attr("x",0).attr("y",0).attr("width",e.width-(e.margin.left+e.margin.right)).attr("height",r),e.dom.chartArea.attr("clip-path","url(#"+e.dom.element.id+"clip)"),e.clipPath=e.dom.clipPath}applyAxisSuppression(e){this.suppressX&&e.plot.selectAll(".x-axis").remove(),this.suppressY&&e.plot.selectAll(".y-axis").remove()}renderLayers(e,r){for(var i=0;i1?x+": ":"";e.push(I+_.below+" of "+w+" dots below threshold of "+i+".")})}}}),e}function l7(t){return String(t).replace(/[^a-zA-Z0-9_-]/g,"")}function Rx(t,e){if(!t.dom||!t.dom.chartArea||!e)return null;for(var r=t.dom.chartArea,i=[".tag-"+e.type+"-"+e.id,".tag-"+e.type+"-"+t.dom.element.id+"-"+l7(e.label)],s=0;s0&&e.visibility!==!1})}destroy(){this.chart.dom.svg.on("keydown.a11y",null),this.liveRegion&&this.liveRegion.remove(),clearTimeout(this.debounceTimer)}};var u4=class{constructor(e){this.chart=e,this.tableContainer=null,this.visible=!1}initialize(){this.tableContainer=d3.select(this.chart.dom.element).append("div").attr("class","myIO-data-table myIO-sr-only").attr("role","region").attr("aria-label","Chart data table")}generate(){if(this.tableContainer){this.tableContainer.selectAll("*").remove();for(var e=this.chart.config.layers,r=500,i=new Map,s=[],a=0;ar&&this.tableContainer.append("p").text("Showing first "+r+" of "+w.length+" rows")}}}renderFanTable(e,r){if(!(!e||e.length===0)){var i=e[0],s=i.mapping&&i.mapping.x_var?i.mapping.x_var:"x_var",a=new Map,d=[];e.forEach(function(O){var z=O.options&&O.options.interval_pct;if(z!=null){var J=c7(z);d.push(+z),(Array.isArray(O.data)?O.data:[]).forEach(function(Q){var oe=String(Q[s]);a.has(oe)||a.set(oe,{x_var:Q[s]});var se=a.get(oe);se["low_"+J]=Q[O.mapping.low_y],se["high_"+J]=Q[O.mapping.high_y]})}}),d=Array.from(new Set(d)).sort(function(O,z){return O-z});var m=["x_var"];d.forEach(function(O){var z=c7(O);m.push("low_"+z),m.push("high_"+z)});var v=Array.from(a.values()),_=v.slice(0,r),x=this.tableContainer.append("table").attr("aria-label","Data for "+(i._composite||"fan")),w=x.append("thead").append("tr");m.forEach(function(O){w.append("th").attr("scope","col").text(O)});var I=x.append("tbody");_.forEach(function(O){var z=I.append("tr");m.forEach(function(J){var Q=O[J];z.append("td").text(Q!=null?String(Q):"")})}),v.length>r&&this.tableContainer.append("p").text("Showing first "+r+" of "+v.length+" rows")}}toggle(){this.visible=!this.visible,this.visible?(this.generate(),this.tableContainer.classed("myIO-sr-only",!1),this.chart.dom.svg.attr("aria-hidden","true")):(this.tableContainer.classed("myIO-sr-only",!0),this.chart.dom.svg.attr("aria-hidden",null))}destroy(){this.tableContainer&&this.tableContainer.remove()}};function c7(t){return String(t).replace(/\.0+$/,"").replace(/(\.\d*?)0+$/,"$1")}function Uu(t){return t&&t.config&&Array.isArray(t.config.keyframes)?t.config.keyframes:[]}function z6(t){!t||!t.runtime||(t.runtime.keyframeTimer!==null&&t.runtime.keyframeTimer!==void 0&&clearTimeout(t.runtime.keyframeTimer),t.runtime.keyframeTimer=null)}function u7(t,e){if(!e||!Array.isArray(e.layers)||!t.config||!Array.isArray(t.config.layers))return;let r=Object.create(null);t.config.layers.forEach(function(i){r[i.label]=i}),e.layers.forEach(function(i){if(i&&Object.prototype.hasOwnProperty.call(r,i.label)){let s=r[i.label];(Array.isArray(i.data)||s.type==="treemap"&&i.data!==null&&typeof i.data=="object"&&!Array.isArray(i.data))&&(s.data=i.data)}})}function Mx(t,e){let r=Uu(t);if(typeof e=="number"&&Number.isInteger(e)){let i=e-1;return i>=0&&i=e.length-1)}function Wh(t){!t||!t.runtime||(z6(t),t.runtime.keyframePlaying=!1,d4(t))}function f7(t){if(z6(t),!t.runtime.keyframePlaying)return;let e=Number(t.config&&t.config.transitions&&t.config.transitions.speed)||0;t.runtime.keyframeTimer=setTimeout(function(){if(!t.runtime||!t.runtime.keyframePlaying)return;let r=Uu(t),i=t.runtime.keyframeIndex+1;if(i>=r.length){Wh(t);return}Yh(t,i+1,{preservePlayback:!0}),i>=r.length-1?Wh(t):f7(t)},Math.max(0,e)+1e3)}function H6(t,e){let r=document.createElement("button");return r.type="button",r.className="myIO-keyframe-button",r.dataset.keyframeAction=t,r.textContent=e,r}function $x(t){if(Uu(t).length<2||!t.dom||!t.dom.element)return;let r=document.createElement("div");r.className="myIO-keyframe-controls",r.setAttribute("role","group"),r.setAttribute("aria-label","Keyframe playback controls");let i=H6("previous","Previous");i.setAttribute("aria-label","Previous keyframe"),i.addEventListener("click",function(){f4(t,"previous")}),r.appendChild(i);let s=H6("play","Play");s.setAttribute("aria-label","Play keyframes"),s.setAttribute("aria-pressed","false"),s.addEventListener("click",function(){Px(t)}),r.appendChild(s);let a=H6("next","Next");a.setAttribute("aria-label","Next keyframe"),a.addEventListener("click",function(){f4(t,"next")}),r.appendChild(a);let d=document.createElement("span");d.className="myIO-keyframe-label",d.setAttribute("aria-live","polite"),r.appendChild(d),t.dom.element.appendChild(r),t.runtime.keyframeControls=r,d4(t)}function d7(t){if(W6(t),!t||!t.runtime)return;let e=Uu(t);t.runtime.keyframeIndex=0,t.runtime.keyframePlaying=!1,t.runtime.keyframeTimer=null,t.runtime.keyframeControls=null,e.length!==0&&(u7(t,e[0]),$x(t))}function Yh(t,e,r){if(!t||!t.runtime)return!1;let i=Mx(t,e);if(i<0)return!1;r&&r.preservePlayback===!0||Wh(t),t.runtime.keyframeIndex=i;let a=Uu(t)[i];return typeof t.updateData=="function"?t.updateData(a.layers||[]):u7(t,a),d4(t),!0}function f4(t,e){if(!t||!t.runtime)return!1;Wh(t);let r=Uu(t);if(r.length===0)return!1;let i=e==="previous"?-1:e==="next"?1:0;if(i===0)return!1;let s=Math.max(0,Math.min(r.length-1,(t.runtime.keyframeIndex||0)+i));return Yh(t,s+1)}function Px(t){return!t||!t.runtime||Uu(t).length<2?!1:t.runtime.keyframePlaying?(Wh(t),!1):(t.runtime.keyframeIndex>=Uu(t).length-1&&Yh(t,1),t.runtime.keyframePlaying=!0,d4(t),f7(t),!0)}function W6(t){if(!t||!t.runtime)return;z6(t),t.runtime.keyframePlaying=!1;let e=t.runtime.keyframeControls||t.dom&&t.dom.element&&t.dom.element.querySelector(".myIO-keyframe-controls");e&&e.parentNode&&e.parentNode.removeChild(e),t.runtime.keyframeControls=null}var Y6=280,Ux=100,Vx={on(t,e){return this._listeners=this._listeners||{},this._listeners[t]=this._listeners[t]||[],this._listeners[t].push(e),this},off(t,e){return!this._listeners||!this._listeners[t]?this:(this._listeners[t]=e?this._listeners[t].filter(function(r){return r!==e}):[],this)},emit(t,e){return!this._listeners||!this._listeners[t]?this:(this._listeners[t].forEach(function(r){r(e)}),this)}},h4=class{constructor(e){Object.assign(this,Vx),this._listeners={},this.config=e.config,this.dom={element:e.element},this.derived={},this.runtime={renderGen:0,resizeTimer:null,width:Math.max(e.width,Y6),height:e.height,totalWidth:Math.max(e.width,Y6),layout:"grouped",activeY:null,activeYFormat:null,tooltipHideTimer:null},this.config.sparkline&&this.applySparklineOverrides(),window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(this.config.transitions.speed=0),this.runtime.width=this.runtime.totalWidth,this.syncLegacyAliases(),this.draw()}syncLegacyAliases(){this.element=this.dom?this.dom.element:null,this.svg=this.dom?this.dom.svg:null,this.plot=this.dom?this.dom.plot:null,this.chart=this.dom?this.dom.chartArea:null,this.legendArea=this.dom?this.dom.legendArea:null,this.clipPath=this.dom?this.dom.clipPath:null,this.tooltip=this.dom?this.dom.tooltip:null,this.toolTipTitle=this.dom?this.dom.tooltipTitle:null,this.toolTipBody=this.dom?this.dom.tooltipBody:null,this.plotLayers=this.config?this.config.layers:null,this.options=this.config?{margin:this.config.layout.margin,suppressLegend:this.config.layout.suppressLegend,suppressAxis:this.config.layout.suppressAxis,xlim:this.config.scales.xlim,ylim:this.config.scales.ylim,categoricalScale:this.config.scales.categoricalScale,flipAxis:this.config.scales.flipAxis,colorScheme:this.config.scales.colorScheme?this.config.scales.colorScheme.enabled?[this.config.scales.colorScheme.colors,this.config.scales.colorScheme.domain,"on"]:[this.config.scales.colorScheme.colors,this.config.scales.colorScheme.domain,"off"]:null,xAxisFormat:this.config.axes.xAxisFormat,yAxisFormat:this.config.axes.yAxisFormat,toolTipFormat:this.config.axes.toolTipFormat,xTickLabels:this.config.axes.xTickLabels,xAxisLabel:this.config.axes.xAxisLabel,yAxisLabel:this.config.axes.yAxisLabel,dragPoints:this.config.interactions.dragPoints,toggleY:this.config.interactions.toggleY&&this.config.interactions.toggleY.variable?[this.config.interactions.toggleY.variable,this.config.interactions.toggleY.format]:null,toolTipOptions:this.config.interactions.toolTipOptions,transition:this.config.transitions,referenceLine:this.config.referenceLines}:null,this.margin=this.config?this.config.layout.margin:null,this.width=this.runtime?this.runtime.width:null,this.height=this.runtime?this.runtime.height:null,this.totalWidth=this.runtime?this.runtime.totalWidth:null,this.layout=this.runtime?this.runtime.layout:null,this.newY=this.runtime?this.runtime.activeY:null,this.newScaleY=this.runtime?this.runtime.activeYFormat:null,this.toolLine=this.runtime?this.runtime.toolLine:null,this.toolTipBox=this.runtime?this.runtime.toolTipBox:null,this.toolPointLayer=this.runtime?this.runtime.toolPointLayer:null,this.xScale=this.derived?this.derived.xScale:null,this.yScale=this.derived?this.derived.yScale:null,this.colorDiscrete=this.derived?this.derived.colorDiscrete:null,this.colorContinuous=this.derived?this.derived.colorContinuous:null,this.x_banded=this.derived?this.derived.xBanded:null,this.y_banded=this.derived?this.derived.yBanded:null,this.x_check=this.derived?this.derived.xCheck:null,this.currentLayers=this.derived?this.derived.currentLayers:null,this.layerIndex=this.derived?this.derived.layerIndex:null}captureLegacyAliases(){!this.dom||!this.runtime||!this.derived||(this.dom.svg=this.svg||this.dom.svg,this.dom.plot=this.plot||this.dom.plot,this.dom.chartArea=this.chart||this.dom.chartArea,this.dom.legendArea=this.legendArea||this.dom.legendArea,this.dom.clipPath=this.clipPath||this.dom.clipPath,this.dom.tooltip=this.tooltip||this.dom.tooltip,this.dom.tooltipTitle=this.toolTipTitle||this.dom.tooltipTitle,this.dom.tooltipBody=this.toolTipBody||this.dom.tooltipBody,this.runtime.layout=this.layout||this.runtime.layout,this.runtime.activeY=this.newY||this.runtime.activeY,this.runtime.activeYFormat=this.newScaleY||this.runtime.activeYFormat,this.runtime.toolLine=this.toolLine||this.runtime.toolLine,this.runtime.toolTipBox=this.toolTipBox||this.runtime.toolTipBox,this.runtime.toolPointLayer=this.toolPointLayer||this.runtime.toolPointLayer,this.derived.xScale=this.xScale||this.derived.xScale,this.derived.yScale=this.yScale||this.derived.yScale,this.derived.colorDiscrete=this.colorDiscrete||this.derived.colorDiscrete,this.derived.colorContinuous=this.colorContinuous||this.derived.colorContinuous,this.derived.xBanded=this.x_banded||this.derived.xBanded,this.derived.yBanded=this.y_banded||this.derived.yBanded,this.derived.xCheck=this.x_check||this.derived.xCheck,this.derived.currentLayers=this.currentLayers||this.derived.currentLayers,this.derived.layerIndex=this.layerIndex||this.derived.layerIndex,this.syncLegacyAliases())}draw(){D0(this),this.captureLegacyAliases(),this.initialize()}initialize(){this.derived.currentLayers=this.config.layers,this.syncLegacyAliases(),this.themeManager=new n4(this.dom.element,this.config),this.themeManager.initialize(),Ky(this),this.config.sparkline||(this.keyboardNav=new c4(this),this.keyboardNav.initialize(),this.dataTable=new u4(this),this.dataTable.initialize(),l4(this)),d7(this),this.derived.currentLayers=this.config.layers,this.syncLegacyAliases(),this.captureLegacyAliases(),this.derived.currentLayers.length>0&&this.setClipPath(this.derived.currentLayers[0].type),this.renderCurrentLayers({isInitialRender:!0})}applySparklineOverrides(){this.config.layout.margin={top:1,right:1,bottom:1,left:1},this.config.layout.suppressLegend=!0,this.config.layout.suppressAxis={xAxis:!0,yAxis:!0},this.config.interactions.brush&&(this.config.interactions.brush.enabled=!1),this.config.interactions.annotation&&(this.config.interactions.annotation.enabled=!1),this.config.interactions.linked&&(this.config.interactions.linked.enabled=!1),this.config.interactions.sliders=[],this.config.interactions.dragPoints=!1,this.config.referenceLines={x:null,y:null},this.dom.element.dataset.sparkline="true"}renderCurrentLayers(e){let r=e||{},i=++this.runtime.renderGen,s=()=>this.runtime&&this.runtime.renderGen===i;if(this.config.facet&&this.config.facet.enabled){this.facetController||(this.facetController=new s4(this)),this.facetController.initialize();return}else this.facetController&&(this.facetController.destroy(),this.facetController=null);try{if(this.dom.chartArea){this.dom.chartArea.selectAll("*").interrupt();var a=this.derived.currentLayers.map(function(_){return _.label}),d=this.config.layers.map(function(_){return _.label}),m=this.dom.chartArea;d.forEach(function(_){if(a.indexOf(_)===-1){var x=String(_).replace(/\s+/g,"");m.selectAll("[class*='tag-'][class*='-"+x+"']").remove()}})}if(this.emit("beforeRender",{options:r}),R0(this),this.derived.currentLayers=t4(this),this.syncLegacyAliases(),this.clearEmptyState(),!s())return;if(this.derived.currentLayers.length===0){this.renderEmptyState(),this.config.sparkline||l4(this);return}let v=Ud(this);if(Vd(this,v),this.syncLegacyAliases(),!s())return;D6(this),this.emit("afterScales",{state:v}),B0(this,v,r),this.routeLayers(this.derived.currentLayers),r4(this,v,r),Ly(this,v),Zy(this),J0(this),this.config.interactions.brush&&this.config.interactions.brush.enabled&&Fy(this),this.config.interactions.annotation&&this.config.interactions.annotation.enabled&&Uy(this),this.config.interactions.linked&&this.config.interactions.linked.enabled&&Wy(this),this.config.interactions.linked&&this.config.interactions.linked.cursor===!0&&jy(this),this.config.interactions.sliders&&this.config.interactions.sliders.length>0&&Xy(this),this.emit("afterRender",{state:v}),this.config.sparkline||l4(this)}catch(v){throw console.warn("[myIO] Render error:",v.message),this.emit("error",{message:v.message,error:v}),v}}clearEmptyState(){this.dom&&this.dom.svg&&this.dom.svg.selectAll(".myIO-empty-state").remove(),this.dom&&this.dom.element&&d3.select(this.dom.element).select(".myIO-fab").style("display",null)}renderEmptyState(){this.dom.chartArea&&this.dom.chartArea.selectAll("*").interrupt().remove(),this.dom.plot&&(this.dom.plot.selectAll(".x-axis, .y-axis").interrupt().remove(),this.dom.plot.selectAll(".ref-x-line, .ref-y-line").remove()),$d(this),Pu(this),this.runtime&&this.runtime._sheetOpen&&$u(this,{returnFocus:!1}),this.dom.element&&d3.select(this.dom.element).select(".myIO-fab").style("display","none"),this.dom.svg&&(this.dom.svg.selectAll(".myIO-empty-state").remove(),this.dom.svg.append("text").attr("class","myIO-empty-state").attr("x",this.runtime.totalWidth/2).attr("y",this.runtime.height/2).text("No data to display"))}addButtons(){D6(this)}toggleVarY(e){this.runtime.activeY=e[0],this.runtime.activeYFormat=e[1],this.syncLegacyAliases(),this.renderCurrentLayers()}toggleGroupedLayout(e){var r=$0(e,this),i=e.map(function(a){return a.color}),s=(this.runtime.width-(this.config.layout.margin.right+this.config.layout.margin.left))/(r[0].length+1)/i.length;this.runtime.layout==="stacked"?(F0(this,r,i,s),this.runtime.layout="grouped"):(M0(this,r,i,s),this.runtime.layout="stacked"),this.syncLegacyAliases()}setClipPath(e){switch(e){case"donut":case"gauge":break;default:var r=s1(this);this.dom.clipPath=this.dom.chartArea.append("defs").append("svg:clipPath").attr("id",this.dom.element.id+"clip").append("svg:rect").attr("x",0).attr("y",0).attr("width",this.runtime.width-(this.config.layout.margin.left+this.config.layout.margin.right)).attr("height",r-(this.config.layout.margin.top+this.config.layout.margin.bottom)),this.dom.chartArea.attr("clip-path","url(#"+this.dom.element.id+"clip)"),this.syncLegacyAliases()}}routeLayers(e){var r=this;this.derived.layerIndex=this.config.layers.map(function(i){return i.label}),this.syncLegacyAliases(),e.forEach(function(i){var s=pl(i);if(s&&typeof s.render=="function"){s.render(r,i,e),r.captureLegacyAliases();var a=i.options&&i.options.opacity!=null?i.options.opacity:1;if(a<1){var d=String(i.label).replace(/\s+/g,"");r.dom.chartArea.selectAll("[class*='tag-'][class*='-"+d+"']").style("opacity",a)}}})}removeLayers(e){e.forEach(r=>{Ry().forEach(function(i){typeof i.remove=="function"?i.remove(this,{label:r}):["line","bar","point","regression-line","hexbin","area","crosshairY","crosshairX"].forEach(function(s){d3.selectAll("."+_r(s,this.dom.element.id,r)).transition().duration(500).style("opacity",0).remove()},this)},this)})}dragPoints(e){By(this,e)}updateOrdinalColorLegend(e){gd(this,e)}updateRegression(e,r){let i=(this.config.layers||[]).find(function(s){return s.label===r&&s.type==="point"});i&&(this.config.layers||[]).forEach(function(s){if(s.type!=="line"||s.transform!=="lm"||!s.mapping||!i.mapping||s.mapping.x_var!==i.mapping.x_var||s.mapping.y_var!==i.mapping.y_var)return;let a=s7(i.data,i.mapping.y_var,i.mapping.x_var),d=i.data.map(function(m){return{...m,[s.mapping.y_var]:a.fn(m[s.mapping.x_var])}}).sort(function(m,v){return m[s.mapping.x_var]-v[s.mapping.x_var]});s.data=d,B6("line").render(this,{...s,color:e||s.color},this.config.layers)},this)}updateChart(e){let r=this.derived.layerIndex||[];this.config=e,this.derived.currentLayers=this.config.layers,this.syncLegacyAliases();let i=this.config.layers.map(function(a){return a.label}),s=r.filter(function(a){return!i.includes(a)});this.removeLayers(s),this.renderCurrentLayers()}updateData(e){if(!Array.isArray(e)||!this.config||!Array.isArray(this.config.layers))return;let r=Object.create(null);this.config.layers.forEach(function(i){r[i.label]=i}),e.forEach(function(i){if(i&&Object.prototype.hasOwnProperty.call(r,i.label)){let s=r[i.label];(Array.isArray(i.data)||s.type==="treemap"&&i.data!==null&&typeof i.data=="object"&&!Array.isArray(i.data))&&(s.data=i.data)}}),this.syncLegacyAliases(),this.renderCurrentLayers()}resize(e,r){if(!e||!r||e<2||r<2)return;let i=this.runtime&&this.runtime._sheetOpen===!0;i&&$u(this,{returnFocus:!1}),this.runtime.totalWidth=Math.max(e,Y6),this.runtime.width=this.runtime.totalWidth,this.runtime.height=r,this.syncLegacyAliases(),clearTimeout(this.runtime.resizeTimer),this.runtime.resizeTimer=setTimeout(()=>{ry(this),this.captureLegacyAliases(),this.renderCurrentLayers(),i&&this.derived&&this.derived.currentLayers&&this.derived.currentLayers.length>0&&z0(this),this.emit("resize",{width:this.runtime.width,height:this.runtime.height})},Ux)}destroy(){this.emit("destroy",{}),W6(this),clearTimeout(this.runtime&&this.runtime.resizeTimer),clearTimeout(this.runtime&&this.runtime.tooltipHideTimer),this.facetController&&(this.facetController.destroy(),this.facetController=null),this.keyboardNav&&this.keyboardNav.destroy(),this.dataTable&&this.dataTable.destroy(),this.themeManager&&this.themeManager.destroy(),this.runtime&&this.runtime._sheetOpen&&$u(this,{returnFocus:!1}),clearTimeout(this.runtime&&this.runtime._sheetCloseTimer),J0(this),Vy(this),U6(this),V6(this),this.dom&&this.dom.element&&d3.select(this.dom.element).on("keydown.brush",null),this.dom&&this.dom.chartArea&&this.dom.chartArea.selectAll("*").interrupt(),this.dom&&this.dom.svg&&this.dom.svg.remove(),this.dom&&this.dom.tooltip&&this.dom.tooltip.remove(),this.dom&&this.dom.element&&d3.select(this.dom.element).selectAll(".myIO-fab, .myIO-panel, .myIO-sheet-backdrop").remove(),$d(this),this._listeners={},this.config=null,this.derived=null,this.dom=null,this.runtime=null}};var p4=class{constructor({max:e=128}={}){this.max=e,this.lru=new Map,this.inflight=new Map}get(e){if(!this.lru.has(e))return;let r=this.lru.get(e);return this.lru.delete(e),this.lru.set(e,r),r}set(e,r){for(this.lru.has(e)&&this.lru.delete(e),this.lru.set(e,r);this.lru.size>this.max;){let i=this.lru.keys().next().value;this.lru.delete(i)}}delete(e){this.lru.delete(e)}clear(){this.lru.clear(),this.inflight.clear()}size(){return this.lru.size}inflightOrStore(e,r){if(this.inflight.has(e))return this.inflight.get(e);let i=r();return this.inflight.set(e,i),i}resolveInflight(e,r){this.set(e,r),this.inflight.delete(e)}rejectInflight(e){this.inflight.delete(e)}};var m4=class{constructor(){this.sources=new Map}register(e){if(!e||typeof e.sourceId!="string")throw new Error("SourceRegistry.register: entry must have sourceId");e.mode!=="none"&&this.sources.set(e.sourceId,e)}unregister(e){this.sources.delete(e)}get(e){return this.sources.get(e)}has(e){return this.sources.has(e)}all(){return Array.from(this.sources.values())}clear(){this.sources.clear()}};var g4=class{constructor(e={}){}async init(e={}){}async cancel(e){}async close(){}async applyPredicateCache(e,r){}async*query({queryId:e}){yield{__trailer:!0,queryId:e,rowCount:0,elapsedMs:0}}};function y4(t){if(typeof Uint8Array.fromBase64=="function")return Uint8Array.fromBase64(t);let e=atob(t),r=e.length,i=new Uint8Array(r);for(let s=0;s(f9(),u9)),Promise.resolve().then(()=>N0(d9()))]),s=i.default||i;for(let a of e.all()){if(a.mode!=="inline_ipc"||!a.ipcB64)continue;let d=y4(a.ipcB64),m=r.tableFromIPC(d),v=m.toArray().map(_=>Object.assign({},_));s.tables[a.sourceId]={data:v},this.sources.set(a.sourceId,{table:m,rows:v})}this._alasql=s}async*query({sql:e,params:r=[],queryId:i,signal:s}){if(this._closed)throw Object.assign(new Error("engine-gone"),{queryId:i,code:"engine-gone"});if(s&&s.aborted)throw Object.assign(new Error("cancelled"),{queryId:i,code:"cancelled"});let a=Date.now(),d;try{d=this._alasql.exec(e,r)}catch(m){throw Object.assign(new Error(m.message||String(m)),{queryId:i,code:"syntax"})}yield{rows:d,queryId:i},yield{__trailer:!0,queryId:i,rowCount:Array.isArray(d)?d.length:0,elapsedMs:Date.now()-a}}async cancel(e){}async applyPredicateCache(e,r){}async close(){if(this._alasql)for(let e of this.sources.keys())delete this._alasql.tables[e];this.sources.clear(),this._closed=!0}};var Jm=class{constructor(e={}){this.config=e,this.pending=new Map,this.batchWindow=e&&e.shiny_batch_window||4,this._handlersRegistered=!1}async init({sourceRegistry:e}={}){if(typeof Shiny>"u")throw Object.assign(new Error("Shiny is not available in this context"),{code:"engine-gone"});if(this._handlersRegistered)return;let r=a=>this._route("batch",a),i=a=>this._route("end",a),s=a=>this._route("error",a);Shiny.addCustomMessageHandler("myio:batch",r),Shiny.addCustomMessageHandler("myio:end",i),Shiny.addCustomMessageHandler("myio:error",s),this._handlersRegistered=!0}_route(e,r){let i=this.pending.get(r.queryId);i&&(e==="batch"?(i.push(r),Shiny.setInputValue("myio_ack",{v:1,queryId:r.queryId,seq:r.seq},{priority:"event"})):e==="end"?(i.push({__trailer:!0,queryId:r.queryId,rowCount:r.rowCount,elapsedMs:r.elapsedMs}),i.end()):e==="error"&&i.error(Object.assign(new Error(r.message||"engine error"),{queryId:r.queryId,code:r.code||"engine-gone"})))}query({sql:e,params:r=[],queryId:i,signal:s,templateId:a,sourceId:d,bindings:m,predicateHash:v,limit:_}){if(typeof Shiny>"u")throw Object.assign(new Error("Shiny not available"),{queryId:i,code:"engine-gone"});let x=[],w=[],I=!1,O=null,z=re=>{w.length?w.shift()({value:re,done:!1}):x.push(re)},J=()=>{for(I=!0;w.length;)w.shift()({value:void 0,done:!0})},Q=re=>{for(O=re;w.length;)w.shift()({value:void 0,done:!0})};this.pending.set(i,{push:z,end:J,error:Q,seqBudget:this.batchWindow});let oe=null;s&&(oe=()=>{Shiny.setInputValue("myio_cancel",{v:1,queryId:i},{priority:"event"}),Q(Object.assign(new Error("cancelled"),{queryId:i,code:"cancelled"}))},s.aborted?oe():s.addEventListener("abort",oe)),O||Shiny.setInputValue("myio_query",{v:1,queryId:i,templateId:a||null,sourceId:d||null,predicateHash:v||null,bindings:m||{},limit:_||null,_debugSql:e},{priority:"event"});let se=this.pending;return(async function*(){try{for(;;){if(O)throw O;if(x.length){yield x.shift();continue}if(I)return;let re=await new Promise(q=>w.push(q));if(re.done){if(O)throw O;return}yield re.value}}finally{s&&oe&&s.removeEventListener("abort",oe),se.delete(i)}})()}async cancel(e){typeof Shiny<"u"&&Shiny.setInputValue("myio_cancel",{v:1,queryId:e},{priority:"event"});let r=this.pending.get(e);r&&r.error(Object.assign(new Error("cancelled"),{queryId:e,code:"cancelled"}))}async applyPredicateCache(e,r){}async close(){for(let[,e]of this.pending)e.error(Object.assign(new Error("engine closed"),{code:"engine-gone"}));this.pending.clear()}};var Km=class{constructor(e={}){this.config=e,this.cacheUrl=e.duckdb_wasm&&e.duckdb_wasm.cache_url||null,this.workerUrl=e.duckdb_wasm&&e.duckdb_wasm.worker_url||null,this.db=null,this.conn=null,this._duckdb=null,this._closed=!1}async init({sourceRegistry:e}={}){if(this._closed)throw Object.assign(new Error("engine-gone"),{code:"engine-gone"});if(!this.cacheUrl||!this.workerUrl)throw Object.assign(new Error("WasmEngineAdapter: duckdb_wasm cache_url / worker_url not set. Ensure myIO::install_duckdb_wasm() has run."),{code:"engine-gone"});let r=this.cacheUrl.replace(/\/?$/,"/")+"duckdb-browser.mjs",i;try{i=await import(r)}catch(m){throw Object.assign(new Error("WasmEngineAdapter: failed to import duckdb-wasm loader from "+r+": "+(m?.message||m)),{code:"engine-gone"})}this._duckdb=i;let s=new Worker(this.workerUrl),a=this.cacheUrl.replace(/\/?$/,"/")+"duckdb-mvp.wasm",d=new i.ConsoleLogger;if(this.db=new i.AsyncDuckDB(d,s),await this.db.instantiate(a),this.conn=await this.db.connect(),e)for(let m of e.all())await this._registerSource(m)}async _registerSource(e){if(!this._duckdb)return;let r=this._duckdb.DuckDBDataProtocol;if(e.mode==="inline_ipc"&&e.ipcB64){let i=y4(e.ipcB64),s=e.sourceId+".arrow";await this.db.registerFileBuffer(s,i),await this.conn.query('CREATE OR REPLACE VIEW "'+e.sourceId.replace(/"/g,'""')+`" AS SELECT * FROM read_arrow('`+s+"');")}else if(e.mode==="url"&&e.url){let i=e.sourceId+(/\.parquet$/i.test(e.url)?".parquet":/\.arrow$/i.test(e.url)?".arrow":/\.feather$/i.test(e.url)?".feather":".csv");await this.db.registerFileURL(i,e.url,r.HTTP,!1);let s=/\.parquet$/i.test(e.url)?"read_parquet":/\.arrow$/i.test(e.url)||/\.feather$/i.test(e.url)?"read_arrow":"read_csv_auto";await this.conn.query('CREATE OR REPLACE VIEW "'+e.sourceId.replace(/"/g,'""')+'" AS SELECT * FROM '+s+"('"+i+"');")}}async*query({sql:e,params:r=[],queryId:i,signal:s}){if(this._closed)throw Object.assign(new Error("engine-gone"),{queryId:i,code:"engine-gone"});if(s&&s.aborted)throw Object.assign(new Error("cancelled"),{queryId:i,code:"cancelled"});let a=Date.now(),d,m=null;try{d=await this.conn.send(e)}catch(_){throw Object.assign(new Error(_?.message||String(_)),{queryId:i,code:"syntax"})}s&&(m=()=>{this.conn&&this.conn.cancelSent().catch(()=>{})},s.addEventListener("abort",m));let v=0;try{for(;;){if(s&&s.aborted){try{await this.conn.cancelSent()}catch{}throw Object.assign(new Error("cancelled"),{queryId:i,code:"cancelled"})}let{done:_,value:x}=await d.next();if(_)break;x&&(v+=x.numRows||0,yield{batch:x,queryId:i})}}finally{s&&m&&s.removeEventListener("abort",m);try{await d.return()}catch{}}yield{__trailer:!0,queryId:i,rowCount:v,elapsedMs:Date.now()-a}}async cancel(e){if(this.conn)try{await this.conn.cancelSent()}catch{}}async applyPredicateCache(e,r){}async close(){if(this._closed=!0,this.conn){try{await this.conn.close()}catch{}this.conn=null}if(this.db){try{await this.db.terminate()}catch{}this.db=null}}};function Qm(t,e={}){switch(t){case"svg":return new g4(e);case"memory":return new Xm(e);case"wasm":return new Km(e);case"server":return new Jm(e);default:throw new Error("createEngine: unknown engine '"+t+"'")}}var Zp=class{constructor({config:e}){this.config=e||{},this.cache=new p4({max:128}),this.sourceRegistry=new m4,this.charts=new Map,this.selectionStore=new Map,this.adapters=new Map,this._adapterInits=new Map,this._inflightControllers=new Map,this._debouncers=new Map}ensureAdapterFor(e,r,i){if(this.adapters.has(e))return Promise.resolve(this.adapters.get(e));if(this._adapterInits.has(e))return this._adapterInits.get(e);let s=Qm(r,i),a=s.init({sourceRegistry:this.sourceRegistry}).then(()=>(this.adapters.set(e,s),this._adapterInits.delete(e),s)).catch(d=>{throw this._adapterInits.delete(e),d});return this._adapterInits.set(e,a),a}registerSource(e){this.sourceRegistry.register(e)}register({chartId:e,queryTemplate:r,markSpec:i,sourceHandle:s,predicateFn:a,onResult:d}){this.charts.set(e,{chartId:e,queryTemplate:r,markSpec:i,sourceHandle:s,predicateFn:a,currentPredicate:null,onResult:d}),this.selectionStore.has(s.sourceId)||this.selectionStore.set(s.sourceId,new Map),r&&String(r).trim()&&d&&setTimeout(()=>this._dispatch(e,{preview:!1}),0)}unregister(e){let r=this.charts.get(e);if(!r)return;this.charts.delete(e);let i=this._inflightControllers.get(e);i&&(i.abort(),this._inflightControllers.delete(e));let s=r.sourceHandle.sourceId,a=this.selectionStore.get(s);a&&a.delete(e);let d=this._debouncers.get(e);if(d&&(d.preview&&clearTimeout(d.preview),d.final&&clearTimeout(d.final),this._debouncers.delete(e)),[...this.charts.values()].filter(v=>v.sourceHandle.sourceId===s).length===0){let v=this.adapters.get(s);v&&(v.close().catch(()=>{}),this.adapters.delete(s)),this._adapterInits.delete(s),this.selectionStore.delete(s)}}setSelection({chartId:e,predicate:r}){let i=this.charts.get(e);if(!i)return;let s=i.sourceHandle.sourceId,a=this.selectionStore.get(s);a||(a=new Map,this.selectionStore.set(s,a)),r==null?a.delete(e):a.set(e,r),i.currentPredicate=r;for(let d of this.charts.values())d.chartId!==e&&d.sourceHandle.sourceId===s&&this._scheduleDispatch(d.chartId);if(this._subscribers){let d=this._subscribers.get(i.sourceHandle.sourceId);if(d)for(let m of d)try{m({chartId:e,predicate:r})}catch(v){console.error("[myIO coordinator] subscriber error:",v)}}}subscribe(e,r){return this._subscribers||(this._subscribers=new Map),this._subscribers.has(e)||this._subscribers.set(e,new Set),this._subscribers.get(e).add(r),()=>{let i=this._subscribers.get(e);i&&i.delete(r)}}_scheduleDispatch(e){let r=this._debouncers.get(e);r||(r={preview:null,final:null},this._debouncers.set(e,r)),r.preview&&clearTimeout(r.preview),r.final&&clearTimeout(r.final),r.preview=setTimeout(()=>this._dispatch(e,{preview:!0}),50),r.final=setTimeout(()=>this._dispatch(e,{preview:!1}),200)}async _dispatch(e,{preview:r=!1}={}){let i=this.charts.get(e);if(!i||!i.onResult||!i.queryTemplate||!String(i.queryTemplate).trim())return;let s=i.sourceHandle.sourceId,a=this._composeOthersPredicate(e,s),d=this._substituteTemplate(i.queryTemplate,{where:a,limit:r?1e3:1e5}),m=await this._hash(a),v=i.sourceHandle.engine||this.config.engine,_=await this._hash(d+""+m+""+v),x=this.cache.get(_);if(x){this._deliverToRenderer(e,x);return}let w=this.adapters.get(s);try{if(!w&&v&&(w=await this.ensureAdapterFor(s,v,this.config)),!this.charts.has(e)||!w)return;typeof w.applyPredicateCache=="function"&&await w.applyPredicateCache(m,a)}catch(J){if(!this.charts.has(e))return;console.error("[myIO coordinator]",e,J?.code,J?.message||J),this._deliverToRenderer(e,{batches:[],trailer:{error:J?.message||String(J),code:J?.code||"engine_error"}});return}let I="q_"+Math.random().toString(36).slice(2,10),O=null;if(!this.cache.inflight.has(_)){let J=this._inflightControllers.get(e);J&&J.abort(),O=new AbortController,this._inflightControllers.set(e,O)}let z=this.cache.inflightOrStore(_,()=>(async()=>{let J=[],Q=null;for await(let oe of w.query({sql:d,params:[],queryId:I,sourceId:s,limit:r?1e3:1e5,signal:O.signal}))oe.__trailer?Q=oe:J.push(oe);return{batches:J,trailer:Q}})());try{let J=await z,Q=this._inflightControllers.get(e);if(O&&Q===O&&this._inflightControllers.delete(e),O&&O.signal.aborted){this.cache.rejectInflight(_);return}if(this.cache.resolveInflight(_,J),!this.charts.has(e))return;this._deliverToRenderer(e,J)}catch(J){this.cache.rejectInflight(_);let Q=this._inflightControllers.get(e);if(O&&Q===O&&this._inflightControllers.delete(e),O&&O.signal.aborted)return;console.error("[myIO coordinator]",e,J?.code,J?.message||J),this._deliverToRenderer(e,{batches:[],trailer:{error:J?.message||String(J),code:J?.code||"query_error"}})}}_composeOthersPredicate(e,r){let s=[...(this.selectionStore.get(r)||new Map).entries()].filter(([a])=>a!==e).map(([,a])=>a).filter(Boolean);return s.length?"("+s.join(") AND (")+")":"TRUE"}_substituteTemplate(e,{where:r,limit:i}){return e.replace(/\{\{\s*where\s*\}\}/g,r).replace(/\{\{\s*limit\s*\}\}/g,String(i)).replace(/\$where\b/g,r).replace(/\$limit\b/g,String(i))}async _hash(e){if(typeof crypto<"u"&&crypto.subtle){let i=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-1",i);return Array.from(new Uint8Array(s,0,8)).map(a=>a.toString(16).padStart(2,"0")).join("")}let r=2166136261;for(let i=0;i>>0).toString(16).padStart(8,"0")}_deliverToRenderer(e,{batches:r,trailer:i}){let s=this.charts.get(e);if(!(!s||!s.onResult))try{s.onResult({batches:r,trailer:i,markSpec:s.markSpec})}catch(a){console.error("[myIO coordinator] renderer error for",e,a)}}onChartResult(e,r){let i=this.charts.get(e);i&&(i.onResult=r)}async close(){for(let e of this._debouncers.values())e.preview&&clearTimeout(e.preview),e.final&&clearTimeout(e.final);for(let[,e]of this.adapters)await e.close().catch(()=>{});this.adapters.clear();for(let e of this._inflightControllers.values())e.abort();this._adapterInits.clear(),this._inflightControllers.clear(),this.charts.clear(),this.selectionStore.clear(),this.sourceRegistry.clear(),this.cache.clear(),this._debouncers.clear()}};function h9(t){return globalThis.__myioCoordinator||(globalThis.__myioCoordinator=new Zp({config:t})),globalThis.__myioCoordinator}var dw=new Set(["scatter","line","area"]),hw=150;function e0(t){let e=Number(t);return Number.isFinite(e)?e:null}function pw(t){if(t==="Inf"||t==="Infinity"||t===1/0)return 1/0;let e=Number(t);return Number.isFinite(e)&&e>0?e:5e4}function ug({markSpec:t,rowCount:e,threshold:r}){let i=t&&t.kind;if(!dw.has(i))return!1;let s=pw(r);if(!Number.isFinite(s))return!1;let a=Number(e);return Number.isFinite(a)&&a>=s}function mw(t,e){let r={};return["x","y","category","color","value","baseline"].forEach(i=>{let s=t.getChild?t.getChild(i):null;s&&(r[i]=s.get(e))}),r}function p9(t){if(!t)return[];if(typeof t.toArray=="function")return t.toArray().map(e=>Object.assign({},e));if(typeof t.getChild=="function"){let e=t.getChild("x"),r=t.numRows||t.length||(e?e.length:0),i=new Array(r);for(let s=0;s{r&&(Array.isArray(r)?e.push(...r):Array.isArray(r.rows)?e.push(...r.rows):r.batch?e.push(...p9(r.batch)):(typeof r.getChild=="function"||typeof r.toArray=="function")&&e.push(...p9(r)))}),e.map(r=>({...r,x:e0(r.x),y:e0(r.y),category:r.category==null?void 0:e0(r.category),color:r.color==null?void 0:r.color,value:r.value==null?void 0:e0(r.value),baseline:r.baseline==null?void 0:e0(r.baseline)})).filter(r=>r.x!=null&&r.y!=null)}function gw(t){let e=t.margin||t.config&&t.config.layout&&t.config.layout.margin||{top:0,right:0,bottom:0,left:0},r=Math.max(0,(t.width||t.runtime?.width||0)-e.left-e.right),i=Math.max(0,(t.height||t.runtime?.height||0)-e.top-e.bottom);return{left:e.left,top:e.top,width:r,height:i}}function yw(t){let e=t.dom?.element||t.element,r=t.dom?.svg?.node?t.dom.svg.node():e.querySelector("svg"),i=document.createElement("div");i.className="myIO-webgl-overlay",i.style.position="absolute",i.style.pointerEvents="none",i.style.overflow="hidden",i.style.zIndex="0";let s=document.createElement("div");return s.className="myIO-webgl-loading",s.textContent="Loading data...",s.style.position="absolute",s.style.left="50%",s.style.top="50%",s.style.transform="translate(-50%, -50%)",s.style.font="12px sans-serif",s.style.color="#666",s.style.background="rgba(255,255,255,0.85)",s.style.padding="6px 8px",s.style.border="1px solid rgba(0,0,0,0.12)",i.appendChild(s),r&&r.parentNode===e?e.insertBefore(i,r):e.appendChild(i),cg(t,i),i}function cg(t,e){let r=gw(t);return e.style.left=r.left+"px",e.style.top=r.top+"px",e.style.width=r.width+"px",e.style.height=r.height+"px",r}function t0(t,e,r){t&&typeof t.emit=="function"&&t.emit(e,r)}function bw(t,e,r){let i=t.querySelector(".myIO-webgl-loading,.myIO-webgl-empty");if(!r){i&&i.remove();return}let s=i||document.createElement("div");s.className=e,s.textContent=r,s.style.position="absolute",s.style.left="50%",s.style.top="50%",s.style.transform="translate(-50%, -50%)",s.style.font="12px sans-serif",s.style.color="#666",s.style.background="rgba(255,255,255,0.85)",s.style.padding="6px 8px",s.style.border="1px solid rgba(0,0,0,0.12)",s.parentNode||t.appendChild(s)}function vw(t,e){return t.map(r=>{if(r.category!=null||r.color==null)return r;let i=String(r.color);return e.has(i)||e.set(i,e.size),{...r,category:e.get(i)}})}function _w(t,e){let r=t.xScale,i=t.yScale;if(typeof r!="function"||typeof i!="function")return null;let s=globalThis.window&&window.d3;return s&&typeof s.quadtree=="function"?s.quadtree().x(a=>a.__px).y(a=>a.__py).addAll(e.map(a=>({row:a,__px:r(a.x),__py:i(a.y)}))):e.map(a=>({row:a,__px:r(a.x),__py:i(a.y)}))}function xw(t,e,r){if(!t)return null;if(typeof t.find=="function")return t.find(e,r,16)?.row||null;let i=null,s=1/0;return t.forEach(a=>{let d=Math.hypot(a.__px-e,a.__py-r);d{s=!1,i||d();let _=r.getBoundingClientRect(),x=xw(i,a.clientX-_.left,a.clientY-_.top);x&&t0(t,"rollover",{data:x,source:"webgl-bridge"})}))}return r.addEventListener("mousemove",m),{rebuild:d,destroy(){r.removeEventListener("mousemove",m)}}}function fg({chart:t,coordinator:e,chartId:r,markSpec:i,createRenderer:s,layerIndex:a=0}){let d=yw(t),m=e6({chart:t,layerIndex:a}),v=s||globalThis.window&&window.myIO&&window.myIO.webglRenderers&&window.myIO.webglRenderers.createWebGLRenderer,_=new Map,x=null,w=[],I=null,O=!1,z=!1,J=null,Q=Sw(t,()=>w);function oe(he,He){if(!(z||O)){if(z=!0,console.warn("[myIO webgl bridge] falling back to SVG:",he,He||""),x&&typeof x.destroy=="function")try{x.destroy()}catch{}x=null,d.remove(),I&&m.onResult(I)}}function se(){if(x||O||z)return x;if(typeof v!="function")return oe("renderer unavailable"),null;let he=cg(t,d);try{x=v({kind:i.kind,el:d,width:he.width,height:he.height,xScale:t.xScale,yScale:t.yScale})}catch(er){return oe("renderer creation failed",er),null}let He=d.querySelector("canvas");if(!x)return oe("renderer unavailable"),null;if(He){let er=null;try{er=He.getContext("webgl2")||He.getContext("webgl")}catch{er=null}if(!er)return oe("WebGL context unavailable"),null;He.addEventListener("webglcontextlost",Er=>{Er.preventDefault(),oe("WebGL context lost")},{once:!0})}return x}function re(he){let He=he&&he.trailer,er=He&&(He.error||He.message);return er?(x&&typeof x.update=="function"&&Promise.resolve(x.update([])).catch(()=>{}),t0(t,"error",{message:String(er),trailer:He,chartId:r}),!0):!1}function q(he){if(O)return;if(I=he,z){m.onResult(he);return}if(re(he))return;w=vw(Zm(he&&he.batches),_),Q.rebuild();let He=se();!He||typeof He.update!="function"||(bw(d,w.length?null:"myIO-webgl-empty",w.length?"":"No data in selection"),w.length||t0(t,"emptySelection",{chartId:r}),Promise.resolve(He.update(w)).catch(er=>{oe("render failed",er)}))}function ue(){if(O||z)return;let he=cg(t,d);x&&typeof x.resize=="function"&&x.resize(he.width,he.height),x&&typeof x.update=="function"&&Promise.resolve(x.update(w)).catch(He=>{oe("resize render failed",He)})}function K(){O||(J&&clearTimeout(J),J=setTimeout(ue,hw))}function B(){O||(O=!0,J&&clearTimeout(J),e&&typeof e.onChartResult=="function"&&e.onChartResult(r,null),Q.destroy(),m.destroy(),x&&typeof x.destroy=="function"&&x.destroy(),d.remove())}return t&&typeof t.on=="function"&&(t.on("resize",K),t.on("destroy",B)),{onResult:q,resize:K,destroy:B,get pointCount(){return w.length},get overlay(){return z?void 0:d},get fallbackActive(){return z}}}function e6({chart:t,layerIndex:e=0}){let r=[],i=!1;function s(d){if(i)return;let m=d&&d.trailer,v=m&&(m.error||m.message);if(v){t0(t,"error",{message:String(v),trailer:m});return}r=Zm(d&&d.batches),t.config&&t.config.layers&&t.config.layers[e]&&(t.config.layers[e].data=r),r.length||t0(t,"emptySelection",{}),typeof t.renderCurrentLayers=="function"&&t.renderCurrentLayers()}function a(){i=!0}return t&&typeof t.on=="function"&&t.on("destroy",a),{onResult:s,destroy:a,get pointCount(){return r.length}}}function m9(t){return ug(t)?fg(t):t&&t.unifyDataPath?e6(t):null}var t6=class{constructor({coordinator:e,sourceId:r,group:i,rowkeyCol:s,threshold:a=1e5}){if(!e)throw new Error("CrosstalkAdapter: coordinator is required");if(!r)throw new Error("CrosstalkAdapter: sourceId is required");this.coordinator=e,this.sourceId=r,this.group=i||null,this.rowkeyCol=s||"__myio_rowkey__",this.threshold=Number(a)||1e5,this._selectionHandle=null,this._filterHandle=null,this._suppressedOnce=!1,this._badgeEl=null,this._mode="row-level"}attach(e){if(this.group=e||this.group,!this.group||typeof window>"u"||!window.crosstalk)return;let r=window.crosstalk.SelectionHandle,i=window.crosstalk.FilterHandle;r&&(this._selectionHandle=new r(this.group),this._selectionHandle.on("change",s=>this._onIncoming(s)),i&&(this._filterHandle=new i(this.group),this._filterHandle.on("change",s=>this._onIncoming(s))))}setBadge(e){this._badgeEl=e,this._renderBadge()}_renderBadge(){this._badgeEl&&(this._badgeEl.textContent="linked: "+this._mode)}_onIncoming(e){let r=e&&(e.value||e.keys)||null;if(!r||!Array.isArray(r)||r.length===0){this.coordinator.setSelection({chartId:"__crosstalk__:"+this.sourceId,predicate:null});return}let i=r.map(d=>d==null?"NULL":"'"+String(d).replace(/'/g,"''")+"'"),a='"'+this.rowkeyCol.replace(/"/g,'""')+'"'+" IN ("+i.join(",")+")";this.coordinator.setSelection({chartId:"__crosstalk__:"+this.sourceId,predicate:a})}async broadcast({predicate:e}){if(!this._selectionHandle)return;if(e==null){try{this._selectionHandle.set(null)}catch{}return}let r=this._countSql(e),i=this.coordinator.adapters&&this.coordinator.adapters.get(this.sourceId);if(!i)return;let s=0;try{for await(let d of i.query({sql:r,params:[],queryId:"__xcount__"+Date.now()})){if(!d||d.__trailer)continue;let m=d.rows||d.batch&&d.batch.toArray&&d.batch.toArray()||[];m[0]&&(s=Number(m[0].n??m[0][0]??m[0]["count(*)"]??0))}}catch(d){console.warn("[myIO crosstalk] count query failed:",d?.message||d);return}if(s>this.threshold){this._suppressedOnce||(console.info("myIO: selection above crosstalk_threshold ("+s+" > "+this.threshold+"); downstream row-indexed widgets will not react to this selection. myIO-to-myIO linking still works."),this._suppressedOnce=!0),this._mode="predicate-only",this._renderBadge();return}let a=await this._fetchKeys(e);if(a&&a.length>0)try{this._selectionHandle.set(a)}catch{}this._mode="row-level",this._renderBadge()}_countSql(e){return"SELECT count(*) AS n FROM "+('"'+this.sourceId.replace(/"/g,'""')+'"')+" WHERE "+e}async _fetchKeys(e){let r=this.coordinator.adapters&&this.coordinator.adapters.get(this.sourceId);if(!r)return[];let i='"'+this.sourceId.replace(/"/g,'""')+'"',a="SELECT "+('"'+this.rowkeyCol.replace(/"/g,'""')+'"')+" AS rowkey FROM "+i+" WHERE "+e,d=[];try{for await(let m of r.query({sql:a,params:[],queryId:"__xkeys__"+Date.now()})){if(!m||m.__trailer)continue;let v=m.rows||m.batch&&m.batch.toArray&&m.batch.toArray()||[];for(let _ of v){let x=_&&(_.rowkey??_[0]);x!=null&&d.push(String(x))}}}catch(m){console.warn("[myIO crosstalk] key fetch failed:",m?.message||m)}return d}destroy(){try{this._selectionHandle&&this._selectionHandle.close()}catch{}try{this._filterHandle&&this._filterHandle.close()}catch{}this._selectionHandle=null,this._filterHandle=null}};var _h=class{constructor({el:e,width:r,height:i,xScale:s,yScale:a,palette:d,captureHoverEvents:m=!1}){this.el=e,this.width=r,this.height=i,this.xScale=s,this.yScale=a,this.captureHoverEvents=m!==!1,this.palette=d||["#440154","#414487","#2a788e","#22a884","#7ad151","#fde725"],this._scatterplot=null,this._destroyed=!1}_scaleCopy(e){return e&&typeof e.copy=="function"?e.copy():e}async _ensure(){if(this._scatterplot)return this._scatterplot;let e=await Promise.resolve().then(()=>(l_(),o_)),r=e.default||e.createScatterplot,i=document.createElement("canvas");return i.width=this.width,i.height=this.height,i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.pointerEvents=this.captureHoverEvents?"auto":"none",this.el.appendChild(i),this._scatterplot=r({canvas:i,width:this.width,height:this.height,pointSize:3,backgroundColor:[1,1,1,0],colorBy:"category",pointColor:this.palette,xScale:this._scaleCopy(this.xScale),yScale:this._scaleCopy(this.yScale)}),this._applyScales(),this._scatterplot}_applyScales(){!this._scatterplot||!this.xScale||!this.yScale||(typeof this._scatterplot.setXScale=="function"&&this._scatterplot.setXScale(this._scaleCopy(this.xScale)),typeof this._scatterplot.setYScale=="function"&&this._scatterplot.setYScale(this._scaleCopy(this.yScale)),typeof this._scatterplot.set=="function"&&(typeof this._scatterplot.setXScale!="function"||typeof this._scatterplot.setYScale!="function")&&this._scatterplot.set({xScale:this._scaleCopy(this.xScale),yScale:this._scaleCopy(this.yScale)}))}async update(e){if(this._destroyed)return;let r=await this._ensure();if(!e||e.length===0){r.clear();return}let i={x:new Float32Array(e.length),y:new Float32Array(e.length),category:new Float32Array(e.length),value:new Float32Array(e.length)};for(let s=0;sN0(r6())),r=e.default||e,i=document.createElement("canvas");i.width=this.width,i.height=this.height,i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.pointerEvents="none",this.el.appendChild(i),this._regl=r({canvas:i,attributes:{antialias:!0,preserveDrawingBuffer:!1}}),this._drawLine=this._regl({vert:` precision mediump float; attribute vec2 position; uniform vec2 xDomain; diff --git a/inst/htmlwidgets/myIO/src/Chart.js b/inst/htmlwidgets/myIO/src/Chart.js index 238724b2..0ac29e3a 100644 --- a/inst/htmlwidgets/myIO/src/Chart.js +++ b/inst/htmlwidgets/myIO/src/Chart.js @@ -490,10 +490,12 @@ export class myIOchart { const byLabel = Object.create(null); this.config.layers.forEach(function(layer) { byLabel[layer.label] = layer; }); updates.forEach(function(update) { - if (update && - Object.prototype.hasOwnProperty.call(byLabel, update.label) && - Array.isArray(update.data)) { - byLabel[update.label].data = update.data; + if (update && Object.prototype.hasOwnProperty.call(byLabel, update.label)) { + const layer = byLabel[update.label]; + const validData = Array.isArray(update.data) || + (layer.type === "treemap" && update.data !== null && + typeof update.data === "object" && !Array.isArray(update.data)); + if (validData) layer.data = update.data; } }); // Mutating the shared layer objects updates whatever subset is currently diff --git a/inst/htmlwidgets/myIO/src/interactions/keyframes.js b/inst/htmlwidgets/myIO/src/interactions/keyframes.js index 913349fc..30a03d5e 100644 --- a/inst/htmlwidgets/myIO/src/interactions/keyframes.js +++ b/inst/htmlwidgets/myIO/src/interactions/keyframes.js @@ -20,9 +20,12 @@ function applyWithoutRender(chart, frame) { const byLabel = Object.create(null); chart.config.layers.forEach(function(layer) { byLabel[layer.label] = layer; }); frame.layers.forEach(function(update) { - if (update && Array.isArray(update.data) && - Object.prototype.hasOwnProperty.call(byLabel, update.label)) { - byLabel[update.label].data = update.data; + if (update && Object.prototype.hasOwnProperty.call(byLabel, update.label)) { + const layer = byLabel[update.label]; + const validData = Array.isArray(update.data) || + (layer.type === "treemap" && update.data !== null && + typeof update.data === "object" && !Array.isArray(update.data)); + if (validData) layer.data = update.data; } }); } diff --git a/tests/js/keyframes.test.js b/tests/js/keyframes.test.js index c05f29fa..ee023961 100644 --- a/tests/js/keyframes.test.js +++ b/tests/js/keyframes.test.js @@ -51,6 +51,20 @@ describe("keyframe controller", () => { .toBe("Keyframe playback controls"); }); + test("initializes object-shaped treemap frame data", () => { + const chart = chartWithFrames(); + chart.config.layers = [{ label: "tree", type: "treemap", data: { name: "old" } }]; + chart.config.keyframes = [{ + label: "Tree", + layers: [{ label: "tree", data: { name: "root", children: [{ name: "A" }] } }] + }]; + initializeKeyframes(chart); + + expect(chart.config.layers[0].data).toEqual({ + name: "root", children: [{ name: "A" }] + }); + }); + test("selects by label or one-based index and clamps steps", () => { const chart = chartWithFrames(); initializeKeyframes(chart); diff --git a/tests/js/myio-proxy.test.js b/tests/js/myio-proxy.test.js index 2266db9e..9ceaa32a 100644 --- a/tests/js/myio-proxy.test.js +++ b/tests/js/myio-proxy.test.js @@ -57,6 +57,18 @@ describe("Chart.updateData (myIOProxy partial update)", () => { expect(chart.config.layers[0].data.length).toBe(1); }); + test("accepts object-shaped data only for treemap layers", () => { + const chart = makeChart([{ x: 1, y: 10 }]); + chart.renderCurrentLayers = vi.fn(); + chart.updateData([{ label: "pts", data: { name: "not point data" } }]); + expect(chart.config.layers[0].data).toEqual([{ x: 1, y: 10 }]); + + chart.config.layers[0].type = "treemap"; + const tree = { name: "root", children: [{ name: "A", value: 1 }] }; + chart.updateData([{ label: "pts", data: tree }]); + expect(chart.config.layers[0].data).toEqual(tree); + }); + test("does not reset visibility (preserves legend-toggled subset)", () => { const chart = makeChart([{ x: 1, y: 10 }]); chart.renderCurrentLayers = vi.fn(); diff --git a/tests/testthat/test_keyframes.R b/tests/testthat/test_keyframes.R index 3f166824..6bbccafc 100644 --- a/tests/testthat/test_keyframes.R +++ b/tests/testthat/test_keyframes.R @@ -42,6 +42,22 @@ test_that("multi-layer keyframes materialize complete snapshots", { expect_equal(frame$layers[[2]]$data, chart$x$config$layers[[2]]$data) }) +test_that("treemap keyframes retain their object-shaped serialization", { + initial <- data.frame( + group = c("A", "A", "B"), item = c("one", "two", "three"), + value = c(2, 3, 4) + ) + changed <- transform(initial, value = value * 2) + chart <- myIO(initial) |> + addIoLayer("treemap", label = "tree", + mapping = list(level_1 = "group", level_2 = "item", y_var = "value")) |> + addKeyframe(changed, "Changed") + + expect_type(chart$x$config$keyframes[[1]]$layers[[1]]$data, "list") + expect_named(chart$x$config$keyframes[[1]]$layers[[1]]$data, + c("name", "children")) +}) + test_that("addKeyframe rejects ambiguous and malformed inputs", { empty <- myIO() expect_error(addKeyframe(empty, data.frame(x = 1), "frame"), "at least one layer") From 2609d0b53180f6d61c4c3caca0b30eff7b175d97 Mon Sep 17 00:00:00 2001 From: Ryan Morton Date: Tue, 28 Jul 2026 19:14:37 -0600 Subject: [PATCH 5/9] docs: add bounded WebR and Quarto Live guidance --- _pkgdown.yml | 1 + vignettes/articles/webr-quarto-live.Rmd | 86 +++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 vignettes/articles/webr-quarto-live.Rmd diff --git a/_pkgdown.yml b/_pkgdown.yml index 359484a8..34037ad0 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -59,6 +59,7 @@ articles: - large-data-linking - articles/crosstalk-linking - sparklines + - articles/webr-quarto-live - title: Migration contents: - plotly-migration diff --git a/vignettes/articles/webr-quarto-live.Rmd b/vignettes/articles/webr-quarto-live.Rmd new file mode 100644 index 00000000..71bb5068 --- /dev/null +++ b/vignettes/articles/webr-quarto-live.Rmd @@ -0,0 +1,86 @@ +--- +title: "WebR 0.6.0 and Quarto Live" +--- + +myIO 1.3.0 has a pinned end-to-end compatibility gate for WebR 0.6.0. The +claim is deliberately specific: CI cross-compiles myIO and its dependencies as +WebAssembly packages, loads `library(myIO)`, creates a point chart in R, +transfers the serialized htmlwidget payload, and renders that payload with the +production myIO bundle in Chromium. The gate requires a visible SVG, the +expected marks, and no R, page, or console errors. + +This does not claim that DuckDB-WASM, every browser engine, or every host +framework has been validated. Those remain separate compatibility surfaces. + +## Why a Wasm package repository is required + +WebR cannot install an R package from source in the browser. Custom packages +must be compiled for WebAssembly first and made available through a compatible +binary repository. myIO uses the official +[`r-wasm/actions/build-rwasm@v3`](https://github.com/r-wasm/actions/tree/main/build-rwasm) +path in CI. See the WebR documentation on +[building R packages](https://docs.r-wasm.org/webr/latest/building.html) for +the underlying constraint and supported distribution model. + +## Quarto Live setup + +[Quarto Live](https://r-wasm.github.io/quarto-live/) uses WebR to execute R +blocks in the reader's browser and supports htmlwidget output. Install the +extension in a Quarto project: + +```bash +quarto add r-wasm/quarto-live +``` + +Then configure the document to use the same WebR release tested by myIO. The +Morton Analytics R-universe is a CRAN-like repository that publishes Wasm +binaries; confirm that it carries myIO 1.3.0 before publishing the document. + +```yaml +--- +title: "myIO in the browser" +format: live-html +webr: + engine-url: https://webr.r-wasm.org/v0.6.0/ + packages: + - myIO + repos: + - https://mortonanalytics.r-universe.dev +--- +``` + +Quarto Live documents using the `knitr` engine also need its documented setup +include. Follow the current +[Quarto Live installation instructions](https://r-wasm.github.io/quarto-live/getting_started/installation.html) +for that project-level configuration. + +An interactive block can then create a standard small-data widget: + +
```{webr}
+library(myIO)
+stopifnot(packageVersion("myIO") >= "1.3.0")
+
+myIO(mtcars) |>
+  addIoLayer(
+    type = "point",
+    label = "Cars",
+    mapping = list(x_var = "wt", y_var = "mpg")
+  ) |>
+  setAxisFormat(xLabel = "Weight", yLabel = "Miles per gallon")
+```
+
+ +The `stopifnot()` check prevents an older repository snapshot from silently +supporting a publication claim intended for 1.3.0. Quarto Live documents can +configure custom repositories through `webr.repos`; its +[package-loading guide](https://r-wasm.github.io/quarto-live/getting_started/packages.html) +describes the same precompiled-package pattern. + +## Supported boundary + +The verified 1.3.0 path covers the pure-R configuration and transform layer, +htmlwidget payload creation, production JavaScript bundle, SVG rendering, and +keyframe configuration. It does not exercise the optional Arrow, +DuckDB-WASM, WebGL, Shiny server, or Crosstalk paths inside WebR. Use the normal +R, Shiny, and browser test matrices for those capabilities rather than treating +WebR compatibility as a blanket runtime guarantee. From 2d51ee1023ab4b811716e0845eb560b5e7edc481 Mon Sep 17 00:00:00 2001 From: Ryan Morton Date: Tue, 28 Jul 2026 19:18:45 -0600 Subject: [PATCH 6/9] build: exclude linked-worktree metadata from source packages --- .Rbuildignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.Rbuildignore b/.Rbuildignore index b9ee4398..ad513b61 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -9,6 +9,7 @@ ^inst/appTester/e2e_output$ ^docs$ ^\.github$ +^\.git$ ^_pkgdown\.yml$ ^pkgdown$ ^LICENSE\.md$ From e34a7b609de43d0b93df3eb9a1b61108a6d87716 Mon Sep 17 00:00:00 2001 From: Ryan Morton Date: Tue, 28 Jul 2026 19:27:20 -0600 Subject: [PATCH 7/9] docs: declare Node 20 MCP floor and refresh wordlist --- inst/WORDLIST | 27 +++++++++++++++++++++++++++ mcp/README.md | 2 ++ mcp/package.json | 3 +++ vignettes/llm-tool-calling.Rmd | 5 +++-- 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/inst/WORDLIST b/inst/WORDLIST index e47c948d..1a3d65fe 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -1,6 +1,8 @@ agg +addIoLayer Airgap airgapped +Analytics BH bigdata bonferroni @@ -8,6 +10,7 @@ bslib checksums chr CMD +camelCase colorScheme composability composable @@ -26,6 +29,7 @@ df donut Donut dplyr +downsamples draggable Draggable dropdown @@ -36,17 +40,21 @@ DuckDB echarts flexdashboard geoms +GH ggiraph ggplot ggplotly GmbH groupedBar +gridlines +gzipped hexbin Hexbin holm htmlwidget htmlwidgets io +IIFE IPC js JS @@ -56,11 +64,16 @@ judgement Kaplan KDE keras +keyframe +Keyframe +keyframes +Keyframes Lifecycle linkable LLM LLMs LOESS +LTTB Mapbox MCP md @@ -68,6 +81,8 @@ minified minmax mvp myIO's +myIOOutput +myIOProxy natively nrd OHLC @@ -76,10 +91,15 @@ Ollama param plotly plotly's +POSIXct pre +precompiled +Precompiled px reactable recomputation +rectangling +renderer's renderer Renderer renderers @@ -94,6 +114,7 @@ schemas sd selectable setBigData +setColorScheme SharedData shinyapps sparkline @@ -101,6 +122,7 @@ Sparkline Sparklines sublayers Survfit +stopifnot theming Theming tibble @@ -111,13 +133,18 @@ treemaps Treemaps tukey UI +unminified +updateMyIOData validator validators walkthrough wasm WASM WCAG +WebAssembly +WebR WebGL widget's wilcox yWorks +renderMyIO diff --git a/mcp/README.md b/mcp/README.md index dc6f72f7..41a4d7ff 100644 --- a/mcp/README.md +++ b/mcp/README.md @@ -4,6 +4,8 @@ This package exposes the generated myIO schema as MCP tools for agents that can ## Install +The MCP server requires Node.js 20 or newer. + From the myIO repo: ```sh diff --git a/mcp/package.json b/mcp/package.json index 972086ec..1c077794 100644 --- a/mcp/package.json +++ b/mcp/package.json @@ -3,6 +3,9 @@ "version": "0.1.0", "type": "module", "description": "MCP tools for validating myIO chart specs and function calls.", + "engines": { + "node": ">=20" + }, "bin": { "myio-mcp": "./server.mjs" }, diff --git a/vignettes/llm-tool-calling.Rmd b/vignettes/llm-tool-calling.Rmd index b5cce213..e4279b8f 100644 --- a/vignettes/llm-tool-calling.Rmd +++ b/vignettes/llm-tool-calling.Rmd @@ -184,7 +184,8 @@ as_json(spec) To give the six tools to an MCP-aware assistant (Claude Desktop, Claude Code, Cursor), run the bundled Node server. It is deliberately separate from the R -package so installing myIO never pulls in Node dependencies. +package so installing myIO never pulls in Node dependencies. The MCP server +requires Node.js 20 or newer. ```{sh, eval=FALSE} cd mcp @@ -220,4 +221,4 @@ guarantee the chosen chart is the *right* chart for the question — asking for box plot when a histogram was wanted produces a perfectly valid spec. Semantic and aesthetic judgement stays with the model; these tools close the structural-error class, which is the part an LLM most reliably gets wrong. -``` \ No newline at end of file +``` From 1d3ba44c34da1781c81f8d6c78721dc3d9324759 Mon Sep 17 00:00:00 2001 From: Ryan Morton Date: Tue, 28 Jul 2026 19:28:15 -0600 Subject: [PATCH 8/9] docs: record stabilized release dependency floor --- NEWS.md | 5 +++++ mcp/package-lock.json | 3 +++ 2 files changed, 8 insertions(+) diff --git a/NEWS.md b/NEWS.md index e6d064e3..2ec77466 100644 --- a/NEWS.md +++ b/NEWS.md @@ -59,6 +59,11 @@ ## Performance and tooling +* Release dependency intake updates the GitHub Actions, browser-test, Arrow, + MCP, and JavaScript security transitive dependencies through PRs #91--#100. + The MCP server now resolves `@hono/node-server` 2.0.12 and declares Node.js + 20 or newer as its runtime floor; its conformance, stdio smoke, and audit + gates pass with zero known npm vulnerabilities. * The production JavaScript bundle is now minified. The shipped `inst/htmlwidgets/myIO/myIOapi.js` drops from 2.32 MB to 1.20 MB raw (398,650 to 298,757 bytes gzipped, -25%) with no behavior change; the diff --git a/mcp/package-lock.json b/mcp/package-lock.json index 27389e69..2620caab 100644 --- a/mcp/package-lock.json +++ b/mcp/package-lock.json @@ -13,6 +13,9 @@ }, "bin": { "myio-mcp": "server.mjs" + }, + "engines": { + "node": ">=20" } }, "node_modules/@hono/node-server": { From f02075e9dc1e15de7d79cfde4a139888be334283 Mon Sep 17 00:00:00 2001 From: Ryan Morton Date: Tue, 28 Jul 2026 19:31:59 -0600 Subject: [PATCH 9/9] docs: refresh release wordlist --- inst/WORDLIST | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inst/WORDLIST b/inst/WORDLIST index 1a3d65fe..f365898e 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -85,6 +85,7 @@ myIOOutput myIOProxy natively nrd +npm OHLC Okabe Ollama @@ -95,6 +96,7 @@ POSIXct pre precompiled Precompiled +PRs px reactable recomputation