@marimo-team/frontend 0.14.18-dev9 → 0.15.1-dev10
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/assets/{ConnectedDataExplorerComponent-B6NVG7Fy.js → ConnectedDataExplorerComponent-BvA88co5.js} +1 -1
- package/dist/assets/{ImageComparisonComponent-3KcZa9Ym.js → ImageComparisonComponent-DMstqRhm.js} +1 -1
- package/dist/assets/{VegaLite-CtkqxS0X.js → VegaLite-Mesl0wXW.js} +1 -1
- package/dist/assets/{_baseEach-CjvI0y7T.js → _baseEach-4LREA2xJ.js} +1 -1
- package/dist/assets/_baseMap-C6LNFWWn.js +1 -0
- package/dist/assets/{_baseUniq-Ds9S94xv.js → _baseUniq-C4wq7Gz_.js} +1 -1
- package/dist/assets/{_createAggregator-Bqe-A14O.js → _createAggregator-Di1sij95.js} +1 -1
- package/dist/assets/{any-language-editor-CGmtjfJH.js → any-language-editor-CNdroSlJ.js} +1 -1
- package/dist/assets/architectureDiagram-KFL7JDKH-BxXZfRHj.js +36 -0
- package/dist/assets/blockDiagram-ZYB65J3Q-8mg_ND0j.js +122 -0
- package/dist/assets/{c4Diagram-6F6E4RAY-CvGMgd-R.js → c4Diagram-AAMF2YG6-BH1zFYgt.js} +1 -1
- package/dist/assets/channel-B3CCoyYy.js +1 -0
- package/dist/assets/{chunk-353BL4L5-BJhgRHK-.js → chunk-ANTBXLJU-wUIE1C6t.js} +1 -1
- package/dist/assets/{chunk-AACKK3MU-tA3KIhd1.js → chunk-FHKO5MBM-BnGig1B_.js} +1 -1
- package/dist/assets/{chunk-E2GYISFI-uWIZ1Jhx.js → chunk-GLLZNHP4-BeuHRwGr.js} +1 -1
- package/dist/assets/{chunk-SZ463SBG-DHkdo7UI.js → chunk-JBRWN2VN-BEuqVuwn.js} +4 -4
- package/dist/assets/{chunk-OW32GOEJ-B-QB95S1.js → chunk-LXBSTHXV-DIaccDrz.js} +6 -6
- package/dist/assets/{chunk-SKB7J2MH-DPsXY34k.js → chunk-NRVI72HA-I0EqNhLo.js} +1 -1
- package/dist/assets/{chunk-67H74DCK-BWX3D-qq.js → chunk-OMD6QJNC-DBDKfLns.js} +1 -1
- package/dist/assets/{chunk-BFAMUDN2-CY30V5X_.js → chunk-WVR4S24B-D9vksrD4.js} +1 -1
- package/dist/assets/{circle-play-DvNUYBOa.js → circle-play-Xdbicaqg.js} +1 -1
- package/dist/assets/classDiagram-3BZAVTQC-CLXskjCP.js +1 -0
- package/dist/assets/classDiagram-v2-QTMF73CY-CLXskjCP.js +1 -0
- package/dist/assets/clone-BCc-guNO.js +1 -0
- package/dist/assets/common-keywords-Dg3Y2cJS.js +1 -0
- package/dist/assets/{compile-yfBBBvDb.js → compile-D-SKgFzl.js} +1 -1
- package/dist/assets/cytoscape.esm-UcEO6FGL.js +325 -0
- package/dist/assets/{dagre-JOIXM2OF-CGKrq8GI.js → dagre-2BBEFEWP-Dj4VJDXi.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-BeUIwx4E.js → data-grid-overlay-editor-BHUr5Xhc.js} +1 -1
- package/dist/assets/{diagram-VMROVX33-BAO1guE0.js → diagram-4IRLE6MV-9wayoyRN.js} +1 -1
- package/dist/assets/diagram-GUPCWM2R-5NhVlGLr.js +24 -0
- package/dist/assets/{diagram-ZTM2IBQH-B4LQUmZH.js → diagram-RP2FKANI-CNBOj37W.js} +1 -1
- package/dist/assets/duckdb-keywords-CFYiiNsB.js +1 -0
- package/dist/assets/edit-page-D8Xj7wsn.js +163 -0
- package/dist/assets/{erDiagram-3M52JZNH-D3kcrriI.js → erDiagram-HZWUO2LU-KEjz95KS.js} +1 -1
- package/dist/assets/flowDiagram-THRYKUMA-9PtbKpm0.js +162 -0
- package/dist/assets/ganttDiagram-WV7ZQ7D5-CFXRYmNt.js +267 -0
- package/dist/assets/{gitGraphDiagram-GW3U2K7C-Q9Tu2K8y.js → gitGraphDiagram-OJR772UL-hFrAcG26.js} +1 -1
- package/dist/assets/{glide-data-editor-ceB8jin-.js → glide-data-editor-HLSiEHg4.js} +11 -11
- package/dist/assets/{graph-mQaQlEC0.js → graph-iTnwmAye.js} +1 -1
- package/dist/assets/{home-page-DfH28tMw.js → home-page-DzRg-dzP.js} +2 -2
- package/dist/assets/{index-Cs6LYSt0.js → index-B3l0i9L2.js} +1 -1
- package/dist/assets/{index-Cd25JFtC.js → index-BA1eBtgJ.js} +1 -1
- package/dist/assets/{index-DZeLh41D.js → index-BMCpi_hV.js} +1 -1
- package/dist/assets/index-BRPMSgmu.css +1 -0
- package/dist/assets/index-Bj_MIGqG.js +68 -0
- package/dist/assets/{index-Bbz-vY_t.js → index-BlHS2xQv.js} +1 -1
- package/dist/assets/{index-j8KhNyAD.js → index-BzQQnlIk.js} +1 -1
- package/dist/assets/{index-Bl0C1eEM.js → index-BzZRHBMs.js} +1 -1
- package/dist/assets/{index-BS0ZXaCb.js → index-CEoUSuyW.js} +1 -1
- package/dist/assets/{index-DF_6z97_.js → index-CJRYE40I.js} +1 -1
- package/dist/assets/{index-CbFuBnKK.js → index-CQ7rf4K7.js} +1 -1
- package/dist/assets/{index-BbKaEGro.js → index-Cl5g0z7j.js} +1 -1
- package/dist/assets/{index-6r7UeFlf.js → index-Cni7Zj6s.js} +1 -1
- package/dist/assets/{index-D1qx1y0C.js → index-CrltF-5r.js} +1 -1
- package/dist/assets/{index-ynTLoSgO.js → index-CswmrBaY.js} +1 -1
- package/dist/assets/{index-Cz8VHSaF.js → index-D1rqBcHl.js} +1 -1
- package/dist/assets/{index-Bh4jjeua.js → index-DApZsb--.js} +1 -1
- package/dist/assets/{index-DdiulcY3.js → index-DNVhZM1y.js} +1 -1
- package/dist/assets/{index-CoLaKlH0.js → index-DWJwqJmD.js} +1 -1
- package/dist/assets/{index-CKe-VV4U.js → index-DmunXcbP.js} +1 -1
- package/dist/assets/index-WZpn7zIz.js +528 -0
- package/dist/assets/infoDiagram-6WOFNB3A-BvitCnlF.js +2 -0
- package/dist/assets/{journeyDiagram-EWQZEKCU-DHnUk6vv.js → journeyDiagram-FFXJYRFH-BEiF2rN9.js} +4 -4
- package/dist/assets/{kanban-definition-ZSS6B67P-G4X25rf5.js → kanban-definition-KOZQBZVT-BZZVRqX0.js} +1 -1
- package/dist/assets/{layout-Ovgg_XTL.js → layout-2hUFrdoK.js} +1 -1
- package/dist/assets/{linear-DT2F5lCA.js → linear-DM7ygpKu.js} +1 -1
- package/dist/assets/links-BJFGdYRd.js +17 -0
- package/dist/assets/mermaid-CxGPSzDz.js +211 -0
- package/dist/assets/min-DS87IVOa.js +1 -0
- package/dist/assets/{mindmap-definition-6CBA2TL7-DNdqOjtw.js → mindmap-definition-LNHGMQRG-C7yfXmRD.js} +1 -1
- package/dist/assets/{number-overlay-editor-BNl24tu6.js → number-overlay-editor-qOf48nx-.js} +2 -2
- package/dist/assets/pieDiagram-DBDJKBY4-CRluUHH0.js +30 -0
- package/dist/assets/{quadrantDiagram-2OG54O6I--dNkbIMK.js → quadrantDiagram-YPSRARAO-FZO2_Kyx.js} +1 -1
- package/dist/assets/{react-plotly-bwK_a_t1.js → react-plotly-BV6Vu1ZC.js} +1 -1
- package/dist/assets/{requirementDiagram-QOLK2EJ7-28ZDvOK8.js → requirementDiagram-EGVEC5DT-CFEV56bq.js} +1 -1
- package/dist/assets/{run-page-CJW1v8wr.js → run-page-BiiAHZuC.js} +1 -1
- package/dist/assets/{sankeyDiagram-4UZDY2LN-XAKiDU7c.js → sankeyDiagram-HRAUVNP4-cf6xzlF-.js} +2 -2
- package/dist/assets/{sequenceDiagram-SKLFT4DO-DDCNXI_B.js → sequenceDiagram-WFGC7UMF-CEIC5fba.js} +6 -6
- package/dist/assets/{slides-component-2aF-KcfL.js → slides-component-BXl359nW.js} +1 -1
- package/dist/assets/sortBy-Dv7jjKnm.js +1 -0
- package/dist/assets/{stateDiagram-MI5ZYTHO-D1_v1n0T.js → stateDiagram-UUKSUZ4H-DLvG9b91.js} +1 -1
- package/dist/assets/stateDiagram-v2-EYPG3UTE-Z_xESMay.js +1 -0
- package/dist/assets/storage-B47VVzw1.js +26 -0
- package/dist/assets/{terminal-BmZY9sKi.js → terminal-2p_4lGQJ.js} +1 -1
- package/dist/assets/time-OI-T4MiC.js +1 -0
- package/dist/assets/{timeline-definition-MYPXXCX6-BLXFJK2J.js → timeline-definition-3HZDQTIS-Da1Ro9aI.js} +1 -1
- package/dist/assets/{tracing-DAOqNENE.js → tracing-CRxB69vv.js} +2 -2
- package/dist/assets/{trash-DJ39k3RZ.js → trash-DM7Eop-E.js} +1 -1
- package/dist/assets/{treemap-75Q7IDZK-CRVQqKgI.js → treemap-75Q7IDZK-DaZTYidc.js} +1 -1
- package/dist/assets/{vega-component-C-duuyA7.js → vega-component-D1rpMJYI.js} +1 -1
- package/dist/assets/xychartDiagram-FDP5SA34-COsO2s8u.js +7 -0
- package/dist/index.html +2 -2
- package/package.json +11 -6
- package/src/README.md +18 -0
- package/src/__mocks__/common.ts +160 -0
- package/src/__mocks__/notebook.ts +76 -0
- package/src/__mocks__/requests.ts +72 -0
- package/src/__mocks__/tracebacks.ts +32 -0
- package/src/__tests__/CellStatus.test.tsx +263 -0
- package/src/__tests__/__snapshots__/CellStatus.test.tsx.snap +523 -0
- package/src/__tests__/chat-utils.test.ts +234 -0
- package/src/__tests__/lru.test.ts +74 -0
- package/src/__tests__/main.test.tsx +174 -0
- package/src/__tests__/setup.ts +17 -0
- package/src/__tests__/test-helpers.ts +24 -0
- package/src/assets/circle-check.ico +0 -0
- package/src/assets/circle-play.ico +0 -0
- package/src/assets/circle-x.ico +0 -0
- package/src/assets/gradient.png +0 -0
- package/src/assets/icon-16x16.png +0 -0
- package/src/assets/icon-32x32.png +0 -0
- package/src/assets/noise.png +0 -0
- package/src/components/ai/ai-model-dropdown.tsx +405 -0
- package/src/components/ai/ai-provider-icon.tsx +54 -0
- package/src/components/app-config/ai-config.tsx +855 -0
- package/src/components/app-config/app-config-button.tsx +100 -0
- package/src/components/app-config/app-config-form.tsx +307 -0
- package/src/components/app-config/common.tsx +48 -0
- package/src/components/app-config/constants.ts +13 -0
- package/src/components/app-config/incorrect-model-id.tsx +43 -0
- package/src/components/app-config/is-overridden.tsx +119 -0
- package/src/components/app-config/optional-features.tsx +251 -0
- package/src/components/app-config/state.ts +18 -0
- package/src/components/app-config/user-config-form.tsx +1361 -0
- package/src/components/audio/audio-recorder.tsx +63 -0
- package/src/components/buttons/clear-button.tsx +23 -0
- package/src/components/buttons/undo-button.tsx +35 -0
- package/src/components/chat/chat-panel.tsx +720 -0
- package/src/components/chat/markdown-renderer.tsx +217 -0
- package/src/components/chat/reasoning-accordion.tsx +50 -0
- package/src/components/chat/tool-call-accordion.tsx +118 -0
- package/src/components/data-table/SearchBar.tsx +66 -0
- package/src/components/data-table/TableActions.tsx +183 -0
- package/src/components/data-table/__tests__/__snapshots__/chart-spec-model.test.ts.snap +1079 -0
- package/src/components/data-table/__tests__/chart-spec-model.test.ts +707 -0
- package/src/components/data-table/__tests__/column_formatting.test.ts +115 -0
- package/src/components/data-table/__tests__/columns.test.tsx +341 -0
- package/src/components/data-table/__tests__/data-table.test.tsx +60 -0
- package/src/components/data-table/__tests__/pagination.test.tsx +152 -0
- package/src/components/data-table/__tests__/types.test.ts +44 -0
- package/src/components/data-table/__tests__/url-detector.test.tsx +169 -0
- package/src/components/data-table/__tests__/useColumnPinning.test.ts +76 -0
- package/src/components/data-table/cell-selection/__tests__/feature.test.ts +187 -0
- package/src/components/data-table/cell-selection/feature.ts +123 -0
- package/src/components/data-table/cell-selection/types.ts +49 -0
- package/src/components/data-table/cell-styling/feature.ts +40 -0
- package/src/components/data-table/cell-styling/types.ts +26 -0
- package/src/components/data-table/charts/README.md +65 -0
- package/src/components/data-table/charts/__tests__/__snapshots__/spec-snapshot.test.ts.snap +47 -0
- package/src/components/data-table/charts/__tests__/altair-generator.test.ts +425 -0
- package/src/components/data-table/charts/__tests__/renderer.test.ts +20 -0
- package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +83 -0
- package/src/components/data-table/charts/__tests__/spec.test.ts +997 -0
- package/src/components/data-table/charts/__tests__/storage.test.ts +103 -0
- package/src/components/data-table/charts/chart-spec/altair-generator.ts +162 -0
- package/src/components/data-table/charts/chart-spec/encodings.ts +173 -0
- package/src/components/data-table/charts/chart-spec/spec.ts +345 -0
- package/src/components/data-table/charts/chart-spec/tooltips.ts +168 -0
- package/src/components/data-table/charts/chart-spec/types.ts +77 -0
- package/src/components/data-table/charts/charts.tsx +492 -0
- package/src/components/data-table/charts/components/chart-items.tsx +369 -0
- package/src/components/data-table/charts/components/chart-states.tsx +37 -0
- package/src/components/data-table/charts/components/form-fields.tsx +872 -0
- package/src/components/data-table/charts/components/layouts.tsx +118 -0
- package/src/components/data-table/charts/constants.ts +159 -0
- package/src/components/data-table/charts/context.ts +20 -0
- package/src/components/data-table/charts/forms/common-chart.tsx +202 -0
- package/src/components/data-table/charts/forms/heatmap.tsx +44 -0
- package/src/components/data-table/charts/forms/pie.tsx +70 -0
- package/src/components/data-table/charts/lazy-chart.tsx +56 -0
- package/src/components/data-table/charts/schemas.ts +140 -0
- package/src/components/data-table/charts/storage.ts +88 -0
- package/src/components/data-table/charts/types.ts +124 -0
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +227 -0
- package/src/components/data-table/column-formatting/feature.ts +247 -0
- package/src/components/data-table/column-formatting/types.ts +54 -0
- package/src/components/data-table/column-header.tsx +672 -0
- package/src/components/data-table/column-summary/chart-skeleton.tsx +57 -0
- package/src/components/data-table/column-summary/chart-spec-model.tsx +916 -0
- package/src/components/data-table/column-summary/column-summary.tsx +166 -0
- package/src/components/data-table/column-summary/legacy-chart-spec.ts +242 -0
- package/src/components/data-table/column-summary/utils.ts +142 -0
- package/src/components/data-table/column-wrapping/feature.ts +62 -0
- package/src/components/data-table/column-wrapping/types.ts +29 -0
- package/src/components/data-table/columns.tsx +528 -0
- package/src/components/data-table/copy-column/feature.ts +27 -0
- package/src/components/data-table/copy-column/types.ts +19 -0
- package/src/components/data-table/data-table.tsx +298 -0
- package/src/components/data-table/date-popover.tsx +146 -0
- package/src/components/data-table/download-actions.tsx +186 -0
- package/src/components/data-table/filter-pills.tsx +120 -0
- package/src/components/data-table/filters.ts +202 -0
- package/src/components/data-table/focus-row/feature.ts +41 -0
- package/src/components/data-table/focus-row/types.ts +32 -0
- package/src/components/data-table/header-items.tsx +295 -0
- package/src/components/data-table/hooks/use-column-pinning.ts +51 -0
- package/src/components/data-table/hooks/use-panel-ownership.ts +98 -0
- package/src/components/data-table/loading-table.tsx +56 -0
- package/src/components/data-table/mime-cell.tsx +68 -0
- package/src/components/data-table/pagination.tsx +329 -0
- package/src/components/data-table/range-focus/__tests__/atoms.test.ts +907 -0
- package/src/components/data-table/range-focus/__tests__/utils.test.ts +316 -0
- package/src/components/data-table/range-focus/atoms.ts +380 -0
- package/src/components/data-table/range-focus/cell-selection-indicator.tsx +37 -0
- package/src/components/data-table/range-focus/provider.tsx +13 -0
- package/src/components/data-table/range-focus/use-cell-range-selection.ts +119 -0
- package/src/components/data-table/range-focus/use-scroll-into-view.ts +46 -0
- package/src/components/data-table/range-focus/utils.ts +105 -0
- package/src/components/data-table/renderers.tsx +247 -0
- package/src/components/data-table/row-viewer-panel/__tests__/filter-rows.test.ts +82 -0
- package/src/components/data-table/row-viewer-panel/__tests__/row-viewer.test.tsx +58 -0
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +371 -0
- package/src/components/data-table/types.ts +81 -0
- package/src/components/data-table/uniformSample.tsx +19 -0
- package/src/components/data-table/url-detector.tsx +111 -0
- package/src/components/data-table/utils.ts +46 -0
- package/src/components/databases/display.tsx +66 -0
- package/src/components/databases/engine-variable.tsx +51 -0
- package/src/components/databases/icon.tsx +91 -0
- package/src/components/databases/icons/clickhouse.svg +1 -0
- package/src/components/databases/icons/databricks.svg +1 -0
- package/src/components/databases/icons/datafusion.png +0 -0
- package/src/components/databases/icons/duckdb.svg +1 -0
- package/src/components/databases/icons/googlebigquery.svg +1 -0
- package/src/components/databases/icons/iceberg.png +0 -0
- package/src/components/databases/icons/motherduck.svg +9 -0
- package/src/components/databases/icons/mysql.svg +1 -0
- package/src/components/databases/icons/postgresql.svg +1 -0
- package/src/components/databases/icons/redshift.svg +1 -0
- package/src/components/databases/icons/snowflake.svg +1 -0
- package/src/components/databases/icons/spark.svg +1 -0
- package/src/components/databases/icons/sqlalchemy.svg +1 -0
- package/src/components/databases/icons/sqlite.svg +1 -0
- package/src/components/databases/icons/timeplus.svg +17 -0
- package/src/components/databases/icons/trino.svg +1 -0
- package/src/components/datasets/icons.tsx +55 -0
- package/src/components/datasources/__tests__/install-package-button.test.tsx +85 -0
- package/src/components/datasources/__tests__/utils.test.ts +171 -0
- package/src/components/datasources/column-preview.tsx +269 -0
- package/src/components/datasources/components.tsx +100 -0
- package/src/components/datasources/datasources.tsx +799 -0
- package/src/components/datasources/install-package-button.tsx +46 -0
- package/src/components/datasources/utils.ts +62 -0
- package/src/components/debug/indicator.tsx +19 -0
- package/src/components/debugger/debugger-code.css +3 -0
- package/src/components/debugger/debugger-code.tsx +222 -0
- package/src/components/dependency-graph/custom-node.tsx +89 -0
- package/src/components/dependency-graph/dependency-graph-minimap.tsx +197 -0
- package/src/components/dependency-graph/dependency-graph-tree.tsx +181 -0
- package/src/components/dependency-graph/dependency-graph.css +17 -0
- package/src/components/dependency-graph/dependency-graph.tsx +66 -0
- package/src/components/dependency-graph/elements.ts +185 -0
- package/src/components/dependency-graph/panels.tsx +279 -0
- package/src/components/dependency-graph/types.ts +21 -0
- package/src/components/dependency-graph/utils/changes.ts +54 -0
- package/src/components/dependency-graph/utils/layout.ts +45 -0
- package/src/components/dependency-graph/utils/useFitToViewOnDimensionChange.ts +25 -0
- package/src/components/editor/Cell.tsx +1175 -0
- package/src/components/editor/Disconnected.tsx +72 -0
- package/src/components/editor/Output.tsx +462 -0
- package/src/components/editor/RecoveryButton.tsx +161 -0
- package/src/components/editor/SortableCell.tsx +161 -0
- package/src/components/editor/__tests__/data-attributes.test.tsx +173 -0
- package/src/components/editor/__tests__/dynamic-favicon.test.tsx +183 -0
- package/src/components/editor/actions/name-cell-input.tsx +137 -0
- package/src/components/editor/actions/types.ts +53 -0
- package/src/components/editor/actions/useCellActionButton.tsx +422 -0
- package/src/components/editor/actions/useConfigActions.tsx +182 -0
- package/src/components/editor/actions/useCopyNotebook.tsx +41 -0
- package/src/components/editor/actions/useHideAllMarkdownCode.ts +53 -0
- package/src/components/editor/actions/useNotebookActions.tsx +556 -0
- package/src/components/editor/actions/useRestartKernel.tsx +36 -0
- package/src/components/editor/ai/__tests__/completion-utils.test.ts +379 -0
- package/src/components/editor/ai/add-cell-with-ai.tsx +428 -0
- package/src/components/editor/ai/ai-completion-editor.tsx +261 -0
- package/src/components/editor/ai/completion-handlers.tsx +91 -0
- package/src/components/editor/ai/completion-utils.ts +95 -0
- package/src/components/editor/ai/merge-editor.css +9 -0
- package/src/components/editor/alerts/connecting-alert.tsx +46 -0
- package/src/components/editor/alerts/floating-alert.tsx +47 -0
- package/src/components/editor/alerts/stdin-blocking-alert.tsx +61 -0
- package/src/components/editor/app-container.tsx +53 -0
- package/src/components/editor/boundary/ErrorBoundary.tsx +41 -0
- package/src/components/editor/cell/CellStatus.tsx +371 -0
- package/src/components/editor/cell/CreateCellButton.tsx +132 -0
- package/src/components/editor/cell/DeleteButton.tsx +58 -0
- package/src/components/editor/cell/PendingDeleteConfirmation.tsx +126 -0
- package/src/components/editor/cell/RunButton.tsx +109 -0
- package/src/components/editor/cell/StopButton.tsx +36 -0
- package/src/components/editor/cell/TinyCode.css +10 -0
- package/src/components/editor/cell/TinyCode.tsx +53 -0
- package/src/components/editor/cell/cell-actions.tsx +185 -0
- package/src/components/editor/cell/cell-context-menu.tsx +243 -0
- package/src/components/editor/cell/cell-status.css +21 -0
- package/src/components/editor/cell/code/cell-editor.tsx +546 -0
- package/src/components/editor/cell/code/icons.tsx +31 -0
- package/src/components/editor/cell/code/language-toggle.tsx +140 -0
- package/src/components/editor/cell/collapse.tsx +100 -0
- package/src/components/editor/cell/toolbar.tsx +89 -0
- package/src/components/editor/cell/useAddCell.ts +29 -0
- package/src/components/editor/cell/useDeleteCell.tsx +89 -0
- package/src/components/editor/cell/useRunCells.ts +86 -0
- package/src/components/editor/cell/useShouldShowInterrupt.ts +26 -0
- package/src/components/editor/cell/useSplitCell.tsx +41 -0
- package/src/components/editor/chrome/components/contribute-snippet-button.tsx +138 -0
- package/src/components/editor/chrome/components/feedback-button.tsx +105 -0
- package/src/components/editor/chrome/panels/__tests__/write-secret-modal.test.ts +43 -0
- package/src/components/editor/chrome/panels/constants.ts +2 -0
- package/src/components/editor/chrome/panels/context-aware-panel/atoms.ts +28 -0
- package/src/components/editor/chrome/panels/context-aware-panel/context-aware-panel.tsx +167 -0
- package/src/components/editor/chrome/panels/datasources-panel.tsx +6 -0
- package/src/components/editor/chrome/panels/dependency-graph-panel.tsx +23 -0
- package/src/components/editor/chrome/panels/documentation-panel.tsx +29 -0
- package/src/components/editor/chrome/panels/empty-state.tsx +28 -0
- package/src/components/editor/chrome/panels/error-panel.tsx +35 -0
- package/src/components/editor/chrome/panels/file-explorer-panel.tsx +33 -0
- package/src/components/editor/chrome/panels/logs-panel.tsx +97 -0
- package/src/components/editor/chrome/panels/outline/floating-outline.tsx +129 -0
- package/src/components/editor/chrome/panels/outline/useActiveOutline.tsx +172 -0
- package/src/components/editor/chrome/panels/outline-panel.css +6 -0
- package/src/components/editor/chrome/panels/outline-panel.tsx +39 -0
- package/src/components/editor/chrome/panels/packages-panel.tsx +635 -0
- package/src/components/editor/chrome/panels/packages-state.ts +5 -0
- package/src/components/editor/chrome/panels/scratchpad-panel.tsx +8 -0
- package/src/components/editor/chrome/panels/secrets-panel.tsx +155 -0
- package/src/components/editor/chrome/panels/snippets-panel.css +11 -0
- package/src/components/editor/chrome/panels/snippets-panel.tsx +230 -0
- package/src/components/editor/chrome/panels/tracing-panel.tsx +28 -0
- package/src/components/editor/chrome/panels/variable-panel.tsx +31 -0
- package/src/components/editor/chrome/panels/write-secret-modal.tsx +190 -0
- package/src/components/editor/chrome/state.ts +102 -0
- package/src/components/editor/chrome/types.ts +133 -0
- package/src/components/editor/chrome/wrapper/__tests__/minimap-state.test.ts +209 -0
- package/src/components/editor/chrome/wrapper/__tests__/storage.test.ts +41 -0
- package/src/components/editor/chrome/wrapper/app-chrome.css +22 -0
- package/src/components/editor/chrome/wrapper/app-chrome.tsx +256 -0
- package/src/components/editor/chrome/wrapper/footer-item.tsx +43 -0
- package/src/components/editor/chrome/wrapper/footer-items/ai-status.tsx +47 -0
- package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +111 -0
- package/src/components/editor/chrome/wrapper/footer-items/copilot-status.tsx +125 -0
- package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +185 -0
- package/src/components/editor/chrome/wrapper/footer-items/minimap-status.tsx +21 -0
- package/src/components/editor/chrome/wrapper/footer-items/rtc-status.tsx +65 -0
- package/src/components/editor/chrome/wrapper/footer-items/runtime-settings.tsx +370 -0
- package/src/components/editor/chrome/wrapper/footer.tsx +90 -0
- package/src/components/editor/chrome/wrapper/minimap-state.ts +164 -0
- package/src/components/editor/chrome/wrapper/minimap.tsx +443 -0
- package/src/components/editor/chrome/wrapper/panels.tsx +10 -0
- package/src/components/editor/chrome/wrapper/sidebar.tsx +100 -0
- package/src/components/editor/chrome/wrapper/storage.ts +56 -0
- package/src/components/editor/chrome/wrapper/utils.ts +8 -0
- package/src/components/editor/code/readonly-python-code.tsx +160 -0
- package/src/components/editor/columns/__tests__/storage.test.ts +104 -0
- package/src/components/editor/columns/cell-column.tsx +105 -0
- package/src/components/editor/columns/sortable-column.tsx +175 -0
- package/src/components/editor/columns/storage.ts +56 -0
- package/src/components/editor/common.ts +20 -0
- package/src/components/editor/controls/Controls.tsx +225 -0
- package/src/components/editor/controls/command-palette-button.tsx +27 -0
- package/src/components/editor/controls/command-palette.tsx +210 -0
- package/src/components/editor/controls/keyboard-shortcuts.tsx +309 -0
- package/src/components/editor/controls/notebook-menu-dropdown.tsx +157 -0
- package/src/components/editor/controls/shutdown-button.tsx +70 -0
- package/src/components/editor/database/__tests__/__snapshots__/as-code.test.ts.snap +659 -0
- package/src/components/editor/database/__tests__/as-code.test.ts +598 -0
- package/src/components/editor/database/__tests__/secrets.test.ts +38 -0
- package/src/components/editor/database/add-database-form.tsx +395 -0
- package/src/components/editor/database/as-code.ts +786 -0
- package/src/components/editor/database/form-renderers.tsx +211 -0
- package/src/components/editor/database/schemas.ts +485 -0
- package/src/components/editor/database/secrets.ts +25 -0
- package/src/components/editor/documentation.css +139 -0
- package/src/components/editor/dynamic-favicon.tsx +126 -0
- package/src/components/editor/errors/auto-fix.tsx +61 -0
- package/src/components/editor/file-tree/__tests__/requesting-tree.test.ts +321 -0
- package/src/components/editor/file-tree/file-explorer.tsx +679 -0
- package/src/components/editor/file-tree/file-viewer.tsx +283 -0
- package/src/components/editor/file-tree/renderers.tsx +83 -0
- package/src/components/editor/file-tree/requesting-tree.tsx +228 -0
- package/src/components/editor/file-tree/state.tsx +26 -0
- package/src/components/editor/file-tree/types.ts +118 -0
- package/src/components/editor/file-tree/upload.tsx +101 -0
- package/src/components/editor/header/app-header.tsx +28 -0
- package/src/components/editor/header/filename-form.tsx +27 -0
- package/src/components/editor/header/filename-input.css +21 -0
- package/src/components/editor/header/filename-input.tsx +244 -0
- package/src/components/editor/header/status.tsx +72 -0
- package/src/components/editor/inputs/Inputs.css +118 -0
- package/src/components/editor/inputs/Inputs.styles.ts +66 -0
- package/src/components/editor/inputs/Inputs.tsx +34 -0
- package/src/components/editor/kiosk-mode.tsx +25 -0
- package/src/components/editor/links/cell-link-list.tsx +74 -0
- package/src/components/editor/links/cell-link.tsx +128 -0
- package/src/components/editor/navigation/__tests__/clipboard.test.ts +466 -0
- package/src/components/editor/navigation/__tests__/navigation.test.ts +1771 -0
- package/src/components/editor/navigation/__tests__/selection.test.ts +194 -0
- package/src/components/editor/navigation/clipboard.ts +205 -0
- package/src/components/editor/navigation/focus-utils.ts +48 -0
- package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +499 -0
- package/src/components/editor/navigation/navigation.ts +704 -0
- package/src/components/editor/navigation/selection.ts +114 -0
- package/src/components/editor/navigation/state.ts +5 -0
- package/src/components/editor/navigation/vim-bindings.test.ts +109 -0
- package/src/components/editor/navigation/vim-bindings.ts +90 -0
- package/src/components/editor/notebook-banner.tsx +75 -0
- package/src/components/editor/output/CalloutOutput.styles.ts +22 -0
- package/src/components/editor/output/CalloutOutput.tsx +19 -0
- package/src/components/editor/output/ConsoleOutput.tsx +276 -0
- package/src/components/editor/output/EmotionCacheProvider.tsx +32 -0
- package/src/components/editor/output/HtmlOutput.tsx +25 -0
- package/src/components/editor/output/ImageOutput.tsx +25 -0
- package/src/components/editor/output/JsonOutput.tsx +424 -0
- package/src/components/editor/output/MarimoErrorOutput.tsx +511 -0
- package/src/components/editor/output/MarimoTracebackOutput.tsx +233 -0
- package/src/components/editor/output/Outputs.css +102 -0
- package/src/components/editor/output/TextOutput.tsx +42 -0
- package/src/components/editor/output/VideoOutput.tsx +11 -0
- package/src/components/editor/output/__tests__/ansi.test.ts +39 -0
- package/src/components/editor/output/__tests__/json-output.test.ts +269 -0
- package/src/components/editor/output/__tests__/traceback.test.tsx +105 -0
- package/src/components/editor/output/useWrapText.ts +14 -0
- package/src/components/editor/package-alert.tsx +596 -0
- package/src/components/editor/renderMimeIcon.tsx +38 -0
- package/src/components/editor/renderers/CellArray.tsx +352 -0
- package/src/components/editor/renderers/cells-renderer.tsx +96 -0
- package/src/components/editor/renderers/grid-layout/grid-layout.tsx +650 -0
- package/src/components/editor/renderers/grid-layout/plugin.tsx +146 -0
- package/src/components/editor/renderers/grid-layout/styles.css +31 -0
- package/src/components/editor/renderers/grid-layout/types.ts +89 -0
- package/src/components/editor/renderers/layout-select.tsx +86 -0
- package/src/components/editor/renderers/plugins.ts +31 -0
- package/src/components/editor/renderers/slides-layout/plugin.tsx +31 -0
- package/src/components/editor/renderers/slides-layout/slides-layout.tsx +74 -0
- package/src/components/editor/renderers/slides-layout/types.ts +12 -0
- package/src/components/editor/renderers/types.ts +75 -0
- package/src/components/editor/renderers/vertical-layout/__tests__/useDelayVisibility.test.ts +87 -0
- package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +123 -0
- package/src/components/editor/renderers/vertical-layout/__tests__/vertical-layout.test.ts +173 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/__tests__/sidebar.test.tsx +56 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/sheet-sidebar.tsx +32 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/sidebar-slot.tsx +10 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/sidebar.css +20 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/sidebar.tsx +30 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/state.ts +46 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/toggle.tsx +25 -0
- package/src/components/editor/renderers/vertical-layout/sidebar/wrapped-with-sidebar.tsx +38 -0
- package/src/components/editor/renderers/vertical-layout/useDelayVisibility.ts +32 -0
- package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +107 -0
- package/src/components/editor/renderers/vertical-layout/vertical-layout-wrapper.tsx +46 -0
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +451 -0
- package/src/components/editor/stdin-blocking-alert.tsx +83 -0
- package/src/components/export/export-output-button.tsx +14 -0
- package/src/components/find-replace/find-replace.tsx +293 -0
- package/src/components/forms/__tests__/form-utils.test.ts +104 -0
- package/src/components/forms/form-utils.ts +90 -0
- package/src/components/forms/form.tsx +817 -0
- package/src/components/forms/options.ts +59 -0
- package/src/components/forms/switchable-multi-select.tsx +134 -0
- package/src/components/home/components.tsx +189 -0
- package/src/components/home/state.ts +30 -0
- package/src/components/icons/copy-icon.tsx +59 -0
- package/src/components/icons/github-copilot.tsx +17 -0
- package/src/components/icons/large-spinner.tsx +39 -0
- package/src/components/icons/loading-ellipsis.tsx +46 -0
- package/src/components/icons/multi-icon.css +9 -0
- package/src/components/icons/multi-icon.tsx +30 -0
- package/src/components/icons/spinner.tsx +38 -0
- package/src/components/layout/toolbar.tsx +26 -0
- package/src/components/modal/ImperativeModal.tsx +187 -0
- package/src/components/pages/edit-page.tsx +37 -0
- package/src/components/pages/home-page.tsx +514 -0
- package/src/components/pages/run-page.tsx +55 -0
- package/src/components/scratchpad/scratchpad-history.ts +28 -0
- package/src/components/scratchpad/scratchpad.tsx +280 -0
- package/src/components/shortcuts/renderShortcut.tsx +208 -0
- package/src/components/slides/slides-component.tsx +132 -0
- package/src/components/slides/slides.css +100 -0
- package/src/components/sort/SortableCellsProvider.tsx +242 -0
- package/src/components/static-html/share-modal.tsx +181 -0
- package/src/components/static-html/static-banner.tsx +164 -0
- package/src/components/terminal/terminal.tsx +110 -0
- package/src/components/terminal/xterm.css +3 -0
- package/src/components/tracing/tracing-spec.ts +118 -0
- package/src/components/tracing/tracing.test.tsx +66 -0
- package/src/components/tracing/tracing.tsx +410 -0
- package/src/components/ui/accordion.tsx +70 -0
- package/src/components/ui/alert-dialog.tsx +176 -0
- package/src/components/ui/alert.tsx +64 -0
- package/src/components/ui/aria-popover.tsx +43 -0
- package/src/components/ui/badge.tsx +41 -0
- package/src/components/ui/button.tsx +156 -0
- package/src/components/ui/calendar.tsx +231 -0
- package/src/components/ui/card.tsx +83 -0
- package/src/components/ui/checkbox.tsx +33 -0
- package/src/components/ui/combobox.tsx +278 -0
- package/src/components/ui/command.tsx +165 -0
- package/src/components/ui/context-menu.tsx +193 -0
- package/src/components/ui/date-input.tsx +127 -0
- package/src/components/ui/date-picker.tsx +188 -0
- package/src/components/ui/dialog.tsx +155 -0
- package/src/components/ui/draggable-popover.tsx +68 -0
- package/src/components/ui/dropdown-menu.tsx +190 -0
- package/src/components/ui/field.tsx +90 -0
- package/src/components/ui/form.tsx +224 -0
- package/src/components/ui/fullscreen.tsx +38 -0
- package/src/components/ui/input.tsx +208 -0
- package/src/components/ui/kbd.tsx +22 -0
- package/src/components/ui/label.tsx +26 -0
- package/src/components/ui/links.tsx +23 -0
- package/src/components/ui/menu-items.tsx +101 -0
- package/src/components/ui/native-select.tsx +39 -0
- package/src/components/ui/navigation.tsx +154 -0
- package/src/components/ui/number-field.tsx +99 -0
- package/src/components/ui/popover.tsx +63 -0
- package/src/components/ui/progress.tsx +28 -0
- package/src/components/ui/radio-group.tsx +44 -0
- package/src/components/ui/range-slider.tsx +102 -0
- package/src/components/ui/scroll-area.tsx +47 -0
- package/src/components/ui/select.tsx +167 -0
- package/src/components/ui/sheet.tsx +143 -0
- package/src/components/ui/skeleton.tsx +16 -0
- package/src/components/ui/slider.tsx +80 -0
- package/src/components/ui/switch.tsx +54 -0
- package/src/components/ui/table.tsx +122 -0
- package/src/components/ui/tabs.tsx +55 -0
- package/src/components/ui/textarea.tsx +104 -0
- package/src/components/ui/toast.tsx +133 -0
- package/src/components/ui/toaster.tsx +30 -0
- package/src/components/ui/toggle.tsx +49 -0
- package/src/components/ui/tooltip.tsx +87 -0
- package/src/components/ui/typography.tsx +207 -0
- package/src/components/ui/use-restore-focus.ts +28 -0
- package/src/components/ui/use-toast.ts +224 -0
- package/src/components/utils/delay-mount.tsx +81 -0
- package/src/components/utils/lazy-mount.tsx +24 -0
- package/src/components/variables/common.tsx +37 -0
- package/src/components/variables/variables-table.tsx +335 -0
- package/src/core/MarimoApp.tsx +103 -0
- package/src/core/ai/__tests__/model-registry.test.ts +357 -0
- package/src/core/ai/chat-utils.ts +71 -0
- package/src/core/ai/config.ts +76 -0
- package/src/core/ai/context/__tests__/registry.test.ts +516 -0
- package/src/core/ai/context/context.ts +16 -0
- package/src/core/ai/context/providers/__tests__/__snapshots__/tables.test.ts.snap +291 -0
- package/src/core/ai/context/providers/__tests__/__snapshots__/variable.test.ts.snap +378 -0
- package/src/core/ai/context/providers/__tests__/tables.test.ts +271 -0
- package/src/core/ai/context/providers/__tests__/variable.test.ts +312 -0
- package/src/core/ai/context/providers/common.ts +7 -0
- package/src/core/ai/context/providers/tables.ts +208 -0
- package/src/core/ai/context/providers/variable.ts +72 -0
- package/src/core/ai/context/registry.ts +180 -0
- package/src/core/ai/ids/__tests__/ids.test.ts +193 -0
- package/src/core/ai/ids/ids.ts +71 -0
- package/src/core/ai/model-registry.ts +158 -0
- package/src/core/ai/state.ts +58 -0
- package/src/core/alerts/state.ts +75 -0
- package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +1312 -0
- package/src/core/cells/__tests__/add-missing-import.test.ts +78 -0
- package/src/core/cells/__tests__/cell.test.ts +193 -0
- package/src/core/cells/__tests__/cells.test.ts +2664 -0
- package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +239 -0
- package/src/core/cells/__tests__/focus.test.ts +271 -0
- package/src/core/cells/__tests__/ids.test.ts +90 -0
- package/src/core/cells/__tests__/names.test.ts +62 -0
- package/src/core/cells/__tests__/pending-delete-service.test.tsx +202 -0
- package/src/core/cells/__tests__/runs.test.ts +453 -0
- package/src/core/cells/__tests__/session.test.ts +757 -0
- package/src/core/cells/__tests__/utils.test.ts +428 -0
- package/src/core/cells/actions.ts +21 -0
- package/src/core/cells/add-missing-import.ts +114 -0
- package/src/core/cells/cell.ts +243 -0
- package/src/core/cells/cells.ts +1751 -0
- package/src/core/cells/collapseConsoleOutputs.tsx +133 -0
- package/src/core/cells/effects.ts +42 -0
- package/src/core/cells/focus.ts +128 -0
- package/src/core/cells/ids.ts +124 -0
- package/src/core/cells/logs.ts +114 -0
- package/src/core/cells/names.ts +107 -0
- package/src/core/cells/outline.ts +30 -0
- package/src/core/cells/outputs.ts +34 -0
- package/src/core/cells/pending-delete-service.ts +183 -0
- package/src/core/cells/runs.ts +196 -0
- package/src/core/cells/scrollCellIntoView.ts +133 -0
- package/src/core/cells/session.ts +281 -0
- package/src/core/cells/types.ts +128 -0
- package/src/core/cells/utils.ts +141 -0
- package/src/core/codemirror/__tests__/__snapshots__/setup.test.ts.snap +216 -0
- package/src/core/codemirror/__tests__/extensions.test.ts +117 -0
- package/src/core/codemirror/__tests__/format.test.ts +227 -0
- package/src/core/codemirror/__tests__/setup.test.ts +178 -0
- package/src/core/codemirror/ai/request.ts +72 -0
- package/src/core/codemirror/ai/resources.ts +90 -0
- package/src/core/codemirror/cells/extensions.ts +387 -0
- package/src/core/codemirror/cells/state.ts +32 -0
- package/src/core/codemirror/cells/traceback-decorations.ts +111 -0
- package/src/core/codemirror/cm.ts +272 -0
- package/src/core/codemirror/compat/__tests__/jupyter.test.ts +136 -0
- package/src/core/codemirror/compat/jupyter.tsx +244 -0
- package/src/core/codemirror/completion/Autocompleter.ts +172 -0
- package/src/core/codemirror/completion/__tests__/hints.test.ts +84 -0
- package/src/core/codemirror/completion/__tests__/keymap.test.ts +44 -0
- package/src/core/codemirror/completion/completer.ts +58 -0
- package/src/core/codemirror/completion/hints.ts +143 -0
- package/src/core/codemirror/completion/keymap.ts +70 -0
- package/src/core/codemirror/completion/utils.ts +18 -0
- package/src/core/codemirror/completion/variable-completions.ts +100 -0
- package/src/core/codemirror/config/extension.ts +63 -0
- package/src/core/codemirror/config/types.ts +10 -0
- package/src/core/codemirror/copilot/__tests__/copilot.test.ts +260 -0
- package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +209 -0
- package/src/core/codemirror/copilot/__tests__/trim-utils.test.ts +291 -0
- package/src/core/codemirror/copilot/client.ts +123 -0
- package/src/core/codemirror/copilot/copilot-config.tsx +285 -0
- package/src/core/codemirror/copilot/extension.ts +285 -0
- package/src/core/codemirror/copilot/getCodes.ts +130 -0
- package/src/core/codemirror/copilot/language-server.ts +255 -0
- package/src/core/codemirror/copilot/state.ts +66 -0
- package/src/core/codemirror/copilot/trim-utils.ts +33 -0
- package/src/core/codemirror/copilot/types.ts +41 -0
- package/src/core/codemirror/editing/__tests__/commands.test.ts +106 -0
- package/src/core/codemirror/editing/__tests__/debugging.test.ts +193 -0
- package/src/core/codemirror/editing/commands.ts +25 -0
- package/src/core/codemirror/editing/debugging.ts +58 -0
- package/src/core/codemirror/editing/extensions.ts +4 -0
- package/src/core/codemirror/extensions.ts +95 -0
- package/src/core/codemirror/facet.ts +19 -0
- package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +695 -0
- package/src/core/codemirror/find-replace/extension.ts +41 -0
- package/src/core/codemirror/find-replace/navigate.ts +221 -0
- package/src/core/codemirror/find-replace/query.ts +31 -0
- package/src/core/codemirror/find-replace/search-highlight.ts +148 -0
- package/src/core/codemirror/find-replace/state.ts +167 -0
- package/src/core/codemirror/format.ts +120 -0
- package/src/core/codemirror/go-to-definition/__tests__/commands.test.ts +205 -0
- package/src/core/codemirror/go-to-definition/commands.ts +80 -0
- package/src/core/codemirror/go-to-definition/extension.ts +23 -0
- package/src/core/codemirror/go-to-definition/underline.ts +223 -0
- package/src/core/codemirror/go-to-definition/utils.ts +126 -0
- package/src/core/codemirror/keymaps/__tests__/keymaps.test.ts +43 -0
- package/src/core/codemirror/keymaps/__tests__/vimrc.test.ts +121 -0
- package/src/core/codemirror/keymaps/keymaps.ts +163 -0
- package/src/core/codemirror/keymaps/vim.ts +360 -0
- package/src/core/codemirror/keymaps/vimrc.ts +149 -0
- package/src/core/codemirror/language/LanguageAdapters.ts +23 -0
- package/src/core/codemirror/language/__tests__/ast.test.ts +124 -0
- package/src/core/codemirror/language/__tests__/extension.test.ts +260 -0
- package/src/core/codemirror/language/__tests__/indentOneTab.test.ts +31 -0
- package/src/core/codemirror/language/__tests__/markdown.test.ts +495 -0
- package/src/core/codemirror/language/__tests__/sql.test.ts +1640 -0
- package/src/core/codemirror/language/__tests__/utils.test.ts +166 -0
- package/src/core/codemirror/language/commands.ts +59 -0
- package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +163 -0
- package/src/core/codemirror/language/embedded/embedded-python.ts +131 -0
- package/src/core/codemirror/language/embedded/latex.ts +257 -0
- package/src/core/codemirror/language/extension.ts +322 -0
- package/src/core/codemirror/language/languages/markdown.ts +261 -0
- package/src/core/codemirror/language/languages/python.ts +329 -0
- package/src/core/codemirror/language/languages/sql/completion-sources.tsx +99 -0
- package/src/core/codemirror/language/languages/sql/completion-store.ts +191 -0
- package/src/core/codemirror/language/languages/sql/sql.ts +545 -0
- package/src/core/codemirror/language/languages/sql/utils.ts +42 -0
- package/src/core/codemirror/language/metadata.ts +71 -0
- package/src/core/codemirror/language/panel/markdown.tsx +63 -0
- package/src/core/codemirror/language/panel/panel.tsx +197 -0
- package/src/core/codemirror/language/panel/sql.tsx +132 -0
- package/src/core/codemirror/language/types.ts +41 -0
- package/src/core/codemirror/language/utils/ast.ts +84 -0
- package/src/core/codemirror/language/utils/indentOneTab.ts +9 -0
- package/src/core/codemirror/language/utils/quotes.ts +18 -0
- package/src/core/codemirror/language/utils.ts +78 -0
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +860 -0
- package/src/core/codemirror/lsp/federated-lsp.ts +235 -0
- package/src/core/codemirror/lsp/lens.ts +130 -0
- package/src/core/codemirror/lsp/notebook-lsp.ts +604 -0
- package/src/core/codemirror/lsp/transports.ts +31 -0
- package/src/core/codemirror/lsp/types.ts +55 -0
- package/src/core/codemirror/lsp/utils.ts +11 -0
- package/src/core/codemirror/markdown/__tests__/commands.test.ts +522 -0
- package/src/core/codemirror/markdown/commands.ts +478 -0
- package/src/core/codemirror/markdown/completions.ts +273 -0
- package/src/core/codemirror/markdown/extension.ts +106 -0
- package/src/core/codemirror/misc/__tests__/dnd.test.ts +111 -0
- package/src/core/codemirror/misc/__tests__/paste.test.ts +239 -0
- package/src/core/codemirror/misc/dnd.ts +48 -0
- package/src/core/codemirror/misc/paste.ts +181 -0
- package/src/core/codemirror/placeholder/__tests__/extensions.test.ts +132 -0
- package/src/core/codemirror/placeholder/extensions.ts +99 -0
- package/src/core/codemirror/react-dom/createPanel.tsx +39 -0
- package/src/core/codemirror/reactive-references/__tests__/analyzer.test.ts +1222 -0
- package/src/core/codemirror/reactive-references/analyzer.ts +608 -0
- package/src/core/codemirror/reactive-references/extension.ts +154 -0
- package/src/core/codemirror/readonly/__tests__/extension.test.ts +55 -0
- package/src/core/codemirror/readonly/extension.ts +187 -0
- package/src/core/codemirror/rtc/extension.ts +450 -0
- package/src/core/codemirror/rtc/loro/awareness.ts +496 -0
- package/src/core/codemirror/rtc/loro/colors.ts +38 -0
- package/src/core/codemirror/rtc/loro/sync.ts +159 -0
- package/src/core/codemirror/theme/__tests__/light.test.ts +136 -0
- package/src/core/codemirror/theme/dark.ts +50 -0
- package/src/core/codemirror/theme/light.ts +58 -0
- package/src/core/codemirror/types.ts +5 -0
- package/src/core/codemirror/utils.ts +103 -0
- package/src/core/codemirror/vim/cursor-visibility.ts +58 -0
- package/src/core/config/__tests__/config-schema.test.ts +232 -0
- package/src/core/config/capabilities.ts +15 -0
- package/src/core/config/config-schema.ts +296 -0
- package/src/core/config/config.ts +113 -0
- package/src/core/config/feature-flag.tsx +58 -0
- package/src/core/config/if-capability.tsx +19 -0
- package/src/core/config/widths.ts +5 -0
- package/src/core/constants.ts +52 -0
- package/src/core/datasets/__tests__/all-tables.test.ts +466 -0
- package/src/core/datasets/__tests__/data-source.test.ts +461 -0
- package/src/core/datasets/data-source-connections.ts +334 -0
- package/src/core/datasets/engines.ts +11 -0
- package/src/core/datasets/request-registry.ts +34 -0
- package/src/core/datasets/state.ts +143 -0
- package/src/core/datasets/types.ts +38 -0
- package/src/core/debugger/state.ts +10 -0
- package/src/core/documentation/state.ts +13 -0
- package/src/core/dom/__tests__/htmlUtils.test.ts +22 -0
- package/src/core/dom/__tests__/outline.test.ts +370 -0
- package/src/core/dom/defineCustomElement.ts +23 -0
- package/src/core/dom/events.ts +94 -0
- package/src/core/dom/htmlUtils.ts +75 -0
- package/src/core/dom/outline.ts +123 -0
- package/src/core/dom/ui-element.css +8 -0
- package/src/core/dom/ui-element.ts +249 -0
- package/src/core/dom/uiregistry.ts +209 -0
- package/src/core/edit-app.tsx +189 -0
- package/src/core/errors/__tests__/errors.test.ts +62 -0
- package/src/core/errors/__tests__/utils.test.ts +108 -0
- package/src/core/errors/errors.ts +96 -0
- package/src/core/errors/state.ts +44 -0
- package/src/core/errors/utils.ts +67 -0
- package/src/core/export/hooks.ts +60 -0
- package/src/core/functions/FunctionRegistry.ts +18 -0
- package/src/core/hotkeys/__tests__/hotkeys.test.ts +74 -0
- package/src/core/hotkeys/__tests__/shortcuts.test.ts +166 -0
- package/src/core/hotkeys/actions.ts +38 -0
- package/src/core/hotkeys/hotkeys.ts +523 -0
- package/src/core/hotkeys/shortcuts.ts +146 -0
- package/src/core/islands/__tests__/parse.test.ts +89 -0
- package/src/core/islands/bridge.ts +196 -0
- package/src/core/islands/components/output-wrapper.tsx +154 -0
- package/src/core/islands/components/web-components.tsx +120 -0
- package/src/core/islands/islands.css +14 -0
- package/src/core/islands/main.ts +200 -0
- package/src/core/islands/parse.ts +161 -0
- package/src/core/islands/state.ts +30 -0
- package/src/core/islands/toast.ts +41 -0
- package/src/core/islands/utils.ts +5 -0
- package/src/core/islands/worker/controller.ts +52 -0
- package/src/core/islands/worker/worker.tsx +178 -0
- package/src/core/kernel/RuntimeState.ts +94 -0
- package/src/core/kernel/__tests__/RuntimeState.test.ts +57 -0
- package/src/core/kernel/__tests__/handlers.test.ts +61 -0
- package/src/core/kernel/__tests__/session.test.ts +10 -0
- package/src/core/kernel/handlers.ts +159 -0
- package/src/core/kernel/messages.ts +54 -0
- package/src/core/kernel/queryParamHandlers.ts +39 -0
- package/src/core/kernel/session.ts +50 -0
- package/src/core/layout/layout.ts +99 -0
- package/src/core/layout/useTogglePresenting.ts +50 -0
- package/src/core/meta/globals.ts +25 -0
- package/src/core/meta/state.ts +25 -0
- package/src/core/mime.ts +9 -0
- package/src/core/mode.ts +80 -0
- package/src/core/network/DeferredRequestRegistry.ts +71 -0
- package/src/core/network/__tests__/DeferredRequestRegistry.test.ts +37 -0
- package/src/core/network/__tests__/api.test.ts +80 -0
- package/src/core/network/api.ts +145 -0
- package/src/core/network/auth.ts +13 -0
- package/src/core/network/connection.ts +33 -0
- package/src/core/network/requests-network.ts +398 -0
- package/src/core/network/requests-static.ts +88 -0
- package/src/core/network/requests-toasting.ts +91 -0
- package/src/core/network/requests.ts +24 -0
- package/src/core/network/resolve.ts +17 -0
- package/src/core/network/types.ts +188 -0
- package/src/core/packages/toast-components.tsx +88 -0
- package/src/core/packages/useInstallPackage.ts +46 -0
- package/src/core/rtc/state.ts +20 -0
- package/src/core/run-app.tsx +69 -0
- package/src/core/runtime/__tests__/config.test.ts +173 -0
- package/src/core/runtime/__tests__/createWsUrl.test.ts +61 -0
- package/src/core/runtime/__tests__/runtime.test.ts +603 -0
- package/src/core/runtime/config.ts +49 -0
- package/src/core/runtime/runtime.ts +277 -0
- package/src/core/runtime/types.ts +7 -0
- package/src/core/runtime/utils.ts +9 -0
- package/src/core/saving/file-state.ts +15 -0
- package/src/core/saving/filename.ts +55 -0
- package/src/core/saving/save-component.tsx +274 -0
- package/src/core/saving/state.ts +51 -0
- package/src/core/saving/useAutoSave.ts +68 -0
- package/src/core/secrets/request-registry.ts +16 -0
- package/src/core/slots/slots.ts +9 -0
- package/src/core/state/__tests__/jotai.test.ts +25 -0
- package/src/core/state/jotai.ts +69 -0
- package/src/core/state/observable.ts +23 -0
- package/src/core/static/__tests__/download-html.test.ts +41 -0
- package/src/core/static/__tests__/files.test.ts +494 -0
- package/src/core/static/__tests__/virtual-file-tracker.test.ts +92 -0
- package/src/core/static/download-html.ts +59 -0
- package/src/core/static/files.ts +150 -0
- package/src/core/static/static-state.ts +19 -0
- package/src/core/static/types.ts +8 -0
- package/src/core/static/virtual-file-tracker.ts +83 -0
- package/src/core/variables/__tests__/state.test.ts +148 -0
- package/src/core/variables/state.ts +81 -0
- package/src/core/variables/types.ts +22 -0
- package/src/core/vscode/vscode-bindings.ts +176 -0
- package/src/core/wasm/PyodideLoader.tsx +72 -0
- package/src/core/wasm/__tests__/router.test.ts +57 -0
- package/src/core/wasm/__tests__/share.test.ts +35 -0
- package/src/core/wasm/__tests__/state.test.ts +124 -0
- package/src/core/wasm/__tests__/store.test.ts +55 -0
- package/src/core/wasm/bridge.ts +622 -0
- package/src/core/wasm/router.ts +39 -0
- package/src/core/wasm/rpc.ts +32 -0
- package/src/core/wasm/share.ts +15 -0
- package/src/core/wasm/state.ts +21 -0
- package/src/core/wasm/store.ts +122 -0
- package/src/core/wasm/utils.ts +12 -0
- package/src/core/wasm/worker/bootstrap.ts +223 -0
- package/src/core/wasm/worker/constants.ts +2 -0
- package/src/core/wasm/worker/fs.ts +90 -0
- package/src/core/wasm/worker/getController.ts +16 -0
- package/src/core/wasm/worker/getFS.ts +9 -0
- package/src/core/wasm/worker/getMarimoWheel.ts +15 -0
- package/src/core/wasm/worker/getPyodideVersion.ts +10 -0
- package/src/core/wasm/worker/message-buffer.ts +32 -0
- package/src/core/wasm/worker/save-worker.ts +107 -0
- package/src/core/wasm/worker/tracer.ts +7 -0
- package/src/core/wasm/worker/types.ts +97 -0
- package/src/core/wasm/worker/worker.ts +375 -0
- package/src/core/websocket/StaticWebsocket.ts +61 -0
- package/src/core/websocket/connection-utils.ts +59 -0
- package/src/core/websocket/types.ts +43 -0
- package/src/core/websocket/useMarimoWebSocket.tsx +386 -0
- package/src/core/websocket/useWebSocket.tsx +88 -0
- package/src/css/admonition.css +127 -0
- package/src/css/app/App.css +77 -0
- package/src/css/app/Cell.css +433 -0
- package/src/css/app/Header.css +25 -0
- package/src/css/app/codemirror-completions.css +308 -0
- package/src/css/app/codemirror.css +136 -0
- package/src/css/app/fonts.css +50 -0
- package/src/css/app/print.css +86 -0
- package/src/css/app/reset.css +18 -0
- package/src/css/codehilite.css +354 -0
- package/src/css/common.css +45 -0
- package/src/css/globals.css +176 -0
- package/src/css/index.css +10 -0
- package/src/css/katex-fonts.css +214 -0
- package/src/css/katex.min.css +1183 -0
- package/src/css/md-tooltip.css +52 -0
- package/src/css/md.css +365 -0
- package/src/css/progress.css +93 -0
- package/src/css/table.css +45 -0
- package/src/custom.d.ts +24 -0
- package/src/fonts/Fira_Mono/FiraMono-Bold.ttf +0 -0
- package/src/fonts/Fira_Mono/FiraMono-Medium.ttf +0 -0
- package/src/fonts/Fira_Mono/FiraMono-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_AMS-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_AMS-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_AMS-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Bold.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Bold.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Bold.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Italic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Italic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Italic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Main-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-Italic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-Italic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Math-Italic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Script-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Script-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Script-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Size1-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Size1-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Size1-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Size2-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Size2-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Size2-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Size3-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Size3-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Size3-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Size4-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Size4-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Size4-Regular.woff2 +0 -0
- package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.ttf +0 -0
- package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.woff +0 -0
- package/src/fonts/KaTeX/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/src/fonts/Lora/Lora-Italic-VariableFont_wght.ttf +0 -0
- package/src/fonts/Lora/Lora-VariableFont_wght.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Bold.ttf +0 -0
- package/src/fonts/Lora/static/Lora-BoldItalic.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Italic.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Medium.ttf +0 -0
- package/src/fonts/Lora/static/Lora-MediumItalic.ttf +0 -0
- package/src/fonts/Lora/static/Lora-Regular.ttf +0 -0
- package/src/fonts/Lora/static/Lora-SemiBold.ttf +0 -0
- package/src/fonts/Lora/static/Lora-SemiBoldItalic.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-Bold.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-BoldItalic.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-Italic.ttf +0 -0
- package/src/fonts/PT_Sans/PTSans-Regular.ttf +0 -0
- package/src/hooks/__tests__/useBoolean.test.tsx +33 -0
- package/src/hooks/__tests__/useDebounce.test.tsx +182 -0
- package/src/hooks/__tests__/useEffectSkipFirstRender.test.tsx +42 -0
- package/src/hooks/__tests__/useEventListener.test.tsx +148 -0
- package/src/hooks/__tests__/useInternalStateWithSync.test.tsx +76 -0
- package/src/hooks/__tests__/useInterval.test.tsx +70 -0
- package/src/hooks/__tests__/usePackageMetadata.test.tsx +219 -0
- package/src/hooks/__tests__/useResizeHandle.test.tsx +240 -0
- package/src/hooks/__tests__/useResizeObserver.test.tsx +86 -0
- package/src/hooks/__tests__/useTimer.test.tsx +62 -0
- package/src/hooks/debug.ts +116 -0
- package/src/hooks/useAsyncData.ts +392 -0
- package/src/hooks/useAudioRecorder.ts +89 -0
- package/src/hooks/useAutoGrowInputProps.ts +56 -0
- package/src/hooks/useBoolean.ts +26 -0
- package/src/hooks/useCellRenderCount.ts +15 -0
- package/src/hooks/useDebounce.ts +95 -0
- package/src/hooks/useDeepCompareMemoize.ts +22 -0
- package/src/hooks/useEffectSkipFirstRender.ts +24 -0
- package/src/hooks/useElapsedTime.ts +25 -0
- package/src/hooks/useEvent.ts +2 -0
- package/src/hooks/useEventListener.ts +68 -0
- package/src/hooks/useHotkey.ts +77 -0
- package/src/hooks/useInternalStateWithSync.ts +26 -0
- package/src/hooks/useInterval.ts +49 -0
- package/src/hooks/useIsDragging.tsx +39 -0
- package/src/hooks/useLifecycle.ts +20 -0
- package/src/hooks/useLocalStorage.ts +22 -0
- package/src/hooks/useNonce.ts +9 -0
- package/src/hooks/usePackageMetadata.ts +52 -0
- package/src/hooks/useRecentCommands.ts +25 -0
- package/src/hooks/useResizeHandle.ts +110 -0
- package/src/hooks/useResizeObserver.ts +101 -0
- package/src/hooks/useScript.ts +90 -0
- package/src/hooks/useSelectAllContent.ts +42 -0
- package/src/hooks/useTimer.ts +48 -0
- package/src/main.tsx +20 -0
- package/src/mount.tsx +331 -0
- package/src/plugins/core/BadPlugin.tsx +72 -0
- package/src/plugins/core/RenderHTML.tsx +136 -0
- package/src/plugins/core/__test__/RenderHTML.test.ts +146 -0
- package/src/plugins/core/builder.ts +59 -0
- package/src/plugins/core/registerReactComponent.tsx +535 -0
- package/src/plugins/core/rpc.ts +55 -0
- package/src/plugins/core/sidebar-element.tsx +104 -0
- package/src/plugins/impl/ButtonPlugin.tsx +95 -0
- package/src/plugins/impl/CheckboxPlugin.tsx +56 -0
- package/src/plugins/impl/CodeEditorPlugin.tsx +119 -0
- package/src/plugins/impl/DataEditorPlugin.tsx +181 -0
- package/src/plugins/impl/DataTablePlugin.tsx +948 -0
- package/src/plugins/impl/DatePickerPlugin.tsx +74 -0
- package/src/plugins/impl/DateRangePlugin.tsx +82 -0
- package/src/plugins/impl/DateTimePickerPlugin.tsx +76 -0
- package/src/plugins/impl/DictPlugin.tsx +80 -0
- package/src/plugins/impl/DropdownPlugin.tsx +102 -0
- package/src/plugins/impl/FileBrowserPlugin.tsx +500 -0
- package/src/plugins/impl/FileUploadPlugin.tsx +302 -0
- package/src/plugins/impl/FormPlugin.tsx +294 -0
- package/src/plugins/impl/MicrophonePlugin.tsx +58 -0
- package/src/plugins/impl/MultiselectPlugin.tsx +207 -0
- package/src/plugins/impl/NumberPlugin.tsx +84 -0
- package/src/plugins/impl/RadioPlugin.tsx +77 -0
- package/src/plugins/impl/RangeSliderPlugin.tsx +163 -0
- package/src/plugins/impl/RefreshPlugin.tsx +158 -0
- package/src/plugins/impl/SearchableSelect.tsx +122 -0
- package/src/plugins/impl/SliderPlugin.tsx +166 -0
- package/src/plugins/impl/SwitchPlugin.tsx +48 -0
- package/src/plugins/impl/TabsPlugin.tsx +83 -0
- package/src/plugins/impl/TextAreaPlugin.tsx +131 -0
- package/src/plugins/impl/TextInputPlugin.tsx +169 -0
- package/src/plugins/impl/__tests__/DateTimePickerPlugin.test.tsx +45 -0
- package/src/plugins/impl/__tests__/DropdownPlugin.test.tsx +178 -0
- package/src/plugins/impl/__tests__/MultiSelectPlugin.test.ts +41 -0
- package/src/plugins/impl/__tests__/NumberPlugin.test.tsx +144 -0
- package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +269 -0
- package/src/plugins/impl/anywidget/__tests__/AnyWidgetPlugin.test.tsx +181 -0
- package/src/plugins/impl/anywidget/__tests__/model.test.ts +370 -0
- package/src/plugins/impl/anywidget/model.ts +314 -0
- package/src/plugins/impl/chat/ChatPlugin.tsx +98 -0
- package/src/plugins/impl/chat/chat-ui.tsx +713 -0
- package/src/plugins/impl/chat/types.ts +39 -0
- package/src/plugins/impl/code/LazyAnyLanguageCodeMirror.tsx +6 -0
- package/src/plugins/impl/code/any-language-editor.tsx +68 -0
- package/src/plugins/impl/common/error-banner.tsx +111 -0
- package/src/plugins/impl/common/intent.ts +18 -0
- package/src/plugins/impl/common/labeled.tsx +69 -0
- package/src/plugins/impl/data-editor/__tests__/data-utils.test.ts +876 -0
- package/src/plugins/impl/data-editor/__tests__/glide-utils.test.ts +452 -0
- package/src/plugins/impl/data-editor/components.tsx +179 -0
- package/src/plugins/impl/data-editor/data-utils.ts +123 -0
- package/src/plugins/impl/data-editor/glide-data-editor.tsx +651 -0
- package/src/plugins/impl/data-editor/glide-utils.ts +200 -0
- package/src/plugins/impl/data-editor/themes.ts +49 -0
- package/src/plugins/impl/data-editor/types.ts +44 -0
- package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +268 -0
- package/src/plugins/impl/data-explorer/DataExplorerPlugin.tsx +31 -0
- package/src/plugins/impl/data-explorer/components/column-summary.tsx +174 -0
- package/src/plugins/impl/data-explorer/components/icons.tsx +30 -0
- package/src/plugins/impl/data-explorer/components/query-form.tsx +296 -0
- package/src/plugins/impl/data-explorer/encoding.ts +107 -0
- package/src/plugins/impl/data-explorer/functions/function.ts +83 -0
- package/src/plugins/impl/data-explorer/functions/types.ts +32 -0
- package/src/plugins/impl/data-explorer/marks.ts +21 -0
- package/src/plugins/impl/data-explorer/queries/field-suggestion.ts +65 -0
- package/src/plugins/impl/data-explorer/queries/histograms.ts +41 -0
- package/src/plugins/impl/data-explorer/queries/queries.ts +204 -0
- package/src/plugins/impl/data-explorer/queries/removeUndefined.ts +11 -0
- package/src/plugins/impl/data-explorer/queries/types.ts +54 -0
- package/src/plugins/impl/data-explorer/queries/utils.ts +85 -0
- package/src/plugins/impl/data-explorer/spec.ts +28 -0
- package/src/plugins/impl/data-explorer/state/reducer.ts +92 -0
- package/src/plugins/impl/data-explorer/state/types.ts +28 -0
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +303 -0
- package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +1600 -0
- package/src/plugins/impl/data-frames/forms/__tests__/form.test.tsx +67 -0
- package/src/plugins/impl/data-frames/forms/context.ts +13 -0
- package/src/plugins/impl/data-frames/forms/datatype-icon.tsx +43 -0
- package/src/plugins/impl/data-frames/forms/renderers.tsx +518 -0
- package/src/plugins/impl/data-frames/panel.tsx +308 -0
- package/src/plugins/impl/data-frames/schema.ts +211 -0
- package/src/plugins/impl/data-frames/types.ts +91 -0
- package/src/plugins/impl/data-frames/utils/__tests__/getUpdatedColumnTypes.test.ts +191 -0
- package/src/plugins/impl/data-frames/utils/__tests__/operators.test.ts +116 -0
- package/src/plugins/impl/data-frames/utils/getUpdatedColumnTypes.ts +67 -0
- package/src/plugins/impl/data-frames/utils/operators.ts +202 -0
- package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +39 -0
- package/src/plugins/impl/multiselectFilterFn.tsx +22 -0
- package/src/plugins/impl/panel/PanelPlugin.tsx +266 -0
- package/src/plugins/impl/panel/__tests__/utils.test.ts +119 -0
- package/src/plugins/impl/panel/utils.ts +104 -0
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +300 -0
- package/src/plugins/impl/plotly/__tests__/parse-from-template.test.ts +73 -0
- package/src/plugins/impl/plotly/mapbox.css +359 -0
- package/src/plugins/impl/plotly/parse-from-template.ts +58 -0
- package/src/plugins/impl/plotly/plotly.css +280 -0
- package/src/plugins/impl/vega/VegaPlugin.tsx +40 -0
- package/src/plugins/impl/vega/__tests__/__snapshots__/make-selectable.test.ts.snap +1210 -0
- package/src/plugins/impl/vega/__tests__/encodings.test.ts +172 -0
- package/src/plugins/impl/vega/__tests__/loader.test.ts +73 -0
- package/src/plugins/impl/vega/__tests__/make-selectable.test.ts +575 -0
- package/src/plugins/impl/vega/__tests__/params.test.ts +52 -0
- package/src/plugins/impl/vega/__tests__/resolve-data.test.ts +236 -0
- package/src/plugins/impl/vega/__tests__/vega.test.ts +603 -0
- package/src/plugins/impl/vega/batched.ts +41 -0
- package/src/plugins/impl/vega/encodings.ts +111 -0
- package/src/plugins/impl/vega/fix-relative-url.ts +15 -0
- package/src/plugins/impl/vega/formats.ts +25 -0
- package/src/plugins/impl/vega/loader.ts +320 -0
- package/src/plugins/impl/vega/make-selectable.ts +248 -0
- package/src/plugins/impl/vega/marks.ts +36 -0
- package/src/plugins/impl/vega/params.ts +192 -0
- package/src/plugins/impl/vega/resolve-data.ts +101 -0
- package/src/plugins/impl/vega/types.ts +32 -0
- package/src/plugins/impl/vega/utils.ts +46 -0
- package/src/plugins/impl/vega/vega-component.tsx +271 -0
- package/src/plugins/impl/vega/vega-loader.ts +53 -0
- package/src/plugins/impl/vega/vega.css +31 -0
- package/src/plugins/layout/AccordionPlugin.tsx +63 -0
- package/src/plugins/layout/CalloutPlugin.tsx +34 -0
- package/src/plugins/layout/DownloadPlugin.tsx +136 -0
- package/src/plugins/layout/ImageComparisonPlugin.tsx +35 -0
- package/src/plugins/layout/JsonOutputPlugin.tsx +47 -0
- package/src/plugins/layout/LazyPlugin.tsx +98 -0
- package/src/plugins/layout/MimeRenderPlugin.tsx +45 -0
- package/src/plugins/layout/NavigationMenuPlugin.tsx +219 -0
- package/src/plugins/layout/ProgressPlugin.tsx +175 -0
- package/src/plugins/layout/RoutesPlugin.tsx +81 -0
- package/src/plugins/layout/StatPlugin.tsx +100 -0
- package/src/plugins/layout/TexPlugin.tsx +102 -0
- package/src/plugins/layout/__test__/ProgressPlugin.test.ts +26 -0
- package/src/plugins/layout/carousel/CarouselPlugin.tsx +48 -0
- package/src/plugins/layout/mermaid/MermaidPlugin.tsx +26 -0
- package/src/plugins/layout/mermaid/mermaid.tsx +94 -0
- package/src/plugins/layout/navigation-menu.css +37 -0
- package/src/plugins/plugins.ts +116 -0
- package/src/plugins/stateless-plugin.ts +29 -0
- package/src/plugins/types.ts +82 -0
- package/src/stories/__fixtures__/vega.ts +225 -0
- package/src/stories/accordion.stories.tsx +100 -0
- package/src/stories/alert-dialog.mdx +42 -0
- package/src/stories/app-chrome.stories.tsx +26 -0
- package/src/stories/button.stories.tsx +90 -0
- package/src/stories/callout.stories.tsx +73 -0
- package/src/stories/cell-status.stories.tsx +145 -0
- package/src/stories/cell.stories.tsx +336 -0
- package/src/stories/checkbox.stories.tsx +44 -0
- package/src/stories/colors.stories.tsx +156 -0
- package/src/stories/combobox.stories.tsx +133 -0
- package/src/stories/context-menu.mdx +23 -0
- package/src/stories/data-explorer.stories.tsx +30 -0
- package/src/stories/data-table.stories.tsx +130 -0
- package/src/stories/dataframe.stories.tsx +46 -0
- package/src/stories/debugger.stories.tsx +34 -0
- package/src/stories/dialog.stories.tsx +80 -0
- package/src/stories/dropdown-menu.mdx +159 -0
- package/src/stories/editor-inputs.stories.tsx +47 -0
- package/src/stories/editor.stories.tsx +91 -0
- package/src/stories/file-upload.stories.tsx +103 -0
- package/src/stories/form-wrapper.stories.tsx +147 -0
- package/src/stories/input.stories.tsx +56 -0
- package/src/stories/label.mdx +9 -0
- package/src/stories/log-viewer.stories.tsx +74 -0
- package/src/stories/number-field.mdx +17 -0
- package/src/stories/number-field.stories.tsx +41 -0
- package/src/stories/progress-component.stories.tsx +74 -0
- package/src/stories/progress.stories.tsx +33 -0
- package/src/stories/radio-group.mdx +54 -0
- package/src/stories/select-native.stories.tsx +49 -0
- package/src/stories/select.stories.tsx +92 -0
- package/src/stories/slider.stories.tsx +27 -0
- package/src/stories/stat.stories.tsx +123 -0
- package/src/stories/switch.mdx +20 -0
- package/src/stories/switchable-multi-select.stories.tsx +31 -0
- package/src/stories/tabs.mdx +59 -0
- package/src/stories/textarea.stories.tsx +58 -0
- package/src/stories/theme.stories.tsx +111 -0
- package/src/stories/tooltip.mdx +32 -0
- package/src/stories/typography.stories.tsx +80 -0
- package/src/stories/variables.stories.tsx +58 -0
- package/src/stories/vega.stories.tsx +57 -0
- package/src/theme/ThemeProvider.tsx +32 -0
- package/src/theme/namespace.tsx +23 -0
- package/src/theme/useTheme.ts +89 -0
- package/src/utils/Deferred.ts +20 -0
- package/src/utils/Logger.ts +91 -0
- package/src/utils/__tests__/Deferred.test.ts +38 -0
- package/src/utils/__tests__/arrays.test.ts +130 -0
- package/src/utils/__tests__/batch-requests.test.ts +60 -0
- package/src/utils/__tests__/blob.test.ts +52 -0
- package/src/utils/__tests__/cell-urls.test.ts +92 -0
- package/src/utils/__tests__/createReducer.test.ts +184 -0
- package/src/utils/__tests__/data-views.test.ts +112 -0
- package/src/utils/__tests__/dates.test.ts +188 -0
- package/src/utils/__tests__/edit-distance.test.ts +302 -0
- package/src/utils/__tests__/errors.test.ts +54 -0
- package/src/utils/__tests__/filenames.test.ts +30 -0
- package/src/utils/__tests__/id-tree.test.ts +1994 -0
- package/src/utils/__tests__/json-parser.test.ts +79 -0
- package/src/utils/__tests__/local-storage.test.ts +77 -0
- package/src/utils/__tests__/lru.test.ts +74 -0
- package/src/utils/__tests__/maps.test.ts +91 -0
- package/src/utils/__tests__/math.test.ts +29 -0
- package/src/utils/__tests__/multi-map.test.ts +295 -0
- package/src/utils/__tests__/numbers.test.ts +76 -0
- package/src/utils/__tests__/path.test.ts +170 -0
- package/src/utils/__tests__/pluralize.test.ts +47 -0
- package/src/utils/__tests__/routes.test.ts +134 -0
- package/src/utils/__tests__/sets.test.ts +41 -0
- package/src/utils/__tests__/shallow-compare.test.ts +55 -0
- package/src/utils/__tests__/strings.test.ts +68 -0
- package/src/utils/__tests__/time.test.ts +61 -0
- package/src/utils/__tests__/timed-cache.test.ts +142 -0
- package/src/utils/__tests__/timeout.test.ts +153 -0
- package/src/utils/__tests__/traceback.test.ts +34 -0
- package/src/utils/__tests__/url.test.ts +100 -0
- package/src/utils/__tests__/urls.test.ts +10 -0
- package/src/utils/__tests__/versions.test.ts +63 -0
- package/src/utils/__tests__/waitForWs.test.ts +76 -0
- package/src/utils/arrays.ts +75 -0
- package/src/utils/assertExists.ts +12 -0
- package/src/utils/assertNever.ts +20 -0
- package/src/utils/batch-requests.ts +28 -0
- package/src/utils/blob.ts +45 -0
- package/src/utils/cell-urls.ts +31 -0
- package/src/utils/cn.ts +8 -0
- package/src/utils/copy.ts +17 -0
- package/src/utils/createReducer.ts +137 -0
- package/src/utils/data-views.ts +54 -0
- package/src/utils/dates.ts +145 -0
- package/src/utils/dereference.ts +10 -0
- package/src/utils/download.ts +47 -0
- package/src/utils/edit-distance.ts +141 -0
- package/src/utils/errors.ts +63 -0
- package/src/utils/events.ts +85 -0
- package/src/utils/fileToBase64.ts +30 -0
- package/src/utils/filenames.ts +29 -0
- package/src/utils/functions.ts +24 -0
- package/src/utils/id-tree.tsx +1032 -0
- package/src/utils/idle.ts +19 -0
- package/src/utils/invariant.ts +37 -0
- package/src/utils/json/__tests__/base64.test.ts +100 -0
- package/src/utils/json/base64.ts +51 -0
- package/src/utils/json/json-parser.ts +65 -0
- package/src/utils/lazy.ts +30 -0
- package/src/utils/links.ts +11 -0
- package/src/utils/localStorage.ts +132 -0
- package/src/utils/lru.ts +68 -0
- package/src/utils/maps.ts +65 -0
- package/src/utils/math.ts +6 -0
- package/src/utils/mergeRefs.ts +14 -0
- package/src/utils/multi-map.ts +71 -0
- package/src/utils/numbers.ts +124 -0
- package/src/utils/objects.ts +105 -0
- package/src/utils/once.ts +17 -0
- package/src/utils/pathUtils.test.ts +113 -0
- package/src/utils/pathUtils.ts +76 -0
- package/src/utils/paths.ts +67 -0
- package/src/utils/pluralize.ts +35 -0
- package/src/utils/python-poet/__tests__/poet.test.ts +286 -0
- package/src/utils/python-poet/poet.ts +196 -0
- package/src/utils/reload-safe.ts +15 -0
- package/src/utils/repl.ts +23 -0
- package/src/utils/routes.ts +36 -0
- package/src/utils/scroll.ts +38 -0
- package/src/utils/sets.ts +30 -0
- package/src/utils/shallow-compare.ts +30 -0
- package/src/utils/staticImplements.ts +7 -0
- package/src/utils/strings.ts +64 -0
- package/src/utils/time.ts +39 -0
- package/src/utils/timed-cache.ts +52 -0
- package/src/utils/timeout.ts +42 -0
- package/src/utils/traceback.ts +104 -0
- package/src/utils/tracer.ts +106 -0
- package/src/utils/typed.ts +17 -0
- package/src/utils/url.ts +12 -0
- package/src/utils/urls.ts +33 -0
- package/src/utils/uuid.ts +8 -0
- package/src/utils/versions.ts +66 -0
- package/src/utils/vitals.ts +30 -0
- package/src/utils/waitForWs.ts +31 -0
- package/dist/assets/_baseMap-DI8H5mdU.js +0 -1
- package/dist/assets/architectureDiagram-SUXI7LT5-BEcV3kj8.js +0 -36
- package/dist/assets/blockDiagram-6J76NXCF-BUxeo5Pp.js +0 -122
- package/dist/assets/channel-BgIIdDsO.js +0 -1
- package/dist/assets/classDiagram-M3E45YP4-CocoijMx.js +0 -1
- package/dist/assets/classDiagram-v2-YAWTLIQI-CocoijMx.js +0 -1
- package/dist/assets/clone-CkywUQE5.js +0 -1
- package/dist/assets/cytoscape.esm-CzSnbbKZ.js +0 -325
- package/dist/assets/diagram-5UYTHUR4-CaEJdB-c.js +0 -24
- package/dist/assets/edit-page-0aVIqkPG.js +0 -163
- package/dist/assets/flowDiagram-KYDEHFYC-COI3Wlzg.js +0 -162
- package/dist/assets/ganttDiagram-EK5VF46D-T8K8LZXH.js +0 -267
- package/dist/assets/index-BlxPam9h.css +0 -1
- package/dist/assets/index-DPzEQsyf.js +0 -518
- package/dist/assets/infoDiagram-LHK5PUON-DIh9EeeW.js +0 -2
- package/dist/assets/links-Co7kZnDQ.js +0 -17
- package/dist/assets/mermaid-sbM5kvPX.js +0 -207
- package/dist/assets/min-ClcSmngt.js +0 -1
- package/dist/assets/pieDiagram-NIOCPIFQ-ClBSTDHM.js +0 -30
- package/dist/assets/sortBy-BPqL9Az6.js +0 -1
- package/dist/assets/stateDiagram-v2-5AN5P6BG-Ch96oS1p.js +0 -1
- package/dist/assets/storage-6bL26f8J.js +0 -26
- package/dist/assets/time--ds3HCGk.js +0 -1
- package/dist/assets/xychartDiagram-H2YORKM3-tbgrOMTu.js +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var J;import{g as He}from"./chunk-BFAMUDN2-CY30V5X_.js";import{s as Ke}from"./chunk-SKB7J2MH-DPsXY34k.js";import{_ as u,b as We,a as je,s as Ge,g as ze,p as Xe,q as Je,c as Te,l as be,y as Ze,B as et,o as tt,r as st,u as it}from"./mermaid-sbM5kvPX.js";import"./transform-B8bpuzxV.js";import"./timer-BwIYMJWC.js";import"./index-DPzEQsyf.js";import"./step-BwsUM5iJ.js";var ke=function(){var e=u(function(i,m,a,s){for(a=a||{},s=i.length;s--;a[i[s]]=m);return a},"o"),n=[1,3],h=[1,4],c=[1,5],y=[1,6],l=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,22],R=[2,7],o=[1,26],p=[1,27],I=[1,28],b=[1,29],C=[1,33],A=[1,34],v=[1,35],L=[1,36],O=[1,37],x=[1,38],w=[1,24],D=[1,31],M=[1,32],$=[1,30],f=[1,39],S=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],z=[89,90],Ne=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],pe=[27,29],qe=[1,70],Ce=[1,71],Ae=[1,72],ve=[1,73],Le=[1,74],Oe=[1,75],xe=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],ne=[1,88],re=[1,89],ae=[1,90],le=[1,91],ce=[1,92],Ee=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],V=[63,64],we=[1,101],De=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[1,110],B=[1,106],Q=[1,107],H=[1,108],K=[1,109],W=[1,111],oe=[1,116],he=[1,117],ue=[1,114],ye=[1,115],Se={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:u(function(i,m,a,s,_,t,me){var r=t.length-1;switch(_){case 4:this.$=t[r].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[r].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[r-3],t[r-4]);break;case 22:s.addRequirement(t[r-5],t[r-6]),s.setClass([t[r-5]],t[r-3]);break;case 23:s.setNewReqId(t[r-2]);break;case 24:s.setNewReqText(t[r-2]);break;case 25:s.setNewReqRisk(t[r-2]);break;case 26:s.setNewReqVerifyMethod(t[r-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[r-3]);break;case 43:s.addElement(t[r-5]),s.setClass([t[r-5]],t[r-3]);break;case 44:s.setNewElementType(t[r-2]);break;case 45:s.setNewElementDocRef(t[r-2]);break;case 48:s.addRelationship(t[r-2],t[r],t[r-4]);break;case 49:s.addRelationship(t[r-2],t[r-4],t[r]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[r-2],s.defineClass(t[r-1],t[r]);break;case 58:s.setClass(t[r-1],t[r]);break;case 59:s.setClass([t[r-2]],t[r]);break;case 60:case 62:case 65:this.$=[t[r]];break;case 61:case 63:this.$=t[r-2].concat([t[r]]);break;case 64:this.$=t[r-2],s.setCssStyle(t[r-1],t[r]);break;case 66:t[r-2].push(t[r]),this.$=t[r-2];break;case 68:this.$=t[r-1]+t[r]}},"anonymous"),table:[{3:1,4:2,6:n,9:h,11:c,13:y},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:h,11:c,13:y},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(l,[2,6]),{3:12,4:2,6:n,9:h,11:c,13:y},{1:[2,2]},{4:17,5:E,7:13,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},e(l,[2,4]),e(l,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:E,7:42,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:E,7:43,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:E,7:44,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:E,7:45,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:E,7:46,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:E,7:47,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:E,7:48,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:E,7:49,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:E,7:50,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:P,89:f,90:S},{30:63,33:62,75:P,89:f,90:S},{30:64,33:62,75:P,89:f,90:S},e(z,[2,29]),e(z,[2,30]),e(z,[2,31]),e(z,[2,32]),e(z,[2,33]),e(z,[2,34]),e(Ne,[2,81]),e(Ne,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(pe,[2,79]),e(pe,[2,80]),{27:[1,67],29:[1,68]},e(pe,[2,85]),e(pe,[2,86]),{62:69,65:qe,66:Ce,67:Ae,68:ve,69:Le,70:Oe,71:xe},{62:77,65:qe,66:Ce,67:Ae,68:ve,69:Le,70:Oe,71:xe},{30:78,33:62,75:P,89:f,90:S},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:f,90:S},{5:[1,95]},{30:96,33:62,75:P,89:f,90:S},{5:[1,97]},{30:98,33:62,75:P,89:f,90:S},{63:[1,99]},e(V,[2,50]),e(V,[2,51]),e(V,[2,52]),e(V,[2,53]),e(V,[2,54]),e(V,[2,55]),e(V,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:we}),{33:103,75:[1,102],89:f,90:S},e(De,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce}),e(k,[2,67]),e(k,[2,69]),e(k,[2,70]),e(k,[2,71]),e(k,[2,72]),e(k,[2,73]),e(k,[2,74]),e(k,[2,75]),e(k,[2,76]),e(k,[2,77]),e(k,[2,78]),e(d,[2,57],{76:we}),e(d,[2,58],{76:U}),{5:Y,28:105,31:B,34:Q,36:H,38:K,40:W},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:ye},{27:[1,118],76:U},{33:119,89:f,90:S},{33:120,89:f,90:S},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},e(Ee,[2,61]),e(Ee,[2,63]),e(k,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Y,28:126,31:B,34:Q,36:H,38:K,40:W},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:ye},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e(De,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce}),{33:132,89:f,90:S},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(d,[2,27]),{5:Y,28:145,31:B,34:Q,36:H,38:K,40:W},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:oe,40:he,56:152,57:ue,59:ye},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:Y,28:159,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:160,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:161,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:162,31:B,34:Q,36:H,38:K,40:W},{5:oe,40:he,56:163,57:ue,59:ye},{5:oe,40:he,56:164,57:ue,59:ye},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:u(function(i,m){if(!m.recoverable){var a=new Error(i);throw a.hash=m,a}this.trace(i)},"parseError"),parse:u(function(i){var m=this,a=[0],s=[],_=[null],t=[],me=this.table,r="",de=0,Me=0,Be=t.slice.call(arguments,1),g=Object.create(this.lexer),j={yy:{}};for(var ge in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ge)&&(j.yy[ge]=this.yy[ge]);g.setInput(i,j.yy),j.yy.lexer=g,j.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var Ie=g.yylloc;t.push(Ie);var Qe=g.options&&g.options.ranges;function $e(){var q;return typeof(q=s.pop()||g.lex()||1)!="number"&&(q instanceof Array&&(q=(s=q).pop()),q=m.symbols_[q]||q),q}typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,u(function(q){a.length=a.length-2*q,_.length=_.length-q,t.length=t.length-q},"popStack"),u($e,"lex");for(var T,G,N,Fe,_e,F,Pe,fe,X={};;){if(G=a[a.length-1],this.defaultActions[G]?N=this.defaultActions[G]:(T==null&&(T=$e()),N=me[G]&&me[G][T]),N===void 0||!N.length||!N[0]){var Ue="";for(_e in fe=[],me[G])this.terminals_[_e]&&_e>2&&fe.push("'"+this.terminals_[_e]+"'");Ue=g.showPosition?"Parse error on line "+(de+1)+`:
|
|
1
|
+
var J;import{g as He}from"./chunk-WVR4S24B-D9vksrD4.js";import{s as Ke}from"./chunk-NRVI72HA-I0EqNhLo.js";import{_ as u,b as We,a as je,s as Ge,g as ze,p as Xe,q as Je,c as Te,l as be,y as Ze,B as et,o as tt,r as st,u as it}from"./mermaid-CxGPSzDz.js";import"./transform-B8bpuzxV.js";import"./timer-BwIYMJWC.js";import"./index-WZpn7zIz.js";import"./step-BwsUM5iJ.js";var ke=function(){var e=u(function(i,m,a,s){for(a=a||{},s=i.length;s--;a[i[s]]=m);return a},"o"),n=[1,3],h=[1,4],c=[1,5],y=[1,6],l=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,22],R=[2,7],o=[1,26],p=[1,27],I=[1,28],b=[1,29],C=[1,33],A=[1,34],v=[1,35],L=[1,36],O=[1,37],x=[1,38],w=[1,24],D=[1,31],M=[1,32],$=[1,30],f=[1,39],S=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],z=[89,90],Ne=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],pe=[27,29],qe=[1,70],Ce=[1,71],Ae=[1,72],ve=[1,73],Le=[1,74],Oe=[1,75],xe=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],ne=[1,88],re=[1,89],ae=[1,90],le=[1,91],ce=[1,92],Ee=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],V=[63,64],we=[1,101],De=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[1,110],B=[1,106],Q=[1,107],H=[1,108],K=[1,109],W=[1,111],oe=[1,116],he=[1,117],ue=[1,114],ye=[1,115],Se={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:u(function(i,m,a,s,_,t,me){var r=t.length-1;switch(_){case 4:this.$=t[r].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[r].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[r-3],t[r-4]);break;case 22:s.addRequirement(t[r-5],t[r-6]),s.setClass([t[r-5]],t[r-3]);break;case 23:s.setNewReqId(t[r-2]);break;case 24:s.setNewReqText(t[r-2]);break;case 25:s.setNewReqRisk(t[r-2]);break;case 26:s.setNewReqVerifyMethod(t[r-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[r-3]);break;case 43:s.addElement(t[r-5]),s.setClass([t[r-5]],t[r-3]);break;case 44:s.setNewElementType(t[r-2]);break;case 45:s.setNewElementDocRef(t[r-2]);break;case 48:s.addRelationship(t[r-2],t[r],t[r-4]);break;case 49:s.addRelationship(t[r-2],t[r-4],t[r]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[r-2],s.defineClass(t[r-1],t[r]);break;case 58:s.setClass(t[r-1],t[r]);break;case 59:s.setClass([t[r-2]],t[r]);break;case 60:case 62:case 65:this.$=[t[r]];break;case 61:case 63:this.$=t[r-2].concat([t[r]]);break;case 64:this.$=t[r-2],s.setCssStyle(t[r-1],t[r]);break;case 66:t[r-2].push(t[r]),this.$=t[r-2];break;case 68:this.$=t[r-1]+t[r]}},"anonymous"),table:[{3:1,4:2,6:n,9:h,11:c,13:y},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:h,11:c,13:y},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(l,[2,6]),{3:12,4:2,6:n,9:h,11:c,13:y},{1:[2,2]},{4:17,5:E,7:13,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},e(l,[2,4]),e(l,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:E,7:42,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:E,7:43,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:E,7:44,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:E,7:45,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:E,7:46,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:E,7:47,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:E,7:48,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:E,7:49,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{4:17,5:E,7:50,8:R,9:h,11:c,13:y,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:p,23:I,24:b,25:23,33:25,41:C,42:A,43:v,44:L,45:O,46:x,54:w,72:D,74:M,77:$,89:f,90:S},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:P,89:f,90:S},{30:63,33:62,75:P,89:f,90:S},{30:64,33:62,75:P,89:f,90:S},e(z,[2,29]),e(z,[2,30]),e(z,[2,31]),e(z,[2,32]),e(z,[2,33]),e(z,[2,34]),e(Ne,[2,81]),e(Ne,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(pe,[2,79]),e(pe,[2,80]),{27:[1,67],29:[1,68]},e(pe,[2,85]),e(pe,[2,86]),{62:69,65:qe,66:Ce,67:Ae,68:ve,69:Le,70:Oe,71:xe},{62:77,65:qe,66:Ce,67:Ae,68:ve,69:Le,70:Oe,71:xe},{30:78,33:62,75:P,89:f,90:S},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:f,90:S},{5:[1,95]},{30:96,33:62,75:P,89:f,90:S},{5:[1,97]},{30:98,33:62,75:P,89:f,90:S},{63:[1,99]},e(V,[2,50]),e(V,[2,51]),e(V,[2,52]),e(V,[2,53]),e(V,[2,54]),e(V,[2,55]),e(V,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:we}),{33:103,75:[1,102],89:f,90:S},e(De,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce}),e(k,[2,67]),e(k,[2,69]),e(k,[2,70]),e(k,[2,71]),e(k,[2,72]),e(k,[2,73]),e(k,[2,74]),e(k,[2,75]),e(k,[2,76]),e(k,[2,77]),e(k,[2,78]),e(d,[2,57],{76:we}),e(d,[2,58],{76:U}),{5:Y,28:105,31:B,34:Q,36:H,38:K,40:W},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:ye},{27:[1,118],76:U},{33:119,89:f,90:S},{33:120,89:f,90:S},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce},e(Ee,[2,61]),e(Ee,[2,63]),e(k,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Y,28:126,31:B,34:Q,36:H,38:K,40:W},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:ye},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e(De,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:ne,85:re,86:ae,87:le,88:ce}),{33:132,89:f,90:S},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(d,[2,27]),{5:Y,28:145,31:B,34:Q,36:H,38:K,40:W},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:oe,40:he,56:152,57:ue,59:ye},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:Y,28:159,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:160,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:161,31:B,34:Q,36:H,38:K,40:W},{5:Y,28:162,31:B,34:Q,36:H,38:K,40:W},{5:oe,40:he,56:163,57:ue,59:ye},{5:oe,40:he,56:164,57:ue,59:ye},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:u(function(i,m){if(!m.recoverable){var a=new Error(i);throw a.hash=m,a}this.trace(i)},"parseError"),parse:u(function(i){var m=this,a=[0],s=[],_=[null],t=[],me=this.table,r="",de=0,Me=0,Be=t.slice.call(arguments,1),g=Object.create(this.lexer),j={yy:{}};for(var ge in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ge)&&(j.yy[ge]=this.yy[ge]);g.setInput(i,j.yy),j.yy.lexer=g,j.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var Ie=g.yylloc;t.push(Ie);var Qe=g.options&&g.options.ranges;function $e(){var q;return typeof(q=s.pop()||g.lex()||1)!="number"&&(q instanceof Array&&(q=(s=q).pop()),q=m.symbols_[q]||q),q}typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,u(function(q){a.length=a.length-2*q,_.length=_.length-q,t.length=t.length-q},"popStack"),u($e,"lex");for(var T,G,N,Fe,_e,F,Pe,fe,X={};;){if(G=a[a.length-1],this.defaultActions[G]?N=this.defaultActions[G]:(T==null&&(T=$e()),N=me[G]&&me[G][T]),N===void 0||!N.length||!N[0]){var Ue="";for(_e in fe=[],me[G])this.terminals_[_e]&&_e>2&&fe.push("'"+this.terminals_[_e]+"'");Ue=g.showPosition?"Parse error on line "+(de+1)+`:
|
|
2
2
|
`+g.showPosition()+`
|
|
3
3
|
Expecting `+fe.join(", ")+", got '"+(this.terminals_[T]||T)+"'":"Parse error on line "+(de+1)+": Unexpected "+(T==1?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(Ue,{text:g.match,token:this.terminals_[T]||T,line:g.yylineno,loc:Ie,expected:fe})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+T);switch(N[0]){case 1:a.push(T),_.push(g.yytext),t.push(g.yylloc),a.push(N[1]),T=null,Me=g.yyleng,r=g.yytext,de=g.yylineno,Ie=g.yylloc;break;case 2:if(F=this.productions_[N[1]][1],X.$=_[_.length-F],X._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},Qe&&(X._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),(Fe=this.performAction.apply(X,[r,Me,de,j.yy,N[1],_,t].concat(Be)))!==void 0)return Fe;F&&(a=a.slice(0,-1*F*2),_=_.slice(0,-1*F),t=t.slice(0,-1*F)),a.push(this.productions_[N[1]][0]),_.push(X.$),t.push(X._$),Pe=me[a[a.length-2]][a[a.length-1]],a.push(Pe);break;case 3:return!0}}return!0},"parse")},Ye=function(){return{EOF:1,parseError:u(function(i,m){if(!this.yy.parser)throw new Error(i);this.yy.parser.parseError(i,m)},"parseError"),setInput:u(function(i,m){return this.yy=m||this.yy||{},this._input=i,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},"setInput"),input:u(function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:u(function(i){var m=i.length,a=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var s=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 _=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===s.length?this.yylloc.first_column:0)+s[s.length-a.length].length-a[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:u(function(i){this.unput(this.match.slice(i))},"less"),pastInput:u(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var i=this.pastInput(),m=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as U,S as H,T as J,U as K,V as q,W as M,X as Q,Y as tt,j as e,Z as et,_ as ot,$ as rt,a0 as F,a1 as Y,a2 as st,a3 as it,a4 as at,a5 as mt,a6 as Z,a7 as nt,a8 as lt,a9 as ct,aa as pt,ab as dt,ac as ht,ad as xt,ae as bt,af as ft,ag as jt,ah as yt,ai as gt,aj as ut}from"./index-DPzEQsyf.js";import{u as kt,R as G,C as _t,A as Nt,a as wt,c as St,P as vt,m as Ct}from"./storage-6bL26f8J.js";import"./index-Bl0C1eEM.js";import"./index-DZeLh41D.js";import"./index-CoLaKlH0.js";import"./index-DdiulcY3.js";import"./index-6r7UeFlf.js";import"./index-DF_6z97_.js";import"./index-Bbz-vY_t.js";import"./index-CbFuBnKK.js";import"./index-CKe-VV4U.js";import"./index-Cs6LYSt0.js";import"./index-ynTLoSgO.js";import"./index-D1qx1y0C.js";import"./index-BS0ZXaCb.js";import"./apl-CXdQSnD-.js";import"./asciiarmor-D5V0T9Cu.js";import"./asterisk-B46aRdXb.js";import"./brainfuck-CtZaYBKt.js";import"./clike-BgBwzOhw.js";import"./cmake-DXn5xaP-.js";import"./cobol-stawOqaz.js";import"./coffeescript-BTDxI-eT.js";import"./commonlisp-vq6DHwts.js";import"./crystal-CRzZ78HM.js";import"./cypher-gJDei3ni.js";import"./d-BShv7fp-.js";import"./diff-UJJ5BM9S.js";import"./dockerfile-knGOOxt4.js";import"./simple-mode-C3vEBAcb.js";import"./dtd-DI9Herc-.js";import"./dylan-DkEP81N9.js";import"./ebnf-B-Df8AvO.js";import"./ecl-DPFc0Uaf.js";import"./eiffel-DR5c0IrL.js";import"./elm-DompmV0j.js";import"./erlang-BuqgqA5h.js";import"./factor-CFXhaUWb.js";import"./fcl-CVaBTCzQ.js";import"./forth-POgR1ypr.js";import"./fortran-DL7KluxX.js";import"./gas-bV0CklSb.js";import"./gherkin-B6X1vGSW.js";import"./groovy-DnIzCrpZ.js";import"./haskell-CLQs6EAM.js";import"./haxe-D25e-2l-.js";import"./http-BKJkqRj4.js";import"./idl-pcmmZuaN.js";import"./jinja2-DhgKlfW7.js";import"./julia-DjdwvFuI.js";import"./livescript-HO6ttBFx.js";import"./lua-8DXOpKDz.js";import"./mathematica-IIbmv7SK.js";import"./mbox-z_N2Mo3d.js";import"./mirc-DkvFAiy5.js";import"./modelica-DSrSSXCg.js";import"./mscgen-B2igx18G.js";import"./mumps-zvxmGV4l.js";import"./nginx-B4hAVlXN.js";import"./nsis-BvKfQ9lQ.js";import"./ntriples-BSwWqoLa.js";import"./octave-C4hdQ5Hf.js";import"./oz-qQq7irPq.js";import"./pascal-CafrKXZF.js";import"./perl-tdMlh9QA.js";import"./pig-CwGJVRC4.js";import"./powershell-D1ly3AHC.js";import"./properties-_nPj978X.js";import"./protobuf-B4y9do6W.js";import"./puppet-Bc-yJKzi.js";import"./q-B0kTJ4cI.js";import"./r-BA4EbLKE.js";import"./ruby-CR-u2WLS.js";import"./sas-Bqaci40L.js";import"./scheme-qjP0V5Ag.js";import"./shell-BLav31RL.js";import"./sieve-r025o_jW.js";import"./smalltalk-C7J3IyEP.js";import"./solr-78MBEUkU.js";import"./sparql-BRLJFz69.js";import"./spreadsheet-CGlWr0eM.js";import"./stylus-Bdo_Aemu.js";import"./swift-B_XXVlXX.js";import"./tcl-B2fODqDH.js";import"./textile-BuVhTOzU.js";import"./tiddlywiki-BgR6AEZu.js";import"./tiki-CI-ztowC.js";import"./toml-wcPdHu67.js";import"./troff-Ce85hlLp.js";import"./ttcn-BxnYHtq8.js";import"./turtle-BkSuIpt-.js";import"./vb-BHgjm0DN.js";import"./vbscript-Dawdd5GZ.js";import"./velocity-BdD_26Jv.js";import"./verilog-B4LBqg_1.js";import"./vhdl-CWWH2SUo.js";import"./webidl-CGwyPRYs.js";import"./xquery-CVDBqZPY.js";import"./yacas-I8QjZlxf.js";import"./z80-D8p3gKXp.js";import"./trash-DJ39k3RZ.js";const At=s=>{const t=U.c(21),{appConfig:r}=s,{setCells:o}=H(),{sendComponentValues:c}=J();let b,i,a,m;t[0]!==c?(b=()=>(G.INSTANCE.start(c),zt),t[0]=c,t[1]=b):b=t[1],t[2]===Symbol.for("react.memo_cache_sentinel")?(i=[],t[2]=i):i=t[2],K.useEffect(b,i),t[3]===Symbol.for("react.memo_cache_sentinel")?(a=tt(),t[3]=a):a=t[3],t[4]!==o?(m={autoInstantiate:!0,setCells:o,sessionId:a},t[4]=o,t[5]=m):m=t[5];const{connection:n}=kt(m),y=q(M);let f;t[6]!==n.state?(f=Q(n.state),t[6]=n.state,t[7]=f):f=t[7];const h=f;let p;t[8]!==r||t[9]!==h?(p=()=>h?e.jsxs(et,{milliseconds:2e3,fallback:null,children:[e.jsx(ot,{className:"mx-auto"}),e.jsx("p",{className:"text-center text-sm text-muted-foreground mt-2",children:"Connecting..."})]}):e.jsx(_t,{appConfig:r,mode:"read"}),t[8]=r,t[9]=h,t[10]=p):p=t[10];const x=p,g=r.width;let l,d,j;return t[11]!==n?(l=e.jsx(Nt,{connection:n,className:"sm:pt-8"}),t[11]=n,t[12]=l):l=t[12],t[13]!==x?(d=x(),t[13]=x,t[14]=d):d=t[14],t[15]!==r.width||t[16]!==n||t[17]!==y||t[18]!==l||t[19]!==d?(j=e.jsxs(wt,{connection:n,isRunning:y,width:g,children:[l,d]}),t[15]=r.width,t[16]=n,t[17]=y,t[18]=l,t[19]=d,t[20]=j):j=t[20],j};function zt(){G.INSTANCE.stop()}const It=()=>{const s=U.c(3),t=q(rt);if(!F()||!t)return null;let r,o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsxs("span",{children:["Static"," ",e.jsx("a",{href:Y.githubPage,target:"_blank",className:"text-(--sky-11) font-medium underline",children:"marimo"})," ","notebook - Run or edit for full interactivity"]}),s[0]=r):r=s[0],s[1]!==t?(o=e.jsxs("div",{className:"px-4 py-2 bg-(--sky-2) border-b border-(--sky-7) text-(--sky-11) flex justify-between items-center gap-4 no-print text-sm","data-testid":"static-notebook-banner",children:[r,e.jsx("span",{className:"shrink-0",children:e.jsx(Tt,{code:t})})]}),s[1]=t,s[2]=o):o=s[2],o},Tt=s=>{const t=U.c(78),{code:r}=s;let o=st()||"notebook.py";const c=o.lastIndexOf("/");c!==-1&&(o=o.slice(c+1));const b=window.location.href;let i,a,m,n,y,f,h,p,x,g,l,d,j,k,_,N,u,w,S,v,C,V,A,z,I,T,B,E,P,D,R,W,O,L;if(t[0]!==r||t[1]!==o){const $=it({code:r});let X;n=at,t[21]===Symbol.for("react.memo_cache_sentinel")?(l=e.jsx(mt,{asChild:!0,children:e.jsx(Z,{"data-testid":"static-notebook-dialog-trigger",variant:"outline",size:"xs",children:"Run or Edit"})}),t[21]=l):l=t[21],m=nt,a=lt,t[22]!==o?(g=e.jsx(ct,{children:o}),t[22]=o,t[23]=g):g=t[23],i=pt,f="pt-3 text-left space-y-3",t[24]===Symbol.for("react.memo_cache_sentinel")?(h=e.jsxs("p",{children:["This is a static"," ",e.jsx("a",{href:Y.githubPage,target:"_blank",className:"text-(--sky-11) hover:underline font-medium",children:"marimo"})," ","notebook. To run interactively:"]}),t[24]=h):h=t[24],t[25]===Symbol.for("react.memo_cache_sentinel")?(X=e.jsx("br",{}),t[25]=X):X=t[25],t[26]!==o?(p=e.jsx("div",{className:"rounded-lg p-3 border bg-(--sky-2) border-(--sky-7)",children:e.jsxs("div",{className:"font-mono text-(--sky-11) leading-relaxed",children:["pip install marimo",X,"marimo edit ",o]})}),t[26]=o,t[27]=p):p=t[27],t[28]===Symbol.for("react.memo_cache_sentinel")?(x=!b.endsWith(".html")&&e.jsxs("div",{className:"rounded-lg p-3 border bg-(--sky-2) border-(--sky-7)",children:[e.jsx("div",{className:"text-sm text-(--sky-12) mb-1",children:"Or run directly from URL:"}),e.jsxs("div",{className:"font-mono text-(--sky-11) break-all",children:["marimo edit ",window.location.href]})]}),t[28]=x):x=t[28],S="pt-3 border-t border-(--sky-7)",N="text-sm text-(--sky-12) mb-2",t[29]===Symbol.for("react.memo_cache_sentinel")?(u=e.jsx("strong",{children:"Try in browser with WebAssembly:"}),t[29]=u):u=t[29],w=" ",y=$,d="_blank",j="text-(--sky-11) hover:underline break-all",k="noreferrer",_=$.slice(0,50),t[0]=r,t[1]=o,t[2]=i,t[3]=a,t[4]=m,t[5]=n,t[6]=y,t[7]=f,t[8]=h,t[9]=p,t[10]=x,t[11]=g,t[12]=l,t[13]=d,t[14]=j,t[15]=k,t[16]=_,t[17]=N,t[18]=u,t[19]=w,t[20]=S}else i=t[2],a=t[3],m=t[4],n=t[5],y=t[6],f=t[7],h=t[8],p=t[9],x=t[10],g=t[11],l=t[12],d=t[13],j=t[14],k=t[15],_=t[16],N=t[17],u=t[18],w=t[19],S=t[20];return t[30]!==y||t[31]!==d||t[32]!==j||t[33]!==k||t[34]!==_?(v=e.jsxs("a",{href:y,target:d,className:j,rel:k,children:[_,"..."]}),t[30]=y,t[31]=d,t[32]=j,t[33]=k,t[34]=_,t[35]=v):v=t[35],t[36]!==v||t[37]!==N||t[38]!==u||t[39]!==w?(C=e.jsxs("p",{className:N,children:[u,w,v]}),t[36]=v,t[37]=N,t[38]=u,t[39]=w,t[40]=C):C=t[40],t[41]===Symbol.for("react.memo_cache_sentinel")?(V=e.jsx("p",{className:"text-sm text-(--sky-12)",children:"Note: WebAssembly may not work for all notebooks. Additionally, some dependencies may not be available in the browser."}),t[41]=V):V=t[41],t[42]!==C||t[43]!==S?(A=e.jsxs("div",{className:S,children:[C,V]}),t[42]=C,t[43]=S,t[44]=A):A=t[44],t[45]!==i||t[46]!==f||t[47]!==h||t[48]!==p||t[49]!==x||t[50]!==A?(z=e.jsxs(i,{className:f,children:[h,p,x,A]}),t[45]=i,t[46]=f,t[47]=h,t[48]=p,t[49]=x,t[50]=A,t[51]=z):z=t[51],t[52]!==a||t[53]!==g||t[54]!==z?(I=e.jsxs(a,{children:[g,z]}),t[52]=a,t[53]=g,t[54]=z,t[55]=I):I=t[55],t[56]!==r?(T=async()=>{await dt(r),ht({title:"Copied to clipboard"})},t[56]=r,t[57]=T):T=t[57],t[58]===Symbol.for("react.memo_cache_sentinel")?(B=e.jsx(xt,{className:"w-3 h-3 mr-2"}),t[58]=B):B=t[58],t[59]!==T?(E=e.jsxs(Z,{"data-testid":"copy-static-notebook-dialog-button",variant:"outline",size:"sm",onClick:T,children:[B,"Copy code"]}),t[59]=T,t[60]=E):E=t[60],t[61]!==r||t[62]!==o?(P=()=>{bt(new Blob([r],{type:"text/plain"}),o)},t[61]=r,t[62]=o,t[63]=P):P=t[63],t[64]===Symbol.for("react.memo_cache_sentinel")?(D=e.jsx(ft,{className:"w-3 h-3 mr-2"}),t[64]=D):D=t[64],t[65]!==P?(R=e.jsxs(Z,{"data-testid":"download-static-notebook-dialog-button",variant:"outline",size:"sm",onClick:P,children:[D,"Download"]}),t[65]=P,t[66]=R):R=t[66],t[67]!==E||t[68]!==R?(W=e.jsxs("div",{className:"flex gap-3 pt-2",children:[E,R]}),t[67]=E,t[68]=R,t[69]=W):W=t[69],t[70]!==m||t[71]!==I||t[72]!==W?(O=e.jsxs(m,{children:[I,W]}),t[70]=m,t[71]=I,t[72]=W,t[73]=O):O=t[73],t[74]!==n||t[75]!==l||t[76]!==O?(L=e.jsxs(n,{children:[l,O]}),t[74]=n,t[75]=l,t[76]=O,t[77]=L):L=t[77],L},Et=jt()||F(),Pt=s=>{const t=U.c(10);let r,o,c,b,i,a,m;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=St(),t[0]=r):r=t[0],t[1]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(It,{}),t[1]=o):o=t[1],t[2]!==s.appConfig?(c=e.jsx(At,{appConfig:s.appConfig}),t[2]=s.appConfig,t[3]=c):c=t[3],t[4]===Symbol.for("react.memo_cache_sentinel")?(b=Et&&e.jsx(Rt,{}),t[4]=b):b=t[4],t[5]!==c?(i=e.jsxs(yt,{children:[o,c,b]}),t[5]=c,t[6]=i):i=t[6],t[7]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(gt,{}),t[7]=a):a=t[7],t[8]!==i?(m=e.jsx(vt,{children:e.jsxs(ut,{direction:"horizontal",autoSaveId:"marimo:chrome:v1:run1",storage:r,children:[i,a]})}),t[8]=i,t[9]=m):m=t[9],m},Rt=()=>{const s=U.c(1);let t;return s[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx("div",{className:"fixed bottom-0 right-0 z-50","data-testid":"watermark",children:e.jsxs("a",{href:Y.githubPage,target:"_blank",className:"text-sm text-(--grass-11) font-bold tracking-wide transition-colors bg-(--grass-4) hover:bg-(--grass-5) border-t border-l border-(--grass-8) px-3 py-1 rounded-tl-md flex items-center gap-2",children:[e.jsx("span",{children:"made with marimo"}),e.jsx("img",{src:Ct,alt:"marimo",className:"h-4 w-auto"})]})}),s[0]=t):t=s[0],t};export{Pt as default};
|
|
1
|
+
import{a as U,S as H,T as J,U as K,V as q,W as M,X as Q,Y as tt,j as e,Z as et,_ as ot,$ as rt,a0 as F,a1 as Y,a2 as st,a3 as it,a4 as at,a5 as mt,a6 as Z,a7 as nt,a8 as lt,a9 as ct,aa as pt,ab as dt,ac as ht,ad as xt,ae as bt,af as ft,ag as jt,ah as yt,ai as gt,aj as ut}from"./index-WZpn7zIz.js";import{u as kt,R as G,C as _t,A as Nt,a as wt,c as St,P as vt,m as Ct}from"./storage-B47VVzw1.js";import"./index-BzZRHBMs.js";import"./index-BMCpi_hV.js";import"./index-DWJwqJmD.js";import"./index-DNVhZM1y.js";import"./index-Cni7Zj6s.js";import"./index-CJRYE40I.js";import"./index-BlHS2xQv.js";import"./index-CQ7rf4K7.js";import"./index-DmunXcbP.js";import"./index-B3l0i9L2.js";import"./index-CswmrBaY.js";import"./index-CrltF-5r.js";import"./index-CEoUSuyW.js";import"./apl-CXdQSnD-.js";import"./asciiarmor-D5V0T9Cu.js";import"./asterisk-B46aRdXb.js";import"./brainfuck-CtZaYBKt.js";import"./clike-BgBwzOhw.js";import"./cmake-DXn5xaP-.js";import"./cobol-stawOqaz.js";import"./coffeescript-BTDxI-eT.js";import"./commonlisp-vq6DHwts.js";import"./crystal-CRzZ78HM.js";import"./cypher-gJDei3ni.js";import"./d-BShv7fp-.js";import"./diff-UJJ5BM9S.js";import"./dockerfile-knGOOxt4.js";import"./simple-mode-C3vEBAcb.js";import"./dtd-DI9Herc-.js";import"./dylan-DkEP81N9.js";import"./ebnf-B-Df8AvO.js";import"./ecl-DPFc0Uaf.js";import"./eiffel-DR5c0IrL.js";import"./elm-DompmV0j.js";import"./erlang-BuqgqA5h.js";import"./factor-CFXhaUWb.js";import"./fcl-CVaBTCzQ.js";import"./forth-POgR1ypr.js";import"./fortran-DL7KluxX.js";import"./gas-bV0CklSb.js";import"./gherkin-B6X1vGSW.js";import"./groovy-DnIzCrpZ.js";import"./haskell-CLQs6EAM.js";import"./haxe-D25e-2l-.js";import"./http-BKJkqRj4.js";import"./idl-pcmmZuaN.js";import"./jinja2-DhgKlfW7.js";import"./julia-DjdwvFuI.js";import"./livescript-HO6ttBFx.js";import"./lua-8DXOpKDz.js";import"./mathematica-IIbmv7SK.js";import"./mbox-z_N2Mo3d.js";import"./mirc-DkvFAiy5.js";import"./modelica-DSrSSXCg.js";import"./mscgen-B2igx18G.js";import"./mumps-zvxmGV4l.js";import"./nginx-B4hAVlXN.js";import"./nsis-BvKfQ9lQ.js";import"./ntriples-BSwWqoLa.js";import"./octave-C4hdQ5Hf.js";import"./oz-qQq7irPq.js";import"./pascal-CafrKXZF.js";import"./perl-tdMlh9QA.js";import"./pig-CwGJVRC4.js";import"./powershell-D1ly3AHC.js";import"./properties-_nPj978X.js";import"./protobuf-B4y9do6W.js";import"./puppet-Bc-yJKzi.js";import"./q-B0kTJ4cI.js";import"./r-BA4EbLKE.js";import"./ruby-CR-u2WLS.js";import"./sas-Bqaci40L.js";import"./scheme-qjP0V5Ag.js";import"./shell-BLav31RL.js";import"./sieve-r025o_jW.js";import"./smalltalk-C7J3IyEP.js";import"./solr-78MBEUkU.js";import"./sparql-BRLJFz69.js";import"./spreadsheet-CGlWr0eM.js";import"./stylus-Bdo_Aemu.js";import"./swift-B_XXVlXX.js";import"./tcl-B2fODqDH.js";import"./textile-BuVhTOzU.js";import"./tiddlywiki-BgR6AEZu.js";import"./tiki-CI-ztowC.js";import"./toml-wcPdHu67.js";import"./troff-Ce85hlLp.js";import"./ttcn-BxnYHtq8.js";import"./turtle-BkSuIpt-.js";import"./vb-BHgjm0DN.js";import"./vbscript-Dawdd5GZ.js";import"./velocity-BdD_26Jv.js";import"./verilog-B4LBqg_1.js";import"./vhdl-CWWH2SUo.js";import"./webidl-CGwyPRYs.js";import"./xquery-CVDBqZPY.js";import"./yacas-I8QjZlxf.js";import"./z80-D8p3gKXp.js";import"./trash-DM7Eop-E.js";const At=s=>{const t=U.c(21),{appConfig:r}=s,{setCells:o}=H(),{sendComponentValues:c}=J();let b,i,a,m;t[0]!==c?(b=()=>(G.INSTANCE.start(c),zt),t[0]=c,t[1]=b):b=t[1],t[2]===Symbol.for("react.memo_cache_sentinel")?(i=[],t[2]=i):i=t[2],K.useEffect(b,i),t[3]===Symbol.for("react.memo_cache_sentinel")?(a=tt(),t[3]=a):a=t[3],t[4]!==o?(m={autoInstantiate:!0,setCells:o,sessionId:a},t[4]=o,t[5]=m):m=t[5];const{connection:n}=kt(m),y=q(M);let f;t[6]!==n.state?(f=Q(n.state),t[6]=n.state,t[7]=f):f=t[7];const h=f;let p;t[8]!==r||t[9]!==h?(p=()=>h?e.jsxs(et,{milliseconds:2e3,fallback:null,children:[e.jsx(ot,{className:"mx-auto"}),e.jsx("p",{className:"text-center text-sm text-muted-foreground mt-2",children:"Connecting..."})]}):e.jsx(_t,{appConfig:r,mode:"read"}),t[8]=r,t[9]=h,t[10]=p):p=t[10];const x=p,g=r.width;let l,d,j;return t[11]!==n?(l=e.jsx(Nt,{connection:n,className:"sm:pt-8"}),t[11]=n,t[12]=l):l=t[12],t[13]!==x?(d=x(),t[13]=x,t[14]=d):d=t[14],t[15]!==r.width||t[16]!==n||t[17]!==y||t[18]!==l||t[19]!==d?(j=e.jsxs(wt,{connection:n,isRunning:y,width:g,children:[l,d]}),t[15]=r.width,t[16]=n,t[17]=y,t[18]=l,t[19]=d,t[20]=j):j=t[20],j};function zt(){G.INSTANCE.stop()}const It=()=>{const s=U.c(3),t=q(rt);if(!F()||!t)return null;let r,o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsxs("span",{children:["Static"," ",e.jsx("a",{href:Y.githubPage,target:"_blank",className:"text-(--sky-11) font-medium underline",children:"marimo"})," ","notebook - Run or edit for full interactivity"]}),s[0]=r):r=s[0],s[1]!==t?(o=e.jsxs("div",{className:"px-4 py-2 bg-(--sky-2) border-b border-(--sky-7) text-(--sky-11) flex justify-between items-center gap-4 no-print text-sm","data-testid":"static-notebook-banner",children:[r,e.jsx("span",{className:"shrink-0",children:e.jsx(Tt,{code:t})})]}),s[1]=t,s[2]=o):o=s[2],o},Tt=s=>{const t=U.c(78),{code:r}=s;let o=st()||"notebook.py";const c=o.lastIndexOf("/");c!==-1&&(o=o.slice(c+1));const b=window.location.href;let i,a,m,n,y,f,h,p,x,g,l,d,j,k,_,N,u,w,S,v,C,V,A,z,I,T,B,R,E,D,P,W,O,L;if(t[0]!==r||t[1]!==o){const $=it({code:r});let X;n=at,t[21]===Symbol.for("react.memo_cache_sentinel")?(l=e.jsx(mt,{asChild:!0,children:e.jsx(Z,{"data-testid":"static-notebook-dialog-trigger",variant:"outline",size:"xs",children:"Run or Edit"})}),t[21]=l):l=t[21],m=nt,a=lt,t[22]!==o?(g=e.jsx(ct,{children:o}),t[22]=o,t[23]=g):g=t[23],i=pt,f="pt-3 text-left space-y-3",t[24]===Symbol.for("react.memo_cache_sentinel")?(h=e.jsxs("p",{children:["This is a static"," ",e.jsx("a",{href:Y.githubPage,target:"_blank",className:"text-(--sky-11) hover:underline font-medium",children:"marimo"})," ","notebook. To run interactively:"]}),t[24]=h):h=t[24],t[25]===Symbol.for("react.memo_cache_sentinel")?(X=e.jsx("br",{}),t[25]=X):X=t[25],t[26]!==o?(p=e.jsx("div",{className:"rounded-lg p-3 border bg-(--sky-2) border-(--sky-7)",children:e.jsxs("div",{className:"font-mono text-(--sky-11) leading-relaxed",children:["pip install marimo",X,"marimo edit ",o]})}),t[26]=o,t[27]=p):p=t[27],t[28]===Symbol.for("react.memo_cache_sentinel")?(x=!b.endsWith(".html")&&e.jsxs("div",{className:"rounded-lg p-3 border bg-(--sky-2) border-(--sky-7)",children:[e.jsx("div",{className:"text-sm text-(--sky-12) mb-1",children:"Or run directly from URL:"}),e.jsxs("div",{className:"font-mono text-(--sky-11) break-all",children:["marimo edit ",window.location.href]})]}),t[28]=x):x=t[28],S="pt-3 border-t border-(--sky-7)",N="text-sm text-(--sky-12) mb-2",t[29]===Symbol.for("react.memo_cache_sentinel")?(u=e.jsx("strong",{children:"Try in browser with WebAssembly:"}),t[29]=u):u=t[29],w=" ",y=$,d="_blank",j="text-(--sky-11) hover:underline break-all",k="noreferrer",_=$.slice(0,50),t[0]=r,t[1]=o,t[2]=i,t[3]=a,t[4]=m,t[5]=n,t[6]=y,t[7]=f,t[8]=h,t[9]=p,t[10]=x,t[11]=g,t[12]=l,t[13]=d,t[14]=j,t[15]=k,t[16]=_,t[17]=N,t[18]=u,t[19]=w,t[20]=S}else i=t[2],a=t[3],m=t[4],n=t[5],y=t[6],f=t[7],h=t[8],p=t[9],x=t[10],g=t[11],l=t[12],d=t[13],j=t[14],k=t[15],_=t[16],N=t[17],u=t[18],w=t[19],S=t[20];return t[30]!==y||t[31]!==d||t[32]!==j||t[33]!==k||t[34]!==_?(v=e.jsxs("a",{href:y,target:d,className:j,rel:k,children:[_,"..."]}),t[30]=y,t[31]=d,t[32]=j,t[33]=k,t[34]=_,t[35]=v):v=t[35],t[36]!==v||t[37]!==N||t[38]!==u||t[39]!==w?(C=e.jsxs("p",{className:N,children:[u,w,v]}),t[36]=v,t[37]=N,t[38]=u,t[39]=w,t[40]=C):C=t[40],t[41]===Symbol.for("react.memo_cache_sentinel")?(V=e.jsx("p",{className:"text-sm text-(--sky-12)",children:"Note: WebAssembly may not work for all notebooks. Additionally, some dependencies may not be available in the browser."}),t[41]=V):V=t[41],t[42]!==C||t[43]!==S?(A=e.jsxs("div",{className:S,children:[C,V]}),t[42]=C,t[43]=S,t[44]=A):A=t[44],t[45]!==i||t[46]!==f||t[47]!==h||t[48]!==p||t[49]!==x||t[50]!==A?(z=e.jsxs(i,{className:f,children:[h,p,x,A]}),t[45]=i,t[46]=f,t[47]=h,t[48]=p,t[49]=x,t[50]=A,t[51]=z):z=t[51],t[52]!==a||t[53]!==g||t[54]!==z?(I=e.jsxs(a,{children:[g,z]}),t[52]=a,t[53]=g,t[54]=z,t[55]=I):I=t[55],t[56]!==r?(T=async()=>{await dt(r),ht({title:"Copied to clipboard"})},t[56]=r,t[57]=T):T=t[57],t[58]===Symbol.for("react.memo_cache_sentinel")?(B=e.jsx(xt,{className:"w-3 h-3 mr-2"}),t[58]=B):B=t[58],t[59]!==T?(R=e.jsxs(Z,{"data-testid":"copy-static-notebook-dialog-button",variant:"outline",size:"sm",onClick:T,children:[B,"Copy code"]}),t[59]=T,t[60]=R):R=t[60],t[61]!==r||t[62]!==o?(E=()=>{bt(new Blob([r],{type:"text/plain"}),o)},t[61]=r,t[62]=o,t[63]=E):E=t[63],t[64]===Symbol.for("react.memo_cache_sentinel")?(D=e.jsx(ft,{className:"w-3 h-3 mr-2"}),t[64]=D):D=t[64],t[65]!==E?(P=e.jsxs(Z,{"data-testid":"download-static-notebook-dialog-button",variant:"outline",size:"sm",onClick:E,children:[D,"Download"]}),t[65]=E,t[66]=P):P=t[66],t[67]!==R||t[68]!==P?(W=e.jsxs("div",{className:"flex gap-3 pt-2",children:[R,P]}),t[67]=R,t[68]=P,t[69]=W):W=t[69],t[70]!==m||t[71]!==I||t[72]!==W?(O=e.jsxs(m,{children:[I,W]}),t[70]=m,t[71]=I,t[72]=W,t[73]=O):O=t[73],t[74]!==n||t[75]!==l||t[76]!==O?(L=e.jsxs(n,{children:[l,O]}),t[74]=n,t[75]=l,t[76]=O,t[77]=L):L=t[77],L},Rt=jt()||F(),Et=s=>{const t=U.c(10);let r,o,c,b,i,a,m;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=St(),t[0]=r):r=t[0],t[1]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(It,{}),t[1]=o):o=t[1],t[2]!==s.appConfig?(c=e.jsx(At,{appConfig:s.appConfig}),t[2]=s.appConfig,t[3]=c):c=t[3],t[4]===Symbol.for("react.memo_cache_sentinel")?(b=Rt&&e.jsx(Pt,{}),t[4]=b):b=t[4],t[5]!==c?(i=e.jsxs(yt,{children:[o,c,b]}),t[5]=c,t[6]=i):i=t[6],t[7]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(gt,{}),t[7]=a):a=t[7],t[8]!==i?(m=e.jsx(vt,{children:e.jsxs(ut,{direction:"horizontal",autoSaveId:"marimo:chrome:v1:run1",storage:r,children:[i,a]})}),t[8]=i,t[9]=m):m=t[9],m},Pt=()=>{const s=U.c(1);let t;return s[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx("div",{className:"fixed bottom-0 right-0 z-50","data-testid":"watermark",children:e.jsxs("a",{href:Y.githubPage,target:"_blank",className:"text-sm text-(--grass-11) font-bold tracking-wide transition-colors bg-(--grass-4) hover:bg-(--grass-5) border-t border-l border-(--grass-8) px-3 py-1 rounded-tl-md flex items-center gap-2",children:[e.jsx("span",{children:"made with marimo"}),e.jsx("img",{src:Ct,alt:"marimo",className:"h-4 w-auto"})]})}),s[0]=t):t=s[0],t};export{Et as default};
|
package/dist/assets/{sankeyDiagram-4UZDY2LN-XAKiDU7c.js → sankeyDiagram-HRAUVNP4-cf6xzlF-.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var z,F,O;import{_,p as ft,q as yt,s as gt,g as pt,b as dt,a as _t,c as R,z as mt,T as xt,y as kt,j as vt}from"./mermaid-sbM5kvPX.js";import{s as Y}from"./transform-B8bpuzxV.js";import{o as bt}from"./ordinal-DDUp3AbE.js";import{c as wt}from"./colors-bszWmPJw.js";import"./index-DPzEQsyf.js";import"./step-BwsUM5iJ.js";import"./timer-BwIYMJWC.js";import"./init-DLRA0X12.js";const St=wt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function et(t,i){let s;if(i===void 0)for(const o of t)o!=null&&(s<o||s===void 0&&o>=o)&&(s=o);else{let o=-1;for(let r of t)(r=i(r,++o,t))!=null&&(s<r||s===void 0&&r>=r)&&(s=r)}return s}function it(t,i){let s;if(i===void 0)for(const o of t)o!=null&&(s>o||s===void 0&&o>=o)&&(s=o);else{let o=-1;for(let r of t)(r=i(r,++o,t))!=null&&(s>r||s===void 0&&r>=r)&&(s=r)}return s}function B(t,i){let s=0;if(i===void 0)for(let o of t)(o=+o)&&(s+=o);else{let o=-1;for(let r of t)(r=+i(r,++o,t))&&(s+=r)}return s}function Lt(t){return t.target.depth}function st(t,i){return t.sourceLinks.length?t.depth:i-1}function W(t){return function(){return t}}function rt(t,i){return G(t.source,i.source)||t.index-i.index}function ot(t,i){return G(t.target,i.target)||t.index-i.index}function G(t,i){return t.y0-i.y0}function K(t){return t.value}function At(t){return t.index}function Et(t){return t.nodes}function Mt(t){return t.links}function at(t,i){const s=t.get(i);if(!s)throw new Error("missing: "+i);return s}function ct({nodes:t}){for(const i of t){let s=i.y0,o=s;for(const r of i.sourceLinks)r.y0=s+r.width/2,s+=r.width;for(const r of i.targetLinks)r.y1=o+r.width/2,o+=r.width}}function It(){let t,i,s,o=0,r=0,y=1,k=1,e=24,f=8,c=At,d=st,x=Et,p=Mt,E=6;function v(){const n={nodes:x.apply(null,arguments),links:p.apply(null,arguments)};return function({nodes:l,links:h}){for(const[u,a]of l.entries())a.index=u,a.sourceLinks=[],a.targetLinks=[];const g=new Map(l.map((u,a)=>[c(u,a,l),u]));for(const[u,a]of h.entries()){a.index=u;let{source:b,target:m}=a;typeof b!="object"&&(b=a.source=at(g,b)),typeof m!="object"&&(m=a.target=at(g,m)),b.sourceLinks.push(a),m.targetLinks.push(a)}if(s!=null)for(const{sourceLinks:u,targetLinks:a}of l)u.sort(s),a.sort(s)}(n),function({nodes:l}){for(const h of l)h.value=h.fixedValue===void 0?Math.max(B(h.sourceLinks,K),B(h.targetLinks,K)):h.fixedValue}(n),function({nodes:l}){const h=l.length;let g=new Set(l),u=new Set,a=0;for(;g.size;){for(const b of g){b.depth=a;for(const{target:m}of b.sourceLinks)u.add(m)}if(++a>h)throw new Error("circular link");g=u,u=new Set}}(n),function({nodes:l}){const h=l.length;let g=new Set(l),u=new Set,a=0;for(;g.size;){for(const b of g){b.height=a;for(const{source:m}of b.targetLinks)u.add(m)}if(++a>h)throw new Error("circular link");g=u,u=new Set}}(n),function(l){const h=function({nodes:g}){const u=et(g,m=>m.depth)+1,a=(y-o-e)/(u-1),b=new Array(u);for(const m of g){const S=Math.max(0,Math.min(u-1,Math.floor(d.call(null,m,u))));m.layer=S,m.x0=o+S*a,m.x1=m.x0+e,b[S]?b[S].push(m):b[S]=[m]}if(i)for(const m of b)m.sort(i);return b}(l);t=Math.min(f,(k-r)/(et(h,g=>g.length)-1)),function(g){const u=it(g,a=>(k-r-(a.length-1)*t)/B(a,K));for(const a of g){let b=r;for(const m of a){m.y0=b,m.y1=b+m.value*u,b=m.y1+t;for(const S of m.sourceLinks)S.width=S.value*u}b=(k-b+t)/(a.length+1);for(let m=0;m<a.length;++m){const S=a[m];S.y0+=b*(m+1),S.y1+=b*(m+1)}C(a)}}(h);for(let g=0;g<E;++g){const u=Math.pow(.99,g),a=Math.max(1-u,(g+1)/E);I(h,u,a),T(h,u,a)}}(n),ct(n),n}function T(n,l,h){for(let g=1,u=n.length;g<u;++g){const a=n[g];for(const b of a){let m=0,S=0;for(const{source:A,value:U}of b.targetLinks){let nt=U*(b.layer-A.layer);m+=$(A,b)*nt,S+=nt}if(!(S>0))continue;let D=(m/S-b.y0)*l;b.y0+=D,b.y1+=D,P(b)}i===void 0&&a.sort(G),M(a,h)}}function I(n,l,h){for(let g=n.length-2;g>=0;--g){const u=n[g];for(const a of u){let b=0,m=0;for(const{target:D,value:A}of a.sourceLinks){let U=A*(D.layer-a.layer);b+=N(a,D)*U,m+=U}if(!(m>0))continue;let S=(b/m-a.y0)*l;a.y0+=S,a.y1+=S,P(a)}i===void 0&&u.sort(G),M(u,h)}}function M(n,l){const h=n.length>>1,g=n[h];L(n,g.y0-t,h-1,l),w(n,g.y1+t,h+1,l),L(n,k,n.length-1,l),w(n,r,0,l)}function w(n,l,h,g){for(;h<n.length;++h){const u=n[h],a=(l-u.y0)*g;a>1e-6&&(u.y0+=a,u.y1+=a),l=u.y1+t}}function L(n,l,h,g){for(;h>=0;--h){const u=n[h],a=(u.y1-l)*g;a>1e-6&&(u.y0-=a,u.y1-=a),l=u.y0-t}}function P({sourceLinks:n,targetLinks:l}){if(s===void 0){for(const{source:{sourceLinks:h}}of l)h.sort(ot);for(const{target:{targetLinks:h}}of n)h.sort(rt)}}function C(n){if(s===void 0)for(const{sourceLinks:l,targetLinks:h}of n)l.sort(ot),h.sort(rt)}function $(n,l){let h=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:g,width:u}of n.sourceLinks){if(g===l)break;h+=u+t}for(const{source:g,width:u}of l.targetLinks){if(g===n)break;h-=u}return h}function N(n,l){let h=l.y0-(l.targetLinks.length-1)*t/2;for(const{source:g,width:u}of l.targetLinks){if(g===n)break;h+=u+t}for(const{target:g,width:u}of n.sourceLinks){if(g===l)break;h-=u}return h}return v.update=function(n){return ct(n),n},v.nodeId=function(n){return arguments.length?(c=typeof n=="function"?n:W(n),v):c},v.nodeAlign=function(n){return arguments.length?(d=typeof n=="function"?n:W(n),v):d},v.nodeSort=function(n){return arguments.length?(i=n,v):i},v.nodeWidth=function(n){return arguments.length?(e=+n,v):e},v.nodePadding=function(n){return arguments.length?(f=t=+n,v):f},v.nodes=function(n){return arguments.length?(x=typeof n=="function"?n:W(n),v):x},v.links=function(n){return arguments.length?(p=typeof n=="function"?n:W(n),v):p},v.linkSort=function(n){return arguments.length?(s=n,v):s},v.size=function(n){return arguments.length?(o=r=0,y=+n[0],k=+n[1],v):[y-o,k-r]},v.extent=function(n){return arguments.length?(o=+n[0][0],y=+n[1][0],r=+n[0][1],k=+n[1][1],v):[[o,r],[y,k]]},v.iterations=function(n){return arguments.length?(E=+n,v):E},v}var Z=Math.PI,H=2*Z,j=1e-6,Tt=H-j;function J(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function lt(){return new J}function ht(t){return function(){return t}}function Pt(t){return t[0]}function Nt(t){return t[1]}J.prototype=lt.prototype={constructor:J,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,s,o){this._+="Q"+ +t+","+ +i+","+(this._x1=+s)+","+(this._y1=+o)},bezierCurveTo:function(t,i,s,o,r,y){this._+="C"+ +t+","+ +i+","+ +s+","+ +o+","+(this._x1=+r)+","+(this._y1=+y)},arcTo:function(t,i,s,o,r){t=+t,i=+i,s=+s,o=+o,r=+r;var y=this._x1,k=this._y1,e=s-t,f=o-i,c=y-t,d=k-i,x=c*c+d*d;if(r<0)throw new Error("negative radius: "+r);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(x>j)if(Math.abs(d*e-f*c)>j&&r){var p=s-y,E=o-k,v=e*e+f*f,T=p*p+E*E,I=Math.sqrt(v),M=Math.sqrt(x),w=r*Math.tan((Z-Math.acos((v+x-T)/(2*I*M)))/2),L=w/M,P=w/I;Math.abs(L-1)>j&&(this._+="L"+(t+L*c)+","+(i+L*d)),this._+="A"+r+","+r+",0,0,"+ +(d*p>c*E)+","+(this._x1=t+P*e)+","+(this._y1=i+P*f)}else this._+="L"+(this._x1=t)+","+(this._y1=i)},arc:function(t,i,s,o,r,y){t=+t,i=+i,y=!!y;var k=(s=+s)*Math.cos(o),e=s*Math.sin(o),f=t+k,c=i+e,d=1^y,x=y?o-r:r-o;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+f+","+c:(Math.abs(this._x1-f)>j||Math.abs(this._y1-c)>j)&&(this._+="L"+f+","+c),s&&(x<0&&(x=x%H+H),x>Tt?this._+="A"+s+","+s+",0,1,"+d+","+(t-k)+","+(i-e)+"A"+s+","+s+",0,1,"+d+","+(this._x1=f)+","+(this._y1=c):x>j&&(this._+="A"+s+","+s+",0,"+ +(x>=Z)+","+d+","+(this._x1=t+s*Math.cos(r))+","+(this._y1=i+s*Math.sin(r))))},rect:function(t,i,s,o){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +o+"h"+-s+"Z"},toString:function(){return this._}};var Ot=Array.prototype.slice;function Ct(t){return t.source}function Dt(t){return t.target}function $t(t,i,s,o,r){t.moveTo(i,s),t.bezierCurveTo(i=(i+o)/2,s,i,r,o,r)}function jt(){return function(t){var i=Ct,s=Dt,o=Pt,r=Nt,y=null;function k(){var e,f=Ot.call(arguments),c=i.apply(this,f),d=s.apply(this,f);if(y||(y=e=lt()),t(y,+o.apply(this,(f[0]=c,f)),+r.apply(this,f),+o.apply(this,(f[0]=d,f)),+r.apply(this,f)),e)return y=null,e+""||null}return k.source=function(e){return arguments.length?(i=e,k):i},k.target=function(e){return arguments.length?(s=e,k):s},k.x=function(e){return arguments.length?(o=typeof e=="function"?e:ht(+e),k):o},k.y=function(e){return arguments.length?(r=typeof e=="function"?e:ht(+e),k):r},k.context=function(e){return arguments.length?(y=e??null,k):y},k}($t)}function zt(t){return[t.source.x1,t.y0]}function Ft(t){return[t.target.x0,t.y1]}var tt=function(){var t=_(function(e,f,c,d){for(c=c||{},d=e.length;d--;c[e[d]]=f);return c},"o"),i=[1,9],s=[1,10],o=[1,5,10,12],r={trace:_(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:_(function(e,f,c,d,x,p,E){var v=p.length-1;switch(x){case 7:const T=d.findOrCreateNode(p[v-4].trim().replaceAll('""','"')),I=d.findOrCreateNode(p[v-2].trim().replaceAll('""','"')),M=parseFloat(p[v].trim());d.addLink(T,I,M);break;case 8:case 9:case 11:this.$=p[v];break;case 10:this.$=p[v-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:i,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(o,[2,8]),t(o,[2,9]),{19:[1,16]},t(o,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:i,20:s},{15:18,16:7,17:8,18:i,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(o,[2,10]),{15:21,16:7,17:8,18:i,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:_(function(e,f){if(!f.recoverable){var c=new Error(e);throw c.hash=f,c}this.trace(e)},"parseError"),parse:_(function(e){var f=this,c=[0],d=[],x=[null],p=[],E=this.table,v="",T=0,I=0,M=p.slice.call(arguments,1),w=Object.create(this.lexer),L={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(L.yy[P]=this.yy[P]);w.setInput(e,L.yy),L.yy.lexer=w,L.yy.parser=this,w.yylloc===void 0&&(w.yylloc={});var C=w.yylloc;p.push(C);var $=w.options&&w.options.ranges;function N(){var A;return typeof(A=d.pop()||w.lex()||1)!="number"&&(A instanceof Array&&(A=(d=A).pop()),A=f.symbols_[A]||A),A}typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,_(function(A){c.length=c.length-2*A,x.length=x.length-A,p.length=p.length-A},"popStack"),_(N,"lex");for(var n,l,h,g,u,a,b,m,S={};;){if(l=c[c.length-1],this.defaultActions[l]?h=this.defaultActions[l]:(n==null&&(n=N()),h=E[l]&&E[l][n]),h===void 0||!h.length||!h[0]){var D="";for(u in m=[],E[l])this.terminals_[u]&&u>2&&m.push("'"+this.terminals_[u]+"'");D=w.showPosition?"Parse error on line "+(T+1)+`:
|
|
1
|
+
var z,F,O;import{_,p as ft,q as yt,s as gt,g as pt,b as dt,a as _t,c as R,z as mt,T as xt,y as kt,j as vt}from"./mermaid-CxGPSzDz.js";import{s as Y}from"./transform-B8bpuzxV.js";import{o as bt}from"./ordinal-DDUp3AbE.js";import{c as wt}from"./colors-bszWmPJw.js";import"./index-WZpn7zIz.js";import"./step-BwsUM5iJ.js";import"./timer-BwIYMJWC.js";import"./init-DLRA0X12.js";const St=wt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function et(t,i){let s;if(i===void 0)for(const o of t)o!=null&&(s<o||s===void 0&&o>=o)&&(s=o);else{let o=-1;for(let r of t)(r=i(r,++o,t))!=null&&(s<r||s===void 0&&r>=r)&&(s=r)}return s}function it(t,i){let s;if(i===void 0)for(const o of t)o!=null&&(s>o||s===void 0&&o>=o)&&(s=o);else{let o=-1;for(let r of t)(r=i(r,++o,t))!=null&&(s>r||s===void 0&&r>=r)&&(s=r)}return s}function B(t,i){let s=0;if(i===void 0)for(let o of t)(o=+o)&&(s+=o);else{let o=-1;for(let r of t)(r=+i(r,++o,t))&&(s+=r)}return s}function Lt(t){return t.target.depth}function st(t,i){return t.sourceLinks.length?t.depth:i-1}function W(t){return function(){return t}}function rt(t,i){return G(t.source,i.source)||t.index-i.index}function ot(t,i){return G(t.target,i.target)||t.index-i.index}function G(t,i){return t.y0-i.y0}function K(t){return t.value}function At(t){return t.index}function Et(t){return t.nodes}function Mt(t){return t.links}function at(t,i){const s=t.get(i);if(!s)throw new Error("missing: "+i);return s}function ct({nodes:t}){for(const i of t){let s=i.y0,o=s;for(const r of i.sourceLinks)r.y0=s+r.width/2,s+=r.width;for(const r of i.targetLinks)r.y1=o+r.width/2,o+=r.width}}function It(){let t,i,s,o=0,r=0,y=1,k=1,e=24,f=8,c=At,d=st,x=Et,p=Mt,E=6;function v(){const n={nodes:x.apply(null,arguments),links:p.apply(null,arguments)};return function({nodes:l,links:h}){for(const[u,a]of l.entries())a.index=u,a.sourceLinks=[],a.targetLinks=[];const g=new Map(l.map((u,a)=>[c(u,a,l),u]));for(const[u,a]of h.entries()){a.index=u;let{source:b,target:m}=a;typeof b!="object"&&(b=a.source=at(g,b)),typeof m!="object"&&(m=a.target=at(g,m)),b.sourceLinks.push(a),m.targetLinks.push(a)}if(s!=null)for(const{sourceLinks:u,targetLinks:a}of l)u.sort(s),a.sort(s)}(n),function({nodes:l}){for(const h of l)h.value=h.fixedValue===void 0?Math.max(B(h.sourceLinks,K),B(h.targetLinks,K)):h.fixedValue}(n),function({nodes:l}){const h=l.length;let g=new Set(l),u=new Set,a=0;for(;g.size;){for(const b of g){b.depth=a;for(const{target:m}of b.sourceLinks)u.add(m)}if(++a>h)throw new Error("circular link");g=u,u=new Set}}(n),function({nodes:l}){const h=l.length;let g=new Set(l),u=new Set,a=0;for(;g.size;){for(const b of g){b.height=a;for(const{source:m}of b.targetLinks)u.add(m)}if(++a>h)throw new Error("circular link");g=u,u=new Set}}(n),function(l){const h=function({nodes:g}){const u=et(g,m=>m.depth)+1,a=(y-o-e)/(u-1),b=new Array(u);for(const m of g){const S=Math.max(0,Math.min(u-1,Math.floor(d.call(null,m,u))));m.layer=S,m.x0=o+S*a,m.x1=m.x0+e,b[S]?b[S].push(m):b[S]=[m]}if(i)for(const m of b)m.sort(i);return b}(l);t=Math.min(f,(k-r)/(et(h,g=>g.length)-1)),function(g){const u=it(g,a=>(k-r-(a.length-1)*t)/B(a,K));for(const a of g){let b=r;for(const m of a){m.y0=b,m.y1=b+m.value*u,b=m.y1+t;for(const S of m.sourceLinks)S.width=S.value*u}b=(k-b+t)/(a.length+1);for(let m=0;m<a.length;++m){const S=a[m];S.y0+=b*(m+1),S.y1+=b*(m+1)}C(a)}}(h);for(let g=0;g<E;++g){const u=Math.pow(.99,g),a=Math.max(1-u,(g+1)/E);I(h,u,a),T(h,u,a)}}(n),ct(n),n}function T(n,l,h){for(let g=1,u=n.length;g<u;++g){const a=n[g];for(const b of a){let m=0,S=0;for(const{source:A,value:U}of b.targetLinks){let nt=U*(b.layer-A.layer);m+=$(A,b)*nt,S+=nt}if(!(S>0))continue;let D=(m/S-b.y0)*l;b.y0+=D,b.y1+=D,P(b)}i===void 0&&a.sort(G),M(a,h)}}function I(n,l,h){for(let g=n.length-2;g>=0;--g){const u=n[g];for(const a of u){let b=0,m=0;for(const{target:D,value:A}of a.sourceLinks){let U=A*(D.layer-a.layer);b+=N(a,D)*U,m+=U}if(!(m>0))continue;let S=(b/m-a.y0)*l;a.y0+=S,a.y1+=S,P(a)}i===void 0&&u.sort(G),M(u,h)}}function M(n,l){const h=n.length>>1,g=n[h];L(n,g.y0-t,h-1,l),w(n,g.y1+t,h+1,l),L(n,k,n.length-1,l),w(n,r,0,l)}function w(n,l,h,g){for(;h<n.length;++h){const u=n[h],a=(l-u.y0)*g;a>1e-6&&(u.y0+=a,u.y1+=a),l=u.y1+t}}function L(n,l,h,g){for(;h>=0;--h){const u=n[h],a=(u.y1-l)*g;a>1e-6&&(u.y0-=a,u.y1-=a),l=u.y0-t}}function P({sourceLinks:n,targetLinks:l}){if(s===void 0){for(const{source:{sourceLinks:h}}of l)h.sort(ot);for(const{target:{targetLinks:h}}of n)h.sort(rt)}}function C(n){if(s===void 0)for(const{sourceLinks:l,targetLinks:h}of n)l.sort(ot),h.sort(rt)}function $(n,l){let h=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:g,width:u}of n.sourceLinks){if(g===l)break;h+=u+t}for(const{source:g,width:u}of l.targetLinks){if(g===n)break;h-=u}return h}function N(n,l){let h=l.y0-(l.targetLinks.length-1)*t/2;for(const{source:g,width:u}of l.targetLinks){if(g===n)break;h+=u+t}for(const{target:g,width:u}of n.sourceLinks){if(g===l)break;h-=u}return h}return v.update=function(n){return ct(n),n},v.nodeId=function(n){return arguments.length?(c=typeof n=="function"?n:W(n),v):c},v.nodeAlign=function(n){return arguments.length?(d=typeof n=="function"?n:W(n),v):d},v.nodeSort=function(n){return arguments.length?(i=n,v):i},v.nodeWidth=function(n){return arguments.length?(e=+n,v):e},v.nodePadding=function(n){return arguments.length?(f=t=+n,v):f},v.nodes=function(n){return arguments.length?(x=typeof n=="function"?n:W(n),v):x},v.links=function(n){return arguments.length?(p=typeof n=="function"?n:W(n),v):p},v.linkSort=function(n){return arguments.length?(s=n,v):s},v.size=function(n){return arguments.length?(o=r=0,y=+n[0],k=+n[1],v):[y-o,k-r]},v.extent=function(n){return arguments.length?(o=+n[0][0],y=+n[1][0],r=+n[0][1],k=+n[1][1],v):[[o,r],[y,k]]},v.iterations=function(n){return arguments.length?(E=+n,v):E},v}var Z=Math.PI,H=2*Z,j=1e-6,Tt=H-j;function J(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function lt(){return new J}function ht(t){return function(){return t}}function Pt(t){return t[0]}function Nt(t){return t[1]}J.prototype=lt.prototype={constructor:J,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,s,o){this._+="Q"+ +t+","+ +i+","+(this._x1=+s)+","+(this._y1=+o)},bezierCurveTo:function(t,i,s,o,r,y){this._+="C"+ +t+","+ +i+","+ +s+","+ +o+","+(this._x1=+r)+","+(this._y1=+y)},arcTo:function(t,i,s,o,r){t=+t,i=+i,s=+s,o=+o,r=+r;var y=this._x1,k=this._y1,e=s-t,f=o-i,c=y-t,d=k-i,x=c*c+d*d;if(r<0)throw new Error("negative radius: "+r);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(x>j)if(Math.abs(d*e-f*c)>j&&r){var p=s-y,E=o-k,v=e*e+f*f,T=p*p+E*E,I=Math.sqrt(v),M=Math.sqrt(x),w=r*Math.tan((Z-Math.acos((v+x-T)/(2*I*M)))/2),L=w/M,P=w/I;Math.abs(L-1)>j&&(this._+="L"+(t+L*c)+","+(i+L*d)),this._+="A"+r+","+r+",0,0,"+ +(d*p>c*E)+","+(this._x1=t+P*e)+","+(this._y1=i+P*f)}else this._+="L"+(this._x1=t)+","+(this._y1=i)},arc:function(t,i,s,o,r,y){t=+t,i=+i,y=!!y;var k=(s=+s)*Math.cos(o),e=s*Math.sin(o),f=t+k,c=i+e,d=1^y,x=y?o-r:r-o;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+f+","+c:(Math.abs(this._x1-f)>j||Math.abs(this._y1-c)>j)&&(this._+="L"+f+","+c),s&&(x<0&&(x=x%H+H),x>Tt?this._+="A"+s+","+s+",0,1,"+d+","+(t-k)+","+(i-e)+"A"+s+","+s+",0,1,"+d+","+(this._x1=f)+","+(this._y1=c):x>j&&(this._+="A"+s+","+s+",0,"+ +(x>=Z)+","+d+","+(this._x1=t+s*Math.cos(r))+","+(this._y1=i+s*Math.sin(r))))},rect:function(t,i,s,o){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +o+"h"+-s+"Z"},toString:function(){return this._}};var Ot=Array.prototype.slice;function Ct(t){return t.source}function Dt(t){return t.target}function $t(t,i,s,o,r){t.moveTo(i,s),t.bezierCurveTo(i=(i+o)/2,s,i,r,o,r)}function jt(){return function(t){var i=Ct,s=Dt,o=Pt,r=Nt,y=null;function k(){var e,f=Ot.call(arguments),c=i.apply(this,f),d=s.apply(this,f);if(y||(y=e=lt()),t(y,+o.apply(this,(f[0]=c,f)),+r.apply(this,f),+o.apply(this,(f[0]=d,f)),+r.apply(this,f)),e)return y=null,e+""||null}return k.source=function(e){return arguments.length?(i=e,k):i},k.target=function(e){return arguments.length?(s=e,k):s},k.x=function(e){return arguments.length?(o=typeof e=="function"?e:ht(+e),k):o},k.y=function(e){return arguments.length?(r=typeof e=="function"?e:ht(+e),k):r},k.context=function(e){return arguments.length?(y=e??null,k):y},k}($t)}function zt(t){return[t.source.x1,t.y0]}function Ft(t){return[t.target.x0,t.y1]}var tt=function(){var t=_(function(e,f,c,d){for(c=c||{},d=e.length;d--;c[e[d]]=f);return c},"o"),i=[1,9],s=[1,10],o=[1,5,10,12],r={trace:_(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:_(function(e,f,c,d,x,p,E){var v=p.length-1;switch(x){case 7:const T=d.findOrCreateNode(p[v-4].trim().replaceAll('""','"')),I=d.findOrCreateNode(p[v-2].trim().replaceAll('""','"')),M=parseFloat(p[v].trim());d.addLink(T,I,M);break;case 8:case 9:case 11:this.$=p[v];break;case 10:this.$=p[v-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:i,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(o,[2,8]),t(o,[2,9]),{19:[1,16]},t(o,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:i,20:s},{15:18,16:7,17:8,18:i,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(o,[2,10]),{15:21,16:7,17:8,18:i,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:_(function(e,f){if(!f.recoverable){var c=new Error(e);throw c.hash=f,c}this.trace(e)},"parseError"),parse:_(function(e){var f=this,c=[0],d=[],x=[null],p=[],E=this.table,v="",T=0,I=0,M=p.slice.call(arguments,1),w=Object.create(this.lexer),L={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(L.yy[P]=this.yy[P]);w.setInput(e,L.yy),L.yy.lexer=w,L.yy.parser=this,w.yylloc===void 0&&(w.yylloc={});var C=w.yylloc;p.push(C);var $=w.options&&w.options.ranges;function N(){var A;return typeof(A=d.pop()||w.lex()||1)!="number"&&(A instanceof Array&&(A=(d=A).pop()),A=f.symbols_[A]||A),A}typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,_(function(A){c.length=c.length-2*A,x.length=x.length-A,p.length=p.length-A},"popStack"),_(N,"lex");for(var n,l,h,g,u,a,b,m,S={};;){if(l=c[c.length-1],this.defaultActions[l]?h=this.defaultActions[l]:(n==null&&(n=N()),h=E[l]&&E[l][n]),h===void 0||!h.length||!h[0]){var D="";for(u in m=[],E[l])this.terminals_[u]&&u>2&&m.push("'"+this.terminals_[u]+"'");D=w.showPosition?"Parse error on line "+(T+1)+`:
|
|
2
2
|
`+w.showPosition()+`
|
|
3
3
|
Expecting `+m.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(T+1)+": Unexpected "+(n==1?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(D,{text:w.match,token:this.terminals_[n]||n,line:w.yylineno,loc:C,expected:m})}if(h[0]instanceof Array&&h.length>1)throw new Error("Parse Error: multiple actions possible at state: "+l+", token: "+n);switch(h[0]){case 1:c.push(n),x.push(w.yytext),p.push(w.yylloc),c.push(h[1]),n=null,I=w.yyleng,v=w.yytext,T=w.yylineno,C=w.yylloc;break;case 2:if(a=this.productions_[h[1]][1],S.$=x[x.length-a],S._$={first_line:p[p.length-(a||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(a||1)].first_column,last_column:p[p.length-1].last_column},$&&(S._$.range=[p[p.length-(a||1)].range[0],p[p.length-1].range[1]]),(g=this.performAction.apply(S,[v,I,T,L.yy,h[1],x,p].concat(M)))!==void 0)return g;a&&(c=c.slice(0,-1*a*2),x=x.slice(0,-1*a),p=p.slice(0,-1*a)),c.push(this.productions_[h[1]][0]),x.push(S.$),p.push(S._$),b=E[c[c.length-2]][c[c.length-1]],c.push(b);break;case 3:return!0}}return!0},"parse")},y=function(){return{EOF:1,parseError:_(function(e,f){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,f)},"parseError"),setInput:_(function(e,f){return this.yy=f||this.yy||{},this._input=e,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},"setInput"),input:_(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:_(function(e){var f=e.length,c=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var d=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),c.length-1&&(this.yylineno-=c.length-1);var x=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:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:_(function(e){this.unput(this.match.slice(e))},"less"),pastInput:_(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var e=this.pastInput(),f=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
|
5
5
|
`+f+"^"},"showPosition"),test_match:_(function(e,f){var c,d,x;if(this.options.backtrack_lexer&&(x={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&&(x.yylloc.range=this.yylloc.range.slice(0))),(d=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],c=this.performAction.call(this,this.yy,this,f,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var p in x)this[p]=x[p];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;var e,f,c,d;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),p=0;p<x.length;p++)if((c=this._input.match(this.rules[x[p]]))&&(!f||c[0].length>f[0].length)){if(f=c,d=p,this.options.backtrack_lexer){if((e=this.test_match(c,x[p]))!==!1)return e;if(this._backtrack){f=!1;continue}return!1}if(!this.options.flex)break}return f?(e=this.test_match(f,x[d]))!==!1&&e:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(function(){var e=this.next();return e||this.lex()},"lex"),begin:_(function(e){this.conditionStack.push(e)},"begin"),popState:_(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_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},"_currentRules"),topState:_(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:_(function(e){this.begin(e)},"pushState"),stateStackSize:_(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:_(function(e,f,c,d){switch(c){case 0:return this.pushState("csv"),4;case
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(function(){var e=this.next();return e||this.lex()},"lex"),begin:_(function(e){this.conditionStack.push(e)},"begin"),popState:_(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_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},"_currentRules"),topState:_(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:_(function(e){this.begin(e)},"pushState"),stateStackSize:_(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:_(function(e,f,c,d){switch(c){case 0:case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}}}();function k(){this.yy={}}return r.lexer=y,_(k,"Parser"),k.prototype=r,r.Parser=k,new k}();tt.parser=tt;var q=tt,V=[],X=[],Q=new Map,Ut=_(()=>{V=[],X=[],Q=new Map,kt()},"clear"),Wt=(z=class{constructor(i,s,o=0){this.source=i,this.target=s,this.value=o}},_(z,"SankeyLink"),z),Gt=_((t,i,s)=>{V.push(new Wt(t,i,s))},"addLink"),qt=(F=class{constructor(i){this.ID=i}},_(F,"SankeyNode"),F),Vt=_(t=>{t=vt.sanitizeText(t,R());let i=Q.get(t);return i===void 0&&(i=new qt(t),Q.set(t,i),X.push(i)),i},"findOrCreateNode"),Xt=_(()=>X,"getNodes"),Qt=_(()=>V,"getLinks"),Rt=_(()=>({nodes:X.map(t=>({id:t.ID})),links:V.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),Yt={nodesMap:Q,getConfig:_(()=>R().sankey,"getConfig"),getNodes:Xt,getLinks:Qt,getGraph:Rt,addLink:Gt,findOrCreateNode:Vt,getAccTitle:_t,setAccTitle:dt,getAccDescription:pt,setAccDescription:gt,getDiagramTitle:yt,setDiagramTitle:ft,clear:Ut},ut=(O=class{static next(i){return new O(i+ ++O.count)}constructor(i){this.id=i,this.href=`#${i}`}toString(){return"url("+this.href+")"}},_(O,"Uid"),O.count=0,O),Bt={left:function(t){return t.depth},right:function(t,i){return i-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?it(t.sourceLinks,Lt)-1:0},justify:st},Kt=_(function(t,i,s,o){const{securityLevel:r,sankey:y}=R(),k=mt.sankey;let e;r==="sandbox"&&(e=Y("#i"+i));const f=Y(r==="sandbox"?e.nodes()[0].contentDocument.body:"body"),c=r==="sandbox"?f.select(`[id="${i}"]`):Y(`[id="${i}"]`),d=(y==null?void 0:y.width)??k.width,x=(y==null?void 0:y.height)??k.width,p=(y==null?void 0:y.useMaxWidth)??k.useMaxWidth,E=(y==null?void 0:y.nodeAlignment)??k.nodeAlignment,v=(y==null?void 0:y.prefix)??k.prefix,T=(y==null?void 0:y.suffix)??k.suffix,I=(y==null?void 0:y.showValues)??k.showValues,M=o.db.getGraph(),w=Bt[E];It().nodeId(n=>n.id).nodeWidth(10).nodePadding(10+(I?15:0)).nodeAlign(w).extent([[0,0],[d,x]])(M);const L=bt(St);c.append("g").attr("class","nodes").selectAll(".node").data(M.nodes).join("g").attr("class","node").attr("id",n=>(n.uid=ut.next("node-")).id).attr("transform",function(n){return"translate("+n.x0+","+n.y0+")"}).attr("x",n=>n.x0).attr("y",n=>n.y0).append("rect").attr("height",n=>n.y1-n.y0).attr("width",n=>n.x1-n.x0).attr("fill",n=>L(n.id));const P=_(({id:n,value:l})=>I?`${n}
|
|
7
7
|
${v}${Math.round(100*l)/100}${T}`:n,"getText");c.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(M.nodes).join("text").attr("x",n=>n.x0<d/2?n.x1+6:n.x0-6).attr("y",n=>(n.y1+n.y0)/2).attr("dy",(I?"0":"0.35")+"em").attr("text-anchor",n=>n.x0<d/2?"start":"end").text(P);const C=c.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(M.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),$=(y==null?void 0:y.linkColor)??"gradient";if($==="gradient"){const n=C.append("linearGradient").attr("id",l=>(l.uid=ut.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",l=>l.source.x1).attr("x2",l=>l.target.x0);n.append("stop").attr("offset","0%").attr("stop-color",l=>L(l.source.id)),n.append("stop").attr("offset","100%").attr("stop-color",l=>L(l.target.id))}let N;switch($){case"gradient":N=_(n=>n.uid,"coloring");break;case"source":N=_(n=>L(n.source.id),"coloring");break;case"target":N=_(n=>L(n.target.id),"coloring");break;default:N=$}C.append("path").attr("d",jt().source(zt).target(Ft)).attr("stroke",N).attr("stroke-width",n=>Math.max(1,n.width)),xt(void 0,c,0,p)},"draw"),Zt={draw:Kt},Ht=_(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
|
8
8
|
`).trim(),"prepareTextForParsing"),Jt=_(t=>`.label {
|
|
9
9
|
font-family: ${t.fontFamily};
|