@marimo-team/frontend 0.19.8-dev21 → 0.19.8-dev24
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-B098edeX.js → ConnectedDataExplorerComponent-C1BlkUlk.js} +1 -1
- package/dist/assets/{JsonOutput-DsO4felE.js → JsonOutput-BPSYj_Kn.js} +3 -3
- package/dist/assets/{LazyAnyLanguageCodeMirror-CQP8KZWO.js → LazyAnyLanguageCodeMirror-BqosdyZU.js} +2 -2
- package/dist/assets/{MarimoErrorOutput-DrTj9k_Z.js → MarimoErrorOutput-DVEiP1Ym.js} +1 -1
- package/dist/assets/{RenderHTML-D9vJ9neG.js → RenderHTML-Bj4DW3wy.js} +1 -1
- package/dist/assets/{add-cell-with-ai-CPu9tI-Q.js → add-cell-with-ai-dpMkH_5a.js} +5 -5
- package/dist/assets/{add-database-form-CvczP0Mq.js → add-database-form-Bn_w5TEI.js} +1 -1
- package/dist/assets/{agent-panel-Dbh-hMbm.js → agent-panel-BSykBSj4.js} +1 -1
- package/dist/assets/{ai-model-dropdown-CODXtvnr.js → ai-model-dropdown-D8AFYZjU.js} +1 -1
- package/dist/assets/{any-language-editor-B1WBkbF4.js → any-language-editor-DyXJSyeK.js} +1 -1
- package/dist/assets/{app-config-button-BGuwQV5R.js → app-config-button-Ds61zRnG.js} +1 -1
- package/dist/assets/{architectureDiagram-VXUJARFQ-BsTgqTsh.js → architectureDiagram-VXUJARFQ-B8zMpJcM.js} +1 -1
- package/dist/assets/blob-Bgnx1kuY.js +1 -0
- package/dist/assets/{blockDiagram-VD42YOAC-CeZonq9z.js → blockDiagram-VD42YOAC-CF1a-_t0.js} +1 -1
- package/dist/assets/{c4Diagram-YG6GDRKO-CDPGRzUd.js → c4Diagram-YG6GDRKO-YIsEsUdQ.js} +1 -1
- package/dist/assets/{cache-panel-gTIhwBeU.js → cache-panel-C_9WDApV.js} +1 -1
- package/dist/assets/{cell-editor-BpkNlmop.js → cell-editor-90blTXig.js} +1 -1
- package/dist/assets/channel-CXFsg7SH.js +1 -0
- package/dist/assets/{chat-display-BnUDaREA.js → chat-display-letMHFni.js} +1 -1
- package/dist/assets/{chat-panel-BpDjUlzW.js → chat-panel-0qUKLNYu.js} +1 -1
- package/dist/assets/{chunk-5FQGJX7Z-CwvgJCug.js → chunk-5FQGJX7Z-T2jyw7ZD.js} +2 -2
- package/dist/assets/{chunk-ABZYJK2D-CtRGq-db.js → chunk-ABZYJK2D-D1A06qKo.js} +3 -3
- package/dist/assets/{chunk-ATLVNIR6-CXEe2jMF.js → chunk-ATLVNIR6-C5FWd1qN.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-BVqt-NSK.js → chunk-B4BG7PRW-BEayfxv_.js} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-C_mlVJmb.js → chunk-DI55MBZ5-BSrtupT8.js} +1 -1
- package/dist/assets/{chunk-EXTU4WIE-CN3BqsR0.js → chunk-EXTU4WIE-wi_fHsHN.js} +1 -1
- package/dist/assets/{chunk-JA3XYJ7Z-B5-JYmoA.js → chunk-JA3XYJ7Z-tKDxhnhw.js} +1 -1
- package/dist/assets/{chunk-JZLCHNYA-UFlatyc1.js → chunk-JZLCHNYA-DtvI9B9X.js} +1 -1
- package/dist/assets/{chunk-N4CR4FBY-BFF_Z7sG.js → chunk-N4CR4FBY-BQcJpHO7.js} +2 -2
- package/dist/assets/{chunk-QN33PNHL-DOgXIePg.js → chunk-QN33PNHL-BboKw3W6.js} +1 -1
- package/dist/assets/{chunk-QXUST7PY-CbBaWlhv.js → chunk-QXUST7PY-C4Ihfbmy.js} +1 -1
- package/dist/assets/{chunk-S3R3BYOJ-CM-pQ0EF.js → chunk-S3R3BYOJ-D1UiABQX.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-Bs5ERkTF.js → chunk-TZMSLE5B-BjrxQwUX.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-BHD5dOKT.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-VYd80hrd.js +1 -0
- package/dist/assets/{code-block-37QAKDTI-CT7W9knZ.js → code-block-37QAKDTI-FUPT3-7o.js} +1 -1
- package/dist/assets/{column-preview-Bz3KIcIX.js → column-preview-BEosUUWh.js} +1 -1
- package/dist/assets/{command-PbcrObnK.js → command-BpjkI15h.js} +1 -1
- package/dist/assets/{command-palette-D8q355Sm.js → command-palette-BymLo8Sb.js} +1 -1
- package/dist/assets/{common-DRWuidzm.js → common-RVtJOXao.js} +1 -1
- package/dist/assets/{copy-icon-B9w72gBC.js → copy-icon-C9v8EtBA.js} +1 -1
- package/dist/assets/{dagre-6UL2VRFP-UK8bracd.js → dagre-6UL2VRFP-CX3NGWnu.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-2vr_zUfM.js → data-grid-overlay-editor-BTyw6887.js} +1 -1
- package/dist/assets/{datasource-Dkywo3Kg.js → datasource-Bl1__6xJ.js} +1 -1
- package/dist/assets/{dependency-graph-panel-ZnsWxFY3.js → dependency-graph-panel-C33q1RVn.js} +1 -1
- package/dist/assets/{diagram-PSM6KHXK-7QiPU-26.js → diagram-PSM6KHXK-C0Sfgs1J.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-BbZsWUC4.js → diagram-QEK2KX5R-DYSkW6Ju.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-SZ-twU4B.js → diagram-S2PKOQOG-CfHqQVo3.js} +1 -1
- package/dist/assets/{dist-DY1C8dgM.js → dist-h1RhtzUB.js} +1 -1
- package/dist/assets/{documentation-panel-CZJavCAM.js → documentation-panel-BWViNAJ6.js} +1 -1
- package/dist/assets/{download-CmdFQXRz.js → download-s-BdZdTz.js} +1 -1
- package/dist/assets/{edit-page-e6xxDbUd.js → edit-page-nMTiqKOs.js} +3 -3
- package/dist/assets/{erDiagram-Q2GNP2WA-BSmVh3Kt.js → erDiagram-Q2GNP2WA-BfRyUS6D.js} +1 -1
- package/dist/assets/{error-panel-BMcWP1VH.js → error-panel-BhPek3dt.js} +1 -1
- package/dist/assets/{es-CerBf9Z6.js → es-GXAIFcot.js} +1 -1
- package/dist/assets/{esm-C-53tlK5.js → esm-BK6tLEHQ.js} +1 -1
- package/dist/assets/{file-explorer-panel-th-ny103.js → file-explorer-panel-BGF99P_O.js} +1 -1
- package/dist/assets/{flowDiagram-NV44I4VS-2nYUYKvI.js → flowDiagram-NV44I4VS-DKkZCUwG.js} +1 -1
- package/dist/assets/{form-94alAnRh.js → form-CNEyFLKK.js} +1 -1
- package/dist/assets/{formats-CobRswjh.js → formats-DGZwRUPy.js} +1 -1
- package/dist/assets/gallery-page-1AmSypJ6.js +1 -0
- package/dist/assets/{ganttDiagram-JELNMOA3-B77PnMPw.js → ganttDiagram-JELNMOA3-J8yLTqxn.js} +1 -1
- package/dist/assets/{gitGraphDiagram-NY62KEGX-B-3aRelz.js → gitGraphDiagram-NY62KEGX-DXw3a-uS.js} +1 -1
- package/dist/assets/{glide-data-editor-B5UMCoFz.js → glide-data-editor-Cw8eE9Xn.js} +4 -4
- package/dist/assets/{home-page-Bgzw3IP3.js → home-page-Cs46vLcH.js} +1 -1
- package/dist/assets/{hooks-B_N-kbrq.js → hooks-C13qkLoi.js} +1 -1
- package/dist/assets/index-3CaNzO41.css +2 -0
- package/dist/assets/{index-U7La6ZBB.js → index-CxrD-UyN.js} +22 -22
- package/dist/assets/{infoDiagram-WHAUD3N6-_vys04Gc.js → infoDiagram-WHAUD3N6-32du45zK.js} +1 -1
- package/dist/assets/{journeyDiagram-XKPGCS4Q-CkD6eopP.js → journeyDiagram-XKPGCS4Q-Bmx7dA25.js} +1 -1
- package/dist/assets/{kanban-definition-3W4ZIXB7-kX5aL9Ug.js → kanban-definition-3W4ZIXB7-DJzhLwsl.js} +1 -1
- package/dist/assets/katex-axIMlGRc.js +1 -0
- package/dist/assets/{label-C9wP7Kp2.js → label-C--1sWU6.js} +1 -1
- package/dist/assets/{layout-D7NLGhPa.js → layout-ZtHfLqYp.js} +3 -3
- package/dist/assets/{linear-BxhToEEF.js → linear-DWpCiijk.js} +1 -1
- package/dist/assets/{logs-panel-y2i-7VQF.js → logs-panel-z3Z9lCbV.js} +1 -1
- package/dist/assets/{markdown-renderer-D8AmLSIR.js → markdown-renderer-Md8pHWxP.js} +1 -1
- package/dist/assets/mermaid-4DMBBIKO-Dn0v3H8Z.js +1 -0
- package/dist/assets/{mermaid-Caj4ROsO.js → mermaid-dAaJQU1M.js} +3 -3
- package/dist/assets/{mhchem-CJmb5HsA.js → mhchem-2XRJK9de.js} +1 -1
- package/dist/assets/{mindmap-definition-VGOIOE7T-BJ9zWUqW.js → mindmap-definition-VGOIOE7T-whTFv8Zv.js} +1 -1
- package/dist/assets/{name-cell-input-BthamWJY.js → name-cell-input-BGxKE7pD.js} +1 -1
- package/dist/assets/{number-overlay-editor-DIy8e1ST.js → number-overlay-editor-65UcMR52.js} +1 -1
- package/dist/assets/{packages-panel-DsF1uf9X.js → packages-panel-BheI3Whw.js} +1 -1
- package/dist/assets/{panels-aWY9-L83.js → panels-5zIgiTjO.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-Mf2FMnt9.js → pieDiagram-ADFJNKIX-4n07I4VV.js} +1 -1
- package/dist/assets/{precisionRound-CU2C3Vxx.js → precisionRound-C3fmBb6j.js} +1 -1
- package/dist/assets/{quadrantDiagram-AYHSOK5B-B04U71uV.js → quadrantDiagram-AYHSOK5B-CNm24EC2.js} +1 -1
- package/dist/assets/{react-plotly-D4UaXGJL.js → react-plotly-OyYr93y7.js} +1 -1
- package/dist/assets/{react-vega-CqegDZRQ.js → react-vega-BEiHA2e9.js} +1 -1
- package/dist/assets/react-vega-BrNLU7si.js +1 -0
- package/dist/assets/{readonly-python-code-C_8a4fwz.js → readonly-python-code-q8H4JtWe.js} +1 -1
- package/dist/assets/{renderShortcut-B1jzzLJw.js → renderShortcut-Xr6z-RjZ.js} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ-oJlPs172.js → requirementDiagram-UZGBJVZJ-B7BwuJGh.js} +1 -1
- package/dist/assets/{run-page-DQU-eaKQ.js → run-page-BtgxUxdD.js} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-aplEbaHE.js → sankeyDiagram-TZEHDZUN-C8KpmdhC.js} +1 -1
- package/dist/assets/{scratchpad-panel-N4QLTtHb.js → scratchpad-panel-BZn63vOx.js} +1 -1
- package/dist/assets/{secrets-panel-vKKBtc8G.js → secrets-panel-CEMSgQv5.js} +1 -1
- package/dist/assets/{sequenceDiagram-WL72ISMW-WAUwGkkd.js → sequenceDiagram-WL72ISMW-D0_AcPzd.js} +1 -1
- package/dist/assets/{session-panel-Cof-5_26.js → session-panel-iRBC1bk4.js} +1 -1
- package/dist/assets/{slides-component-CeMnlG8H.js → slides-component-C0UAH9QZ.js} +1 -1
- package/dist/assets/{snippets-panel-WBcYsSsb.js → snippets-panel-paMvhw49.js} +1 -1
- package/dist/assets/{stateDiagram-FKZM4ZOC-DUDhr_Gg.js → stateDiagram-FKZM4ZOC-Dz_iVJd6.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-CupainMB.js +1 -0
- package/dist/assets/{terminal-CF-esPMT.js → terminal-BLSSaFMR.js} +1 -1
- package/dist/assets/{textarea-8F9GOEGf.js → textarea-B9TY02t9.js} +1 -1
- package/dist/assets/{time-EL4bnqqQ.js → time-CSCsAxXS.js} +1 -1
- package/dist/assets/{timeline-definition-IT6M3QCI-D93LYpWp.js → timeline-definition-IT6M3QCI-DPXEeoSm.js} +1 -1
- package/dist/assets/{tooltip-DxKBXCGp.js → tooltip-DqsDDLgU.js} +1 -1
- package/dist/assets/{tracing-DGYwY__a.js → tracing-DVD0lR_-.js} +1 -1
- package/dist/assets/{tracing-panel-BHnlOWW9.js → tracing-panel-D0p98UnG.js} +2 -2
- package/dist/assets/{tree-B8r7cwRm.js → tree-Hg81oJmp.js} +1 -1
- package/dist/assets/{useAddCell-Cx99GRHQ.js → useAddCell-C0mjPsjt.js} +1 -1
- package/dist/assets/{useCellActionButton-VRGP_KkG.js → useCellActionButton-DR2cYGwm.js} +1 -1
- package/dist/assets/{useDeleteCell-DHPNhAtW.js → useDeleteCell-DyGTLzfg.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-UoJrnugs.js → useDependencyPanelTab-Dd7aOXV0.js} +1 -1
- package/dist/assets/{useInstallPackage-xrG_Tm9T.js → useInstallPackage-Co79H1lQ.js} +1 -1
- package/dist/assets/{useNotebookActions-BEKXbrFJ.js → useNotebookActions-DMf9_Eai.js} +1 -1
- package/dist/assets/{useSplitCell-h8RpNtuv.js → useSplitCell-dutfMkv3.js} +1 -1
- package/dist/assets/{utilities.esm-AIy-_q0N.js → utilities.esm-BREvtThv.js} +1 -1
- package/dist/assets/{vega-component-D4ZTpyiq.js → vega-component-7jd4fFCJ.js} +1 -1
- package/dist/assets/{vega-loader.browser-DXARUlxo.js → vega-loader.browser-BegSZk0G.js} +1 -1
- package/dist/assets/{write-secret-modal-BodBOJkR.js → write-secret-modal-DO-EOoNO.js} +1 -1
- package/dist/assets/{xychartDiagram-PRI3JC2R-C8jV7uCC.js → xychartDiagram-PRI3JC2R-DINfGlOV.js} +1 -1
- package/dist/index.html +56 -56
- package/package.json +1 -1
- package/src/components/pages/gallery-page.tsx +37 -6
- package/src/core/ai/context/providers/file.ts +1 -1
- package/src/core/static/__tests__/files.test.ts +195 -1
- package/src/core/static/files.ts +39 -9
- package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +7 -1
- package/src/utils/__tests__/blob.test.ts +3 -3
- package/src/utils/blob.ts +14 -27
- package/dist/assets/blob-t6qcPM7K.js +0 -1
- package/dist/assets/channel-CUmF6tDU.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-DLI68D-F.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-yfw4NTdf.js +0 -1
- package/dist/assets/gallery-page-Yq7Go5FK.js +0 -1
- package/dist/assets/index-BTVKRPtt.css +0 -2
- package/dist/assets/katex-DF982Ty5.js +0 -1
- package/dist/assets/mermaid-4DMBBIKO-DQz_QvBC.js +0 -1
- package/dist/assets/react-vega-CP7NqbRQ.js +0 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-yH9Rugj-.js +0 -1
- /package/dist/assets/{alert-BOoN6gJ1.js → alert-Cx8eFRUM.js} +0 -0
- /package/dist/assets/{cell-link-BoOn0OpK.js → cell-link-DfoJF6Bq.js} +0 -0
- /package/dist/assets/{copy-DHrHayPa.js → copy-BaRrAFL-.js} +0 -0
- /package/dist/assets/{defaultLocale-BLne0bXb.js → defaultLocale-B6z1Qyqt.js} +0 -0
- /package/dist/assets/{defaultLocale-JieDVWC_.js → defaultLocale-YteS-k_t.js} +0 -0
- /package/dist/assets/{dist-CDXJRSCj.js → dist-BMEHQAhk.js} +0 -0
- /package/dist/assets/{emotion-is-prop-valid.esm-C59xfSYt.js → emotion-is-prop-valid.esm-Dangy3Bv.js} +0 -0
- /package/dist/assets/{error-banner-Dlrzo_Ay.js → error-banner-w4pz2qUB.js} +0 -0
- /package/dist/assets/{extends-BiFDv3jB.js → extends-Dqvpuc10.js} +0 -0
- /package/dist/assets/{focus-BEf2RhRf.js → focus-RQ0afibT.js} +0 -0
- /package/dist/assets/{html-to-image-DrmKVKna.js → html-to-image-BIY1TtH0.js} +0 -0
- /package/dist/assets/{katex-CDLTCvjQ.js → katex-CbllUrnh.js} +0 -0
- /package/dist/assets/{kbd-Cm6Ba9qg.js → kbd-k3Sn_RwW.js} +0 -0
- /package/dist/assets/{links-7AQBmdyV.js → links-fh_IXIKE.js} +0 -0
- /package/dist/assets/{multi-map-t2yhdp8D.js → multi-map-A4XNra08.js} +0 -0
- /package/dist/assets/{objectWithoutPropertiesLoose-DfWeGRFv.js → objectWithoutPropertiesLoose-DoKw85w0.js} +0 -0
- /package/dist/assets/{ordinal-C93T4L8H.js → ordinal-DAqJmfoU.js} +0 -0
- /package/dist/assets/{process-output-OTqBNunj.js → process-output-C77tRi36.js} +0 -0
- /package/dist/assets/{prop-types-DaaA-ptl.js → prop-types-DVDiRdwc.js} +0 -0
- /package/dist/assets/{purify.es-DZrAQFIu.js → purify.es-B-nzWya6.js} +0 -0
- /package/dist/assets/{range-1DwpgXvM.js → range-7fnH_zLA.js} +0 -0
- /package/dist/assets/{table-DScsXgJW.js → table-BOsFCeLh.js} +0 -0
- /package/dist/assets/{useAsyncData-BMGLSTg8.js → useAsyncData-CgmD3hjw.js} +0 -0
- /package/dist/assets/{useDeepCompareMemoize-ChxLMT9E.js → useDeepCompareMemoize-CFtQU7An.js} +0 -0
- /package/dist/assets/{useIframeCapabilities-B_pQb20b.js → useIframeCapabilities-CC8VH6kZ.js} +0 -0
- /package/dist/assets/{useRunCells-BOowME8Z.js → useRunCells-BJznEpzj.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var Te=Object.defineProperty;var Be=(t,e,i)=>e in t?Te(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var R=(t,e,i)=>Be(t,typeof e!="symbol"?e+"":e,i);import{s as ge}from"./chunk-LvLJmgfZ.js";import{i as qe,l as ce,n as A,p as ye,u as ae}from"./useEvent-BhXAndur.js";import{t as $e}from"./react-Bj1aDYRI.js";import{Gr as Ve,Jr as Le,mn as Ue,qn as Ge,w as Ke}from"./cells-DbD2lYze.js";import"./react-dom-CSu739Rf.js";import{t as ie}from"./compiler-runtime-B3qBwwSJ.js";import"./tooltip-DxKBXCGp.js";import{d as Je,f as Ye}from"./hotkeys-BHHWjLlp.js";import{t as Ze}from"./invariant-CAG_dYON.js";import{p as Qe,u as ve}from"./utils-YqBXNpsM.js";import{S as re}from"./config-D2-Bw6QC.js";import{t as Xe}from"./jsx-runtime-ZmTK25f3.js";import{n as et,t as I}from"./button-CZ3Cs4qb.js";import{t as he}from"./cn-BKtXLv3a.js";import{St as tt,at}from"./dist-DBwNzi3C.js";import{a as it,c as rt,i as nt,o as st,s as lt}from"./JsonOutput-DsO4felE.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-CS26E0hA.js";import{n as ot,r as me}from"./requests-B4FYHTZl.js";import{t as G}from"./createLucideIcon-BCdY6lG5.js";import{t as dt}from"./arrow-left-VDC1u5rq.js";import{n as ct,t as ht}from"./LazyAnyLanguageCodeMirror-CQP8KZWO.js";import{r as mt}from"./x-ZP5cObgf.js";import{i as pt,r as be}from"./download-CmdFQXRz.js";import{t as ft}from"./chevron-right--18M_6o9.js";import{f as pe}from"./maps-D2_Mq1pZ.js";import{n as xt}from"./markdown-renderer-D8AmLSIR.js";import{a as S,c as K,p as ut,r as jt,t as gt}from"./dropdown-menu-BUgFWmX1.js";import{t as we}from"./copy-D-8y6iMN.js";import{t as ke}from"./download-Dg7clfkc.js";import{t as yt}from"./ellipsis-vertical-J1F7_WS9.js";import{t as vt}from"./eye-off-AK_9uodG.js";import{n as Fe,r as bt,t as wt}from"./types-7nV0hgXj.js";import{t as Ce}from"./file-plus-corner-CvAy4H5W.js";import{t as kt}from"./spinner-DA8-7wQv.js";import{t as Ft}from"./refresh-ccw-DN_xCV6A.js";import{t as Ct}from"./refresh-cw-Dx8TEWFP.js";import{t as Nt}from"./save-DZodxFnE.js";import{t as St}from"./trash-2-B8SQYdQq.js";import{t as Dt}from"./triangle-alert-U93NZYDl.js";import{i as Pt,n as _t,t as Ot}from"./es-CerBf9Z6.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import{t as W}from"./use-toast-T0_cQDma.js";import{t as fe}from"./paths-Dfii2bN8.js";import"./session-fBtIbMpB.js";import{r as zt}from"./useTheme-CTORu22_.js";import"./Combination-izwufzWe.js";import{t as M}from"./tooltip-C_WgOOcZ.js";import"./dates-CT5PUuFo.js";import{o as Mt}from"./alert-dialog-Ctz24SMn.js";import"./popover-B-131r4d.js";import{n as Ne}from"./ImperativeModal-DZr52ffu.js";import{r as Rt}from"./errors-CPlNr33a.js";import"./vega-loader.browser-DXARUlxo.js";import"./defaultLocale-JieDVWC_.js";import"./defaultLocale-BLne0bXb.js";import{t as ne}from"./copy-DHrHayPa.js";import"./purify.es-DZrAQFIu.js";import{a as At,i as Wt,n as xe,r as It,t as Et}from"./tree-B8r7cwRm.js";import{n as Ht,t as Tt}from"./alert-BOoN6gJ1.js";import{n as Se}from"./error-banner-Dlrzo_Ay.js";import{n as De}from"./useAsyncData-BMGLSTg8.js";import"./chunk-5FQGJX7Z-CwvgJCug.js";import"./katex-CDLTCvjQ.js";import"./html-to-image-DrmKVKna.js";import{o as Bt}from"./focus-BEf2RhRf.js";import{a as qt}from"./renderShortcut-B1jzzLJw.js";import{n as $t}from"./blob-t6qcPM7K.js";import{t as Vt}from"./bundle.esm-CBAPjfrh.js";import{t as Lt}from"./links-DgZx-VxW.js";import{t as Ut}from"./icon-32x32-XIbzzdoo.js";import{t as J}from"./Inputs-CbenuziM.js";var Gt=G("copy-minus",[["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),Pe=G("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),_e=G("list-tree",[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]]),Kt=G("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),Jt=G("square-play",[["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}]]),Yt=G("view",[["path",{d:"M21 17v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2",key:"mrq65r"}],["path",{d:"M21 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2",key:"be3xqs"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0",key:"11ak4c"}]]),Oe=ie(),F=ge($e(),1),a=ge(Xe(),1),ze=(0,F.createContext)(null);function Zt(){return(0,F.useContext)(ze)??void 0}var Qt=t=>{let e=(0,Oe.c)(3),{children:i}=t,n=Wt(),s;return e[0]!==i||e[1]!==n?(s=(0,a.jsx)(ze.Provider,{value:n,children:i}),e[0]=i,e[1]=n,e[2]=s):s=e[2],s};const Xt=t=>{let e=(0,Oe.c)(5),{children:i}=t,[n,s]=(0,F.useState)(null),r;e[0]!==i||e[1]!==n?(r=n&&(0,a.jsx)(At,{backend:It,options:{rootElement:n},children:(0,a.jsx)(Qt,{children:i})}),e[0]=i,e[1]=n,e[2]=r):r=e[2];let d;return e[3]===r?d=e[4]:(d=(0,a.jsx)("div",{ref:s,className:"contents",children:r}),e[3]=r,e[4]=d),d};var ue=new Map;const ea=({file:t,onOpenNotebook:e})=>{let{theme:i}=zt(),{sendFileDetails:n,sendUpdateFile:s}=me(),r=ae(Qe),d=ae(ve),f=ae(Ve),[h,m]=(0,F.useState)(""),{data:l,isPending:u,error:v,setData:g,refetch:c}=De(async()=>{let o=await n({path:t.path}),j=o.contents||"";return m(ue.get(t.path)||j),o},[t.path]),y=async()=>{h!==(l==null?void 0:l.contents)&&await s({path:t.path,contents:h}).then(o=>{o.success&&(g(j=>({...j,contents:h})),m(h))})},C=(0,F.useRef)(h);if(C.current=h,(0,F.useEffect)(()=>()=>{if(!(l!=null&&l.contents))return;let o=C.current;o===l.contents?ue.delete(t.path):ue.set(t.path,o)},[t.path,l==null?void 0:l.contents]),v)return(0,a.jsx)(Se,{error:v});if(u||!l)return null;let x=l.mimeType||"text/plain",D=x in je,k=f&&l.file.isMarimoFile&&(t.path===f||t.path.endsWith(`/${f}`));if(!l.contents&&!D)return(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 p-6",children:[(0,a.jsx)("div",{className:"font-bold text-muted-foreground",children:"Name"}),(0,a.jsx)("div",{children:l.file.name}),(0,a.jsx)("div",{className:"font-bold text-muted-foreground",children:"Type"}),(0,a.jsx)("div",{children:x})]});let b=(0,a.jsxs)("div",{className:"text-xs text-muted-foreground p-1 flex justify-end gap-2 border-b",children:[(0,a.jsx)(M,{content:"Refresh",children:(0,a.jsx)(J,{size:"small",onClick:c,children:(0,a.jsx)(Ct,{})})}),t.isMarimoFile&&!re()&&(0,a.jsx)(M,{content:"Open notebook",children:(0,a.jsx)(J,{size:"small",onClick:o=>e(o),children:(0,a.jsx)(pe,{})})}),!d&&(0,a.jsx)(M,{content:"Download",children:(0,a.jsx)(J,{size:"small",onClick:()=>{if(Me(x)){pt(xt(l.contents,x),l.file.name);return}be(new Blob([l.contents||h],{type:x}),l.file.name)},children:(0,a.jsx)(ke,{})})}),!Me(x)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(M,{content:"Copy contents to clipboard",children:(0,a.jsx)(J,{size:"small",onClick:async()=>{await ne(h)},children:(0,a.jsx)(we,{})})}),(0,a.jsx)(M,{content:qt("global.save"),children:(0,a.jsx)(J,{size:"small",color:h===l.contents?void 0:"green",onClick:y,disabled:h===l.contents,children:(0,a.jsx)(Nt,{})})})]})]});return x.startsWith("image/")?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(st,{base64:l.contents,mime:x})})]}):x==="text/csv"&&l.contents?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(it,{contents:l.contents})})]}):x.startsWith("audio/")?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(nt,{base64:l.contents,mime:x})})]}):x.startsWith("video/")?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(rt,{base64:l.contents,mime:x})})]}):x.startsWith("application/pdf")?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(lt,{base64:l.contents,mime:x})})]}):(0,a.jsxs)(a.Fragment,{children:[b,k&&(0,a.jsxs)(Tt,{variant:"warning",className:"rounded-none",children:[(0,a.jsx)(Dt,{className:"h-4 w-4"}),(0,a.jsx)(Ht,{children:"Editing the notebook file directly while running in marimo's editor may cause unintended changes. Please use with caution."})]}),(0,a.jsx)("div",{className:"flex-1 overflow-auto",children:(0,a.jsx)(F.Suspense,{children:(0,a.jsx)(ht,{theme:i==="dark"?"dark":"light",language:je[x]||je.default,className:"border-b",extensions:[at.lineWrapping,tt.of([{key:r.getHotkey("global.save").key,stopPropagation:!0,run:()=>h===l.contents?!1:(y(),!0)}])],value:h,onChange:m})})})]})};var Me=t=>t?t.startsWith("image/")||t.startsWith("audio/")||t.startsWith("video/")||t.startsWith("application/pdf"):!1,je={"application/javascript":"javascript","text/markdown":"markdown","text/html":"html","text/css":"css","text/x-python":"python","application/json":"json","application/xml":"xml","text/x-yaml":"yaml","text/csv":"markdown","text/plain":"markdown",default:"markdown"},ta=class{constructor(t){R(this,"delegate",new xe([]));R(this,"rootPath","");R(this,"onChange",Ye.NOOP);R(this,"path",new fe("/"));R(this,"initialize",async t=>{if(this.onChange=t,this.delegate.data.length===0)try{let e=await this.callbacks.listFiles({path:this.rootPath});this.delegate=new xe(e.files),this.rootPath=e.root,this.path=fe.guessDeliminator(e.root)}catch(e){W({title:"Failed",description:Rt(e)})}this.onChange(this.delegate.data)});R(this,"refreshAll",async t=>{let e=[this.rootPath,...t.map(n=>{var s;return(s=this.delegate.find(n))==null?void 0:s.data.path})].filter(Boolean),i=await Promise.all(e.map(n=>this.callbacks.listFiles({path:n}).catch(()=>({files:[]}))));for(let[n,s]of e.entries()){let r=i[n];s===this.rootPath?this.delegate=new xe(r.files):this.delegate.update({id:s,changes:{children:r.files}})}this.onChange(this.delegate.data)});R(this,"relativeFromRoot",t=>{let e=this.rootPath.endsWith(this.path.deliminator)?this.rootPath:`${this.rootPath}${this.path.deliminator}`;return t.startsWith(e)?t.slice(e.length):t});R(this,"handleResponse",t=>t.success?t:(W({title:"Failed",description:t.message}),null));this.callbacks=t}async expand(t){let e=this.delegate.find(t);if(!e||!e.data.isDirectory)return!1;if(e.children&&e.children.length>0)return!0;let i=await this.callbacks.listFiles({path:e.data.path});return this.delegate.update({id:t,changes:{children:i.files}}),this.onChange(this.delegate.data),!0}async rename(t,e){let i=this.delegate.find(t);if(!i)return;let n=i.data.path,s=this.path.join(this.path.dirname(n),e);await this.callbacks.renameFileOrFolder({path:n,newPath:s}).then(this.handleResponse),this.delegate.update({id:t,changes:{name:e,path:s}}),this.onChange(this.delegate.data),await this.refreshAll([s])}async move(t,e){var n;let i=e?((n=this.delegate.find(e))==null?void 0:n.data.path)??e:this.rootPath;await Promise.all(t.map(s=>{this.delegate.move({id:s,parentId:e,index:0});let r=this.delegate.find(s);if(!r)return Promise.resolve();let d=this.path.join(i,this.path.basename(r.data.path));return this.delegate.update({id:s,changes:{path:d}}),this.callbacks.renameFileOrFolder({path:r.data.path,newPath:d}).then(this.handleResponse)})),this.onChange(this.delegate.data),await this.refreshAll([i])}async createFile(t,e){var s;let i=e?((s=this.delegate.find(e))==null?void 0:s.data.path)??e:this.rootPath,n=await this.callbacks.createFileOrFolder({path:i,type:"file",name:t}).then(this.handleResponse);n!=null&&n.info&&(this.delegate.create({parentId:e,index:0,data:n.info}),this.onChange(this.delegate.data),await this.refreshAll([i]))}async createFolder(t,e){var s;let i=e?((s=this.delegate.find(e))==null?void 0:s.data.path)??e:this.rootPath,n=await this.callbacks.createFileOrFolder({path:i,type:"directory",name:t}).then(this.handleResponse);n!=null&&n.info&&(this.delegate.create({parentId:e,index:0,data:n.info}),this.onChange(this.delegate.data),await this.refreshAll([i]))}async delete(t){let e=this.delegate.find(t);e&&(await this.callbacks.deleteFileOrFolder({path:e.data.path}).then(this.handleResponse),this.delegate.drop({id:t}),this.onChange(this.delegate.data))}};const Re=ye(t=>{let e=t(ot);return Ze(e,"no requestClientAtom set"),new ta({listFiles:e.sendListFiles,createFileOrFolder:e.sendCreateFileOrFolder,deleteFileOrFolder:e.sendDeleteFileOrFolder,renameFileOrFolder:e.sendRenameFileOrFolder})}),aa=ye({});async function ia(){await qe.get(Re).refreshAll([])}var ra=ie(),na=1024*1024*100;function Ae(t){let e=(0,ra.c)(7),i;e[0]===t?i=e[1]:(i=t===void 0?{}:t,e[0]=t,e[1]=i);let n=i,{sendCreateFileOrFolder:s}=me(),r;e[2]===s?r=e[3]:(r=async f=>{for(let h of f){let m=ha(ca(h)),l="";m&&(l=fe.guessDeliminator(m).dirname(m));let u=(await $t(h)).split(",")[1];await s({path:l,type:"file",name:h.name,contents:u})}await ia()},e[2]=s,e[3]=r);let d;return e[4]!==n||e[5]!==r?(d={multiple:!0,maxSize:na,onError:da,onDropRejected:sa,onDrop:r,...n},e[4]=n,e[5]=r,e[6]=d):d=e[6],Ot(d)}function sa(t){W({title:"File upload failed",description:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:t.map(la)}),variant:"danger"})}function la(t){return(0,a.jsxs)("div",{children:[t.file.name," (",t.errors.map(oa).join(", "),")"]},t.file.name)}function oa(t){return t.message}function da(t){Je.error(t),W({title:"File upload failed",description:t.message,variant:"danger"})}function ca(t){if(t.webkitRelativePath)return t.webkitRelativePath;if("path"in t&&typeof t.path=="string")return t.path;if("relativePath"in t&&typeof t.relativePath=="string")return t.relativePath}function ha(t){if(t)return t.replace(/^\/+/,"")}var Y=ie(),ma=Le("marimo:showHiddenFiles",!0,Ue,{getOnInit:!0}),We=F.createContext(null);const pa=t=>{let e=(0,Y.c)(68),{height:i}=t,n=(0,F.useRef)(null),s=Zt(),[r]=ce(Re),d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[0]=d):d=e[0];let[f,h]=(0,F.useState)(d),[m,l]=(0,F.useState)(null),[u,v]=ce(ma),{openPrompt:g}=Ne(),[c,y]=ce(aa),C;e[1]===r?C=e[2]:(C=()=>r.initialize(h),e[1]=r,e[2]=C);let x;e[3]===Symbol.for("react.memo_cache_sentinel")?(x=[],e[3]=x):x=e[3];let{isPending:D,error:k}=De(C,x),b;e[4]!==c||e[5]!==r?(b=()=>{r.refreshAll(Object.keys(c).filter(p=>c[p]))},e[4]=c,e[5]=r,e[6]=b):b=e[6];let o=A(b),j;e[7]!==v||e[8]!==u?(j=()=>{v(!u)},e[7]=v,e[8]=u,e[9]=j):j=e[9];let P=A(j),_;e[10]!==g||e[11]!==r?(_=async()=>{g({title:"Folder name",onConfirm:async p=>{r.createFolder(p,null)}})},e[10]=g,e[11]=r,e[12]=_):_=e[12];let N=A(_),O;e[13]!==g||e[14]!==r?(O=async()=>{g({title:"File name",onConfirm:async p=>{r.createFile(p,null)}})},e[13]=g,e[14]=r,e[15]=O):O=e[15];let se=A(O),Z;e[16]===y?Z=e[17]:(Z=()=>{var p;(p=n.current)==null||p.closeAll(),y({})},e[16]=y,e[17]=Z);let le=A(Z),Q;e[18]!==f||e[19]!==u?(Q=Ee(f,u),e[18]=f,e[19]=u,e[20]=Q):Q=e[20];let oe=Q;if(D){let p;return e[21]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)(kt,{size:"medium",centered:!0}),e[21]=p):p=e[21],p}if(k){let p;return e[22]===k?p=e[23]:(p=(0,a.jsx)(Se,{error:k}),e[22]=k,e[23]=p),p}if(m){let p;e[24]===Symbol.for("react.memo_cache_sentinel")?(p=()=>l(null),e[24]=p):p=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=(0,a.jsx)(I,{onClick:p,"data-testid":"file-explorer-back-button",variant:"text",size:"xs",className:"mb-0",children:(0,a.jsx)(dt,{size:16})}),e[25]=w):w=e[25];let z;e[26]===m.name?z=e[27]:(z=(0,a.jsxs)("div",{className:"flex items-center pl-1 pr-3 shrink-0 border-b justify-between",children:[w,(0,a.jsx)("span",{className:"font-bold",children:m.name})]}),e[26]=m.name,e[27]=z);let L;e[28]!==m.path||e[29]!==r?(L=He=>Ie(He,r.relativeFromRoot(m.path)),e[28]=m.path,e[29]=r,e[30]=L):L=e[30];let U;e[31]!==m||e[32]!==L?(U=(0,a.jsx)(F.Suspense,{children:(0,a.jsx)(ea,{onOpenNotebook:L,file:m})}),e[31]=m,e[32]=L,e[33]=U):U=e[33];let te;return e[34]!==z||e[35]!==U?(te=(0,a.jsxs)(a.Fragment,{children:[z,U]}),e[34]=z,e[35]=U,e[36]=te):te=e[36],te}let E;e[37]!==le||e[38]!==se||e[39]!==N||e[40]!==P||e[41]!==o||e[42]!==r?(E=(0,a.jsx)(xa,{onRefresh:o,onHidden:P,onCreateFile:se,onCreateFolder:N,onCollapseAll:le,tree:r}),e[37]=le,e[38]=se,e[39]=N,e[40]=P,e[41]=o,e[42]=r,e[43]=E):E=e[43];let de=i-33,H,T,B;e[44]===r?(H=e[45],T=e[46],B=e[47]):(H=async p=>{let{ids:w}=p;for(let z of w)await r.delete(z)},T=async p=>{let{id:w,name:z}=p;await r.rename(w,z)},B=async p=>{let{dragIds:w,parentId:z}=p;await r.move(w,z)},e[44]=r,e[45]=H,e[46]=T,e[47]=B);let X;e[48]===Symbol.for("react.memo_cache_sentinel")?(X=p=>{let w=p[0];w&&(w.data.isDirectory||l(w.data))},e[48]=X):X=e[48];let q;e[49]!==c||e[50]!==y||e[51]!==r?(q=async p=>{if(await r.expand(p)){let w=c[p]??!1;y({...c,[p]:!w})}},e[49]=c,e[50]=y,e[51]=r,e[52]=q):q=e[52];let $;e[53]!==s||e[54]!==c||e[55]!==de||e[56]!==H||e[57]!==T||e[58]!==B||e[59]!==q||e[60]!==oe?($=(0,a.jsx)(Et,{width:"100%",ref:n,height:de,className:"h-full",data:oe,initialOpenState:c,openByDefault:!1,dndManager:s,renderCursor:ba,disableDrop:wa,onDelete:H,onRename:T,onMove:B,onSelect:X,onToggle:q,padding:15,rowHeight:30,indent:fa,overscanCount:1e3,disableMultiSelection:!0,children:ga}),e[53]=s,e[54]=c,e[55]=de,e[56]=H,e[57]=T,e[58]=B,e[59]=q,e[60]=oe,e[61]=$):$=e[61];let V;e[62]!==$||e[63]!==r?(V=(0,a.jsx)(We,{value:r,children:$}),e[62]=$,e[63]=r,e[64]=V):V=e[64];let ee;return e[65]!==E||e[66]!==V?(ee=(0,a.jsxs)(a.Fragment,{children:[E,V]}),e[65]=E,e[66]=V,e[67]=ee):ee=e[67],ee};var fa=15,xa=t=>{let e=(0,Y.c)(34),{onRefresh:i,onHidden:n,onCreateFile:s,onCreateFolder:r,onCollapseAll:d}=t,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={noDrag:!0,noDragEventsBubbling:!0},e[0]=f):f=e[0];let{getRootProps:h,getInputProps:m}=Ae(f),l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(Ce,{size:16}),e[1]=l):l=e[1];let u;e[2]===s?u=e[3]:(u=(0,a.jsx)(M,{content:"Add file",children:(0,a.jsx)(I,{"data-testid":"file-explorer-add-file-button",onClick:s,variant:"text",size:"xs",children:l})}),e[2]=s,e[3]=u);let v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)(Pe,{size:16}),e[4]=v):v=e[4];let g;e[5]===r?g=e[6]:(g=(0,a.jsx)(M,{content:"Add folder",children:(0,a.jsx)(I,{"data-testid":"file-explorer-add-folder-button",onClick:r,variant:"text",size:"xs",children:v})}),e[5]=r,e[6]=g);let c;e[7]===h?c=e[8]:(c=h({}),e[7]=h,e[8]=c);let y,C;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=et({variant:"text",size:"xs"}),C=(0,a.jsx)(Pt,{size:16}),e[9]=y,e[10]=C):(y=e[9],C=e[10]);let x;e[11]===c?x=e[12]:(x=(0,a.jsx)(M,{content:"Upload file",children:(0,a.jsx)("button",{"data-testid":"file-explorer-upload-button",...c,className:y,children:C})}),e[11]=c,e[12]=x);let D;e[13]===m?D=e[14]:(D=m({}),e[13]=m,e[14]=D);let k;e[15]===D?k=e[16]:(k=(0,a.jsx)("input",{...D,type:"file"}),e[15]=D,e[16]=k);let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b=(0,a.jsx)(Ft,{size:16}),e[17]=b):b=e[17];let o;e[18]===i?o=e[19]:(o=(0,a.jsx)(M,{content:"Refresh",children:(0,a.jsx)(I,{"data-testid":"file-explorer-refresh-button",onClick:i,variant:"text",size:"xs",children:b})}),e[18]=i,e[19]=o);let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=(0,a.jsx)(vt,{size:16}),e[20]=j):j=e[20];let P;e[21]===n?P=e[22]:(P=(0,a.jsx)(M,{content:"Toggle hidden files",children:(0,a.jsx)(I,{"data-testid":"file-explorer-hidden-files-button",onClick:n,variant:"text",size:"xs",children:j})}),e[21]=n,e[22]=P);let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=(0,a.jsx)(Gt,{size:16}),e[23]=_):_=e[23];let N;e[24]===d?N=e[25]:(N=(0,a.jsx)(M,{content:"Collapse all folders",children:(0,a.jsx)(I,{"data-testid":"file-explorer-collapse-button",onClick:d,variant:"text",size:"xs",children:_})}),e[24]=d,e[25]=N);let O;return e[26]!==k||e[27]!==o||e[28]!==P||e[29]!==N||e[30]!==u||e[31]!==g||e[32]!==x?(O=(0,a.jsxs)("div",{className:"flex items-center justify-end px-2 shrink-0 border-b",children:[u,g,x,k,o,P,N]}),e[26]=k,e[27]=o,e[28]=P,e[29]=N,e[30]=u,e[31]=g,e[32]=x,e[33]=O):O=e[33],O},ua=t=>{let e=(0,Y.c)(9),{node:i,onOpenMarimoFile:n}=t,s;e[0]===i?s=e[1]:(s=f=>{i.data.isDirectory||(f.stopPropagation(),i.select())},e[0]=i,e[1]=s);let r;e[2]!==i.data.isMarimoFile||e[3]!==n?(r=i.data.isMarimoFile&&!re()&&(0,a.jsxs)("span",{className:"shrink-0 ml-2 text-sm hidden group-hover:inline hover:underline",onClick:n,children:["open ",(0,a.jsx)(pe,{className:"inline ml-1",size:12})]}),e[2]=i.data.isMarimoFile,e[3]=n,e[4]=r):r=e[4];let d;return e[5]!==i.data.name||e[6]!==s||e[7]!==r?(d=(0,a.jsxs)("span",{className:"flex-1 overflow-hidden text-ellipsis",onClick:s,children:[i.data.name,r]}),e[5]=i.data.name,e[6]=s,e[7]=r,e[8]=d):d=e[8],d},ja=t=>{let e=(0,Y.c)(10),{node:i}=t,n=(0,F.useRef)(null),s,r;e[0]===i.data.name?(s=e[1],r=e[2]):(s=()=>{var m,l;(m=n.current)==null||m.focus(),(l=n.current)==null||l.setSelectionRange(0,i.data.name.lastIndexOf("."))},r=[i.data.name],e[0]=i.data.name,e[1]=s,e[2]=r),(0,F.useEffect)(s,r);let d,f;e[3]===i?(d=e[4],f=e[5]):(d=()=>i.reset(),f=m=>{m.key==="Escape"&&i.reset(),m.key==="Enter"&&i.submit(m.currentTarget.value)},e[3]=i,e[4]=d,e[5]=f);let h;return e[6]!==i.data.name||e[7]!==d||e[8]!==f?(h=(0,a.jsx)("input",{ref:n,className:"flex-1 bg-transparent border border-border text-muted-foreground",defaultValue:i.data.name,onClick:ka,onBlur:d,onKeyDown:f}),e[6]=i.data.name,e[7]=d,e[8]=f,e[9]=h):h=e[9],h},ga=({node:t,style:e,dragHandle:i})=>{let{openFile:n,sendCreateFileOrFolder:s,sendFileDetails:r}=me(),d=ae(ve),f=t.data.isDirectory?"directory":bt(t.data.name),h=wt[f],{openConfirm:m,openPrompt:l}=Ne(),{createNewCell:u}=Ke(),v=Bt(),g=o=>{u({code:o,before:!1,cellId:v??"__end__"})},c=(0,F.use)(We),y=async o=>{Ie(o,c?c.relativeFromRoot(t.data.path):t.data.path)},C=async o=>{o.stopPropagation(),o.preventDefault(),m({title:"Delete file",description:`Are you sure you want to delete ${t.data.name}?`,confirmAction:(0,a.jsx)(Mt,{onClick:async()=>{await t.tree.delete(t.id)},"aria-label":"Confirm",children:"Delete"})})},x=A(async()=>{t.open(),l({title:"Folder name",onConfirm:async o=>{c==null||c.createFolder(o,t.id)}})}),D=A(async()=>{t.open(),l({title:"File name",onConfirm:async o=>{c==null||c.createFile(o,t.id)}})}),k=A(async()=>{var _;if(!c||t.data.isDirectory)return;let[o,j]=_t(t.data.name),P=`${o}_copy${j}`;try{let N=await r({path:t.data.path}),O=((_=t.parent)==null?void 0:_.data.path)||"";await s({path:O,type:"file",name:P,contents:N.contents?btoa(N.contents):void 0}),await c.refreshAll([O])}catch{W({title:"Failed to duplicate file",description:"Unable to create a duplicate of the file",variant:"danger"})}}),b=()=>{let o={size:14,strokeWidth:1.5,className:"mr-2"};return(0,a.jsxs)(jt,{align:"end",className:"print:hidden w-[220px]",onClick:j=>j.stopPropagation(),onCloseAutoFocus:j=>j.preventDefault(),children:[!t.data.isDirectory&&(0,a.jsxs)(S,{onSelect:()=>t.select(),children:[(0,a.jsx)(Yt,{...o}),"Open file"]}),!t.data.isDirectory&&!re()&&(0,a.jsxs)(S,{onSelect:()=>{n({path:t.data.path})},children:[(0,a.jsx)(pe,{...o}),"Open file in external editor"]}),t.data.isDirectory&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(S,{onSelect:()=>D(),children:[(0,a.jsx)(Ce,{...o}),"Create file"]}),(0,a.jsxs)(S,{onSelect:()=>x(),children:[(0,a.jsx)(Pe,{...o}),"Create folder"]}),(0,a.jsx)(K,{})]}),(0,a.jsxs)(S,{onSelect:()=>t.edit(),children:[(0,a.jsx)(Kt,{...o}),"Rename"]}),!t.data.isDirectory&&(0,a.jsxs)(S,{onSelect:k,children:[(0,a.jsx)(we,{...o}),"Duplicate"]}),(0,a.jsxs)(S,{onSelect:async()=>{await ne(t.data.path),W({title:"Copied to clipboard"})},children:[(0,a.jsx)(_e,{...o}),"Copy path"]}),c&&(0,a.jsxs)(S,{onSelect:async()=>{await ne(c.relativeFromRoot(t.data.path)),W({title:"Copied to clipboard"})},children:[(0,a.jsx)(_e,{...o}),"Copy relative path"]}),(0,a.jsx)(K,{}),(0,a.jsxs)(S,{onSelect:()=>{let{path:j}=t.data;g(Fe[f](j))},children:[(0,a.jsx)(ct,{...o}),"Insert snippet for reading file"]}),(0,a.jsxs)(S,{onSelect:async()=>{W({title:"Copied to clipboard",description:"Code to open the file has been copied to your clipboard. You can also drag and drop this file into the editor"});let{path:j}=t.data;await ne(Fe[f](j))},children:[(0,a.jsx)(Ge,{...o}),"Copy snippet for reading file"]}),t.data.isMarimoFile&&!re()&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(K,{}),(0,a.jsxs)(S,{onSelect:y,children:[(0,a.jsx)(Jt,{...o}),"Open notebook"]})]}),(0,a.jsx)(K,{}),!t.data.isDirectory&&!d&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(S,{onSelect:async()=>{let j=(await r({path:t.data.path})).contents||"";be(new Blob([j]),t.data.name)},children:[(0,a.jsx)(ke,{...o}),"Download"]}),(0,a.jsx)(K,{})]}),(0,a.jsxs)(S,{onSelect:C,variant:"danger",children:[(0,a.jsx)(St,{...o}),"Delete"]})]})};return(0,a.jsxs)("div",{style:e,ref:i,className:he("flex items-center cursor-pointer ml-1 text-muted-foreground whitespace-nowrap group"),draggable:!0,onClick:o=>{o.stopPropagation(),t.data.isDirectory&&t.toggle()},children:[(0,a.jsx)(ya,{node:t}),(0,a.jsxs)("span",{className:he("flex items-center pl-1 py-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l flex-1 overflow-hidden group",t.willReceiveDrop&&t.data.isDirectory&&"bg-accent/80 hover:bg-accent/80 text-accent-foreground"),children:[t.data.isMarimoFile?(0,a.jsx)("img",{src:Ut,className:"w-5 h-5 shrink-0 mr-2 filter grayscale",alt:"Marimo"}):(0,a.jsx)(h,{className:"w-5 h-5 shrink-0 mr-2",strokeWidth:1.5}),t.isEditing?(0,a.jsx)(ja,{node:t}):(0,a.jsx)(ua,{node:t,onOpenMarimoFile:y}),(0,a.jsxs)(gt,{modal:!1,children:[(0,a.jsx)(ut,{asChild:!0,tabIndex:-1,onClick:o=>o.stopPropagation(),children:(0,a.jsx)(I,{"data-testid":"file-explorer-more-button",variant:"text",tabIndex:-1,size:"xs",className:"mb-0","aria-label":"More options",children:(0,a.jsx)(yt,{strokeWidth:2,className:"w-5 h-5 hidden group-hover:block"})})}),b()]})]})]})},ya=t=>{let e=(0,Y.c)(3),{node:i}=t;if(!i.data.isDirectory){let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)("span",{className:"w-5 h-5 shrink-0"}),e[0]=s):s=e[0],s}let n;return e[1]===i.isOpen?n=e[2]:(n=i.isOpen?(0,a.jsx)(mt,{className:"w-5 h-5 shrink-0"}):(0,a.jsx)(ft,{className:"w-5 h-5 shrink-0"}),e[1]=i.isOpen,e[2]=n),n};function Ie(t,e){t.stopPropagation(),t.preventDefault(),Lt(e)}function Ee(t,e){if(e)return t;let i=[];for(let n of t){if(va(n.name))continue;let s=n;if(n.children){let r=Ee(n.children,e);r!==n.children&&(s={...n,children:r})}i.push(s)}return i}function va(t){return!!t.startsWith(".")}function ba(){return null}function wa(t){let{parentNode:e}=t;return!e.data.isDirectory}function ka(t){return t.stopPropagation()}var Fa=ie(),Ca=()=>{let t=(0,Fa.c)(20),{ref:e,height:i}=Vt(),n=i===void 0?1:i,s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={noClick:!0,noKeyboard:!0},t[0]=s):s=t[0];let{getRootProps:r,getInputProps:d,isDragActive:f}=Ae(s),h;t[1]===r?h=t[2]:(h=r(),t[1]=r,t[2]=h);let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=he("flex flex-col flex-1 overflow-hidden relative"),t[3]=m):m=t[3];let l;t[4]===d?l=t[5]:(l=d(),t[4]=d,t[5]=l);let u;t[6]===l?u=t[7]:(u=(0,a.jsx)("input",{...l}),t[6]=l,t[7]=u);let v;t[8]===f?v=t[9]:(v=f&&(0,a.jsx)("div",{className:"absolute inset-0 flex items-center uppercase justify-center text-xl font-bold text-primary/90 bg-accent/85 z-10 border-2 border-dashed border-primary/90 rounded-lg pointer-events-none",children:"Drop files here"}),t[8]=f,t[9]=v);let g;t[10]===n?g=t[11]:(g=(0,a.jsx)(pa,{height:n}),t[10]=n,t[11]=g);let c;t[12]!==e||t[13]!==g?(c=(0,a.jsx)("div",{ref:e,className:"flex flex-col flex-1 overflow-hidden",children:g}),t[12]=e,t[13]=g,t[14]=c):c=t[14];let y;return t[15]!==h||t[16]!==u||t[17]!==v||t[18]!==c?(y=(0,a.jsx)(Xt,{children:(0,a.jsxs)("div",{...h,className:m,children:[u,v,c]})}),t[15]=h,t[16]=u,t[17]=v,t[18]=c,t[19]=y):y=t[19],y};export{Ca as default};
|
|
1
|
+
var Te=Object.defineProperty;var Be=(t,e,i)=>e in t?Te(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var R=(t,e,i)=>Be(t,typeof e!="symbol"?e+"":e,i);import{s as ge}from"./chunk-LvLJmgfZ.js";import{i as qe,l as ce,n as A,p as ye,u as ae}from"./useEvent-BhXAndur.js";import{t as $e}from"./react-Bj1aDYRI.js";import{Gr as Ve,Jr as Le,mn as Ue,qn as Ge,w as Ke}from"./cells-DbD2lYze.js";import"./react-dom-CSu739Rf.js";import{t as ie}from"./compiler-runtime-B3qBwwSJ.js";import"./tooltip-DqsDDLgU.js";import{d as Je,f as Ye}from"./hotkeys-BHHWjLlp.js";import{t as Ze}from"./invariant-CAG_dYON.js";import{p as Qe,u as ve}from"./utils-YqBXNpsM.js";import{S as re}from"./config-D2-Bw6QC.js";import{t as Xe}from"./jsx-runtime-ZmTK25f3.js";import{n as et,t as I}from"./button-CZ3Cs4qb.js";import{t as he}from"./cn-BKtXLv3a.js";import{St as tt,at}from"./dist-DBwNzi3C.js";import{a as it,c as rt,i as nt,o as st,s as lt}from"./JsonOutput-BPSYj_Kn.js";import"./cjs-CH5Rj0g8.js";import"./main-U5Goe76G.js";import"./useNonce-CS26E0hA.js";import{n as ot,r as me}from"./requests-B4FYHTZl.js";import{t as G}from"./createLucideIcon-BCdY6lG5.js";import{t as dt}from"./arrow-left-VDC1u5rq.js";import{n as ct,t as ht}from"./LazyAnyLanguageCodeMirror-BqosdyZU.js";import{r as mt}from"./x-ZP5cObgf.js";import{i as pt,r as be}from"./download-s-BdZdTz.js";import{t as ft}from"./chevron-right--18M_6o9.js";import{f as pe}from"./maps-D2_Mq1pZ.js";import{n as xt}from"./markdown-renderer-Md8pHWxP.js";import{a as S,c as K,p as ut,r as jt,t as gt}from"./dropdown-menu-BUgFWmX1.js";import{t as we}from"./copy-D-8y6iMN.js";import{t as ke}from"./download-Dg7clfkc.js";import{t as yt}from"./ellipsis-vertical-J1F7_WS9.js";import{t as vt}from"./eye-off-AK_9uodG.js";import{n as Fe,r as bt,t as wt}from"./types-7nV0hgXj.js";import{t as Ce}from"./file-plus-corner-CvAy4H5W.js";import{t as kt}from"./spinner-DA8-7wQv.js";import{t as Ft}from"./refresh-ccw-DN_xCV6A.js";import{t as Ct}from"./refresh-cw-Dx8TEWFP.js";import{t as Nt}from"./save-DZodxFnE.js";import{t as St}from"./trash-2-B8SQYdQq.js";import{t as Dt}from"./triangle-alert-U93NZYDl.js";import{i as Pt,n as _t,t as Ot}from"./es-GXAIFcot.js";import"./dist-Cayq-K1c.js";import"./dist-TiFCI16_.js";import"./dist-BIKFl48f.js";import"./dist-B0VqT_4z.js";import"./dist-BYyu59D8.js";import{t as W}from"./use-toast-T0_cQDma.js";import{t as fe}from"./paths-Dfii2bN8.js";import"./session-fBtIbMpB.js";import{r as zt}from"./useTheme-CTORu22_.js";import"./Combination-izwufzWe.js";import{t as M}from"./tooltip-C_WgOOcZ.js";import"./dates-CT5PUuFo.js";import{o as Mt}from"./alert-dialog-Ctz24SMn.js";import"./popover-B-131r4d.js";import{n as Ne}from"./ImperativeModal-DZr52ffu.js";import{r as Rt}from"./errors-CPlNr33a.js";import{n as At}from"./blob-Bgnx1kuY.js";import"./vega-loader.browser-BegSZk0G.js";import"./defaultLocale-YteS-k_t.js";import"./defaultLocale-B6z1Qyqt.js";import{t as ne}from"./copy-BaRrAFL-.js";import"./purify.es-B-nzWya6.js";import{a as Wt,i as It,n as xe,r as Et,t as Ht}from"./tree-Hg81oJmp.js";import{n as Tt,t as Bt}from"./alert-Cx8eFRUM.js";import{n as Se}from"./error-banner-w4pz2qUB.js";import{n as De}from"./useAsyncData-CgmD3hjw.js";import"./chunk-5FQGJX7Z-T2jyw7ZD.js";import"./katex-CbllUrnh.js";import"./html-to-image-BIY1TtH0.js";import{o as qt}from"./focus-RQ0afibT.js";import{a as $t}from"./renderShortcut-Xr6z-RjZ.js";import{t as Vt}from"./bundle.esm-CBAPjfrh.js";import{t as Lt}from"./links-DgZx-VxW.js";import{t as Ut}from"./icon-32x32-XIbzzdoo.js";import{t as J}from"./Inputs-CbenuziM.js";var Gt=G("copy-minus",[["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),Pe=G("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),_e=G("list-tree",[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]]),Kt=G("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),Jt=G("square-play",[["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}]]),Yt=G("view",[["path",{d:"M21 17v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2",key:"mrq65r"}],["path",{d:"M21 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2",key:"be3xqs"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0",key:"11ak4c"}]]),Oe=ie(),F=ge($e(),1),a=ge(Xe(),1),ze=(0,F.createContext)(null);function Zt(){return(0,F.useContext)(ze)??void 0}var Qt=t=>{let e=(0,Oe.c)(3),{children:i}=t,n=It(),s;return e[0]!==i||e[1]!==n?(s=(0,a.jsx)(ze.Provider,{value:n,children:i}),e[0]=i,e[1]=n,e[2]=s):s=e[2],s};const Xt=t=>{let e=(0,Oe.c)(5),{children:i}=t,[n,s]=(0,F.useState)(null),r;e[0]!==i||e[1]!==n?(r=n&&(0,a.jsx)(Wt,{backend:Et,options:{rootElement:n},children:(0,a.jsx)(Qt,{children:i})}),e[0]=i,e[1]=n,e[2]=r):r=e[2];let d;return e[3]===r?d=e[4]:(d=(0,a.jsx)("div",{ref:s,className:"contents",children:r}),e[3]=r,e[4]=d),d};var ue=new Map;const ea=({file:t,onOpenNotebook:e})=>{let{theme:i}=zt(),{sendFileDetails:n,sendUpdateFile:s}=me(),r=ae(Qe),d=ae(ve),f=ae(Ve),[h,m]=(0,F.useState)(""),{data:l,isPending:u,error:v,setData:g,refetch:c}=De(async()=>{let o=await n({path:t.path}),j=o.contents||"";return m(ue.get(t.path)||j),o},[t.path]),y=async()=>{h!==(l==null?void 0:l.contents)&&await s({path:t.path,contents:h}).then(o=>{o.success&&(g(j=>({...j,contents:h})),m(h))})},C=(0,F.useRef)(h);if(C.current=h,(0,F.useEffect)(()=>()=>{if(!(l!=null&&l.contents))return;let o=C.current;o===l.contents?ue.delete(t.path):ue.set(t.path,o)},[t.path,l==null?void 0:l.contents]),v)return(0,a.jsx)(Se,{error:v});if(u||!l)return null;let x=l.mimeType||"text/plain",D=x in je,k=f&&l.file.isMarimoFile&&(t.path===f||t.path.endsWith(`/${f}`));if(!l.contents&&!D)return(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 p-6",children:[(0,a.jsx)("div",{className:"font-bold text-muted-foreground",children:"Name"}),(0,a.jsx)("div",{children:l.file.name}),(0,a.jsx)("div",{className:"font-bold text-muted-foreground",children:"Type"}),(0,a.jsx)("div",{children:x})]});let b=(0,a.jsxs)("div",{className:"text-xs text-muted-foreground p-1 flex justify-end gap-2 border-b",children:[(0,a.jsx)(M,{content:"Refresh",children:(0,a.jsx)(J,{size:"small",onClick:c,children:(0,a.jsx)(Ct,{})})}),t.isMarimoFile&&!re()&&(0,a.jsx)(M,{content:"Open notebook",children:(0,a.jsx)(J,{size:"small",onClick:o=>e(o),children:(0,a.jsx)(pe,{})})}),!d&&(0,a.jsx)(M,{content:"Download",children:(0,a.jsx)(J,{size:"small",onClick:()=>{if(Me(x)){pt(xt(l.contents,x),l.file.name);return}be(new Blob([l.contents||h],{type:x}),l.file.name)},children:(0,a.jsx)(ke,{})})}),!Me(x)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(M,{content:"Copy contents to clipboard",children:(0,a.jsx)(J,{size:"small",onClick:async()=>{await ne(h)},children:(0,a.jsx)(we,{})})}),(0,a.jsx)(M,{content:$t("global.save"),children:(0,a.jsx)(J,{size:"small",color:h===l.contents?void 0:"green",onClick:y,disabled:h===l.contents,children:(0,a.jsx)(Nt,{})})})]})]});return x.startsWith("image/")?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(st,{base64:l.contents,mime:x})})]}):x==="text/csv"&&l.contents?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(it,{contents:l.contents})})]}):x.startsWith("audio/")?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(nt,{base64:l.contents,mime:x})})]}):x.startsWith("video/")?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(rt,{base64:l.contents,mime:x})})]}):x.startsWith("application/pdf")?(0,a.jsxs)(a.Fragment,{children:[b,(0,a.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,a.jsx)(lt,{base64:l.contents,mime:x})})]}):(0,a.jsxs)(a.Fragment,{children:[b,k&&(0,a.jsxs)(Bt,{variant:"warning",className:"rounded-none",children:[(0,a.jsx)(Dt,{className:"h-4 w-4"}),(0,a.jsx)(Tt,{children:"Editing the notebook file directly while running in marimo's editor may cause unintended changes. Please use with caution."})]}),(0,a.jsx)("div",{className:"flex-1 overflow-auto",children:(0,a.jsx)(F.Suspense,{children:(0,a.jsx)(ht,{theme:i==="dark"?"dark":"light",language:je[x]||je.default,className:"border-b",extensions:[at.lineWrapping,tt.of([{key:r.getHotkey("global.save").key,stopPropagation:!0,run:()=>h===l.contents?!1:(y(),!0)}])],value:h,onChange:m})})})]})};var Me=t=>t?t.startsWith("image/")||t.startsWith("audio/")||t.startsWith("video/")||t.startsWith("application/pdf"):!1,je={"application/javascript":"javascript","text/markdown":"markdown","text/html":"html","text/css":"css","text/x-python":"python","application/json":"json","application/xml":"xml","text/x-yaml":"yaml","text/csv":"markdown","text/plain":"markdown",default:"markdown"},ta=class{constructor(t){R(this,"delegate",new xe([]));R(this,"rootPath","");R(this,"onChange",Ye.NOOP);R(this,"path",new fe("/"));R(this,"initialize",async t=>{if(this.onChange=t,this.delegate.data.length===0)try{let e=await this.callbacks.listFiles({path:this.rootPath});this.delegate=new xe(e.files),this.rootPath=e.root,this.path=fe.guessDeliminator(e.root)}catch(e){W({title:"Failed",description:Rt(e)})}this.onChange(this.delegate.data)});R(this,"refreshAll",async t=>{let e=[this.rootPath,...t.map(n=>{var s;return(s=this.delegate.find(n))==null?void 0:s.data.path})].filter(Boolean),i=await Promise.all(e.map(n=>this.callbacks.listFiles({path:n}).catch(()=>({files:[]}))));for(let[n,s]of e.entries()){let r=i[n];s===this.rootPath?this.delegate=new xe(r.files):this.delegate.update({id:s,changes:{children:r.files}})}this.onChange(this.delegate.data)});R(this,"relativeFromRoot",t=>{let e=this.rootPath.endsWith(this.path.deliminator)?this.rootPath:`${this.rootPath}${this.path.deliminator}`;return t.startsWith(e)?t.slice(e.length):t});R(this,"handleResponse",t=>t.success?t:(W({title:"Failed",description:t.message}),null));this.callbacks=t}async expand(t){let e=this.delegate.find(t);if(!e||!e.data.isDirectory)return!1;if(e.children&&e.children.length>0)return!0;let i=await this.callbacks.listFiles({path:e.data.path});return this.delegate.update({id:t,changes:{children:i.files}}),this.onChange(this.delegate.data),!0}async rename(t,e){let i=this.delegate.find(t);if(!i)return;let n=i.data.path,s=this.path.join(this.path.dirname(n),e);await this.callbacks.renameFileOrFolder({path:n,newPath:s}).then(this.handleResponse),this.delegate.update({id:t,changes:{name:e,path:s}}),this.onChange(this.delegate.data),await this.refreshAll([s])}async move(t,e){var n;let i=e?((n=this.delegate.find(e))==null?void 0:n.data.path)??e:this.rootPath;await Promise.all(t.map(s=>{this.delegate.move({id:s,parentId:e,index:0});let r=this.delegate.find(s);if(!r)return Promise.resolve();let d=this.path.join(i,this.path.basename(r.data.path));return this.delegate.update({id:s,changes:{path:d}}),this.callbacks.renameFileOrFolder({path:r.data.path,newPath:d}).then(this.handleResponse)})),this.onChange(this.delegate.data),await this.refreshAll([i])}async createFile(t,e){var s;let i=e?((s=this.delegate.find(e))==null?void 0:s.data.path)??e:this.rootPath,n=await this.callbacks.createFileOrFolder({path:i,type:"file",name:t}).then(this.handleResponse);n!=null&&n.info&&(this.delegate.create({parentId:e,index:0,data:n.info}),this.onChange(this.delegate.data),await this.refreshAll([i]))}async createFolder(t,e){var s;let i=e?((s=this.delegate.find(e))==null?void 0:s.data.path)??e:this.rootPath,n=await this.callbacks.createFileOrFolder({path:i,type:"directory",name:t}).then(this.handleResponse);n!=null&&n.info&&(this.delegate.create({parentId:e,index:0,data:n.info}),this.onChange(this.delegate.data),await this.refreshAll([i]))}async delete(t){let e=this.delegate.find(t);e&&(await this.callbacks.deleteFileOrFolder({path:e.data.path}).then(this.handleResponse),this.delegate.drop({id:t}),this.onChange(this.delegate.data))}};const Re=ye(t=>{let e=t(ot);return Ze(e,"no requestClientAtom set"),new ta({listFiles:e.sendListFiles,createFileOrFolder:e.sendCreateFileOrFolder,deleteFileOrFolder:e.sendDeleteFileOrFolder,renameFileOrFolder:e.sendRenameFileOrFolder})}),aa=ye({});async function ia(){await qe.get(Re).refreshAll([])}var ra=ie(),na=1024*1024*100;function Ae(t){let e=(0,ra.c)(7),i;e[0]===t?i=e[1]:(i=t===void 0?{}:t,e[0]=t,e[1]=i);let n=i,{sendCreateFileOrFolder:s}=me(),r;e[2]===s?r=e[3]:(r=async f=>{for(let h of f){let m=ha(ca(h)),l="";m&&(l=fe.guessDeliminator(m).dirname(m));let u=(await At(h)).split(",")[1];await s({path:l,type:"file",name:h.name,contents:u})}await ia()},e[2]=s,e[3]=r);let d;return e[4]!==n||e[5]!==r?(d={multiple:!0,maxSize:na,onError:da,onDropRejected:sa,onDrop:r,...n},e[4]=n,e[5]=r,e[6]=d):d=e[6],Ot(d)}function sa(t){W({title:"File upload failed",description:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:t.map(la)}),variant:"danger"})}function la(t){return(0,a.jsxs)("div",{children:[t.file.name," (",t.errors.map(oa).join(", "),")"]},t.file.name)}function oa(t){return t.message}function da(t){Je.error(t),W({title:"File upload failed",description:t.message,variant:"danger"})}function ca(t){if(t.webkitRelativePath)return t.webkitRelativePath;if("path"in t&&typeof t.path=="string")return t.path;if("relativePath"in t&&typeof t.relativePath=="string")return t.relativePath}function ha(t){if(t)return t.replace(/^\/+/,"")}var Y=ie(),ma=Le("marimo:showHiddenFiles",!0,Ue,{getOnInit:!0}),We=F.createContext(null);const pa=t=>{let e=(0,Y.c)(68),{height:i}=t,n=(0,F.useRef)(null),s=Zt(),[r]=ce(Re),d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[0]=d):d=e[0];let[f,h]=(0,F.useState)(d),[m,l]=(0,F.useState)(null),[u,v]=ce(ma),{openPrompt:g}=Ne(),[c,y]=ce(aa),C;e[1]===r?C=e[2]:(C=()=>r.initialize(h),e[1]=r,e[2]=C);let x;e[3]===Symbol.for("react.memo_cache_sentinel")?(x=[],e[3]=x):x=e[3];let{isPending:D,error:k}=De(C,x),b;e[4]!==c||e[5]!==r?(b=()=>{r.refreshAll(Object.keys(c).filter(p=>c[p]))},e[4]=c,e[5]=r,e[6]=b):b=e[6];let o=A(b),j;e[7]!==v||e[8]!==u?(j=()=>{v(!u)},e[7]=v,e[8]=u,e[9]=j):j=e[9];let P=A(j),_;e[10]!==g||e[11]!==r?(_=async()=>{g({title:"Folder name",onConfirm:async p=>{r.createFolder(p,null)}})},e[10]=g,e[11]=r,e[12]=_):_=e[12];let N=A(_),O;e[13]!==g||e[14]!==r?(O=async()=>{g({title:"File name",onConfirm:async p=>{r.createFile(p,null)}})},e[13]=g,e[14]=r,e[15]=O):O=e[15];let se=A(O),Z;e[16]===y?Z=e[17]:(Z=()=>{var p;(p=n.current)==null||p.closeAll(),y({})},e[16]=y,e[17]=Z);let le=A(Z),Q;e[18]!==f||e[19]!==u?(Q=Ee(f,u),e[18]=f,e[19]=u,e[20]=Q):Q=e[20];let oe=Q;if(D){let p;return e[21]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)(kt,{size:"medium",centered:!0}),e[21]=p):p=e[21],p}if(k){let p;return e[22]===k?p=e[23]:(p=(0,a.jsx)(Se,{error:k}),e[22]=k,e[23]=p),p}if(m){let p;e[24]===Symbol.for("react.memo_cache_sentinel")?(p=()=>l(null),e[24]=p):p=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=(0,a.jsx)(I,{onClick:p,"data-testid":"file-explorer-back-button",variant:"text",size:"xs",className:"mb-0",children:(0,a.jsx)(dt,{size:16})}),e[25]=w):w=e[25];let z;e[26]===m.name?z=e[27]:(z=(0,a.jsxs)("div",{className:"flex items-center pl-1 pr-3 shrink-0 border-b justify-between",children:[w,(0,a.jsx)("span",{className:"font-bold",children:m.name})]}),e[26]=m.name,e[27]=z);let L;e[28]!==m.path||e[29]!==r?(L=He=>Ie(He,r.relativeFromRoot(m.path)),e[28]=m.path,e[29]=r,e[30]=L):L=e[30];let U;e[31]!==m||e[32]!==L?(U=(0,a.jsx)(F.Suspense,{children:(0,a.jsx)(ea,{onOpenNotebook:L,file:m})}),e[31]=m,e[32]=L,e[33]=U):U=e[33];let te;return e[34]!==z||e[35]!==U?(te=(0,a.jsxs)(a.Fragment,{children:[z,U]}),e[34]=z,e[35]=U,e[36]=te):te=e[36],te}let E;e[37]!==le||e[38]!==se||e[39]!==N||e[40]!==P||e[41]!==o||e[42]!==r?(E=(0,a.jsx)(xa,{onRefresh:o,onHidden:P,onCreateFile:se,onCreateFolder:N,onCollapseAll:le,tree:r}),e[37]=le,e[38]=se,e[39]=N,e[40]=P,e[41]=o,e[42]=r,e[43]=E):E=e[43];let de=i-33,H,T,B;e[44]===r?(H=e[45],T=e[46],B=e[47]):(H=async p=>{let{ids:w}=p;for(let z of w)await r.delete(z)},T=async p=>{let{id:w,name:z}=p;await r.rename(w,z)},B=async p=>{let{dragIds:w,parentId:z}=p;await r.move(w,z)},e[44]=r,e[45]=H,e[46]=T,e[47]=B);let X;e[48]===Symbol.for("react.memo_cache_sentinel")?(X=p=>{let w=p[0];w&&(w.data.isDirectory||l(w.data))},e[48]=X):X=e[48];let q;e[49]!==c||e[50]!==y||e[51]!==r?(q=async p=>{if(await r.expand(p)){let w=c[p]??!1;y({...c,[p]:!w})}},e[49]=c,e[50]=y,e[51]=r,e[52]=q):q=e[52];let $;e[53]!==s||e[54]!==c||e[55]!==de||e[56]!==H||e[57]!==T||e[58]!==B||e[59]!==q||e[60]!==oe?($=(0,a.jsx)(Ht,{width:"100%",ref:n,height:de,className:"h-full",data:oe,initialOpenState:c,openByDefault:!1,dndManager:s,renderCursor:ba,disableDrop:wa,onDelete:H,onRename:T,onMove:B,onSelect:X,onToggle:q,padding:15,rowHeight:30,indent:fa,overscanCount:1e3,disableMultiSelection:!0,children:ga}),e[53]=s,e[54]=c,e[55]=de,e[56]=H,e[57]=T,e[58]=B,e[59]=q,e[60]=oe,e[61]=$):$=e[61];let V;e[62]!==$||e[63]!==r?(V=(0,a.jsx)(We,{value:r,children:$}),e[62]=$,e[63]=r,e[64]=V):V=e[64];let ee;return e[65]!==E||e[66]!==V?(ee=(0,a.jsxs)(a.Fragment,{children:[E,V]}),e[65]=E,e[66]=V,e[67]=ee):ee=e[67],ee};var fa=15,xa=t=>{let e=(0,Y.c)(34),{onRefresh:i,onHidden:n,onCreateFile:s,onCreateFolder:r,onCollapseAll:d}=t,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={noDrag:!0,noDragEventsBubbling:!0},e[0]=f):f=e[0];let{getRootProps:h,getInputProps:m}=Ae(f),l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(Ce,{size:16}),e[1]=l):l=e[1];let u;e[2]===s?u=e[3]:(u=(0,a.jsx)(M,{content:"Add file",children:(0,a.jsx)(I,{"data-testid":"file-explorer-add-file-button",onClick:s,variant:"text",size:"xs",children:l})}),e[2]=s,e[3]=u);let v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)(Pe,{size:16}),e[4]=v):v=e[4];let g;e[5]===r?g=e[6]:(g=(0,a.jsx)(M,{content:"Add folder",children:(0,a.jsx)(I,{"data-testid":"file-explorer-add-folder-button",onClick:r,variant:"text",size:"xs",children:v})}),e[5]=r,e[6]=g);let c;e[7]===h?c=e[8]:(c=h({}),e[7]=h,e[8]=c);let y,C;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=et({variant:"text",size:"xs"}),C=(0,a.jsx)(Pt,{size:16}),e[9]=y,e[10]=C):(y=e[9],C=e[10]);let x;e[11]===c?x=e[12]:(x=(0,a.jsx)(M,{content:"Upload file",children:(0,a.jsx)("button",{"data-testid":"file-explorer-upload-button",...c,className:y,children:C})}),e[11]=c,e[12]=x);let D;e[13]===m?D=e[14]:(D=m({}),e[13]=m,e[14]=D);let k;e[15]===D?k=e[16]:(k=(0,a.jsx)("input",{...D,type:"file"}),e[15]=D,e[16]=k);let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b=(0,a.jsx)(Ft,{size:16}),e[17]=b):b=e[17];let o;e[18]===i?o=e[19]:(o=(0,a.jsx)(M,{content:"Refresh",children:(0,a.jsx)(I,{"data-testid":"file-explorer-refresh-button",onClick:i,variant:"text",size:"xs",children:b})}),e[18]=i,e[19]=o);let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=(0,a.jsx)(vt,{size:16}),e[20]=j):j=e[20];let P;e[21]===n?P=e[22]:(P=(0,a.jsx)(M,{content:"Toggle hidden files",children:(0,a.jsx)(I,{"data-testid":"file-explorer-hidden-files-button",onClick:n,variant:"text",size:"xs",children:j})}),e[21]=n,e[22]=P);let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=(0,a.jsx)(Gt,{size:16}),e[23]=_):_=e[23];let N;e[24]===d?N=e[25]:(N=(0,a.jsx)(M,{content:"Collapse all folders",children:(0,a.jsx)(I,{"data-testid":"file-explorer-collapse-button",onClick:d,variant:"text",size:"xs",children:_})}),e[24]=d,e[25]=N);let O;return e[26]!==k||e[27]!==o||e[28]!==P||e[29]!==N||e[30]!==u||e[31]!==g||e[32]!==x?(O=(0,a.jsxs)("div",{className:"flex items-center justify-end px-2 shrink-0 border-b",children:[u,g,x,k,o,P,N]}),e[26]=k,e[27]=o,e[28]=P,e[29]=N,e[30]=u,e[31]=g,e[32]=x,e[33]=O):O=e[33],O},ua=t=>{let e=(0,Y.c)(9),{node:i,onOpenMarimoFile:n}=t,s;e[0]===i?s=e[1]:(s=f=>{i.data.isDirectory||(f.stopPropagation(),i.select())},e[0]=i,e[1]=s);let r;e[2]!==i.data.isMarimoFile||e[3]!==n?(r=i.data.isMarimoFile&&!re()&&(0,a.jsxs)("span",{className:"shrink-0 ml-2 text-sm hidden group-hover:inline hover:underline",onClick:n,children:["open ",(0,a.jsx)(pe,{className:"inline ml-1",size:12})]}),e[2]=i.data.isMarimoFile,e[3]=n,e[4]=r):r=e[4];let d;return e[5]!==i.data.name||e[6]!==s||e[7]!==r?(d=(0,a.jsxs)("span",{className:"flex-1 overflow-hidden text-ellipsis",onClick:s,children:[i.data.name,r]}),e[5]=i.data.name,e[6]=s,e[7]=r,e[8]=d):d=e[8],d},ja=t=>{let e=(0,Y.c)(10),{node:i}=t,n=(0,F.useRef)(null),s,r;e[0]===i.data.name?(s=e[1],r=e[2]):(s=()=>{var m,l;(m=n.current)==null||m.focus(),(l=n.current)==null||l.setSelectionRange(0,i.data.name.lastIndexOf("."))},r=[i.data.name],e[0]=i.data.name,e[1]=s,e[2]=r),(0,F.useEffect)(s,r);let d,f;e[3]===i?(d=e[4],f=e[5]):(d=()=>i.reset(),f=m=>{m.key==="Escape"&&i.reset(),m.key==="Enter"&&i.submit(m.currentTarget.value)},e[3]=i,e[4]=d,e[5]=f);let h;return e[6]!==i.data.name||e[7]!==d||e[8]!==f?(h=(0,a.jsx)("input",{ref:n,className:"flex-1 bg-transparent border border-border text-muted-foreground",defaultValue:i.data.name,onClick:ka,onBlur:d,onKeyDown:f}),e[6]=i.data.name,e[7]=d,e[8]=f,e[9]=h):h=e[9],h},ga=({node:t,style:e,dragHandle:i})=>{let{openFile:n,sendCreateFileOrFolder:s,sendFileDetails:r}=me(),d=ae(ve),f=t.data.isDirectory?"directory":bt(t.data.name),h=wt[f],{openConfirm:m,openPrompt:l}=Ne(),{createNewCell:u}=Ke(),v=qt(),g=o=>{u({code:o,before:!1,cellId:v??"__end__"})},c=(0,F.use)(We),y=async o=>{Ie(o,c?c.relativeFromRoot(t.data.path):t.data.path)},C=async o=>{o.stopPropagation(),o.preventDefault(),m({title:"Delete file",description:`Are you sure you want to delete ${t.data.name}?`,confirmAction:(0,a.jsx)(Mt,{onClick:async()=>{await t.tree.delete(t.id)},"aria-label":"Confirm",children:"Delete"})})},x=A(async()=>{t.open(),l({title:"Folder name",onConfirm:async o=>{c==null||c.createFolder(o,t.id)}})}),D=A(async()=>{t.open(),l({title:"File name",onConfirm:async o=>{c==null||c.createFile(o,t.id)}})}),k=A(async()=>{var _;if(!c||t.data.isDirectory)return;let[o,j]=_t(t.data.name),P=`${o}_copy${j}`;try{let N=await r({path:t.data.path}),O=((_=t.parent)==null?void 0:_.data.path)||"";await s({path:O,type:"file",name:P,contents:N.contents?btoa(N.contents):void 0}),await c.refreshAll([O])}catch{W({title:"Failed to duplicate file",description:"Unable to create a duplicate of the file",variant:"danger"})}}),b=()=>{let o={size:14,strokeWidth:1.5,className:"mr-2"};return(0,a.jsxs)(jt,{align:"end",className:"print:hidden w-[220px]",onClick:j=>j.stopPropagation(),onCloseAutoFocus:j=>j.preventDefault(),children:[!t.data.isDirectory&&(0,a.jsxs)(S,{onSelect:()=>t.select(),children:[(0,a.jsx)(Yt,{...o}),"Open file"]}),!t.data.isDirectory&&!re()&&(0,a.jsxs)(S,{onSelect:()=>{n({path:t.data.path})},children:[(0,a.jsx)(pe,{...o}),"Open file in external editor"]}),t.data.isDirectory&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(S,{onSelect:()=>D(),children:[(0,a.jsx)(Ce,{...o}),"Create file"]}),(0,a.jsxs)(S,{onSelect:()=>x(),children:[(0,a.jsx)(Pe,{...o}),"Create folder"]}),(0,a.jsx)(K,{})]}),(0,a.jsxs)(S,{onSelect:()=>t.edit(),children:[(0,a.jsx)(Kt,{...o}),"Rename"]}),!t.data.isDirectory&&(0,a.jsxs)(S,{onSelect:k,children:[(0,a.jsx)(we,{...o}),"Duplicate"]}),(0,a.jsxs)(S,{onSelect:async()=>{await ne(t.data.path),W({title:"Copied to clipboard"})},children:[(0,a.jsx)(_e,{...o}),"Copy path"]}),c&&(0,a.jsxs)(S,{onSelect:async()=>{await ne(c.relativeFromRoot(t.data.path)),W({title:"Copied to clipboard"})},children:[(0,a.jsx)(_e,{...o}),"Copy relative path"]}),(0,a.jsx)(K,{}),(0,a.jsxs)(S,{onSelect:()=>{let{path:j}=t.data;g(Fe[f](j))},children:[(0,a.jsx)(ct,{...o}),"Insert snippet for reading file"]}),(0,a.jsxs)(S,{onSelect:async()=>{W({title:"Copied to clipboard",description:"Code to open the file has been copied to your clipboard. You can also drag and drop this file into the editor"});let{path:j}=t.data;await ne(Fe[f](j))},children:[(0,a.jsx)(Ge,{...o}),"Copy snippet for reading file"]}),t.data.isMarimoFile&&!re()&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(K,{}),(0,a.jsxs)(S,{onSelect:y,children:[(0,a.jsx)(Jt,{...o}),"Open notebook"]})]}),(0,a.jsx)(K,{}),!t.data.isDirectory&&!d&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(S,{onSelect:async()=>{let j=(await r({path:t.data.path})).contents||"";be(new Blob([j]),t.data.name)},children:[(0,a.jsx)(ke,{...o}),"Download"]}),(0,a.jsx)(K,{})]}),(0,a.jsxs)(S,{onSelect:C,variant:"danger",children:[(0,a.jsx)(St,{...o}),"Delete"]})]})};return(0,a.jsxs)("div",{style:e,ref:i,className:he("flex items-center cursor-pointer ml-1 text-muted-foreground whitespace-nowrap group"),draggable:!0,onClick:o=>{o.stopPropagation(),t.data.isDirectory&&t.toggle()},children:[(0,a.jsx)(ya,{node:t}),(0,a.jsxs)("span",{className:he("flex items-center pl-1 py-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l flex-1 overflow-hidden group",t.willReceiveDrop&&t.data.isDirectory&&"bg-accent/80 hover:bg-accent/80 text-accent-foreground"),children:[t.data.isMarimoFile?(0,a.jsx)("img",{src:Ut,className:"w-5 h-5 shrink-0 mr-2 filter grayscale",alt:"Marimo"}):(0,a.jsx)(h,{className:"w-5 h-5 shrink-0 mr-2",strokeWidth:1.5}),t.isEditing?(0,a.jsx)(ja,{node:t}):(0,a.jsx)(ua,{node:t,onOpenMarimoFile:y}),(0,a.jsxs)(gt,{modal:!1,children:[(0,a.jsx)(ut,{asChild:!0,tabIndex:-1,onClick:o=>o.stopPropagation(),children:(0,a.jsx)(I,{"data-testid":"file-explorer-more-button",variant:"text",tabIndex:-1,size:"xs",className:"mb-0","aria-label":"More options",children:(0,a.jsx)(yt,{strokeWidth:2,className:"w-5 h-5 hidden group-hover:block"})})}),b()]})]})]})},ya=t=>{let e=(0,Y.c)(3),{node:i}=t;if(!i.data.isDirectory){let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)("span",{className:"w-5 h-5 shrink-0"}),e[0]=s):s=e[0],s}let n;return e[1]===i.isOpen?n=e[2]:(n=i.isOpen?(0,a.jsx)(mt,{className:"w-5 h-5 shrink-0"}):(0,a.jsx)(ft,{className:"w-5 h-5 shrink-0"}),e[1]=i.isOpen,e[2]=n),n};function Ie(t,e){t.stopPropagation(),t.preventDefault(),Lt(e)}function Ee(t,e){if(e)return t;let i=[];for(let n of t){if(va(n.name))continue;let s=n;if(n.children){let r=Ee(n.children,e);r!==n.children&&(s={...n,children:r})}i.push(s)}return i}function va(t){return!!t.startsWith(".")}function ba(){return null}function wa(t){let{parentNode:e}=t;return!e.data.isDirectory}function ka(t){return t.stopPropagation()}var Fa=ie(),Ca=()=>{let t=(0,Fa.c)(20),{ref:e,height:i}=Vt(),n=i===void 0?1:i,s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={noClick:!0,noKeyboard:!0},t[0]=s):s=t[0];let{getRootProps:r,getInputProps:d,isDragActive:f}=Ae(s),h;t[1]===r?h=t[2]:(h=r(),t[1]=r,t[2]=h);let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=he("flex flex-col flex-1 overflow-hidden relative"),t[3]=m):m=t[3];let l;t[4]===d?l=t[5]:(l=d(),t[4]=d,t[5]=l);let u;t[6]===l?u=t[7]:(u=(0,a.jsx)("input",{...l}),t[6]=l,t[7]=u);let v;t[8]===f?v=t[9]:(v=f&&(0,a.jsx)("div",{className:"absolute inset-0 flex items-center uppercase justify-center text-xl font-bold text-primary/90 bg-accent/85 z-10 border-2 border-dashed border-primary/90 rounded-lg pointer-events-none",children:"Drop files here"}),t[8]=f,t[9]=v);let g;t[10]===n?g=t[11]:(g=(0,a.jsx)(pa,{height:n}),t[10]=n,t[11]=g);let c;t[12]!==e||t[13]!==g?(c=(0,a.jsx)("div",{ref:e,className:"flex flex-col flex-1 overflow-hidden",children:g}),t[12]=e,t[13]=g,t[14]=c):c=t[14];let y;return t[15]!==h||t[16]!==u||t[17]!==v||t[18]!==c?(y=(0,a.jsx)(Xt,{children:(0,a.jsxs)("div",{...h,className:m,children:[u,v,c]})}),t[15]=h,t[16]=u,t[17]=v,t[18]=c,t[19]=y):y=t[19],y};export{Ca as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var P1;import"./purify.es-
|
|
1
|
+
var P1;import"./purify.es-B-nzWya6.js";import{u as m1}from"./src-DJ8ZKoFs.js";import{c as et,g as st}from"./chunk-S3R3BYOJ-D1UiABQX.js";import{n as k,r as Z}from"./src-CmKhyEBC.js";import{$ as Yt,B as Ht,C as Xt,H as Mt,U as qt,_ as Qt,a as Zt,b as p1,s as Jt,u as te,v as ee,z as se}from"./chunk-ABZYJK2D-D1A06qKo.js";import{t as ie}from"./channel-CXFsg7SH.js";import{n as re,t as ue}from"./chunk-MI3HLSF2-D6we5Ftb.js";import"./chunk-HN2XXSSU-BBxJMYrA.js";import"./chunk-CVBHYZKI-Brsoob-W.js";import"./chunk-ATLVNIR6-C5FWd1qN.js";import"./dist-DxxvVPQH.js";import"./chunk-JA3XYJ7Z-tKDxhnhw.js";import{o as ne}from"./chunk-JZLCHNYA-DtvI9B9X.js";import"./chunk-QXUST7PY-C4Ihfbmy.js";import{r as oe,t as ae}from"./chunk-N4CR4FBY-BQcJpHO7.js";import{t as le}from"./chunk-FMBD7UC4-kejklSRQ.js";import{t as ce}from"./chunk-55IACEB6-NZRDKuqH.js";import{t as he}from"./chunk-QN33PNHL-BboKw3W6.js";var de="flowchart-",pe=(P1=class{constructor(){this.vertexCounter=0,this.config=p1(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Ht,this.setAccDescription=se,this.setDiagramTitle=qt,this.getAccTitle=ee,this.getAccDescription=Qt,this.getDiagramTitle=Xt,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return Jt.sanitizeText(i,this.config)}lookUpDomId(i){for(let r of this.vertices.values())if(r.id===i)return r.domId;return i}addVertex(i,r,u,o,n,g,p={},c){var z,f;if(!i||i.trim().length===0)return;let a;if(c!==void 0){let d;d=c.includes(`
|
|
2
2
|
`)?c+`
|
|
3
3
|
`:`{
|
|
4
4
|
`+c+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as Me}from"./chunk-LvLJmgfZ.js";import{t as yr}from"./react-Bj1aDYRI.js";import{G as ze,Gn as wr,St as Nr}from"./cells-DbD2lYze.js";import{_ as Te,c as Cr,d as ke,f as Se,g as kr,h as _e,l as Sr,m as _r,o as Rr,p as le,s as Or,t as Re,u as Je,y as Oe}from"./zod-H_cgTO0M.js";import{t as he}from"./compiler-runtime-B3qBwwSJ.js";import{a as Ar,d as Vr,f as Er}from"./hotkeys-BHHWjLlp.js";import{r as Ae}from"./useEventListener-Cb-RVVEn.js";import{t as Pr}from"./jsx-runtime-ZmTK25f3.js";import{r as Lr,t as Be}from"./button-CZ3Cs4qb.js";import{t as I}from"./cn-BKtXLv3a.js";import{t as $r}from"./check-Dr3SxUsb.js";import{r as Ir}from"./x-ZP5cObgf.js";import{M as qr,N as Ke,P as Fr,j as Gr}from"./dropdown-menu-BUgFWmX1.js";import{t as Dr}from"./plus-B7DF33lD.js";import{t as Mr}from"./refresh-ccw-DN_xCV6A.js";import{n as zr,t as Ve}from"./input-DHHmNa19.js";import{a as V,c as R,d as E,h as Tr,l as P,m as Jr,o as A,r as Ue,u as S,y as Br}from"./textarea-8F9GOEGf.js";import{t as Kr}from"./trash-2-B8SQYdQq.js";import{t as Ur}from"./badge-D4keL3YC.js";import{E as Ze,S as Ee,_ as xe,w as Pe,x as Zr}from"./Combination-izwufzWe.js";import{c as Hr,i as He,l as Wr,m as Xr,n as Yr,r as Qr,s as ea,t as ra}from"./select-B7bfltkI.js";import{l as aa}from"./dist-DDGMbl6p.js";import{t as ta}from"./tooltip-C_WgOOcZ.js";import{u as sa}from"./menu-items-vwmjPhjW.js";import{i as na,r as la,t as oa}from"./popover-B-131r4d.js";import{a as ia,o as ca,r as da,s as ua,t as ma}from"./command-PbcrObnK.js";import{t as pa}from"./label-C9wP7Kp2.js";import{t as fa}from"./toggle-CriARMQK.js";var We=he(),w=Me(yr(),1),a=Me(Pr(),1);const Xe=(0,w.createContext)({isSelected:()=>!1,onSelect:Er.NOOP}),Le=t=>{let e=(0,We.c)(94),r,n,l,o,i,d,p,s,c,u,f,h,m,j,x,g,v,y,N,C,O;e[0]===t?(r=e[1],n=e[2],l=e[3],o=e[4],i=e[5],d=e[6],p=e[7],s=e[8],c=e[9],u=e[10],f=e[11],h=e[12],m=e[13],j=e[14],x=e[15],g=e[16],v=e[17],y=e[18],N=e[19],C=e[20],O=e[21]):({children:r,displayValue:d,className:l,placeholder:m,value:O,defaultValue:i,onValueChange:f,multiple:g,shouldFilter:v,filterFn:p,open:h,defaultOpen:o,onOpenChange:c,inputPlaceholder:y,search:x,onSearchChange:u,emptyState:N,chips:C,chipsClassName:n,keepPopoverOpenOnSelect:s,...j}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=l,e[4]=o,e[5]=i,e[6]=d,e[7]=p,e[8]=s,e[9]=c,e[10]=u,e[11]=f,e[12]=h,e[13]=m,e[14]=j,e[15]=x,e[16]=g,e[17]=v,e[18]=y,e[19]=N,e[20]=C,e[21]=O);let k=g===void 0?!1:g,q=v===void 0?!0:v,F=y===void 0?"Search...":y,ne=N===void 0?"Nothing found.":N,$=C===void 0?!1:C,ye=o??!1,oe;e[22]!==c||e[23]!==h||e[24]!==ye?(oe={prop:h,defaultProp:ye,onChange:c},e[22]=c,e[23]=h,e[24]=ye,e[25]=oe):oe=e[25];let[Ge,M]=Ee(oe),z=Ge===void 0?!1:Ge,T;e[26]===f?T=e[27]:(T=_=>{f==null||f(_)},e[26]=f,e[27]=T);let ie;e[28]!==i||e[29]!==T||e[30]!==O?(ie={prop:O,defaultProp:i,onChange:T},e[28]=i,e[29]=T,e[30]=O,e[31]=ie):ie=e[31];let[b,we]=Ee(ie),ce;e[32]===b?ce=e[33]:(ce=_=>Array.isArray(b)?b.includes(_):b===_,e[32]=b,e[33]=ce);let Ne=ce,de;e[34]!==s||e[35]!==k||e[36]!==M||e[37]!==we||e[38]!==b?(de=_=>{let G=_;if(k)if(Array.isArray(b))if(b.includes(G)){let De=b.filter(br=>br!==_);G=De.length>0?De:[]}else G=[...b,G];else G=[G];else b===_&&(G=null);we(G),(s??k)||M(!1)},e[34]=s,e[35]=k,e[36]=M,e[37]=we,e[38]=b,e[39]=de):de=e[39];let J=de,ue;e[40]!==$||e[41]!==d||e[42]!==k||e[43]!==m||e[44]!==b?(ue=()=>k&&$&&m?m:b==null?m??"--":Array.isArray(b)?b.length===0?m??"--":b.length===1&&d!==void 0?d(b[0]):`${b.length} selected`:d===void 0?m??"--":d(b),e[40]=$,e[41]=d,e[42]=k,e[43]=m,e[44]=b,e[45]=ue):ue=e[45];let Ce=ue,me;e[46]===Symbol.for("react.memo_cache_sentinel")?(me=I("relative"),e[46]=me):me=e[46];let B;e[47]===l?B=e[48]:(B=I("flex h-6 w-fit mb-1 shadow-xs-solid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-sm-solid focus:outline-hidden focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-md-solid disabled:cursor-not-allowed disabled:opacity-50",l),e[47]=l,e[48]=B);let K;e[49]===Ce?K=e[50]:(K=Ce(),e[49]=Ce,e[50]=K);let U;e[51]===K?U=e[52]:(U=(0,a.jsx)("span",{className:"truncate flex-1 min-w-0",children:K}),e[51]=K,e[52]=U);let pe;e[53]===Symbol.for("react.memo_cache_sentinel")?(pe=(0,a.jsx)(Ir,{className:"ml-3 w-4 h-4 opacity-50 shrink-0"}),e[53]=pe):pe=e[53];let Z;e[54]!==z||e[55]!==B||e[56]!==U?(Z=(0,a.jsx)(na,{asChild:!0,children:(0,a.jsxs)("div",{className:B,"aria-expanded":z,children:[U,pe]})}),e[54]=z,e[55]=B,e[56]=U,e[57]=Z):Z=e[57];let H;e[58]!==F||e[59]!==u||e[60]!==x?(H=(0,a.jsx)(ia,{placeholder:F,rootClassName:"px-1 h-8",autoFocus:!0,value:x,onValueChange:u}),e[58]=F,e[59]=u,e[60]=x,e[61]=H):H=e[61];let W;e[62]===ne?W=e[63]:(W=(0,a.jsx)(da,{children:ne}),e[62]=ne,e[63]=W);let X;e[64]!==J||e[65]!==Ne?(X={isSelected:Ne,onSelect:J},e[64]=J,e[65]=Ne,e[66]=X):X=e[66];let Y;e[67]!==r||e[68]!==X?(Y=(0,a.jsx)(Xe,{value:X,children:r}),e[67]=r,e[68]=X,e[69]=Y):Y=e[69];let Q;e[70]!==W||e[71]!==Y?(Q=(0,a.jsxs)(ua,{className:"max-h-60 py-.5",children:[W,Y]}),e[70]=W,e[71]=Y,e[72]=Q):Q=e[72];let ee;e[73]!==p||e[74]!==q||e[75]!==H||e[76]!==Q?(ee=(0,a.jsx)(la,{className:"w-full min-w-(--radix-popover-trigger-width) p-0",align:"start",children:(0,a.jsxs)(ma,{filter:p,shouldFilter:q,children:[H,Q]})}),e[73]=p,e[74]=q,e[75]=H,e[76]=Q,e[77]=ee):ee=e[77];let re;e[78]!==z||e[79]!==M||e[80]!==Z||e[81]!==ee?(re=(0,a.jsxs)(oa,{open:z,onOpenChange:M,children:[Z,ee]}),e[78]=z,e[79]=M,e[80]=Z,e[81]=ee,e[82]=re):re=e[82];let ae;e[83]!==$||e[84]!==n||e[85]!==d||e[86]!==J||e[87]!==k||e[88]!==b?(ae=k&&$&&(0,a.jsx)("div",{className:I("flex flex-col gap-1 items-start",n),children:Array.isArray(b)&&b.map(_=>_==null?null:(0,a.jsxs)(Ur,{variant:"secondary",children:[(d==null?void 0:d(_))??String(_),(0,a.jsx)(wr,{onClick:()=>{J(_)},className:"w-3 h-3 opacity-50 hover:opacity-100 ml-1 cursor-pointer"})]},String(_)))}),e[83]=$,e[84]=n,e[85]=d,e[86]=J,e[87]=k,e[88]=b,e[89]=ae):ae=e[89];let fe;return e[90]!==j||e[91]!==re||e[92]!==ae?(fe=(0,a.jsxs)("div",{className:me,...j,children:[re,ae]}),e[90]=j,e[91]=re,e[92]=ae,e[93]=fe):fe=e[93],fe},je=w.forwardRef((t,e)=>{let r=(0,We.c)(17),{children:n,className:l,value:o,onSelect:i,disabled:d}=t,p=typeof o=="object"&&"value"in o?o.value:String(o),s=w.use(Xe),c;r[0]===l?c=r[1]:(c=I("pl-6 m-1 py-1",l),r[0]=l,r[1]=c);let u;r[2]!==s||r[3]!==i||r[4]!==o?(u=()=>{s.onSelect(o),i==null||i(o)},r[2]=s,r[3]=i,r[4]=o,r[5]=u):u=r[5];let f;r[6]!==s||r[7]!==o?(f=s.isSelected(o)&&(0,a.jsx)($r,{className:"absolute left-1 h-4 w-4"}),r[6]=s,r[7]=o,r[8]=f):f=r[8];let h;return r[9]!==n||r[10]!==d||r[11]!==e||r[12]!==c||r[13]!==u||r[14]!==f||r[15]!==p?(h=(0,a.jsxs)(ca,{ref:e,className:c,role:"option",value:p,disabled:d,onSelect:u,children:[f,n]}),r[9]=n,r[10]=d,r[11]=e,r[12]=c,r[13]=u,r[14]=f,r[15]=p,r[16]=h):h=r[16],h});je.displayName="ComboboxItem";const D={of(t){return JSON.stringify(t)},parse(t){if(!t)return{};try{return JSON.parse(t)}catch{return{label:t}}}};function Ye(){return Math.floor(Math.random()*1e5)}var $e="Radio",[ha,Qe]=Ze($e),[xa,ja]=ha($e),er=w.forwardRef((t,e)=>{let{__scopeRadio:r,name:n,checked:l=!1,required:o,disabled:i,value:d="on",onCheck:p,form:s,...c}=t,[u,f]=w.useState(null),h=Ae(e,x=>f(x)),m=w.useRef(!1),j=u?s||!!u.closest("form"):!0;return(0,a.jsxs)(xa,{scope:r,checked:l,disabled:i,children:[(0,a.jsx)(xe.button,{type:"button",role:"radio","aria-checked":l,"data-state":sr(l),"data-disabled":i?"":void 0,disabled:i,value:d,...c,ref:h,onClick:Pe(t.onClick,x=>{l||(p==null||p()),j&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),j&&(0,a.jsx)(tr,{control:u,bubbles:!m.current,name:n,value:d,checked:l,required:o,disabled:i,form:s,style:{transform:"translateX(-100%)"}})]})});er.displayName=$e;var rr="RadioIndicator",ar=w.forwardRef((t,e)=>{let{__scopeRadio:r,forceMount:n,...l}=t,o=ja(rr,r);return(0,a.jsx)(Zr,{present:n||o.checked,children:(0,a.jsx)(xe.span,{"data-state":sr(o.checked),"data-disabled":o.disabled?"":void 0,...l,ref:e})})});ar.displayName=rr;var va="RadioBubbleInput",tr=w.forwardRef(({__scopeRadio:t,control:e,checked:r,bubbles:n=!0,...l},o)=>{let i=w.useRef(null),d=Ae(i,o),p=Xr(r),s=aa(e);return w.useEffect(()=>{let c=i.current;if(!c)return;let u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(p!==r&&f){let h=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(h)}},[p,r,n]),(0,a.jsx)(xe.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...l,tabIndex:-1,ref:d,style:{...l.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});tr.displayName=va;function sr(t){return t?"checked":"unchecked"}var ga=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ve="RadioGroup",[ba,pt]=Ze(ve,[Ke,Qe]),nr=Ke(),lr=Qe(),[ya,wa]=ba(ve),or=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,name:n,defaultValue:l,value:o,required:i=!1,disabled:d=!1,orientation:p,dir:s,loop:c=!0,onValueChange:u,...f}=t,h=nr(r),m=sa(s),[j,x]=Ee({prop:o,defaultProp:l??null,onChange:u,caller:ve});return(0,a.jsx)(ya,{scope:r,name:n,required:i,disabled:d,value:j,onValueChange:x,children:(0,a.jsx)(qr,{asChild:!0,...h,orientation:p,dir:m,loop:c,children:(0,a.jsx)(xe.div,{role:"radiogroup","aria-required":i,"aria-orientation":p,"data-disabled":d?"":void 0,dir:m,...f,ref:e})})})});or.displayName=ve;var ir="RadioGroupItem",cr=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,disabled:n,...l}=t,o=wa(ir,r),i=o.disabled||n,d=nr(r),p=lr(r),s=w.useRef(null),c=Ae(e,s),u=o.value===l.value,f=w.useRef(!1);return w.useEffect(()=>{let h=j=>{ga.includes(j.key)&&(f.current=!0)},m=()=>f.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)}},[]),(0,a.jsx)(Gr,{asChild:!0,...d,focusable:!i,active:u,children:(0,a.jsx)(er,{disabled:i,required:o.required,checked:u,...p,...l,name:o.name,ref:c,onCheck:()=>o.onValueChange(l.value),onKeyDown:Pe(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Pe(l.onFocus,()=>{var h;f.current&&((h=s.current)==null||h.click())})})})});cr.displayName=ir;var Na="RadioGroupIndicator",dr=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,...n}=t;return(0,a.jsx)(ar,{...lr(r),...n,ref:e})});dr.displayName=Na;var ur=or,mr=cr,Ca=dr,pr=he(),Ie=w.forwardRef((t,e)=>{let r=(0,pr.c)(9),n,l;r[0]===t?(n=r[1],l=r[2]):({className:n,...l}=t,r[0]=t,r[1]=n,r[2]=l);let o;r[3]===n?o=r[4]:(o=I("grid gap-2",n),r[3]=n,r[4]=o);let i;return r[5]!==l||r[6]!==e||r[7]!==o?(i=(0,a.jsx)(ur,{className:o,...l,ref:e}),r[5]=l,r[6]=e,r[7]=o,r[8]=i):i=r[8],i});Ie.displayName=ur.displayName;var qe=w.forwardRef((t,e)=>{let r=(0,pr.c)(10),n,l;if(r[0]!==t){let{className:p,children:s,...c}=t;n=p,l=c,r[0]=t,r[1]=n,r[2]=l}else n=r[1],l=r[2];let o;r[3]===n?o=r[4]:(o=I("h-[16px] w-[16px] transition-shadow data-[state=unchecked]:shadow-xs-solid rounded-full border border-input text-primary ring-offset-background focus:outline-hidden focus:shadow-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:shadow-none",n),r[3]=n,r[4]=o);let i;r[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)(Ca,{className:"flex items-center justify-center",children:(0,a.jsx)(Fr,{className:"h-[10px] w-[10px] fill-primary text-current"})}),r[5]=i):i=r[5];let d;return r[6]!==l||r[7]!==e||r[8]!==o?(d=(0,a.jsx)(mr,{ref:e,className:o,...l,children:i}),r[6]=l,r[7]=e,r[8]=o,r[9]=d):d=r[9],d});qe.displayName=mr.displayName;function ka(t){return t instanceof Re.ZodArray}function fr(t){return t instanceof Re.ZodPipe}function Sa(t){return t instanceof Re.ZodTuple}function hr(t){return"unwrap"in t?t.unwrap():t}function ge(t){let e=r=>{if(r instanceof le){let n=[...r.values];return r.values.size===1?n[0]:n}if(r instanceof Je){let n=r.def.defaultValue;return typeof n=="function"?n():n}if(fr(r))return e(r.in);if(Sa(r))return r.def.items.map(n=>e(n));if("unwrap"in r)return e(hr(r))};return t instanceof Oe||t instanceof ke?e(t.options[0]):ka(t)?_a(t)?[ge(t.element)]:[]:t instanceof Te?"":t instanceof Se?t.options[0]:t instanceof _e?Object.fromEntries(Object.entries(t.shape).map(([r,n])=>[r,e(n)])):e(t)}function te(t){if(t instanceof le)return t;if(t instanceof _e){let e=t.shape.type;if(e instanceof le)return e;throw Error("Invalid schema")}if(t instanceof Oe||t instanceof ke)return te(t.options[0]);throw Vr.warn(t),Error("Invalid schema")}function _a(t){return!t.safeParse([]).success}var xr=he(),jr=`
|
|
1
|
+
import{s as Me}from"./chunk-LvLJmgfZ.js";import{t as yr}from"./react-Bj1aDYRI.js";import{G as ze,Gn as wr,St as Nr}from"./cells-DbD2lYze.js";import{_ as Te,c as Cr,d as ke,f as Se,g as kr,h as _e,l as Sr,m as _r,o as Rr,p as le,s as Or,t as Re,u as Je,y as Oe}from"./zod-H_cgTO0M.js";import{t as he}from"./compiler-runtime-B3qBwwSJ.js";import{a as Ar,d as Vr,f as Er}from"./hotkeys-BHHWjLlp.js";import{r as Ae}from"./useEventListener-Cb-RVVEn.js";import{t as Pr}from"./jsx-runtime-ZmTK25f3.js";import{r as Lr,t as Be}from"./button-CZ3Cs4qb.js";import{t as I}from"./cn-BKtXLv3a.js";import{t as $r}from"./check-Dr3SxUsb.js";import{r as Ir}from"./x-ZP5cObgf.js";import{M as qr,N as Ke,P as Fr,j as Gr}from"./dropdown-menu-BUgFWmX1.js";import{t as Dr}from"./plus-B7DF33lD.js";import{t as Mr}from"./refresh-ccw-DN_xCV6A.js";import{n as zr,t as Ve}from"./input-DHHmNa19.js";import{a as V,c as R,d as E,h as Tr,l as P,m as Jr,o as A,r as Ue,u as S,y as Br}from"./textarea-B9TY02t9.js";import{t as Kr}from"./trash-2-B8SQYdQq.js";import{t as Ur}from"./badge-D4keL3YC.js";import{E as Ze,S as Ee,_ as xe,w as Pe,x as Zr}from"./Combination-izwufzWe.js";import{c as Hr,i as He,l as Wr,m as Xr,n as Yr,r as Qr,s as ea,t as ra}from"./select-B7bfltkI.js";import{l as aa}from"./dist-DDGMbl6p.js";import{t as ta}from"./tooltip-C_WgOOcZ.js";import{u as sa}from"./menu-items-vwmjPhjW.js";import{i as na,r as la,t as oa}from"./popover-B-131r4d.js";import{a as ia,o as ca,r as da,s as ua,t as ma}from"./command-BpjkI15h.js";import{t as pa}from"./label-C--1sWU6.js";import{t as fa}from"./toggle-CriARMQK.js";var We=he(),w=Me(yr(),1),a=Me(Pr(),1);const Xe=(0,w.createContext)({isSelected:()=>!1,onSelect:Er.NOOP}),Le=t=>{let e=(0,We.c)(94),r,n,l,o,i,d,p,s,c,u,f,h,m,j,x,g,v,y,N,C,O;e[0]===t?(r=e[1],n=e[2],l=e[3],o=e[4],i=e[5],d=e[6],p=e[7],s=e[8],c=e[9],u=e[10],f=e[11],h=e[12],m=e[13],j=e[14],x=e[15],g=e[16],v=e[17],y=e[18],N=e[19],C=e[20],O=e[21]):({children:r,displayValue:d,className:l,placeholder:m,value:O,defaultValue:i,onValueChange:f,multiple:g,shouldFilter:v,filterFn:p,open:h,defaultOpen:o,onOpenChange:c,inputPlaceholder:y,search:x,onSearchChange:u,emptyState:N,chips:C,chipsClassName:n,keepPopoverOpenOnSelect:s,...j}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=l,e[4]=o,e[5]=i,e[6]=d,e[7]=p,e[8]=s,e[9]=c,e[10]=u,e[11]=f,e[12]=h,e[13]=m,e[14]=j,e[15]=x,e[16]=g,e[17]=v,e[18]=y,e[19]=N,e[20]=C,e[21]=O);let k=g===void 0?!1:g,q=v===void 0?!0:v,F=y===void 0?"Search...":y,ne=N===void 0?"Nothing found.":N,$=C===void 0?!1:C,ye=o??!1,oe;e[22]!==c||e[23]!==h||e[24]!==ye?(oe={prop:h,defaultProp:ye,onChange:c},e[22]=c,e[23]=h,e[24]=ye,e[25]=oe):oe=e[25];let[Ge,M]=Ee(oe),z=Ge===void 0?!1:Ge,T;e[26]===f?T=e[27]:(T=_=>{f==null||f(_)},e[26]=f,e[27]=T);let ie;e[28]!==i||e[29]!==T||e[30]!==O?(ie={prop:O,defaultProp:i,onChange:T},e[28]=i,e[29]=T,e[30]=O,e[31]=ie):ie=e[31];let[b,we]=Ee(ie),ce;e[32]===b?ce=e[33]:(ce=_=>Array.isArray(b)?b.includes(_):b===_,e[32]=b,e[33]=ce);let Ne=ce,de;e[34]!==s||e[35]!==k||e[36]!==M||e[37]!==we||e[38]!==b?(de=_=>{let G=_;if(k)if(Array.isArray(b))if(b.includes(G)){let De=b.filter(br=>br!==_);G=De.length>0?De:[]}else G=[...b,G];else G=[G];else b===_&&(G=null);we(G),(s??k)||M(!1)},e[34]=s,e[35]=k,e[36]=M,e[37]=we,e[38]=b,e[39]=de):de=e[39];let J=de,ue;e[40]!==$||e[41]!==d||e[42]!==k||e[43]!==m||e[44]!==b?(ue=()=>k&&$&&m?m:b==null?m??"--":Array.isArray(b)?b.length===0?m??"--":b.length===1&&d!==void 0?d(b[0]):`${b.length} selected`:d===void 0?m??"--":d(b),e[40]=$,e[41]=d,e[42]=k,e[43]=m,e[44]=b,e[45]=ue):ue=e[45];let Ce=ue,me;e[46]===Symbol.for("react.memo_cache_sentinel")?(me=I("relative"),e[46]=me):me=e[46];let B;e[47]===l?B=e[48]:(B=I("flex h-6 w-fit mb-1 shadow-xs-solid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-sm-solid focus:outline-hidden focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-md-solid disabled:cursor-not-allowed disabled:opacity-50",l),e[47]=l,e[48]=B);let K;e[49]===Ce?K=e[50]:(K=Ce(),e[49]=Ce,e[50]=K);let U;e[51]===K?U=e[52]:(U=(0,a.jsx)("span",{className:"truncate flex-1 min-w-0",children:K}),e[51]=K,e[52]=U);let pe;e[53]===Symbol.for("react.memo_cache_sentinel")?(pe=(0,a.jsx)(Ir,{className:"ml-3 w-4 h-4 opacity-50 shrink-0"}),e[53]=pe):pe=e[53];let Z;e[54]!==z||e[55]!==B||e[56]!==U?(Z=(0,a.jsx)(na,{asChild:!0,children:(0,a.jsxs)("div",{className:B,"aria-expanded":z,children:[U,pe]})}),e[54]=z,e[55]=B,e[56]=U,e[57]=Z):Z=e[57];let H;e[58]!==F||e[59]!==u||e[60]!==x?(H=(0,a.jsx)(ia,{placeholder:F,rootClassName:"px-1 h-8",autoFocus:!0,value:x,onValueChange:u}),e[58]=F,e[59]=u,e[60]=x,e[61]=H):H=e[61];let W;e[62]===ne?W=e[63]:(W=(0,a.jsx)(da,{children:ne}),e[62]=ne,e[63]=W);let X;e[64]!==J||e[65]!==Ne?(X={isSelected:Ne,onSelect:J},e[64]=J,e[65]=Ne,e[66]=X):X=e[66];let Y;e[67]!==r||e[68]!==X?(Y=(0,a.jsx)(Xe,{value:X,children:r}),e[67]=r,e[68]=X,e[69]=Y):Y=e[69];let Q;e[70]!==W||e[71]!==Y?(Q=(0,a.jsxs)(ua,{className:"max-h-60 py-.5",children:[W,Y]}),e[70]=W,e[71]=Y,e[72]=Q):Q=e[72];let ee;e[73]!==p||e[74]!==q||e[75]!==H||e[76]!==Q?(ee=(0,a.jsx)(la,{className:"w-full min-w-(--radix-popover-trigger-width) p-0",align:"start",children:(0,a.jsxs)(ma,{filter:p,shouldFilter:q,children:[H,Q]})}),e[73]=p,e[74]=q,e[75]=H,e[76]=Q,e[77]=ee):ee=e[77];let re;e[78]!==z||e[79]!==M||e[80]!==Z||e[81]!==ee?(re=(0,a.jsxs)(oa,{open:z,onOpenChange:M,children:[Z,ee]}),e[78]=z,e[79]=M,e[80]=Z,e[81]=ee,e[82]=re):re=e[82];let ae;e[83]!==$||e[84]!==n||e[85]!==d||e[86]!==J||e[87]!==k||e[88]!==b?(ae=k&&$&&(0,a.jsx)("div",{className:I("flex flex-col gap-1 items-start",n),children:Array.isArray(b)&&b.map(_=>_==null?null:(0,a.jsxs)(Ur,{variant:"secondary",children:[(d==null?void 0:d(_))??String(_),(0,a.jsx)(wr,{onClick:()=>{J(_)},className:"w-3 h-3 opacity-50 hover:opacity-100 ml-1 cursor-pointer"})]},String(_)))}),e[83]=$,e[84]=n,e[85]=d,e[86]=J,e[87]=k,e[88]=b,e[89]=ae):ae=e[89];let fe;return e[90]!==j||e[91]!==re||e[92]!==ae?(fe=(0,a.jsxs)("div",{className:me,...j,children:[re,ae]}),e[90]=j,e[91]=re,e[92]=ae,e[93]=fe):fe=e[93],fe},je=w.forwardRef((t,e)=>{let r=(0,We.c)(17),{children:n,className:l,value:o,onSelect:i,disabled:d}=t,p=typeof o=="object"&&"value"in o?o.value:String(o),s=w.use(Xe),c;r[0]===l?c=r[1]:(c=I("pl-6 m-1 py-1",l),r[0]=l,r[1]=c);let u;r[2]!==s||r[3]!==i||r[4]!==o?(u=()=>{s.onSelect(o),i==null||i(o)},r[2]=s,r[3]=i,r[4]=o,r[5]=u):u=r[5];let f;r[6]!==s||r[7]!==o?(f=s.isSelected(o)&&(0,a.jsx)($r,{className:"absolute left-1 h-4 w-4"}),r[6]=s,r[7]=o,r[8]=f):f=r[8];let h;return r[9]!==n||r[10]!==d||r[11]!==e||r[12]!==c||r[13]!==u||r[14]!==f||r[15]!==p?(h=(0,a.jsxs)(ca,{ref:e,className:c,role:"option",value:p,disabled:d,onSelect:u,children:[f,n]}),r[9]=n,r[10]=d,r[11]=e,r[12]=c,r[13]=u,r[14]=f,r[15]=p,r[16]=h):h=r[16],h});je.displayName="ComboboxItem";const D={of(t){return JSON.stringify(t)},parse(t){if(!t)return{};try{return JSON.parse(t)}catch{return{label:t}}}};function Ye(){return Math.floor(Math.random()*1e5)}var $e="Radio",[ha,Qe]=Ze($e),[xa,ja]=ha($e),er=w.forwardRef((t,e)=>{let{__scopeRadio:r,name:n,checked:l=!1,required:o,disabled:i,value:d="on",onCheck:p,form:s,...c}=t,[u,f]=w.useState(null),h=Ae(e,x=>f(x)),m=w.useRef(!1),j=u?s||!!u.closest("form"):!0;return(0,a.jsxs)(xa,{scope:r,checked:l,disabled:i,children:[(0,a.jsx)(xe.button,{type:"button",role:"radio","aria-checked":l,"data-state":sr(l),"data-disabled":i?"":void 0,disabled:i,value:d,...c,ref:h,onClick:Pe(t.onClick,x=>{l||(p==null||p()),j&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),j&&(0,a.jsx)(tr,{control:u,bubbles:!m.current,name:n,value:d,checked:l,required:o,disabled:i,form:s,style:{transform:"translateX(-100%)"}})]})});er.displayName=$e;var rr="RadioIndicator",ar=w.forwardRef((t,e)=>{let{__scopeRadio:r,forceMount:n,...l}=t,o=ja(rr,r);return(0,a.jsx)(Zr,{present:n||o.checked,children:(0,a.jsx)(xe.span,{"data-state":sr(o.checked),"data-disabled":o.disabled?"":void 0,...l,ref:e})})});ar.displayName=rr;var va="RadioBubbleInput",tr=w.forwardRef(({__scopeRadio:t,control:e,checked:r,bubbles:n=!0,...l},o)=>{let i=w.useRef(null),d=Ae(i,o),p=Xr(r),s=aa(e);return w.useEffect(()=>{let c=i.current;if(!c)return;let u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(p!==r&&f){let h=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(h)}},[p,r,n]),(0,a.jsx)(xe.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...l,tabIndex:-1,ref:d,style:{...l.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});tr.displayName=va;function sr(t){return t?"checked":"unchecked"}var ga=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ve="RadioGroup",[ba,pt]=Ze(ve,[Ke,Qe]),nr=Ke(),lr=Qe(),[ya,wa]=ba(ve),or=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,name:n,defaultValue:l,value:o,required:i=!1,disabled:d=!1,orientation:p,dir:s,loop:c=!0,onValueChange:u,...f}=t,h=nr(r),m=sa(s),[j,x]=Ee({prop:o,defaultProp:l??null,onChange:u,caller:ve});return(0,a.jsx)(ya,{scope:r,name:n,required:i,disabled:d,value:j,onValueChange:x,children:(0,a.jsx)(qr,{asChild:!0,...h,orientation:p,dir:m,loop:c,children:(0,a.jsx)(xe.div,{role:"radiogroup","aria-required":i,"aria-orientation":p,"data-disabled":d?"":void 0,dir:m,...f,ref:e})})})});or.displayName=ve;var ir="RadioGroupItem",cr=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,disabled:n,...l}=t,o=wa(ir,r),i=o.disabled||n,d=nr(r),p=lr(r),s=w.useRef(null),c=Ae(e,s),u=o.value===l.value,f=w.useRef(!1);return w.useEffect(()=>{let h=j=>{ga.includes(j.key)&&(f.current=!0)},m=()=>f.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)}},[]),(0,a.jsx)(Gr,{asChild:!0,...d,focusable:!i,active:u,children:(0,a.jsx)(er,{disabled:i,required:o.required,checked:u,...p,...l,name:o.name,ref:c,onCheck:()=>o.onValueChange(l.value),onKeyDown:Pe(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Pe(l.onFocus,()=>{var h;f.current&&((h=s.current)==null||h.click())})})})});cr.displayName=ir;var Na="RadioGroupIndicator",dr=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,...n}=t;return(0,a.jsx)(ar,{...lr(r),...n,ref:e})});dr.displayName=Na;var ur=or,mr=cr,Ca=dr,pr=he(),Ie=w.forwardRef((t,e)=>{let r=(0,pr.c)(9),n,l;r[0]===t?(n=r[1],l=r[2]):({className:n,...l}=t,r[0]=t,r[1]=n,r[2]=l);let o;r[3]===n?o=r[4]:(o=I("grid gap-2",n),r[3]=n,r[4]=o);let i;return r[5]!==l||r[6]!==e||r[7]!==o?(i=(0,a.jsx)(ur,{className:o,...l,ref:e}),r[5]=l,r[6]=e,r[7]=o,r[8]=i):i=r[8],i});Ie.displayName=ur.displayName;var qe=w.forwardRef((t,e)=>{let r=(0,pr.c)(10),n,l;if(r[0]!==t){let{className:p,children:s,...c}=t;n=p,l=c,r[0]=t,r[1]=n,r[2]=l}else n=r[1],l=r[2];let o;r[3]===n?o=r[4]:(o=I("h-[16px] w-[16px] transition-shadow data-[state=unchecked]:shadow-xs-solid rounded-full border border-input text-primary ring-offset-background focus:outline-hidden focus:shadow-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:shadow-none",n),r[3]=n,r[4]=o);let i;r[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)(Ca,{className:"flex items-center justify-center",children:(0,a.jsx)(Fr,{className:"h-[10px] w-[10px] fill-primary text-current"})}),r[5]=i):i=r[5];let d;return r[6]!==l||r[7]!==e||r[8]!==o?(d=(0,a.jsx)(mr,{ref:e,className:o,...l,children:i}),r[6]=l,r[7]=e,r[8]=o,r[9]=d):d=r[9],d});qe.displayName=mr.displayName;function ka(t){return t instanceof Re.ZodArray}function fr(t){return t instanceof Re.ZodPipe}function Sa(t){return t instanceof Re.ZodTuple}function hr(t){return"unwrap"in t?t.unwrap():t}function ge(t){let e=r=>{if(r instanceof le){let n=[...r.values];return r.values.size===1?n[0]:n}if(r instanceof Je){let n=r.def.defaultValue;return typeof n=="function"?n():n}if(fr(r))return e(r.in);if(Sa(r))return r.def.items.map(n=>e(n));if("unwrap"in r)return e(hr(r))};return t instanceof Oe||t instanceof ke?e(t.options[0]):ka(t)?_a(t)?[ge(t.element)]:[]:t instanceof Te?"":t instanceof Se?t.options[0]:t instanceof _e?Object.fromEntries(Object.entries(t.shape).map(([r,n])=>[r,e(n)])):e(t)}function te(t){if(t instanceof le)return t;if(t instanceof _e){let e=t.shape.type;if(e instanceof le)return e;throw Error("Invalid schema")}if(t instanceof Oe||t instanceof ke)return te(t.options[0]);throw Vr.warn(t),Error("Invalid schema")}function _a(t){return!t.safeParse([]).success}var xr=he(),jr=`
|
|
2
2
|
`;const vr=t=>{let e=(0,xr.c)(24),{value:r,options:n,onChange:l,className:o,placeholder:i,textAreaClassName:d,comboBoxClassName:p}=t,[s,c]=(0,w.useState)(!1),u;e[0]===r?u=e[1]:(u=be(r),e[0]=r,e[1]=u);let f=u,h;e[2]!==p||e[3]!==l||e[4]!==n||e[5]!==i||e[6]!==s||e[7]!==d||e[8]!==f?(h=()=>s?(0,a.jsx)(Fe,{value:f,className:d,onChange:l,placeholder:i?`${i}: one per line`:"One value per line"}):(0,a.jsx)(Le,{placeholder:i,displayValue:Ra,className:I("w-full max-w-[400px]",p),multiple:!0,value:f,onValueChange:l,keepPopoverOpenOnSelect:!0,chips:!0,chipsClassName:"flex-row flex-wrap min-w-[210px]",children:n.map(Oa)}),e[2]=p,e[3]=l,e[4]=n,e[5]=i,e[6]=s,e[7]=d,e[8]=f,e[9]=h):h=e[9];let m=h,j;e[10]===o?j=e[11]:(j=I("flex gap-1",o),e[10]=o,e[11]=j);let x;e[12]===m?x=e[13]:(x=m(),e[12]=m,e[13]=x);let g=s?"Switch to multi-select":"Switch to textarea",v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)(Br,{className:"w-3 h-3"}),e[14]=v):v=e[14];let y;e[15]===s?y=e[16]:(y=(0,a.jsx)(fa,{size:"xs",onPressedChange:c,pressed:s,children:v}),e[15]=s,e[16]=y);let N;e[17]!==g||e[18]!==y?(N=(0,a.jsx)(ta,{content:g,children:y}),e[17]=g,e[18]=y,e[19]=N):N=e[19];let C;return e[20]!==j||e[21]!==x||e[22]!==N?(C=(0,a.jsxs)("div",{className:j,children:[x,N]}),e[20]=j,e[21]=x,e[22]=N,e[23]=C):C=e[23],C},Fe=t=>{let e=(0,xr.c)(11),{className:r,value:n,onChange:l,placeholder:o}=t,i,d;if(e[0]!==n){let u=be(n);i=Ue,d=u.join(jr),e[0]=n,e[1]=i,e[2]=d}else i=e[1],d=e[2];let p;e[3]===l?p=e[4]:(p=u=>{if(u.target.value===""){l([]);return}l(u.target.value.split(jr))},e[3]=l,e[4]=p);let s=o?`${o}: one per line`:"One value per line",c;return e[5]!==i||e[6]!==r||e[7]!==d||e[8]!==p||e[9]!==s?(c=(0,a.jsx)(i,{value:d,className:r,rows:4,onChange:p,placeholder:s}),e[5]=i,e[6]=r,e[7]=d,e[8]=p,e[9]=s,e[10]=c):c=e[10],c};function be(t){return t==null?[]:Array.isArray(t)?t:[t].filter(e=>e!=null||e!=="")}function Ra(t){return t}function Oa(t){return(0,a.jsx)(je,{value:t,children:t},t)}var se=he();const Aa=t=>{let e=(0,se.c)(11),{schema:r,form:n,path:l,renderers:o,children:i}=t,d=l===void 0?"":l,p;e[0]===o?p=e[1]:(p=o===void 0?[]:o,e[0]=o,e[1]=p);let s=p,c;e[2]!==n||e[3]!==d||e[4]!==s||e[5]!==r?(c=L(r,n,d,s),e[2]=n,e[3]=d,e[4]=s,e[5]=r,e[6]=c):c=e[6];let u;return e[7]!==i||e[8]!==n||e[9]!==c?(u=(0,a.jsxs)(Jr,{...n,children:[i,c]}),e[7]=i,e[8]=n,e[9]=c,e[10]=u):u=e[10],u};function L(t,e,r,n){for(let s of n){let{isMatch:c,Component:u}=s;if(c(t))return(0,a.jsx)(u,{schema:t,form:e,path:r})}let{label:l,description:o,special:i,direction:d="column",minLength:p}=D.parse(t.description||"");if(t instanceof Je){let s=t.unwrap();return s=!s.description&&t.description?s.describe(t.description):s,L(s,e,r,n)}if(t instanceof kr){let s=t.unwrap();return s=!s.description&&t.description?s.describe(t.description):s,L(s,e,r,n)}if(t instanceof _e)return(0,a.jsxs)("div",{className:I("flex",d==="row"?"flex-row gap-6 items-start":d==="two-columns"?"grid grid-cols-2 gap-y-6":"flex-col gap-6"),children:[(0,a.jsx)(S,{children:l}),Ar.entries(t.shape).map(([s,c])=>{let u=c instanceof le,f=L(c,e,$a(r,s),n);return u?(0,a.jsx)(w.Fragment,{children:f},s):(0,a.jsx)("div",{className:"flex flex-row align-start",children:f},s)})]});if(t instanceof Te)return i==="time"?(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(V,{children:(0,a.jsx)(Ve,{...s,onValueChange:s.onChange,type:"time",className:"my-0"})}),(0,a.jsx)(E,{})]})}):(0,a.jsx)(gr,{schema:t,form:e,path:r});if(t instanceof Cr)return(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsxs)(P,{children:[(0,a.jsxs)("div",{className:"flex flex-row items-start space-x-2",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(V,{children:(0,a.jsx)(Nr,{"data-testid":"marimo-plugin-data-frames-boolean-checkbox",checked:s.value,onCheckedChange:s.onChange})})]}),(0,a.jsx)(E,{})]})});if(t instanceof _r)return i==="random_number_button"?(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsxs)(Be,{size:"xs","data-testid":"marimo-plugin-data-frames-random-number-button",variant:"secondary",onClick:()=>{s.onChange(Ye())},children:[(0,a.jsx)(Mr,{className:"w-3.5 h-3.5 mr-1"}),l]})}):(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(V,{children:(0,a.jsx)(zr,{...s,className:"my-0",onValueChange:s.onChange})}),(0,a.jsx)(E,{})]})});if(t instanceof Sr){let s=i==="datetime"?"datetime-local":i==="time"?"time":"date";return(0,a.jsx)(R,{control:e.control,name:r,render:({field:c})=>(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(V,{children:(0,a.jsx)(Ve,{...c,onValueChange:c.onChange,type:s,className:"my-0"})}),(0,a.jsx)(E,{})]})})}if(t instanceof Rr)return(0,a.jsx)(gr,{schema:t,form:e,path:r});if(t instanceof Se)return(0,a.jsx)(Pa,{schema:t,form:e,path:r,options:t.options.map(s=>s.toString())});if(t instanceof Or){if(i==="text_area_multiline")return(0,a.jsx)(Ea,{schema:t,form:e,path:r});let s=t.element;return s instanceof Se?(0,a.jsx)(La,{schema:t,form:e,path:r,itemLabel:l,options:s.options.map(c=>c.toString())}):(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)(pa,{children:l}),(0,a.jsx)(Va,{schema:t.element,form:e,path:r,minLength:p,renderers:n},r)]})}if(t instanceof ke){let s=t.def,c=s.options,u=s.discriminator,f=h=>c.find(m=>te(m).value===h);return(0,a.jsx)(R,{control:e.control,name:r,render:({field:h})=>{let m=h.value,j=c.map(v=>te(v).value),x=m&&typeof m=="object"&&u in m?m[u]:j[0],g=f(x);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)("div",{className:"flex border-b mb-4 -mt-2",children:j.map(v=>(0,a.jsx)("button",{type:"button",className:`px-4 py-2 ${x===v?"border-b-2 border-primary font-medium":"text-muted-foreground"}`,onClick:()=>{let y=f(v);y?h.onChange(ge(y)):h.onChange({[u]:v})},children:v},v))}),(0,a.jsx)("div",{className:"flex flex-col",children:g&&L(g,e,r,n)},x)]})}})}return t instanceof Oe?(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>{let c=t.options,u=s.value,f=c.map(m=>te(m).value);u||(u=f[0]);let h=c.find(m=>te(m).value===u);return(0,a.jsxs)("div",{className:"flex flex-col mb-4 gap-1",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(Wr,{"data-testid":"marimo-plugin-data-frames-union-select",...s,children:f.map(m=>(0,a.jsx)("option",{value:m,children:m},m))}),h&&L(h,e,r,n)]})}}):t instanceof le?(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsx)("input",{...s,type:"hidden",value:String([...t.values][0]??"")})}):"unwrap"in t?L(hr(t),e,r,n):fr(t)?L(t.in,e,r,n):(0,a.jsxs)("div",{children:["Unknown schema type"," ",t==null?r:JSON.stringify(t.type??t)]})}var Va=t=>{let e=(0,se.c)(39),{schema:r,form:n,path:l,minLength:o,renderers:i}=t,d;e[0]===r.description?d=e[1]:(d=D.parse(r.description||""),e[0]=r.description,e[1]=d);let{label:p,description:s}=d,c=n.control,u;e[2]!==c||e[3]!==l?(u={control:c,name:l},e[2]=c,e[3]=l,e[4]=u):u=e[4];let{fields:f,append:h,remove:m}=Tr(u),j=o!=null&&f.length<o,x=o==null||f.length>o,g;e[5]===p?g=e[6]:(g=(0,a.jsx)(S,{children:p}),e[5]=p,e[6]=g);let v;e[7]===s?v=e[8]:(v=(0,a.jsx)(A,{children:s}),e[7]=s,e[8]=v);let y;if(e[9]!==x||e[10]!==f||e[11]!==n||e[12]!==l||e[13]!==m||e[14]!==i||e[15]!==r){let F;e[17]!==x||e[18]!==n||e[19]!==l||e[20]!==m||e[21]!==i||e[22]!==r?(F=(ne,$)=>(0,a.jsxs)("div",{className:"flex flex-row pl-2 ml-2 border-l-2 border-disabled hover-actions-parent relative pr-5 pt-1 items-center w-fit",onKeyDown:Lr.onEnter(Ia),children:[L(r,n,`${l}[${$}]`,i),x&&(0,a.jsx)(Kr,{className:"w-4 h-4 ml-2 my-1 text-muted-foreground hover:text-destructive cursor-pointer absolute right-0 top-5",onClick:()=>{m($)}})]},ne.id),e[17]=x,e[18]=n,e[19]=l,e[20]=m,e[21]=i,e[22]=r,e[23]=F):F=e[23],y=f.map(F),e[9]=x,e[10]=f,e[11]=n,e[12]=l,e[13]=m,e[14]=i,e[15]=r,e[16]=y}else y=e[16];let N;e[24]!==j||e[25]!==o?(N=j&&(0,a.jsx)("div",{className:"text-destructive text-xs font-semibold",children:(0,a.jsxs)("div",{children:["At least ",o," required."]})}),e[24]=j,e[25]=o,e[26]=N):N=e[26];let C;e[27]!==h||e[28]!==r?(C=()=>{h(ge(r))},e[27]=h,e[28]=r,e[29]=C):C=e[29];let O;e[30]===Symbol.for("react.memo_cache_sentinel")?(O=(0,a.jsx)(Dr,{className:"w-3.5 h-3.5 mr-1"}),e[30]=O):O=e[30];let k;e[31]===C?k=e[32]:(k=(0,a.jsx)("div",{children:(0,a.jsxs)(Be,{size:"xs","data-testid":"marimo-plugin-data-frames-add-array-item",variant:"text",className:"hover:text-accent-foreground",onClick:C,children:[O,"Add"]})}),e[31]=C,e[32]=k);let q;return e[33]!==g||e[34]!==v||e[35]!==y||e[36]!==N||e[37]!==k?(q=(0,a.jsxs)("div",{className:"flex flex-col gap-2 min-w-[220px]",children:[g,v,y,N,k]}),e[33]=g,e[34]=v,e[35]=y,e[36]=N,e[37]=k,e[38]=q):q=e[38],q},gr=t=>{let e=(0,se.c)(21),{schema:r,form:n,path:l}=t,o;e[0]===r.description?o=e[1]:(o=D.parse(r.description),e[0]=r.description,e[1]=o);let{label:i,description:d,placeholder:p,disabled:s,inputType:c}=o;if(c==="textarea"){let h;e[2]!==d||e[3]!==s||e[4]!==i||e[5]!==p?(h=j=>{let{field:x}=j;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(V,{children:(0,a.jsx)(Ue,{...x,value:x.value,onChange:x.onChange,className:"my-0",placeholder:p,disabled:s})}),(0,a.jsx)(E,{})]})},e[2]=d,e[3]=s,e[4]=i,e[5]=p,e[6]=h):h=e[6];let m;return e[7]!==n.control||e[8]!==l||e[9]!==h?(m=(0,a.jsx)(R,{control:n.control,name:l,render:h}),e[7]=n.control,e[8]=l,e[9]=h,e[10]=m):m=e[10],m}let u;e[11]!==d||e[12]!==s||e[13]!==c||e[14]!==i||e[15]!==p?(u=h=>{let{field:m}=h;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(V,{children:(0,a.jsx)(Ve,{...m,type:c,value:m.value,onValueChange:m.onChange,className:"my-0",placeholder:p,disabled:s})}),(0,a.jsx)(E,{})]})},e[11]=d,e[12]=s,e[13]=c,e[14]=i,e[15]=p,e[16]=u):u=e[16];let f;return e[17]!==n.control||e[18]!==l||e[19]!==u?(f=(0,a.jsx)(R,{control:n.control,name:l,render:u}),e[17]=n.control,e[18]=l,e[19]=u,e[20]=f):f=e[20],f},Ea=t=>{let e=(0,se.c)(10),{schema:r,form:n,path:l}=t,o;e[0]===r.description?o=e[1]:(o=D.parse(r.description),e[0]=r.description,e[1]=o);let{label:i,description:d,placeholder:p}=o,s;e[2]!==d||e[3]!==i||e[4]!==p?(s=u=>{let{field:f}=u;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(V,{children:(0,a.jsx)(Fe,{...f,placeholder:p})}),(0,a.jsx)(E,{})]})},e[2]=d,e[3]=i,e[4]=p,e[5]=s):s=e[5];let c;return e[6]!==n.control||e[7]!==l||e[8]!==s?(c=(0,a.jsx)(R,{control:n.control,name:l,render:s}),e[6]=n.control,e[7]=l,e[8]=s,e[9]=c):c=e[9],c},Pa=t=>{let e=(0,se.c)(22),{schema:r,form:n,path:l,options:o,textTransform:i}=t,d;e[0]===r.description?d=e[1]:(d=D.parse(r.description),e[0]=r.description,e[1]=d);let{label:p,description:s,disabled:c,special:u}=d;if(u==="radio_group"){let m;e[2]!==s||e[3]!==p||e[4]!==o||e[5]!==l?(m=x=>{let{field:g}=x;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:p}),(0,a.jsx)(A,{children:s}),(0,a.jsx)(V,{children:(0,a.jsx)(Ie,{className:"flex flex-row gap-2 pt-1 items-center",value:g.value,onValueChange:g.onChange,children:o.map(v=>(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(qe,{value:v,id:`${l}-${v}`},v),(0,a.jsx)(S,{className:"whitespace-pre",htmlFor:`${l}-${v}`,children:ze.startCase(v)})]},v))})}),(0,a.jsx)(E,{})]})},e[2]=s,e[3]=p,e[4]=o,e[5]=l,e[6]=m):m=e[6];let j;return e[7]!==c||e[8]!==n.control||e[9]!==l||e[10]!==m?(j=(0,a.jsx)(R,{control:n.control,name:l,disabled:c,render:m}),e[7]=c,e[8]=n.control,e[9]=l,e[10]=m,e[11]=j):j=e[11],j}let f;e[12]!==s||e[13]!==p||e[14]!==o||e[15]!==i?(f=m=>{let{field:j}=m;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{className:"whitespace-pre",children:p}),(0,a.jsx)(A,{children:s}),(0,a.jsx)(V,{children:(0,a.jsxs)(ra,{"data-testid":"marimo-plugin-data-frames-select",value:j.value,onValueChange:j.onChange,children:[(0,a.jsx)(ea,{className:"min-w-[180px]",children:(0,a.jsx)(Hr,{placeholder:"--"})}),(0,a.jsx)(Yr,{children:(0,a.jsxs)(Qr,{children:[o.map(x=>(0,a.jsx)(He,{value:x,children:(i==null?void 0:i(x))??x},x)),o.length===0&&(0,a.jsx)(He,{disabled:!0,value:"--",children:"No options"})]})})]})}),(0,a.jsx)(E,{})]})},e[12]=s,e[13]=p,e[14]=o,e[15]=i,e[16]=f):f=e[16];let h;return e[17]!==c||e[18]!==n.control||e[19]!==l||e[20]!==f?(h=(0,a.jsx)(R,{control:n.control,name:l,disabled:c,render:f}),e[17]=c,e[18]=n.control,e[19]=l,e[20]=f,e[21]=h):h=e[21],h},La=t=>{let e=(0,se.c)(15),{schema:r,form:n,path:l,options:o,itemLabel:i,showSwitchable:d}=t,p;e[0]===r.description?p=e[1]:(p=D.parse(r.description),e[0]=r.description,e[1]=p);let{label:s,description:c,placeholder:u}=p,f;e[2]!==i||e[3]!==u?(f=u??(i?`Select ${i==null?void 0:i.toLowerCase()}`:void 0),e[2]=i,e[3]=u,e[4]=f):f=e[4];let h=f,m;e[5]!==c||e[6]!==s||e[7]!==o||e[8]!==h||e[9]!==d?(m=x=>{let{field:g}=x,v=be(g.value);return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{className:"whitespace-pre",children:s}),(0,a.jsx)(A,{children:c}),(0,a.jsx)(V,{children:d?(0,a.jsx)(vr,{...g,value:v,options:o,placeholder:h}):(0,a.jsx)(Le,{className:"min-w-[180px]",placeholder:h,displayValue:qa,multiple:!0,chips:!0,keepPopoverOpenOnSelect:!0,value:v,onValueChange:g.onChange,children:o.map(Fa)})}),(0,a.jsx)(E,{})]})},e[5]=c,e[6]=s,e[7]=o,e[8]=h,e[9]=d,e[10]=m):m=e[10];let j;return e[11]!==n.control||e[12]!==l||e[13]!==m?(j=(0,a.jsx)(R,{control:n.control,name:l,render:m}),e[11]=n.control,e[12]=l,e[13]=m,e[14]=j):j=e[14],j};function $a(...t){return t.filter(e=>e!=="").join(".")}function Ia(t){return t.preventDefault()}function qa(t){return ze.startCase(t)}function Fa(t){return(0,a.jsx)(je,{value:t,children:t},t)}export{be as a,Ie as c,Ye as d,Le as f,Fe as i,qe as l,L as n,ge as o,je as p,vr as r,te as s,Aa as t,D as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as a}from"./tooltip-
|
|
1
|
+
import{o as a}from"./tooltip-DqsDDLgU.js";function o(r){function n(t){return!!(t!=null&&t.schema)&&Array.isArray(t.schema.fields)&&typeof t.toArray=="function"}return(n(r)?r:f(r)).toArray()}o.responseType="arrayBuffer";function f(r,n){return a(r,n??{useProxy:!0})}export{o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as b}from"./chunk-LvLJmgfZ.js";import"./useEvent-BhXAndur.js";import{t as y}from"./react-Bj1aDYRI.js";import"./react-dom-CSu739Rf.js";import"./compiler-runtime-B3qBwwSJ.js";import{t as P}from"./ErrorBoundary-B9Ifj8Jf.js";import{t as $}from"./jsx-runtime-ZmTK25f3.js";import{r as z}from"./requests-B4FYHTZl.js";import{t as N}from"./spinner-DA8-7wQv.js";import{lt as L,r as M}from"./input-DHHmNa19.js";import{n as c,t as R}from"./paths-Dfii2bN8.js";import{c as v,t as I}from"./session-fBtIbMpB.js";import"./Combination-izwufzWe.js";import{r as A}from"./errors-CPlNr33a.js";import{t as f}from"./error-banner-w4pz2qUB.js";import{n as D}from"./useAsyncData-CgmD3hjw.js";import{n as W,t as _}from"./card-DdlNjkEA.js";var p=b(y(),1),e=b($(),1),B=a=>a.charAt(0).toUpperCase()+a.slice(1).toLowerCase(),w=a=>{let o=R.guessDeliminator(a).deliminator;return a.replace(/\.[^./]+$/,"").split(o).filter(Boolean).map(d=>d.split(/[_-]/).map(B).join(" ")).join(" > ")},F=a=>`${I()}-${encodeURIComponent(a)}`,Y=a=>{try{return new URL(a).protocol==="https:"}catch{return!1}},q=10,E=()=>{let{getWorkspaceFiles:a}=z(),[o,d]=(0,p.useState)(""),n=D(()=>a({includeMarkdown:!1}),[]),t=n.data,m=(0,p.useMemo)(()=>{let r=(t==null?void 0:t.files)??[],i=(t==null?void 0:t.root)??"";return r.filter(s=>!s.isDirectory).map(s=>{var g,x,j;let l=i&&c.isAbsolute(s.path)&&s.path.startsWith(i)?c.rest(s.path,i):s.path,C=((g=s.opengraph)==null?void 0:g.title)??w(c.basename(l)),S=w(c.dirname(l)),U=((x=s.opengraph)==null?void 0:x.description)??"",h=(j=s.opengraph)==null?void 0:j.image,k=h&&Y(h)?h:v(`/og/thumbnail?file=${encodeURIComponent(l)}`).toString();return{...s,relativePath:l,title:C,subtitle:S,description:U,thumbnailUrl:k}}).sort((s,l)=>s.relativePath.localeCompare(l.relativePath))},[t==null?void 0:t.files,t==null?void 0:t.root]),u=(0,p.useMemo)(()=>{if(!o)return m;let r=o.toLowerCase();return m.filter(i=>i.title.toLowerCase().includes(r))},[m,o]);return n.isPending?(0,e.jsx)(N,{centered:!0,size:"xlarge",className:"mt-6"}):n.error?(0,e.jsx)(f,{kind:"danger",className:"rounded p-4",children:A(n.error)}):t?(0,e.jsx)(p.Suspense,{children:(0,e.jsxs)("div",{className:"flex flex-col gap-6 max-w-6xl container pt-5 pb-20 z-10",children:[(0,e.jsx)("img",{src:"logo.png",alt:"marimo logo",className:"w-48 mb-2"}),(0,e.jsx)(P,{children:(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[t.hasMore&&(0,e.jsxs)(f,{kind:"warn",className:"rounded p-4",children:["Showing first ",t.fileCount," files. Your workspace has more files."]}),m.length>q&&(0,e.jsx)(M,{id:"search",value:o,icon:(0,e.jsx)(L,{className:"h-4 w-4"}),onChange:r=>d(r.target.value),placeholder:"Search",rootClassName:"mb-3",className:"mb-0 border-border"}),u.length===0?(0,e.jsx)(f,{kind:"warn",className:"rounded p-4",children:"No marimo apps found."}):(0,e.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:u.map(r=>(0,e.jsx)("a",{href:v(`?file=${encodeURIComponent(r.relativePath)}`).toString(),target:F(r.path),className:"no-underline",children:(0,e.jsxs)(_,{className:"h-full overflow-hidden hover:bg-accent/20 transition-colors",children:[(0,e.jsx)("img",{src:r.thumbnailUrl,alt:r.title,loading:"lazy",className:"w-full aspect-1200/630 object-cover border-b border-border/60"}),(0,e.jsx)(W,{className:"p-6 pt-4",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[r.subtitle&&(0,e.jsx)("div",{className:"text-sm font-semibold text-muted-foreground",children:r.subtitle}),(0,e.jsx)("div",{className:"text-lg font-medium",children:r.title}),r.description&&(0,e.jsx)("div",{className:"text-sm text-muted-foreground line-clamp-3 mt-1",children:r.description})]})})]})},r.path))})]})})]})}):(0,e.jsx)(N,{centered:!0,size:"xlarge",className:"mt-6"})};export{E as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as ct,t as vt}from"./chunk-LvLJmgfZ.js";import{t as me}from"./linear-BxhToEEF.js";import{n as ye,o as ke,s as pe}from"./time-EL4bnqqQ.js";import"./defaultLocale-JieDVWC_.js";import{C as Zt,N as Ut,T as qt,c as Xt,d as ge,f as be,g as ve,h as Te,m as xe,p as we,t as Qt,u as $e,v as Jt,x as Kt}from"./defaultLocale-BLne0bXb.js";import"./purify.es-DZrAQFIu.js";import{o as _e}from"./timer-DXL2Iyk5.js";import{u as Dt}from"./src-DJ8ZKoFs.js";import{g as De}from"./chunk-S3R3BYOJ-CM-pQ0EF.js";import{a as te,n as u,r as st}from"./src-CmKhyEBC.js";import{B as Se,C as Me,U as Ce,_ as Ee,a as Ye,b as lt,c as Ae,s as Ie,v as Le,z as Fe}from"./chunk-ABZYJK2D-CtRGq-db.js";import{t as Oe}from"./dist-DxxvVPQH.js";function We(t){return t}var Tt=1,St=2,Mt=3,xt=4,ee=1e-6;function Pe(t){return"translate("+t+",0)"}function ze(t){return"translate(0,"+t+")"}function He(t){return i=>+t(i)}function Ne(t,i){return i=Math.max(0,t.bandwidth()-i*2)/2,t.round()&&(i=Math.round(i)),r=>+t(r)+i}function Be(){return!this.__axis}function ie(t,i){var r=[],n=null,o=null,d=6,k=6,M=3,I=typeof window<"u"&&window.devicePixelRatio>1?0:.5,D=t===Tt||t===xt?-1:1,x=t===xt||t===St?"x":"y",F=t===Tt||t===Mt?Pe:ze;function w($){var z=n??(i.ticks?i.ticks.apply(i,r):i.domain()),Y=o??(i.tickFormat?i.tickFormat.apply(i,r):We),v=Math.max(d,0)+M,C=i.range(),L=+C[0]+I,O=+C[C.length-1]+I,H=(i.bandwidth?Ne:He)(i.copy(),I),N=$.selection?$.selection():$,A=N.selectAll(".domain").data([null]),p=N.selectAll(".tick").data(z,i).order(),m=p.exit(),h=p.enter().append("g").attr("class","tick"),g=p.select("line"),y=p.select("text");A=A.merge(A.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),p=p.merge(h),g=g.merge(h.append("line").attr("stroke","currentColor").attr(x+"2",D*d)),y=y.merge(h.append("text").attr("fill","currentColor").attr(x,D*v).attr("dy",t===Tt?"0em":t===Mt?"0.71em":"0.32em")),$!==N&&(A=A.transition($),p=p.transition($),g=g.transition($),y=y.transition($),m=m.transition($).attr("opacity",ee).attr("transform",function(s){return isFinite(s=H(s))?F(s+I):this.getAttribute("transform")}),h.attr("opacity",ee).attr("transform",function(s){var c=this.parentNode.__axis;return F((c&&isFinite(c=c(s))?c:H(s))+I)})),m.remove(),A.attr("d",t===xt||t===St?k?"M"+D*k+","+L+"H"+I+"V"+O+"H"+D*k:"M"+I+","+L+"V"+O:k?"M"+L+","+D*k+"V"+I+"H"+O+"V"+D*k:"M"+L+","+I+"H"+O),p.attr("opacity",1).attr("transform",function(s){return F(H(s)+I)}),g.attr(x+"2",D*d),y.attr(x,D*v).text(Y),N.filter(Be).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===St?"start":t===xt?"end":"middle"),N.each(function(){this.__axis=H})}return w.scale=function($){return arguments.length?(i=$,w):i},w.ticks=function(){return r=Array.from(arguments),w},w.tickArguments=function($){return arguments.length?(r=$==null?[]:Array.from($),w):r.slice()},w.tickValues=function($){return arguments.length?(n=$==null?null:Array.from($),w):n&&n.slice()},w.tickFormat=function($){return arguments.length?(o=$,w):o},w.tickSize=function($){return arguments.length?(d=k=+$,w):d},w.tickSizeInner=function($){return arguments.length?(d=+$,w):d},w.tickSizeOuter=function($){return arguments.length?(k=+$,w):k},w.tickPadding=function($){return arguments.length?(M=+$,w):M},w.offset=function($){return arguments.length?(I=+$,w):I},w}function je(t){return ie(Tt,t)}function Ge(t){return ie(Mt,t)}var Ve=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_isoWeek=n()})(t,(function(){var r="day";return function(n,o,d){var k=function(D){return D.add(4-D.isoWeekday(),r)},M=o.prototype;M.isoWeekYear=function(){return k(this).year()},M.isoWeek=function(D){if(!this.$utils().u(D))return this.add(7*(D-this.isoWeek()),r);var x,F,w,$,z=k(this),Y=(x=this.isoWeekYear(),F=this.$u,w=(F?d.utc:d)().year(x).startOf("year"),$=4-w.isoWeekday(),w.isoWeekday()>4&&($+=7),w.add($,r));return z.diff(Y,"week")+1},M.isoWeekday=function(D){return this.$utils().u(D)?this.day()||7:this.day(this.day()%7?D:D-7)};var I=M.startOf;M.startOf=function(D,x){var F=this.$utils(),w=!!F.u(x)||x;return F.p(D)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):I.bind(this)(D,x)}}}))})),Re=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_customParseFormat=n()})(t,(function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,d=/\d\d/,k=/\d\d?/,M=/\d*[^-_:/,()\s\d]+/,I={},D=function(v){return(v=+v)+(v>68?1900:2e3)},x=function(v){return function(C){this[v]=+C}},F=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(C){if(!C||C==="Z")return 0;var L=C.match(/([+-]|\d\d)/g),O=60*L[1]+(+L[2]||0);return O===0?0:L[0]==="+"?-O:O})(v)}],w=function(v){var C=I[v];return C&&(C.indexOf?C:C.s.concat(C.f))},$=function(v,C){var L,O=I.meridiem;if(O){for(var H=1;H<=24;H+=1)if(v.indexOf(O(H,0,C))>-1){L=H>12;break}}else L=v===(C?"pm":"PM");return L},z={A:[M,function(v){this.afternoon=$(v,!1)}],a:[M,function(v){this.afternoon=$(v,!0)}],Q:[o,function(v){this.month=3*(v-1)+1}],S:[o,function(v){this.milliseconds=100*v}],SS:[d,function(v){this.milliseconds=10*v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[k,x("seconds")],ss:[k,x("seconds")],m:[k,x("minutes")],mm:[k,x("minutes")],H:[k,x("hours")],h:[k,x("hours")],HH:[k,x("hours")],hh:[k,x("hours")],D:[k,x("day")],DD:[d,x("day")],Do:[M,function(v){var C=I.ordinal;if(this.day=v.match(/\d+/)[0],C)for(var L=1;L<=31;L+=1)C(L).replace(/\[|\]/g,"")===v&&(this.day=L)}],w:[k,x("week")],ww:[d,x("week")],M:[k,x("month")],MM:[d,x("month")],MMM:[M,function(v){var C=w("months"),L=(w("monthsShort")||C.map((function(O){return O.slice(0,3)}))).indexOf(v)+1;if(L<1)throw Error();this.month=L%12||L}],MMMM:[M,function(v){var C=w("months").indexOf(v)+1;if(C<1)throw Error();this.month=C%12||C}],Y:[/[+-]?\d+/,x("year")],YY:[d,function(v){this.year=D(v)}],YYYY:[/\d{4}/,x("year")],Z:F,ZZ:F};function Y(v){for(var C=v,L=I&&I.formats,O=(v=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(g,y,s){var c=s&&s.toUpperCase();return y||L[s]||r[s]||L[c].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(f,l,b){return l||b.slice(1)}))}))).match(n),H=O.length,N=0;N<H;N+=1){var A=O[N],p=z[A],m=p&&p[0],h=p&&p[1];O[N]=h?{regex:m,parser:h}:A.replace(/^\[|\]$/g,"")}return function(g){for(var y={},s=0,c=0;s<H;s+=1){var f=O[s];if(typeof f=="string")c+=f.length;else{var l=f.regex,b=f.parser,a=g.slice(c),_=l.exec(a)[0];b.call(y,_),g=g.replace(_,"")}}return(function(e){var T=e.afternoon;if(T!==void 0){var S=e.hours;T?S<12&&(e.hours+=12):S===12&&(e.hours=0),delete e.afternoon}})(y),y}}return function(v,C,L){L.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(D=v.parseTwoDigitYear);var O=C.prototype,H=O.parse;O.parse=function(N){var A=N.date,p=N.utc,m=N.args;this.$u=p;var h=m[1];if(typeof h=="string"){var g=m[2]===!0,y=m[3]===!0,s=g||y,c=m[2];y&&(c=m[2]),I=this.$locale(),!g&&c&&(I=L.Ls[c]),this.$d=(function(a,_,e,T){try{if(["x","X"].indexOf(_)>-1)return new Date((_==="X"?1e3:1)*a);var S=Y(_)(a),E=S.year,W=S.month,P=S.day,j=S.hours,B=S.minutes,X=S.seconds,ht=S.milliseconds,at=S.zone,gt=S.week,ft=new Date,ot=P||(E||W?1:ft.getDate()),V=E||ft.getFullYear(),et=0;E&&!W||(et=W>0?W-1:ft.getMonth());var Z,R=j||0,nt=B||0,Q=X||0,it=ht||0;return at?new Date(Date.UTC(V,et,ot,R,nt,Q,it+60*at.offset*1e3)):e?new Date(Date.UTC(V,et,ot,R,nt,Q,it)):(Z=new Date(V,et,ot,R,nt,Q,it),gt&&(Z=T(Z).week(gt).toDate()),Z)}catch{return new Date("")}})(A,h,p,L),this.init(),c&&c!==!0&&(this.$L=this.locale(c).$L),s&&A!=this.format(h)&&(this.$d=new Date("")),I={}}else if(h instanceof Array)for(var f=h.length,l=1;l<=f;l+=1){m[1]=h[l-1];var b=L.apply(this,m);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}l===f&&(this.$d=new Date(""))}else H.call(this,N)}}}))})),Ze=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_advancedFormat=n()})(t,(function(){return function(r,n){var o=n.prototype,d=o.format;o.format=function(k){var M=this,I=this.$locale();if(!this.isValid())return d.bind(this)(k);var D=this.$utils(),x=(k||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(F){switch(F){case"Q":return Math.ceil((M.$M+1)/3);case"Do":return I.ordinal(M.$D);case"gggg":return M.weekYear();case"GGGG":return M.isoWeekYear();case"wo":return I.ordinal(M.week(),"W");case"w":case"ww":return D.s(M.week(),F==="w"?1:2,"0");case"W":case"WW":return D.s(M.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return D.s(String(M.$H===0?24:M.$H),F==="k"?1:2,"0");case"X":return Math.floor(M.$d.getTime()/1e3);case"x":return M.$d.getTime();case"z":return"["+M.offsetName()+"]";case"zzz":return"["+M.offsetName("long")+"]";default:return F}}));return d.bind(this)(x)}}}))})),Ue=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_duration=n()})(t,(function(){var r,n,o=1e3,d=6e4,k=36e5,M=864e5,I=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,D=31536e6,x=2628e6,F=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,w={years:D,months:x,days:M,hours:k,minutes:d,seconds:o,milliseconds:1,weeks:6048e5},$=function(A){return A instanceof H},z=function(A,p,m){return new H(A,m,p.$l)},Y=function(A){return n.p(A)+"s"},v=function(A){return A<0},C=function(A){return v(A)?Math.ceil(A):Math.floor(A)},L=function(A){return Math.abs(A)},O=function(A,p){return A?v(A)?{negative:!0,format:""+L(A)+p}:{negative:!1,format:""+A+p}:{negative:!1,format:""}},H=(function(){function A(m,h,g){var y=this;if(this.$d={},this.$l=g,m===void 0&&(this.$ms=0,this.parseFromMilliseconds()),h)return z(m*w[Y(h)],this);if(typeof m=="number")return this.$ms=m,this.parseFromMilliseconds(),this;if(typeof m=="object")return Object.keys(m).forEach((function(f){y.$d[Y(f)]=m[f]})),this.calMilliseconds(),this;if(typeof m=="string"){var s=m.match(F);if(s){var c=s.slice(2).map((function(f){return f==null?0:Number(f)}));return this.$d.years=c[0],this.$d.months=c[1],this.$d.weeks=c[2],this.$d.days=c[3],this.$d.hours=c[4],this.$d.minutes=c[5],this.$d.seconds=c[6],this.calMilliseconds(),this}}return this}var p=A.prototype;return p.calMilliseconds=function(){var m=this;this.$ms=Object.keys(this.$d).reduce((function(h,g){return h+(m.$d[g]||0)*w[g]}),0)},p.parseFromMilliseconds=function(){var m=this.$ms;this.$d.years=C(m/D),m%=D,this.$d.months=C(m/x),m%=x,this.$d.days=C(m/M),m%=M,this.$d.hours=C(m/k),m%=k,this.$d.minutes=C(m/d),m%=d,this.$d.seconds=C(m/o),m%=o,this.$d.milliseconds=m},p.toISOString=function(){var m=O(this.$d.years,"Y"),h=O(this.$d.months,"M"),g=+this.$d.days||0;this.$d.weeks&&(g+=7*this.$d.weeks);var y=O(g,"D"),s=O(this.$d.hours,"H"),c=O(this.$d.minutes,"M"),f=this.$d.seconds||0;this.$d.milliseconds&&(f+=this.$d.milliseconds/1e3,f=Math.round(1e3*f)/1e3);var l=O(f,"S"),b=m.negative||h.negative||y.negative||s.negative||c.negative||l.negative,a=s.format||c.format||l.format?"T":"",_=(b?"-":"")+"P"+m.format+h.format+y.format+a+s.format+c.format+l.format;return _==="P"||_==="-P"?"P0D":_},p.toJSON=function(){return this.toISOString()},p.format=function(m){var h=m||"YYYY-MM-DDTHH:mm:ss",g={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return h.replace(I,(function(y,s){return s||String(g[y])}))},p.as=function(m){return this.$ms/w[Y(m)]},p.get=function(m){var h=this.$ms,g=Y(m);return g==="milliseconds"?h%=1e3:h=g==="weeks"?C(h/w[g]):this.$d[g],h||0},p.add=function(m,h,g){var y;return y=h?m*w[Y(h)]:$(m)?m.$ms:z(m,this).$ms,z(this.$ms+y*(g?-1:1),this)},p.subtract=function(m,h){return this.add(m,h,!0)},p.locale=function(m){var h=this.clone();return h.$l=m,h},p.clone=function(){return z(this.$ms,this)},p.humanize=function(m){return r().add(this.$ms,"ms").locale(this.$l).fromNow(!m)},p.valueOf=function(){return this.asMilliseconds()},p.milliseconds=function(){return this.get("milliseconds")},p.asMilliseconds=function(){return this.as("milliseconds")},p.seconds=function(){return this.get("seconds")},p.asSeconds=function(){return this.as("seconds")},p.minutes=function(){return this.get("minutes")},p.asMinutes=function(){return this.as("minutes")},p.hours=function(){return this.get("hours")},p.asHours=function(){return this.as("hours")},p.days=function(){return this.get("days")},p.asDays=function(){return this.as("days")},p.weeks=function(){return this.get("weeks")},p.asWeeks=function(){return this.as("weeks")},p.months=function(){return this.get("months")},p.asMonths=function(){return this.as("months")},p.years=function(){return this.get("years")},p.asYears=function(){return this.as("years")},A})(),N=function(A,p,m){return A.add(p.years()*m,"y").add(p.months()*m,"M").add(p.days()*m,"d").add(p.hours()*m,"h").add(p.minutes()*m,"m").add(p.seconds()*m,"s").add(p.milliseconds()*m,"ms")};return function(A,p,m){r=m,n=m().$utils(),m.duration=function(y,s){return z(y,{$l:m.locale()},s)},m.isDuration=$;var h=p.prototype.add,g=p.prototype.subtract;p.prototype.add=function(y,s){return $(y)?N(this,y,1):h.bind(this)(y,s)},p.prototype.subtract=function(y,s){return $(y)?N(this,y,-1):g.bind(this)(y,s)}}}))})),qe=Oe(),q=ct(te(),1),Xe=ct(Ve(),1),Qe=ct(Re(),1),Je=ct(Ze(),1),mt=ct(te(),1),Ke=ct(Ue(),1),Ct=(function(){var t=u(function(s,c,f,l){for(f||(f={}),l=s.length;l--;f[s[l]]=c);return f},"o"),i=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],o=[1,28],d=[1,29],k=[1,30],M=[1,31],I=[1,32],D=[1,33],x=[1,34],F=[1,9],w=[1,10],$=[1,11],z=[1,12],Y=[1,13],v=[1,14],C=[1,15],L=[1,16],O=[1,19],H=[1,20],N=[1,21],A=[1,22],p=[1,23],m=[1,25],h=[1,35],g={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:u(function(s,c,f,l,b,a,_){var e=a.length-1;switch(b){case 1:return a[e-1];case 2:this.$=[];break;case 3:a[e-1].push(a[e]),this.$=a[e-1];break;case 4:case 5:this.$=a[e];break;case 6:case 7:this.$=[];break;case 8:l.setWeekday("monday");break;case 9:l.setWeekday("tuesday");break;case 10:l.setWeekday("wednesday");break;case 11:l.setWeekday("thursday");break;case 12:l.setWeekday("friday");break;case 13:l.setWeekday("saturday");break;case 14:l.setWeekday("sunday");break;case 15:l.setWeekend("friday");break;case 16:l.setWeekend("saturday");break;case 17:l.setDateFormat(a[e].substr(11)),this.$=a[e].substr(11);break;case 18:l.enableInclusiveEndDates(),this.$=a[e].substr(18);break;case 19:l.TopAxis(),this.$=a[e].substr(8);break;case 20:l.setAxisFormat(a[e].substr(11)),this.$=a[e].substr(11);break;case 21:l.setTickInterval(a[e].substr(13)),this.$=a[e].substr(13);break;case 22:l.setExcludes(a[e].substr(9)),this.$=a[e].substr(9);break;case 23:l.setIncludes(a[e].substr(9)),this.$=a[e].substr(9);break;case 24:l.setTodayMarker(a[e].substr(12)),this.$=a[e].substr(12);break;case 27:l.setDiagramTitle(a[e].substr(6)),this.$=a[e].substr(6);break;case 28:this.$=a[e].trim(),l.setAccTitle(this.$);break;case 29:case 30:this.$=a[e].trim(),l.setAccDescription(this.$);break;case 31:l.addSection(a[e].substr(8)),this.$=a[e].substr(8);break;case 33:l.addTask(a[e-1],a[e]),this.$="task";break;case 34:this.$=a[e-1],l.setClickEvent(a[e-1],a[e],null);break;case 35:this.$=a[e-2],l.setClickEvent(a[e-2],a[e-1],a[e]);break;case 36:this.$=a[e-2],l.setClickEvent(a[e-2],a[e-1],null),l.setLink(a[e-2],a[e]);break;case 37:this.$=a[e-3],l.setClickEvent(a[e-3],a[e-2],a[e-1]),l.setLink(a[e-3],a[e]);break;case 38:this.$=a[e-2],l.setClickEvent(a[e-2],a[e],null),l.setLink(a[e-2],a[e-1]);break;case 39:this.$=a[e-3],l.setClickEvent(a[e-3],a[e-1],a[e]),l.setLink(a[e-3],a[e-2]);break;case 40:this.$=a[e-1],l.setLink(a[e-1],a[e]);break;case 41:case 47:this.$=a[e-1]+" "+a[e];break;case 42:case 43:case 45:this.$=a[e-2]+" "+a[e-1]+" "+a[e];break;case 44:case 46:this.$=a[e-3]+" "+a[e-2]+" "+a[e-1]+" "+a[e];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:o,15:d,16:k,17:M,18:I,19:18,20:D,21:x,22:F,23:w,24:$,25:z,26:Y,27:v,28:C,29:L,30:O,31:H,33:N,35:A,36:p,37:24,38:m,40:h},t(i,[2,7],{1:[2,1]}),t(i,[2,3]),{9:36,11:17,12:r,13:n,14:o,15:d,16:k,17:M,18:I,19:18,20:D,21:x,22:F,23:w,24:$,25:z,26:Y,27:v,28:C,29:L,30:O,31:H,33:N,35:A,36:p,37:24,38:m,40:h},t(i,[2,5]),t(i,[2,6]),t(i,[2,17]),t(i,[2,18]),t(i,[2,19]),t(i,[2,20]),t(i,[2,21]),t(i,[2,22]),t(i,[2,23]),t(i,[2,24]),t(i,[2,25]),t(i,[2,26]),t(i,[2,27]),{32:[1,37]},{34:[1,38]},t(i,[2,30]),t(i,[2,31]),t(i,[2,32]),{39:[1,39]},t(i,[2,8]),t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),t(i,[2,12]),t(i,[2,13]),t(i,[2,14]),t(i,[2,15]),t(i,[2,16]),{41:[1,40],43:[1,41]},t(i,[2,4]),t(i,[2,28]),t(i,[2,29]),t(i,[2,33]),t(i,[2,34],{42:[1,42],43:[1,43]}),t(i,[2,40],{41:[1,44]}),t(i,[2,35],{43:[1,45]}),t(i,[2,36]),t(i,[2,38],{42:[1,46]}),t(i,[2,37]),t(i,[2,39])],defaultActions:{},parseError:u(function(s,c){if(c.recoverable)this.trace(s);else{var f=Error(s);throw f.hash=c,f}},"parseError"),parse:u(function(s){var c=this,f=[0],l=[],b=[null],a=[],_=this.table,e="",T=0,S=0,E=0,W=2,P=1,j=a.slice.call(arguments,1),B=Object.create(this.lexer),X={yy:{}};for(var ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ht)&&(X.yy[ht]=this.yy[ht]);B.setInput(s,X.yy),X.yy.lexer=B,X.yy.parser=this,B.yylloc===void 0&&(B.yylloc={});var at=B.yylloc;a.push(at);var gt=B.options&&B.options.ranges;typeof X.yy.parseError=="function"?this.parseError=X.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(U){f.length-=2*U,b.length-=U,a.length-=U}u(ft,"popStack");function ot(){var U=l.pop()||B.lex()||P;return typeof U!="number"&&(U instanceof Array&&(l=U,U=l.pop()),U=c.symbols_[U]||U),U}u(ot,"lex");for(var V,et,Z,R,nt,Q={},it,K,Vt,bt;;){if(Z=f[f.length-1],this.defaultActions[Z]?R=this.defaultActions[Z]:(V??(V=ot()),R=_[Z]&&_[Z][V]),R===void 0||!R.length||!R[0]){var Rt="";for(it in bt=[],_[Z])this.terminals_[it]&&it>W&&bt.push("'"+this.terminals_[it]+"'");Rt=B.showPosition?"Parse error on line "+(T+1)+`:
|
|
1
|
+
import{s as ct,t as vt}from"./chunk-LvLJmgfZ.js";import{t as me}from"./linear-DWpCiijk.js";import{n as ye,o as ke,s as pe}from"./time-CSCsAxXS.js";import"./defaultLocale-YteS-k_t.js";import{C as Zt,N as Ut,T as qt,c as Xt,d as ge,f as be,g as ve,h as Te,m as xe,p as we,t as Qt,u as $e,v as Jt,x as Kt}from"./defaultLocale-B6z1Qyqt.js";import"./purify.es-B-nzWya6.js";import{o as _e}from"./timer-DXL2Iyk5.js";import{u as Dt}from"./src-DJ8ZKoFs.js";import{g as De}from"./chunk-S3R3BYOJ-D1UiABQX.js";import{a as te,n as u,r as st}from"./src-CmKhyEBC.js";import{B as Se,C as Me,U as Ce,_ as Ee,a as Ye,b as lt,c as Ae,s as Ie,v as Le,z as Fe}from"./chunk-ABZYJK2D-D1A06qKo.js";import{t as Oe}from"./dist-DxxvVPQH.js";function We(t){return t}var Tt=1,St=2,Mt=3,xt=4,ee=1e-6;function Pe(t){return"translate("+t+",0)"}function ze(t){return"translate(0,"+t+")"}function He(t){return i=>+t(i)}function Ne(t,i){return i=Math.max(0,t.bandwidth()-i*2)/2,t.round()&&(i=Math.round(i)),r=>+t(r)+i}function Be(){return!this.__axis}function ie(t,i){var r=[],n=null,o=null,d=6,k=6,M=3,I=typeof window<"u"&&window.devicePixelRatio>1?0:.5,D=t===Tt||t===xt?-1:1,x=t===xt||t===St?"x":"y",F=t===Tt||t===Mt?Pe:ze;function w($){var z=n??(i.ticks?i.ticks.apply(i,r):i.domain()),Y=o??(i.tickFormat?i.tickFormat.apply(i,r):We),v=Math.max(d,0)+M,C=i.range(),L=+C[0]+I,O=+C[C.length-1]+I,H=(i.bandwidth?Ne:He)(i.copy(),I),N=$.selection?$.selection():$,A=N.selectAll(".domain").data([null]),p=N.selectAll(".tick").data(z,i).order(),m=p.exit(),h=p.enter().append("g").attr("class","tick"),g=p.select("line"),y=p.select("text");A=A.merge(A.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),p=p.merge(h),g=g.merge(h.append("line").attr("stroke","currentColor").attr(x+"2",D*d)),y=y.merge(h.append("text").attr("fill","currentColor").attr(x,D*v).attr("dy",t===Tt?"0em":t===Mt?"0.71em":"0.32em")),$!==N&&(A=A.transition($),p=p.transition($),g=g.transition($),y=y.transition($),m=m.transition($).attr("opacity",ee).attr("transform",function(s){return isFinite(s=H(s))?F(s+I):this.getAttribute("transform")}),h.attr("opacity",ee).attr("transform",function(s){var c=this.parentNode.__axis;return F((c&&isFinite(c=c(s))?c:H(s))+I)})),m.remove(),A.attr("d",t===xt||t===St?k?"M"+D*k+","+L+"H"+I+"V"+O+"H"+D*k:"M"+I+","+L+"V"+O:k?"M"+L+","+D*k+"V"+I+"H"+O+"V"+D*k:"M"+L+","+I+"H"+O),p.attr("opacity",1).attr("transform",function(s){return F(H(s)+I)}),g.attr(x+"2",D*d),y.attr(x,D*v).text(Y),N.filter(Be).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===St?"start":t===xt?"end":"middle"),N.each(function(){this.__axis=H})}return w.scale=function($){return arguments.length?(i=$,w):i},w.ticks=function(){return r=Array.from(arguments),w},w.tickArguments=function($){return arguments.length?(r=$==null?[]:Array.from($),w):r.slice()},w.tickValues=function($){return arguments.length?(n=$==null?null:Array.from($),w):n&&n.slice()},w.tickFormat=function($){return arguments.length?(o=$,w):o},w.tickSize=function($){return arguments.length?(d=k=+$,w):d},w.tickSizeInner=function($){return arguments.length?(d=+$,w):d},w.tickSizeOuter=function($){return arguments.length?(k=+$,w):k},w.tickPadding=function($){return arguments.length?(M=+$,w):M},w.offset=function($){return arguments.length?(I=+$,w):I},w}function je(t){return ie(Tt,t)}function Ge(t){return ie(Mt,t)}var Ve=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_isoWeek=n()})(t,(function(){var r="day";return function(n,o,d){var k=function(D){return D.add(4-D.isoWeekday(),r)},M=o.prototype;M.isoWeekYear=function(){return k(this).year()},M.isoWeek=function(D){if(!this.$utils().u(D))return this.add(7*(D-this.isoWeek()),r);var x,F,w,$,z=k(this),Y=(x=this.isoWeekYear(),F=this.$u,w=(F?d.utc:d)().year(x).startOf("year"),$=4-w.isoWeekday(),w.isoWeekday()>4&&($+=7),w.add($,r));return z.diff(Y,"week")+1},M.isoWeekday=function(D){return this.$utils().u(D)?this.day()||7:this.day(this.day()%7?D:D-7)};var I=M.startOf;M.startOf=function(D,x){var F=this.$utils(),w=!!F.u(x)||x;return F.p(D)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):I.bind(this)(D,x)}}}))})),Re=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_customParseFormat=n()})(t,(function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,d=/\d\d/,k=/\d\d?/,M=/\d*[^-_:/,()\s\d]+/,I={},D=function(v){return(v=+v)+(v>68?1900:2e3)},x=function(v){return function(C){this[v]=+C}},F=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(C){if(!C||C==="Z")return 0;var L=C.match(/([+-]|\d\d)/g),O=60*L[1]+(+L[2]||0);return O===0?0:L[0]==="+"?-O:O})(v)}],w=function(v){var C=I[v];return C&&(C.indexOf?C:C.s.concat(C.f))},$=function(v,C){var L,O=I.meridiem;if(O){for(var H=1;H<=24;H+=1)if(v.indexOf(O(H,0,C))>-1){L=H>12;break}}else L=v===(C?"pm":"PM");return L},z={A:[M,function(v){this.afternoon=$(v,!1)}],a:[M,function(v){this.afternoon=$(v,!0)}],Q:[o,function(v){this.month=3*(v-1)+1}],S:[o,function(v){this.milliseconds=100*v}],SS:[d,function(v){this.milliseconds=10*v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[k,x("seconds")],ss:[k,x("seconds")],m:[k,x("minutes")],mm:[k,x("minutes")],H:[k,x("hours")],h:[k,x("hours")],HH:[k,x("hours")],hh:[k,x("hours")],D:[k,x("day")],DD:[d,x("day")],Do:[M,function(v){var C=I.ordinal;if(this.day=v.match(/\d+/)[0],C)for(var L=1;L<=31;L+=1)C(L).replace(/\[|\]/g,"")===v&&(this.day=L)}],w:[k,x("week")],ww:[d,x("week")],M:[k,x("month")],MM:[d,x("month")],MMM:[M,function(v){var C=w("months"),L=(w("monthsShort")||C.map((function(O){return O.slice(0,3)}))).indexOf(v)+1;if(L<1)throw Error();this.month=L%12||L}],MMMM:[M,function(v){var C=w("months").indexOf(v)+1;if(C<1)throw Error();this.month=C%12||C}],Y:[/[+-]?\d+/,x("year")],YY:[d,function(v){this.year=D(v)}],YYYY:[/\d{4}/,x("year")],Z:F,ZZ:F};function Y(v){for(var C=v,L=I&&I.formats,O=(v=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(g,y,s){var c=s&&s.toUpperCase();return y||L[s]||r[s]||L[c].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(f,l,b){return l||b.slice(1)}))}))).match(n),H=O.length,N=0;N<H;N+=1){var A=O[N],p=z[A],m=p&&p[0],h=p&&p[1];O[N]=h?{regex:m,parser:h}:A.replace(/^\[|\]$/g,"")}return function(g){for(var y={},s=0,c=0;s<H;s+=1){var f=O[s];if(typeof f=="string")c+=f.length;else{var l=f.regex,b=f.parser,a=g.slice(c),_=l.exec(a)[0];b.call(y,_),g=g.replace(_,"")}}return(function(e){var T=e.afternoon;if(T!==void 0){var S=e.hours;T?S<12&&(e.hours+=12):S===12&&(e.hours=0),delete e.afternoon}})(y),y}}return function(v,C,L){L.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(D=v.parseTwoDigitYear);var O=C.prototype,H=O.parse;O.parse=function(N){var A=N.date,p=N.utc,m=N.args;this.$u=p;var h=m[1];if(typeof h=="string"){var g=m[2]===!0,y=m[3]===!0,s=g||y,c=m[2];y&&(c=m[2]),I=this.$locale(),!g&&c&&(I=L.Ls[c]),this.$d=(function(a,_,e,T){try{if(["x","X"].indexOf(_)>-1)return new Date((_==="X"?1e3:1)*a);var S=Y(_)(a),E=S.year,W=S.month,P=S.day,j=S.hours,B=S.minutes,X=S.seconds,ht=S.milliseconds,at=S.zone,gt=S.week,ft=new Date,ot=P||(E||W?1:ft.getDate()),V=E||ft.getFullYear(),et=0;E&&!W||(et=W>0?W-1:ft.getMonth());var Z,R=j||0,nt=B||0,Q=X||0,it=ht||0;return at?new Date(Date.UTC(V,et,ot,R,nt,Q,it+60*at.offset*1e3)):e?new Date(Date.UTC(V,et,ot,R,nt,Q,it)):(Z=new Date(V,et,ot,R,nt,Q,it),gt&&(Z=T(Z).week(gt).toDate()),Z)}catch{return new Date("")}})(A,h,p,L),this.init(),c&&c!==!0&&(this.$L=this.locale(c).$L),s&&A!=this.format(h)&&(this.$d=new Date("")),I={}}else if(h instanceof Array)for(var f=h.length,l=1;l<=f;l+=1){m[1]=h[l-1];var b=L.apply(this,m);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}l===f&&(this.$d=new Date(""))}else H.call(this,N)}}}))})),Ze=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_advancedFormat=n()})(t,(function(){return function(r,n){var o=n.prototype,d=o.format;o.format=function(k){var M=this,I=this.$locale();if(!this.isValid())return d.bind(this)(k);var D=this.$utils(),x=(k||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(F){switch(F){case"Q":return Math.ceil((M.$M+1)/3);case"Do":return I.ordinal(M.$D);case"gggg":return M.weekYear();case"GGGG":return M.isoWeekYear();case"wo":return I.ordinal(M.week(),"W");case"w":case"ww":return D.s(M.week(),F==="w"?1:2,"0");case"W":case"WW":return D.s(M.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return D.s(String(M.$H===0?24:M.$H),F==="k"?1:2,"0");case"X":return Math.floor(M.$d.getTime()/1e3);case"x":return M.$d.getTime();case"z":return"["+M.offsetName()+"]";case"zzz":return"["+M.offsetName("long")+"]";default:return F}}));return d.bind(this)(x)}}}))})),Ue=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_duration=n()})(t,(function(){var r,n,o=1e3,d=6e4,k=36e5,M=864e5,I=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,D=31536e6,x=2628e6,F=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,w={years:D,months:x,days:M,hours:k,minutes:d,seconds:o,milliseconds:1,weeks:6048e5},$=function(A){return A instanceof H},z=function(A,p,m){return new H(A,m,p.$l)},Y=function(A){return n.p(A)+"s"},v=function(A){return A<0},C=function(A){return v(A)?Math.ceil(A):Math.floor(A)},L=function(A){return Math.abs(A)},O=function(A,p){return A?v(A)?{negative:!0,format:""+L(A)+p}:{negative:!1,format:""+A+p}:{negative:!1,format:""}},H=(function(){function A(m,h,g){var y=this;if(this.$d={},this.$l=g,m===void 0&&(this.$ms=0,this.parseFromMilliseconds()),h)return z(m*w[Y(h)],this);if(typeof m=="number")return this.$ms=m,this.parseFromMilliseconds(),this;if(typeof m=="object")return Object.keys(m).forEach((function(f){y.$d[Y(f)]=m[f]})),this.calMilliseconds(),this;if(typeof m=="string"){var s=m.match(F);if(s){var c=s.slice(2).map((function(f){return f==null?0:Number(f)}));return this.$d.years=c[0],this.$d.months=c[1],this.$d.weeks=c[2],this.$d.days=c[3],this.$d.hours=c[4],this.$d.minutes=c[5],this.$d.seconds=c[6],this.calMilliseconds(),this}}return this}var p=A.prototype;return p.calMilliseconds=function(){var m=this;this.$ms=Object.keys(this.$d).reduce((function(h,g){return h+(m.$d[g]||0)*w[g]}),0)},p.parseFromMilliseconds=function(){var m=this.$ms;this.$d.years=C(m/D),m%=D,this.$d.months=C(m/x),m%=x,this.$d.days=C(m/M),m%=M,this.$d.hours=C(m/k),m%=k,this.$d.minutes=C(m/d),m%=d,this.$d.seconds=C(m/o),m%=o,this.$d.milliseconds=m},p.toISOString=function(){var m=O(this.$d.years,"Y"),h=O(this.$d.months,"M"),g=+this.$d.days||0;this.$d.weeks&&(g+=7*this.$d.weeks);var y=O(g,"D"),s=O(this.$d.hours,"H"),c=O(this.$d.minutes,"M"),f=this.$d.seconds||0;this.$d.milliseconds&&(f+=this.$d.milliseconds/1e3,f=Math.round(1e3*f)/1e3);var l=O(f,"S"),b=m.negative||h.negative||y.negative||s.negative||c.negative||l.negative,a=s.format||c.format||l.format?"T":"",_=(b?"-":"")+"P"+m.format+h.format+y.format+a+s.format+c.format+l.format;return _==="P"||_==="-P"?"P0D":_},p.toJSON=function(){return this.toISOString()},p.format=function(m){var h=m||"YYYY-MM-DDTHH:mm:ss",g={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return h.replace(I,(function(y,s){return s||String(g[y])}))},p.as=function(m){return this.$ms/w[Y(m)]},p.get=function(m){var h=this.$ms,g=Y(m);return g==="milliseconds"?h%=1e3:h=g==="weeks"?C(h/w[g]):this.$d[g],h||0},p.add=function(m,h,g){var y;return y=h?m*w[Y(h)]:$(m)?m.$ms:z(m,this).$ms,z(this.$ms+y*(g?-1:1),this)},p.subtract=function(m,h){return this.add(m,h,!0)},p.locale=function(m){var h=this.clone();return h.$l=m,h},p.clone=function(){return z(this.$ms,this)},p.humanize=function(m){return r().add(this.$ms,"ms").locale(this.$l).fromNow(!m)},p.valueOf=function(){return this.asMilliseconds()},p.milliseconds=function(){return this.get("milliseconds")},p.asMilliseconds=function(){return this.as("milliseconds")},p.seconds=function(){return this.get("seconds")},p.asSeconds=function(){return this.as("seconds")},p.minutes=function(){return this.get("minutes")},p.asMinutes=function(){return this.as("minutes")},p.hours=function(){return this.get("hours")},p.asHours=function(){return this.as("hours")},p.days=function(){return this.get("days")},p.asDays=function(){return this.as("days")},p.weeks=function(){return this.get("weeks")},p.asWeeks=function(){return this.as("weeks")},p.months=function(){return this.get("months")},p.asMonths=function(){return this.as("months")},p.years=function(){return this.get("years")},p.asYears=function(){return this.as("years")},A})(),N=function(A,p,m){return A.add(p.years()*m,"y").add(p.months()*m,"M").add(p.days()*m,"d").add(p.hours()*m,"h").add(p.minutes()*m,"m").add(p.seconds()*m,"s").add(p.milliseconds()*m,"ms")};return function(A,p,m){r=m,n=m().$utils(),m.duration=function(y,s){return z(y,{$l:m.locale()},s)},m.isDuration=$;var h=p.prototype.add,g=p.prototype.subtract;p.prototype.add=function(y,s){return $(y)?N(this,y,1):h.bind(this)(y,s)},p.prototype.subtract=function(y,s){return $(y)?N(this,y,-1):g.bind(this)(y,s)}}}))})),qe=Oe(),q=ct(te(),1),Xe=ct(Ve(),1),Qe=ct(Re(),1),Je=ct(Ze(),1),mt=ct(te(),1),Ke=ct(Ue(),1),Ct=(function(){var t=u(function(s,c,f,l){for(f||(f={}),l=s.length;l--;f[s[l]]=c);return f},"o"),i=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],o=[1,28],d=[1,29],k=[1,30],M=[1,31],I=[1,32],D=[1,33],x=[1,34],F=[1,9],w=[1,10],$=[1,11],z=[1,12],Y=[1,13],v=[1,14],C=[1,15],L=[1,16],O=[1,19],H=[1,20],N=[1,21],A=[1,22],p=[1,23],m=[1,25],h=[1,35],g={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:u(function(s,c,f,l,b,a,_){var e=a.length-1;switch(b){case 1:return a[e-1];case 2:this.$=[];break;case 3:a[e-1].push(a[e]),this.$=a[e-1];break;case 4:case 5:this.$=a[e];break;case 6:case 7:this.$=[];break;case 8:l.setWeekday("monday");break;case 9:l.setWeekday("tuesday");break;case 10:l.setWeekday("wednesday");break;case 11:l.setWeekday("thursday");break;case 12:l.setWeekday("friday");break;case 13:l.setWeekday("saturday");break;case 14:l.setWeekday("sunday");break;case 15:l.setWeekend("friday");break;case 16:l.setWeekend("saturday");break;case 17:l.setDateFormat(a[e].substr(11)),this.$=a[e].substr(11);break;case 18:l.enableInclusiveEndDates(),this.$=a[e].substr(18);break;case 19:l.TopAxis(),this.$=a[e].substr(8);break;case 20:l.setAxisFormat(a[e].substr(11)),this.$=a[e].substr(11);break;case 21:l.setTickInterval(a[e].substr(13)),this.$=a[e].substr(13);break;case 22:l.setExcludes(a[e].substr(9)),this.$=a[e].substr(9);break;case 23:l.setIncludes(a[e].substr(9)),this.$=a[e].substr(9);break;case 24:l.setTodayMarker(a[e].substr(12)),this.$=a[e].substr(12);break;case 27:l.setDiagramTitle(a[e].substr(6)),this.$=a[e].substr(6);break;case 28:this.$=a[e].trim(),l.setAccTitle(this.$);break;case 29:case 30:this.$=a[e].trim(),l.setAccDescription(this.$);break;case 31:l.addSection(a[e].substr(8)),this.$=a[e].substr(8);break;case 33:l.addTask(a[e-1],a[e]),this.$="task";break;case 34:this.$=a[e-1],l.setClickEvent(a[e-1],a[e],null);break;case 35:this.$=a[e-2],l.setClickEvent(a[e-2],a[e-1],a[e]);break;case 36:this.$=a[e-2],l.setClickEvent(a[e-2],a[e-1],null),l.setLink(a[e-2],a[e]);break;case 37:this.$=a[e-3],l.setClickEvent(a[e-3],a[e-2],a[e-1]),l.setLink(a[e-3],a[e]);break;case 38:this.$=a[e-2],l.setClickEvent(a[e-2],a[e],null),l.setLink(a[e-2],a[e-1]);break;case 39:this.$=a[e-3],l.setClickEvent(a[e-3],a[e-1],a[e]),l.setLink(a[e-3],a[e-2]);break;case 40:this.$=a[e-1],l.setLink(a[e-1],a[e]);break;case 41:case 47:this.$=a[e-1]+" "+a[e];break;case 42:case 43:case 45:this.$=a[e-2]+" "+a[e-1]+" "+a[e];break;case 44:case 46:this.$=a[e-3]+" "+a[e-2]+" "+a[e-1]+" "+a[e];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:o,15:d,16:k,17:M,18:I,19:18,20:D,21:x,22:F,23:w,24:$,25:z,26:Y,27:v,28:C,29:L,30:O,31:H,33:N,35:A,36:p,37:24,38:m,40:h},t(i,[2,7],{1:[2,1]}),t(i,[2,3]),{9:36,11:17,12:r,13:n,14:o,15:d,16:k,17:M,18:I,19:18,20:D,21:x,22:F,23:w,24:$,25:z,26:Y,27:v,28:C,29:L,30:O,31:H,33:N,35:A,36:p,37:24,38:m,40:h},t(i,[2,5]),t(i,[2,6]),t(i,[2,17]),t(i,[2,18]),t(i,[2,19]),t(i,[2,20]),t(i,[2,21]),t(i,[2,22]),t(i,[2,23]),t(i,[2,24]),t(i,[2,25]),t(i,[2,26]),t(i,[2,27]),{32:[1,37]},{34:[1,38]},t(i,[2,30]),t(i,[2,31]),t(i,[2,32]),{39:[1,39]},t(i,[2,8]),t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),t(i,[2,12]),t(i,[2,13]),t(i,[2,14]),t(i,[2,15]),t(i,[2,16]),{41:[1,40],43:[1,41]},t(i,[2,4]),t(i,[2,28]),t(i,[2,29]),t(i,[2,33]),t(i,[2,34],{42:[1,42],43:[1,43]}),t(i,[2,40],{41:[1,44]}),t(i,[2,35],{43:[1,45]}),t(i,[2,36]),t(i,[2,38],{42:[1,46]}),t(i,[2,37]),t(i,[2,39])],defaultActions:{},parseError:u(function(s,c){if(c.recoverable)this.trace(s);else{var f=Error(s);throw f.hash=c,f}},"parseError"),parse:u(function(s){var c=this,f=[0],l=[],b=[null],a=[],_=this.table,e="",T=0,S=0,E=0,W=2,P=1,j=a.slice.call(arguments,1),B=Object.create(this.lexer),X={yy:{}};for(var ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ht)&&(X.yy[ht]=this.yy[ht]);B.setInput(s,X.yy),X.yy.lexer=B,X.yy.parser=this,B.yylloc===void 0&&(B.yylloc={});var at=B.yylloc;a.push(at);var gt=B.options&&B.options.ranges;typeof X.yy.parseError=="function"?this.parseError=X.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(U){f.length-=2*U,b.length-=U,a.length-=U}u(ft,"popStack");function ot(){var U=l.pop()||B.lex()||P;return typeof U!="number"&&(U instanceof Array&&(l=U,U=l.pop()),U=c.symbols_[U]||U),U}u(ot,"lex");for(var V,et,Z,R,nt,Q={},it,K,Vt,bt;;){if(Z=f[f.length-1],this.defaultActions[Z]?R=this.defaultActions[Z]:(V??(V=ot()),R=_[Z]&&_[Z][V]),R===void 0||!R.length||!R[0]){var Rt="";for(it in bt=[],_[Z])this.terminals_[it]&&it>W&&bt.push("'"+this.terminals_[it]+"'");Rt=B.showPosition?"Parse error on line "+(T+1)+`:
|
|
2
2
|
`+B.showPosition()+`
|
|
3
3
|
Expecting `+bt.join(", ")+", got '"+(this.terminals_[V]||V)+"'":"Parse error on line "+(T+1)+": Unexpected "+(V==P?"end of input":"'"+(this.terminals_[V]||V)+"'"),this.parseError(Rt,{text:B.match,token:this.terminals_[V]||V,line:B.yylineno,loc:at,expected:bt})}if(R[0]instanceof Array&&R.length>1)throw Error("Parse Error: multiple actions possible at state: "+Z+", token: "+V);switch(R[0]){case 1:f.push(V),b.push(B.yytext),a.push(B.yylloc),f.push(R[1]),V=null,et?(V=et,et=null):(S=B.yyleng,e=B.yytext,T=B.yylineno,at=B.yylloc,E>0&&E--);break;case 2:if(K=this.productions_[R[1]][1],Q.$=b[b.length-K],Q._$={first_line:a[a.length-(K||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(K||1)].first_column,last_column:a[a.length-1].last_column},gt&&(Q._$.range=[a[a.length-(K||1)].range[0],a[a.length-1].range[1]]),nt=this.performAction.apply(Q,[e,S,T,X.yy,R[1],b,a].concat(j)),nt!==void 0)return nt;K&&(f=f.slice(0,-1*K*2),b=b.slice(0,-1*K),a=a.slice(0,-1*K)),f.push(this.productions_[R[1]][0]),b.push(Q.$),a.push(Q._$),Vt=_[f[f.length-2]][f[f.length-1]],f.push(Vt);break;case 3:return!0}}return!0},"parse")};g.lexer=(function(){return{EOF:1,parseError:u(function(s,c){if(this.yy.parser)this.yy.parser.parseError(s,c);else throw Error(s)},"parseError"),setInput:u(function(s,c){return this.yy=c||this.yy||{},this._input=s,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 s=this._input[0];return this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s,s.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),s},"input"),unput:u(function(s){var c=s.length,f=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var l=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),f.length-1&&(this.yylineno-=f.length-1);var b=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:f?(f.length===l.length?this.yylloc.first_column:0)+l[l.length-f.length].length-f[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(s){this.unput(this.match.slice(s))},"less"),pastInput:u(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var s=this.pastInput(),c=Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
package/dist/assets/{gitGraphDiagram-NY62KEGX-B-3aRelz.js → gitGraphDiagram-NY62KEGX-DXw3a-uS.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var J;import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import"./purify.es-DZrAQFIu.js";import{u as Q}from"./src-DJ8ZKoFs.js";import{g as X,i as Z,m as tt}from"./chunk-S3R3BYOJ-CM-pQ0EF.js";import{n as h,r as u}from"./src-CmKhyEBC.js";import{B as rt,C as et,K as at,U as ot,_ as it,a as st,b as ct,d as nt,s as k,v as dt,y as ht,z as mt}from"./chunk-ABZYJK2D-CtRGq-db.js";import"./dist-DxxvVPQH.js";import"./chunk-O7ZBX7Z2-DoE29Zoe.js";import"./chunk-S6J4BHB3-Cvr0itXK.js";import"./chunk-LBM3YZW2-D3uTpSOd.js";import"./chunk-76Q3JFCE-B261Xkae.js";import"./chunk-T53DSG4Q-C7bPrBIt.js";import"./chunk-LHMN2FUI-2FK1AIwU.js";import"./chunk-FWNWRKHM-C0b0DIG0.js";import{t as lt}from"./chunk-4BX2VUAB-BP-RGZn9.js";import{t as $t}from"./mermaid-parser.core-D237JwYN.js";import{t as yt}from"./chunk-QZHKN3VN-DCq7JxLD.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},gt=nt.gitGraph,A=h(()=>Z({...gt,...ht().gitGraph}),"getConfig"),n=new yt(()=>{let r=A(),t=r.mainBranchName,a=r.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:a}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});function z(){return tt({length:7})}h(z,"getID");function j(r,t){let a=Object.create(null);return r.reduce((i,e)=>{let o=t(e);return a[o]||(a[o]=!0,i.push(e)),i},[])}h(j,"uniqBy");var pt=h(function(r){n.records.direction=r},"setDirection"),xt=h(function(r){u.debug("options str",r),r=r==null?void 0:r.trim(),r||(r="{}");try{n.records.options=JSON.parse(r)}catch(t){u.error("error while parsing gitGraph options",t.message)}},"setOptions"),ft=h(function(){return n.records.options},"getOptions"),ut=h(function(r){let t=r.msg,a=r.id,i=r.type,e=r.tags;u.info("commit",t,a,i,e),u.debug("Entering commit:",t,a,i,e);let o=A();a=k.sanitizeText(a,o),t=k.sanitizeText(t,o),e=e==null?void 0:e.map(s=>k.sanitizeText(s,o));let c={id:a||n.records.seq+"-"+z(),message:t,seq:n.records.seq++,type:i??p.NORMAL,tags:e??[],parents:n.records.head==null?[]:[n.records.head.id],branch:n.records.currBranch};n.records.head=c,u.info("main branch",o.mainBranchName),n.records.commits.has(c.id)&&u.warn(`Commit ID ${c.id} already exists`),n.records.commits.set(c.id,c),n.records.branches.set(n.records.currBranch,c.id),u.debug("in pushCommit "+c.id)},"commit"),bt=h(function(r){let t=r.name,a=r.order;if(t=k.sanitizeText(t,A()),n.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);n.records.branches.set(t,n.records.head==null?null:n.records.head.id),n.records.branchConfig.set(t,{name:t,order:a}),_(t),u.debug("in createBranch")},"branch"),wt=h(r=>{let t=r.branch,a=r.id,i=r.type,e=r.tags,o=A();t=k.sanitizeText(t,o),a&&(a=k.sanitizeText(a,o));let c=n.records.branches.get(n.records.currBranch),s=n.records.branches.get(t),m=c?n.records.commits.get(c):void 0,$=s?n.records.commits.get(s):void 0;if(m&&$&&m.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(n.records.currBranch===t){let d=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},d}if(m===void 0||!m){let d=Error(`Incorrect usage of "merge". Current branch (${n.records.currBranch})has no commits`);throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},d}if(!n.records.branches.has(t)){let d=Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},d}if($===void 0||!$){let d=Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},d}if(m===$){let d=Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},d}if(a&&n.records.commits.has(a)){let d=Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw d.hash={text:`merge ${t} ${a} ${i} ${e==null?void 0:e.join(" ")}`,token:`merge ${t} ${a} ${i} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${t} ${a}_UNIQUE ${i} ${e==null?void 0:e.join(" ")}`]},d}let l=s||"",y={id:a||`${n.records.seq}-${z()}`,message:`merged branch ${t} into ${n.records.currBranch}`,seq:n.records.seq++,parents:n.records.head==null?[]:[n.records.head.id,l],branch:n.records.currBranch,type:p.MERGE,customType:i,customId:!!a,tags:e??[]};n.records.head=y,n.records.commits.set(y.id,y),n.records.branches.set(n.records.currBranch,y.id),u.debug(n.records.branches),u.debug("in mergeBranch")},"merge"),Bt=h(function(r){let t=r.id,a=r.targetId,i=r.tags,e=r.parent;u.debug("Entering cherryPick:",t,a,i);let o=A();if(t=k.sanitizeText(t,o),a=k.sanitizeText(a,o),i=i==null?void 0:i.map(m=>k.sanitizeText(m,o)),e=k.sanitizeText(e,o),!t||!n.records.commits.has(t)){let m=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw m.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},m}let c=n.records.commits.get(t);if(c===void 0||!c)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(c.parents)&&c.parents.includes(e)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let s=c.branch;if(c.type===p.MERGE&&!e)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!n.records.commits.has(a)){if(s===n.records.currBranch){let y=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let m=n.records.branches.get(n.records.currBranch);if(m===void 0||!m){let y=Error(`Incorrect usage of "cherry-pick". Current branch (${n.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let $=n.records.commits.get(m);if($===void 0||!$){let y=Error(`Incorrect usage of "cherry-pick". Current branch (${n.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let l={id:n.records.seq+"-"+z(),message:`cherry-picked ${c==null?void 0:c.message} into ${n.records.currBranch}`,seq:n.records.seq++,parents:n.records.head==null?[]:[n.records.head.id,c.id],branch:n.records.currBranch,type:p.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${c.id}${c.type===p.MERGE?`|parent:${e}`:""}`]};n.records.head=l,n.records.commits.set(l.id,l),n.records.branches.set(n.records.currBranch,l.id),u.debug(n.records.branches),u.debug("in cherryPick")}},"cherryPick"),_=h(function(r){if(r=k.sanitizeText(r,A()),n.records.branches.has(r)){n.records.currBranch=r;let t=n.records.branches.get(n.records.currBranch);t===void 0||!t?n.records.head=null:n.records.head=n.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${r}")`);throw t.hash={text:`checkout ${r}`,token:`checkout ${r}`,expected:[`branch ${r}`]},t}},"checkout");function D(r,t,a){let i=r.indexOf(t);i===-1?r.push(a):r.splice(i,1,a)}h(D,"upsert");function N(r){let t=r.reduce((e,o)=>e.seq>o.seq?e:o,r[0]),a="";r.forEach(function(e){e===t?a+=" *":a+=" |"});let i=[a,t.id,t.seq];for(let e in n.records.branches)n.records.branches.get(e)===t.id&&i.push(e);if(u.debug(i.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let e=n.records.commits.get(t.parents[0]);D(r,t,e),t.parents[1]&&r.push(n.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){let e=n.records.commits.get(t.parents[0]);D(r,t,e)}}r=j(r,e=>e.id),N(r)}h(N,"prettyPrintCommitHistory");var Et=h(function(){u.debug(n.records.commits);let r=K()[0];N([r])},"prettyPrint"),Ct=h(function(){n.reset(),st()},"clear"),kt=h(function(){return[...n.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Lt=h(function(){return n.records.branches},"getBranches"),Tt=h(function(){return n.records.commits},"getCommits"),K=h(function(){let r=[...n.records.commits.values()];return r.forEach(function(t){u.debug(t.id)}),r.sort((t,a)=>t.seq-a.seq),r},"getCommitsArray"),F={commitType:p,getConfig:A,setDirection:pt,setOptions:xt,getOptions:ft,commit:ut,branch:bt,merge:wt,cherryPick:Bt,checkout:_,prettyPrint:Et,clear:Ct,getBranchesAsObjArray:kt,getBranches:Lt,getCommits:Tt,getCommitsArray:K,getCurrentBranch:h(function(){return n.records.currBranch},"getCurrentBranch"),getDirection:h(function(){return n.records.direction},"getDirection"),getHead:h(function(){return n.records.head},"getHead"),setAccTitle:rt,getAccTitle:dt,getAccDescription:it,setAccDescription:mt,setDiagramTitle:ot,getDiagramTitle:et},Mt=h((r,t)=>{lt(r,t),r.dir&&t.setDirection(r.dir);for(let a of r.statements)vt(a,t)},"populate"),vt=h((r,t)=>{let a={Commit:h(i=>t.commit(Pt(i)),"Commit"),Branch:h(i=>t.branch(Rt(i)),"Branch"),Merge:h(i=>t.merge(At(i)),"Merge"),Checkout:h(i=>t.checkout(Gt(i)),"Checkout"),CherryPicking:h(i=>t.cherryPick(Ot(i)),"CherryPicking")}[r.$type];a?a(r):u.error(`Unknown statement type: ${r.$type}`)},"parseStatement"),Pt=h(r=>({id:r.id,msg:r.message??"",type:r.type===void 0?p.NORMAL:p[r.type],tags:r.tags??void 0}),"parseCommit"),Rt=h(r=>({name:r.name,order:r.order??0}),"parseBranch"),At=h(r=>({branch:r.branch,id:r.id??"",type:r.type===void 0?void 0:p[r.type],tags:r.tags??void 0}),"parseMerge"),Gt=h(r=>r.branch,"parseCheckout"),Ot=h(r=>{var t;return{id:r.id,targetId:"",tags:((t=r.tags)==null?void 0:t.length)===0?void 0:r.tags,parent:r.parent}},"parseCherryPicking"),It={parse:h(async r=>{let t=await $t("gitGraph",r);u.debug(t),Mt(t,F)},"parse")},f=(J=ct())==null?void 0:J.gitGraph,v=10,P=40,L=4,T=2,G=8,E=new Map,C=new Map,H=30,I=new Map,S=[],R=0,g="LR",qt=h(()=>{E.clear(),C.clear(),I.clear(),R=0,S=[],g="LR"},"clear"),Y=h(r=>{let t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof r=="string"?r.split(/\\n|\n|<br\s*\/?>/gi):r).forEach(a=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=a.trim(),t.appendChild(i)}),t},"drawText"),U=h(r=>{let t,a,i;return g==="BT"?(a=h((e,o)=>e<=o,"comparisonFunc"),i=1/0):(a=h((e,o)=>e>=o,"comparisonFunc"),i=0),r.forEach(e=>{var c,s;let o=g==="TB"||g=="BT"?(c=C.get(e))==null?void 0:c.y:(s=C.get(e))==null?void 0:s.x;o!==void 0&&a(o,i)&&(t=e,i=o)}),t},"findClosestParent"),zt=h(r=>{let t="",a=1/0;return r.forEach(i=>{let e=C.get(i).y;e<=a&&(t=i,a=e)}),t||void 0},"findClosestParentBT"),Ht=h((r,t,a)=>{let i=a,e=a,o=[];r.forEach(c=>{let s=t.get(c);if(!s)throw Error(`Commit not found for key ${c}`);s.parents.length?(i=Dt(s),e=Math.max(i,e)):o.push(s),Nt(s,i)}),i=e,o.forEach(c=>{Wt(c,i,a)}),r.forEach(c=>{let s=t.get(c);if(s!=null&&s.parents.length){let m=zt(s.parents);i=C.get(m).y-P,i<=e&&(e=i);let $=E.get(s.branch).pos,l=i-v;C.set(s.id,{x:$,y:l})}})},"setParallelBTPos"),St=h(r=>{var i;let t=U(r.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${r.id}`);let a=(i=C.get(t))==null?void 0:i.y;if(a===void 0)throw Error(`Closest parent position not found for commit ${r.id}`);return a},"findClosestParentPos"),Dt=h(r=>St(r)+P,"calculateCommitPosition"),Nt=h((r,t)=>{let a=E.get(r.branch);if(!a)throw Error(`Branch not found for commit ${r.id}`);let i=a.pos,e=t+v;return C.set(r.id,{x:i,y:e}),{x:i,y:e}},"setCommitPosition"),Wt=h((r,t,a)=>{let i=E.get(r.branch);if(!i)throw Error(`Branch not found for commit ${r.id}`);let e=t+a,o=i.pos;C.set(r.id,{x:o,y:e})},"setRootPosition"),jt=h((r,t,a,i,e,o)=>{if(o===p.HIGHLIGHT)r.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${t.id} commit-highlight${e%G} ${i}-outer`),r.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${t.id} commit${e%G} ${i}-inner`);else if(o===p.CHERRY_PICK)r.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${t.id} ${i}`),r.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${i}`),r.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${i}`),r.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} ${i}`),r.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} ${i}`);else{let c=r.append("circle");if(c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",t.type===p.MERGE?9:10),c.attr("class",`commit ${t.id} commit${e%G}`),o===p.MERGE){let s=r.append("circle");s.attr("cx",a.x),s.attr("cy",a.y),s.attr("r",6),s.attr("class",`commit ${i} ${t.id} commit${e%G}`)}o===p.REVERSE&&r.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${i} ${t.id} commit${e%G}`)}},"drawCommitBullet"),_t=h((r,t,a,i)=>{var e;if(t.type!==p.CHERRY_PICK&&(t.customId&&t.type===p.MERGE||t.type!==p.MERGE)&&(f!=null&&f.showCommitLabel)){let o=r.append("g"),c=o.insert("rect").attr("class","commit-label-bkg"),s=o.append("text").attr("x",i).attr("y",a.y+25).attr("class","commit-label").text(t.id),m=(e=s.node())==null?void 0:e.getBBox();if(m&&(c.attr("x",a.posWithOffset-m.width/2-T).attr("y",a.y+13.5).attr("width",m.width+2*T).attr("height",m.height+2*T),g==="TB"||g==="BT"?(c.attr("x",a.x-(m.width+4*L+5)).attr("y",a.y-12),s.attr("x",a.x-(m.width+4*L)).attr("y",a.y+m.height-12)):s.attr("x",a.posWithOffset-m.width/2),f.rotateCommitLabel))if(g==="TB"||g==="BT")s.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{let $=-7.5-(m.width+10)/25*9.5,l=10+m.width/25*8.5;o.attr("transform","translate("+$+", "+l+") rotate(-45, "+i+", "+a.y+")")}}},"drawCommitLabel"),Kt=h((r,t,a,i)=>{var e;if(t.tags.length>0){let o=0,c=0,s=0,m=[];for(let $ of t.tags.reverse()){let l=r.insert("polygon"),y=r.append("circle"),d=r.append("text").attr("y",a.y-16-o).attr("class","tag-label").text($),x=(e=d.node())==null?void 0:e.getBBox();if(!x)throw Error("Tag bbox not found");c=Math.max(c,x.width),s=Math.max(s,x.height),d.attr("x",a.posWithOffset-x.width/2),m.push({tag:d,hole:y,rect:l,yOffset:o}),o+=20}for(let{tag:$,hole:l,rect:y,yOffset:d}of m){let x=s/2,b=a.y-19.2-d;if(y.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
var J;import"./chunk-FPAJGGOC-DOBSZjU2.js";import"./main-U5Goe76G.js";import"./purify.es-B-nzWya6.js";import{u as Q}from"./src-DJ8ZKoFs.js";import{g as X,i as Z,m as tt}from"./chunk-S3R3BYOJ-D1UiABQX.js";import{n as h,r as u}from"./src-CmKhyEBC.js";import{B as rt,C as et,K as at,U as ot,_ as it,a as st,b as ct,d as nt,s as k,v as dt,y as ht,z as mt}from"./chunk-ABZYJK2D-D1A06qKo.js";import"./dist-DxxvVPQH.js";import"./chunk-O7ZBX7Z2-DoE29Zoe.js";import"./chunk-S6J4BHB3-Cvr0itXK.js";import"./chunk-LBM3YZW2-D3uTpSOd.js";import"./chunk-76Q3JFCE-B261Xkae.js";import"./chunk-T53DSG4Q-C7bPrBIt.js";import"./chunk-LHMN2FUI-2FK1AIwU.js";import"./chunk-FWNWRKHM-C0b0DIG0.js";import{t as lt}from"./chunk-4BX2VUAB-BP-RGZn9.js";import{t as $t}from"./mermaid-parser.core-D237JwYN.js";import{t as yt}from"./chunk-QZHKN3VN-DCq7JxLD.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},gt=nt.gitGraph,A=h(()=>Z({...gt,...ht().gitGraph}),"getConfig"),n=new yt(()=>{let r=A(),t=r.mainBranchName,a=r.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:a}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});function z(){return tt({length:7})}h(z,"getID");function j(r,t){let a=Object.create(null);return r.reduce((i,e)=>{let o=t(e);return a[o]||(a[o]=!0,i.push(e)),i},[])}h(j,"uniqBy");var pt=h(function(r){n.records.direction=r},"setDirection"),xt=h(function(r){u.debug("options str",r),r=r==null?void 0:r.trim(),r||(r="{}");try{n.records.options=JSON.parse(r)}catch(t){u.error("error while parsing gitGraph options",t.message)}},"setOptions"),ft=h(function(){return n.records.options},"getOptions"),ut=h(function(r){let t=r.msg,a=r.id,i=r.type,e=r.tags;u.info("commit",t,a,i,e),u.debug("Entering commit:",t,a,i,e);let o=A();a=k.sanitizeText(a,o),t=k.sanitizeText(t,o),e=e==null?void 0:e.map(s=>k.sanitizeText(s,o));let c={id:a||n.records.seq+"-"+z(),message:t,seq:n.records.seq++,type:i??p.NORMAL,tags:e??[],parents:n.records.head==null?[]:[n.records.head.id],branch:n.records.currBranch};n.records.head=c,u.info("main branch",o.mainBranchName),n.records.commits.has(c.id)&&u.warn(`Commit ID ${c.id} already exists`),n.records.commits.set(c.id,c),n.records.branches.set(n.records.currBranch,c.id),u.debug("in pushCommit "+c.id)},"commit"),bt=h(function(r){let t=r.name,a=r.order;if(t=k.sanitizeText(t,A()),n.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);n.records.branches.set(t,n.records.head==null?null:n.records.head.id),n.records.branchConfig.set(t,{name:t,order:a}),_(t),u.debug("in createBranch")},"branch"),wt=h(r=>{let t=r.branch,a=r.id,i=r.type,e=r.tags,o=A();t=k.sanitizeText(t,o),a&&(a=k.sanitizeText(a,o));let c=n.records.branches.get(n.records.currBranch),s=n.records.branches.get(t),m=c?n.records.commits.get(c):void 0,$=s?n.records.commits.get(s):void 0;if(m&&$&&m.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(n.records.currBranch===t){let d=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},d}if(m===void 0||!m){let d=Error(`Incorrect usage of "merge". Current branch (${n.records.currBranch})has no commits`);throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},d}if(!n.records.branches.has(t)){let d=Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},d}if($===void 0||!$){let d=Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},d}if(m===$){let d=Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},d}if(a&&n.records.commits.has(a)){let d=Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw d.hash={text:`merge ${t} ${a} ${i} ${e==null?void 0:e.join(" ")}`,token:`merge ${t} ${a} ${i} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${t} ${a}_UNIQUE ${i} ${e==null?void 0:e.join(" ")}`]},d}let l=s||"",y={id:a||`${n.records.seq}-${z()}`,message:`merged branch ${t} into ${n.records.currBranch}`,seq:n.records.seq++,parents:n.records.head==null?[]:[n.records.head.id,l],branch:n.records.currBranch,type:p.MERGE,customType:i,customId:!!a,tags:e??[]};n.records.head=y,n.records.commits.set(y.id,y),n.records.branches.set(n.records.currBranch,y.id),u.debug(n.records.branches),u.debug("in mergeBranch")},"merge"),Bt=h(function(r){let t=r.id,a=r.targetId,i=r.tags,e=r.parent;u.debug("Entering cherryPick:",t,a,i);let o=A();if(t=k.sanitizeText(t,o),a=k.sanitizeText(a,o),i=i==null?void 0:i.map(m=>k.sanitizeText(m,o)),e=k.sanitizeText(e,o),!t||!n.records.commits.has(t)){let m=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw m.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},m}let c=n.records.commits.get(t);if(c===void 0||!c)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(c.parents)&&c.parents.includes(e)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let s=c.branch;if(c.type===p.MERGE&&!e)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!n.records.commits.has(a)){if(s===n.records.currBranch){let y=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let m=n.records.branches.get(n.records.currBranch);if(m===void 0||!m){let y=Error(`Incorrect usage of "cherry-pick". Current branch (${n.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let $=n.records.commits.get(m);if($===void 0||!$){let y=Error(`Incorrect usage of "cherry-pick". Current branch (${n.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let l={id:n.records.seq+"-"+z(),message:`cherry-picked ${c==null?void 0:c.message} into ${n.records.currBranch}`,seq:n.records.seq++,parents:n.records.head==null?[]:[n.records.head.id,c.id],branch:n.records.currBranch,type:p.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${c.id}${c.type===p.MERGE?`|parent:${e}`:""}`]};n.records.head=l,n.records.commits.set(l.id,l),n.records.branches.set(n.records.currBranch,l.id),u.debug(n.records.branches),u.debug("in cherryPick")}},"cherryPick"),_=h(function(r){if(r=k.sanitizeText(r,A()),n.records.branches.has(r)){n.records.currBranch=r;let t=n.records.branches.get(n.records.currBranch);t===void 0||!t?n.records.head=null:n.records.head=n.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${r}")`);throw t.hash={text:`checkout ${r}`,token:`checkout ${r}`,expected:[`branch ${r}`]},t}},"checkout");function D(r,t,a){let i=r.indexOf(t);i===-1?r.push(a):r.splice(i,1,a)}h(D,"upsert");function N(r){let t=r.reduce((e,o)=>e.seq>o.seq?e:o,r[0]),a="";r.forEach(function(e){e===t?a+=" *":a+=" |"});let i=[a,t.id,t.seq];for(let e in n.records.branches)n.records.branches.get(e)===t.id&&i.push(e);if(u.debug(i.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let e=n.records.commits.get(t.parents[0]);D(r,t,e),t.parents[1]&&r.push(n.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){let e=n.records.commits.get(t.parents[0]);D(r,t,e)}}r=j(r,e=>e.id),N(r)}h(N,"prettyPrintCommitHistory");var Et=h(function(){u.debug(n.records.commits);let r=K()[0];N([r])},"prettyPrint"),Ct=h(function(){n.reset(),st()},"clear"),kt=h(function(){return[...n.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Lt=h(function(){return n.records.branches},"getBranches"),Tt=h(function(){return n.records.commits},"getCommits"),K=h(function(){let r=[...n.records.commits.values()];return r.forEach(function(t){u.debug(t.id)}),r.sort((t,a)=>t.seq-a.seq),r},"getCommitsArray"),F={commitType:p,getConfig:A,setDirection:pt,setOptions:xt,getOptions:ft,commit:ut,branch:bt,merge:wt,cherryPick:Bt,checkout:_,prettyPrint:Et,clear:Ct,getBranchesAsObjArray:kt,getBranches:Lt,getCommits:Tt,getCommitsArray:K,getCurrentBranch:h(function(){return n.records.currBranch},"getCurrentBranch"),getDirection:h(function(){return n.records.direction},"getDirection"),getHead:h(function(){return n.records.head},"getHead"),setAccTitle:rt,getAccTitle:dt,getAccDescription:it,setAccDescription:mt,setDiagramTitle:ot,getDiagramTitle:et},Mt=h((r,t)=>{lt(r,t),r.dir&&t.setDirection(r.dir);for(let a of r.statements)vt(a,t)},"populate"),vt=h((r,t)=>{let a={Commit:h(i=>t.commit(Pt(i)),"Commit"),Branch:h(i=>t.branch(Rt(i)),"Branch"),Merge:h(i=>t.merge(At(i)),"Merge"),Checkout:h(i=>t.checkout(Gt(i)),"Checkout"),CherryPicking:h(i=>t.cherryPick(Ot(i)),"CherryPicking")}[r.$type];a?a(r):u.error(`Unknown statement type: ${r.$type}`)},"parseStatement"),Pt=h(r=>({id:r.id,msg:r.message??"",type:r.type===void 0?p.NORMAL:p[r.type],tags:r.tags??void 0}),"parseCommit"),Rt=h(r=>({name:r.name,order:r.order??0}),"parseBranch"),At=h(r=>({branch:r.branch,id:r.id??"",type:r.type===void 0?void 0:p[r.type],tags:r.tags??void 0}),"parseMerge"),Gt=h(r=>r.branch,"parseCheckout"),Ot=h(r=>{var t;return{id:r.id,targetId:"",tags:((t=r.tags)==null?void 0:t.length)===0?void 0:r.tags,parent:r.parent}},"parseCherryPicking"),It={parse:h(async r=>{let t=await $t("gitGraph",r);u.debug(t),Mt(t,F)},"parse")},f=(J=ct())==null?void 0:J.gitGraph,v=10,P=40,L=4,T=2,G=8,E=new Map,C=new Map,H=30,I=new Map,S=[],R=0,g="LR",qt=h(()=>{E.clear(),C.clear(),I.clear(),R=0,S=[],g="LR"},"clear"),Y=h(r=>{let t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof r=="string"?r.split(/\\n|\n|<br\s*\/?>/gi):r).forEach(a=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=a.trim(),t.appendChild(i)}),t},"drawText"),U=h(r=>{let t,a,i;return g==="BT"?(a=h((e,o)=>e<=o,"comparisonFunc"),i=1/0):(a=h((e,o)=>e>=o,"comparisonFunc"),i=0),r.forEach(e=>{var c,s;let o=g==="TB"||g=="BT"?(c=C.get(e))==null?void 0:c.y:(s=C.get(e))==null?void 0:s.x;o!==void 0&&a(o,i)&&(t=e,i=o)}),t},"findClosestParent"),zt=h(r=>{let t="",a=1/0;return r.forEach(i=>{let e=C.get(i).y;e<=a&&(t=i,a=e)}),t||void 0},"findClosestParentBT"),Ht=h((r,t,a)=>{let i=a,e=a,o=[];r.forEach(c=>{let s=t.get(c);if(!s)throw Error(`Commit not found for key ${c}`);s.parents.length?(i=Dt(s),e=Math.max(i,e)):o.push(s),Nt(s,i)}),i=e,o.forEach(c=>{Wt(c,i,a)}),r.forEach(c=>{let s=t.get(c);if(s!=null&&s.parents.length){let m=zt(s.parents);i=C.get(m).y-P,i<=e&&(e=i);let $=E.get(s.branch).pos,l=i-v;C.set(s.id,{x:$,y:l})}})},"setParallelBTPos"),St=h(r=>{var i;let t=U(r.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${r.id}`);let a=(i=C.get(t))==null?void 0:i.y;if(a===void 0)throw Error(`Closest parent position not found for commit ${r.id}`);return a},"findClosestParentPos"),Dt=h(r=>St(r)+P,"calculateCommitPosition"),Nt=h((r,t)=>{let a=E.get(r.branch);if(!a)throw Error(`Branch not found for commit ${r.id}`);let i=a.pos,e=t+v;return C.set(r.id,{x:i,y:e}),{x:i,y:e}},"setCommitPosition"),Wt=h((r,t,a)=>{let i=E.get(r.branch);if(!i)throw Error(`Branch not found for commit ${r.id}`);let e=t+a,o=i.pos;C.set(r.id,{x:o,y:e})},"setRootPosition"),jt=h((r,t,a,i,e,o)=>{if(o===p.HIGHLIGHT)r.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${t.id} commit-highlight${e%G} ${i}-outer`),r.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${t.id} commit${e%G} ${i}-inner`);else if(o===p.CHERRY_PICK)r.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${t.id} ${i}`),r.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${i}`),r.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${i}`),r.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} ${i}`),r.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} ${i}`);else{let c=r.append("circle");if(c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",t.type===p.MERGE?9:10),c.attr("class",`commit ${t.id} commit${e%G}`),o===p.MERGE){let s=r.append("circle");s.attr("cx",a.x),s.attr("cy",a.y),s.attr("r",6),s.attr("class",`commit ${i} ${t.id} commit${e%G}`)}o===p.REVERSE&&r.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${i} ${t.id} commit${e%G}`)}},"drawCommitBullet"),_t=h((r,t,a,i)=>{var e;if(t.type!==p.CHERRY_PICK&&(t.customId&&t.type===p.MERGE||t.type!==p.MERGE)&&(f!=null&&f.showCommitLabel)){let o=r.append("g"),c=o.insert("rect").attr("class","commit-label-bkg"),s=o.append("text").attr("x",i).attr("y",a.y+25).attr("class","commit-label").text(t.id),m=(e=s.node())==null?void 0:e.getBBox();if(m&&(c.attr("x",a.posWithOffset-m.width/2-T).attr("y",a.y+13.5).attr("width",m.width+2*T).attr("height",m.height+2*T),g==="TB"||g==="BT"?(c.attr("x",a.x-(m.width+4*L+5)).attr("y",a.y-12),s.attr("x",a.x-(m.width+4*L)).attr("y",a.y+m.height-12)):s.attr("x",a.posWithOffset-m.width/2),f.rotateCommitLabel))if(g==="TB"||g==="BT")s.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{let $=-7.5-(m.width+10)/25*9.5,l=10+m.width/25*8.5;o.attr("transform","translate("+$+", "+l+") rotate(-45, "+i+", "+a.y+")")}}},"drawCommitLabel"),Kt=h((r,t,a,i)=>{var e;if(t.tags.length>0){let o=0,c=0,s=0,m=[];for(let $ of t.tags.reverse()){let l=r.insert("polygon"),y=r.append("circle"),d=r.append("text").attr("y",a.y-16-o).attr("class","tag-label").text($),x=(e=d.node())==null?void 0:e.getBBox();if(!x)throw Error("Tag bbox not found");c=Math.max(c,x.width),s=Math.max(s,x.height),d.attr("x",a.posWithOffset-x.width/2),m.push({tag:d,hole:y,rect:l,yOffset:o}),o+=20}for(let{tag:$,hole:l,rect:y,yOffset:d}of m){let x=s/2,b=a.y-19.2-d;if(y.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${i-c/2-L/2},${b+T}
|
|
3
3
|
${i-c/2-L/2},${b-T}
|
|
4
4
|
${a.posWithOffset-c/2-L},${b-x-T}
|