@datalayer/agent-runtimes 1.3.99 → 1.3.101
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-DDIhoGCr.js → AgentDetails-CO9iM59C.js} +8 -8
- package/dist-embed/chunks/{AgentDetailsDialog-DQfL7V4R.js → AgentDetailsDialog-DmD6xm6k.js} +1 -1
- package/dist-embed/chunks/{AgentInspector-DaMCROPs.js → AgentInspector-kDMuvh45.js} +1 -1
- package/dist-embed/chunks/{AgentInspectorDialog-zGMiFR5z.js → AgentInspectorDialog-fT96Pb4Z.js} +1 -1
- package/dist-embed/chunks/Avatar-Dqz3ZWjZ.js +1 -0
- package/dist-embed/chunks/{CellSidebarExtension-DAzWlyRN.js → CellSidebarExtension-B-vao30u.js} +1 -1
- package/dist-embed/chunks/ChatView-CubqJum2.js +288 -0
- package/dist-embed/chunks/{ContextPie-D1eAig1P.js → ContextPie-ltoJ11q_.js} +1 -1
- package/dist-embed/chunks/DatalayerAgentBridge-BmJbZ2Lk.js +1 -0
- package/dist-embed/chunks/{DeckComponent-lNZXX0qi.js → DeckComponent-Fp6Vw8vN.js} +2 -2
- package/dist-embed/chunks/{DocumentView-BKzeMFBq.js → DocumentView-DKUbyyJg.js} +1 -1
- package/dist-embed/chunks/{EphemeralDocument-DKtocZ3W.js → EphemeralDocument-CgYPEfGC.js} +1 -1
- package/dist-embed/chunks/{EphemeralNotebook-oX8GrXS3.js → EphemeralNotebook-DvDbCKnr.js} +2 -2
- package/dist-embed/chunks/{ExcalidrawComponent-B8nrxRST.js → ExcalidrawComponent-BehqBpwC.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawModal--K0C_WUL.js → ExcalidrawModal-B2sXbVJB.js} +1 -1
- package/dist-embed/chunks/{Flash-DTBPQ4yb.js → Flash-DdFxPtBI.js} +1 -1
- package/dist-embed/chunks/{JupyterLexicalExtension-CSMNnVr9.js → JupyterLexicalExtension-CUsjvchq.js} +9 -9
- package/dist-embed/chunks/{KernelVariables-D4s9Q5Ng.js → KernelVariables-BUmOt4yF.js} +2 -2
- package/dist-embed/chunks/{LexicalToolRegistry-_DH2qwSU.js → LexicalToolRegistry-DoZIM1lF.js} +1 -1
- package/dist-embed/chunks/{NotebookSkeleton-BTs2pK7B.js → NotebookSkeleton-D9WNoiWD.js} +1 -1
- package/dist-embed/chunks/{NotebookToolbar-B3BFk-WV.js → NotebookToolbar-C2_ZC9Ej.js} +1 -1
- package/dist-embed/chunks/{NotebookView-Dl-icjhk.js → NotebookView-BActuABH.js} +1 -1
- package/dist-embed/chunks/{SandboxDetailsDialog-22wdG0V-.js → SandboxDetailsDialog-C0afmOA7.js} +1 -1
- package/dist-embed/chunks/{SchemaForm-8b_dpfFK.js → SchemaForm-B351kd79.js} +1 -1
- package/dist-embed/chunks/{Toolbar-5oT8y_0g.js → Toolbar-B6ROXJ-2.js} +1 -1
- package/dist-embed/chunks/{YouTubePlugin-B6pgdGkU.js → YouTubePlugin-CqA-IwCx.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-CCRPX817.js → abnfDiagram-VCTEODGH-B2rXJzIG.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-Cc9J0KVQ.js → abnfDiagram-VCTEODGH-Celh8uSB.js} +1 -1
- package/dist-embed/chunks/{advancedFormat-IOT0HLTV.js → advancedFormat-9fBUVkZ9.js} +1 -1
- package/dist-embed/chunks/{ar-SA-G6X2FPQ2-DMIAxeqR.js → ar-SA-G6X2FPQ2-DhQlC4AZ.js} +1 -1
- package/dist-embed/chunks/{arc-CN-j54V6.js → arc-BcTWnMdT.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-BN7cGeVb.js → architectureDiagram-5GKGNRK7-B1nGp-ab.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-De77ckgV.js → architectureDiagram-5GKGNRK7-BtvjVASE.js} +1 -1
- package/dist-embed/chunks/{az-AZ-76LH7QW2-DMFqBzG7.js → az-AZ-76LH7QW2-CDvJeI6H.js} +1 -1
- package/dist-embed/chunks/{bg-BG-XCXSNQG7-DM9S3yhg.js → bg-BG-XCXSNQG7-B_2t7dwS.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-868be97b-CoipBJ9g.js → blockDiagram-868be97b-Ctqgl81i.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-CYPYbqjz.js → blockDiagram-I7D4REHJ-B8cdJr95.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-Cs7aaFQh.js → blockDiagram-I7D4REHJ-BW7qedxT.js} +1 -1
- package/dist-embed/chunks/{bn-BD-2XOGV67Q-CK8aWMNS.js → bn-BD-2XOGV67Q-B7nTDj-4.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-3f4bdde3-UwJoyMng.js → c4Diagram-3f4bdde3-0ruvDNdG.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-C0lopX7r.js → c4Diagram-7LVT6UL2-D_oBILZn.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-DjTuau65.js → c4Diagram-7LVT6UL2-ujGlIhtL.js} +1 -1
- package/dist-embed/chunks/{ca-ES-6MX7JW3Y-HslrBDJw.js → ca-ES-6MX7JW3Y-llJD_i9l.js} +1 -1
- package/dist-embed/chunks/channel-o04upGuP.js +1 -0
- package/dist-embed/chunks/{chunk-2Q5K7J3B-D4cqUYAT.js → chunk-2Q5K7J3B-CwLcj_PJ.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-BVMKDBY8.js → chunk-2Q5K7J3B-DcyPc2RX.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-Xhg_BVSp.js → chunk-5VM5RSS4-BkRs7Fna.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-CzKuJynz.js → chunk-5VM5RSS4-DMPUDDnV.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-Bt1Q0fHq.js → chunk-F27PBJKO-BzMwl8_q.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-BUIdY_4T.js → chunk-F27PBJKO-pG1_v10O.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-DpgCTHeS.js → chunk-IMKFNOWR-Bf_-T_nx.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-Cy5BRScb.js → chunk-IMKFNOWR-DJta09Af.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-D3HcIpVU.js → chunk-JWPE2WC7-DC1wY1Ne.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-Diz0u535.js → chunk-JWPE2WC7-SVeaXwdX.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-TbpwubqF.js → chunk-POPQ4Y6H-BHtANfps.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-CkAsArUm.js → chunk-POPQ4Y6H-Cl1LQa-a.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-_yTXReWy.js → chunk-SVP7TREG-0GCrhixv.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-Cw20-h7G.js → chunk-SVP7TREG-2ZP0qWw_.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-BPo6s9dS.js → chunk-TICWLB2K-BcegNV27.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-Df9jMrfB.js → chunk-TICWLB2K-CZYEMhEE.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-CizfVebu.js → chunk-XXDRQBXY-DlOeT6YV.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-CQCJr_te.js → chunk-XXDRQBXY-NxzmpYaR.js} +1 -1
- package/dist-embed/chunks/classDiagram-ZZMXUADV-BXZxncqO.js +1 -0
- package/dist-embed/chunks/classDiagram-ZZMXUADV-DnNeD34Z.js +1 -0
- package/dist-embed/chunks/{classDiagram-f62afe4f-BPLoDclf.js → classDiagram-f62afe4f-BD1_NCwH.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-604399ef-ByLL4G6w.js → classDiagram-v2-604399ef-CxmFuhFb.js} +1 -1
- package/dist-embed/chunks/classDiagram-v2-VYDZK3BY-BXZxncqO.js +1 -0
- package/dist-embed/chunks/classDiagram-v2-VYDZK3BY-DnNeD34Z.js +1 -0
- package/dist-embed/chunks/{code-block-IT6T5CEO-CZdOZWWc.js → code-block-IT6T5CEO-U73VXKeS.js} +1 -1
- package/dist-embed/chunks/{component-CCqdcSgN.js → component-COjBgUMr.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-D1KcELJ6.js → cose-bilkent-JH36ORCC-71p0f-kJ.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-DI7Z4av-.js → cose-bilkent-JH36ORCC-B-Oq7xUI.js} +1 -1
- package/dist-embed/chunks/{createText-aed3d8b3-qEBV_LAF.js → createText-aed3d8b3-CmAg0yKd.js} +1 -1
- package/dist-embed/chunks/{cs-CZ-2BRQDIVT-D2WZgYFZ.js → cs-CZ-2BRQDIVT-Cm_uiYT0.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-D_YG7HzO.js → cynefinDiagram-5FMLGOSQ-BdKZ7Rf2.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-zmfGD2O2.js → cynefinDiagram-5FMLGOSQ-NbSU35d_.js} +1 -1
- package/dist-embed/chunks/{da-DK-5WZEPLOC-BZhZmwgX.js → da-DK-5WZEPLOC-B0lo6-wZ.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-BcPCMol6.js → dagre-GXQ25YYZ-C2NoVPqt.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-B-pyqr-3.js → dagre-GXQ25YYZ-Cq55WvUn.js} +1 -1
- package/dist-embed/chunks/{de-DE-XR44H4JA-CltJ8MP6.js → de-DE-XR44H4JA-DZrN-mJo.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-BmnkJuMF.js → diagram-S7CK7UJ4-CF7XYPSL.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-hhBlnYjW.js → diagram-S7CK7UJ4-Cq78dPrF.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-DPb8MAV_.js → diagram-UQ7AKVKN-BAi-uDI4.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-BN1Xspl9.js → diagram-UQ7AKVKN-DlMLGIyl.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-TMd-7Wmo.js → diagram-VSXAHHWV-DRNadpAk.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-H5G6hU8P.js → diagram-VSXAHHWV-jJir7z_u.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-BrkFbK0K.js → diagram-VX7I27RA-BR-L0h0N.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-DiYNlqCO.js → diagram-VX7I27RA-D_LZ7ttC.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-DdG_O5h6.js → diagram-Z3DM3KII-CDeXGbsG.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-D1vqz5Ew.js → diagram-Z3DM3KII-CwrX0YEI.js} +1 -1
- package/dist-embed/chunks/{document-zcF1SUIy.js → document-B3yvxR3p.js} +1 -1
- package/dist-embed/chunks/{drivecontents-Ckcp2ERS.js → drivecontents-BHpoQXqz.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-PMrBUO9H.js → ebnfDiagram-PWID7BFC-DJ-S4zNP.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-DMXmlTDY.js → ebnfDiagram-PWID7BFC-DktGPWnR.js} +1 -1
- package/dist-embed/chunks/{edges-b2856ca0-zod3pf5J.js → edges-b2856ca0-Dl_I1_Tl.js} +1 -1
- package/dist-embed/chunks/{el-GR-BZB4AONW-C70uQp6T.js → el-GR-BZB4AONW-C4D5ZbOc.js} +1 -1
- package/dist-embed/chunks/{erDiagram-5d81789a-D4Y_ua8V.js → erDiagram-5d81789a-Xh6XZPYE.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-COpQ5gec.js → erDiagram-RLTQ6QDP-CvKed34U.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-CZNZ_893.js → erDiagram-RLTQ6QDP-Dn5o1zp3.js} +1 -1
- package/dist-embed/chunks/{es-ES-U4NZUMDT-Bsjo8e08.js → es-ES-U4NZUMDT-D1yiS-ZI.js} +1 -1
- package/dist-embed/chunks/{eu-ES-A7QVB2H4-SVPEle78.js → eu-ES-A7QVB2H4-Zm3lJsL6.js} +1 -1
- package/dist-embed/chunks/{fa-IR-HGAKTJCU-CpgfdtSo.js → fa-IR-HGAKTJCU-Dhv2lg_O.js} +1 -1
- package/dist-embed/chunks/{fi-FI-Z5N7JZ37-0AIruYqI.js → fi-FI-Z5N7JZ37-QeFFEfyg.js} +1 -1
- package/dist-embed/chunks/{flowDb-185abca5-8a6sWoVq.js → flowDb-185abca5-DCi2LSG3.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-1629c991-CCbNUYZl.js → flowDiagram-1629c991-1AzvuCps.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-lJ2Z3vFv.js → flowDiagram-HODETNUW-BjiuBN9U.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-CMUxuQ7T.js → flowDiagram-HODETNUW-BoOyNxJY.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-v2-1d953310-CEF2SgZr.js → flowDiagram-v2-1d953310-DNyM8Btq.js} +1 -1
- package/dist-embed/chunks/{flowchart-elk-definition-6df44142-RHeVm2Vk.js → flowchart-elk-definition-6df44142-DucxAUTE.js} +1 -1
- package/dist-embed/chunks/{fr-FR-RHASNOE6-Pv7-mObZ.js → fr-FR-RHASNOE6-DjbRpOS6.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-3b0b3873-wEiuIWcM.js → ganttDiagram-3b0b3873-DLJCN1HW.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-BYMiax7v.js → ganttDiagram-EL5Y4UJY-D3bfGcnP.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-B5WlwMpk.js → ganttDiagram-EL5Y4UJY-us782PXd.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-DYJQ-SIg.js → gitGraphDiagram-WWUBYQGX-BCKtisB_.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-D8fVmtc9.js → gitGraphDiagram-WWUBYQGX-DpOwi5a_.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-DxDYtdab.js → gitGraphDiagram-f01e8bc2-B5VZrDor.js} +1 -1
- package/dist-embed/chunks/{gl-ES-HMX3MZ6V-CvVsi7_e.js → gl-ES-HMX3MZ6V-C-ev9dqC.js} +1 -1
- package/dist-embed/chunks/{hcl-BZsx9glM.js → hcl-hwLh11hJ.js} +1 -1
- package/dist-embed/chunks/{he-IL-6SHJWFNN-DR-LBFsb.js → he-IL-6SHJWFNN-DHoNpuA6.js} +1 -1
- package/dist-embed/chunks/{hi-IN-IWLTKZ5I-C-7x_jFk.js → hi-IN-IWLTKZ5I-JZJZPoWj.js} +1 -1
- package/dist-embed/chunks/{hu-HU-A5ZG7DT2-IRN8uyau.js → hu-HU-A5ZG7DT2-RzCikyBW.js} +1 -1
- package/dist-embed/chunks/{id-ID-SAP4L64H-B4acvKcJ.js → id-ID-SAP4L64H-Bn08nS9B.js} +1 -1
- package/dist-embed/chunks/{index-CzyPyDL7.js → index-1Ekpl0uC.js} +1 -1
- package/dist-embed/chunks/{index-9bae90f3-Byqvc_1J.js → index-9bae90f3-CqVDusDd.js} +1 -1
- package/dist-embed/chunks/{index-O05b1yOc.js → index-B1Egld01.js} +1 -1
- package/dist-embed/chunks/{index-CkcSokt2.js → index-B2dtLxcg.js} +1 -1
- package/dist-embed/chunks/{index-DrTOPxp7.js → index-B5MiaXUV.js} +1 -1
- package/dist-embed/chunks/{index-CML3IxdI.js → index-BOvsLtXe.js} +1 -1
- package/dist-embed/chunks/{index-C8PIFg_G.js → index-BUbwVG__.js} +4 -4
- package/dist-embed/chunks/{index-4cAPvEvs.js → index-BVAnvfbh.js} +1 -1
- package/dist-embed/chunks/{index-CBqbd-wN.js → index-BYofH50G.js} +1 -1
- package/dist-embed/chunks/{index-BvCNoy7C.js → index-Ba-Kv3yV.js} +1 -1
- package/dist-embed/chunks/{index-CFLgmNxm.js → index-BbsUSk_Q.js} +5 -5
- package/dist-embed/chunks/{index-DSqW3D0Y.js → index-Bs1pVq7E.js} +1 -1
- package/dist-embed/chunks/{index-CkHVrFkx.js → index-BtjXlYA2.js} +1 -1
- package/dist-embed/chunks/{index-qS3zZ9pt.js → index-C0iUgNwj.js} +2 -2
- package/dist-embed/chunks/{index-BNamX66v.js → index-C5xKtdLU.js} +13 -13
- package/dist-embed/chunks/{index-B3E7bXYK.js → index-CGscJbrF.js} +1 -1
- package/dist-embed/chunks/{index-CGSmsddM.js → index-Cjx6uk6z.js} +1 -1
- package/dist-embed/chunks/{index-DPibz6KG.js → index-CqKV027P.js} +1 -1
- package/dist-embed/chunks/{index-Dm4AUkEh.js → index-Cqur_rhw.js} +4 -4
- package/dist-embed/chunks/{index-CNx_s591.js → index-D7rnWGLu.js} +2 -2
- package/dist-embed/chunks/{index-qoRa7lfq.js → index-DCX_IqLg.js} +1 -1
- package/dist-embed/chunks/{index-BY3dr_Yb.js → index-DHVYKZ44.js} +6 -6
- package/dist-embed/chunks/{index-Begrz6qi.js → index-DIHzcHI1.js} +1 -1
- package/dist-embed/chunks/{index-NHZX5LFG.js → index-DJomc4za.js} +2 -2
- package/dist-embed/chunks/{index-DecCuztE.js → index-DLk6Znxv.js} +1 -1
- package/dist-embed/chunks/{index-BnowXurk.js → index-DYt0uAs-.js} +1 -1
- package/dist-embed/chunks/{index-kuItYEfY.js → index-DeYQGrTz.js} +8 -8
- package/dist-embed/chunks/{index-CDSBIJbt.js → index-DgnVcOqG.js} +1 -1
- package/dist-embed/chunks/{index-REv48H9T.js → index-DkY_OIbM.js} +1 -1
- package/dist-embed/chunks/{index-CaurkNaJ.js → index-DsX9nIHt.js} +1 -1
- package/dist-embed/chunks/{index-DKPjJ48t.js → index-DtYYe0Cw.js} +5 -5
- package/dist-embed/chunks/{index-CwFAduNg.js → index-aX9x7qni.js} +1 -1
- package/dist-embed/chunks/{index-74YA-L1Q.js → index-hib7vWC6.js} +1 -1
- package/dist-embed/chunks/{index-DYk4SAGn.js → index-p2ZGnxJX.js} +1 -1
- package/dist-embed/chunks/{index-CxSZtb0e.js → index-qzUKNibz.js} +1 -1
- package/dist-embed/chunks/{index-5Jo-nwZH.js → index-zr-b1Ds3.js} +1 -1
- package/dist-embed/chunks/{index.esm-DOzsYAbC.js → index.esm-CJLAKtMR.js} +1 -1
- package/dist-embed/chunks/{index.esm-BpcXmnkv.js → index.esm-DlPZAW-m.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-CV8wJO56.js → infoDiagram-27XIBGKW-CB1VZqVi.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-DNSrv0V4.js → infoDiagram-27XIBGKW-s9Lynuxa.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-a29d40f1-E8D341jS.js → infoDiagram-a29d40f1-BSyalhIZ.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-BRfv59pP.js → ishikawaDiagram-5VMMS53U-BnyB2Q-F.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-DmZ-PvsF.js → ishikawaDiagram-5VMMS53U-D-b9zU7V.js} +1 -1
- package/dist-embed/chunks/{it-IT-JPQ66NNP-qA6LaRji.js → it-IT-JPQ66NNP-C2vJMuKM.js} +1 -1
- package/dist-embed/chunks/{ja-JP-DBVTYXUO-CHmLHAsr.js → ja-JP-DBVTYXUO-C8KOKQt9.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-3jE8sGmW.js → journeyDiagram-3NMN7TZE-CZXsMFjb.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-itNV2GBs.js → journeyDiagram-3NMN7TZE-Cv3HlmqD.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-95396277-Ba7ZL7z3.js → journeyDiagram-95396277-DnkmTBAP.js} +1 -1
- package/dist-embed/chunks/{kaa-6HZHGXH3-CLJsweAJ.js → kaa-6HZHGXH3-CvxJbmMB.js} +1 -1
- package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-C5IJJXMt.js → kab-KAB-ZGHBKWFO-CQJhf9Nn.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DraK1j1A.js → kanban-definition-UXKFOSKX-CZ0olp9z.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DLigKnGA.js → kanban-definition-UXKFOSKX-LX8xxzUZ.js} +1 -1
- package/dist-embed/chunks/{kk-KZ-P5N5QNE5-CCaxEdfw.js → kk-KZ-P5N5QNE5-Dl6YC0GH.js} +1 -1
- package/dist-embed/chunks/{km-KH-HSX4SM5Z-My_ugj4j.js → km-KH-HSX4SM5Z-QYB-tJ4i.js} +1 -1
- package/dist-embed/chunks/{ko-KR-MTYHY66A-CHP-oWuX.js → ko-KR-MTYHY66A-D6yzBqJ5.js} +1 -1
- package/dist-embed/chunks/{ku-TR-6OUDTVRD-C52g9k3M.js → ku-TR-6OUDTVRD-C43l2362.js} +1 -1
- package/dist-embed/chunks/{layout-Dj1wRfbG.js → layout-DC1dN5QV.js} +1 -1
- package/dist-embed/chunks/{layout-DNotAWCv.js → layout-DfHqq7Y7.js} +1 -1
- package/dist-embed/chunks/{lexicalHooks-kxLGr2aO.js → lexicalHooks-PS_v7JyS.js} +1 -1
- package/dist-embed/chunks/{line-DuKLYeqR.js → line-BLnKxlFS.js} +1 -1
- package/dist-embed/chunks/{linear-Dg-Vn5Yx.js → linear-bDTv5gmU.js} +1 -1
- package/dist-embed/chunks/{lt-LT-XHIRWOB4-DcGTTOch.js → lt-LT-XHIRWOB4-BG1v5NwF.js} +1 -1
- package/dist-embed/chunks/{lv-LV-5QDEKY6T-Duj8GAiu.js → lv-LV-5QDEKY6T-CAwm1y_0.js} +1 -1
- package/dist-embed/chunks/{mermaid.core-C0gANONu.js → mermaid.core-BS7AlRW2.js} +3 -3
- package/dist-embed/chunks/{mermaid.core-BjUO4_Ly.js → mermaid.core-CLv-vCjs.js} +5 -5
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-x4oa4R6v.js → mindmap-definition-YA3MSWOX-BUr4hM7e.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-qCMgaWWi.js → mindmap-definition-YA3MSWOX-CwwLX5oJ.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-e4c1d938-Dy5nnqlt.js → mindmap-definition-e4c1d938-B4xy2oKe.js} +1 -1
- package/dist-embed/chunks/{model-D8diDS02.js → model-D7a10Ag0.js} +1 -1
- package/dist-embed/chunks/{mr-IN-CRQNXWMA-Cm1jPr2r.js → mr-IN-CRQNXWMA-DSk6q1fp.js} +1 -1
- package/dist-embed/chunks/{my-MM-5M5IBNSE-CfTzX-Wc.js → my-MM-5M5IBNSE-BRiKXulk.js} +1 -1
- package/dist-embed/chunks/{nb-NO-T6EIAALU-DdPxuBWB.js → nb-NO-T6EIAALU-CCDnctVd.js} +1 -1
- package/dist-embed/chunks/{nl-NL-IS3SIHDZ-eOHjxC9z.js → nl-NL-IS3SIHDZ-DwStD_Ch.js} +1 -1
- package/dist-embed/chunks/{nn-NO-6E72VCQL-DjAv0k1C.js → nn-NO-6E72VCQL-DNcfjETk.js} +1 -1
- package/dist-embed/chunks/{oc-FR-POXYY2M6-C0T2Uif7.js → oc-FR-POXYY2M6-BOjjS12P.js} +1 -1
- package/dist-embed/chunks/{pa-IN-N4M65BXN-BpX0p08b.js → pa-IN-N4M65BXN-B4y5cv2_.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-5jUoEdYP.js → pegDiagram-XKGWAZYB-CVtSqLfc.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-Smos5ynL.js → pegDiagram-XKGWAZYB-pdjxeh5M.js} +1 -1
- package/dist-embed/chunks/{percentages-BXMCSKIN-CmsGG1KO.js → percentages-BXMCSKIN-BpahO1D1.js} +6 -6
- package/dist-embed/chunks/{pica-DvcVbjys.js → pica-CyDhZ1sv.js} +1 -1
- package/dist-embed/chunks/{pie-CrFPIYc9.js → pie-CktNGOxo.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-D0vDTcE9.js → pieDiagram-E7YTZNPT-D2I7Fwff.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-COPe6fPR.js → pieDiagram-E7YTZNPT-JUXSTYxs.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-c941bede-65qxkgxB.js → pieDiagram-c941bede-DWhYbfLm.js} +1 -1
- package/dist-embed/chunks/{pl-PL-T2D74RX3-ZCXWl-vX.js → pl-PL-T2D74RX3-CfuLoYHB.js} +1 -1
- package/dist-embed/chunks/{plugin-Ba5UScsV.js → plugin-DZPXm2dP.js} +1 -1
- package/dist-embed/chunks/{pt-BR-5N22H2LF-ClSeRSTv.js → pt-BR-5N22H2LF-Fk60PfdA.js} +1 -1
- package/dist-embed/chunks/{pt-PT-UZXXM6DQ-aI3iyXEY.js → pt-PT-UZXXM6DQ-SNAgJ5Vr.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-BoEDNaHO.js → quadrantDiagram-AXDQQJYC-Cw8ysOVS.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-DvWSIFQv.js → quadrantDiagram-AXDQQJYC-zTpXZRnN.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-DiapetF0.js → quadrantDiagram-cf8b8fe0-DH_dNEld.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-LnW8lyjW.js → railroadDiagram-O6MQD6OU-CoMzy1dm.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-XyeFPUFA.js → railroadDiagram-O6MQD6OU-DrPiQVOZ.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-53bda41b-NVu0cGYm.js → requirementDiagram-53bda41b-C7A0I5GT.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-wRDyhjvw.js → requirementDiagram-BXWQKSXE-B9trBsts.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-CtpxXHY5.js → requirementDiagram-BXWQKSXE-BLQtV6jv.js} +1 -1
- package/dist-embed/chunks/{ro-RO-JPDTUUEW--yP8WH1q.js → ro-RO-JPDTUUEW-YkxpKkWn.js} +1 -1
- package/dist-embed/chunks/{round-BYqUt1IP.js → round-DymJ-a3G.js} +1 -1
- package/dist-embed/chunks/{ru-RU-B4JR7IUQ-S6Dpc8ej.js → ru-RU-B4JR7IUQ-CaI1rtvc.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-CWsU1zz9.js → sankeyDiagram-P5KCCOFB-Cvxdoq6D.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-CkYpEh5o.js → sankeyDiagram-P5KCCOFB-Dwkp-ggM.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-c3ef121a-D9xzSD-8.js → sankeyDiagram-c3ef121a-DeaFXwir.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-82a5b84f-DDCEPqNh.js → sequenceDiagram-82a5b84f-fDhOBU7A.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-CafPjz3k.js → sequenceDiagram-WJ2MYXX4-Bj9ikwM4.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-D-ytwLdK.js → sequenceDiagram-WJ2MYXX4-Bp1oVZMs.js} +1 -1
- package/dist-embed/chunks/{sessions-BeSpcqDy.js → sessions-ZDYLkdi_.js} +2 -2
- package/dist-embed/chunks/{si-LK-N5RQ5JYF-Bh0-Jjfq.js → si-LK-N5RQ5JYF-CQz29xmh.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-FMWRuKPu.js → sizeCapture-INFHLROL-CMlzK5MC.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-5RviLAUl.js → sizeCapture-INFHLROL-ohpYHAcp.js} +1 -1
- package/dist-embed/chunks/{sk-SK-C5VTKIMK-TXk80Xbq.js → sk-SK-C5VTKIMK-CZg7PVzd.js} +1 -1
- package/dist-embed/chunks/{sl-SI-NN7IZMDC-DSdu_b8Y.js → sl-SI-NN7IZMDC-D-EjMWyZ.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-43e79a5f-Bd0gJvTB.js → stateDiagram-43e79a5f-BFR_IH5W.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-CsoLoQdw.js → stateDiagram-D77RDMKH-DpOxo9yl.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-anfAB1CI.js → stateDiagram-D77RDMKH-zWegA-O8.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-Db6Ltf2q.js → stateDiagram-v2-2041ed4f-8TkUHVMG.js} +1 -1
- package/dist-embed/chunks/stateDiagram-v2-MP3YSRHH-BZAMPWr5.js +1 -0
- package/dist-embed/chunks/stateDiagram-v2-MP3YSRHH-DrTAroDB.js +1 -0
- package/dist-embed/chunks/{styles-455b33cd-DjZhq6rj.js → styles-455b33cd-Befvug13.js} +1 -1
- package/dist-embed/chunks/{styles-f932cba9-s39yhAcA.js → styles-f932cba9-eBHnVQaE.js} +1 -1
- package/dist-embed/chunks/{styles-fcc2142b-QdZsB9tg.js → styles-fcc2142b-BsjaKqGS.js} +1 -1
- package/dist-embed/chunks/{subset-shared.chunk-B1SUTh3f.js → subset-shared.chunk-BIvvzzX2.js} +1 -1
- package/dist-embed/chunks/{subset-worker.chunk-B24w3nw0.js → subset-worker.chunk-DGgI6iRY.js} +1 -1
- package/dist-embed/chunks/{sv-SE-XGPEYMSR-CT10IJuV.js → sv-SE-XGPEYMSR-D8CsNMON.js} +1 -1
- package/dist-embed/chunks/{svgDrawCommon-148a3cd9-B38JgGfg.js → svgDrawCommon-148a3cd9-BxzL4r3S.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-CPp_dpjU.js → swimlanes-42K2YHIH-B28jcYJ_.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-DHlC5c8j.js → swimlanes-42K2YHIH-BZP55aw9.js} +1 -1
- package/dist-embed/chunks/swimlanesDiagram-VR7AAH4N-BIQqrjYQ.js +8 -0
- package/dist-embed/chunks/swimlanesDiagram-VR7AAH4N-hQM0t42-.js +8 -0
- package/dist-embed/chunks/{ta-IN-2NMHFXQM-HSbClJ74.js → ta-IN-2NMHFXQM-CvuxKO7t.js} +1 -1
- package/dist-embed/chunks/{th-TH-HPSO5L25-B2hciv_c.js → th-TH-HPSO5L25-NgQJigwq.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-CKyPT4PB.js → timeline-definition-24CTP7MA-CficHg2r.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-D9gzYUYy.js → timeline-definition-24CTP7MA-De_e-NOu.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-7545f45a-BWnp7J60.js → timeline-definition-7545f45a-DqfcISSR.js} +1 -1
- package/dist-embed/chunks/{tokens-C8cD27Uo.js → tokens-B5KQP74f.js} +1 -1
- package/dist-embed/chunks/{tr-TR-DEFEU3FU-BWwXpAYZ.js → tr-TR-DEFEU3FU-eu9-qLmi.js} +1 -1
- package/dist-embed/chunks/{uk-UA-QMV73CPH-Dj7E5VqN.js → uk-UA-QMV73CPH-CbjmuLVL.js} +1 -1
- package/dist-embed/chunks/{venn.esm-DCEZyyO1.js → venn.esm-QMuJZ7sT.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-bbhu-7hk.js → vennDiagram-4TSXK5OY-DIL1dW8w.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-F_ETYUiw.js → vennDiagram-4TSXK5OY-DmLAzLnR.js} +1 -1
- package/dist-embed/chunks/{vi-VN-M7AON7JQ-PsrEnccg.js → vi-VN-M7AON7JQ-u84yOuJ-.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-DOvpFGv3.js → wardleyDiagram-VM6X3IG4-Cb_52SC-.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-3pZGhbDZ.js → wardleyDiagram-VM6X3IG4-DfZqkrsZ.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-3f383b91-DZLtCOMM.js → xychartDiagram-3f383b91-DGvBSaRz.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-CFYS5J-K.js → xychartDiagram-S5SC5T6Z-6OM1k4o6.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-DSYuijxd.js → xychartDiagram-S5SC5T6Z-xYHAmg9u.js} +1 -1
- package/dist-embed/chunks/{zh-CN-LNUGB5OW-BaQu8uAz.js → zh-CN-LNUGB5OW-ojkSgl-t.js} +1 -1
- package/dist-embed/chunks/{zh-HK-E62DVLB3-BidFwl7n.js → zh-HK-E62DVLB3-C6M89-Da.js} +1 -1
- package/dist-embed/chunks/{zh-TW-RAJ6MFWO-Bm6PhMc5.js → zh-TW-RAJ6MFWO-BaTtFORh.js} +1 -1
- package/dist-embed/datalayer-app-main.js +19 -19
- package/lib/apps/apps/AppRenderer.d.ts +12 -0
- package/lib/apps/apps/AppRenderer.js +38 -5
- package/lib/apps/apps/visitorToken.d.ts +29 -0
- package/lib/apps/apps/visitorToken.js +57 -0
- package/lib/apps/plugins/agents/DatalayerAgentBridge.js +71 -2
- package/lib/apps/plugins/agents/switchable.js +3 -2
- package/lib/apps/plugins/chat/ChatView.js +11 -1
- package/package.json +1 -1
- package/scripts/record-scene-checks.py +80 -20
- package/dist-embed/chunks/Avatar-VyZWLCFE.js +0 -1
- package/dist-embed/chunks/ChatView-Bqiq0mvd.js +0 -288
- package/dist-embed/chunks/DatalayerAgentBridge-BhxfUyb7.js +0 -1
- package/dist-embed/chunks/channel-gqCIn1TE.js +0 -1
- package/dist-embed/chunks/classDiagram-ZZMXUADV-BmkR_bZ0.js +0 -1
- package/dist-embed/chunks/classDiagram-ZZMXUADV-Db5VIrmE.js +0 -1
- package/dist-embed/chunks/classDiagram-v2-VYDZK3BY-BmkR_bZ0.js +0 -1
- package/dist-embed/chunks/classDiagram-v2-VYDZK3BY-Db5VIrmE.js +0 -1
- package/dist-embed/chunks/stateDiagram-v2-MP3YSRHH-CHSJtozR.js +0 -1
- package/dist-embed/chunks/stateDiagram-v2-MP3YSRHH-Grhw6_l4.js +0 -1
- package/dist-embed/chunks/swimlanesDiagram-VR7AAH4N-DA8nqWDf.js +0 -8
- package/dist-embed/chunks/swimlanesDiagram-VR7AAH4N-PPX_kI6A.js +0 -8
package/dist-embed/chunks/{CellSidebarExtension-DAzWlyRN.js → CellSidebarExtension-B-vao30u.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as _,v as qe,j as u,j7 as jt,I as U,eJ as Ge,cD as pe,be as ge,c as J,fe as Pt,f8 as Ue,fp as Tt,j8 as Dt,j9 as At,ja as Je,jb as Ye,ci as W,jc as It,jd as Nt,je as Lt,bC as Te,jf as ct,jg as ht,jh as Rt,ji as fe,az as Ot,by as ut,jj as ft,jk as Ft,jl as Xe,F as A,jm as Ze,jn as me,jo as Bt,jp as Wt,jq as Vt,ao as _e,jr as Ie,js as Qe,cz as ke,cy as ee,b9 as $t,el as Gt,cf as z,jt as Ht,aa as mt,ag as zt,cn as Kt,ai as Z,cV as qt,dl as Ut,h$ as Fe,hZ as pt,ju as xe,jv as de,jw as Jt,ar as Yt,aj as Xt,jx as Zt,ak as Qt,jy as gt,hI as H,jz as en,jA as R,jB as tn,de as nn,jC as _t,jD as sn,e6 as on,e7 as rn,ed as ce,e8 as Ne,e9 as an,jE as ln,jF as dn,jG as cn,eG as ne,B as ue,a9 as hn,d2 as un,dX as et,_ as fn,ab as mn,jH as pn,jI as gn,jJ as _n,jK as vn,d$ as tt,e0 as he,e1 as yn,e2 as Cn,e3 as bn,cs as wn,l as kn,jL as xn,jM as vt,g5 as Mn,jN as ae,bd as T,C as le,cK as nt,bp as yt,dw as Sn,cO as En,bm as Me,i as jn,P as Pn,as as Tn,aC as Dn}from"../datalayer-app-main.js";import{c as An,N as Be}from"./NotebookSkeleton-BTs2pK7B.js";import{a as In,W as st}from"./renderer-jz0zn1Az.js";import{C as Se,S as Ee}from"./SquareIcon-e3ygcjpv.js";function Nn(...r){return _.useCallback(e=>{for(const t of r)typeof t=="function"?t(e):t&&(t.current=e)},r)}var Q={Banner:"prc-Banner-Banner-IR8eJ",BannerContainer:"prc-Banner-BannerContainer-lbx3d",BannerContent:"prc-Banner-BannerContent-zTITK",BannerActions:"prc-Banner-BannerActions-XCfHL",BannerTitle:"prc-Banner-BannerTitle-TcuJl",BannerIcon:"prc-Banner-BannerIcon-WuOyf",BannerDismiss:"prc-Banner-BannerDismiss-uBZVm",BannerActionsContainer:"prc-Banner-BannerActionsContainer-ukGMH"};const Ln={critical:u.jsx(Dt,{}),info:u.jsx(Ue,{}),success:u.jsx(Tt,{}),upsell:u.jsx(Ue,{}),warning:u.jsx(Pt,{})},Rn={critical:"Critical",info:"Information",success:"Success",upsell:"Recommendation",warning:"Warning"},On=qe.forwardRef(function({"aria-label":e,children:t,className:n,description:s,hideTitle:o,icon:i,onDismiss:a,primaryAction:l,secondaryAction:d,title:c,variant:h="info",...f},m){const C=!!a,x=l||d,I=qe.useRef(null),L=Nn(m,I),g=h==="info"||h==="upsell";return u.jsxs("section",{...f,"aria-label":e??Rn[h],className:pe(n,Q.Banner),"data-dismissible":a?"":void 0,"data-title-hidden":o?"":void 0,"data-variant":h,tabIndex:-1,ref:L,children:[u.jsx("div",{className:Q.BannerIcon,children:i&&g?i:Ln[h]}),u.jsxs("div",{className:Q.BannerContainer,children:[u.jsxs("div",{className:Q.BannerContent,children:[c?o?u.jsx(jt,{children:u.jsx(We,{children:c})}):u.jsx(We,{children:c}):null,s?u.jsx(Ct,{children:s}):null,t]}),x?u.jsx(Fn,{primaryAction:l,secondaryAction:d}):null]}),C?u.jsx(U,{"aria-label":"Dismiss banner",onClick:a,className:Q.BannerDismiss,icon:Ge,variant:"invisible"}):null]})});function We(r){const e=ge.c(12);let t,n,s,o;e[0]!==r?({as:o,className:n,children:t,...s}=r,e[0]=r,e[1]=t,e[2]=n,e[3]=s,e[4]=o):(t=e[1],n=e[2],s=e[3],o=e[4]);const i=o===void 0?"h2":o;let a;e[5]!==n?(a=pe(n,Q.BannerTitle),e[5]=n,e[6]=a):a=e[6];let l;return e[7]!==i||e[8]!==t||e[9]!==s||e[10]!==a?(l=u.jsx(i,{...s,className:a,"data-banner-title":"",children:t}),e[7]=i,e[8]=t,e[9]=s,e[10]=a,e[11]=l):l=e[11],l}function Ct(r){const e=ge.c(10);let t,n,s;e[0]!==r?({children:t,className:n,...s}=r,e[0]=r,e[1]=t,e[2]=n,e[3]=s):(t=e[1],n=e[2],s=e[3]);let o;e[4]!==n?(o=pe("BannerDescription",n),e[4]=n,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==s||e[8]!==o?(i=u.jsx("div",{...s,className:o,children:t}),e[6]=t,e[7]=s,e[8]=o,e[9]=i):i=e[9],i}function Fn(r){const e=ge.c(9),{primaryAction:t,secondaryAction:n}=r,s=n??null,o=t??null;let i;e[0]!==s||e[1]!==o?(i=u.jsxs("div",{className:Q.BannerActionsContainer,"data-primary-action":"trailing",children:[s,o]}),e[0]=s,e[1]=o,e[2]=i):i=e[2];const a=t??null,l=n??null;let d;e[3]!==a||e[4]!==l?(d=u.jsxs("div",{className:Q.BannerActionsContainer,"data-primary-action":"leading",children:[a,l]}),e[3]=a,e[4]=l,e[5]=d):d=e[5];let c;return e[6]!==i||e[7]!==d?(c=u.jsxs("div",{className:Q.BannerActions,children:[i,d]}),e[6]=i,e[7]=d,e[8]=c):c=e[8],c}const bt=_.forwardRef((r,e)=>{const t=ge.c(11);let n,s,o;t[0]!==r?({children:n,className:s,...o}=r,t[0]=r,t[1]=n,t[2]=s,t[3]=o):(n=t[1],s=t[2],o=t[3]);let i;t[4]!==s?(i=pe("BannerPrimaryAction",s),t[4]=s,t[5]=i):i=t[5];let a;return t[6]!==n||t[7]!==e||t[8]!==o||t[9]!==i?(a=u.jsx(J,{ref:e,className:i,variant:"default",...o,children:n}),t[6]=n,t[7]=e,t[8]=o,t[9]=i,t[10]=a):a=t[10],a});bt.displayName="BannerPrimaryAction";const wt=_.forwardRef((r,e)=>{const t=ge.c(11);let n,s,o;t[0]!==r?({children:n,className:s,...o}=r,t[0]=r,t[1]=n,t[2]=s,t[3]=o):(n=t[1],s=t[2],o=t[3]);let i;t[4]!==s?(i=pe("BannerPrimaryAction",s),t[4]=s,t[5]=i):i=t[5];let a;return t[6]!==n||t[7]!==e||t[8]!==o||t[9]!==i?(a=u.jsx(J,{ref:e,className:i,variant:"link",...o,children:n}),t[6]=n,t[7]=e,t[8]=o,t[9]=i,t[10]=a):a=t[10],a});wt.displayName="BannerSecondaryAction";const Bn=Object.assign(On,{Title:We,Description:Ct,PrimaryAction:bt,SecondaryAction:wt}),ve=Nt.define({combine(r){return r[r.length-1]}}),Wn=Te.baseTheme({".jp-remote-cursor":{borderLeft:"1px solid black",marginLeft:"-1px"},".jp-remote-cursor.jp-mod-primary":{borderLeftWidth:"2px"},".jp-remote-selection":{opacity:.5},".cm-tooltip":{border:"none"},".cm-tooltip.jp-remote-userInfo":{color:"var(--fgColor-onEmphasis, #ffffff)",padding:"0px 2px"}});function He(r,e){const t=r?.username||r?.display_name||r?.name||String(e),{theme:n,colorMode:s}=Ot.getState(),o=s==="auto"?typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light":s;return An(t,n,o)}const De=Lt.define();class kt{style;marker;constructor(e,t){this.style=e,this.marker=t}draw(){const e=this.marker.draw();for(const[t,n]of Object.entries(this.style))e.style[t]=n;return e}eq(e){return this.marker.eq(e.marker)&&W.deepEqual(this.style,e.style)}update(e,t){for(const[n,s]of Object.entries(this.style))e.style[n]=s;return this.marker.update(e,t.marker)}}const Vn=ct({above:!0,markers(r){const{awareness:e,ytext:t}=r.state.facet(ve),n=t.doc,s=[];return e.getStates().forEach((o,i)=>{if(i===e.doc.clientID)return;const a=o.cursors;for(const l of a??[]){if(!l?.anchor||!l?.head)return;const d=fe(l.anchor,n),c=fe(l.head,n);if(d?.type!==t||c?.type!==t)return;const h=l.primary??!0?"jp-remote-cursor jp-mod-primary":"jp-remote-cursor",f=ut.cursor(c.index,c.index>d.index?-1:1);for(const m of ft.forRange(r,h,f))s.push(new kt({borderLeftColor:He(o.user,i)},m))}}),s},update(r,e){return!!r.transactions.find(t=>t.annotation(De))},class:"jp-remote-cursors"});function ot(r){const e=new Array,{awareness:t,ytext:n}=r.facet(ve),s=n.doc;for(const[o,i]of t.getStates())if(o!==t.doc.clientID)for(const a of i.cursors??[]){if(!a?.head)continue;const l=fe(a.head,s);l?.type===n&&e.push({pos:l.index,above:!0,create:()=>{const d=document.createElement("div");return d.classList.add("jp-remote-userInfo"),d.style.backgroundColor=He(i.user,o),d.textContent=i.user?.display_name??"Anonymous",{dom:d}}})}return e}const $n=ht.define({create:ot,update(r,e){return e.annotation(De)?ot(e.state):r},provide(r){return Rt.computeN([r],e=>e.field(r))}}),Gn=ct({above:!1,markers(r){const{awareness:e,ytext:t}=r.state.facet(ve),n=t.doc,s=[];return e.getStates().forEach((o,i)=>{if(i===e.doc.clientID)return;const a=o.cursors;for(const l of a??[]){if((l.empty??!0)||!l?.anchor||!l?.head)return;const d=fe(l.anchor,n),c=fe(l.head,n);if(d?.type!==t||c?.type!==t)return;const h="jp-remote-selection";for(const f of ft.forRange(r,h,ut.range(d.index,c.index)))s.push(new kt({backgroundColor:He(o.user,i)},f))}}),s},update(r,e){return!!r.transactions.find(t=>t.annotation(De))},class:"jp-remote-selections"}),Hn=At.fromClass(class{editorAwareness;_listener;constructor(r){this.editorAwareness=r.state.facet(ve),this._listener=({added:e,updated:t,removed:n})=>{e.concat(t).concat(n).findIndex(o=>o!==this.editorAwareness.awareness.doc.clientID)>=0&&r.dispatch({annotations:[De.of([])]})},this.editorAwareness.awareness.on("change",this._listener)}destroy(){this.editorAwareness.awareness.off("change",this._listener)}update(r){if(!r.docChanged&&!r.selectionSet)return;const{awareness:e,ytext:t}=this.editorAwareness,n=e.getLocalState();if(n){const s=r.view.hasFocus&&r.view.dom.ownerDocument.hasFocus(),o=r.state.selection,i=new Array;if(s&&o){for(const a of o.ranges){const l=a===o.main,d=Je(t,a.anchor),c=Je(t,a.head);i.push({anchor:d,head:c,primary:l,empty:a.empty})}if(!n.cursors||i.length>0){const a=n.cursors?.map(l=>({...l,anchor:l?.anchor?Ye(l.anchor):null,head:l?.head?Ye(l.head):null}));W.deepEqual(i,a)||e.setLocalStateField("cursors",i)}}}}},{provide:()=>[Wn,Vn,Gn,$n,It({position:"absolute",parent:document.body})]});function zn(r){return[ve.of(r),Hn]}class Ae extends Ft{constructor(e={}){var t;super(),this.version="2.0.0",this.ymeta=this.ydoc.getMap("meta"),this._onMetaChanged=n=>{const s=n.find(i=>i.target===this.ymeta.get("metadata"));if(s){const i=s.changes.keys,a=this.ymeta.get("metadata");s.changes.keys.forEach((l,d)=>{switch(l.action){case"add":this._metadataChanged.emit({key:d,type:"add",newValue:a.get(d)});break;case"delete":this._metadataChanged.emit({key:d,type:"remove",oldValue:l.oldValue});break;case"update":{const c=a.get(d),h=l.oldValue;let f=!0;typeof h=="object"&&typeof c=="object"?f=W.deepEqual(h,c):f=h===c,f||this._metadataChanged.emit({key:d,type:"change",oldValue:h,newValue:c})}break}}),this._changed.emit({metadataChange:i})}const o=n.find(i=>i.target===this.ymeta);if(o){if(o.keysChanged.has("metadata")){const i=o.changes.keys.get("metadata");if(i?.action==="add"&&!i.oldValue){const a=new Map;for(const l of Object.keys(this.metadata))a.set(l,{action:"add",oldValue:void 0}),this._metadataChanged.emit({key:l,type:"add",newValue:this.getMetadata(l)});this._changed.emit({metadataChange:a})}}if(o.keysChanged.has("nbformat")){const i=o.changes.keys.get("nbformat"),a={key:"nbformat",oldValue:i?.oldValue?i.oldValue:void 0,newValue:this.nbformat};this._changed.emit({nbformatChanged:a})}if(o.keysChanged.has("nbformat_minor")){const i=o.changes.keys.get("nbformat_minor"),a={key:"nbformat_minor",oldValue:i?.oldValue?i.oldValue:void 0,newValue:this.nbformat_minor};this._changed.emit({nbformatChanged:a})}}},this._onYCellsChanged=n=>{n.changes.added.forEach(i=>{const a=i.content.type;if(!this._ycellMapping.has(a)){const l=Xe(a,{notebook:this});this._ycellMapping.set(a,l)}}),n.changes.deleted.forEach(i=>{const a=i.content.type,l=this._ycellMapping.get(a);l&&(l.dispose(),this._ycellMapping.delete(a))});let s=0;const o=[];n.changes.delta.forEach(i=>{if(i.insert!=null){const a=i.insert.map(l=>this._ycellMapping.get(l));o.push({insert:a}),this.cells.splice(s,0,...a),s+=i.insert.length}else i.delete!=null?(o.push(i),this.cells.splice(s,i.delete)):i.retain!=null&&(o.push(i),s+=i.retain)}),this._changed.emit({cellsChange:o})},this._metadataChanged=new A(this),this._ycells=this.ydoc.getArray("cells"),this._ycellMapping=new WeakMap,this._disableDocumentWideUndoRedo=(t=e.disableDocumentWideUndoRedo)!==null&&t!==void 0?t:!1,this.cells=this._ycells.toArray().map(n=>(this._ycellMapping.has(n)||this._ycellMapping.set(n,Xe(n,{notebook:this})),this._ycellMapping.get(n))),this.undoManager.addToScope(this._ycells),this._ycells.observe(this._onYCellsChanged),this.ymeta.observeDeep(this._onMetaChanged)}static create(e={}){var t,n,s,o,i,a,l,d,c;const h=new Ae({disableDocumentWideUndoRedo:(t=e.disableDocumentWideUndoRedo)!==null&&t!==void 0?t:!1}),f={cells:(s=(n=e.data)===null||n===void 0?void 0:n.cells)!==null&&s!==void 0?s:[],nbformat:(i=(o=e.data)===null||o===void 0?void 0:o.nbformat)!==null&&i!==void 0?i:4,nbformat_minor:(l=(a=e.data)===null||a===void 0?void 0:a.nbformat_minor)!==null&&l!==void 0?l:5,metadata:(c=(d=e.data)===null||d===void 0?void 0:d.metadata)!==null&&c!==void 0?c:{}};return h.setSource(f),h}get disableDocumentWideUndoRedo(){return this._disableDocumentWideUndoRedo}get metadata(){return this.getMetadata()}set metadata(e){this.setMetadata(e)}get metadataChanged(){return this._metadataChanged}get nbformat(){return this.ymeta.get("nbformat")}set nbformat(e){this.transact(()=>{this.ymeta.set("nbformat",e)},!1)}get nbformat_minor(){return this.ymeta.get("nbformat_minor")}set nbformat_minor(e){this.transact(()=>{this.ymeta.set("nbformat_minor",e)},!1)}dispose(){this.isDisposed||(this._ycells.unobserve(this._onYCellsChanged),this.ymeta.unobserveDeep(this._onMetaChanged),super.dispose())}getCell(e){return this.cells[e]}addCell(e){return this.insertCell(this._ycells.length,e)}insertCell(e,t){return this.insertCells(e,[t])[0]}insertCells(e,t){const n=t.map(s=>{const o=Ze(s,this);return this._ycellMapping.set(o.ymodel,o),o});return this.transact(()=>{this._ycells.insert(e,n.map(s=>s.ymodel))}),this.dirty=!0,n}moveCell(e,t){this.moveCells(e,t)}moveCells(e,t,n=1){const s=new Array(n).fill(!0).map((o,i)=>this.getCell(e+i).toJSON());this.transact(()=>{this._ycells.delete(e,n),this._ycells.insert(e>t?t:t-n+1,s.map(o=>Ze(o,this).ymodel))}),this.dirty=!0}deleteCell(e){this.deleteCellRange(e,e+1)}deleteCellRange(e,t){this.transact(()=>{this._ycells.delete(e,t-e)}),this.dirty=!0}deleteMetadata(e){if(typeof this.getMetadata(e)>"u")return;const t=this.metadata;delete t[e],this.setMetadata(t)}getMetadata(e){const t=this.ymeta.get("metadata");if(t!==void 0)if(typeof e=="string"){const n=t.get(e);return typeof n>"u"?void 0:W.deepCopy(n)}else return W.deepCopy(t.toJSON())}setMetadata(e,t){var n;if(typeof e=="string"){if(typeof t>"u")throw new TypeError(`Metadata value for ${e} cannot be 'undefined'; use deleteMetadata.`);if(W.deepEqual((n=this.getMetadata(e))!==null&&n!==void 0?n:null,t))return;const s={};s[e]=t,this.updateMetadata(s)}else if(!this.metadata||!W.deepEqual(this.metadata,e)){const s=W.deepCopy(e),o=this.ymeta.get("metadata");if(o===void 0)return;this.transact(()=>{o.clear();for(const[i,a]of Object.entries(s))o.set(i,a)}),this.dirty=!0}}updateMetadata(e){const t=W.deepCopy(e),n=this.ymeta.get("metadata");n!==void 0&&(this.transact(()=>{for(const[s,o]of Object.entries(t))n.set(s,o)}),this.dirty=!0)}getSource(){return this.toJSON()}setSource(e){this.fromJSON(e),this.dirty=!1}fromJSON(e){this.transact(()=>{this.nbformat=e.nbformat,this.nbformat_minor=e.nbformat_minor;const t=e.metadata;if(t.orig_nbformat!==void 0&&delete t.orig_nbformat,this.metadata)this.metadata=t;else{const o=new me;for(const[i,a]of Object.entries(t))o.set(i,a);this.ymeta.set("metadata",o)}const n=e.nbformat===4&&e.nbformat_minor>=5,s=e.cells.map(o=>(n||delete o.id,o));this.insertCells(this.cells.length,s),this.deleteCellRange(0,this.cells.length)})}toJSON(){const e=this.nbformat===4&&this.nbformat_minor<=4;return{metadata:this.metadata,nbformat_minor:this.nbformat_minor,nbformat:this.nbformat,cells:this.cells.map(t=>{const n=t.toJSON();return e&&delete n.id,n})}}}class Kn{constructor(e){this.model=e,this._cellMap=new WeakMap,this._changed=new A(this),this._isDisposed=!1,this._insertCells(0,this.model.cells),this.model.changed.connect(this._onSharedModelChanged,this)}get changed(){return this._changed}get isDisposed(){return this._isDisposed}get length(){return this.model.cells.length}*[Symbol.iterator](){for(const e of this.model.cells)yield this._cellMap.get(e)}dispose(){var e;if(!this._isDisposed){this._isDisposed=!0;for(const t of this.model.cells)(e=this._cellMap.get(t))===null||e===void 0||e.dispose();A.clearData(this)}}get(e){return this._cellMap.get(this.model.cells[e])}_insertCells(e,t){return t.forEach(n=>{let s;switch(n.cell_type){case"code":{s=new Vt({sharedModel:n});break}case"markdown":{s=new Wt({sharedModel:n});break}default:s=new Bt({sharedModel:n})}this._cellMap.set(n,s),n.disposed.connect(()=>{s.dispose(),this._cellMap.delete(n)})}),this.length}_onSharedModelChanged(e,t){var n;let s=0;const o=new Array;(n=t.cellsChange)===null||n===void 0||n.forEach(i=>{i.insert!=null?(this._insertCells(s,i.insert),o.push({type:"add",newIndex:s,newValues:i.insert.map(a=>this._cellMap.get(a)),oldIndex:-2,oldValues:[]}),s+=i.insert.length):i.delete!=null?o.push({type:"remove",newIndex:-1,newValues:[],oldIndex:s,oldValues:new Array(i.delete).fill(void 0)}):i.retain!=null&&(s+=i.retain)}),o.forEach(i=>this._changed.emit(i))}}class qn{constructor(e){this._requestBatchSize=10,this._cursor=0,this._hasSession=!1,this._history=[],this._placeholder="",this._kernelSession="",this._setByHistory=!1,this._isDisposed=!1,this._editor=null,this._filtered=[],this._kernel=null,this._sessionContext=e.sessionContext,this._trans=(e.translator||_e).load("jupyterlab"),this._handleKernel().then(()=>{this._sessionContext.kernelChanged.connect(this._handleKernel,this)}),this._toRequest=this._requestBatchSize}get editor(){return this._editor}set editor(e){if(this._editor===e)return;const t=this._editor;t&&t.model.sharedModel.changed.disconnect(this.onTextChange,this),this._editor=e,e&&e.model.sharedModel.changed.connect(this.onTextChange,this)}get placeholder(){return this._placeholder}get kernelSession(){return this._kernelSession}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed=!0,this._history.length=0,A.clearData(this)}async checkSession(e){var t;this._hasSession||(await this._retrieveHistory(),this._hasSession=!0,this.editor=e.editor,this._placeholder=((t=this._editor)===null||t===void 0?void 0:t.model.sharedModel.getSource())||"",this.setFilter(this._placeholder),this._cursor=this._filtered.length-1)}async back(e){return await this.checkSession(e),--this._cursor,this._cursor<0&&await this.fetchBatch(),this._cursor=Math.max(0,this._cursor),this._filtered[this._cursor]}async forward(e){return await this.checkSession(e),++this._cursor,this._cursor=Math.min(this._filtered.length-1,this._cursor),this._filtered[this._cursor]}updateEditor(e,t){var n,s;if(e){const o=(n=e.editor)===null||n===void 0?void 0:n.model,i=o?.sharedModel.getSource();if(this.isDisposed||!t||i===t)return;this._setByHistory=!0,o?.sharedModel.setSource(t);let a=0;a=t.indexOf(`
|
|
1
|
+
import{r as _,v as qe,j as u,j9 as jt,I as U,eK as Ge,cE as pe,be as ge,c as J,ff as Pt,f9 as Ue,fq as Tt,ja as Dt,jb as At,jc as Je,jd as Ye,cj as W,je as It,jf as Nt,jg as Lt,bC as Te,jh as ct,ji as ht,jj as Rt,jk as fe,az as Ot,by as ut,jl as ft,jm as Ft,jn as Xe,F as A,jo as Ze,jp as me,jq as Bt,jr as Wt,js as Vt,ao as _e,jt as Ie,ju as Qe,cA as ke,cz as ee,b9 as $t,em as Gt,cg as z,jv as Ht,aa as mt,ag as zt,co as Kt,ai as Z,cW as qt,dm as Ut,i1 as Fe,h$ as pt,jw as xe,jx as de,jy as Jt,ar as Yt,aj as Xt,jz as Zt,ak as Qt,jA as gt,hK as H,jB as en,jC as R,jD as tn,df as nn,jE as _t,jF as sn,e7 as on,e8 as rn,ee as ce,e9 as Ne,ea as an,jG as ln,jH as dn,jI as cn,eH as ne,B as ue,a9 as hn,d3 as un,dY as et,_ as fn,ab as mn,jJ as pn,jK as gn,jL as _n,jM as vn,e0 as tt,e1 as he,e2 as yn,e3 as Cn,e4 as bn,ct as wn,l as kn,jN as xn,jO as vt,fR as Mn,jP as ae,bd as T,C as le,cL as nt,bp as yt,dx as Sn,cP as En,bm as Me,i as jn,P as Pn,as as Tn,aC as Dn}from"../datalayer-app-main.js";import{c as An,N as Be}from"./NotebookSkeleton-D9WNoiWD.js";import{a as In,W as st}from"./renderer-jz0zn1Az.js";import{C as Se,S as Ee}from"./SquareIcon-e3ygcjpv.js";function Nn(...r){return _.useCallback(e=>{for(const t of r)typeof t=="function"?t(e):t&&(t.current=e)},r)}var Q={Banner:"prc-Banner-Banner-IR8eJ",BannerContainer:"prc-Banner-BannerContainer-lbx3d",BannerContent:"prc-Banner-BannerContent-zTITK",BannerActions:"prc-Banner-BannerActions-XCfHL",BannerTitle:"prc-Banner-BannerTitle-TcuJl",BannerIcon:"prc-Banner-BannerIcon-WuOyf",BannerDismiss:"prc-Banner-BannerDismiss-uBZVm",BannerActionsContainer:"prc-Banner-BannerActionsContainer-ukGMH"};const Ln={critical:u.jsx(Dt,{}),info:u.jsx(Ue,{}),success:u.jsx(Tt,{}),upsell:u.jsx(Ue,{}),warning:u.jsx(Pt,{})},Rn={critical:"Critical",info:"Information",success:"Success",upsell:"Recommendation",warning:"Warning"},On=qe.forwardRef(function({"aria-label":e,children:t,className:n,description:s,hideTitle:o,icon:i,onDismiss:a,primaryAction:l,secondaryAction:d,title:c,variant:h="info",...f},m){const C=!!a,x=l||d,I=qe.useRef(null),L=Nn(m,I),g=h==="info"||h==="upsell";return u.jsxs("section",{...f,"aria-label":e??Rn[h],className:pe(n,Q.Banner),"data-dismissible":a?"":void 0,"data-title-hidden":o?"":void 0,"data-variant":h,tabIndex:-1,ref:L,children:[u.jsx("div",{className:Q.BannerIcon,children:i&&g?i:Ln[h]}),u.jsxs("div",{className:Q.BannerContainer,children:[u.jsxs("div",{className:Q.BannerContent,children:[c?o?u.jsx(jt,{children:u.jsx(We,{children:c})}):u.jsx(We,{children:c}):null,s?u.jsx(Ct,{children:s}):null,t]}),x?u.jsx(Fn,{primaryAction:l,secondaryAction:d}):null]}),C?u.jsx(U,{"aria-label":"Dismiss banner",onClick:a,className:Q.BannerDismiss,icon:Ge,variant:"invisible"}):null]})});function We(r){const e=ge.c(12);let t,n,s,o;e[0]!==r?({as:o,className:n,children:t,...s}=r,e[0]=r,e[1]=t,e[2]=n,e[3]=s,e[4]=o):(t=e[1],n=e[2],s=e[3],o=e[4]);const i=o===void 0?"h2":o;let a;e[5]!==n?(a=pe(n,Q.BannerTitle),e[5]=n,e[6]=a):a=e[6];let l;return e[7]!==i||e[8]!==t||e[9]!==s||e[10]!==a?(l=u.jsx(i,{...s,className:a,"data-banner-title":"",children:t}),e[7]=i,e[8]=t,e[9]=s,e[10]=a,e[11]=l):l=e[11],l}function Ct(r){const e=ge.c(10);let t,n,s;e[0]!==r?({children:t,className:n,...s}=r,e[0]=r,e[1]=t,e[2]=n,e[3]=s):(t=e[1],n=e[2],s=e[3]);let o;e[4]!==n?(o=pe("BannerDescription",n),e[4]=n,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==s||e[8]!==o?(i=u.jsx("div",{...s,className:o,children:t}),e[6]=t,e[7]=s,e[8]=o,e[9]=i):i=e[9],i}function Fn(r){const e=ge.c(9),{primaryAction:t,secondaryAction:n}=r,s=n??null,o=t??null;let i;e[0]!==s||e[1]!==o?(i=u.jsxs("div",{className:Q.BannerActionsContainer,"data-primary-action":"trailing",children:[s,o]}),e[0]=s,e[1]=o,e[2]=i):i=e[2];const a=t??null,l=n??null;let d;e[3]!==a||e[4]!==l?(d=u.jsxs("div",{className:Q.BannerActionsContainer,"data-primary-action":"leading",children:[a,l]}),e[3]=a,e[4]=l,e[5]=d):d=e[5];let c;return e[6]!==i||e[7]!==d?(c=u.jsxs("div",{className:Q.BannerActions,children:[i,d]}),e[6]=i,e[7]=d,e[8]=c):c=e[8],c}const bt=_.forwardRef((r,e)=>{const t=ge.c(11);let n,s,o;t[0]!==r?({children:n,className:s,...o}=r,t[0]=r,t[1]=n,t[2]=s,t[3]=o):(n=t[1],s=t[2],o=t[3]);let i;t[4]!==s?(i=pe("BannerPrimaryAction",s),t[4]=s,t[5]=i):i=t[5];let a;return t[6]!==n||t[7]!==e||t[8]!==o||t[9]!==i?(a=u.jsx(J,{ref:e,className:i,variant:"default",...o,children:n}),t[6]=n,t[7]=e,t[8]=o,t[9]=i,t[10]=a):a=t[10],a});bt.displayName="BannerPrimaryAction";const wt=_.forwardRef((r,e)=>{const t=ge.c(11);let n,s,o;t[0]!==r?({children:n,className:s,...o}=r,t[0]=r,t[1]=n,t[2]=s,t[3]=o):(n=t[1],s=t[2],o=t[3]);let i;t[4]!==s?(i=pe("BannerPrimaryAction",s),t[4]=s,t[5]=i):i=t[5];let a;return t[6]!==n||t[7]!==e||t[8]!==o||t[9]!==i?(a=u.jsx(J,{ref:e,className:i,variant:"link",...o,children:n}),t[6]=n,t[7]=e,t[8]=o,t[9]=i,t[10]=a):a=t[10],a});wt.displayName="BannerSecondaryAction";const Bn=Object.assign(On,{Title:We,Description:Ct,PrimaryAction:bt,SecondaryAction:wt}),ve=Nt.define({combine(r){return r[r.length-1]}}),Wn=Te.baseTheme({".jp-remote-cursor":{borderLeft:"1px solid black",marginLeft:"-1px"},".jp-remote-cursor.jp-mod-primary":{borderLeftWidth:"2px"},".jp-remote-selection":{opacity:.5},".cm-tooltip":{border:"none"},".cm-tooltip.jp-remote-userInfo":{color:"var(--fgColor-onEmphasis, #ffffff)",padding:"0px 2px"}});function He(r,e){const t=r?.username||r?.display_name||r?.name||String(e),{theme:n,colorMode:s}=Ot.getState(),o=s==="auto"?typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light":s;return An(t,n,o)}const De=Lt.define();class kt{style;marker;constructor(e,t){this.style=e,this.marker=t}draw(){const e=this.marker.draw();for(const[t,n]of Object.entries(this.style))e.style[t]=n;return e}eq(e){return this.marker.eq(e.marker)&&W.deepEqual(this.style,e.style)}update(e,t){for(const[n,s]of Object.entries(this.style))e.style[n]=s;return this.marker.update(e,t.marker)}}const Vn=ct({above:!0,markers(r){const{awareness:e,ytext:t}=r.state.facet(ve),n=t.doc,s=[];return e.getStates().forEach((o,i)=>{if(i===e.doc.clientID)return;const a=o.cursors;for(const l of a??[]){if(!l?.anchor||!l?.head)return;const d=fe(l.anchor,n),c=fe(l.head,n);if(d?.type!==t||c?.type!==t)return;const h=l.primary??!0?"jp-remote-cursor jp-mod-primary":"jp-remote-cursor",f=ut.cursor(c.index,c.index>d.index?-1:1);for(const m of ft.forRange(r,h,f))s.push(new kt({borderLeftColor:He(o.user,i)},m))}}),s},update(r,e){return!!r.transactions.find(t=>t.annotation(De))},class:"jp-remote-cursors"});function ot(r){const e=new Array,{awareness:t,ytext:n}=r.facet(ve),s=n.doc;for(const[o,i]of t.getStates())if(o!==t.doc.clientID)for(const a of i.cursors??[]){if(!a?.head)continue;const l=fe(a.head,s);l?.type===n&&e.push({pos:l.index,above:!0,create:()=>{const d=document.createElement("div");return d.classList.add("jp-remote-userInfo"),d.style.backgroundColor=He(i.user,o),d.textContent=i.user?.display_name??"Anonymous",{dom:d}}})}return e}const $n=ht.define({create:ot,update(r,e){return e.annotation(De)?ot(e.state):r},provide(r){return Rt.computeN([r],e=>e.field(r))}}),Gn=ct({above:!1,markers(r){const{awareness:e,ytext:t}=r.state.facet(ve),n=t.doc,s=[];return e.getStates().forEach((o,i)=>{if(i===e.doc.clientID)return;const a=o.cursors;for(const l of a??[]){if((l.empty??!0)||!l?.anchor||!l?.head)return;const d=fe(l.anchor,n),c=fe(l.head,n);if(d?.type!==t||c?.type!==t)return;const h="jp-remote-selection";for(const f of ft.forRange(r,h,ut.range(d.index,c.index)))s.push(new kt({backgroundColor:He(o.user,i)},f))}}),s},update(r,e){return!!r.transactions.find(t=>t.annotation(De))},class:"jp-remote-selections"}),Hn=At.fromClass(class{editorAwareness;_listener;constructor(r){this.editorAwareness=r.state.facet(ve),this._listener=({added:e,updated:t,removed:n})=>{e.concat(t).concat(n).findIndex(o=>o!==this.editorAwareness.awareness.doc.clientID)>=0&&r.dispatch({annotations:[De.of([])]})},this.editorAwareness.awareness.on("change",this._listener)}destroy(){this.editorAwareness.awareness.off("change",this._listener)}update(r){if(!r.docChanged&&!r.selectionSet)return;const{awareness:e,ytext:t}=this.editorAwareness,n=e.getLocalState();if(n){const s=r.view.hasFocus&&r.view.dom.ownerDocument.hasFocus(),o=r.state.selection,i=new Array;if(s&&o){for(const a of o.ranges){const l=a===o.main,d=Je(t,a.anchor),c=Je(t,a.head);i.push({anchor:d,head:c,primary:l,empty:a.empty})}if(!n.cursors||i.length>0){const a=n.cursors?.map(l=>({...l,anchor:l?.anchor?Ye(l.anchor):null,head:l?.head?Ye(l.head):null}));W.deepEqual(i,a)||e.setLocalStateField("cursors",i)}}}}},{provide:()=>[Wn,Vn,Gn,$n,It({position:"absolute",parent:document.body})]});function zn(r){return[ve.of(r),Hn]}class Ae extends Ft{constructor(e={}){var t;super(),this.version="2.0.0",this.ymeta=this.ydoc.getMap("meta"),this._onMetaChanged=n=>{const s=n.find(i=>i.target===this.ymeta.get("metadata"));if(s){const i=s.changes.keys,a=this.ymeta.get("metadata");s.changes.keys.forEach((l,d)=>{switch(l.action){case"add":this._metadataChanged.emit({key:d,type:"add",newValue:a.get(d)});break;case"delete":this._metadataChanged.emit({key:d,type:"remove",oldValue:l.oldValue});break;case"update":{const c=a.get(d),h=l.oldValue;let f=!0;typeof h=="object"&&typeof c=="object"?f=W.deepEqual(h,c):f=h===c,f||this._metadataChanged.emit({key:d,type:"change",oldValue:h,newValue:c})}break}}),this._changed.emit({metadataChange:i})}const o=n.find(i=>i.target===this.ymeta);if(o){if(o.keysChanged.has("metadata")){const i=o.changes.keys.get("metadata");if(i?.action==="add"&&!i.oldValue){const a=new Map;for(const l of Object.keys(this.metadata))a.set(l,{action:"add",oldValue:void 0}),this._metadataChanged.emit({key:l,type:"add",newValue:this.getMetadata(l)});this._changed.emit({metadataChange:a})}}if(o.keysChanged.has("nbformat")){const i=o.changes.keys.get("nbformat"),a={key:"nbformat",oldValue:i?.oldValue?i.oldValue:void 0,newValue:this.nbformat};this._changed.emit({nbformatChanged:a})}if(o.keysChanged.has("nbformat_minor")){const i=o.changes.keys.get("nbformat_minor"),a={key:"nbformat_minor",oldValue:i?.oldValue?i.oldValue:void 0,newValue:this.nbformat_minor};this._changed.emit({nbformatChanged:a})}}},this._onYCellsChanged=n=>{n.changes.added.forEach(i=>{const a=i.content.type;if(!this._ycellMapping.has(a)){const l=Xe(a,{notebook:this});this._ycellMapping.set(a,l)}}),n.changes.deleted.forEach(i=>{const a=i.content.type,l=this._ycellMapping.get(a);l&&(l.dispose(),this._ycellMapping.delete(a))});let s=0;const o=[];n.changes.delta.forEach(i=>{if(i.insert!=null){const a=i.insert.map(l=>this._ycellMapping.get(l));o.push({insert:a}),this.cells.splice(s,0,...a),s+=i.insert.length}else i.delete!=null?(o.push(i),this.cells.splice(s,i.delete)):i.retain!=null&&(o.push(i),s+=i.retain)}),this._changed.emit({cellsChange:o})},this._metadataChanged=new A(this),this._ycells=this.ydoc.getArray("cells"),this._ycellMapping=new WeakMap,this._disableDocumentWideUndoRedo=(t=e.disableDocumentWideUndoRedo)!==null&&t!==void 0?t:!1,this.cells=this._ycells.toArray().map(n=>(this._ycellMapping.has(n)||this._ycellMapping.set(n,Xe(n,{notebook:this})),this._ycellMapping.get(n))),this.undoManager.addToScope(this._ycells),this._ycells.observe(this._onYCellsChanged),this.ymeta.observeDeep(this._onMetaChanged)}static create(e={}){var t,n,s,o,i,a,l,d,c;const h=new Ae({disableDocumentWideUndoRedo:(t=e.disableDocumentWideUndoRedo)!==null&&t!==void 0?t:!1}),f={cells:(s=(n=e.data)===null||n===void 0?void 0:n.cells)!==null&&s!==void 0?s:[],nbformat:(i=(o=e.data)===null||o===void 0?void 0:o.nbformat)!==null&&i!==void 0?i:4,nbformat_minor:(l=(a=e.data)===null||a===void 0?void 0:a.nbformat_minor)!==null&&l!==void 0?l:5,metadata:(c=(d=e.data)===null||d===void 0?void 0:d.metadata)!==null&&c!==void 0?c:{}};return h.setSource(f),h}get disableDocumentWideUndoRedo(){return this._disableDocumentWideUndoRedo}get metadata(){return this.getMetadata()}set metadata(e){this.setMetadata(e)}get metadataChanged(){return this._metadataChanged}get nbformat(){return this.ymeta.get("nbformat")}set nbformat(e){this.transact(()=>{this.ymeta.set("nbformat",e)},!1)}get nbformat_minor(){return this.ymeta.get("nbformat_minor")}set nbformat_minor(e){this.transact(()=>{this.ymeta.set("nbformat_minor",e)},!1)}dispose(){this.isDisposed||(this._ycells.unobserve(this._onYCellsChanged),this.ymeta.unobserveDeep(this._onMetaChanged),super.dispose())}getCell(e){return this.cells[e]}addCell(e){return this.insertCell(this._ycells.length,e)}insertCell(e,t){return this.insertCells(e,[t])[0]}insertCells(e,t){const n=t.map(s=>{const o=Ze(s,this);return this._ycellMapping.set(o.ymodel,o),o});return this.transact(()=>{this._ycells.insert(e,n.map(s=>s.ymodel))}),this.dirty=!0,n}moveCell(e,t){this.moveCells(e,t)}moveCells(e,t,n=1){const s=new Array(n).fill(!0).map((o,i)=>this.getCell(e+i).toJSON());this.transact(()=>{this._ycells.delete(e,n),this._ycells.insert(e>t?t:t-n+1,s.map(o=>Ze(o,this).ymodel))}),this.dirty=!0}deleteCell(e){this.deleteCellRange(e,e+1)}deleteCellRange(e,t){this.transact(()=>{this._ycells.delete(e,t-e)}),this.dirty=!0}deleteMetadata(e){if(typeof this.getMetadata(e)>"u")return;const t=this.metadata;delete t[e],this.setMetadata(t)}getMetadata(e){const t=this.ymeta.get("metadata");if(t!==void 0)if(typeof e=="string"){const n=t.get(e);return typeof n>"u"?void 0:W.deepCopy(n)}else return W.deepCopy(t.toJSON())}setMetadata(e,t){var n;if(typeof e=="string"){if(typeof t>"u")throw new TypeError(`Metadata value for ${e} cannot be 'undefined'; use deleteMetadata.`);if(W.deepEqual((n=this.getMetadata(e))!==null&&n!==void 0?n:null,t))return;const s={};s[e]=t,this.updateMetadata(s)}else if(!this.metadata||!W.deepEqual(this.metadata,e)){const s=W.deepCopy(e),o=this.ymeta.get("metadata");if(o===void 0)return;this.transact(()=>{o.clear();for(const[i,a]of Object.entries(s))o.set(i,a)}),this.dirty=!0}}updateMetadata(e){const t=W.deepCopy(e),n=this.ymeta.get("metadata");n!==void 0&&(this.transact(()=>{for(const[s,o]of Object.entries(t))n.set(s,o)}),this.dirty=!0)}getSource(){return this.toJSON()}setSource(e){this.fromJSON(e),this.dirty=!1}fromJSON(e){this.transact(()=>{this.nbformat=e.nbformat,this.nbformat_minor=e.nbformat_minor;const t=e.metadata;if(t.orig_nbformat!==void 0&&delete t.orig_nbformat,this.metadata)this.metadata=t;else{const o=new me;for(const[i,a]of Object.entries(t))o.set(i,a);this.ymeta.set("metadata",o)}const n=e.nbformat===4&&e.nbformat_minor>=5,s=e.cells.map(o=>(n||delete o.id,o));this.insertCells(this.cells.length,s),this.deleteCellRange(0,this.cells.length)})}toJSON(){const e=this.nbformat===4&&this.nbformat_minor<=4;return{metadata:this.metadata,nbformat_minor:this.nbformat_minor,nbformat:this.nbformat,cells:this.cells.map(t=>{const n=t.toJSON();return e&&delete n.id,n})}}}class Kn{constructor(e){this.model=e,this._cellMap=new WeakMap,this._changed=new A(this),this._isDisposed=!1,this._insertCells(0,this.model.cells),this.model.changed.connect(this._onSharedModelChanged,this)}get changed(){return this._changed}get isDisposed(){return this._isDisposed}get length(){return this.model.cells.length}*[Symbol.iterator](){for(const e of this.model.cells)yield this._cellMap.get(e)}dispose(){var e;if(!this._isDisposed){this._isDisposed=!0;for(const t of this.model.cells)(e=this._cellMap.get(t))===null||e===void 0||e.dispose();A.clearData(this)}}get(e){return this._cellMap.get(this.model.cells[e])}_insertCells(e,t){return t.forEach(n=>{let s;switch(n.cell_type){case"code":{s=new Vt({sharedModel:n});break}case"markdown":{s=new Wt({sharedModel:n});break}default:s=new Bt({sharedModel:n})}this._cellMap.set(n,s),n.disposed.connect(()=>{s.dispose(),this._cellMap.delete(n)})}),this.length}_onSharedModelChanged(e,t){var n;let s=0;const o=new Array;(n=t.cellsChange)===null||n===void 0||n.forEach(i=>{i.insert!=null?(this._insertCells(s,i.insert),o.push({type:"add",newIndex:s,newValues:i.insert.map(a=>this._cellMap.get(a)),oldIndex:-2,oldValues:[]}),s+=i.insert.length):i.delete!=null?o.push({type:"remove",newIndex:-1,newValues:[],oldIndex:s,oldValues:new Array(i.delete).fill(void 0)}):i.retain!=null&&(s+=i.retain)}),o.forEach(i=>this._changed.emit(i))}}class qn{constructor(e){this._requestBatchSize=10,this._cursor=0,this._hasSession=!1,this._history=[],this._placeholder="",this._kernelSession="",this._setByHistory=!1,this._isDisposed=!1,this._editor=null,this._filtered=[],this._kernel=null,this._sessionContext=e.sessionContext,this._trans=(e.translator||_e).load("jupyterlab"),this._handleKernel().then(()=>{this._sessionContext.kernelChanged.connect(this._handleKernel,this)}),this._toRequest=this._requestBatchSize}get editor(){return this._editor}set editor(e){if(this._editor===e)return;const t=this._editor;t&&t.model.sharedModel.changed.disconnect(this.onTextChange,this),this._editor=e,e&&e.model.sharedModel.changed.connect(this.onTextChange,this)}get placeholder(){return this._placeholder}get kernelSession(){return this._kernelSession}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed=!0,this._history.length=0,A.clearData(this)}async checkSession(e){var t;this._hasSession||(await this._retrieveHistory(),this._hasSession=!0,this.editor=e.editor,this._placeholder=((t=this._editor)===null||t===void 0?void 0:t.model.sharedModel.getSource())||"",this.setFilter(this._placeholder),this._cursor=this._filtered.length-1)}async back(e){return await this.checkSession(e),--this._cursor,this._cursor<0&&await this.fetchBatch(),this._cursor=Math.max(0,this._cursor),this._filtered[this._cursor]}async forward(e){return await this.checkSession(e),++this._cursor,this._cursor=Math.min(this._filtered.length-1,this._cursor),this._filtered[this._cursor]}updateEditor(e,t){var n,s;if(e){const o=(n=e.editor)===null||n===void 0?void 0:n.model,i=o?.sharedModel.getSource();if(this.isDisposed||!t||i===t)return;this._setByHistory=!0,o?.sharedModel.setSource(t);let a=0;a=t.indexOf(`
|
|
2
2
|
`),a<0&&(a=t.length),(s=e.editor)===null||s===void 0||s.setCursorPosition({line:0,column:a})}}reset(){this._hasSession=!1,this._placeholder="",this._toRequest=this._requestBatchSize}async fetchBatch(){this._toRequest+=this._requestBatchSize;let e=this._filtered.slice().reverse(),t=this._history.slice();await this._retrieveHistory().then(()=>{this.setFilter(this._placeholder);let n=0,s=this._filtered.slice().reverse();for(let o=0;o<e.length;o++){let i=e[o];for(let a=o+n;a<s.length&&i!==s[a];a++)n+=1}this._cursor=this._filtered.length-(e.length+1)-n}),this._cursor<0&&this._history.length>t.length&&await this.fetchBatch()}onHistory(e,t){this._history.length=0;let n=["","",""],s=["","",""],o="";if(e.content.status==="ok"){for(let i=0;i<e.content.history.length;i++)s=e.content.history[i],s!==n&&(o=e.content.history[i][0],this._history.push(n=s));this.kernelSession||s[2]==t?.model.sharedModel.getSource()&&(this._kernelSession=o)}}onTextChange(){if(this._setByHistory){this._setByHistory=!1;return}this.reset()}async _handleKernel(){var e;if(this._kernel=(e=this._sessionContext.session)===null||e===void 0?void 0:e.kernel,!this._kernel){this._history.length=0;return}await this._retrieveHistory().catch()}async _retrieveHistory(e){var t;return await((t=this._kernel)===null||t===void 0?void 0:t.requestHistory(Un(this._toRequest)).then(n=>{this.onHistory(n,e)}).catch(()=>{console.warn(this._trans.__("History was unable to be retrieved"))}))}setFilter(e=""){this._filtered.length=0;let t="",n="";for(let s=0;s<this._history.length;s++)n=this._history[s][2],n!==t&&e!==n&&this._filtered.push(t=n);this._filtered.push(e)}}function Un(r){return{output:!1,raw:!0,hist_access_type:"tail",n:r}}class Ve{constructor(e={}){var t,n;this.standaloneModel=!1,this._readOnly=!1,this._contentChanged=new A(this),this._stateChanged=new A(this),this._isDisposed=!1,this._metadataChanged=new A(this),this.standaloneModel=typeof e.sharedModel>"u",e.sharedModel?this.sharedModel=e.sharedModel:this.sharedModel=Ae.create({disableDocumentWideUndoRedo:(t=e.disableDocumentWideUndoRedo)!==null&&t!==void 0?t:!0,data:{nbformat:Qe,nbformat_minor:Ie,metadata:{kernelspec:{name:"",display_name:""},language_info:{name:(n=e.languagePreference)!==null&&n!==void 0?n:""}}}}),this._cells=new Kn(this.sharedModel),this._trans=(e.translator||_e).load("jupyterlab"),this._deletedCells=[],this._collaborationEnabled=!!e?.collaborationEnabled,this._cells.changed.connect(this._onCellsChanged,this),this.sharedModel.changed.connect(this._onStateChanged,this),this.sharedModel.metadataChanged.connect(this._onMetadataChanged,this)}get contentChanged(){return this._contentChanged}get metadataChanged(){return this._metadataChanged}get stateChanged(){return this._stateChanged}get cells(){return this._cells}get dirty(){return this.sharedModel.dirty}set dirty(e){const t=this.dirty;e!==t&&(this.sharedModel.dirty=e)}get readOnly(){return this._readOnly}set readOnly(e){if(e===this._readOnly)return;const t=this._readOnly;this._readOnly=e,this.triggerStateChange({name:"readOnly",oldValue:t,newValue:e})}get metadata(){return this.sharedModel.metadata}get nbformat(){return this.sharedModel.nbformat}get nbformatMinor(){return this.sharedModel.nbformat_minor}get defaultKernelName(){var e;const t=this.getMetadata("kernelspec");return(e=t?.name)!==null&&e!==void 0?e:""}get deletedCells(){return this._deletedCells}get defaultKernelLanguage(){var e;const t=this.getMetadata("language_info");return(e=t?.name)!==null&&e!==void 0?e:""}get collaborative(){return this._collaborationEnabled}dispose(){if(this.isDisposed)return;this._isDisposed=!0;const e=this.cells;this._cells=null,e.dispose(),this.standaloneModel&&this.sharedModel.dispose(),A.clearData(this)}deleteMetadata(e){return this.sharedModel.deleteMetadata(e)}getMetadata(e){return this.sharedModel.getMetadata(e)}setMetadata(e,t){typeof t>"u"?this.sharedModel.deleteMetadata(e):this.sharedModel.setMetadata(e,t)}toString(){return JSON.stringify(this.toJSON())}fromString(e){this.fromJSON(JSON.parse(e))}toJSON(){return this._ensureMetadata(),this.sharedModel.toJSON()}fromJSON(e){var t,n;const s=W.deepCopy(e),o=e.metadata.orig_nbformat;if(s.nbformat=Math.max(e.nbformat,Qe),(s.nbformat!==e.nbformat||s.nbformat_minor<Ie)&&(s.nbformat_minor=Ie),o!==void 0&&s.nbformat!==o){const i=s.nbformat>o;let a;i?a=this._trans.__(`This notebook has been converted from an older notebook format (v%1)
|
|
3
3
|
to the current notebook format (v%2).
|
|
4
4
|
The next time you save this notebook, the current notebook format (v%2) will be used.
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import{y as q,fL as an,r as n,j as o,fM as sn,fN as rn,cg as fo,B as p,H as pt,T as W,c as V,cQ as Pt,fa as qt,fO as ae,cL as ht,e as ln,fP as dn,fQ as cn,eJ as un,fR as pn,fS as hn,fT as mn,fU as gn,fV as fn,fW as yn,fX as vn,fY as bn,fZ as wn,aP as xn,ez as jo,ex as kn,eA as $t,f_ as Sn,f$ as Cn,g0 as Ro,g1 as En,g2 as yo,g3 as Tn,g4 as In,g5 as jn,du as Rn,c2 as An,g6 as Pn,g7 as _n,g8 as On,g9 as Nn,ga as Mn,gb as Fn,q as _t,gc as Ln,gd as Un,ge as qn,gf as $n,gg as zn,gh as Bn,gi as Gn,gj as Hn,gk as Wn,gl as Dn,gm as Vn,gn as Kn,go as Yn,gp as Jn,gq as Qn,gr as Ye,gs as Xn,gt as Zn,gu as ea,gv as ta,gw as oa,gx as Ie,gy as na,gz as aa,gA as sa,gB as vo,gC as ra,gD as ia,fi as la,gE as Ot,gF as je,gG as da,c3 as Nt,gH as ca,gI as ua,gJ as pa,gK as ha,gL as ma,gM as ga,gN as fa,gO as ya,gP as va,gQ as ba,gR as Mt,gS as wa,gT as xa,I as ka,gU as Sa,gV as Ca,gW as bo,gX as Ea,gY as Ta,gZ as zt,g_ as Ia,g$ as ja,e$ as Ft,h0 as Ra,h1 as Aa}from"../datalayer-app-main.js";import{S as Pa,E as _a,a as Oa}from"./SignInIcon-4HkE48mS.js";import{F as Na,a as Ma,b as Fa}from"./LinkedInGreyIcon-BoWXE-HS.js";function La(){const e=q(an);return n.useMemo(()=>e.map(a=>a.value),[e])}const Lt={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"}},wo=()=>{if(typeof document>"u")return"";const e=document.getElementById("datalayer-config-data");if(!e?.textContent)return"";try{const a=JSON.parse(e.textContent);return String(a?.iamUrl||"").replace(/\/$/,"")}catch{return""}},Ua=(e,a="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 l=e.message;if(typeof l=="string"&&l.trim())return l}return a},qa=pn`
|
|
2
|
+
.signin-input-theme-scope input:-webkit-autofill,
|
|
3
|
+
.signin-input-theme-scope input:-webkit-autofill:hover,
|
|
4
|
+
.signin-input-theme-scope input:-webkit-autofill:focus,
|
|
5
|
+
.signin-input-theme-scope input:-webkit-autofill:active,
|
|
6
|
+
.signin-input-theme-scope input:-webkit-autofill:disabled,
|
|
7
|
+
.signin-input-theme-scope textarea:-webkit-autofill,
|
|
8
|
+
.signin-input-theme-scope textarea:-webkit-autofill:hover,
|
|
9
|
+
.signin-input-theme-scope textarea:-webkit-autofill:focus,
|
|
10
|
+
.signin-input-theme-scope textarea:-webkit-autofill:active,
|
|
11
|
+
.signin-input-theme-scope textarea:-webkit-autofill:disabled {
|
|
12
|
+
-webkit-text-fill-color: var(--fgColor-default) !important;
|
|
13
|
+
caret-color: var(--fgColor-default) !important;
|
|
14
|
+
-webkit-box-shadow: 0 0 0 1000px var(--bgColor-default) inset !important;
|
|
15
|
+
box-shadow: 0 0 0 1000px var(--bgColor-default) inset !important;
|
|
16
|
+
background-color: var(--bgColor-default) !important;
|
|
17
|
+
transition: background-color 9999s ease-in-out 0s !important;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.signin-input-theme-scope input:disabled,
|
|
21
|
+
.signin-input-theme-scope textarea:disabled {
|
|
22
|
+
-webkit-text-fill-color: var(--fgColor-muted) !important;
|
|
23
|
+
-webkit-box-shadow: 0 0 0 1000px var(--bgColor-default) inset !important;
|
|
24
|
+
box-shadow: 0 0 0 1000px var(--bgColor-default) inset !important;
|
|
25
|
+
background-color: var(--bgColor-default) !important;
|
|
26
|
+
opacity: 1 !important;
|
|
27
|
+
}
|
|
28
|
+
`,$a=({onSignIn:e,onApiKeySignIn:a,loginUrl:l,name:r,title:c="Datalayer OTEL",description:g="Sign in to access the observability dashboard.",icon:f,leadingIcon:S=o.jsx(un,{size:24}),github:h=!1,google:K=!1,linkedin:z=!1,apiKey:Je=!1,signUp:O=!0,socialSignInNavigationTarget:Z,asDoc:y=!1,fillHeight:E=!0,hideHero:ee=!1,calloutTitle:Pe,calloutDescription:Qe,passwordToggleLabel:se="Sign in with a password",signUpTitle:Bt="Don't have an account?",signUpDescription:Y="Create a free Datalayer account with your email address.",signUpLabel:mt="Sign up with email",signUpHref:_e="https://datalayer.ai/signup",onSignUp:B,forgotPasswordHref:J="/password",forgotPasswordLabel:Oe="Forgot password?",showForgotPassword:gt=!0,socialButtonMarginTop:v=3,actionButtonMaxWidth:Q=320})=>{const te=y&&!ee,Xe=r??(y&&c==="Datalayer OTEL"?"Datalayer Sign In":c),ft=f??(y?o.jsx(Pa,{size:24}):S),N=n.useMemo(()=>{if(l)return l;const s=wo();return s?`${s}/api/iam/v1/login`:"/api/iam/v1/login"},[l]),[D,fe]=n.useState(""),[re,yt]=n.useState(""),[Ze,ie]=n.useState(!1),[le,et]=n.useState(!1),[C,ye]=n.useState(!1),[de,Ne]=n.useState(!1),[Me,tt]=n.useState(null),[M,ve]=n.useState(null),[oe,ot]=n.useState(""),[be,we]=n.useState(null),[Fe,F]=n.useState(null),{enqueueToast:x}=sn(),[ce,ne]=n.useState(!1),[P,Le]=n.useState(""),Ue=n.useRef(null),qe=n.useCallback(s=>rn()?fo.URLExt.join(fo.PageConfig.getBaseUrl(),s.oauth2CallbackServerRoute):`${window.location.protocol}//${window.location.hostname}${window.location.port?`:${window.location.port}`:""}${s.oauth2CallbackUIRoute}`,[]),_=n.useMemo(()=>{if(typeof window>"u")return"/";const s=`${window.location.pathname}${window.location.search}${window.location.hash}`;return s.startsWith("/")?s:"/"},[]),$e=n.useCallback(async s=>{if(!de){F(null),tt(s.name),Ne(!0);try{const b=wo(),m=new URLSearchParams({provider:s.name,callback_uri:qe(s)}),L=Z===void 0?void 0:String(Z||"").trim(),ke=L===void 0?_&&_!=="/"?_:void 0:L&&L.startsWith("/")&&!L.startsWith("//")?L:void 0;ke&&m.set("post_auth_redirect",ke);const he=`${b||""}/api/iam/v1/oauth2/authz/url?${m.toString()}`,Be=await fetch(he),Ge=await Be.json(),He=Ge?.autorization_url;if(!Be.ok||!He)throw new Error(Ge?.message||"Unable to start social sign-in.");window.location.assign(He)}catch(b){const m=Ua(b);F(m),x(m,{variant:"error"}),tt(null),Ne(!1)}}},[qe,_,x,de,Z]);n.useEffect(()=>{ce&&Ue.current?.focus()},[ce]);const ue=n.useCallback(()=>{ne(!1),Le("")},[]),vt=n.useCallback(()=>{!P.trim()||!a||(a(P.trim()),ue())},[P,a,ue]),bt=n.useCallback(()=>{if(B){B();return}window.location.assign(_e)},[B,_e]),ze=n.useCallback(()=>{if(J){if(J.startsWith("http://")||J.startsWith("https://")){window.open(J,"_blank","noopener,noreferrer");return}window.location.assign(J)}},[J]),xe=n.useCallback(async()=>{if(!(y||!D||!re||C)){ye(!0),F(null);try{const s=await fetch(N,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({handle:D,password:re})});if(!s.ok)throw new Error(`HTTP ${s.status}`);const b=await s.json();if(b.success&&b.token){const m=String(b?.user?.id||b?.user?.uid||"").trim();if(!!b?.user?.mfaUrl&&m){ve(m),we(b.token),F(null);return}e&&e(b.token,D)}else F(b.message||"Invalid username or password.")}catch(s){F(s instanceof Error?s.message:String(s))}finally{ye(!1)}}},[y,D,re,C,N,e]),pe=n.useCallback(async()=>{if(!(y||C||!M||!oe.trim()||!be)){ye(!0),F(null);try{const s=new URL(N,window.location.origin),b=s.pathname.endsWith("/api/iam/v1/login")?s.href.replace(/\/api\/iam\/v1\/login$/,""):`${s.origin}`,m=await fetch(`${b}/api/iam/v1/users/${M}/mfa/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userUid:M,code:oe.trim()})}),L=await m.json();if(!m.ok||!L?.success)throw new Error(L?.message||"Failed to validate your MFA code.");e&&e(be,D)}catch(s){const b=s instanceof Error?s.message:String(s);F(b),x(b,{variant:"error"})}finally{ye(!1)}}},[y,x,D,C,N,oe,be,M,e]),k=n.useCallback(s=>{s.key==="Enter"&&(M?pe():xe())},[M,xe,pe]),I=de||C||y;return o.jsxs(p,{className:"signin-input-theme-scope",display:"flex",alignItems:ee||te||!E?"flex-start":"center",justifyContent:"center",minHeight:ee||te||!E?"auto":"100vh",bg:ee?"transparent":"canvas.default",color:"fg.default",py:ee?0:te?2:4,children:[o.jsx(qa,{}),o.jsxs(p,{width:"100%",maxWidth:440,p:0,children:[!ee&&o.jsxs(o.Fragment,{children:[o.jsxs(p,{display:"flex",alignItems:"center",gap:2,mb:te?2:3,justifyContent:"center",children:[ft,o.jsx(pt,{sx:{fontSize:3},children:Xe})]}),o.jsx(W,{as:"p",sx:{fontSize:1,color:"fg.muted",mb:te?2:3,textAlign:"center"},children:g})]}),(Pe||Qe)&&o.jsxs(p,{mb:3,textAlign:"center",children:[Pe&&o.jsx(pt,{as:"h3",sx:{fontSize:2,mb:1},children:Pe}),Qe&&o.jsx(W,{sx:{color:"fg.muted",fontSize:1},children:Qe})]}),!M&&(h||K||z)&&o.jsxs(o.Fragment,{children:[h&&o.jsx(V,{block:!0,size:"large",leadingVisual:Me==="github"?()=>o.jsx(Pt,{size:"small"}):Na,disabled:I,onClick:()=>$e(Lt.github),sx:{mt:v,maxWidth:Q,mx:"auto"},children:"Sign in with GitHub"}),K&&o.jsx(V,{block:!0,size:"large",leadingVisual:Me==="google"?()=>o.jsx(Pt,{size:"small"}):Ma,disabled:I,onClick:()=>$e(Lt.google),sx:{mt:v,maxWidth:Q,mx:"auto"},children:"Sign in with Google"}),z&&o.jsx(V,{block:!0,size:"large",leadingVisual:Me==="linkedin"?()=>o.jsx(Pt,{size:"small"}):Fa,disabled:I,onClick:()=>$e(Lt.linkedin),sx:{mt:v,maxWidth:Q,mx:"auto"},children:"Sign in with LinkedIn"})]}),!M&&!Ze&&o.jsx(p,{mt:3,display:"flex",justifyContent:"center",children:o.jsx(V,{leadingVisual:qt,size:"large",block:!0,disabled:y||C||de,onClick:()=>ie(!0),sx:{maxWidth:Q,mx:"auto"},children:se})}),!M&&Ze&&o.jsxs(p,{mt:4,children:[o.jsxs(ae,{required:!0,sx:{mb:3},children:[o.jsx(ae.Label,{children:"Username"}),o.jsx(ht,{autoFocus:!0,block:!0,placeholder:"Your username",value:D,disabled:C||y,onChange:s=>fe(s.target.value),onKeyDown:k})]}),o.jsxs(ae,{required:!0,sx:{mb:3},children:[o.jsx(ae.Label,{children:"Password"}),o.jsx(ht,{block:!0,placeholder:"Your password",type:le?"text":"password",value:re,disabled:C||y,onChange:s=>yt(s.target.value),onKeyDown:k,trailingAction:o.jsx(ht.Action,{onClick:()=>et(!le),disabled:C||y,icon:le?_a:Oa,"aria-label":le?"Hide password":"Show password",sx:{color:"var(--fgColor-muted)"}})})]}),o.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:3,children:[o.jsx(V,{variant:"primary",disabled:C||y||!D||!re,onClick:xe,children:C?"Signing in…":"Sign In"}),gt&&o.jsx(ln,{as:"button",sx:{fontSize:1,cursor:y?"not-allowed":"pointer",background:"none",border:"none",opacity:y?.6:1},onClick:()=>{y||C||ze()},children:Oe})]})]}),M&&o.jsxs(o.Fragment,{children:[o.jsxs(ae,{required:!0,sx:{mb:3,mt:2},children:[o.jsx(ae.Label,{children:"MFA Code"}),o.jsx(ht,{autoFocus:!0,block:!0,placeholder:"Your MFA code",value:oe,disabled:C||y,onChange:s=>ot(s.target.value),onKeyDown:k})]}),o.jsx(V,{variant:"primary",block:!0,disabled:C||y||!oe.trim(),onClick:pe,sx:{maxWidth:Q,mx:"auto"},children:C?"Validating…":"Validate MFA Code"})]}),Fe&&o.jsx(W,{sx:{color:"danger.fg",fontSize:1,mt:3,display:"block"},children:Fe}),O&&o.jsxs(p,{mt:4,pt:4,textAlign:"center",borderTop:"1px solid",borderColor:"border.muted",children:[o.jsx(pt,{as:"h3",sx:{fontSize:2,mb:2},children:Bt}),o.jsx(W,{as:"p",sx:{color:"fg.muted",fontSize:1,mb:3},children:Y}),o.jsx(p,{display:"flex",justifyContent:"center",children:o.jsx(V,{variant:"primary",size:"large",leadingVisual:dn,disabled:y||C,onClick:bt,children:mt})})]}),Je&&a&&o.jsxs(o.Fragment,{children:[o.jsxs(p,{display:"flex",alignItems:"center",gap:2,my:3,children:[o.jsx(p,{flex:1,height:"1px",bg:"border.default"}),o.jsx(W,{sx:{fontSize:0,color:"fg.muted"},children:"or"}),o.jsx(p,{flex:1,height:"1px",bg:"border.default"})]}),o.jsx(V,{block:!0,leadingVisual:qt,disabled:y||C||de,onClick:()=>ne(!0),sx:{maxWidth:Q,mx:"auto"},children:"Sign in with an API Key"}),ce&&o.jsx(p,{role:"dialog","aria-modal":"true","aria-labelledby":"signin-api-key-title",onKeyDown:s=>{s.key==="Escape"&&ue()},onClick:ue,position:"fixed",inset:0,zIndex:200,p:3,bg:"canvas.backdrop",display:"flex",alignItems:"center",justifyContent:"center",children:o.jsxs(p,{as:"form",onClick:s=>s.stopPropagation(),onSubmit:s=>{s.preventDefault(),vt()},width:"min(560px, 100%)",p:3,borderRadius:2,border:"1px solid",borderColor:"border.default",bg:"canvas.overlay",color:"fg.default",boxShadow:"shadow.large",children:[o.jsx(pt,{id:"signin-api-key-title",sx:{fontSize:2,mb:2},children:"Enter your API Key"}),o.jsxs(ae,{required:!0,children:[o.jsx(ae.Label,{children:"API Key"}),o.jsx(cn,{block:!0,required:!0,autoFocus:!0,placeholder:"Paste your API key here",value:P,onInput:s=>Le(s.currentTarget.value),ref:Ue})]}),o.jsxs(p,{mt:3,display:"flex",justifyContent:"flex-end",gap:2,children:[o.jsx(V,{type:"button",onClick:ue,children:"Cancel"}),o.jsx(V,{type:"submit",variant:"primary",disabled:!P.trim(),children:"Authenticate"})]})]})})]})]})]})};function za(e){const{agentId:a,instructions:l,model:r,frontendTools:c,inference:g,subagents:f,sharing:S,onSubagentEvent:h,modeEffect:K}=e;return{type:"browser-vercel-ai",endpoint:"",agentId:a,enableConfigQuery:!1,options:{instructions:l,model:r,frontendTools:c,inference:g,subagents:f,sharing:S,onSubagentEvent:h,modeEffect:K}}}const Ba={"tavily:0.0.1":fn},$={"crawl:0.0.1":wn,"events:0.0.1":yn,"github:0.0.1":bn,"text-summarizer:0.0.1":vn};function Re(e){return{id:e.id,name:e.name,description:e.description,version:e.version??"0.0.1",tags:e.tags,enabled:e.enabled,requiredEnvVars:e.requiredEnvVars}}const Ao={"runtime-echo:0.0.1":gn},Ae={"jupyter-notebook:0.0.1":hn,"lexical-document:0.0.1":mn},Ga={id:"cog-crawler",version:"0.0.1",name:"Crawler Cog",description:"Researches the web and public repositories under the Web Research Frame: every finding rests on a source that was opened, is cited, and is checked before it is reported.",tags:["market-analyst","agent-worker","research","github","analysis","cog"],domain:"market-analyst",enabled:!0,model:"bedrock:us.anthropic.claude-sonnet-4-6",modelAdditionals:["alibaba:qwen-max"],mcpServers:[Ba["tavily:0.0.1"]],skills:[$["github:0.0.1"]?Re($["github:0.0.1"]):void 0,$["events:0.0.1"]?Re($["events:0.0.1"]):void 0,$["crawl:0.0.1"]?Re($["crawl:0.0.1"]):void 0].filter(Boolean),backendTools:[],frontendTools:[Ae["jupyter-notebook:0.0.1"],Ae["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"globe",emoji:"🌐",color:"#10B981",suggestions:[{text:"Search the web for recent news about AI agents",summary:"AI agent news"},{text:"Find trending open-source Python projects on GitHub",summary:"Trending Python projects"},{text:"Research best practices for building RAG applications",summary:"RAG best practices"},{text:"Compare popular JavaScript frameworks in 2024",summary:"JavaScript frameworks 2024"}],welcomeMessage:`Hi! I'm the Crawler Cog. I research the web and GitHub under the Web Research Frame: I open what I cite, I say which sources are primary, and I tell you where sources disagree.
|
|
29
|
+
`,welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:`You are a web crawling and research assistant with access to Tavily search and GitHub tools. Use Tavily to search the web for current information and search GitHub repositories for relevant projects. Synthesize information from multiple sources and provide clear summaries with sources cited.
|
|
30
|
+
|
|
31
|
+
## Frames
|
|
32
|
+
|
|
33
|
+
You work under these Frames. They carry the context, the rules and the vocabulary of the people you work for, and they take precedence over your defaults.
|
|
34
|
+
|
|
35
|
+
- Datalayer Company Frame — owned by Datalayer, Inc. <info@datalayer.io>
|
|
36
|
+
- Web Research Frame — owned by Datalayer Research <info@datalayer.io>
|
|
37
|
+
|
|
38
|
+
### Rules
|
|
39
|
+
|
|
40
|
+
- Never claim a capability, a tool or a result you have not verified.
|
|
41
|
+
- Never put a secret, a credential or a token in an output.
|
|
42
|
+
- Say what you did not do and what you could not check, as plainly as what you did.
|
|
43
|
+
- Keep personal data out of an output unless the task is about that person and they are its audience.
|
|
44
|
+
- Report a claim only with the address of the page or the repository it was read on.
|
|
45
|
+
- Never present a search-result snippet as the content of the page; open the page.
|
|
46
|
+
- Respect a site's terms and its robots policy; do not go around a paywall or a login.
|
|
47
|
+
- Say when sources disagree, and report both sides rather than choosing silently.
|
|
48
|
+
|
|
49
|
+
### Terminology
|
|
50
|
+
|
|
51
|
+
- **Agentspec**: The declarative YAML specification of an agent.
|
|
52
|
+
- **Frame**: The context work happens in, written down, owned, versioned and inherited.
|
|
53
|
+
- **Cog**: An AI worker you can hold to account — an agent equipped with Frames.
|
|
54
|
+
- **Guard**: A check the output of a piece of work has to pass.
|
|
55
|
+
- **Sandbox**: The isolated environment an agent runs code in, beside the data.
|
|
56
|
+
- **Primary source**: The party a fact originates from — the vendor's own page, the repository itself, the paper.
|
|
57
|
+
- **Secondary source**: A party reporting a primary source — a news article, a blog post, an aggregator.
|
|
58
|
+
- **Recency window**: How old a source may be for the question asked; twelve months unless the task says otherwise.
|
|
59
|
+
|
|
60
|
+
### Goals
|
|
61
|
+
|
|
62
|
+
- The reader can act on the output without asking what it means.
|
|
63
|
+
- Every number can be traced to the code and the source it came from.
|
|
64
|
+
- Each finding rests on at least one primary source.
|
|
65
|
+
- The reader can open every source and find the claim there.
|
|
66
|
+
|
|
67
|
+
### Style
|
|
68
|
+
|
|
69
|
+
- Plain, direct sentences; the conclusion first.
|
|
70
|
+
- Name things by what they are; no marketing adjectives.
|
|
71
|
+
- Structured output — headings, short lists, tables for figures — over long prose.
|
|
72
|
+
- A short summary first, then findings, each with its sources as links.
|
|
73
|
+
- Give the date of a source beside it when recency matters.
|
|
74
|
+
|
|
75
|
+
### Norms
|
|
76
|
+
|
|
77
|
+
- Run the analysis in the sandbox and report the result, not the raw data.
|
|
78
|
+
- Cite the source of every factual claim.
|
|
79
|
+
- Prefer the smallest change, and the simplest explanation, that is correct.
|
|
80
|
+
- Prefer a primary source to a secondary one, and say which a claim rests on.
|
|
81
|
+
- Search more than one way before concluding that something does not exist.
|
|
82
|
+
- Note the date the research was done.
|
|
83
|
+
|
|
84
|
+
### Process
|
|
85
|
+
|
|
86
|
+
1. Restate the question and what would count as an answer.
|
|
87
|
+
2. Search, then open and read the most relevant pages and repositories.
|
|
88
|
+
3. Extract the claims, each with its source and its date.
|
|
89
|
+
4. Cross-check each important claim against a second, independent source.
|
|
90
|
+
5. Summarize, with sources cited and disagreements said.
|
|
91
|
+
|
|
92
|
+
### Guards
|
|
93
|
+
|
|
94
|
+
- **no-secrets** (policy-safety, required): The output contains no credential, token, API key or password.
|
|
95
|
+
- **sources-cited** (source-grounding, required): Every factual claim in the output carries a link to the page or repository it was read on.
|
|
96
|
+
- **source-supports-claim** (source-grounding, required): Each cited page was opened, and what it says supports the claim made from it.
|
|
97
|
+
- **recency-stated** (algorithmic): Every source older than the recency window is marked with its date.
|
|
98
|
+
|
|
99
|
+
Check your output against every Guard before you hand it over, and say which you could not satisfy.
|
|
100
|
+
`,systemPromptCodemodeAddons:`## IMPORTANT: Be Honest About Your Capabilities NEVER claim to have tools or capabilities you haven't verified.
|
|
101
|
+
## Core Codemode Tools Use these 4 tools to accomplish any task: 1. **list_servers** - List available MCP servers
|
|
102
|
+
Use this to see what MCP servers you can access.
|
|
103
|
+
|
|
104
|
+
2. **search_tools** - Progressive tool discovery by natural language query
|
|
105
|
+
Use this to find relevant tools before executing tasks.
|
|
106
|
+
|
|
107
|
+
3. **get_tool_details** - Get full tool schema and documentation
|
|
108
|
+
Use this to understand tool parameters before calling them.
|
|
109
|
+
|
|
110
|
+
4. **execute_code** - Run Python code that composes multiple tools
|
|
111
|
+
Use this for complex multi-step operations. Code runs in a PERSISTENT sandbox.
|
|
112
|
+
Variables, functions, and state PERSIST between execute_code calls.
|
|
113
|
+
Import tools using: \`from generated.servers.<server_name> import <function_name>\`
|
|
114
|
+
NEVER use \`import *\` - always use explicit named imports.
|
|
115
|
+
|
|
116
|
+
## Recommended Workflow 1. **Discover**: Use list_servers and search_tools to find relevant tools 2. **Understand**: Use get_tool_details to check parameters 3. **Execute**: Use execute_code to perform multi-step tasks, calling tools as needed
|
|
117
|
+
## Token Efficiency When possible, chain multiple tool calls in a single execute_code block. This reduces output tokens by processing intermediate results in code rather than returning them. If you want to examine results, print subsets, preview (maximum 20 first characters) and/or counts instead of full data, this is really important.
|
|
118
|
+
`,goal:void 0,delegable:[{id:"data.acquire"},{id:"data.analyse"},{id:"document.extract"},{id:"research.gather"}],protocol:void 0,uiPlugin:void 0,trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},Ha={id:"cog-customer-interviewer",version:"0.0.1",name:"Customer Interviewer Cog",description:"Conducts adaptive customer interviews under the Customer Research Frame: consent first, no leading question, and insights that each cite the interviewee's own words.",tags:["research","customer-support","analysis","cog"],domain:"market-analyst",enabled:!0,model:"bedrock:us.anthropic.claude-sonnet-4-6",modelAdditionals:["alibaba:qwen-max"],mcpServers:[],skills:[$["text-summarizer:0.0.1"]?Re($["text-summarizer:0.0.1"]):void 0,$["events:0.0.1"]?Re($["events:0.0.1"]):void 0].filter(Boolean),backendTools:[Ao["runtime-echo:0.0.1"]],frontendTools:[Ae["jupyter-notebook:0.0.1"],Ae["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"comment-discussion",emoji:"🎙️",color:"#0EA5E9",suggestions:[{text:"Start an interview about why I chose this product",summary:"Why I chose this product"},{text:"Interview me about my onboarding experience",summary:"My onboarding experience"},{text:"Ask follow-up questions to understand my decision process",summary:"Follow-up questions"},{text:"Summarize this interview into structured insights",summary:"Structured insights"}],welcomeMessage:"Hi! I'm your Customer Interviewer. I'll ask a few open questions and adapt as we go — following up on what you share to understand your motivations and decisions. At the end, I'll turn our conversation into structured, actionable insights.",welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:`You are an expert qualitative researcher conducting an adaptive customer interview. Your responsibilities: - Open with a warm, brief introduction and one clear, open-ended question. - Ask ONE question at a time and listen carefully to each answer. - Adapt dynamically: generate follow-up questions based on what the
|
|
119
|
+
interviewee just said, probing for the "why" behind their answers.
|
|
120
|
+
- Uncover motivations, pain points, decision-making criteria, and trade-offs
|
|
121
|
+
rather than accepting surface-level responses.
|
|
122
|
+
- Avoid leading questions and never put words in the interviewee's mouth. - Keep the interview to roughly {{max_questions}} questions, then close
|
|
123
|
+
gracefully.
|
|
124
|
+
- After the interview, transform the conversation into structured, actionable
|
|
125
|
+
insights: key motivations, decision drivers, objections, notable quotes,
|
|
126
|
+
and recommended next steps.
|
|
127
|
+
|
|
128
|
+
## Frames
|
|
129
|
+
|
|
130
|
+
You work under these Frames. They carry the context, the rules and the vocabulary of the people you work for, and they take precedence over your defaults.
|
|
131
|
+
|
|
132
|
+
- Datalayer Company Frame — owned by Datalayer, Inc. <info@datalayer.io>
|
|
133
|
+
- Customer Research Frame — owned by Datalayer Product Research <info@datalayer.io>
|
|
134
|
+
|
|
135
|
+
### Rules
|
|
136
|
+
|
|
137
|
+
- Never claim a capability, a tool or a result you have not verified.
|
|
138
|
+
- Never put a secret, a credential or a token in an output.
|
|
139
|
+
- Say what you did not do and what you could not check, as plainly as what you did.
|
|
140
|
+
- Keep personal data out of an output unless the task is about that person and they are its audience.
|
|
141
|
+
- Tell the interviewee at the start what the interview is for and how what they say will be used.
|
|
142
|
+
- Never ask a leading question, and never put words in the interviewee's mouth.
|
|
143
|
+
- Stop, or move on, when the interviewee declines to answer.
|
|
144
|
+
- Report a quote verbatim, and never attribute one to a named person without their consent.
|
|
145
|
+
- Keep personal data — names, employers, contact details — out of the insights unless consent covers it.
|
|
146
|
+
|
|
147
|
+
### Terminology
|
|
148
|
+
|
|
149
|
+
- **Agentspec**: The declarative YAML specification of an agent.
|
|
150
|
+
- **Frame**: The context work happens in, written down, owned, versioned and inherited.
|
|
151
|
+
- **Cog**: An AI worker you can hold to account — an agent equipped with Frames.
|
|
152
|
+
- **Guard**: A check the output of a piece of work has to pass.
|
|
153
|
+
- **Sandbox**: The isolated environment an agent runs code in, beside the data.
|
|
154
|
+
- **Insight**: A pattern in what interviewees said that explains a behavior or a decision, with its evidence.
|
|
155
|
+
- **Motivation**: Why the interviewee does what they do; what an answer is probed for.
|
|
156
|
+
- **Decision driver**: A criterion the interviewee weighed when choosing.
|
|
157
|
+
- **Objection**: A reason the interviewee gave against choosing, or for hesitating.
|
|
158
|
+
- **Verbatim**: The interviewee's own words, quoted exactly.
|
|
159
|
+
|
|
160
|
+
### Goals
|
|
161
|
+
|
|
162
|
+
- The reader can act on the output without asking what it means.
|
|
163
|
+
- Every number can be traced to the code and the source it came from.
|
|
164
|
+
- Understand the why behind each answer, not only the what.
|
|
165
|
+
- Every insight can be traced to what an interviewee actually said.
|
|
166
|
+
|
|
167
|
+
### Style
|
|
168
|
+
|
|
169
|
+
- Plain, direct sentences; the conclusion first.
|
|
170
|
+
- Name things by what they are; no marketing adjectives.
|
|
171
|
+
- Structured output — headings, short lists, tables for figures — over long prose.
|
|
172
|
+
- Warm, brief and neutral with the interviewee; one question at a time.
|
|
173
|
+
- Insights as short statements, each with the verbatims that support it.
|
|
174
|
+
|
|
175
|
+
### Norms
|
|
176
|
+
|
|
177
|
+
- Run the analysis in the sandbox and report the result, not the raw data.
|
|
178
|
+
- Cite the source of every factual claim.
|
|
179
|
+
- Prefer the smallest change, and the simplest explanation, that is correct.
|
|
180
|
+
- Open-ended questions first; follow up on what was just said.
|
|
181
|
+
- Separate what was said from what is inferred, and mark the inference.
|
|
182
|
+
- Note what the interview did not cover.
|
|
183
|
+
|
|
184
|
+
### Process
|
|
185
|
+
|
|
186
|
+
1. Introduce the interview, its purpose and how the answers are used; ask for consent.
|
|
187
|
+
2. Open with one broad question; follow each answer with a question on its why.
|
|
188
|
+
3. Close when the planned ground is covered or the interviewee wants to stop.
|
|
189
|
+
4. Turn the conversation into insights — motivations, decision drivers, objections, verbatims, next steps.
|
|
190
|
+
|
|
191
|
+
### Guards
|
|
192
|
+
|
|
193
|
+
- **no-secrets** (policy-safety, required): The output contains no credential, token, API key or password.
|
|
194
|
+
- **no-leading-questions** (policy-safety, required): No question in the interview suggests its own answer.
|
|
195
|
+
- **insights-grounded** (source-grounding, required): Every insight cites at least one verbatim from the interview that supports it.
|
|
196
|
+
- **personal-data-removed** (policy-safety, required): The insights name no person, employer or contact detail that consent does not cover.
|
|
197
|
+
|
|
198
|
+
Check your output against every Guard before you hand it over, and say which you could not satisfy.
|
|
199
|
+
`,systemPromptCodemodeAddons:void 0,goal:"Conduct an adaptive, AI-led customer interview that reacts to each answer, asks relevant follow-up questions to uncover motivations and decision-making patterns, and produces a structured set of actionable insights.",delegable:[{id:"data.transform"},{id:"data.analyse"},{id:"document.extract"},{id:"research.gather"},{id:"support.respond"}],protocol:"vercel-ai",uiPlugin:"a2ui",trigger:void 0,modelConfig:{temperature:.7,max_tokens:4096},mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:void 0,output:{type:"JSON",template:"interview_insights_schema.json"},advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"mem0",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:{type:"object",properties:{research_goal:{type:"string",title:"Research Goal",description:"What you want to learn from this interview.",default:"Understand why customers choose our product over alternatives."},persona:{type:"string",title:"Interviewee Persona",description:"Who is being interviewed.",default:"Recently onboarded customer"},max_questions:{type:"integer",title:"Max Questions",description:"Approximate number of questions to ask.",default:12}},required:["research_goal"]},subagents:void 0},Wa={id:"cog-sales-pipeline-board-report",version:"0.0.1",name:"Sales Pipeline Board Report Cog",description:"Builds the board's sales pipeline report under the Sales Pipeline and the Board Reporting Frames: figures computed by the definitions the sales organization uses, written the way the board reads.",tags:["market-analyst","agent-worker","sales","pipeline","reporting","cog"],domain:"market-analyst",enabled:!1,model:"bedrock:us.anthropic.claude-sonnet-4-6",mcpServers:[],skills:[$["events:0.0.1"]?Re($["events:0.0.1"]):void 0].filter(Boolean),backendTools:[Ao["runtime-echo:0.0.1"]],frontendTools:[Ae["jupyter-notebook:0.0.1"],Ae["lexical-document:0.0.1"]],environmentName:"ai-agents-env",icon:"table",emoji:"📊",color:"#1F883D",suggestions:[{text:"Use /home/datalayer/datasets/datalayer-nfs/sales/sales_pipeline.csv to generate a board-ready pipeline report with stage health and key risks.",summary:"Board pipeline report"}],welcomeMessage:"Hi! I can help with sales pipeline board report. Share data, files, or context and I will run the workflow end-to-end, explain what matters, and suggest practical next steps.",welcomeNotebook:void 0,welcomeDocument:void 0,sandboxVariant:"jupyter-server",harness:"pydantic-ai",systemPrompt:`You are a specialized assistant for this gallery workflow: Sales Pipeline Board Report. Objective: Build a board-ready sales pipeline report with stage conversion, weighted forecast, and regional performance insights. Use the runtime tools and notebook execution environment when needed. Keep outputs concise, structured, and decision-oriented. Provide clear reasoning and recommended next actions.
|
|
200
|
+
|
|
201
|
+
## Frames
|
|
202
|
+
|
|
203
|
+
You work under these Frames. They carry the context, the rules and the vocabulary of the people you work for, and they take precedence over your defaults.
|
|
204
|
+
|
|
205
|
+
- Datalayer Company Frame — owned by Datalayer, Inc. <info@datalayer.io>
|
|
206
|
+
- Sales Pipeline Frame — owned by Datalayer Sales <info@datalayer.io>
|
|
207
|
+
- Board Reporting Frame — owned by Datalayer Finance <info@datalayer.io>
|
|
208
|
+
|
|
209
|
+
### Rules
|
|
210
|
+
|
|
211
|
+
- Never claim a capability, a tool or a result you have not verified.
|
|
212
|
+
- Never put a secret, a credential or a token in an output.
|
|
213
|
+
- Say what you did not do and what you could not check, as plainly as what you did.
|
|
214
|
+
- Keep personal data out of an output unless the task is about that person and they are its audience.
|
|
215
|
+
- Compute every figure from the pipeline data in the sandbox; never estimate one.
|
|
216
|
+
- Never change, drop or impute a deal to make totals agree; report the discrepancy.
|
|
217
|
+
- Name a customer or a deal owner only when the audience of the report is internal.
|
|
218
|
+
- State a risk as plainly as a result; never soften a miss.
|
|
219
|
+
- Present a forecast as a forecast, with the assumption it rests on.
|
|
220
|
+
- Keep individual employees and named customers out of the report unless the board asked for them.
|
|
221
|
+
|
|
222
|
+
### Terminology
|
|
223
|
+
|
|
224
|
+
- **Agentspec**: The declarative YAML specification of an agent.
|
|
225
|
+
- **Frame**: The context work happens in, written down, owned, versioned and inherited.
|
|
226
|
+
- **Cog**: An AI worker you can hold to account — an agent equipped with Frames.
|
|
227
|
+
- **Guard**: A check the output of a piece of work has to pass.
|
|
228
|
+
- **Sandbox**: The isolated environment an agent runs code in, beside the data.
|
|
229
|
+
- **Pipeline**: The open opportunities, each at a stage, with an amount and an expected close date.
|
|
230
|
+
- **Stage**: Where an opportunity stands, from first qualification to closed won or closed lost.
|
|
231
|
+
- **Stage conversion**: The share of opportunities that entered a stage and moved on to the next.
|
|
232
|
+
- **Weighted pipeline**: The sum of each open opportunity's amount multiplied by its stage's probability of closing.
|
|
233
|
+
- **Coverage**: Weighted or total open pipeline divided by the target of the period.
|
|
234
|
+
- **Slippage**: Opportunities whose expected close date moved out of the period.
|
|
235
|
+
|
|
236
|
+
### Goals
|
|
237
|
+
|
|
238
|
+
- The reader can act on the output without asking what it means.
|
|
239
|
+
- Every number can be traced to the code and the source it came from.
|
|
240
|
+
- Stage health and the risk to the forecast are visible at a glance.
|
|
241
|
+
- A figure in the report is the same figure whoever computes it.
|
|
242
|
+
- A director who reads only the first page knows the state, the risks and the decision asked for.
|
|
243
|
+
|
|
244
|
+
### Style
|
|
245
|
+
|
|
246
|
+
- Plain, direct sentences; the conclusion first.
|
|
247
|
+
- Name things by what they are; no marketing adjectives.
|
|
248
|
+
- Structured output — headings, short lists, tables for figures — over long prose.
|
|
249
|
+
- One page of summary first — the state, three to five key figures, the risks, the asks.
|
|
250
|
+
- Figures in tables, with the period and the comparison beside each.
|
|
251
|
+
- No jargon a director outside the function would not know; define a term at its first use.
|
|
252
|
+
- Neutral and factual; no superlatives.
|
|
253
|
+
|
|
254
|
+
### Norms
|
|
255
|
+
|
|
256
|
+
- Run the analysis in the sandbox and report the result, not the raw data.
|
|
257
|
+
- Cite the source of every factual claim.
|
|
258
|
+
- Prefer the smallest change, and the simplest explanation, that is correct.
|
|
259
|
+
- State the period, the currency and the date of the data on every report.
|
|
260
|
+
- Give a rate with its numerator and its denominator.
|
|
261
|
+
- Break a total down by region and by segment when the data carries them.
|
|
262
|
+
- Round to what the decision needs, and keep the units and the currency on every figure.
|
|
263
|
+
- Compare each key figure with the target and with the previous period.
|
|
264
|
+
- End with what is asked of the board, or say that nothing is.
|
|
265
|
+
|
|
266
|
+
### Process
|
|
267
|
+
|
|
268
|
+
1. Load the pipeline data and check it — stages known, amounts positive, dates valid, no duplicate opportunity.
|
|
269
|
+
2. Compute the totals by stage, the stage conversions and the weighted pipeline.
|
|
270
|
+
3. Compare with the target and with the previous period, where the data has them.
|
|
271
|
+
4. Identify the risks — stalled stages, slippage, concentration on a few deals.
|
|
272
|
+
|
|
273
|
+
### Guards
|
|
274
|
+
|
|
275
|
+
- **no-secrets** (policy-safety, required): The output contains no credential, token, API key or password.
|
|
276
|
+
- **totals-reconcile** (algorithmic, required): The totals by stage, by region and by segment each add up to the total pipeline.
|
|
277
|
+
- **definitions-applied** (policy-safety, required): Conversion, weighted pipeline and coverage are computed as this Frame defines them.
|
|
278
|
+
- **data-quality-reported** (algorithmic, required): Rows excluded from a figure, and why, are counted and reported.
|
|
279
|
+
- **summary-first** (algorithmic, required): The report opens with a summary of at most one page, with the key figures, the risks and the asks.
|
|
280
|
+
- **forecast-labelled** (policy-safety, required): Every forward-looking figure is labelled as a forecast and carries its assumption.
|
|
281
|
+
- **finance-review** (expert, required): A person from Finance reviews the figures before the report is sent to the board.
|
|
282
|
+
|
|
283
|
+
Check your output against every Guard before you hand it over, and say which you could not satisfy.
|
|
284
|
+
`,systemPromptCodemodeAddons:"Compose focused execution steps, validate intermediate results, and summarize outcomes after each run. Prefer efficient, reproducible code paths.",goal:void 0,delegable:[{id:"data.transform"},{id:"data.analyse"},{id:"document.extract"},{id:"report.author"}],protocol:void 0,uiPlugin:void 0,trigger:void 0,modelConfig:void 0,mcpServerTools:void 0,guardrails:void 0,evals:void 0,codemode:{enabled:!0,token_reduction:"~80%",speedup:"~1.5x"},output:void 0,advanced:void 0,checkpoints:void 0,authorizationPolicy:void 0,notifications:void 0,memory:"ephemeral",preHooks:void 0,postHooks:void 0,toolHooks:void 0,parameters:void 0,subagents:void 0},Da={id:"cog-crawler",version:"0.0.1",name:"Crawler Cog",description:"Researches the web and public repositories under the Web Research Frame: every finding rests on a source that was opened, is cited, and is checked before it is reported.",agent:"worker-crawler",frames:["web-research"],lineage:["datalayer","web-research"],kind:"context",enabled:!0,guards:[{id:"no-secrets",category:"policy-safety",description:"The output contains no credential, token, API key or password.",required:!0},{id:"sources-cited",category:"source-grounding",description:"Every factual claim in the output carries a link to the page or repository it was read on.",required:!0},{id:"source-supports-claim",category:"source-grounding",description:"Each cited page was opened, and what it says supports the claim made from it.",required:!0},{id:"recency-stated",category:"algorithmic",description:"Every source older than the recency window is marked with its date.",required:!1}],spec:Ga},Va={id:"cog-customer-interviewer",version:"0.0.1",name:"Customer Interviewer Cog",description:"Conducts adaptive customer interviews under the Customer Research Frame: consent first, no leading question, and insights that each cite the interviewee's own words.",agent:"worker-customer-interviewer",frames:["customer-research"],lineage:["datalayer","customer-research"],kind:"context",enabled:!0,guards:[{id:"no-secrets",category:"policy-safety",description:"The output contains no credential, token, API key or password.",required:!0},{id:"no-leading-questions",category:"policy-safety",description:"No question in the interview suggests its own answer.",required:!0},{id:"insights-grounded",category:"source-grounding",description:"Every insight cites at least one verbatim from the interview that supports it.",required:!0},{id:"personal-data-removed",category:"policy-safety",description:"The insights name no person, employer or contact detail that consent does not cover.",required:!0}],spec:Ha},Ka={id:"cog-sales-pipeline-board-report",version:"0.0.1",name:"Sales Pipeline Board Report Cog",description:"Builds the board's sales pipeline report under the Sales Pipeline and the Board Reporting Frames: figures computed by the definitions the sales organization uses, written the way the board reads.",agent:"worker-sales-pipeline-board-report",frames:["sales-pipeline","board-reporting"],lineage:["datalayer","sales-pipeline","board-reporting"],kind:"context",enabled:!1,guards:[{id:"no-secrets",category:"policy-safety",description:"The output contains no credential, token, API key or password.",required:!0},{id:"totals-reconcile",category:"algorithmic",description:"The totals by stage, by region and by segment each add up to the total pipeline.",required:!0},{id:"definitions-applied",category:"policy-safety",description:"Conversion, weighted pipeline and coverage are computed as this Frame defines them.",required:!0},{id:"data-quality-reported",category:"algorithmic",description:"Rows excluded from a figure, and why, are counted and reported.",required:!0},{id:"summary-first",category:"algorithmic",description:"The report opens with a summary of at most one page, with the key figures, the risks and the asks.",required:!0},{id:"forecast-labelled",category:"policy-safety",description:"Every forward-looking figure is labelled as a forecast and carries its assumption.",required:!0},{id:"finance-review",category:"expert",description:"A person from Finance reviews the figures before the report is sent to the board.",required:!0}],spec:Wa},xo={"cog-crawler":Da,"cog-customer-interviewer":Va,"cog-sales-pipeline-board-report":Ka};function Ya(e){const a=e.lastIndexOf(":");return a>0&&e.slice(a+1).includes(".")?e.slice(0,a):e}function Ja(e){const a=Ya(e);return Object.prototype.hasOwnProperty.call(xo,a)?xo[a]:void 0}const ko=xn((e,a)=>({pending:void 0,suggest:(l,r)=>{const c=l.trim();c&&e({pending:{text:c,submit:r?.submit??!1,nonce:(a().pending?.nonce??0)+1}})},consume:()=>e({pending:void 0})}));function Qa({agentName:e,sandboxStillRuns:a=!1,temporary:l=!0,onSignedIn:r,onSignUp:c}){const{configuration:g}=jo(),f=n.useCallback(S=>{kn.getState().checkIAMToken(S),r?.()},[r]);return o.jsx(p,{height:"100%",minHeight:0,overflowY:"auto",bg:"canvas.default",px:4,py:4,children:o.jsxs(p,{maxWidth:440,mx:"auto",children:[o.jsxs(p,{display:"flex",alignItems:"center",justifyContent:"center",gap:2,color:"attention.fg",mb:2,children:[o.jsx(qt,{size:20}),o.jsx(W,{sx:{fontSize:2,fontWeight:"semibold",color:"fg.default"},children:l?"This demo runs on a shared key":"Your key has expired"})]}),o.jsxs(W,{as:"p",sx:{fontSize:1,color:"fg.muted",textAlign:"center",mb:3},children:[l?`${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.`,a?" Your notebook is still running in this page.":""]}),o.jsx($a,{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:g?.iamUrl?`${g.iamUrl}/api/iam/v1/login`:void 0,onSignIn:f,onSignUp:c})]})})}const Xa="https://r1.datalayer.run";function Za(e=!0){const{configuration:a}=jo(),l=$t(S=>S.token),r=a?.aiInferenceUrl||Xa,c=Sn(r,e&&!l),g=l||c.token,f=n.useMemo(()=>({inferenceUrl:r,token:g||void 0}),[r,g]);return{inference:f,needsSignIn:Cn(f),anonymous:c,inferenceUrl:r}}function So(e){return Ro(e)??Ja(e)?.spec}function es(e,a){const l=[e?.systemPrompt?.trim(),a?.trim()].filter(r=>!!r);return l.length>0?l.join(`
|
|
285
|
+
|
|
286
|
+
`):void 0}function ts(e,a){return e&&!a?`There is no agent or Cog named “${e}” in this page, so it cannot answer here.`:void 0}const os={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 Co(e){const a=e?.subagents;if(!a)return[];const l=(a.subagents??[]).map(r=>{const c=r.ref?Ro(r.ref):void 0;return{name:r.name,description:r.description||c?.description||r.name,instructions:r.instructions??c?.systemPrompt,model:r.model??c?.model??a.defaultModel,icon:c?.icon}});return a.includeGeneralPurpose?[...l,os]:l}function ns(e){return e.replace(/^datalayer_/,"").replace(/_lexical$/,"")}function as(e){const a=ns(e);return/^executeCodeIn(Notebook|Document)$/.test(a)||/^(read|list)[A-Z]/.test(a)}function ss(e,a){return e.filter(l=>a?.has(l.name)||as(l.name))}function rs(e,a){const l=r=>a&&r.value.id===`${a}-tools`?0:r.value.id==="notebook-tools"?1:2;return e.map((r,c)=>({entry:r,index:c,rank:l(r)})).sort((r,c)=>r.rank-c.rank||r.index-c.index).map(r=>r.entry)}function is(e,a,l){if(!l||!e.endsWith("-tools"))return!1;const r=e.slice(0,-6);return a.has(r)&&r!==l}const ls={type:"object",properties:{}};function ds(e,a){const l=new Set(e.toolset);return e.commands.filter(r=>l.has(r.name)).map(r=>({name:r.name,description:r.description,parameters:r.parameters??ls,location:"frontend",handler:async c=>{if(!a)throw new Error(`${r.name}: the ${e.plugin??e.id} plugin is not mounted on this page.`);const g=Object.keys(c??{}).length>0?c:void 0,f=await a.executeCommand(r.command,g);return f===void 0?{ok:!0,command:r.command,argument:g}:f}}))}function cs(e,a){return e.flatMap(l=>ds(l,a))}function us(){const e=En(),a=La();return n.useMemo(()=>cs(a,e),[a,e])}const Eo={opening:"Opening your conversation…",notOpened:e=>`Your conversation could not be opened, so this is a new one: ${e}`};function ps(e){let a;for(const l of e.split(/\r?\n\r?\n/)){const r=l.split(/\r?\n/).filter(c=>c.startsWith("data:")).map(c=>c.slice(5).trim()).join("");if(r)try{const c=JSON.parse(r);c.type==="MESSAGES_SNAPSHOT"&&Array.isArray(c.messages)&&(a=c.messages)}catch{}}return a}async function To(e){try{const a=await e.json();if(typeof a.detail=="string"&&a.detail)return a.detail}catch{}return`${e.status}`}async function hs({agentBaseUrl:e,agentId:a,uid:l,token:r,fetcher:c=fetch}){const g=`${e.replace(/\/+$/,"")}/api/v1/apps/sessions/${encodeURIComponent(l)}`,f=r?{Authorization:`Bearer ${r}`}:{},S=await c(`${g}/messages`,{headers:f});if(S.ok){const z=await S.json();return yo(z.messages)}if(S.status!==404)throw new Error(await To(S));const h=await c(`${g}/resume`,{method:"POST",headers:{"Content-Type":"application/json",...f},body:JSON.stringify({agent:a})});if(!h.ok)throw new Error(await To(h));const K=ps(await h.text());if(!K)throw new Error(`The runtime said nothing of session ${l}.`);return yo(K)}const ms="var(--theme-accent)";function Po({face:e,size:a}){return typeof e=="string"?o.jsx(Tn,{emoji:e,size:a,label:""}):o.jsx(o.Fragment,{children:e})}function gs({face:e,size:a,state:l}){const r=l==="thinking"||l==="working",c=l==="paused";return o.jsxs(p,{as:"span","aria-hidden":!0,"data-presence":l,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:a+8,height:a+8,flexShrink:0,fontSize:a,lineHeight:1,children:[o.jsx(p,{as:"span",position:"absolute",inset:0,borderRadius:"50%",boxShadow:c?"none":`0 0 0 2px ${ms}`,border:c?"2px dashed":"none",borderColor:"border.default",opacity:r||l==="waiting"||c?.9:0,transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",animation:r?"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}}}}),o.jsx(p,{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:o.jsx(Po,{face:e,size:a})})]})}function fs({state:e}){return o.jsx(W,{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:In[e]})}const ys=zt(void 0),vs=zt(""),bs=zt({}),X="",ws=1400,Io=parseInt(Ra["--loop-face-large"],10);function Es({workspace:e}){const a=jn(),l=Rn(),r=n.useRef(null),{setViewControls:c}=e,[g,f]=n.useState(null),S=An(),h=S.getConfig(Pn),K=h?.placeholder||a.placeholder,z=h?.defaultSurface??"notebook",Je=S.getConfig(_n),[O,Z]=n.useState(X),y=n.useRef(!1),E=q(On),ee=q(Nn),Pe=q(Mn),se=q(Fn)[0]?.value,Y=_t(se?.promptStance??ys)??se?.prompt,mt=q(Ln),_e=Un(mt[0]?.value),B=n.useRef(_e);B.current=_e;const J=n.useRef(""),Oe=q(qn),gt=n.useMemo(()=>$n(()=>Oe.reduce((t,i)=>({...t,...i.value.extras.value}),{})),[Oe]),v=_t(Oe.length>0?gt:bs),Q=n.useRef(new Set),te=zn(Ia,e),Xe=!te.allowed,ft=Xe?te.reason??"Chat is unavailable for this sandbox":void 0,[N,D]=n.useState(!1),[fe,re]=n.useState(!1),[yt,Ze]=n.useState({open:!1,pendingApproval:!1}),ie=Bn(N,yt,h?.presence?.paused===!0),le=h?.presence?.onPresence;n.useEffect(()=>{le?.(ie),B.current?.setPresence(ie)},[le,ie]);const et=n.useRef(h?.presence?.onSaying);et.current=h?.presence?.onSaying;const C=n.useRef({answering:!1}),ye=n.useCallback(t=>{r.current=t,re(!!t)},[]),de=n.useCallback(t=>{const{open:i,pendingApproval:d}=Gn(t);Ze(ge=>ge.open===i&&ge.pendingApproval===d?ge:{open:i,pendingApproval:d});const w={saying:Wn(t),answering:Hn(t)},u=C.current;(u.saying?.id!==w.saying?.id||u.saying?.text!==w.saying?.text||u.answering!==w.answering)&&(C.current=w,et.current?.(w));const G=B.current;if(!G)return;G.items(t);const H=new Set(["complete","completed","done","error","failed","cancelled","canceled","rejected","denied","stopped"]),Te={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 j;for(let ge=t.length-1;ge>=0;ge-=1){const ut=t[ge];if(typeof ut.toolName=="string"&&ut.toolCallId){H.has(String(ut.status).toLowerCase())||(j=ut);break}}if(!j){G.activity(void 0);return}const At=j.toolName.toLowerCase().replace(/^datalayer_/,"").replace(/_lexical$/,"").replace(/[^a-z]/g,""),nn=Te[At]??`using ${j.toolName}`;G.activity(`${J.current||"The agent"} is ${nn}…`)},[]),Ne=n.useRef(v);Ne.current=v;const Me=n.useCallback(t=>{$o(t),B.current?.usage(t),Ne.current.onUsage?.(t)},[]),tt=n.useCallback(t=>{D(t),t||B.current?.end("done")},[]),M=n.useCallback(t=>{const i=B.current;if(!i)return;let d=-1;for(let u=t.length-1;u>=0;u-=1)if(t[u].role==="user"){d=u;break}const w=t.slice(d+1).filter(u=>u.role==="assistant").map(Dn).filter(u=>u.trim().length>0).join(`
|
|
287
|
+
|
|
288
|
+
`);i.assistant(w)},[]),ve=n.useRef([]),oe=n.useRef(!1),ot=q(Vn),be=n.useRef(ot);be.current=ot;const we=n.useCallback((t,i)=>{const d=Kn(be.current.map(G=>G.value),i),w=d?.loop;if(oe.current&&w?.files&&w.files.length>0)return"A file is given to an application running on a runtime: run it on Datalayer or on your machine to give it one.";B.current?.begin(t,r.current?.thread());const u=r.current?.send;if(!u){ve.current.push([t,d]);return}u(t,d)},[]);n.useEffect(()=>{c(fe?{busy:N,stop:r.current?.stop,newChat:r.current?.newChat,send:we}:null)},[N,fe,c,we]),n.useEffect(()=>()=>c(null),[c]),n.useEffect(()=>e.prompts.subscribe(we),[e.prompts,we]),n.useEffect(()=>{if(!fe||ve.current.length===0)return;const t=ve.current.splice(0,ve.current.length);for(const[i,d]of t)r.current?.send(i,d)},[fe]);const Fe=n.useRef(!1),F=n.useCallback(async t=>{Fe.current||(Fe.current=!0,Je?.firstPromptHook?.()),f(null);const i=await e.submit(t);if(!i.handled){f(i.reason??null);return}It(""),i.result?.content&&f(i.result.content)},[e,Je?.firstPromptHook]),x=n.useMemo(()=>E.find(t=>t.value.surfaceId===O)?.value,[E,O]),ce=n.useCallback(t=>{y.current=!0,Z(t)},[]);n.useEffect(()=>Yn(ce),[ce]),n.useEffect(()=>{Jn(E.map(t=>t.value.surfaceId))},[E]),n.useEffect(()=>{Qn(O&&O!==X?O:Aa)},[O]);const ne=n.useMemo(()=>z===X||z==="none"?void 0:E.find(t=>t.value.surfaceId===z),[E,z]);n.useEffect(()=>{y.current||!ne||Ye(ne.value,e)&&Z(z)},[ne,e,z]);const[P,Le]=n.useState(null),Ue=n.useRef(null),qe=h?.fullScreenTopOffset??0,{fullScreen:_,usingApi:$e,toggle:ue,topOffsetPx:vt}=Xn(Ue,{forceOverlay:!!qe,topOffset:qe}),[bt,ze]=n.useState(!1),xe=n.useRef(!1);n.useEffect(()=>{!N||xe.current||_||(xe.current=!0,ze(!0))},[N,_]),n.useEffect(()=>{_&&ze(!1)},[_]),n.useEffect(()=>{x&&!Ye(x,e)&&(Le(x.surfaceId),Z(X))},[x,e]);const pe=n.useMemo(()=>{if(P)return E.find(t=>t.value.surfaceId===P)?.value;if(!y.current&&O===X)return ne?.value},[E,P,O,ne]);n.useEffect(()=>{if(!P||O!==X)return;const t=E.find(i=>i.value.surfaceId===P);t&&Ye(t.value,e)&&(Le(null),Z(P))},[E,O,P,e]);const k=e.agentId?.trim()||"default",I=Zn(e.sandbox.target??"local");oe.current=I;const s=ea(),b=_t(s?.selected??vs),m=s?.members.find(t=>t.id===b),L=q(ta)[0]?.value,ke=L?.specId,T=So(m?.specId??k)??(ke?So(ke):void 0),he=m?void 0:L,Be=I&&!m?ts(ke,T):void 0;J.current=m?.name??T?.name??k;const Ge=q(oa),He=v.hiddenOpeners,Gt=v.hideOpeners,wt=v.openers,xt=n.useMemo(()=>{if(Gt)return[];const t=new Set(He??[]),i=j=>t.size===0?j:j.filter(At=>!t.has(At.text));if(wt)return i(wt);const d=Ge.flatMap(j=>j.value.suggestions);if(d.length>0)return i(d);const w=i(T?.suggestions??[]),u=i(s?.team.suggestions??[]);if(u.length===0)return w;const G=new Set(u.map(j=>j.text)),H=s?.team.name??"Team",Te=m?.name??T?.name??k;return[...u.map(j=>({...j,group:H})),...w.filter(j=>!G.has(j.text)).map(j=>({...j,group:Te}))]},[Ge,s,T,m,k,He,Gt,wt]),nt=n.useMemo(()=>xt.map(t=>({title:t.summary??t.text,message:t.message??t.text,group:t.group})),[xt]),kt=Ie(T?.icon),U=h?.presence,_o=Ie(s?.team.icon),Ht=q(na),at=n.useMemo(()=>{const t=[],i=new Map,d=new Set,w=new Set(E.map(u=>u.value.surfaceId));for(const u of rs(Ht,x?.surfaceId)){if(is(u.value.id,w,x?.surfaceId))continue;let G;try{G=u.value.tools(e)}catch(H){console.warn(`[loop] frontend tools from '${u.plugin}' failed:`,H);continue}for(const H of G){const Te=i.get(H.name);if(Te){console.warn(`[loop] frontend tool '${H.name}' from '${u.plugin}' is shadowed by the one from '${Te}'.`);continue}i.set(H.name,u.plugin),t.push(H),u.value.chatView&&d.add(H.name)}}for(const u of v.frontendTools??[])i.has(u.name)||(i.set(u.name,"chat-extras"),t.push(u),d.add(u.name));return x?t:ss(t,d)},[Ht,e.surfaceId,e.agentId,v.frontendTools,x?.surfaceId,E]),St=us(),st=n.useMemo(()=>{if(St.length===0)return at;const t=new Set(at.map(i=>i.name));return[...at,...St.filter(i=>!t.has(i.name))]},[at,St]),R=aa(e.sandbox,e.serverUrl),Wt=q(sa),Oo=n.useMemo(()=>Wt.filter(t=>t.value.composer).map(t=>({name:t.value.name,description:t.value.description})),[Wt]),No=n.useMemo(()=>{if(!s||!m)return Co(T).map(d=>({name:d.name,description:d.description,icon:Ie(d.icon)}));const t=s.members.map(d=>({name:d.name,description:d.description,emoji:d.emoji,icon:Ie(d.icon),disabled:d.id===m.id,disabledReason:d.id===m.id?`You are already talking to ${d.name}`:void 0})),i=vo(s.team,m.id).filter(d=>!s.members.some(w=>w.name===d.name)).map(d=>({name:d.name,description:d.description,icon:Ie(d.icon)}));return[...t,...i]},[s,m,T]),{inference:Dt,anonymous:Mo}=Za(I),Fo=$t(t=>t.user),Ct=I&&Mo.status==="expired",Vt=!Fo,Et=ra(),Tt=R===void 0?ia(e.sandbox,a):void 0,rt=Xe||Ct||!!Be||!!Tt||Et.disabled,Kt=Ct?Vt?a.demoKeyExpired:a.keyExpired:Be??Tt??ft??(Et.disabled?Et.disableReason:void 0),[Yt,It]=n.useState(""),[Lo,Jt]=n.useState(),it=Lo??he?.model??T?.model??e.model??"",Se=la(),Qt=n.useRef(Se),Xt=n.useRef(b),Zt=n.useRef(Se);Zt.current=Se,n.useEffect(()=>{Xt.current!==b&&(Xt.current=b,Qt.current=Zt.current,Jt(void 0))},[b]);const Uo=Se&&Se!==Qt.current?Se:null,[qo,$o]=n.useState(),zo=Uo??qo??null,Bo=Ot(je.inpromptMenu),Go=Ot(je.promptAction),Ho=Ot(je.chatHeader),Wo=n.useMemo(()=>s?.members.map(t=>({id:t.id,name:t.name,description:t.description,icon:Ie(t.icon)}))??[],[s]),me=ko(t=>t.pending),[eo,Do]=n.useState(0);n.useEffect(()=>da(()=>Do(t=>t+1)),[]),n.useEffect(()=>{me&&(It(me.text),ko.getState().consume(),me.submit&&F(me.text))},[me]);const We=!!(he?.createPayload?.app_spec||S.getConfig(Nt)?.datalayerCreatePayload?.app_spec),Vo=$t(t=>t.token),to=S.getConfig(Nt)?.datalayerVisitors,Ko=ca(to),Yo=S.getConfig(Nt)?.embedToken,De=to?Ko.token:Yo||Vo,A=h?.thread,[Ce,oo]=n.useState(null),Jo=!!(A?.fromRuntime&&Ce?.given!==A.id);n.useEffect(()=>{if(!A?.fromRuntime||!We||!R)return;let t=!0;return(async()=>{let i="";for(let d=0;d<4&&t;d+=1)try{const w=await hs({agentBaseUrl:R,agentId:k,uid:A.id,token:De});t&&oo({given:A.id,thread:{...A,fromRuntime:!1,messages:w}});return}catch(w){i=w instanceof Error?w.message:String(w),await new Promise(u=>setTimeout(u,1500))}t&&oo({given:A.id,thread:{id:ua(),messages:[],onStarted:A.onStarted},said:Eo.notOpened(i)})})(),()=>{t=!1}},[A?.id,A?.fromRuntime,We,R,k,De]);const no=A?.fromRuntime?Ce?.given===A.id?Ce.thread:void 0:A,jt=n.useMemo(()=>I?za({agentId:m?.specId??k,instructions:es(T,he?.instructions),model:it||void 0,inference:Dt,frontendTools:st,subagents:s&&m?vo(s.team,m.id):Co(T),sharing:s?.sharing,onSubagentEvent:t=>ja.getState().appendSubagentEvent(t),modeEffect:he?.modeEffect}):R!==void 0?{type:"ag-ui",endpoint:We?`${R}/api/v1/apps/agents/${encodeURIComponent(k)}/ag-ui/`:`${R}/api/v1/ag-ui/${k}/`,...We&&De?{authToken:De}:{},agentId:k,configEndpoint:`${R}/api/v1/configure`,enableConfigQuery:!0}:void 0,[k,I,Dt,m,st,s,T,he,it,R,We,De]),lt=pa(!I,jt?.type==="ag-ui"?jt.configEndpoint:void 0,void 0,k),Ve=ha(),dt=ma(k),[ao,so]=n.useState(void 0),[Qo,Xo]=n.useState(void 0);n.useEffect(()=>{if(I||R===void 0)return;let t=!1;return fetch(`${R}/api/v1/configure/models?agent_id=${encodeURIComponent(k)}`).then(i=>i.ok?i.json():null).then(i=>{t||(so(i?ga(i):[]),Xo(i?fa(i):void 0))}).catch(()=>{t||so([])}),()=>{t=!0}},[R,k,I]);const Zo=n.useMemo(()=>ya(ao,()=>Object.values(va).filter(t=>t.available&&ba(t)).map(t=>({id:t.id,name:t.name,provider:t.provider}))),[ao]),ro=n.useMemo(()=>{const t=lt.data?.builtinTools??[],i=new Set(t.map(d=>d.name));return{runtime:t,frontend:st.filter(d=>!i.has(d.name)).map(d=>({id:d.name,name:d.name}))}},[lt.data?.builtinTools,st]),io=n.useMemo(()=>new Set((Ve.data?.skills??[]).filter(t=>t.status==="enabled"||t.status==="loaded").map(t=>t.id)),[Ve.data]),en=n.useCallback(async t=>{Jt(t),!(I||R===void 0)&&await fetch(`${R}/api/v1/configure/inference/provider`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({model:t})}).catch(()=>{})},[R,I]),lo=h?.promptPlacement==="bottom-chat",tn=h?.promptPlacement==="floating",Ee=h?.promptPlacement==="top",Ke=h?.hidePrompt===!0||v.hidePrompt===!0,on={onSend:()=>{F(Yt)},input:Yt,setInput:It,focusTrigger:me||eo?(me?.nonce??0)+eo:void 0,placement:tn||Y==="floating"||Y==="floating-top"||Y==="floating-bottom"?"floating":"docked",floatingAnchor:Y==="floating-top"?"top":"bottom",isLoading:N,onStop:()=>e.viewControls.stop?.(),placeholder:Kt??K,typingSuggestions:xt.map(t=>t.text),suggestions:nt,disableInputPrompt:rt,connectionConfirmed:!rt,padding:Ee||Y==="floating-top"||Y==="floating-bottom"||Y==="docked-top"?2:3,promptVariant:"lexical",autoFocus:h?.autoFocusPrompt??!0,mentionableAgents:No,promptCommands:Oo,headerContent:Bo.length>0?o.jsx(Mt,{slot:je.inpromptMenu,props:{workspace:e}}):void 0,footerExtras:Go.length>0?o.jsx(Mt,{slot:je.promptAction,props:{workspace:e}}):void 0,showAgentsMenu:!U,showInlineAgentsMenu:!1,agents:Wo,selectedAgentId:b,onSelectAgent:t=>s?.select(t),showTokenUsage:v.showTokenUsage??h?.showTokenUsage??!0,showContextRing:!0,agentUsage:zo??void 0,showModelSelector:!U,models:Zo,decisions:Qo,selectedModel:it,onModelSelect:t=>{en(t)},showToolsMenu:!U,availableTools:ro.runtime,availableFrontendTools:ro.frontend,mcpServers:lt.data?.mcpServers??[],mcpStatusData:v.mcpStatusData??void 0,showSkillsMenu:!U,skills:Ve.data?.skills??[],skillsLoading:Ve.isLoading,enabledSkills:io,onToggleSkill:t=>io.has(t)?dt.disableSkill(t):dt.enableSkill(t),onToggleAllSkills:(t,i)=>t.forEach(d=>i?dt.enableSkill(d):dt.disableSkill(d)),codemodeEnabled:v.codemodeEnabled??!1,onToggleCodemode:v.onToggleCodemode,isA2AProtocol:!1,hasConfigData:!!lt.data,hasSkillsData:!!Ve.data},co=ee[0]?.value.Component,Rt=Pe[0]?.value.Component,ct=co?o.jsx(co,{workspace:e,composer:on}):null,uo=E.length>0&&h?.showSurfaceSelector!==!1?o.jsx(xs,{surfaces:E.map(t=>t.value),active:x?.surfaceId??pe?.surfaceId??X,onChange:ce,workspace:e}):null,po=o.jsxs(o.Fragment,{children:[E.map(t=>{const i=t.value,d=x?.surfaceId===i.surfaceId;return d||Q.current.has(i.surfaceId)||Ye(i,e)?(Q.current.add(i.surfaceId),o.jsx(p,{sx:d?{flex:"1 1 0",minWidth:0,minHeight:0}:{position:"absolute",inset:0,visibility:"hidden",pointerEvents:"none",zIndex:-1},children:o.jsx(wa,{load:i.load,props:{surfaceId:i.surfaceId,workspace:e},fallback:o.jsxs(Ut,{children:["Loading ",i.title,"…"]}),errorFallback:u=>o.jsxs(Ut,{children:[i.title," failed to load: ",u.message]})})},i.surfaceId)):null}),!x&&pe?o.jsx(p,{flex:"1 1 0",minWidth:0,minHeight:0,children:o.jsxs(Ut,{children:["Starting ",pe.title,"…"]})}):null]}),ho=o.jsx(o.Fragment,{children:o.jsxs(p,{flex:Ee&&x?"0 0 34%":"1 1 0",maxWidth:Ee&&x?460:void 0,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",borderLeft:x?"1px solid":void 0,borderColor:"border.default",position:"relative",children:[v.errorBanner?o.jsx(p,{flexShrink:0,px:3,py:2,fontSize:1,borderBottom:"1px solid",bg:v.errorBanner.variant==="warning"?"attention.subtle":"danger.subtle",color:v.errorBanner.variant==="warning"?"attention.fg":"danger.fg",borderColor:v.errorBanner.variant==="warning"?"attention.muted":"danger.muted",children:v.errorBanner.message}):null,Ce?.said&&Ce.given===A?.id?o.jsx(W,{as:"p",role:"status",sx:{m:0,px:3,py:2,fontSize:1,color:"fg.muted"},children:Ce.said}):null,o.jsx(p,{flex:"1 1 auto",minHeight:0,display:"flex",children:Jo?o.jsx(W,{as:"p",role:"status",sx:{m:0,p:3,fontSize:1,color:"fg.muted"},children:Eo.opening}):o.jsx(xa,{themeVariant:h?.themeVariant,themeOverrides:h?.themeOverrides,colorMode:h?.colorMode,thread:no,disabled:rt,disableReason:Kt,protocol:jt,frontendTools:I?void 0:v.frontendTools,initialModel:it||void 0,title:U?.name??m?.name??T?.name??k,description:U?.welcome??T?.description,brandIcon:U?.face?o.jsx(gs,{face:U.face,size:20,state:ie}):o.jsx(kt,{size:20}),headerContent:U&&!Tt?o.jsx(fs,{state:ie}):void 0,emptyState:{icon:U?.face?o.jsx("span",{"aria-hidden":!0,style:{fontSize:Io,lineHeight:1},children:o.jsx(Po,{face:U.face,size:Io})}):o.jsx(kt,{size:48}),title:U?.name??m?.name??T?.name??k,...s&&m?{sections:[{group:s.team.name,icon:o.jsx(_o,{size:48}),title:s.team.name,subtitle:s.team.description},{group:m.name,icon:o.jsx(kt,{size:32}),title:m.name,subtitle:T?.description}]}:null},suggestions:Ee||se||h?.suggestionLabels===!1?[]:nt,showHeader:!h?.hideHeader&&!!Rt,headerButtons:{showNewChat:h?.headerButtons?.newChat??!1,showClear:h?.headerButtons?.clear??!1},renderHeader:Rt?t=>o.jsx(Rt,{workspace:e,header:t}):void 0,showInformation:!0,headerActions:o.jsxs(p,{display:"inline-flex",alignItems:"center",gap:2,children:[e.chatHeaderActions,Ho.length>0?o.jsx(Mt,{slot:je.chatHeader,props:{workspace:e}}):null,o.jsx(ka,{icon:_?Sa:Ca,"aria-label":_?"Exit full screen":"Enter full screen",variant:"invisible",size:"small",onClick:()=>{ze(!1),ue()},sx:bt?{"@keyframes dla-fullscreen-hint":{"0%, 100%":{opacity:1},"50%":{opacity:.4}},"&&":{bg:`color-mix(in srgb, ${l.primary} 16%, transparent)`,boxShadow:`inset 0 0 0 1.5px ${l.primary}`,animation:`dla-fullscreen-hint ${ws}ms ease-in-out infinite`},"@media (prefers-reduced-motion: reduce)":{"&&":{animation:"none"}}}:void 0})]}),showInput:!1,onSendReady:ye,notebookToolSurfacesId:x?void 0:e.surfaceId,renderToolResult:v.renderToolResult,showTurnFooter:v.showTokenUsage??h?.showTokenUsage??!0,onContextSnapshot:Me,onLoadingChange:tt,onItemsChange:M,onDisplayItemsChange:de,enableStreaming:!0},no?.id)}),lo&&!Ke?ct:null]})}),mo=h?.suggestionLabels!==!1&&nt.length>0?o.jsx(p,{"aria-label":a.suggestedPrompts,display:"flex",flexWrap:"wrap",gap:2,px:2,pb:"6px",children:nt.map(t=>o.jsx(p,{as:"button",type:"button",title:t.message,disabled:N||rt,onClick:()=>{F(t.message)},appearance:"none",font:"inherit",fontSize:0,fontWeight:"semibold",lineHeight:1.25,px:"10px",py:"5px",width:bo,flex:`0 0 ${bo}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:o.jsx(Ea,{title:t.title,maxWidth:"100%",sx:{minWidth:0},children:t.title})},t.title))}):null,go=g?o.jsx(p,{flex:"0 0 auto",px:3,py:2,borderTop:"1px solid",borderColor:"border.default",bg:"canvas.subtle",fontSize:1,maxHeight:"40%",overflowY:"auto",children:g}):null;return o.jsxs(p,{ref:Ue,sx:{height:"100%",minHeight:0,display:"flex",flexDirection:"column",position:"relative",..._?{bg:"canvas.default"}:null,..._&&!$e.current?{position:"fixed",top:vt,right:0,bottom:0,left:0,height:"auto",zIndex:1e3}:null},children:[se?o.jsx(se.Component,{workspace:e,editors:po,hasEditor:!!x,transcript:ho,prompt:Ke?null:ct,chips:Ke?null:mo,picker:uo,transient:go}):o.jsxs(o.Fragment,{children:[Ee&&!Ke?o.jsxs(p,{flex:"0 0 auto",borderBottom:"1px solid",borderColor:"border.default",children:[ct,mo]}):null,uo,o.jsxs(p,{flex:"1 1 auto",minHeight:0,display:"flex",position:"relative",children:[po,ho]}),go,lo||Ke||Ee?null:ct]}),Ct?o.jsx(p,{position:"absolute",inset:0,zIndex:5,bg:"canvas.default",display:"flex",flexDirection:"column",minHeight:0,children:o.jsx(Qa,{agentName:m?.name??T?.name,sandboxStillRuns:I,temporary:Vt,onSignedIn:()=>Ta.getState().clear()})}):null]})}function xs({surfaces:e,active:a,onChange:l,workspace:r}){const c=[...e].sort((g,f)=>(g.order??100)-(f.order??100));return o.jsxs(p,{flex:"0 0 auto",display:"flex",alignItems:"center",gap:2,px:3,py:2,borderBottom:"1px solid",borderColor:"border.default",children:[o.jsx(W,{sx:{fontSize:0,color:"fg.muted"},children:"Beside the chat"}),o.jsxs(Ft,{"aria-label":"Editor beside the chat",size:"small",children:[o.jsx(Ft.Button,{selected:a===X,onClick:()=>l(X),children:"Chat"}),c.map(g=>{const f=Ye(g,r),S=f?void 0:g.unavailableReason?.(r)??"Not available right now";return o.jsx(Ft.Button,{selected:a===g.surfaceId,"aria-disabled":!f,title:S??g.title,leadingIcon:g.icon,onClick:()=>{f&&l(g.surfaceId)},children:g.title},g.surfaceId)})]})]})}function Ut({children:e}){return o.jsx(p,{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"fg.muted",fontSize:1,px:3,textAlign:"center",children:e})}export{Es as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,j as e,B as n,T as s,o as i}from"../datalayer-app-main.js";import j from"./index-
|
|
1
|
+
import{r as x,j as e,B as n,T as s,o as i}from"../datalayer-app-main.js";import j from"./index-hib7vWC6.js";function A({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{A as ContextPie};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c2 as U,c3 as b,bX as C,q as I,c4 as L,r as c,c5 as T,c6 as v,c7 as j}from"../datalayer-app-main.js";function B(l){const n=l?.app_spec;if(!n||typeof n!="object")return;const e=l?.app_instance??{},t=typeof e.app_uid=="string"&&e.app_uid?e.app_uid:void 0,r=typeof e.deployment_uid=="string"&&e.deployment_uid?e.deployment_uid:void 0;return{appSpec:n,...t?{appUid:t}:{},...r?{deploymentUid:r}:{}}}const D="jupyter-tutor";function k(){const n=U().getConfig(b),e=n?.datalayerAgentSpecId??D,t=n?.datalayerCreatePayload,r=n?.datalayerVisitors,E=n?.datalayerKept,i=r?.url??E?.url,a=C(),s=I(a?.target??L)==="datalayer",u=t?.app_spec?.id,[p,d]=c.useState({});c.useEffect(()=>{if(d({}),!r||!s)return;if(typeof u!="string"||!u){d({error:"A conversation without an account runs an application: none was given."});return}let y=!0;return T(r,u).then(()=>{y&&d({ready:!0})}).catch(_=>{y&&d({error:_ instanceof Error?_.message:String(_)})}),()=>{y=!1}},[r?.url,r?.app,r?.inferenceUrl,u,s]);const A=typeof t?.name=="string"?t.name:e,g=t?.transport==="ag-ui"||t?.transport==="vercel-ai"?t.transport:void 0,N=c.useMemo(()=>({name:A,...g?{protocol:g}:{},agentSpecId:e,model:v[e]?.model,description:v[e]?.description,...t?{createPayload:t}:{}}),[e,A,g,t]),S=c.useMemo(()=>B(t),[t]),{runtime:o,status:m,error:f}=j({agentSpecId:e,agentConfig:N,...S?{appLaunch:S}:{},variant:"cloud-pydanticai",autoStart:s&&!i,autoCreateAgent:s&&!i});return c.useEffect(()=>{if(!(!a||!s)){if(r){if(p.error){a.setState("error",p.error);return}if(!p.ready){a.setState("starting");return}}if(i){a.report({variant:"datalayer",sandbox_running:!1,agent_base_url:i});return}if(f){a.setState("error",f);return}if(!o?.jupyterBaseUrl){a.setState(m==="error"?"error":"starting");return}a.report({variant:"datalayer",sandbox_running:!!o.serviceManager,jupyter_url:o.jupyterBaseUrl,jupyter_token:o.serviceManager?.serverSettings?.token,kernel_id:o.kernelId,agent_base_url:o.agentBaseUrl})}},[a,s,o,m,f,i,r,p]),null}export{k as DatalayerAgentBridge,k as default};
|