@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ad as K,
|
|
1
|
+
import{ad as K,ff as ho,r as o,j as t,hu as xo,hv as bo,cn as ps,B as h,H as It,T as $,v as Y,dD as un,fE as bn,hw as ce,a6 as Et,y as vo,hx as So,aD as yo,fj as jo,hy as Co,be as ko,hz as wo,hA as To,hB as Io,hC as Eo,hD as Ro,hE as Ao,hF as Ts,f6 as Is,f4 as $o,dz as Mo,f7 as vn,hG as Oo,hH as Po,hI as Uo,hJ as ms,hK as Lo,hL as Es,fY as _o,fC as Fo,dF as Ge,fL as zo,bx as te,hM as Bo,hN as Rs,hO as As,hP as No,L as Vo,hQ as Do,I as $s,ht as Ho,D as Ms,hR as gs,hS as Wo,hT as Go,E as Ko,cM as Yo,hU as qo,hV as Jo,hW as Qo,hX as Zo,hY as Xo,hZ as ea,a8 as fn,h_ as ta,h$ as na,i0 as sa,i1 as oa,i2 as aa,i3 as ia,i4 as ra,i5 as la,i6 as ca,i7 as da,i8 as ua,i9 as fa,ia as pa,ib as ma,ic as ga,id as ha,ie as xa,ig as ba,ih as va,ii as Sa,ij as ya,ik as dt,il as ja,im as Ca,io as ka,ip as wa,iq as hs,ir as Ta,is as We,it as Ia,iu as Ea,cN as ct,iv as Ra,iw as Aa,ix as xs,iy as $a,iz as Ma,iA as Oa,iB as Pa,iC as Ua,iD as La,iE as _a,iF as Fa,iG as za,fO as Ba,iH as Rt,iI as Ce,iJ as Na,iK as Va,iL as Da,iM as Ha,iN as bs,iO as Wa,iP as Ga,iQ as Ka,iR as Ya,iS as qa,iT as Ja,iU as Qa,iV as Za,iW as Xa,iX as ei,iY as ti,iZ as ni,i_ as At,i$ as si,j0 as oi,j1 as ai,j2 as ii,j3 as ri,j4 as li,j5 as ci,j6 as vs,j7 as di,j8 as ui,j9 as fi,ja as pi,jb as mi,jc as Sn,jd as gi,je as hi,fu as pn,jf as xi}from"../datalayer-app-main.js";import{S as bi,E as vi,a as Si,M as yi}from"./SignInIcon-DbPUIFJ3.js";import{F as ji,a as Ci,b as ki}from"./LinkedInGreyIcon-eBP5iBjI.js";function Os(){const e=K(ho);return o.useMemo(()=>e.map(s=>s.value),[e])}const mn={github:{name:"github",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/github/callback"},google:{name:"google",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/google/callback"},linkedin:{name:"linkedin",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/linkedin/callback"}},Ss=()=>{if(typeof document>"u")return"";const e=document.getElementById("datalayer-config-data");if(!e?.textContent)return"";try{const s=JSON.parse(e.textContent);return String(s?.iamUrl||"").replace(/\/$/,"")}catch{return""}},wi=(e,s="Unable to start social sign-in.")=>{if(e instanceof Error&&e.message)return e.message;if(typeof e=="string"&&e.trim())return e;if(e&&typeof e=="object"&&"message"in e){const a=e.message;if(typeof a=="string"&&a.trim())return a}return s},Ti=Co`
|
|
2
2
|
.signin-input-theme-scope input:-webkit-autofill,
|
|
3
3
|
.signin-input-theme-scope input:-webkit-autofill:hover,
|
|
4
4
|
.signin-input-theme-scope input:-webkit-autofill:focus,
|
|
@@ -25,8 +25,8 @@ import{ad as K,fn as ho,r as o,j as t,ht as xo,hu as bo,cn as ps,B as h,H as It,
|
|
|
25
25
|
background-color: var(--bgColor-default) !important;
|
|
26
26
|
opacity: 1 !important;
|
|
27
27
|
}
|
|
28
|
-
`,Ii=({onSignIn:e,onApiKeySignIn:s,loginUrl:a,name:i,title:c="Datalayer OTEL",description:u="Sign in to access the observability dashboard.",icon:x,leadingIcon:l=t.jsx(jo,{size:24}),github:f=!1,google:v=!1,linkedin:m=!1,apiKey:p=!1,signUp:V=!0,socialSignInNavigationTarget:M,asDoc:y=!1,fillHeight:k=!0,hideHero:O=!1,calloutTitle:I,calloutDescription:oe,passwordToggleLabel:ke="Sign in with a password",signUpTitle:z="Don't have an account?",signUpDescription:$t="Create a free Datalayer account with your email address.",signUpLabel:Mt="Sign up with email",signUpHref:Ot="https://datalayer.ai/signup",onSignUp:ue,forgotPasswordHref:we="/password",forgotPasswordLabel:fe="Forgot password?",showForgotPassword:Pt=!0,socialButtonMarginTop:Ue=3,actionButtonMaxWidth:W=320})=>{const Se=y&&!O,Ke=i??(y&&c==="Datalayer OTEL"?"Datalayer Sign In":c),Ut=x??(y?t.jsx(bi,{size:24}):l),j=o.useMemo(()=>{if(a)return a;const g=Ss();return g?`${g}/api/iam/v1/login`:"/api/iam/v1/login"},[a]),[ne,ut]=o.useState(""),[ye,Lt]=o.useState(""),[L,_t]=o.useState(!1),[pe,Ft]=o.useState(!1),[P,Le]=o.useState(!1),[Te,ft]=o.useState(!1),[me,qe]=o.useState(null),[Y,pt]=o.useState(null),[Ie,zt]=o.useState(""),[Re,Bt]=o.useState(null),[mt,ae]=o.useState(null),{enqueueToast:ge}=xo(),[_e,Ye]=o.useState(!1),[he,Ee]=o.useState(""),Je=o.useRef(null),Qe=o.useCallback(g=>bo()?ps.URLExt.join(ps.PageConfig.getBaseUrl(),g.oauth2CallbackServerRoute):`${window.location.protocol}//${window.location.hostname}${window.location.port?`:${window.location.port}`:""}${g.oauth2CallbackUIRoute}`,[]),ie=o.useMemo(()=>{if(typeof window>"u")return"/";const g=`${window.location.pathname}${window.location.search}${window.location.hash}`;return g.startsWith("/")?g:"/"},[]),Fe=o.useCallback(async g=>{if(!Te){ae(null),qe(g.name),ft(!0);try{const U=Ss(),J=new URLSearchParams({provider:g.name,callback_uri:Qe(g)}),Q=M===void 0?void 0:String(M||"").trim(),et=Q===void 0?ie&&ie!=="/"?ie:void 0:Q&&Q.startsWith("/")&&!Q.startsWith("//")?Q:void 0;et&&J.set("post_auth_redirect",et);const E=`${U||""}/api/iam/v1/oauth2/authz/url?${J.toString()}`,F=await fetch(E),T=await F.json(),xe=T?.autorization_url;if(!F.ok||!xe)throw new Error(T?.message||"Unable to start social sign-in.");window.location.assign(xe)}catch(U){const J=wi(U);ae(J),ge(J,{variant:"error"}),qe(null),ft(!1)}}},[Qe,ie,ge,Te,M]);o.useEffect(()=>{_e&&Je.current?.focus()},[_e]);const re=o.useCallback(()=>{Ye(!1),Ee("")},[]),_=o.useCallback(()=>{!he.trim()||!s||(s(he.trim()),re())},[he,s,re]),Xe=o.useCallback(()=>{if(ue){ue();return}window.location.assign(Ot)},[ue,Ot]),Ae=o.useCallback(()=>{if(we){if(we.startsWith("http://")||we.startsWith("https://")){window.open(we,"_blank","noopener,noreferrer");return}window.location.assign(we)}},[we]),ze=o.useCallback(async()=>{if(!(y||!ne||!ye||P)){Le(!0),ae(null);try{const g=await fetch(j,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({handle:ne,password:ye})});if(!g.ok)throw new Error(`HTTP ${g.status}`);const U=await g.json();if(U.success&&U.token){const J=String(U?.user?.id||U?.user?.uid||"").trim();if(!!U?.user?.mfaUrl&&J){pt(J),Bt(U.token),ae(null);return}e&&e(U.token,ne)}else ae(U.message||"Invalid username or password.")}catch(g){ae(g instanceof Error?g.message:String(g))}finally{Le(!1)}}},[y,ne,ye,P,j,e]),Be=o.useCallback(async()=>{if(!(y||P||!Y||!Ie.trim()||!Re)){Le(!0),ae(null);try{const g=new URL(j,window.location.origin),U=g.pathname.endsWith("/api/iam/v1/login")?g.href.replace(/\/api\/iam\/v1\/login$/,""):`${g.origin}`,J=await fetch(`${U}/api/iam/v1/users/${Y}/mfa/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userUid:Y,code:Ie.trim()})}),Q=await J.json();if(!J.ok||!Q?.success)throw new Error(Q?.message||"Failed to validate your MFA code.");e&&e(Re,ne)}catch(g){const U=g instanceof Error?g.message:String(g);ae(U),ge(U,{variant:"error"})}finally{Le(!1)}}},[y,ge,ne,P,j,Ie,Re,Y,e]),Z=o.useCallback(g=>{g.key==="Enter"&&(Y?Be():ze())},[Y,ze,Be]),Ze=Te||P||y;return t.jsxs(h,{className:"signin-input-theme-scope",display:"flex",alignItems:O||Se||!k?"flex-start":"center",justifyContent:"center",minHeight:O||Se||!k?"auto":"100vh",bg:O?"transparent":"canvas.default",color:"fg.default",py:O?0:Se?2:4,children:[t.jsx(Ti,{}),t.jsxs(h,{width:"100%",maxWidth:440,p:0,children:[!O&&t.jsxs(t.Fragment,{children:[t.jsxs(h,{display:"flex",alignItems:"center",gap:2,mb:Se?2:3,justifyContent:"center",children:[Ut,t.jsx(It,{sx:{fontSize:3},children:Ke})]}),t.jsx($,{as:"p",sx:{fontSize:1,color:"fg.muted",mb:Se?2:3,textAlign:"center"},children:u})]}),(I||oe)&&t.jsxs(h,{mb:3,textAlign:"center",children:[I&&t.jsx(It,{as:"h3",sx:{fontSize:2,mb:1},children:I}),oe&&t.jsx($,{sx:{color:"fg.muted",fontSize:1},children:oe})]}),!Y&&(f||v||m)&&t.jsxs(t.Fragment,{children:[f&&t.jsx(q,{block:!0,size:"large",leadingVisual:me==="github"?()=>t.jsx(un,{size:"small"}):ji,disabled:Ze,onClick:()=>Fe(mn.github),sx:{mt:Ue,maxWidth:W,mx:"auto"},children:"Sign in with GitHub"}),v&&t.jsx(q,{block:!0,size:"large",leadingVisual:me==="google"?()=>t.jsx(un,{size:"small"}):Ci,disabled:Ze,onClick:()=>Fe(mn.google),sx:{mt:Ue,maxWidth:W,mx:"auto"},children:"Sign in with Google"}),m&&t.jsx(q,{block:!0,size:"large",leadingVisual:me==="linkedin"?()=>t.jsx(un,{size:"small"}):ki,disabled:Ze,onClick:()=>Fe(mn.linkedin),sx:{mt:Ue,maxWidth:W,mx:"auto"},children:"Sign in with LinkedIn"})]}),!Y&&!L&&t.jsx(h,{mt:3,display:"flex",justifyContent:"center",children:t.jsx(q,{leadingVisual:bn,size:"large",block:!0,disabled:y||P||Te,onClick:()=>_t(!0),sx:{maxWidth:W,mx:"auto"},children:ke})}),!Y&&L&&t.jsxs(h,{mt:4,children:[t.jsxs(ce,{required:!0,sx:{mb:3},children:[t.jsx(ce.Label,{children:"Username"}),t.jsx(Rt,{autoFocus:!0,block:!0,placeholder:"Your username",value:ne,disabled:P||y,onChange:g=>ut(g.target.value),onKeyDown:Z})]}),t.jsxs(ce,{required:!0,sx:{mb:3},children:[t.jsx(ce.Label,{children:"Password"}),t.jsx(Rt,{block:!0,placeholder:"Your password",type:pe?"text":"password",value:ye,disabled:P||y,onChange:g=>Lt(g.target.value),onKeyDown:Z,trailingAction:t.jsx(Rt.Action,{onClick:()=>Ft(!pe),disabled:P||y,icon:pe?vi:Si,"aria-label":pe?"Hide password":"Show password",sx:{color:"var(--fgColor-muted)"}})})]}),t.jsxs(h,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:3,children:[t.jsx(q,{variant:"primary",disabled:P||y||!ne||!ye,onClick:ze,children:P?"Signing in…":"Sign In"}),Pt&&t.jsx(vo,{as:"button",sx:{fontSize:1,cursor:y?"not-allowed":"pointer",background:"none",border:"none",opacity:y?.6:1},onClick:()=>{y||P||Ae()},children:fe})]})]}),Y&&t.jsxs(t.Fragment,{children:[t.jsxs(ce,{required:!0,sx:{mb:3,mt:2},children:[t.jsx(ce.Label,{children:"MFA Code"}),t.jsx(Rt,{autoFocus:!0,block:!0,placeholder:"Your MFA code",value:Ie,disabled:P||y,onChange:g=>zt(g.target.value),onKeyDown:Z})]}),t.jsx(q,{variant:"primary",block:!0,disabled:P||y||!Ie.trim(),onClick:Be,sx:{maxWidth:W,mx:"auto"},children:P?"Validating…":"Validate MFA Code"})]}),mt&&t.jsx($,{sx:{color:"danger.fg",fontSize:1,mt:3,display:"block"},children:mt}),V&&t.jsxs(h,{mt:4,pt:4,textAlign:"center",borderTop:"1px solid",borderColor:"border.muted",children:[t.jsx(It,{as:"h3",sx:{fontSize:2,mb:2},children:z}),t.jsx($,{as:"p",sx:{color:"fg.muted",fontSize:1,mb:3},children:$t}),t.jsx(h,{display:"flex",justifyContent:"center",children:t.jsx(q,{variant:"primary",size:"large",leadingVisual:So,disabled:y||P,onClick:Xe,children:Mt})})]}),p&&s&&t.jsxs(t.Fragment,{children:[t.jsxs(h,{display:"flex",alignItems:"center",gap:2,my:3,children:[t.jsx(h,{flex:1,height:"1px",bg:"border.default"}),t.jsx($,{sx:{fontSize:0,color:"fg.muted"},children:"or"}),t.jsx(h,{flex:1,height:"1px",bg:"border.default"})]}),t.jsx(q,{block:!0,leadingVisual:bn,disabled:y||P||Te,onClick:()=>Ye(!0),sx:{maxWidth:W,mx:"auto"},children:"Sign in with an API Key"}),_e&&t.jsx(h,{role:"dialog","aria-modal":"true","aria-labelledby":"signin-api-key-title",onKeyDown:g=>{g.key==="Escape"&&re()},onClick:re,position:"fixed",inset:0,zIndex:200,p:3,bg:"canvas.backdrop",display:"flex",alignItems:"center",justifyContent:"center",children:t.jsxs(h,{as:"form",onClick:g=>g.stopPropagation(),onSubmit:g=>{g.preventDefault(),_()},width:"min(560px, 100%)",p:3,borderRadius:2,border:"1px solid",borderColor:"border.default",bg:"canvas.overlay",color:"fg.default",boxShadow:"shadow.large",children:[t.jsx(It,{id:"signin-api-key-title",sx:{fontSize:2,mb:2},children:"Enter your API Key"}),t.jsxs(ce,{required:!0,children:[t.jsx(ce.Label,{children:"API Key"}),t.jsx(yo,{block:!0,required:!0,autoFocus:!0,placeholder:"Paste your API key here",value:he,onInput:g=>Ee(g.currentTarget.value),ref:Je})]}),t.jsxs(h,{mt:3,display:"flex",justifyContent:"flex-end",gap:2,children:[t.jsx(q,{type:"button",onClick:re,children:"Cancel"}),t.jsx(q,{type:"submit",variant:"primary",disabled:!he.trim(),children:"Authenticate"})]})]})})]})]})]})},ys=ko((e,s)=>({pending:void 0,suggest:(a,i)=>{const c=a.trim();c&&e({pending:{text:c,submit:i?.submit??!1,nonce:(s().pending?.nonce??0)+1}})},consume:()=>e({pending:void 0})}));function Ri(e){const{agentId:s,instructions:a,model:i,frontendTools:c,inference:u,subagents:x,sharing:l,onSubagentEvent:f,modeEffect:v}=e;return{type:"browser-vercel-ai",endpoint:"",agentId:s,enableConfigQuery:!1,options:{instructions:a,model:i,frontendTools:c,inference:u,subagents:x,sharing:l,onSubagentEvent:f,modeEffect:v}}}const Ei=({state:e})=>wo[e];class Ai extends Error{constructor(s,a){super(a),this.status=s,this.name="RuntimeRefusal"}status}function $i({baseUrl:e,getAccessToken:s,fetch:a}){const i=e.replace(/\/+$/,""),c=(f={})=>{const v=s();return{...f,...v?{Authorization:`Bearer ${v}`}:{}}},u=async f=>{throw new Ai(f.status,Ro(f.status,f.statusText,await Eo(f)))};return{json:async(f,v="GET",m)=>{const p=await a(`${i}${f}`,{method:v,headers:c({Accept:"application/json",...m===void 0?{}:{"Content-Type":"application/json"}}),...m===void 0?{}:{body:JSON.stringify(m)}});return p.ok?await p.json():u(p)},stream:async(f,v,{onEvent:m,signal:p},V="POST")=>{const M=await a(`${i}${f}`,{method:V,headers:c({"Content-Type":"application/json",Accept:"text/event-stream"}),body:JSON.stringify(v),signal:p});if(!M.ok)return u(M);await Ao(M,m)},refused:u,headers:c,root:i,fetcher:a}}const X=e=>`/api/v1/apps/sessions/${encodeURIComponent(e)}`;function Mi(e){const{json:s,stream:a,fetcher:i,headers:c,refused:u,root:x}=$i(e);return{serverUrl:x,accessToken:()=>e.getAccessToken(),start:(l,f)=>a("/api/v1/apps/sessions",{agent:l.agent,...l.deploymentUid?{deployment_uid:l.deploymentUid}:{},...l.appUid?{app_uid:l.appUid}:{},...l.version?{version:l.version}:{},...l.session?{session:l.session}:{},opener:l.opener},f),message:(l,f,v)=>a(`${X(l)}/messages`,{text:f},v),changeSettings:(l,f,v)=>a(`${X(l)}/settings`,{values:f},v,"PUT"),resume:(l,f,v)=>a(`${X(l)}/resume`,{agent:f},v),stop:l=>s(`${X(l)}/stop`,"POST"),end:l=>s(`${X(l)}/end`,"POST"),describe:l=>s(X(l)),described:async l=>Io(await s(X(l))),list:(l={})=>{const f=new URLSearchParams;for(const[m,p]of Object.entries(l))p!==""&&p!==void 0&&p!==!1&&f.set(m,String(p));const v=f.toString();return s(`/api/v1/apps/sessions${v?`?${v}`:""}`)},swap:(l,f)=>s(`${X(l)}/agent`,"POST",{agent:f}),clone:(l,f={})=>s(`${X(l)}/clone`,"POST",{up_to_turn:f.upToTurn??null,agent:f.agent??null,title:f.title??""}),exportFile:async(l,f="")=>{const v=await i(`${x}${X(l)}/export${f?`?format=${encodeURIComponent(f)}`:""}`,{method:"GET",headers:c()});return v.ok?v.text():u(v)},importFile:async(l,f={})=>{const v=new URLSearchParams;f.agent&&v.set("agent",f.agent),f.format&&v.set("format",f.format);const m=v.toString(),p=await i(`${x}/api/v1/apps/sessions/import${m?`?${m}`:""}`,{method:"POST",headers:c({"Content-Type":"application/x-ndjson"}),body:l});return p.ok?await p.json():u(p)},rename:(l,f)=>s(`${X(l)}/title`,"PUT",{title:f}),archive:(l,f)=>s(`${X(l)}/archived`,"PUT",{archived:f}),messages:async l=>To((await s(`${X(l)}/messages`)).messages)}}const de="";function Oi(e){return{surfaceId:!e||e===Ts?de:e,suspendedId:null}}function Pi({agentName:e,sandboxStillRuns:s=!1,temporary:a=!0,onSignedIn:i,onSignUp:c}){const{configuration:u}=Is(),x=o.useCallback(l=>{$o.getState().checkIAMToken(l),i?.()},[i]);return t.jsx(h,{height:"100%",minHeight:0,overflowY:"auto",bg:"canvas.default",px:4,py:4,children:t.jsxs(h,{maxWidth:440,mx:"auto",children:[t.jsxs(h,{display:"flex",alignItems:"center",justifyContent:"center",gap:2,color:"attention.fg",mb:2,children:[t.jsx(bn,{size:20}),t.jsx($,{sx:{fontSize:2,fontWeight:"semibold",color:"fg.default"},children:a?"This demo runs on a shared key":"Your key has expired"})]}),t.jsxs($,{as:"p",sx:{fontSize:1,color:"fg.muted",textAlign:"center",mb:3},children:[a?`${e??"The agent"} has used the time this key allows. Sign in to point your own agent at it, use your own data, and drop the time limit.`:`${e??"The agent"} stopped because your session ran out.`,s?" Your notebook is still running in this page.":""]}),a&&t.jsxs(h,{display:"flex",flexDirection:"column",alignItems:"center",gap:2,mb:3,"data-anonymous-key-refresh":"",children:[t.jsx($,{sx:{fontSize:1,color:"fg.muted",textAlign:"center"},children:"Or keep trying without an account: refreshing the page gives this demo a new key, and starts the conversation over."}),t.jsx(q,{leadingVisual:Mo,onClick:()=>{typeof window<"u"&&window.location.reload()},children:"Refresh the page for a new key"})]}),t.jsx(Ii,{hideHero:!0,fillHeight:!1,calloutTitle:"Sign in to keep going",github:!0,google:!0,linkedin:!0,socialSignInNavigationTarget:typeof window>"u"?void 0:`${window.location.pathname}${window.location.search}`,loginUrl:u?.iamUrl?`${u.iamUrl}/api/iam/v1/login`:void 0,onSignIn:x,onSignUp:c})]})})}const Ui="https://r1.datalayer.run";function Li(e=!0,s=""){const{configuration:a}=Is(),i=vn(f=>f.token),c=a?.aiInferenceUrl||Ui,u=Oo(c,e&&!i,s),x=i||u.token,l=o.useMemo(()=>({inferenceUrl:c,token:x||void 0}),[c,x]);return{inference:l,needsSignIn:Po(l),anonymous:u,inferenceUrl:c}}const _i={name:"general-purpose",description:"A capable generalist for a task none of the specialists covers: research, reasoning, drafting, checking.",instructions:"You are a capable general-purpose assistant. Carry out the task you are given completely and report the result plainly, saying what you could not do."};function js(e){const s=e?.subagents;if(!s)return[];const a=(s.subagents??[]).map(i=>{const c=i.ref?Uo(i.ref):void 0;return{name:i.name,description:i.description||c?.description||i.name,instructions:i.instructions??c?.systemPrompt,model:i.model??c?.model??s.defaultModel,icon:c?.icon}});return s.includeGeneralPurpose?[...a,_i]:a}const Ps=e=>e.replace(/\/+$/,""),Fi=e=>e.split(":")[0];function zi(e,s){return`${Ps(e)}/api/v1/apps/agents/${encodeURIComponent(s)}/equipment`}function Bi(e,s){return`${Ps(e)}/api/v1/configure/models?agent_id=${encodeURIComponent(s)}`}const Ni=["started","starting","failed","not_started","left_out"],gn=e=>Array.isArray(e)?e.filter(s=>typeof s=="string"):[];function Vi(e){const s=e??{};return{servers:(s.mcp_servers??[]).map(a=>({id:String(a.id??""),name:String(a.name??a.id??""),optional:a.optional===!0,state:Ni.includes(a.state)?a.state:"not_started",...typeof a.reason=="string"&&a.reason?{reason:a.reason}:{},missingEnvVars:gn(a.missing_env_vars),...typeof a.tools=="number"?{tools:a.tools}:{}})),skills:(s.skills??[]).map(a=>({id:String(a.id??""),name:String(a.name??a.id??""),description:String(a.description??""),optional:a.optional===!0,state:a.state==="not_activated"?"not_activated":"active",...typeof a.reason=="string"&&a.reason?{reason:a.reason}:{},missingEnvVars:gn(a.missing_env_vars),oneOfEnvVars:gn(a.one_of_env_vars)}))}}function Di(e){const s=e?ms[e]??ms[Fi(e)]:void 0,a=new Set(s?.optional?.mcpServers??[]),i=new Set(s?.optional?.skills??[]),c=s?[s.model,...s.modelAdditionals??[]].filter(u=>!!u):[];return{source:"declared",modelsSource:"declared",servers:(s?.mcpServers??[]).filter(Boolean).map(u=>({id:u.id,name:u.name||u.id,optional:a.has(u.id),missingEnvVars:[]})),skills:(s?.skills??[]).filter(Boolean).map(u=>({id:u.id,name:u.name||u.id,description:u.description??"",optional:i.has(u.id),missingEnvVars:[],oneOfEnvVars:[]})),models:[...new Set(c)].map((u,x)=>({id:u,name:Lo(u)?.name??u,current:x===0}))}}function Hi(e,s){const a=Rs(e),i=a.find(c=>c.id===s)?.id??a.find(c=>c.isAvailable!==!1)?.id;return a.map(c=>({...c,current:c.id===i}))}function Wi({agentServerUrl:e,agentId:s,token:a,specId:i,model:c,enabled:u,refreshMs:x=3e4}){const l=o.useMemo(()=>Di(i),[i]),[f,v]=o.useState(),[m,p]=o.useState();return o.useEffect(()=>{if(v(void 0),p(void 0),!u||!e||!s)return;let V=new AbortController;const M=a?{Authorization:`Bearer ${a}`}:{},y=()=>{V.abort(),V=new AbortController;const{signal:O}=V;fetch(zi(e,s),{headers:M,signal:O}).then(I=>I.ok?I.json():null).then(I=>{!O.aborted&&I&&v(Vi(I))}).catch(()=>{}),fetch(Bi(e,s),{headers:M,signal:O}).then(I=>I.ok?I.json():null).then(I=>{if(!O.aborted&&I){const oe=Hi(I,c);p(oe.some(ke=>ke.isAvailable!==!1)?oe:void 0)}}).catch(()=>{})};y();const k=setInterval(y,x);return()=>{clearInterval(k),V.abort()}},[u,e,s,a,c,x]),o.useMemo(()=>({source:f?"live":"declared",servers:f?.servers??l.servers,skills:f?.skills??l.skills,modelsSource:m&&m.length>0?"live":"declared",models:m&&m.length>0?m:l.models}),[f,m,l])}const N={readOnly:"Chosen by the application. Shown for you to read: nothing here changes it.",declared:"As its spec declares them: its runtime has not said their state yet.",model:"Model",servers:"MCP servers",skills:"Skills",none:{servers:"It uses no MCP server.",skills:"It has no skill."},optional:"optional",serverState:{started:"Running",starting:"Starting",failed:"Failed",not_started:"Not started",left_out:"Off"},skillState:{active:"Active",not_activated:"Not activated"},modelState:{current:"In use",available:"Available",off:"Not available"},declaredState:"Declared"},Gi={success:{fg:"success.fg",bg:"success.subtle"},attention:{fg:"attention.fg",bg:"attention.subtle"},danger:{fg:"danger.fg",bg:"danger.subtle"},accent:{fg:"accent.fg",bg:"accent.subtle"},neutral:{fg:"fg.muted",bg:"neutral.subtle"}};function Ki(e){const s=N.serverState,a=e.state;return{id:e.id,name:e.name,state:a?s[a]:N.declaredState,tone:a==="started"?"success":a==="failed"?"danger":a==="starting"?"attention":"neutral",on:a==="started",...e.reason?{reason:e.reason}:{},...a==="started"&&e.tools!==void 0?{note:`${e.tools} ${e.tools===1?"tool":"tools"}`}:e.optional?{note:N.optional}:{}}}function qi(e){const s=e.state;return{id:e.id,name:e.name,state:s?N.skillState[s]:N.declaredState,tone:s==="active"?"success":"neutral",on:s==="active",...e.reason?{reason:e.reason}:{},...e.optional?{note:N.optional}:{}}}function Yi(e){const s=e.isAvailable===!1;return{id:e.id,name:e.name,state:e.current?N.modelState.current:s?N.modelState.off:N.modelState.available,tone:e.current?"accent":s?"neutral":"success",on:!s,...s&&e.unavailableReason?{reason:e.unavailableReason}:{}}}function Ji(e){return[e.name,e.state,e.reason,e.note].filter(Boolean).join(", ")}function hn({kind:e,icon:s,title:a,rows:i,count:c,summary:u,empty:x,declared:l=!1,align:f="start"}){const v=`${a} — ${u}`;return t.jsxs(Ge,{children:[t.jsx(Ge.Anchor,{children:t.jsx(zo,{text:v,direction:"n",children:t.jsx(q,{type:"button",variant:"invisible",size:"small","aria-label":v,leadingVisual:s,"data-equipment-menu":e,"data-equipment-source":l?"declared":"live",children:t.jsx($,{sx:{fontSize:0,fontVariantNumeric:"tabular-nums",maxWidth:160,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",verticalAlign:"bottom",...e==="model"?{"@media (max-width: 480px)":{display:"none"}}:{}},children:c})})})}),t.jsx(Ge.Overlay,{side:"outside-top",align:f,width:"medium",children:t.jsxs(h,{maxHeight:"60vh",overflowY:"auto",children:[t.jsx(te,{"aria-label":a,children:t.jsxs(te.Group,{children:[t.jsxs(te.GroupHeading,{children:[a,i.length>0?` · ${u}`:""]}),i.length===0?t.jsx(te.Item,{onSelect:m=>m.preventDefault(),sx:{color:"fg.muted"},children:x}):i.map(m=>{const p=Gi[m.tone];return t.jsxs(te.Item,{onSelect:V=>V.preventDefault(),"aria-label":Ji(m),"data-equipment-row":m.id,"data-equipment-on":m.on?"true":"false",sx:m.on?void 0:{color:"fg.muted"},children:[m.name,t.jsx(te.TrailingVisual,{children:t.jsx($,{sx:{fontSize:"11px",px:"6px",py:"1px",borderRadius:999,bg:p.bg,color:p.fg,whiteSpace:"nowrap"},children:m.state})}),m.reason||m.note?t.jsx(te.Description,{variant:"block",children:[m.reason,m.note].filter(Boolean).join(" · ")}):null]},m.id)})]})}),t.jsxs(h,{px:3,py:2,borderTop:"1px solid",borderColor:"border.muted","data-equipment-note":"",children:[t.jsx($,{sx:{fontSize:0,color:"fg.muted",display:"block"},children:N.readOnly}),l?t.jsx($,{sx:{fontSize:0,color:"fg.muted",display:"block"},children:N.declared}):null]})]})})]})}const Cs=(e,s,a)=>a?String(s):`${e}/${s}`;function Qi({equipment:e}){const s=e.source==="declared",a=e.servers.map(Ki),i=e.skills.map(qi),c=e.models.map(Yi),u=a.filter(f=>f.on).length,x=i.filter(f=>f.on).length,l=e.models.find(f=>f.current);return t.jsxs(h,{display:"inline-flex",alignItems:"center",role:"group","aria-label":"What this application runs with","data-equipment-bar":e.source,children:[t.jsx(hn,{kind:"servers",icon:yi,title:N.servers,rows:a,count:Cs(u,a.length,s),summary:a.length===0?"none":s?`${a.length} declared`:`${u} of ${a.length} running`,empty:N.none.servers,declared:s}),t.jsx(hn,{kind:"skills",icon:_o,title:N.skills,rows:i,count:Cs(x,i.length,s),summary:i.length===0?"none":s?`${i.length} declared`:`${x} of ${i.length} active`,empty:N.none.skills,declared:s}),c.length>0?t.jsx(hn,{kind:"model",icon:Fo,title:N.model,rows:c,count:l?.name??String(c.length),summary:l?`${l.name}, of ${c.length} it may run on`:`${c.length} it may run on`,declared:e.modelsSource==="declared",align:"end"}):null]})}function Xi(e){return e.replace(/^datalayer_/,"").replace(/_lexical$/,"")}function Zi(e){const s=Xi(e);return/^executeCodeIn(Notebook|Document)$/.test(s)||/^(read|list)[A-Z]/.test(s)}function er(e,s){return e.filter(a=>s?.has(a.name)||Zi(a.name))}function tr(e,s){const a=i=>s&&i.value.id===`${s}-tools`?0:i.value.id==="notebook-tools"?1:2;return e.map((i,c)=>({entry:i,index:c,rank:a(i)})).sort((i,c)=>i.rank-c.rank||i.index-c.index).map(i=>i.entry)}function nr(e,s,a){if(!a||!e.endsWith("-tools"))return!1;const i=e.slice(0,-6);return s.has(i)&&i!==a}const sr={type:"object",properties:{}};function or(e,s){const a=new Set(e.toolset);return e.commands.filter(i=>a.has(i.name)).map(i=>({name:i.name,description:i.description,parameters:i.parameters??sr,location:"frontend",handler:async c=>{if(!s)throw new Error(`${i.name}: the ${e.plugin??e.id} plugin is not mounted on this page.`);const u=Object.keys(c??{}).length>0?c:void 0,x=await s.executeCommand(i.command,u);return x===void 0?{ok:!0,command:i.command,argument:u}:x}}))}function Us(e,s){return e.flatMap(a=>or(a,s))}function ar(){const e=Bo(),s=Os();return o.useMemo(()=>Us(s,e),[s,e])}function ir(e){const s=e?.app_instance;if(!s||typeof s!="object")return"";const a=s.deployment_uid;return typeof a=="string"?a.trim():""}function rr(e,s,a){return e||!s?e:{id:a,messages:[]}}function lr(e){const s=(new URLSearchParams(e).get("session")??"").trim();if(!s)return"";if(!/^[A-Za-z0-9_-]{8,128}$/.test(s))throw new Error(`?session=${s} names no session: a session uid is 8 to 128 letters, digits, hyphens or underscores.`);return s}function cr({facts:e}){if(!e)return null;const s=No(e);return t.jsxs(h,{display:"inline-flex",alignItems:"center",gap:2,"data-session-state":e.state,children:[t.jsx(Vo,{size:"small",variant:e.state==="open"?"accent":e.state==="paused"?"attention":"secondary",children:Do(e)}),s?t.jsx($,{sx:{fontSize:0,color:"fg.muted"},"data-session-lineage":"",children:s}):null]})}function dr({facts:e,turn:s,context:a}){const i=K(Es),c=As(i,e,"turn");return!e||c.length===0||s<1?null:t.jsx(h,{display:"inline-flex",gap:1,"data-turn-actions":s,children:c.map(u=>t.jsx(q,{size:"small",variant:"invisible","data-turn-action":u.id,onClick:()=>{Promise.resolve(u.run(e,{...a,atTurn:s})).catch(x=>a.say(String(x.message??x)))},children:u.label},u.id))})}function ur({uid:e,describe:s,context:a}){const i=K(Es),[c,u]=o.useState(void 0),[x,l]=o.useState(!1),[f,v]=o.useState(""),[m,p]=o.useState(void 0),V={...a,show:a.show??p,say:k=>{v(k),a.say(k)}},M=o.useCallback(k=>{l(k),k&&e&&s(e).then(u,()=>u(void 0))},[s,e]);if(!e||i.length===0)return null;const y=As(i,c);return t.jsxs(t.Fragment,{children:[t.jsxs(Ge,{open:x,onOpenChange:M,children:[t.jsx(Ge.Anchor,{children:t.jsx($s,{icon:Ho,"aria-label":"Session actions",variant:"invisible",size:"small","data-testid":"session-actions"})}),t.jsx(Ge.Overlay,{width:"small",children:t.jsxs(te,{children:[y.length===0?t.jsx(te.Item,{disabled:!0,children:c?"Nothing applies to this session now.":"Reading the session…"}):y.map(k=>t.jsx(te.Item,{"data-session-action":k.id,onSelect:()=>{c&&Promise.resolve(k.run(c,V)).catch(O=>V.say(String(O.message??O)))},children:k.label},k.id)),f?t.jsxs(t.Fragment,{children:[t.jsx(te.Divider,{}),t.jsx(te.Item,{disabled:!0,"data-testid":"session-actions-said",children:f})]}):null]})})]}),m?t.jsx(Ms,{title:m.title,onClose:()=>p(void 0),width:"large",children:t.jsx(h,{"data-session-panel":"",children:m.render()})}):null]})}const ks={confirm:"Switch",cancel:"Keep it"};function fr({question:e,onPick:s}){const[a,i]=o.useState(e.options[0]?.id??""),[c,u]=o.useState("");o.useEffect(()=>{let l=!0;if(!e.says||!a){u("");return}return e.says(a).then(f=>l&&u(f),()=>l&&u("")),()=>{l=!1}},[a,e]);const x=e.options.find(l=>l.id===a);return t.jsx(Ms,{title:e.title,onClose:()=>s(void 0),width:"medium",footerButtons:[{buttonType:"default",content:ks.cancel,onClick:()=>s(void 0)},{buttonType:"primary",content:ks.confirm,disabled:!a,onClick:()=>s(a||void 0)}],children:t.jsxs(h,{display:"grid",gap:3,"data-session-choose":"",children:[t.jsxs(ce,{children:[t.jsx(ce.Label,{children:e.title}),t.jsx(gs,{value:a,onChange:l=>i(l.target.value),block:!0,children:e.options.map(l=>t.jsx(gs.Option,{value:l.id,children:l.label},l.id))})]}),x?.description?t.jsx($,{sx:{fontSize:1,color:"fg.muted"},children:x.description}):null,c?t.jsx($,{as:"p",sx:{m:0,fontSize:1,fontStyle:"italic"},"data-session-choose-says":"",children:c}):null]})})}const pr="var(--theme-accent)";function Ls({face:e,size:s}){return typeof e=="string"?t.jsx(Wo,{emoji:e,size:s,label:""}):t.jsx(t.Fragment,{children:e})}function mr({face:e,size:s,state:a}){const i=a==="thinking"||a==="working",c=a==="paused";return t.jsxs(h,{as:"span","aria-hidden":!0,"data-presence":a,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:s+8,height:s+8,flexShrink:0,fontSize:s,lineHeight:1,children:[t.jsx(h,{as:"span",position:"absolute",inset:0,borderRadius:"50%",boxShadow:c?"none":`0 0 0 2px ${pr}`,border:c?"2px dashed":"none",borderColor:"border.default",opacity:i||a==="waiting"||c?.9:0,transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",animation:i?"loopPresenceBreath 1.8s ease-in-out infinite":"none",reducedMotion:{animation:"none"},sx:{"@keyframes loopPresenceBreath":{"0%, 100%":{transform:"scale(0.92)",opacity:.35},"50%":{transform:"scale(1.06)",opacity:.9}}}}),t.jsx(h,{as:"span",display:"inline-flex",opacity:c?.55:1,filter:c?"grayscale(0.6)":"none",transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",children:t.jsx(Ls,{face:e,size:s})})]})}function gr({state:e}){return t.jsx($,{role:"status","aria-live":"polite","data-presence-line":e,sx:{fontSize:0,color:e==="waiting"?"fg.default":"fg.muted",fontWeight:e==="waiting"?"semibold":"normal",whiteSpace:"nowrap",flexShrink:0},children:Ei({state:e})})}const hr=Sn(void 0),xr=Sn(""),br=Sn({}),vr=1400,ws=parseInt(xi["--loop-face-large"],10),Sr={};function Tr({workspace:e}){const s=Go(),a=Ko(),i=o.useRef(null),c=o.useRef(void 0),{setViewControls:u}=e,x=o.useRef(e.setThread);x.current=e.setThread;const l=o.useCallback(()=>{const n=i.current?.thread();return n&&x.current?.(n),n},[]),[f,v]=o.useState(null),m=qo(),p=m.getConfig(Yo),V=p?.placeholder||s.placeholder,M=p?.defaultSurface??"notebook",y=m.getConfig(Jo),[k,O]=o.useState(de),[I,oe]=o.useState(null),ke=o.useRef(!1),z=K(Qo),$t=K(Xo),Mt=K(Zo),ue=K(ea)[0]?.value,fe=fn(ue?.promptStance??hr)??ue?.prompt,Pt=K(ta),Ue=na(Pt[0]?.value),W=o.useRef(Ue);W.current=Ue;const Se=o.useRef(""),Ke=K(sa),Ut=o.useMemo(()=>oa(()=>Ke.reduce((n,r)=>aa(n,r.value.extras.value),{})),[Ke]),j=fn(Ke.length>0?Ut:br),ne=o.useRef(new Set),ut=ia(gi,e),ye=!ut.allowed,Lt=ye?ut.reason??"Chat is unavailable for this sandbox":void 0,[L,_t]=o.useState(!1),[pe,Ft]=o.useState(!1),[P,Le]=o.useState(!1),[Te,ft]=o.useState({open:!1,pendingApproval:!1}),me=ra(L,Te,p?.presence?.paused===!0),qe=p?.presence?.onPresence;o.useEffect(()=>{qe?.(me),W.current?.setPresence(me)},[qe,me]);const Y=o.useRef(p?.presence?.onSaying);Y.current=p?.presence?.onSaying;const pt=o.useRef({answering:!1}),Ie=o.useCallback(n=>{i.current=n,Ft(!!n)},[]),zt=o.useCallback(n=>{const{open:r,pendingApproval:d}=la(n);ft(Pe=>Pe.open===r&&Pe.pendingApproval===d?Pe:{open:r,pendingApproval:d});const S={saying:da(n),answering:ca(n)},b=pt.current;(b.saying?.id!==S.saying?.id||b.saying?.text!==S.saying?.text||b.answering!==S.answering)&&(pt.current=S,Y.current?.(S));const ee=W.current;if(!ee)return;ee.items(n);const B=new Set(["complete","completed","done","error","failed","cancelled","canceled","rejected","denied","stopped"]),le={insertcell:"adding a cell",updatecell:"editing a cell",runcell:"running a cell",deletecells:"removing cells",readallcells:"reading the notebook",readcell:"reading a cell",executecode:"running code",insertblock:"adding a block",updateblock:"editing a block",runblock:"running a block",readdocument:"reading the document"};let C;for(let Pe=n.length-1;Pe>=0;Pe-=1){const Tt=n[Pe];if(typeof Tt.toolName=="string"&&Tt.toolCallId){B.has(String(Tt.status).toLowerCase())||(C=Tt);break}}if(!C){ee.activity(void 0);return}const Oe=C.toolName.toLowerCase().replace(/^datalayer_/,"").replace(/_lexical$/,"").replace(/[^a-z]/g,""),go=le[Oe]??`using ${C.toolName}`;ee.activity(`${Se.current||"The agent"} is ${go}…`)},[]),Re=o.useRef(j);Re.current=j;const Bt=o.useCallback(n=>{Ys(n),W.current?.usage(n),Re.current.onUsage?.(n)},[]),mt=o.useCallback(n=>{_t(n),n||W.current?.end("done")},[]),ae=o.useCallback(n=>{const r=W.current;if(!r)return;let d=-1;for(let b=n.length-1;b>=0;b-=1)if(n[b].role==="user"){d=b;break}const S=n.slice(d+1).filter(b=>b.role==="assistant").map(ua).filter(b=>b.trim().length>0).join(`
|
|
28
|
+
`,Ii=({onSignIn:e,onApiKeySignIn:s,loginUrl:a,name:i,title:c="Datalayer OTEL",description:u="Sign in to access the observability dashboard.",icon:x,leadingIcon:l=t.jsx(jo,{size:24}),github:f=!1,google:v=!1,linkedin:m=!1,apiKey:p=!1,signUp:V=!0,socialSignInNavigationTarget:M,asDoc:y=!1,fillHeight:k=!0,hideHero:O=!1,calloutTitle:I,calloutDescription:oe,passwordToggleLabel:ke="Sign in with a password",signUpTitle:z="Don't have an account?",signUpDescription:$t="Create a free Datalayer account with your email address.",signUpLabel:Mt="Sign up with email",signUpHref:Ot="https://datalayer.ai/signup",onSignUp:ue,forgotPasswordHref:we="/password",forgotPasswordLabel:fe="Forgot password?",showForgotPassword:Pt=!0,socialButtonMarginTop:Ue=3,actionButtonMaxWidth:W=320})=>{const Se=y&&!O,Ke=i??(y&&c==="Datalayer OTEL"?"Datalayer Sign In":c),Ut=x??(y?t.jsx(bi,{size:24}):l),j=o.useMemo(()=>{if(a)return a;const g=Ss();return g?`${g}/api/iam/v1/login`:"/api/iam/v1/login"},[a]),[ne,ut]=o.useState(""),[ye,Lt]=o.useState(""),[L,_t]=o.useState(!1),[pe,Ft]=o.useState(!1),[P,Le]=o.useState(!1),[Te,ft]=o.useState(!1),[me,Ye]=o.useState(null),[q,pt]=o.useState(null),[Ie,zt]=o.useState(""),[Ee,Bt]=o.useState(null),[mt,ae]=o.useState(null),{enqueueToast:ge}=xo(),[_e,qe]=o.useState(!1),[he,Re]=o.useState(""),Je=o.useRef(null),Qe=o.useCallback(g=>bo()?ps.URLExt.join(ps.PageConfig.getBaseUrl(),g.oauth2CallbackServerRoute):`${window.location.protocol}//${window.location.hostname}${window.location.port?`:${window.location.port}`:""}${g.oauth2CallbackUIRoute}`,[]),ie=o.useMemo(()=>{if(typeof window>"u")return"/";const g=`${window.location.pathname}${window.location.search}${window.location.hash}`;return g.startsWith("/")?g:"/"},[]),Fe=o.useCallback(async g=>{if(!Te){ae(null),Ye(g.name),ft(!0);try{const U=Ss(),J=new URLSearchParams({provider:g.name,callback_uri:Qe(g)}),Q=M===void 0?void 0:String(M||"").trim(),et=Q===void 0?ie&&ie!=="/"?ie:void 0:Q&&Q.startsWith("/")&&!Q.startsWith("//")?Q:void 0;et&&J.set("post_auth_redirect",et);const R=`${U||""}/api/iam/v1/oauth2/authz/url?${J.toString()}`,F=await fetch(R),T=await F.json(),xe=T?.autorization_url;if(!F.ok||!xe)throw new Error(T?.message||"Unable to start social sign-in.");window.location.assign(xe)}catch(U){const J=wi(U);ae(J),ge(J,{variant:"error"}),Ye(null),ft(!1)}}},[Qe,ie,ge,Te,M]);o.useEffect(()=>{_e&&Je.current?.focus()},[_e]);const re=o.useCallback(()=>{qe(!1),Re("")},[]),_=o.useCallback(()=>{!he.trim()||!s||(s(he.trim()),re())},[he,s,re]),Ze=o.useCallback(()=>{if(ue){ue();return}window.location.assign(Ot)},[ue,Ot]),Ae=o.useCallback(()=>{if(we){if(we.startsWith("http://")||we.startsWith("https://")){window.open(we,"_blank","noopener,noreferrer");return}window.location.assign(we)}},[we]),ze=o.useCallback(async()=>{if(!(y||!ne||!ye||P)){Le(!0),ae(null);try{const g=await fetch(j,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({handle:ne,password:ye})});if(!g.ok)throw new Error(`HTTP ${g.status}`);const U=await g.json();if(U.success&&U.token){const J=String(U?.user?.id||U?.user?.uid||"").trim();if(!!U?.user?.mfaUrl&&J){pt(J),Bt(U.token),ae(null);return}e&&e(U.token,ne)}else ae(U.message||"Invalid username or password.")}catch(g){ae(g instanceof Error?g.message:String(g))}finally{Le(!1)}}},[y,ne,ye,P,j,e]),Be=o.useCallback(async()=>{if(!(y||P||!q||!Ie.trim()||!Ee)){Le(!0),ae(null);try{const g=new URL(j,window.location.origin),U=g.pathname.endsWith("/api/iam/v1/login")?g.href.replace(/\/api\/iam\/v1\/login$/,""):`${g.origin}`,J=await fetch(`${U}/api/iam/v1/users/${q}/mfa/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userUid:q,code:Ie.trim()})}),Q=await J.json();if(!J.ok||!Q?.success)throw new Error(Q?.message||"Failed to validate your MFA code.");e&&e(Ee,ne)}catch(g){const U=g instanceof Error?g.message:String(g);ae(U),ge(U,{variant:"error"})}finally{Le(!1)}}},[y,ge,ne,P,j,Ie,Ee,q,e]),X=o.useCallback(g=>{g.key==="Enter"&&(q?Be():ze())},[q,ze,Be]),Xe=Te||P||y;return t.jsxs(h,{className:"signin-input-theme-scope",display:"flex",alignItems:O||Se||!k?"flex-start":"center",justifyContent:"center",minHeight:O||Se||!k?"auto":"100vh",bg:O?"transparent":"canvas.default",color:"fg.default",py:O?0:Se?2:4,children:[t.jsx(Ti,{}),t.jsxs(h,{width:"100%",maxWidth:440,p:0,children:[!O&&t.jsxs(t.Fragment,{children:[t.jsxs(h,{display:"flex",alignItems:"center",gap:2,mb:Se?2:3,justifyContent:"center",children:[Ut,t.jsx(It,{sx:{fontSize:3},children:Ke})]}),t.jsx($,{as:"p",sx:{fontSize:1,color:"fg.muted",mb:Se?2:3,textAlign:"center"},children:u})]}),(I||oe)&&t.jsxs(h,{mb:3,textAlign:"center",children:[I&&t.jsx(It,{as:"h3",sx:{fontSize:2,mb:1},children:I}),oe&&t.jsx($,{sx:{color:"fg.muted",fontSize:1},children:oe})]}),!q&&(f||v||m)&&t.jsxs(t.Fragment,{children:[f&&t.jsx(Y,{block:!0,size:"large",leadingVisual:me==="github"?()=>t.jsx(un,{size:"small"}):ji,disabled:Xe,onClick:()=>Fe(mn.github),sx:{mt:Ue,maxWidth:W,mx:"auto"},children:"Sign in with GitHub"}),v&&t.jsx(Y,{block:!0,size:"large",leadingVisual:me==="google"?()=>t.jsx(un,{size:"small"}):Ci,disabled:Xe,onClick:()=>Fe(mn.google),sx:{mt:Ue,maxWidth:W,mx:"auto"},children:"Sign in with Google"}),m&&t.jsx(Y,{block:!0,size:"large",leadingVisual:me==="linkedin"?()=>t.jsx(un,{size:"small"}):ki,disabled:Xe,onClick:()=>Fe(mn.linkedin),sx:{mt:Ue,maxWidth:W,mx:"auto"},children:"Sign in with LinkedIn"})]}),!q&&!L&&t.jsx(h,{mt:3,display:"flex",justifyContent:"center",children:t.jsx(Y,{leadingVisual:bn,size:"large",block:!0,disabled:y||P||Te,onClick:()=>_t(!0),sx:{maxWidth:W,mx:"auto"},children:ke})}),!q&&L&&t.jsxs(h,{mt:4,children:[t.jsxs(ce,{required:!0,sx:{mb:3},children:[t.jsx(ce.Label,{children:"Username"}),t.jsx(Et,{autoFocus:!0,block:!0,placeholder:"Your username",value:ne,disabled:P||y,onChange:g=>ut(g.target.value),onKeyDown:X})]}),t.jsxs(ce,{required:!0,sx:{mb:3},children:[t.jsx(ce.Label,{children:"Password"}),t.jsx(Et,{block:!0,placeholder:"Your password",type:pe?"text":"password",value:ye,disabled:P||y,onChange:g=>Lt(g.target.value),onKeyDown:X,trailingAction:t.jsx(Et.Action,{onClick:()=>Ft(!pe),disabled:P||y,icon:pe?vi:Si,"aria-label":pe?"Hide password":"Show password",sx:{color:"var(--fgColor-muted)"}})})]}),t.jsxs(h,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:3,children:[t.jsx(Y,{variant:"primary",disabled:P||y||!ne||!ye,onClick:ze,children:P?"Signing in…":"Sign In"}),Pt&&t.jsx(vo,{as:"button",sx:{fontSize:1,cursor:y?"not-allowed":"pointer",background:"none",border:"none",opacity:y?.6:1},onClick:()=>{y||P||Ae()},children:fe})]})]}),q&&t.jsxs(t.Fragment,{children:[t.jsxs(ce,{required:!0,sx:{mb:3,mt:2},children:[t.jsx(ce.Label,{children:"MFA Code"}),t.jsx(Et,{autoFocus:!0,block:!0,placeholder:"Your MFA code",value:Ie,disabled:P||y,onChange:g=>zt(g.target.value),onKeyDown:X})]}),t.jsx(Y,{variant:"primary",block:!0,disabled:P||y||!Ie.trim(),onClick:Be,sx:{maxWidth:W,mx:"auto"},children:P?"Validating…":"Validate MFA Code"})]}),mt&&t.jsx($,{sx:{color:"danger.fg",fontSize:1,mt:3,display:"block"},children:mt}),V&&t.jsxs(h,{mt:4,pt:4,textAlign:"center",borderTop:"1px solid",borderColor:"border.muted",children:[t.jsx(It,{as:"h3",sx:{fontSize:2,mb:2},children:z}),t.jsx($,{as:"p",sx:{color:"fg.muted",fontSize:1,mb:3},children:$t}),t.jsx(h,{display:"flex",justifyContent:"center",children:t.jsx(Y,{variant:"primary",size:"large",leadingVisual:So,disabled:y||P,onClick:Ze,children:Mt})})]}),p&&s&&t.jsxs(t.Fragment,{children:[t.jsxs(h,{display:"flex",alignItems:"center",gap:2,my:3,children:[t.jsx(h,{flex:1,height:"1px",bg:"border.default"}),t.jsx($,{sx:{fontSize:0,color:"fg.muted"},children:"or"}),t.jsx(h,{flex:1,height:"1px",bg:"border.default"})]}),t.jsx(Y,{block:!0,leadingVisual:bn,disabled:y||P||Te,onClick:()=>qe(!0),sx:{maxWidth:W,mx:"auto"},children:"Sign in with an API Key"}),_e&&t.jsx(h,{role:"dialog","aria-modal":"true","aria-labelledby":"signin-api-key-title",onKeyDown:g=>{g.key==="Escape"&&re()},onClick:re,position:"fixed",inset:0,zIndex:200,p:3,bg:"canvas.backdrop",display:"flex",alignItems:"center",justifyContent:"center",children:t.jsxs(h,{as:"form",onClick:g=>g.stopPropagation(),onSubmit:g=>{g.preventDefault(),_()},width:"min(560px, 100%)",p:3,borderRadius:2,border:"1px solid",borderColor:"border.default",bg:"canvas.overlay",color:"fg.default",boxShadow:"shadow.large",children:[t.jsx(It,{id:"signin-api-key-title",sx:{fontSize:2,mb:2},children:"Enter your API Key"}),t.jsxs(ce,{required:!0,children:[t.jsx(ce.Label,{children:"API Key"}),t.jsx(yo,{block:!0,required:!0,autoFocus:!0,placeholder:"Paste your API key here",value:he,onInput:g=>Re(g.currentTarget.value),ref:Je})]}),t.jsxs(h,{mt:3,display:"flex",justifyContent:"flex-end",gap:2,children:[t.jsx(Y,{type:"button",onClick:re,children:"Cancel"}),t.jsx(Y,{type:"submit",variant:"primary",disabled:!he.trim(),children:"Authenticate"})]})]})})]})]})]})},ys=ko((e,s)=>({pending:void 0,suggest:(a,i)=>{const c=a.trim();c&&e({pending:{text:c,submit:i?.submit??!1,nonce:(s().pending?.nonce??0)+1}})},consume:()=>e({pending:void 0})}));function Ei(e){const{agentId:s,instructions:a,model:i,frontendTools:c,inference:u,subagents:x,sharing:l,onSubagentEvent:f,modeEffect:v}=e;return{type:"browser-vercel-ai",endpoint:"",agentId:s,enableConfigQuery:!1,options:{instructions:a,model:i,frontendTools:c,inference:u,subagents:x,sharing:l,onSubagentEvent:f,modeEffect:v}}}const Ri=({state:e})=>wo[e];class Ai extends Error{constructor(s,a){super(a),this.status=s,this.name="RuntimeRefusal"}status}function $i({baseUrl:e,getAccessToken:s,fetch:a}){const i=e.replace(/\/+$/,""),c=(f={})=>{const v=s();return{...f,...v?{Authorization:`Bearer ${v}`}:{}}},u=async f=>{throw new Ai(f.status,Eo(f.status,f.statusText,await Ro(f)))};return{json:async(f,v="GET",m)=>{const p=await a(`${i}${f}`,{method:v,headers:c({Accept:"application/json",...m===void 0?{}:{"Content-Type":"application/json"}}),...m===void 0?{}:{body:JSON.stringify(m)}});return p.ok?await p.json():u(p)},stream:async(f,v,{onEvent:m,signal:p},V="POST")=>{const M=await a(`${i}${f}`,{method:V,headers:c({"Content-Type":"application/json",Accept:"text/event-stream"}),body:JSON.stringify(v),signal:p});if(!M.ok)return u(M);await Ao(M,m)},refused:u,headers:c,root:i,fetcher:a}}const Z=e=>`/api/v1/apps/sessions/${encodeURIComponent(e)}`;function Mi(e){const{json:s,stream:a,fetcher:i,headers:c,refused:u,root:x}=$i(e);return{serverUrl:x,accessToken:()=>e.getAccessToken(),start:(l,f)=>a("/api/v1/apps/sessions",{agent:l.agent,...l.deploymentUid?{deployment_uid:l.deploymentUid}:{},...l.appUid?{app_uid:l.appUid}:{},...l.version?{version:l.version}:{},...l.session?{session:l.session}:{},opener:l.opener},f),message:(l,f,v)=>a(`${Z(l)}/messages`,{text:f},v),changeSettings:(l,f,v)=>a(`${Z(l)}/settings`,{values:f},v,"PUT"),resume:(l,f,v)=>a(`${Z(l)}/resume`,{agent:f},v),stop:l=>s(`${Z(l)}/stop`,"POST"),end:l=>s(`${Z(l)}/end`,"POST"),describe:l=>s(Z(l)),described:async l=>Io(await s(Z(l))),list:(l={})=>{const f=new URLSearchParams;for(const[m,p]of Object.entries(l))p!==""&&p!==void 0&&p!==!1&&f.set(m,String(p));const v=f.toString();return s(`/api/v1/apps/sessions${v?`?${v}`:""}`)},swap:(l,f)=>s(`${Z(l)}/agent`,"POST",{agent:f}),clone:(l,f={})=>s(`${Z(l)}/clone`,"POST",{up_to_turn:f.upToTurn??null,agent:f.agent??null,title:f.title??""}),exportFile:async(l,f="")=>{const v=await i(`${x}${Z(l)}/export${f?`?format=${encodeURIComponent(f)}`:""}`,{method:"GET",headers:c()});return v.ok?v.text():u(v)},importFile:async(l,f={})=>{const v=new URLSearchParams;f.agent&&v.set("agent",f.agent),f.format&&v.set("format",f.format);const m=v.toString(),p=await i(`${x}/api/v1/apps/sessions/import${m?`?${m}`:""}`,{method:"POST",headers:c({"Content-Type":"application/x-ndjson"}),body:l});return p.ok?await p.json():u(p)},rename:(l,f)=>s(`${Z(l)}/title`,"PUT",{title:f}),archive:(l,f)=>s(`${Z(l)}/archived`,"PUT",{archived:f}),messages:async l=>To((await s(`${Z(l)}/messages`)).messages)}}const de="";function Oi(e){return{surfaceId:!e||e===Ts?de:e,suspendedId:null}}function Pi({agentName:e,sandboxStillRuns:s=!1,temporary:a=!0,onSignedIn:i,onSignUp:c}){const{configuration:u}=Is(),x=o.useCallback(l=>{$o.getState().checkIAMToken(l),i?.()},[i]);return t.jsx(h,{height:"100%",minHeight:0,overflowY:"auto",bg:"canvas.default",px:4,py:4,children:t.jsxs(h,{maxWidth:440,mx:"auto",children:[t.jsxs(h,{display:"flex",alignItems:"center",justifyContent:"center",gap:2,color:"attention.fg",mb:2,children:[t.jsx(bn,{size:20}),t.jsx($,{sx:{fontSize:2,fontWeight:"semibold",color:"fg.default"},children:a?"This demo runs on a shared key":"Your key has expired"})]}),t.jsxs($,{as:"p",sx:{fontSize:1,color:"fg.muted",textAlign:"center",mb:3},children:[a?`${e??"The agent"} has used the time this key allows. Sign in to point your own agent at it, use your own data, and drop the time limit.`:`${e??"The agent"} stopped because your session ran out.`,s?" Your notebook is still running in this page.":""]}),a&&t.jsxs(h,{display:"flex",flexDirection:"column",alignItems:"center",gap:2,mb:3,"data-anonymous-key-refresh":"",children:[t.jsx($,{sx:{fontSize:1,color:"fg.muted",textAlign:"center"},children:"Or keep trying without an account: refreshing the page gives this demo a new key, and starts the conversation over."}),t.jsx(Y,{leadingVisual:Mo,onClick:()=>{typeof window<"u"&&window.location.reload()},children:"Refresh the page for a new key"})]}),t.jsx(Ii,{hideHero:!0,fillHeight:!1,calloutTitle:"Sign in to keep going",github:!0,google:!0,linkedin:!0,socialSignInNavigationTarget:typeof window>"u"?void 0:`${window.location.pathname}${window.location.search}`,loginUrl:u?.iamUrl?`${u.iamUrl}/api/iam/v1/login`:void 0,onSignIn:x,onSignUp:c})]})})}const Ui="https://r1.datalayer.run";function Li(e=!0,s=""){const{configuration:a}=Is(),i=vn(f=>f.token),c=a?.aiInferenceUrl||Ui,u=Oo(c,e&&!i,s),x=i||u.token,l=o.useMemo(()=>({inferenceUrl:c,token:x||void 0}),[c,x]);return{inference:l,needsSignIn:Po(l),anonymous:u,inferenceUrl:c}}const _i={name:"general-purpose",description:"A capable generalist for a task none of the specialists covers: research, reasoning, drafting, checking.",instructions:"You are a capable general-purpose assistant. Carry out the task you are given completely and report the result plainly, saying what you could not do."};function js(e){const s=e?.subagents;if(!s)return[];const a=(s.subagents??[]).map(i=>{const c=i.ref?Uo(i.ref):void 0;return{name:i.name,description:i.description||c?.description||i.name,instructions:i.instructions??c?.systemPrompt,model:i.model??c?.model??s.defaultModel,icon:c?.icon}});return s.includeGeneralPurpose?[...a,_i]:a}const Ps=e=>e.replace(/\/+$/,""),Fi=e=>e.split(":")[0];function zi(e,s){return`${Ps(e)}/api/v1/apps/agents/${encodeURIComponent(s)}/equipment`}function Bi(e,s){return`${Ps(e)}/api/v1/configure/models?agent_id=${encodeURIComponent(s)}`}const Ni=["started","starting","failed","not_started","left_out"],gn=e=>Array.isArray(e)?e.filter(s=>typeof s=="string"):[];function Vi(e){const s=e??{};return{servers:(s.mcp_servers??[]).map(a=>({id:String(a.id??""),name:String(a.name??a.id??""),optional:a.optional===!0,state:Ni.includes(a.state)?a.state:"not_started",...typeof a.reason=="string"&&a.reason?{reason:a.reason}:{},missingEnvVars:gn(a.missing_env_vars),...typeof a.tools=="number"?{tools:a.tools}:{}})),skills:(s.skills??[]).map(a=>({id:String(a.id??""),name:String(a.name??a.id??""),description:String(a.description??""),optional:a.optional===!0,state:a.state==="not_activated"?"not_activated":"active",...typeof a.reason=="string"&&a.reason?{reason:a.reason}:{},missingEnvVars:gn(a.missing_env_vars),oneOfEnvVars:gn(a.one_of_env_vars)}))}}function Di(e){const s=e?ms[e]??ms[Fi(e)]:void 0,a=new Set(s?.optional?.mcpServers??[]),i=new Set(s?.optional?.skills??[]),c=s?[s.model,...s.modelAdditionals??[]].filter(u=>!!u):[];return{source:"declared",modelsSource:"declared",servers:(s?.mcpServers??[]).filter(Boolean).map(u=>({id:u.id,name:u.name||u.id,optional:a.has(u.id),missingEnvVars:[]})),skills:(s?.skills??[]).filter(Boolean).map(u=>({id:u.id,name:u.name||u.id,description:u.description??"",optional:i.has(u.id),missingEnvVars:[],oneOfEnvVars:[]})),models:[...new Set(c)].map((u,x)=>({id:u,name:Lo(u)?.name??u,current:x===0}))}}function Hi(e,s){const a=Es(e),i=a.find(c=>c.id===s)?.id??a.find(c=>c.isAvailable!==!1)?.id;return a.map(c=>({...c,current:c.id===i}))}function Wi({agentServerUrl:e,agentId:s,token:a,specId:i,model:c,enabled:u,refreshMs:x=3e4}){const l=o.useMemo(()=>Di(i),[i]),[f,v]=o.useState(),[m,p]=o.useState();return o.useEffect(()=>{if(v(void 0),p(void 0),!u||!e||!s)return;let V=new AbortController;const M=a?{Authorization:`Bearer ${a}`}:{},y=()=>{V.abort(),V=new AbortController;const{signal:O}=V;fetch(zi(e,s),{headers:M,signal:O}).then(I=>I.ok?I.json():null).then(I=>{!O.aborted&&I&&v(Vi(I))}).catch(()=>{}),fetch(Bi(e,s),{headers:M,signal:O}).then(I=>I.ok?I.json():null).then(I=>{if(!O.aborted&&I){const oe=Hi(I,c);p(oe.some(ke=>ke.isAvailable!==!1)?oe:void 0)}}).catch(()=>{})};y();const k=setInterval(y,x);return()=>{clearInterval(k),V.abort()}},[u,e,s,a,c,x]),o.useMemo(()=>({source:f?"live":"declared",servers:f?.servers??l.servers,skills:f?.skills??l.skills,modelsSource:m&&m.length>0?"live":"declared",models:m&&m.length>0?m:l.models}),[f,m,l])}const N={readOnly:"Chosen by the application. Shown for you to read: nothing here changes it.",declared:"As its spec declares them: its runtime has not said their state yet.",model:"Model",servers:"MCP servers",skills:"Skills",none:{servers:"It uses no MCP server.",skills:"It has no skill."},optional:"optional",serverState:{started:"Running",starting:"Starting",failed:"Failed",not_started:"Not started",left_out:"Off"},skillState:{active:"Active",not_activated:"Not activated"},modelState:{current:"In use",available:"Available",off:"Not available"},declaredState:"Declared"},Gi={success:{fg:"success.fg",bg:"success.subtle"},attention:{fg:"attention.fg",bg:"attention.subtle"},danger:{fg:"danger.fg",bg:"danger.subtle"},accent:{fg:"accent.fg",bg:"accent.subtle"},neutral:{fg:"fg.muted",bg:"neutral.subtle"}};function Ki(e){const s=N.serverState,a=e.state;return{id:e.id,name:e.name,state:a?s[a]:N.declaredState,tone:a==="started"?"success":a==="failed"?"danger":a==="starting"?"attention":"neutral",on:a==="started",...e.reason?{reason:e.reason}:{},...a==="started"&&e.tools!==void 0?{note:`${e.tools} ${e.tools===1?"tool":"tools"}`}:e.optional?{note:N.optional}:{}}}function Yi(e){const s=e.state;return{id:e.id,name:e.name,state:s?N.skillState[s]:N.declaredState,tone:s==="active"?"success":"neutral",on:s==="active",...e.reason?{reason:e.reason}:{},...e.optional?{note:N.optional}:{}}}function qi(e){const s=e.isAvailable===!1;return{id:e.id,name:e.name,state:e.current?N.modelState.current:s?N.modelState.off:N.modelState.available,tone:e.current?"accent":s?"neutral":"success",on:!s,...s&&e.unavailableReason?{reason:e.unavailableReason}:{}}}function Ji(e){return[e.name,e.state,e.reason,e.note].filter(Boolean).join(", ")}function hn({kind:e,icon:s,title:a,rows:i,count:c,summary:u,empty:x,declared:l=!1,align:f="start"}){const v=`${a} — ${u}`;return t.jsxs(Ge,{children:[t.jsx(Ge.Anchor,{children:t.jsx(zo,{text:v,direction:"n",children:t.jsx(Y,{type:"button",variant:"invisible",size:"small","aria-label":v,leadingVisual:s,"data-equipment-menu":e,"data-equipment-source":l?"declared":"live",children:t.jsx($,{sx:{fontSize:0,fontVariantNumeric:"tabular-nums",maxWidth:160,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",verticalAlign:"bottom",...e==="model"?{"@media (max-width: 480px)":{display:"none"}}:{}},children:c})})})}),t.jsx(Ge.Overlay,{side:"outside-top",align:f,width:"medium",children:t.jsxs(h,{maxHeight:"60vh",overflowY:"auto",children:[t.jsx(te,{"aria-label":a,children:t.jsxs(te.Group,{children:[t.jsxs(te.GroupHeading,{children:[a,i.length>0?` · ${u}`:""]}),i.length===0?t.jsx(te.Item,{onSelect:m=>m.preventDefault(),sx:{color:"fg.muted"},children:x}):i.map(m=>{const p=Gi[m.tone];return t.jsxs(te.Item,{onSelect:V=>V.preventDefault(),"aria-label":Ji(m),"data-equipment-row":m.id,"data-equipment-on":m.on?"true":"false",sx:m.on?void 0:{color:"fg.muted"},children:[m.name,t.jsx(te.TrailingVisual,{children:t.jsx($,{sx:{fontSize:"11px",px:"6px",py:"1px",borderRadius:999,bg:p.bg,color:p.fg,whiteSpace:"nowrap"},children:m.state})}),m.reason||m.note?t.jsx(te.Description,{variant:"block",children:[m.reason,m.note].filter(Boolean).join(" · ")}):null]},m.id)})]})}),t.jsxs(h,{px:3,py:2,borderTop:"1px solid",borderColor:"border.muted","data-equipment-note":"",children:[t.jsx($,{sx:{fontSize:0,color:"fg.muted",display:"block"},children:N.readOnly}),l?t.jsx($,{sx:{fontSize:0,color:"fg.muted",display:"block"},children:N.declared}):null]})]})})]})}const Cs=(e,s,a)=>a?String(s):`${e}/${s}`;function Qi({equipment:e}){const s=e.source==="declared",a=e.servers.map(Ki),i=e.skills.map(Yi),c=e.models.map(qi),u=a.filter(f=>f.on).length,x=i.filter(f=>f.on).length,l=e.models.find(f=>f.current);return t.jsxs(h,{display:"inline-flex",alignItems:"center",role:"group","aria-label":"What this application runs with","data-equipment-bar":e.source,children:[t.jsx(hn,{kind:"servers",icon:yi,title:N.servers,rows:a,count:Cs(u,a.length,s),summary:a.length===0?"none":s?`${a.length} declared`:`${u} of ${a.length} running`,empty:N.none.servers,declared:s}),t.jsx(hn,{kind:"skills",icon:_o,title:N.skills,rows:i,count:Cs(x,i.length,s),summary:i.length===0?"none":s?`${i.length} declared`:`${x} of ${i.length} active`,empty:N.none.skills,declared:s}),c.length>0?t.jsx(hn,{kind:"model",icon:Fo,title:N.model,rows:c,count:l?.name??String(c.length),summary:l?`${l.name}, of ${c.length} it may run on`:`${c.length} it may run on`,declared:e.modelsSource==="declared",align:"end"}):null]})}function Zi(e){return e.replace(/^datalayer_/,"").replace(/_lexical$/,"")}function Xi(e){const s=Zi(e);return/^executeCodeIn(Notebook|Document)$/.test(s)||/^(read|list)[A-Z]/.test(s)}function er(e,s){return e.filter(a=>s?.has(a.name)||Xi(a.name))}function tr(e,s){const a=i=>s&&i.value.id===`${s}-tools`?0:i.value.id==="notebook-tools"?1:2;return e.map((i,c)=>({entry:i,index:c,rank:a(i)})).sort((i,c)=>i.rank-c.rank||i.index-c.index).map(i=>i.entry)}function nr(e,s,a){if(!a||!e.endsWith("-tools"))return!1;const i=e.slice(0,-6);return s.has(i)&&i!==a}const sr={type:"object",properties:{}};function or(e,s){const a=new Set(e.toolset);return e.commands.filter(i=>a.has(i.name)).map(i=>({name:i.name,description:i.description,parameters:i.parameters??sr,location:"frontend",handler:async c=>{if(!s)throw new Error(`${i.name}: the ${e.plugin??e.id} plugin is not mounted on this page.`);const u=Object.keys(c??{}).length>0?c:void 0,x=await s.executeCommand(i.command,u);return x===void 0?{ok:!0,command:i.command,argument:u}:x}}))}function Us(e,s){return e.flatMap(a=>or(a,s))}function ar(){const e=Bo(),s=Os();return o.useMemo(()=>Us(s,e),[s,e])}function ir(e){const s=e?.app_instance;if(!s||typeof s!="object")return"";const a=s.deployment_uid;return typeof a=="string"?a.trim():""}function rr(e,s,a){return e||!s?e:{id:a,messages:[]}}function lr(e){const s=(new URLSearchParams(e).get("session")??"").trim();if(!s)return"";if(!/^[A-Za-z0-9_-]{8,128}$/.test(s))throw new Error(`?session=${s} names no session: a session uid is 8 to 128 letters, digits, hyphens or underscores.`);return s}function cr({facts:e}){if(!e)return null;const s=No(e);return t.jsxs(h,{display:"inline-flex",alignItems:"center",gap:2,"data-session-state":e.state,children:[t.jsx(Vo,{size:"small",variant:e.state==="open"?"accent":e.state==="paused"?"attention":"secondary",children:Do(e)}),s?t.jsx($,{sx:{fontSize:0,color:"fg.muted"},"data-session-lineage":"",children:s}):null]})}function dr({facts:e,turn:s,context:a}){const i=K(Rs),c=As(i,e,"turn");return!e||c.length===0||s<1?null:t.jsx(h,{display:"inline-flex",gap:1,"data-turn-actions":s,children:c.map(u=>t.jsx(Y,{size:"small",variant:"invisible","data-turn-action":u.id,onClick:()=>{Promise.resolve(u.run(e,{...a,atTurn:s})).catch(x=>a.say(String(x.message??x)))},children:u.label},u.id))})}function ur({uid:e,describe:s,context:a}){const i=K(Rs),[c,u]=o.useState(void 0),[x,l]=o.useState(!1),[f,v]=o.useState(""),[m,p]=o.useState(void 0),V={...a,show:a.show??p,say:k=>{v(k),a.say(k)}},M=o.useCallback(k=>{l(k),k&&e&&s(e).then(u,()=>u(void 0))},[s,e]);if(!e||i.length===0)return null;const y=As(i,c);return t.jsxs(t.Fragment,{children:[t.jsxs(Ge,{open:x,onOpenChange:M,children:[t.jsx(Ge.Anchor,{children:t.jsx($s,{icon:Ho,"aria-label":"Session actions",variant:"invisible",size:"small","data-testid":"session-actions"})}),t.jsx(Ge.Overlay,{width:"small",children:t.jsxs(te,{children:[y.length===0?t.jsx(te.Item,{disabled:!0,children:c?"Nothing applies to this session now.":"Reading the session…"}):y.map(k=>t.jsx(te.Item,{"data-session-action":k.id,onSelect:()=>{c&&Promise.resolve(k.run(c,V)).catch(O=>V.say(String(O.message??O)))},children:k.label},k.id)),f?t.jsxs(t.Fragment,{children:[t.jsx(te.Divider,{}),t.jsx(te.Item,{disabled:!0,"data-testid":"session-actions-said",children:f})]}):null]})})]}),m?t.jsx(Ms,{title:m.title,onClose:()=>p(void 0),width:"large",children:t.jsx(h,{"data-session-panel":"",children:m.render()})}):null]})}const ks={confirm:"Switch",cancel:"Keep it"};function fr({question:e,onPick:s}){const[a,i]=o.useState(e.options[0]?.id??""),[c,u]=o.useState("");o.useEffect(()=>{let l=!0;if(!e.says||!a){u("");return}return e.says(a).then(f=>l&&u(f),()=>l&&u("")),()=>{l=!1}},[a,e]);const x=e.options.find(l=>l.id===a);return t.jsx(Ms,{title:e.title,onClose:()=>s(void 0),width:"medium",footerButtons:[{buttonType:"default",content:ks.cancel,onClick:()=>s(void 0)},{buttonType:"primary",content:ks.confirm,disabled:!a,onClick:()=>s(a||void 0)}],children:t.jsxs(h,{display:"grid",gap:3,"data-session-choose":"",children:[t.jsxs(ce,{children:[t.jsx(ce.Label,{children:e.title}),t.jsx(gs,{value:a,onChange:l=>i(l.target.value),block:!0,children:e.options.map(l=>t.jsx(gs.Option,{value:l.id,children:l.label},l.id))})]}),x?.description?t.jsx($,{sx:{fontSize:1,color:"fg.muted"},children:x.description}):null,c?t.jsx($,{as:"p",sx:{m:0,fontSize:1,fontStyle:"italic"},"data-session-choose-says":"",children:c}):null]})})}const pr="var(--theme-accent)";function Ls({face:e,size:s}){return typeof e=="string"?t.jsx(Wo,{emoji:e,size:s,label:""}):t.jsx(t.Fragment,{children:e})}function mr({face:e,size:s,state:a}){const i=a==="thinking"||a==="working",c=a==="paused";return t.jsxs(h,{as:"span","aria-hidden":!0,"data-presence":a,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:s+8,height:s+8,flexShrink:0,fontSize:s,lineHeight:1,children:[t.jsx(h,{as:"span",position:"absolute",inset:0,borderRadius:"50%",boxShadow:c?"none":`0 0 0 2px ${pr}`,border:c?"2px dashed":"none",borderColor:"border.default",opacity:i||a==="waiting"||c?.9:0,transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",animation:i?"loopPresenceBreath 1.8s ease-in-out infinite":"none",reducedMotion:{animation:"none"},sx:{"@keyframes loopPresenceBreath":{"0%, 100%":{transform:"scale(0.92)",opacity:.35},"50%":{transform:"scale(1.06)",opacity:.9}}}}),t.jsx(h,{as:"span",display:"inline-flex",opacity:c?.55:1,filter:c?"grayscale(0.6)":"none",transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",children:t.jsx(Ls,{face:e,size:s})})]})}function gr({state:e}){return t.jsx($,{role:"status","aria-live":"polite","data-presence-line":e,sx:{fontSize:0,color:e==="waiting"?"fg.default":"fg.muted",fontWeight:e==="waiting"?"semibold":"normal",whiteSpace:"nowrap",flexShrink:0},children:Ri({state:e})})}const hr=Sn(void 0),xr=Sn(""),br=Sn({}),vr=1400,ws=parseInt(xi["--loop-face-large"],10),Sr={};function Tr({workspace:e}){const s=Go(),a=Ko(),i=o.useRef(null),c=o.useRef(void 0),{setViewControls:u}=e,x=o.useRef(e.setThread);x.current=e.setThread;const l=o.useCallback(()=>{const n=i.current?.thread();return n&&x.current?.(n),n},[]),[f,v]=o.useState(null),m=Yo(),p=m.getConfig(qo),V=p?.placeholder||s.placeholder,M=p?.defaultSurface??"notebook",y=m.getConfig(Jo),[k,O]=o.useState(de),[I,oe]=o.useState(null),ke=o.useRef(!1),z=K(Qo),$t=K(Zo),Mt=K(Xo),ue=K(ea)[0]?.value,fe=fn(ue?.promptStance??hr)??ue?.prompt,Pt=K(ta),Ue=na(Pt[0]?.value),W=o.useRef(Ue);W.current=Ue;const Se=o.useRef(""),Ke=K(sa),Ut=o.useMemo(()=>oa(()=>Ke.reduce((n,r)=>aa(n,r.value.extras.value),{})),[Ke]),j=fn(Ke.length>0?Ut:br),ne=o.useRef(new Set),ut=ia(gi,e),ye=!ut.allowed,Lt=ye?ut.reason??"Chat is unavailable for this sandbox":void 0,[L,_t]=o.useState(!1),[pe,Ft]=o.useState(!1),[P,Le]=o.useState(!1),[Te,ft]=o.useState({open:!1,pendingApproval:!1}),me=ra(L,Te,p?.presence?.paused===!0),Ye=p?.presence?.onPresence;o.useEffect(()=>{Ye?.(me),W.current?.setPresence(me)},[Ye,me]);const q=o.useRef(p?.presence?.onSaying);q.current=p?.presence?.onSaying;const pt=o.useRef({answering:!1}),Ie=o.useCallback(n=>{i.current=n,Ft(!!n)},[]),zt=o.useCallback(n=>{const{open:r,pendingApproval:d}=la(n);ft(Pe=>Pe.open===r&&Pe.pendingApproval===d?Pe:{open:r,pendingApproval:d});const S={saying:da(n),answering:ca(n)},b=pt.current;(b.saying?.id!==S.saying?.id||b.saying?.text!==S.saying?.text||b.answering!==S.answering)&&(pt.current=S,q.current?.(S));const ee=W.current;if(!ee)return;ee.items(n);const B=new Set(["complete","completed","done","error","failed","cancelled","canceled","rejected","denied","stopped"]),le={insertcell:"adding a cell",updatecell:"editing a cell",runcell:"running a cell",deletecells:"removing cells",readallcells:"reading the notebook",readcell:"reading a cell",executecode:"running code",insertblock:"adding a block",updateblock:"editing a block",runblock:"running a block",readdocument:"reading the document"};let C;for(let Pe=n.length-1;Pe>=0;Pe-=1){const Tt=n[Pe];if(typeof Tt.toolName=="string"&&Tt.toolCallId){B.has(String(Tt.status).toLowerCase())||(C=Tt);break}}if(!C){ee.activity(void 0);return}const Oe=C.toolName.toLowerCase().replace(/^datalayer_/,"").replace(/_lexical$/,"").replace(/[^a-z]/g,""),go=le[Oe]??`using ${C.toolName}`;ee.activity(`${Se.current||"The agent"} is ${go}…`)},[]),Ee=o.useRef(j);Ee.current=j;const Bt=o.useCallback(n=>{qs(n),W.current?.usage(n),Ee.current.onUsage?.(n)},[]),mt=o.useCallback(n=>{_t(n),n||W.current?.end("done")},[]),ae=o.useCallback(n=>{const r=W.current;if(!r)return;let d=-1;for(let b=n.length-1;b>=0;b-=1)if(n[b].role==="user"){d=b;break}const S=n.slice(d+1).filter(b=>b.role==="assistant").map(ua).filter(b=>b.trim().length>0).join(`
|
|
29
29
|
|
|
30
|
-
`);r.assistant(S)},[]),ge=o.useRef([]),_e=o.useRef(!1),
|
|
30
|
+
`);r.assistant(S)},[]),ge=o.useRef([]),_e=o.useRef(!1),qe=o.useRef(void 0),he=o.useRef(void 0),Re=o.useRef(void 0),Je=K(fa),Qe=o.useRef(Je);Qe.current=Je;const ie=o.useCallback((n,r)=>{if(he.current)return he.current;const d=Re.current;Re.current=void 0;const S=pa(Qe.current.map(B=>B.value),d?{...r??{},voice:d}:r),b=S?.loop;if(_e.current&&b?.files&&b.files.length>0){const B=qe.current;if(!B)return"A file is given to an application running on a runtime: run it on Datalayer or on your machine to give it one.";let le;try{le=b.files.map(C=>({file:ga(String(C.name??"")),base64:ma(String(C.data_url??""))}))}catch(C){return C instanceof Error?C.message:String(C)}B.execute(ha(le)).then(C=>{if(!C.success){v(`The files could not be put in the sandbox: ${C.error??"it failed"}.`);return}ie(`${n}
|
|
31
31
|
|
|
32
|
-
${xa(le.map(Oe=>Oe.file))}`,{...S,loop:Object.fromEntries(Object.entries(b).filter(([Oe])=>Oe!=="files"))})});return}W.current?.begin(n,l());const ee=i.current?.send;if(!ee){ge.current.push([n,S]);return}ee(n,S)},[l]);o.useEffect(()=>{u(pe?{busy:L,stop:i.current?.stop,newChat:i.current?.newChat,send:ie}:null)},[L,pe,u,ie]),o.useEffect(()=>()=>u(null),[u]),o.useEffect(()=>e.prompts.subscribe(ie),[e.prompts,ie]),o.useEffect(()=>{if(!pe||ge.current.length===0)return;const n=ge.current.splice(0,ge.current.length);for(const[r,d]of n)l(),i.current?.send(r,d)},[pe,l]);const Fe=o.useRef(!1),re=o.useCallback(async n=>{v(null);const r=await ba(Re.current,n);if(r){r.sent?at(""):v(r.refused);return}Fe.current||(Fe.current=!0,y?.firstPromptHook?.());const d=await e.submit(n);if(!d.handled){v(d.reason??null);return}at(""),d.result?.content&&v(d.result.content)},[e,y?.firstPromptHook]),_=o.useMemo(()=>z.find(n=>n.value.surfaceId===k)?.value,[z,k]),Xe=o.useCallback(n=>{ke.current=!0;const r=Oi(n);oe(r.suspendedId),O(r.surfaceId)},[]);o.useEffect(()=>va(Xe),[Xe]),o.useEffect(()=>{Sa(z.map(n=>n.value.surfaceId))},[z]),o.useEffect(()=>{ya(k&&k!==de?k:Ts)},[k]);const Ae=o.useMemo(()=>M===de||M==="none"?void 0:z.find(n=>n.value.surfaceId===M),[z,M]);o.useEffect(()=>{ke.current||!Ae||dt(Ae.value,e)&&O(M)},[Ae,e,M]);const ze=o.useRef(null),Be=p?.fullScreenTopOffset??0,{fullScreen:Z,usingApi:Ze,toggle:g,topOffsetPx:U}=ja(ze,{forceOverlay:!!Be,topOffset:Be}),[J,Q]=o.useState(!1),et=o.useRef(!1);o.useEffect(()=>{!L||et.current||Z||(et.current=!0,Q(!0))},[L,Z]),o.useEffect(()=>{Z&&Q(!1)},[Z]),o.useEffect(()=>{_&&!dt(_,e)&&(oe(_.surfaceId),O(de))},[_,e]);const gt=o.useMemo(()=>{if(I)return z.find(n=>n.value.surfaceId===I)?.value;if(!ke.current&&k===de)return Ae?.value},[z,I,k,Ae]);o.useEffect(()=>{if(!I||k!==de)return;const n=z.find(r=>r.value.surfaceId===I);n&&dt(n.value,e)&&(oe(null),O(I))},[z,k,I,e]);const E=e.agentId?.trim()||"default",F=Ca(e.sandbox.target??"local");_e.current=F;const T=ka(),xe=fn(T?.selected??xr),R=T?.members.find(n=>n.id===xe),yn=K(wa)[0]?.value,Nt=yn?.specId,A=hs(R?.specId??E)??(Nt?hs(Nt):void 0),Ne=R?void 0:yn,jn=F&&!R?mi(Nt,A):void 0;Se.current=R?.name??A?.name??E;const Cn=K(Ta),kn=j.hiddenOpeners,wn=j.hideOpeners,Vt=j.openers,Dt=o.useMemo(()=>{if(wn)return[];const n=new Set(kn??[]),r=C=>n.size===0?C:C.filter(Oe=>!n.has(Oe.text));if(Vt)return r(Vt);const d=Cn.flatMap(C=>C.value.suggestions);if(d.length>0)return r(d);const S=r(A?.suggestions??[]),b=r(T?.team.suggestions??[]);if(b.length===0)return S;const ee=new Set(b.map(C=>C.text)),B=T?.team.name??"Team",le=R?.name??A?.name??E;return[...b.map(C=>({...C,group:B})),...S.filter(C=>!ee.has(C.text)).map(C=>({...C,group:le}))]},[Cn,T,A,R,E,kn,wn,Vt]),ht=o.useMemo(()=>Dt.map(n=>({title:n.summary??n.text,message:n.message??n.text,group:n.group})),[Dt]),Ht=We(A?.icon),D=p?.presence,_s=We(T?.team.icon),Tn=K(Ia),xt=o.useMemo(()=>{const n=[],r=new Map,d=new Set,S=new Set(z.map(b=>b.value.surfaceId));for(const b of tr(Tn,_?.surfaceId)){if(nr(b.value.id,S,_?.surfaceId))continue;let ee;try{ee=b.value.tools(e)}catch(B){console.warn(`[loop] frontend tools from '${b.plugin}' failed:`,B);continue}for(const B of ee){const le=r.get(B.name);if(le){console.warn(`[loop] frontend tool '${B.name}' from '${b.plugin}' is shadowed by the one from '${le}'.`);continue}r.set(B.name,b.plugin),n.push(B),b.value.chatView&&d.add(B.name)}}for(const b of j.frontendTools??[])r.has(b.name)||(r.set(b.name,"chat-extras"),n.push(b),d.add(b.name));return _?n:er(n,d)},[Tn,e.surfaceId,e.agentId,j.frontendTools,_?.surfaceId,z]),Wt=ar(),tt=o.useMemo(()=>{if(Wt.length===0)return xt;const n=new Set(xt.map(r=>r.name));return[...xt,...Wt.filter(r=>!n.has(r.name))]},[xt,Wt]),In=Os(),Gt=j.agentToolBundles,Fs=o.useMemo(()=>{const n=j.frontendTools??[];if(!Gt?.length)return j.frontendTools;const r=Us(In.filter(S=>Gt.includes(S.id)),m),d=new Set(n.map(S=>S.name));return[...n,...r.filter(S=>!d.has(S.name))]},[j.frontendTools,Gt,In,m]);Ye.current=F&&tt.some(n=>n.name===Ra)?m.getOutput(ct)?.sandbox:void 0;const w=Ea(e.sandbox,e.serverUrl),nt=o.useMemo(()=>Mi({baseUrl:w??"",getAccessToken:()=>c.current,fetch:(n,r)=>fetch(n,r)}),[w]),Rn=K(Aa),zs=o.useMemo(()=>Rn.filter(n=>n.value.composer).map(n=>({name:n.value.name,description:n.value.description})),[Rn]),Bs=o.useMemo(()=>{if(!T||!R)return js(A).map(d=>({name:d.name,description:d.description,icon:We(d.icon)}));const n=T.members.map(d=>({name:d.name,description:d.description,emoji:d.emoji,icon:We(d.icon),disabled:d.id===R.id,disabledReason:d.id===R.id?`You are already talking to ${d.name}`:void 0})),r=xs(T.team,R.id).filter(d=>!T.members.some(S=>S.name===d.name)).map(d=>({name:d.name,description:d.description,icon:We(d.icon)}));return[...n,...r]},[T,R,A]),Ns=$a(m.getConfig(ct)),{inference:En,anonymous:Vs}=Li(F,Ns),Kt=vn(n=>n.user),qt=F&&Vs.status==="expired",An=!Kt,st=Ma();he.current=st.disabled?st.disableReason||"This conversation is closed here.":void 0;const bt=w===void 0?Oa(e.sandbox,s):void 0,vt=m.getConfig(ct)?.datalayerVisitors,Yt=Pa(vt),se=p?.anonymous,Jt=Ua(se?.maxTurns),Qt=!!(se&&vt&&!Yt.error&&e.sandbox.state!=="error"&&(!Yt.token||w===void 0)),St=se?Jt.refused:"",$n=o.useRef(!1),Mn=Jt.take;o.useEffect(()=>{se&&L&&!$n.current&&Mn(),$n.current=L},[se,L,Mn]);const Ds=La(se??Sr),ot=Qt||!!St||ye||qt||!!jn||!!bt||st.disabled,On=Qt?_a.validating:St||(qt?An?s.demoKeyExpired:s.keyExpired:jn??bt??Lt??(st.disabled?st.disableReason:void 0)),[Xt,at]=o.useState(""),[Pn]=Fa(),it=o.useMemo(()=>p?.voice?za(p.voice,Pn):void 0,[p?.voice,Pn]),[Hs,Ws]=o.useState(!1),[Gs,Un]=o.useState(),yt=Gs??Ne?.model??A?.model??e.model??"",Ve=Ba(),Ln=o.useRef(Ve),_n=o.useRef(xe),Fn=o.useRef(Ve);Fn.current=Ve,o.useEffect(()=>{_n.current!==xe&&(_n.current=xe,Ln.current=Fn.current,Un(void 0))},[xe]);const Ks=Ve&&Ve!==Ln.current?Ve:null,[qs,Ys]=o.useState(),Js=Ks??qs??null,Qs=Et(Ce.inpromptMenu),zn=Et(Ce.promptAction),Bn=Et(Ce.chatHeader),Nn=Et(Ce.chatBanner),Xs=o.useMemo(()=>T?.members.map(n=>({id:n.id,name:n.name,description:n.description,icon:We(n.icon)}))??[],[T]),$e=ys(n=>n.pending),[Vn,Zs]=o.useState(0);o.useEffect(()=>Na(()=>Zs(n=>n+1)),[]),o.useEffect(()=>{$e&&(at($e.text),ys.getState().consume(),$e.submit&&re($e.text))},[$e]);const Zt=m.getConfig(ct)?.datalayerCreatePayload,G=!!(Ne?.createPayload?.app_spec||Zt?.app_spec),en=ir(Zt),eo=vn(n=>n.token),to=m.getConfig(ct)?.embedToken,be=vt?Yt.token:to||eo;c.current=be||void 0;const no=o.useMemo(()=>Va(p?.voice,be||void 0),[p?.voice,be]),je=!!(en||vt),tn=!!D&&G&&!F,so=Wi({agentServerUrl:w,agentId:E,token:be||void 0,specId:yr(Ne?.createPayload?.app_spec??Zt?.app_spec),enabled:tn});if(je&&!G)throw new Error("A deployment’s page runs its application: its host gave no app_spec.");const[Dn]=o.useState(Da),[nn,oo]=o.useMemo(()=>{try{return[lr(typeof window>"u"?"":window.location.search),""]}catch(n){return["",n instanceof Error?n.message:String(n)]}},[]),[Hn,ao]=o.useState(void 0),H=o.useMemo(()=>Hn??rr(p?.thread??(nn&&G?{id:nn,messages:[],fromRuntime:!0}:void 0),en,Dn),[Hn,p?.thread,nn,G,en,Dn]),[De,Wn]=o.useState(null),io=!!(H?.fromRuntime&&De?.given!==H.id);o.useEffect(()=>{if(!H?.fromRuntime||!G||!w)return;let n=!0;return(async()=>{let r="";for(let d=0;d<4&&n;d+=1)try{const S=await Ha({agentBaseUrl:w,agentId:E,uid:H.id,token:be});n&&Wn({given:H.id,thread:{...H,fromRuntime:!1,messages:S}});return}catch(S){r=S instanceof Error?S.message:String(S),await new Promise(b=>setTimeout(b,1500))}n&&Wn({given:H.id,thread:{id:Wa(),messages:[],onStarted:H.onStarted},said:bs.notOpened(r)})})(),()=>{n=!1}},[H?.id,H?.fromRuntime,G,w,E,be]);const sn=H?.fromRuntime?De?.given===H.id?De.thread:void 0:H,ve=e.thread||sn?.id||"",[Gn,Kn]=o.useState(void 0),[ro,qn]=o.useState(0),Yn=o.useRef("");o.useEffect(()=>{L&&ve&&(Yn.current=ve)},[L,ve]);const Jn=!!H?.fromRuntime||!!(e.thread&&e.thread===ve)||Yn.current===ve;o.useEffect(()=>{if(!G||!w||!ve||L||!Jn)return;let n=!0;return nt.described(ve).then(r=>n&&Kn(r),()=>n&&Kn(void 0)),()=>{n=!1}},[G,w,ve,L,Jn,ro,nt]);const[Qn,Xn]=o.useState(oo),[Zn,es]=o.useState(null),on=o.useRef(null),an=o.useRef(null),ts=o.useRef(null),ns=o.useMemo(()=>({client:nt,say:n=>{Xn(n),qn(r=>r+1)},openThread:n=>{ao({id:n,messages:[],fromRuntime:!0}),qn(r=>r+1)},download:(n,r,d)=>{const S=URL.createObjectURL(new Blob([r],{type:d})),b=document.createElement("a");b.href=S,b.download=n,b.click(),URL.revokeObjectURL(S)},choose:n=>new Promise(r=>{on.current=r,es(n)}),pickFile:n=>new Promise(r=>{const d=ts.current;if(!d){r(void 0);return}an.current=r,d.accept=n,d.value="",d.click()})}),[nt]),jt=o.useMemo(()=>F?Ri({agentId:R?.specId??E,instructions:Ga(A,Ne?.instructions),model:yt||void 0,inference:En,frontendTools:tt,subagents:T&&R?xs(T.team,R.id):js(A),sharing:T?.sharing,onSubagentEvent:n=>hi.getState().appendSubagentEvent(n),modeEffect:Ne?.modeEffect}):w!==void 0?{type:"ag-ui",endpoint:G?`${w}/api/v1/apps/agents/${encodeURIComponent(E)}/ag-ui/`:`${w}/api/v1/ag-ui/${E}/`,...G&&be?{authToken:be}:{},...G?{uiSocket:`${w.replace(/^http/,"ws")}/api/v1/apps/ui`,uiFiles:`${w}/api/v1/apps/agents/${encodeURIComponent(E)}/files`,appSessions:`${w}/api/v1/apps/sessions`,...je?{ownRoutesOnly:!0}:{}}:{},agentId:E,configEndpoint:`${w}/api/v1/configure`,enableConfigQuery:!0}:void 0,[E,F,En,R,tt,T,A,Ne,yt,w,G,be,je]),Ct=Ka(!F&&jt?.type==="ag-ui",jt?.type==="ag-ui"?jt.configEndpoint:void 0,void 0,E),rt=qa(),kt=Ya(E),[ss,rn]=o.useState(void 0),[lo,co]=o.useState(void 0);o.useEffect(()=>{if(F||w===void 0)return;const n=Ja(w,E,je);if(!n){rn([]);return}let r=!1;return fetch(n).then(d=>d.ok?d.json():null).then(d=>{r||(rn(d?Rs(d):[]),co(d?Qa(d):void 0))}).catch(()=>{r||rn([])}),()=>{r=!0}},[w,E,F,je]);const uo=o.useMemo(()=>Xa(Za(ss,()=>Object.values(ei).filter(n=>n.available&&ti(n)).map(n=>({id:n.id,name:n.name,provider:n.provider}))),!!Kt),[ss,Kt]),os=o.useMemo(()=>{const n=Ct.data?.builtinTools??[],r=new Set(n.map(d=>d.name));return{runtime:n,frontend:tt.filter(d=>!r.has(d.name)).map(d=>({id:d.name,name:d.name}))}},[Ct.data?.builtinTools,tt]),as=o.useMemo(()=>new Set((rt.data?.skills??[]).filter(n=>n.status==="enabled"||n.status==="loaded").map(n=>n.id)),[rt.data]),fo=o.useCallback(async n=>{if(je)throw new Error("A deployment’s chat does not switch its runtime’s model.");Un(n),!(F||w===void 0)&&await fetch(`${w}/api/v1/configure/inference/provider`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({model:n})}).catch(()=>{})},[w,F,je]),is=p?.promptPlacement==="bottom-chat",po=p?.promptPlacement==="floating",He=p?.promptPlacement==="top",lt=p?.hidePrompt===!0||j.hidePrompt===!0,ln=Mt[0]?.value.Component,cn=!p?.hideHeader&&!!ln,dn=o.useMemo(()=>({mcpServers:(A?.mcpServers??[]).map(n=>n.name||n.id),skills:(A?.skills??[]).map(n=>n.name||n.id)}),[A]),Me=se?{...Jt,refused:St,config:se,name:D?.name??R?.name??A?.name??"",validating:Qt,headerShown:cn,minutes:ri,disabledMcpServers:dn.mcpServers,disabledSkills:dn.skills,signIn:Ds}:null,mo={onSend:()=>{re(Xt)},input:Xt,setInput:at,focusTrigger:$e||Vn?($e?.nonce??0)+Vn:void 0,placement:po||fe==="floating"||fe==="floating-top"||fe==="floating-bottom"?"floating":"docked",floatingAnchor:fe==="floating-top"?"top":"bottom",isLoading:L,onStop:()=>e.viewControls.stop?.(),placeholder:On??j.sendInstead?.says??V,typingSuggestions:Dt.map(n=>n.text),suggestions:ht,disableInputPrompt:ot,connectionConfirmed:!ot,interim:Hs,padding:He||fe==="floating-top"||fe==="floating-bottom"||fe==="docked-top"?2:3,promptVariant:"lexical",autoFocus:p?.autoFocusPrompt??!0,mentionableAgents:Bs,promptCommands:zs,headerContent:Qs.length>0?t.jsx(At,{slot:Ce.inpromptMenu,props:{workspace:e}}):void 0,footerExtras:se||tn||zn.length>0||it&&it.input!=="off"?t.jsxs(t.Fragment,{children:[se?t.jsx(ni,{}):null,tn?t.jsx(Qi,{equipment:so}):null,zn.length>0?t.jsx(At,{slot:Ce.promptAction,props:{workspace:e}}):null,it&&it.input!=="off"?t.jsx(si,{voice:it,input:Xt,setInput:at,disabled:ot,speaking:P,onStopSpeaking:()=>i.current?.stopSpeaking?.(),playbackLevel:()=>i.current?.voiceLevel?.()??0,running:L,onStopRun:()=>(i.current?.interrupt??i.current?.stop)?.(),onInterrupted:()=>i.current?.markInterrupted(),onInterimChange:Ws,answers:!!(p?.voice?.output&&p.voice.output!=="off"&&p.voice.speechUrl),onSpoken:n=>{Ee.current=n},send:(n,r)=>{Ee.current=r,re(n)}}):null]}):void 0,showAgentsMenu:!D,showInlineAgentsMenu:!1,agents:Xs,selectedAgentId:xe,onSelectAgent:n=>T?.select(n),showTokenUsage:j.showTokenUsage??p?.showTokenUsage??!0,showContextRing:!0,agentUsage:Js??void 0,showModelSelector:!D&&!je,models:uo,decisions:lo,selectedModel:yt,onModelSelect:n=>{fo(n)},showToolsMenu:!D,availableTools:os.runtime,availableFrontendTools:os.frontend,mcpServers:Ct.data?.mcpServers??[],mcpStatusData:j.mcpStatusData??void 0,showSkillsMenu:!D,skills:rt.data?.skills??[],skillsLoading:rt.isLoading,enabledSkills:as,onToggleSkill:n=>as.has(n)?kt.disableSkill(n):kt.enableSkill(n),onToggleAllSkills:(n,r)=>n.forEach(d=>r?kt.enableSkill(d):kt.disableSkill(d)),codemodeEnabled:j.codemodeEnabled??!1,onToggleCodemode:j.onToggleCodemode,isA2AProtocol:!1,hasConfigData:!!Ct.data,hasSkillsData:!!rt.data,...se?{anonymousDisabled:dn}:{}},rs=$t[0]?.value.Component,wt=rs?t.jsx(rs,{workspace:e,composer:mo}):null,ls=z.length>0&&p?.showSurfaceSelector!==!1?t.jsx(jr,{surfaces:z.map(n=>n.value),active:_?.surfaceId??gt?.surfaceId??de,onChange:Xe,workspace:e}):null,cs=t.jsxs(t.Fragment,{children:[z.map(n=>{const r=n.value,d=_?.surfaceId===r.surfaceId;return d||ne.current.has(r.surfaceId)||dt(r,e)?(ne.current.add(r.surfaceId),t.jsx(h,{sx:d?{flex:"1 1 0",minWidth:0,minHeight:0}:{position:"absolute",inset:0,visibility:"hidden",pointerEvents:"none",zIndex:-1},children:t.jsx(oi,{load:r.load,props:{surfaceId:r.surfaceId,workspace:e},fallback:t.jsxs(xn,{children:["Loading ",r.title,"…"]}),errorFallback:b=>t.jsxs(xn,{children:[r.title," failed to load: ",b.message]})})},r.surfaceId)):null}),!_&>?t.jsx(h,{flex:"1 1 0",minWidth:0,minHeight:0,children:t.jsxs(xn,{children:["Starting ",gt.title,"…"]})}):null]}),ds=t.jsx(t.Fragment,{children:t.jsxs(h,{flex:He&&_?"0 0 34%":"1 1 0",maxWidth:He&&_?460:void 0,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",borderLeft:_?"1px solid":void 0,borderColor:"border.default",position:"relative",children:[j.errorBanner?t.jsx(h,{flexShrink:0,px:3,py:2,fontSize:1,borderBottom:"1px solid",bg:j.errorBanner.variant==="warning"?"attention.subtle":"danger.subtle",color:j.errorBanner.variant==="warning"?"attention.fg":"danger.fg",borderColor:j.errorBanner.variant==="warning"?"attention.muted":"danger.muted",children:j.errorBanner.message}):null,De?.said&&De.given===H?.id?t.jsx($,{as:"p",role:"status",sx:{m:0,px:3,py:2,fontSize:1,color:"fg.muted"},children:De.said}):null,Qn?t.jsxs(h,{display:"flex",alignItems:"baseline",gap:2,px:3,py:2,fontSize:1,color:"fg.muted",role:"status","data-session-said":"",children:[t.jsx($,{sx:{flex:1},children:Qn}),t.jsx(q,{size:"small",variant:"invisible",onClick:()=>Xn(""),children:"Dismiss"})]}):null,Zn?t.jsx(fr,{question:Zn,onPick:n=>{es(null),on.current?.(n),on.current=null}}):null,t.jsx("input",{ref:ts,type:"file",hidden:!0,"data-session-file":"",onChange:async n=>{const r=n.target.files?.[0],d=r?await r.text():void 0;an.current?.(d),an.current=null}}),t.jsx(h,{flex:"1 1 auto",minHeight:0,display:"flex",children:io?t.jsx($,{as:"p",role:"status",sx:{m:0,p:3,fontSize:1,color:"fg.muted"},children:bs.opening}):t.jsx(ai,{themeVariant:p?.themeVariant,themeOverrides:p?.themeOverrides,colorMode:p?.colorMode,thread:sn,voice:no,disabled:ot,disableReason:On,protocol:jt,frontendTools:F?void 0:Fs,initialModel:yt||void 0,title:D?.name??R?.name??A?.name??E,description:D?.welcome??A?.description,brandIcon:D?.face?t.jsx(mr,{face:D.face,size:20,state:me}):t.jsx(Ht,{size:20}),headerLeading:e.chatHeaderLeading,headerContent:D&&!bt||Nn.length>0?t.jsxs(t.Fragment,{children:[D&&!bt?t.jsx(gr,{state:me}):null,Nn.length>0?t.jsx(At,{slot:Ce.chatBanner,props:{workspace:e}}):null]}):void 0,emptyState:{icon:D?.face?t.jsx("span",{"aria-hidden":!0,style:{fontSize:ws,lineHeight:1},children:t.jsx(Ls,{face:D.face,size:ws})}):t.jsx(Ht,{size:48}),title:D?.name??R?.name??A?.name??E,...T&&R?{sections:[{group:T.team.name,icon:t.jsx(_s,{size:48}),title:T.team.name,subtitle:T.team.description},{group:R.name,icon:t.jsx(Ht,{size:32}),title:R.name,subtitle:A?.description}]}:null},suggestions:He||ue||p?.suggestionLabels===!1?[]:ht,showHeader:cn,headerButtons:{showNewChat:p?.headerButtons?.newChat??!1,showClear:p?.headerButtons?.clear??!1},renderHeader:ln?n=>t.jsx(ln,{workspace:e,header:e.chatViewModes?{...n,chatViewMode:e.chatViewModes.value,onChatViewModeChange:e.chatViewModes.onChange,offeredViewModes:e.chatViewModes.offered}:n}):void 0,showInformation:!0,headerItems:[...e.chatHeaderActions?[{key:"workspace-actions",type:"custom",pinned:!0,render:()=>e.chatHeaderActions}]:[],...Me&&!Me.validating&&!Me.refused?[{key:"anonymous-key-clock",type:"custom",render:()=>t.jsx(ii,{state:Me})}]:[],...G&&w?[{key:"session-state",type:"custom",render:()=>t.jsx(cr,{facts:Gn})},{key:"session-actions",type:"custom",pinned:!0,render:()=>t.jsx(ur,{uid:ve||void 0,describe:n=>nt.described(n),context:ns})}]:[],...Bn.map(n=>{const r=n.Component;return{key:`slot-${n.slot}:${n.id}`,type:"custom",priority:-1,render:()=>t.jsx(r,{workspace:e})}}),...e.chatHeaderTrailing?[{key:"right-panel-toggle",type:"custom",pinned:!0,render:()=>e.chatHeaderTrailing}]:[],{key:"full-screen",type:"custom",pinned:!0,render:()=>t.jsx($s,{icon:Z?li:ci,"aria-label":Z?"Exit full screen":"Enter full screen",variant:"invisible",size:"small",onClick:()=>{Q(!1),g()},sx:J?{"@keyframes dla-fullscreen-hint":{"0%, 100%":{opacity:1},"50%":{opacity:.4}},"&&":{bg:`color-mix(in srgb, ${a.primary} 16%, transparent)`,boxShadow:`inset 0 0 0 1.5px ${a.primary}`,animation:`dla-fullscreen-hint ${vr}ms ease-in-out infinite`},"@media (prefers-reduced-motion: reduce)":{"&&":{animation:"none"}}}:void 0})}],showInput:!1,onSendReady:Ie,notebookToolSurfacesId:_?void 0:e.surfaceId,showTurnFooter:j.showTokenUsage??p?.showTokenUsage??!0,onContextSnapshot:Bt,onLoadingChange:mt,renderMessageFooter:G&&w?(n,r)=>n.role==="user"?t.jsx(dr,{facts:Gn,turn:r.turn,context:ns}):null:void 0,onSpeakingChange:Le,onItemsChange:ae,onDisplayItemsChange:zt,enableStreaming:!0},sn?.id)}),!cn&&Bn.length>0?t.jsx(h,{hidden:!0,children:t.jsx(At,{slot:Ce.chatHeader,props:{workspace:e}})}):null,is&&!lt?wt:null]})}),us=p?.suggestionLabels!==!1&&ht.length>0?t.jsx(h,{"aria-label":s.suggestedPrompts,display:"flex",flexWrap:"wrap",gap:2,px:2,pb:"6px",children:ht.map(n=>t.jsx(h,{as:"button",type:"button",title:n.message,disabled:L||ot,onClick:()=>{re(n.message)},appearance:"none",font:"inherit",fontSize:0,fontWeight:"semibold",lineHeight:1.25,px:"10px",py:"5px",width:vs,flex:`0 0 ${vs}px`,borderRadius:"999px",border:"1px solid",bg:"canvas.subtle",whiteSpace:"nowrap",sx:{borderColor:"border.default",color:"fg.default",cursor:"pointer","&:hover:not(:disabled)":{borderColor:"accent.fg",color:"accent.fg"},"&:disabled":{opacity:.5,cursor:"default"}},children:t.jsx(di,{title:n.title,maxWidth:"100%",sx:{minWidth:0},children:n.title})},n.title))}):null,fs=f?t.jsx(h,{flex:"0 0 auto",px:3,py:2,borderTop:"1px solid",borderColor:"border.default",bg:"canvas.subtle",fontSize:1,maxHeight:"40%",overflowY:"auto",children:f}):null;return t.jsx(ui,{value:Me,children:t.jsxs(h,{ref:ze,sx:{height:"100%",minHeight:0,display:"flex",flexDirection:"column",position:"relative",...Z?{bg:"canvas.default"}:null,...Z&&!Ze.current?{position:"fixed",top:U,right:0,bottom:0,left:0,height:"auto",zIndex:1e3}:null},children:[Me?t.jsx(h,{flex:"0 0 auto",children:t.jsx(fi,{state:Me})}):null,ue?t.jsx(ue.Component,{workspace:e,editors:cs,hasEditor:!!_,transcript:ds,prompt:lt?null:wt,chips:lt?null:us,picker:ls,transient:fs}):t.jsxs(t.Fragment,{children:[He&&!lt?t.jsxs(h,{flex:"0 0 auto",borderBottom:"1px solid",borderColor:"border.default",children:[wt,us]}):null,ls,t.jsxs(h,{flex:"1 1 auto",minHeight:0,display:"flex",position:"relative",children:[cs,ds]}),fs,is||lt||He?null:wt]}),qt?t.jsx(h,{position:"absolute",inset:0,zIndex:5,bg:"canvas.default",display:"flex",flexDirection:"column",minHeight:0,children:t.jsx(Pi,{agentName:R?.name??A?.name,sandboxStillRuns:F,temporary:An,onSignedIn:()=>pi.getState().clear()})}):null]})})}function yr(e){const s=e?.agent;return typeof s=="string"&&s?s:void 0}function jr({surfaces:e,active:s,onChange:a,workspace:i}){const c=[...e].sort((u,x)=>(u.order??100)-(x.order??100));return t.jsxs(h,{flex:"0 0 auto",display:"flex",alignItems:"center",gap:2,px:3,py:2,borderBottom:"1px solid",borderColor:"border.default",children:[t.jsx($,{sx:{fontSize:0,color:"fg.muted"},children:"Beside the chat"}),t.jsxs(pn,{"aria-label":"Editor beside the chat",size:"small",children:[t.jsx(pn.Button,{selected:s===de,onClick:()=>a(de),children:"Chat"}),c.map(u=>{const x=dt(u,i),l=x?void 0:u.unavailableReason?.(i)??"Not available right now";return t.jsx(pn.Button,{selected:s===u.surfaceId,"aria-disabled":!x,title:l??u.title,leadingIcon:u.icon,onClick:()=>{x&&a(u.surfaceId)},children:u.title},u.surfaceId)})]})]})}function xn({children:e}){return t.jsx(h,{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"fg.muted",fontSize:1,px:3,textAlign:"center",children:e})}export{Tr as default};
|
|
32
|
+
${xa(le.map(Oe=>Oe.file))}`,{...S,loop:Object.fromEntries(Object.entries(b).filter(([Oe])=>Oe!=="files"))})});return}W.current?.begin(n,l());const ee=i.current?.send;if(!ee){ge.current.push([n,S]);return}ee(n,S)},[l]);o.useEffect(()=>{u(pe?{busy:L,stop:i.current?.stop,newChat:i.current?.newChat,send:ie}:null)},[L,pe,u,ie]),o.useEffect(()=>()=>u(null),[u]),o.useEffect(()=>e.prompts.subscribe(ie),[e.prompts,ie]),o.useEffect(()=>{if(!pe||ge.current.length===0)return;const n=ge.current.splice(0,ge.current.length);for(const[r,d]of n)l(),i.current?.send(r,d)},[pe,l]);const Fe=o.useRef(!1),re=o.useCallback(async n=>{v(null);const r=await ba(Ee.current,n);if(r){r.sent?at(""):v(r.refused);return}Fe.current||(Fe.current=!0,y?.firstPromptHook?.());const d=await e.submit(n);if(!d.handled){v(d.reason??null);return}at(""),d.result?.content&&v(d.result.content)},[e,y?.firstPromptHook]),_=o.useMemo(()=>z.find(n=>n.value.surfaceId===k)?.value,[z,k]),Ze=o.useCallback(n=>{ke.current=!0;const r=Oi(n);oe(r.suspendedId),O(r.surfaceId)},[]);o.useEffect(()=>va(Ze),[Ze]),o.useEffect(()=>{Sa(z.map(n=>n.value.surfaceId))},[z]),o.useEffect(()=>{ya(k&&k!==de?k:Ts)},[k]);const Ae=o.useMemo(()=>M===de||M==="none"?void 0:z.find(n=>n.value.surfaceId===M),[z,M]);o.useEffect(()=>{ke.current||!Ae||dt(Ae.value,e)&&O(M)},[Ae,e,M]);const ze=o.useRef(null),Be=p?.fullScreenTopOffset??0,{fullScreen:X,usingApi:Xe,toggle:g,topOffsetPx:U}=ja(ze,{forceOverlay:!!Be,topOffset:Be}),[J,Q]=o.useState(!1),et=o.useRef(!1);o.useEffect(()=>{!L||et.current||X||(et.current=!0,Q(!0))},[L,X]),o.useEffect(()=>{X&&Q(!1)},[X]),o.useEffect(()=>{_&&!dt(_,e)&&(oe(_.surfaceId),O(de))},[_,e]);const gt=o.useMemo(()=>{if(I)return z.find(n=>n.value.surfaceId===I)?.value;if(!ke.current&&k===de)return Ae?.value},[z,I,k,Ae]);o.useEffect(()=>{if(!I||k!==de)return;const n=z.find(r=>r.value.surfaceId===I);n&&dt(n.value,e)&&(oe(null),O(I))},[z,k,I,e]);const R=e.agentId?.trim()||"default",F=Ca(e.sandbox.target??"local");_e.current=F;const T=ka(),xe=fn(T?.selected??xr),E=T?.members.find(n=>n.id===xe),yn=K(wa)[0]?.value,Nt=yn?.specId,A=hs(E?.specId??R)??(Nt?hs(Nt):void 0),Ne=E?void 0:yn,jn=F&&!E?mi(Nt,A):void 0;Se.current=E?.name??A?.name??R;const Cn=K(Ta),kn=j.hiddenOpeners,wn=j.hideOpeners,Vt=j.openers,Dt=o.useMemo(()=>{if(wn)return[];const n=new Set(kn??[]),r=C=>n.size===0?C:C.filter(Oe=>!n.has(Oe.text));if(Vt)return r(Vt);const d=Cn.flatMap(C=>C.value.suggestions);if(d.length>0)return r(d);const S=r(A?.suggestions??[]),b=r(T?.team.suggestions??[]);if(b.length===0)return S;const ee=new Set(b.map(C=>C.text)),B=T?.team.name??"Team",le=E?.name??A?.name??R;return[...b.map(C=>({...C,group:B})),...S.filter(C=>!ee.has(C.text)).map(C=>({...C,group:le}))]},[Cn,T,A,E,R,kn,wn,Vt]),ht=o.useMemo(()=>Dt.map(n=>({title:n.summary??n.text,message:n.message??n.text,group:n.group})),[Dt]),Ht=We(A?.icon),D=p?.presence,_s=We(T?.team.icon),Tn=K(Ia),xt=o.useMemo(()=>{const n=[],r=new Map,d=new Set,S=new Set(z.map(b=>b.value.surfaceId));for(const b of tr(Tn,_?.surfaceId)){if(nr(b.value.id,S,_?.surfaceId))continue;let ee;try{ee=b.value.tools(e)}catch(B){console.warn(`[loop] frontend tools from '${b.plugin}' failed:`,B);continue}for(const B of ee){const le=r.get(B.name);if(le){console.warn(`[loop] frontend tool '${B.name}' from '${b.plugin}' is shadowed by the one from '${le}'.`);continue}r.set(B.name,b.plugin),n.push(B),b.value.chatView&&d.add(B.name)}}for(const b of j.frontendTools??[])r.has(b.name)||(r.set(b.name,"chat-extras"),n.push(b),d.add(b.name));return _?n:er(n,d)},[Tn,e.surfaceId,e.agentId,j.frontendTools,_?.surfaceId,z]),Wt=ar(),tt=o.useMemo(()=>{if(Wt.length===0)return xt;const n=new Set(xt.map(r=>r.name));return[...xt,...Wt.filter(r=>!n.has(r.name))]},[xt,Wt]),In=Os(),Gt=j.agentToolBundles,Fs=o.useMemo(()=>{const n=j.frontendTools??[];if(!Gt?.length)return j.frontendTools;const r=Us(In.filter(S=>Gt.includes(S.id)),m),d=new Set(n.map(S=>S.name));return[...n,...r.filter(S=>!d.has(S.name))]},[j.frontendTools,Gt,In,m]);qe.current=F&&tt.some(n=>n.name===Ea)?m.getOutput(ct)?.sandbox:void 0;const w=Ra(e.sandbox,e.serverUrl),nt=o.useMemo(()=>Mi({baseUrl:w??"",getAccessToken:()=>c.current,fetch:(n,r)=>fetch(n,r)}),[w]),En=K(Aa),zs=o.useMemo(()=>En.filter(n=>n.value.composer).map(n=>({name:n.value.name,description:n.value.description})),[En]),Bs=o.useMemo(()=>{if(!T||!E)return js(A).map(d=>({name:d.name,description:d.description,icon:We(d.icon)}));const n=T.members.map(d=>({name:d.name,description:d.description,emoji:d.emoji,icon:We(d.icon),disabled:d.id===E.id,disabledReason:d.id===E.id?`You are already talking to ${d.name}`:void 0})),r=xs(T.team,E.id).filter(d=>!T.members.some(S=>S.name===d.name)).map(d=>({name:d.name,description:d.description,icon:We(d.icon)}));return[...n,...r]},[T,E,A]),Ns=$a(m.getConfig(ct)),{inference:Rn,anonymous:Vs}=Li(F,Ns),Kt=vn(n=>n.user),Yt=F&&Vs.status==="expired",An=!Kt,st=Ma();he.current=st.disabled?st.disableReason||"This conversation is closed here.":void 0;const bt=w===void 0?Oa(e.sandbox,s):void 0,vt=m.getConfig(ct)?.datalayerVisitors,qt=Pa(vt),se=p?.anonymous,Jt=Ua(se?.maxTurns),Qt=!!(se&&vt&&!qt.error&&e.sandbox.state!=="error"&&(!qt.token||w===void 0)),St=se?Jt.refused:"",$n=o.useRef(!1),Mn=Jt.take;o.useEffect(()=>{se&&L&&!$n.current&&Mn(),$n.current=L},[se,L,Mn]);const Ds=La(se??Sr),ot=Qt||!!St||ye||Yt||!!jn||!!bt||st.disabled,On=Qt?_a.validating:St||(Yt?An?s.demoKeyExpired:s.keyExpired:jn??bt??Lt??(st.disabled?st.disableReason:void 0)),[Zt,at]=o.useState(""),[Pn]=Fa(),it=o.useMemo(()=>p?.voice?za(p.voice,Pn):void 0,[p?.voice,Pn]),[Hs,Ws]=o.useState(!1),[Gs,Un]=o.useState(),yt=Gs??Ne?.model??A?.model??e.model??"",Ve=Ba(),Ln=o.useRef(Ve),_n=o.useRef(xe),Fn=o.useRef(Ve);Fn.current=Ve,o.useEffect(()=>{_n.current!==xe&&(_n.current=xe,Ln.current=Fn.current,Un(void 0))},[xe]);const Ks=Ve&&Ve!==Ln.current?Ve:null,[Ys,qs]=o.useState(),Js=Ks??Ys??null,Qs=Rt(Ce.inpromptMenu),zn=Rt(Ce.promptAction),Bn=Rt(Ce.chatHeader),Nn=Rt(Ce.chatBanner),Zs=o.useMemo(()=>T?.members.map(n=>({id:n.id,name:n.name,description:n.description,icon:We(n.icon)}))??[],[T]),$e=ys(n=>n.pending),[Vn,Xs]=o.useState(0);o.useEffect(()=>Na(()=>Xs(n=>n+1)),[]),o.useEffect(()=>{$e&&(at($e.text),ys.getState().consume(),$e.submit&&re($e.text))},[$e]);const Xt=m.getConfig(ct)?.datalayerCreatePayload,G=!!(Ne?.createPayload?.app_spec||Xt?.app_spec),en=ir(Xt),eo=vn(n=>n.token),to=m.getConfig(ct)?.embedToken,be=vt?qt.token:to||eo;c.current=be||void 0;const no=o.useMemo(()=>Va(p?.voice,be||void 0),[p?.voice,be]),je=!!(en||vt),tn=!!D&&G&&!F,so=Wi({agentServerUrl:w,agentId:R,token:be||void 0,specId:yr(Ne?.createPayload?.app_spec??Xt?.app_spec),enabled:tn});if(je&&!G)throw new Error("A deployment’s page runs its application: its host gave no app_spec.");const[Dn]=o.useState(Da),[nn,oo]=o.useMemo(()=>{try{return[lr(typeof window>"u"?"":window.location.search),""]}catch(n){return["",n instanceof Error?n.message:String(n)]}},[]),[Hn,ao]=o.useState(void 0),H=o.useMemo(()=>Hn??rr(p?.thread??(nn&&G?{id:nn,messages:[],fromRuntime:!0}:void 0),en,Dn),[Hn,p?.thread,nn,G,en,Dn]),[De,Wn]=o.useState(null),io=!!(H?.fromRuntime&&De?.given!==H.id);o.useEffect(()=>{if(!H?.fromRuntime||!G||!w)return;let n=!0;return(async()=>{let r="";for(let d=0;d<4&&n;d+=1)try{const S=await Ha({agentBaseUrl:w,agentId:R,uid:H.id,token:be});n&&Wn({given:H.id,thread:{...H,fromRuntime:!1,messages:S}});return}catch(S){r=S instanceof Error?S.message:String(S),await new Promise(b=>setTimeout(b,1500))}n&&Wn({given:H.id,thread:{id:Wa(),messages:[],onStarted:H.onStarted},said:bs.notOpened(r)})})(),()=>{n=!1}},[H?.id,H?.fromRuntime,G,w,R,be]);const sn=H?.fromRuntime?De?.given===H.id?De.thread:void 0:H,ve=e.thread||sn?.id||"",[Gn,Kn]=o.useState(void 0),[ro,Yn]=o.useState(0),qn=o.useRef("");o.useEffect(()=>{L&&ve&&(qn.current=ve)},[L,ve]);const Jn=!!H?.fromRuntime||!!(e.thread&&e.thread===ve)||qn.current===ve;o.useEffect(()=>{if(!G||!w||!ve||L||!Jn)return;let n=!0;return nt.described(ve).then(r=>n&&Kn(r),()=>n&&Kn(void 0)),()=>{n=!1}},[G,w,ve,L,Jn,ro,nt]);const[Qn,Zn]=o.useState(oo),[Xn,es]=o.useState(null),on=o.useRef(null),an=o.useRef(null),ts=o.useRef(null),ns=o.useMemo(()=>({client:nt,say:n=>{Zn(n),Yn(r=>r+1)},openThread:n=>{ao({id:n,messages:[],fromRuntime:!0}),Yn(r=>r+1)},download:(n,r,d)=>{const S=URL.createObjectURL(new Blob([r],{type:d})),b=document.createElement("a");b.href=S,b.download=n,b.click(),URL.revokeObjectURL(S)},choose:n=>new Promise(r=>{on.current=r,es(n)}),pickFile:n=>new Promise(r=>{const d=ts.current;if(!d){r(void 0);return}an.current=r,d.accept=n,d.value="",d.click()})}),[nt]),jt=o.useMemo(()=>F?Ei({agentId:E?.specId??R,instructions:Ga(A,Ne?.instructions),model:yt||void 0,inference:Rn,frontendTools:tt,subagents:T&&E?xs(T.team,E.id):js(A),sharing:T?.sharing,onSubagentEvent:n=>hi.getState().appendSubagentEvent(n),modeEffect:Ne?.modeEffect}):w!==void 0?{type:"ag-ui",endpoint:G?`${w}/api/v1/apps/agents/${encodeURIComponent(R)}/ag-ui/`:`${w}/api/v1/ag-ui/${R}/`,...G&&be?{authToken:be}:{},...G?{uiSocket:`${w.replace(/^http/,"ws")}/api/v1/apps/ui`,uiFiles:`${w}/api/v1/apps/agents/${encodeURIComponent(R)}/files`,appSessions:`${w}/api/v1/apps/sessions`,...je?{ownRoutesOnly:!0}:{}}:{},agentId:R,configEndpoint:`${w}/api/v1/configure`,enableConfigQuery:!0}:void 0,[R,F,Rn,E,tt,T,A,Ne,yt,w,G,be,je]),Ct=Ka(!F&&jt?.type==="ag-ui",jt?.type==="ag-ui"?jt.configEndpoint:void 0,void 0,R),rt=Ya(),kt=qa(R),[ss,rn]=o.useState(void 0),[lo,co]=o.useState(void 0);o.useEffect(()=>{if(F||w===void 0)return;const n=Ja(w,R,je);if(!n){rn([]);return}let r=!1;return fetch(n).then(d=>d.ok?d.json():null).then(d=>{r||(rn(d?Es(d):[]),co(d?Qa(d):void 0))}).catch(()=>{r||rn([])}),()=>{r=!0}},[w,R,F,je]);const uo=o.useMemo(()=>Za(Xa(ss,()=>Object.values(ei).filter(n=>n.available&&ti(n)).map(n=>({id:n.id,name:n.name,provider:n.provider}))),!!Kt),[ss,Kt]),os=o.useMemo(()=>{const n=Ct.data?.builtinTools??[],r=new Set(n.map(d=>d.name));return{runtime:n,frontend:tt.filter(d=>!r.has(d.name)).map(d=>({id:d.name,name:d.name}))}},[Ct.data?.builtinTools,tt]),as=o.useMemo(()=>new Set((rt.data?.skills??[]).filter(n=>n.status==="enabled"||n.status==="loaded").map(n=>n.id)),[rt.data]),fo=o.useCallback(async n=>{if(je)throw new Error("A deployment’s chat does not switch its runtime’s model.");Un(n),!(F||w===void 0)&&await fetch(`${w}/api/v1/configure/inference/provider`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({model:n})}).catch(()=>{})},[w,F,je]),is=p?.promptPlacement==="bottom-chat",po=p?.promptPlacement==="floating",He=p?.promptPlacement==="top",lt=p?.hidePrompt===!0||j.hidePrompt===!0,ln=Mt[0]?.value.Component,cn=!p?.hideHeader&&!!ln,dn=o.useMemo(()=>({mcpServers:(A?.mcpServers??[]).map(n=>n.name||n.id),skills:(A?.skills??[]).map(n=>n.name||n.id)}),[A]),Me=se?{...Jt,refused:St,config:se,name:D?.name??E?.name??A?.name??"",validating:Qt,headerShown:cn,minutes:ri,disabledMcpServers:dn.mcpServers,disabledSkills:dn.skills,signIn:Ds}:null,mo={onSend:()=>{re(Zt)},input:Zt,setInput:at,focusTrigger:$e||Vn?($e?.nonce??0)+Vn:void 0,placement:po||fe==="floating"||fe==="floating-top"||fe==="floating-bottom"?"floating":"docked",floatingAnchor:fe==="floating-top"?"top":"bottom",isLoading:L,onStop:()=>e.viewControls.stop?.(),placeholder:On??j.sendInstead?.says??V,typingSuggestions:Dt.map(n=>n.text),suggestions:ht,disableInputPrompt:ot,connectionConfirmed:!ot,interim:Hs,padding:He||fe==="floating-top"||fe==="floating-bottom"||fe==="docked-top"?2:3,promptVariant:"lexical",autoFocus:p?.autoFocusPrompt??!0,mentionableAgents:Bs,promptCommands:zs,headerContent:Qs.length>0?t.jsx(At,{slot:Ce.inpromptMenu,props:{workspace:e}}):void 0,footerExtras:se||tn||zn.length>0||it&&it.input!=="off"?t.jsxs(t.Fragment,{children:[se?t.jsx(ni,{}):null,tn?t.jsx(Qi,{equipment:so}):null,zn.length>0?t.jsx(At,{slot:Ce.promptAction,props:{workspace:e}}):null,it&&it.input!=="off"?t.jsx(si,{voice:it,input:Zt,setInput:at,disabled:ot,speaking:P,onStopSpeaking:()=>i.current?.stopSpeaking?.(),playbackLevel:()=>i.current?.voiceLevel?.()??0,running:L,onStopRun:()=>(i.current?.interrupt??i.current?.stop)?.(),onInterrupted:()=>i.current?.markInterrupted(),onInterimChange:Ws,answers:!!(p?.voice?.output&&p.voice.output!=="off"&&p.voice.speechUrl),onSpoken:n=>{Re.current=n},send:(n,r)=>{Re.current=r,re(n)}}):null]}):void 0,showAgentsMenu:!D,showInlineAgentsMenu:!1,agents:Zs,selectedAgentId:xe,onSelectAgent:n=>T?.select(n),showTokenUsage:j.showTokenUsage??p?.showTokenUsage??!0,showContextRing:!0,agentUsage:Js??void 0,showModelSelector:!D&&!je,models:uo,decisions:lo,selectedModel:yt,onModelSelect:n=>{fo(n)},showToolsMenu:!D,availableTools:os.runtime,availableFrontendTools:os.frontend,mcpServers:Ct.data?.mcpServers??[],mcpStatusData:j.mcpStatusData??void 0,showSkillsMenu:!D,skills:rt.data?.skills??[],skillsLoading:rt.isLoading,enabledSkills:as,onToggleSkill:n=>as.has(n)?kt.disableSkill(n):kt.enableSkill(n),onToggleAllSkills:(n,r)=>n.forEach(d=>r?kt.enableSkill(d):kt.disableSkill(d)),codemodeEnabled:j.codemodeEnabled??!1,onToggleCodemode:j.onToggleCodemode,isA2AProtocol:!1,hasConfigData:!!Ct.data,hasSkillsData:!!rt.data,...se?{anonymousDisabled:dn}:{}},rs=$t[0]?.value.Component,wt=rs?t.jsx(rs,{workspace:e,composer:mo}):null,ls=z.length>0&&p?.showSurfaceSelector!==!1?t.jsx(jr,{surfaces:z.map(n=>n.value),active:_?.surfaceId??gt?.surfaceId??de,onChange:Ze,workspace:e}):null,cs=t.jsxs(t.Fragment,{children:[z.map(n=>{const r=n.value,d=_?.surfaceId===r.surfaceId;return d||ne.current.has(r.surfaceId)||dt(r,e)?(ne.current.add(r.surfaceId),t.jsx(h,{sx:d?{flex:"1 1 0",minWidth:0,minHeight:0}:{position:"absolute",inset:0,visibility:"hidden",pointerEvents:"none",zIndex:-1},children:t.jsx(oi,{load:r.load,props:{surfaceId:r.surfaceId,workspace:e},fallback:t.jsxs(xn,{children:["Loading ",r.title,"…"]}),errorFallback:b=>t.jsxs(xn,{children:[r.title," failed to load: ",b.message]})})},r.surfaceId)):null}),!_&>?t.jsx(h,{flex:"1 1 0",minWidth:0,minHeight:0,children:t.jsxs(xn,{children:["Starting ",gt.title,"…"]})}):null]}),ds=t.jsx(t.Fragment,{children:t.jsxs(h,{flex:He&&_?"0 0 34%":"1 1 0",maxWidth:He&&_?460:void 0,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",borderLeft:_?"1px solid":void 0,borderColor:"border.default",position:"relative",children:[j.errorBanner?t.jsx(h,{flexShrink:0,px:3,py:2,fontSize:1,borderBottom:"1px solid",bg:j.errorBanner.variant==="warning"?"attention.subtle":"danger.subtle",color:j.errorBanner.variant==="warning"?"attention.fg":"danger.fg",borderColor:j.errorBanner.variant==="warning"?"attention.muted":"danger.muted",children:j.errorBanner.message}):null,De?.said&&De.given===H?.id?t.jsx($,{as:"p",role:"status",sx:{m:0,px:3,py:2,fontSize:1,color:"fg.muted"},children:De.said}):null,Qn?t.jsxs(h,{display:"flex",alignItems:"baseline",gap:2,px:3,py:2,fontSize:1,color:"fg.muted",role:"status","data-session-said":"",children:[t.jsx($,{sx:{flex:1},children:Qn}),t.jsx(Y,{size:"small",variant:"invisible",onClick:()=>Zn(""),children:"Dismiss"})]}):null,Xn?t.jsx(fr,{question:Xn,onPick:n=>{es(null),on.current?.(n),on.current=null}}):null,t.jsx("input",{ref:ts,type:"file",hidden:!0,"data-session-file":"",onChange:async n=>{const r=n.target.files?.[0],d=r?await r.text():void 0;an.current?.(d),an.current=null}}),t.jsx(h,{flex:"1 1 auto",minHeight:0,display:"flex",children:io?t.jsx($,{as:"p",role:"status",sx:{m:0,p:3,fontSize:1,color:"fg.muted"},children:bs.opening}):t.jsx(ai,{themeVariant:p?.themeVariant,themeOverrides:p?.themeOverrides,colorMode:p?.colorMode,thread:sn,voice:no,disabled:ot,disableReason:On,protocol:jt,frontendTools:F?void 0:Fs,initialModel:yt||void 0,title:D?.name??E?.name??A?.name??R,description:D?.welcome??A?.description,brandIcon:D?.face?t.jsx(mr,{face:D.face,size:20,state:me}):t.jsx(Ht,{size:20}),headerLeading:e.chatHeaderLeading,headerContent:D&&!bt||Nn.length>0?t.jsxs(t.Fragment,{children:[D&&!bt?t.jsx(gr,{state:me}):null,Nn.length>0?t.jsx(At,{slot:Ce.chatBanner,props:{workspace:e}}):null]}):void 0,emptyState:{icon:D?.face?t.jsx("span",{"aria-hidden":!0,style:{fontSize:ws,lineHeight:1},children:t.jsx(Ls,{face:D.face,size:ws})}):t.jsx(Ht,{size:48}),title:D?.name??E?.name??A?.name??R,...T&&E?{sections:[{group:T.team.name,icon:t.jsx(_s,{size:48}),title:T.team.name,subtitle:T.team.description},{group:E.name,icon:t.jsx(Ht,{size:32}),title:E.name,subtitle:A?.description}]}:null},suggestions:He||ue||p?.suggestionLabels===!1?[]:ht,showHeader:cn,headerButtons:{showNewChat:p?.headerButtons?.newChat??!1,showClear:p?.headerButtons?.clear??!1},renderHeader:ln?n=>t.jsx(ln,{workspace:e,header:e.chatViewModes?{...n,chatViewMode:e.chatViewModes.value,onChatViewModeChange:e.chatViewModes.onChange,offeredViewModes:e.chatViewModes.offered}:n}):void 0,showInformation:!0,headerItems:[...e.chatHeaderActions?[{key:"workspace-actions",type:"custom",pinned:!0,render:()=>e.chatHeaderActions}]:[],...Me&&!Me.validating&&!Me.refused?[{key:"anonymous-key-clock",type:"custom",render:()=>t.jsx(ii,{state:Me})}]:[],...G&&w?[{key:"session-state",type:"custom",render:()=>t.jsx(cr,{facts:Gn})},{key:"session-actions",type:"custom",pinned:!0,render:()=>t.jsx(ur,{uid:ve||void 0,describe:n=>nt.described(n),context:ns})}]:[],...Bn.map(n=>{const r=n.Component;return{key:`slot-${n.slot}:${n.id}`,type:"custom",priority:-1,render:()=>t.jsx(r,{workspace:e})}}),...e.chatHeaderTrailing?[{key:"right-panel-toggle",type:"custom",pinned:!0,render:()=>e.chatHeaderTrailing}]:[],{key:"full-screen",type:"custom",pinned:!0,render:()=>t.jsx($s,{icon:X?li:ci,"aria-label":X?"Exit full screen":"Enter full screen",variant:"invisible",size:"small",onClick:()=>{Q(!1),g()},sx:J?{"@keyframes dla-fullscreen-hint":{"0%, 100%":{opacity:1},"50%":{opacity:.4}},"&&":{bg:`color-mix(in srgb, ${a.primary} 16%, transparent)`,boxShadow:`inset 0 0 0 1.5px ${a.primary}`,animation:`dla-fullscreen-hint ${vr}ms ease-in-out infinite`},"@media (prefers-reduced-motion: reduce)":{"&&":{animation:"none"}}}:void 0})}],showInput:!1,onSendReady:Ie,notebookToolSurfacesId:_?void 0:e.surfaceId,showTurnFooter:j.showTokenUsage??p?.showTokenUsage??!0,onContextSnapshot:Bt,onLoadingChange:mt,renderMessageFooter:G&&w?(n,r)=>n.role==="user"?t.jsx(dr,{facts:Gn,turn:r.turn,context:ns}):null:void 0,onSpeakingChange:Le,onItemsChange:ae,onDisplayItemsChange:zt,enableStreaming:!0},sn?.id)}),!cn&&Bn.length>0?t.jsx(h,{hidden:!0,children:t.jsx(At,{slot:Ce.chatHeader,props:{workspace:e}})}):null,is&&!lt?wt:null]})}),us=p?.suggestionLabels!==!1&&ht.length>0?t.jsx(h,{"aria-label":s.suggestedPrompts,display:"flex",flexWrap:"wrap",gap:2,px:2,pb:"6px",children:ht.map(n=>t.jsx(h,{as:"button",type:"button",title:n.message,disabled:L||ot,onClick:()=>{re(n.message)},appearance:"none",font:"inherit",fontSize:0,fontWeight:"semibold",lineHeight:1.25,px:"10px",py:"5px",width:vs,flex:`0 0 ${vs}px`,borderRadius:"999px",border:"1px solid",bg:"canvas.subtle",whiteSpace:"nowrap",sx:{borderColor:"border.default",color:"fg.default",cursor:"pointer","&:hover:not(:disabled)":{borderColor:"accent.fg",color:"accent.fg"},"&:disabled":{opacity:.5,cursor:"default"}},children:t.jsx(di,{title:n.title,maxWidth:"100%",sx:{minWidth:0},children:n.title})},n.title))}):null,fs=f?t.jsx(h,{flex:"0 0 auto",px:3,py:2,borderTop:"1px solid",borderColor:"border.default",bg:"canvas.subtle",fontSize:1,maxHeight:"40%",overflowY:"auto",children:f}):null;return t.jsx(ui,{value:Me,children:t.jsxs(h,{ref:ze,sx:{height:"100%",minHeight:0,display:"flex",flexDirection:"column",position:"relative",...X?{bg:"canvas.default"}:null,...X&&!Xe.current?{position:"fixed",top:U,right:0,bottom:0,left:0,height:"auto",zIndex:1e3}:null},children:[Me?t.jsx(h,{flex:"0 0 auto",children:t.jsx(fi,{state:Me})}):null,ue?t.jsx(ue.Component,{workspace:e,editors:cs,hasEditor:!!_,transcript:ds,prompt:lt?null:wt,chips:lt?null:us,picker:ls,transient:fs}):t.jsxs(t.Fragment,{children:[He&&!lt?t.jsxs(h,{flex:"0 0 auto",borderBottom:"1px solid",borderColor:"border.default",children:[wt,us]}):null,ls,t.jsxs(h,{flex:"1 1 auto",minHeight:0,display:"flex",position:"relative",children:[cs,ds]}),fs,is||lt||He?null:wt]}),Yt?t.jsx(h,{position:"absolute",inset:0,zIndex:5,bg:"canvas.default",display:"flex",flexDirection:"column",minHeight:0,children:t.jsx(Pi,{agentName:E?.name??A?.name,sandboxStillRuns:F,temporary:An,onSignedIn:()=>pi.getState().clear()})}):null]})})}function yr(e){const s=e?.agent;return typeof s=="string"&&s?s:void 0}function jr({surfaces:e,active:s,onChange:a,workspace:i}){const c=[...e].sort((u,x)=>(u.order??100)-(x.order??100));return t.jsxs(h,{flex:"0 0 auto",display:"flex",alignItems:"center",gap:2,px:3,py:2,borderBottom:"1px solid",borderColor:"border.default",children:[t.jsx($,{sx:{fontSize:0,color:"fg.muted"},children:"Beside the chat"}),t.jsxs(pn,{"aria-label":"Editor beside the chat",size:"small",children:[t.jsx(pn.Button,{selected:s===de,onClick:()=>a(de),children:"Chat"}),c.map(u=>{const x=dt(u,i),l=x?void 0:u.unavailableReason?.(i)??"Not available right now";return t.jsx(pn.Button,{selected:s===u.surfaceId,"aria-disabled":!x,title:l??u.title,leadingIcon:u.icon,onClick:()=>{x&&a(u.surfaceId)},children:u.title},u.surfaceId)})]})]})}function xn({children:e}){return t.jsx(h,{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"fg.muted",fontSize:1,px:3,textAlign:"center",children:e})}export{Tr as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aj as t,r as i}from"../datalayer-app-main.js";import{I as l,r}from"./JupyterLexicalExtension-
|
|
1
|
+
import{aj as t,r as i}from"../datalayer-app-main.js";import{I as l,r}from"./JupyterLexicalExtension-DEiuU9XK.js";import{$ as h,a as k,b as q,c as v,d as w,e as y,C as z,f as F,g as G}from"./JupyterLexicalExtension-DEiuU9XK.js";import"./NotebookSkeleton-KHb2YSpG.js";import"./Avatar-CBmqA_yJ.js";import"./url-DhPU-y-U.js";import"./isObject-CeOzAI2h.js";import"./toNumber-DUdf79Nr.js";import"./isSymbol-DfwdEMHq.js";import"./StrikethroughIcon-CbiEuPT-.js";import"./TypographyIcon-CCkcdj7U.js";import"./ArrowUpIcon-y5enrVH9.js";import"./SortDescIcon-Qif6E10I.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./VideoIcon-DIIszW1S.js";import"./PrismCss-Dd5n9e4a.js";import"./Output-DIp_tlWH.js";import"./index-CUjcBn1v.js";import"./hoverbox-CStlKQWE.js";import"./index-tO6w-mHa.js";import"./index-BNjq7TZD.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-niFNV5MZ.js";import"./d3-color-Jd8hXty2.js";import"./dist-SKaIYcRD.js";import"./index-C0KhmyXF.js";import"./RestartIcon-DvpOf5Mf.js";import"./LexicalToolRegistry-CjiooYJz.js";function B(){const[o]=t();return i.useEffect(()=>r(o),[o]),null}export{h as $createCollapsibleContainerNode,k as $createCollapsibleContentNode,q as $createCollapsibleTitleNode,v as $isCollapsibleContainerNode,w as $isCollapsibleContentNode,y as $isCollapsibleTitleNode,z as CollapsibleContainerNode,F as CollapsibleContentNode,B as CollapsiblePlugin,G as CollapsibleTitleNode,l as INSERT_COLLAPSIBLE_COMMAND,B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,j as e,B as n,T as s,a0 as i}from"../datalayer-app-main.js";import j from"./esm-
|
|
1
|
+
import{r as x,j as e,B as n,T as s,a0 as i}from"../datalayer-app-main.js";import j from"./esm-CsO1ipmZ.js";import"./core-BGGgYrZ9.js";function F({agentUsage:o,padding:y,showContextRing:T=!1}){const[k,h]=x.useState(!1),v=x.useRef(null),c=x.useRef(null),g=!!o.turnUsage,C=!!o.sessionUsage,w=!!o.costUsage&&(o.costUsage.cumulativeCostUsd>0||o.costUsage.lastTurnCostUsd>0),m=o.sessionUsage,p=o.turnUsage,b=o.costUsage,d=t=>t<.01?`$${t.toFixed(4)}`:t<1?`$${t.toFixed(3)}`:`$${t.toFixed(2)}`,f=o.totalTokens,u=o.contextWindow,S=Math.max(0,u-f),a=u>0?f/u*100:0,r=[];if(o.distribution?.children?.length){const t={"System Prompts":"#8250df","Tool Definitions":"#bf8700","User Messages":"#16A085","Assistant Messages":"#1a7f37","Tool Usage":"#cf222e"};for(const l of o.distribution.children)r.push({name:l.name,value:l.value,color:t[l.name]||"#6e7781"})}else{o.systemPromptTokens>0&&r.push({name:"System Prompts",value:o.systemPromptTokens,color:"#8250df"}),o.toolTokens>0&&r.push({name:"Tool Definitions",value:o.toolTokens,color:"#bf8700"});const t=(o.userMessageTokens||0)+(o.assistantMessageTokens||0);t>0&&r.push({name:"Messages",value:t,color:"#16A085"});const l=(o.toolCallTokens||0)+(o.toolReturnTokens||0);l>0&&r.push({name:"Tool Results",value:l,color:"#cf222e"})}const z=a>90?"#cf222e":a>70?"#bf8700":"#16A085",W="var(--bgColor-muted, #f6f8fa)",R="var(--borderColor-default, #d1d9e0)",M={animation:!1,series:[{type:"pie",radius:[0,"90%"],center:["50%","50%"],silent:!0,label:{show:!1},labelLine:{show:!1},data:[{value:f,itemStyle:{color:z}},{value:S,itemStyle:{color:W}}]}]},P={animation:!1,series:[{type:"pie",radius:["45%","80%"],center:["50%","50%"],silent:!0,label:{show:!1},labelLine:{show:!1},itemStyle:{borderColor:"var(--bgColor-default, #ffffff)",borderWidth:1},data:[...r.map(t=>({value:t.value,itemStyle:{color:t.color}})),{value:S,itemStyle:{color:R}}]}]};return e.jsxs(n,{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,py:1,px:y,bg:"canvas.subtle",flexWrap:"nowrap",overflow:"visible",whiteSpace:"nowrap",minWidth:0,children:[T&&e.jsxs(n,{position:"relative",flexShrink:0,onMouseEnter:()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>h(!0),150)},onMouseLeave:()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>h(!1),250)},children:[e.jsx(n,{ref:v,cursor:"pointer",width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid",borderColor:"border.default",borderRadius:"50%",children:e.jsx(j,{option:M,style:{width:18,height:18},opts:{renderer:"svg"}})}),k&&e.jsxs(n,{position:"absolute",bottom:"100%",left:0,mb:1,p:3,width:260,bg:"canvas.overlay",borderRadius:2,boxShadow:"shadow.large",border:"1px solid",borderColor:"border.default",zIndex:100,children:[e.jsx(s,{sx:{fontWeight:"bold",fontSize:1,color:"fg.default",display:"block",mb:2},children:"Context"}),e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",display:"block",mb:1},children:[e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default"},children:i(f)})," / ",i(u)," tokens"]}),o.costUsage&&e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",display:"block",mb:2},children:["cost ",e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default"},children:d(o.costUsage.lastTurnCostUsd)})," turn · ",e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default"},children:d(o.costUsage.cumulativeCostUsd)})," total"]}),e.jsxs(s,{sx:{fontSize:0,color:a>90?"danger.fg":a>70?"attention.fg":"fg.muted",fontWeight:"semibold",display:"block",mb:2},children:["• ",a.toFixed(0),"%"]}),e.jsx(n,{display:"flex",justifyContent:"center",mb:2,children:e.jsx(j,{option:P,style:{width:80,height:80},opts:{renderer:"svg"}})}),e.jsx(n,{display:"flex",flexDirection:"column",gap:1,children:r.map(t=>{const l=f>0?t.value/f*100:0;return e.jsxs(n,{display:"flex",alignItems:"center",gap:2,children:[e.jsx(n,{width:8,height:8,borderRadius:"50%",bg:t.color,flexShrink:0}),e.jsx(s,{sx:{fontSize:0,color:"fg.muted",flex:1},children:t.name}),e.jsxs(s,{sx:{fontSize:0,color:"fg.default",fontWeight:"semibold"},children:[l.toFixed(1),"%"]})]},t.name)})}),a>70&&e.jsx(s,{sx:{fontSize:0,color:"attention.fg",display:"block",mt:2,fontStyle:"italic"},children:"Quality may decline as limit nears."})]})]}),e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",flexShrink:0},children:[e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default",fontSize:0},children:i(o.totalTokens)})," / ",i(o.contextWindow)," ctx"]}),w&&e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",flexShrink:0},children:["· cost ",e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default",fontSize:0},children:d(b?.lastTurnCostUsd??0)})," turn / ",e.jsx(s,{as:"span",sx:{fontWeight:"semibold",color:"fg.default",fontSize:0},children:d(b?.cumulativeCostUsd??0)})]}),C&&e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",flexShrink:0},children:["· session ",i(m?.inputTokens??0),e.jsx(s,{as:"span",sx:{color:"success.fg",fontSize:0},children:"▲"})," ",i(m?.outputTokens??0),e.jsx(s,{as:"span",sx:{color:"attention.fg",fontSize:0},children:"▼"})]}),g&&e.jsxs(s,{sx:{fontSize:0,color:"fg.muted",flexShrink:0},children:["· turn ",i(p?.inputTokens??0),e.jsx(s,{as:"span",sx:{color:"success.fg",fontSize:0},children:"▲"})," ",i(p?.outputTokens??0),e.jsx(s,{as:"span",sx:{color:"attention.fg",fontSize:0},children:"▼"})]})]})}export{F as ContextPie};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aj as k,r as l,aB as g,j as s,I as D,aC as h,D as v,aD as w,aE as d,T as S}from"../datalayer-app-main.js";import{l as j,j as y,N as b}from"./JupyterLexicalExtension-
|
|
1
|
+
import{aj as k,r as l,aB as g,j as s,I as D,aC as h,D as v,aD as w,aE as d,T as S}from"../datalayer-app-main.js";import{l as j,j as y,N as b}from"./JupyterLexicalExtension-DEiuU9XK.js";import{D as C,v as E}from"./DeckRenderer-BitpK9Co.js";import"./NotebookSkeleton-KHb2YSpG.js";import"./Avatar-CBmqA_yJ.js";import"./url-DhPU-y-U.js";import"./isObject-CeOzAI2h.js";import"./toNumber-DUdf79Nr.js";import"./isSymbol-DfwdEMHq.js";import"./StrikethroughIcon-CbiEuPT-.js";import"./TypographyIcon-CCkcdj7U.js";import"./ArrowUpIcon-y5enrVH9.js";import"./SortDescIcon-Qif6E10I.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./VideoIcon-DIIszW1S.js";import"./PrismCss-Dd5n9e4a.js";import"./Output-DIp_tlWH.js";import"./index-CUjcBn1v.js";import"./hoverbox-CStlKQWE.js";import"./index-tO6w-mHa.js";import"./index-BNjq7TZD.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-niFNV5MZ.js";import"./d3-color-Jd8hXty2.js";import"./dist-SKaIYcRD.js";import"./index-C0KhmyXF.js";import"./RestartIcon-DvpOf5Mf.js";import"./LexicalToolRegistry-CjiooYJz.js";const T={ArrowRight:e=>e.next(),ArrowDown:e=>e.next(),PageDown:e=>e.next()," ":e=>e.next(),ArrowLeft:e=>e.prev(),ArrowUp:e=>e.prev(),PageUp:e=>e.prev(),Home:e=>e.slide(0),End:e=>e.slide(e.getTotalSlides()-1)};function I(e){const t=l.useRef(null);return l.useEffect(()=>{const o=t.current;if(!o)return;const a=i=>{const n=T[i.key];!n||!e.current||i.target!==o||(i.preventDefault(),i.stopPropagation(),n(e.current))};return o.addEventListener("keydown",a),()=>o.removeEventListener("keydown",a)},[e]),t}function N({issues:e}){return s.jsx(d,{as:"ul",role:"alert",sx:{m:0,mt:2,pl:3,display:"grid",gap:1,fontSize:1},children:e.map(t=>s.jsxs(d,{as:"li",sx:{color:t.severity==="warning"?"attention.fg":"danger.fg"},children:[s.jsx(S,{sx:{fontFamily:"mono"},children:t.where})," —"," ",t.message]},`${t.where}-${t.message}`))})}function R({spec:e,onSave:t,onClose:o}){const[a,i]=l.useState(()=>JSON.stringify(e,null,2)),[n,p]=l.useState([]),c=()=>{const r=E(a);p(r.issues),r.valid&&r.spec&&t(r.spec)};return s.jsxs(v,{title:"Deck specification",subtitle:"The deck as JSON: its title and template under deck, then its slides.",onClose:o,width:"xlarge",footerButtons:[{buttonType:"default",content:"Cancel",onClick:o},{buttonType:"primary",content:"Save",onClick:c}],children:[s.jsx(w,{"aria-label":"The deck's specification, as JSON",value:a,onChange:r=>i(r.target.value),spellCheck:!1,block:!0,rows:22,resize:"vertical",sx:{fontFamily:"mono",fontSize:0}}),n.length>0&&s.jsx(N,{issues:n})]})}function re({className:e,format:t,nodeKey:o,spec:a}){const[i]=k(),n=j(),[p,c]=l.useState(!1),r=l.useRef(null),f=I(r),x=l.useCallback(u=>{i.update(()=>{const m=g(o);y(m)&&m.setSpec(u)}),c(!1)},[i,o]);return s.jsxs(b,{className:e,format:t,nodeKey:o,children:[s.jsxs("div",{ref:f,"data-lexical-deck-block":"",tabIndex:-1,title:n?"Double-click to edit the specification":void 0,onDoubleClick:n?()=>c(!0):void 0,style:{position:"relative",width:"100%",outline:"none"},children:[s.jsx(C,{spec:a,chrome:160,deckRef:r}),n&&s.jsx(D,{icon:h,"aria-label":"Edit the deck's specification",size:"small",variant:"default",sx:{position:"absolute",top:2,right:2,zIndex:10},onMouseDown:u=>u.preventDefault(),onClick:()=>c(!0)})]}),p&&s.jsx(R,{spec:a,onSave:x,onClose:()=>c(!1)})]})}export{re as default};
|