@marimo-team/islands 0.26.1-dev1 → 0.26.1-dev102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConnectedDataExplorerComponent-DtwVgVpX.js → ConnectedDataExplorerComponent-BJBdnd0O.js} +23 -23
- package/dist/{ErrorBoundary-CnVR4XMW.js → ErrorBoundary-BKEnwpNS.js} +7 -7
- package/dist/{Plot-BHJLG4xm.js → Plot-gpsi2L3q.js} +76911 -88182
- package/dist/{abnfDiagram-VCTEODGH-BbZOIueZ.js → abnfDiagram-VCTEODGH-Ba0MYVW8.js} +2 -2
- package/dist/{any-language-editor-yG-YmLaK.js → any-language-editor-BNe8do3C.js} +5 -5
- package/dist/{architectureDiagram-5GKGNRK7-qjLjxapm.js → architectureDiagram-5GKGNRK7-7MqAehef.js} +1 -1
- package/dist/{assertNever-DywGMo-S.js → assertNever-5vhHGKOK.js} +14 -14
- package/dist/{button-qQhINE7z.js → button-Z2R2272J.js} +34 -31
- package/dist/{capabilities-DKqMqBzm.js → capabilities-ba3Dyv8n.js} +1 -1
- package/dist/{chat-ui-D5YPIONI.js → chat-ui-BbJTFtyC.js} +586 -585
- package/dist/{check-jchHMCfs.js → check-DUIc04aK.js} +1 -1
- package/dist/{chunk-IMKFNOWR-BzDY1_I7.js → chunk-IMKFNOWR-CAWA0HGB.js} +1 -1
- package/dist/{chunk-SHT3W25Y-DbHsMKdo.js → chunk-SHT3W25Y-BIwVQjG5.js} +1 -1
- package/dist/{chunk-SVP7TREG-CtwnwAE6.js → chunk-SVP7TREG-Cux251TB.js} +1 -1
- package/dist/{chunk-TICWLB2K-C5Z5QMbO.js → chunk-TICWLB2K-DJVQ6khO.js} +1 -1
- package/dist/circle-question-mark-evCnVIut.js +19 -0
- package/dist/{classDiagram-ZZMXUADV-B8E5Hn78.js → classDiagram-ZZMXUADV-Cwve77ev.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-DeGsK9bT.js → classDiagram-v2-VYDZK3BY-BAeHKXmD.js} +2 -2
- package/dist/{code-visibility-Cs-o5weM.js → code-visibility-C0y2uQ5I.js} +18 -18
- package/dist/{common-C92_m-1k.js → common-umUW2Aaj.js} +6124 -6068
- package/dist/{copy-icon-BI7vZHEW.js → copy-icon-CmNLxT5_.js} +3 -3
- package/dist/{createReducer-DdSLRfBT.js → createReducer-BUQhgLOI.js} +6 -6
- package/dist/{cynefinDiagram-5FMLGOSQ-NDedRwsw.js → cynefinDiagram-5FMLGOSQ-t4eEkPJh.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-De0sSZO7.js → dagre-GXQ25YYZ-IuZuI28B.js} +1 -1
- package/dist/{data-grid-overlay-editor-D32Gn15n.js → data-grid-overlay-editor-_toXAWar.js} +5 -5
- package/dist/{data-grid-types-DIX_pCco.js → data-grid-types-DBNnjiYJ.js} +2 -2
- package/dist/{diagram-S7CK7UJ4-wBtVl61y.js → diagram-S7CK7UJ4-D8R5Q_ok.js} +1 -1
- package/dist/{diagram-UQ7AKVKN-CKWE3c1T.js → diagram-UQ7AKVKN-BGuMPsr-.js} +1 -1
- package/dist/{diagram-VX7I27RA-D2Ac5198.js → diagram-VX7I27RA-BkTtpO8P.js} +1 -1
- package/dist/{diagram-Z3DM3KII-CYaFOQcI.js → diagram-Z3DM3KII-C0__Mxfm.js} +1 -1
- package/dist/{dialog-Ic6dh09m.js → dialog-BvjfalZ9.js} +28 -28
- package/dist/{dist-BvZpdAuG.js → dist-6B1_Ttbh.js} +1 -1
- package/dist/{dist-D1D56-GS.js → dist-B28poF32.js} +2 -2
- package/dist/{dist-BozTF_gH.js → dist-BBZ7lnMw.js} +2 -2
- package/dist/{dist-BfrgytDR.js → dist-BD8ZKF5t.js} +3 -3
- package/dist/{dist-DNkrY12t.js → dist-BG-7Qpaj.js} +3 -3
- package/dist/{dist-D92tYjLc.js → dist-BIaGGUbU.js} +13 -11
- package/dist/{dist-BagHbFqG.js → dist-BR5PU2Ph.js} +3 -3
- package/dist/{dist-DpYpG8Yc.js → dist-BidYR5m4.js} +3 -3
- package/dist/{dist-D95Cd4xm.js → dist-BkGYCvFX.js} +3 -3
- package/dist/{dist-DneeBk3K.js → dist-BmEyXT7K.js} +2 -2
- package/dist/{dist-BdUitvVW.js → dist-Bt0Wt6m9.js} +2 -2
- package/dist/{dist-CEomphG1.js → dist-CG2Sl0D4.js} +2 -2
- package/dist/{dist-BMz__bo5.js → dist-CQfpgadU.js} +3 -3
- package/dist/{dist-BreKIQqQ.js → dist-CVOPvfzN.js} +3 -3
- package/dist/{dist-BEcpQbZa.js → dist-Cm0iCeQQ.js} +3 -3
- package/dist/{dist-CDVvitRS.js → dist-Cnc14jEq.js} +2 -2
- package/dist/{dist-ChcBm3jk.js → dist-D3KPC38e.js} +4 -4
- package/dist/{dist-B1qu3Bez.js → dist-D7BXk27E.js} +3 -3
- package/dist/{dist-BsE4gQHj.js → dist-D9Qhvxvg.js} +1 -1
- package/dist/{dist-OmeAz0fR.js → dist-DJKajXDB.js} +3 -3
- package/dist/{dist-ObeTgSmf.js → dist-DYbNRTYG.js} +4 -4
- package/dist/{dist-Cshl6jBw.js → dist-DhtDWnzK.js} +2 -2
- package/dist/{dist-BunZKA_9.js → dist-_x2Jks2R.js} +2 -2
- package/dist/{dist-MggMo7OR.js → dist-m0MWV-aw.js} +1 -1
- package/dist/{dist-TGSwzj8a.js → dist-pPbYNVjd.js} +4 -4
- package/dist/{dropdown-menu-Dhv4fcNl.js → dropdown-menu-D0DeN-aL.js} +2108 -2108
- package/dist/{ebnfDiagram-PWID7BFC-Ds7f42dj.js → ebnfDiagram-PWID7BFC-CSESPZoz.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-b58Sz2Mc.js → erDiagram-RLTQ6QDP-DsDTtabH.js} +1 -1
- package/dist/{error-banner-CJVLr5_a.js → error-banner-CXLjTW24.js} +75 -80
- package/dist/{error-entries-BKlEsuk4.js → error-entries-DhZotdzQ.js} +1033 -867
- package/dist/{esm-B9n0caHs.js → esm-DY8dGAjJ.js} +23 -23
- package/dist/{esm-Bwp_FHP0.js → esm-Dw2ZydG_.js} +3 -3
- package/dist/{config-qTaTHnpE.js → export-context-CkgZeARR.js} +79 -68
- package/dist/{feedback-button-HXizISwe.js → feedback-button-B8h11wos.js} +123 -123
- package/dist/{flowDiagram-HODETNUW-BH9U7VZK.js → flowDiagram-HODETNUW-qxDPYbfV.js} +2 -2
- package/dist/{formats-BLNFWWhV.js → formats-CcQrzFo8.js} +3 -3
- package/dist/{glide-data-editor-Cha2TqyF.js → glide-data-editor-DTYsy8_7.js} +90 -90
- package/dist/{glide-utils-Cn2_NadX.js → glide-utils-CD8BaFTm.js} +4 -4
- package/dist/{globals-C4qZtAQ0.js → globals-EZS7lTul.js} +3 -3
- package/dist/{html-to-image-CNM0ZSFD.js → html-to-image-B8erjaaD.js} +24154 -24055
- package/dist/{infoDiagram-27XIBGKW-xbjwrcNi.js → infoDiagram-27XIBGKW-B5hq8RM_.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-DKtukhGS.js → ishikawaDiagram-5VMMS53U-DkHc_9ET.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-BEhlkZBb.js → kanban-definition-UXKFOSKX-CqkTFXmU.js} +1 -1
- package/dist/{loader-Bin_dutt.js → loader-CGrYn73j.js} +422 -374
- package/dist/main.js +9013 -8824
- package/dist/{mermaid-D1CZDNoB.js → mermaid-pmVHDUQA.js} +35 -35
- package/dist/{mindmap-definition-YA3MSWOX-DQcnJPcV.js → mindmap-definition-YA3MSWOX-D6cNa__z.js} +1 -1
- package/dist/{number-overlay-editor-BVmdbAY7.js → number-overlay-editor-DK1pWbJu.js} +3 -3
- package/dist/{pegDiagram-XKGWAZYB-BFQuPYfI.js → pegDiagram-XKGWAZYB-CmWJX_s1.js} +2 -2
- package/dist/{pencil-DVYzq-iR.js → pencil-CxMgOe04.js} +1 -1
- package/dist/{pieDiagram-E7YTZNPT-l7aqNrem.js → pieDiagram-E7YTZNPT-CAQAxHah.js} +1 -1
- package/dist/{process-output-DthYR2Te.js → process-output-C-2_O5Ry.js} +4 -4
- package/dist/{railroadDiagram-O6MQD6OU-6R3C1lwQ.js → railroadDiagram-O6MQD6OU-jlSsiQg3.js} +2 -2
- package/dist/{requirementDiagram-BXWQKSXE-DdWYu8fn.js → requirementDiagram-BXWQKSXE-DkDjfPhn.js} +1 -1
- package/dist/{reveal-component-B8gTDFli.js → reveal-component-BRoxPCNK.js} +1017 -1017
- package/dist/{select-CDUxhHZg.js → select-CEnB18uc.js} +364 -364
- package/dist/{sequenceDiagram-WJ2MYXX4-Dzp0dgRc.js → sequenceDiagram-WJ2MYXX4-DLywsGCW.js} +1 -1
- package/dist/{spec-ZAt4P01J.js → spec-Dz-Avv1m.js} +4 -4
- package/dist/{stateDiagram-D77RDMKH-BGnTUhFJ.js → stateDiagram-D77RDMKH-DUmlKwYU.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-DsJbmDf1.js → stateDiagram-v2-MP3YSRHH-D646KiXs.js} +2 -2
- package/dist/static-state-iw0PrHK4.js +57 -0
- package/dist/style.css +1 -1
- package/dist/{swimlanes-42K2YHIH-Bd4Bzh9r.js → swimlanes-42K2YHIH-L7B1GphF.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-BlY12Jf6.js → swimlanesDiagram-VR7AAH4N-DEu2wxtC.js} +2 -2
- package/dist/{swiper-component-DTdNB9wg.js → swiper-component-B2O8hF7b.js} +2 -2
- package/dist/{timeline-definition-24CTP7MA-m0LanyCH.js → timeline-definition-24CTP7MA-DDPyx1yG.js} +1 -1
- package/dist/toDate-BZg-byuO.js +13 -0
- package/dist/{toast-U3NpO2x3.js → toast-BTjH6fIf.js} +197 -197
- package/dist/{tooltip-UzJukb3F.js → tooltip-DyLdBIM4.js} +81 -81
- package/dist/{use-restore-focus-DaTVz6S6.js → use-restore-focus-DJ_-uSn_.js} +2006 -1997
- package/dist/{useDateFormatter-LQNtoXyh.js → useDateFormatter-HpKD0jEC.js} +2 -2
- package/dist/{useDeepCompareMemoize-CmNbQ9TT.js → useDeepCompareMemoize-CHx-NxMl.js} +1 -1
- package/dist/{useIframeCapabilities-HTZiVlGV.js → useIframeCapabilities-_0KX0nu_.js} +1 -1
- package/dist/{useLifecycle-DTMczKkf.js → useLifecycle-tPpAt-OE.js} +2 -2
- package/dist/{vega-component-ZTdbCcwI.js → vega-component-BzNDFvQf.js} +212 -208
- package/dist/{vennDiagram-4TSXK5OY-BJ7vqDmn.js → vennDiagram-4TSXK5OY-CRwWeb7g.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-D5kWacsn.js → wardleyDiagram-VM6X3IG4-DVlG9eoq.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-gr15Ws_z.js → xychartDiagram-S5SC5T6Z-CM32AISp.js} +1 -1
- package/package.json +4 -5
- package/src/__mocks__/animation-frames.ts +31 -0
- package/src/__mocks__/executions.ts +51 -23
- package/src/__mocks__/intersection-observer.ts +45 -0
- package/src/__mocks__/notebook.ts +1 -1
- package/src/__tests__/branded.ts +4 -0
- package/src/__tests__/notebook-analysis.ts +48 -0
- package/src/__tests__/render-tracker.ts +15 -0
- package/src/__tests__/setup.ts +3 -0
- package/src/components/app-config/__tests__/add-model-discovery.test.tsx +30 -0
- package/src/components/app-config/ai-config.tsx +5 -3
- package/src/components/app-config/user-config-form.tsx +1 -1
- package/src/components/data-table/__tests__/export-actions.test.tsx +79 -0
- package/src/components/data-table/export-actions.tsx +64 -19
- package/src/components/data-table/schemas.ts +1 -0
- package/src/components/databases/engine-variable.tsx +2 -2
- package/src/components/dependency-graph/panels.tsx +2 -2
- package/src/components/editor/__tests__/cell-renders.test.tsx +116 -0
- package/src/components/editor/actions/__tests__/name-cell-input.test.tsx +1 -1
- package/src/components/editor/actions/useCellActionButton.tsx +2 -8
- package/src/components/editor/ai/__tests__/completion-utils.test.ts +28 -61
- package/src/components/editor/cell/CreateCellButton.tsx +69 -40
- package/src/components/editor/cell/__tests__/CreateCellButton.test.tsx +49 -0
- package/src/components/editor/cell/__tests__/cell-context-menu.test.tsx +126 -0
- package/src/components/editor/cell/__tests__/useRunCells.test.tsx +5 -5
- package/src/components/editor/cell/cell-context-menu.tsx +202 -111
- package/src/components/editor/cell/code/__tests__/code-placeholder.test.tsx +40 -0
- package/src/components/editor/cell/code/cell-editor.tsx +49 -108
- package/src/components/editor/cell/code/code-placeholder.css +61 -11
- package/src/components/editor/cell/code/code-placeholder.tsx +52 -27
- package/src/components/editor/cell/collapse.tsx +6 -3
- package/src/components/editor/cell/useSplitCell.tsx +2 -2
- package/src/components/editor/chrome/panels/__tests__/secrets-panel.test.tsx +57 -0
- package/src/components/editor/chrome/panels/secrets-panel.tsx +36 -9
- package/src/components/editor/chrome/panels/secrets-utils.ts +20 -0
- package/src/components/editor/chrome/wrapper/__tests__/document-sync-status.test.tsx +5 -2
- package/src/components/editor/chrome/wrapper/__tests__/pending-ai-cells.test.tsx +6 -10
- package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +240 -93
- package/src/components/editor/errors/auto-fix.tsx +8 -7
- package/src/components/editor/errors/send-error-report-button.tsx +139 -41
- package/src/components/editor/header/status.tsx +5 -2
- package/src/components/editor/navigation/__tests__/navigation.test.ts +3 -16
- package/src/components/editor/navigation/focus-utils.ts +20 -8
- package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +3 -11
- package/src/components/editor/navigation/navigation.ts +2 -2
- package/src/components/editor/notebook-cell.tsx +15 -24
- package/src/components/editor/output/MarimoTracebackOutput.tsx +2 -2
- package/src/components/editor/output/console/ConsoleOutput.tsx +77 -50
- package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +28 -0
- package/src/components/editor/renderers/cells-renderer.tsx +3 -2
- package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +6 -9
- package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +2 -5
- package/src/components/find-replace/find-replace.tsx +3 -7
- package/src/components/icons/__tests__/large-spinner.test.tsx +5 -4
- package/src/components/scratchpad/scratchpad.tsx +2 -2
- package/src/components/tracing/tracing-keyboard.test.tsx +4 -3
- package/src/components/ui/__tests__/button-shortcut.test.tsx +22 -0
- package/src/components/ui/__tests__/fullscreen.test.tsx +83 -1
- package/src/components/ui/button.tsx +5 -1
- package/src/components/ui/fullscreen.tsx +43 -89
- package/src/components/variables/__tests__/variables-table.test.tsx +1 -2
- package/src/core/MarimoApp.tsx +1 -1
- package/src/core/__tests__/MarimoApp.test.tsx +147 -0
- package/src/core/ai/__tests__/staged-cells.test.ts +6 -39
- package/src/core/ai/context/providers/__tests__/error.test.ts +6 -3
- package/src/core/ai/staged-cells.ts +8 -35
- package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +15 -13
- package/src/core/ai/tools/edit-notebook-tool.ts +13 -8
- package/src/core/cells/__tests__/actions.test.ts +2 -2
- package/src/core/cells/__tests__/add-missing-import.test.ts +14 -9
- package/src/core/cells/__tests__/arrange.test.ts +1 -1
- package/src/core/cells/__tests__/cell-editor-view.test.ts +44 -0
- package/src/core/cells/__tests__/cells.test.ts +0 -1
- package/src/core/cells/__tests__/focus.test.ts +1 -7
- package/src/core/cells/__tests__/harness.ts +9 -8
- package/src/core/cells/__tests__/layout.test.ts +1 -1
- package/src/core/cells/__tests__/pending-delete-service.test.tsx +121 -11
- package/src/core/cells/__tests__/runs.test.ts +14 -14
- package/src/core/cells/__tests__/utils.test.ts +3 -2
- package/src/core/cells/actions.ts +6 -6
- package/src/core/cells/add-missing-import.ts +2 -3
- package/src/core/cells/cells.ts +40 -27
- package/src/core/cells/document.ts +1 -2
- package/src/core/cells/execution-console.ts +10 -5
- package/src/core/cells/focus.ts +1 -1
- package/src/core/cells/ids.ts +2 -4
- package/src/core/cells/pending-delete-service.ts +97 -85
- package/src/core/cells/runs.ts +7 -5
- package/src/core/cells/scrollCellIntoView.ts +4 -14
- package/src/core/cells/session.ts +8 -5
- package/src/core/cells/utils.ts +0 -13
- package/src/core/codemirror/__tests__/cell-documents.test.ts +79 -0
- package/src/core/codemirror/__tests__/debounced-editor-update.test.ts +72 -0
- package/src/core/codemirror/__tests__/editor-mount-scheduler.test.ts +75 -105
- package/src/core/codemirror/__tests__/format.test.ts +85 -63
- package/src/core/codemirror/__tests__/setup.test.ts +61 -1
- package/src/core/codemirror/__tests__/use-lazy-editor-mount.test.tsx +198 -0
- package/src/core/codemirror/cell-documents.ts +132 -0
- package/src/core/codemirror/cells/debugger-decorations.ts +22 -18
- package/src/core/codemirror/cells/line-timing-decorations.ts +13 -11
- package/src/core/codemirror/cells/traceback-decorations.ts +10 -11
- package/src/core/codemirror/code-lens/__tests__/entities.test.ts +7 -11
- package/src/core/codemirror/code-lens/__tests__/extension.test.ts +38 -12
- package/src/core/codemirror/code-lens/__tests__/perf.test.ts +7 -9
- package/src/core/codemirror/code-lens/extension.ts +21 -13
- package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +9 -14
- package/src/core/codemirror/copilot/getCodes.ts +3 -14
- package/src/core/codemirror/debounced-editor-update.ts +41 -0
- package/src/core/codemirror/editor-mount-scheduler.ts +41 -48
- package/src/core/codemirror/extensions.ts +2 -2
- package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +42 -16
- package/src/core/codemirror/find-replace/__tests__/search-highlight.test.ts +30 -0
- package/src/core/codemirror/find-replace/__tests__/unmounted-cells.test.ts +145 -0
- package/src/core/codemirror/find-replace/navigate.ts +88 -129
- package/src/core/codemirror/find-replace/search-highlight.ts +3 -1
- package/src/core/codemirror/find-replace/state.ts +7 -2
- package/src/core/codemirror/format.ts +25 -31
- package/src/core/codemirror/go-to-definition/__tests__/underline.test.ts +58 -0
- package/src/core/codemirror/go-to-definition/__tests__/utils.test.ts +24 -44
- package/src/core/codemirror/go-to-definition/extension.ts +9 -7
- package/src/core/codemirror/go-to-definition/underline.ts +39 -48
- package/src/core/codemirror/keymaps/__tests__/keymaps.test.ts +51 -2
- package/src/core/codemirror/keymaps/vim.ts +30 -1
- package/src/core/codemirror/language/__tests__/sql.test.ts +36 -0
- package/src/core/codemirror/language/cell-code.ts +7 -0
- package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +2 -18
- package/src/core/codemirror/language/languages/sql/sql.ts +3 -0
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +25 -0
- package/src/core/codemirror/lsp/notebook-lsp.ts +6 -16
- package/src/core/codemirror/placeholder/extensions.ts +26 -24
- package/src/core/codemirror/reactive-references/__tests__/extension.test.ts +54 -0
- package/src/core/codemirror/reactive-references/extension.ts +30 -21
- package/src/core/codemirror/use-lazy-editor-mount.ts +70 -0
- package/src/core/codemirror/utils.ts +2 -6
- package/src/core/datasets/__tests__/data-source.test.ts +15 -17
- package/src/core/datasets/data-source-connections.ts +8 -11
- package/src/core/datasets/state.ts +7 -12
- package/src/core/dom/__tests__/uiregistry.test.ts +27 -0
- package/src/core/dom/uiregistry.ts +9 -7
- package/src/core/executions/__tests__/atoms.test.ts +211 -5
- package/src/core/executions/__tests__/freshness.test.ts +65 -56
- package/src/core/executions/__tests__/interrupt.test.ts +5 -3
- package/src/core/executions/__tests__/output-lifecycle.test.ts +95 -7
- package/src/core/executions/__tests__/output.test.ts +5 -3
- package/src/core/executions/__tests__/run.test.ts +4 -4
- package/src/core/executions/__tests__/select.test.ts +108 -69
- package/src/core/executions/atoms.ts +248 -83
- package/src/core/executions/freshness.ts +7 -7
- package/src/core/executions/hooks.ts +15 -59
- package/src/core/executions/index.ts +2 -0
- package/src/core/executions/output.ts +49 -35
- package/src/core/executions/select.ts +90 -37
- package/src/core/export/__tests__/hooks.test.ts +1 -1
- package/src/core/islands/__tests__/bridge.test.ts +1 -1
- package/src/core/islands/bootstrap.ts +7 -7
- package/src/core/islands/bridge.ts +1 -1
- package/src/core/meta/__tests__/code-visibility.test.tsx +3 -2
- package/src/core/notebook/document/__tests__/codemirror.test.ts +8 -6
- package/src/core/notebook/document/__tests__/draft.test.ts +56 -58
- package/src/core/notebook/document/__tests__/fixtures.ts +8 -7
- package/src/core/notebook/document/__tests__/hooks.test.tsx +39 -35
- package/src/core/notebook/document/__tests__/lifecycle-scenarios.test.ts +8 -5
- package/src/core/notebook/document/__tests__/model.test.ts +8 -5
- package/src/core/notebook/document/__tests__/protocol-fixtures.ts +2 -2
- package/src/core/notebook/document/__tests__/recovery-scenarios.test.ts +37 -32
- package/src/core/notebook/document/__tests__/scenarios.test.ts +49 -45
- package/src/core/notebook/document/__tests__/state.test.ts +59 -56
- package/src/core/notebook/document/__tests__/submission.test.ts +15 -12
- package/src/core/notebook/document/__tests__/test-host.ts +3 -2
- package/src/core/notebook/document/__tests__/user.ts +7 -3
- package/src/core/notebook/document/draft.ts +29 -11
- package/src/core/notebook/document/state.ts +7 -6
- package/src/core/notebook/replica/__tests__/document.test.ts +9 -5
- package/src/core/notebook/replica/__tests__/executions.test.ts +90 -25
- package/src/core/notebook/replica/__tests__/fixtures.ts +7 -2
- package/src/core/notebook/replica/__tests__/frame.test.ts +206 -0
- package/src/core/notebook/replica/__tests__/once-per-frame.test.ts +95 -0
- package/src/core/notebook/replica/__tests__/replica.test.ts +53 -9
- package/src/core/notebook/replica/__tests__/results.test.ts +27 -29
- package/src/core/notebook/replica/backend.ts +4 -1
- package/src/core/notebook/replica/execution-state.ts +2 -2
- package/src/core/notebook/replica/frame.ts +54 -0
- package/src/core/notebook/replica/index.ts +1 -0
- package/src/core/notebook/replica/once-per-frame.ts +60 -0
- package/src/core/notebook/replica/replica.ts +27 -6
- package/src/core/notebook/replica/resources/analysis.ts +1 -1
- package/src/core/notebook/replica/resources/document.ts +9 -8
- package/src/core/notebook/replica/resources/executions.ts +197 -78
- package/src/core/notebook/replica/resources/results.ts +8 -14
- package/src/core/saving/__tests__/document.test.tsx +1 -1
- package/src/core/saving/__tests__/state.test.ts +2 -2
- package/src/core/session/__tests__/useNotebookReplica.hook.test.tsx +55 -9
- package/src/core/session/__tests__/useNotebookSession.hook.test.tsx +230 -12
- package/src/core/session/active-notebook.ts +10 -1
- package/src/core/session/useNotebookReplica.ts +15 -2
- package/src/core/session/useNotebookSession.tsx +38 -46
- package/src/core/state/__tests__/atom-with-selected-inputs.test.ts +48 -0
- package/src/core/state/__tests__/create-keyed-selector-hook.test.tsx +137 -0
- package/src/core/state/atom-with-selected-inputs.ts +24 -0
- package/src/core/state/create-keyed-atom-hook.ts +18 -0
- package/src/core/state/create-keyed-selector-hook.ts +22 -0
- package/src/core/storage/__tests__/state.test.ts +6 -9
- package/src/core/storage/state.ts +5 -8
- package/src/core/transports/__tests__/static.test.ts +24 -20
- package/src/core/transports/static.ts +3 -2
- package/src/core/variables/state.ts +73 -68
- package/src/core/variables/types.ts +2 -2
- package/src/core/vscode/__tests__/is-in-vscode.test.ts +36 -0
- package/src/core/vscode/is-in-vscode.ts +2 -2
- package/src/core/wasm/__tests__/bridge.test.ts +73 -1
- package/src/core/wasm/bridge.ts +5 -4
- package/src/plugins/core/__test__/trusted-url.test.ts +53 -1
- package/src/plugins/core/trusted-url.ts +59 -1
- package/src/plugins/impl/TextInputPlugin.tsx +2 -1
- package/src/plugins/impl/__test__/text-labels.test.tsx +46 -1
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +11 -4
- package/src/plugins/impl/plotly/__tests__/PlotlyPlugin.test.tsx +51 -1
- package/src/plugins/impl/plotly/__tests__/legacy-mapbox.test.ts +132 -0
- package/src/plugins/impl/plotly/__tests__/selection.test.ts +14 -35
- package/src/plugins/impl/plotly/legacy-mapbox.ts +130 -0
- package/src/plugins/impl/plotly/maplibre.css +216 -0
- package/src/plugins/impl/vega/__tests__/resolve-data.test.ts +147 -2
- package/src/plugins/impl/vega/loader.ts +49 -2
- package/src/plugins/impl/vega/vega-component.tsx +3 -0
- package/src/utils/__tests__/lazy.test.tsx +33 -0
- package/src/utils/__tests__/shared-intersection-observer.test.ts +49 -0
- package/src/utils/__tests__/shared-resource.test.ts +107 -0
- package/src/utils/arrays.ts +4 -1
- package/src/utils/lazy.tsx +74 -0
- package/src/utils/shared-intersection-observer.ts +53 -0
- package/src/utils/shared-resource.ts +59 -0
- package/dist/static-state-C4bAlKTU.js +0 -68
- package/src/core/variables/__tests__/state.test.ts +0 -148
- package/src/plugins/impl/plotly/mapbox.css +0 -359
- package/src/utils/lazy.ts +0 -35
|
@@ -1,27 +1,57 @@
|
|
|
1
|
-
import { g as e } from "./button-
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import {
|
|
1
|
+
import { g as e } from "./button-Z2R2272J.js";
|
|
2
|
+
import { Ct as t } from "./use-restore-focus-DJ_-uSn_.js";
|
|
3
|
+
import { t as n } from "./objects-DCmMvZtn.js";
|
|
4
|
+
import { i as r, n as i, o as a, r as o } from "./export-context-CkgZeARR.js";
|
|
5
|
+
import { $ as s, a as c, c as l, ht as u, mt as d, o as ee } from "./vega-loader.browser-Co9gYE8Z.js";
|
|
6
|
+
//#region src/plugins/core/trusted-url.ts
|
|
7
|
+
function te(e) {
|
|
8
|
+
return typeof e != "string" || e.length === 0 ? !1 : !!(/^(\.?\/)?@file\/[^?#]+$/.test(e) || ae(e));
|
|
9
|
+
}
|
|
10
|
+
function ne(e) {
|
|
11
|
+
if (o()) return e;
|
|
12
|
+
let t;
|
|
13
|
+
try {
|
|
14
|
+
t = re(e);
|
|
15
|
+
} catch {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
if (t.protocol === "data:" || t.protocol === "blob:") return t.href;
|
|
19
|
+
if (t.protocol !== "http:" && t.protocol !== "https:") return null;
|
|
20
|
+
let n = re("./@file/");
|
|
21
|
+
return t.origin === n.origin ? t.pathname.startsWith(n.pathname) ? t.href : null : t.origin === window.location.origin ? null : t.href;
|
|
22
|
+
}
|
|
23
|
+
function re(e) {
|
|
24
|
+
let t = a().httpURL.toString().replace(/^blob:/, "");
|
|
25
|
+
return new URL(e, t);
|
|
26
|
+
}
|
|
27
|
+
function ie() {
|
|
28
|
+
return t.get(r) || i();
|
|
29
|
+
}
|
|
30
|
+
function ae(e) {
|
|
31
|
+
return e.startsWith("data:text/javascript;base64,") || e.startsWith("data:application/javascript;base64,") || e.startsWith("data:text/css;base64,") ? ie() : !1;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
4
34
|
//#region ../node_modules/.pnpm/vega-tooltip@1.1.0/node_modules/vega-tooltip/build/index.js
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
if (
|
|
8
|
-
if (
|
|
9
|
-
let
|
|
10
|
-
a && (
|
|
11
|
-
let
|
|
12
|
-
if (
|
|
13
|
-
|
|
14
|
-
for (let e of
|
|
15
|
-
let
|
|
16
|
-
|
|
35
|
+
var oe = { version: "1.1.0" };
|
|
36
|
+
function se(e, t, n, r) {
|
|
37
|
+
if (u(e)) return `[${e.map((e) => t(s(e) ? e : le(e, n))).join(", ")}]`;
|
|
38
|
+
if (d(e)) {
|
|
39
|
+
let i = "", { title: a, image: o, ...s } = e;
|
|
40
|
+
a && (i += `<h2>${t(a)}</h2>`), o && (i += `<img src="${new URL(t(o), r || location.href).href}">`);
|
|
41
|
+
let c = Object.keys(s);
|
|
42
|
+
if (c.length > 0) {
|
|
43
|
+
i += "<table>";
|
|
44
|
+
for (let e of c) {
|
|
45
|
+
let r = s[e];
|
|
46
|
+
r !== void 0 && (d(r) && (r = le(r, n)), i += `<tr><td class="key">${t(e)}</td><td class="value">${t(r)}</td></tr>`);
|
|
17
47
|
}
|
|
18
|
-
|
|
48
|
+
i += "</table>";
|
|
19
49
|
}
|
|
20
|
-
return
|
|
50
|
+
return i || "{}";
|
|
21
51
|
}
|
|
22
52
|
return t(e);
|
|
23
53
|
}
|
|
24
|
-
function
|
|
54
|
+
function ce(e) {
|
|
25
55
|
let t = [];
|
|
26
56
|
return function(n, r) {
|
|
27
57
|
if (typeof r != "object" || !r) return r;
|
|
@@ -29,19 +59,19 @@ function u(e) {
|
|
|
29
59
|
return t.length = i, t.length > e ? "[Object]" : t.indexOf(r) >= 0 ? "[Circular]" : (t.push(r), r);
|
|
30
60
|
};
|
|
31
61
|
}
|
|
32
|
-
function
|
|
33
|
-
return JSON.stringify(e,
|
|
62
|
+
function le(e, t) {
|
|
63
|
+
return JSON.stringify(e, ce(t));
|
|
34
64
|
}
|
|
35
|
-
var
|
|
65
|
+
var ue = "#vg-tooltip-element {\n visibility: hidden;\n padding: 8px;\n position: fixed;\n z-index: 1000;\n font-family: sans-serif;\n font-size: 11px;\n border-radius: 3px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n white-space: pre-line;\n}\n#vg-tooltip-element.visible {\n visibility: visible;\n}\n#vg-tooltip-element h2 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 13px;\n}\n#vg-tooltip-element table {\n border-spacing: 0;\n}\n#vg-tooltip-element table tr {\n border: none;\n}\n#vg-tooltip-element table tr td {\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: 2px;\n padding-bottom: 2px;\n vertical-align: text-top;\n}\n#vg-tooltip-element table tr td.key {\n color: #808080;\n max-width: 150px;\n text-align: right;\n padding-right: 4px;\n}\n#vg-tooltip-element table tr td.value {\n display: block;\n max-width: 300px;\n max-height: 7em;\n text-align: left;\n}\n#vg-tooltip-element {\n /* The default theme is the light theme. */\n background-color: rgba(255, 255, 255, 0.95);\n border: 1px solid #d9d9d9;\n color: black;\n}\n#vg-tooltip-element.dark-theme {\n background-color: rgba(32, 32, 32, 0.9);\n border: 1px solid #f5f5f5;\n color: white;\n}\n#vg-tooltip-element.dark-theme td.key {\n color: #bfbfbf;\n}\n", de = "vg-tooltip-element", fe = {
|
|
36
66
|
offsetX: 10,
|
|
37
67
|
offsetY: 10,
|
|
38
|
-
id:
|
|
68
|
+
id: de,
|
|
39
69
|
styleId: "vega-tooltip-style",
|
|
40
70
|
theme: "light",
|
|
41
71
|
disableDefaultStyle: !1,
|
|
42
|
-
sanitize:
|
|
72
|
+
sanitize: pe,
|
|
43
73
|
maxDepth: 2,
|
|
44
|
-
formatTooltip:
|
|
74
|
+
formatTooltip: se,
|
|
45
75
|
baseURL: "",
|
|
46
76
|
anchor: "cursor",
|
|
47
77
|
position: [
|
|
@@ -55,15 +85,15 @@ var ee = "#vg-tooltip-element {\n visibility: hidden;\n padding: 8px;\n posit
|
|
|
55
85
|
"bottom-right"
|
|
56
86
|
]
|
|
57
87
|
};
|
|
58
|
-
function
|
|
88
|
+
function pe(e) {
|
|
59
89
|
return String(e).replace(/&/g, "&").replace(/</g, "<");
|
|
60
90
|
}
|
|
61
|
-
function
|
|
91
|
+
function me(e) {
|
|
62
92
|
if (!/^[A-Za-z]+[-:.\w]*$/.test(e)) throw Error("Invalid HTML ID");
|
|
63
|
-
return
|
|
93
|
+
return ue.toString().replaceAll(de, e);
|
|
64
94
|
}
|
|
65
|
-
function
|
|
66
|
-
let i =
|
|
95
|
+
function he(e, t, { offsetX: n, offsetY: r }) {
|
|
96
|
+
let i = ve({
|
|
67
97
|
x1: e.clientX,
|
|
68
98
|
x2: e.clientX,
|
|
69
99
|
y1: e.clientY,
|
|
@@ -74,15 +104,15 @@ function ae(e, t, { offsetX: n, offsetY: r }) {
|
|
|
74
104
|
"bottom-left",
|
|
75
105
|
"top-right",
|
|
76
106
|
"top-left"
|
|
77
|
-
]) if (
|
|
107
|
+
]) if (ye(i[e], t)) return i[e];
|
|
78
108
|
return i["top-left"];
|
|
79
109
|
}
|
|
80
|
-
function
|
|
81
|
-
let { position: a, offsetX: o, offsetY: s } = i, c = e._el.getBoundingClientRect(), l = e._origin, u =
|
|
82
|
-
for (let e of d) if (
|
|
83
|
-
return
|
|
110
|
+
function ge(e, t, n, r, i) {
|
|
111
|
+
let { position: a, offsetX: o, offsetY: s } = i, c = e._el.getBoundingClientRect(), l = e._origin, u = ve(_e(c, l, n), r, o, s), d = Array.isArray(a) ? a : [a];
|
|
112
|
+
for (let e of d) if (ye(u[e], r) && !be(t, u[e], r)) return u[e];
|
|
113
|
+
return he(t, r, i);
|
|
84
114
|
}
|
|
85
|
-
function
|
|
115
|
+
function _e(e, t, n) {
|
|
86
116
|
let r = n.isVoronoi ? n.datum.bounds : n.bounds, i = e.left + t[0] + r.x1, a = e.top + t[1] + r.y1, o = n;
|
|
87
117
|
for (; o.mark.group;) o = o.mark.group, i += o.x ?? 0, a += o.y ?? 0;
|
|
88
118
|
let s = r.x2 - r.x1, c = r.y2 - r.y1;
|
|
@@ -93,7 +123,7 @@ function se(e, t, n) {
|
|
|
93
123
|
y2: a + c
|
|
94
124
|
};
|
|
95
125
|
}
|
|
96
|
-
function
|
|
126
|
+
function ve(e, t, n, r) {
|
|
97
127
|
let i = (e.x1 + e.x2) / 2, a = (e.y1 + e.y2) / 2, o = e.x1 - t.width - n, s = i - t.width / 2, c = e.x2 + n, l = e.y1 - t.height - r, u = a - t.height / 2, d = e.y2 + r;
|
|
98
128
|
return {
|
|
99
129
|
top: {
|
|
@@ -130,25 +160,25 @@ function ce(e, t, n, r) {
|
|
|
130
160
|
}
|
|
131
161
|
};
|
|
132
162
|
}
|
|
133
|
-
function
|
|
163
|
+
function ye(e, t) {
|
|
134
164
|
return e.x >= 0 && e.y >= 0 && e.x + t.width <= window.innerWidth && e.y + t.height <= window.innerHeight;
|
|
135
165
|
}
|
|
136
|
-
function
|
|
166
|
+
function be(e, t, n) {
|
|
137
167
|
return e.clientX >= t.x && e.clientX <= t.x + n.width && e.clientY >= t.y && e.clientY <= t.y + n.height;
|
|
138
168
|
}
|
|
139
|
-
var
|
|
169
|
+
var xe = class {
|
|
140
170
|
call;
|
|
141
171
|
options;
|
|
142
172
|
el;
|
|
143
173
|
constructor(e) {
|
|
144
174
|
this.options = {
|
|
145
|
-
...
|
|
175
|
+
...fe,
|
|
146
176
|
...e
|
|
147
177
|
};
|
|
148
178
|
let t = this.options.id;
|
|
149
179
|
if (this.el = null, this.call = this.tooltipHandler.bind(this), !this.options.disableDefaultStyle && !document.getElementById(this.options.styleId)) {
|
|
150
180
|
let e = document.createElement("style");
|
|
151
|
-
e.setAttribute("id", this.options.styleId), e.innerHTML =
|
|
181
|
+
e.setAttribute("id", this.options.styleId), e.innerHTML = me(t);
|
|
152
182
|
let n = document.head;
|
|
153
183
|
n.childNodes.length > 0 ? n.insertBefore(e, n.childNodes[0]) : n.appendChild(e);
|
|
154
184
|
}
|
|
@@ -159,14 +189,14 @@ var de = class {
|
|
|
159
189
|
return;
|
|
160
190
|
}
|
|
161
191
|
this.el.innerHTML = this.options.formatTooltip(r, this.options.sanitize, this.options.maxDepth, this.options.baseURL), this.el.classList.add("visible", `${this.options.theme}-theme`);
|
|
162
|
-
let { x: i, y: a } = this.options.anchor === "mark" ?
|
|
192
|
+
let { x: i, y: a } = this.options.anchor === "mark" ? ge(e, t, n, this.el.getBoundingClientRect(), this.options) : he(t, this.el.getBoundingClientRect(), this.options);
|
|
163
193
|
this.el.style.top = `${a}px`, this.el.style.left = `${i}px`;
|
|
164
194
|
}
|
|
165
195
|
};
|
|
166
|
-
|
|
196
|
+
oe.version;
|
|
167
197
|
//#endregion
|
|
168
198
|
//#region src/components/charts/tooltip.ts
|
|
169
|
-
var
|
|
199
|
+
var Se = new xe(), Ce = Uint8Array.of(65, 82, 82, 79, 87, 49), f = {
|
|
170
200
|
V1: 0,
|
|
171
201
|
V2: 1,
|
|
172
202
|
V3: 2,
|
|
@@ -208,7 +238,7 @@ var fe = new de(), pe = Uint8Array.of(65, 82, 82, 79, 87, 49), f = {
|
|
|
208
238
|
Utf8View: 24,
|
|
209
239
|
ListView: 25,
|
|
210
240
|
LargeListView: 26
|
|
211
|
-
},
|
|
241
|
+
}, we = {
|
|
212
242
|
HALF: 0,
|
|
213
243
|
SINGLE: 1,
|
|
214
244
|
DOUBLE: 2
|
|
@@ -227,19 +257,19 @@ var fe = new de(), pe = Uint8Array.of(65, 82, 82, 79, 87, 49), f = {
|
|
|
227
257
|
}, v = {
|
|
228
258
|
Sparse: 0,
|
|
229
259
|
Dense: 1
|
|
230
|
-
},
|
|
231
|
-
function
|
|
260
|
+
}, Te = Uint8Array, Ee = Uint16Array, De = Uint32Array, Oe = BigUint64Array, ke = Int8Array, Ae = Int16Array, y = Int32Array, b = BigInt64Array, je = Float32Array, x = Float64Array;
|
|
261
|
+
function Me(e, t) {
|
|
232
262
|
let n = Math.log2(e) - 3;
|
|
233
263
|
return (t ? [
|
|
234
|
-
|
|
235
|
-
|
|
264
|
+
ke,
|
|
265
|
+
Ae,
|
|
236
266
|
y,
|
|
237
267
|
b
|
|
238
268
|
] : [
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
269
|
+
Te,
|
|
270
|
+
Ee,
|
|
271
|
+
De,
|
|
272
|
+
Oe
|
|
243
273
|
])[n];
|
|
244
274
|
}
|
|
245
275
|
Object.getPrototypeOf(Int8Array);
|
|
@@ -264,34 +294,34 @@ function C(e, t, n) {
|
|
|
264
294
|
function w(e, t, n) {
|
|
265
295
|
return t = Array.isArray(t) ? t : Object.values(t), C(e, (e) => t.includes(e), n ?? (() => `${e} must be one of ${t}`));
|
|
266
296
|
}
|
|
267
|
-
function
|
|
297
|
+
function Ne(e, t) {
|
|
268
298
|
for (let [n, r] of Object.entries(e)) if (r === t) return n;
|
|
269
299
|
return "<Unknown>";
|
|
270
300
|
}
|
|
271
301
|
//#endregion
|
|
272
302
|
//#region ../node_modules/.pnpm/@uwdata+flechette@1.1.2/node_modules/@uwdata/flechette/src/data-types.js
|
|
273
|
-
var T = (e) => `Unsupported data type: "${
|
|
303
|
+
var T = (e) => `Unsupported data type: "${Ne(m, e)}" (id ${e})`, Pe = (e, t, n = !0, r = null) => ({
|
|
274
304
|
name: e,
|
|
275
305
|
type: t,
|
|
276
306
|
nullable: n,
|
|
277
307
|
metadata: r
|
|
278
308
|
});
|
|
279
|
-
function
|
|
280
|
-
return Object.hasOwn(e, "name") &&
|
|
309
|
+
function Fe(e) {
|
|
310
|
+
return Object.hasOwn(e, "name") && Ie(e.type);
|
|
281
311
|
}
|
|
282
|
-
function
|
|
312
|
+
function Ie(e) {
|
|
283
313
|
return typeof e?.typeId == "number";
|
|
284
314
|
}
|
|
285
315
|
function E(e, t = "", n = !0) {
|
|
286
|
-
return
|
|
316
|
+
return Fe(e) ? e : Pe(t, C(e, Ie, () => "Data type expected."), n);
|
|
287
317
|
}
|
|
288
|
-
var
|
|
318
|
+
var Le = (e, t, n = !1, r = -1) => ({
|
|
289
319
|
typeId: m.Dictionary,
|
|
290
320
|
id: r,
|
|
291
321
|
dictionary: e,
|
|
292
|
-
indices: t ||
|
|
322
|
+
indices: t || ze(),
|
|
293
323
|
ordered: n
|
|
294
|
-
}),
|
|
324
|
+
}), Re = (e = 32, t = !0) => ({
|
|
295
325
|
typeId: m.Int,
|
|
296
326
|
bitWidth: w(e, [
|
|
297
327
|
8,
|
|
@@ -300,53 +330,53 @@ var De = (e, t, n = !1, r = -1) => ({
|
|
|
300
330
|
64
|
|
301
331
|
]),
|
|
302
332
|
signed: t,
|
|
303
|
-
values:
|
|
304
|
-
}),
|
|
333
|
+
values: Me(e, t)
|
|
334
|
+
}), ze = () => Re(32), Be = (e = 2) => ({
|
|
305
335
|
typeId: m.Float,
|
|
306
|
-
precision: w(e,
|
|
336
|
+
precision: w(e, we),
|
|
307
337
|
values: [
|
|
308
|
-
|
|
309
|
-
|
|
338
|
+
Ee,
|
|
339
|
+
je,
|
|
310
340
|
x
|
|
311
341
|
][e]
|
|
312
|
-
}),
|
|
342
|
+
}), Ve = () => ({
|
|
313
343
|
typeId: m.Binary,
|
|
314
344
|
offsets: y
|
|
315
|
-
}),
|
|
345
|
+
}), He = () => ({
|
|
316
346
|
typeId: m.Utf8,
|
|
317
347
|
offsets: y
|
|
318
|
-
}),
|
|
348
|
+
}), Ue = (e, t, n = 128) => ({
|
|
319
349
|
typeId: m.Decimal,
|
|
320
350
|
precision: e,
|
|
321
351
|
scale: t,
|
|
322
352
|
bitWidth: w(n, [128, 256]),
|
|
323
|
-
values:
|
|
324
|
-
}),
|
|
353
|
+
values: Oe
|
|
354
|
+
}), We = (e) => ({
|
|
325
355
|
typeId: m.Date,
|
|
326
356
|
unit: w(e, h),
|
|
327
357
|
values: e === h.DAY ? y : b
|
|
328
|
-
}),
|
|
358
|
+
}), Ge = (e = g.MILLISECOND, t = 32) => ({
|
|
329
359
|
typeId: m.Time,
|
|
330
360
|
unit: w(e, g),
|
|
331
361
|
bitWidth: w(t, [32, 64]),
|
|
332
362
|
values: t === 32 ? y : b
|
|
333
|
-
}),
|
|
363
|
+
}), Ke = (e = g.MILLISECOND, t = null) => ({
|
|
334
364
|
typeId: m.Timestamp,
|
|
335
365
|
unit: w(e, g),
|
|
336
366
|
timezone: t,
|
|
337
367
|
values: b
|
|
338
|
-
}),
|
|
368
|
+
}), qe = (e = _.MONTH_DAY_NANO) => ({
|
|
339
369
|
typeId: m.Interval,
|
|
340
370
|
unit: w(e, _),
|
|
341
371
|
values: e === _.MONTH_DAY_NANO ? void 0 : y
|
|
342
|
-
}),
|
|
372
|
+
}), Je = (e) => ({
|
|
343
373
|
typeId: m.List,
|
|
344
374
|
children: [E(e)],
|
|
345
375
|
offsets: y
|
|
346
|
-
}),
|
|
376
|
+
}), Ye = (e) => ({
|
|
347
377
|
typeId: m.Struct,
|
|
348
|
-
children: Array.isArray(e) &&
|
|
349
|
-
}),
|
|
378
|
+
children: Array.isArray(e) && Fe(e[0]) ? e : Object.entries(e).map(([e, t]) => Pe(e, t))
|
|
379
|
+
}), Xe = (e, t, n, r) => (n ??= t.map((e, t) => t), {
|
|
350
380
|
typeId: m.Union,
|
|
351
381
|
mode: w(e, v),
|
|
352
382
|
typeIds: n,
|
|
@@ -354,45 +384,45 @@ var De = (e, t, n = !1, r = -1) => ({
|
|
|
354
384
|
children: t.map((e, t) => E(e, `_${t}`)),
|
|
355
385
|
typeIdForValue: r,
|
|
356
386
|
offsets: y
|
|
357
|
-
}),
|
|
387
|
+
}), Ze = (e) => ({
|
|
358
388
|
typeId: m.FixedSizeBinary,
|
|
359
389
|
stride: e
|
|
360
|
-
}),
|
|
390
|
+
}), Qe = (e, t) => ({
|
|
361
391
|
typeId: m.FixedSizeList,
|
|
362
392
|
stride: t,
|
|
363
393
|
children: [E(e)]
|
|
364
|
-
}),
|
|
394
|
+
}), $e = (e, t) => ({
|
|
365
395
|
typeId: m.Map,
|
|
366
396
|
keysSorted: e,
|
|
367
397
|
children: [t],
|
|
368
398
|
offsets: y
|
|
369
|
-
}),
|
|
399
|
+
}), et = (e = g.MILLISECOND) => ({
|
|
370
400
|
typeId: m.Duration,
|
|
371
401
|
unit: w(e, g),
|
|
372
402
|
values: b
|
|
373
|
-
}),
|
|
403
|
+
}), tt = () => ({
|
|
374
404
|
typeId: m.LargeBinary,
|
|
375
405
|
offsets: b
|
|
376
|
-
}),
|
|
406
|
+
}), nt = () => ({
|
|
377
407
|
typeId: m.LargeUtf8,
|
|
378
408
|
offsets: b
|
|
379
|
-
}),
|
|
409
|
+
}), rt = (e) => ({
|
|
380
410
|
typeId: m.LargeList,
|
|
381
411
|
children: [E(e)],
|
|
382
412
|
offsets: b
|
|
383
|
-
}),
|
|
413
|
+
}), it = (e, t) => ({
|
|
384
414
|
typeId: m.RunEndEncoded,
|
|
385
415
|
children: [C(E(e, "run_ends"), (e) => e.type.typeId === m.Int, () => "Run-ends must have an integer type."), E(t, "values")]
|
|
386
|
-
}),
|
|
416
|
+
}), at = (e) => ({
|
|
387
417
|
typeId: m.ListView,
|
|
388
418
|
children: [E(e, "value")],
|
|
389
419
|
offsets: y
|
|
390
|
-
}),
|
|
420
|
+
}), ot = (e) => ({
|
|
391
421
|
typeId: m.LargeListView,
|
|
392
422
|
children: [E(e, "value")],
|
|
393
423
|
offsets: b
|
|
394
424
|
}), D = new x(2).buffer;
|
|
395
|
-
new b(D), new
|
|
425
|
+
new b(D), new De(D), new y(D), new Te(D);
|
|
396
426
|
function O(e) {
|
|
397
427
|
if (e > 2 ** 53 - 1 || e < -(2 ** 53 - 1)) throw Error(`BigInt exceeds integer number representation: ${e}`);
|
|
398
428
|
return Number(e);
|
|
@@ -401,29 +431,29 @@ function k(e, t) {
|
|
|
401
431
|
return Number(e / t) + Number(e % t) / Number(t);
|
|
402
432
|
}
|
|
403
433
|
var A = (e) => BigInt.asUintN(64, e);
|
|
404
|
-
function
|
|
434
|
+
function st(e, t) {
|
|
405
435
|
let n = t << 1, r;
|
|
406
436
|
return BigInt.asIntN(64, e[n + 1]) < 0 ? (r = A(~e[n]) | A(~e[n + 1]) << 64n, r = -(r + 1n)) : r = e[n] | e[n + 1] << 64n, r;
|
|
407
437
|
}
|
|
408
|
-
function
|
|
438
|
+
function ct(e, t) {
|
|
409
439
|
let n = t << 2, r;
|
|
410
440
|
return BigInt.asIntN(64, e[n + 3]) < 0 ? (r = A(~e[n]) | A(~e[n + 1]) << 64n | A(~e[n + 2]) << 128n | A(~e[n + 3]) << 192n, r = -(r + 1n)) : r = e[n] | e[n + 1] << 64n | e[n + 2] << 128n | e[n + 3] << 192n, r;
|
|
411
441
|
}
|
|
412
442
|
//#endregion
|
|
413
443
|
//#region ../node_modules/.pnpm/@uwdata+flechette@1.1.2/node_modules/@uwdata/flechette/src/util/strings.js
|
|
414
|
-
var
|
|
444
|
+
var lt = new TextDecoder("utf-8");
|
|
415
445
|
new TextEncoder();
|
|
416
446
|
function j(e) {
|
|
417
|
-
return
|
|
447
|
+
return lt.decode(e);
|
|
418
448
|
}
|
|
419
|
-
function
|
|
449
|
+
function ut(e, t) {
|
|
420
450
|
return !!(e[t >> 3] & 1 << t % 8);
|
|
421
451
|
}
|
|
422
452
|
function M(e, t) {
|
|
423
|
-
let n = t +
|
|
453
|
+
let n = t + L(e, t), r = n - L(e, n), i = I(e, r);
|
|
424
454
|
return (t, a, o = null) => {
|
|
425
455
|
if (t < i) {
|
|
426
|
-
let i =
|
|
456
|
+
let i = I(e, r + t);
|
|
427
457
|
if (i) return a(e, n + i);
|
|
428
458
|
}
|
|
429
459
|
return o;
|
|
@@ -433,48 +463,48 @@ function N(e, t) {
|
|
|
433
463
|
return t;
|
|
434
464
|
}
|
|
435
465
|
function P(e, t) {
|
|
436
|
-
return !!
|
|
466
|
+
return !!dt(e, t);
|
|
437
467
|
}
|
|
438
|
-
function
|
|
439
|
-
return
|
|
468
|
+
function dt(e, t) {
|
|
469
|
+
return F(e, t) << 24 >> 24;
|
|
440
470
|
}
|
|
441
|
-
function
|
|
471
|
+
function F(e, t) {
|
|
442
472
|
return e[t];
|
|
443
473
|
}
|
|
444
|
-
function
|
|
445
|
-
return
|
|
474
|
+
function I(e, t) {
|
|
475
|
+
return ft(e, t) << 16 >> 16;
|
|
446
476
|
}
|
|
447
|
-
function
|
|
477
|
+
function ft(e, t) {
|
|
448
478
|
return e[t] | e[t + 1] << 8;
|
|
449
479
|
}
|
|
450
|
-
function
|
|
480
|
+
function L(e, t) {
|
|
451
481
|
return e[t] | e[t + 1] << 8 | e[t + 2] << 16 | e[t + 3] << 24;
|
|
452
482
|
}
|
|
453
|
-
function
|
|
454
|
-
return
|
|
455
|
-
}
|
|
456
|
-
function L(e, t) {
|
|
457
|
-
return O(BigInt.asIntN(64, BigInt(it(e, t)) + (BigInt(it(e, t + 4)) << 32n)));
|
|
483
|
+
function pt(e, t) {
|
|
484
|
+
return L(e, t) >>> 0;
|
|
458
485
|
}
|
|
459
486
|
function R(e, t) {
|
|
460
|
-
|
|
487
|
+
return O(BigInt.asIntN(64, BigInt(pt(e, t)) + (BigInt(pt(e, t + 4)) << 32n)));
|
|
488
|
+
}
|
|
489
|
+
function z(e, t) {
|
|
490
|
+
let n = t + L(e, t), r = L(e, n);
|
|
461
491
|
return n += 4, j(e.subarray(n, n + r));
|
|
462
492
|
}
|
|
463
|
-
function
|
|
493
|
+
function B(e, t, n, r) {
|
|
464
494
|
if (!t) return [];
|
|
465
|
-
let i = t +
|
|
466
|
-
return Array.from({ length:
|
|
495
|
+
let i = t + L(e, t);
|
|
496
|
+
return Array.from({ length: L(e, i) }, (t, a) => r(e, i + 4 + a * n));
|
|
467
497
|
}
|
|
468
498
|
//#endregion
|
|
469
499
|
//#region ../node_modules/.pnpm/@uwdata+flechette@1.1.2/node_modules/@uwdata/flechette/src/util/struct.js
|
|
470
|
-
var
|
|
471
|
-
function
|
|
500
|
+
var V = Symbol("rowIndex");
|
|
501
|
+
function H(e, t) {
|
|
472
502
|
class n {
|
|
473
503
|
constructor(e) {
|
|
474
|
-
this[
|
|
504
|
+
this[V] = e;
|
|
475
505
|
}
|
|
476
506
|
toJSON() {
|
|
477
|
-
return
|
|
507
|
+
return ht(e, t, this[V]);
|
|
478
508
|
}
|
|
479
509
|
}
|
|
480
510
|
let r = n.prototype;
|
|
@@ -483,27 +513,27 @@ function at(e, t) {
|
|
|
483
513
|
let i = t[n];
|
|
484
514
|
Object.defineProperty(r, e[n], {
|
|
485
515
|
get() {
|
|
486
|
-
return i.at(this[
|
|
516
|
+
return i.at(this[V]);
|
|
487
517
|
},
|
|
488
518
|
enumerable: !0
|
|
489
519
|
});
|
|
490
520
|
}
|
|
491
521
|
return (e) => new n(e);
|
|
492
522
|
}
|
|
493
|
-
function
|
|
494
|
-
return (n) =>
|
|
523
|
+
function mt(e, t) {
|
|
524
|
+
return (n) => ht(e, t, n);
|
|
495
525
|
}
|
|
496
|
-
function
|
|
526
|
+
function ht(e, t, n) {
|
|
497
527
|
let r = {};
|
|
498
528
|
for (let i = 0; i < e.length; ++i) r[e[i]] = t[i].at(n);
|
|
499
529
|
return r;
|
|
500
530
|
}
|
|
501
531
|
//#endregion
|
|
502
532
|
//#region ../node_modules/.pnpm/@uwdata+flechette@1.1.2/node_modules/@uwdata/flechette/src/batch.js
|
|
503
|
-
function
|
|
504
|
-
return e instanceof
|
|
533
|
+
function gt(e) {
|
|
534
|
+
return e instanceof W;
|
|
505
535
|
}
|
|
506
|
-
var
|
|
536
|
+
var U = class {
|
|
507
537
|
static ArrayType = null;
|
|
508
538
|
constructor({ length: e, nullCount: t, type: n, validity: r, values: i, offsets: a, sizes: o, children: s }) {
|
|
509
539
|
this.length = e, this.nullCount = t, this.type = n, this.validity = r, this.values = i, this.offsets = a, this.sizes = o, this.children = s, (!t || !this.validity) && (this.at = (e) => this.value(e));
|
|
@@ -515,7 +545,7 @@ var V = class {
|
|
|
515
545
|
return this.isValid(e) ? this.value(e) : null;
|
|
516
546
|
}
|
|
517
547
|
isValid(e) {
|
|
518
|
-
return
|
|
548
|
+
return ut(this.validity, e);
|
|
519
549
|
}
|
|
520
550
|
value(e) {
|
|
521
551
|
return this.values[e];
|
|
@@ -528,7 +558,7 @@ var V = class {
|
|
|
528
558
|
*[Symbol.iterator]() {
|
|
529
559
|
for (let e = 0; e < this.length; ++e) yield this.at(e);
|
|
530
560
|
}
|
|
531
|
-
},
|
|
561
|
+
}, W = class extends U {
|
|
532
562
|
constructor(e) {
|
|
533
563
|
super(e);
|
|
534
564
|
let { length: t, values: n } = this;
|
|
@@ -540,19 +570,19 @@ var V = class {
|
|
|
540
570
|
[Symbol.iterator]() {
|
|
541
571
|
return this.nullCount ? super[Symbol.iterator]() : this.values[Symbol.iterator]();
|
|
542
572
|
}
|
|
543
|
-
},
|
|
573
|
+
}, G = class extends U {
|
|
544
574
|
static ArrayType = x;
|
|
545
|
-
},
|
|
575
|
+
}, K = class extends U {
|
|
546
576
|
static ArrayType = Array;
|
|
547
|
-
},
|
|
577
|
+
}, _t = class extends K {
|
|
548
578
|
value(e) {
|
|
549
579
|
return null;
|
|
550
580
|
}
|
|
551
|
-
},
|
|
581
|
+
}, q = class extends G {
|
|
552
582
|
value(e) {
|
|
553
583
|
return O(this.values[e]);
|
|
554
584
|
}
|
|
555
|
-
},
|
|
585
|
+
}, vt = class extends G {
|
|
556
586
|
value(e) {
|
|
557
587
|
let t = this.values[e], n = (t & 31744) >> 10, r = (t & 1023) / 1024, i = (-1) ** ((t & 32768) >> 15);
|
|
558
588
|
switch (n) {
|
|
@@ -561,123 +591,123 @@ var V = class {
|
|
|
561
591
|
}
|
|
562
592
|
return i * 2 ** (n - 15) * (1 + r);
|
|
563
593
|
}
|
|
564
|
-
},
|
|
594
|
+
}, yt = class extends K {
|
|
565
595
|
value(e) {
|
|
566
|
-
return
|
|
596
|
+
return ut(this.values, e);
|
|
567
597
|
}
|
|
568
|
-
},
|
|
598
|
+
}, bt = class extends U {
|
|
569
599
|
constructor(e) {
|
|
570
600
|
super(e);
|
|
571
601
|
let { bitWidth: t, scale: n } = this.type;
|
|
572
|
-
this.decimal = t === 128 ?
|
|
602
|
+
this.decimal = t === 128 ? st : ct, this.scale = 10n ** BigInt(n);
|
|
573
603
|
}
|
|
574
|
-
},
|
|
604
|
+
}, xt = class extends bt {
|
|
575
605
|
static ArrayType = x;
|
|
576
606
|
value(e) {
|
|
577
607
|
return k(this.decimal(this.values, e), this.scale);
|
|
578
608
|
}
|
|
579
|
-
},
|
|
609
|
+
}, St = class extends bt {
|
|
580
610
|
static ArrayType = Array;
|
|
581
611
|
value(e) {
|
|
582
612
|
return this.decimal(this.values, e);
|
|
583
613
|
}
|
|
584
|
-
},
|
|
614
|
+
}, Ct = class extends K {
|
|
585
615
|
constructor(e) {
|
|
586
616
|
super(e), this.source = e;
|
|
587
617
|
}
|
|
588
618
|
value(e) {
|
|
589
619
|
return new Date(this.source.value(e));
|
|
590
620
|
}
|
|
591
|
-
},
|
|
621
|
+
}, wt = class extends G {
|
|
592
622
|
value(e) {
|
|
593
623
|
return 864e5 * this.values[e];
|
|
594
624
|
}
|
|
595
|
-
},
|
|
625
|
+
}, Tt = q, Et = class extends q {
|
|
596
626
|
value(e) {
|
|
597
627
|
return super.value(e) * 1e3;
|
|
598
628
|
}
|
|
599
|
-
},
|
|
629
|
+
}, Dt = q, Ot = class extends q {
|
|
600
630
|
value(e) {
|
|
601
631
|
return k(this.values[e], 1000n);
|
|
602
632
|
}
|
|
603
|
-
},
|
|
633
|
+
}, kt = class extends q {
|
|
604
634
|
value(e) {
|
|
605
635
|
return k(this.values[e], 1000000n);
|
|
606
636
|
}
|
|
607
|
-
},
|
|
637
|
+
}, At = class extends K {
|
|
608
638
|
value(e) {
|
|
609
639
|
return this.values.subarray(e << 1, e + 1 << 1);
|
|
610
640
|
}
|
|
611
|
-
},
|
|
641
|
+
}, jt = class extends K {
|
|
612
642
|
value(e) {
|
|
613
643
|
let t = this.values, n = e << 4;
|
|
614
|
-
return Float64Array.of(
|
|
644
|
+
return Float64Array.of(L(t, n), L(t, n + 4), R(t, n + 8));
|
|
615
645
|
}
|
|
616
|
-
},
|
|
646
|
+
}, Mt = ({ values: e, offsets: t }, n) => e.subarray(t[n], t[n + 1]), Nt = ({ values: e, offsets: t }, n) => e.subarray(O(t[n]), O(t[n + 1])), Pt = class extends K {
|
|
617
647
|
value(e) {
|
|
618
|
-
return
|
|
648
|
+
return Mt(this, e);
|
|
619
649
|
}
|
|
620
|
-
},
|
|
650
|
+
}, Ft = class extends K {
|
|
621
651
|
value(e) {
|
|
622
|
-
return
|
|
652
|
+
return Nt(this, e);
|
|
623
653
|
}
|
|
624
|
-
},
|
|
654
|
+
}, It = class extends K {
|
|
625
655
|
value(e) {
|
|
626
|
-
return j(
|
|
656
|
+
return j(Mt(this, e));
|
|
627
657
|
}
|
|
628
|
-
},
|
|
658
|
+
}, Lt = class extends K {
|
|
629
659
|
value(e) {
|
|
630
|
-
return j(
|
|
660
|
+
return j(Nt(this, e));
|
|
631
661
|
}
|
|
632
|
-
},
|
|
662
|
+
}, Rt = class extends K {
|
|
633
663
|
value(e) {
|
|
634
664
|
let t = this.offsets;
|
|
635
665
|
return this.children[0].slice(t[e], t[e + 1]);
|
|
636
666
|
}
|
|
637
|
-
},
|
|
667
|
+
}, zt = class extends K {
|
|
638
668
|
value(e) {
|
|
639
669
|
let t = this.offsets;
|
|
640
670
|
return this.children[0].slice(O(t[e]), O(t[e + 1]));
|
|
641
671
|
}
|
|
642
|
-
},
|
|
672
|
+
}, Bt = class extends K {
|
|
643
673
|
value(e) {
|
|
644
674
|
let t = this.offsets[e], n = t + this.sizes[e];
|
|
645
675
|
return this.children[0].slice(t, n);
|
|
646
676
|
}
|
|
647
|
-
},
|
|
677
|
+
}, Vt = class extends K {
|
|
648
678
|
value(e) {
|
|
649
679
|
let t = this.offsets[e], n = t + this.sizes[e];
|
|
650
680
|
return this.children[0].slice(O(t), O(n));
|
|
651
681
|
}
|
|
652
|
-
},
|
|
682
|
+
}, Ht = class extends K {
|
|
653
683
|
constructor(e) {
|
|
654
684
|
super(e), this.stride = this.type.stride;
|
|
655
685
|
}
|
|
656
|
-
},
|
|
686
|
+
}, Ut = class extends Ht {
|
|
657
687
|
value(e) {
|
|
658
688
|
let { stride: t, values: n } = this;
|
|
659
689
|
return n.subarray(e * t, (e + 1) * t);
|
|
660
690
|
}
|
|
661
|
-
},
|
|
691
|
+
}, Wt = class extends Ht {
|
|
662
692
|
value(e) {
|
|
663
693
|
let { children: t, stride: n } = this;
|
|
664
694
|
return t[0].slice(e * n, (e + 1) * n);
|
|
665
695
|
}
|
|
666
696
|
};
|
|
667
|
-
function
|
|
697
|
+
function Gt({ children: e, offsets: t }, n) {
|
|
668
698
|
let [r, i] = e[0].children, a = t[n], o = t[n + 1], s = [];
|
|
669
699
|
for (let e = a; e < o; ++e) s.push([r.at(e), i.at(e)]);
|
|
670
700
|
return s;
|
|
671
701
|
}
|
|
672
|
-
var
|
|
702
|
+
var Kt = class extends K {
|
|
673
703
|
value(e) {
|
|
674
|
-
return
|
|
704
|
+
return Gt(this, e);
|
|
675
705
|
}
|
|
676
|
-
},
|
|
706
|
+
}, qt = class extends K {
|
|
677
707
|
value(e) {
|
|
678
|
-
return new Map(
|
|
708
|
+
return new Map(Gt(this, e));
|
|
679
709
|
}
|
|
680
|
-
},
|
|
710
|
+
}, Jt = class extends K {
|
|
681
711
|
constructor({ typeIds: e, ...t }) {
|
|
682
712
|
super(t), this.typeIds = e, this.typeMap = this.type.typeMap;
|
|
683
713
|
}
|
|
@@ -685,27 +715,27 @@ var Rt = class extends W {
|
|
|
685
715
|
let { typeIds: n, children: r, typeMap: i } = this;
|
|
686
716
|
return r[i[n[e]]].at(t);
|
|
687
717
|
}
|
|
688
|
-
},
|
|
718
|
+
}, Yt = class extends Jt {
|
|
689
719
|
value(e) {
|
|
690
720
|
return super.value(e, this.offsets[e]);
|
|
691
721
|
}
|
|
692
|
-
},
|
|
693
|
-
constructor(e, t =
|
|
722
|
+
}, Xt = class extends K {
|
|
723
|
+
constructor(e, t = mt) {
|
|
694
724
|
super(e), this.names = this.type.children.map((e) => e.name), this.factory = t(this.names, this.children);
|
|
695
725
|
}
|
|
696
726
|
value(e) {
|
|
697
727
|
return this.factory(e);
|
|
698
728
|
}
|
|
699
|
-
},
|
|
729
|
+
}, Zt = class extends Xt {
|
|
700
730
|
constructor(e) {
|
|
701
|
-
super(e,
|
|
731
|
+
super(e, H);
|
|
702
732
|
}
|
|
703
|
-
},
|
|
733
|
+
}, Qt = class extends K {
|
|
704
734
|
value(e) {
|
|
705
735
|
let [{ values: t }, n] = this.children;
|
|
706
736
|
return n.at(S(t, e));
|
|
707
737
|
}
|
|
708
|
-
},
|
|
738
|
+
}, $t = class extends K {
|
|
709
739
|
setDictionary(e) {
|
|
710
740
|
return this.dictionary = e, this.cache = e.cache(), this;
|
|
711
741
|
}
|
|
@@ -715,36 +745,36 @@ var Rt = class extends W {
|
|
|
715
745
|
key(e) {
|
|
716
746
|
return this.values[e];
|
|
717
747
|
}
|
|
718
|
-
},
|
|
748
|
+
}, en = class extends K {
|
|
719
749
|
constructor({ data: e, ...t }) {
|
|
720
750
|
super(t), this.data = e;
|
|
721
751
|
}
|
|
722
752
|
view(e) {
|
|
723
|
-
let { values: t, data: n } = this, r = e << 4, i = r + 4, a = t, o =
|
|
724
|
-
return o > 12 && (i =
|
|
753
|
+
let { values: t, data: n } = this, r = e << 4, i = r + 4, a = t, o = L(a, r);
|
|
754
|
+
return o > 12 && (i = L(a, r + 12), a = n[L(a, r + 8)]), a.subarray(i, i + o);
|
|
725
755
|
}
|
|
726
|
-
},
|
|
756
|
+
}, tn = class extends en {
|
|
727
757
|
value(e) {
|
|
728
758
|
return this.view(e);
|
|
729
759
|
}
|
|
730
|
-
},
|
|
760
|
+
}, nn = class extends en {
|
|
731
761
|
value(e) {
|
|
732
762
|
return j(this.view(e));
|
|
733
763
|
}
|
|
734
764
|
};
|
|
735
765
|
//#endregion
|
|
736
766
|
//#region ../node_modules/.pnpm/@uwdata+flechette@1.1.2/node_modules/@uwdata/flechette/src/column.js
|
|
737
|
-
function
|
|
767
|
+
function rn(e) {
|
|
738
768
|
let t = [];
|
|
739
769
|
return {
|
|
740
770
|
add(e) {
|
|
741
771
|
return t.push(e), this;
|
|
742
772
|
},
|
|
743
773
|
clear: () => t = [],
|
|
744
|
-
done: () => new
|
|
774
|
+
done: () => new an(t, e)
|
|
745
775
|
};
|
|
746
776
|
}
|
|
747
|
-
var
|
|
777
|
+
var an = class {
|
|
748
778
|
constructor(e, t = e[0]?.type) {
|
|
749
779
|
this.type = t, this.length = e.reduce((e, t) => e + t.length, 0), this.nullCount = e.reduce((e, t) => e + t.nullCount, 0), this.data = e;
|
|
750
780
|
let n = e.length, r = new Int32Array(n + 1);
|
|
@@ -759,7 +789,7 @@ var Xt = class {
|
|
|
759
789
|
}
|
|
760
790
|
[Symbol.iterator]() {
|
|
761
791
|
let e = this.data;
|
|
762
|
-
return e.length === 1 ? e[0][Symbol.iterator]() :
|
|
792
|
+
return e.length === 1 ? e[0][Symbol.iterator]() : on(e);
|
|
763
793
|
}
|
|
764
794
|
at(e) {
|
|
765
795
|
let { data: t, offsets: n } = this, r = S(n, e) - 1;
|
|
@@ -769,29 +799,29 @@ var Xt = class {
|
|
|
769
799
|
return this.at(e);
|
|
770
800
|
}
|
|
771
801
|
toArray() {
|
|
772
|
-
let { length: e, nullCount: t, data: n } = this, r = !t &&
|
|
802
|
+
let { length: e, nullCount: t, data: n } = this, r = !t && gt(n[0]), i = n.length;
|
|
773
803
|
if (r && i === 1) return n[0].values;
|
|
774
804
|
let a = new (!i || t > 0 ? Array : n[0].constructor.ArrayType ?? n[0].values.constructor)(e);
|
|
775
|
-
return r ?
|
|
805
|
+
return r ? sn(a, n) : cn(a, n);
|
|
776
806
|
}
|
|
777
807
|
cache() {
|
|
778
808
|
return this._cache ??= this.toArray();
|
|
779
809
|
}
|
|
780
810
|
};
|
|
781
|
-
function*
|
|
811
|
+
function* on(e) {
|
|
782
812
|
for (let t = 0; t < e.length; ++t) {
|
|
783
813
|
let n = e[t][Symbol.iterator]();
|
|
784
814
|
for (let e = n.next(); !e.done; e = n.next()) yield e.value;
|
|
785
815
|
}
|
|
786
816
|
}
|
|
787
|
-
function
|
|
817
|
+
function sn(e, t) {
|
|
788
818
|
for (let n = 0, r = 0; n < t.length; ++n) {
|
|
789
819
|
let { values: i } = t[n];
|
|
790
820
|
e.set(i, r), r += i.length;
|
|
791
821
|
}
|
|
792
822
|
return e;
|
|
793
823
|
}
|
|
794
|
-
function
|
|
824
|
+
function cn(e, t) {
|
|
795
825
|
let n = -1;
|
|
796
826
|
for (let r = 0; r < t.length; ++r) {
|
|
797
827
|
let i = t[r];
|
|
@@ -801,10 +831,10 @@ function $t(e, t) {
|
|
|
801
831
|
}
|
|
802
832
|
//#endregion
|
|
803
833
|
//#region ../node_modules/.pnpm/@uwdata+flechette@1.1.2/node_modules/@uwdata/flechette/src/table.js
|
|
804
|
-
var
|
|
834
|
+
var ln = class e {
|
|
805
835
|
constructor(e, t, n = !1) {
|
|
806
836
|
let r = e.fields.map((e) => e.name);
|
|
807
|
-
this.schema = e, this.names = r, this.children = t, this.factory = n ?
|
|
837
|
+
this.schema = e, this.names = r, this.children = t, this.factory = n ? H : mt;
|
|
808
838
|
let i = [];
|
|
809
839
|
this.getFactory = (e) => i[e] ?? (i[e] = this.factory(r, t.map((t) => t.data[e])));
|
|
810
840
|
}
|
|
@@ -828,8 +858,8 @@ var en = class e {
|
|
|
828
858
|
let { children: r, factory: i, schema: a } = this, { fields: o } = a;
|
|
829
859
|
return new e({
|
|
830
860
|
...a,
|
|
831
|
-
fields: t.map((e, t) =>
|
|
832
|
-
}, t.map((e) => r[e]), i ===
|
|
861
|
+
fields: t.map((e, t) => un(o[e], n[t]))
|
|
862
|
+
}, t.map((e) => r[e]), i === H);
|
|
833
863
|
}
|
|
834
864
|
select(e, t) {
|
|
835
865
|
let n = this.names, r = e.map((e) => n.indexOf(e));
|
|
@@ -864,7 +894,7 @@ var en = class e {
|
|
|
864
894
|
return this.at(e);
|
|
865
895
|
}
|
|
866
896
|
};
|
|
867
|
-
function
|
|
897
|
+
function un(e, t) {
|
|
868
898
|
return t != null && t !== e.name ? {
|
|
869
899
|
...e,
|
|
870
900
|
name: t
|
|
@@ -872,40 +902,40 @@ function tn(e, t) {
|
|
|
872
902
|
}
|
|
873
903
|
//#endregion
|
|
874
904
|
//#region ../node_modules/.pnpm/@uwdata+flechette@1.1.2/node_modules/@uwdata/flechette/src/batch-type.js
|
|
875
|
-
function
|
|
905
|
+
function dn(e, t = {}) {
|
|
876
906
|
let { typeId: n, bitWidth: r, precision: i, unit: a } = e, { useBigInt: o, useDate: s, useDecimalBigInt: c, useMap: l, useProxy: u } = t;
|
|
877
907
|
switch (n) {
|
|
878
|
-
case m.Null: return
|
|
879
|
-
case m.Bool: return
|
|
908
|
+
case m.Null: return _t;
|
|
909
|
+
case m.Bool: return yt;
|
|
880
910
|
case m.Int:
|
|
881
911
|
case m.Time:
|
|
882
|
-
case m.Duration: return o || r < 64 ?
|
|
883
|
-
case m.Float: return i ?
|
|
884
|
-
case m.Date: return
|
|
885
|
-
case m.Timestamp: return
|
|
886
|
-
case m.Decimal: return c ?
|
|
887
|
-
case m.Interval: return a === _.DAY_TIME ?
|
|
888
|
-
case m.FixedSizeBinary: return
|
|
889
|
-
case m.Utf8: return
|
|
890
|
-
case m.LargeUtf8: return
|
|
891
|
-
case m.Binary: return
|
|
892
|
-
case m.LargeBinary: return
|
|
893
|
-
case m.BinaryView: return
|
|
894
|
-
case m.Utf8View: return
|
|
895
|
-
case m.List: return
|
|
896
|
-
case m.LargeList: return
|
|
897
|
-
case m.Map: return l ?
|
|
898
|
-
case m.ListView: return
|
|
899
|
-
case m.LargeListView: return
|
|
900
|
-
case m.FixedSizeList: return
|
|
901
|
-
case m.Struct: return u ?
|
|
902
|
-
case m.RunEndEncoded: return
|
|
903
|
-
case m.Dictionary: return
|
|
904
|
-
case m.Union: return e.mode ?
|
|
912
|
+
case m.Duration: return o || r < 64 ? W : q;
|
|
913
|
+
case m.Float: return i ? W : vt;
|
|
914
|
+
case m.Date: return fn(a === h.DAY ? wt : Tt, s && Ct);
|
|
915
|
+
case m.Timestamp: return fn(a === g.SECOND ? Et : a === g.MILLISECOND ? Dt : a === g.MICROSECOND ? Ot : kt, s && Ct);
|
|
916
|
+
case m.Decimal: return c ? St : xt;
|
|
917
|
+
case m.Interval: return a === _.DAY_TIME ? At : a === _.YEAR_MONTH ? W : jt;
|
|
918
|
+
case m.FixedSizeBinary: return Ut;
|
|
919
|
+
case m.Utf8: return It;
|
|
920
|
+
case m.LargeUtf8: return Lt;
|
|
921
|
+
case m.Binary: return Pt;
|
|
922
|
+
case m.LargeBinary: return Ft;
|
|
923
|
+
case m.BinaryView: return tn;
|
|
924
|
+
case m.Utf8View: return nn;
|
|
925
|
+
case m.List: return Rt;
|
|
926
|
+
case m.LargeList: return zt;
|
|
927
|
+
case m.Map: return l ? qt : Kt;
|
|
928
|
+
case m.ListView: return Bt;
|
|
929
|
+
case m.LargeListView: return Vt;
|
|
930
|
+
case m.FixedSizeList: return Wt;
|
|
931
|
+
case m.Struct: return u ? Zt : Xt;
|
|
932
|
+
case m.RunEndEncoded: return Qt;
|
|
933
|
+
case m.Dictionary: return $t;
|
|
934
|
+
case m.Union: return e.mode ? Yt : Jt;
|
|
905
935
|
}
|
|
906
936
|
throw Error(T(n));
|
|
907
937
|
}
|
|
908
|
-
function
|
|
938
|
+
function fn(e, t) {
|
|
909
939
|
return t ? class extends t {
|
|
910
940
|
constructor(t) {
|
|
911
941
|
super(new e(t));
|
|
@@ -914,135 +944,135 @@ function rn(e, t) {
|
|
|
914
944
|
}
|
|
915
945
|
//#endregion
|
|
916
946
|
//#region ../node_modules/.pnpm/@uwdata+flechette@1.1.2/node_modules/@uwdata/flechette/src/decode/block.js
|
|
917
|
-
function
|
|
947
|
+
function pn(e, t) {
|
|
918
948
|
return {
|
|
919
|
-
offset:
|
|
920
|
-
metadataLength:
|
|
921
|
-
bodyLength:
|
|
949
|
+
offset: R(e, t),
|
|
950
|
+
metadataLength: L(e, t + 8),
|
|
951
|
+
bodyLength: R(e, t + 16)
|
|
922
952
|
};
|
|
923
953
|
}
|
|
924
|
-
function
|
|
925
|
-
return
|
|
954
|
+
function mn(e, t) {
|
|
955
|
+
return B(e, t, 24, pn);
|
|
926
956
|
}
|
|
927
957
|
//#endregion
|
|
928
958
|
//#region ../node_modules/.pnpm/@uwdata+flechette@1.1.2/node_modules/@uwdata/flechette/src/decode/record-batch.js
|
|
929
|
-
function
|
|
959
|
+
function hn(e, t, n) {
|
|
930
960
|
let r = M(e, t);
|
|
931
961
|
if (r(10, N, 0)) throw Error("Record batch compression not implemented");
|
|
932
962
|
let i = n < f.V4 ? 8 : 0;
|
|
933
963
|
return {
|
|
934
|
-
length: r(4,
|
|
935
|
-
nodes:
|
|
936
|
-
length:
|
|
937
|
-
nullCount:
|
|
964
|
+
length: r(4, R, 0),
|
|
965
|
+
nodes: B(e, r(6, N), 16, (e, t) => ({
|
|
966
|
+
length: R(e, t),
|
|
967
|
+
nullCount: R(e, t + 8)
|
|
938
968
|
})),
|
|
939
|
-
regions:
|
|
940
|
-
offset:
|
|
941
|
-
length:
|
|
969
|
+
regions: B(e, r(8, N), 16 + i, (e, t) => ({
|
|
970
|
+
offset: R(e, t + i),
|
|
971
|
+
length: R(e, t + i + 8)
|
|
942
972
|
})),
|
|
943
|
-
variadic:
|
|
973
|
+
variadic: B(e, r(12, N), 8, R)
|
|
944
974
|
};
|
|
945
975
|
}
|
|
946
976
|
//#endregion
|
|
947
977
|
//#region ../node_modules/.pnpm/@uwdata+flechette@1.1.2/node_modules/@uwdata/flechette/src/decode/dictionary-batch.js
|
|
948
|
-
function
|
|
978
|
+
function gn(e, t, n) {
|
|
949
979
|
let r = M(e, t);
|
|
950
980
|
return {
|
|
951
|
-
id: r(4,
|
|
952
|
-
data: r(6, (e, t) =>
|
|
981
|
+
id: r(4, R, 0),
|
|
982
|
+
data: r(6, (e, t) => hn(e, t, n)),
|
|
953
983
|
isDelta: r(8, P, !1)
|
|
954
984
|
};
|
|
955
985
|
}
|
|
956
986
|
//#endregion
|
|
957
987
|
//#region ../node_modules/.pnpm/@uwdata+flechette@1.1.2/node_modules/@uwdata/flechette/src/decode/data-type.js
|
|
958
|
-
function
|
|
988
|
+
function _n(e, t, n, r) {
|
|
959
989
|
w(n, m, T);
|
|
960
990
|
let i = M(e, t);
|
|
961
991
|
switch (n) {
|
|
962
|
-
case m.Binary: return
|
|
963
|
-
case m.Utf8: return
|
|
964
|
-
case m.LargeBinary: return
|
|
965
|
-
case m.LargeUtf8: return
|
|
966
|
-
case m.List: return
|
|
967
|
-
case m.ListView: return
|
|
968
|
-
case m.LargeList: return
|
|
969
|
-
case m.LargeListView: return
|
|
970
|
-
case m.Struct: return
|
|
971
|
-
case m.RunEndEncoded: return
|
|
972
|
-
case m.Int: return
|
|
973
|
-
case m.Float: return
|
|
974
|
-
case m.Decimal: return
|
|
975
|
-
case m.Date: return
|
|
976
|
-
case m.Time: return
|
|
977
|
-
case m.Timestamp: return
|
|
978
|
-
case m.Interval: return
|
|
979
|
-
case m.Duration: return
|
|
980
|
-
case m.FixedSizeBinary: return
|
|
981
|
-
case m.FixedSizeList: return
|
|
982
|
-
case m.Map: return
|
|
983
|
-
case m.Union: return
|
|
992
|
+
case m.Binary: return Ve();
|
|
993
|
+
case m.Utf8: return He();
|
|
994
|
+
case m.LargeBinary: return tt();
|
|
995
|
+
case m.LargeUtf8: return nt();
|
|
996
|
+
case m.List: return Je(r[0]);
|
|
997
|
+
case m.ListView: return at(r[0]);
|
|
998
|
+
case m.LargeList: return rt(r[0]);
|
|
999
|
+
case m.LargeListView: return ot(r[0]);
|
|
1000
|
+
case m.Struct: return Ye(r);
|
|
1001
|
+
case m.RunEndEncoded: return it(r[0], r[1]);
|
|
1002
|
+
case m.Int: return Re(i(4, L, 0), i(6, P, !1));
|
|
1003
|
+
case m.Float: return Be(i(4, I, we.HALF));
|
|
1004
|
+
case m.Decimal: return Ue(i(4, L, 0), i(6, L, 0), i(8, L, 128));
|
|
1005
|
+
case m.Date: return We(i(4, I, h.MILLISECOND));
|
|
1006
|
+
case m.Time: return Ge(i(4, I, g.MILLISECOND), i(6, L, 32));
|
|
1007
|
+
case m.Timestamp: return Ke(i(4, I, g.SECOND), i(6, z));
|
|
1008
|
+
case m.Interval: return qe(i(4, I, _.YEAR_MONTH));
|
|
1009
|
+
case m.Duration: return et(i(4, I, g.MILLISECOND));
|
|
1010
|
+
case m.FixedSizeBinary: return Ze(i(4, L, 0));
|
|
1011
|
+
case m.FixedSizeList: return Qe(r[0], i(4, L, 0));
|
|
1012
|
+
case m.Map: return $e(i(4, P, !1), r[0]);
|
|
1013
|
+
case m.Union: return Xe(i(4, I, v.Sparse), r, B(e, i(6, N), 4, L));
|
|
984
1014
|
}
|
|
985
1015
|
return { typeId: n };
|
|
986
1016
|
}
|
|
987
1017
|
//#endregion
|
|
988
1018
|
//#region ../node_modules/.pnpm/@uwdata+flechette@1.1.2/node_modules/@uwdata/flechette/src/decode/metadata.js
|
|
989
|
-
function
|
|
990
|
-
let n =
|
|
1019
|
+
function J(e, t) {
|
|
1020
|
+
let n = B(e, t, 4, (e, t) => {
|
|
991
1021
|
let n = M(e, t);
|
|
992
|
-
return [n(4,
|
|
1022
|
+
return [n(4, z), n(6, z)];
|
|
993
1023
|
});
|
|
994
1024
|
return n.length ? new Map(n) : null;
|
|
995
1025
|
}
|
|
996
1026
|
//#endregion
|
|
997
1027
|
//#region ../node_modules/.pnpm/@uwdata+flechette@1.1.2/node_modules/@uwdata/flechette/src/decode/schema.js
|
|
998
|
-
function
|
|
1028
|
+
function vn(e, t, n) {
|
|
999
1029
|
let r = M(e, t);
|
|
1000
1030
|
return {
|
|
1001
1031
|
version: n,
|
|
1002
|
-
endianness: r(4,
|
|
1003
|
-
fields: r(6,
|
|
1004
|
-
metadata: r(8,
|
|
1032
|
+
endianness: r(4, I, 0),
|
|
1033
|
+
fields: r(6, yn, []),
|
|
1034
|
+
metadata: r(8, J)
|
|
1005
1035
|
};
|
|
1006
1036
|
}
|
|
1007
|
-
function
|
|
1008
|
-
return
|
|
1037
|
+
function yn(e, t) {
|
|
1038
|
+
return B(e, t, 4, bn);
|
|
1009
1039
|
}
|
|
1010
|
-
function
|
|
1011
|
-
let n = M(e, t), r = n(8,
|
|
1040
|
+
function bn(e, t) {
|
|
1041
|
+
let n = M(e, t), r = n(8, F, m.NONE), i = n(10, N, 0), a = n(12, Sn), o = _n(e, i, r, n(14, (e, t) => xn(e, t)));
|
|
1012
1042
|
return a && (a.dictionary = o, o = a), {
|
|
1013
|
-
name: n(4,
|
|
1043
|
+
name: n(4, z),
|
|
1014
1044
|
type: o,
|
|
1015
1045
|
nullable: n(6, P, !1),
|
|
1016
|
-
metadata: n(16,
|
|
1046
|
+
metadata: n(16, J)
|
|
1017
1047
|
};
|
|
1018
1048
|
}
|
|
1019
|
-
function
|
|
1020
|
-
let n =
|
|
1049
|
+
function xn(e, t) {
|
|
1050
|
+
let n = B(e, t, 4, bn);
|
|
1021
1051
|
return n.length ? n : null;
|
|
1022
1052
|
}
|
|
1023
|
-
function
|
|
1053
|
+
function Sn(e, t) {
|
|
1024
1054
|
if (!t) return null;
|
|
1025
1055
|
let n = M(e, t);
|
|
1026
|
-
return
|
|
1056
|
+
return Le(null, n(6, Cn, ze()), n(8, P, !1), n(4, R, 0));
|
|
1027
1057
|
}
|
|
1028
|
-
function
|
|
1029
|
-
return
|
|
1058
|
+
function Cn(e, t) {
|
|
1059
|
+
return _n(e, t, m.Int);
|
|
1030
1060
|
}
|
|
1031
1061
|
//#endregion
|
|
1032
1062
|
//#region ../node_modules/.pnpm/@uwdata+flechette@1.1.2/node_modules/@uwdata/flechette/src/decode/message.js
|
|
1033
|
-
var
|
|
1034
|
-
function
|
|
1035
|
-
let n =
|
|
1036
|
-
if (t += 4, n === -1 && (n =
|
|
1063
|
+
var wn = (e, t) => `Expected to read ${e} metadata bytes, but only read ${t}.`, Tn = (e, t) => `Expected to read ${e} bytes for message body, but only read ${t}.`, En = (e) => `Unsupported message type: ${e} (${Ne(p, e)})`;
|
|
1064
|
+
function Y(e, t) {
|
|
1065
|
+
let n = L(e, t) || 0;
|
|
1066
|
+
if (t += 4, n === -1 && (n = L(e, t) || 0, t += 4), n === 0) return null;
|
|
1037
1067
|
let r = e.subarray(t, t += n);
|
|
1038
|
-
if (r.byteLength < n) throw Error(
|
|
1039
|
-
let i = M(r, 0), a = i(4,
|
|
1068
|
+
if (r.byteLength < n) throw Error(wn(n, r.byteLength));
|
|
1069
|
+
let i = M(r, 0), a = i(4, I, f.V1), o = i(6, F, p.NONE), s = i(8, N, 0), c = i(10, R, 0), l;
|
|
1040
1070
|
if (s) {
|
|
1041
|
-
let n = o === p.Schema ?
|
|
1042
|
-
if (!n) throw Error(
|
|
1071
|
+
let n = o === p.Schema ? vn : o === p.DictionaryBatch ? gn : o === p.RecordBatch ? hn : null;
|
|
1072
|
+
if (!n) throw Error(En(o));
|
|
1043
1073
|
if (l = n(r, s, a), c > 0) {
|
|
1044
1074
|
let n = e.subarray(t, t += c);
|
|
1045
|
-
if (n.byteLength < c) throw Error(
|
|
1075
|
+
if (n.byteLength < c) throw Error(Tn(c, n.byteLength));
|
|
1046
1076
|
l.body = n;
|
|
1047
1077
|
}
|
|
1048
1078
|
}
|
|
@@ -1055,22 +1085,22 @@ function q(e, t) {
|
|
|
1055
1085
|
}
|
|
1056
1086
|
//#endregion
|
|
1057
1087
|
//#region ../node_modules/.pnpm/@uwdata+flechette@1.1.2/node_modules/@uwdata/flechette/src/decode/decode-ipc.js
|
|
1058
|
-
function
|
|
1088
|
+
function Dn(e) {
|
|
1059
1089
|
let t = e instanceof ArrayBuffer ? new Uint8Array(e) : e;
|
|
1060
|
-
return t instanceof Uint8Array &&
|
|
1090
|
+
return t instanceof Uint8Array && On(t) ? An(t) : kn(t);
|
|
1061
1091
|
}
|
|
1062
|
-
function
|
|
1092
|
+
function On(e) {
|
|
1063
1093
|
if (!e || e.length < 4) return !1;
|
|
1064
|
-
for (let t = 0; t < 6; ++t) if (
|
|
1094
|
+
for (let t = 0; t < 6; ++t) if (Ce[t] !== e[t]) return !1;
|
|
1065
1095
|
return !0;
|
|
1066
1096
|
}
|
|
1067
|
-
function
|
|
1097
|
+
function kn(e) {
|
|
1068
1098
|
let t = [e].flat(), n, r = [], i = [];
|
|
1069
1099
|
for (let e of t) {
|
|
1070
1100
|
if (!(e instanceof Uint8Array)) throw Error("IPC data batch was not a Uint8Array.");
|
|
1071
1101
|
let t = 0;
|
|
1072
1102
|
for (;;) {
|
|
1073
|
-
let a =
|
|
1103
|
+
let a = Y(e, t);
|
|
1074
1104
|
if (a === null) break;
|
|
1075
1105
|
if (t = a.index, a.content) switch (a.type) {
|
|
1076
1106
|
case p.Schema:
|
|
@@ -1090,29 +1120,29 @@ function xn(e) {
|
|
|
1090
1120
|
metadata: null
|
|
1091
1121
|
};
|
|
1092
1122
|
}
|
|
1093
|
-
function
|
|
1094
|
-
let t = e.byteLength - (
|
|
1123
|
+
function An(e) {
|
|
1124
|
+
let t = e.byteLength - (Ce.length + 4), n = M(e, t - L(e, t)), r = n(4, I, f.V1), i = n(8, mn, []), a = n(10, mn, []);
|
|
1095
1125
|
return {
|
|
1096
|
-
schema: n(6, (e, t) =>
|
|
1097
|
-
dictionaries: i.map(({ offset: t }) =>
|
|
1098
|
-
records: a.map(({ offset: t }) =>
|
|
1099
|
-
metadata: n(12,
|
|
1126
|
+
schema: n(6, (e, t) => vn(e, t, r)),
|
|
1127
|
+
dictionaries: i.map(({ offset: t }) => Y(e, t).content),
|
|
1128
|
+
records: a.map(({ offset: t }) => Y(e, t).content),
|
|
1129
|
+
metadata: n(12, J)
|
|
1100
1130
|
};
|
|
1101
1131
|
}
|
|
1102
1132
|
//#endregion
|
|
1103
1133
|
//#region ../node_modules/.pnpm/@uwdata+flechette@1.1.2/node_modules/@uwdata/flechette/src/decode/table-from-ipc.js
|
|
1104
|
-
function
|
|
1105
|
-
return
|
|
1134
|
+
function X(e, t) {
|
|
1135
|
+
return jn(Dn(e), t);
|
|
1106
1136
|
}
|
|
1107
|
-
function
|
|
1108
|
-
let { schema: n = { fields: [] }, dictionaries: r, records: i } = e, { version: a, fields: o } = n, s = /* @__PURE__ */ new Map(), c =
|
|
1109
|
-
|
|
1137
|
+
function jn(e, t = {}) {
|
|
1138
|
+
let { schema: n = { fields: [] }, dictionaries: r, records: i } = e, { version: a, fields: o } = n, s = /* @__PURE__ */ new Map(), c = Nn(t, a, s), l = /* @__PURE__ */ new Map();
|
|
1139
|
+
Mn(n, (e) => {
|
|
1110
1140
|
let t = e.type;
|
|
1111
1141
|
t.typeId === m.Dictionary && l.set(t.id, t.dictionary);
|
|
1112
1142
|
});
|
|
1113
1143
|
let u = /* @__PURE__ */ new Map();
|
|
1114
1144
|
for (let e of r) {
|
|
1115
|
-
let { id: t, data: n, isDelta: r, body: i } = e, a = l.get(t), o =
|
|
1145
|
+
let { id: t, data: n, isDelta: r, body: i } = e, a = l.get(t), o = Pn(a, c({
|
|
1116
1146
|
...n,
|
|
1117
1147
|
body: i
|
|
1118
1148
|
}));
|
|
@@ -1121,23 +1151,23 @@ function Cn(e, t = {}) {
|
|
|
1121
1151
|
r || e.clear(), e.add(o);
|
|
1122
1152
|
} else {
|
|
1123
1153
|
if (r) throw Error("Delta update can not be first dictionary batch.");
|
|
1124
|
-
u.set(t,
|
|
1154
|
+
u.set(t, rn(a).add(o));
|
|
1125
1155
|
}
|
|
1126
1156
|
}
|
|
1127
1157
|
u.forEach((e, t) => s.set(t, e.done()));
|
|
1128
|
-
let d = o.map((e) =>
|
|
1158
|
+
let d = o.map((e) => rn(e.type));
|
|
1129
1159
|
for (let e of i) {
|
|
1130
1160
|
let t = c(e);
|
|
1131
|
-
o.forEach((e, n) => d[n].add(
|
|
1161
|
+
o.forEach((e, n) => d[n].add(Pn(e.type, t)));
|
|
1132
1162
|
}
|
|
1133
|
-
return new
|
|
1163
|
+
return new ln(n, d.map((e) => e.done()), t.useProxy);
|
|
1134
1164
|
}
|
|
1135
|
-
function
|
|
1165
|
+
function Mn(e, t) {
|
|
1136
1166
|
e.fields.forEach(function e(n) {
|
|
1137
1167
|
t(n), n.type.dictionary?.children?.forEach(e), n.type.children?.forEach(e);
|
|
1138
1168
|
});
|
|
1139
1169
|
}
|
|
1140
|
-
function
|
|
1170
|
+
function Nn(e, t, n) {
|
|
1141
1171
|
let r = {
|
|
1142
1172
|
version: t,
|
|
1143
1173
|
options: e,
|
|
@@ -1155,13 +1185,13 @@ function Tn(e, t, n) {
|
|
|
1155
1185
|
},
|
|
1156
1186
|
variadic: () => a[++l],
|
|
1157
1187
|
visit(e) {
|
|
1158
|
-
return e.map((e) =>
|
|
1188
|
+
return e.map((e) => Pn(e.type, this));
|
|
1159
1189
|
}
|
|
1160
1190
|
};
|
|
1161
1191
|
};
|
|
1162
1192
|
}
|
|
1163
|
-
function
|
|
1164
|
-
let { typeId: n } = e, { length: r, options: i, node: a, buffer: o, variadic: s, version: c } = t, l =
|
|
1193
|
+
function Pn(e, t) {
|
|
1194
|
+
let { typeId: n } = e, { length: r, options: i, node: a, buffer: o, variadic: s, version: c } = t, l = dn(e, i);
|
|
1165
1195
|
if (n === m.Null) return new l({
|
|
1166
1196
|
length: r,
|
|
1167
1197
|
nullCount: r,
|
|
@@ -1238,7 +1268,7 @@ function Y(e, t) {
|
|
|
1238
1268
|
}
|
|
1239
1269
|
case m.Union: return c < f.V5 && o(), new l({
|
|
1240
1270
|
...u,
|
|
1241
|
-
typeIds: o(
|
|
1271
|
+
typeIds: o(ke),
|
|
1242
1272
|
offsets: e.mode === v.Sparse ? null : o(e.offsets),
|
|
1243
1273
|
children: t.visit(e.children)
|
|
1244
1274
|
});
|
|
@@ -1248,7 +1278,7 @@ function Y(e, t) {
|
|
|
1248
1278
|
new Uint16Array(new Uint8Array([1, 0]).buffer)[0];
|
|
1249
1279
|
//#endregion
|
|
1250
1280
|
//#region src/utils/batch-requests.ts
|
|
1251
|
-
function
|
|
1281
|
+
function Z(e, t) {
|
|
1252
1282
|
let n = /* @__PURE__ */ new Map();
|
|
1253
1283
|
return (...r) => {
|
|
1254
1284
|
let i = t(...r);
|
|
@@ -1261,42 +1291,42 @@ function X(e, t) {
|
|
|
1261
1291
|
}
|
|
1262
1292
|
//#endregion
|
|
1263
1293
|
//#region src/plugins/impl/vega/vega-loader.ts
|
|
1264
|
-
function
|
|
1265
|
-
return
|
|
1294
|
+
function Fn(e, t) {
|
|
1295
|
+
return ee(e, t);
|
|
1266
1296
|
}
|
|
1267
|
-
function
|
|
1268
|
-
return
|
|
1297
|
+
function In() {
|
|
1298
|
+
return c();
|
|
1269
1299
|
}
|
|
1270
|
-
var Q =
|
|
1300
|
+
var Q = l;
|
|
1271
1301
|
//#endregion
|
|
1272
1302
|
//#region src/plugins/impl/vega/batched.ts
|
|
1273
|
-
function
|
|
1274
|
-
let e =
|
|
1303
|
+
function Ln() {
|
|
1304
|
+
let e = Rn(In()), t = (e) => JSON.stringify(e);
|
|
1275
1305
|
return {
|
|
1276
|
-
load:
|
|
1277
|
-
sanitize:
|
|
1278
|
-
http:
|
|
1279
|
-
file:
|
|
1306
|
+
load: Z(e.load.bind(e), t),
|
|
1307
|
+
sanitize: Z(e.sanitize.bind(e), t),
|
|
1308
|
+
http: Z(e.http.bind(e), t),
|
|
1309
|
+
file: Z(e.file.bind(e), t)
|
|
1280
1310
|
};
|
|
1281
1311
|
}
|
|
1282
|
-
function
|
|
1312
|
+
function Rn(e) {
|
|
1283
1313
|
return {
|
|
1284
1314
|
...e,
|
|
1285
1315
|
async load(t, n) {
|
|
1286
|
-
return t.endsWith(".arrow") ?
|
|
1316
|
+
return t.endsWith(".arrow") ? X(await zn(t), { useProxy: !1 }).toArray() : e.load(t, n);
|
|
1287
1317
|
}
|
|
1288
1318
|
};
|
|
1289
1319
|
}
|
|
1290
|
-
var
|
|
1320
|
+
var zn = Z((e) => fetch(e).then((e) => e.arrayBuffer()), (e) => e), Bn = Q.integer, $ = Q.number, Vn = Q.date, Hn = Q.boolean, Un = () => {
|
|
1291
1321
|
let e = (e) => e === "inf" || e === "+inf" ? Infinity : e === "-inf" ? -Infinity : $(e);
|
|
1292
1322
|
return Q.integer = e, Q.number = e, () => {
|
|
1293
|
-
Q.integer =
|
|
1323
|
+
Q.integer = Bn, Q.number = $;
|
|
1294
1324
|
};
|
|
1295
|
-
},
|
|
1325
|
+
}, Wn = () => (Q.integer = (e) => {
|
|
1296
1326
|
if (e === "") return "";
|
|
1297
1327
|
if (e === "-inf" || e === "inf") return e;
|
|
1298
1328
|
function t(e) {
|
|
1299
|
-
let t =
|
|
1329
|
+
let t = Bn(e);
|
|
1300
1330
|
return Number.isNaN(t) ? e : t;
|
|
1301
1331
|
}
|
|
1302
1332
|
let n = Number.parseInt(e, 10);
|
|
@@ -1312,8 +1342,8 @@ var kn = X((e) => fetch(e).then((e) => e.arrayBuffer()), (e) => e), An = Q.integ
|
|
|
1312
1342
|
let t = $(e);
|
|
1313
1343
|
return Number.isNaN(t) ? e : t;
|
|
1314
1344
|
}, () => {
|
|
1315
|
-
Q.integer =
|
|
1316
|
-
}),
|
|
1345
|
+
Q.integer = Bn, Q.number = $;
|
|
1346
|
+
}), Gn = () => (Q.date = (t) => {
|
|
1317
1347
|
if (t === "") return "";
|
|
1318
1348
|
if (t == null) return null;
|
|
1319
1349
|
if (!/^\d{4}-\d{2}-\d{2}(T[\d.:]+(Z|[+-]\d{2}:?\d{2})?)?$/.test(t)) return t;
|
|
@@ -1324,74 +1354,92 @@ var kn = X((e) => fetch(e).then((e) => e.arrayBuffer()), (e) => e), An = Q.integ
|
|
|
1324
1354
|
return e.warn(`Failed to parse date: ${t}`), t;
|
|
1325
1355
|
}
|
|
1326
1356
|
}, () => {
|
|
1327
|
-
Q.date =
|
|
1357
|
+
Q.date = Vn;
|
|
1328
1358
|
});
|
|
1329
|
-
Q.boolean = (e) => e === "True" || e !== "False" &&
|
|
1330
|
-
var
|
|
1331
|
-
|
|
1332
|
-
let
|
|
1333
|
-
if (
|
|
1359
|
+
Q.boolean = (e) => e === "True" || e !== "False" && Hn(e);
|
|
1360
|
+
var Kn = Ln();
|
|
1361
|
+
function qn(e) {
|
|
1362
|
+
let t = ne(e);
|
|
1363
|
+
if (t === null) throw Error(`Run the notebook to load data from ${e}`);
|
|
1364
|
+
return t;
|
|
1365
|
+
}
|
|
1366
|
+
function Jn(e) {
|
|
1367
|
+
return {
|
|
1368
|
+
...e,
|
|
1369
|
+
async sanitize(t, n) {
|
|
1370
|
+
let r = await e.sanitize(t, n);
|
|
1371
|
+
return n?.context !== "href" && (r.href = qn(r.href)), r;
|
|
1372
|
+
}
|
|
1373
|
+
};
|
|
1374
|
+
}
|
|
1375
|
+
function Yn(e) {
|
|
1376
|
+
let t = e.usermeta?.embedOptions?.loader;
|
|
1377
|
+
return Jn(c(typeof t == "object" ? t : void 0));
|
|
1378
|
+
}
|
|
1379
|
+
async function Xn(e, t, r = {}) {
|
|
1380
|
+
let { handleBigIntAndNumberLike: i = !1, replacePeriod: a = !1 } = r, o = qn(e);
|
|
1381
|
+
if (e.endsWith(".arrow") || t?.type === "arrow") return X(await zn(o), {
|
|
1334
1382
|
useProxy: !0,
|
|
1335
1383
|
useDate: !0,
|
|
1336
1384
|
useBigInt: i
|
|
1337
1385
|
}).toArray();
|
|
1338
|
-
let
|
|
1339
|
-
i ?
|
|
1340
|
-
let
|
|
1386
|
+
let s = [Gn];
|
|
1387
|
+
i ? s.push(Wn) : s.push(Un);
|
|
1388
|
+
let c = [];
|
|
1341
1389
|
try {
|
|
1342
|
-
let
|
|
1343
|
-
if (!
|
|
1344
|
-
if (typeof
|
|
1345
|
-
JSON.parse(
|
|
1390
|
+
let e = await Kn.load(o);
|
|
1391
|
+
if (!t) {
|
|
1392
|
+
if (typeof e == "string") try {
|
|
1393
|
+
JSON.parse(e), t = { type: "json" };
|
|
1346
1394
|
} catch {
|
|
1347
|
-
|
|
1395
|
+
t = {
|
|
1348
1396
|
type: "csv",
|
|
1349
1397
|
parse: "auto"
|
|
1350
1398
|
};
|
|
1351
1399
|
}
|
|
1352
|
-
typeof
|
|
1400
|
+
typeof e == "object" && (t = { type: "json" });
|
|
1353
1401
|
}
|
|
1354
|
-
let
|
|
1355
|
-
|
|
1356
|
-
let
|
|
1357
|
-
return typeof
|
|
1358
|
-
...
|
|
1359
|
-
parse:
|
|
1360
|
-
}) :
|
|
1402
|
+
let r = t?.type === "csv";
|
|
1403
|
+
r && typeof e == "string" && (e = Qn(e)), r && typeof e == "string" && a && (e = $n(e));
|
|
1404
|
+
let i = t?.parse || "auto";
|
|
1405
|
+
return typeof i == "object" && (i = n.mapValues(i, (e) => e === "time" ? "string" : e === "datetime" ? "date" : e)), c = s.map((e) => e()), r ? Fn(e, {
|
|
1406
|
+
...t,
|
|
1407
|
+
parse: i
|
|
1408
|
+
}) : Fn(e, t);
|
|
1361
1409
|
} finally {
|
|
1362
|
-
|
|
1410
|
+
c.forEach((e) => e());
|
|
1363
1411
|
}
|
|
1364
1412
|
}
|
|
1365
|
-
function
|
|
1366
|
-
let n = [
|
|
1367
|
-
t && n.push(
|
|
1368
|
-
let r = n.map((e) => e()), i =
|
|
1413
|
+
function Zn(e, t = !0) {
|
|
1414
|
+
let n = [Gn];
|
|
1415
|
+
t && n.push(Wn);
|
|
1416
|
+
let r = n.map((e) => e()), i = Fn(e, {
|
|
1369
1417
|
type: "csv",
|
|
1370
1418
|
parse: "auto"
|
|
1371
1419
|
});
|
|
1372
1420
|
return r.forEach((e) => e()), i;
|
|
1373
1421
|
}
|
|
1374
|
-
function
|
|
1375
|
-
return e?.includes(",") ?
|
|
1422
|
+
function Qn(e) {
|
|
1423
|
+
return e?.includes(",") ? er(e, (e) => {
|
|
1376
1424
|
let t = /* @__PURE__ */ new Set();
|
|
1377
1425
|
return e.map((e) => {
|
|
1378
|
-
let n =
|
|
1426
|
+
let n = nr(e, t);
|
|
1379
1427
|
return t.add(n), n;
|
|
1380
1428
|
});
|
|
1381
1429
|
}) : e;
|
|
1382
1430
|
}
|
|
1383
|
-
function
|
|
1384
|
-
return e?.includes(".") ?
|
|
1431
|
+
function $n(e) {
|
|
1432
|
+
return e?.includes(".") ? er(e, (e) => e.map((e) => e.replaceAll(".", "․"))) : e;
|
|
1385
1433
|
}
|
|
1386
|
-
function
|
|
1434
|
+
function er(e, t) {
|
|
1387
1435
|
let n = e.split("\n");
|
|
1388
1436
|
return n[0] = t(n[0].split(",")).join(","), n.join("\n");
|
|
1389
1437
|
}
|
|
1390
|
-
var
|
|
1391
|
-
function
|
|
1438
|
+
var tr = "";
|
|
1439
|
+
function nr(e, t) {
|
|
1392
1440
|
let n = e, r = 1;
|
|
1393
|
-
for (; t.has(n);) n = `${e}${
|
|
1441
|
+
for (; t.has(n);) n = `${e}${tr.repeat(r)}`, r++;
|
|
1394
1442
|
return n;
|
|
1395
1443
|
}
|
|
1396
1444
|
//#endregion
|
|
1397
|
-
export {
|
|
1445
|
+
export { X as a, Ln as i, Zn as n, Se as o, Xn as r, te as s, Yn as t };
|