@datalayer/agent-runtimes 1.6.95 → 1.6.96
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-embed/chunks/{AgentDetails-BvfdY3uO.js → AgentDetails-Ddc6d7Vb.js} +1 -1
- package/dist-embed/chunks/{AgentDetailsDialog-fQMt4AfV.js → AgentDetailsDialog-BqYyyNpE.js} +1 -1
- package/dist-embed/chunks/{AgentInspector-Bk_6hnzQ.js → AgentInspector-Dwh_YetA.js} +1 -1
- package/dist-embed/chunks/{AgentInspectorDialog-COpHclrh.js → AgentInspectorDialog-Cau9xrvM.js} +1 -1
- package/dist-embed/chunks/{CellSidebarExtension-BSomRlJ-.js → CellSidebarExtension-DSNmntUX.js} +7 -7
- package/dist-embed/chunks/{ChatView-C8fvqoAH.js → ChatView-Dzy1KRzJ.js} +4 -4
- package/dist-embed/chunks/{CollapsiblePlugin-BcCRY7vG.js → CollapsiblePlugin-DmoruakD.js} +1 -1
- package/dist-embed/chunks/{ContextPie-BHsXiDRO.js → ContextPie-x_xvOUQW.js} +1 -1
- package/dist-embed/chunks/{DeckComponent-DGJwaGWE.js → DeckComponent-B2pu-8Gg.js} +1 -1
- package/dist-embed/chunks/{DeckRenderer-B8PqIWaS.js → DeckRenderer-BitpK9Co.js} +2 -2
- package/dist-embed/chunks/{DeckStage-b6WCYIrt.js → DeckStage-D4emgALl.js} +3 -3
- package/dist-embed/chunks/{DocumentView-2NxPEuqp.js → DocumentView-GCdq20sR.js} +1 -1
- package/dist-embed/chunks/{EphemeralDocument-GaUco3ov.js → EphemeralDocument-BxEBdArS.js} +1 -1
- package/dist-embed/chunks/{EphemeralNotebook-DBs08R5-.js → EphemeralNotebook-iWR0tOaY.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawComponent-vHJ6t4Sx.js → ExcalidrawComponent-BNE0rUus.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawModal-DwWGmnRQ.js → ExcalidrawModal-B0d7EMm1.js} +1 -1
- package/dist-embed/chunks/{FormulaBar-CPCjPhlD.js → FormulaBar-BBm1JXuS.js} +1 -1
- package/dist-embed/chunks/{JupyterLexicalExtension-Df6IrbR-.js → JupyterLexicalExtension-DEiuU9XK.js} +29 -29
- package/dist-embed/chunks/{KernelVariables-oNW3cYs4.js → KernelVariables-BehGjCby.js} +1 -1
- package/dist-embed/chunks/{LexicalToolRegistry-CxE-muFM.js → LexicalToolRegistry-CjiooYJz.js} +1 -1
- package/dist-embed/chunks/{NotebookToolSurfaces-B3MY-vYT.js → NotebookToolSurfaces-D2niRSgN.js} +1 -1
- package/dist-embed/chunks/{NotebookView-B84bIB_s.js → NotebookView--XqCYFyy.js} +1 -1
- package/dist-embed/chunks/{Output-DbuS5mTW.js → Output-DIp_tlWH.js} +6 -6
- package/dist-embed/chunks/{SandboxDetailsDialog-DxyOgkVN.js → SandboxDetailsDialog-DXoy-U_w.js} +1 -1
- package/dist-embed/chunks/{SchemaForm-BpQuFPdH.js → SchemaForm-Cmv4n0Os.js} +1 -1
- package/dist-embed/chunks/{SheetStage-C6XKe73k.js → SheetStage-CPrhxiEk.js} +1 -1
- package/dist-embed/chunks/{SheetTabs-L2YN86GJ.js → SheetTabs-CIoATuqe.js} +1 -1
- package/dist-embed/chunks/SpreadsheetPreviewView-DA_p2PVw.js +1 -0
- package/dist-embed/chunks/{SpreadsheetView-DCMl89-H.js → SpreadsheetView-D6J2ll9x.js} +1 -1
- package/dist-embed/chunks/TripMapView-Chu4CxoP.js +800 -0
- package/dist-embed/chunks/{WidgetVariableView-tHluwrGK.js → WidgetVariableView-pK_kA46x.js} +1 -1
- package/dist-embed/chunks/{YouTubePlugin-C-3vxmlQ.js → YouTubePlugin-DkAnyShg.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-Bhd2l8QD.js → abnfDiagram-VCTEODGH-CX9mMYXT.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-kVHfIAbZ.js → abnfDiagram-VCTEODGH-D1af2ghA.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-BCGK5XKK.js → abnfDiagram-VCTEODGH-Ri346RDd.js} +1 -1
- package/dist-embed/chunks/{ar-SA-G6X2FPQ2-UWUqTy-K.js → ar-SA-G6X2FPQ2-CXTKdzGs.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-DXEtcMhi.js → architectureDiagram-5GKGNRK7-2OGYSHGz.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-BV0c57bp.js → architectureDiagram-5GKGNRK7-C0-0iqdj.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-Fw3FuyyK.js → architectureDiagram-5GKGNRK7-CsLrz5V8.js} +1 -1
- package/dist-embed/chunks/{az-AZ-76LH7QW2-DWmo_K9N.js → az-AZ-76LH7QW2-C2FVIwGa.js} +1 -1
- package/dist-embed/chunks/{bg-BG-XCXSNQG7-DEIS8jN8.js → bg-BG-XCXSNQG7-Do7qP3y5.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-868be97b-atYMh58B.js → blockDiagram-868be97b-CCPwkNQD.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-B5YMuboC.js → blockDiagram-I7D4REHJ-BwtxKaHd.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-c2uxRyEL.js → blockDiagram-I7D4REHJ-Dkac8pDH.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-2Nx-2jmD.js → blockDiagram-I7D4REHJ-DuFs7Ehc.js} +1 -1
- package/dist-embed/chunks/{bn-BD-2XOGV67Q-CdGydfQA.js → bn-BD-2XOGV67Q-CncsPSj6.js} +1 -1
- package/dist-embed/chunks/browser-CjxI_vdc.js +1 -0
- package/dist-embed/chunks/{c4Diagram-3f4bdde3-DrAykr_M.js → c4Diagram-3f4bdde3-BLw1hbRS.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-CxQfmxDp.js → c4Diagram-7LVT6UL2-COW8SWY8.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-D9KYeQdn.js → c4Diagram-7LVT6UL2-Cvhvycsr.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-CCUWeXWN.js → c4Diagram-7LVT6UL2-Db67ewBM.js} +1 -1
- package/dist-embed/chunks/{ca-ES-6MX7JW3Y-Cmxh4hHb.js → ca-ES-6MX7JW3Y-C0yxvCPt.js} +1 -1
- package/dist-embed/chunks/{celltoolbartracker-6bzTgI7x.js → celltoolbartracker-BEMovM_S.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-BlidW8Ew.js → chunk-2Q5K7J3B-Ct-A4CCZ.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-C81BMfQj.js → chunk-2Q5K7J3B-Dth1v10p.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-pB9xAJMI.js → chunk-2Q5K7J3B-TussmrZx.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-1bQxgqop.js → chunk-5VM5RSS4--_g5ThPK.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-BLaN6vZP.js → chunk-5VM5RSS4-EV3_59Fj.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-BTk_puBE.js → chunk-5VM5RSS4-PCyW8e7X.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-Ccv2Z4Dk.js → chunk-F27PBJKO-BEGqbZOG.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-V8QZRvNX.js → chunk-F27PBJKO-BElpQlek.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-DIaRuD6P.js → chunk-F27PBJKO-D_dK9KO0.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-ChFGHsmA.js → chunk-IMKFNOWR-63rCyYBN.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-C6EghkRl.js → chunk-IMKFNOWR-CXlJYg5e.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-eUuKtHwj.js → chunk-IMKFNOWR-CvHJsrEQ.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-DaXZnYxt.js → chunk-JWPE2WC7-DjRqg4Bs.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-C_--LD31.js → chunk-JWPE2WC7-KjfHmyaP.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-TEJpnjgJ.js → chunk-JWPE2WC7-i03aNExK.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-C2h36Rd-.js → chunk-POPQ4Y6H-8SJD7Lj6.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-DFDiDT07.js → chunk-POPQ4Y6H-CTgPwukU.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-DE45RGQz.js → chunk-POPQ4Y6H-DD_FZOBG.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-NHZa_Cm7.js → chunk-SVP7TREG-Be_dVsBv.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-DuvZnJuX.js → chunk-SVP7TREG-BmKcdcZf.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-CguX5xuV.js → chunk-SVP7TREG-oWMhd7-x.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-DZSn1hoa.js → chunk-TICWLB2K-BWrWaYZh.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-C6yeHtH-.js → chunk-TICWLB2K-DPw0Zd3X.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-CdnwBh6S.js → chunk-TICWLB2K-oYX1pnTC.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-CkHqIglg.js → chunk-XXDRQBXY-B_8mfvZs.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-BfS84YmJ.js → chunk-XXDRQBXY-ClhwppX9.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-DgalMoCT.js → chunk-XXDRQBXY-DFqSJS_V.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-3ejDnz-R.js → classDiagram-ZZMXUADV--KG2C8h5.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-BBfLN17b.js → classDiagram-ZZMXUADV-B7xDgsRr.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-ClDeAawy.js → classDiagram-ZZMXUADV-DE4to6sK.js} +1 -1
- package/dist-embed/chunks/{classDiagram-f62afe4f-BkVbm46G.js → classDiagram-f62afe4f-Dc6e8Her.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-604399ef-CHjLgl6H.js → classDiagram-v2-604399ef-C495Aipq.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-3ejDnz-R.js → classDiagram-v2-VYDZK3BY--KG2C8h5.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-BBfLN17b.js → classDiagram-v2-VYDZK3BY-B7xDgsRr.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-ClDeAawy.js → classDiagram-v2-VYDZK3BY-DE4to6sK.js} +1 -1
- package/dist-embed/chunks/{code-block-IT6T5CEO-Wkpbh9X2.js → code-block-IT6T5CEO-iJrkFsOH.js} +1 -1
- package/dist-embed/chunks/{component-CyKYadVm.js → component-DrP6jrik.js} +1 -1
- package/dist-embed/chunks/{core-COPCyO2o.js → core-BGGgYrZ9.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-5e8DCgyb.js → cose-bilkent-JH36ORCC-Bsk4YY80.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-Bi-L9aFT.js → cose-bilkent-JH36ORCC-MSc1rEXR.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-CG1KcI5m.js → cose-bilkent-JH36ORCC-tnzM7MrS.js} +1 -1
- package/dist-embed/chunks/{createText-aed3d8b3-dWIlVV-C.js → createText-aed3d8b3-PiG8oTtZ.js} +1 -1
- package/dist-embed/chunks/{cs-CZ-2BRQDIVT-B1CoQCS8.js → cs-CZ-2BRQDIVT-BlipVn6W.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-DsvgMVdR.js → cynefinDiagram-5FMLGOSQ-BJSLWLpL.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-CMqYhCCV.js → cynefinDiagram-5FMLGOSQ-CBkkpqSz.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-BVOqZUM5.js → cynefinDiagram-5FMLGOSQ-Cxd4hJ0P.js} +1 -1
- package/dist-embed/chunks/{da-DK-5WZEPLOC-cOefviqg.js → da-DK-5WZEPLOC-Bw6Ix-Y_.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-Dv7BBqJM.js → dagre-GXQ25YYZ-CkLWQcoy.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-DB5hgFOJ.js → dagre-GXQ25YYZ-DmOK599e.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-DbL89rL1.js → dagre-GXQ25YYZ-u0MmbdNG.js} +1 -1
- package/dist-embed/chunks/{de-DE-XR44H4JA-B8A_EIdX.js → de-DE-XR44H4JA-hT0iw9Bo.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-DH-JGQ3O.js → diagram-S7CK7UJ4--1SOVzNY.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-Djh1lnDY.js → diagram-S7CK7UJ4-B7IcrsxK.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-_oQjxS8J.js → diagram-S7CK7UJ4-D0ZMd2cK.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-DrVhyvuK.js → diagram-UQ7AKVKN-CR9r4bhp.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-CkvISpbc.js → diagram-UQ7AKVKN-CZAZODO9.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-rAdoD-XE.js → diagram-UQ7AKVKN-DGk1jOrN.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-6xNoFc1e.js → diagram-VSXAHHWV-BGuGdwAu.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-BWRulDaN.js → diagram-VSXAHHWV-CPR3SHv_.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-Kq0WyfDW.js → diagram-VSXAHHWV-DO0L5yoE.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-BSENIJml.js → diagram-VX7I27RA-BOMRUaLY.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-pBVtEscQ.js → diagram-VX7I27RA-BfmIQLZX.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-B5e3Qv0x.js → diagram-VX7I27RA-DMRKeXbI.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-DkTW7b_d.js → diagram-Z3DM3KII-B2OiuH_C.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-dQNfxGJA.js → diagram-Z3DM3KII-DAiKcNEv.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-CCtO4ivG.js → diagram-Z3DM3KII-DKDeEH1W.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-fRVaHZix.js → ebnfDiagram-PWID7BFC-Cru7ooRB.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-DFo1owyO.js → ebnfDiagram-PWID7BFC-DRjyqxcH.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-DhashMjX.js → ebnfDiagram-PWID7BFC-uMVSPDOp.js} +1 -1
- package/dist-embed/chunks/{edges-b2856ca0-CxR_AYFU.js → edges-b2856ca0-Cggl2xrH.js} +1 -1
- package/dist-embed/chunks/{el-GR-BZB4AONW-r6OOggAo.js → el-GR-BZB4AONW-BmNYPiJK.js} +1 -1
- package/dist-embed/chunks/{erDiagram-5d81789a-pWCuXn86.js → erDiagram-5d81789a-CGBXBycw.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-qBMO3ODf.js → erDiagram-RLTQ6QDP-CN1X55A5.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-Cn71QFng.js → erDiagram-RLTQ6QDP-CSpJrmyr.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-C1-L32ui.js → erDiagram-RLTQ6QDP-DIFLAmTe.js} +1 -1
- package/dist-embed/chunks/{es-ES-U4NZUMDT-B_e9d454.js → es-ES-U4NZUMDT-CE7hUJnw.js} +1 -1
- package/dist-embed/chunks/{esm-BBkfzxv_.js → esm-Bs-8Cbf_.js} +1 -1
- package/dist-embed/chunks/{esm-DEiQo7YS.js → esm-CsO1ipmZ.js} +1 -1
- package/dist-embed/chunks/{eu-ES-A7QVB2H4-Blt0C5Cr.js → eu-ES-A7QVB2H4-BUk5broy.js} +1 -1
- package/dist-embed/chunks/{fa-IR-HGAKTJCU-CTozxxBD.js → fa-IR-HGAKTJCU-DvlFAlYH.js} +1 -1
- package/dist-embed/chunks/{fi-FI-Z5N7JZ37-CyAB-y-D.js → fi-FI-Z5N7JZ37-DzF1j0vM.js} +1 -1
- package/dist-embed/chunks/{flowDb-185abca5-mGOFN4Rm.js → flowDb-185abca5-CR_eNtea.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-1629c991-BpFY8YdN.js → flowDiagram-1629c991-BUCdGiy7.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-Bid_pFDK.js → flowDiagram-HODETNUW-40v2AZyg.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-luWVHeDm.js → flowDiagram-HODETNUW-Ehnca2ni.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-DK6nfPXm.js → flowDiagram-HODETNUW-rrCrE8ag.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-v2-1d953310-D6OBW8Rm.js → flowDiagram-v2-1d953310-C-mQVR3d.js} +1 -1
- package/dist-embed/chunks/{flowchart-elk-definition-6df44142-BVaCKHm8.js → flowchart-elk-definition-6df44142-BUjCU9MT.js} +1 -1
- package/dist-embed/chunks/{fr-FR-RHASNOE6-DqQdDGJI.js → fr-FR-RHASNOE6-DGF_Vyig.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-3b0b3873-Cv_0V3zO.js → ganttDiagram-3b0b3873-CU1sjzSg.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-m6mZe7W0.js → ganttDiagram-EL5Y4UJY-B2NVsC-C.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-DZHrkG45.js → ganttDiagram-EL5Y4UJY-BHLbHQvv.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY--60tKSM9.js → ganttDiagram-EL5Y4UJY-CL_uGZmq.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-aZuraF8j.js → gitGraphDiagram-WWUBYQGX-C9dQonfW.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-DQGRL7uj.js → gitGraphDiagram-WWUBYQGX-CCUBvn_Y.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-BNb2xhKp.js → gitGraphDiagram-WWUBYQGX-DtuCNBUK.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-C14H7TVH.js → gitGraphDiagram-f01e8bc2-BbkFL6o9.js} +1 -1
- package/dist-embed/chunks/{gl-ES-HMX3MZ6V-DqEBlLxz.js → gl-ES-HMX3MZ6V-xM5HzxAU.js} +1 -1
- package/dist-embed/chunks/{he-IL-6SHJWFNN-BvhQ--Ic.js → he-IL-6SHJWFNN-nbUgZbH-.js} +1 -1
- package/dist-embed/chunks/{hi-IN-IWLTKZ5I-DYH2l25d.js → hi-IN-IWLTKZ5I-Cdlzp28w.js} +1 -1
- package/dist-embed/chunks/{hu-HU-A5ZG7DT2-DQgUyc8H.js → hu-HU-A5ZG7DT2-CMH5lTGq.js} +1 -1
- package/dist-embed/chunks/{id-ID-SAP4L64H-pbXSdQ7E.js → id-ID-SAP4L64H-Bi5Ltt4D.js} +1 -1
- package/dist-embed/chunks/{index-9bae90f3-FAkVZI_I.js → index-9bae90f3-C-MowVD8.js} +1 -1
- package/dist-embed/chunks/{index-Bc6gicqV.js → index-BNjq7TZD.js} +1 -1
- package/dist-embed/chunks/{index-B6Qu-Ldt.js → index-BQEJgzm9.js} +4 -4
- package/dist-embed/chunks/{index-BXARqQ-K.js → index-BjMNv4qG.js} +1 -1
- package/dist-embed/chunks/{index-CnpOaqg6.js → index-CUjcBn1v.js} +3 -3
- package/dist-embed/chunks/{index-BQ5muxLJ.js → index-Ch2yqELA.js} +15 -15
- package/dist-embed/chunks/{index-BIUfp2AH.js → index-DF5urV1Q.js} +1 -1
- package/dist-embed/chunks/{index-UqDGAeD4.js → index-D_112S5W.js} +1 -1
- package/dist-embed/chunks/{index-C8Ip0RIO.js → index-PwNNIVgK.js} +1 -1
- package/dist-embed/chunks/{index-UMhfKl2p.js → index-tO6w-mHa.js} +2 -2
- package/dist-embed/chunks/{index-vGRALwj6.js → index-yjEWxzbP.js} +4 -4
- package/dist-embed/chunks/{index.esm-zVCHVwV3.js → index.esm-B7H9qIsG.js} +1 -1
- package/dist-embed/chunks/{index.esm-DGPDabeX.js → index.esm-CS_7aH6j.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-B6XclB9A.js → infoDiagram-27XIBGKW-11rIl0SX.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-BnvfNhoo.js → infoDiagram-27XIBGKW-B7vKfShh.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-BSmA5qBE.js → infoDiagram-27XIBGKW-DJuz15cI.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-a29d40f1-CaObtgvQ.js → infoDiagram-a29d40f1-DY20od-W.js} +1 -1
- package/dist-embed/chunks/{isEqual-BybBNsZK.js → isEqual-niFNV5MZ.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-CoYeuvtz.js → ishikawaDiagram-5VMMS53U-BxF1LxPw.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-BjZ55y3a.js → ishikawaDiagram-5VMMS53U-CAgZHNJ1.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-DZof4mVq.js → ishikawaDiagram-5VMMS53U-CGhkG9xO.js} +1 -1
- package/dist-embed/chunks/{it-IT-JPQ66NNP-Dfqt8qws.js → it-IT-JPQ66NNP-CQG7I-7I.js} +1 -1
- package/dist-embed/chunks/{ja-JP-DBVTYXUO-CJl2BGZ0.js → ja-JP-DBVTYXUO-N1Fy__-x.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-BQbXSJPZ.js → journeyDiagram-3NMN7TZE-BWry4eJr.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-DUk5noZ3.js → journeyDiagram-3NMN7TZE-PMSgj3LU.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-lMh4QSWD.js → journeyDiagram-3NMN7TZE-ymHKbZWG.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-95396277-B-wKHrA2.js → journeyDiagram-95396277-D8JFKSEp.js} +1 -1
- package/dist-embed/chunks/{kaa-6HZHGXH3-CkuYTE9k.js → kaa-6HZHGXH3-CV61GofE.js} +1 -1
- package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-DwGUYmYz.js → kab-KAB-ZGHBKWFO-pu8Ov9No.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-Dfptc1fl.js → kanban-definition-UXKFOSKX-BnOah8Nd.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DsS5AFXs.js → kanban-definition-UXKFOSKX-C_KPxfzn.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-D6Efkxin.js → kanban-definition-UXKFOSKX-UuVYvKiH.js} +1 -1
- package/dist-embed/chunks/{kk-KZ-P5N5QNE5-hKF6fBok.js → kk-KZ-P5N5QNE5-B8voVV7U.js} +1 -1
- package/dist-embed/chunks/{km-KH-HSX4SM5Z-CZBBU2M1.js → km-KH-HSX4SM5Z-C0VX4oEM.js} +1 -1
- package/dist-embed/chunks/{ko-KR-MTYHY66A-C-cMpFID.js → ko-KR-MTYHY66A-CcmFHDM1.js} +1 -1
- package/dist-embed/chunks/{ku-TR-6OUDTVRD-BhT89N8u.js → ku-TR-6OUDTVRD-CMFEX55_.js} +1 -1
- package/dist-embed/chunks/{layout-DwxE-zZ9.js → layout-CFVjfoYF.js} +1 -1
- package/dist-embed/chunks/{layout-3P_7xyJi.js → layout-CkB5JWAM.js} +1 -1
- package/dist-embed/chunks/{layout-NgpwW7nA.js → layout-oj4w4R5j.js} +1 -1
- package/dist-embed/chunks/{lexicalHooks-CVBA8Kup.js → lexicalHooks-Bh9Bp3P-.js} +1 -1
- package/dist-embed/chunks/{lib-DdQRcxuM.js → lib-5rtxMXPk.js} +1 -1
- package/dist-embed/chunks/{lib-D3T0Aw2k.js → lib-B8dqehoH.js} +1 -1
- package/dist-embed/chunks/{lib-BMrXwoDK.js → lib-BCnNB350.js} +1 -1
- package/dist-embed/chunks/{lib-USWrkybh.js → lib-BEADLX2g.js} +1 -1
- package/dist-embed/chunks/{lib-qTRu1lKk.js → lib-BPAFvW23.js} +1 -1
- package/dist-embed/chunks/{lib-HxF1xu1E.js → lib-BQZeV_uH.js} +1 -1
- package/dist-embed/chunks/{lib-BkcHzjVY.js → lib-BewlLHfg.js} +1 -1
- package/dist-embed/chunks/{lib-ClNhs2cv.js → lib-Bj-F8WWr.js} +1 -1
- package/dist-embed/chunks/{lib-DHt04E5T.js → lib-C-Ggs4iB.js} +1 -1
- package/dist-embed/chunks/{lib-DlFNTFJX.js → lib-CBSRQHoK.js} +1 -1
- package/dist-embed/chunks/{lib-C553WOkt.js → lib-CXZrbtJ9.js} +1 -1
- package/dist-embed/chunks/{lib-CfkV3N1c.js → lib-CiFgHF6H.js} +1 -1
- package/dist-embed/chunks/{lib-BkgDQr4b.js → lib-Cs68pT1f.js} +5 -5
- package/dist-embed/chunks/{lib-K8ZzEBaR.js → lib-D8Qc-bJh.js} +1 -1
- package/dist-embed/chunks/{lib-ClnZlQTa.js → lib-D8bmwG1Q.js} +1 -1
- package/dist-embed/chunks/{lib-DNqisZNg.js → lib-DDBakXc_.js} +1 -1
- package/dist-embed/chunks/{lib-DjYu7LUh.js → lib-DdHOeWKF.js} +1 -1
- package/dist-embed/chunks/{lib-CUuelUb1.js → lib-DtwAoDYT.js} +1 -1
- package/dist-embed/chunks/{lib-CSYbEQXY.js → lib-bSDF86bC.js} +1 -1
- package/dist-embed/chunks/{lib-CcQ1AdFH.js → lib-euir_64d.js} +1 -1
- package/dist-embed/chunks/{lt-LT-XHIRWOB4-DAnwG3pL.js → lt-LT-XHIRWOB4-CSs-cwk2.js} +1 -1
- package/dist-embed/chunks/{lv-LV-5QDEKY6T-DKutSEbv.js → lv-LV-5QDEKY6T-DBBrXhCL.js} +1 -1
- package/dist-embed/chunks/{mermaid.core-BKpjbvr4.js → mermaid.core-59YcUgz5.js} +3 -3
- package/dist-embed/chunks/{mermaid.core-BsYC7G_m.js → mermaid.core-BQpV-itu.js} +5 -5
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-CHG6GkTy.js → mindmap-definition-YA3MSWOX-CDtT_DYs.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-Cpij5zvN.js → mindmap-definition-YA3MSWOX-Cv6GXhbx.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-BVjt4l-I.js → mindmap-definition-YA3MSWOX-Dpx3iQ9G.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-e4c1d938--68TxVLH.js → mindmap-definition-e4c1d938-BAEXTTXT.js} +1 -1
- package/dist-embed/chunks/{model-C6vyI0zW.js → model-BUkhfry_.js} +1 -1
- package/dist-embed/chunks/{mr-IN-CRQNXWMA-BHnTqpR5.js → mr-IN-CRQNXWMA-BoxiDYTQ.js} +1 -1
- package/dist-embed/chunks/{my-MM-5M5IBNSE-D7B2cCpQ.js → my-MM-5M5IBNSE-O2vgzfJi.js} +1 -1
- package/dist-embed/chunks/{nb-NO-T6EIAALU-CcZKsAQj.js → nb-NO-T6EIAALU-t_ME7jfF.js} +1 -1
- package/dist-embed/chunks/{nl-NL-IS3SIHDZ-Bg4B5s14.js → nl-NL-IS3SIHDZ-CJOgjJen.js} +1 -1
- package/dist-embed/chunks/{nn-NO-6E72VCQL-g7xBg2p-.js → nn-NO-6E72VCQL-CKJROtf6.js} +1 -1
- package/dist-embed/chunks/{oc-FR-POXYY2M6-Dhbf2zJv.js → oc-FR-POXYY2M6-hekTJXBh.js} +1 -1
- package/dist-embed/chunks/{pa-IN-N4M65BXN-KR1yA3_P.js → pa-IN-N4M65BXN-C0nR_lWW.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-BIkw8nt9.js → pegDiagram-XKGWAZYB-6GkUf1Ix.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-FCAU3TOo.js → pegDiagram-XKGWAZYB-BLi2ATBT.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-CE26qzAb.js → pegDiagram-XKGWAZYB-BxHZsnZc.js} +1 -1
- package/dist-embed/chunks/{percentages-BXMCSKIN-NdFZNkF5.js → percentages-BXMCSKIN-aDx1Abuj.js} +5 -5
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-7IUSm4Cd.js → pieDiagram-E7YTZNPT-0y9vHfxN.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-CmRfYSUK.js → pieDiagram-E7YTZNPT-BuSxz3f3.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-DnfolJly.js → pieDiagram-E7YTZNPT-CdMa7Tp_.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-c941bede-BOM0hWZE.js → pieDiagram-c941bede-B4wYxQiG.js} +1 -1
- package/dist-embed/chunks/{pl-PL-T2D74RX3-BFMj2kIn.js → pl-PL-T2D74RX3-Bz6-nRIX.js} +1 -1
- package/dist-embed/chunks/{plugin-L-k9onR1.js → plugin-BeYApBgc.js} +1 -1
- package/dist-embed/chunks/{pt-BR-5N22H2LF-QBjImZeD.js → pt-BR-5N22H2LF-CIsrl0RF.js} +1 -1
- package/dist-embed/chunks/{pt-PT-UZXXM6DQ-BOajnzhW.js → pt-PT-UZXXM6DQ-Cm5V6d4j.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-CBuCLTK0.js → quadrantDiagram-AXDQQJYC-C3pbnXL8.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-D_YPReS-.js → quadrantDiagram-AXDQQJYC-CR6z5DUd.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-CAX9oQAl.js → quadrantDiagram-AXDQQJYC-CeT_Rjti.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-r_4FwxxN.js → quadrantDiagram-cf8b8fe0-CkBzFHkI.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-CtOU0UiI.js → railroadDiagram-O6MQD6OU-BdfroHrK.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-Dyq4RidU.js → railroadDiagram-O6MQD6OU-CqW4kNU7.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-CFRdBxSp.js → railroadDiagram-O6MQD6OU-D4k0ckwJ.js} +1 -1
- package/dist-embed/chunks/{renderer-DQzulrO-.js → renderer-BTUDFH3O.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-53bda41b-YrNRNVqN.js → requirementDiagram-53bda41b-CGcKbmSY.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-DW6fqUb-.js → requirementDiagram-BXWQKSXE-BZv3TS5_.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-2Tq7Hgrr.js → requirementDiagram-BXWQKSXE-Bx-qNrGP.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-6gtvqQ6g.js → requirementDiagram-BXWQKSXE-Dv-n3Ik2.js} +1 -1
- package/dist-embed/chunks/{ro-RO-JPDTUUEW-BicyuCgI.js → ro-RO-JPDTUUEW-BhCiwtAd.js} +1 -1
- package/dist-embed/chunks/{ru-RU-B4JR7IUQ-D5Lzo4K2.js → ru-RU-B4JR7IUQ-1R8PROIW.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-DBQ1HZxe.js → sankeyDiagram-P5KCCOFB-B1hPyVOc.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-ywB-7Sh8.js → sankeyDiagram-P5KCCOFB-B23f7m-H.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-Cjqnuiax.js → sankeyDiagram-P5KCCOFB-BK_3FXbs.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-c3ef121a-BdHUFbke.js → sankeyDiagram-c3ef121a-B7rPgNOw.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-82a5b84f-BsYsnScA.js → sequenceDiagram-82a5b84f-C_EzuSFh.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-C9wu6JeV.js → sequenceDiagram-WJ2MYXX4-CqoMFij0.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-BIU2Cbmw.js → sequenceDiagram-WJ2MYXX4-DiB7s_Dn.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-tkRuJaD1.js → sequenceDiagram-WJ2MYXX4-f-0nVisj.js} +1 -1
- package/dist-embed/chunks/{server-extension-CwZK4t_R.js → server-extension-BjSjt875.js} +1 -1
- package/dist-embed/chunks/{sessions-B7ox-mRM.js → sessions-B0EUsrzs.js} +1 -1
- package/dist-embed/chunks/{sheet-BRqBiQwD.js → sheet-Do4NLOO5.js} +1 -1
- package/dist-embed/chunks/{si-LK-N5RQ5JYF-DFJ2FmYp.js → si-LK-N5RQ5JYF-V5ENer19.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-o5EsXBaa.js → sizeCapture-INFHLROL-Dn38jHtH.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-Cf65oZaf.js → sizeCapture-INFHLROL-_Af6e7vY.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-vFYFzq10.js → sizeCapture-INFHLROL-iClobhK8.js} +1 -1
- package/dist-embed/chunks/{sk-SK-C5VTKIMK-8LPB4Lnr.js → sk-SK-C5VTKIMK-CDbew_Lj.js} +1 -1
- package/dist-embed/chunks/{sl-SI-NN7IZMDC-B2BOaojE.js → sl-SI-NN7IZMDC-CYGDd2fT.js} +1 -1
- package/dist-embed/chunks/{state-CmWU_Gvx.js → state-DOjezY4E.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-43e79a5f-BM8vNgoJ.js → stateDiagram-43e79a5f-CGkwABTG.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-C900iM9W.js → stateDiagram-D77RDMKH-BYf5AFsH.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-CuPDKatL.js → stateDiagram-D77RDMKH-DL2pkKsX.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-LWwb-5tB.js → stateDiagram-D77RDMKH-TNAdn7Fw.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-CyS6v5HY.js → stateDiagram-v2-2041ed4f-DOi2jMsy.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-B9nNH36K.js → stateDiagram-v2-MP3YSRHH-BcOB4zh_.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-D0oidLuM.js → stateDiagram-v2-MP3YSRHH-COkC2cKQ.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-CCTFOmE7.js → stateDiagram-v2-MP3YSRHH-Dkn5bUd0.js} +1 -1
- package/dist-embed/chunks/{styles-455b33cd-D9VLOwJ1.js → styles-455b33cd-CLktXgUm.js} +1 -1
- package/dist-embed/chunks/{styles-f932cba9-Cd5ppA9M.js → styles-f932cba9-BwPvHxRQ.js} +1 -1
- package/dist-embed/chunks/{styles-fcc2142b-wYbY1ne5.js → styles-fcc2142b-CAXdEfcj.js} +1 -1
- package/dist-embed/chunks/{subset-shared.chunk-BGJYDNE3.js → subset-shared.chunk-C5GbluZS.js} +1 -1
- package/dist-embed/chunks/{subset-worker.chunk-DS6Y9CCK.js → subset-worker.chunk-DdgsqZkc.js} +1 -1
- package/dist-embed/chunks/{substates-qiB0bt2l.js → substates-DOXz-cie.js} +1 -1
- package/dist-embed/chunks/{sv-SE-XGPEYMSR-UPdAYYSP.js → sv-SE-XGPEYMSR-DC1SNPJE.js} +1 -1
- package/dist-embed/chunks/{svgDrawCommon-148a3cd9-Fa5fqeh3.js → svgDrawCommon-148a3cd9-CaQ5vpEO.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-BgvIcpoF.js → swimlanes-42K2YHIH-2IxujMpF.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-BBMKjjkW.js → swimlanes-42K2YHIH-BpCz-Rn6.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-Cq7pR56Q.js → swimlanes-42K2YHIH-DU9K-vT0.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-wHfu_rwu.js → swimlanesDiagram-VR7AAH4N-BrV6X3P_.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-gjt8K12P.js → swimlanesDiagram-VR7AAH4N-DXze4cE-.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-BrssO_ZI.js → swimlanesDiagram-VR7AAH4N-wBxLzBji.js} +1 -1
- package/dist-embed/chunks/{ta-IN-2NMHFXQM-BA2NukSS.js → ta-IN-2NMHFXQM-DKSKwTtf.js} +1 -1
- package/dist-embed/chunks/{th-TH-HPSO5L25-LUayWo7x.js → th-TH-HPSO5L25-Dr1iFJp8.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-CFvNBz_D.js → timeline-definition-24CTP7MA-BwZDNvPa.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-Nut54L6A.js → timeline-definition-24CTP7MA-CVfYW-Nc.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-BKyvL5dI.js → timeline-definition-24CTP7MA-DfMsrwKw.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-7545f45a-RSfH6FTC.js → timeline-definition-7545f45a-DWcYkVIi.js} +1 -1
- package/dist-embed/chunks/{tr-TR-DEFEU3FU-BwLe2i48.js → tr-TR-DEFEU3FU-A_BYNcri.js} +1 -1
- package/dist-embed/chunks/{uk-UA-QMV73CPH-wjLkWFtn.js → uk-UA-QMV73CPH-lmL1fri3.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-CfkoE6en.js → vennDiagram-4TSXK5OY-C8_HpFyJ.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-iZRiPWDS.js → vennDiagram-4TSXK5OY-CsoLlfBZ.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-DcrhwQNy.js → vennDiagram-4TSXK5OY-MUcXUckP.js} +1 -1
- package/dist-embed/chunks/{vi-VN-M7AON7JQ-CVJrQXTE.js → vi-VN-M7AON7JQ-mMTEvrN2.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-C5LGiOpU.js → wardleyDiagram-VM6X3IG4-BKVSHBPg.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-CZLSTdrG.js → wardleyDiagram-VM6X3IG4-BksuirOR.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-W6fZ-zLj.js → wardleyDiagram-VM6X3IG4-CoFe_0Hs.js} +1 -1
- package/dist-embed/chunks/workbook-sMECd4Jk.js +1 -0
- package/dist-embed/chunks/{write-BPEehXmk.js → write-Q_DIQOWJ.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-3f383b91-DgGr7hwA.js → xychartDiagram-3f383b91-BB4yqnEL.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-DLQ3Wwtq.js → xychartDiagram-S5SC5T6Z-B6-P99h2.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-BlXuP2jM.js → xychartDiagram-S5SC5T6Z-BLIy7IJR.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-CsfBzeiF.js → xychartDiagram-S5SC5T6Z-BQlsBmbt.js} +1 -1
- package/dist-embed/chunks/{zh-CN-LNUGB5OW-DHFaH2P8.js → zh-CN-LNUGB5OW-DkgLfOH-.js} +1 -1
- package/dist-embed/chunks/{zh-HK-E62DVLB3-DKCAFB1q.js → zh-HK-E62DVLB3-bphdQsyC.js} +1 -1
- package/dist-embed/chunks/{zh-TW-RAJ6MFWO-D6WATM0Q.js → zh-TW-RAJ6MFWO-f8qOFFzB.js} +1 -1
- package/dist-embed/datalayer-app-main.js +32 -31
- package/dist-embed/datalayer-app.css +1 -1
- package/lib/apps/Application.d.ts +1 -1
- package/lib/apps/Application.js +1 -1
- package/lib/apps/agentUiPlugins.js +2 -0
- package/lib/apps/embed/AppEmbed.d.ts +1 -1
- package/lib/apps/embed/visitorApp.d.ts +4 -4
- package/lib/apps/embed/visitorApp.js +10 -10
- package/lib/apps/plugins/agents/DatalayerAgentBridge.js +1 -1
- package/lib/apps/plugins/agents/plugin.d.ts +1 -1
- package/lib/apps/plugins/trip-map/TripMapView.d.ts +18 -0
- package/lib/apps/plugins/trip-map/TripMapView.js +138 -0
- package/lib/apps/plugins/trip-map/index.d.ts +29 -0
- package/lib/apps/plugins/trip-map/index.js +75 -0
- package/lib/apps/plugins/trip-map/read.d.ts +47 -0
- package/lib/apps/plugins/trip-map/read.js +93 -0
- package/lib/apps/plugins/trip-map/style.d.ts +46 -0
- package/lib/apps/plugins/trip-map/style.js +249 -0
- package/lib/apps/presets.d.ts +1 -1
- package/lib/portable/hosts/agentClient.d.ts +1 -1
- package/lib/portable/hosts/agentClient.js +8 -8
- package/lib/portable/hosts/client.d.ts +2 -2
- package/lib/portable/hosts/client.js +2 -2
- package/lib/portable/hosts/contracts.d.ts +1 -1
- package/lib/portable/hosts/contracts.js +1 -1
- package/lib/portable/hosts/contracts.json +1 -1
- package/lib/specs/actions.js +18 -0
- package/lib/specs/agentPresentations.js +1 -1
- package/lib/specs/agents/agents.js +10 -4
- package/lib/specs/apps.d.ts +1 -1
- package/lib/specs/apps.js +35 -17
- package/lib/specs/backendTools.d.ts +1 -0
- package/lib/specs/backendTools.js +20 -0
- package/lib/specs/mcpServers.d.ts +1 -0
- package/lib/specs/mcpServers.js +41 -1
- package/lib/specs/ui.d.ts +1 -0
- package/lib/specs/ui.js +22 -0
- package/package.json +3 -1
- package/scripts/codegen/generate_mcp_servers.py +3 -1
- package/dist-embed/chunks/SpreadsheetPreviewView-BcPYoRJU.js +0 -1
- package/dist-embed/chunks/workbook-4v5EV9v6.js +0 -1
package/dist-embed/chunks/{SandboxDetailsDialog-DxyOgkVN.js → SandboxDetailsDialog-DXoy-U_w.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as p,k as _,n as S,o as A,q as L,u as P,j as n,T as x,B as c,v as b,D as B,S as K,H as O,x as U,L as z,y as T,I as N,z as R,A as $}from"../datalayer-app-main.js";import{e as F,K as H}from"./KernelVariables-
|
|
1
|
+
import{r as p,k as _,n as S,o as A,q as L,u as P,j as n,T as x,B as c,v as b,D as B,S as K,H as O,x as U,L as z,y as T,I as N,z as R,A as $}from"../datalayer-app-main.js";import{e as F,K as H}from"./KernelVariables-BehGjCby.js";function E({status:e}){const s=e==="running"||e==="idle"?"success":e==="busy"||e==="starting"?"attention":e==="error"||e==="dead"?"danger":"secondary";return n.jsx(z,{variant:s,size:"small","data-sandbox-status":e,children:e})}function Y({url:e}){const[s,l]=p.useState(!1);return n.jsxs(c,{display:"flex",alignItems:"center",gap:1,minWidth:0,children:[n.jsx(T,{href:e,target:"_blank",rel:"noreferrer",sx:{fontFamily:"mono",fontSize:0,wordBreak:"break-all"},children:e}),n.jsx(N,{icon:s?R:$,"aria-label":"Copy the URL",size:"small",variant:"invisible",onClick:()=>{navigator.clipboard?.writeText(e).then(()=>{l(!0),setTimeout(()=>l(!1),1500)})}})]})}function C(e){if(e===void 0||e==="")return;const s=typeof e=="number"?new Date(e<1e12?e*1e3:e):new Date(e);return Number.isNaN(s.getTime())?void 0:s.toLocaleString()}const h="__DL_PYODIDE__",M=`def __dl_pyodide():
|
|
2
2
|
import json, sys
|
|
3
3
|
facts = {'python': sys.version.split()[0], 'packages': []}
|
|
4
4
|
try:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l6 as ne,l7 as se,l8 as ae,by as ie,J as O,l9 as le,j as t,la as oe,lb as de,hv as F,lc as H,gj as ce,r as E,aE as T,fg as ue,I as ee,X as pe,a6 as te,T as K,dB as he,W as me,A as xe,v as re,ld as Q,le as fe,lf as ye,go as ge,hQ as X,aD as be,lg as je,B as Ce,dA as Te}from"../datalayer-app-main.js";import{F as Se,T as D,a as J,g as A,b as Fe,e as Y,d as L,f as Be,h as ve,t as ke,i as we,c as Ae,j as Ie,A as De,s as Le,k as We,o as G,l as Oe,m as Re,n as k,u as Ve,p as _e,r as Ee,q as qe,v as $e}from"./index-C8Ip0RIO.js";import{A as Ge,a as Pe}from"./ArrowUpIcon-y5enrVH9.js";import"./_baseRest-CxHO6LCs.js";import"./isObject-CeOzAI2h.js";import"./forEach-Bvicu226.js";import"./isSymbol-DfwdEMHq.js";import"./uniqueId-Dci46PXR.js";import"./toNumber-DUdf79Nr.js";import"./_baseClone-DJnceIKt.js";import"./merge-Bj_36vYI.js";import"./isEqual-BybBNsZK.js";const Me=r=>{const e=ie.c(24);let n,s,a,o;e[0]!==r?({children:n,disabled:s,onChange:a,...o}=r,e[0]=r,e[1]=n,e[2]=s,e[3]=a,e[4]=o):(n=e[1],s=e[2],a=e[3],o=e[4]);let m;if(e[5]!==n){const y=O.Children.toArray(n).filter(Ne).map(Ue).flat();m=O.Children.toArray(y).filter(ze).map(He).filter(Boolean),e[5]=n,e[6]=m}else m=e[6];const u=m,[d,c]=le(u);let x;e[7]!==d||e[8]!==c?(x=y=>{const{value:b,checked:j}=y.currentTarget;if(j){c([...d.current||[],b]);return}c((d.current||[]).filter(S=>S!==b))},e[7]=d,e[8]=c,e[9]=x):x=e[9];const i=x;let l;e[10]!==a||e[11]!==d||e[12]!==i?(l=y=>{a&&(i(y),a(d.current||[],y))},e[10]=a,e[11]=d,e[12]=i,e[13]=l):l=e[13];let h;e[14]!==s||e[15]!==l?(h={disabled:s,onChange:l},e[14]=s,e[15]=l,e[16]=h):h=e[16];let p;e[17]!==n||e[18]!==s||e[19]!==o?(p=t.jsx(oe,{disabled:s,...o,children:n}),e[17]=n,e[18]=s,e[19]=o,e[20]=p):p=e[20];let f;return e[21]!==h||e[22]!==p?(f=t.jsx(de.Provider,{value:h,children:p}),e[21]=h,e[22]=p,e[23]=f):f=e[23],f};var Z=Object.assign(Me,{Caption:ae,Label:se,Validation:ne});function Ne(r){return O.isValidElement(r)&&r.type===F}function Ue(r){return O.isValidElement(r)?r.props.children:[]}function ze(r){return O.isValidElement(r)&&r.type===H}function He(r){return O.isValidElement(r)&&(r.props.checked||r.props.defaultChecked)&&r.props.value}const Ke=({name:r="slider",id:e="slider",min:n=0,max:s=10,value:a=5,label:o="label",step:m=1,markers:u=!1,displayValue:d=!0,disabled:c=!1,orientation:x="horizontal",width:i="200px",onChange:l})=>{const{colorMode:h}=ce(),p=s<n?n:n+(s-n)/2,[f,y]=E.useState(p);E.useEffect(()=>{y(a??p)},[a,p]);const b=S=>{const g=Number(S.target.value);y(g),l(g)},j={width:i,...x==="vertical"?{transform:"rotate(-90deg)"}:{},colorScheme:h=="day"?"light":"dark",accentColor:"var(--fgColor-accent)"};return t.jsxs(T,{display:"flex",alignItems:"center",children:[t.jsx("input",{type:"range",id:e,name:r,min:n,max:s,value:f,step:m??"any",list:"slider-markers",style:j,onChange:b,disabled:c}),u&&m&&t.jsx("datalist",{id:"slider-markers",children:Array.from({length:Math.floor((s-n)/m)+1},(S,g)=>n+g*m).map(S=>t.jsx("option",{value:S},`slider-marker-${S}`))}),o&&t.jsx(F.Label,{htmlFor:e,sx:{ml:2},children:o}),d&&x==="horizontal"&&t.jsx(ue,{sx:{ml:2},children:f})]})};function Je(r){return E.forwardRef(({fields:e,widgets:n,templates:s,...a},o)=>(e={...r?.fields,...e},n={...r?.widgets,...n},s={...r?.templates,...s,ButtonTemplates:{...r?.templates?.ButtonTemplates,...s?.ButtonTemplates}},t.jsx(Se,{...r,...a,fields:e,widgets:n,templates:s,ref:o})))}function Qe({uiSchema:r,registry:e,...n}){const{translateString:s}=e;return t.jsx(ee,{variant:"default",size:"small",icon:pe,"aria-label":s(D.AddItemButton),...n})}function Xe(r){const{children:e,disabled:n,hasToolbar:s,hasMoveDown:a,hasMoveUp:o,hasRemove:m,index:u,onDropIndexClick:d,onReorderClick:c,readonly:x,uiSchema:i,registry:l}=r,{MoveDownButton:h,MoveUpButton:p,RemoveButton:f}=l.templates.ButtonTemplates,y={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold",minWidth:0};return t.jsxs(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},alignItems:"center",children:[t.jsx(T,{sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},style:{overflow:"auto"},children:t.jsx(T,{mb:2,p:2,sx:{borderWidth:1,borderStyle:"solid",borderColor:"border.default",borderRadius:2},children:e})}),s&&t.jsxs(T,{p:1,children:[(o||a)&&t.jsx(p,{style:y,disabled:n||x||!o,onClick:c(u,u-1),uiSchema:i,registry:l}),(o||a)&&t.jsx(h,{style:y,disabled:n||x||!a,onClick:c(u,u+1),uiSchema:i,registry:l}),m&&t.jsx(f,{style:y,disabled:n||x,onClick:d(u),uiSchema:i,registry:l})]})]})}function Ye(r){const{canAdd:e,disabled:n,idSchema:s,uiSchema:a,items:o,onAddClick:m,readonly:u,registry:d,required:c,schema:x,title:i}=r,l=J(a),h=A("ArrayFieldDescriptionTemplate",d,l),p=A("ArrayFieldItemTemplate",d,l),f=A("ArrayFieldTitleTemplate",d,l),{ButtonTemplates:{AddButton:y}}=d.templates;return t.jsxs(T,{p:3,sx:{display:"flex",width:"100%",flexFlow:"row wrap",borderWidth:1,borderStyle:"solid",borderColor:"border.default",borderRadius:2},children:[t.jsx(f,{idSchema:s,title:l.title||i,schema:x,uiSchema:a,required:c,registry:d}),t.jsx(h,{idSchema:s,description:l.description||x.description,schema:x,uiSchema:a,registry:d}),t.jsxs(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},children:[o&&o.map(({key:b,...j})=>t.jsx(p,{...j},b)),e&&t.jsx(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},justifyContent:"flex-end",children:t.jsx(T,{sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:t.jsx(T,{mt:2,children:t.jsx(y,{className:"array-item-add",onClick:m,disabled:n||u,uiSchema:a,registry:d})})})})]},`array-item-list-${s.$id}`)]})}function Ze(r){const{id:e,placeholder:n,required:s,readonly:a,disabled:o,type:m,label:u,value:d,onChange:c,onBlur:x,onFocus:i,autofocus:l,options:h,schema:p,uiSchema:f,rawErrors:y=[],formContext:b,registry:j,hideLabel:S,hideError:g,...C}=r,w=Fe(p,m,h),{step:I,min:R,max:V,...M}=w,q={...Array.isArray(p.examples)?{list:Y(e)}:void 0,...M,...I!==void 0?{step:I}:void 0,...R!==void 0?{min:R}:void 0,...V!==void 0?{max:V}:void 0},N=({target:{value:B}})=>c(B===""?h.emptyValue:B),U=({target:{value:B}})=>x(e,B),z=({target:{value:B}})=>i(e,B),{schemaUtils:$}=j,v=$.getDisplayLabel(p,f);return t.jsxs(t.Fragment,{children:[t.jsx(F.Label,{visuallyHidden:!v,htmlFor:e,children:u||p.title}),t.jsx(te,{id:e,name:e,placeholder:n,autoFocus:l,required:s,disabled:o||a,...q,value:d||d===0?d:"",validationStatus:y.length>0?"error":void 0,onChange:N,onBlur:U,onFocus:z,block:!0,...C,"aria-describedby":L(e,!!p.examples)}),Array.isArray(p.examples)&&t.jsx("datalist",{id:Y(e),children:p.examples.concat(p.default&&!p.examples.includes(p.default)?[p.default]:[]).map(B=>t.jsx("option",{value:B},B))})]})}function et(r){const{id:e,description:n}=r;return n?t.jsx(K,{id:e,as:"p",mt:1,children:n}):null}function tt({errors:r,registry:e}){const{translateString:n}=e;return t.jsx(T,{mb:3,sx:{borderWidth:1,borderStyle:"solid",borderColor:"border.default",borderRadius:2},children:t.jsxs(T,{p:3,children:[t.jsx(T,{as:"h3",sx:{fontSize:3,fontWeight:"semibold",m:0},children:n(D.ErrorsLabel)}),t.jsx(t.Fragment,{children:r.map((s,a)=>t.jsx(he,{variant:"danger",sx:{marginTop:2},children:s.stack},a))})]})})}function P({color:r,title:e,icon:n,...s}){return r||(r="invisible"),t.jsx(ee,{variant:r,size:"small",icon:n,onClick:a=>a.preventDefault(),onSubmit:a=>a.preventDefault(),"aria-label":e,...s})}function rt(r){const{registry:{translateString:e}}=r;return t.jsx(P,{title:e(D.CopyButton),...r,icon:xe})}function nt(r){const{registry:{translateString:e}}=r;return t.jsx(P,{title:e(D.MoveDownButton),...r,icon:Pe})}function st(r){const{registry:{translateString:e}}=r;return t.jsx(P,{title:e(D.MoveUpButton),...r,icon:Ge})}function at(r){const{iconType:e,...n}=r,{registry:{translateString:s}}=n;return t.jsx(P,{title:s(D.RemoveButton),...n,icon:me})}function it(r){const{errors:e=[],idSchema:n}=r;if(e.length===0)return null;const s=Be(n);return t.jsx("div",{id:s,children:e.map((a,o)=>t.jsxs(K,{as:"p",mb:1,sx:{fontSize:"12px",display:"block",color:"danger.fg"},children:["•"," "+a]},o))})}function lt(r){const{idSchema:e,help:n}=r;if(!n)return null;const s=ve(e);return t.jsx(F.Caption,{id:s,children:n})}function ot(r){const{id:e,children:n,classNames:s,style:a,disabled:o,displayLabel:m,hidden:u,label:d,onDropPropertyClick:c,onKeyChange:x,readonly:i,required:l,rawErrors:h=[],errors:p,help:f,rawDescription:y,schema:b,uiSchema:j,registry:S}=r,g=J(j),C=A("WrapIfAdditionalTemplate",S,g);return u?t.jsx("div",{style:{display:"none"},children:n}):t.jsx(C,{classNames:s,style:a,disabled:o,id:e,label:d,onDropPropertyClick:c,onKeyChange:x,readonly:i,required:l,schema:b,uiSchema:j,registry:S,children:t.jsxs(F,{required:l,children:[t.jsx(F.Label,{visuallyHidden:!0}),n,m&&y?t.jsx(F.Caption,{id:e,children:y}):null,p,f]})})}function dt(r){const{description:e,title:n,properties:s,required:a,disabled:o,readonly:m,uiSchema:u,idSchema:d,schema:c,formData:x,onAddClick:i,registry:l}=r,h=J(u),p=A("TitleFieldTemplate",l,h),f=A("DescriptionFieldTemplate",l,h),{ButtonTemplates:{AddButton:y}}=l.templates;return t.jsxs(t.Fragment,{children:[(h.title||n)&&t.jsx(p,{id:ke(d),title:n,required:a,schema:c,uiSchema:u,registry:l}),(h.description||e)&&t.jsx(f,{id:we(d),description:h.description||e,schema:c,uiSchema:u,registry:l}),t.jsxs(T,{sx:{display:"flex",width:"100%",flexDirection:"column",flexFlow:"row wrap"},style:{marginTop:"10px"},children:[s.map((b,j)=>b.hidden?b.content:t.jsx(T,{sx:{flexBasis:"100%",flexGrow:0,maxWidth:"100%"},mb:1,children:b.content},j)),Ae(c,u,x)&&t.jsx(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},justifyContent:"flex-end",children:t.jsx(T,{sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:t.jsx(y,{className:"object-property-expand",onClick:b=>{b.preventDefault(),i(c)()},disabled:o||m,uiSchema:u,registry:l})})})]})]})}function ct({uiSchema:r}){const{submitText:e,norender:n,props:s={}}=Ie(r);return n?null:t.jsx(T,{marginTop:2,children:t.jsx(re,{type:"submit",variant:"primary",...s,children:e})})}function ut({id:r,title:e}){return t.jsx(T,{id:r,my:2,children:t.jsx(T,{as:"h5",sx:{fontSize:1,fontWeight:"semibold",m:0,borderBottom:"1px solid",borderColor:"border.default",paddingBottom:1},children:e})})}function pt(r){const{children:e,classNames:n,style:s,disabled:a,id:o,label:m,onDropPropertyClick:u,onKeyChange:d,readonly:c,required:x,schema:i,uiSchema:l,registry:h}=r,{templates:p,translateString:f}=h,{RemoveButton:y}=p.ButtonTemplates,b=f(D.KeyLabel,[m]),j=De in i,S={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"};if(!j)return t.jsx("div",{className:n,style:s,children:e});const g=({target:C})=>d(C.value);return t.jsxs(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},alignItems:"center",className:n,style:s,children:[t.jsx(T,{pr:2,sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:t.jsxs(F,{id:`${o}-key`,required:x,children:[t.jsx(F.Label,{children:b}),t.jsx(te,{defaultValue:m,disabled:a||c,name:`${o}-key`,onBlur:c?void 0:g,type:"text",block:!0})]})}),t.jsx(T,{pr:2,sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:e}),t.jsx(T,{children:t.jsx(y,{iconType:"default",style:S,disabled:a||c,onClick:u(m),uiSchema:l,registry:h})})]},`${o}-key`)}function ht(){return{ArrayFieldItemTemplate:Xe,ArrayFieldTemplate:Ye,BaseInputTemplate:Ze,ButtonTemplates:{AddButton:Qe,CopyButton:rt,MoveDownButton:nt,MoveUpButton:st,RemoveButton:at,SubmitButton:ct},DescriptionFieldTemplate:et,ErrorListTemplate:tt,FieldErrorTemplate:it,FieldHelpTemplate:lt,FieldTemplate:ot,ObjectFieldTemplate:dt,TitleFieldTemplate:ut,WrapIfAdditionalTemplate:pt}}function mt(r){const{schema:e,id:n,value:s,disabled:a,readonly:o,label:m,autofocus:u,onChange:d,onBlur:c,onFocus:x}=r,i=Le(e),l=({target:{checked:f}})=>d(f),h=({target:{value:f}})=>c(n,f),p=({target:{value:f}})=>x(n,f);return t.jsxs(F,{id:n,children:[t.jsx(H,{checked:typeof s>"u"?!1:!!s,required:i,disabled:a||o,autoFocus:u,onChange:l,onBlur:h,onFocus:p,"aria-describedby":L(n)}),t.jsx(F.Label,{children:m||""})]})}function xt({schema:r,label:e,id:n,disabled:s,options:a,value:o,autofocus:m,readonly:u,required:d,onChange:c,onBlur:x,onFocus:i}){const{enumOptions:l,enumDisabled:h,inline:p,emptyValue:f}=a,y=Array.isArray(o)?o:[o],b=g=>({target:{checked:C}})=>{c(C?Oe(g,y,l):Re(g,y,l))},j=({target:{value:g}})=>x(n,k(g,l,f)),S=({target:{value:g}})=>i(n,k(g,l,f));return t.jsxs(Z,{required:d,children:[t.jsx(Z.Label,{children:e||r.title}),Array.isArray(l)&&l.map((g,C)=>{const w=We(g.value,y),I=Array.isArray(h)&&h.indexOf(g.value)!==-1;return t.jsxs(F,{id:G(n,C),children:[t.jsx(H,{checked:w,disabled:s||I||u,autoFocus:m&&C===0,onChange:b(C),onBlur:j,onFocus:S,"aria-describedby":L(n)}),t.jsx(F.Label,{children:g.label})]},G(n,C))})]})}function ft(r){const{options:e,registry:n}=r,s=A("BaseInputTemplate",n,e);return t.jsx(s,{type:"date",InputLabelProps:{shrink:!0},...r})}function yt(r){const{options:e,registry:n}=r,s=A("BaseInputTemplate",n,e),a=Ve(r.value),o=m=>{r.onChange(_e(m))};return t.jsx(s,{type:"datetime-local",...r,value:a,onChange:o})}function gt({id:r,schema:e,options:n,value:s,required:a,disabled:o,readonly:m,label:u,onChange:d,onBlur:c,onFocus:x}){const{enumOptions:i,enumDisabled:l,emptyValue:h}=n,p=({target:{value:b}})=>d(k(b,i,h)),f=({target:{value:b}})=>c(r,k(b,i,h)),y=({target:{value:b}})=>x(r,k(b,i,h));return t.jsxs(Q,{name:r,required:a,children:[t.jsx(Q.Label,{children:u||e.title}),t.jsx(t.Fragment,{children:Array.isArray(i)&&i.map((b,j)=>{const S=Array.isArray(l)&&l.indexOf(b.value)!==-1;return t.jsxs(F,{id:G(r,j),children:[t.jsx(fe,{value:String(j),onChange:p,onBlur:f,onFocus:y,"aria-describedby":L(r),disabled:o||S||m},j),t.jsx(F.Label,{children:b.label})]},G(r,j))})})]})}function bt(r){const{value:e,readonly:n,disabled:s,options:a,schema:o,onChange:m,label:u,id:d}=r,c={value:e,label:u,id:d,name:d,...Ee(o)},x=i=>{m(i??a.emptyValue)};return t.jsxs(t.Fragment,{children:[t.jsx(F.Label,{htmlFor:d,children:u||o.title}),t.jsx(Ke,{disabled:s||n,onChange:x,...c,"aria-describedby":L(d)})]})}function jt({schema:r,id:e,options:n,label:s,required:a,disabled:o,placeholder:m,readonly:u,value:d,multiple:c,autofocus:x,onChange:i,onBlur:l,onFocus:h,rawErrors:p=[],registry:f,uiSchema:y,hideError:b,formContext:j,...S}){const{enumOptions:g,enumDisabled:C,emptyValue:w}=n,[I,R]=E.useState(!1);c=typeof c>"u"?!1:!!c;const V=c?[]:"",M=typeof d>"u"||c&&d.length<1||!c&&d===V,q=g?.map(({value:v,label:B},W)=>{const _=Array.isArray(C)&&C.indexOf(v)!==-1;return{text:B,id:W,disabled:_}}),N=({target:{value:v}})=>i(k(v,g,w)),U=({target:{value:v}})=>l(e,k(v,g,w)),z=({target:{value:v}})=>h(e,k(v,g,w)),$=qe(d,g,c);return t.jsxs(F,{id:e,required:a,children:[t.jsx(F.Label,{visuallyHidden:!(s||r.title),htmlFor:e,children:s||r.title}),c&&Array.isArray(g)?t.jsx(ye,{placeholderText:(s||r.title)??"",renderAnchor:({children:v,"aria-labelledby":B,...W})=>t.jsx(re,{trailingAction:ge,"aria-labelledby":` ${B}`,...W,onClick:_=>{R(!I),_.preventDefault()},children:v||`Select ${s||r.title}`}),open:I,onOpenChange:R,items:q??[],selected:(q??[]).filter((v,B)=>$?.includes(String(B))),onSelectedChange:v=>{i(k(v.map(B=>B.id),g,w))},onFilterChange:()=>null,overlayProps:{width:"small"}}):t.jsx(X,{name:e,value:M?V:$,disabled:o||u,autoFocus:x,placeholder:s||r.title,validationStatus:p.length>0?"error":void 0,onChange:N,onBlur:U,onFocus:z,defaultValue:void 0,...S,"aria-describedby":L(e),children:Array.isArray(g)&&g.map(({value:v,label:B},W)=>{const _=Array.isArray(C)&&C.indexOf(v)!==-1;return t.jsx(X.Option,{value:String(W),disabled:_,children:B},W)})})]})}function Ct({id:r,placeholder:e,value:n,label:s,disabled:a,autofocus:o,readonly:m,onBlur:u,onFocus:d,onChange:c,options:x,schema:i,uiSchema:l,required:h,rawErrors:p=[],registry:f}){const{schemaUtils:y}=f,b=y.getDisplayLabel(i,l)&&(!!s||!!i.title),j=({target:{value:C}})=>c(C===""?x.emptyValue:C),S=({target:{value:C}})=>u(r,C),g=({target:{value:C}})=>d(r,C);return t.jsxs(t.Fragment,{children:[t.jsx(F.Label,{visuallyHidden:!b,htmlFor:r,children:s||i.title}),t.jsx(be,{id:r,name:r,value:n??"",placeholder:e,autoFocus:o,required:h,disabled:a||m,validationStatus:p.length>0?"error":void 0,onChange:j,onBlur:S,onFocus:g,block:!0,"aria-describedby":L(r)})]})}function Tt(){return{CheckboxWidget:mt,CheckboxesWidget:xt,DateWidget:ft,DateTimeWidget:yt,RadioWidget:gt,RangeWidget:bt,SelectWidget:jt,TextareaWidget:Ct}}function St(){return{templates:ht(),widgets:Tt()}}function Ft(){return Je(St())}const Bt=Ft();function vt({id:r,value:e,label:n,disabled:s,readonly:a,onChange:o}){return t.jsxs(Ce,{display:"flex",flexDirection:"column",gap:1,children:[t.jsx(K,{as:"span",id:`${r}-label`,sx:{fontWeight:"semibold"},children:n}),t.jsx(Te,{size:"small","aria-labelledby":`${r}-label`,checked:!!e,disabled:s||a,onClick:()=>o(!e)})]})}function kt({id:r,value:e,label:n,disabled:s,readonly:a,placeholder:o,onChange:m}){const u=Array.isArray(e)?e.map(String):[],[d,c]=E.useState(""),x=()=>{const i=d.trim();i&&!u.includes(i)&&m([...u,i]),c("")};return t.jsxs(F,{id:r,disabled:s||a,children:[t.jsx(F.Label,{children:n}),t.jsx(je,{block:!0,placeholder:o,tokens:u.map((i,l)=>({id:l,text:i})),value:d,onChange:i=>c(i.target.value.replace(",","")),onKeyDown:i=>{(i.key==="Enter"||i.key===",")&&(i.preventDefault(),x())},onBlur:x,onTokenRemove:i=>{m(u.filter((l,h)=>h!==i))}})]})}const wt={switch:vt,tags:kt};function Gt(r){return t.jsx(Bt,{...r,widgets:wt,validator:$e})}export{Gt as default};
|
|
1
|
+
import{l7 as ne,l8 as se,l9 as ae,by as ie,J as O,la as le,j as t,lb as oe,lc as de,hw as F,ld as H,gk as ce,r as E,aE as T,fl as ue,I as ee,X as pe,a6 as te,T as K,dB as he,W as me,A as xe,v as re,le as X,lf as fe,lg as ye,gp as ge,hR as Y,aD as be,lh as je,B as Ce,dA as Te}from"../datalayer-app-main.js";import{F as Se,T as D,a as J,g as A,b as Fe,e as Q,d as L,f as Be,h as ke,t as ve,i as we,c as Ae,j as Ie,A as De,s as Le,k as We,o as G,l as Oe,m as Re,n as v,u as Ve,p as _e,r as Ee,q as qe,v as $e}from"./index-PwNNIVgK.js";import{A as Ge,a as Pe}from"./ArrowUpIcon-y5enrVH9.js";import"./_baseRest-CxHO6LCs.js";import"./isObject-CeOzAI2h.js";import"./forEach-Bvicu226.js";import"./isSymbol-DfwdEMHq.js";import"./uniqueId-Dci46PXR.js";import"./toNumber-DUdf79Nr.js";import"./_baseClone-DJnceIKt.js";import"./merge-Bj_36vYI.js";import"./isEqual-niFNV5MZ.js";const Me=r=>{const e=ie.c(24);let n,s,a,o;e[0]!==r?({children:n,disabled:s,onChange:a,...o}=r,e[0]=r,e[1]=n,e[2]=s,e[3]=a,e[4]=o):(n=e[1],s=e[2],a=e[3],o=e[4]);let m;if(e[5]!==n){const y=O.Children.toArray(n).filter(Ne).map(Ue).flat();m=O.Children.toArray(y).filter(ze).map(He).filter(Boolean),e[5]=n,e[6]=m}else m=e[6];const u=m,[d,c]=le(u);let x;e[7]!==d||e[8]!==c?(x=y=>{const{value:b,checked:j}=y.currentTarget;if(j){c([...d.current||[],b]);return}c((d.current||[]).filter(S=>S!==b))},e[7]=d,e[8]=c,e[9]=x):x=e[9];const i=x;let l;e[10]!==a||e[11]!==d||e[12]!==i?(l=y=>{a&&(i(y),a(d.current||[],y))},e[10]=a,e[11]=d,e[12]=i,e[13]=l):l=e[13];let h;e[14]!==s||e[15]!==l?(h={disabled:s,onChange:l},e[14]=s,e[15]=l,e[16]=h):h=e[16];let p;e[17]!==n||e[18]!==s||e[19]!==o?(p=t.jsx(oe,{disabled:s,...o,children:n}),e[17]=n,e[18]=s,e[19]=o,e[20]=p):p=e[20];let f;return e[21]!==h||e[22]!==p?(f=t.jsx(de.Provider,{value:h,children:p}),e[21]=h,e[22]=p,e[23]=f):f=e[23],f};var Z=Object.assign(Me,{Caption:ae,Label:se,Validation:ne});function Ne(r){return O.isValidElement(r)&&r.type===F}function Ue(r){return O.isValidElement(r)?r.props.children:[]}function ze(r){return O.isValidElement(r)&&r.type===H}function He(r){return O.isValidElement(r)&&(r.props.checked||r.props.defaultChecked)&&r.props.value}const Ke=({name:r="slider",id:e="slider",min:n=0,max:s=10,value:a=5,label:o="label",step:m=1,markers:u=!1,displayValue:d=!0,disabled:c=!1,orientation:x="horizontal",width:i="200px",onChange:l})=>{const{colorMode:h}=ce(),p=s<n?n:n+(s-n)/2,[f,y]=E.useState(p);E.useEffect(()=>{y(a??p)},[a,p]);const b=S=>{const g=Number(S.target.value);y(g),l(g)},j={width:i,...x==="vertical"?{transform:"rotate(-90deg)"}:{},colorScheme:h=="day"?"light":"dark",accentColor:"var(--fgColor-accent)"};return t.jsxs(T,{display:"flex",alignItems:"center",children:[t.jsx("input",{type:"range",id:e,name:r,min:n,max:s,value:f,step:m??"any",list:"slider-markers",style:j,onChange:b,disabled:c}),u&&m&&t.jsx("datalist",{id:"slider-markers",children:Array.from({length:Math.floor((s-n)/m)+1},(S,g)=>n+g*m).map(S=>t.jsx("option",{value:S},`slider-marker-${S}`))}),o&&t.jsx(F.Label,{htmlFor:e,sx:{ml:2},children:o}),d&&x==="horizontal"&&t.jsx(ue,{sx:{ml:2},children:f})]})};function Je(r){return E.forwardRef(({fields:e,widgets:n,templates:s,...a},o)=>(e={...r?.fields,...e},n={...r?.widgets,...n},s={...r?.templates,...s,ButtonTemplates:{...r?.templates?.ButtonTemplates,...s?.ButtonTemplates}},t.jsx(Se,{...r,...a,fields:e,widgets:n,templates:s,ref:o})))}function Xe({uiSchema:r,registry:e,...n}){const{translateString:s}=e;return t.jsx(ee,{variant:"default",size:"small",icon:pe,"aria-label":s(D.AddItemButton),...n})}function Ye(r){const{children:e,disabled:n,hasToolbar:s,hasMoveDown:a,hasMoveUp:o,hasRemove:m,index:u,onDropIndexClick:d,onReorderClick:c,readonly:x,uiSchema:i,registry:l}=r,{MoveDownButton:h,MoveUpButton:p,RemoveButton:f}=l.templates.ButtonTemplates,y={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold",minWidth:0};return t.jsxs(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},alignItems:"center",children:[t.jsx(T,{sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},style:{overflow:"auto"},children:t.jsx(T,{mb:2,p:2,sx:{borderWidth:1,borderStyle:"solid",borderColor:"border.default",borderRadius:2},children:e})}),s&&t.jsxs(T,{p:1,children:[(o||a)&&t.jsx(p,{style:y,disabled:n||x||!o,onClick:c(u,u-1),uiSchema:i,registry:l}),(o||a)&&t.jsx(h,{style:y,disabled:n||x||!a,onClick:c(u,u+1),uiSchema:i,registry:l}),m&&t.jsx(f,{style:y,disabled:n||x,onClick:d(u),uiSchema:i,registry:l})]})]})}function Qe(r){const{canAdd:e,disabled:n,idSchema:s,uiSchema:a,items:o,onAddClick:m,readonly:u,registry:d,required:c,schema:x,title:i}=r,l=J(a),h=A("ArrayFieldDescriptionTemplate",d,l),p=A("ArrayFieldItemTemplate",d,l),f=A("ArrayFieldTitleTemplate",d,l),{ButtonTemplates:{AddButton:y}}=d.templates;return t.jsxs(T,{p:3,sx:{display:"flex",width:"100%",flexFlow:"row wrap",borderWidth:1,borderStyle:"solid",borderColor:"border.default",borderRadius:2},children:[t.jsx(f,{idSchema:s,title:l.title||i,schema:x,uiSchema:a,required:c,registry:d}),t.jsx(h,{idSchema:s,description:l.description||x.description,schema:x,uiSchema:a,registry:d}),t.jsxs(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},children:[o&&o.map(({key:b,...j})=>t.jsx(p,{...j},b)),e&&t.jsx(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},justifyContent:"flex-end",children:t.jsx(T,{sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:t.jsx(T,{mt:2,children:t.jsx(y,{className:"array-item-add",onClick:m,disabled:n||u,uiSchema:a,registry:d})})})})]},`array-item-list-${s.$id}`)]})}function Ze(r){const{id:e,placeholder:n,required:s,readonly:a,disabled:o,type:m,label:u,value:d,onChange:c,onBlur:x,onFocus:i,autofocus:l,options:h,schema:p,uiSchema:f,rawErrors:y=[],formContext:b,registry:j,hideLabel:S,hideError:g,...C}=r,w=Fe(p,m,h),{step:I,min:R,max:V,...M}=w,q={...Array.isArray(p.examples)?{list:Q(e)}:void 0,...M,...I!==void 0?{step:I}:void 0,...R!==void 0?{min:R}:void 0,...V!==void 0?{max:V}:void 0},N=({target:{value:B}})=>c(B===""?h.emptyValue:B),U=({target:{value:B}})=>x(e,B),z=({target:{value:B}})=>i(e,B),{schemaUtils:$}=j,k=$.getDisplayLabel(p,f);return t.jsxs(t.Fragment,{children:[t.jsx(F.Label,{visuallyHidden:!k,htmlFor:e,children:u||p.title}),t.jsx(te,{id:e,name:e,placeholder:n,autoFocus:l,required:s,disabled:o||a,...q,value:d||d===0?d:"",validationStatus:y.length>0?"error":void 0,onChange:N,onBlur:U,onFocus:z,block:!0,...C,"aria-describedby":L(e,!!p.examples)}),Array.isArray(p.examples)&&t.jsx("datalist",{id:Q(e),children:p.examples.concat(p.default&&!p.examples.includes(p.default)?[p.default]:[]).map(B=>t.jsx("option",{value:B},B))})]})}function et(r){const{id:e,description:n}=r;return n?t.jsx(K,{id:e,as:"p",mt:1,children:n}):null}function tt({errors:r,registry:e}){const{translateString:n}=e;return t.jsx(T,{mb:3,sx:{borderWidth:1,borderStyle:"solid",borderColor:"border.default",borderRadius:2},children:t.jsxs(T,{p:3,children:[t.jsx(T,{as:"h3",sx:{fontSize:3,fontWeight:"semibold",m:0},children:n(D.ErrorsLabel)}),t.jsx(t.Fragment,{children:r.map((s,a)=>t.jsx(he,{variant:"danger",sx:{marginTop:2},children:s.stack},a))})]})})}function P({color:r,title:e,icon:n,...s}){return r||(r="invisible"),t.jsx(ee,{variant:r,size:"small",icon:n,onClick:a=>a.preventDefault(),onSubmit:a=>a.preventDefault(),"aria-label":e,...s})}function rt(r){const{registry:{translateString:e}}=r;return t.jsx(P,{title:e(D.CopyButton),...r,icon:xe})}function nt(r){const{registry:{translateString:e}}=r;return t.jsx(P,{title:e(D.MoveDownButton),...r,icon:Pe})}function st(r){const{registry:{translateString:e}}=r;return t.jsx(P,{title:e(D.MoveUpButton),...r,icon:Ge})}function at(r){const{iconType:e,...n}=r,{registry:{translateString:s}}=n;return t.jsx(P,{title:s(D.RemoveButton),...n,icon:me})}function it(r){const{errors:e=[],idSchema:n}=r;if(e.length===0)return null;const s=Be(n);return t.jsx("div",{id:s,children:e.map((a,o)=>t.jsxs(K,{as:"p",mb:1,sx:{fontSize:"12px",display:"block",color:"danger.fg"},children:["•"," "+a]},o))})}function lt(r){const{idSchema:e,help:n}=r;if(!n)return null;const s=ke(e);return t.jsx(F.Caption,{id:s,children:n})}function ot(r){const{id:e,children:n,classNames:s,style:a,disabled:o,displayLabel:m,hidden:u,label:d,onDropPropertyClick:c,onKeyChange:x,readonly:i,required:l,rawErrors:h=[],errors:p,help:f,rawDescription:y,schema:b,uiSchema:j,registry:S}=r,g=J(j),C=A("WrapIfAdditionalTemplate",S,g);return u?t.jsx("div",{style:{display:"none"},children:n}):t.jsx(C,{classNames:s,style:a,disabled:o,id:e,label:d,onDropPropertyClick:c,onKeyChange:x,readonly:i,required:l,schema:b,uiSchema:j,registry:S,children:t.jsxs(F,{required:l,children:[t.jsx(F.Label,{visuallyHidden:!0}),n,m&&y?t.jsx(F.Caption,{id:e,children:y}):null,p,f]})})}function dt(r){const{description:e,title:n,properties:s,required:a,disabled:o,readonly:m,uiSchema:u,idSchema:d,schema:c,formData:x,onAddClick:i,registry:l}=r,h=J(u),p=A("TitleFieldTemplate",l,h),f=A("DescriptionFieldTemplate",l,h),{ButtonTemplates:{AddButton:y}}=l.templates;return t.jsxs(t.Fragment,{children:[(h.title||n)&&t.jsx(p,{id:ve(d),title:n,required:a,schema:c,uiSchema:u,registry:l}),(h.description||e)&&t.jsx(f,{id:we(d),description:h.description||e,schema:c,uiSchema:u,registry:l}),t.jsxs(T,{sx:{display:"flex",width:"100%",flexDirection:"column",flexFlow:"row wrap"},style:{marginTop:"10px"},children:[s.map((b,j)=>b.hidden?b.content:t.jsx(T,{sx:{flexBasis:"100%",flexGrow:0,maxWidth:"100%"},mb:1,children:b.content},j)),Ae(c,u,x)&&t.jsx(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},justifyContent:"flex-end",children:t.jsx(T,{sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:t.jsx(y,{className:"object-property-expand",onClick:b=>{b.preventDefault(),i(c)()},disabled:o||m,uiSchema:u,registry:l})})})]})]})}function ct({uiSchema:r}){const{submitText:e,norender:n,props:s={}}=Ie(r);return n?null:t.jsx(T,{marginTop:2,children:t.jsx(re,{type:"submit",variant:"primary",...s,children:e})})}function ut({id:r,title:e}){return t.jsx(T,{id:r,my:2,children:t.jsx(T,{as:"h5",sx:{fontSize:1,fontWeight:"semibold",m:0,borderBottom:"1px solid",borderColor:"border.default",paddingBottom:1},children:e})})}function pt(r){const{children:e,classNames:n,style:s,disabled:a,id:o,label:m,onDropPropertyClick:u,onKeyChange:d,readonly:c,required:x,schema:i,uiSchema:l,registry:h}=r,{templates:p,translateString:f}=h,{RemoveButton:y}=p.ButtonTemplates,b=f(D.KeyLabel,[m]),j=De in i,S={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"};if(!j)return t.jsx("div",{className:n,style:s,children:e});const g=({target:C})=>d(C.value);return t.jsxs(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},alignItems:"center",className:n,style:s,children:[t.jsx(T,{pr:2,sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:t.jsxs(F,{id:`${o}-key`,required:x,children:[t.jsx(F.Label,{children:b}),t.jsx(te,{defaultValue:m,disabled:a||c,name:`${o}-key`,onBlur:c?void 0:g,type:"text",block:!0})]})}),t.jsx(T,{pr:2,sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:e}),t.jsx(T,{children:t.jsx(y,{iconType:"default",style:S,disabled:a||c,onClick:u(m),uiSchema:l,registry:h})})]},`${o}-key`)}function ht(){return{ArrayFieldItemTemplate:Ye,ArrayFieldTemplate:Qe,BaseInputTemplate:Ze,ButtonTemplates:{AddButton:Xe,CopyButton:rt,MoveDownButton:nt,MoveUpButton:st,RemoveButton:at,SubmitButton:ct},DescriptionFieldTemplate:et,ErrorListTemplate:tt,FieldErrorTemplate:it,FieldHelpTemplate:lt,FieldTemplate:ot,ObjectFieldTemplate:dt,TitleFieldTemplate:ut,WrapIfAdditionalTemplate:pt}}function mt(r){const{schema:e,id:n,value:s,disabled:a,readonly:o,label:m,autofocus:u,onChange:d,onBlur:c,onFocus:x}=r,i=Le(e),l=({target:{checked:f}})=>d(f),h=({target:{value:f}})=>c(n,f),p=({target:{value:f}})=>x(n,f);return t.jsxs(F,{id:n,children:[t.jsx(H,{checked:typeof s>"u"?!1:!!s,required:i,disabled:a||o,autoFocus:u,onChange:l,onBlur:h,onFocus:p,"aria-describedby":L(n)}),t.jsx(F.Label,{children:m||""})]})}function xt({schema:r,label:e,id:n,disabled:s,options:a,value:o,autofocus:m,readonly:u,required:d,onChange:c,onBlur:x,onFocus:i}){const{enumOptions:l,enumDisabled:h,inline:p,emptyValue:f}=a,y=Array.isArray(o)?o:[o],b=g=>({target:{checked:C}})=>{c(C?Oe(g,y,l):Re(g,y,l))},j=({target:{value:g}})=>x(n,v(g,l,f)),S=({target:{value:g}})=>i(n,v(g,l,f));return t.jsxs(Z,{required:d,children:[t.jsx(Z.Label,{children:e||r.title}),Array.isArray(l)&&l.map((g,C)=>{const w=We(g.value,y),I=Array.isArray(h)&&h.indexOf(g.value)!==-1;return t.jsxs(F,{id:G(n,C),children:[t.jsx(H,{checked:w,disabled:s||I||u,autoFocus:m&&C===0,onChange:b(C),onBlur:j,onFocus:S,"aria-describedby":L(n)}),t.jsx(F.Label,{children:g.label})]},G(n,C))})]})}function ft(r){const{options:e,registry:n}=r,s=A("BaseInputTemplate",n,e);return t.jsx(s,{type:"date",InputLabelProps:{shrink:!0},...r})}function yt(r){const{options:e,registry:n}=r,s=A("BaseInputTemplate",n,e),a=Ve(r.value),o=m=>{r.onChange(_e(m))};return t.jsx(s,{type:"datetime-local",...r,value:a,onChange:o})}function gt({id:r,schema:e,options:n,value:s,required:a,disabled:o,readonly:m,label:u,onChange:d,onBlur:c,onFocus:x}){const{enumOptions:i,enumDisabled:l,emptyValue:h}=n,p=({target:{value:b}})=>d(v(b,i,h)),f=({target:{value:b}})=>c(r,v(b,i,h)),y=({target:{value:b}})=>x(r,v(b,i,h));return t.jsxs(X,{name:r,required:a,children:[t.jsx(X.Label,{children:u||e.title}),t.jsx(t.Fragment,{children:Array.isArray(i)&&i.map((b,j)=>{const S=Array.isArray(l)&&l.indexOf(b.value)!==-1;return t.jsxs(F,{id:G(r,j),children:[t.jsx(fe,{value:String(j),onChange:p,onBlur:f,onFocus:y,"aria-describedby":L(r),disabled:o||S||m},j),t.jsx(F.Label,{children:b.label})]},G(r,j))})})]})}function bt(r){const{value:e,readonly:n,disabled:s,options:a,schema:o,onChange:m,label:u,id:d}=r,c={value:e,label:u,id:d,name:d,...Ee(o)},x=i=>{m(i??a.emptyValue)};return t.jsxs(t.Fragment,{children:[t.jsx(F.Label,{htmlFor:d,children:u||o.title}),t.jsx(Ke,{disabled:s||n,onChange:x,...c,"aria-describedby":L(d)})]})}function jt({schema:r,id:e,options:n,label:s,required:a,disabled:o,placeholder:m,readonly:u,value:d,multiple:c,autofocus:x,onChange:i,onBlur:l,onFocus:h,rawErrors:p=[],registry:f,uiSchema:y,hideError:b,formContext:j,...S}){const{enumOptions:g,enumDisabled:C,emptyValue:w}=n,[I,R]=E.useState(!1);c=typeof c>"u"?!1:!!c;const V=c?[]:"",M=typeof d>"u"||c&&d.length<1||!c&&d===V,q=g?.map(({value:k,label:B},W)=>{const _=Array.isArray(C)&&C.indexOf(k)!==-1;return{text:B,id:W,disabled:_}}),N=({target:{value:k}})=>i(v(k,g,w)),U=({target:{value:k}})=>l(e,v(k,g,w)),z=({target:{value:k}})=>h(e,v(k,g,w)),$=qe(d,g,c);return t.jsxs(F,{id:e,required:a,children:[t.jsx(F.Label,{visuallyHidden:!(s||r.title),htmlFor:e,children:s||r.title}),c&&Array.isArray(g)?t.jsx(ye,{placeholderText:(s||r.title)??"",renderAnchor:({children:k,"aria-labelledby":B,...W})=>t.jsx(re,{trailingAction:ge,"aria-labelledby":` ${B}`,...W,onClick:_=>{R(!I),_.preventDefault()},children:k||`Select ${s||r.title}`}),open:I,onOpenChange:R,items:q??[],selected:(q??[]).filter((k,B)=>$?.includes(String(B))),onSelectedChange:k=>{i(v(k.map(B=>B.id),g,w))},onFilterChange:()=>null,overlayProps:{width:"small"}}):t.jsx(Y,{name:e,value:M?V:$,disabled:o||u,autoFocus:x,placeholder:s||r.title,validationStatus:p.length>0?"error":void 0,onChange:N,onBlur:U,onFocus:z,defaultValue:void 0,...S,"aria-describedby":L(e),children:Array.isArray(g)&&g.map(({value:k,label:B},W)=>{const _=Array.isArray(C)&&C.indexOf(k)!==-1;return t.jsx(Y.Option,{value:String(W),disabled:_,children:B},W)})})]})}function Ct({id:r,placeholder:e,value:n,label:s,disabled:a,autofocus:o,readonly:m,onBlur:u,onFocus:d,onChange:c,options:x,schema:i,uiSchema:l,required:h,rawErrors:p=[],registry:f}){const{schemaUtils:y}=f,b=y.getDisplayLabel(i,l)&&(!!s||!!i.title),j=({target:{value:C}})=>c(C===""?x.emptyValue:C),S=({target:{value:C}})=>u(r,C),g=({target:{value:C}})=>d(r,C);return t.jsxs(t.Fragment,{children:[t.jsx(F.Label,{visuallyHidden:!b,htmlFor:r,children:s||i.title}),t.jsx(be,{id:r,name:r,value:n??"",placeholder:e,autoFocus:o,required:h,disabled:a||m,validationStatus:p.length>0?"error":void 0,onChange:j,onBlur:S,onFocus:g,block:!0,"aria-describedby":L(r)})]})}function Tt(){return{CheckboxWidget:mt,CheckboxesWidget:xt,DateWidget:ft,DateTimeWidget:yt,RadioWidget:gt,RangeWidget:bt,SelectWidget:jt,TextareaWidget:Ct}}function St(){return{templates:ht(),widgets:Tt()}}function Ft(){return Je(St())}const Bt=Ft();function kt({id:r,value:e,label:n,disabled:s,readonly:a,onChange:o}){return t.jsxs(Ce,{display:"flex",flexDirection:"column",gap:1,children:[t.jsx(K,{as:"span",id:`${r}-label`,sx:{fontWeight:"semibold"},children:n}),t.jsx(Te,{size:"small","aria-labelledby":`${r}-label`,checked:!!e,disabled:s||a,onClick:()=>o(!e)})]})}function vt({id:r,value:e,label:n,disabled:s,readonly:a,placeholder:o,onChange:m}){const u=Array.isArray(e)?e.map(String):[],[d,c]=E.useState(""),x=()=>{const i=d.trim();i&&!u.includes(i)&&m([...u,i]),c("")};return t.jsxs(F,{id:r,disabled:s||a,children:[t.jsx(F.Label,{children:n}),t.jsx(je,{block:!0,placeholder:o,tokens:u.map((i,l)=>({id:l,text:i})),value:d,onChange:i=>c(i.target.value.replace(",","")),onKeyDown:i=>{(i.key==="Enter"||i.key===",")&&(i.preventDefault(),x())},onBlur:x,onTokenRemove:i=>{m(u.filter((l,h)=>h!==i))}})]})}const wt={switch:kt,tags:vt};function Gt(r){return t.jsx(Bt,{...r,widgets:wt,validator:$e})}export{Gt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h,j as t,a1 as x,B as c,T as a,v as f,a2 as u}from"../datalayer-app-main.js";import{c as b}from"./sheet-
|
|
1
|
+
import{r as h,j as t,a1 as x,B as c,T as a,v as f,a2 as u}from"../datalayer-app-main.js";import{c as b}from"./sheet-Do4NLOO5.js";import{F as m}from"./FormulaBar-BBm1JXuS.js";import{C as S,S as g,a as j}from"./SheetTabs-CIoATuqe.js";import{t as k}from"./write-Q_DIQOWJ.js";import"./model-BUkhfry_.js";const o={kicker:"Sheet",export:"Export CSV",exportTitle:"Download the tab shown as a CSV file",cells:e=>e===1?"1 cell":`${e} cells`,kept:"You can edit the cells. Your edits stay on this page: export to keep them."},w=340,v=e=>`${e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"sheet"}.csv`,C=e=>k(e,{sheet:e.selection.sheet});function E(e,i){const r=URL.createObjectURL(new Blob([i],{type:"text/csv;charset=utf-8"})),s=document.createElement("a");s.href=r,s.download=e,s.click(),URL.revokeObjectURL(r)}function B({model:e}){const i=h.useCallback(l=>{const d=e.subscribe(l),p=e.subscribeSelection(l);return()=>{d(),p()}},[e]),r=h.useSyncExternalStore(i,()=>`${e.revision}:${e.selection.sheet}`,()=>""),s=e.sheet(e.selection.sheet).name,n=b(e);return t.jsxs(x,{as:"section","aria-label":`${o.kicker}: ${s}`,"data-page-sheet":"","data-page-sheet-tab":s,"data-page-sheet-cells":n,"data-page-sheet-facts":r,border:!0,shadow:"none",overflow:"hidden",my:2,width:"100%",maxWidth:760,children:[t.jsxs(c,{display:"flex",alignItems:"center",px:3,py:2,borderBottom:"1px solid",borderColor:"border.muted",sx:{gap:2,minWidth:0},children:[t.jsx(a,{sx:{fontSize:0,fontWeight:"semibold",color:"success.fg",letterSpacing:"0.04em",textTransform:"uppercase",flexShrink:0},children:o.kicker}),t.jsx(a,{as:"h4",sx:{m:0,fontSize:2,fontWeight:"semibold",color:"fg.default",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1},children:s}),t.jsx(a,{sx:{fontSize:0,color:"fg.muted",fontVariantNumeric:"tabular-nums",flexShrink:0},children:o.cells(n)}),t.jsx(f,{size:"small",leadingVisual:u,title:o.exportTitle,disabled:n===0,onClick:()=>E(v(s),C(e)),"data-page-sheet-export":"",children:o.export})]}),t.jsxs(S,{model:e,children:[t.jsx(m,{}),t.jsx(c,{height:w,position:"relative",children:t.jsx(g,{model:e,"aria-label":`Spreadsheet: ${s}`})}),t.jsx(j,{})]}),t.jsx(c,{px:3,py:2,borderTop:"1px solid",borderColor:"border.muted",bg:"canvas.subtle",children:t.jsx(a,{sx:{fontSize:0,color:"fg.muted"},children:o.kept})})]})}export{w as PAGE_SHEET_GRID_HEIGHT,o as PAGE_SHEET_WORDS,v as csvFileName,B as default,C as sheetCsv};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as v,r as x,dE as yt,
|
|
1
|
+
import{j as v,r as x,dE as yt,hp as bt,aD as Nn,v as Dt,_ as Bn,hq as Kn,hr as Xn,hs as Yn,bx as de,dG as Wn,a6 as Un,I as Ot,X as Gn,dF as ct,ht as Vn}from"../datalayer-app-main.js";import{s as en,a as Zn,p as qn,q as Jn,P as tn,C as Qn,r as eo,d as to,u as we,v as nn,w as on,x as no,y as oo,A as ro,D as so,E as rn,F as io,G as _e,H as lo,I as co,c as He,J as sn,o as ln,K as ao,L as uo,M as Fe,N as Re,O as ho,Q as fo,z as Me,R as mo,e as go,S as xo,T as ht,U as Pt,V as wo,b as It}from"./model-BUkhfry_.js";function cn(t,e,n){if(e===void 0)return t.selection.sheet;const o=e.toLowerCase(),s=t.sheets.find(i=>i.name.toLowerCase()===o);if(s===void 0)throw new Error(`'${n}' names no sheet of the workbook: there is no '${e}'.`);return s.id}function vt(t,e){const{sheet:n,ref:o}=en(e);return{sheet:cn(t,n,e),...Zn(o)}}function Ct(t,e){const{sheet:n,ref:o}=en(e);return{sheet:cn(t,n,e),zone:qn(o)}}const Lt=new WeakMap,Ft=new WeakMap;function po(t){let e=Lt.get(t);return e===void 0&&(e=new tn(t,Qn,{label:"chart type",key:n=>n.id,check:n=>{if(typeof n.id!="string"||!/^[a-z][a-zA-Z0-9.-]*$/.test(n.id))throw new Error("a chart type has an id such as 'column' or 'acme.radar'");if(typeof n.option!="function")throw new Error(`the chart type ${n.id} has no option`);if(typeof n.describe!="function")throw new Error(`the chart type ${n.id} has no describe`);if(!Array.isArray(n.modules))throw new Error(`the chart type ${n.id} lists its modules`)}}),Lt.set(t,e)),e}function yo(t){let e=Ft.get(t);return e===void 0&&(e=new tn(t,eo,{label:"chart option transform",key:n=>n.id,check:n=>{if(typeof n.transform!="function")throw new Error(`the chart option transform ${n.id} has no transform`)}}),Ft.set(t,e)),e}function an(t){return Jn(t,to,"chart renderer")}function bo(t,e,n,o,s=[]){let i=o.option(t,e,n);for(const r of s)r.applies!==void 0&&!r.applies(t)||(i=r.transform(i,t,n));return i}function vo(t,e){const n=`A ${t.type} chart`;return e==="not-loaded"?`${n}: charts are not loaded`:`${n}: no plugin draws '${t.type}' charts`}const _t=new WeakMap;function Co(t,e,n,o,s=an(t.reactor)===void 0?"not-loaded":"loaded"){const i=t.sheet(e).charts.get(n);if(i===void 0)throw new Error(`No chart '${n}' on sheet '${e}'.`);const r=t.chartRevision(e,n),a=po(t.reactor),c=a.revision,u=_t.get(i);if(u!==void 0&&u.revision===r&&u.theme===o&&u.platform===c&&u.renderer===s)return u.resolved;let p;const C=s==="loaded"?a.get(i.type):void 0;if(C===void 0)p={kind:"placeholder",text:vo(i,s==="loaded"?"no-type":"not-loaded")};else{const w=t.chartData(e,n),f=yo(t.reactor).all().map(S=>S.value);p={kind:"option",type:C,data:w,option:bo(i,w,o,C.value,f),description:C.value.describe(i,w)}}return _t.set(i,{revision:r,theme:o,platform:c,renderer:s,resolved:p}),p}const dn=x.createContext(null);function So({model:t,children:e}){return v.jsx(dn.Provider,{value:t,children:e})}function ye(){const t=x.useContext(dn);if(t===null)throw new Error("useCells reads the model of a <CellsProvider> or a <Spreadsheet>; this component is in neither.");return t}function Eo(){const t=ye(),e=x.useCallback(n=>{const o=t.subscribe(n),s=t.subscribeSelection(n);return()=>{o(),s()}},[t]);return x.useSyncExternalStore(e,()=>t.revision,()=>t.revision)}function St(t,e){const n=ye(),o=Eo();return x.useMemo(()=>t(n),[n,o,...e])}function Mo(t){return St(e=>{const{sheet:n,row:o,col:s}=vt(e,t);return{content:e.content(n,o,s),value:e.value(n,o,s),style:e.style(n,o,s)}},[t])}function Kr(t){const e=ye(),{style:n}=Mo(t),o=x.useCallback(s=>{const{sheet:i,zone:r}=Ct(e,t);return e.dispatch({type:"SET_STYLE",sheet:i,zone:r,style:s})},[e,t]);return{style:n,set:o}}function Xr(){const t=ye();return St(e=>({...e.selection,select:(n,o={})=>{const{sheet:s,zone:i}=Ct(t,n),r={row:i.top,col:i.left},a=s===t.selection.sheet?t.selection:we(s,r);let c;o.add?c=no(a,i):i.top===i.bottom&&i.left===i.right?c=oo(a,r,o.extend):c={sheet:s,zones:[i],anchor:r,active:r},t.select(c)},set:n=>t.select(n),navigate:n=>{const o=t.selection;t.select(nn(o,n,on(t.sheet(o.sheet))))},activate:n=>t.select(we(t.sheet(n).id))}),[])}function ko(){const t=ye();return St(e=>({sheets:e.sheets.map(n=>({id:n.id,name:n.name,frozen:{...n.frozen},merges:[...n.merges]})),active:e.selection.sheet,add:(n,o)=>t.dispatch({type:"ADD_SHEET",name:n,at:o}),rename:(n,o)=>t.dispatch({type:"RENAME_SHEET",sheet:n,name:o}),move:(n,o)=>t.dispatch({type:"MOVE_SHEET",sheet:n,to:o}),remove:n=>t.dispatch({type:"DELETE_SHEET",sheet:n}),freeze:(n,o,s)=>t.dispatch({type:"FREEZE",sheet:n,rows:o,cols:s}),activate:n=>t.select(we(t.sheet(n).id))}),[])}function Yr(){const t=ye(),e=x.useCallback(o=>t.subscribeEdit(o),[t]),n=x.useSyncExternalStore(e,()=>t.edit,()=>t.edit);return x.useMemo(()=>({edit:n,start:(o,s)=>{if(o===void 0){t.startEdit(void 0,s);return}const i=vt(t,o);i.sheet!==t.selection.sheet&&t.select(we(i.sheet,i)),t.startEdit({row:i.row,col:i.col},s)},setText:o=>t.setEditText(o),commit:()=>t.commitEdit(),cancel:()=>t.cancelEdit()}),[t,n])}function Wr(t){const e=ye(),n=x.useCallback(s=>e.reactor.subscribe(s),[e]),o=x.useSyncExternalStore(n,()=>e.reactor.getRevision(),()=>e.reactor.getRevision());return x.useMemo(()=>e.reactor.getContributions(t),[e,t,o])}function Ur(){const t=ye(),e=x.useCallback(o=>t.reactor.subscribe(o),[t]),n=x.useSyncExternalStore(e,()=>t.reactor.getRevision(),()=>t.reactor.getRevision());return x.useMemo(()=>t.reactor.listCommands(),[t,n])}const ft="data-cells-slice",at=t=>t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");function zo(t){if(t===void 0)return"";const e=[];t.bold&&e.push("font-weight:bold"),t.italic&&e.push("font-style:italic");const n=[t.underline?"underline":"",t.strike?"line-through":""].filter(Boolean).join(" ");return n&&e.push(`text-decoration:${n}`),t.color&&e.push(`color:${t.color}`),t.fill&&e.push(`background-color:${t.fill}`),t.align&&e.push(`text-align:${t.align}`),t.valign&&e.push(`vertical-align:${t.valign}`),t.size&&e.push(`font-size:${t.size}px`),t.font&&e.push(`font-family:${t.font}`),t.wrap&&e.push("white-space:normal"),e.join(";")}function Ro(t,e){const n=Array.from({length:t.rows},()=>Array.from({length:t.cols},()=>"")),o=Array.from({length:t.rows},()=>Array.from({length:t.cols},()=>{})),s=t.parts.cells??[],i=t.source;for(const r of s){const a=r.f!==void 0&&i!==void 0&&e.workbook.hasSheet(i.sheet)?e.value(i.sheet,i.zone.top+r.r,i.zone.left+r.c):r.v??null;n[r.r][r.c]=_e(a,r.style?.format).text,o[r.r][r.c]=r.style}return{text:n,styles:o}}function To(t,e){const{text:n,styles:o}=Ro(t,e),s=n.map((r,a)=>`<tr>${r.map((c,u)=>{const p=zo(o[a][u]);return`<td${p?` style="${at(p)}"`:""}>${at(c).replace(/\n/g,"<br>")}</td>`}).join("")}</tr>`).join(""),i=`<meta charset="utf-8"><table ${ft}="${at(JSON.stringify(t))}" style="border-collapse:collapse">${s}</table>`;return{text:ro(n),html:i}}function $o(t){const e={},n=t["font-weight"];(n==="bold"||n==="bolder"||Number(n)>=600)&&(e.bold=!0),t["font-style"]==="italic"&&(e.italic=!0);const o=t["text-decoration"]??t["text-decoration-line"]??"";o.includes("underline")&&(e.underline=!0),o.includes("line-through")&&(e.strike=!0);const s=t.color;s&&!/^(windowtext|black|#000000|#000|rgb\(0, 0, 0\))$/i.test(s)&&(e.color=s);const i=t["background-color"]??t.background;i&&!/^(transparent|white|#ffffff|#fff|rgb\(255, 255, 255\)|none|initial)$/i.test(i)&&(e.fill=i);const r=t["text-align"];(r==="left"||r==="center"||r==="right")&&(e.align=r);const a=t["vertical-align"];(a==="top"||a==="middle")&&(e.valign=a);const c=(t["mso-number-format"]??t["data-sheets-numberformat"])?.replace(/^"|"$/g,"").replace(/\\(.)/g,"$1");if(c)try{lo(c),e.format=c}catch{}return Object.keys(e).length>0?e:void 0}function Ht(t){const e={},n=[];let o="",s=!1;for(let i=0;i<t.length;i+=1){const r=t[i];r==="\\"&&i+1<t.length?(o+=r+t[i+1],i+=1):r==='"'?(s=!s,o+=r):r===";"&&!s?(n.push(o),o=""):o+=r}n.push(o);for(const i of n){const r=i.indexOf(":");r<0||(e[i.slice(0,r).trim().toLowerCase()]=i.slice(r+1).trim())}return e}function Ao(t,e){const n=t.getAttribute("x:num")??t.getAttribute("num");if(n!==null){const c=Number(n===""?e.replace(/[^0-9.eE+-]/g,""):n);if(Number.isFinite(c))return{v:c}}const o=t.getAttribute("x:bool");if(o!==null)return{v:o.toUpperCase()==="TRUE"};const s=t.getAttribute("x:fmla")??t.getAttribute("data-sheets-formula"),i=t.getAttribute("data-sheets-value");if(i!==null)try{const c=JSON.parse(i);if(typeof c[3]=="number")return{v:c[3]};if(typeof c[2]=="string")return{v:c[2]};if(typeof c[4]=="number")return{v:c[4]===1}}catch{}if(s!==null&&s.startsWith("="))return{f:s.slice(1)};const a=rn([[e]]).parts.cells[0];return a===void 0?{}:{...a.v!==void 0?{v:a.v}:{},...a.f!==void 0?{f:a.f}:{}}}function jo(t,e){if(t){const n=new DOMParser().parseFromString(t,"text/html"),o=n.querySelector(`[${ft}]`);if(o!==null){const i=JSON.parse(o.getAttribute(ft));return so(i),i}const s=n.querySelector("table");if(s!==null){const i=new Map;for(const p of n.querySelectorAll("style")){const C=(p.textContent??"").replace(/<!--|-->/g,"");for(const w of C.matchAll(/\.([\w-]+)\s*\{([^}]*)\}/g))i.set(w[1],Ht(w[2]))}const r=[],a=new Set;let c=0,u=0;if(s.querySelectorAll("tr").forEach((p,C)=>{let w=0;p.querySelectorAll("td, th").forEach(f=>{for(;a.has(`${C},${w}`);)w+=1;const S=Math.max(1,Number(f.getAttribute("colspan")??1)),y=Math.max(1,Number(f.getAttribute("rowspan")??1));for(let O=0;O<y;O+=1)for(let j=0;j<S;j+=1)a.add(`${C+O},${w+j}`);f.querySelectorAll("br").forEach(O=>O.replaceWith(`
|
|
2
2
|
`));const m=(f.textContent??"").replace(/ /g," "),E=f.getAttribute("data-sheets-numberformat");let z;if(E!==null)try{const O=JSON.parse(E);typeof O[2]=="string"&&(z=O[2])}catch{}const T={...z!==void 0?{"data-sheets-numberformat":z}:{},...Object.assign({},...(f.getAttribute("class")??"").split(/\s+/).filter(Boolean).map(O=>i.get(O)??{})),...Ht(f.getAttribute("style")??"")},A=$o(T),D=Ao(f,m.trim()===""?"":m);(D.v!==void 0||D.f!==void 0||A!==void 0)&&r.push({r:C,c:w,...D,...A?{style:A}:{}}),w+=S,u=Math.max(u,w)}),c=C+1}),c>0&&u>0)return{version:1,rows:c,cols:u,parts:{cells:r}}}}if(e!==void 0&&e!=="")return rn(io(e))}class Do{capacity;#e=new Map;hits=0;misses=0;constructor(e){if(!Number.isInteger(e)||e<1)throw new Error(`An LRU holds at least one entry; ${e} was asked for.`);this.capacity=e}get(e){const n=this.#e.get(e);if(n===void 0){this.misses+=1;return}return this.hits+=1,this.#e.delete(e),this.#e.set(e,n),n}set(e,n){this.#e.delete(e),this.#e.set(e,n),this.#e.size>this.capacity&&this.#e.delete(this.#e.keys().next().value)}get size(){return this.#e.size}clear(){this.#e.clear()}}class Oo{cache;constructor(e=2e4){this.cache=new Do(e)}width(e,n,o){const s=`${n}\0${o}`,i=this.cache.get(s);if(i!==void 0)return i;e.font!==n&&(e.font=n);const r=e.measureText(o).width;return this.cache.set(s,r),r}wrap(e,n,o,s){const i=[];for(const r of o.split(`
|
|
3
3
|
`)){let a="";for(const c of r.split(/(\s+)/)){const u=a+c;a!==""&&this.width(e,n,u.trimEnd())>s?(i.push(a.trimEnd()),a=c.trimStart()):a=u}i.push(a.trimEnd())}return i}}function Po(t,e){if(!e)return{width:0,height:0};const n=String(t).length;return{width:Math.max(40,12+n*8),height:24}}function We(t,e,n,o){if(n<=0||o<=0||e>=t.offsetOf(o))return[0,-1];const s=t.indexAt(e),i=Math.min(t.indexAt(Math.max(e,e+n-1e-6)),o-1);return[s,i]}function Io(t){if(!(t.zoom>0))throw new Error(`A zoom must be positive; ${t.zoom} was given.`);const e=t.zoom,n=Po(t.rows.count,t.showHeaders),o=n.width*e,s=n.height*e,i=t.rows.offsetOf(t.frozen.rows),r=t.cols.offsetOf(t.frozen.cols),a=t.cols.extent-r,c=t.rows.extent-i,u=Math.max(0,t.width-o),p=Math.max(0,t.height-s),C=Math.min(r*e,u),w=Math.min(i*e,p),f=u-C,S=p-w,y=Math.max(0,a-f/e),k=Math.max(0,c-S/e),m=Math.min(Math.max(0,t.scrollX),y),E=Math.min(Math.max(0,t.scrollY),k),z=We(t.rows,0,w/e,t.frozen.rows),T=We(t.cols,0,C/e,t.frozen.cols),A=We(t.rows,i+E,S/e,t.rows.count),D=We(t.cols,r+m,f/e,t.cols.count),O=(_,Y,N,I,K,B,ne,U,G)=>({name:_,x:Y,y:N,width:I,height:K,firstRow:B[0],lastRow:B[1],firstCol:ne[0],lastCol:ne[1],originX:U,originY:G}),j=[];return w>0&&C>0&&j.push(O("corner",o,s,C,w,z,T,0,0)),w>0&&j.push(O("top",o+C,s,f,w,z,D,r+m,0)),C>0&&j.push(O("left",o,s+w,C,S,A,T,0,i+E)),j.push(O("main",o+C,s+w,f,S,A,D,r+m,i+E)),{zoom:e,headerWidth:o,headerHeight:s,panes:j,scrollWidth:a,scrollHeight:c,maxScrollX:y,maxScrollY:k}}function un(t,e,n){return t.panes.find(o=>e>=o.x&&e<o.x+o.width&&n>=o.y&&n<o.y+o.height)}function Lo(t,e,n,o,s){const i=un(t,o,s);if(i===void 0)return;const r=i.originX+(o-i.x)/t.zoom,a=i.originY+(s-i.y)/t.zoom;if(!(r>=n.extent||a>=e.extent))return{row:e.indexAt(a),col:n.indexAt(r)}}function te(t,e,n,o,s,i){const r=t.x+(o.offsetOf(i)-t.originX)*e,a=t.y+(n.offsetOf(s)-t.originY)*e;return{x:r,y:a,width:o.effectiveSizeOf(i)*e,height:n.effectiveSizeOf(s)*e}}const Fo=4;function _o(t,e,n,o,s){if(t.headerHeight===0)return;const i=s<t.headerHeight&&o>=t.headerWidth,r=o<t.headerWidth&&s>=t.headerHeight;if(!i&&!r)return;const a=i?"cols":"rows",c=i?n:e,u=t.panes.find(k=>i?o>=k.x&&o<k.x+k.width:s>=k.y&&s<k.y+k.height);if(u===void 0)return;const p=i?u.originX+(o-u.x)/t.zoom:u.originY+(s-u.y)/t.zoom;if(p>=c.extent)return;const C=c.indexAt(p),w=c.offsetOf(C),f=c.offsetOf(C+1),S=Fo/t.zoom;let y;if(f-p<=S)y=C;else if(p-w<=S&&C>0){let k=C-1;for(;k>0&&c.effectiveSizeOf(k)===0;)k-=1;y=k}return{axis:a,index:C,edge:y,x:o,y:s}}const hn=3,mt=20;function tt(t,e,n){const o=(t.size??e.fontSize)*n;return`${t.italic?"italic ":""}${t.bold?"bold ":""}${o}px ${t.font??e.fontFamily}`}function Ze(t,e,n,o,s){const i=Math.round(s*e)+.5;t.moveTo(Math.round(n*e),i),t.lineTo(Math.round(o*e),i)}function qe(t,e,n,o,s){const i=Math.round(n*e)+.5;t.moveTo(i,Math.round(o*e)),t.lineTo(i,Math.round(s*e))}function Et(t,e){t.save(),t.setTransform(1,0,0,1,0,0),e(),t.restore()}function pe(t,e){t.beginPath(),t.rect(e.x,e.y,e.width,e.height),t.clip()}function Je(t,e,n){const o=[];for(let s=e;s<=n;s+=1)t.effectiveSizeOf(s)>0&&o.push(s);return o}function dt(t){return t===null||t.value===null&&t.formula===void 0}function gt(t,e){const n=Math.max(t.x,e.x),o=Math.max(t.y,e.y),s=Math.min(t.x+t.width,e.x+e.width)-n,i=Math.min(t.y+t.height,e.y+e.height)-o;return s>0&&i>0?{x:n,y:o,width:s,height:i}:void 0}function Nt(t){const{ctx:e,dpr:n,viewport:o}=t,s={cells:0,texts:0};e.save(),e.setTransform(n,0,0,n,0,0),t.clip&&pe(e,t.clip);const i={x:0,y:0,width:Number.MAX_SAFE_INTEGER,height:Number.MAX_SAFE_INTEGER};for(const r of o.panes){const a=gt({x:r.x,y:r.y,width:r.width,height:r.height},t.clip??i);a!==void 0&&(e.save(),pe(e,a),No(t,t.clip?Ho(r,a,o.zoom,t.sheet):r,s),e.restore())}return Ko(t),Xo(t),e.restore(),s}function Ho(t,e,n,o){if(t.lastRow<t.firstRow||t.lastCol<t.firstCol)return t;const s=t.originY+(e.y-t.y)/n,i=t.originY+(e.y+e.height-t.y)/n,r=t.originX+(e.x-t.x)/n,a=t.originX+(e.x+e.width-t.x)/n,c=Math.max(t.firstRow,o.rows.indexAt(s)),u=Math.min(t.lastRow,o.rows.indexAt(i)),p=Math.max(t.firstCol,o.cols.indexAt(r)-mt),C=Math.min(t.lastCol,o.cols.indexAt(a)+mt);return{...t,firstRow:c,lastRow:u,firstCol:p,lastCol:C}}function No(t,e,n){const{ctx:o,dpr:s,viewport:i,sheet:r,styles:a,theme:c,measure:u}=t,p=i.zoom;if(o.fillStyle=c.background,o.fillRect(e.x,e.y,e.width,e.height),e.lastRow<e.firstRow||e.lastCol<e.firstCol)return;const C=Je(r.rows,e.firstRow,e.lastRow),w=Je(r.cols,e.firstCol,e.lastCol),f=(m,E)=>te(e,p,r.rows,r.cols,m,E);for(const m of C)for(const E of w){const z=r.cells.get(m,E);if(z===null)continue;n.cells+=1;const T=a.get(z.style).fill;if(T){const A=f(m,E);o.fillStyle=T,o.fillRect(A.x,A.y,A.width,A.height)}}t.showGridlines&&Et(o,()=>{o.beginPath(),o.strokeStyle=c.gridline,o.lineWidth=1;const m=e.x+e.width,E=e.y+e.height;for(const z of C){const T=f(z,w[0]??e.firstCol);Ze(o,s,e.x,m,T.y+T.height-1/s)}for(const z of w){const T=f(C[0]??e.firstRow,z);qe(o,s,T.x+T.width-1/s,e.y,E)}o.stroke()}),xt(t,"background",e,r,o);const S={top:e.firstRow,left:e.firstCol,bottom:e.lastRow,right:e.lastCol},y=r.merges.filter(m=>co(m,S));for(const m of y){const E=f(m.top,m.left),z=f(m.bottom,m.right),T={x:E.x,y:E.y,width:z.x+z.width-E.x-1/s,height:z.y+z.height-E.y-1/s},A=r.cells.get(m.top,m.left),D=a.get(A?.style??0);o.fillStyle=D.fill??c.background,o.fillRect(T.x,T.y,T.width,T.height);const O=A===null?void 0:Bt(t,D);if(A!==null&&(!dt(A)||O?.paintsEmpty===!0)){const j=O;j!==void 0?Kt(t,j,T,t.value(m.top,m.left),D,n,m.top,m.left):Xt(t,_e(t.value(m.top,m.left),D.format,t.locale),D,T,T,n)}}const k=(m,E)=>y.some(z=>m>=z.top&&m<=z.bottom&&E>=z.left&&E<=z.right);for(const m of C){const E=w[0];if(E===void 0)break;const z=[],T=e.name==="main"||e.name==="top"?r.frozen.cols:0;for(let j=E-1;j>=Math.max(T,E-mt);j-=1)r.cols.effectiveSizeOf(j)>0&&z.unshift(j);const A=[...z,...w],D=t.bound,O=D!==void 0&&m>=D.top&&m<=D.bottom;for(let j=0;j<A.length;j+=1){const _=A[j];let Y=r.cells.get(m,_);if(Y===null&&O&&_>=D.left&&_<=D.right){const U=t.value(m,_);if(U===null)continue;Y={value:U,style:0},n.cells+=1}if(Y===null||k(m,_))continue;const N=a.get(Y.style),I=Bt(t,N);if(dt(Y)&&I?.paintsEmpty!==!0)continue;const K=f(m,_);if(I!==void 0){j>=z.length&&Kt(t,I,K,t.value(m,_),N,n,m,_);continue}const B=_e(t.value(m,_),N.format,t.locale);let ne=K;if(B.kind==="text"&&!N.wrap){const U=tt(N,c,p),G=u.width(o,U,B.text)+2*hn*p,be=N.align??B.align;if(G>K.width){let oe=K.x,q=K.x+K.width;const ce=V=>V>=0&&V<r.cols.count&&dt(r.cells.get(m,V))&&!k(m,V);if(be!=="right")for(let V=_+1;ce(V)&&q-oe<G;V+=1)q=f(m,V).x+f(m,V).width;if(be!=="left")for(let V=_-1;ce(V)&&q-oe<G;V-=1)oe=f(m,V).x;ne={x:oe,y:K.y,width:q-oe,height:K.height}}}j<z.length&&ne.x+ne.width<=f(m,E).x||Xt(t,B,N,K,ne,n)}}for(const m of C)for(const E of w){const z=r.cells.get(m,E);if(z===null)continue;const T=a.get(z.style).borders;if(!T)continue;const A=f(m,E);for(const D of["top","right","bottom","left"]){const O=T[D];if(!O)continue;const j=O.style==="thick"?3:O.style==="medium"?2:1;o.save(),o.strokeStyle=O.color,o.lineWidth=j,O.style==="dashed"&&o.setLineDash([4*p,2*p]),O.style==="dotted"&&o.setLineDash([1*p,1*p]),o.beginPath();const _=A.x,Y=A.x+A.width,N=A.y,I=A.y+A.height,K=O.style==="double"?[-1,1]:[0];for(const B of K)D==="top"&&(o.moveTo(_,N+B),o.lineTo(Y,N+B)),D==="bottom"&&(o.moveTo(_,I+B),o.lineTo(Y,I+B)),D==="left"&&(o.moveTo(_+B,N),o.lineTo(_+B,I)),D==="right"&&(o.moveTo(Y+B,N),o.lineTo(Y+B,I));o.stroke(),o.restore()}}xt(t,"cells",e,r,o)}function Bo(t,e,n){return{sheet:n.id,zone:{top:t.firstRow,left:t.firstCol,bottom:t.lastRow,right:t.lastCol},pane:t.name,zoom:e,cellRect:(o,s)=>({...te(t,e,n.rows,n.cols,o,s),zoom:e})}}function xt(t,e,n,o,s){if(t.layers===void 0)return;let i;for(const r of t.layers)if(r.layer===e){i??=Bo(n,t.viewport.zoom,o),s.save(),pe(s,n);try{r.draw(s,i,t.model)}finally{s.restore()}}}function Bt(t,e){return e.type===void 0||t.cellType===void 0?void 0:t.cellType(e.type)}function Kt(t,e,n,o,s,i,r,a){const{ctx:c}=t;c.save(),pe(c,n);const u={x:n.x,y:n.y,width:n.width-1,height:n.height-1,zoom:t.viewport.zoom};e.render(c,u,o,s,t.theme,{sheet:t.sheet.id,row:r,col:a,model:t.model}),c.restore(),i.texts+=1}function Xt(t,e,n,o,s,i){const{ctx:r,viewport:a,theme:c,measure:u}=t,p=a.zoom;if(e.text==="")return;const C=tt(n,c,p),w=hn*p;let f=e.text;if(e.kind==="number"&&u.width(r,C,f)+2*w>o.width){const A=u.width(r,C,"#");f="#".repeat(Math.max(1,Math.floor((o.width-2*w)/Math.max(A,1))))}const S=n.align??e.align;if(s!==o&&s.width>o.width){const A=t.dpr;r.fillStyle=n.fill??c.background,r.fillRect(s.x,s.y,s.width-1/A,s.height-1/A)}r.save(),pe(r,s),r.font=C,r.fillStyle=e.kind==="error"?c.errorText:e.color??n.color??c.text,r.textBaseline="alphabetic";const y=(n.size??c.fontSize)*p,k=n.wrap?u.wrap(r,C,f,o.width-2*w):[f],m=y*1.25,E=n.valign??"bottom",z=k.length*m,T=E==="top"?o.y+w:E==="middle"?o.y+(o.height-z)/2:o.y+o.height-w-z;k.forEach((A,D)=>{const O=u.width(r,C,A),j=T+(D+1)*m-(m-y)/2-y*.12,_=n.wrap?o:s,Y=S==="left"?_.x+w:S==="right"?_.x+_.width-w-O:_.x+(_.width-O)/2;r.fillText(A,Y,j),(n.underline||n.strike)&&r.fillRect(Y,n.underline?j+1.5*p:j-y*.32,O,Math.max(1,p))}),r.restore(),i.texts+=1}function Ko(t){const{ctx:e,dpr:n,viewport:o,sheet:s,theme:i,measure:r}=t;if(o.headerHeight===0)return;const a=o.zoom,c=`${i.headerFontSize*a}px ${i.fontFamily}`,u=o.headerWidth,p=o.headerHeight;e.fillStyle=i.headerBackground,e.fillRect(0,0,e.canvas.width/n,p),e.fillRect(0,0,u,e.canvas.height/n),e.font=c,e.fillStyle=i.headerText,e.textBaseline="middle";const C=[];for(const w of o.panes){if(w.name==="main"||w.name==="top"){e.save(),pe(e,{x:w.x,y:0,width:w.width,height:p});for(const f of Je(s.cols,w.firstCol,w.lastCol)){const S=te(w,a,s.rows,s.cols,w.firstRow,f),y=He(f),k=r.width(e,c,y);e.fillStyle=i.headerText,e.fillText(y,S.x+(S.width-k)/2,p/2),C.push(()=>qe(e,n,S.x+S.width-1/n,0,p))}e.restore()}if(w.name==="main"||w.name==="left"){e.save(),pe(e,{x:0,y:w.y,width:u,height:w.height});for(const f of Je(s.rows,w.firstRow,w.lastRow)){const S=te(w,a,s.rows,s.cols,f,w.firstCol),y=String(f+1),k=r.width(e,c,y);e.fillStyle=i.headerText,e.fillText(y,(u-k)/2,S.y+S.height/2),C.push(()=>Ze(e,n,0,u,S.y+S.height-1/n))}e.restore()}}Et(e,()=>{e.beginPath(),e.strokeStyle=i.headerBorder,e.lineWidth=1;for(const w of C)w();Ze(e,n,0,e.canvas.width/n,p-1/n),qe(e,n,u-1/n,0,e.canvas.height/n),e.stroke()})}function Xo(t){const{ctx:e,dpr:n,viewport:o,theme:s}=t;if(o.panes.find(a=>a.name==="top"||a.name==="left"||a.name==="corner")===void 0)return;const r=o.panes.find(a=>a.name==="main");Et(e,()=>{e.beginPath(),e.strokeStyle=s.frozenLine,e.lineWidth=Math.max(1,Math.round(2*n)),o.panes.some(a=>a.name==="top")&&Ze(e,n,0,r.x+r.width,r.y-1/n),o.panes.some(a=>a.name==="left")&&qe(e,n,r.x-1/n,0,r.y+r.height),e.stroke()})}const Yo=.4,Ue=7;function Wo(t){const{ctx:e,dpr:n,viewport:o,sheet:s,theme:i,selection:r}=t,a=o.zoom;e.save(),e.setTransform(n,0,0,n,0,0),e.clearRect(0,0,e.canvas.width/n,e.canvas.height/n);const c=(p,C)=>{const w=te(p,a,s.rows,s.cols,C.top,C.left),f=Math.min(C.bottom,s.rows.count-1),S=Math.min(C.right,s.cols.count-1),y=p.x+(s.cols.offsetOf(S+1)-p.originX)*a,k=p.y+(s.rows.offsetOf(f+1)-p.originY)*a;return{x:w.x,y:w.y,width:y-w.x,height:k-w.y}};if(o.headerHeight>0){e.fillStyle=i.headerSelectedBackground,e.globalAlpha=i.forcedColors?1:.6;for(const p of o.panes)for(const C of r.zones){const w=c(p,C);if(p.name==="main"||p.name==="top"){const f=gt({x:w.x,y:0,width:w.width,height:o.headerHeight},{x:p.x,y:0,width:p.width,height:o.headerHeight});f&&e.fillRect(f.x,f.y,f.width,f.height)}if(p.name==="main"||p.name==="left"){const f=gt({x:0,y:w.y,width:o.headerWidth,height:w.height},{x:0,y:p.y,width:o.headerWidth,height:p.height});f&&e.fillRect(f.x,f.y,f.width,f.height)}}e.globalAlpha=1}const u=r.zones[r.zones.length-1];for(const p of o.panes){e.save(),pe(e,p);for(const S of r.zones){const y=c(p,S);!(S.top===S.bottom&&S.left===S.right&&r.zones.length===1)&&!i.forcedColors&&(e.fillStyle=i.selectionFill,e.globalAlpha=Yo,e.fillRect(y.x,y.y,y.width,y.height),e.globalAlpha=1),(S===u||i.forcedColors)&&(e.strokeStyle=i.selectionBorder,e.lineWidth=i.forcedColors?2:1,e.strokeRect(y.x+.5,y.y+.5,y.width-1,y.height-1))}const C=s.mergeAt(r.active.row,r.active.col),w=c(p,C??{top:r.active.row,left:r.active.col,bottom:r.active.row,right:r.active.col});if(e.strokeStyle=i.activeCellBorder,e.lineWidth=2,e.strokeRect(w.x+1,w.y+1,w.width-2,w.height-2),t.mark&&t.mark.sheet===s.id){const S=c(p,t.mark.zone);e.save(),e.strokeStyle=i.copyMarch,e.lineWidth=2,e.setLineDash([4,3]),e.strokeRect(S.x+1,S.y+1,S.width-2,S.height-2),e.restore()}for(const S of t.remote??[]){if(S.sheet!==s.id)continue;const y=i.forcedColors?i.remoteUserColors[0]:S.user.color;e.strokeStyle=y,e.lineWidth=2;for(const A of S.zones){const D=c(p,A);e.strokeRect(D.x+1,D.y+1,D.width-2,D.height-2)}const k=c(p,{top:S.active.row,left:S.active.col,bottom:S.active.row,right:S.active.col});S.editing!==void 0&&(e.setLineDash([3,2]),e.strokeRect(k.x+1,k.y+1,k.width-2,k.height-2),e.setLineDash([])),e.font=`${Math.max(9,i.headerFontSize-2)*a}px ${i.fontFamily}`;const m=S.editing!==void 0?`${S.user.name} (editing)`:S.user.name,E=e.measureText(m).width+8,z=14*a,T=k.y-z>=p.y?k.y-z:k.y+k.height;e.fillStyle=y,e.fillRect(k.x,T,E,z),e.fillStyle=i.forcedColors?"Canvas":"#ffffff",e.textBaseline="middle",e.fillText(m,k.x+4,T+z/2)}const f=c(p,u);e.fillStyle=i.fillHandle,e.fillRect(f.x+f.width-Ue/2-.5,f.y+f.height-Ue/2-.5,Ue,Ue),e.restore(),xt(t,"overlay",p,s,e)}e.restore()}class Uo{counters={frames:0,gridFull:0,gridPartial:0,blits:0,overlay:0,lastFrameMs:0,cells:0,texts:0,blitMs:0,gridMs:0,overlayMs:0};measure=new Oo;#e;#t;#y;#S;#g;#x;#w;#b=sn;#s=0;#i=0;#l=1;#c=1;#a=0;#d=0;#n;#u=null;#h=!0;#o=!0;#p=[];#f={dx:0,dy:0};#v=!1;#C=!1;#E;constructor(e){this.#e=e.model,this.#t=e.grid,this.#y=e.overlay,this.#g=e.theme,this.#x=e.showGridlines??!0,this.#w=e.showHeaders??!0,this.#S=e.schedule??(i=>requestAnimationFrame(i)),this.#n=this.#e.selection.sheet;const n=this.#e.subscribe(i=>this.#z(i)),o=this.#e.subscribeSelection(i=>this.#R(i)),s=this.#e.subscribePresence(()=>{this.#o=!0,this.#m()});this.#E=()=>{n(),o(),s()}}dispose(){this.#C=!0,this.#E()}get viewport(){return this.#u===null&&(this.#u=this.#T()),this.#u}get sheet(){return this.#n}get dpr(){return this.#l}get zoom(){return this.#c}get scroll(){return{x:this.#a,y:this.#d}}setSize(e,n,o){if(!(e===this.#s&&n===this.#i&&o===this.#l)){this.#s=e,this.#i=n,this.#l=o;for(const s of[this.#t,this.#y])s.width=Math.max(1,Math.round(e*o)),s.height=Math.max(1,Math.round(n*o));this.#r()}}setZoom(e){if(!(e>=.5&&e<=4))throw new Error(`Zoom goes from 0.5 to 4; ${e} was asked for.`);e!==this.#c&&(this.#c=e,this.#r())}setTheme(e){e!==this.#g&&(this.#g=e,this.#r())}setOptions(e){const n=e.showGridlines??this.#x,o=e.showHeaders??this.#w;n===this.#x&&o===this.#w||(this.#x=n,this.#w=o,this.#r())}setLocale(e){e!==this.#b&&(this.#b=e,this.#r())}setSheet(e){e!==this.#n&&(this.#e.sheet(e),this.#n=e,this.#a=0,this.#d=0,this.#r())}setScroll(e,n){const o=this.viewport,s=Math.min(Math.max(0,e),o.maxScrollX),i=Math.min(Math.max(0,n),o.maxScrollY);if(s===this.#a&&i===this.#d)return;const r=(s-this.#a)*this.#c,a=(i-this.#d)*this.#c;this.#a=s,this.#d=i,this.#u=null,this.#h||(this.#f={dx:this.#f.dx+r,dy:this.#f.dy+a}),this.#o=!0,this.#m()}repaint(){this.#r()}frame(){if(this.#v=!1,this.#C||this.#s===0||this.#i===0)return;const e=performance.now(),n=this.viewport,o=this.#e.sheet(this.#n),s=this.#t.getContext("2d",{alpha:!1,desynchronized:!0});if(s===null)throw new Error("The grid canvas has no 2D context.");const i={ctx:s,dpr:this.#l,viewport:n,sheet:o,styles:this.#e.workbook.styles,theme:this.#g,measure:this.measure,showGridlines:this.#x,locale:this.#b,value:(f,S)=>this.#e.value(o.id,f,S),cellType:f=>this.#e.cellTypeOf(f)?.value,bound:this.#e.dataSource(o.id)?.zone,layers:this.#e.renderLayers(),model:this.#e};let r={cells:0,texts:0};const a=n.panes.find(f=>f.name==="main"),{dx:c,dy:u}=this.#f,p=!this.#h&&(c!==0||u!==0)&&Math.abs(c)<a.width/2&&Math.abs(u)<a.height/2;this.counters.blitMs=0;const C=performance.now();if(this.#h||!p&&(c!==0||u!==0))r=Nt(i),this.counters.gridFull+=1;else{const f=[...this.#p];if(p){const S=performance.now();this.#M(s,a,c,u),this.counters.blitMs=performance.now()-S,f.push(...this.#k(a,c,u))}for(const S of f){const y=Nt({...i,clip:S});r.cells+=y.cells,r.texts+=y.texts}f.length>0&&(this.counters.gridPartial+=1)}this.counters.gridMs=performance.now()-C-this.counters.blitMs;const w=performance.now();if(this.#o||this.#h||c!==0||u!==0||this.#p.length>0){const f=this.#y.getContext("2d",{desynchronized:!0});if(f===null)throw new Error("The overlay canvas has no 2D context.");Wo({ctx:f,dpr:this.#l,viewport:n,sheet:o,theme:this.#g,selection:this.#e.selection,mark:this.#e.clipboardMark,remote:this.#e.remotePresence,layers:i.layers,model:this.#e}),this.counters.overlay+=1}this.counters.overlayMs=performance.now()-w,this.#h=!1,this.#o=!1,this.#p=[],this.#f={dx:0,dy:0},this.counters.frames+=1,this.counters.frames===1&&typeof performance.mark=="function"&&performance.mark("cells:first-frame"),this.counters.cells=r.cells,this.counters.texts=r.texts,this.counters.lastFrameMs=performance.now()-e}#M(e,n,o,s){const i=this.#l,r=this.#s,a=this.#i;if(e.save(),e.setTransform(1,0,0,1,0,0),o!==0){const c=n.x;e.drawImage(this.#t,(c+Math.max(o,0))*i,0,(r-c-Math.abs(o))*i,a*i,(c+Math.max(-o,0))*i,0,(r-c-Math.abs(o))*i,a*i)}if(s!==0){const c=n.y;e.drawImage(this.#t,0,(c+Math.max(s,0))*i,r*i,(a-c-Math.abs(s))*i,0,(c+Math.max(-s,0))*i,r*i,(a-c-Math.abs(s))*i)}e.restore(),this.counters.blits+=1}#k(e,n,o){const s=[],i=this.#s,r=this.#i;return n>0&&s.push({x:i-n-1,y:0,width:n+1,height:r}),n<0&&s.push({x:e.x,y:0,width:-n+1,height:r}),o>0&&s.push({x:0,y:r-o-1,width:i,height:o+1}),o<0&&s.push({x:0,y:e.y,width:i,height:-o+1}),s}#z(e){this.#u=null,this.#e.workbook.hasSheet(this.#n)||(this.#n=this.#e.selection.sheet);let n=e.origin==="load"||e.origin==="plugins"||e.origin==="async"||e.origin==="source"||e.origin==="code"?"all":Go(e.patches,this.#n);if(e.patches.length>0&&this.#e.workbook.formulas.size>0&&(n="all"),n==="all"){this.#r();return}if(n==="none"){this.#o=!0,this.#m();return}const o=this.viewport,s=this.#e.sheet(this.#n);for(const i of o.panes){const r=Math.max(n.top,i.firstRow),a=Math.min(n.bottom,i.lastRow);if(r>a)continue;const c=i.y+(s.rows.offsetOf(r)-i.originY)*o.zoom,u=i.y+(s.rows.offsetOf(a+1)-i.originY)*o.zoom;this.#p.push({x:0,y:Math.max(i.y,c-1),width:this.#s,height:Math.min(i.y+i.height,u+1)-Math.max(i.y,c-1)})}this.#o=!0,this.#m()}#R(e){if(e.sheet!==this.#n){this.setSheet(e.sheet);return}this.#o=!0,this.#m()}#r(){this.#u=null,this.#h=!0,this.#o=!0,this.#p=[],this.#f={dx:0,dy:0},this.#m()}#m(){this.#v||this.#C||(this.#v=!0,this.#S(()=>this.frame()))}#T(){const e=this.#e.sheet(this.#n);return Io({rows:e.rows,cols:e.cols,frozen:e.frozen,scrollX:this.#a,scrollY:this.#d,width:this.#s,height:this.#i,zoom:this.#c,showHeaders:this.#w})}}function Go(t,e){let n=1/0,o=-1/0;for(const s of t){const i=s.sheet;if(s.op==="cells"){if(i!==e)continue;const r=s.zone;n=Math.min(n,r.top),o=Math.max(o,r.bottom)}else{if(typeof i=="string"&&i!==e)continue;return"all"}}return n===1/0?"none":o-n>200?"all":{top:n,bottom:o}}const Vo=8e6;function Qe(t,e){return Math.min(t+e,Vo)}class Yt{#e=0;#t=0;map(e,n){const o=Qe(n.maxContent,n.viewport)-n.viewport;if(n.maxContent<=o||o<=0)return this.#e=e,this.#t=Math.min(Math.max(0,e),n.maxContent),this.#t;const s=e-this.#e;let i;return e<=0?i=0:e>=o?i=n.maxContent:Math.abs(s)<n.viewport?i=this.#t+s:i=e/o*n.maxContent,this.#e=e,this.#t=Math.min(Math.max(0,i),n.maxContent),this.#t}domFor(e,n){const o=Qe(n.maxContent,n.viewport)-n.viewport,s=n.maxContent<=o||o<=0?e:e/n.maxContent*o;return this.#e=s,this.#t=e,s}get content(){return this.#t}}const Zo='-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif',qo=["#0969da","#cf222e","#1a7f37","#8250df","#bf8700","#bc4c00","#1b7c83"],nt={background:"#ffffff",text:"#1f2328",textMuted:"#59636e",gridline:"#d1d9e0",headerBackground:"#f6f8fa",headerText:"#59636e",headerBorder:"#d1d9e0",headerSelectedBackground:"#ddf4ff",selectionFill:"#b6e3ff",selectionBorder:"#0969da",activeCellBorder:"#0969da",fillHandle:"#0969da",copyMarch:"#0969da",frozenLine:"#818b98",errorText:"#d1242f",linkText:"#0969da",referenceColors:qo,remoteUserColors:["#bf3989","#1a7f37","#bc4c00","#8250df"],fontFamily:Zo,fontSize:13,headerFontSize:12,chartColors:["#0969da","#1a7f37","#bc4c00","#8250df","#bf8700","#cf222e","#bf3989","#1b7c83"],chartAxis:"#59636e",chartGridline:"#d1d9e0",chartText:"#1f2328",chartBackground:"#ffffff"},Jo={...nt,background:"#0d1117",text:"#f0f6fc",textMuted:"#9198a1",gridline:"#3d444d",headerBackground:"#151b23",headerText:"#9198a1",headerBorder:"#3d444d",headerSelectedBackground:"#0c2d6b",selectionFill:"#1f6feb",selectionBorder:"#4493f8",activeCellBorder:"#4493f8",fillHandle:"#4493f8",copyMarch:"#4493f8",frozenLine:"#656c76",errorText:"#f85149",linkText:"#4493f8",referenceColors:["#4493f8","#f85149","#3fb950","#ab7df8","#d29922","#db6d28","#39c5cf"],remoteUserColors:["#db61a2","#3fb950","#db6d28","#ab7df8"],chartColors:["#4493f8","#3fb950","#db6d28","#ab7df8","#d29922","#f85149","#db61a2","#39c5cf"],chartAxis:"#9198a1",chartGridline:"#3d444d",chartText:"#f0f6fc",chartBackground:"#0d1117"},fn={...nt,background:"Canvas",text:"CanvasText",textMuted:"GrayText",gridline:"GrayText",headerBackground:"Canvas",headerText:"CanvasText",headerBorder:"CanvasText",headerSelectedBackground:"Highlight",selectionFill:"transparent",selectionBorder:"Highlight",activeCellBorder:"Highlight",fillHandle:"Highlight",copyMarch:"Highlight",frozenLine:"CanvasText",errorText:"CanvasText",linkText:"LinkText",referenceColors:["Highlight"],remoteUserColors:["Highlight"],chartColors:["CanvasText","Highlight","LinkText","GrayText"],chartAxis:"CanvasText",chartGridline:"GrayText",chartText:"CanvasText",chartBackground:"Canvas",forcedColors:!0},Qo=Object.keys(nt);function mn(t){if(typeof t!="object"||t===null)throw new Error("A CellsTheme is an object.");const e=t;for(const n of Qo){const o=e[n];if(n==="referenceColors"||n==="remoteUserColors"||n==="chartColors"){if(!Array.isArray(o)||o.length===0||!o.every(s=>typeof s=="string"))throw new Error(`CellsTheme.${n}: a non-empty list of colours.`)}else if(n==="fontSize"||n==="headerFontSize"){if(!(typeof o=="number"&&o>0))throw new Error(`CellsTheme.${n}: a positive size in px.`)}else if(typeof o!="string"||o==="")throw new Error(`CellsTheme.${n}: a colour (or, for fontFamily, a font list).`)}}const er=1e3;function tr({resolved:t,label:e}){if(t.kind!=="option")return null;const{data:n}=t,o=Math.max(0,...n.series.map(r=>r.values.length)),s=Math.min(o,er),i=n.series.map(r=>r.source).filter(r=>r!==void 0);return v.jsxs("div",{style:gn,"data-cells-chart-table":"",children:[v.jsxs("table",{children:[v.jsx("caption",{children:`Data of ${e}`}),v.jsx("thead",{children:v.jsxs("tr",{children:[v.jsx("th",{scope:"col",children:n.categories.length>0?"Category":"#"}),n.series.map((r,a)=>v.jsx("th",{scope:"col",children:r.name},a))]})}),v.jsx("tbody",{children:Array.from({length:s},(r,a)=>v.jsxs("tr",{children:[v.jsx("th",{scope:"row",children:String(n.categories[a]??a+1)}),n.series.map((c,u)=>v.jsx("td",{children:c.values[a]===null||c.values[a]===void 0?"":String(c.values[a])},u))]},a))})]}),o>s&&v.jsx("p",{children:`${o-s} more rows are not listed; the data is in ${i.join(", ")||"the sheet"}.`})]})}const gn={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0};function nr(t,e){return t.title!==void 0&&t.title!==""?t.title:e.kind==="option"?e.description.split(". ")[0]:e.text}function or(t){const{spec:e,resolved:n,renderer:o,width:s,height:i,theme:r}=t,a=nr(e,n),c=n.kind==="option"?n.description:n.text,u=t.mounted!==!1&&n.kind==="option"&&o!==void 0,p=x.useId(),C=x.useRef(null);return x.useEffect(()=>{t.selected&&t.focusWhenSelected&&C.current?.focus({preventScroll:!0})},[t.selected,t.focusWhenSelected]),v.jsxs("div",{ref:C,role:"figure",tabIndex:-1,"aria-label":a,"aria-describedby":p,"aria-selected":t.selected||void 0,"data-cells-chart":e.id,"data-cells-chart-type":e.type,className:t.className,style:{boxSizing:"border-box",width:s,height:i,overflow:"hidden",background:r.chartBackground,border:`1px solid ${t.selected?r.selectionBorder:r.gridline}`,color:r.chartText,fontFamily:r.fontFamily,fontSize:r.fontSize,...t.style},children:[u?x.createElement(o.value.component,{option:n.option,modules:n.type.value.modules,width:s-2,height:i-2,theme:r}):n.kind==="placeholder"?v.jsx("div",{"data-cells-chart-placeholder":"",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",textAlign:"center",padding:8,boxSizing:"border-box",color:r.textMuted},children:n.text}):null,v.jsx("div",{id:p,style:gn,children:c}),v.jsx(tr,{resolved:n,label:a})]})}function rr(t,e,n){const o=e.anchor;let s,i;o.kind==="absolute"?(s=t.frozen.rows>0&&o.y<t.rows.offsetOf(t.frozen.rows),i=t.frozen.cols>0&&o.x<t.cols.offsetOf(t.frozen.cols)):(s=o.from.row<t.frozen.rows,i=o.from.col<t.frozen.cols);const r=s&&i?"corner":s?"top":i?"left":"main";return n.find(a=>a.name===r)??n.find(a=>a.name==="main")}function sr(t,e,n,o){const s=ln(t,e),i=(s.x-n.originX)*o,r=(s.y-n.originY)*o,a=Math.max(1,Math.round(s.width*o)),c=Math.max(1,Math.round(s.height*o)),u=i+a>=-n.width&&i<=2*n.width&&r+c>=-n.height&&r<=2*n.height;return{x:Math.round(i),y:Math.round(r),width:a,height:c,near:u}}const ir=["nw","n","ne","w","e","sw","s","se"];function lr(t,e,n,o,s,i){const r=n.rect,a=n.handle;let c=r.x,u=r.y,p=r.x+r.width,C=r.y+r.height;a==="move"?(c=Math.max(0,c+o),u=Math.max(0,u+s),p=c+r.width,C=u+r.height):(a.includes("w")&&(c=Math.min(c+o,p-16)),a.includes("e")&&(p=Math.max(p+o,c+16)),a.includes("n")&&(u=Math.min(u+s,C-16)),a.includes("s")&&(C=Math.max(C+s,u+16))),c=Math.max(0,c),u=Math.max(0,u);const w=e.anchor;if(w.kind==="absolute"){const k={};return(c!==r.x||u!==r.y)&&(k.move={x:Math.round(c),y:Math.round(u)}),(p-c!==r.width||C-u!==r.height)&&(k.resize={width:Math.round(p-c),height:Math.round(C-u)}),k}const f=Math.min(t.cols.indexAt(c),t.cols.count-1),S=Math.min(t.rows.indexAt(u),t.rows.count-1),y={};if((f!==w.from.col||S!==w.from.row||a==="move")&&(y.move={row:S,col:f}),w.kind==="cells"){const k=Math.max(f,Math.min(t.cols.indexAt(p),t.cols.count-1)),m=Math.max(S,Math.min(t.rows.indexAt(C),t.rows.count-1));a!=="move"&&(y.resize={row:m,col:k})}else a!=="move"&&(y.resize={width:Math.round(p-c),height:Math.round(C-u)});return y}function cr(t){const{model:e,viewport:n,theme:o}=t,s=x.useRef(null),i=(w,f)=>{const S=s.current;if(s.current=null,S===null)return;const y=f.charts.get(S.id);if(y===void 0)return;const k=(w.clientX-S.startX)/n.zoom,m=(w.clientY-S.startY)/n.zoom;if(Math.abs(k)<2&&Math.abs(m)<2)return;const E=lr(f,y,S,k,m,w.altKey),z=()=>{E.move!==void 0&&e.dispatch({type:"MOVE_CHART",sheet:f.id,id:S.id,to:E.move}),E.resize!==void 0&&e.dispatch({type:"RESIZE_CHART",sheet:f.id,id:S.id,to:E.resize})};E.move!==void 0&&E.resize!==void 0?e.transact(S.handle==="move"?"Move chart":"Resize chart",z):z()},r=x.useCallback(w=>e.subscribe(w),[e]);x.useSyncExternalStore(r,()=>e.revision,()=>e.revision);const a=x.useCallback(w=>e.reactor.subscribe(w),[e]);if(x.useSyncExternalStore(a,()=>e.reactor.getRevision(),()=>e.reactor.getRevision()),!e.workbook.hasSheet(t.sheet))return null;const c=e.sheet(t.sheet);if(c.charts.size===0)return null;const u=an(e.reactor),p=u===void 0?"not-loaded":"loaded",C=new Map;for(const w of c.charts.values()){const f=rr(c,w,n.panes);let S=C.get(f);S===void 0&&C.set(f,S=[]),S.push(w)}return v.jsx(v.Fragment,{children:[...C].map(([w,f])=>v.jsx("div",{"data-cells-charts-pane":w.name,style:{position:"absolute",left:w.x,top:w.y,width:w.width,height:w.height,overflow:"hidden",pointerEvents:"none",zIndex:1},children:f.map(S=>{const y=sr(c,S,w,n.zoom),k=y.near?Co(e,c.id,S.id,o,p):null;return v.jsxs("div",{"data-cells-chart-holder":"",style:{position:"absolute",left:y.x,top:y.y,width:y.width,height:y.height,pointerEvents:"auto"},onPointerDown:m=>{t.onPointerDownChart?.(S.id,m);const E=m.target.getAttribute("data-cells-chart-handle");if(m.button!==0)return;const z=ln(c,S);s.current={id:S.id,handle:E??"move",startX:m.clientX,startY:m.clientY,pointerId:m.pointerId,rect:z},m.currentTarget.setPointerCapture?.(m.pointerId)},onPointerUp:m=>i(m,c),onPointerCancel:()=>{s.current=null},onKeyDown:m=>{t.onChartKeyDown?.(m)&&m.stopPropagation()},children:[t.selectedChart===S.id&&ir.map(m=>v.jsx("div",{"data-cells-chart-handle":m,"aria-hidden":"true",style:{position:"absolute",width:8,height:8,background:o.selectionBorder,border:`1px solid ${o.background}`,boxSizing:"border-box",zIndex:2,cursor:`${m}-resize`,left:m.includes("w")?-4:m.includes("e")?y.width-4:y.width/2-4,top:m.includes("n")?-4:m.includes("s")?y.height-4:y.height/2-4}},m)),v.jsx(or,{spec:S,resolved:k??{kind:"placeholder",text:`A ${S.type} chart, off screen`},renderer:u,width:y.width,height:y.height,theme:o,mounted:y.near,selected:t.selectedChart===S.id,focusWhenSelected:!0})]},S.id)})},w.name))})}const ar=20,dr=2e5;function et(t){if(t.outputs.length>0)return t.outputs;const e=Wt.get(t);if(e!==void 0)return e;const n=t.result,o=n==null||typeof n=="object"?ur:[{output_type:"execute_result",data:{"text/plain":String(n)},metadata:{},execution_count:t.executionCount??null}];return Wt.set(t,o),o}const Wt=new WeakMap,ur=[];function xn(t){const e=[];for(const n of t)if(n.output_type==="stream")e.push(String(n.text??""));else if(n.output_type==="error")e.push(`${String(n.ename??"Error")}: ${String(n.evalue??"")}`);else{const o=(n.data??{})["text/plain"];o!==void 0&&e.push(Array.isArray(o)?o.join(""):String(o))}return e.join(`
|
|
4
4
|
`).trim()}const hr=["text/plain","image/png","image/jpeg","image/gif","text/latex"];function wn(t){return t.map(e=>{if(e.output_type==="stream"||e.output_type==="error")return e;const n=e.data??{},o=Object.fromEntries(Object.entries(n).filter(([i])=>hr.includes(i)));if(Object.keys(o).length>0)return{...e,data:o};const s=Object.keys(n).join(", ")||"nothing";return{...e,data:{"text/plain":`[${s}: shown once the cell runs here]`}}})}function Ut(t,e,n,o){const s=e<t.frozen.rows,i=n<t.frozen.cols,r=s&&i?"corner":s?"top":i?"left":"main";return o.find(a=>a.name===r)??o.find(a=>a.name==="main")}function Gt(t,e,n,o,s,i){const r=t.cols.offsetOf(n)+t.cols.effectiveSizeOf(n)+(o.dx??0),a=t.rows.offsetOf(e)+(o.dy??0),c=Math.round((r-s.originX)*i),u=Math.round((a-s.originY)*i),p=Math.max(1,Math.round(o.width*i)),C=Math.max(1,Math.round(o.height*i)),w=c+p>=-s.width&&c<=2*s.width&&u+C>=-s.height&&u<=2*s.height,f=Math.hypot(Math.max(0,-c,c+p-s.width),Math.max(0,-u,u+C-s.height));return{x:c,y:u,width:p,height:C,near:w,distance:f}}const fr='button, a, input, select, textarea, [role="button"], [role="menuitem"]';function Mt(t={}){const[e,n]=x.useState({dx:0,dy:0}),[o,s]=x.useState(!1),i=x.useRef(t);i.current=t;const r=x.useRef(null);return{offset:e,setOffset:n,dragging:o,handlers:{onPointerDown:c=>{if(c.button!==0)return;const u=c.target.closest?.(fr);u!=null&&u!==c.currentTarget||(c.preventDefault(),c.stopPropagation(),r.current={id:c.pointerId,x:c.clientX,y:c.clientY,base:e},c.currentTarget.setPointerCapture?.(c.pointerId),s(!0),i.current.onStart?.())},onPointerMove:c=>{const u=r.current;u===null||c.pointerId!==u.id||(c.stopPropagation(),n({dx:u.base.dx+c.clientX-u.x,dy:u.base.dy+c.clientY-u.y}))},onPointerUp:c=>{const u=r.current;if(u===null||c.pointerId!==u.id)return;c.stopPropagation(),r.current=null,s(!1);const p={dx:u.base.dx+c.clientX-u.x,dy:u.base.dy+c.clientY-u.y};n(p),i.current.onDrop?.(c.clientX-u.x,c.clientY-u.y,p)},onPointerCancel:()=>{const c=r.current;r.current=null,s(!1),c!==null&&n(c.base)}}}}const kt={cursor:"move",userSelect:"none",touchAction:"none"},pn=t=>JSON.stringify(t).length,Ve=18;function mr(t){const{code:e,place:n,theme:o}=t,s=Re(t.row,t.col),i=pn(e.outputs)>dr,r=x.useSyncExternalStore(x.useCallback(y=>t.model.subscribe(y),[t.model]),()=>t.model.codeState(t.sheet,t.row,t.col)!=="running",()=>!0),{offset:a,setOffset:c,dragging:u,handlers:p}=Mt({onDrop:(y,k)=>{c({dx:0,dy:0}),(Math.abs(y)>=2||Math.abs(k)>=2)&&t.onMove?.(y,k)}}),C=t.trusted?e.outputs:wn(e.outputs),w=xn(C),f=t.trusted?"":" Untrusted: from a file or another person; HTML, scripts and widgets are shown once the cell runs here.",S=Math.max(1,n.height-Ve);return v.jsxs("div",{"data-cells-code-output":s,"data-cells-dragging":u?"":void 0,role:"region","aria-label":`Output of ${s}`,"aria-description":`${w.slice(0,500)}${f}`.trim()||void 0,"data-cells-code-untrusted":t.trusted?void 0:"",tabIndex:-1,style:{position:"absolute",left:n.x+a.dx,top:n.y+a.dy,width:n.width,height:n.height,display:"flex",flexDirection:"column",overflow:"hidden",boxSizing:"border-box",border:`1px solid ${o.gridline}`,background:o.background,color:o.text,pointerEvents:"auto",font:`${o.fontSize}px ${o.fontFamily}`},onKeyDown:y=>{y.key==="Escape"&&(y.stopPropagation(),t.onEscape?.())},children:[v.jsxs("div",{"data-cells-code-output-handle":"",title:"Drag to move",...p,style:{...kt,flex:`0 0 ${Ve}px`,display:"flex",alignItems:"center",justifyContent:"space-between",gap:4,padding:"0 2px 0 6px",fontSize:11,lineHeight:`${Ve-1}px`,color:o.headerText,background:o.headerBackground,borderBottom:`1px solid ${o.gridline}`,overflow:"hidden",whiteSpace:"nowrap"},children:[v.jsxs("span",{children:["Output of ",s]}),v.jsx("button",{type:"button","data-cells-code-unpin":"","aria-label":`Unpin the output of ${s}`,title:"Unpin: show it on hover",onPointerDown:y=>y.stopPropagation(),onClick:()=>t.onUnpin?.(),style:{border:0,background:"transparent",color:"inherit",cursor:"pointer",padding:"0 4px",font:"inherit",lineHeight:"inherit"},children:"×"})]}),v.jsx("div",{style:{flex:"1 1 auto",overflow:"auto",minHeight:0},children:t.mounted&&r&&v.jsx(yn,{heavy:i,renderer:t.renderer,outputs:C,trusted:t.trusted,cell:s,width:n.width,height:S,text:w})})]})}function yn(t){const[e,n]=x.useState(!1);return t.heavy&&!e?v.jsxs("button",{type:"button",onClick:()=>n(!0),style:{margin:8},children:["Show output (",Math.round(pn(t.outputs)/1024)," kB)"]}):t.renderer===void 0?v.jsx("pre",{style:{margin:8,whiteSpace:"pre-wrap",font:"inherit"},"data-cells-code-text":"",children:t.text}):v.jsx(x.Suspense,{fallback:v.jsx("span",{style:{margin:8},children:"Loading the output…"}),children:x.createElement(t.renderer,{outputs:t.outputs,trusted:t.trusted,cell:t.cell,width:t.width,height:t.height})})}function gr(t){const{model:e,viewport:n,theme:o}=t;if(x.useSyncExternalStore(x.useCallback(E=>e.subscribe(E),[e]),()=>e.revision,()=>e.revision),x.useSyncExternalStore(x.useCallback(E=>e.reactor.subscribe(E),[e]),()=>e.reactor.getRevision(),()=>e.reactor.getRevision()),!e.workbook.hasSheet(t.sheet))return null;const s=e.sheet(t.sheet);if(s.code.size===0)return null;const i=ao(e.reactor)?.value,r=i?.output,a=i?.editor,c=[];for(const E of uo(s)){const z=Fe(E.code);if(z===void 0)continue;const T=Ut(s,E.row,E.col,n.panes);c.push({...E,pane:T,place:Gt(s,E.row,E.col,z,T,n.zoom)})}const u=new Set(c.filter(E=>E.place.near).sort((E,z)=>E.place.distance-z.place.distance).slice(0,ar)),p=new Map;for(const E of c){let z=p.get(E.pane);z===void 0&&p.set(E.pane,z=[]),z.push(E)}const C=(E,z,T)=>{const A=e.code(s.id,E,z);A!==void 0&&e.dispatch({type:"SET_CODE",sheet:s.id,row:E,col:z,code:{...A,frame:T}})},w=n.zoom,f=(E,z,T,A)=>{const D=e.code(s.id,E,z),O=D===void 0?void 0:Fe(D);O!==void 0&&C(E,z,{...O,dx:Math.round((O.dx??0)+T/w),dy:Math.round((O.dy??0)+A/w)})},S=(E,z,T)=>{const A=Ut(s,E,z,n.panes),D=Gt(s,E,z,{width:1,height:1},A,w);C(E,z,{width:Math.round(T.width/w),height:Math.round(T.height/w),dx:Math.round((T.x-A.x-D.x)/w),dy:Math.round((T.y-A.y-D.y)/w)})},y=t.editing??null,k=t.preview??null,m=k===null?void 0:e.code(s.id,k.row,k.col);return v.jsxs(v.Fragment,{children:[[...p].map(([E,z])=>v.jsx("div",{"data-cells-code-pane":E.name,style:{position:"absolute",left:E.x,top:E.y,width:E.width,height:E.height,overflow:"hidden",pointerEvents:"none",zIndex:1},children:z.map(T=>v.jsx(mr,{model:e,sheet:s.id,row:T.row,col:T.col,code:T.code,place:T.place,theme:o,renderer:r,mounted:u.has(T),trusted:e.codeTrusted(s.id,T.row,T.col),onEscape:t.onEscape,onMove:(A,D)=>f(T.row,T.col,A,D),onUnpin:()=>C(T.row,T.col,null)},`${T.row},${T.col}`))},E.name)),y!==null&&e.code(s.id,y.row,y.col)!==void 0&&v.jsx(pr,{model:e,sheet:s.id,row:y.row,col:y.col,x:y.x,y:y.y,width:Math.max(wr,Fe(e.code(s.id,y.row,y.col))?.width??0),editor:a,status:i?.status,portalName:t.portalName,returnFocusRef:t.returnFocusRef,onClose:()=>t.onCloseEditor?.()},`${s.id}:${y.row},${y.col}`),k!==null&&m!==void 0&&et(m).length>0&&v.jsx(xr,{cell:Re(k.row,k.col),outputs:et(m),trusted:e.codeTrusted(s.id,k.row,k.col),x:k.x,y:k.y,renderer:r,theme:o,portalName:t.portalName,returnFocusRef:t.returnFocusRef,onClose:()=>t.onClosePreview?.(),onPointer:t.onPreviewPointer,onPin:E=>{S(k.row,k.col,E),t.onClosePreview?.()}},`preview:${s.id}:${k.row},${k.col}`)]})}const xe={width:480,height:360};function xr(t){const e=t.trusted?t.outputs:wn(t.outputs),n=xn(e),o=x.useRef(!1),s=x.useRef(null),{offset:i,dragging:r,handlers:a}=Mt({onStart:()=>{o.current=!0,t.onPointer?.(!0)},onDrop:(c,u,p)=>{if(o.current=!1,Math.abs(c)<2&&Math.abs(u)<2)return;const C=s.current?.getBoundingClientRect();t.onPin?.({x:t.x+p.dx,y:t.y+p.dy,width:Math.min(xe.width,Math.max(80,C?.width??xe.width)),height:Math.min(xe.height+Ve,Math.max(40,C?.height??xe.height))})}});return v.jsx(yt,{children:v.jsx(bt,{role:"region","aria-label":`Output of ${t.cell}`,returnFocusRef:t.returnFocusRef,onClickOutside:t.onClose,onEscape:t.onClose,portalContainerName:t.portalName,position:"absolute",top:t.y+i.dy,left:t.x+i.dx,width:"auto",preventFocusOnOpen:!0,style:{backgroundColor:"var(--overlay-bgColor, Canvas)",color:"var(--fgColor-default, CanvasText)",boxShadow:"var(--shadow-floating-small, 0 0 0 1px rgba(128, 128, 128, 0.35), 0 8px 24px rgba(0, 0, 0, 0.2))"},"data-cells-code-preview":t.cell,"data-cells-dragging":r?"":void 0,children:v.jsxs("div",{ref:s,"data-cells-code-preview":t.cell,style:{font:`${t.theme.fontSize}px ${t.theme.fontFamily}`},onPointerEnter:()=>t.onPointer?.(!0),onPointerLeave:()=>{o.current||t.onPointer?.(!1)},onPointerDown:c=>c.stopPropagation(),onKeyDown:c=>{c.stopPropagation(),c.key==="Escape"&&(c.preventDefault(),t.onClose())},children:[v.jsxs("div",{"data-cells-code-preview-handle":"",title:"Drag to move",...a,style:{...kt,padding:"2px 8px",fontSize:11,color:"var(--fgColor-muted, GrayText)",borderBottom:"1px solid var(--borderColor-muted, rgba(128, 128, 128, 0.3))"},children:["Output of ",t.cell]}),v.jsx("div",{style:{maxWidth:xe.width,maxHeight:xe.height,overflow:"auto",padding:4},children:v.jsx(yn,{heavy:!1,renderer:t.renderer,outputs:e,trusted:t.trusted,cell:t.cell,width:xe.width-8,height:xe.height-8,text:n})})]})})})}const wr=560;function pr(t){const{model:e,sheet:n,row:o,col:s}=t,{offset:i,dragging:r,handlers:a}=Mt(),c=x.useRef(null),u=x.useRef(!1),p=()=>c.current?.save(),C=()=>{u.current||(u.current=!0,p(),t.onClose())},w=()=>{p(),ho(e).run({sheet:n,row:o,col:s}).catch(()=>{})},f=t.status,S={sheet:n,row:o,col:s,model:e,onClose:()=>{u.current=!0,t.onClose()},register:y=>{c.current=y}};return v.jsx(yt,{children:v.jsx(bt,{role:"dialog","aria-label":`Code of ${Re(o,s)}`,returnFocusRef:t.returnFocusRef,onClickOutside:C,onEscape:C,portalContainerName:t.portalName,position:"absolute",top:t.y+i.dy,left:t.x+i.dx,width:"auto",style:{backgroundColor:"var(--overlay-bgColor, Canvas)",color:"var(--fgColor-default, CanvasText)",boxShadow:"var(--shadow-floating-small, 0 0 0 1px rgba(128, 128, 128, 0.35), 0 8px 24px rgba(0, 0, 0, 0.2))"},"data-cells-code-overlay":"","data-cells-dragging":r?"":void 0,children:v.jsxs("div",{"data-cells-code-overlay":"",style:{width:t.width,maxWidth:"calc(100vw - 32px)",padding:8},onPointerDown:y=>y.stopPropagation(),onKeyDownCapture:y=>{y.key==="Enter"&&y.shiftKey?(y.preventDefault(),y.stopPropagation(),w()):y.key.toLowerCase()==="s"&&(y.ctrlKey||y.metaKey)&&(y.preventDefault(),y.stopPropagation(),p())},onKeyDown:y=>{y.stopPropagation(),y.key==="Escape"&&(y.preventDefault(),C())},children:[v.jsxs("div",{"data-cells-code-overlay-header":"",title:"Drag to move",...a,style:{...kt,display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,marginBottom:6,fontSize:12},children:[v.jsx("strong",{children:Re(o,s)}),f!==void 0&&v.jsx(x.Suspense,{fallback:null,children:v.jsx(f,{model:e})})]}),t.editor!==void 0?v.jsx(x.Suspense,{fallback:v.jsx("span",{"data-cells-code-loading":"",children:"Loading the editor…"}),children:x.createElement(t.editor,S)}):v.jsx(yr,{...S})]})})})}function yr({model:t,sheet:e,row:n,col:o,onClose:s,register:i}){const r=t,a=r.code(e,n,o),[c,u]=x.useState(a?.source??""),p=x.useRef(c);p.current=c;const C=()=>{const f=r.code(e,n,o);f!==void 0&&p.current!==f.source&&r.dispatch({type:"SET_CODE",sheet:e,row:n,col:o,code:{...f,source:p.current}})};if(i?.({save:C}),a===void 0)return null;const w=()=>{C(),s()};return v.jsxs("div",{role:"dialog","aria-label":`Code of ${Re(n,o)}`,"data-cells-code-editor":"",children:[v.jsx(Nn,{"aria-label":"Source",value:c,block:!0,resize:"vertical",rows:Math.min(20,Math.max(4,c.split(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bP as ye,bR as Ce,ff as ve,fg as Ae,r as U,j as I,T as le,B as Q,v as Se,a2 as $e,fh as Te,fi as ke}from"../datalayer-app-main.js";import{C as Re}from"./index-BjMNv4qG.js";import{u as De}from"./write-Q_DIQOWJ.js";import{g as Ee,t as Me,h as Ne,B as se,j as Ie,p as V,z as F,i as Oe,k as je,a as Pe,l as Le,m as _e,o as ze,e as Be}from"./model-BUkhfry_.js";import{C as Fe,S as We,a as Xe}from"./SheetTabs-CIoATuqe.js";import{u as Ge,s as Ve}from"./browser-CjxI_vdc.js";const He={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yyyy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yyyy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@"},de=/<(\/?)([A-Za-z_][\w:.-]*)((?:\s+[^\s=>/]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>|<\?[\s\S]*?\?>|<!--[\s\S]*?-->|<!\[CDATA\[([\s\S]*?)\]\]>|<![^>]*>|([^<]+)/g,ae=/([^\s=]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,Ue={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};function W(e){return e.includes("&")?e.replace(/&(#x[0-9a-fA-F]+|#[0-9]+|[a-z]+);/g,(o,l)=>{if(l[0]==="#"){const t=l[1]==="x"?parseInt(l.slice(2),16):parseInt(l.slice(1),10);return String.fromCodePoint(t)}return Ue[l]??o}):e}const ge=e=>{const o=e.indexOf(":");return o<0?e:e.slice(o+1)};function Ze(e){const o={};if(e==="")return o;ae.lastIndex=0;let l;for(;(l=ae.exec(e))!==null;)o[ge(l[1])]=W(l[2]??l[3]??"");return o}function O(e,o){de.lastIndex=0;let l;for(;(l=de.exec(e))!==null;)if(l[2]!==void 0){const t=ge(l[2]);if(l[1]==="/")o.close?.(t);else{const s=l[4]==="/";o.open?.(t,Ze(l[3]),s),s&&o.close?.(t)}}else l[5]!==void 0?o.text?.(l[5]):l[6]!==void 0&&o.text?.(W(l[6]))}const qe=9525,B=e=>Math.round(Number(e??0)/qe);function Ke(e){const o=e.join("");return o===""?void 0:o}const ce=new Set(["barChart","bar3DChart","lineChart","line3DChart","areaChart","area3DChart","pieChart","pie3DChart","doughnutChart","ofPieChart","scatterChart","radarChart","bubbleChart","stockChart","surfaceChart","surface3DChart"]),me=new Set(["barChart","bar3DChart","lineChart","line3DChart","areaChart","area3DChart","pieChart","pie3DChart","doughnutChart","scatterChart"]);function Ye(e){const o={autoTitleDeleted:!1,groups:[],axes:[],pivot:!1,undrawn:[]},l=[];let t,s,r,i,c,p="",h=0;const g=n=>l.includes(n);return O(e,{open(n,u){if(l.push(n),ce.has(n)&&g("plotArea")){t={element:n,series:[],axIds:[]},o.groups.push(t),me.has(n)||o.undrawn.push(n);return}if(n==="pivotSource"&&(o.pivot=!0),n==="autoTitleDeleted"&&(o.autoTitleDeleted=u.val==="1"||u.val==="true"),n==="legendPos"&&(o.legend=u.val),n==="dispBlanksAs"&&(o.dispBlanksAs=u.val),n==="title"&&!g("ser")){h+=1,i=[],c=r!==void 0&&g(r.element)?"axisTitle":"title";return}if(t!==void 0&&!g("ser")&&(n==="barDir"?t.barDir=u.val:n==="grouping"?t.grouping=u.val:n==="holeSize"?t.holeSize=!0:n==="axId"?t.axIds.push(u.val):n==="showVal"&&g("dLbls")&&(t.showVal=u.val==="1"||u.val==="true")),n==="ser"&&t!==void 0){s={idx:1e9,literal:!1,dPt:0,trendline:0,errBars:0,external:!1},t.series.push(s);return}if(s!==void 0&&(n==="idx"&&!g("dPt")&&!g("dLbl")?s.idx=Number(u.val):n==="tx"?c="name":n==="val"||n==="yVal"?c="values":n==="cat"?c="categories":n==="xVal"?c="x":n==="f"?p="":n==="numLit"||n==="strLit"?s.literal=!0:n==="dPt"&&t!==void 0&&!t.element.startsWith("pie")&&t.element!=="doughnutChart"?s.dPt+=1:n==="trendline"?s.trendline+=1:n==="errBars"?s.errBars+=1:n==="smooth"?s.smooth=u.val!=="0"&&u.val!=="false":n==="srgbClr"&&g("spPr")&&g("solidFill")&&!g("dPt")&&s.color===void 0?s.color=`#${u.val.toLowerCase()}`:n==="v"&&c==="name"&&g("tx")&&!g("strRef")&&(i=[])),(n==="catAx"||n==="valAx"||n==="dateAx"||n==="serAx")&&g("plotArea")){r={element:n,id:"",gridlines:!1,deleted:!1},o.axes.push(r);return}r!==void 0&&g(r.element)&&(n==="axId"?r.id=u.val:n==="min"?r.min=Number(u.val):n==="max"?r.max=Number(u.val):n==="logBase"?r.log=!0:n==="majorGridlines"?r.gridlines=!0:n==="numFmt"&&u.formatCode!==void 0&&u.formatCode!=="General"&&u.sourceLinked!=="1"&&u.sourceLinked!=="true"?r.format=u.formatCode:n==="delete"&&(r.deleted=u.val==="1"||u.val==="true"))},text(n){g("f")?p+=n:i!==void 0&&(g("t")||g("v")&&c==="name")&&i.push(n)},close(n){if(l.pop(),n==="f"&&s!==void 0&&c!==void 0&&c!=="title"&&c!=="axisTitle"){const u=p.trim();/^\[/.test(u)||/'\[/.test(u)?s.external=!0:s[c]=u}if(n==="v"&&s!==void 0&&c==="name"&&i!==void 0&&!g("strRef")&&(s.name=i.join(""),i=void 0),(n==="tx"||n==="val"||n==="yVal"||n==="cat"||n==="xVal")&&s!==void 0&&(c=void 0),n==="title"&&h>0){h-=1;const u=Ke(i??[]);c==="axisTitle"&&r!==void 0?r.title=u:c==="title"&&(o.title=u),i=void 0,c=void 0}n==="ser"&&(s=void 0),ce.has(n)&&(t=void 0),(n==="catAx"||n==="valAx"||n==="dateAx"||n==="serAx")&&(r=void 0)}}),o}const Je={t:"top",r:"right",b:"bottom",l:"left",tr:"right"},ee=e=>e;function Qe(e,o,l,t,s){const r=`${t}: chart '${o}'`;if(e.pivot){s.push(`${r}: a pivot chart was not imported.`);return}for(const f of e.undrawn)s.push(`${r}: a ${f.replace(/Chart$/,"")} chart was not imported.`);const i=e.groups.filter(f=>me.has(f.element));if(i.length===0){e.undrawn.length===0&&s.push(`${r}: no chart that Cells draws.`);return}const c=i.filter(f=>f.element.includes("3D")),p=f=>{switch(f.element){case"barChart":case"bar3DChart":return f.barDir==="bar"?"bar":"column";case"lineChart":case"line3DChart":return"line";case"areaChart":case"area3DChart":return"area";case"pieChart":case"pie3DChart":case"doughnutChart":return"pie";default:return"scatter"}},h=e.axes.filter(f=>f.element==="valAx"),g=h[0],u=i.every(f=>f.element==="scatterChart")?void 0:h.find(f=>f!==g&&i.some(v=>v.axIds.includes(f.id))),x=e.axes.find(f=>f.element==="catAx"||f.element==="dateAx"||f.element==="valAx"&&i.every(v=>v.element==="scatterChart")&&f===g),y=i.length>1;let a=y?"combo":p(i[0]);if(y&&i.some(f=>f.element.startsWith("pie")||f.element==="doughnutChart"||f.element==="scatterChart")){a=p(i[0]);for(const f of i.slice(1))s.push(`${r}: a second plot (${f.element.replace(/Chart$/,"")}) beside a ${a} chart was not imported.`);i.length=1}c.length>0&&s.push(`${r}: a 3-D chart was imported as a ${a} chart.`);let d;const w=i[0];w.element==="doughnutChart"?d="doughnut":w.grouping==="stacked"?d="stacked":w.grouping==="percentStacked"?d="percent":(w.element==="lineChart"||w.element==="line3DChart")&&w.series.some(f=>f.smooth)&&(d="smooth");const b=[],T=[],$=[];for(const f of i){const v=p(f),C=u!==void 0&&f.axIds.includes(u.id);for(const m of f.series){if(m.values===void 0){T.push(m.external?"a series naming another workbook":m.literal?"a series given as literals":"a series without values");continue}m.literal&&s.push(`${r}: literal categories or names of a series were left out.`),m.dPt>0&&s.push(`${r}: ${m.dPt} per-point colour(s) were left out.`),m.trendline>0&&s.push(`${r}: ${m.trendline} trendline(s) were left out.`),m.errBars>0&&s.push(`${r}: error bars were left out.`),$.push([m.idx,{values:ee(m.values),...m.name!==void 0?{name:m.name}:{},...m.categories!==void 0?{categories:ee(m.categories)}:{},...m.x!==void 0?{x:ee(m.x)}:{},...y?{type:v==="column"||v==="bar"?"column":v==="area"?"area":"line"}:{},...C?{axis:"secondary"}:{},...m.color!==void 0?{color:m.color}:{}}])}}$.sort((f,v)=>f[0]-v[0]);for(const[,f]of $)b.push(f);for(const f of T)s.push(`${r}: ${f} was not imported.`);if(b.length===0){s.push(`${r}: no series to draw.`);return}const A=f=>{if(f===void 0)return;const v=f.element==="valAx",C={...f.title!==void 0?{title:f.title}:{},...f.min!==void 0?{min:f.min}:{},...f.max!==void 0?{max:f.max}:{},...f.format!==void 0?{format:f.format}:{},...f.log?{log:!0}:{},...v&&!f.gridlines?{gridlines:!1}:{},...!v&&f.gridlines?{gridlines:!0}:{}};return Object.keys(C).length===0?void 0:C},N=A(x),P=A(a==="scatter"?h[1]??g:g),z=A(u),X=N!==void 0||P!==void 0||z!==void 0?{...N!==void 0?{x:N}:{},...P!==void 0?{y:P}:{},...z!==void 0?{y2:z}:{}}:void 0,G=b.length>1&&b.every(f=>{const v=/\$?([A-Z]+)\$?(\d+):\$?([A-Z]+)\$?(\d+)$/.exec(f.values);return v!==null&&v[2]===v[4]&&v[1]!==v[3]});return{id:o,type:a,...d!==void 0?{variant:d}:{},anchor:l,data:{series:b,by:G?"rows":"columns",headers:{row:b.some(f=>f.name!==void 0),column:b.some(f=>f.categories!==void 0)},blanks:e.dispBlanksAs==="zero"?"zero":e.dispBlanksAs==="span"?"connect":"gap"},...e.title!==void 0?{title:e.title}:{},legend:e.legend!==void 0?Je[e.legend]??"bottom":"none",...X!==void 0?{axes:X}:{},...i.some(f=>f.showVal)?{labels:!0}:{}}}function et(e){const o=[];let l,t,s,r,i,c,p,h=!1,g,n={col:0,colOff:0,row:0,rowOff:0},u,x="";const y=()=>{if(l===void 0)return;let a;l==="twoCellAnchor"&&t!==void 0&&s!==void 0?a={kind:"cells",from:t,to:s}:l==="oneCellAnchor"&&t!==void 0&&i!==void 0?a={kind:"cell",from:t,width:Math.max(1,i.width),height:Math.max(1,i.height)}:l==="absoluteAnchor"&&r!==void 0&&i!==void 0&&(a={kind:"absolute",...r,width:Math.max(1,i.width),height:Math.max(1,i.height)}),a!==void 0&&o.push({anchor:a,chart:c,chartEx:p,picture:h}),l=void 0,t=s=r=i=c=p=void 0,h=!1};return O(e,{open(a,d){a==="twoCellAnchor"||a==="oneCellAnchor"||a==="absoluteAnchor"?l=a:a==="from"||a==="to"?(g=a,n={col:0,colOff:0,row:0,rowOff:0}):a==="col"||a==="colOff"||a==="row"||a==="rowOff"?(u=a,x=""):a==="pos"?r={x:B(d.x),y:B(d.y)}:a==="ext"&&l!==void 0&&d.cx!==void 0&&i===void 0?i={width:B(d.cx),height:B(d.cy)}:a==="chart"?(c===void 0&&(c=d.id),d.id===void 0&&(c=c??"missing")):a==="pic"&&(h=!0)},text(a){u!==void 0&&(x+=a)},close(a){if(a==="col"||a==="colOff"||a==="row"||a==="rowOff")n[a]=Number(x.trim()),u=void 0;else if(a==="from"||a==="to"){const d={row:n.row,col:n.col,dx:B(String(n.colOff)),dy:B(String(n.rowOff))};g==="from"?t=d:s=d,g=void 0}else(a==="twoCellAnchor"||a==="oneCellAnchor"||a==="absoluteAnchor")&&y()}}),o}function fe(e){const o=new Map;return e===void 0||O(e,{open(l,t){l==="Relationship"&&t.Id!==void 0&&t.Target!==void 0&&o.set(t.Id,{target:t.Target,type:t.Type??""})}}),o}function te(e,o){if(o.startsWith("/"))return o.slice(1);const l=e.split("/").slice(0,-1);for(const t of o.split("/"))t===".."?l.pop():t!=="."&&l.push(t);return l.join("/")}function tt(e,o,l,t,s){const r={},i=o.split("/").slice(0,-1).join("/"),c=o.split("/").pop(),h=fe(e(`${i}/_rels/${c}.rels`)).get(l);if(h===void 0)return s.push(`${t}: the drawing part is missing.`),r;const g=te(o,h.target),n=e(g);if(n===void 0)return s.push(`${t}: the drawing part ${g} is missing.`),r;const u=g.split("/").slice(0,-1).join("/"),x=g.split("/").pop(),y=fe(e(`${u}/_rels/${x}.rels`));let a=0;for(const d of et(n)){if(d.chart===void 0)continue;const w=y.get(d.chart);if(w===void 0){s.push(`${t}: a chart's part is missing (${d.chart}).`);continue}a+=1;const b=`chart${a}`;if(/chartEx/i.test(w.type)||/chartEx/.test(w.target)){const A=e(te(g,w.target))??"",N=/<cx:layoutId val="([^"]+)"/.exec(A)?.[1]??"unknown";s.push(`${t}: chart '${b}': an Excel 2016 chart (${N}) was not imported.`);continue}const T=e(te(g,w.target));if(T===void 0){s.push(`${t}: chart '${b}': its part ${w.target} is missing.`);continue}const $=Qe(Ye(T),b,d.anchor,t,s);$!==void 0&&(r[b]=$)}return r}const we="customXml/cells-code.xml";function nt(e){let o=0;for(const l of e)o=o*26+(l.charCodeAt(0)-64);return o-1}function Z(e){const o=/^\$?([A-Z]{1,3})\$?([0-9]+)$/.exec(e);if(o===null)throw new Error(`'${e}' is not a cell reference.`);return{row:Number(o[2])-1,col:nt(o[1])}}function st(e){const[o,l=o]=e.split(":"),t=Z(o),s=Z(l);return{top:Math.min(t.row,s.row),left:Math.min(t.col,s.col),bottom:Math.max(t.row,s.row),right:Math.max(t.col,s.col)}}function ne(e){const o=e?.rgb;if(!(o===void 0||!/^[0-9A-Fa-f]{6,8}$/.test(o)))return`#${o.slice(-6).toLowerCase()}`}const rt={thin:"thin",hair:"thin",medium:"medium",thick:"thick",dashed:"dashed",mediumDashed:"dashed",dashDot:"dashed",mediumDashDot:"dashed",dashDotDot:"dotted",mediumDashDotDot:"dotted",slantDashDot:"dashed",dotted:"dotted",double:"double"};function ot(e){if(e===void 0)return[{}];const o=new Map,l=[],t=[],s=[],r=[],i=new Map;let c="",p,h,g,n,u,x;O(e,{open(a,d){switch(a){case"numFmts":case"fonts":case"fills":case"borders":case"cellXfs":case"cellStyleXfs":case"dxfs":c=a;return;case"numFmt":c==="numFmts"&&o.set(Number(d.numFmtId),d.formatCode??"General");return}if(c==="fonts")a==="font"?p={}:p!==void 0&&(a==="b"?p.bold=d.val!=="0"&&d.val!=="false":a==="i"?p.italic=d.val!=="0"&&d.val!=="false":a==="u"?p.underline=d.val!=="none":a==="strike"?p.strike=d.val!=="0"&&d.val!=="false":a==="sz"?p.size=Number(d.val):a==="color"?p.color=ne(d):a==="name"&&(p.font=d.val));else if(c==="fills")a==="fill"?h={}:a==="patternFill"&&h?h.pattern=d.patternType:a==="fgColor"&&h&&(h.color=ne(d));else if(c==="borders")a==="border"?g={}:g!==void 0&&["left","right","top","bottom"].includes(a)?n={name:a,style:d.style===void 0?void 0:rt[d.style]}:a==="color"&&n!==void 0&&n.style!==void 0&&(g[n.name]={style:n.style,color:ne(d)??"#000000"});else if(c==="cellXfs"){if(a==="xf"){const w=Number(d.numFmtId??0),b=l[Number(d.fontId??0)]??{};x=b;const T=t[Number(d.fillId??0)],$=s[Number(d.borderId??0)],A=w===0?void 0:(o.get(w)??He[w])?.replace(/^\[\$-(409|en-US)\]/,"");u={...b.bold?{bold:!0}:{},...b.italic?{italic:!0}:{},...b.underline?{underline:!0}:{},...b.strike?{strike:!0}:{},...b.color!==void 0&&b.color!=="#000000"?{color:b.color}:{},...T!==void 0?{fill:T}:{},...$!==void 0&&Object.keys($).length>0?{borders:$}:{},...A!==void 0&&A!=="General"?{format:A}:{}}}else if(a==="alignment"&&u!==void 0){const w=d.horizontal,b=d.vertical;u={...u,...w==="left"||w==="center"||w==="right"?{align:w}:{},...b==="top"?{valign:"top"}:b==="center"?{valign:"middle"}:{},...d.wrapText==="1"||d.wrapText==="true"?{wrap:!0}:{}}}}},close(a){a===c?c="":a==="font"&&p!==void 0?(l.push(p),p=void 0):a==="fill"&&h!==void 0?(t.push(h.pattern==="solid"?h.color:void 0),h=void 0):a==="border"&&g!==void 0?(s.push(g),g=void 0):["left","right","top","bottom"].includes(a)?n=void 0:a==="xf"&&u!==void 0&&c==="cellXfs"&&(r.push(u),x!==void 0&&i.set(u,x),u=void 0)}});const y=l[0]??{};return r.map((a,d)=>{if(d===0)return{};const w=i.get(a);return w===void 0?a:{...a,...w.size!==void 0&&w.size!==y.size?{size:w.size}:{},...w.font!==void 0&&w.font!==y.font?{font:w.font}:{}}})}function it(e){const o=[];if(e===void 0)return o;let l,t=!1,s=!1;return O(e,{open(r){r==="si"?l="":r==="t"?t=!s:r==="rPh"&&(s=!0)},close(r){r==="si"?(o.push(l??""),l=void 0):r==="t"?t=!1:r==="rPh"&&(s=!1)},text(r){t&&l!==void 0&&(l+=r)}}),o}const lt=e=>Math.round(e*7+5),ue=e=>Math.round(e*4/3);function dt(e,o,l){const t={},s={},r={},i=[],c=[],p=[];let h,g;const n=new Map;let u=0,x=0,y,a="n",d=0,w,b,T,$="",A,N=0,P=0;const z=(C,m,D,R,S,E,L)=>{const k={};if(E?.t==="shared"&&E.si!==void 0)if(S!==void 0&&S!=="")n.set(E.si,{formula:S,...C});else{const j=n.get(E.si);j!==void 0&&(S=Me(j.formula,C.row-j.row,C.col-j.col))}else E?.t==="array"&&l.set("array formula",(l.get("array formula")??0)+1);if(S!==void 0&&S!==""&&(k.f=S,x+=1),m==="s"&&R!==void 0?k.v=o[Number(R)]??"":m==="b"&&R!==void 0?k.v=R==="1":m==="e"&&R!==void 0?k.v=Ne(R)?{error:R}:{error:"#VALUE!"}:(m==="str"||m==="inlineStr")&&(R!==void 0||L!=="")?k.v=m==="inlineStr"?L:R??"":R!==void 0&&R!==""&&(k.v=Number(R)),D!==0&&(k.s=D),k.v!==void 0||k.f!==void 0||k.s!==void 0){const j=String(C.row);(t[j]??={cells:{}}).cells[String(C.col)]=k,u+=1}},X=C=>{const m=/<(?:\w+:)?row\s([^>]*?)\/?>/g;let D;for(;(D=m.exec(C))!==null;){const S=D[1],E=/\br="(\d+)"/.exec(S);if(E===null)continue;const L=Number(E[1])-1,k=/\bht="([^"]+)"/.exec(S);k!==null&&/\bcustomHeight="(1|true)"/.test(S)&&(s[String(L)]=ue(Number(k[1]))),/\bhidden="(1|true)"/.test(S)&&i.push(L)}const R=/<(?:\w+:)?c\s([^>]*?)(?:\/>|>([\s\S]*?)<\/(?:\w+:)?c>)/g;for(;(D=R.exec(C))!==null;){const S=D[1],E=D[2]??"",L=Z(/\br="([^"]+)"/.exec(S)[1]),k=/\bt="([^"]+)"/.exec(S)?.[1]??"n",j=Number(/\bs="(\d+)"/.exec(S)?.[1]??0);let q,re,K,oe="";if(E!==""){const ie=/<(?:\w+:)?v>([\s\S]*?)<\/(?:\w+:)?v>/.exec(E);ie!==null?q=W(ie[1]):/<(?:\w+:)?v\/>/.test(E)&&(q="");const Y=/<(?:\w+:)?f\b([^>]*?)(?:\/>|>([\s\S]*?)<\/(?:\w+:)?f>)/.exec(E);if(Y!==null){K={};for(const[,J,xe]of Y[1].matchAll(/(\w+)="([^"]*)"/g))K[J]=xe;re=W(Y[2]??"")}if(k==="inlineStr")for(const[,J]of E.matchAll(/<(?:\w+:)?t(?:\s[^>]*)?>([\s\S]*?)<\/(?:\w+:)?t>/g))oe+=W(J)}z(L,k,j,q,re,K,oe)}};let G=e;const f=/<(?:\w+:)?sheetData\b[^>]*>/.exec(e),v=f===null?-1:e.search(/<\/(?:\w+:)?sheetData>/);return f!==null&&v>f.index&&!/<(?:\w+:)?c(?=[\s>/])(?![^>]*\sr=)/.test(e)&&(X(e.slice(f.index+f[0].length,v)),G=e.slice(0,f.index)+e.slice(v)),O(G,{open(C,m){switch(C){case"row":{const D=m.r===void 0?N:Number(m.r)-1;N=D+1,P=0,m.ht!==void 0&&(m.customHeight==="1"||m.customHeight==="true")&&(s[String(D)]=ue(Number(m.ht))),(m.hidden==="1"||m.hidden==="true")&&i.push(D);return}case"c":{y=m.r===void 0?{row:N-1,col:P}:Z(m.r),P=y.col+1,a=m.t??"n",d=Number(m.s??0),w=void 0,b=void 0,T=void 0,$="";return}case"v":A="v",w="";return;case"f":A="f",b="",T=m;return;case"is":A="is";return;case"col":{const D=Number(m.min)-1,R=Math.min(Number(m.max)-1,16383);for(let S=D;S<=R;S+=1)m.width!==void 0&&(m.customWidth==="1"||m.customWidth==="true")&&(r[String(S)]=lt(Number(m.width))),(m.hidden==="1"||m.hidden==="true")&&c.push(S);return}case"mergeCell":m.ref!==void 0&&p.push(st(m.ref));return;case"pane":(m.state==="frozen"||m.state==="frozenSplit")&&(h={rows:Number(m.ySplit??0),cols:Number(m.xSplit??0)});return;case"drawing":g=m.id;return;case"conditionalFormatting":case"dataValidation":case"hyperlink":case"legacyDrawing":case"tablePart":case"sheetProtection":case"autoFilter":l.set(C,(l.get(C)??0)+1);return}},text(C){A==="v"?w+=C:A==="f"?b+=C:A==="is"&&($+=C)},close(C){if(C==="v"||C==="f"||C==="is"){A=void 0;return}C!=="c"||y===void 0||(z(y,a,d,w,b,T,$),y=void 0)}}),{sheet:{rows:t,...Object.keys(s).length+Object.keys(r).length>0?{sizes:{rows:s,cols:r}}:{},...i.length+c.length>0?{hidden:{rows:i,cols:c}}:{},...p.length>0?{merges:p}:{},...h!==void 0?{frozen:h}:{}},cells:u,formulas:x,...g!==void 0?{drawing:g}:{}}}function at(e){return e.startsWith("/")?e.slice(1):`xl/${e}`.replace(/\/[^/]+\/\.\.\//g,"/")}function ct(e){let o;try{o=Ge(e)}catch(d){throw new Error(`The file is not an XLSX package: ${d.message}`)}const l=d=>o[d]===void 0?void 0:Ve(o[d]),t=l("xl/workbook.xml");if(t===void 0)throw new Error("The package has no xl/workbook.xml.");const s=new Map;O(l("xl/_rels/workbook.xml.rels")??"",{open(d,w){d==="Relationship"&&w.Id!==void 0&&w.Target!==void 0&&s.set(w.Id,at(w.Target))}});const r=[],i=new Map;O(t,{open(d,w){if(d==="sheet"){const b=s.get(w.id);if(b===void 0)throw new Error(`The sheet '${w.name}' has no part.`);r.push({name:w.name,path:b,hidden:w.state==="hidden"||w.state==="veryHidden"})}else d==="definedName"&&i.set("defined name",(i.get("defined name")??0)+1)}});const c=it(l("xl/sharedStrings.xml")),p=ot(l("xl/styles.xml"));let h=0,g=0,n=0;const u=[],x=new Set,y=r.map((d,w)=>{const b=l(d.path);if(b===void 0)throw new Error(`The sheet '${d.name}' has no ${d.path}.`);d.hidden&&i.set("hidden sheet (shown)",(i.get("hidden sheet (shown)")??0)+1);const T=dt(b,c,i);h+=T.cells,g+=T.formulas;let $=`s${w+1}`;for(;x.has($);)$+="_";x.add($);const A=T.drawing===void 0?{}:tt(l,d.path,T.drawing,d.name,u);return n+=Object.keys(A).length,{id:$,name:d.name,...T.sheet,...Object.keys(A).length>0?{charts:A}:{}}}),a=ft(l(we),y);for(const d of Object.keys(o))/^xl\/chartsheets\/sheet\d+\.xml$/.test(d)?u.push(`${d}: a chart sheet was not imported.`):d.startsWith("xl/media/")?i.set("image",(i.get("image")??0)+1):/^xl\/comments\d*\.xml$/.test(d)||d.startsWith("xl/threadedComments/")?i.set("comments",(i.get("comments")??0)+1):d.startsWith("xl/pivotTables/")&&i.set("pivot table",(i.get("pivot table")??0)+1);for(const d of y)for(const w of Object.values(d.rows))for(const b of Object.values(w.cells))b.s!==void 0&&b.s>=p.length&&delete b.s;return{workbook:{version:1,sheets:y,styles:p.length>0?p:[{}]},report:{sheets:y.length,cells:h,formulas:g,skipped:[...i].map(([d,w])=>({feature:d,count:w})),chartsImported:n,charts:u,code:a}}}function ft(e,o){if(e===void 0)return[];const l=new Map(o.map(p=>[p.name,p])),t=new Map;let s=0,r,i="",c=!1;O(e,{open(p,h){if(p==="cell"){const g=l.get(h.sheet??"");r=g===void 0?void 0:{sheet:g,ref:h.ref??"",attrs:h},i=""}else p==="source"&&(c=!0)},text(p){c&&(i+=p)},close(p){if(p==="source"&&(c=!1),p!=="cell"||r===void 0)return;const{sheet:h,ref:g,attrs:n}=r,u=/^([A-Z]{1,3})([1-9][0-9]*)$/.exec(g);if(u===null)return;let x=-1;for(const w of u[1])x=(x+1)*26+w.charCodeAt(0)-65;const y=h.rows[String(Number(u[2])-1)]?.cells[String(x)]?.v,a={source:i,language:"python",outputs:[],result:y===void 0?null:y,run:n.run==="auto"?"auto":"manual",...n.executionCount!==void 0?{executionCount:Number(n.executionCount)}:{},...n.lastRun!==void 0?{lastRun:n.lastRun}:{},...n.frame==="none"?{frame:null}:n.frameWidth!==void 0&&n.frameHeight!==void 0?{frame:{width:Number(n.frameWidth),height:Number(n.frameHeight),...n.frameDx!==void 0?{dx:Number(n.frameDx)}:{},...n.frameDy!==void 0?{dy:Number(n.frameDy)}:{}}}:{}};if(Ee(a)!==void 0)return;let d=t.get(h);d===void 0&&t.set(h,d={}),d[g]=a,s+=1,r=void 0}});for(const[p,h]of t)p.code=h;return s===0?[]:[`${s} code cell${s===1?"":"s"} read from ${we}: the sources and the results, as cached values; the outputs are not in XLSX and were dropped.`]}const M={readRange:"cells.agent.readRange",writeRange:"cells.agent.writeRange",insertChart:"cells.agent.insertChart",listCharts:"cells.agent.listCharts",selectRange:"cells.agent.selectRange"},ut=2e3,H={type:"string",description:"A range in A1 notation on the sheet shown, such as `A1:D13`, or one cell such as `B3`."},he=Ae({id:"cells",version:"0.0.1",name:"Cells",description:"Read and write the spreadsheet on the person's screen, and chart it: the grid drawn by Datalayer Cells.",plugin:"@datalayer/cells",commands:[{name:"cells_read_range",command:M.readRange,description:"The values of a range of the spreadsheet shown, row by row. Without a range, the whole used range from A1, which is how to find where the data is: the answer names the sheet and the range read. Numbers are numbers, empty cells null.",parameters:{type:"object",properties:{range:H}}},{name:"cells_write_range",command:M.writeRange,description:"Write a block of values, row by row, from the top-left cell of a range. A text starting with = is a formula (=SUM(B2:B13)); numbers, booleans and null (an empty cell) are written as they are. One undo step.",parameters:{type:"object",properties:{range:{...H,description:"Where the block starts: its top-left cell, such as `E1`, or a range whose top-left cell it is."},values:{type:"array",description:"The rows to write, each an array of cells: number, string, boolean or null.",items:{type:"array",items:{type:["number","string","boolean","null"]}}}},required:["range","values"]}},{name:"cells_insert_chart",command:M.insertChart,description:"Insert a chart of a range into the spreadsheet shown, as the Insert chart button does: the series are read from the range (a first row of names and a first column of categories become the legend and the axis). It is drawn over the grid, beside the range unless `at` says where; the answer gives its id.",parameters:{type:"object",properties:{range:{...H,description:"The data to chart, headers included, such as `A1:D13`."},type:{type:"string",enum:[...se],description:"The chart type; column by default."},title:{type:"string",description:"The title drawn above the chart."},at:{type:"string",description:"The cell where the chart's top-left corner goes, such as `A15` (below the data) or `F1`."}},required:["range"]}},{name:"cells_list_charts",command:M.listCharts,description:"The charts of the sheet shown: id, type, title and the ranges each reads."},{name:"cells_select_range",command:M.selectRange,description:"Select a range of the spreadsheet shown, to show the person the cells meant.",parameters:{type:"object",properties:{range:H},required:["range"]}}]}),_=(e,o)=>{if(typeof e!="string"||e.trim()==="")throw new Error(`${o} is a non-empty string.`);return e},pe=e=>{if(!e.ok)throw new Error(e.refusals.map(o=>o.message).join(" "))};function ht(e,o){const l=e.sheet(o).cells;let t=-1,s=-1;for(const r of l.columnIndexes()){const i=l.lastRowIn(r);i<0||(t=Math.max(t,r),s=Math.max(s,i))}return t<0?null:{top:0,left:0,bottom:s,right:t}}const pt=e=>e!==null&&typeof e=="object"?`#${e.error.replace(/^#/,"")}`:e,gt=e=>{if(e==null)return null;if(typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="string")return e.startsWith("=")?_e(e):e;throw new Error(`A cell is a number, a string, a boolean or null, not ${JSON.stringify(e)}.`)};function be(e={}){const o=t=>e.model?.()??Ie(t,void 0).model,l=(t,s,r)=>({id:t,name:s,category:"Cells",execute:i=>r(o(t),i??{})});return ye({name:e.name??mt,displayName:"Cells agent tools",description:"Read, write, chart and select the grid on screen, as tools an agent calls.",octicon:"table",commands:[l(M.readRange,"Read a range",(t,s)=>{const r=t.selection.sheet,i=s.range===void 0?ht(t,r):V(_(s.range,"The range"));if(i===null)return{sheet:t.sheet(r).name,range:null,values:[]};const c=i.right-i.left+1,p=Math.max(1,Math.min(i.bottom-i.top+1,Math.floor(ut/c))),h={...i,bottom:i.top+p-1};return{sheet:t.sheet(r).name,range:F(h),values:t.toRows(h,r).map(g=>g.map(pt)),...h.bottom<i.bottom?{truncated:!0,fullRange:F(i)}:{}}}),l(M.writeRange,"Write values into a range",(t,s)=>{const r=V(_(s.range,"The range"));if(!Array.isArray(s.values)||s.values.length===0||!s.values.every(Array.isArray))throw new Error("The values are a non-empty array of rows, each an array of cells.");const i=t.selection.sheet,c=s.values.map(h=>h.map(gt));pe(t.dispatch({type:"SET_CELLS",sheet:i,at:{row:r.top,col:r.left},cells:c}));const p=Math.max(...c.map(h=>h.length));return{ok:!0,sheet:t.sheet(i).name,range:F({top:r.top,left:r.left,bottom:r.top+c.length-1,right:r.left+Math.max(0,p-1)})}}),l(M.insertChart,"Insert a chart of a range",(t,s)=>{const r=V(_(s.range,"The range")),i=s.type===void 0?"column":_(s.type,"The type");if(!se.includes(i))throw new Error(`'${i}' is not a chart type; there are ${se.join(", ")}.`);const c=t.selection.sheet,p=Oe((x,y)=>t.value(c,x,y),t.sheet(c).name,r,(x,y)=>/[dmy]/i.test(t.style(c,x,y).format??""));if(!p.ok)throw new Error(p.message);let h=je(t,r);if(s.at!==void 0&&h.kind==="cells"){const x=Pe(_(s.at,"Where the chart goes")),y=h.to.row-h.from.row,a=h.to.col-h.from.col;h={kind:"cells",from:{row:x.row,col:x.col,dx:0,dy:0},to:{row:x.row+y,col:x.col+a,dx:0,dy:0}}}const g=new Set(t.sheet(c).charts.keys()),n=s.title===void 0?void 0:_(s.title,"The title");pe(t.dispatch({type:"INSERT_CHART",sheet:c,chart:{type:i,anchor:h,data:p.data,legend:"bottom",...n?{title:n}:{}}}));const u=[...t.sheet(c).charts.keys()].find(x=>!g.has(x));return u!==void 0&&t.selectChart(u),{ok:!0,chartId:u,sheet:t.sheet(c).name,range:F(r),type:i}}),l(M.listCharts,"List the charts",t=>{const s=t.selection.sheet;return{sheet:t.sheet(s).name,charts:[...t.sheet(s).charts.values()].map(r=>({id:r.id,type:r.type,...r.title?{title:r.title}:{},ranges:Le(r)}))}}),l(M.selectRange,"Select a range",(t,s)=>{const r=V(_(s.range,"The range")),i=t.selection.sheet,c={row:r.top,col:r.left};return t.select({sheet:i,zones:[r],anchor:c,active:c}),{ok:!0,sheet:t.sheet(i).name,range:F(r)}})],contributes:[Ce(ve,he,{id:he.id})]})}const mt="@datalayer/cells-agent-tools";be();function wt(){}const bt=40;function xt(e,o=160,l=560){const[t,s]=U.useState(o);return U.useEffect(()=>{if(!e)return;const r=()=>{const i=e.sheet(e.selection.sheet);let c=i.rows.offsetOf(De(e,i.id).bottom+1);for(const p of i.charts.values()){const h=ze(i,p);c=Math.max(c,h.y+h.height)}s(Math.min(l,Math.max(o,Math.ceil(c)+bt)))};return r(),e.subscribe(r)},[e,o,l]),t}be({model:wt,name:"@datalayer/loop-plugin-agent-outputs-sheet-tools"});async function yt(e){const o=await ke(e),{workbook:l}=ct(o);return{model:Be({data:l,readOnly:!0,codeCells:!1,plugins:[Re]}),bytes:o}}function kt({data:e,name:o,maxHeight:l}){const[t,s]=U.useState({model:null,bytes:null,error:""});U.useEffect(()=>{let c=!1;return yt(e).then(({model:p,bytes:h})=>!c&&s({model:p,bytes:h,error:""}),p=>!c&&s({model:null,bytes:null,error:p instanceof Error?p.message:String(p)})),()=>{c=!0}},[e]);const r=xt(t.model,160,l);if(t.error)return I.jsxs(le,{sx:{color:"danger.fg",fontSize:0},children:["Could not read the spreadsheet: ",t.error]});if(!t.model)return I.jsx(le,{as:"p",sx:{color:"fg.muted",fontSize:0,m:0},children:"Reading the spreadsheet…"});const i=t.model.sheets.length>1;return I.jsxs(Fe,{model:t.model,children:[I.jsxs(Q,{"data-spreadsheet-preview-sheets":t.model.sheets.length,border:"1px solid",borderColor:"border.muted",borderRadius:2,overflow:"hidden",children:[I.jsx(Q,{height:r,children:I.jsx(We,{model:t.model,"aria-label":`${o}, read-only`})}),i?I.jsx(Xe,{"aria-label":`The sheets of ${o}`}):null]}),I.jsx(Q,{mt:1,children:I.jsxs(Se,{size:"small",variant:"invisible",leadingVisual:$e,onClick:()=>t.bytes&&Te(t.bytes,o),children:["Download ",o]})})]})}export{kt as SpreadsheetPreviewView,kt as default,yt as readOnlyWorkbook};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o,dE as $,dF as p,bx as E,r as u,dG as F,dH as H,dI as L,dJ as M,I as U,v as N,B as T}from"../datalayer-app-main.js";import{C as z}from"./index-
|
|
1
|
+
import{j as o,dE as $,dF as p,bx as E,r as u,dG as F,dH as H,dI as L,dJ as M,I as U,v as N,B as T}from"../datalayer-app-main.js";import{C as z}from"./index-BjMNv4qG.js";import{S as K,I as W,B as O}from"./StrikethroughIcon-CbiEuPT-.js";import{U as _,N as G,R as J,a as V}from"./UnlockIcon-CUoRerV_.js";import{S as Y}from"./SortAscIcon-CmH04s3F.js";import{S as q}from"./SortDescIcon-Qif6E10I.js";import{B as Q,c as X,f as Z,e as ee}from"./model-BUkhfry_.js";import{e as ne,u as w,f as oe,g as se,b as ae,h as te,C as re,S as le,a as ie}from"./SheetTabs-CIoATuqe.js";import{F as ce}from"./FormulaBar-BBm1JXuS.js";function de(s){const e=ne(s.reactor).all();return e.length>0?e.map(t=>({id:t.value.id,label:t.value.label})):Q.map(t=>({id:t,label:t[0].toUpperCase()+t.slice(1)}))}function ue(s){const e=w(),t=de(e);return o.jsx($,{children:o.jsxs(p,{children:[o.jsx(p.Button,{size:"small",variant:"invisible","data-cells-chart-picker":"",children:"Insert chart"}),o.jsx(p.Overlay,{width:"small",children:o.jsx(E,{children:t.map(i=>o.jsx(E.Item,{"data-chart-type":i.id,onSelect:()=>{e.reactor.executeCommand("cells.chart.insert",{model:e,chartType:i.id}).catch(c=>s.onError?.(c.message))},children:i.label},i.id))})})]})})}const me={bold:O,italic:W,strikethrough:K,undo:V,redo:J,"sort-asc":Y,"sort-desc":q,number:G,calendar:M,table:L,lock:H,unlock:_},he={"cells.bold":"bold","cells.italic":"italic","cells.underline":"underline","cells.strikethrough":"strike"};function pe(s){const e=w(),t=oe(Z),i=se(),c=ae(),B=`${X(c.active.col)}${c.active.row+1}`,{style:R}=te(`'${e.sheet(c.sheet).name.replace(/'/g,"''")}'!${B}`),[m,b]=u.useState(0),x=u.useRef([]),g=new Map(i.map(n=>[n.id,n])),I=t.filter(n=>g.has(n.value.command)),d=[];for(const n of I){const a=d[d.length-1];a!==void 0&&a[0].value.group===n.value.group?a.push(n):d.push([n])}const A=u.useCallback(n=>{e.reactor.executeCommand(n,{model:e}).catch(a=>s.onError?.(a.message))},[e,s]),D=n=>{const a=I.length;if(a===0)return;const l=n.key==="ArrowRight"?(m+1)%a:n.key==="ArrowLeft"?(m+a-1)%a:n.key==="Home"?0:n.key==="End"?a-1:void 0;l!==void 0&&(n.preventDefault(),b(l),x.current[l]?.focus())};let v=-1;return o.jsxs("div",{role:"toolbar","aria-label":s["aria-label"]??"Spreadsheet toolbar",onKeyDown:D,"data-cells-toolbar":"",style:{display:"flex",alignItems:"center",gap:4,flexWrap:"wrap",padding:4},children:[d.map((n,a)=>o.jsx("div",{role:"group","aria-label":n[0].value.group,style:{display:"flex",gap:2,paddingInlineEnd:4,borderInlineEnd:a<d.length-1?"1px solid var(--borderColor-muted, #d0d7de)":void 0},children:n.map(l=>{v+=1;const h=v,r=g.get(l.value.command),y=typeof r.keybinding=="string"?r.keybinding:void 0,k=y?`${r.name} (${F(y)})`:r.name,C=typeof r.octicon=="string"?me[r.octicon]:void 0,j=he[r.id],S={ref:P=>{x.current[h]=P},tabIndex:h===m?0:-1,onFocus:()=>b(h),onClick:()=>A(r.id),"aria-pressed":j===void 0?void 0:R[j]===!0,"data-command":r.id};return C!==void 0?o.jsx(U,{...S,icon:C,"aria-label":k,size:"small",variant:"invisible"},l.id):o.jsx(N,{...S,"aria-label":k,size:"small",variant:"invisible",children:r.name},l.id)})},a)),s.charts!==!1&&o.jsx("div",{role:"group","aria-label":"charts","data-cells-toolbar-group":"charts",children:o.jsx(ue,{onError:s.onError})})]})}const f=new Map;function fe(s){let e=f.get(s);return e||(e=ee({plugins:[z]}),f.set(s,e)),e}function Se(){f.clear()}function Ee({workspace:s}){const e=s.surfaceId,t=u.useMemo(()=>fe(e),[e]);return o.jsx(re,{model:t,children:o.jsxs(T,{"data-spreadsheet-editor":e,height:"100%",minHeight:0,display:"flex",flexDirection:"column",children:[o.jsx(pe,{}),o.jsx(ce,{}),o.jsx(T,{flex:1,minHeight:0,position:"relative",children:o.jsx(le,{model:t,"aria-label":"Spreadsheet"})}),o.jsx(ie,{})]})})}export{Ee as default,Se as resetSpreadsheetWorkbooks,fe as spreadsheetWorkbook};
|