@decocms/mesh 2.145.0 → 2.147.0
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/client/assets/{AlertCircle-CHexcqK0.js → AlertCircle-BxY5fiQL.js} +1 -1
- package/dist/client/assets/{AlignLeft-wEQoHPG1.js → AlignLeft-CYD2I4vb.js} +1 -1
- package/dist/client/assets/{ArrowDown-DS0UhuCz.js → ArrowDown-CHvJtNUF.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BysKrYx8.js → ArrowLeft-OWT1EQHI.js} +1 -1
- package/dist/client/assets/{ArrowUp-BI5V1txl.js → ArrowUp-B6DuZEj0.js} +1 -1
- package/dist/client/assets/{Check-mUIvZly8.js → Check-DM0R80Lx.js} +1 -1
- package/dist/client/assets/{CheckCircle-AiDKuZw1.js → CheckCircle-PmTT8Oda.js} +1 -1
- package/dist/client/assets/{CheckDone01-BpDhyM1d.js → CheckDone01-Ds3gyL13.js} +1 -1
- package/dist/client/assets/{CheckVerified02-K48eJh3m.js → CheckVerified02-DwpatBOS.js} +1 -1
- package/dist/client/assets/{ChevronDown-Bg73DXow.js → ChevronDown-Dp9wV5PD.js} +1 -1
- package/dist/client/assets/{ChevronLeft-84BO6HEd.js → ChevronLeft-urjZe_Dn.js} +1 -1
- package/dist/client/assets/{ChevronRight-DRs99ZRM.js → ChevronRight-6Ka7FsE_.js} +1 -1
- package/dist/client/assets/{Clock-BCvCAc7i.js → Clock-kspY5z1L.js} +1 -1
- package/dist/client/assets/{Code01-B29dV-Q_.js → Code01-HNFEPIid.js} +1 -1
- package/dist/client/assets/{Container-CyA59Hr6.js → Container-DlkaR-ky.js} +1 -1
- package/dist/client/assets/{Copy01-CcfQ05L8.js → Copy01-CTK5kHSt.js} +1 -1
- package/dist/client/assets/{Dataflow03-D34XdcdD.js → Dataflow03-BTLwjVqK.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-x6Sdh5gX.js → DotsHorizontal-C0uTiMm9.js} +1 -1
- package/dist/client/assets/{DotsVertical-wBJiPiID.js → DotsVertical-ClwDdvIe.js} +1 -1
- package/dist/client/assets/{Download01-B9PmZJO4.js → Download01-DkiE27--.js} +1 -1
- package/dist/client/assets/{Edit01-C7I8buAW.js → Edit01-DUtQu9mf.js} +1 -1
- package/dist/client/assets/{Edit05-BlPDSx-D.js → Edit05-ersxMaKv.js} +1 -1
- package/dist/client/assets/{Eye-C-LZPCP0.js → Eye-CjFHW7ES.js} +1 -1
- package/dist/client/assets/{File02-C7kAMOYw.js → File02-CnEzGkll.js} +1 -1
- package/dist/client/assets/{File06-CuLBUWRK.js → File06-CqR96V2a.js} +1 -1
- package/dist/client/assets/{FilterLines-BTbHqZen.js → FilterLines-B8bnzNry.js} +1 -1
- package/dist/client/assets/{Globe01-MsYwL2Gt.js → Globe01-CklO6g7B.js} +1 -1
- package/dist/client/assets/{Globe02-C7zbDDlP.js → Globe02-YpZUlJ3c.js} +1 -1
- package/dist/client/assets/{Grid01-BQYqnEYC.js → Grid01-CL8bDW_D.js} +1 -1
- package/dist/client/assets/{Hash02-wCa1AmTg.js → Hash02-Dg3-73Ng.js} +1 -1
- package/dist/client/assets/{Home02-_WfnuZ6C.js → Home02-D2JM4OYb.js} +1 -1
- package/dist/client/assets/{Image01-CL0MMQLW.js → Image01-CPB4EwHT.js} +1 -1
- package/dist/client/assets/{Inbox01-DPFZX8-7.js → Inbox01-Bjy6kkog.js} +1 -1
- package/dist/client/assets/{InfoCircle-Bsu0gTJ5.js → InfoCircle-DqCGkTAY.js} +1 -1
- package/dist/client/assets/{Key01-DBn2vDdE.js → Key01-DyGpqOc7.js} +1 -1
- package/dist/client/assets/{LayersTwo01-DdYU3A3u.js → LayersTwo01-BbZmd_ZN.js} +1 -1
- package/dist/client/assets/{LayoutLeft-ClfkAMvE.js → LayoutLeft-C-IcNldx.js} +1 -1
- package/dist/client/assets/{Link01-DIBvBOMb.js → Link01-BHJsd90s.js} +1 -1
- package/dist/client/assets/{LinkExternal01-NKCqKEPi.js → LinkExternal01-CvnlRIOz.js} +1 -1
- package/dist/client/assets/{List-GAQfpd2u.js → List-DfEsq0CX.js} +1 -1
- package/dist/client/assets/{Loading01-Dq2MI--a.js → Loading01-BhNIqpDS.js} +1 -1
- package/dist/client/assets/{Lock01-hkiyQ8hn.js → Lock01-mdeil4MX.js} +1 -1
- package/dist/client/assets/{Play-BZhRn6tE.js → Play-B7GZ81pz.js} +1 -1
- package/dist/client/assets/{Plus-DsR_tCw6.js → Plus-C1MNvAXK.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-BmEw-AJF.js → RefreshCcw01-Ca9tzvK2.js} +1 -1
- package/dist/client/assets/{Save01-DMr5Mydt.js → Save01-DIefNXMY.js} +1 -1
- package/dist/client/assets/{SearchMd-BRAsA5px.js → SearchMd-5eCpIbcV.js} +1 -1
- package/dist/client/assets/{Settings01-INMHtU3O.js → Settings01-D7NZCzIn.js} +1 -1
- package/dist/client/assets/{Shield01-CXrp6uge.js → Shield01-dTwfmEY6.js} +1 -1
- package/dist/client/assets/{Terminal-C9azxOol.js → Terminal-s7bJA6c1.js} +1 -1
- package/dist/client/assets/{Trash01-DguMAIMc.js → Trash01-DvB3pKWW.js} +1 -1
- package/dist/client/assets/{Upload01-9HuLd7om.js → Upload01-D22SNQMk.js} +1 -1
- package/dist/client/assets/{Users03-xOVOWg9H.js → Users03-DBePAF2b.js} +1 -1
- package/dist/client/assets/{X-DfCtt-9E.js → X-BYuMngbe.js} +1 -1
- package/dist/client/assets/{XCircle-DBV7s4Xw.js → XCircle-DZD5coKl.js} +1 -1
- package/dist/client/assets/{XClose-CY2MEG0v.js → XClose-BmWaDPIJ.js} +1 -1
- package/dist/client/assets/{Zap-BvK8yBP1.js → Zap-N4sUqdyZ.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-B-weMy9l.js → agent-connections-preview-Bo_z1K1c.js} +1 -1
- package/dist/client/assets/{agent-detail-D1gS3bQB.js → agent-detail-IIw3ZuFv.js} +1 -1
- package/dist/client/assets/{agents-DGWGKRS7.js → agents-BqWyJ8Lf.js} +1 -1
- package/dist/client/assets/{alert-dialog-BhMLiL-f.js → alert-dialog-BQq-kgnK.js} +2 -2
- package/dist/client/assets/{auth-catchall-DeVTL-GH.js → auth-catchall-m2QVes9C.js} +1 -1
- package/dist/client/assets/{avatar-CIF9KO_a.js → avatar-B7exWPCY.js} +1 -1
- package/dist/client/assets/{badge-D1wMupdZ.js → badge-BaNY-OL6.js} +1 -1
- package/dist/client/assets/{binder-ClQyDxvt.js → binder-CV13fD1Q.js} +1 -1
- package/dist/client/assets/{breadcrumb-CPeEcD6G.js → breadcrumb-gOyjPPGL.js} +1 -1
- package/dist/client/assets/{card-BoG6OSo4.js → card-yIedF24A.js} +1 -1
- package/dist/client/assets/{chart-CePwiD6C.js → chart-D-lRBuDk.js} +1 -1
- package/dist/client/assets/{checkbox-BGURGdsV.js → checkbox-ThaJpOaj.js} +1 -1
- package/dist/client/assets/{circle-alert-BjdcZS-O.js → circle-alert-Cvj-_yev.js} +1 -1
- package/dist/client/assets/{collapsible-DDp-jqBS.js → collapsible-B7E35viJ.js} +1 -1
- package/dist/client/assets/{collection-detail-CMX8f9I4.js → collection-detail-DRmXLTkL.js} +1 -1
- package/dist/client/assets/{collection-display-button-DK1a_rcB.js → collection-display-button-DkElFn0m.js} +1 -1
- package/dist/client/assets/{collection-search-DlbpDorz.js → collection-search-DdGB2-83.js} +1 -1
- package/dist/client/assets/{collection-tab-DvtIqiJp.js → collection-tab-_a1M_EPG.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BQj5ZJT3.js → collection-table-wrapper-D1l-II_G.js} +1 -1
- package/dist/client/assets/{collection-tabs-NRO8Oupc.js → collection-tabs-B3XEslmM.js} +1 -1
- package/dist/client/assets/{command-C1rA8jXR.js → command-aOEV7pTP.js} +1 -1
- package/dist/client/assets/{connect-BMzm47bS.js → connect-e0WaT14P.js} +1 -1
- package/dist/client/assets/{connection-card-CuiBybbu.js → connection-card-cqIoA2EJ.js} +1 -1
- package/dist/client/assets/{connection-detail-CIh9SGb2.js → connection-detail-BVTmAmSm.js} +1 -1
- package/dist/client/assets/{connection-status-ZpiWzMGI.js → connection-status-C5-HnOnw.js} +1 -1
- package/dist/client/assets/{connections-Bjs9S9i3.js → connections-iVre7qcd.js} +1 -1
- package/dist/client/assets/constants-jYYqxXjE.js +1 -0
- package/dist/client/assets/{constants-D9z7KLT0.js → constants-w3KRiYJo.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CLziHWgY.js → create-organization-dialog-BqR7u0H1.js} +1 -1
- package/dist/client/assets/{create-project-dialog-KvCoVl6B.js → create-project-dialog-aDOFVIXf.js} +1 -1
- package/dist/client/assets/{danger-DImv7IiW.js → danger-BXuA8TnM.js} +1 -1
- package/dist/client/assets/{danger-zone-CO3y6m2C.js → danger-zone-gnEq-pjk.js} +1 -1
- package/dist/client/assets/{decopilot-events-CmkXOumK.js → decopilot-events-Cb2QSfqq.js} +1 -1
- package/dist/client/assets/{dependencies-BWILTGOS.js → dependencies-B2L93Pgh.js} +1 -1
- package/dist/client/assets/{dialog-6tKvrNtA.js → dialog-B3CFSIOO.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BgBG09R8.js → dropdown-menu-D2rSYXT0.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-BM7iTU8c.js → dynamic-plugin-layout-8_di8wbs.js} +1 -1
- package/dist/client/assets/{editable-task-title-9wBxr3vu.js → editable-task-title-CUKGptEM.js} +1 -1
- package/dist/client/assets/{empty-state-DQxFgRXU.js → empty-state-BGaiVLKF.js} +1 -1
- package/dist/client/assets/{env-vars-editor-CcIqcmWX.js → env-vars-editor-DQid4mho.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CTFEulXc.js → extract-connection-data-O4Gsa4VK.js} +1 -1
- package/dist/client/assets/{file-browser-UR_T9eYn.js → file-browser-ClOR7brZ.js} +2 -2
- package/dist/client/assets/{form-Djv5zHX0.js → form-CMmr8Vur.js} +1 -1
- package/dist/client/assets/{general-Cjk7j8EO.js → general-BrvEiUUZ.js} +1 -1
- package/dist/client/assets/{grid-view-Bfyyvx_S.js → grid-view-BN6YWnHp.js} +1 -1
- package/dist/client/assets/{home-DZQkZp3d.js → home-CcSjkQmd.js} +1 -1
- package/dist/client/assets/{icon-picker-BaF_rWf9.js → icon-picker-DhlxPpZc.js} +1 -1
- package/dist/client/assets/{index-C4C1LTNx.js → index-AGGQRNyj.js} +1 -1
- package/dist/client/assets/index-BzG28ER4.js +1 -0
- package/dist/client/assets/{index-DDFgxvXe.js → index-CFOhHTl3.js} +1 -1
- package/dist/client/assets/{index-tkyKZw4C.js → index-CpVmTHFl.js} +1 -1
- package/dist/client/assets/{index-BeacagIZ.js → index-DZwB81XR.js} +1 -1
- package/dist/client/assets/{index-DCZ5uiBS.js → index-D_NXq9UK.js} +1 -1
- package/dist/client/assets/{index-BNIkrm6G.js → index-DcA4vgYb.js} +3 -3
- package/dist/client/assets/{index-Wc_nSvlc.js → index-mkvMawlM.js} +1 -1
- package/dist/client/assets/{index-pNu9q5L9.js → index-x_t3P0ZE.js} +7 -7
- package/dist/client/assets/{infiniteQueryObserver-DRvaqcVN.js → infiniteQueryObserver-UxwYssQv.js} +1 -1
- package/dist/client/assets/{input-zk6YM9m6.js → input-D7fS8yTo.js} +1 -1
- package/dist/client/assets/{integration-icon-CeszwaXj.js → integration-icon-B8yOf85-.js} +1 -1
- package/dist/client/assets/{label-CidthTOJ.js → label-lJUQWqvH.js} +1 -1
- package/dist/client/assets/{layout-CzIkMq42.js → layout-8Iq37ggv.js} +1 -1
- package/dist/client/assets/{layout-Ccv_jHcv.js → layout-CoLAFZKt.js} +1 -1
- package/dist/client/assets/{localstorage-keys-bVpFjoCT.js → localstorage-keys-BIium7Ac.js} +1 -1
- package/dist/client/assets/{login-BaXW-oGY.js → login-Dx_k-JEU.js} +1 -1
- package/dist/client/assets/{markdown-Br6TxRr2.js → markdown-CesmJxNj.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DyEHtBB2.js → mcp-app-renderer-Dy6Buo8R.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CPaNV8Xf.js → mcp-oauth-CpwQDySp.js} +1 -1
- package/dist/client/assets/{mcp-server-card-BldvuRQ0.js → mcp-server-card-r7UdwLgj.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-Q4f8n50Y.js → mcp-server-detail-D2rDJgzT.js} +2 -2
- package/dist/client/assets/{members-DcuqIe_d.js → members-CCPdUjzZ.js} +1 -1
- package/dist/client/assets/{monaco-editor-BwTwH0Rs.js → monaco-editor-CMsnbBtp.js} +4 -4
- package/dist/client/assets/{monitoring-BR2eoLS-.js → monitoring-BRLzgzyr.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-BC38XkJQ.js → monitoring-dashboard-edit-ClxJS82n.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-DKi69SyS.js → monitoring-dashboard-view-TB39e12y.js} +1 -1
- package/dist/client/assets/{oauth-callback-BMiFcG0W.js → oauth-callback-wL_skfqu.js} +1 -1
- package/dist/client/assets/{page-DNDUi_w7.js → page-C5LCoWvu.js} +1 -1
- package/dist/client/assets/{page-D80MmXgG.js → page-DpavvRTD.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-5vojSAPc.js → plugin-empty-state-B2TcnpU8.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-DQFi6wIh.js → plugin-empty-state-D-2b2Ueg.js} +1 -1
- package/dist/client/assets/{plugin-header-BcoWcA5N.js → plugin-header-BwXlpyU9.js} +1 -1
- package/dist/client/assets/{plugin-header-_7ot6Tqc.js → plugin-header-cSUNkYb-.js} +1 -1
- package/dist/client/assets/plugins-CQoCeQQM.js +1 -0
- package/dist/client/assets/{popover-CduEmtfy.js → popover-CFtuZWTF.js} +1 -1
- package/dist/client/assets/{project-app-view-BlVutvub.js → project-app-view-CDORYS9z.js} +1 -1
- package/dist/client/assets/{project-layout-OHVYUZtY.js → project-layout-BytQmlbh.js} +1 -1
- package/dist/client/assets/{project-plugins-BkC-kqjZ.js → project-plugins-DKuSvi9K.js} +1 -1
- package/dist/client/assets/{projects-list-ClANjw6y.js → projects-list-CDkdbpem.js} +1 -1
- package/dist/client/assets/{readme-viewer-DolJXk7s.js → readme-viewer-BGLlbpox.js} +1 -1
- package/dist/client/assets/{registry-layout-Dmdg_MWz.js → registry-layout-Dqc_wfH3.js} +1 -1
- package/dist/client/assets/{registry-utils-9-tH1rvq.js → registry-utils-BrkLyGuY.js} +1 -1
- package/dist/client/assets/{reports-layout-_RH_S5H8.js → reports-layout-Bg5uGq4w.js} +1 -1
- package/dist/client/assets/{reset-password-Z2cNt_wH.js → reset-password-BDc095YT.js} +1 -1
- package/dist/client/assets/{resizable-BmT0syW-.js → resizable-BrSAj6aj.js} +1 -1
- package/dist/client/assets/{save-actions-CX-DFtVd.js → save-actions-DMCdLEbq.js} +1 -1
- package/dist/client/assets/{scroll-area-CCiZyPKr.js → scroll-area-RURkKeyT.js} +1 -1
- package/dist/client/assets/{select-DQG_vrnx.js → select-BRkHXmU6.js} +1 -1
- package/dist/client/assets/{shell-layout-C7iIYiNt.js → shell-layout-P-TwNx9y.js} +2 -2
- package/dist/client/assets/{sidebar-settings-B6e-MfRC.js → sidebar-settings-BmGY0wm5.js} +1 -1
- package/dist/client/assets/{skeleton-8tszUVPX.js → skeleton-BgSJw0Uk.js} +1 -1
- package/dist/client/assets/{spinner-DbhNddF6.js → spinner-BFdPnmxp.js} +1 -1
- package/dist/client/assets/{store-invite-C39kSuSw.js → store-invite-CHVieGXU.js} +1 -1
- package/dist/client/assets/{switch-BjLeXd0d.js → switch-DvIqv_t1.js} +1 -1
- package/dist/client/assets/{table-DG0Ccg1P.js → table-CO6Nu6e5.js} +1 -1
- package/dist/client/assets/{tabs-qklqf5c2.js → tabs-BAToYNio.js} +1 -1
- package/dist/client/assets/tasks-CqkiOZez.js +1 -0
- package/dist/client/assets/{tasks-panel-gU-hwNjz.js → tasks-panel-OQEuuX3Q.js} +1 -1
- package/dist/client/assets/{textarea-PZYb3mIe.js → textarea-BtPDboXP.js} +1 -1
- package/dist/client/assets/{time-range-picker-DUQABsm3.js → time-range-picker-bzaKWNvH.js} +1 -1
- package/dist/client/assets/{toggle-group-UZnbG_0x.js → toggle-group-Bl2uuYVW.js} +1 -1
- package/dist/client/assets/{tools-list-BkV9OVrO.js → tools-list-PFUep6hy.js} +1 -1
- package/dist/client/assets/{tooltip-SIeQn5OB.js → tooltip-DUANF8DJ.js} +1 -1
- package/dist/client/assets/{topbar-portal-7A4SOJDM.js → topbar-portal-DtHnjO-j.js} +1 -1
- package/dist/client/assets/{types-CPe1xBdd.js → types-BINr8MaA.js} +1 -1
- package/dist/client/assets/{use-binding-DF4rrJCM.js → use-binding-CDDSoaxw.js} +1 -1
- package/dist/client/assets/{use-collections-D0eAqnRh.js → use-collections-CpcuwtcR.js} +1 -1
- package/dist/client/assets/{use-connection-S2z7Q5et.js → use-connection-C9-04knk.js} +1 -1
- package/dist/client/assets/{use-copy-BLRzY6B2.js → use-copy-DDPxg72B.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CfJCu2UK.js → use-create-virtual-mcp-BpvZ6OCv.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-oZiJEk8Y.js → use-install-from-registry-CspJ6NsO.js} +1 -1
- package/dist/client/assets/{use-list-state-eqx_xb1a.js → use-list-state-CRkO2Jzf.js} +1 -1
- package/dist/client/assets/{use-llm-DHW4hCLw.js → use-llm-DxLpP73s.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-229ZEuQM.js → use-mcp-resources-DvYdgtLO.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CcnxeAhu.js → use-mcp-tools-ADnBZWN7.js} +1 -1
- package/dist/client/assets/{use-members-CIQm_Yf7.js → use-members-CcrBc1CP.js} +1 -1
- package/dist/client/assets/{use-mobile-BW7etP6O.js → use-mobile-B_sbjhgD.js} +1 -1
- package/dist/client/assets/{use-project-Evb3_-yz.js → use-project-DW7GzWz1.js} +1 -1
- package/dist/client/assets/{use-settings-modal-D4nLj-Xv.js → use-settings-modal-MeDbXOkE.js} +1 -1
- package/dist/client/assets/{use-view-mode-BiwIU1aK.js → use-view-mode-BsLFPSer.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DSZQ8c22.js → use-virtual-mcp-CQ2Ty1y5.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DY6Q65Ev.js +1 -0
- package/dist/client/assets/{useMutation-DNeCNjWQ.js → useMutation-DIe-HSDV.js} +1 -1
- package/dist/client/assets/useQuery-Dai3ahZF.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-Dm0CBTiz.js +1 -0
- package/dist/client/assets/{user-BiYHDfMn.js → user-Cb5fO1qN.js} +1 -1
- package/dist/client/assets/{workflow-8fwC1DZy.js → workflow-COGMLsV7.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/migrate.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/constants-Bq5cGnN_.js +0 -1
- package/dist/client/assets/index-CLbGZ73s.js +0 -1
- package/dist/client/assets/plugins-BnOoY19L.js +0 -1
- package/dist/client/assets/tasks-ajdASRIt.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BGaJWc8S.js +0 -1
- package/dist/client/assets/useQuery--kTTZKx2.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BZiNplHQ.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{r as a,
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function se(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ce(Object(r),!0).forEach(function(n){Se(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Te(e,t){if(e==null)return{};var r,n,o=_e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _e(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Ie(e,t){return Re(e)||xe(e,t)||Ae(e,t)||Ce()}function Le(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ve(e){var t=Le(e,"string");return typeof t=="symbol"?t:t+""}function Ae(e,t){if(e){if(typeof e=="string")return ue(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ue(e,t):void 0}}function $e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function le(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?le(Object(r),!0).forEach(function(n){$e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ne(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function k(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];return t.apply(r,[].concat(o,l))}}}function Q(e){return{}.toString.call(e).includes("Object")}function De(e){return!Object.keys(e).length}function W(e){return typeof e=="function"}function ze(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ke(e,t){return Q(t)||C("changeType"),Object.keys(t).some(function(r){return!ze(e,r)})&&C("changeField"),t}function Ke(e){W(e)||C("selectorType")}function We(e){W(e)||Q(e)||C("handlerType"),Q(e)&&Object.values(e).some(function(t){return!W(t)})&&C("handlersType")}function qe(e){e||C("initialIsRequired"),Q(e)||C("initialType"),De(e)&&C("initialContent")}function Fe(e,t){throw new Error(e[t]||e.default)}var He={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},C=k(Fe)(He),U={changes:ke,selector:Ke,handler:We,initial:qe};function Ue(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};U.initial(e),U.handler(t);var r={current:e},n=k(Qe)(r,t),o=k(Je)(r),i=k(U.changes)(e),u=k(Be)(r);function l(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(O){return O};return U.selector(g),g(r.current)}function c(g){Ne(n,o,i,u)(g)}return[l,c]}function Be(e,t){return W(t)?t(e.current):t}function Je(e,t){return e.current=fe(fe({},e.current),t),t}function Qe(e,t,r){return W(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var
|
|
1
|
+
import{r as a,bG as N,j as T,c as Me,bY as te}from"./index-DcA4vgYb.js";import{S as me}from"./spinner-BFdPnmxp.js";const Pe=({size:e=24,color:t="currentColor",...r})=>a.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},a.createElement("path",{d:"M21 10H3m13-8v4M8 2v4m-.2 16h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 19.72 21 18.88 21 17.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 4 17.88 4 16.2 4H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 6.28 3 7.12 3 8.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 22 6.12 22 7.8 22Z"}));Pe.displayName="Calendar";function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Re(e){if(Array.isArray(e))return e}function Se(e,t,r){return(t=Ve(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,u,l=[],c=!0,g=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(O){g=!0,o=O}finally{try{if(!c&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(g)throw o}}return l}}function Ce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function se(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ce(Object(r),!0).forEach(function(n){Se(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Te(e,t){if(e==null)return{};var r,n,o=_e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _e(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Ie(e,t){return Re(e)||xe(e,t)||Ae(e,t)||Ce()}function Le(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ve(e){var t=Le(e,"string");return typeof t=="symbol"?t:t+""}function Ae(e,t){if(e){if(typeof e=="string")return ue(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ue(e,t):void 0}}function $e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function le(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?le(Object(r),!0).forEach(function(n){$e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ne(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function k(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];return t.apply(r,[].concat(o,l))}}}function Q(e){return{}.toString.call(e).includes("Object")}function De(e){return!Object.keys(e).length}function W(e){return typeof e=="function"}function ze(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ke(e,t){return Q(t)||C("changeType"),Object.keys(t).some(function(r){return!ze(e,r)})&&C("changeField"),t}function Ke(e){W(e)||C("selectorType")}function We(e){W(e)||Q(e)||C("handlerType"),Q(e)&&Object.values(e).some(function(t){return!W(t)})&&C("handlersType")}function qe(e){e||C("initialIsRequired"),Q(e)||C("initialType"),De(e)&&C("initialContent")}function Fe(e,t){throw new Error(e[t]||e.default)}var He={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},C=k(Fe)(He),U={changes:ke,selector:Ke,handler:We,initial:qe};function Ue(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};U.initial(e),U.handler(t);var r={current:e},n=k(Qe)(r,t),o=k(Je)(r),i=k(U.changes)(e),u=k(Be)(r);function l(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(O){return O};return U.selector(g),g(r.current)}function c(g){Ne(n,o,i,u)(g)}return[l,c]}function Be(e,t){return W(t)?t(e.current):t}function Je(e,t){return e.current=fe(fe({},e.current),t),t}function Qe(e,t,r){return W(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var Ge={create:Ue},Ye={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function Ze(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];return t.apply(r,[].concat(o,l))}}}function Xe(e){return{}.toString.call(e).includes("Object")}function et(e){return e||de("configIsRequired"),Xe(e)||de("configType"),e.urls?(tt(),{paths:{vs:e.urls.monacoBase}}):e}function tt(){console.warn(he.deprecation)}function rt(e,t){throw new Error(e[t]||e.default)}var he={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
3
3
|
You are using deprecated way of configuration.
|
|
4
4
|
|
|
5
5
|
Instead of using
|
|
@@ -8,7 +8,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8
8
|
monaco.config({ paths: { vs: '...' } })
|
|
9
9
|
|
|
10
10
|
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
11
|
-
`},de=
|
|
11
|
+
`},de=Ze(rt)(he),nt={config:et},it=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return function(o){return r.reduceRight(function(i,u){return u(i)},o)}};function ve(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],ve(e[r],t[r]))}),se(se({},e),t)}var ot={type:"cancelation",msg:"operation is manually canceled"};function re(e){var t=!1,r=new Promise(function(n,o){e.then(function(i){return t?o(ot):n(i)}),e.catch(o)});return r.cancel=function(){return t=!0},r}var at=["monaco"],ut=Ge.create({config:Ye,isInitialized:!1,resolve:null,reject:null,monaco:null}),ye=Ie(ut,2),q=ye[0],G=ye[1];function ct(e){var t=nt.config(e),r=t.monaco,n=Te(t,at);G(function(o){return{config:ve(o.config,n),monaco:r}})}function st(){var e=q(function(t){var r=t.monaco,n=t.isInitialized,o=t.resolve;return{monaco:r,isInitialized:n,resolve:o}});if(!e.isInitialized){if(G({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),re(ne);if(window.monaco&&window.monaco.editor)return be(window.monaco),e.resolve(window.monaco),re(ne);it(lt,dt)(pt)}return re(ne)}function lt(e){return document.body.appendChild(e)}function ft(e){var t=document.createElement("script");return e&&(t.src=e),t}function dt(e){var t=q(function(n){var o=n.config,i=n.reject;return{config:o,reject:i}}),r=ft("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function pt(){var e=q(function(r){var n=r.config,o=r.resolve,i=r.reject;return{config:n,resolve:o,reject:i}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(r){var n=r.m||r;be(n),e.resolve(n)},function(r){e.reject(r)})}function be(e){q().monaco||G({monaco:e})}function gt(){return q(function(e){var t=e.monaco;return t})}var ne=new Promise(function(e,t){return G({resolve:e,reject:t})}),Y={config:ct,init:st,__getMonacoInstance:gt},mt={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ie=mt,ht={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},vt=ht;function yt({children:e}){return N.createElement("div",{style:vt.container},e)}var bt=yt,wt=bt;function Ot({width:e,height:t,isEditorReady:r,loading:n,_ref:o,className:i,wrapperProps:u}){return N.createElement("section",{style:{...ie.wrapper,width:e,height:t},...u},!r&&N.createElement(wt,null,n),N.createElement("div",{ref:o,style:{...ie.fullWidth,...!r&&ie.hide},className:i}))}var jt=Ot,we=a.memo(jt);function Et(e){a.useEffect(e,[])}var Oe=Et;function Mt(e,t,r=!0){let n=a.useRef(!0);a.useEffect(n.current||!r?()=>{n.current=!1}:e,t)}var M=Mt;function K(){}function A(e,t,r,n){return Pt(e,n)||Rt(e,t,r,n)}function Pt(e,t){return e.editor.getModel(je(e,t))}function Rt(e,t,r,n){return e.editor.createModel(t,r,n?je(e,n):void 0)}function je(e,t){return e.Uri.parse(t)}function St({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:o,originalModelPath:i,modifiedModelPath:u,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:c=!1,theme:g="light",loading:O="Loading...",options:j={},height:R="100%",width:S="100%",className:_,wrapperProps:L={},beforeMount:I=K,onMount:D=K}){let[y,b]=a.useState(!1),[h,d]=a.useState(!0),v=a.useRef(null),f=a.useRef(null),P=a.useRef(null),m=a.useRef(D),s=a.useRef(I),V=a.useRef(!1);Oe(()=>{let p=Y.init();return p.then(w=>(f.current=w)&&d(!1)).catch(w=>w?.type!=="cancelation"&&console.error("Monaco initialization: error:",w)),()=>v.current?z():p.cancel()}),M(()=>{if(v.current&&f.current){let p=v.current.getOriginalEditor(),w=A(f.current,e||"",n||r||"text",i||"");w!==p.getModel()&&p.setModel(w)}},[i],y),M(()=>{if(v.current&&f.current){let p=v.current.getModifiedEditor(),w=A(f.current,t||"",o||r||"text",u||"");w!==p.getModel()&&p.setModel(w)}},[u],y),M(()=>{let p=v.current.getModifiedEditor();p.getOption(f.current.editor.EditorOption.readOnly)?p.setValue(t||""):t!==p.getValue()&&(p.executeEdits("",[{range:p.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),p.pushUndoStop())},[t],y),M(()=>{v.current?.getModel()?.original.setValue(e||"")},[e],y),M(()=>{let{original:p,modified:w}=v.current.getModel();f.current.editor.setModelLanguage(p,n||r||"text"),f.current.editor.setModelLanguage(w,o||r||"text")},[r,n,o],y),M(()=>{f.current?.editor.setTheme(g)},[g],y),M(()=>{v.current?.updateOptions(j)},[j],y);let F=a.useCallback(()=>{if(!f.current)return;s.current(f.current);let p=A(f.current,e||"",n||r||"text",i||""),w=A(f.current,t||"",o||r||"text",u||"");v.current?.setModel({original:p,modified:w})},[r,t,o,e,n,i,u]),H=a.useCallback(()=>{!V.current&&P.current&&(v.current=f.current.editor.createDiffEditor(P.current,{automaticLayout:!0,...j}),F(),f.current?.editor.setTheme(g),b(!0),V.current=!0)},[j,g,F]);a.useEffect(()=>{y&&m.current(v.current,f.current)},[y]),a.useEffect(()=>{!h&&!y&&H()},[h,y,H]);function z(){let p=v.current?.getModel();l||p?.original?.dispose(),c||p?.modified?.dispose(),v.current?.dispose()}return N.createElement(we,{width:S,height:R,isEditorReady:y,loading:O,_ref:P,className:_,wrapperProps:L})}var xt=St;a.memo(xt);function Ct(e){let t=a.useRef();return a.useEffect(()=>{t.current=e},[e]),t.current}var Tt=Ct,B=new Map;function _t({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:o,path:i,theme:u="light",line:l,loading:c="Loading...",options:g={},overrideServices:O={},saveViewState:j=!0,keepCurrentModel:R=!1,width:S="100%",height:_="100%",className:L,wrapperProps:I={},beforeMount:D=K,onMount:y=K,onChange:b,onValidate:h=K}){let[d,v]=a.useState(!1),[f,P]=a.useState(!0),m=a.useRef(null),s=a.useRef(null),V=a.useRef(null),F=a.useRef(y),H=a.useRef(D),z=a.useRef(),p=a.useRef(n),w=Tt(i),oe=a.useRef(!1),Z=a.useRef(!1);Oe(()=>{let E=Y.init();return E.then(x=>(m.current=x)&&P(!1)).catch(x=>x?.type!=="cancelation"&&console.error("Monaco initialization: error:",x)),()=>s.current?Ee():E.cancel()}),M(()=>{let E=A(m.current,e||n||"",t||o||"",i||r||"");E!==s.current?.getModel()&&(j&&B.set(w,s.current?.saveViewState()),s.current?.setModel(E),j&&s.current?.restoreViewState(B.get(i)))},[i],d),M(()=>{s.current?.updateOptions(g)},[g],d),M(()=>{!s.current||n===void 0||(s.current.getOption(m.current.editor.EditorOption.readOnly)?s.current.setValue(n):n!==s.current.getValue()&&(Z.current=!0,s.current.executeEdits("",[{range:s.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),s.current.pushUndoStop(),Z.current=!1))},[n],d),M(()=>{let E=s.current?.getModel();E&&o&&m.current?.editor.setModelLanguage(E,o)},[o],d),M(()=>{l!==void 0&&s.current?.revealLine(l)},[l],d),M(()=>{m.current?.editor.setTheme(u)},[u],d);let ae=a.useCallback(()=>{if(!(!V.current||!m.current)&&!oe.current){H.current(m.current);let E=i||r,x=A(m.current,n||e||"",t||o||"",E||"");s.current=m.current?.editor.create(V.current,{model:x,automaticLayout:!0,...g},O),j&&s.current.restoreViewState(B.get(E)),m.current.editor.setTheme(u),l!==void 0&&s.current.revealLine(l),v(!0),oe.current=!0}},[e,t,r,n,o,i,g,O,j,u,l]);a.useEffect(()=>{d&&F.current(s.current,m.current)},[d]),a.useEffect(()=>{!f&&!d&&ae()},[f,d,ae]),p.current=n,a.useEffect(()=>{d&&b&&(z.current?.dispose(),z.current=s.current?.onDidChangeModelContent(E=>{Z.current||b(s.current.getValue(),E)}))},[d,b]),a.useEffect(()=>{if(d){let E=m.current.editor.onDidChangeMarkers(x=>{let X=s.current.getModel()?.uri;if(X&&x.find(ee=>ee.path===X.path)){let ee=m.current.editor.getModelMarkers({resource:X});h?.(ee)}});return()=>{E?.dispose()}}return()=>{}},[d,h]);function Ee(){z.current?.dispose(),R?j&&B.set(i,s.current.saveViewState()):s.current.getModel()?.dispose(),s.current.dispose()}return N.createElement(we,{width:S,height:_,isEditorReady:d,loading:c,_ref:V,className:L,wrapperProps:I})}var It=_t,Lt=a.memo(It),Vt=Lt;async function At(e){const t=e.getModel();if(!t)throw new Error("[Monaco] No model found in editor");const r=t.getValue(),o=r.replace(/export default (async )?function/,"export default $1function __default")+`
|
|
12
12
|
type __ExpandRecursively<T> = T extends (...args: infer A) => infer R
|
|
13
13
|
? (...args: __ExpandRecursively<A>) => __ExpandRecursively<R>
|
|
14
14
|
: T extends object
|
|
@@ -16,4 +16,4 @@ type __ExpandRecursively<T> = T extends (...args: infer A) => infer R
|
|
|
16
16
|
: T;
|
|
17
17
|
type __InferredOutput = __ExpandRecursively<Awaited<ReturnType<typeof __default>>>;
|
|
18
18
|
declare const __outputValue: __InferredOutput;
|
|
19
|
-
`;t.setValue(o);const i=t.findMatches("__outputValue",!1,!1,!1,null,!1);if(!i||i.length===0)return t.setValue(r),null;const u=i[0];if(!u)return t.setValue(r),null;const l={lineNumber:u.range.startLineNumber,column:u.range.startColumn+1};try{const g=await(await
|
|
19
|
+
`;t.setValue(o);const i=t.findMatches("__outputValue",!1,!1,!1,null,!1);if(!i||i.length===0)return t.setValue(r),null;const u=i[0];if(!u)return t.setValue(r),null;const l={lineNumber:u.range.startLineNumber,column:u.range.startColumn+1};try{const g=await(await Y.init()).languages.typescript.getTypeScriptWorker();if(!g)return t.setValue(r),null;const O=await g(t.uri);await new Promise(S=>setTimeout(S,100));const j=t.getOffsetAt(l),R=await O.getQuickInfoAtPosition(t.uri.toString(),j);if(t.setValue(r),R){const _=R.displayParts.map(I=>I.text).join("").replace(/^const __outputValue:\s*/,"");return $(_)}else return null}catch(c){return t.setValue(r),console.error("Error getting return type:",c),null}}function $(e){if(e=e.trim(),e==="string")return{type:"string"};if(e==="number")return{type:"number"};if(e==="boolean")return{type:"boolean"};if(e==="null")return{type:"null"};if(e==="undefined")return{type:"null"};if(e==="unknown"||e==="any")return{};if(e==="never")return{not:{}};if(e.endsWith("[]")){const n=e.slice(0,-2);return{type:"array",items:$(n)}}const t=e.match(/^Array<(.+)>$/);if(t&&t[1])return{type:"array",items:$(t[1])};const r=e.match(/^Record<(.+),\s*(.+)>$/);if(r&&r[2])return{type:"object",additionalProperties:$(r[2].trim())};if(e.includes("|")){const n=$t(e);if(n.length>1)return n.every(i=>/^["']/.test(i.trim()))?{type:"string",enum:n.map(i=>i.trim().replace(/^["']|["']$/g,""))}:{anyOf:n.map(i=>$(i.trim()))}}return/^["'].*["']$/.test(e)?{type:"string",const:e.slice(1,-1)}:/^-?\d+(\.\d+)?$/.test(e)?{type:"number",const:parseFloat(e)}:e.startsWith("{")&&e.endsWith("}")?Nt(e):{description:`TypeScript type: ${e}`}}function $t(e){const t=[];let r=0,n="";for(let o=0;o<e.length;o++){const i=e[o];if(i==="{"||i==="<"||i==="("||i==="[")r++;else if(i==="}"||i===">"||i===")"||i==="]")r--;else if(i==="|"&&r===0){t.push(n.trim()),n="";continue}n+=i}return n.trim()&&t.push(n.trim()),t}function Nt(e){const t=e.slice(1,-1).trim();if(!t)return{type:"object",properties:{}};const r={},n=[];let o=0,i="";for(let l=0;l<t.length;l++){const c=t[l];if(c==="{"||c==="<"||c==="("||c==="[")o++;else if(c==="}"||c===">"||c===")"||c==="]")o--;else if(c===";"&&o===0){i.trim()&&pe(i.trim(),r,n),i="";continue}i+=c}i.trim()&&pe(i.trim(),r,n);const u={type:"object",properties:r};return n.length>0&&(u.required=n),u}function pe(e,t,r){const n=e.match(/^(\w+)(\?)?:\s*(.+)$/s);if(n){const o=n[1],i=n[2],u=n[3];o&&u&&(t[o]=$(u.trim()),i||r.push(o))}}class Dt extends a.Component{constructor(t){super(t),this.state={hasError:!1,mountKey:0}}static getDerivedStateFromError(t){if(t.message?.includes("InstantiationService has been disposed"))return{hasError:!0};throw t}componentDidCatch(t){t.message?.includes("InstantiationService has been disposed")&&this.setState(r=>({hasError:!1,mountKey:r.mountKey+1}))}render(){return this.state.hasError?T.jsx("div",{className:"flex items-center justify-center h-full w-full bg-[#1e1e1e] text-gray-400",children:T.jsx(me,{size:"sm"})}):a.cloneElement(this.props.children,{mountKey:this.state.mountKey})}}let J=null;const zt=async()=>{if(J)return J;const[e,t,r]=await Promise.all([te(()=>import("./standalone-DS4gw9AE.js"),[]),te(()=>import("./typescript-Ca_eWjgL.js"),[]),te(()=>import("./estree-CwOGYdhi.js"),[])]);return J={format:e.format,plugins:[t.default,r.default]},J};Y.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});const kt={parser:"typescript",semi:!0,singleQuote:!1,tabWidth:2,trailingComma:"es5",printWidth:80},ge={fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,stickyScroll:{enabled:!1},wordWrap:"on",folding:!0,bracketPairColorization:{enabled:!0},suggestOnTriggerCharacters:!0,quickSuggestions:{other:!0,comments:!1,strings:!0},minimap:{enabled:!1},parameterHints:{enabled:!0},inlineSuggest:{enabled:!0},autoClosingBrackets:"always",autoClosingQuotes:"always",autoSurround:"languageDefined",padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8},theme:"light"},Kt=T.jsx("div",{className:"flex items-center justify-center h-full w-full text-gray-400",children:T.jsx(me,{size:"sm"})}),Wt=a.memo(function({code:t,onChange:r,onSave:n,readOnly:o=!1,height:i=300,language:u="typescript",foldOnMount:l=!1,mountKey:c=0}){const g=a.useRef(null),O=a.useRef(null),j=a.useRef(n);j.current=n;const R=a.useRef(u);R.current=u;const S=a.useId(),_=`${S}-${c}`,L=u==="typescript"?`file:///workflow-${S.replace(/:/g,"-")}-${c}.tsx`:void 0,I=o?{...ge,readOnly:!0}:ge,D=async b=>{const h=b.getModel();if(!h){console.warn("No model found");return}const d=h.getValue();if(R.current==="json"){try{const f=JSON.parse(d),P=JSON.stringify(f,null,2);if(P!==d){const m=h.getFullModelRange();b.executeEdits("json-format",[{range:m,text:P}])}}catch(f){console.error("JSON formatting failed:",f)}return}try{const{format:f,plugins:P}=await zt(),m=await f(d,{...kt,plugins:P});if(m!==d){const s=h.getFullModelRange();b.executeEdits("prettier",[{range:s,text:m}])}}catch(f){console.error("Prettier formatting failed:",f)}},y=async(b,h)=>{g.current=b,l&&O.current&&(O.current.style.visibility="hidden",await b.getAction("editor.foldLevel2")?.run(),O.current.style.visibility="visible"),u==="typescript"&&(h.languages.typescript.typescriptDefaults.setCompilerOptions({target:h.languages.typescript.ScriptTarget.ESNext,module:h.languages.typescript.ModuleKind.ESNext,moduleResolution:h.languages.typescript.ModuleResolutionKind.NodeJs,allowNonTsExtensions:!0,allowJs:!0,strict:!1,noEmit:!0,esModuleInterop:!0,jsx:h.languages.typescript.JsxEmit.React,allowSyntheticDefaultImports:!0}),h.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1})),b.addCommand(h.KeyMod.CtrlCmd|h.KeyCode.KeyS,async()=>{await D(b);const d=await At(b),v=b.getValue();j.current?.(v,d)})};return T.jsx("div",{ref:O,className:"h-full",children:T.jsx(Vt,{height:i,language:u,value:t,path:L,onChange:r,onMount:y,loading:Kt,options:I},_)})}),Ht=a.memo(function(t){const r=Me.c(2);let n;return r[0]!==t?(n=T.jsx(Dt,{children:T.jsx(Wt,{...t})}),r[0]=t,r[1]=n):n=r[1],n});export{Ht as M,Pe as n};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as m,c6 as We,bI as sn,cg as on,c as Q,v as Ne,j as n,E as Wt,u as Ze,n as ln,b as qt,m as cn,K as nt,B as ge,t as Ot,O as aa,a as un}from"./index-BNIkrm6G.js";import{E as Vt,C as dn}from"./collection-search-DlbpDorz.js";import{P as pe}from"./index-tkyKZw4C.js";import{B as mn,a as fn,b as pn,c as vn}from"./breadcrumb-CPeEcD6G.js";import{E as hn,d as gn,e as tr,b as xn,M as yn,T as bn,p as Qe,s as ze,a as rr}from"./time-range-picker-DUQABsm3.js";import{I as st}from"./integration-icon-CeszwaXj.js";import{B as it}from"./badge-D1wMupdZ.js";import{t as At}from"./ChevronDown-Bg73DXow.js";import{i as jn}from"./ChevronRight-DRs99ZRM.js";import{c as me,b as Et,d as Pn,e as Nn,a as wn,T as he}from"./table-DG0Ccg1P.js";import{ar as On,as as Je,a2 as Ae,i as He,at as na,r as qe,V as ht,au as sa,X as gt,av as V,Y as H,aw as Ke,ax as ot,ay as lt,az as ke,aA as ar,O as Ee,a3 as Sn,a8 as Ht,aB as In,aC as kn,aD as Cn,aE as An,_ as Fe,a5 as Tt,w as En,l as ue,m as Ie,aF as Tn,p as we,v as Oe,z as Gt,x as Mn,y as ct,B as ia,D as xt,c as yt,R as oa,S as la,C as ca,F as bt,G as ua,H as da,K as ma,L as Dn,I as fa,d as Ge,M as _n,N as Ln,Z as jt,P as pa,Q as $n,T as Pt,U as nr,a0 as va,a1 as ha,k as ga,a4 as Bn,aG as Rn,ac as zn,n as Kn,q as Te,t as Me,aH as xa,aI as Fn,aJ as Wn,A as sr,aK as qn,aL as ir,E as Vn,aM as Hn,aN as ya,aO as Gn,aP as ba,aQ as Un,aR as Zn,aS as or,aT as Yn,$ as Xn,al as ja,am as Pa,ap as Na,aq as Qn,an as wa,ao as Jn}from"./chart-CePwiD6C.js";import{u as Ut,a as Zt,W as es}from"./constants-D9z7KLT0.js";import{i as ts}from"./DotsVertical-wBJiPiID.js";import{i as rs}from"./Edit05-BlPDSx-D.js";import{s as Oa}from"./Plus-DsR_tCw6.js";import{s as Sa}from"./Trash01-DguMAIMc.js";import{C as as}from"./connection-card-CuiBybbu.js";import{D as ns,a as ss,b as is,c as lr}from"./dropdown-menu-BgBG09R8.js";import{f as os,a as ls,b as cs,c as us,d as ds,e as ms,A as fs,h as ps}from"./alert-dialog-BhMLiL-f.js";import{u as vs}from"./use-members-CIQm_Yf7.js";import{u as hs}from"./useSuspenseInfiniteQuery-BZiNplHQ.js";import{b as Ia}from"./use-connection-S2z7Q5et.js";import{b as gs}from"./use-virtual-mcp-DSZQ8c22.js";import{i as xs}from"./Code01-B29dV-Q_.js";import{n as Mt}from"./Container-CyA59Hr6.js";import{i as ys}from"./FilterLines-BTbHqZen.js";import{c as bs}from"./Grid01-BQYqnEYC.js";import{I as St}from"./input-zk6YM9m6.js";import{C as cr}from"./checkbox-BGURGdsV.js";import{c as js,d as Ps,e as ur,a as Ns,C as ws,b as Os}from"./command-C1rA8jXR.js";import{b as ka,P as Ca,a as Aa}from"./popover-CduEmtfy.js";import{S as dr,a as mr,b as fr,c as pr,d as et}from"./select-DQG_vrnx.js";import{T as Ss}from"./textarea-PZYb3mIe.js";import{T as Is,a as ks,b as Cs}from"./tooltip-SIeQn5OB.js";import{C as As}from"./collection-tabs-NRO8Oupc.js";import{S as Es}from"./switch-BjLeXd0d.js";import{L as Ts}from"./label-CidthTOJ.js";import{u as Ms}from"./use-mcp-tools-CcnxeAhu.js";import"./Loading01-Dq2MI--a.js";import"./SearchMd-BRAsA5px.js";import"./localstorage-keys-bVpFjoCT.js";import"./useQuery--kTTZKx2.js";import"./useMutation-DNeCNjWQ.js";import"./Check-mUIvZly8.js";import"./Copy01-CcfQ05L8.js";import"./Download01-B9PmZJO4.js";import"./Key01-DBn2vDdE.js";import"./Play-BZhRn6tE.js";import"./monaco-editor-BwTwH0Rs.js";import"./spinner-DbhNddF6.js";import"./scroll-area-CCiZyPKr.js";import"./Clock-BCvCAc7i.js";import"./ChevronLeft-84BO6HEd.js";import"./index-BeacagIZ.js";import"./card-BoG6OSo4.js";import"./infiniteQueryObserver-DRvaqcVN.js";import"./use-collections-D0eAqnRh.js";import"./index-CLbGZ73s.js";import"./index-DCZ5uiBS.js";const Dt=({size:t=24,color:e="currentColor",...r})=>m.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},m.createElement("path",{d:"M21 21H6.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C3 19.48 3 18.92 3 17.8V3m4 7.5v7m4.5-12v12m4.5-7v7m4.5-12v12"}));Dt.displayName="BarChart07";const Ea=({size:t=24,color:e="currentColor",...r})=>m.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},m.createElement("path",{d:"M9.5 15V9m5 6V9m7.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Ea.displayName="PauseCircle";const Ta=({size:t=24,color:e="currentColor",...r})=>m.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},m.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}),m.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}));Ta.displayName="PlayCircle";const Ma=Math.cos,ut=Math.sin,de=Math.sqrt,dt=Math.PI,Nt=2*dt,Yt={draw(t,e){const r=de(e/dt);t.moveTo(r,0),t.arc(0,0,r,0,Nt)}},Ds={draw(t,e){const r=de(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Da=de(1/3),_s=Da*2,Ls={draw(t,e){const r=de(e/_s),a=r*Da;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},$s={draw(t,e){const r=de(e),a=-r/2;t.rect(a,a,r,r)}},Bs=.8908130915292852,_a=ut(dt/10)/ut(7*dt/10),Rs=ut(Nt/10)*_a,zs=-Ma(Nt/10)*_a,Ks={draw(t,e){const r=de(e*Bs),a=Rs*r,i=zs*r;t.moveTo(0,-r),t.lineTo(a,i);for(let s=1;s<5;++s){const o=Nt*s/5,l=Ma(o),c=ut(o);t.lineTo(c*r,-l*r),t.lineTo(l*a-c*i,c*a+l*i)}t.closePath()}},It=de(3),Fs={draw(t,e){const r=-de(e/(It*3));t.moveTo(0,r*2),t.lineTo(-It*r,-r),t.lineTo(It*r,-r),t.closePath()}},ne=-.5,se=de(3)/2,_t=1/de(12),Ws=(_t/2+1)*3,qs={draw(t,e){const r=de(e/Ws),a=r/2,i=r*_t,s=a,o=r*_t+r,l=-s,c=o;t.moveTo(a,i),t.lineTo(s,o),t.lineTo(l,c),t.lineTo(ne*a-se*i,se*a+ne*i),t.lineTo(ne*s-se*o,se*s+ne*o),t.lineTo(ne*l-se*c,se*l+ne*c),t.lineTo(ne*a+se*i,ne*i-se*a),t.lineTo(ne*s+se*o,ne*o-se*s),t.lineTo(ne*l+se*c,ne*c-se*l),t.closePath()}};function Vs(t,e){let r=null,a=On(i);t=typeof t=="function"?t:Je(t||Yt),e=typeof e=="function"?e:Je(e===void 0?64:+e);function i(){let s;if(r||(r=s=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),s)return r=null,s+""||null}return i.type=function(s){return arguments.length?(t=typeof s=="function"?s:Je(s),i):t},i.size=function(s){return arguments.length?(e=typeof s=="function"?s:Je(+s),i):e},i.context=function(s){return arguments.length?(r=s??null,i):r},i}var Hs=["type","size","sizeType"];function Lt(){return Lt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Lt.apply(null,arguments)}function vr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,a)}return r}function hr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vr(Object(r),!0).forEach(function(a){Gs(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Gs(t,e,r){return(e=Us(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Us(t){var e=Zs(t,"string");return typeof e=="symbol"?e:e+""}function Zs(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ys(t,e){if(t==null)return{};var r,a,i=Xs(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(a=0;a<s.length;a++)r=s[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function Xs(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var La={symbolCircle:Yt,symbolCross:Ds,symbolDiamond:Ls,symbolSquare:$s,symbolStar:Ks,symbolTriangle:Fs,symbolWye:qs},Qs=Math.PI/180,Js=t=>{var e="symbol".concat(na(t));return La[e]||Yt},ei=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*Qs;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},ti=(t,e)=>{La["symbol".concat(na(t))]=e},$a=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,i=Ys(t,Hs),s=hr(hr({},i),{},{type:e,size:r,sizeType:a}),o="circle";typeof e=="string"&&(o=e);var l=()=>{var f=Js(o),g=Vs().type(f).size(ei(r,a,o)),y=g();if(y!==null)return y},{className:c,cx:u,cy:d}=s,v=Ae(s);return He(u)&&He(d)&&He(r)?m.createElement("path",Lt({},v,{className:We("recharts-symbols",c),transform:"translate(".concat(u,", ").concat(d,")"),d:l()})):null};$a.registerSymbol=ti;var ri=["radius"],ai=["radius"],gr,xr,yr,br,jr,Pr,Nr,wr,Or,Sr;function Ir(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,a)}return r}function kr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ir(Object(r),!0).forEach(function(a){ni(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ir(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function ni(t,e,r){return(e=si(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function si(t){var e=ii(t,"string");return typeof e=="symbol"?e:e+""}function ii(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mt(){return mt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},mt.apply(null,arguments)}function Cr(t,e){if(t==null)return{};var r,a,i=oi(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(a=0;a<s.length;a++)r=s[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function oi(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function fe(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Ar=(t,e,r,a,i)=>{var s=Ke(r),o=Ke(a),l=Math.min(Math.abs(s)/2,Math.abs(o)/2),c=o>=0?1:-1,u=s>=0?1:-1,d=o>=0&&s>=0||o<0&&s<0?1:0,v;if(l>0&&Array.isArray(i)){for(var f=[0,0,0,0],g=0,y=4;g<y;g++){var x,b=(x=i[g])!==null&&x!==void 0?x:0;f[g]=b>l?l:b}v=V(gr||(gr=fe(["M",",",""])),t,e+c*f[0]),f[0]>0&&(v+=V(xr||(xr=fe(["A ",",",",0,0,",",",",",""])),f[0],f[0],d,t+u*f[0],e)),v+=V(yr||(yr=fe(["L ",",",""])),t+r-u*f[1],e),f[1]>0&&(v+=V(br||(br=fe(["A ",",",",0,0,",`,
|
|
1
|
+
import{r as m,c5 as We,bH as sn,cf as on,c as Q,v as Ne,j as n,E as Wt,u as Ze,n as ln,b as qt,m as cn,K as nt,B as ge,t as Ot,O as aa,a as un}from"./index-DcA4vgYb.js";import{E as Vt,C as dn}from"./collection-search-DdGB2-83.js";import{P as pe}from"./index-CpVmTHFl.js";import{B as mn,a as fn,b as pn,c as vn}from"./breadcrumb-gOyjPPGL.js";import{E as hn,d as gn,e as tr,b as xn,M as yn,T as bn,p as Qe,s as ze,a as rr}from"./time-range-picker-bzaKWNvH.js";import{I as st}from"./integration-icon-B8yOf85-.js";import{B as it}from"./badge-BaNY-OL6.js";import{t as At}from"./ChevronDown-Dp9wV5PD.js";import{i as jn}from"./ChevronRight-6Ka7FsE_.js";import{c as me,b as Et,d as Pn,e as Nn,a as wn,T as he}from"./table-CO6Nu6e5.js";import{ar as On,as as Je,a2 as Ae,i as He,at as na,r as qe,V as ht,au as sa,X as gt,av as V,Y as H,aw as Ke,ax as ot,ay as lt,az as ke,aA as ar,O as Ee,a3 as Sn,a8 as Ht,aB as In,aC as kn,aD as Cn,aE as An,_ as Fe,a5 as Tt,w as En,l as ue,m as Ie,aF as Tn,p as we,v as Oe,z as Gt,x as Mn,y as ct,B as ia,D as xt,c as yt,R as oa,S as la,C as ca,F as bt,G as ua,H as da,K as ma,L as Dn,I as fa,d as Ge,M as _n,N as Ln,Z as jt,P as pa,Q as $n,T as Pt,U as nr,a0 as va,a1 as ha,k as ga,a4 as Bn,aG as Rn,ac as zn,n as Kn,q as Te,t as Me,aH as xa,aI as Fn,aJ as Wn,A as sr,aK as qn,aL as ir,E as Vn,aM as Hn,aN as ya,aO as Gn,aP as ba,aQ as Un,aR as Zn,aS as or,aT as Yn,$ as Xn,al as ja,am as Pa,ap as Na,aq as Qn,an as wa,ao as Jn}from"./chart-D-lRBuDk.js";import{u as Ut,a as Zt,W as es}from"./constants-w3KRiYJo.js";import{i as ts}from"./DotsVertical-ClwDdvIe.js";import{i as rs}from"./Edit05-ersxMaKv.js";import{s as Oa}from"./Plus-C1MNvAXK.js";import{s as Sa}from"./Trash01-DvB3pKWW.js";import{C as as}from"./connection-card-cqIoA2EJ.js";import{D as ns,a as ss,b as is,c as lr}from"./dropdown-menu-D2rSYXT0.js";import{f as os,a as ls,b as cs,c as us,d as ds,e as ms,A as fs,h as ps}from"./alert-dialog-BQq-kgnK.js";import{u as vs}from"./use-members-CcrBc1CP.js";import{u as hs}from"./useSuspenseInfiniteQuery-Dm0CBTiz.js";import{b as Ia}from"./use-connection-C9-04knk.js";import{b as gs}from"./use-virtual-mcp-CQ2Ty1y5.js";import{i as xs}from"./Code01-HNFEPIid.js";import{n as Mt}from"./Container-DlkaR-ky.js";import{i as ys}from"./FilterLines-B8bnzNry.js";import{c as bs}from"./Grid01-CL8bDW_D.js";import{I as St}from"./input-D7fS8yTo.js";import{C as cr}from"./checkbox-ThaJpOaj.js";import{c as js,d as Ps,e as ur,a as Ns,C as ws,b as Os}from"./command-aOEV7pTP.js";import{b as ka,P as Ca,a as Aa}from"./popover-CFtuZWTF.js";import{S as dr,a as mr,b as fr,c as pr,d as et}from"./select-BRkHXmU6.js";import{T as Ss}from"./textarea-BtPDboXP.js";import{T as Is,a as ks,b as Cs}from"./tooltip-DUANF8DJ.js";import{C as As}from"./collection-tabs-B3XEslmM.js";import{S as Es}from"./switch-DvIqv_t1.js";import{L as Ts}from"./label-lJUQWqvH.js";import{u as Ms}from"./use-mcp-tools-ADnBZWN7.js";import"./Loading01-BhNIqpDS.js";import"./SearchMd-5eCpIbcV.js";import"./localstorage-keys-BIium7Ac.js";import"./useQuery-Dai3ahZF.js";import"./useMutation-DIe-HSDV.js";import"./Check-DM0R80Lx.js";import"./Copy01-CTK5kHSt.js";import"./Download01-DkiE27--.js";import"./Key01-DyGpqOc7.js";import"./Play-B7GZ81pz.js";import"./monaco-editor-CMsnbBtp.js";import"./spinner-BFdPnmxp.js";import"./scroll-area-RURkKeyT.js";import"./Clock-kspY5z1L.js";import"./ChevronLeft-urjZe_Dn.js";import"./index-DZwB81XR.js";import"./card-yIedF24A.js";import"./infiniteQueryObserver-UxwYssQv.js";import"./use-collections-CpcuwtcR.js";import"./index-BzG28ER4.js";import"./index-D_NXq9UK.js";const Dt=({size:t=24,color:e="currentColor",...r})=>m.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},m.createElement("path",{d:"M21 21H6.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C3 19.48 3 18.92 3 17.8V3m4 7.5v7m4.5-12v12m4.5-7v7m4.5-12v12"}));Dt.displayName="BarChart07";const Ea=({size:t=24,color:e="currentColor",...r})=>m.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},m.createElement("path",{d:"M9.5 15V9m5 6V9m7.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Ea.displayName="PauseCircle";const Ta=({size:t=24,color:e="currentColor",...r})=>m.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},m.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}),m.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}));Ta.displayName="PlayCircle";const Ma=Math.cos,ut=Math.sin,de=Math.sqrt,dt=Math.PI,Nt=2*dt,Yt={draw(t,e){const r=de(e/dt);t.moveTo(r,0),t.arc(0,0,r,0,Nt)}},Ds={draw(t,e){const r=de(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Da=de(1/3),_s=Da*2,Ls={draw(t,e){const r=de(e/_s),a=r*Da;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},$s={draw(t,e){const r=de(e),a=-r/2;t.rect(a,a,r,r)}},Bs=.8908130915292852,_a=ut(dt/10)/ut(7*dt/10),Rs=ut(Nt/10)*_a,zs=-Ma(Nt/10)*_a,Ks={draw(t,e){const r=de(e*Bs),a=Rs*r,i=zs*r;t.moveTo(0,-r),t.lineTo(a,i);for(let s=1;s<5;++s){const o=Nt*s/5,l=Ma(o),c=ut(o);t.lineTo(c*r,-l*r),t.lineTo(l*a-c*i,c*a+l*i)}t.closePath()}},It=de(3),Fs={draw(t,e){const r=-de(e/(It*3));t.moveTo(0,r*2),t.lineTo(-It*r,-r),t.lineTo(It*r,-r),t.closePath()}},ne=-.5,se=de(3)/2,_t=1/de(12),Ws=(_t/2+1)*3,qs={draw(t,e){const r=de(e/Ws),a=r/2,i=r*_t,s=a,o=r*_t+r,l=-s,c=o;t.moveTo(a,i),t.lineTo(s,o),t.lineTo(l,c),t.lineTo(ne*a-se*i,se*a+ne*i),t.lineTo(ne*s-se*o,se*s+ne*o),t.lineTo(ne*l-se*c,se*l+ne*c),t.lineTo(ne*a+se*i,ne*i-se*a),t.lineTo(ne*s+se*o,ne*o-se*s),t.lineTo(ne*l+se*c,ne*c-se*l),t.closePath()}};function Vs(t,e){let r=null,a=On(i);t=typeof t=="function"?t:Je(t||Yt),e=typeof e=="function"?e:Je(e===void 0?64:+e);function i(){let s;if(r||(r=s=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),s)return r=null,s+""||null}return i.type=function(s){return arguments.length?(t=typeof s=="function"?s:Je(s),i):t},i.size=function(s){return arguments.length?(e=typeof s=="function"?s:Je(+s),i):e},i.context=function(s){return arguments.length?(r=s??null,i):r},i}var Hs=["type","size","sizeType"];function Lt(){return Lt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Lt.apply(null,arguments)}function vr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,a)}return r}function hr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vr(Object(r),!0).forEach(function(a){Gs(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Gs(t,e,r){return(e=Us(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Us(t){var e=Zs(t,"string");return typeof e=="symbol"?e:e+""}function Zs(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ys(t,e){if(t==null)return{};var r,a,i=Xs(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(a=0;a<s.length;a++)r=s[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function Xs(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var La={symbolCircle:Yt,symbolCross:Ds,symbolDiamond:Ls,symbolSquare:$s,symbolStar:Ks,symbolTriangle:Fs,symbolWye:qs},Qs=Math.PI/180,Js=t=>{var e="symbol".concat(na(t));return La[e]||Yt},ei=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*Qs;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},ti=(t,e)=>{La["symbol".concat(na(t))]=e},$a=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,i=Ys(t,Hs),s=hr(hr({},i),{},{type:e,size:r,sizeType:a}),o="circle";typeof e=="string"&&(o=e);var l=()=>{var f=Js(o),g=Vs().type(f).size(ei(r,a,o)),y=g();if(y!==null)return y},{className:c,cx:u,cy:d}=s,v=Ae(s);return He(u)&&He(d)&&He(r)?m.createElement("path",Lt({},v,{className:We("recharts-symbols",c),transform:"translate(".concat(u,", ").concat(d,")"),d:l()})):null};$a.registerSymbol=ti;var ri=["radius"],ai=["radius"],gr,xr,yr,br,jr,Pr,Nr,wr,Or,Sr;function Ir(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,a)}return r}function kr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ir(Object(r),!0).forEach(function(a){ni(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ir(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function ni(t,e,r){return(e=si(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function si(t){var e=ii(t,"string");return typeof e=="symbol"?e:e+""}function ii(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mt(){return mt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},mt.apply(null,arguments)}function Cr(t,e){if(t==null)return{};var r,a,i=oi(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(a=0;a<s.length;a++)r=s[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function oi(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function fe(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Ar=(t,e,r,a,i)=>{var s=Ke(r),o=Ke(a),l=Math.min(Math.abs(s)/2,Math.abs(o)/2),c=o>=0?1:-1,u=s>=0?1:-1,d=o>=0&&s>=0||o<0&&s<0?1:0,v;if(l>0&&Array.isArray(i)){for(var f=[0,0,0,0],g=0,y=4;g<y;g++){var x,b=(x=i[g])!==null&&x!==void 0?x:0;f[g]=b>l?l:b}v=V(gr||(gr=fe(["M",",",""])),t,e+c*f[0]),f[0]>0&&(v+=V(xr||(xr=fe(["A ",",",",0,0,",",",",",""])),f[0],f[0],d,t+u*f[0],e)),v+=V(yr||(yr=fe(["L ",",",""])),t+r-u*f[1],e),f[1]>0&&(v+=V(br||(br=fe(["A ",",",",0,0,",`,
|
|
2
2
|
`,",",""])),f[1],f[1],d,t+r,e+c*f[1])),v+=V(jr||(jr=fe(["L ",",",""])),t+r,e+a-c*f[2]),f[2]>0&&(v+=V(Pr||(Pr=fe(["A ",",",",0,0,",`,
|
|
3
3
|
`,",",""])),f[2],f[2],d,t+r-u*f[2],e+a)),v+=V(Nr||(Nr=fe(["L ",",",""])),t+u*f[3],e+a),f[3]>0&&(v+=V(wr||(wr=fe(["A ",",",",0,0,",`,
|
|
4
4
|
`,",",""])),f[3],f[3],d,t,e+a-c*f[3])),v+="Z"}else if(l>0&&i===+i&&i>0){var h=Math.min(l,i);v=V(Or||(Or=fe(["M ",",",`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as C,c as we,e as Be,j as t,a2 as Fe,E as Te,u as Ee,n as Me,m as Re,K as ve,at as ze,B as re,t as pe}from"./index-BNIkrm6G.js";import{b as Oe}from"./use-connection-S2z7Q5et.js";import{u as $e,a as Ae}from"./constants-D9z7KLT0.js";import{I as le}from"./input-zk6YM9m6.js";import{I as ke}from"./integration-icon-CeszwaXj.js";import{C as We}from"./checkbox-BGURGdsV.js";import{a as Le,b as Ve,P as Ue}from"./popover-CduEmtfy.js";import{i as Ge}from"./AlignLeft-wEQoHPG1.js";import{t as Ie}from"./ChevronDown-Bg73DXow.js";import{S as je,a as be,b as ye,c as Ne,d as w,n as Ke}from"./select-DQG_vrnx.js";import{s as qe}from"./Hash02-wCa1AmTg.js";import{i as He}from"./Play-BZhRn6tE.js";import{s as Qe}from"./Plus-DsR_tCw6.js";import{s as Je}from"./Trash01-DguMAIMc.js";import{T as Ye,a as Se}from"./toggle-group-UZnbG_0x.js";import{a as Ze,V as Xe}from"./layout-Ccv_jHcv.js";import{S as et}from"./save-actions-CX-DFtVd.js";import{B as tt,a as st,b as Pe,d as rt,e as lt,c as at}from"./breadcrumb-CPeEcD6G.js";import"./use-collections-D0eAqnRh.js";import"./useMutation-DNeCNjWQ.js";import"./Container-CyA59Hr6.js";import"./Check-mUIvZly8.js";import"./index-DCZ5uiBS.js";import"./index-tkyKZw4C.js";import"./localstorage-keys-bVpFjoCT.js";import"./useQuery--kTTZKx2.js";import"./tooltip-SIeQn5OB.js";import"./Save01-DMr5Mydt.js";import"./Loading01-Dq2MI--a.js";import"./ChevronRight-DRs99ZRM.js";const _e=({size:l=24,color:e="currentColor",...s})=>C.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},C.createElement("path",{d:"M8 15v2m4-6v6m4-10v10m-8.2 4h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.72 21 17.88 21 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 3 17.88 3 16.2 3H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21Z"}));_e.displayName="BarChartSquare02";function De(l){return{id:l.id,name:l.name,type:l.type,sourcePath:l.source.path,sourceFrom:l.source.from,aggregationFn:l.aggregation.fn,groupBy:l.aggregation.groupBy||"",interval:l.aggregation.interval||""}}function it(l){return{id:l.id,name:l.name,type:l.type,source:{path:l.sourcePath,from:l.sourceFrom},aggregation:{fn:l.aggregationFn,groupBy:l.type==="table"&&l.groupBy?l.groupBy:void 0,interval:l.type==="timeseries"&&l.interval?l.interval:void 0}}}const Ce={id:crypto.randomUUID(),name:"",type:"metric",sourcePath:"$.usage.total_tokens",sourceFrom:"output",aggregationFn:"sum",groupBy:"",interval:""};function nt(l){const e=we.c(36),{result:s,widget:o}=l;if(s.error){let i;return e[0]!==s.error?(i=t.jsx("div",{className:"text-sm text-destructive bg-destructive/10 rounded p-3",children:s.error}),e[0]=s.error,e[1]=i):i=e[1],i}if(o.type==="metric"){const i=s.value??0;let d;e[2]!==i?(d=i>=1e6?`${(i/1e6).toFixed(2)}M`:i>=1e3?`${(i/1e3).toFixed(2)}K`:typeof i=="number"?i.toFixed(2):String(i),e[2]=i,e[3]=d):d=e[3];const c=d;let m;e[4]!==c?(m=t.jsx("div",{className:"text-3xl font-bold tabular-nums",children:c}),e[4]=c,e[5]=m):m=e[5];const x=s.matchedRecords??0;let h;e[6]!==x?(h=t.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[x," records matched"]}),e[6]=x,e[7]=h):h=e[7];let f;return e[8]!==m||e[9]!==h?(f=t.jsxs("div",{className:"text-center py-4",children:[m,h]}),e[8]=m,e[9]=h,e[10]=f):f=e[10],f}if(o.type==="table"&&s.groups){let i;e[11]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("thead",{className:"bg-muted/50 sticky top-0",children:t.jsxs("tr",{children:[t.jsx("th",{className:"text-left px-3 py-1.5 text-xs font-medium",children:"Key"}),t.jsx("th",{className:"text-right px-3 py-1.5 text-xs font-medium",children:"Value"})]})}),e[11]=i):i=e[11];let d;e[12]!==s.groups?(d=s.groups.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:2,className:"px-3 py-4 text-center text-muted-foreground text-xs",children:"No data"})}):s.groups.slice(0,10).map(ct),e[12]=s.groups,e[13]=d):d=e[13];let c;e[14]!==d?(c=t.jsxs("table",{className:"w-full text-sm",children:[i,t.jsx("tbody",{children:d})]}),e[14]=d,e[15]=c):c=e[15];let m;e[16]!==s.groups.length?(m=s.groups.length>10&&t.jsxs("div",{className:"text-xs text-muted-foreground text-center py-2",children:["+",s.groups.length-10," more rows"]}),e[16]=s.groups.length,e[17]=m):m=e[17];let x;return e[18]!==c||e[19]!==m?(x=t.jsxs("div",{className:"max-h-[200px] overflow-auto",children:[c,m]}),e[18]=c,e[19]=m,e[20]=x):x=e[20],x}if(o.type==="timeseries"&&s.timeseries){let i;e[21]!==s.timeseries?(i=Math.max(...s.timeseries.map(ot),1),e[21]=s.timeseries,e[22]=i):i=e[22];const d=i;let c;if(e[23]!==d||e[24]!==s.timeseries){let f;e[26]!==d?(f=(u,N)=>t.jsx("div",{className:"flex-1 bg-primary/80 rounded-t",style:{height:`${u.value/d*100}%`,minHeight:u.value>0?"2px":"0px"},title:`${new Date(u.timestamp).toLocaleString()}: ${u.value}`},N),e[26]=d,e[27]=f):f=e[27],c=s.timeseries.slice(-24).map(f),e[23]=d,e[24]=s.timeseries,e[25]=c}else c=e[25];let m;e[28]!==c?(m=t.jsx("div",{className:"flex items-end gap-0.5 h-[80px]",children:c}),e[28]=c,e[29]=m):m=e[29];let x;e[30]!==s.timeseries.length?(x=t.jsxs("div",{className:"text-xs text-muted-foreground text-center mt-2",children:[s.timeseries.length," data points"]}),e[30]=s.timeseries.length,e[31]=x):x=e[31];let h;return e[32]!==m||e[33]!==x?(h=t.jsxs("div",{className:"py-2",children:[m,x]}),e[32]=m,e[33]=x,e[34]=h):h=e[34],h}let j;return e[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"text-sm text-muted-foreground text-center py-4",children:"No preview data"}),e[35]=j):j=e[35],j}function ot(l){return l.value}function ct(l,e){return t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-3 py-1.5 font-mono text-xs",children:l.key}),t.jsx("td",{className:"px-3 py-1.5 text-right tabular-nums text-xs",children:l.value.toLocaleString()})]},e)}function mt(l){const e=we.c(113),{widget:s,onChange:o,onRemove:j,canRemove:i,onMoveUp:d,onMoveDown:c,canMoveUp:m,canMoveDown:x,onPreview:h,previewResult:f,isPreviewing:u}=l,N=!m;let z;e[0]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(Ke,{size:14}),e[0]=z):z=e[0];let D;e[1]!==d||e[2]!==N?(D=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:d,disabled:N,children:z}),e[1]=d,e[2]=N,e[3]=D):D=e[3];const ae=!x;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ie,{size:14}),e[4]=g):g=e[4];let p;e[5]!==c||e[6]!==ae?(p=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:c,disabled:ae,children:g}),e[5]=c,e[6]=ae,e[7]=p):p=e[7];let k;e[8]!==D||e[9]!==p?(k=t.jsxs("div",{className:"flex items-center gap-0.5",children:[D,p]}),e[8]=D,e[9]=p,e[10]=k):k=e[10];let S;e[11]!==s.type?(S=t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:s.type}),e[11]=s.type,e[12]=S):S=e[12];let F;e[13]!==s.name?(F=s.name&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted-foreground",children:"·"}),t.jsx("span",{className:"text-sm font-medium",children:s.name})]}),e[13]=s.name,e[14]=F):F=e[14];let _;e[15]!==k||e[16]!==S||e[17]!==F?(_=t.jsxs("div",{className:"flex items-center gap-2",children:[k,S,F]}),e[15]=k,e[16]=S,e[17]=F,e[18]=_):_=e[18];let P;e[19]!==u?(P=u?t.jsx(Fe,{size:14,className:"animate-spin"}):t.jsx(He,{size:14}),e[19]=u,e[20]=P):P=e[20];let B;e[21]!==u||e[22]!==h||e[23]!==P?(B=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:h,disabled:u,children:P}),e[21]=u,e[22]=h,e[23]=P,e[24]=B):B=e[24];const O=!i,ie=i?"visible":"hidden";let T;e[25]!==ie?(T={visibility:ie},e[25]=ie,e[26]=T):T=e[26];let $;e[27]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(Je,{size:14}),e[27]=$):$=e[27];let E;e[28]!==j||e[29]!==O||e[30]!==T?(E=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:j,disabled:O,style:T,children:$}),e[28]=j,e[29]=O,e[30]=T,e[31]=E):E=e[31];let M;e[32]!==B||e[33]!==E?(M=t.jsxs("div",{className:"flex items-center gap-1",children:[B,E]}),e[32]=B,e[33]=E,e[34]=M):M=e[34];let R;e[35]!==_||e[36]!==M?(R=t.jsxs("div",{className:"flex items-center justify-between px-4 h-11 border-b bg-muted/30",children:[_,M]}),e[35]=_,e[36]=M,e[37]=R):R=e[37];let r;e[38]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Widget Name"}),e[38]=r):r=e[38];let a;e[39]!==o||e[40]!==s?(a=b=>o({...s,name:b.target.value}),e[39]=o,e[40]=s,e[41]=a):a=e[41];let n;e[42]!==a||e[43]!==s.name?(n=t.jsxs("div",{children:[r,t.jsx(le,{placeholder:"e.g., Total Tokens",value:s.name,onChange:a})]}),e[42]=a,e[43]=s.name,e[44]=n):n=e[44];let v;e[45]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Type"}),e[45]=v):v=e[45];let y;e[46]!==o||e[47]!==s?(y=b=>{b&&o({...s,type:b,groupBy:b==="table"?s.groupBy:"",interval:b==="timeseries"?s.interval||"1h":""})},e[46]=o,e[47]=s,e[48]=y):y=e[48];let I;e[49]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Se,{value:"metric",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Metric",children:t.jsx(qe,{size:14})}),e[49]=I):I=e[49];let A;e[50]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Se,{value:"timeseries",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Timeseries",children:t.jsx(_e,{size:14})}),e[50]=A):A=e[50];let ne;e[51]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx(Se,{value:"table",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Table",children:t.jsx(Ge,{size:14})}),e[51]=ne):ne=e[51];let W;e[52]!==y||e[53]!==s.type?(W=t.jsxs("div",{children:[v,t.jsxs(Ye,{type:"single",variant:"outline",size:"sm",value:s.type,onValueChange:y,className:"w-full h-10",children:[I,A,ne]})]}),e[52]=y,e[53]=s.type,e[54]=W):W=e[54];let L;e[55]!==n||e[56]!==W?(L=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n,W]}),e[55]=n,e[56]=W,e[57]=L):L=e[57];let oe;e[58]===Symbol.for("react.memo_cache_sentinel")?(oe=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"JSONPath Expression"}),e[58]=oe):oe=e[58];let V;e[59]!==o||e[60]!==s?(V=b=>o({...s,sourcePath:b.target.value}),e[59]=o,e[60]=s,e[61]=V):V=e[61];let U;e[62]!==V||e[63]!==s.sourcePath?(U=t.jsx(le,{placeholder:"$.usage.total_tokens",value:s.sourcePath,onChange:V,className:"font-mono text-sm"}),e[62]=V,e[63]=s.sourcePath,e[64]=U):U=e[64];let G;e[65]!==s.sourceFrom?(G=t.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Path to extract from tool call ",s.sourceFrom]}),e[65]=s.sourceFrom,e[66]=G):G=e[66];let K;e[67]!==U||e[68]!==G?(K=t.jsxs("div",{children:[oe,U,G]}),e[67]=U,e[68]=G,e[69]=K):K=e[69];let ce;e[70]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Extract From"}),e[70]=ce):ce=e[70];let q;e[71]!==o||e[72]!==s?(q=b=>o({...s,sourceFrom:b}),e[71]=o,e[72]=s,e[73]=q):q=e[73];let me;e[74]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(be,{children:t.jsx(ye,{})}),e[74]=me):me=e[74];let de;e[75]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsxs(Ne,{children:[t.jsx(w,{value:"output",children:"Output"}),t.jsx(w,{value:"input",children:"Input"})]}),e[75]=de):de=e[75];let H;e[76]!==q||e[77]!==s.sourceFrom?(H=t.jsxs("div",{children:[ce,t.jsxs(je,{value:s.sourceFrom,onValueChange:q,children:[me,de]})]}),e[76]=q,e[77]=s.sourceFrom,e[78]=H):H=e[78];let ue;e[79]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Aggregation"}),e[79]=ue):ue=e[79];let Q;e[80]!==o||e[81]!==s?(Q=b=>o({...s,aggregationFn:b}),e[80]=o,e[81]=s,e[82]=Q):Q=e[82];let xe;e[83]===Symbol.for("react.memo_cache_sentinel")?(xe=t.jsx(be,{children:t.jsx(ye,{})}),e[83]=xe):xe=e[83];let he;e[84]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsxs(Ne,{children:[t.jsx(w,{value:"sum",children:"Sum"}),t.jsx(w,{value:"avg",children:"Average"}),t.jsx(w,{value:"min",children:"Minimum"}),t.jsx(w,{value:"max",children:"Maximum"}),t.jsx(w,{value:"count",children:"Count"}),t.jsx(w,{value:"last",children:"Last"})]}),e[84]=he):he=e[84];let J;e[85]!==Q||e[86]!==s.aggregationFn?(J=t.jsxs("div",{children:[ue,t.jsxs(je,{value:s.aggregationFn,onValueChange:Q,children:[xe,he]})]}),e[85]=Q,e[86]=s.aggregationFn,e[87]=J):J=e[87];let Y;e[88]!==H||e[89]!==J?(Y=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[H,J]}),e[88]=H,e[89]=J,e[90]=Y):Y=e[90];let Z;e[91]!==o||e[92]!==s?(Z=s.type==="table"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Group By (JSONPath)"}),t.jsx(le,{placeholder:"$.model",value:s.groupBy,onChange:b=>o({...s,groupBy:b.target.value}),className:"font-mono text-sm"})]}),e[91]=o,e[92]=s,e[93]=Z):Z=e[93];let X;e[94]!==o||e[95]!==s?(X=s.type==="timeseries"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Time Interval"}),t.jsxs(je,{value:s.interval||"1h",onValueChange:b=>o({...s,interval:b}),children:[t.jsx(be,{children:t.jsx(ye,{})}),t.jsxs(Ne,{children:[t.jsx(w,{value:"15m",children:"15 minutes"}),t.jsx(w,{value:"1h",children:"1 hour"}),t.jsx(w,{value:"1d",children:"1 day"})]})]})]}),e[94]=o,e[95]=s,e[96]=X):X=e[96];let ee;e[97]!==L||e[98]!==K||e[99]!==Y||e[100]!==Z||e[101]!==X?(ee=t.jsxs("div",{className:"space-y-4",children:[L,K,Y,Z,X]}),e[97]=L,e[98]=K,e[99]=Y,e[100]=Z,e[101]=X,e[102]=ee):ee=e[102];let fe;e[103]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx("div",{className:"px-3 py-2 border-b text-xs font-medium text-muted-foreground",children:"Preview (last 24h)"}),e[103]=fe):fe=e[103];let te;e[104]!==f||e[105]!==s?(te=t.jsxs("div",{className:"border rounded-lg bg-muted/20 flex flex-col",children:[fe,t.jsx("div",{className:"p-3 flex-1 flex items-center justify-center",children:f?t.jsx(nt,{result:f,widget:s}):t.jsx("div",{className:"text-sm text-muted-foreground text-center",children:'Click "Preview" to test your aggregation'})})]}),e[104]=f,e[105]=s,e[106]=te):te=e[106];let se;e[107]!==ee||e[108]!==te?(se=t.jsx("div",{className:"p-4",children:t.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[ee,te]})}),e[107]=ee,e[108]=te,e[109]=se):se=e[109];let ge;return e[110]!==R||e[111]!==se?(ge=t.jsxs("div",{className:"border rounded-lg bg-card overflow-hidden",children:[R,se]}),e[110]=R,e[111]=se,e[112]=ge):ge=e[112],ge}function dt({dashboardId:l}){const{org:e,project:s,locator:o}=Ee(),j=Me(),i=$e({connectionId:Ae,orgId:e.id}),d=Oe(),{data:c}=Re({queryKey:ve.monitoringDashboardDetails(o,l),queryFn:async()=>{if(!i)throw new Error("MCP client not available");const r=await i.callTool({name:"MONITORING_DASHBOARD_GET",arguments:{id:l}});return r.structuredContent??r}}),[m,x]=C.useState(c?.name??""),[h,f]=C.useState(c?.description??""),[u,N]=C.useState(c?.widgets?.map(De)??[{...Ce}]),[z,D]=C.useState(!1),[ae,g]=C.useState(!1),[p,k]=C.useState(c?.filters?.connectionIds??[]),[S,F]=C.useState(c?.filters?.toolNames?.[0]??""),[_,P]=C.useState({}),[B,O]=C.useState(new Set),ie=()=>{N([...u,{...Ce,id:crypto.randomUUID()}]),g(!0)},T=r=>{N(u.filter((a,n)=>n!==r)),g(!0)},$=(r,a)=>{const n=[...u];n[r]=a,N(n),g(!0),P(v=>{const y={...v};return delete y[a.id],y})},E=async r=>{if(i){O(a=>new Set(a).add(r.id));try{const a=new Date,n=new Date(a.getTime()-1440*60*1e3),v={};p.length>0&&(v.connectionIds=p),S.trim()&&(v.toolNames=[S.trim()]);const I=(await i.callTool({name:"MONITORING_WIDGET_PREVIEW",arguments:{widget:{type:r.type,source:{path:r.sourcePath,from:r.sourceFrom},aggregation:{fn:r.aggregationFn,groupBy:r.type==="table"&&r.groupBy?r.groupBy:void 0,interval:r.type==="timeseries"&&r.interval?r.interval:void 0},filter:Object.keys(v).length>0?v:void 0},timeRange:{startDate:n.toISOString(),endDate:a.toISOString()}}})).structuredContent;P(A=>({...A,[r.id]:{value:I?.value,groups:I?.groups,timeseries:I?.timeseries,matchedRecords:I?.matchedRecords??0}}))}catch(a){console.error("Preview failed:",a),P(n=>({...n,[r.id]:{error:"Preview failed. Check your JSONPath expression."}}))}finally{O(a=>{const n=new Set(a);return n.delete(r.id),n})}}},M=async()=>{if(i){if(!m.trim()){pe.error("Please enter a dashboard name");return}if(u.some(r=>!r.name.trim())){pe.error("Please enter a name for all widgets");return}D(!0);try{const r={};p.length>0&&(r.connectionIds=p),S.trim()&&(r.toolNames=[S.trim()]),await i.callTool({name:"MONITORING_DASHBOARD_UPDATE",arguments:{id:l,name:m.trim(),description:h.trim()||null,filters:Object.keys(r).length>0?r:null,widgets:u.map(it)}}),pe.success("Dashboard saved"),g(!1),j.invalidateQueries({queryKey:ve.monitoringDashboards(o)}),j.invalidateQueries({queryKey:ve.monitoringDashboardDetails(o,l)})}catch(r){pe.error("Failed to save dashboard"),console.error(r)}finally{D(!1)}}};if(!c)return t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Dashboard not found"});const R=t.jsx(tt,{children:t.jsxs(st,{children:[t.jsx(Pe,{children:t.jsx(rt,{asChild:!0,children:t.jsx(ze,{to:"/$org/$project/monitoring",params:{org:e.slug,project:s.slug},search:{tab:"dashboards"},children:"Monitoring"})})}),t.jsx(lt,{}),t.jsx(Pe,{children:t.jsxs(at,{children:["Edit ",c.name]})})]})});return t.jsxs(Ze,{breadcrumb:R,children:[t.jsx(Xe,{children:t.jsx(et,{onSave:M,onUndo:()=>{x(c?.name??""),f(c?.description??""),N(c?.widgets?.map(De)??[{...Ce}]),k(c?.filters?.connectionIds??[]),F(c?.filters?.toolNames?.[0]??""),g(!1)},isDirty:ae,isSaving:z})}),t.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:t.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Dashboard Name"}),t.jsx(le,{placeholder:"e.g., LLM Usage Overview",value:m,onChange:r=>{x(r.target.value),g(!0)}})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Description"}),t.jsx(le,{placeholder:"What does this dashboard show?",value:h,onChange:r=>{f(r.target.value),g(!0)}})]})]}),t.jsxs("div",{className:"border rounded-lg p-4 bg-muted/30",children:[t.jsxs("h2",{className:"text-sm font-medium mb-3",children:["Dashboard Filters",t.jsx("span",{className:"text-muted-foreground font-normal ml-2",children:"(applied to all widgets)"})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Servers"}),t.jsxs(Le,{children:[t.jsx(Ve,{asChild:!0,children:t.jsxs(re,{variant:"outline",className:"w-full justify-between font-normal",children:[t.jsx("span",{className:"flex items-center gap-2 truncate",children:p.length===0?t.jsx("span",{className:"text-muted-foreground",children:"All servers"}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"flex items-center -space-x-1",children:p.slice(0,3).map(r=>{const a=(d??[]).find(n=>n.id===r);return a?t.jsx(ke,{icon:a.icon,name:a.title||a.id,size:"xs"},r):null})}),t.jsxs("span",{children:[p.length," server",p.length!==1?"s":""]})]})}),t.jsx(Ie,{size:14,className:"text-muted-foreground shrink-0"})]})}),t.jsxs(Ue,{align:"start",className:"w-72 p-1",children:[t.jsx("div",{className:"max-h-[240px] overflow-y-auto",children:(d??[]).map(r=>{const a=p.includes(r.id);return t.jsxs("button",{type:"button",className:"flex items-center gap-3 w-full rounded-md px-2 py-2 text-sm hover:bg-muted transition-colors",onClick:()=>{k(n=>a?n.filter(v=>v!==r.id):[...n,r.id]),g(!0)},children:[t.jsx(We,{checked:a}),t.jsx(ke,{icon:r.icon,name:r.title||r.id,size:"xs"}),t.jsx("span",{className:"truncate",children:r.title||r.id})]},r.id)})}),p.length>0&&t.jsx("div",{className:"border-t p-1",children:t.jsx("button",{type:"button",className:"w-full text-xs text-muted-foreground hover:text-foreground py-1.5 transition-colors",onClick:()=>{k([]),g(!0)},children:"Clear selection"})})]})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Tool Name Filter"}),t.jsx(le,{placeholder:"e.g., openai_chat",value:S,onChange:r=>{F(r.target.value),g(!0)},className:"font-mono text-sm"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Filter to specific tool names (partial match)"})]})]})]}),t.jsxs("div",{className:"mt-12",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h2",{className:"text-lg font-medium",children:"Widgets"}),t.jsxs(re,{variant:"outline",size:"sm",onClick:ie,children:[t.jsx(Qe,{size:14,className:"mr-1.5"}),"Add Widget"]})]}),t.jsx("div",{className:"space-y-4",children:u.map((r,a)=>t.jsx(mt,{widget:r,onChange:n=>$(a,n),onRemove:()=>T(a),canRemove:u.length>1,onMoveUp:()=>{const n=[...u],v=n[a-1],y=n[a];n[a-1]=y,n[a]=v,N(n),g(!0)},onMoveDown:()=>{const n=[...u],v=n[a],y=n[a+1];n[a]=y,n[a+1]=v,N(n),g(!0)},canMoveUp:a>0,canMoveDown:a<u.length-1,onPreview:()=>E(r),previewResult:_[r.id]??null,isPreviewing:B.has(r.id)},r.id))})]})]})})]})}function Lt(){const l=we.c(5);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},l[0]=e):e=l[0];const{dashboardId:s}=Be(e);let o;l[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboard editor"}),l[1]=o):o=l[1];let j;l[2]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Fe,{size:24,className:"animate-spin text-muted-foreground"})}),l[2]=j):j=l[2];let i;return l[3]!==s?(i=t.jsx(Te,{fallback:o,children:t.jsx(C.Suspense,{fallback:j,children:t.jsx(dt,{dashboardId:s})})}),l[3]=s,l[4]=i):i=l[4],i}export{Lt as default};
|
|
1
|
+
import{r as C,c as we,e as Be,j as t,a2 as Fe,E as Te,u as Ee,n as Me,m as Re,K as ve,at as ze,B as re,t as pe}from"./index-DcA4vgYb.js";import{b as Oe}from"./use-connection-C9-04knk.js";import{u as $e,a as Ae}from"./constants-w3KRiYJo.js";import{I as le}from"./input-D7fS8yTo.js";import{I as ke}from"./integration-icon-B8yOf85-.js";import{C as We}from"./checkbox-ThaJpOaj.js";import{a as Le,b as Ve,P as Ue}from"./popover-CFtuZWTF.js";import{i as Ge}from"./AlignLeft-CYD2I4vb.js";import{t as Ie}from"./ChevronDown-Dp9wV5PD.js";import{S as je,a as be,b as ye,c as Ne,d as w,n as Ke}from"./select-BRkHXmU6.js";import{s as qe}from"./Hash02-Dg3-73Ng.js";import{i as He}from"./Play-B7GZ81pz.js";import{s as Qe}from"./Plus-C1MNvAXK.js";import{s as Je}from"./Trash01-DvB3pKWW.js";import{T as Ye,a as Se}from"./toggle-group-Bl2uuYVW.js";import{a as Ze,V as Xe}from"./layout-CoLAFZKt.js";import{S as et}from"./save-actions-DMCdLEbq.js";import{B as tt,a as st,b as Pe,d as rt,e as lt,c as at}from"./breadcrumb-gOyjPPGL.js";import"./use-collections-CpcuwtcR.js";import"./useMutation-DIe-HSDV.js";import"./Container-DlkaR-ky.js";import"./Check-DM0R80Lx.js";import"./index-D_NXq9UK.js";import"./index-CpVmTHFl.js";import"./localstorage-keys-BIium7Ac.js";import"./useQuery-Dai3ahZF.js";import"./tooltip-DUANF8DJ.js";import"./Save01-DIefNXMY.js";import"./Loading01-BhNIqpDS.js";import"./ChevronRight-6Ka7FsE_.js";const _e=({size:l=24,color:e="currentColor",...s})=>C.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},C.createElement("path",{d:"M8 15v2m4-6v6m4-10v10m-8.2 4h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.72 21 17.88 21 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 3 17.88 3 16.2 3H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21Z"}));_e.displayName="BarChartSquare02";function De(l){return{id:l.id,name:l.name,type:l.type,sourcePath:l.source.path,sourceFrom:l.source.from,aggregationFn:l.aggregation.fn,groupBy:l.aggregation.groupBy||"",interval:l.aggregation.interval||""}}function it(l){return{id:l.id,name:l.name,type:l.type,source:{path:l.sourcePath,from:l.sourceFrom},aggregation:{fn:l.aggregationFn,groupBy:l.type==="table"&&l.groupBy?l.groupBy:void 0,interval:l.type==="timeseries"&&l.interval?l.interval:void 0}}}const Ce={id:crypto.randomUUID(),name:"",type:"metric",sourcePath:"$.usage.total_tokens",sourceFrom:"output",aggregationFn:"sum",groupBy:"",interval:""};function nt(l){const e=we.c(36),{result:s,widget:o}=l;if(s.error){let i;return e[0]!==s.error?(i=t.jsx("div",{className:"text-sm text-destructive bg-destructive/10 rounded p-3",children:s.error}),e[0]=s.error,e[1]=i):i=e[1],i}if(o.type==="metric"){const i=s.value??0;let d;e[2]!==i?(d=i>=1e6?`${(i/1e6).toFixed(2)}M`:i>=1e3?`${(i/1e3).toFixed(2)}K`:typeof i=="number"?i.toFixed(2):String(i),e[2]=i,e[3]=d):d=e[3];const c=d;let m;e[4]!==c?(m=t.jsx("div",{className:"text-3xl font-bold tabular-nums",children:c}),e[4]=c,e[5]=m):m=e[5];const x=s.matchedRecords??0;let h;e[6]!==x?(h=t.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[x," records matched"]}),e[6]=x,e[7]=h):h=e[7];let f;return e[8]!==m||e[9]!==h?(f=t.jsxs("div",{className:"text-center py-4",children:[m,h]}),e[8]=m,e[9]=h,e[10]=f):f=e[10],f}if(o.type==="table"&&s.groups){let i;e[11]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("thead",{className:"bg-muted/50 sticky top-0",children:t.jsxs("tr",{children:[t.jsx("th",{className:"text-left px-3 py-1.5 text-xs font-medium",children:"Key"}),t.jsx("th",{className:"text-right px-3 py-1.5 text-xs font-medium",children:"Value"})]})}),e[11]=i):i=e[11];let d;e[12]!==s.groups?(d=s.groups.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:2,className:"px-3 py-4 text-center text-muted-foreground text-xs",children:"No data"})}):s.groups.slice(0,10).map(ct),e[12]=s.groups,e[13]=d):d=e[13];let c;e[14]!==d?(c=t.jsxs("table",{className:"w-full text-sm",children:[i,t.jsx("tbody",{children:d})]}),e[14]=d,e[15]=c):c=e[15];let m;e[16]!==s.groups.length?(m=s.groups.length>10&&t.jsxs("div",{className:"text-xs text-muted-foreground text-center py-2",children:["+",s.groups.length-10," more rows"]}),e[16]=s.groups.length,e[17]=m):m=e[17];let x;return e[18]!==c||e[19]!==m?(x=t.jsxs("div",{className:"max-h-[200px] overflow-auto",children:[c,m]}),e[18]=c,e[19]=m,e[20]=x):x=e[20],x}if(o.type==="timeseries"&&s.timeseries){let i;e[21]!==s.timeseries?(i=Math.max(...s.timeseries.map(ot),1),e[21]=s.timeseries,e[22]=i):i=e[22];const d=i;let c;if(e[23]!==d||e[24]!==s.timeseries){let f;e[26]!==d?(f=(u,N)=>t.jsx("div",{className:"flex-1 bg-primary/80 rounded-t",style:{height:`${u.value/d*100}%`,minHeight:u.value>0?"2px":"0px"},title:`${new Date(u.timestamp).toLocaleString()}: ${u.value}`},N),e[26]=d,e[27]=f):f=e[27],c=s.timeseries.slice(-24).map(f),e[23]=d,e[24]=s.timeseries,e[25]=c}else c=e[25];let m;e[28]!==c?(m=t.jsx("div",{className:"flex items-end gap-0.5 h-[80px]",children:c}),e[28]=c,e[29]=m):m=e[29];let x;e[30]!==s.timeseries.length?(x=t.jsxs("div",{className:"text-xs text-muted-foreground text-center mt-2",children:[s.timeseries.length," data points"]}),e[30]=s.timeseries.length,e[31]=x):x=e[31];let h;return e[32]!==m||e[33]!==x?(h=t.jsxs("div",{className:"py-2",children:[m,x]}),e[32]=m,e[33]=x,e[34]=h):h=e[34],h}let j;return e[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"text-sm text-muted-foreground text-center py-4",children:"No preview data"}),e[35]=j):j=e[35],j}function ot(l){return l.value}function ct(l,e){return t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-3 py-1.5 font-mono text-xs",children:l.key}),t.jsx("td",{className:"px-3 py-1.5 text-right tabular-nums text-xs",children:l.value.toLocaleString()})]},e)}function mt(l){const e=we.c(113),{widget:s,onChange:o,onRemove:j,canRemove:i,onMoveUp:d,onMoveDown:c,canMoveUp:m,canMoveDown:x,onPreview:h,previewResult:f,isPreviewing:u}=l,N=!m;let z;e[0]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(Ke,{size:14}),e[0]=z):z=e[0];let D;e[1]!==d||e[2]!==N?(D=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:d,disabled:N,children:z}),e[1]=d,e[2]=N,e[3]=D):D=e[3];const ae=!x;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ie,{size:14}),e[4]=g):g=e[4];let p;e[5]!==c||e[6]!==ae?(p=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:c,disabled:ae,children:g}),e[5]=c,e[6]=ae,e[7]=p):p=e[7];let k;e[8]!==D||e[9]!==p?(k=t.jsxs("div",{className:"flex items-center gap-0.5",children:[D,p]}),e[8]=D,e[9]=p,e[10]=k):k=e[10];let S;e[11]!==s.type?(S=t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:s.type}),e[11]=s.type,e[12]=S):S=e[12];let F;e[13]!==s.name?(F=s.name&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted-foreground",children:"·"}),t.jsx("span",{className:"text-sm font-medium",children:s.name})]}),e[13]=s.name,e[14]=F):F=e[14];let _;e[15]!==k||e[16]!==S||e[17]!==F?(_=t.jsxs("div",{className:"flex items-center gap-2",children:[k,S,F]}),e[15]=k,e[16]=S,e[17]=F,e[18]=_):_=e[18];let P;e[19]!==u?(P=u?t.jsx(Fe,{size:14,className:"animate-spin"}):t.jsx(He,{size:14}),e[19]=u,e[20]=P):P=e[20];let B;e[21]!==u||e[22]!==h||e[23]!==P?(B=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:h,disabled:u,children:P}),e[21]=u,e[22]=h,e[23]=P,e[24]=B):B=e[24];const O=!i,ie=i?"visible":"hidden";let T;e[25]!==ie?(T={visibility:ie},e[25]=ie,e[26]=T):T=e[26];let $;e[27]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(Je,{size:14}),e[27]=$):$=e[27];let E;e[28]!==j||e[29]!==O||e[30]!==T?(E=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:j,disabled:O,style:T,children:$}),e[28]=j,e[29]=O,e[30]=T,e[31]=E):E=e[31];let M;e[32]!==B||e[33]!==E?(M=t.jsxs("div",{className:"flex items-center gap-1",children:[B,E]}),e[32]=B,e[33]=E,e[34]=M):M=e[34];let R;e[35]!==_||e[36]!==M?(R=t.jsxs("div",{className:"flex items-center justify-between px-4 h-11 border-b bg-muted/30",children:[_,M]}),e[35]=_,e[36]=M,e[37]=R):R=e[37];let r;e[38]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Widget Name"}),e[38]=r):r=e[38];let a;e[39]!==o||e[40]!==s?(a=b=>o({...s,name:b.target.value}),e[39]=o,e[40]=s,e[41]=a):a=e[41];let n;e[42]!==a||e[43]!==s.name?(n=t.jsxs("div",{children:[r,t.jsx(le,{placeholder:"e.g., Total Tokens",value:s.name,onChange:a})]}),e[42]=a,e[43]=s.name,e[44]=n):n=e[44];let v;e[45]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Type"}),e[45]=v):v=e[45];let y;e[46]!==o||e[47]!==s?(y=b=>{b&&o({...s,type:b,groupBy:b==="table"?s.groupBy:"",interval:b==="timeseries"?s.interval||"1h":""})},e[46]=o,e[47]=s,e[48]=y):y=e[48];let I;e[49]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Se,{value:"metric",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Metric",children:t.jsx(qe,{size:14})}),e[49]=I):I=e[49];let A;e[50]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Se,{value:"timeseries",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Timeseries",children:t.jsx(_e,{size:14})}),e[50]=A):A=e[50];let ne;e[51]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx(Se,{value:"table",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Table",children:t.jsx(Ge,{size:14})}),e[51]=ne):ne=e[51];let W;e[52]!==y||e[53]!==s.type?(W=t.jsxs("div",{children:[v,t.jsxs(Ye,{type:"single",variant:"outline",size:"sm",value:s.type,onValueChange:y,className:"w-full h-10",children:[I,A,ne]})]}),e[52]=y,e[53]=s.type,e[54]=W):W=e[54];let L;e[55]!==n||e[56]!==W?(L=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n,W]}),e[55]=n,e[56]=W,e[57]=L):L=e[57];let oe;e[58]===Symbol.for("react.memo_cache_sentinel")?(oe=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"JSONPath Expression"}),e[58]=oe):oe=e[58];let V;e[59]!==o||e[60]!==s?(V=b=>o({...s,sourcePath:b.target.value}),e[59]=o,e[60]=s,e[61]=V):V=e[61];let U;e[62]!==V||e[63]!==s.sourcePath?(U=t.jsx(le,{placeholder:"$.usage.total_tokens",value:s.sourcePath,onChange:V,className:"font-mono text-sm"}),e[62]=V,e[63]=s.sourcePath,e[64]=U):U=e[64];let G;e[65]!==s.sourceFrom?(G=t.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Path to extract from tool call ",s.sourceFrom]}),e[65]=s.sourceFrom,e[66]=G):G=e[66];let K;e[67]!==U||e[68]!==G?(K=t.jsxs("div",{children:[oe,U,G]}),e[67]=U,e[68]=G,e[69]=K):K=e[69];let ce;e[70]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Extract From"}),e[70]=ce):ce=e[70];let q;e[71]!==o||e[72]!==s?(q=b=>o({...s,sourceFrom:b}),e[71]=o,e[72]=s,e[73]=q):q=e[73];let me;e[74]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(be,{children:t.jsx(ye,{})}),e[74]=me):me=e[74];let de;e[75]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsxs(Ne,{children:[t.jsx(w,{value:"output",children:"Output"}),t.jsx(w,{value:"input",children:"Input"})]}),e[75]=de):de=e[75];let H;e[76]!==q||e[77]!==s.sourceFrom?(H=t.jsxs("div",{children:[ce,t.jsxs(je,{value:s.sourceFrom,onValueChange:q,children:[me,de]})]}),e[76]=q,e[77]=s.sourceFrom,e[78]=H):H=e[78];let ue;e[79]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Aggregation"}),e[79]=ue):ue=e[79];let Q;e[80]!==o||e[81]!==s?(Q=b=>o({...s,aggregationFn:b}),e[80]=o,e[81]=s,e[82]=Q):Q=e[82];let xe;e[83]===Symbol.for("react.memo_cache_sentinel")?(xe=t.jsx(be,{children:t.jsx(ye,{})}),e[83]=xe):xe=e[83];let he;e[84]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsxs(Ne,{children:[t.jsx(w,{value:"sum",children:"Sum"}),t.jsx(w,{value:"avg",children:"Average"}),t.jsx(w,{value:"min",children:"Minimum"}),t.jsx(w,{value:"max",children:"Maximum"}),t.jsx(w,{value:"count",children:"Count"}),t.jsx(w,{value:"last",children:"Last"})]}),e[84]=he):he=e[84];let J;e[85]!==Q||e[86]!==s.aggregationFn?(J=t.jsxs("div",{children:[ue,t.jsxs(je,{value:s.aggregationFn,onValueChange:Q,children:[xe,he]})]}),e[85]=Q,e[86]=s.aggregationFn,e[87]=J):J=e[87];let Y;e[88]!==H||e[89]!==J?(Y=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[H,J]}),e[88]=H,e[89]=J,e[90]=Y):Y=e[90];let Z;e[91]!==o||e[92]!==s?(Z=s.type==="table"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Group By (JSONPath)"}),t.jsx(le,{placeholder:"$.model",value:s.groupBy,onChange:b=>o({...s,groupBy:b.target.value}),className:"font-mono text-sm"})]}),e[91]=o,e[92]=s,e[93]=Z):Z=e[93];let X;e[94]!==o||e[95]!==s?(X=s.type==="timeseries"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Time Interval"}),t.jsxs(je,{value:s.interval||"1h",onValueChange:b=>o({...s,interval:b}),children:[t.jsx(be,{children:t.jsx(ye,{})}),t.jsxs(Ne,{children:[t.jsx(w,{value:"15m",children:"15 minutes"}),t.jsx(w,{value:"1h",children:"1 hour"}),t.jsx(w,{value:"1d",children:"1 day"})]})]})]}),e[94]=o,e[95]=s,e[96]=X):X=e[96];let ee;e[97]!==L||e[98]!==K||e[99]!==Y||e[100]!==Z||e[101]!==X?(ee=t.jsxs("div",{className:"space-y-4",children:[L,K,Y,Z,X]}),e[97]=L,e[98]=K,e[99]=Y,e[100]=Z,e[101]=X,e[102]=ee):ee=e[102];let fe;e[103]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx("div",{className:"px-3 py-2 border-b text-xs font-medium text-muted-foreground",children:"Preview (last 24h)"}),e[103]=fe):fe=e[103];let te;e[104]!==f||e[105]!==s?(te=t.jsxs("div",{className:"border rounded-lg bg-muted/20 flex flex-col",children:[fe,t.jsx("div",{className:"p-3 flex-1 flex items-center justify-center",children:f?t.jsx(nt,{result:f,widget:s}):t.jsx("div",{className:"text-sm text-muted-foreground text-center",children:'Click "Preview" to test your aggregation'})})]}),e[104]=f,e[105]=s,e[106]=te):te=e[106];let se;e[107]!==ee||e[108]!==te?(se=t.jsx("div",{className:"p-4",children:t.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[ee,te]})}),e[107]=ee,e[108]=te,e[109]=se):se=e[109];let ge;return e[110]!==R||e[111]!==se?(ge=t.jsxs("div",{className:"border rounded-lg bg-card overflow-hidden",children:[R,se]}),e[110]=R,e[111]=se,e[112]=ge):ge=e[112],ge}function dt({dashboardId:l}){const{org:e,project:s,locator:o}=Ee(),j=Me(),i=$e({connectionId:Ae,orgId:e.id}),d=Oe(),{data:c}=Re({queryKey:ve.monitoringDashboardDetails(o,l),queryFn:async()=>{if(!i)throw new Error("MCP client not available");const r=await i.callTool({name:"MONITORING_DASHBOARD_GET",arguments:{id:l}});return r.structuredContent??r}}),[m,x]=C.useState(c?.name??""),[h,f]=C.useState(c?.description??""),[u,N]=C.useState(c?.widgets?.map(De)??[{...Ce}]),[z,D]=C.useState(!1),[ae,g]=C.useState(!1),[p,k]=C.useState(c?.filters?.connectionIds??[]),[S,F]=C.useState(c?.filters?.toolNames?.[0]??""),[_,P]=C.useState({}),[B,O]=C.useState(new Set),ie=()=>{N([...u,{...Ce,id:crypto.randomUUID()}]),g(!0)},T=r=>{N(u.filter((a,n)=>n!==r)),g(!0)},$=(r,a)=>{const n=[...u];n[r]=a,N(n),g(!0),P(v=>{const y={...v};return delete y[a.id],y})},E=async r=>{if(i){O(a=>new Set(a).add(r.id));try{const a=new Date,n=new Date(a.getTime()-1440*60*1e3),v={};p.length>0&&(v.connectionIds=p),S.trim()&&(v.toolNames=[S.trim()]);const I=(await i.callTool({name:"MONITORING_WIDGET_PREVIEW",arguments:{widget:{type:r.type,source:{path:r.sourcePath,from:r.sourceFrom},aggregation:{fn:r.aggregationFn,groupBy:r.type==="table"&&r.groupBy?r.groupBy:void 0,interval:r.type==="timeseries"&&r.interval?r.interval:void 0},filter:Object.keys(v).length>0?v:void 0},timeRange:{startDate:n.toISOString(),endDate:a.toISOString()}}})).structuredContent;P(A=>({...A,[r.id]:{value:I?.value,groups:I?.groups,timeseries:I?.timeseries,matchedRecords:I?.matchedRecords??0}}))}catch(a){console.error("Preview failed:",a),P(n=>({...n,[r.id]:{error:"Preview failed. Check your JSONPath expression."}}))}finally{O(a=>{const n=new Set(a);return n.delete(r.id),n})}}},M=async()=>{if(i){if(!m.trim()){pe.error("Please enter a dashboard name");return}if(u.some(r=>!r.name.trim())){pe.error("Please enter a name for all widgets");return}D(!0);try{const r={};p.length>0&&(r.connectionIds=p),S.trim()&&(r.toolNames=[S.trim()]),await i.callTool({name:"MONITORING_DASHBOARD_UPDATE",arguments:{id:l,name:m.trim(),description:h.trim()||null,filters:Object.keys(r).length>0?r:null,widgets:u.map(it)}}),pe.success("Dashboard saved"),g(!1),j.invalidateQueries({queryKey:ve.monitoringDashboards(o)}),j.invalidateQueries({queryKey:ve.monitoringDashboardDetails(o,l)})}catch(r){pe.error("Failed to save dashboard"),console.error(r)}finally{D(!1)}}};if(!c)return t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Dashboard not found"});const R=t.jsx(tt,{children:t.jsxs(st,{children:[t.jsx(Pe,{children:t.jsx(rt,{asChild:!0,children:t.jsx(ze,{to:"/$org/$project/monitoring",params:{org:e.slug,project:s.slug},search:{tab:"dashboards"},children:"Monitoring"})})}),t.jsx(lt,{}),t.jsx(Pe,{children:t.jsxs(at,{children:["Edit ",c.name]})})]})});return t.jsxs(Ze,{breadcrumb:R,children:[t.jsx(Xe,{children:t.jsx(et,{onSave:M,onUndo:()=>{x(c?.name??""),f(c?.description??""),N(c?.widgets?.map(De)??[{...Ce}]),k(c?.filters?.connectionIds??[]),F(c?.filters?.toolNames?.[0]??""),g(!1)},isDirty:ae,isSaving:z})}),t.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:t.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Dashboard Name"}),t.jsx(le,{placeholder:"e.g., LLM Usage Overview",value:m,onChange:r=>{x(r.target.value),g(!0)}})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Description"}),t.jsx(le,{placeholder:"What does this dashboard show?",value:h,onChange:r=>{f(r.target.value),g(!0)}})]})]}),t.jsxs("div",{className:"border rounded-lg p-4 bg-muted/30",children:[t.jsxs("h2",{className:"text-sm font-medium mb-3",children:["Dashboard Filters",t.jsx("span",{className:"text-muted-foreground font-normal ml-2",children:"(applied to all widgets)"})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Servers"}),t.jsxs(Le,{children:[t.jsx(Ve,{asChild:!0,children:t.jsxs(re,{variant:"outline",className:"w-full justify-between font-normal",children:[t.jsx("span",{className:"flex items-center gap-2 truncate",children:p.length===0?t.jsx("span",{className:"text-muted-foreground",children:"All servers"}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"flex items-center -space-x-1",children:p.slice(0,3).map(r=>{const a=(d??[]).find(n=>n.id===r);return a?t.jsx(ke,{icon:a.icon,name:a.title||a.id,size:"xs"},r):null})}),t.jsxs("span",{children:[p.length," server",p.length!==1?"s":""]})]})}),t.jsx(Ie,{size:14,className:"text-muted-foreground shrink-0"})]})}),t.jsxs(Ue,{align:"start",className:"w-72 p-1",children:[t.jsx("div",{className:"max-h-[240px] overflow-y-auto",children:(d??[]).map(r=>{const a=p.includes(r.id);return t.jsxs("button",{type:"button",className:"flex items-center gap-3 w-full rounded-md px-2 py-2 text-sm hover:bg-muted transition-colors",onClick:()=>{k(n=>a?n.filter(v=>v!==r.id):[...n,r.id]),g(!0)},children:[t.jsx(We,{checked:a}),t.jsx(ke,{icon:r.icon,name:r.title||r.id,size:"xs"}),t.jsx("span",{className:"truncate",children:r.title||r.id})]},r.id)})}),p.length>0&&t.jsx("div",{className:"border-t p-1",children:t.jsx("button",{type:"button",className:"w-full text-xs text-muted-foreground hover:text-foreground py-1.5 transition-colors",onClick:()=>{k([]),g(!0)},children:"Clear selection"})})]})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Tool Name Filter"}),t.jsx(le,{placeholder:"e.g., openai_chat",value:S,onChange:r=>{F(r.target.value),g(!0)},className:"font-mono text-sm"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Filter to specific tool names (partial match)"})]})]})]}),t.jsxs("div",{className:"mt-12",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h2",{className:"text-lg font-medium",children:"Widgets"}),t.jsxs(re,{variant:"outline",size:"sm",onClick:ie,children:[t.jsx(Qe,{size:14,className:"mr-1.5"}),"Add Widget"]})]}),t.jsx("div",{className:"space-y-4",children:u.map((r,a)=>t.jsx(mt,{widget:r,onChange:n=>$(a,n),onRemove:()=>T(a),canRemove:u.length>1,onMoveUp:()=>{const n=[...u],v=n[a-1],y=n[a];n[a-1]=y,n[a]=v,N(n),g(!0)},onMoveDown:()=>{const n=[...u],v=n[a],y=n[a+1];n[a]=y,n[a+1]=v,N(n),g(!0)},canMoveUp:a>0,canMoveDown:a<u.length-1,onPreview:()=>E(r),previewResult:_[r.id]??null,isPreviewing:B.has(r.id)},r.id))})]})]})})]})}function Lt(){const l=we.c(5);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},l[0]=e):e=l[0];const{dashboardId:s}=Be(e);let o;l[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboard editor"}),l[1]=o):o=l[1];let j;l[2]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Fe,{size:24,className:"animate-spin text-muted-foreground"})}),l[2]=j):j=l[2];let i;return l[3]!==s?(i=t.jsx(Te,{fallback:o,children:t.jsx(C.Suspense,{fallback:j,children:t.jsx(dt,{dashboardId:s})})}),l[3]=s,l[4]=i):i=l[4],i}export{Lt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t,B as R,c as D,n as xe,a2 as re,E as ge,u as fe,m as ne,K as oe,at as pe,e as he,b as je}from"./index-
|
|
1
|
+
import{r as $,j as t,B as R,c as D,n as xe,a2 as re,E as ge,u as fe,m as ne,K as oe,at as pe,e as he,b as je}from"./index-DcA4vgYb.js";import{a as be,u as ye}from"./constants-w3KRiYJo.js";import{p as ee,a as ce,s as ve,b as Ne,e as me,T as we}from"./time-range-picker-bzaKWNvH.js";import{i as ke}from"./Edit05-ersxMaKv.js";import{V as Se,a as Ce}from"./layout-CoLAFZKt.js";import{b as de,c as $e,d as Fe,e as Re,B as De,a as Te}from"./breadcrumb-gOyjPPGL.js";import{B as _e}from"./badge-BaNY-OL6.js";import{I as ue}from"./input-D7fS8yTo.js";import{a as Pe,b as Ie,P as Me}from"./popover-CFtuZWTF.js";import{S as ze,a as Be,b as Ee,c as Oe,d as Ae}from"./select-BRkHXmU6.js";import{T as Ke}from"./textarea-BtPDboXP.js";import{T as Le,a as Ve,b as qe}from"./tooltip-DUANF8DJ.js";import{i as Qe}from"./Code01-HNFEPIid.js";import{i as We}from"./FilterLines-B8bnzNry.js";import{c as Ge}from"./Grid01-CL8bDW_D.js";import{s as He}from"./Plus-C1MNvAXK.js";import{s as Ye}from"./Trash01-DvB3pKWW.js";import{s as Ue}from"./XClose-BmWaDPIJ.js";import"./Check-DM0R80Lx.js";import"./Copy01-CTK5kHSt.js";import"./Download01-DkiE27--.js";import"./Key01-DyGpqOc7.js";import"./Play-B7GZ81pz.js";import"./monaco-editor-CMsnbBtp.js";import"./spinner-BFdPnmxp.js";import"./scroll-area-RURkKeyT.js";import"./ChevronDown-Dp9wV5PD.js";import"./Clock-kspY5z1L.js";import"./ChevronLeft-urjZe_Dn.js";import"./ChevronRight-6Ka7FsE_.js";import"./index-CpVmTHFl.js";import"./localstorage-keys-BIium7Ac.js";import"./useQuery-Dai3ahZF.js";import"./useMutation-DIe-HSDV.js";import"./index-D_NXq9UK.js";const Je=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function Xe({value:s,onChange:e}){const[r,i]=$.useState(!1),[l,n]=$.useState("raw"),[c,o]=$.useState(s),[m,d]=$.useState(ee(s)),g=$.useRef(s);g.current!==s&&(g.current=s,o(s),d(ee(s)));const f=()=>{e(c.filter(a=>a.key.trim()))},p=()=>{const a=ce(m);o(a),e(a)},j=()=>{if(l==="raw"){const a=ce(m);o(a),n("form")}else d(ee(c)),n("raw")},v=(a,x)=>{const u=[...c],h=u[a];h&&(u[a]={key:x.key??h.key,operator:x.operator??h.operator,value:x.value??h.value},o(u))},b=()=>{o([...c,{key:"",operator:"eq",value:""}])},w=a=>{const x=c.filter((u,h)=>h!==a);o(x),d(ee(x)),e(x.filter(u=>u.key.trim()))},y=()=>{o([]),d(""),e([]),i(!1)},k=s.filter(a=>a.key.trim()).length;return t.jsxs("div",{className:"flex items-center gap-1.5",children:[s.filter(a=>a.key.trim()).map((a,x)=>{const u=a.operator==="exists"?`${a.key}?`:a.operator==="contains"?`${a.key}~${a.value}`:a.operator==="in"?`${a.key}@${a.value}`:`${a.key}=${a.value}`;return t.jsxs(_e,{variant:"secondary",className:"gap-1 pl-2 pr-1 h-7 text-xs font-mono font-normal cursor-default",children:[u,t.jsx("button",{type:"button",className:"ml-0.5 rounded-full p-0.5 hover:bg-muted-foreground/20 transition-colors",onClick:()=>{const h=s.filter((C,F)=>F!==x);e(h)},children:t.jsx(Ue,{size:12})})]},`${a.key}-${x}`)}),t.jsxs(Pe,{open:r,onOpenChange:i,children:[t.jsx(Ie,{asChild:!0,children:t.jsxs(R,{variant:"outline",size:"sm",className:"h-7 px-2 gap-1.5",children:[t.jsx(We,{className:"h-3.5 w-3.5 text-muted-foreground"}),k===0?t.jsx("span",{className:"text-sm",children:"Filter"}):t.jsx("span",{className:"text-sm",children:k})]})}),t.jsxs(Me,{className:"w-[380px] p-4",align:"end",sideOffset:4,children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsx("h4",{className:"text-sm font-medium",children:"Property Filters"}),t.jsxs(Le,{children:[t.jsx(Ve,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:j,children:l==="raw"?t.jsx(Ge,{size:14}):t.jsx(Qe,{size:14})})}),t.jsx(qe,{children:l==="raw"?"Switch to form view":"Switch to raw text"})]})]}),l==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(Ke,{placeholder:`Paste property filters here:
|
|
2
2
|
thread_id=abc123
|
|
3
3
|
user~test
|
|
4
4
|
debug?`,value:m,onChange:a=>d(a.target.value),onBlur:p,onKeyDown:a=>{a.key==="Enter"&&a.metaKey&&p()},className:"font-mono text-sm min-h-[80px] resize-none"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["One per line:"," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key=value"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key~contains"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key@in_list"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key?"})]})]}):t.jsxs("div",{className:"space-y-3",children:[c.map((a,x)=>t.jsxs("div",{className:"p-2.5 rounded-md border border-border bg-muted/30 space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Filter ",x+1]}),t.jsx(R,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>w(x),children:t.jsx(Ye,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(ue,{placeholder:"Key (e.g., thread_id)",value:a.key,onChange:u=>v(x,{key:u.target.value}),onBlur:f,onKeyDown:u=>{u.key==="Enter"&&f()},className:"flex-1 font-mono text-sm"}),t.jsxs(ze,{value:a.operator,onValueChange:u=>{const h=[...c],C=h[x];C&&(h[x]={...C,operator:u,value:u==="exists"?"":C.value},o(h),e(h.filter(F=>F.key.trim())))},children:[t.jsx(Be,{className:"w-28",children:t.jsx(Ee,{})}),t.jsx(Oe,{children:Je.map(u=>t.jsx(Ae,{value:u.value,children:u.label},u.value))})]})]}),a.operator!=="exists"&&t.jsx(ue,{placeholder:"Value",value:a.value,onChange:u=>v(x,{value:u.target.value}),onBlur:f,onKeyDown:u=>{u.key==="Enter"&&f()},className:"w-full font-mono text-sm"})]},x)),t.jsxs(R,{variant:"outline",size:"sm",className:"w-full",onClick:b,children:[t.jsx(He,{size:14,className:"mr-1.5"}),"Add filter"]})]}),k>0&&t.jsx(R,{variant:"ghost",size:"sm",className:"w-full mt-3 text-muted-foreground",onClick:y,children:"Clear all filters"})]})]})]})}function G(s,e){return e||Number.isInteger(s)?s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:s.toLocaleString():s>=1e6?`${(s/1e6).toFixed(2)}M`:s>=1e3?`${(s/1e3).toFixed(2)}K`:s.toFixed(2)}function ae(s){return{sum:"Total",avg:"Average",min:"Minimum",max:"Maximum",count:"Count",last:"Latest"}[s]??s}function le(s){const e=D.c(7),{name:r,subtitle:i}=s;let l;e[0]!==r?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:r}),e[0]=r,e[1]=l):l=e[1];let n;e[2]!==i?(n=t.jsx("div",{className:"text-xs text-muted-foreground",children:i}),e[2]=i,e[3]=n):n=e[3];let c;return e[4]!==l||e[5]!==n?(c=t.jsxs("div",{className:"px-4 py-3",children:[l,n]}),e[4]=l,e[5]=n,e[6]=c):c=e[6],c}function Ze(s){const e=D.c(13),{widget:r,result:i}=s,l=i?.value??0,n=r.aggregation.fn==="count",c=r.name;let o;e[0]!==r.aggregation.fn?(o=ae(r.aggregation.fn),e[0]=r.aggregation.fn,e[1]=o):o=e[1];let m;e[2]!==o||e[3]!==r.name?(m=t.jsx(le,{name:c,subtitle:o}),e[2]=o,e[3]=r.name,e[4]=m):m=e[4];let d;e[5]!==n||e[6]!==l?(d=G(l,n),e[5]=n,e[6]=l,e[7]=d):d=e[7];let g;e[8]!==d?(g=t.jsx("div",{className:"px-4 pb-4 mt-auto",children:t.jsx("div",{className:"text-4xl font-bold tabular-nums",children:d})}),e[8]=d,e[9]=g):g=e[9];let f;return e[10]!==m||e[11]!==g?(f=t.jsxs("div",{className:"border rounded-lg bg-card flex flex-col h-full",children:[m,g]}),e[10]=m,e[11]=g,e[12]=f):f=e[12],f}function et(s){const e=D.c(15),{widget:r,result:i}=s;let l,n;e[0]!==i?.groups?(l=i?.groups??[],n=Math.max(...l.map(tt),1),e[0]=i?.groups,e[1]=l,e[2]=n):(l=e[1],n=e[2]);const c=n;let o;e[3]!==r.aggregation.fn||e[4]!==r.aggregation.groupBy?(o=r.aggregation.groupBy?`Grouped by ${r.aggregation.groupBy}`:ae(r.aggregation.fn),e[3]=r.aggregation.fn,e[4]=r.aggregation.groupBy,e[5]=o):o=e[5];let m;e[6]!==o||e[7]!==r.name?(m=t.jsx(le,{name:r.name,subtitle:o}),e[6]=o,e[7]=r.name,e[8]=m):m=e[8];let d;e[9]!==l||e[10]!==c?(d=t.jsx("div",{className:"max-h-[300px] overflow-auto",children:l.length===0?t.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"No data available for this query"}):t.jsx("div",{className:"divide-y",children:l.map(f=>t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2",children:[t.jsx("span",{className:"text-sm truncate flex-1 min-w-0",children:f.key||"(empty)"}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 w-32",children:[t.jsx("div",{className:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden",children:t.jsx("div",{className:"h-full bg-primary rounded-full",style:{width:`${f.value/c*100}%`}})}),t.jsx("span",{className:"text-xs tabular-nums text-muted-foreground w-10 text-right",children:G(f.value,!0)})]})]},f.key))})}),e[9]=l,e[10]=c,e[11]=d):d=e[11];let g;return e[12]!==m||e[13]!==d?(g=t.jsxs("div",{className:"border rounded-lg bg-card overflow-hidden flex flex-col h-full",children:[m,d]}),e[12]=m,e[13]=d,e[14]=g):g=e[14],g}function tt(s){return s.value}function st(s){const e=D.c(37),{widget:r,result:i}=s;let l,n,c,o,m,d,g,f,p;if(e[0]!==i?.timeseries||e[1]!==r.aggregation.fn||e[2]!==r.aggregation.interval||e[3]!==r.name){p=i?.timeseries??[],n=Math.max(...p.map(at),1);const a=p.reduce(rt,0);l=r.aggregation.fn==="count",f="border rounded-lg bg-card overflow-hidden flex flex-col h-full",d="flex items-start justify-between pr-4";const x=r.name;let u;e[13]!==r.aggregation.fn?(u=ae(r.aggregation.fn),e[13]=r.aggregation.fn,e[14]=u):u=e[14];const h=`${u} per ${r.aggregation.interval}`;e[15]!==h||e[16]!==r.name?(g=t.jsx(le,{name:x,subtitle:h}),e[15]=h,e[16]=r.name,e[17]=g):g=e[17],m="text-right pt-3",c="text-lg font-semibold tabular-nums leading-tight",o=G(a,l),e[0]=i?.timeseries,e[1]=r.aggregation.fn,e[2]=r.aggregation.interval,e[3]=r.name,e[4]=l,e[5]=n,e[6]=c,e[7]=o,e[8]=m,e[9]=d,e[10]=g,e[11]=f,e[12]=p}else l=e[4],n=e[5],c=e[6],o=e[7],m=e[8],d=e[9],g=e[10],f=e[11],p=e[12];let j;e[18]!==c||e[19]!==o?(j=t.jsx("div",{className:c,children:o}),e[18]=c,e[19]=o,e[20]=j):j=e[20];let v;e[21]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"text-xs text-muted-foreground",children:"total"}),e[21]=v):v=e[21];let b;e[22]!==m||e[23]!==j?(b=t.jsxs("div",{className:m,children:[j,v]}),e[22]=m,e[23]=j,e[24]=b):b=e[24];let w;e[25]!==d||e[26]!==g||e[27]!==b?(w=t.jsxs("div",{className:d,children:[g,b]}),e[25]=d,e[26]=g,e[27]=b,e[28]=w):w=e[28];let y;e[29]!==l||e[30]!==n||e[31]!==p?(y=t.jsx("div",{className:"px-4 pb-3 flex-1 flex flex-col min-h-0",children:p.length===0?t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"No data available"}):t.jsxs("div",{className:"flex-1 flex flex-col",children:[t.jsx("div",{className:"text-[10px] text-muted-foreground mb-1 tabular-nums",children:G(n,l)}),t.jsx("div",{className:"flex items-end gap-[2px] flex-1",children:p.map((a,x)=>t.jsx("div",{className:"group relative flex-1 bg-primary/70 rounded-t transition-all hover:bg-primary cursor-default",style:{height:`${a.value/n*100}%`,minHeight:a.value>0?"3px":"0px"},children:t.jsx("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 hidden group-hover:block z-10 pointer-events-none",children:t.jsx("div",{className:"bg-foreground text-background text-[10px] px-1.5 py-0.5 rounded whitespace-nowrap tabular-nums",children:G(a.value,l)})})},x))}),t.jsx("div",{className:"flex justify-between text-[10px] text-muted-foreground mt-1.5 tabular-nums",children:p.length>0&&(()=>{const a=new Date(p[0].timestamp),x=new Date(p[p.length-1].timestamp),C=x.getTime()-a.getTime()>864e5?{month:"short",day:"numeric"}:{hour:"2-digit",minute:"2-digit"};return t.jsxs(t.Fragment,{children:[t.jsx("span",{children:a.toLocaleString([],C)}),t.jsx("span",{children:x.toLocaleString([],C)})]})})()})]})}),e[29]=l,e[30]=n,e[31]=p,e[32]=y):y=e[32];let k;return e[33]!==w||e[34]!==y||e[35]!==f?(k=t.jsxs("div",{className:f,children:[w,y]}),e[33]=w,e[34]=y,e[35]=f,e[36]=k):k=e[36],k}function rt(s,e){return s+e.value}function at(s){return s.value}function lt(s){const e=D.c(81),{dashboardId:r,timeRange:i,propertyFilters:l,onEdit:n,onRefresh:c,onTimeRangeChange:o,onPropertyFiltersChange:m}=s,{org:d,project:g,locator:f}=fe();let p;e[0]!==d.id?(p={connectionId:be,orgId:d.id},e[0]=d.id,e[1]=p):p=e[1];const j=ye(p);let v;e[2]!==r||e[3]!==f?(v=oe.monitoringDashboardDetails(f,r),e[2]=r,e[3]=f,e[4]=v):v=e[4];let b;e[5]!==j||e[6]!==r?(b=async()=>{if(!j)throw new Error("MCP client not available");const N=await j.callTool({name:"MONITORING_DASHBOARD_GET",arguments:{id:r}});return N.structuredContent??N},e[5]=j,e[6]=r,e[7]=b):b=e[7];let w;e[8]!==v||e[9]!==b?(w={queryKey:v,queryFn:b},e[8]=v,e[9]=b,e[10]=w):w=e[10];const{data:y}=ne(w);let k,a,x;if(e[11]!==r||e[12]!==f||e[13]!==l||e[14]!==i.from||e[15]!==i.to){const N=l.filter(ot),S=ve(N);k=N.length>0?Ne(N):void 0,x=ne,a=oe.monitoringDashboardQuery(f,r,i.from,i.to,S||void 0),e[11]=r,e[12]=f,e[13]=l,e[14]=i.from,e[15]=i.to,e[16]=k,e[17]=a,e[18]=x}else k=e[16],a=e[17],x=e[18];let u;e[19]!==k||e[20]!==j||e[21]!==r||e[22]!==i.from||e[23]!==i.to?(u=async()=>{if(!j)throw new Error("MCP client not available");const N=me(i.from),S=me(i.to),W=N.date||new Date(Date.now()-864e5),se=S.date||new Date,ie=await j.callTool({name:"MONITORING_DASHBOARD_QUERY",arguments:{dashboardId:r,timeRange:{startDate:W.toISOString(),endDate:se.toISOString()},...k?{propertyFilters:k}:{}}});return ie.structuredContent??ie},e[19]=k,e[20]=j,e[21]=r,e[22]=i.from,e[23]=i.to,e[24]=u):u=e[24];let h;e[25]!==a||e[26]!==u?(h={queryKey:a,queryFn:u,refetchInterval:3e4},e[25]=a,e[26]=u,e[27]=h):h=e[27];const{data:C,isRefetching:F}=x(h);if(!y){let N;return e[28]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Dashboard not found"}),e[28]=N):N=e[28],N}let H;e[29]!==C?.results?(H=new Map(C?.results?.map(nt)??[]),e[29]=C?.results,e[30]=H):H=e[30];const Q=H;let T;e[31]!==d.slug||e[32]!==g.slug?(T={org:d.slug,project:g.slug},e[31]=d.slug,e[32]=g.slug,e[33]=T):T=e[33];let Y;e[34]===Symbol.for("react.memo_cache_sentinel")?(Y={tab:"dashboards"},e[34]=Y):Y=e[34];let _;e[35]!==T?(_=t.jsx(de,{children:t.jsx(Fe,{asChild:!0,children:t.jsx(pe,{to:"/$org/$project/monitoring",params:T,search:Y,children:"Monitoring"})})}),e[35]=T,e[36]=_):_=e[36];let U;e[37]===Symbol.for("react.memo_cache_sentinel")?(U=t.jsx(Re,{}),e[37]=U):U=e[37];let P;e[38]!==y.name?(P=t.jsx(de,{children:t.jsx($e,{children:y.name})}),e[38]=y.name,e[39]=P):P=e[39];let J;e[40]!==_||e[41]!==P?(J=t.jsx(De,{children:t.jsxs(Te,{children:[_,U,P]})}),e[40]=_,e[41]=P,e[42]=J):J=e[42];const te=J;let I;e[43]!==n?(I=n&&t.jsx(R,{variant:"outline",size:"icon",className:"h-7 w-7",onClick:n,children:t.jsx(ke,{size:14})}),e[43]=n,e[44]=I):I=e[44];let X;e[45]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx(re,{size:14}),e[45]=X):X=e[45];let M;e[46]!==c?(M=t.jsx(R,{variant:"outline",size:"icon",className:"h-7 w-7",onClick:c,children:X}),e[46]=c,e[47]=M):M=e[47];let z;e[48]!==m||e[49]!==l?(z=t.jsx(Xe,{value:l,onChange:m}),e[48]=m,e[49]=l,e[50]=z):z=e[50];let B;e[51]!==i.from||e[52]!==i.to?(B={from:i.from,to:i.to},e[51]=i.from,e[52]=i.to,e[53]=B):B=e[53];let E;e[54]!==o||e[55]!==B?(E=t.jsx(we,{value:B,onChange:o,className:"min-w-0"}),e[54]=o,e[55]=B,e[56]=E):E=e[56];let O;e[57]!==I||e[58]!==M||e[59]!==z||e[60]!==E?(O=t.jsxs(Se,{children:[I,M,z,E]}),e[57]=I,e[58]=M,e[59]=z,e[60]=E,e[61]=O):O=e[61];let A;e[62]!==y.description?(A=y.description&&t.jsx("div",{className:"mb-6",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:y.description})}),e[62]=y.description,e[63]=A):A=e[63];let K;if(e[64]!==y.widgets||e[65]!==Q){let N;e[67]!==Q?(N=S=>{const W=Q.get(S.id),se=S.type==="metric"?"":"col-span-2";return t.jsxs("div",{className:se,children:[S.type==="metric"&&t.jsx(Ze,{widget:S,result:W}),S.type==="table"&&t.jsx(et,{widget:S,result:W}),S.type==="timeseries"&&t.jsx(st,{widget:S,result:W})]},S.id)},e[67]=Q,e[68]=N):N=e[68],K=y.widgets.map(N),e[64]=y.widgets,e[65]=Q,e[66]=K}else K=e[66];let L;e[69]!==K?(L=t.jsx("div",{className:"grid grid-cols-5 gap-4",ref:it,children:K}),e[69]=K,e[70]=L):L=e[70];let V;e[71]!==F?(V=F&&t.jsxs("div",{className:"fixed bottom-4 right-4 bg-background border rounded-lg px-3 py-2 shadow-lg flex items-center gap-2 text-sm",children:[t.jsx(re,{size:14,className:"animate-spin"}),"Refreshing..."]}),e[71]=F,e[72]=V):V=e[72];let q;e[73]!==A||e[74]!==L||e[75]!==V?(q=t.jsxs("div",{className:"flex-1 flex flex-col overflow-auto p-5",children:[A,L,V]}),e[73]=A,e[74]=L,e[75]=V,e[76]=q):q=e[76];let Z;return e[77]!==te||e[78]!==O||e[79]!==q?(Z=t.jsxs(Ce,{breadcrumb:te,children:[O,q]}),e[77]=te,e[78]=O,e[79]=q,e[80]=Z):Z=e[80],Z}function it(s){if(!s)return;const e=()=>{const i=(s.clientWidth-64)/5;s.style.gridAutoRows=`${i}px`};e(),new ResizeObserver(e).observe(s)}function nt(s){return[s.widgetId,s]}function ot(s){return s.key.trim()}function ct(s){const e=D.c(13),{dashboardId:r,onEdit:i}=s,l=xe();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"now-24h",to:"now"},e[0]=n):n=e[0];const[c,o]=$.useState(n);let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=[],e[1]=m):m=e[1];const[d,g]=$.useState(m);let f;e[2]!==r||e[3]!==l?(f=()=>{l.invalidateQueries({predicate:w=>w.queryKey[0]==="monitoringDashboardQuery"&&w.queryKey[2]===r})},e[2]=r,e[3]=l,e[4]=f):f=e[4];const p=f;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboard"}),e[5]=j):j=e[5];let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(re,{size:24,className:"animate-spin text-muted-foreground"})}),e[6]=v):v=e[6];let b;return e[7]!==r||e[8]!==p||e[9]!==i||e[10]!==d||e[11]!==c?(b=t.jsx(ge,{fallback:j,children:t.jsx($.Suspense,{fallback:v,children:t.jsx(lt,{dashboardId:r,timeRange:c,propertyFilters:d,onEdit:i,onRefresh:p,onTimeRangeChange:o,onPropertyFiltersChange:g})})}),e[7]=r,e[8]=p,e[9]=i,e[10]=d,e[11]=c,e[12]=b):b=e[12],b}function Qt(){const s=D.c(9);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},s[0]=e):e=s[0];const{dashboardId:r}=he(e),{org:i,project:l}=fe(),n=je();let c;s[1]!==r||s[2]!==n||s[3]!==i.slug||s[4]!==l.slug?(c=()=>{n({to:"/$org/$project/monitoring/dashboards/$dashboardId/edit",params:{org:i.slug,project:l.slug,dashboardId:r}})},s[1]=r,s[2]=n,s[3]=i.slug,s[4]=l.slug,s[5]=c):c=s[5];const o=c;let m;return s[6]!==r||s[7]!==o?(m=t.jsx(ct,{dashboardId:r,onEdit:o}),s[6]=r,s[7]=o,s[8]=m):m=s[8],m}export{Qt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as e}from"./index-
|
|
1
|
+
import{r as i,j as e}from"./index-DcA4vgYb.js";import{i as n}from"./Loading01-BhNIqpDS.js";import{h as l}from"./mcp-oauth-CpwQDySp.js";function h(){const[s,c]=i.useState(null),[r,a]=i.useState(!1);return i.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[r&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!r&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":r?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):r?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as j,c as b,j as s,v as D,E as ee,u as te,d as se,B as ie}from"./index-BNIkrm6G.js";import{V as le,C as h}from"./index-C4C1LTNx.js";import{E as re,C as Z}from"./editable-task-title-9wBxr3vu.js";import{a as G}from"./tasks-panel-gU-hwNjz.js";import{u as U,a as oe}from"./collapsible-DDp-jqBS.js";import{I as J}from"./integration-icon-CeszwaXj.js";import{b as ne,P as ae,a as ce}from"./popover-CduEmtfy.js";import{S as q}from"./skeleton-8tszUVPX.js";import{i as me,d as de}from"./constants-D9z7KLT0.js";import{b as fe}from"./use-virtual-mcp-DSZQ8c22.js";import{i as pe}from"./ChevronRight-DRs99ZRM.js";import{t as Q}from"./Users03-xOVOWg9H.js";import{P as $}from"./index-tkyKZw4C.js";import{R,a as F,b as K}from"./resizable-BmT0syW-.js";import"./spinner-DbhNddF6.js";import"./tooltip-SIeQn5OB.js";import"./index-DCZ5uiBS.js";import"./decopilot-events-CmkXOumK.js";import"./useQuery--kTTZKx2.js";import"./dialog-6tKvrNtA.js";import"./X-DfCtt-9E.js";import"./form-Djv5zHX0.js";import"./label-CidthTOJ.js";import"./input-zk6YM9m6.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-BI5V1txl.js";import"./ChevronDown-Bg73DXow.js";import"./Edit01-C7I8buAW.js";import"./Lock01-hkiyQ8hn.js";import"./XCircle-DBV7s4Xw.js";import"./AlertCircle-CHexcqK0.js";import"./select-DQG_vrnx.js";import"./Check-mUIvZly8.js";import"./tabs-qklqf5c2.js";import"./localstorage-keys-bVpFjoCT.js";import"./useMutation-DNeCNjWQ.js";import"./ArrowLeft-BysKrYx8.js";import"./use-copy-BLRzY6B2.js";import"./badge-D1wMupdZ.js";import"./Code01-B29dV-Q_.js";import"./SearchMd-BRAsA5px.js";import"./use-create-virtual-mcp-CfJCu2UK.js";import"./use-mcp-resources-229ZEuQM.js";import"./Copy01-CcfQ05L8.js";import"./marked.esm-BaswSlok.js";import"./markdown-Br6TxRr2.js";import"./mcp-app-renderer-DyEHtBB2.js";import"./types-CPe1xBdd.js";import"./Eye-C-LZPCP0.js";import"./Globe02-C7zbDDlP.js";import"./LayersTwo01-DdYU3A3u.js";import"./XClose-CY2MEG0v.js";import"./collection-search-DlbpDorz.js";import"./Loading01-Dq2MI--a.js";import"./use-connection-S2z7Q5et.js";import"./use-collections-D0eAqnRh.js";import"./generate-id-Dyweu44Y.js";import"./Clock-BCvCAc7i.js";import"./Trash01-DguMAIMc.js";import"./CheckCircle-AiDKuZw1.js";import"./ChevronLeft-84BO6HEd.js";import"./user-BiYHDfMn.js";import"./avatar-CIF9KO_a.js";import"./format-time-CMKyl-GC.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./Plus-DsR_tCw6.js";import"./dropdown-menu-BgBG09R8.js";import"./use-llm-DHW4hCLw.js";import"./use-binding-DF4rrJCM.js";import"./binder-ClQyDxvt.js";import"./checkbox-BGURGdsV.js";import"./AlignLeft-wEQoHPG1.js";import"./Image01-CL0MMQLW.js";import"./RefreshCcw01-BmEw-AJF.js";import"./Settings01-INMHtU3O.js";import"./useSuspenseInfiniteQuery-BZiNplHQ.js";import"./infiniteQueryObserver-DRvaqcVN.js";import"./Container-CyA59Hr6.js";const X=({size:e=24,color:t="currentColor",...i})=>j.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},j.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));X.displayName="LayoutRight";const Y=({size:e=24,color:t="currentColor",...i})=>j.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},j.createElement("path",{d:"m10 15-3.075 3.114c-.43.434-.644.651-.828.666a.5.5 0 0 1-.421-.172c-.12-.14-.12-.446-.12-1.056v-1.56c0-.548-.449-.944-.99-1.024v0a3 3 0 0 1-2.534-2.533C2 12.219 2 11.96 2 11.445V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h7.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C19 4.28 19 5.12 19 6.8V11m0 11-2.176-1.513c-.306-.213-.46-.32-.626-.395a2.002 2.002 0 0 0-.462-.145c-.18-.033-.367-.033-.74-.033H13.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C10 18.394 10 17.834 10 16.714V14.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C11.52 11 12.08 11 13.2 11h5.6c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 12.52 22 13.08 22 14.2v2.714c0 .932 0 1.398-.152 1.766a2 2 0 0 1-1.083 1.082c-.367.152-.833.152-1.765.152V22Z"}));Y.displayName="MessageChatSquare";function ue(e){const t=b.c(15),{agent:i}=e,{setVirtualMcpId:u}=U();let c;t[0]!==i.id||t[1]!==u?(c=()=>{u(i.id)},t[0]=i.id,t[1]=u,t[2]=c):c=t[2];const r=c;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=D("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[3]=m):m=t[3];const f=`Select agent ${i.title}`;let o;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Q,{size:20}),t[4]=o):o=t[4];let n;t[5]!==i.icon||t[6]!==i.title?(n=s.jsx(J,{icon:i.icon,name:i.title,fallbackIcon:o}),t[5]=i.icon,t[6]=i.title,t[7]=n):n=t[7];let l;t[8]!==i.title?(l=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),t[8]=i.title,t[9]=l):l=t[9];let a;return t[10]!==r||t[11]!==f||t[12]!==n||t[13]!==l?(a=s.jsxs("button",{type:"button",onClick:r,className:m,"aria-label":f,children:[n,l]}),t[10]=r,t[11]=f,t[12]=n,t[13]=l,t[14]=a):a=t[14],a}function xe(e){const t=b.c(14),{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:c}=e,[r,m]=j.useState(!1),f=j.useRef(null);let o,n;t[0]!==r?(o=()=>{r&&setTimeout(()=>{f.current?.focus()},0)},n=[r],t[0]=r,t[1]=o,t[2]=n):(o=t[1],n=t[2]),j.useEffect(o,n);let l;t[3]!==c?(l=N=>{c(N),m(!1)},t[3]=c,t[4]=l):l=t[4];const a=l;let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=D("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[5]=d):d=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ne,{asChild:!0,children:s.jsxs("button",{type:"button",className:d,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-lg bg-accent flex items-center justify-center shrink-0",children:s.jsx(pe,{size:24,className:"text-foreground"})}),s.jsx("p",{className:"text-sm text-foreground text-center leading-tight",children:"See all"})]})}),t[6]=p):p=t[6];let x;t[7]!==a||t[8]!==u||t[9]!==i?(x=s.jsx(ae,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(le,{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:a,searchInputRef:f})}),t[7]=a,t[8]=u,t[9]=i,t[10]=x):x=t[10];let A;return t[11]!==r||t[12]!==x?(A=s.jsxs(ce,{open:r,onOpenChange:m,children:[p,x]}),t[11]=r,t[12]=x,t[13]=A):A=t[13],A}function he(){const e=b.c(20),t=fe(),{selectedVirtualMcp:i,setVirtualMcpId:u}=U();let c,r,m,f,o,n;if(e[0]!==t){o=Symbol.for("react.early_return_sentinel");e:{const x=t.filter(be).slice(0,6);if(x.length===0){o=null;break e}n=t.map(ge),m="w-full max-w-[800px]",e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("h2",{className:"text-sm font-medium text-muted-foreground mb-4",children:"Recently used agents"}),e[7]=f):f=e[7],c="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",r=x.map(je)}e[0]=t,e[1]=c,e[2]=r,e[3]=m,e[4]=f,e[5]=o,e[6]=n}else c=e[1],r=e[2],m=e[3],f=e[4],o=e[5],n=e[6];if(o!==Symbol.for("react.early_return_sentinel"))return o;const l=i?.id??null;let a;e[8]!==u||e[9]!==l||e[10]!==n?(a=s.jsx(xe,{virtualMcps:n,selectedVirtualMcpId:l,onVirtualMcpChange:u}),e[8]=u,e[9]=l,e[10]=n,e[11]=a):a=e[11];let d;e[12]!==c||e[13]!==r||e[14]!==a?(d=s.jsxs("div",{className:c,children:[r,a]}),e[12]=c,e[13]=r,e[14]=a,e[15]=d):d=e[15];let p;return e[16]!==m||e[17]!==f||e[18]!==d?(p=s.jsxs("div",{className:m,children:[f,d]}),e[16]=m,e[17]=f,e[18]=d,e[19]=p):p=e[19],p}function je(e){return s.jsx(ue,{agent:e},e.id??"default")}function ge(e){return{id:e.id,title:e.title,description:e.description,icon:e.icon}}function be(e){return e.id!==null&&!me(e.id)}function Ne(){const e=b.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(q,{className:"h-5 w-40 mb-4"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"w-full max-w-[800px]",children:[t,s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",children:Array.from({length:7}).map(Ce)})]}),e[1]=i):i=e[1],i}function Ce(e,t){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 self-stretch",children:[s.jsx(q,{className:"size-6 rounded-md shrink-0"}),s.jsx(q,{className:"h-4 w-full"})]},t)}function ve(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(j.Suspense,{fallback:s.jsx(Ne,{}),children:s.jsx(he,{})}),e[0]=t):t=e[0],t}function Se(){const e=b.c(50),{org:t}=te(),{data:i}=se.useSession(),{modelsConnections:u,isChatEmpty:c,activeTaskId:r,tasks:m,selectedVirtualMcp:f}=oe();let o;if(e[0]!==r||e[1]!==m){let g;e[3]!==r?(g=P=>P.id===r,e[3]=r,e[4]=g):g=e[4],o=m.find(g),e[0]=r,e[1]=m,e[2]=o}else o=e[2];const n=o,[l,a]=j.useState(!1);let d;e[5]!==i?.user?.name?(d=i?.user?.name?.split(" ")[0]||"there",e[5]=i?.user?.name,e[6]=d):d=e[6];const p=d;let x;e[7]!==t.id?(x=de(t.id),e[7]=t.id,e[8]=x):x=e[8];const N=f??x;if(u.length===0){let g,P;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(R,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(G,{})}),P=s.jsx(F,{className:"bg-border/30"}),e[9]=g,e[10]=P):(g=e[9],P=e[10]);const W=l?50:80;let V;e[11]!==t?(V=s.jsx("div",{className:"flex flex-col h-full bg-background items-center justify-center",children:s.jsx(h.NoLlmBindingEmptyState,{org:t})}),e[11]=t,e[12]=V):V=e[12];let E;e[13]!==W||e[14]!==V?(E=s.jsx(R,{defaultSize:W,minSize:30,id:"main",order:2,children:V}),e[13]=W,e[14]=V,e[15]=E):E=e[15];let I;e[16]!==l?(I=l&&s.jsxs(s.Fragment,{children:[s.jsx(F,{className:"bg-border/30"}),s.jsx(R,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(Z,{onClose:()=>a(!1)})})]}),e[16]=l,e[17]=I):I=e[17];let B;return e[18]!==E||e[19]!==I?(B=s.jsxs(K,{direction:"horizontal",className:"size-full",children:[g,P,E,I]}),e[18]=E,e[19]=I,e[20]=B):B=e[20],B}let H,L;e[21]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(R,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(G,{})}),L=s.jsx(F,{className:"bg-border/30"}),e[21]=H,e[22]=L):(H=e[21],L=e[22]);const O=l?50:80;let C;e[23]!==n?(C=n?.title&&s.jsx(re,{taskId:n.id,text:n.title,className:"text-sm font-medium text-foreground"}),e[23]=n,e[24]=C):C=e[24];let v;e[25]!==C?(v=s.jsx($.Header.Left,{className:"gap-2",children:C}),e[25]=C,e[26]=v):v=e[26];let S;e[27]!==c||e[28]!==l?(S=!c&&s.jsx("button",{type:"button",onClick:()=>a(ye),className:D("flex size-7 items-center justify-center rounded-md border border-input hover:bg-accent transition-colors",l&&"bg-accent"),title:"Toggle context panel",children:s.jsx(X,{size:14,className:"text-muted-foreground"})}),e[27]=c,e[28]=l,e[29]=S):S=e[29];let y;e[30]!==S?(y=s.jsx($.Header.Right,{className:"gap-1",children:S}),e[30]=S,e[31]=y):y=e[31];let k;e[32]!==v||e[33]!==y?(k=s.jsxs($.Header,{className:"flex-none z-10 bg-background",children:[v,y]}),e[32]=v,e[33]=y,e[34]=k):k=e[34];let _;e[35]!==N||e[36]!==c||e[37]!==p?(_=c?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center px-10 pb-32 pt-10",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(J,{icon:N.icon,name:N.title,size:"md",fallbackIcon:s.jsx(Q,{size:20}),className:"size-12 rounded-xl border border-stone-200/60 shadow-sm aspect-square transition-opacity duration-200"})}),s.jsx("div",{className:"text-center mb-8",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",p,"?"]})}),s.jsx("div",{className:"w-full",children:s.jsx(h.Input,{})}),s.jsx(h.IceBreakers,{className:"w-full"})]}),s.jsx("div",{className:"flex flex-col items-center w-full mt-4",children:s.jsx(ve,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx(h.Main,{children:s.jsx(h.Messages,{})}),s.jsx(h.Footer,{children:s.jsx(h.Input,{onOpenContextPanel:()=>a(!0)})})]}),e[35]=N,e[36]=c,e[37]=p,e[38]=_):_=e[38];let z;e[39]!==k||e[40]!==_?(z=s.jsxs(h,{className:"h-full bg-background",children:[k,_]}),e[39]=k,e[40]=_,e[41]=z):z=e[41];let w;e[42]!==z||e[43]!==O?(w=s.jsx(R,{defaultSize:O,minSize:30,id:"main",order:2,children:z}),e[42]=z,e[43]=O,e[44]=w):w=e[44];let M;e[45]!==l?(M=l&&s.jsxs(s.Fragment,{children:[s.jsx(F,{className:"bg-border/30"}),s.jsx(R,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(Z,{onClose:()=>a(!1)})})]}),e[45]=l,e[46]=M):M=e[46];let T;return e[47]!==w||e[48]!==M?(T=s.jsxs(K,{direction:"horizontal",className:"size-full",children:[H,L,w,M]}),e[47]=w,e[48]=M,e[49]=T):T=e[49],T}function ye(e){return!e}function ke(e){const t=b.c(14),{error:i,onRetry:u}=e,c=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs($.Header,{className:"flex-none",children:[s.jsx($.Header.Left,{className:"gap-2"}),s.jsx($.Header.Right,{className:"gap-1"})]}),t[0]=r):r=t[0];let m;t[1]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(Y,{className:"h-6 w-6 text-destructive"})}),t[1]=m):m=t[1];const f=c?"Unable to load models":"Something went wrong";let o;t[2]!==f?(o=s.jsx("h3",{className:"text-lg font-medium",children:f}),t[2]=f,t[3]=o):o=t[3];const n=c?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":i?.message||"An unexpected error occurred";let l;t[4]!==n?(l=s.jsx("p",{className:"text-sm text-muted-foreground",children:n}),t[4]=n,t[5]=l):l=t[5];let a;t[6]!==o||t[7]!==l?(a=s.jsxs("div",{className:"space-y-2",children:[o,l]}),t[6]=o,t[7]=l,t[8]=a):a=t[8];let d;t[9]!==u?(d=s.jsx(ie,{variant:"outline",onClick:u,children:"Try again"}),t[9]=u,t[10]=d):d=t[10];let p;return t[11]!==a||t[12]!==d?(p=s.jsxs(h,{children:[r,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[m,a,d]})})]}),t[11]=a,t[12]=d,t[13]=p):p=t[13],p}function Qt(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ee,{fallback:_e,children:s.jsx(j.Suspense,{fallback:s.jsx(h.Skeleton,{}),children:s.jsx(Se,{})})}),e[0]=t):t=e[0],t}function _e(e){const{error:t,resetError:i}=e;return s.jsx(ke,{error:t,onRetry:i})}export{Qt as default};
|
|
1
|
+
import{r as j,c as b,j as s,v as D,E as ee,u as te,d as se,B as ie}from"./index-DcA4vgYb.js";import{V as le,C as h}from"./index-AGGQRNyj.js";import{E as re,C as Z}from"./editable-task-title-CUKGptEM.js";import{a as G}from"./tasks-panel-OQEuuX3Q.js";import{u as U,a as oe}from"./collapsible-B7E35viJ.js";import{I as J}from"./integration-icon-B8yOf85-.js";import{b as ne,P as ae,a as ce}from"./popover-CFtuZWTF.js";import{S as q}from"./skeleton-BgSJw0Uk.js";import{i as me,d as de}from"./constants-w3KRiYJo.js";import{b as fe}from"./use-virtual-mcp-CQ2Ty1y5.js";import{i as pe}from"./ChevronRight-6Ka7FsE_.js";import{t as Q}from"./Users03-DBePAF2b.js";import{P as $}from"./index-CpVmTHFl.js";import{R,a as F,b as K}from"./resizable-BrSAj6aj.js";import"./spinner-BFdPnmxp.js";import"./tooltip-DUANF8DJ.js";import"./index-D_NXq9UK.js";import"./decopilot-events-Cb2QSfqq.js";import"./useQuery-Dai3ahZF.js";import"./dialog-B3CFSIOO.js";import"./X-BYuMngbe.js";import"./form-CMmr8Vur.js";import"./label-lJUQWqvH.js";import"./input-D7fS8yTo.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-B6DuZEj0.js";import"./ChevronDown-Dp9wV5PD.js";import"./Edit01-DUtQu9mf.js";import"./Lock01-mdeil4MX.js";import"./XCircle-DZD5coKl.js";import"./AlertCircle-BxY5fiQL.js";import"./select-BRkHXmU6.js";import"./Check-DM0R80Lx.js";import"./tabs-BAToYNio.js";import"./localstorage-keys-BIium7Ac.js";import"./useMutation-DIe-HSDV.js";import"./ArrowLeft-OWT1EQHI.js";import"./use-copy-DDPxg72B.js";import"./badge-BaNY-OL6.js";import"./Code01-HNFEPIid.js";import"./SearchMd-5eCpIbcV.js";import"./use-create-virtual-mcp-BpvZ6OCv.js";import"./use-mcp-resources-DvYdgtLO.js";import"./Copy01-CTK5kHSt.js";import"./marked.esm-BaswSlok.js";import"./markdown-CesmJxNj.js";import"./mcp-app-renderer-Dy6Buo8R.js";import"./types-BINr8MaA.js";import"./Eye-CjFHW7ES.js";import"./Globe02-YpZUlJ3c.js";import"./LayersTwo01-BbZmd_ZN.js";import"./XClose-BmWaDPIJ.js";import"./collection-search-DdGB2-83.js";import"./Loading01-BhNIqpDS.js";import"./use-connection-C9-04knk.js";import"./use-collections-CpcuwtcR.js";import"./generate-id-Dyweu44Y.js";import"./Clock-kspY5z1L.js";import"./Trash01-DvB3pKWW.js";import"./CheckCircle-PmTT8Oda.js";import"./ChevronLeft-urjZe_Dn.js";import"./user-Cb5fO1qN.js";import"./avatar-B7exWPCY.js";import"./format-time-CMKyl-GC.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./Plus-C1MNvAXK.js";import"./dropdown-menu-D2rSYXT0.js";import"./use-llm-DxLpP73s.js";import"./use-binding-CDDSoaxw.js";import"./binder-CV13fD1Q.js";import"./checkbox-ThaJpOaj.js";import"./AlignLeft-CYD2I4vb.js";import"./Image01-CPB4EwHT.js";import"./RefreshCcw01-Ca9tzvK2.js";import"./Settings01-D7NZCzIn.js";import"./useSuspenseInfiniteQuery-Dm0CBTiz.js";import"./infiniteQueryObserver-UxwYssQv.js";import"./Container-DlkaR-ky.js";const X=({size:e=24,color:t="currentColor",...i})=>j.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},j.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));X.displayName="LayoutRight";const Y=({size:e=24,color:t="currentColor",...i})=>j.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},j.createElement("path",{d:"m10 15-3.075 3.114c-.43.434-.644.651-.828.666a.5.5 0 0 1-.421-.172c-.12-.14-.12-.446-.12-1.056v-1.56c0-.548-.449-.944-.99-1.024v0a3 3 0 0 1-2.534-2.533C2 12.219 2 11.96 2 11.445V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h7.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C19 4.28 19 5.12 19 6.8V11m0 11-2.176-1.513c-.306-.213-.46-.32-.626-.395a2.002 2.002 0 0 0-.462-.145c-.18-.033-.367-.033-.74-.033H13.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C10 18.394 10 17.834 10 16.714V14.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C11.52 11 12.08 11 13.2 11h5.6c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 12.52 22 13.08 22 14.2v2.714c0 .932 0 1.398-.152 1.766a2 2 0 0 1-1.083 1.082c-.367.152-.833.152-1.765.152V22Z"}));Y.displayName="MessageChatSquare";function ue(e){const t=b.c(15),{agent:i}=e,{setVirtualMcpId:u}=U();let c;t[0]!==i.id||t[1]!==u?(c=()=>{u(i.id)},t[0]=i.id,t[1]=u,t[2]=c):c=t[2];const r=c;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=D("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[3]=m):m=t[3];const f=`Select agent ${i.title}`;let o;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Q,{size:20}),t[4]=o):o=t[4];let n;t[5]!==i.icon||t[6]!==i.title?(n=s.jsx(J,{icon:i.icon,name:i.title,fallbackIcon:o}),t[5]=i.icon,t[6]=i.title,t[7]=n):n=t[7];let l;t[8]!==i.title?(l=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),t[8]=i.title,t[9]=l):l=t[9];let a;return t[10]!==r||t[11]!==f||t[12]!==n||t[13]!==l?(a=s.jsxs("button",{type:"button",onClick:r,className:m,"aria-label":f,children:[n,l]}),t[10]=r,t[11]=f,t[12]=n,t[13]=l,t[14]=a):a=t[14],a}function xe(e){const t=b.c(14),{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:c}=e,[r,m]=j.useState(!1),f=j.useRef(null);let o,n;t[0]!==r?(o=()=>{r&&setTimeout(()=>{f.current?.focus()},0)},n=[r],t[0]=r,t[1]=o,t[2]=n):(o=t[1],n=t[2]),j.useEffect(o,n);let l;t[3]!==c?(l=N=>{c(N),m(!1)},t[3]=c,t[4]=l):l=t[4];const a=l;let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=D("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[5]=d):d=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ne,{asChild:!0,children:s.jsxs("button",{type:"button",className:d,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-lg bg-accent flex items-center justify-center shrink-0",children:s.jsx(pe,{size:24,className:"text-foreground"})}),s.jsx("p",{className:"text-sm text-foreground text-center leading-tight",children:"See all"})]})}),t[6]=p):p=t[6];let x;t[7]!==a||t[8]!==u||t[9]!==i?(x=s.jsx(ae,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(le,{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:a,searchInputRef:f})}),t[7]=a,t[8]=u,t[9]=i,t[10]=x):x=t[10];let A;return t[11]!==r||t[12]!==x?(A=s.jsxs(ce,{open:r,onOpenChange:m,children:[p,x]}),t[11]=r,t[12]=x,t[13]=A):A=t[13],A}function he(){const e=b.c(20),t=fe(),{selectedVirtualMcp:i,setVirtualMcpId:u}=U();let c,r,m,f,o,n;if(e[0]!==t){o=Symbol.for("react.early_return_sentinel");e:{const x=t.filter(be).slice(0,6);if(x.length===0){o=null;break e}n=t.map(ge),m="w-full max-w-[800px]",e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("h2",{className:"text-sm font-medium text-muted-foreground mb-4",children:"Recently used agents"}),e[7]=f):f=e[7],c="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",r=x.map(je)}e[0]=t,e[1]=c,e[2]=r,e[3]=m,e[4]=f,e[5]=o,e[6]=n}else c=e[1],r=e[2],m=e[3],f=e[4],o=e[5],n=e[6];if(o!==Symbol.for("react.early_return_sentinel"))return o;const l=i?.id??null;let a;e[8]!==u||e[9]!==l||e[10]!==n?(a=s.jsx(xe,{virtualMcps:n,selectedVirtualMcpId:l,onVirtualMcpChange:u}),e[8]=u,e[9]=l,e[10]=n,e[11]=a):a=e[11];let d;e[12]!==c||e[13]!==r||e[14]!==a?(d=s.jsxs("div",{className:c,children:[r,a]}),e[12]=c,e[13]=r,e[14]=a,e[15]=d):d=e[15];let p;return e[16]!==m||e[17]!==f||e[18]!==d?(p=s.jsxs("div",{className:m,children:[f,d]}),e[16]=m,e[17]=f,e[18]=d,e[19]=p):p=e[19],p}function je(e){return s.jsx(ue,{agent:e},e.id??"default")}function ge(e){return{id:e.id,title:e.title,description:e.description,icon:e.icon}}function be(e){return e.id!==null&&!me(e.id)}function Ne(){const e=b.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(q,{className:"h-5 w-40 mb-4"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"w-full max-w-[800px]",children:[t,s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",children:Array.from({length:7}).map(Ce)})]}),e[1]=i):i=e[1],i}function Ce(e,t){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 self-stretch",children:[s.jsx(q,{className:"size-6 rounded-md shrink-0"}),s.jsx(q,{className:"h-4 w-full"})]},t)}function ve(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(j.Suspense,{fallback:s.jsx(Ne,{}),children:s.jsx(he,{})}),e[0]=t):t=e[0],t}function Se(){const e=b.c(50),{org:t}=te(),{data:i}=se.useSession(),{modelsConnections:u,isChatEmpty:c,activeTaskId:r,tasks:m,selectedVirtualMcp:f}=oe();let o;if(e[0]!==r||e[1]!==m){let g;e[3]!==r?(g=P=>P.id===r,e[3]=r,e[4]=g):g=e[4],o=m.find(g),e[0]=r,e[1]=m,e[2]=o}else o=e[2];const n=o,[l,a]=j.useState(!1);let d;e[5]!==i?.user?.name?(d=i?.user?.name?.split(" ")[0]||"there",e[5]=i?.user?.name,e[6]=d):d=e[6];const p=d;let x;e[7]!==t.id?(x=de(t.id),e[7]=t.id,e[8]=x):x=e[8];const N=f??x;if(u.length===0){let g,P;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(R,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(G,{})}),P=s.jsx(F,{className:"bg-border/30"}),e[9]=g,e[10]=P):(g=e[9],P=e[10]);const W=l?50:80;let V;e[11]!==t?(V=s.jsx("div",{className:"flex flex-col h-full bg-background items-center justify-center",children:s.jsx(h.NoLlmBindingEmptyState,{org:t})}),e[11]=t,e[12]=V):V=e[12];let E;e[13]!==W||e[14]!==V?(E=s.jsx(R,{defaultSize:W,minSize:30,id:"main",order:2,children:V}),e[13]=W,e[14]=V,e[15]=E):E=e[15];let I;e[16]!==l?(I=l&&s.jsxs(s.Fragment,{children:[s.jsx(F,{className:"bg-border/30"}),s.jsx(R,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(Z,{onClose:()=>a(!1)})})]}),e[16]=l,e[17]=I):I=e[17];let B;return e[18]!==E||e[19]!==I?(B=s.jsxs(K,{direction:"horizontal",className:"size-full",children:[g,P,E,I]}),e[18]=E,e[19]=I,e[20]=B):B=e[20],B}let H,L;e[21]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(R,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(G,{})}),L=s.jsx(F,{className:"bg-border/30"}),e[21]=H,e[22]=L):(H=e[21],L=e[22]);const O=l?50:80;let C;e[23]!==n?(C=n?.title&&s.jsx(re,{taskId:n.id,text:n.title,className:"text-sm font-medium text-foreground"}),e[23]=n,e[24]=C):C=e[24];let v;e[25]!==C?(v=s.jsx($.Header.Left,{className:"gap-2",children:C}),e[25]=C,e[26]=v):v=e[26];let S;e[27]!==c||e[28]!==l?(S=!c&&s.jsx("button",{type:"button",onClick:()=>a(ye),className:D("flex size-7 items-center justify-center rounded-md border border-input hover:bg-accent transition-colors",l&&"bg-accent"),title:"Toggle context panel",children:s.jsx(X,{size:14,className:"text-muted-foreground"})}),e[27]=c,e[28]=l,e[29]=S):S=e[29];let y;e[30]!==S?(y=s.jsx($.Header.Right,{className:"gap-1",children:S}),e[30]=S,e[31]=y):y=e[31];let k;e[32]!==v||e[33]!==y?(k=s.jsxs($.Header,{className:"flex-none z-10 bg-background",children:[v,y]}),e[32]=v,e[33]=y,e[34]=k):k=e[34];let _;e[35]!==N||e[36]!==c||e[37]!==p?(_=c?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center px-10 pb-32 pt-10",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(J,{icon:N.icon,name:N.title,size:"md",fallbackIcon:s.jsx(Q,{size:20}),className:"size-12 rounded-xl border border-stone-200/60 shadow-sm aspect-square transition-opacity duration-200"})}),s.jsx("div",{className:"text-center mb-8",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",p,"?"]})}),s.jsx("div",{className:"w-full",children:s.jsx(h.Input,{})}),s.jsx(h.IceBreakers,{className:"w-full"})]}),s.jsx("div",{className:"flex flex-col items-center w-full mt-4",children:s.jsx(ve,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx(h.Main,{children:s.jsx(h.Messages,{})}),s.jsx(h.Footer,{children:s.jsx(h.Input,{onOpenContextPanel:()=>a(!0)})})]}),e[35]=N,e[36]=c,e[37]=p,e[38]=_):_=e[38];let z;e[39]!==k||e[40]!==_?(z=s.jsxs(h,{className:"h-full bg-background",children:[k,_]}),e[39]=k,e[40]=_,e[41]=z):z=e[41];let w;e[42]!==z||e[43]!==O?(w=s.jsx(R,{defaultSize:O,minSize:30,id:"main",order:2,children:z}),e[42]=z,e[43]=O,e[44]=w):w=e[44];let M;e[45]!==l?(M=l&&s.jsxs(s.Fragment,{children:[s.jsx(F,{className:"bg-border/30"}),s.jsx(R,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(Z,{onClose:()=>a(!1)})})]}),e[45]=l,e[46]=M):M=e[46];let T;return e[47]!==w||e[48]!==M?(T=s.jsxs(K,{direction:"horizontal",className:"size-full",children:[H,L,w,M]}),e[47]=w,e[48]=M,e[49]=T):T=e[49],T}function ye(e){return!e}function ke(e){const t=b.c(14),{error:i,onRetry:u}=e,c=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs($.Header,{className:"flex-none",children:[s.jsx($.Header.Left,{className:"gap-2"}),s.jsx($.Header.Right,{className:"gap-1"})]}),t[0]=r):r=t[0];let m;t[1]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(Y,{className:"h-6 w-6 text-destructive"})}),t[1]=m):m=t[1];const f=c?"Unable to load models":"Something went wrong";let o;t[2]!==f?(o=s.jsx("h3",{className:"text-lg font-medium",children:f}),t[2]=f,t[3]=o):o=t[3];const n=c?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":i?.message||"An unexpected error occurred";let l;t[4]!==n?(l=s.jsx("p",{className:"text-sm text-muted-foreground",children:n}),t[4]=n,t[5]=l):l=t[5];let a;t[6]!==o||t[7]!==l?(a=s.jsxs("div",{className:"space-y-2",children:[o,l]}),t[6]=o,t[7]=l,t[8]=a):a=t[8];let d;t[9]!==u?(d=s.jsx(ie,{variant:"outline",onClick:u,children:"Try again"}),t[9]=u,t[10]=d):d=t[10];let p;return t[11]!==a||t[12]!==d?(p=s.jsxs(h,{children:[r,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[m,a,d]})})]}),t[11]=a,t[12]=d,t[13]=p):p=t[13],p}function Qt(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ee,{fallback:_e,children:s.jsx(j.Suspense,{fallback:s.jsx(h.Skeleton,{}),children:s.jsx(Se,{})})}),e[0]=t):t=e[0],t}function _e(e){const{error:t,resetError:i}=e;return s.jsx(ke,{error:t,onRetry:i})}export{Qt as default};
|