@decocms/mesh 2.139.3 → 2.139.5
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-M_vDM06X.js → AlertCircle-DxE1CFMy.js} +1 -1
- package/dist/client/assets/{AlignLeft-BPVTL7Lg.js → AlignLeft-BmaGu1FK.js} +1 -1
- package/dist/client/assets/{ArrowDown-C0AHT6Se.js → ArrowDown-D1jGbXdS.js} +1 -1
- package/dist/client/assets/{ArrowLeft-uXw4hDrl.js → ArrowLeft-Cj3rlVid.js} +1 -1
- package/dist/client/assets/{ArrowUp-D3L33LOK.js → ArrowUp-BlFtnyf3.js} +1 -1
- package/dist/client/assets/{Check-DhJrraz0.js → Check-BYEmwnWo.js} +1 -1
- package/dist/client/assets/{CheckCircle-CHWgGReR.js → CheckCircle-pyP6FuBr.js} +1 -1
- package/dist/client/assets/{CheckDone01-t8ZCK-7w.js → CheckDone01-92MVMFwa.js} +1 -1
- package/dist/client/assets/{CheckVerified02-BkcCiKst.js → CheckVerified02-JCyhk2MV.js} +1 -1
- package/dist/client/assets/{ChevronDown-DF3whIkz.js → ChevronDown-CMnFLAn0.js} +1 -1
- package/dist/client/assets/{ChevronLeft-wqObUnTJ.js → ChevronLeft-DXPxIaFa.js} +1 -1
- package/dist/client/assets/{ChevronRight-TdWXpEIC.js → ChevronRight-BLexx0Qt.js} +1 -1
- package/dist/client/assets/{Clock-BtVgm0vZ.js → Clock-DMiog_Cv.js} +1 -1
- package/dist/client/assets/{Code01-DpgekTbT.js → Code01-Dz5rksvK.js} +1 -1
- package/dist/client/assets/{Container-C5O_vd5l.js → Container-C2fyu03W.js} +1 -1
- package/dist/client/assets/{Copy01-DdgoiM5k.js → Copy01-D1aG80p5.js} +1 -1
- package/dist/client/assets/{Dataflow03-NGApWH5q.js → Dataflow03-D-Wxrb9j.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-BdcComsR.js → DotsHorizontal-DHWYk1G-.js} +1 -1
- package/dist/client/assets/{DotsVertical-DngStBCK.js → DotsVertical-C5Mnj-Ol.js} +1 -1
- package/dist/client/assets/{Download01-m8eiGYWG.js → Download01-CI1dt-NN.js} +1 -1
- package/dist/client/assets/{Edit01-aQW4vCf2.js → Edit01-C-2hPhWx.js} +1 -1
- package/dist/client/assets/{Edit05-eAle7eYX.js → Edit05-CWoWTf45.js} +1 -1
- package/dist/client/assets/{Eye-D7EUKcSA.js → Eye-Ce2mviev.js} +1 -1
- package/dist/client/assets/{File02-BgWATqR8.js → File02-pVr1U-OF.js} +1 -1
- package/dist/client/assets/{File06-CGYk4Mh5.js → File06-BK-vLttV.js} +1 -1
- package/dist/client/assets/{FilterLines-BJ0Gbspi.js → FilterLines-jkgQLqbS.js} +1 -1
- package/dist/client/assets/{Globe01-Dl836bGy.js → Globe01-DGUbGV_n.js} +1 -1
- package/dist/client/assets/{Globe02-Cwg0aLD6.js → Globe02-RBoq6mDE.js} +1 -1
- package/dist/client/assets/{Grid01-BWhQjjDh.js → Grid01-BL7E3ovv.js} +1 -1
- package/dist/client/assets/{Hash02-CcdmiUse.js → Hash02-DzGoDYhz.js} +1 -1
- package/dist/client/assets/{Home02-ChdqVBjn.js → Home02-AgZra9X3.js} +1 -1
- package/dist/client/assets/{Image01-BLdmiwkG.js → Image01-DvRAFLxZ.js} +1 -1
- package/dist/client/assets/{Inbox01-CGne0tMp.js → Inbox01-50IITj70.js} +1 -1
- package/dist/client/assets/{InfoCircle-C7xGlw8n.js → InfoCircle-aQM6BbNx.js} +1 -1
- package/dist/client/assets/{Key01-KqOK513j.js → Key01-BsI-G9kQ.js} +1 -1
- package/dist/client/assets/{LayersTwo01-C9Qwrse5.js → LayersTwo01-UOO88lfR.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Dtb_1Jp2.js → LayoutLeft-B3YkuHoY.js} +1 -1
- package/dist/client/assets/{Link01-DdTCH4v9.js → Link01-BVEdynBS.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CcLhJWrG.js → LinkExternal01-CWRjzwRB.js} +1 -1
- package/dist/client/assets/{List-CqTZ79z9.js → List-DXYRXNTE.js} +1 -1
- package/dist/client/assets/{Loading01-f9s2h1wv.js → Loading01-C3DKwOFI.js} +1 -1
- package/dist/client/assets/{Lock01-B-0IEcXK.js → Lock01-C3eOG6EW.js} +1 -1
- package/dist/client/assets/{Play-BoKAVToz.js → Play-y2tixZXd.js} +1 -1
- package/dist/client/assets/{Plus-BXkHOQsb.js → Plus-Dcmwoj2g.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-p39bp66R.js → RefreshCcw01-CgBMQrzN.js} +1 -1
- package/dist/client/assets/{Save01-DxAaB8Dn.js → Save01-w2BzILAu.js} +1 -1
- package/dist/client/assets/{SearchMd-195kdrrc.js → SearchMd-fcNN21Gr.js} +1 -1
- package/dist/client/assets/{Settings01-CO9ZR5u9.js → Settings01-3u2Bow8z.js} +1 -1
- package/dist/client/assets/{Shield01-CitF2_Bx.js → Shield01-CpD-WiM3.js} +1 -1
- package/dist/client/assets/{Terminal-BI8lk715.js → Terminal-FhA4_WQ3.js} +1 -1
- package/dist/client/assets/{Trash01-BPU7sU05.js → Trash01-XEPfiPr3.js} +1 -1
- package/dist/client/assets/{Upload01-CvIv0y_p.js → Upload01-h0zHEm3f.js} +1 -1
- package/dist/client/assets/{Users03-DVX3bbcm.js → Users03-DwIioFDR.js} +1 -1
- package/dist/client/assets/{X-DO1ZPMDK.js → X-V73kIsj3.js} +1 -1
- package/dist/client/assets/{XCircle-YMmdzMOW.js → XCircle-Cw9JLXtH.js} +1 -1
- package/dist/client/assets/{XClose-BKL3EMXH.js → XClose-C-ng7L1S.js} +1 -1
- package/dist/client/assets/{Zap-DRU6cySW.js → Zap-BlA8TkHM.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-v1h44iHE.js → agent-connections-preview-6CDLrKwL.js} +1 -1
- package/dist/client/assets/{agent-detail-B4KXmiS-.js → agent-detail-BvFfcOtI.js} +1 -1
- package/dist/client/assets/{agents-DUYxE1v-.js → agents-BxWYMmHe.js} +1 -1
- package/dist/client/assets/{alert-dialog-NBgR76Yp.js → alert-dialog-B7P1Xx2P.js} +1 -1
- package/dist/client/assets/{auth-catchall-BkY6XTqn.js → auth-catchall-P7HFweyn.js} +1 -1
- package/dist/client/assets/{avatar-CSPJYHbS.js → avatar-CcqnmiIz.js} +1 -1
- package/dist/client/assets/{badge-KDRqEGRi.js → badge-B3PuW_EW.js} +1 -1
- package/dist/client/assets/{binder-DlLVJxi6.js → binder-BgtZdYDd.js} +1 -1
- package/dist/client/assets/{breadcrumb-Djkz23vb.js → breadcrumb-C83RhVbl.js} +1 -1
- package/dist/client/assets/{card-D-rpkLYG.js → card-mroijQho.js} +1 -1
- package/dist/client/assets/{chart-BKDAOT1r.js → chart-C0uy8DRt.js} +1 -1
- package/dist/client/assets/{checkbox-DY4RVI9F.js → checkbox-D8wFdX1G.js} +1 -1
- package/dist/client/assets/{circle-alert-Bbr8JHad.js → circle-alert-lXsaSI5q.js} +1 -1
- package/dist/client/assets/{collapsible-D8z9g1MN.js → collapsible-BtdS9TOE.js} +5 -5
- package/dist/client/assets/{collection-detail-DxQo_ZG8.js → collection-detail-BzVA1NzZ.js} +1 -1
- package/dist/client/assets/{collection-display-button-095BNnmg.js → collection-display-button-DRrGPN0E.js} +1 -1
- package/dist/client/assets/{collection-search-CRbc4DEy.js → collection-search-BIoOOBZ6.js} +1 -1
- package/dist/client/assets/{collection-tab-BaVME9h1.js → collection-tab-DqYMGC3r.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DqKxtjgj.js → collection-table-wrapper-DK6wDujb.js} +1 -1
- package/dist/client/assets/{collection-tabs-DvbR35T7.js → collection-tabs-7S4tszcZ.js} +1 -1
- package/dist/client/assets/{command-Deql40ij.js → command-0etsDI49.js} +1 -1
- package/dist/client/assets/{connect-CFEdZ_yc.js → connect-n4c9bfZL.js} +1 -1
- package/dist/client/assets/{connection-card-D3LRvC6Z.js → connection-card-yurGAkO8.js} +1 -1
- package/dist/client/assets/{connection-detail-AatE-8EW.js → connection-detail-BVnuFuFx.js} +1 -1
- package/dist/client/assets/{connection-status-tnMJ5LrM.js → connection-status-Bt5nL8KO.js} +1 -1
- package/dist/client/assets/{connections-CrRorVhD.js → connections-zIUAT5xu.js} +1 -1
- package/dist/client/assets/constants-CoYp9Khb.js +1 -0
- package/dist/client/assets/{constants-P4PVvchD.js → constants-DamjJgLK.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-DeHgw2r6.js → create-organization-dialog-CTIhJJbe.js} +1 -1
- package/dist/client/assets/{create-project-dialog-BR1WnOn3.js → create-project-dialog-BPaIOHbb.js} +1 -1
- package/dist/client/assets/{danger-BcasZcHx.js → danger-DZFTmX3S.js} +1 -1
- package/dist/client/assets/{danger-zone-lGF1n9Js.js → danger-zone-CgtuLtb1.js} +1 -1
- package/dist/client/assets/{decopilot-events-BKM3OJ_e.js → decopilot-events-BvaPj3KQ.js} +1 -1
- package/dist/client/assets/{dependencies-C1lxz-K7.js → dependencies-Cu7hhI8n.js} +1 -1
- package/dist/client/assets/{dialog-CgD1R6sd.js → dialog-mVAXjnwm.js} +1 -1
- package/dist/client/assets/{dropdown-menu-fntgBKzW.js → dropdown-menu-ALsN-pVk.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-ZebFN00-.js → dynamic-plugin-layout-CTDiJSEV.js} +1 -1
- package/dist/client/assets/{editable-task-title-DPHjdMNk.js → editable-task-title-BaFw9xei.js} +1 -1
- package/dist/client/assets/{empty-state-BgUzJrfv.js → empty-state-Di_n6NJK.js} +1 -1
- package/dist/client/assets/{env-vars-editor-h4ys9I0Q.js → env-vars-editor-C6V3AsRh.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DMHxmYCR.js → extract-connection-data-DrsypHV1.js} +1 -1
- package/dist/client/assets/{file-browser-tpKJqOem.js → file-browser-jwULGhe4.js} +2 -2
- package/dist/client/assets/{form-CdDRR2LD.js → form-CU5HDQFC.js} +1 -1
- package/dist/client/assets/{general-BcfZa0RV.js → general-DUHgQYkU.js} +1 -1
- package/dist/client/assets/{grid-view-sFCv8Uqb.js → grid-view-DUznC5Gs.js} +1 -1
- package/dist/client/assets/{home-DLSfiDzf.js → home-NgJQ2EsR.js} +1 -1
- package/dist/client/assets/{icon-picker-Cnfw2xPr.js → icon-picker-Bvic5Z9l.js} +1 -1
- package/dist/client/assets/{index-CS60M-lN.js → index--H4S-htG.js} +46 -46
- package/dist/client/assets/{index-D-htvwK7.js → index-B57CuSVv.js} +3 -3
- package/dist/client/assets/{index-DMRPqDGw.js → index-Bes18yjv.js} +1 -1
- package/dist/client/assets/{index-DwOzHQTE.js → index-D4fBp4Zp.js} +1 -1
- package/dist/client/assets/index-DWUPqd__.js +1 -0
- package/dist/client/assets/{index-eiswKdro.js → index-DhA_Z8w_.js} +1 -1
- package/dist/client/assets/{index-03O1pmQL.js → index-DwSSkF0d.js} +1 -1
- package/dist/client/assets/{index-jcoT9kFz.js → index-PbsRJchQ.js} +1 -1
- package/dist/client/assets/{index-ClqqZs3X.js → index-WfivvnSW.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DuuHSt2c.js → infiniteQueryObserver-C3tGBnJO.js} +1 -1
- package/dist/client/assets/{input-BSTFqIOK.js → input-D2SfEJvf.js} +1 -1
- package/dist/client/assets/{integration-icon-Dhxeif96.js → integration-icon-EqK5mfs3.js} +1 -1
- package/dist/client/assets/{label-LNmGa3p2.js → label-DKwFCpFF.js} +1 -1
- package/dist/client/assets/{layout-o3US39xJ.js → layout-BSqUhHM9.js} +1 -1
- package/dist/client/assets/{layout-Cr68mJKX.js → layout-Bq6Myxaz.js} +1 -1
- package/dist/client/assets/{localstorage-keys-CnuA12nM.js → localstorage-keys-BJmhHKWF.js} +1 -1
- package/dist/client/assets/{login-Dtyhtjmx.js → login-DSF1cjKT.js} +1 -1
- package/dist/client/assets/{markdown-7_Q9oy6X.js → markdown-DvqaxoJ5.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DTCug0hq.js → mcp-app-renderer-aJB6fBaU.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DIzWYxTe.js → mcp-oauth-2wHFylg7.js} +1 -1
- package/dist/client/assets/{mcp-server-card-CWrVyxhZ.js → mcp-server-card-Cn2H83vH.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-BCWsEtk3.js → mcp-server-detail-lE0pGp29.js} +2 -2
- package/dist/client/assets/{members-BNvy-9dg.js → members-BuImI7ND.js} +1 -1
- package/dist/client/assets/{monaco-editor-D3oYOUgK.js → monaco-editor-SwsEpKlB.js} +4 -4
- package/dist/client/assets/{monitoring-O-i3Zgvs.js → monitoring-Bv_Wv80X.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-DICpgu4d.js → monitoring-dashboard-edit-BylDvYg8.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-CESwm42A.js → monitoring-dashboard-view-B_pJVrrS.js} +1 -1
- package/dist/client/assets/{oauth-callback-DpqL6SB9.js → oauth-callback-C-xmbOsV.js} +1 -1
- package/dist/client/assets/{page-CXJk9Ut5.js → page-BKSN9Drl.js} +1 -1
- package/dist/client/assets/page-CZPmUSlO.js +1 -0
- package/dist/client/assets/{plugin-empty-state-C-A808mR.js → plugin-empty-state-HOq_q80n.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-C6dQF47Z.js → plugin-empty-state-bxl1dMqp.js} +1 -1
- package/dist/client/assets/{plugin-header-C0Yd_CZi.js → plugin-header-BAMV4zF5.js} +1 -1
- package/dist/client/assets/{plugin-header-D0x1sxLc.js → plugin-header-QZiviPcF.js} +1 -1
- package/dist/client/assets/plugins-i1Oy0JXC.js +1 -0
- package/dist/client/assets/{popover-DXIC1-bw.js → popover-m7Ex_T4a.js} +1 -1
- package/dist/client/assets/{project-app-view-xR_h2zD7.js → project-app-view-B5ftO9lL.js} +1 -1
- package/dist/client/assets/{project-layout-H5_8u4_Q.js → project-layout-Cyq8TAkW.js} +1 -1
- package/dist/client/assets/{project-plugins-CjYskV4q.js → project-plugins-CUAz7I1S.js} +1 -1
- package/dist/client/assets/{projects-list-BGFm_ckP.js → projects-list-CFlzXalM.js} +1 -1
- package/dist/client/assets/{readme-viewer-B4AR77I_.js → readme-viewer-RNjSBydu.js} +1 -1
- package/dist/client/assets/{registry-layout-CbovzAcU.js → registry-layout-CFyEhu7d.js} +1 -1
- package/dist/client/assets/{registry-utils-CdFhHdcR.js → registry-utils-lWflqbtn.js} +1 -1
- package/dist/client/assets/{reports-layout-DZZ6JpS5.js → reports-layout-B8k-uVLv.js} +1 -1
- package/dist/client/assets/{reset-password-YnbsVy6R.js → reset-password-B4M2Vb6F.js} +1 -1
- package/dist/client/assets/{resizable-DhZ4OF4a.js → resizable-K428TivC.js} +1 -1
- package/dist/client/assets/{save-actions-D9BU7-6K.js → save-actions-2xQESr_o.js} +1 -1
- package/dist/client/assets/{scroll-area-DgGHH6RH.js → scroll-area-Cqx-FPbb.js} +1 -1
- package/dist/client/assets/{select-CrOlaxCO.js → select-DCJCMvYp.js} +1 -1
- package/dist/client/assets/{shell-layout-DPeqU-6v.js → shell-layout--yAC8J-z.js} +2 -2
- package/dist/client/assets/{sidebar-settings-Auqs2XAg.js → sidebar-settings-C_UAuILZ.js} +1 -1
- package/dist/client/assets/{skeleton-DML2aQA-.js → skeleton-Cka0I_g-.js} +1 -1
- package/dist/client/assets/{spinner-cdL_Fmz-.js → spinner-BFxrY61u.js} +1 -1
- package/dist/client/assets/{store-invite-DmN5PmIw.js → store-invite-DJ8WM3ac.js} +1 -1
- package/dist/client/assets/{switch-CAg0B_Rv.js → switch-DYDtUk6R.js} +1 -1
- package/dist/client/assets/{table-Bn8GUsEe.js → table-CZYoHyke.js} +1 -1
- package/dist/client/assets/{tabs-C7dg0Vvg.js → tabs-Bdkj1lgQ.js} +1 -1
- package/dist/client/assets/tasks-CKEKZTJH.js +1 -0
- package/dist/client/assets/{tasks-panel-Bw2bEANh.js → tasks-panel-BM9-nwF1.js} +1 -1
- package/dist/client/assets/{textarea-BcqBCUUu.js → textarea-WmaLJOSS.js} +1 -1
- package/dist/client/assets/{time-range-picker-CoqzHvv0.js → time-range-picker-DTx-aw7h.js} +1 -1
- package/dist/client/assets/{toggle-group-D0qkbRCN.js → toggle-group-BSTN0kXc.js} +1 -1
- package/dist/client/assets/{tools-list-BkL1UdvP.js → tools-list-CputjGXX.js} +1 -1
- package/dist/client/assets/{tooltip-BtnNkpKs.js → tooltip-CXXn3Ro_.js} +1 -1
- package/dist/client/assets/{topbar-portal-jOMGe5hi.js → topbar-portal-BB1Hwfr5.js} +1 -1
- package/dist/client/assets/{types-BLisMR9q.js → types-C_NrK4kj.js} +1 -1
- package/dist/client/assets/{use-binding-BTY1B5EO.js → use-binding-DX3XjK3s.js} +1 -1
- package/dist/client/assets/{use-collections-S_4aLkkK.js → use-collections-CyaEugDP.js} +1 -1
- package/dist/client/assets/{use-connection-CIMDlS0p.js → use-connection-CsQi-w6W.js} +1 -1
- package/dist/client/assets/{use-copy-X88seI8c.js → use-copy-DA_ixYAx.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Crgs_7Nu.js → use-create-virtual-mcp-D0cZ7y8m.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-B9tJfMj0.js → use-install-from-registry-BHgaGTIV.js} +1 -1
- package/dist/client/assets/{use-list-state-BSenVV3C.js → use-list-state-t7h0TU4q.js} +1 -1
- package/dist/client/assets/{use-llm-DNHK5zRW.js → use-llm-CadTJIkK.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-DdAbAYhl.js → use-mcp-resources-CiQCrFU3.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-9xAyOALf.js → use-mcp-tools-YbcA7Rhs.js} +1 -1
- package/dist/client/assets/{use-members-Cm-k0g9m.js → use-members-BiifNEMb.js} +1 -1
- package/dist/client/assets/{use-mobile-qpUl5FeD.js → use-mobile-v7QQFcpP.js} +1 -1
- package/dist/client/assets/{use-project-DfoyehRx.js → use-project-DMEAhjqE.js} +1 -1
- package/dist/client/assets/{use-settings-modal-DdyHyLPW.js → use-settings-modal-Chc2B680.js} +1 -1
- package/dist/client/assets/{use-view-mode-JyUdxjkA.js → use-view-mode-B4wK2uKy.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-qK-NM0rh.js → use-virtual-mcp-lesqjVQJ.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CgnpS_zo.js +1 -0
- package/dist/client/assets/{useMutation-D9A8H6Gw.js → useMutation-CCGHUnSx.js} +1 -1
- package/dist/client/assets/useQuery-C9IzXvrv.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DrWcoToz.js +1 -0
- package/dist/client/assets/{user-DOfZcM2J.js → user-DGGjXKaB.js} +1 -1
- package/dist/client/assets/{workflow-CCx8GI9K.js → workflow-Buoqg9Rm.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +3 -3
- package/dist/server/migrate.js +1 -1
- package/dist/server/server.js +3 -3
- package/package.json +1 -1
- package/dist/client/assets/constants-B8it1peu.js +0 -1
- package/dist/client/assets/index-CRZHS1YQ.js +0 -1
- package/dist/client/assets/page-B5VsNKJS.js +0 -1
- package/dist/client/assets/plugins-BODrRYA2.js +0 -1
- package/dist/client/assets/tasks-BlpbiwmW.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BspPd2u8.js +0 -1
- package/dist/client/assets/useQuery-D9zfpIOd.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BqnGzNK9.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as _,j as n,v as J,B as G,u as V,n as W,t as M,K as q,
|
|
1
|
+
import{r as _,j as n,v as J,B as G,u as V,n as W,t as M,K as q,ba as D,bc as $,c as Q}from"./index-B57CuSVv.js";import{u as Y}from"./useQuery-C9IzXvrv.js";import{u as H}from"./useMutation-CCGHUnSx.js";import{u as X,a as Z}from"./constants-DamjJgLK.js";import{S as ee}from"./switch-DYDtUk6R.js";import{L as te}from"./label-DKwFCpFF.js";import{n as ne}from"./Container-C2fyu03W.js";import{b as se}from"./use-connection-CsQi-w6W.js";import{a as ie,c as re}from"./use-binding-DX3XjK3s.js";import{u as oe}from"./use-install-from-registry-BHgaGTIV.js";import{i as le}from"./Loading01-C3DKwOFI.js";import{s as ae}from"./Plus-Dcmwoj2g.js";import{S as ce,a as de,b as ue,c as me,d as z}from"./select-DCJCMvYp.js";function ge({value:o,onValueChange:e,placeholder:r="Select a connection...",binding:l,bindingType:a,onAddNew:y,className:x,disabled:h=!1}){const[j,d]=_.useState(!1),{installByBinding:v,isInstalling:S}=oe(),b=j||S,u=se(),w=ie({connections:u,binding:typeof l=="string"?l:void 0}),C=!l||!u?u??[]:typeof l=="string"?w:Array.isArray(l)&&l.length>0?u.filter(t=>re(t,l)):u,m=(()=>{if(!a?.startsWith("@"))return null;const[t,s]=a.replace("@","").split("/");return t&&s?{scope:t,appName:s}:null})(),N=(()=>{let t=C;const s=Array.isArray(l)&&l.length>0;if(m&&!s&&(t=t.filter(i=>{const c=i.app_name,p=i.metadata?.scopeName;return c===m.appName&&p===m.scope})),o&&!t.some(i=>i.id===o)){const i=u?.find(c=>c.id===o);if(i)return[i,...t]}return t})(),P=a?.startsWith("@"),A=async()=>{if(P&&a){d(!0);try{const t=await v(a);t&&e(t.id)}finally{d(!1)}return}y?.()},g=N.find(t=>t.id===o);return n.jsxs(ce,{value:o??"none",onValueChange:t=>e(t==="none"?null:t),disabled:h,children:[n.jsx(de,{size:"sm",className:J("w-[200px]",x),children:n.jsx(ue,{placeholder:r,children:g?n.jsxs("div",{className:"flex items-center gap-2",children:[g.icon?n.jsx("img",{src:g.icon,alt:g.title,className:"w-4 h-4 rounded shrink-0"}):n.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary shrink-0",children:g.title.slice(0,1).toUpperCase()}),n.jsx("span",{className:"truncate",children:g.title})]}):r})}),n.jsxs(me,{children:[n.jsx(z,{value:"none",children:"No connection"}),N.length===0?n.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No compatible connections found"}):N.map(t=>n.jsx(z,{value:t.id,children:n.jsxs("div",{className:"flex items-center gap-2",children:[t.icon?n.jsx("img",{src:t.icon,alt:t.title,className:"w-4 h-4 rounded"}):n.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:t.title.slice(0,1).toUpperCase()}),n.jsx("span",{children:t.title})]})},t.id)),(y||P)&&n.jsx("div",{className:"border-t border-border",children:n.jsx(G,{onPointerDown:t=>t.stopPropagation(),onClick:t=>{t.preventDefault(),t.stopPropagation(),A()},disabled:b||h,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:b?n.jsxs(n.Fragment,{children:[n.jsx(le,{size:16,className:"animate-spin"}),n.jsx("span",{children:"Connecting..."})]}):n.jsxs(n.Fragment,{children:[n.jsx(ae,{size:16}),n.jsx("span",{children:"Add Connection"})]})})})]})]})}const pe=o=>{if(!o||typeof o!="object")return!1;const e=o;return e.type==="text"&&typeof e.text=="string"&&e.text.trim().toLowerCase().startsWith("error")},K=o=>{const e=o.structuredContent??o,r=e&&typeof e=="object"?e:null,l=r?.content?.[0]?.text&&typeof r.content[0].text=="string"?r.content[0].text:null;if(r?.isError)throw new Error(l??"Tool call failed");if(pe(e))throw new Error(e.text);return e};function fe(o){return o.requiresMcpBinding===!0?!0:o.binding!==void 0}function xe(o){const e=Q.c(57),{plugin:r,isEnabled:l,isSaving:a,pendingBinding:y,description:x,label:h,icon:j,projectId:d,client:v,onBindingChange:S,onToggle:b}=o;let u;e[0]!==r?(u=fe(r),e[0]=r,e[1]=u):u=e[1];const w=u;let C;e[2]!==r.id||e[3]!==d?(C=q.projectPluginConfig(d??"",r.id),e[2]=r.id,e[3]=d,e[4]=C):C=e[4];let m;e[5]!==v||e[6]!==r.id||e[7]!==d?(m=async()=>{if(!d)throw new Error("Project ID is required to load plugin config.");const O=await v.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:d,pluginId:r.id}});return K(O)},e[5]=v,e[6]=r.id,e[7]=d,e[8]=m):m=e[8];const N=!!d&&w;let P;e[9]!==C||e[10]!==m||e[11]!==N?(P={queryKey:C,queryFn:m,enabled:N},e[9]=C,e[10]=m,e[11]=N,e[12]=P):P=e[12];const{data:A,isLoading:g}=Y(P),t=A?.config?.connectionId??null,s=y!==void 0?y:t;let i;e[13]!==l||e[14]!==a||e[15]!==b||e[16]!==r.id?(i=()=>!a&&b(r.id,!l),e[13]=l,e[14]=a,e[15]=b,e[16]=r.id,e[17]=i):i=e[17];const c=a?void 0:"pointer";let p;e[18]!==c?(p={cursor:c},e[18]=c,e[19]=p):p=e[19];let f;e[20]!==j?(f=j&&n.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0 [&>svg]:size-4",children:j}),e[20]=j,e[21]=f):f=e[21];let I;e[22]!==h?(I=n.jsx("p",{className:"text-sm font-medium text-foreground",children:h}),e[22]=h,e[23]=I):I=e[23];let E;e[24]!==x?(E=x&&n.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:x}),e[24]=x,e[25]=E):E=e[25];let B;e[26]!==I||e[27]!==E?(B=n.jsxs("div",{className:"min-w-0",children:[I,E]}),e[26]=I,e[27]=E,e[28]=B):B=e[28];let k;e[29]!==B||e[30]!==f?(k=n.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[f,B]}),e[29]=B,e[30]=f,e[31]=k):k=e[31];let T;e[32]!==b||e[33]!==r.id?(T=O=>b(r.id,O),e[32]=b,e[33]=r.id,e[34]=T):T=e[34];let F;e[35]!==l||e[36]!==a||e[37]!==T?(F=n.jsx("div",{onClick:je,className:"shrink-0",children:n.jsx(ee,{checked:l,onCheckedChange:T,disabled:a})}),e[35]=l,e[36]=a,e[37]=T,e[38]=F):F=e[38];let L;e[39]!==k||e[40]!==F?(L=n.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[k,F]}),e[39]=k,e[40]=F,e[41]=L):L=e[41];let U;e[42]!==g||e[43]!==l||e[44]!==a||e[45]!==w||e[46]!==S||e[47]!==r.binding||e[48]!==r.id||e[49]!==s||e[50]!==t?(U=l&&w&&n.jsx("div",{className:"pb-4 pl-7 space-y-2",onClick:he,children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(te,{className:"text-xs text-muted-foreground w-24",children:"Connection"}),n.jsx(ge,{value:s??null,onValueChange:O=>S(r.id,O,t),binding:r.binding,placeholder:"Select connection...",className:"w-56",disabled:a||g})]})}),e[42]=g,e[43]=l,e[44]=a,e[45]=w,e[46]=S,e[47]=r.binding,e[48]=r.id,e[49]=s,e[50]=t,e[51]=U):U=e[51];let R;return e[52]!==L||e[53]!==U||e[54]!==i||e[55]!==p?(R=n.jsxs("div",{className:"flex flex-col border-b border-border last:border-0",onClick:i,style:p,children:[L,U]}),e[52]=L,e[53]=U,e[54]=i,e[55]=p,e[56]=R):R=e[56],R}function he(o){return o.stopPropagation()}function je(o){return o.stopPropagation()}function be(){const{org:o,project:e}=V(),r=W(),l=X({connectionId:Z,orgId:o.id}),[a,y]=_.useState({}),[x,h]=_.useState({}),[j,d]=_.useState(!1),v=e.enabledPlugins??[],S=t=>{const s=a[t];return s!==void 0?s:v.includes(t)},b=()=>{const t=new Set(v);for(const[s,i]of Object.entries(a))i?t.add(s):t.delete(s);return Array.from(t)},u=Object.keys(a).length>0||Object.keys(x).length>0,w=(t,s)=>{const i=v.includes(t);y(s===i?c=>{const{[t]:p,...f}=c;return f}:c=>({...c,[t]:s}))},C=(t,s,i)=>{if(s===i){h(c=>{const{[t]:p,...f}=c;return f});return}h(c=>({...c,[t]:s}))},m=H({mutationFn:async t=>{const s=[];if(t.updatePlugins){const i=await l.callTool({name:"PROJECT_UPDATE",arguments:{projectId:e.id,enabledPlugins:t.enabledPlugins}});s.push(K(i))}if(t.bindingUpdates.length>0){const i=await Promise.all(t.bindingUpdates.map(async({pluginId:c,connectionId:p,settings:f})=>{const I=await l.callTool({name:"PROJECT_PLUGIN_CONFIG_UPDATE",arguments:{projectId:e.id,pluginId:c,connectionId:p,settings:f}});return K(I)}));s.push(...i)}return s},onSuccess:(t,s)=>{s.updatePlugins&&(r.invalidateQueries({queryKey:q.project(o.id,e.slug)}),r.invalidateQueries({queryKey:q.projects(o.id)})),s.bindingUpdates.forEach(({pluginId:i})=>{r.invalidateQueries({queryKey:q.projectPluginConfig(e.id??"",i)})}),y({}),h({}),M.success("Plugins updated successfully")},onError:t=>{M.error("Failed to update plugins: "+(t instanceof Error?t.message:"Unknown error"))},onSettled:()=>{d(!1)}}),N=()=>{d(!0);const t=Object.keys(x).map(s=>{const i=x[s];return{pluginId:s,connectionId:i!==void 0?i:void 0}});m.mutate({enabledPlugins:b(),updatePlugins:Object.keys(a).length>0,bindingUpdates:t})},P=()=>{y({}),h({})},A=t=>{const s=$.find(i=>i.pluginId===t);return s?{label:s.label,icon:s.items[0]?.icon}:null},g=t=>D.find(i=>i.id===t)?.description??null;return D.length===0?n.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}):n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"flex flex-col",children:D.map(t=>{const s=A(t.id),i=g(t.id),c=S(t.id);return n.jsx(xe,{plugin:t,isEnabled:c,isSaving:j,pendingBinding:x[t.id],description:i,label:s?.label??t.id,icon:s?.icon??n.jsx(ne,{size:14}),projectId:e.id,client:l,onBindingChange:C,onToggle:w},t.id)})}),n.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[n.jsx(G,{variant:"outline",onClick:P,disabled:!u||j,children:"Cancel"}),n.jsx(G,{onClick:N,disabled:!u||j,className:"min-w-24",children:j?"Saving...":"Save Changes"})]})]})}function Le(){const o=Q.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"flex flex-col gap-6",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Features"}),n.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Extend your project with built-in capabilities that activate automatically on any connection that supports them."})]}),n.jsx(be,{})]}),o[0]=e):e=o[0],e}export{Le as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bb as F,c as O,u as H,v as G,j as s,aF as M,r as I,b as V,B as R,O as U}from"./index-B57CuSVv.js";import{a as q}from"./use-project-DMEAhjqE.js";import{P as D}from"./index-D4fBp4Zp.js";import{E as T,C as J}from"./collection-search-BIoOOBZ6.js";import{A as K}from"./avatar-CcqnmiIz.js";import{f as Q}from"./formatDistanceToNow-Cb2QZZJn.js";import{C as W}from"./create-project-dialog-BPaIOHbb.js";import{B as X,a as Y,b as Z,c as ee}from"./breadcrumb-C83RhVbl.js";import"./useQuery-C9IzXvrv.js";import"./constants-DamjJgLK.js";import"./localstorage-keys-BJmhHKWF.js";import"./useMutation-CCGHUnSx.js";import"./tooltip-CXXn3Ro_.js";import"./index-Bes18yjv.js";import"./Loading01-C3DKwOFI.js";import"./SearchMd-fcNN21Gr.js";import"./input-D2SfEJvf.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-mVAXjnwm.js";import"./X-V73kIsj3.js";import"./form-CU5HDQFC.js";import"./label-DKwFCpFF.js";import"./textarea-WmaLJOSS.js";import"./Check-BYEmwnWo.js";import"./ChevronRight-BLexx0Qt.js";const te=F("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);function se(t){const e=O.c(58),{project:l,onSettingsClick:c}=t,{org:r}=H(),d=l.ui?.themeColor??"#60a5fa",b=l.ui?.bannerColor??d,m=l.ui?.banner?`url(${l.ui.banner})`:void 0;let i;e[0]!==b||e[1]!==m?(i={backgroundColor:b,backgroundImage:m,backgroundSize:"cover",backgroundPosition:"center"},e[0]=b,e[1]=m,e[2]=i):i=e[2];const _=i;let u;e[3]!==r.slug||e[4]!==l.slug?(u={org:r.slug,project:l.slug},e[3]=r.slug,e[4]=l.slug,e[5]=u):u=e[5];let f;e[6]!==c?(f=B=>{B.preventDefault(),B.stopPropagation(),c?.(B)},e[6]=c,e[7]=f):f=e[7];let x,v;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=G("absolute top-3 right-3 size-6 rounded-md flex items-center justify-center","bg-black/20 hover:bg-black/40 transition-colors"),v=s.jsx(te,{className:"size-3.5 text-white"}),e[8]=x,e[9]=v):(x=e[8],v=e[9]);let g;e[10]!==f?(g=s.jsx("button",{type:"button",onClick:f,className:x,children:v}),e[10]=f,e[11]=g):g=e[11];let p;e[12]!==_||e[13]!==g?(p=s.jsx("div",{className:"h-20 relative",style:_,children:g}),e[12]=_,e[13]=g,e[14]=p):p=e[14];let n;e[15]!==l.name||e[16]!==l.ui||e[17]!==d?(n=l.ui?.icon?s.jsx("img",{src:l.ui.icon,alt:"",className:"size-8 rounded-md object-cover"}):s.jsx("div",{className:"size-8 rounded-md flex items-center justify-center",style:{backgroundColor:d},children:s.jsx("span",{className:"text-sm font-medium text-white",children:l.name.charAt(0).toUpperCase()})}),e[15]=l.name,e[16]=l.ui,e[17]=d,e[18]=n):n=e[18];let a;e[19]!==l.name?(a=s.jsx("h3",{className:"font-medium text-base text-foreground truncate",children:l.name}),e[19]=l.name,e[20]=a):a=e[20];let h;e[21]!==l.updatedAt?(h=Q(new Date(l.updatedAt),{addSuffix:!0}),e[21]=l.updatedAt,e[22]=h):h=e[22];let j;e[23]!==h?(j=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Edited"," ",h]}),e[23]=h,e[24]=j):j=e[24];let C;e[25]!==a||e[26]!==j?(C=s.jsxs("div",{className:"flex flex-col",children:[a,j]}),e[25]=a,e[26]=j,e[27]=C):C=e[27];let N;e[28]!==n||e[29]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-4",children:[n,C]}),e[28]=n,e[29]=C,e[30]=N):N=e[30];let k;e[31]!==l.boundConnections?(k=l.boundConnections.slice(0,4).map(le),e[31]=l.boundConnections,e[32]=k):k=e[32];let P;e[33]!==l.boundConnections.length?(P=l.boundConnections.length>4&&s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsxs("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center text-xs text-muted-foreground",children:["+",l.boundConnections.length-4]})}),e[33]=l.boundConnections.length,e[34]=P):P=e[34];let y;e[35]!==k||e[36]!==P?(y=s.jsxs("div",{className:"flex pr-2",children:[k,P]}),e[35]=k,e[36]=P,e[37]=y):y=e[37];const z=r.logo??void 0;let w;e[38]!==r.name||e[39]!==z?(w=s.jsx(K,{url:z,fallback:r.name,size:"2xs",className:"shrink-0 rounded",objectFit:"cover"}),e[38]=r.name,e[39]=z,e[40]=w):w=e[40];let S;e[41]!==r.name?(S=s.jsx("span",{className:"truncate max-w-20",children:r.name}),e[41]=r.name,e[42]=S):S=e[42];let o;e[43]!==w||e[44]!==S?(o=s.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground",children:[w,S]}),e[43]=w,e[44]=S,e[45]=o):o=e[45];let L;e[46]!==y||e[47]!==o?(L=s.jsxs("div",{className:"flex items-center justify-between mt-4",children:[y,o]}),e[46]=y,e[47]=o,e[48]=L):L=e[48];let $;e[49]!==N||e[50]!==L?($=s.jsxs("div",{className:"flex flex-col flex-1 justify-between p-4",children:[N,L]}),e[49]=N,e[50]=L,e[51]=$):$=e[51];let A;e[52]!==$||e[53]!==p?(A=s.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[p,$]}),e[52]=$,e[53]=p,e[54]=A):A=e[54];let E;return e[55]!==A||e[56]!==u?(E=s.jsx(M,{to:"/$org/$project",params:u,className:"block group",children:A}),e[55]=A,e[56]=u,e[57]=E):E=e[57],E}function le(t){return s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsx(re,{connection:t})},t.id)}function re(t){const e=O.c(13),{connection:l}=t;if(l.icon){let m;e[0]!==l.icon||e[1]!==l.title?(m=s.jsx("img",{src:l.icon,alt:l.title,className:"size-4 object-cover"}),e[0]=l.icon,e[1]=l.title,e[2]=m):m=e[2];let i;return e[3]!==l.title||e[4]!==m?(i=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:l.title,children:m}),e[3]=l.title,e[4]=m,e[5]=i):i=e[5],i}const c=l.title;let r;e[6]!==l.title?(r=l.title.charAt(0).toUpperCase(),e[6]=l.title,e[7]=r):r=e[7];let d;e[8]!==r?(d=s.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:r}),e[8]=r,e[9]=d):d=e[9];let b;return e[10]!==l.title||e[11]!==d?(b=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:c,children:d}),e[10]=l.title,e[11]=d,e[12]=b):b=e[12],b}function Ae(){const t=O.c(40),{org:e}=H(),{data:l,isLoading:c}=q(e.id),[r,d]=I.useState(""),[b,m]=I.useState(!1),i=V();let _,u,f,x,v,g,p,n,a;if(t[0]!==c||t[1]!==i||t[2]!==e.slug||t[3]!==l||t[4]!==r){const N=l?.filter(ie)?.filter(o=>o.name.toLowerCase().includes(r.toLowerCase())||o.description?.toLowerCase().includes(r.toLowerCase()))??[];let k;t[14]!==i||t[15]!==e.slug?(k=o=>{i({to:"/$org/$project/projects/$slug/settings/general",params:{org:e.slug,project:U,slug:o}})},t[14]=i,t[15]=e.slug,t[16]=k):k=t[16];const P=k;let y;t[17]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{m(!0)},t[17]=y):y=t[17];const z=y;u=D;let w;t[18]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(D.Header.Left,{children:s.jsx(X,{children:s.jsx(Y,{children:s.jsx(Z,{children:s.jsx(ee,{children:"Projects"})})})})}),t[18]=w):w=t[18],t[19]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(D.Header,{children:[w,s.jsx(D.Header.Right,{children:s.jsx(R,{onClick:z,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Create new project"})})]}),t[19]=n):n=t[19];let S;t[20]===Symbol.for("react.memo_cache_sentinel")?(S=o=>{o.key==="Escape"&&(d(""),o.target.blur())},t[20]=S):S=t[20],t[21]!==r?(a=s.jsx(J,{value:r,onChange:d,placeholder:"Search for a project...",onKeyDown:S}),t[21]=r,t[22]=a):a=t[22],_=D.Content,f="@container",t[23]!==c?(x=c&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:[...Array(4)].map(oe)})}),t[23]=c,t[24]=x):x=t[24],v=!c&&N.length===0&&r&&s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(T,{title:"No projects found",description:`No projects match "${r}"`})}),g=!c&&N.length===0&&!r&&s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(T,{title:"No projects yet",description:"Create a project to get started.",actions:s.jsx(R,{onClick:z,children:"Create new project"})})}),p=!c&&N.length>0&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:N.map(o=>s.jsx(se,{project:o,onSettingsClick:()=>P(o.slug)},o.id))})}),t[0]=c,t[1]=i,t[2]=e.slug,t[3]=l,t[4]=r,t[5]=_,t[6]=u,t[7]=f,t[8]=x,t[9]=v,t[10]=g,t[11]=p,t[12]=n,t[13]=a}else _=t[5],u=t[6],f=t[7],x=t[8],v=t[9],g=t[10],p=t[11],n=t[12],a=t[13];let h;t[25]!==_||t[26]!==f||t[27]!==x||t[28]!==v||t[29]!==g||t[30]!==p?(h=s.jsxs(_,{className:f,children:[x,v,g,p]}),t[25]=_,t[26]=f,t[27]=x,t[28]=v,t[29]=g,t[30]=p,t[31]=h):h=t[31];let j;t[32]!==b?(j=s.jsx(W,{open:b,onOpenChange:m}),t[32]=b,t[33]=j):j=t[33];let C;return t[34]!==u||t[35]!==n||t[36]!==a||t[37]!==h||t[38]!==j?(C=s.jsxs(u,{children:[n,a,h,j]}),t[34]=u,t[35]=n,t[36]=a,t[37]=h,t[38]=j,t[39]=C):C=t[39],C}function oe(t,e){return s.jsx("div",{className:"h-[240px] rounded-xl bg-muted animate-pulse"},e)}function ie(t){return t.slug!==U}export{Ae as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,K as E,j as l}from"./index-
|
|
1
|
+
import{c as b,K as E,j as l}from"./index-B57CuSVv.js";import{u as R}from"./useQuery-C9IzXvrv.js";import{i as j}from"./File06-BK-vLttV.js";import{i as v}from"./Loading01-C3DKwOFI.js";import{e as _}from"./github-icon-Dp3wHhYE.js";function w(s){return s.replace(/<a[^>]*class="[^"]*anchor[^"]*"[^>]*>.*?<\/a>/gi,"")}function A(s){return s.replace(/<a\s+([^>]*href="[^"]*"[^>]*)>/gi,(e,r)=>{let t=e;return r.includes("target=")?t=t.replace(/target="[^"]*"/gi,'target="_blank"'):t=t.replace(/>/,' target="_blank">'),r.includes("rel=")?t=t.replace(/rel="[^"]*"/gi,'rel="noopener noreferrer"'):t=t.replace(/>/,' rel="noopener noreferrer">'),t})}function H(s){let e=w(s);return e=A(e),e}async function L(s,e){try{const r=await fetch(`https://api.github.com/repos/${s}/${e}/readme`,{headers:{Accept:"application/vnd.github.v3.html"}});if(!r.ok){if(r.status===404)return null;throw new Error(`Failed to fetch README: ${r.statusText}`)}const t=await r.text();return H(t)}catch(r){return console.error("Error fetching README:",r),null}}function D(s){const e=b.c(18),{repository:r,html:t,isLoading:g,queryKey:h}=s;let n,o,a,m;e[0]!==t||e[1]!==h||e[2]!==r?(n=r?_(r):null,o=!!n&&t===void 0,m=R,a=h??E.githubReadme(n?.owner,n?.repo),e[0]=t,e[1]=h,e[2]=r,e[3]=n,e[4]=o,e[5]=a,e[6]=m):(n=e[3],o=e[4],a=e[5],m=e[6]);let c;e[7]!==n?(c=async()=>n?L(n.owner,n.repo):null,e[7]=n,e[8]=c):c=e[8];let u;e[9]!==o||e[10]!==a||e[11]!==c?(u={queryKey:a,queryFn:c,enabled:o,staleTime:36e5,gcTime:864e5},e[9]=o,e[10]=a,e[11]=c,e[12]=u):u=e[12];const{data:x,isLoading:y}=m(u),f=t??x;if(g??(o&&y)){let i;return e[13]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx("div",{className:"flex items-center justify-center h-full",children:l.jsx(v,{size:32,className:"animate-spin text-muted-foreground"})}),e[13]=i):i=e[13],i}if(!f){let i;return e[14]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center p-6",children:[l.jsx(j,{size:48,className:"text-muted-foreground mb-4"}),l.jsx("h3",{className:"text-lg font-medium mb-2",children:"README not found"}),l.jsx("p",{className:"text-muted-foreground max-w-md",children:"This repository doesn't have a README file, or it's not publicly accessible."})]}),e[14]=i):i=e[14],i}let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d={backgroundColor:"transparent"},e[15]=d):d=e[15];let p;return e[16]!==f?(p=l.jsx("div",{className:"p-5 markdown-body",style:d,dangerouslySetInnerHTML:{__html:f}}),e[16]=f,e[17]=p):p=e[17],p}export{D as R};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as T,c as X,u as he,n as Qe,b_ as tt,j as s,B as F,v as ne,t as Z,cc as cn}from"./index-D-htvwK7.js";import{i as ft}from"./CheckCircle-CHWgGReR.js";import{n as dn}from"./Container-C5O_vd5l.js";import{t as mn}from"./Settings01-CO9ZR5u9.js";import{u as Ze}from"./useQuery-D9zfpIOd.js";import{u as $e}from"./useMutation-D9A8H6Gw.js";import{a as ve,u as be,h as js}from"./constants-P4PVvchD.js";import{u as bs}from"./useInfiniteQuery-BspPd2u8.js";import{B as G}from"./badge-KDRqEGRi.js";import{I as je}from"./input-BSTFqIOK.js";import{a as Dt,c as Je,D as $t,b as At,h as ls,i as as,g as un}from"./dropdown-menu-fntgBKzW.js";import{e as vs,a as ys,b as Lt,T as Oe,d as Ns,c as Ue}from"./table-Bn8GUsEe.js";import{a as os,T as xn}from"./toggle-group-D0qkbRCN.js";import{u as hn}from"./use-view-mode-JyUdxjkA.js";import{i as Xt}from"./DotsVertical-DngStBCK.js";import{i as pn}from"./FilterLines-BJ0Gbspi.js";import{i as ws}from"./Globe01-Dl836bGy.js";import{i as ut}from"./Loading01-f9s2h1wv.js";import{i as Cs}from"./SearchMd-195kdrrc.js";import{b as zt,c as Ot,d as Ut,e as qt,a as Ft,D as Bt}from"./dialog-CgD1R6sd.js";import{i as vt}from"./AlertCircle-M_vDM06X.js";import{n as fn}from"./Download01-m8eiGYWG.js";import{i as cs}from"./Upload01-CvIv0y_p.js";import{c as yt,b as Nt,d as wt,A as Ct,h as _t,e as kt,a as St,f as Rt}from"./alert-dialog-NBgR76Yp.js";import{C as me}from"./card-D-rpkLYG.js";import{s as It}from"./Trash01-BPU7sU05.js";import{L as le}from"./label-LNmGa3p2.js";import{n as gn,S as _s,a as ks,b as Ss,c as Rs,d as Et}from"./select-CrOlaxCO.js";import{S as bt}from"./switch-CAg0B_Rv.js";import{T as Gt}from"./textarea-BcqBCUUu.js";import{i as jn}from"./ArrowLeft-uXw4hDrl.js";import{i as bn,u as Ht,t as vn}from"./use-copy-X88seI8c.js";import{s as es}from"./RefreshCcw01-p39bp66R.js";import{i as yn}from"./X-DO1ZPMDK.js";import{i as Nn}from"./Link01-DdTCH4v9.js";import{t as Ts}from"./ChevronDown-DF3whIkz.js";import{C as wn}from"./checkbox-DY4RVI9F.js";import{s as Is}from"./Eye-D7EUKcSA.js";import{n as Cn}from"./LinkExternal01-CcLhJWrG.js";import{i as _n}from"./XCircle-YMmdzMOW.js";import{e as Ms}from"./use-collections-S_4aLkkK.js";import{b as Ps}from"./use-connection-CIMDlS0p.js";import{a as kn,b as Sn,P as Rn}from"./popover-DXIC1-bw.js";import{i as Wt}from"./Check-DhJrraz0.js";import{a as Jt}from"./Copy01-DdgoiM5k.js";import{i as Tn,a as In}from"./Save01-DxAaB8Dn.js";import{i as Mn}from"./Key01-KqOK513j.js";import{s as Pn}from"./Plus-BXkHOQsb.js";import{a as En,b as Dn,T as $n}from"./tooltip-BtnNkpKs.js";import{a as An,i as Ln}from"./mcp-oauth-DIzWYxTe.js";import{i as zn}from"./Play-BoKAVToz.js";import"./infiniteQueryObserver-DuuHSt2c.js";import"./ChevronRight-TdWXpEIC.js";import"./use-mobile-qpUl5FeD.js";import"./index-DMRPqDGw.js";const Es=({size:t=24,color:e="currentColor",...n})=>T.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},T.createElement("path",{d:"M10.743 5.092C11.149 5.032 11.569 5 12 5c5.105 0 8.455 4.505 9.58 6.287.137.215.205.323.243.49a1.16 1.16 0 0 1 0 .447c-.038.166-.107.274-.244.492-.3.474-.757 1.141-1.363 1.865M6.724 6.715c-2.162 1.467-3.63 3.504-4.303 4.57-.137.217-.205.325-.243.492a1.173 1.173 0 0 0 0 .446c.038.167.106.274.242.49C3.546 14.495 6.895 19 12 19c2.059 0 3.832-.732 5.289-1.723M3 3l18 18M9.88 9.879a3 3 0 1 0 4.243 4.243"}));Es.displayName="EyeOff";const Ds=({size:t=24,color:e="currentColor",...n})=>T.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},T.createElement("path",{d:"M12.5 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 21H17c.93 0 1.395 0 1.776-.102a3 3 0 0 0 2.122-2.122C21 18.395 21 17.93 21 17m-2-9V2m-3 3h6M10.5 8.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm4.49 3.418-8.459 7.69c-.476.433-.714.649-.735.836a.5.5 0 0 0 .167.431C6.105 21 6.426 21 7.07 21h9.387c1.44 0 2.159 0 2.724-.242a3 3 0 0 0 1.578-1.578c.242-.565.242-1.285.242-2.724 0-.484 0-.726-.053-.952a2.001 2.001 0 0 0-.374-.778c-.143-.182-.332-.333-.71-.636l-2.797-2.237c-.379-.303-.568-.454-.776-.508a1 1 0 0 0-.557.018c-.205.066-.384.23-.743.555Z"}));Ds.displayName="ImagePlus";const $s=({size:t=24,color:e="currentColor",...n})=>T.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},T.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.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.8Z"}),T.createElement("path",{d:"M8 9.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 8 9.04 8 9.6 8h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 8.76 16 9.04 16 9.6v4.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C15.24 16 14.96 16 14.4 16H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 15.24 8 14.96 8 14.4V9.6Z"}));$s.displayName="StopSquare";const ts=({size:t=24,color:e="currentColor",...n})=>T.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},T.createElement("path",{d:"m6 6 4.5 4.5M6 6H3L2 3l1-1 3 1v3Zm13.259-3.259-2.628 2.628c-.396.396-.594.594-.668.822a1 1 0 0 0 0 .618c.074.228.272.426.668.822l.238.238c.396.396.594.594.822.668a1 1 0 0 0 .618 0c.228-.074.426-.272.822-.668L21.59 5.41a5.5 5.5 0 0 1-6.16 7.485c-.485-.096-.729-.144-.876-.13a.836.836 0 0 0-.373.114c-.13.07-.261.201-.523.463L6.5 20.5a2.121 2.121 0 0 1-3-3l7.157-7.157c.262-.262.393-.393.463-.524a.836.836 0 0 0 .113-.372c.015-.148-.033-.39-.129-.877a5.5 5.5 0 0 1 8.155-5.83ZM12 15l5.5 5.5a2.121 2.121 0 0 0 3-3l-4.525-4.525a5.475 5.475 0 0 1-.934-.17c-.39-.107-.816-.03-1.101.255L12 15Z"}));ts.displayName="Tool02";const H={all:["private-registry"],items:()=>[...H.all,"items"],itemsList:(t,e,n,r)=>[...H.items(),"list",{search:t,tags:e,categories:n,limit:r}],item:t=>[...H.items(),"item",t],filters:()=>[...H.all,"filters"],registryConfig:()=>[...H.all,"registry-config"],registryConfigByPlugin:(t,e)=>[...H.registryConfig(),t,e],publishRequests:()=>[...H.all,"publish-requests"],publishRequestsByOrg:t=>[...H.publishRequests(),"org",t],publishRequestsList:(t,e,n)=>[...H.publishRequests(),"list",{status:t??"all",sortBy:e??"created_at",sortDirection:n??"desc"}],publishRequestsListByOrg:(t,e,n,r)=>[...H.publishRequestsByOrg(t),"list",{status:e??"all",sortBy:n??"created_at",sortDirection:r??"desc"}],publishRequestsCount:()=>[...H.publishRequests(),"count"],publishRequestsCountByOrg:t=>[...H.publishRequestsByOrg(t),"count"],publishApiKeys:()=>[...H.all,"publish-api-keys"],monitor:()=>[...H.all,"monitor"],monitorRuns:()=>[...H.monitor(),"runs"],monitorRunsList:t=>[...H.monitorRuns(),"list",{status:t??"all"}],monitorRun:t=>[...H.monitorRuns(),"run",t??"none"],monitorResults:()=>[...H.monitor(),"results"],monitorResultsList:(t,e)=>[...H.monitorResults(),"list",{runId:t??"none",status:e??"all"}],monitorConnections:()=>[...H.monitor(),"connections"],monitorConnectionAuthProbe:t=>[...H.monitorConnections(),"auth-probe",t]};async function qe(t,e,n){const r=await t.callTool({name:e,arguments:n});if(!r||typeof r!="object")throw new Error(`Invalid tool response for ${e}`);if(r.isError){const o=r.content?.find(l=>l.type==="text")?.text??`Tool ${e} returned an error`;throw new Error(o)}return r.structuredContent??r}function On(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>qe(o,"REGISTRY_MONITOR_RUN_START",{config:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await Promise.all([e.invalidateQueries({queryKey:H.monitorRuns()}),e.invalidateQueries({queryKey:H.monitorResults()})])},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Un(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>qe(o,"REGISTRY_MONITOR_RUN_CANCEL",{runId:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async(c,m)=>{await Promise.all([e.invalidateQueries({queryKey:H.monitorRuns()}),e.invalidateQueries({queryKey:H.monitorRun(m)})])},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Qt(t){const e=X.c(10),{org:n}=he();let r;e[0]!==n.id?(r={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=be(r);let l;e[2]!==t?(l=H.monitorRunsList(t),e[2]=t,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==t?(a=async()=>qe(o,"REGISTRY_MONITOR_RUN_LIST",{status:t,limit:100}),e[4]=o,e[5]=t,e[6]=a):a=e[6];let i;return e[7]!==l||e[8]!==a?(i={queryKey:l,queryFn:a,staleTime:5e3},e[7]=l,e[8]=a,e[9]=i):i=e[9],Ze(i)}function ss(t){const e=X.c(11),{org:n}=he();let r;e[0]!==n.id?(r={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=be(r);let l;e[2]!==t?(l=H.monitorRun(t),e[2]=t,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==t?(a=async()=>qe(o,"REGISTRY_MONITOR_RUN_GET",{runId:t}),e[4]=o,e[5]=t,e[6]=a):a=e[6];const i=!!t;let c;return e[7]!==l||e[8]!==a||e[9]!==i?(c={queryKey:l,queryFn:a,enabled:i,refetchInterval:qn},e[7]=l,e[8]=a,e[9]=i,e[10]=c):c=e[10],Ze(c)}function qn(t){return t.state.data?.run?.status==="running"?5e3:!1}function Mt(t,e,n){const r=X.c(14),{org:o}=he();let l;r[0]!==o.id?(l={connectionId:ve,orgId:o.id},r[0]=o.id,r[1]=l):l=r[1];const a=be(l);let i;r[2]!==t||r[3]!==e?(i=H.monitorResultsList(t,e),r[2]=t,r[3]=e,r[4]=i):i=r[4];let c;r[5]!==a||r[6]!==t||r[7]!==e?(c=async()=>qe(a,"REGISTRY_MONITOR_RESULT_LIST",{runId:t,status:e,limit:200,offset:0}),r[5]=a,r[6]=t,r[7]=e,r[8]=c):c=r[8];const m=!!t,u=n==="running"?2500:!1;let x;return r[9]!==i||r[10]!==c||r[11]!==m||r[12]!==u?(x={queryKey:i,queryFn:c,enabled:m,staleTime:5e3,refetchInterval:u},r[9]=i,r[10]=c,r[11]=m,r[12]=u,r[13]=x):x=r[13],Ze(x)}function As(){const t=X.c(5),{org:e}=he();let n;t[0]!==e.id?(n={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=be(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=H.monitorConnections(),t[2]=o):o=t[2];let l;return t[3]!==r?(l={queryKey:o,queryFn:async()=>qe(r,"REGISTRY_MONITOR_CONNECTION_LIST",{}),staleTime:1e4},t[3]=r,t[4]=l):l=t[4],Ze(l)}function Fn(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async()=>qe(o,"REGISTRY_MONITOR_CONNECTION_SYNC",{}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.monitorConnections()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Bn(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>{const{connectionId:m,authStatus:u}=c;return qe(o,"REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH",{connectionId:m,authStatus:u})},t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.monitorConnections()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}const ds={monitorMode:"health_check",onFailure:"none",schedule:"manual",cronExpression:"",scheduleEventId:"",perMcpTimeoutMs:3e4,perToolTimeoutMs:1e4,maxAgentSteps:15,testPublicOnly:!1,testPrivateOnly:!1,includePendingRequests:!1,agentContext:"",llmConnectionId:"",llmModelId:""};function Ls(){const t=X.c(33),{org:e,project:n}=he();let r;t[0]!==e.id?(r={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=r):r=t[1];const o=be(r),l=Qe();let a;t[2]!==n.id?(a=H.registryConfigByPlugin(n.id??"",tt),t[2]=n.id,t[3]=a):a=t[3];let i;t[4]!==o||t[5]!==n.id?(i=async()=>qe(o,"PROJECT_PLUGIN_CONFIG_GET",{projectId:n.id,pluginId:tt}),t[4]=o,t[5]=n.id,t[6]=i):i=t[6];const c=!!n.id;let m;t[7]!==a||t[8]!==i||t[9]!==c?(m={queryKey:a,queryFn:i,enabled:c},t[7]=a,t[8]=i,t[9]=c,t[10]=m):m=t[10];const u=Ze(m),x=u.data?.config?.settings,p=x&&typeof x=="object"?x.testConfig:void 0,d=typeof(x?x.monitorMode??x.testMode:void 0)=="string";let b;t[11]!==p?(b=p??{},t[11]=p,t[12]=b):b=t[12];let j;t[13]!==d||t[14]!==x||t[15]!==p?(j=d&&!p?x:{},t[13]=d,t[14]=x,t[15]=p,t[16]=j):j=t[16];let _;t[17]!==b||t[18]!==j?(_={...ds,...b,...j},t[17]=b,t[18]=j,t[19]=_):_=t[19];const k=_;let y;t[20]!==o||t[21]!==n.id?(y=async S=>{const N=(await qe(o,"PROJECT_PLUGIN_CONFIG_GET",{projectId:n.id,pluginId:tt}))?.config?.settings??{};return qe(o,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:n.id,pluginId:tt,settings:{...N,testConfig:{...ds,...N.testConfig??{},...S}}})},t[20]=o,t[21]=n.id,t[22]=y):y=t[22];let g;t[23]!==n.id||t[24]!==l?(g=async()=>{await l.invalidateQueries({queryKey:H.registryConfigByPlugin(n.id??"",tt)})},t[23]=n.id,t[24]=l,t[25]=g):g=t[25];let I;t[26]!==y||t[27]!==g?(I={mutationFn:y,onSuccess:g},t[26]=y,t[27]=g,t[28]=I):I=t[28];const f=$e(I);let w;return t[29]!==u.isLoading||t[30]!==f||t[31]!==k?(w={settings:k,isLoading:u.isLoading,saveMutation:f},t[29]=u.isLoading,t[30]=f,t[31]=k,t[32]=w):w=t[32],w}function Gn(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>qe(o,"REGISTRY_MONITOR_SCHEDULE_SET",c),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.registryConfig()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Qn(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>qe(o,"REGISTRY_MONITOR_SCHEDULE_CANCEL",{scheduleEventId:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.registryConfig()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Kn(){const t=X.c(3),e=Qt("completed"),n=e.data?.items?.[0]?.id,r=e.data?.items?.[0]?.status,o=Mt(n,"failed",r),l=o.data?.items?.length??0,a=e.isLoading||o.isLoading;let i;return t[0]!==l||t[1]!==a?(i={brokenCount:l,isLoading:a},t[0]=l,t[1]=a,t[2]=i):i=t[2],i}const zs=24;function Vn(t){return t.trim()}async function Ae(t,e,n){const r=await t.callTool({name:e,arguments:n});if(!r||typeof r!="object")throw new Error(`Invalid tool response for ${e}`);if(r.isError){const o=r.content?.find(l=>l.type==="text")?.text??`Tool ${e} returned an error`;throw new Error(o)}return r.structuredContent??r}function Os(t){const e=X.c(19),{org:n}=he();let r;e[0]!==n.id?(r={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=be(r);let l,a,i,c;e[2]!==t.categories||e[3]!==t.limit||e[4]!==t.search||e[5]!==t.tags?(a=Vn(t.search),l=t.limit??zs,c=bs,i=H.itemsList(a,t.tags,t.categories,l),e[2]=t.categories,e[3]=t.limit,e[4]=t.search,e[5]=t.tags,e[6]=l,e[7]=a,e[8]=i,e[9]=c):(l=e[6],a=e[7],i=e[8],c=e[9]);let m;e[10]!==o||e[11]!==l||e[12]!==t.categories||e[13]!==t.tags||e[14]!==a?(m=async x=>{const{pageParam:p}=x,h=a.length>0?{operator:"or",conditions:[{field:["title"],operator:"contains",value:a},{field:["description"],operator:"contains",value:a},{field:["id"],operator:"contains",value:a},{field:["server","name"],operator:"contains",value:a}]}:void 0;return Ae(o,"REGISTRY_ITEM_LIST",{cursor:p,limit:l,tags:t.tags.length?t.tags:void 0,categories:t.categories.length?t.categories:void 0,where:h})},e[10]=o,e[11]=l,e[12]=t.categories,e[13]=t.tags,e[14]=a,e[15]=m):m=e[15];let u;return e[16]!==i||e[17]!==m?(u={queryKey:i,queryFn:m,initialPageParam:void 0,getNextPageParam:Yn,staleTime:3e4},e[16]=i,e[17]=m,e[18]=u):u=e[18],c(u)}function Yn(t){return t.nextCursor}function Hn(){const t=X.c(8),{org:e}=he();let n;t[0]!==e.id?(n={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=be(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=H.filters(),t[2]=o):o=t[2];let l;t[3]!==r?(l=async()=>Ae(r,"REGISTRY_ITEM_FILTERS",{}),t[3]=r,t[4]=l):l=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a={tags:[],categories:[]},t[5]=a):a=t[5];let i;return t[6]!==l?(i={queryKey:o,queryFn:l,placeholderData:a,staleTime:6e4},t[6]=l,t[7]=i):i=t[7],Ze(i)}function ns(){const t=X.c(29),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:H.items()}),e.invalidateQueries({queryKey:H.filters()})])},t[2]=e,t[3]=l):l=t[3];const a=l;let i;t[4]!==o?(i=async g=>(await Ae(o,"REGISTRY_ITEM_CREATE",{data:g})).item,t[4]=o,t[5]=i):i=t[5];let c;t[6]!==a||t[7]!==i?(c={mutationFn:i,onSuccess:a},t[6]=a,t[7]=i,t[8]=c):c=t[8];const m=$e(c);let u;t[9]!==o?(u=async g=>{const{id:I,data:f}=g;return(await Ae(o,"REGISTRY_ITEM_UPDATE",{id:I,data:f})).item},t[9]=o,t[10]=u):u=t[10];let x;t[11]!==a||t[12]!==u?(x={mutationFn:u,onSuccess:a},t[11]=a,t[12]=u,t[13]=x):x=t[13];const p=$e(x);let h;t[14]!==o?(h=async g=>(await Ae(o,"REGISTRY_ITEM_DELETE",{id:g})).item,t[14]=o,t[15]=h):h=t[15];let d;t[16]!==a||t[17]!==h?(d={mutationFn:h,onSuccess:a},t[16]=a,t[17]=h,t[18]=d):d=t[18];const b=$e(d);let j;t[19]!==o?(j=async g=>Ae(o,"REGISTRY_ITEM_BULK_CREATE",{items:g}),t[19]=o,t[20]=j):j=t[20];let _;t[21]!==a||t[22]!==j?(_={mutationFn:j,onSuccess:a},t[21]=a,t[22]=j,t[23]=_):_=t[23];const k=$e(_);let y;return t[24]!==k||t[25]!==m||t[26]!==b||t[27]!==p?(y={createMutation:m,updateMutation:p,deleteMutation:b,bulkCreateMutation:k},t[24]=k,t[25]=m,t[26]=b,t[27]=p,t[28]=y):y=t[28],y}function Kt(t){const e=X.c(37),{org:n,project:r}=he();let o;e[0]!==n.id?(o={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=o):o=e[1];const l=be(o),a=Qe();let i;e[2]!==t||e[3]!==r.id?(i=H.registryConfigByPlugin(r.id??"",t),e[2]=t,e[3]=r.id,e[4]=i):i=e[4];let c;e[5]!==l||e[6]!==t||e[7]!==r.id?(c=async()=>Ae(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:r.id,pluginId:t}),e[5]=l,e[6]=t,e[7]=r.id,e[8]=c):c=e[8];const m=!!r.id;let u;e[9]!==i||e[10]!==c||e[11]!==m?(u={queryKey:i,queryFn:c,enabled:m,staleTime:6e4},e[9]=i,e[10]=c,e[11]=m,e[12]=u):u=e[12];const x=Ze(u);let p;e[13]!==l||e[14]!==t||e[15]!==r.id?(p=async $=>{const M=(await Ae(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:r.id,pluginId:t}))?.config?.settings??{};return Ae(l,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:r.id,pluginId:t,settings:{...M,...$}})},e[13]=l,e[14]=t,e[15]=r.id,e[16]=p):p=e[16];let h;e[17]!==t||e[18]!==r.id||e[19]!==a?(h=async()=>{await a.invalidateQueries({queryKey:H.registryConfigByPlugin(r.id??"",t)})},e[17]=t,e[18]=r.id,e[19]=a,e[20]=h):h=e[20];let d;e[21]!==p||e[22]!==h?(d={mutationFn:p,onSuccess:h},e[21]=p,e[22]=h,e[23]=d):d=e[23];const b=$e(d),j=x.data?.config?.settings?.registryName??"Private Registry",_=x.data?.config?.settings?.registryIcon??"",k=x.data?.config?.settings?.llmConnectionId??"",y=x.data?.config?.settings?.llmModelId??"",g=x.data?.config?.settings?.acceptPublishRequests??!1,I=x.data?.config?.settings?.requireApiToken??!1,f=x.data?.config?.settings?.storePrivateOnly??!1,w=x.data?.config?.settings?.rateLimitEnabled??!0,P=x.data?.config?.settings?.rateLimitWindow==="minute"?"minute":"hour",N=x.data?.config?.settings?.rateLimitMax,R=typeof N=="number"&&N>=1?Math.floor(N):100;let v;return e[24]!==g||e[25]!==x.isLoading||e[26]!==w||e[27]!==R||e[28]!==P||e[29]!==_||e[30]!==k||e[31]!==y||e[32]!==j||e[33]!==I||e[34]!==b||e[35]!==f?(v={registryName:j,registryIcon:_,registryLLMConnectionId:k,registryLLMModelId:y,acceptPublishRequests:g,requireApiToken:I,storePrivateOnly:f,rateLimitEnabled:w,rateLimitWindow:P,rateLimitMax:R,isLoadingConfig:x.isLoading,saveRegistryConfigMutation:b},e[24]=g,e[25]=x.isLoading,e[26]=w,e[27]=R,e[28]=P,e[29]=_,e[30]=k,e[31]=y,e[32]=j,e[33]=I,e[34]=b,e[35]=f,e[36]=v):v=e[36],v}function Wn(t){const e=X.c(15),{org:n}=he();let r;e[0]!==n.id?(r={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=be(r);let l;e[2]!==n.id||e[3]!==t.sortBy||e[4]!==t.sortDirection||e[5]!==t.status?(l=H.publishRequestsListByOrg(n.id,t.status,t.sortBy,t.sortDirection),e[2]=n.id,e[3]=t.sortBy,e[4]=t.sortDirection,e[5]=t.status,e[6]=l):l=e[6];let a;e[7]!==o||e[8]!==t.sortBy||e[9]!==t.sortDirection||e[10]!==t.status?(a=async c=>{const{pageParam:m}=c;return Ae(o,"REGISTRY_PUBLISH_REQUEST_LIST",{status:t.status,sortBy:t.sortBy,sortDirection:t.sortDirection,limit:zs,offset:m})},e[7]=o,e[8]=t.sortBy,e[9]=t.sortDirection,e[10]=t.status,e[11]=a):a=e[11];let i;return e[12]!==l||e[13]!==a?(i={queryKey:l,queryFn:a,initialPageParam:0,getNextPageParam:Jn,staleTime:3e4,refetchOnMount:!0},e[12]=l,e[13]=a,e[14]=i):i=e[14],bs(i)}function Jn(t,e){const n=e.reduce(Zn,0);return n<t.totalCount?n:void 0}function Zn(t,e){return t+e.items.length}function Xn(){const t=X.c(9),{org:e}=he();let n;t[0]!==e.id?(n={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=be(n);let o;t[2]!==e.id?(o=H.publishRequestsCountByOrg(e.id),t[2]=e.id,t[3]=o):o=t[3];let l;t[4]!==r?(l=async()=>Ae(r,"REGISTRY_PUBLISH_REQUEST_COUNT",{}),t[4]=r,t[5]=l):l=t[5];let a;return t[6]!==o||t[7]!==l?(a={queryKey:o,queryFn:l,staleTime:3e4},t[6]=o,t[7]=l,t[8]=a):a=t[8],Ze(a)}function er(){const t=X.c(17),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:H.publishRequests()})])},t[2]=e,t[3]=l):l=t[3];const a=l;let i;t[4]!==o?(i=async d=>Ae(o,"REGISTRY_PUBLISH_REQUEST_REVIEW",d),t[4]=o,t[5]=i):i=t[5];let c;t[6]!==a||t[7]!==i?(c={mutationFn:i,onSuccess:a},t[6]=a,t[7]=i,t[8]=c):c=t[8];const m=$e(c);let u;t[9]!==o?(u=async d=>Ae(o,"REGISTRY_PUBLISH_REQUEST_DELETE",{id:d}),t[9]=o,t[10]=u):u=t[10];let x;t[11]!==a||t[12]!==u?(x={mutationFn:u,onSuccess:a},t[11]=a,t[12]=u,t[13]=x):x=t[13];const p=$e(x);let h;return t[14]!==p||t[15]!==m?(h={reviewMutation:m,deleteMutation:p},t[14]=p,t[15]=m,t[16]=h):h=t[16],h}function tr(){const t=X.c(5),{org:e}=he();let n;t[0]!==e.id?(n={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=be(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=H.publishApiKeys(),t[2]=o):o=t[2];let l;return t[3]!==r?(l={queryKey:o,queryFn:async()=>Ae(r,"REGISTRY_PUBLISH_API_KEY_LIST",{}),staleTime:3e4},t[3]=r,t[4]=l):l=t[4],Ze(l)}function sr(){const t=X.c(19),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async d=>Ae(o,"REGISTRY_PUBLISH_API_KEY_GENERATE",{name:d}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.publishApiKeys()})},t[4]=e,t[5]=a):a=t[5];let i;t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8];const c=$e(i);let m;t[9]!==o?(m=async d=>Ae(o,"REGISTRY_PUBLISH_API_KEY_REVOKE",{keyId:d}),t[9]=o,t[10]=m):m=t[10];let u;t[11]!==e?(u=async()=>{await e.invalidateQueries({queryKey:H.publishApiKeys()})},t[11]=e,t[12]=u):u=t[12];let x;t[13]!==m||t[14]!==u?(x={mutationFn:m,onSuccess:u},t[13]=m,t[14]=u,t[15]=x):x=t[15];const p=$e(x);let h;return t[16]!==c||t[17]!==p?(h={generateMutation:c,revokeMutation:p},t[16]=c,t[17]=p,t[18]=h):h=t[18],h}function ms(t){return t?t.split(/[;|]/).map(e=>e.trim()).filter(Boolean):[]}function us(t){const e=[];let n="",r=!1;for(let o=0;o<t.length;o+=1){const l=t[o],a=t[o+1];if(l==='"'){r&&a==='"'?(n+='"',o+=1):r=!r;continue}if(l===","&&!r){e.push(n.trim()),n="";continue}n+=l}return e.push(n.trim()),e}const nr=["id","title"],rr=["id","title","description","remote_url","remote_type","tags","categories","is_public"];function ir(t){const e=t.split(/\r?\n/).map(m=>m.trim()).filter(Boolean);if(e.length<2)return{items:[],warnings:[{line:0,message:"CSV must have a header row and at least one data row"}],skipped:0};const n=us(e[0]??""),r=new Map,o=[];n.forEach((m,u)=>{const x=m.toLowerCase().trim();x&&r.set(x,u)});for(const m of nr)r.has(m)||o.push({line:1,message:`Missing required column: "${m}"`});for(const m of n){const u=m.toLowerCase().trim();u&&!rr.includes(u)&&o.push({line:1,message:`Unknown column "${m}" will be ignored`})}if(!r.has("id")||!r.has("title"))return{items:[],warnings:o,skipped:0};const l=(m,u)=>{const x=r.get(u);return typeof x=="number"?m[x]??"":""},a=[],i=new Set;let c=0;for(let m=1;m<e.length;m+=1){const u=us(e[m]??""),x=l(u,"id").trim(),p=l(u,"title").trim();if(!x){o.push({line:m+1,message:"Missing id — row skipped"}),c+=1;continue}if(!p){o.push({line:m+1,message:`Missing title for id="${x}" — row skipped`}),c+=1;continue}if(i.has(x)){o.push({line:m+1,message:`Duplicate id="${x}" — row skipped`}),c+=1;continue}i.add(x);const h=l(u,"description").trim(),d=l(u,"remote_url").trim(),j=l(u,"remote_type").trim().toLowerCase()==="sse"?"sse":"http",_=ms(l(u,"tags")),k=ms(l(u,"categories")),y=l(u,"is_public").trim().toLowerCase(),g=y==="true"||y==="1"||y==="yes";a.push({id:x,title:p,description:h||null,is_public:g,_meta:{"mcp.mesh":{..._.length>0?{tags:_}:{},...k.length>0?{categories:k}:{}}},server:{name:x,title:p,description:h||void 0,remotes:d?[{type:j,url:d}]:[]}})}return{items:a,warnings:o,skipped:c}}const lr=`id,title,description,remote_url,remote_type,tags,categories,is_public
|
|
1
|
+
import{r as T,c as X,u as he,n as Qe,b$ as tt,j as s,B as F,v as ne,t as Z,cd as cn}from"./index-B57CuSVv.js";import{i as ft}from"./CheckCircle-pyP6FuBr.js";import{n as dn}from"./Container-C2fyu03W.js";import{t as mn}from"./Settings01-3u2Bow8z.js";import{u as Ze}from"./useQuery-C9IzXvrv.js";import{u as $e}from"./useMutation-CCGHUnSx.js";import{a as ve,u as be,h as js}from"./constants-DamjJgLK.js";import{u as bs}from"./useInfiniteQuery-CgnpS_zo.js";import{B as G}from"./badge-B3PuW_EW.js";import{I as je}from"./input-D2SfEJvf.js";import{a as Dt,c as Je,D as $t,b as At,h as ls,i as as,g as un}from"./dropdown-menu-ALsN-pVk.js";import{e as vs,a as ys,b as Lt,T as Oe,d as Ns,c as Ue}from"./table-CZYoHyke.js";import{a as os,T as xn}from"./toggle-group-BSTN0kXc.js";import{u as hn}from"./use-view-mode-B4wK2uKy.js";import{i as Xt}from"./DotsVertical-C5Mnj-Ol.js";import{i as pn}from"./FilterLines-jkgQLqbS.js";import{i as ws}from"./Globe01-DGUbGV_n.js";import{i as ut}from"./Loading01-C3DKwOFI.js";import{i as Cs}from"./SearchMd-fcNN21Gr.js";import{b as zt,c as Ot,d as Ut,e as qt,a as Ft,D as Bt}from"./dialog-mVAXjnwm.js";import{i as vt}from"./AlertCircle-DxE1CFMy.js";import{n as fn}from"./Download01-CI1dt-NN.js";import{i as cs}from"./Upload01-h0zHEm3f.js";import{c as yt,b as Nt,d as wt,A as Ct,h as _t,e as kt,a as St,f as Rt}from"./alert-dialog-B7P1Xx2P.js";import{C as me}from"./card-mroijQho.js";import{s as It}from"./Trash01-XEPfiPr3.js";import{L as le}from"./label-DKwFCpFF.js";import{n as gn,S as _s,a as ks,b as Ss,c as Rs,d as Et}from"./select-DCJCMvYp.js";import{S as bt}from"./switch-DYDtUk6R.js";import{T as Gt}from"./textarea-WmaLJOSS.js";import{i as jn}from"./ArrowLeft-Cj3rlVid.js";import{i as bn,u as Ht,t as vn}from"./use-copy-DA_ixYAx.js";import{s as es}from"./RefreshCcw01-CgBMQrzN.js";import{i as yn}from"./X-V73kIsj3.js";import{i as Nn}from"./Link01-BVEdynBS.js";import{t as Ts}from"./ChevronDown-CMnFLAn0.js";import{C as wn}from"./checkbox-D8wFdX1G.js";import{s as Is}from"./Eye-Ce2mviev.js";import{n as Cn}from"./LinkExternal01-CWRjzwRB.js";import{i as _n}from"./XCircle-Cw9JLXtH.js";import{e as Ms}from"./use-collections-CyaEugDP.js";import{b as Ps}from"./use-connection-CsQi-w6W.js";import{a as kn,b as Sn,P as Rn}from"./popover-m7Ex_T4a.js";import{i as Wt}from"./Check-BYEmwnWo.js";import{a as Jt}from"./Copy01-D1aG80p5.js";import{i as Tn,a as In}from"./Save01-w2BzILAu.js";import{i as Mn}from"./Key01-BsI-G9kQ.js";import{s as Pn}from"./Plus-Dcmwoj2g.js";import{a as En,b as Dn,T as $n}from"./tooltip-CXXn3Ro_.js";import{a as An,i as Ln}from"./mcp-oauth-2wHFylg7.js";import{i as zn}from"./Play-y2tixZXd.js";import"./infiniteQueryObserver-C3tGBnJO.js";import"./ChevronRight-BLexx0Qt.js";import"./use-mobile-v7QQFcpP.js";import"./index-Bes18yjv.js";const Es=({size:t=24,color:e="currentColor",...n})=>T.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},T.createElement("path",{d:"M10.743 5.092C11.149 5.032 11.569 5 12 5c5.105 0 8.455 4.505 9.58 6.287.137.215.205.323.243.49a1.16 1.16 0 0 1 0 .447c-.038.166-.107.274-.244.492-.3.474-.757 1.141-1.363 1.865M6.724 6.715c-2.162 1.467-3.63 3.504-4.303 4.57-.137.217-.205.325-.243.492a1.173 1.173 0 0 0 0 .446c.038.167.106.274.242.49C3.546 14.495 6.895 19 12 19c2.059 0 3.832-.732 5.289-1.723M3 3l18 18M9.88 9.879a3 3 0 1 0 4.243 4.243"}));Es.displayName="EyeOff";const Ds=({size:t=24,color:e="currentColor",...n})=>T.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},T.createElement("path",{d:"M12.5 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 21H17c.93 0 1.395 0 1.776-.102a3 3 0 0 0 2.122-2.122C21 18.395 21 17.93 21 17m-2-9V2m-3 3h6M10.5 8.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm4.49 3.418-8.459 7.69c-.476.433-.714.649-.735.836a.5.5 0 0 0 .167.431C6.105 21 6.426 21 7.07 21h9.387c1.44 0 2.159 0 2.724-.242a3 3 0 0 0 1.578-1.578c.242-.565.242-1.285.242-2.724 0-.484 0-.726-.053-.952a2.001 2.001 0 0 0-.374-.778c-.143-.182-.332-.333-.71-.636l-2.797-2.237c-.379-.303-.568-.454-.776-.508a1 1 0 0 0-.557.018c-.205.066-.384.23-.743.555Z"}));Ds.displayName="ImagePlus";const $s=({size:t=24,color:e="currentColor",...n})=>T.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},T.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.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.8Z"}),T.createElement("path",{d:"M8 9.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 8 9.04 8 9.6 8h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 8.76 16 9.04 16 9.6v4.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C15.24 16 14.96 16 14.4 16H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 15.24 8 14.96 8 14.4V9.6Z"}));$s.displayName="StopSquare";const ts=({size:t=24,color:e="currentColor",...n})=>T.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},T.createElement("path",{d:"m6 6 4.5 4.5M6 6H3L2 3l1-1 3 1v3Zm13.259-3.259-2.628 2.628c-.396.396-.594.594-.668.822a1 1 0 0 0 0 .618c.074.228.272.426.668.822l.238.238c.396.396.594.594.822.668a1 1 0 0 0 .618 0c.228-.074.426-.272.822-.668L21.59 5.41a5.5 5.5 0 0 1-6.16 7.485c-.485-.096-.729-.144-.876-.13a.836.836 0 0 0-.373.114c-.13.07-.261.201-.523.463L6.5 20.5a2.121 2.121 0 0 1-3-3l7.157-7.157c.262-.262.393-.393.463-.524a.836.836 0 0 0 .113-.372c.015-.148-.033-.39-.129-.877a5.5 5.5 0 0 1 8.155-5.83ZM12 15l5.5 5.5a2.121 2.121 0 0 0 3-3l-4.525-4.525a5.475 5.475 0 0 1-.934-.17c-.39-.107-.816-.03-1.101.255L12 15Z"}));ts.displayName="Tool02";const H={all:["private-registry"],items:()=>[...H.all,"items"],itemsList:(t,e,n,r)=>[...H.items(),"list",{search:t,tags:e,categories:n,limit:r}],item:t=>[...H.items(),"item",t],filters:()=>[...H.all,"filters"],registryConfig:()=>[...H.all,"registry-config"],registryConfigByPlugin:(t,e)=>[...H.registryConfig(),t,e],publishRequests:()=>[...H.all,"publish-requests"],publishRequestsByOrg:t=>[...H.publishRequests(),"org",t],publishRequestsList:(t,e,n)=>[...H.publishRequests(),"list",{status:t??"all",sortBy:e??"created_at",sortDirection:n??"desc"}],publishRequestsListByOrg:(t,e,n,r)=>[...H.publishRequestsByOrg(t),"list",{status:e??"all",sortBy:n??"created_at",sortDirection:r??"desc"}],publishRequestsCount:()=>[...H.publishRequests(),"count"],publishRequestsCountByOrg:t=>[...H.publishRequestsByOrg(t),"count"],publishApiKeys:()=>[...H.all,"publish-api-keys"],monitor:()=>[...H.all,"monitor"],monitorRuns:()=>[...H.monitor(),"runs"],monitorRunsList:t=>[...H.monitorRuns(),"list",{status:t??"all"}],monitorRun:t=>[...H.monitorRuns(),"run",t??"none"],monitorResults:()=>[...H.monitor(),"results"],monitorResultsList:(t,e)=>[...H.monitorResults(),"list",{runId:t??"none",status:e??"all"}],monitorConnections:()=>[...H.monitor(),"connections"],monitorConnectionAuthProbe:t=>[...H.monitorConnections(),"auth-probe",t]};async function qe(t,e,n){const r=await t.callTool({name:e,arguments:n});if(!r||typeof r!="object")throw new Error(`Invalid tool response for ${e}`);if(r.isError){const o=r.content?.find(l=>l.type==="text")?.text??`Tool ${e} returned an error`;throw new Error(o)}return r.structuredContent??r}function On(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>qe(o,"REGISTRY_MONITOR_RUN_START",{config:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await Promise.all([e.invalidateQueries({queryKey:H.monitorRuns()}),e.invalidateQueries({queryKey:H.monitorResults()})])},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Un(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>qe(o,"REGISTRY_MONITOR_RUN_CANCEL",{runId:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async(c,m)=>{await Promise.all([e.invalidateQueries({queryKey:H.monitorRuns()}),e.invalidateQueries({queryKey:H.monitorRun(m)})])},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Qt(t){const e=X.c(10),{org:n}=he();let r;e[0]!==n.id?(r={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=be(r);let l;e[2]!==t?(l=H.monitorRunsList(t),e[2]=t,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==t?(a=async()=>qe(o,"REGISTRY_MONITOR_RUN_LIST",{status:t,limit:100}),e[4]=o,e[5]=t,e[6]=a):a=e[6];let i;return e[7]!==l||e[8]!==a?(i={queryKey:l,queryFn:a,staleTime:5e3},e[7]=l,e[8]=a,e[9]=i):i=e[9],Ze(i)}function ss(t){const e=X.c(11),{org:n}=he();let r;e[0]!==n.id?(r={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=be(r);let l;e[2]!==t?(l=H.monitorRun(t),e[2]=t,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==t?(a=async()=>qe(o,"REGISTRY_MONITOR_RUN_GET",{runId:t}),e[4]=o,e[5]=t,e[6]=a):a=e[6];const i=!!t;let c;return e[7]!==l||e[8]!==a||e[9]!==i?(c={queryKey:l,queryFn:a,enabled:i,refetchInterval:qn},e[7]=l,e[8]=a,e[9]=i,e[10]=c):c=e[10],Ze(c)}function qn(t){return t.state.data?.run?.status==="running"?5e3:!1}function Mt(t,e,n){const r=X.c(14),{org:o}=he();let l;r[0]!==o.id?(l={connectionId:ve,orgId:o.id},r[0]=o.id,r[1]=l):l=r[1];const a=be(l);let i;r[2]!==t||r[3]!==e?(i=H.monitorResultsList(t,e),r[2]=t,r[3]=e,r[4]=i):i=r[4];let c;r[5]!==a||r[6]!==t||r[7]!==e?(c=async()=>qe(a,"REGISTRY_MONITOR_RESULT_LIST",{runId:t,status:e,limit:200,offset:0}),r[5]=a,r[6]=t,r[7]=e,r[8]=c):c=r[8];const m=!!t,u=n==="running"?2500:!1;let x;return r[9]!==i||r[10]!==c||r[11]!==m||r[12]!==u?(x={queryKey:i,queryFn:c,enabled:m,staleTime:5e3,refetchInterval:u},r[9]=i,r[10]=c,r[11]=m,r[12]=u,r[13]=x):x=r[13],Ze(x)}function As(){const t=X.c(5),{org:e}=he();let n;t[0]!==e.id?(n={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=be(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=H.monitorConnections(),t[2]=o):o=t[2];let l;return t[3]!==r?(l={queryKey:o,queryFn:async()=>qe(r,"REGISTRY_MONITOR_CONNECTION_LIST",{}),staleTime:1e4},t[3]=r,t[4]=l):l=t[4],Ze(l)}function Fn(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async()=>qe(o,"REGISTRY_MONITOR_CONNECTION_SYNC",{}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.monitorConnections()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Bn(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>{const{connectionId:m,authStatus:u}=c;return qe(o,"REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH",{connectionId:m,authStatus:u})},t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.monitorConnections()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}const ds={monitorMode:"health_check",onFailure:"none",schedule:"manual",cronExpression:"",scheduleEventId:"",perMcpTimeoutMs:3e4,perToolTimeoutMs:1e4,maxAgentSteps:15,testPublicOnly:!1,testPrivateOnly:!1,includePendingRequests:!1,agentContext:"",llmConnectionId:"",llmModelId:""};function Ls(){const t=X.c(33),{org:e,project:n}=he();let r;t[0]!==e.id?(r={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=r):r=t[1];const o=be(r),l=Qe();let a;t[2]!==n.id?(a=H.registryConfigByPlugin(n.id??"",tt),t[2]=n.id,t[3]=a):a=t[3];let i;t[4]!==o||t[5]!==n.id?(i=async()=>qe(o,"PROJECT_PLUGIN_CONFIG_GET",{projectId:n.id,pluginId:tt}),t[4]=o,t[5]=n.id,t[6]=i):i=t[6];const c=!!n.id;let m;t[7]!==a||t[8]!==i||t[9]!==c?(m={queryKey:a,queryFn:i,enabled:c},t[7]=a,t[8]=i,t[9]=c,t[10]=m):m=t[10];const u=Ze(m),x=u.data?.config?.settings,p=x&&typeof x=="object"?x.testConfig:void 0,d=typeof(x?x.monitorMode??x.testMode:void 0)=="string";let b;t[11]!==p?(b=p??{},t[11]=p,t[12]=b):b=t[12];let j;t[13]!==d||t[14]!==x||t[15]!==p?(j=d&&!p?x:{},t[13]=d,t[14]=x,t[15]=p,t[16]=j):j=t[16];let _;t[17]!==b||t[18]!==j?(_={...ds,...b,...j},t[17]=b,t[18]=j,t[19]=_):_=t[19];const k=_;let y;t[20]!==o||t[21]!==n.id?(y=async S=>{const N=(await qe(o,"PROJECT_PLUGIN_CONFIG_GET",{projectId:n.id,pluginId:tt}))?.config?.settings??{};return qe(o,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:n.id,pluginId:tt,settings:{...N,testConfig:{...ds,...N.testConfig??{},...S}}})},t[20]=o,t[21]=n.id,t[22]=y):y=t[22];let g;t[23]!==n.id||t[24]!==l?(g=async()=>{await l.invalidateQueries({queryKey:H.registryConfigByPlugin(n.id??"",tt)})},t[23]=n.id,t[24]=l,t[25]=g):g=t[25];let I;t[26]!==y||t[27]!==g?(I={mutationFn:y,onSuccess:g},t[26]=y,t[27]=g,t[28]=I):I=t[28];const f=$e(I);let w;return t[29]!==u.isLoading||t[30]!==f||t[31]!==k?(w={settings:k,isLoading:u.isLoading,saveMutation:f},t[29]=u.isLoading,t[30]=f,t[31]=k,t[32]=w):w=t[32],w}function Gn(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>qe(o,"REGISTRY_MONITOR_SCHEDULE_SET",c),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.registryConfig()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Qn(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>qe(o,"REGISTRY_MONITOR_SCHEDULE_CANCEL",{scheduleEventId:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.registryConfig()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Kn(){const t=X.c(3),e=Qt("completed"),n=e.data?.items?.[0]?.id,r=e.data?.items?.[0]?.status,o=Mt(n,"failed",r),l=o.data?.items?.length??0,a=e.isLoading||o.isLoading;let i;return t[0]!==l||t[1]!==a?(i={brokenCount:l,isLoading:a},t[0]=l,t[1]=a,t[2]=i):i=t[2],i}const zs=24;function Vn(t){return t.trim()}async function Ae(t,e,n){const r=await t.callTool({name:e,arguments:n});if(!r||typeof r!="object")throw new Error(`Invalid tool response for ${e}`);if(r.isError){const o=r.content?.find(l=>l.type==="text")?.text??`Tool ${e} returned an error`;throw new Error(o)}return r.structuredContent??r}function Os(t){const e=X.c(19),{org:n}=he();let r;e[0]!==n.id?(r={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=be(r);let l,a,i,c;e[2]!==t.categories||e[3]!==t.limit||e[4]!==t.search||e[5]!==t.tags?(a=Vn(t.search),l=t.limit??zs,c=bs,i=H.itemsList(a,t.tags,t.categories,l),e[2]=t.categories,e[3]=t.limit,e[4]=t.search,e[5]=t.tags,e[6]=l,e[7]=a,e[8]=i,e[9]=c):(l=e[6],a=e[7],i=e[8],c=e[9]);let m;e[10]!==o||e[11]!==l||e[12]!==t.categories||e[13]!==t.tags||e[14]!==a?(m=async x=>{const{pageParam:p}=x,h=a.length>0?{operator:"or",conditions:[{field:["title"],operator:"contains",value:a},{field:["description"],operator:"contains",value:a},{field:["id"],operator:"contains",value:a},{field:["server","name"],operator:"contains",value:a}]}:void 0;return Ae(o,"REGISTRY_ITEM_LIST",{cursor:p,limit:l,tags:t.tags.length?t.tags:void 0,categories:t.categories.length?t.categories:void 0,where:h})},e[10]=o,e[11]=l,e[12]=t.categories,e[13]=t.tags,e[14]=a,e[15]=m):m=e[15];let u;return e[16]!==i||e[17]!==m?(u={queryKey:i,queryFn:m,initialPageParam:void 0,getNextPageParam:Yn,staleTime:3e4},e[16]=i,e[17]=m,e[18]=u):u=e[18],c(u)}function Yn(t){return t.nextCursor}function Hn(){const t=X.c(8),{org:e}=he();let n;t[0]!==e.id?(n={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=be(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=H.filters(),t[2]=o):o=t[2];let l;t[3]!==r?(l=async()=>Ae(r,"REGISTRY_ITEM_FILTERS",{}),t[3]=r,t[4]=l):l=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a={tags:[],categories:[]},t[5]=a):a=t[5];let i;return t[6]!==l?(i={queryKey:o,queryFn:l,placeholderData:a,staleTime:6e4},t[6]=l,t[7]=i):i=t[7],Ze(i)}function ns(){const t=X.c(29),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:H.items()}),e.invalidateQueries({queryKey:H.filters()})])},t[2]=e,t[3]=l):l=t[3];const a=l;let i;t[4]!==o?(i=async g=>(await Ae(o,"REGISTRY_ITEM_CREATE",{data:g})).item,t[4]=o,t[5]=i):i=t[5];let c;t[6]!==a||t[7]!==i?(c={mutationFn:i,onSuccess:a},t[6]=a,t[7]=i,t[8]=c):c=t[8];const m=$e(c);let u;t[9]!==o?(u=async g=>{const{id:I,data:f}=g;return(await Ae(o,"REGISTRY_ITEM_UPDATE",{id:I,data:f})).item},t[9]=o,t[10]=u):u=t[10];let x;t[11]!==a||t[12]!==u?(x={mutationFn:u,onSuccess:a},t[11]=a,t[12]=u,t[13]=x):x=t[13];const p=$e(x);let h;t[14]!==o?(h=async g=>(await Ae(o,"REGISTRY_ITEM_DELETE",{id:g})).item,t[14]=o,t[15]=h):h=t[15];let d;t[16]!==a||t[17]!==h?(d={mutationFn:h,onSuccess:a},t[16]=a,t[17]=h,t[18]=d):d=t[18];const b=$e(d);let j;t[19]!==o?(j=async g=>Ae(o,"REGISTRY_ITEM_BULK_CREATE",{items:g}),t[19]=o,t[20]=j):j=t[20];let _;t[21]!==a||t[22]!==j?(_={mutationFn:j,onSuccess:a},t[21]=a,t[22]=j,t[23]=_):_=t[23];const k=$e(_);let y;return t[24]!==k||t[25]!==m||t[26]!==b||t[27]!==p?(y={createMutation:m,updateMutation:p,deleteMutation:b,bulkCreateMutation:k},t[24]=k,t[25]=m,t[26]=b,t[27]=p,t[28]=y):y=t[28],y}function Kt(t){const e=X.c(37),{org:n,project:r}=he();let o;e[0]!==n.id?(o={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=o):o=e[1];const l=be(o),a=Qe();let i;e[2]!==t||e[3]!==r.id?(i=H.registryConfigByPlugin(r.id??"",t),e[2]=t,e[3]=r.id,e[4]=i):i=e[4];let c;e[5]!==l||e[6]!==t||e[7]!==r.id?(c=async()=>Ae(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:r.id,pluginId:t}),e[5]=l,e[6]=t,e[7]=r.id,e[8]=c):c=e[8];const m=!!r.id;let u;e[9]!==i||e[10]!==c||e[11]!==m?(u={queryKey:i,queryFn:c,enabled:m,staleTime:6e4},e[9]=i,e[10]=c,e[11]=m,e[12]=u):u=e[12];const x=Ze(u);let p;e[13]!==l||e[14]!==t||e[15]!==r.id?(p=async $=>{const M=(await Ae(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:r.id,pluginId:t}))?.config?.settings??{};return Ae(l,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:r.id,pluginId:t,settings:{...M,...$}})},e[13]=l,e[14]=t,e[15]=r.id,e[16]=p):p=e[16];let h;e[17]!==t||e[18]!==r.id||e[19]!==a?(h=async()=>{await a.invalidateQueries({queryKey:H.registryConfigByPlugin(r.id??"",t)})},e[17]=t,e[18]=r.id,e[19]=a,e[20]=h):h=e[20];let d;e[21]!==p||e[22]!==h?(d={mutationFn:p,onSuccess:h},e[21]=p,e[22]=h,e[23]=d):d=e[23];const b=$e(d),j=x.data?.config?.settings?.registryName??"Private Registry",_=x.data?.config?.settings?.registryIcon??"",k=x.data?.config?.settings?.llmConnectionId??"",y=x.data?.config?.settings?.llmModelId??"",g=x.data?.config?.settings?.acceptPublishRequests??!1,I=x.data?.config?.settings?.requireApiToken??!1,f=x.data?.config?.settings?.storePrivateOnly??!1,w=x.data?.config?.settings?.rateLimitEnabled??!0,P=x.data?.config?.settings?.rateLimitWindow==="minute"?"minute":"hour",N=x.data?.config?.settings?.rateLimitMax,R=typeof N=="number"&&N>=1?Math.floor(N):100;let v;return e[24]!==g||e[25]!==x.isLoading||e[26]!==w||e[27]!==R||e[28]!==P||e[29]!==_||e[30]!==k||e[31]!==y||e[32]!==j||e[33]!==I||e[34]!==b||e[35]!==f?(v={registryName:j,registryIcon:_,registryLLMConnectionId:k,registryLLMModelId:y,acceptPublishRequests:g,requireApiToken:I,storePrivateOnly:f,rateLimitEnabled:w,rateLimitWindow:P,rateLimitMax:R,isLoadingConfig:x.isLoading,saveRegistryConfigMutation:b},e[24]=g,e[25]=x.isLoading,e[26]=w,e[27]=R,e[28]=P,e[29]=_,e[30]=k,e[31]=y,e[32]=j,e[33]=I,e[34]=b,e[35]=f,e[36]=v):v=e[36],v}function Wn(t){const e=X.c(15),{org:n}=he();let r;e[0]!==n.id?(r={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=be(r);let l;e[2]!==n.id||e[3]!==t.sortBy||e[4]!==t.sortDirection||e[5]!==t.status?(l=H.publishRequestsListByOrg(n.id,t.status,t.sortBy,t.sortDirection),e[2]=n.id,e[3]=t.sortBy,e[4]=t.sortDirection,e[5]=t.status,e[6]=l):l=e[6];let a;e[7]!==o||e[8]!==t.sortBy||e[9]!==t.sortDirection||e[10]!==t.status?(a=async c=>{const{pageParam:m}=c;return Ae(o,"REGISTRY_PUBLISH_REQUEST_LIST",{status:t.status,sortBy:t.sortBy,sortDirection:t.sortDirection,limit:zs,offset:m})},e[7]=o,e[8]=t.sortBy,e[9]=t.sortDirection,e[10]=t.status,e[11]=a):a=e[11];let i;return e[12]!==l||e[13]!==a?(i={queryKey:l,queryFn:a,initialPageParam:0,getNextPageParam:Jn,staleTime:3e4,refetchOnMount:!0},e[12]=l,e[13]=a,e[14]=i):i=e[14],bs(i)}function Jn(t,e){const n=e.reduce(Zn,0);return n<t.totalCount?n:void 0}function Zn(t,e){return t+e.items.length}function Xn(){const t=X.c(9),{org:e}=he();let n;t[0]!==e.id?(n={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=be(n);let o;t[2]!==e.id?(o=H.publishRequestsCountByOrg(e.id),t[2]=e.id,t[3]=o):o=t[3];let l;t[4]!==r?(l=async()=>Ae(r,"REGISTRY_PUBLISH_REQUEST_COUNT",{}),t[4]=r,t[5]=l):l=t[5];let a;return t[6]!==o||t[7]!==l?(a={queryKey:o,queryFn:l,staleTime:3e4},t[6]=o,t[7]=l,t[8]=a):a=t[8],Ze(a)}function er(){const t=X.c(17),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:H.publishRequests()})])},t[2]=e,t[3]=l):l=t[3];const a=l;let i;t[4]!==o?(i=async d=>Ae(o,"REGISTRY_PUBLISH_REQUEST_REVIEW",d),t[4]=o,t[5]=i):i=t[5];let c;t[6]!==a||t[7]!==i?(c={mutationFn:i,onSuccess:a},t[6]=a,t[7]=i,t[8]=c):c=t[8];const m=$e(c);let u;t[9]!==o?(u=async d=>Ae(o,"REGISTRY_PUBLISH_REQUEST_DELETE",{id:d}),t[9]=o,t[10]=u):u=t[10];let x;t[11]!==a||t[12]!==u?(x={mutationFn:u,onSuccess:a},t[11]=a,t[12]=u,t[13]=x):x=t[13];const p=$e(x);let h;return t[14]!==p||t[15]!==m?(h={reviewMutation:m,deleteMutation:p},t[14]=p,t[15]=m,t[16]=h):h=t[16],h}function tr(){const t=X.c(5),{org:e}=he();let n;t[0]!==e.id?(n={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=be(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=H.publishApiKeys(),t[2]=o):o=t[2];let l;return t[3]!==r?(l={queryKey:o,queryFn:async()=>Ae(r,"REGISTRY_PUBLISH_API_KEY_LIST",{}),staleTime:3e4},t[3]=r,t[4]=l):l=t[4],Ze(l)}function sr(){const t=X.c(19),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async d=>Ae(o,"REGISTRY_PUBLISH_API_KEY_GENERATE",{name:d}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.publishApiKeys()})},t[4]=e,t[5]=a):a=t[5];let i;t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8];const c=$e(i);let m;t[9]!==o?(m=async d=>Ae(o,"REGISTRY_PUBLISH_API_KEY_REVOKE",{keyId:d}),t[9]=o,t[10]=m):m=t[10];let u;t[11]!==e?(u=async()=>{await e.invalidateQueries({queryKey:H.publishApiKeys()})},t[11]=e,t[12]=u):u=t[12];let x;t[13]!==m||t[14]!==u?(x={mutationFn:m,onSuccess:u},t[13]=m,t[14]=u,t[15]=x):x=t[15];const p=$e(x);let h;return t[16]!==c||t[17]!==p?(h={generateMutation:c,revokeMutation:p},t[16]=c,t[17]=p,t[18]=h):h=t[18],h}function ms(t){return t?t.split(/[;|]/).map(e=>e.trim()).filter(Boolean):[]}function us(t){const e=[];let n="",r=!1;for(let o=0;o<t.length;o+=1){const l=t[o],a=t[o+1];if(l==='"'){r&&a==='"'?(n+='"',o+=1):r=!r;continue}if(l===","&&!r){e.push(n.trim()),n="";continue}n+=l}return e.push(n.trim()),e}const nr=["id","title"],rr=["id","title","description","remote_url","remote_type","tags","categories","is_public"];function ir(t){const e=t.split(/\r?\n/).map(m=>m.trim()).filter(Boolean);if(e.length<2)return{items:[],warnings:[{line:0,message:"CSV must have a header row and at least one data row"}],skipped:0};const n=us(e[0]??""),r=new Map,o=[];n.forEach((m,u)=>{const x=m.toLowerCase().trim();x&&r.set(x,u)});for(const m of nr)r.has(m)||o.push({line:1,message:`Missing required column: "${m}"`});for(const m of n){const u=m.toLowerCase().trim();u&&!rr.includes(u)&&o.push({line:1,message:`Unknown column "${m}" will be ignored`})}if(!r.has("id")||!r.has("title"))return{items:[],warnings:o,skipped:0};const l=(m,u)=>{const x=r.get(u);return typeof x=="number"?m[x]??"":""},a=[],i=new Set;let c=0;for(let m=1;m<e.length;m+=1){const u=us(e[m]??""),x=l(u,"id").trim(),p=l(u,"title").trim();if(!x){o.push({line:m+1,message:"Missing id — row skipped"}),c+=1;continue}if(!p){o.push({line:m+1,message:`Missing title for id="${x}" — row skipped`}),c+=1;continue}if(i.has(x)){o.push({line:m+1,message:`Duplicate id="${x}" — row skipped`}),c+=1;continue}i.add(x);const h=l(u,"description").trim(),d=l(u,"remote_url").trim(),j=l(u,"remote_type").trim().toLowerCase()==="sse"?"sse":"http",_=ms(l(u,"tags")),k=ms(l(u,"categories")),y=l(u,"is_public").trim().toLowerCase(),g=y==="true"||y==="1"||y==="yes";a.push({id:x,title:p,description:h||null,is_public:g,_meta:{"mcp.mesh":{..._.length>0?{tags:_}:{},...k.length>0?{categories:k}:{}}},server:{name:x,title:p,description:h||void 0,remotes:d?[{type:j,url:d}]:[]}})}return{items:a,warnings:o,skipped:c}}const lr=`id,title,description,remote_url,remote_type,tags,categories,is_public
|
|
2
2
|
my-mcp-server,My MCP Server,A useful MCP server,https://example.com/mcp,http,ai|tools,productivity,true
|
|
3
3
|
another-server,Another Server,Another useful server,https://example2.com/mcp,http,data|analytics,data-processing,false`;function ar(){const t=new Blob([lr],{type:"text/csv;charset=utf-8"}),e=URL.createObjectURL(t),n=document.createElement("a");n.href=e,n.download="registry-import-template.csv",n.click(),URL.revokeObjectURL(e)}function or(t){const e=X.c(63),{open:n,onOpenChange:r,isImporting:o,onImport:l}=t,a=o===void 0?!1:o,[i,c]=T.useState(null),[m,u]=T.useState(null),[x,p]=T.useState(null),h=T.useRef(null);let d;e[0]!==r?(d=V=>{r(V),V||(c(null),u(null),p(null),h.current&&(h.current.value=""))},e[0]=r,e[1]=d):d=e[1];const b=d;let j;e[2]===Symbol.for("react.memo_cache_sentinel")?(j=async V=>{if(!V)return;p(V.name),u(null);const ce=await V.text();c(ir(ce))},e[2]=j):j=e[2];const _=j;let k;e[3]!==l||e[4]!==i?(k=async()=>{if(!i?.items.length)return;const V=await l(i.items);u(V)},e[3]=l,e[4]=i,e[5]=k):k=e[5];const y=k;let g;e[6]!==i?.items?(g=i?.items??[],e[6]=i?.items,e[7]=g):g=e[7];const I=g;let f;e[8]!==i?.warnings?(f=i?.warnings??[],e[8]=i?.warnings,e[9]=f):f=e[9];const w=f;let S;e[10]!==w?(S=w.some(ur),e[10]=w,e[11]=S):S=e[11];const P=S,N=m!==null;let R;e[12]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsxs(zt,{children:[s.jsx(Ot,{children:"Import MCP Servers from CSV"}),s.jsx(Ut,{children:"Upload a CSV file to bulk-import MCP servers into the registry."})]}),e[12]=R):R=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=()=>h.current?.click(),e[13]=v):v=e[13];let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(cs,{size:14}),e[14]=$):$=e[14];const D=x?"Change file":"Choose CSV file";let M;e[15]!==a||e[16]!==D?(M=s.jsxs(F,{variant:"outline",size:"sm",className:"gap-1.5",onClick:v,disabled:a,children:[$,D]}),e[15]=a,e[16]=D,e[17]=M):M=e[17];let E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("input",{ref:h,type:"file",accept:".csv,text/csv",className:"hidden",onChange:V=>_(V.target.files?.[0]??null)}),e[18]=E):E=e[18];let A;e[19]!==x?(A=x&&s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:x}),e[19]=x,e[20]=A):A=e[20];let q;e[21]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx("div",{className:"flex-1"}),e[21]=q):q=e[21];let z;e[22]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsxs(F,{variant:"ghost",size:"sm",className:"gap-1.5 text-xs text-muted-foreground",onClick:ar,children:[s.jsx(fn,{size:14}),"Download template"]}),e[22]=z):z=e[22];let O;e[23]!==M||e[24]!==A?(O=s.jsxs("div",{className:"flex items-center gap-3",children:[M,E,A,q,z]}),e[23]=M,e[24]=A,e[25]=O):O=e[25];let B;e[26]!==w?(B=w.length>0&&s.jsx("div",{className:"rounded-lg border border-yellow-200 bg-yellow-50 dark:border-yellow-900 dark:bg-yellow-950/30 p-3 grid gap-1",children:w.map(mr)}),e[26]=w,e[27]=B):B=e[27];let Q;e[28]!==I||e[29]!==i?(Q=I.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:"Preview"}),s.jsxs(G,{variant:"secondary",children:[I.length," items"]}),i?.skipped?s.jsxs(G,{variant:"outline",className:"text-yellow-600",children:[i.skipped," skipped"]}):null]}),s.jsx("div",{className:"border rounded-lg overflow-hidden",children:s.jsx("div",{className:"max-h-[300px] overflow-y-auto",children:s.jsxs(vs,{children:[s.jsx(ys,{children:s.jsxs(Lt,{children:[s.jsx(Oe,{className:"w-[140px]",children:"ID"}),s.jsx(Oe,{children:"Title"}),s.jsx(Oe,{children:"Remote URL"}),s.jsx(Oe,{className:"w-[80px] text-center",children:"Public"}),s.jsx(Oe,{children:"Tags"})]})}),s.jsx(Ns,{children:I.map(dr)})]})})})]}),e[28]=I,e[29]=i,e[30]=Q):Q=e[30];let te;e[31]!==m?(te=m&&s.jsxs("div",{className:"rounded-lg border p-3 grid gap-1.5",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[s.jsx(ft,{size:16,className:"text-emerald-600"}),"Imported ",m.created," item(s) successfully"]}),m.errors.length>0&&s.jsx("div",{className:"grid gap-1 mt-1",children:m.errors.map(cr)})]}),e[31]=m,e[32]=te):te=e[32];let se;e[33]!==N||e[34]!==i?(se=!i&&!N&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[s.jsx(cs,{size:32,className:"text-muted-foreground/40 mb-3"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a CSV file or download the template to get started."}),s.jsxs("p",{className:"text-xs text-muted-foreground/70 mt-1",children:["Required columns: ",s.jsx("code",{children:"id"}),", ",s.jsx("code",{children:"title"}),". Optional:"," ",s.jsx("code",{children:"description"}),", ",s.jsx("code",{children:"remote_url"}),","," ",s.jsx("code",{children:"remote_type"}),", ",s.jsx("code",{children:"tags"}),","," ",s.jsx("code",{children:"categories"}),", ",s.jsx("code",{children:"is_public"}),"."]}),s.jsxs("p",{className:"text-xs text-muted-foreground/70 mt-1",children:["Use ",s.jsx("code",{children:"|"})," or ",s.jsx("code",{children:";"})," to separate multiple tags/categories within a cell."]})]}),e[33]=N,e[34]=i,e[35]=se):se=e[35];let re;e[36]!==O||e[37]!==B||e[38]!==Q||e[39]!==te||e[40]!==se?(re=s.jsxs("div",{className:"flex-1 overflow-y-auto grid gap-4 pr-1",children:[O,B,Q,te,se]}),e[36]=O,e[37]=B,e[38]=Q,e[39]=te,e[40]=se,e[41]=re):re=e[41];let ie;e[42]!==b?(ie=()=>b(!1),e[42]=b,e[43]=ie):ie=e[43];const ae=N?"Done":"Cancel";let oe;e[44]!==ie||e[45]!==ae?(oe=s.jsx(F,{variant:"outline",onClick:ie,children:ae}),e[44]=ie,e[45]=ae,e[46]=oe):oe=e[46];let pe;e[47]!==y||e[48]!==P||e[49]!==N||e[50]!==a||e[51]!==I.length?(pe=!N&&s.jsx(F,{onClick:y,disabled:a||I.length===0||P,children:a?"Importing...":`Import ${I.length} item(s)`}),e[47]=y,e[48]=P,e[49]=N,e[50]=a,e[51]=I.length,e[52]=pe):pe=e[52];let ue;e[53]!==oe||e[54]!==pe?(ue=s.jsxs(qt,{className:"gap-2 sm:gap-0",children:[oe,pe]}),e[53]=oe,e[54]=pe,e[55]=ue):ue=e[55];let C;e[56]!==re||e[57]!==ue?(C=s.jsxs(Ft,{className:"sm:max-w-3xl max-h-[85vh] flex flex-col",children:[R,re,ue]}),e[56]=re,e[57]=ue,e[58]=C):C=e[58];let K;return e[59]!==b||e[60]!==n||e[61]!==C?(K=s.jsx(Bt,{open:n,onOpenChange:b,children:C}),e[59]=b,e[60]=n,e[61]=C,e[62]=K):K=e[62],K}function cr(t){return s.jsxs("p",{className:"text-xs text-destructive flex items-start gap-1.5",children:[s.jsx(vt,{size:12,className:"shrink-0 mt-0.5"}),s.jsxs("span",{children:[s.jsx("span",{className:"font-mono",children:t.id}),": ",t.error]})]},t.id)}function dr(t){return s.jsxs(Lt,{children:[s.jsx(Ue,{className:"font-mono text-xs",children:t.id}),s.jsx(Ue,{className:"text-sm",children:t.title}),s.jsx(Ue,{className:"text-xs text-muted-foreground max-w-[200px] truncate",children:t.server.remotes?.[0]?.url??s.jsx("span",{className:"italic",children:"none"})}),s.jsx(Ue,{className:"text-center",children:t.is_public?s.jsx(G,{variant:"secondary",className:"text-[10px] bg-emerald-100 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-400",children:"Yes"}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"No"})}),s.jsx(Ue,{className:"text-xs text-muted-foreground",children:(t._meta?.["mcp.mesh"]?.tags??[]).join(", ")||"-"})]},t.id)}function mr(t,e){return s.jsxs("p",{className:"text-xs text-yellow-700 dark:text-yellow-400 flex items-start gap-1.5",children:[s.jsx(vt,{size:12,className:"shrink-0 mt-0.5"}),s.jsxs("span",{children:[t.line>0&&s.jsxs("span",{className:"font-mono text-[10px] mr-1",children:["Line ",t.line,":"]}),t.message]})]},`${t.line}-${e}`)}function ur(t){return t.message.startsWith("Missing required column:")}function xr(t){const e=X.c(19),{open:n,onOpenChange:r,title:o,isDeleting:l,onConfirm:a}=t,i=l===void 0?!1:l;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(yt,{children:"Delete registry item?"}),e[0]=c):c=e[0];let m;e[1]!==o?(m=s.jsxs(Nt,{children:[c,s.jsxs(wt,{children:["This action cannot be undone. Item ",s.jsx("strong",{children:o})," will be permanently removed from this private registry."]})]}),e[1]=o,e[2]=m):m=e[2];let u;e[3]!==i?(u=s.jsx(Ct,{disabled:i,children:"Cancel"}),e[3]=i,e[4]=u):u=e[4];const x=i?"Deleting...":"Delete";let p;e[5]!==i||e[6]!==a||e[7]!==x?(p=s.jsx(_t,{disabled:i,onClick:a,children:x}),e[5]=i,e[6]=a,e[7]=x,e[8]=p):p=e[8];let h;e[9]!==u||e[10]!==p?(h=s.jsxs(kt,{children:[u,p]}),e[9]=u,e[10]=p,e[11]=h):h=e[11];let d;e[12]!==m||e[13]!==h?(d=s.jsxs(St,{children:[m,h]}),e[12]=m,e[13]=h,e[14]=d):d=e[14];let b;return e[15]!==r||e[16]!==n||e[17]!==d?(b=s.jsx(Rt,{open:n,onOpenChange:r,children:d}),e[15]=r,e[16]=n,e[17]=d,e[18]=b):b=e[18],b}function hr(t){const[e]=t.id.split("/");return e??"provider"}function pr(t){return t._meta?.["mcp.mesh"]?.tags??[]}function fr(t){return t._meta?.["mcp.mesh"]?.categories??[]}function gr(t){return t.server?.icons?.[0]?.src??null}function jr(t){const e=X.c(56),{item:n,onEdit:r,onDelete:o}=t;let l;e[0]!==n?(l=gr(n),e[0]=n,e[1]=l):l=e[1];const a=l;let i;e[2]!==n?(i=[...pr(n),...fr(n)],e[2]=n,e[3]=i):i=e[3];const c=i;let m;e[4]!==c?(m=c.slice(0,3),e[4]=c,e[5]=m):m=e[5];const u=m,x=Math.max(0,c.length-u.length);let p;e[6]!==a||e[7]!==n.title?(p=s.jsx("div",{className:"size-10 rounded-lg border border-border bg-muted/20 overflow-hidden shrink-0 flex items-center justify-center",children:a?s.jsx("img",{src:a,alt:n.title,className:"h-full w-full object-cover",loading:"lazy"}):s.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n.title.charAt(0).toUpperCase()})}),e[6]=a,e[7]=n.title,e[8]=p):p=e[8];let h;e[9]!==n.title?(h=s.jsx("p",{className:"font-medium truncate",children:n.title}),e[9]=n.title,e[10]=h):h=e[10];let d;e[11]!==n?(d=hr(n),e[11]=n,e[12]=d):d=e[12];let b;e[13]!==d?(b=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:d}),e[13]=d,e[14]=b):b=e[14];let j;e[15]!==n.is_public?(j=n.is_public?s.jsxs(G,{variant:"default",className:"gap-1",children:[s.jsx(ws,{size:10}),"Public"]}):s.jsx(G,{variant:"secondary",children:"Private"}),e[15]=n.is_public,e[16]=j):j=e[16];let _;e[17]!==b||e[18]!==j?(_=s.jsxs("div",{className:"flex items-center gap-2",children:[b,j]}),e[17]=b,e[18]=j,e[19]=_):_=e[19];let k;e[20]!==h||e[21]!==_?(k=s.jsxs("div",{className:"min-w-0 flex-1",children:[h,_]}),e[20]=h,e[21]=_,e[22]=k):k=e[22];let y;e[23]!==k||e[24]!==p?(y=s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[p,k]}),e[23]=k,e[24]=p,e[25]=y):y=e[25];let g;e[26]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Dt,{asChild:!0,children:s.jsx(F,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx(Xt,{size:18})})}),e[26]=g):g=e[26];let I;e[27]!==n||e[28]!==r?(I=s.jsx(Je,{onClick:()=>r(n),children:"Edit"}),e[27]=n,e[28]=r,e[29]=I):I=e[29];let f;e[30]!==n||e[31]!==o?(f=()=>o(n),e[30]=n,e[31]=o,e[32]=f):f=e[32];let w;e[33]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(It,{size:14}),e[33]=w):w=e[33];let S;e[34]!==f?(S=s.jsxs(Je,{variant:"destructive",onClick:f,children:[w,"Delete"]}),e[34]=f,e[35]=S):S=e[35];let P;e[36]!==I||e[37]!==S?(P=s.jsxs($t,{children:[g,s.jsxs(At,{align:"end",children:[I,S]})]}),e[36]=I,e[37]=S,e[38]=P):P=e[38];let N;e[39]!==y||e[40]!==P?(N=s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[y,P]}),e[39]=y,e[40]=P,e[41]=N):N=e[41];const R=n._meta?.["mcp.mesh"]?.short_description||n.description||n.server.description||"No description provided.";let v;e[42]!==R?(v=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 min-h-10",children:R}),e[42]=R,e[43]=v):v=e[43];let $;e[44]!==n.id||e[45]!==u?($=u.map(A=>s.jsx(G,{variant:"secondary",children:A},`${n.id}-badge-${A}`)),e[44]=n.id,e[45]=u,e[46]=$):$=e[46];let D;e[47]!==x?(D=x>0&&s.jsxs(G,{variant:"outline",children:["+",x]}),e[47]=x,e[48]=D):D=e[48];let M;e[49]!==$||e[50]!==D?(M=s.jsxs("div",{className:"flex flex-wrap gap-1",children:[$,D]}),e[49]=$,e[50]=D,e[51]=M):M=e[51];let E;return e[52]!==N||e[53]!==v||e[54]!==M?(E=s.jsxs(me,{className:"p-4 gap-4 transition-colors hover:bg-muted/50",children:[N,v,M]}),e[52]=N,e[53]=v,e[54]=M,e[55]=E):E=e[55],E}function Us(t){const e=X.c(27),{value:n,onChange:r,onFileUpload:o,error:l,isUploading:a}=t,i=a===void 0?!1:a,[c,m]=T.useState(!1),[u,x]=T.useState(!1),p=T.useRef(null);let h;e[0]!==i?(h=R=>{R.preventDefault(),i||m(!0)},e[0]=i,e[1]=h):h=e[1];const d=h;let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=R=>{R.preventDefault(),m(!1)},e[2]=b):b=e[2];const j=b;let _;e[3]!==i||e[4]!==o?(_=async R=>{if(R.preventDefault(),m(!1),i)return;const v=R.dataTransfer.files[0];v&&await o(v)},e[3]=i,e[4]=o,e[5]=_):_=e[5];const k=_;let y;e[6]!==i||e[7]!==o?(y=async R=>{const v=R.target.files?.[0];v&&!i&&await o(v),R.target.value=""},e[6]=i,e[7]=o,e[8]=y):y=e[8];const g=y,I=n.length>0;let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(le,{children:"Image"}),e[9]=f):f=e[9];let w;e[10]!==d||e[11]!==k||e[12]!==I||e[13]!==c||e[14]!==i||e[15]!==r||e[16]!==u||e[17]!==n?(w=I?s.jsx("div",{className:"relative group min-h-[180px] rounded-xl border border-border overflow-hidden bg-muted/10",children:s.jsxs("div",{className:"flex items-center gap-3 p-3 h-full",children:[s.jsx("div",{className:"size-20 rounded-lg border border-border bg-muted/20 overflow-hidden shrink-0",children:s.jsx("img",{src:n,alt:"Preview",className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n}),s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsxs(F,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>p.current?.click(),disabled:i,children:[s.jsx(es,{className:"size-3"}),"Change"]}),s.jsxs(F,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5 text-destructive hover:text-destructive",onClick:()=>{r(""),x(!1)},disabled:i,children:[s.jsx(It,{className:"size-3"}),"Remove"]})]})]})]})}):i?s.jsxs("div",{className:"relative min-h-[180px] rounded-xl border border-border bg-muted/10 flex flex-col items-center justify-center gap-3",children:[s.jsx(ut,{className:"size-8 animate-spin text-muted-foreground"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Uploading image..."})]}):s.jsxs("div",{className:ne("relative min-h-[180px] rounded-xl border-2 border-dashed transition-colors cursor-pointer flex flex-col",c?"border-primary bg-primary/5":"border-border hover:border-muted-foreground/40 hover:bg-muted/30"),onDragOver:d,onDragLeave:j,onDrop:k,onClick:()=>p.current?.click(),children:[s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-6 px-4 flex-1",children:[s.jsx("div",{className:ne("size-10 rounded-lg flex items-center justify-center transition-colors",c?"bg-primary/10 text-primary":"bg-muted/50 text-muted-foreground"),children:s.jsx(Ds,{size:20})}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:c?"Drop image here":"Click or drag to upload"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"PNG, JPG, SVG up to 2MB"})]})]}),u?s.jsx("div",{className:"border-t border-border px-3 py-2",onClick:br,children:s.jsx(je,{placeholder:"https://example.com/logo.png",value:n,className:"text-xs h-8",onChange:R=>r(R.target.value)})}):s.jsx("div",{className:"border-t border-border px-4 py-2",children:s.jsxs("button",{type:"button",className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors w-full justify-center",onClick:R=>{R.stopPropagation(),x(!0)},children:[s.jsx(Nn,{className:"size-3"}),"Or paste an image URL"]})})]}),e[10]=d,e[11]=k,e[12]=I,e[13]=c,e[14]=i,e[15]=r,e[16]=u,e[17]=n,e[18]=w):w=e[18];let S;e[19]!==g?(S=s.jsx("input",{ref:p,type:"file",accept:"image/*",className:"hidden",onChange:g}),e[19]=g,e[20]=S):S=e[20];let P;e[21]!==l?(P=l&&s.jsx("p",{className:"text-xs text-destructive",children:l}),e[21]=l,e[22]=P):P=e[22];let N;return e[23]!==w||e[24]!==S||e[25]!==P?(N=s.jsxs("div",{className:"grid gap-1.5",children:[f,w,S,P]}),e[23]=w,e[24]=S,e[25]=P,e[26]=N):N=e[26],N}function br(t){return t.stopPropagation()}function qs(){const[t,e]=T.useState("idle"),[n,r]=T.useState(null),{org:o}=he(),l=be({connectionId:ve,orgId:o.id});return{discover:async(c,m)=>{if(!c)return null;e("loading"),r(null);try{const u=await l.callTool({name:"REGISTRY_DISCOVER_TOOLS",arguments:{url:c,type:m==="sse"?"sse":"http"}}),x=u.structuredContent??u;if(u.isError){const p=u.content?.find(h=>h.type==="text")?.text??"Tool returned an error";return r(p),e("error"),null}return x.error?vr(x.error)?(r(x.error),e("auth_required"),null):(r(x.error),e("error"),null):!x.tools||x.tools.length===0?(r("No tools found on this MCP server."),e("error"),null):(e("success"),x.tools)}catch(u){const x=u instanceof Error?u.message:String(u);return r(x||"Could not discover tools."),e("error"),null}},discoverStatus:t,discoverError:n,resetDiscover:()=>{e("idle"),r(null)}}}function vr(t){const e=t.toLowerCase();return e.includes("authentication")||e.includes("unauthorized")||e.includes("credentials")}function yr(t){const e=X.c(54),{tools:n,onChange:r,remoteUrl:o,remoteType:l,externalDiscoverStatus:a,externalDiscoverError:i}=t,[c,m]=T.useState(n.length>0),{discover:u,discoverStatus:x,discoverError:p,resetDiscover:h}=qs(),d=a??x,b=i??p;let j;e[0]!==u||e[1]!==r||e[2]!==l||e[3]!==o?(j=async()=>{if(!o)return;const z=await u(o,l??"http");z&&(r(z),m(!0))},e[0]=u,e[1]=r,e[2]=l,e[3]=o,e[4]=j):j=e[4];const _=j;let k;e[5]!==r||e[6]!==h?(k=()=>{r([]),h()},e[5]=r,e[6]=h,e[7]=k):k=e[7];const y=k;let g;e[8]!==c?(g=()=>m(!c),e[8]=c,e[9]=g):g=e[9];let I,f;e[10]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(ts,{size:14,className:"text-muted-foreground"}),f=s.jsx("span",{children:"Tools"}),e[10]=I,e[11]=f):(I=e[10],f=e[11]);let w;e[12]!==n.length?(w=n.length>0&&s.jsx(G,{variant:"secondary",className:"text-xs px-1.5 py-0",children:n.length}),e[12]=n.length,e[13]=w):w=e[13];let S;e[14]!==c?(S=c?s.jsx(gn,{size:14,className:"text-muted-foreground"}):s.jsx(Ts,{size:14,className:"text-muted-foreground"}),e[14]=c,e[15]=S):S=e[15];let P;e[16]!==g||e[17]!==w||e[18]!==S?(P=s.jsxs("button",{type:"button",className:"flex items-center gap-2 text-sm font-medium cursor-pointer",onClick:g,children:[I,f,w,S]}),e[16]=g,e[17]=w,e[18]=S,e[19]=P):P=e[19];let N;e[20]!==y||e[21]!==n.length?(N=n.length>0&&s.jsxs(F,{type:"button",variant:"ghost",size:"sm",className:"h-7 text-xs gap-1.5 text-muted-foreground",onClick:y,children:[s.jsx(It,{size:12}),"Clear"]}),e[20]=y,e[21]=n.length,e[22]=N):N=e[22];let R;e[23]!==d||e[24]!==_||e[25]!==o||e[26]!==n.length?(R=o&&s.jsxs(F,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5 border-green-500/30 text-green-600 dark:text-green-400 shadow-[0_0_8px_rgba(34,197,94,0.3)] hover:shadow-[0_0_14px_rgba(34,197,94,0.5)] hover:border-green-500/50 transition-all",onClick:_,disabled:d==="loading",children:[d==="loading"?s.jsx(ut,{size:12,className:"animate-spin"}):s.jsx(es,{size:12}),d==="loading"?"Discovering...":n.length>0?"Refresh":"Auto-discover"]}),e[23]=d,e[24]=_,e[25]=o,e[26]=n.length,e[27]=R):R=e[27];let v;e[28]!==R||e[29]!==N?(v=s.jsxs("div",{className:"flex items-center gap-2",children:[N,R]}),e[28]=R,e[29]=N,e[30]=v):v=e[30];let $;e[31]!==v||e[32]!==P?($=s.jsxs("div",{className:"flex items-center justify-between",children:[P,v]}),e[31]=v,e[32]=P,e[33]=$):$=e[33];let D;e[34]!==d||e[35]!==n.length?(D=d==="success"&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-950/30 rounded-lg px-3 py-2",children:[s.jsx(ft,{size:14,className:"shrink-0"}),s.jsxs("span",{children:["Discovered ",n.length," tool",n.length!==1?"s":""," ","successfully."]})]}),e[34]=d,e[35]=n.length,e[36]=D):D=e[36];let M;e[37]!==b||e[38]!==d?(M=d==="error"&&b&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-destructive bg-destructive/10 rounded-lg px-3 py-2",children:[s.jsx(vt,{size:14,className:"shrink-0"}),s.jsx("span",{children:b})]}),e[37]=b,e[38]=d,e[39]=M):M=e[39];let E;e[40]!==c||e[41]!==n?(E=c&&n.length>0&&s.jsx("div",{className:"rounded-xl border border-border divide-y divide-border overflow-hidden max-h-48 overflow-y-auto",children:n.map(Nr)}),e[40]=c,e[41]=n,e[42]=E):E=e[42];let A;e[43]!==d||e[44]!==c||e[45]!==o||e[46]!==n.length?(A=c&&n.length===0&&d==="idle"&&s.jsx("p",{className:"text-xs text-muted-foreground px-1",children:o?'Click "Auto-discover" to load tools from the MCP server.':"Add a Remote URL first, then tools can be auto-discovered."}),e[43]=d,e[44]=c,e[45]=o,e[46]=n.length,e[47]=A):A=e[47];let q;return e[48]!==$||e[49]!==D||e[50]!==M||e[51]!==E||e[52]!==A?(q=s.jsxs("div",{className:"space-y-3",children:[$,D,M,E,A]}),e[48]=$,e[49]=D,e[50]=M,e[51]=E,e[52]=A,e[53]=q):q=e[53],q}function Nr(t){return s.jsx("div",{className:"flex items-center gap-3 px-3 py-2",children:s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-mono truncate",children:t.name}),t.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:t.description})]})},t.name)}function Fs(t){const{org:e}=he(),[n,r]=T.useState(!1),l=typeof window<"u"&&window.location.hostname==="localhost"?`${e.id}_dev-assets`:null,a=be({connectionId:l??"noop",orgId:e.id});return{uploadImage:async(c,m)=>{if(!l)return Z.error("Image upload requires an object-storage connection. Configure one in plugin settings."),null;if(!c.type.startsWith("image/"))return Z.error("Only image files are supported"),null;if(c.size>5*1024*1024)return Z.error("Image size must be less than 5MB"),null;r(!0);try{const u=await a.callTool({name:"PUT_PRESIGNED_URL",arguments:{key:m,contentType:c.type}}),x=u.structuredContent?.url||u.url;if(!x)throw new Error("Failed to get presigned URL");const p=await fetch(x,{method:"PUT",body:c,headers:{"Content-Type":c.type}});if(!p.ok)throw new Error(`Upload failed: ${p.statusText}`);const h=await a.callTool({name:"GET_PRESIGNED_URL",arguments:{key:m,expiresIn:31536e3}}),d=h.structuredContent?.url||h.url;if(!d)throw new Error("Failed to get public URL");return d}catch(u){return console.error("Image upload failed:",u),Z.error(u instanceof Error?u.message:"Failed to upload image. Please try again."),null}finally{r(!1)}},isUploading:n}}function wr(){const{org:t}=he(),[e,n]=T.useState(null),r=T.useRef(0),o=be({connectionId:ve,orgId:t.id});return{generate:async a=>{r.current+=1,n(a.type);try{const i=await o.callTool({name:"REGISTRY_AI_GENERATE",arguments:a});if(i.isError){const c=i.content?.find(m=>m.type==="text")?.text??"Failed to generate content";throw new Error(c)}return i.structuredContent??i}finally{r.current-=1,r.current===0&&n(null)}},loadingType:e,isGenerating:e!==null}}const Cr=new Set(["http","sse","stdio"]),_r=/^[a-z0-9]+(?:[/-][a-z0-9._-]+)*$/,xs=["internal","automation","support","sales","ops","ai"],Bs=["productivity","communication","customer-support","development","data","operations"],kr=["Essentials","Details","Advanced"],ht="h-7 text-xs border-green-500/30 text-green-600 dark:text-green-400 shadow-[0_0_8px_rgba(34,197,94,0.3)] hover:shadow-[0_0_14px_rgba(34,197,94,0.5)] hover:border-green-500/50 transition-all";function hs(t){return t.replace(/^https?:\/\//i,"").trim()}function pt(t){const e=t.trim();return e?/^https?:\/\//i.test(e)?e:`https://${e}`:""}function ot(t){return t.trim().toLowerCase()}function Tt(t){return Array.from(new Set(t.map(ot).filter(e=>e.length>0)))}function mt(t){return t.trim().toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9._-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}function Sr(t){const e=X.c(4),{current:n}=t;let r;e[0]!==n?(r=kr.map((l,a)=>{const i=a+1,c=i===n,m=i<n;return s.jsxs("div",{className:"flex items-center gap-1.5",children:[a>0&&s.jsx("div",{className:ne("w-4 h-px",m?"bg-primary":"bg-border")}),s.jsxs("div",{className:ne("flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs transition-colors",c?"bg-primary/10 text-primary font-medium":m?"text-primary":"text-muted-foreground"),children:[s.jsx("span",{className:ne("size-5 rounded-full inline-flex items-center justify-center text-[10px] font-semibold shrink-0",c?"bg-primary text-primary-foreground":m?"bg-primary/20 text-primary":"bg-muted text-muted-foreground"),children:i}),s.jsx("span",{className:"hidden sm:inline",children:l})]})]},l)}),e[0]=n,e[1]=r):r=e[1];let o;return e[2]!==r?(o=s.jsx("div",{className:"flex items-center gap-1.5",children:r}),e[2]=r,e[3]=o):o=e[3],o}function Rr(t){const e=X.c(28),{id:n,label:r,values:o,availableOptions:l,placeholder:a,onChange:i}=t,[c,m]=T.useState(""),[u,x]=T.useState(!1);let p,h,d,b,j;if(e[0]!==l||e[1]!==n||e[2]!==c||e[3]!==u||e[4]!==r||e[5]!==i||e[6]!==a||e[7]!==o){const y=Tt(l),g=Tt(o),I=new Set(g),f=ot(c),w=y.filter(M=>!I.has(M)).filter(M=>f?M.includes(f):!0).slice(0,8),S=M=>{const E=ot(M);!E||I.has(E)||i([...g,E])},P=M=>{i(g.filter(E=>E!==M))},N=()=>{const M=c.split(/[,\n;]/).map(ot).filter(Boolean);if(M.length===0)return;const E=[...g];for(const A of M)E.includes(A)||E.push(A);i(E),m("")},R=f;b="grid gap-2",e[13]!==n||e[14]!==r?(j=s.jsx(le,{htmlFor:n,children:r}),e[13]=n,e[14]=r,e[15]=j):j=e[15],p="relative";let v;e[16]!==n?(v=()=>{const M=document.getElementById(n);M instanceof HTMLInputElement&&M.focus()},e[16]=n,e[17]=v):v=e[17];let $;e[18]===Symbol.for("react.memo_cache_sentinel")?($=()=>x(!0),e[18]=$):$=e[18];let D;e[19]===Symbol.for("react.memo_cache_sentinel")?(D=M=>m(M.target.value),e[19]=D):D=e[19],h=s.jsx("div",{className:"min-h-9 w-full rounded-xl border border-input bg-background px-2.5 py-1.5 text-sm focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]",onClick:v,children:s.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[g.map(M=>s.jsxs(G,{variant:"secondary",className:"gap-1",children:[M,s.jsx("button",{type:"button",onClick:E=>{E.preventDefault(),E.stopPropagation(),P(M)},children:s.jsx(yn,{size:12})})]},`${n}-${M}`)),s.jsx("input",{id:n,className:"flex-1 min-w-[120px] bg-transparent outline-none border-none text-sm",placeholder:g.length?"":a,value:c,onFocus:$,onBlur:()=>{x(!1),N()},onChange:D,onKeyDown:M=>{if(M.key==="Enter"||M.key===","){M.preventDefault(),N();return}M.key==="Backspace"&&!c&&g.length&&P(g[g.length-1]??"")}})]})}),d=u&&s.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-xl border border-border bg-background shadow-lg max-h-56 overflow-y-auto",children:w.length>0?w.map(M=>s.jsx("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:Ir,onClick:()=>{S(M),m("")},children:M},`${n}-suggestion-${M}`)):R?s.jsxs("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:Tr,onClick:()=>{S(R),m("")},children:['Create "',R,'"']}):s.jsx("div",{className:"px-2.5 py-1.5 text-sm text-muted-foreground",children:"Type to search or create."})}),e[0]=l,e[1]=n,e[2]=c,e[3]=u,e[4]=r,e[5]=i,e[6]=a,e[7]=o,e[8]=p,e[9]=h,e[10]=d,e[11]=b,e[12]=j}else p=e[8],h=e[9],d=e[10],b=e[11],j=e[12];let _;e[20]!==p||e[21]!==h||e[22]!==d?(_=s.jsxs("div",{className:p,children:[h,d]}),e[20]=p,e[21]=h,e[22]=d,e[23]=_):_=e[23];let k;return e[24]!==b||e[25]!==j||e[26]!==_?(k=s.jsxs("div",{className:b,children:[j,_]}),e[24]=b,e[25]=j,e[26]=_,e[27]=k):k=e[27],k}function Tr(t){return t.preventDefault()}function Ir(t){return t.preventDefault()}function Mr({id:t,value:e,availableOptions:n,onChange:r}){const[o,l]=T.useState(e),[a,i]=T.useState(!1),c=T.useRef(e);c.current!==e&&(c.current=e,l(e));const m=Tt([...Bs,...n,e]).filter(Boolean),u=ot(o),x=m.filter(h=>u?h.includes(u):!0).slice(0,8),p=h=>{const d=ot(h);r(d),l(d),i(!1)};return s.jsxs("div",{className:"grid gap-2",children:[s.jsx(le,{htmlFor:t,children:"Category"}),s.jsxs("div",{className:"relative",children:[s.jsx(je,{id:t,className:"h-9 text-sm",placeholder:"Select or create category",value:o,onFocus:()=>{l(e),i(!0)},onBlur:()=>{p(o)},onChange:h=>l(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),p(o))}}),e&&s.jsx("button",{type:"button",className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs text-muted-foreground hover:text-foreground",onMouseDown:h=>h.preventDefault(),onClick:()=>{r(""),l("")},children:"clear"}),a&&s.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-xl border border-border bg-background shadow-lg max-h-56 overflow-y-auto",children:x.length>0?x.map(h=>s.jsx("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:d=>d.preventDefault(),onClick:()=>p(h),children:h},`${t}-${h}`)):u?s.jsxs("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:h=>h.preventDefault(),onClick:()=>p(u),children:['Create "',u,'"']}):s.jsx("div",{className:"px-2.5 py-1.5 text-sm text-muted-foreground",children:"Type to search or create."})})]})]})}function Pr({open:t,onOpenChange:e,item:n,draft:r,availableTags:o=[],availableCategories:l=[],defaultLLMConnectionId:a="",defaultLLMModelId:i="",isSubmitting:c=!1,onSubmit:m}){const{org:u}=he(),{uploadImage:x,isUploading:p}=Fs(),{generate:h,loadingType:d}=wr(),{discover:b,discoverStatus:j,discoverError:_,resetDiscover:k}=qs(),y=!!n,g=r?._meta?.["mcp.mesh"],I=n?.title??r?.title??"",f=n?.id?.split("/")[0]??r?.id?.split("/")[0]??"",w=n?.description??r?.description??"",S=n?._meta?.["mcp.mesh"]?.short_description??g?.short_description??"",P=n?._meta?.["mcp.mesh"]?.owner??g?.owner??"",N=n?.server?.repository?.url??r?.server?.repository?.url??"",R=n?._meta?.["mcp.mesh"]?.readme??g?.readme??"",v=n?._meta?.["mcp.mesh"]?.readme_url??g?.readme_url??"",$=hs(n?.server?.remotes?.[0]?.url??r?.server?.remotes?.[0]?.url??""),D=n?.server?.remotes?.[0]?.type??r?.server?.remotes?.[0]?.type??"http",M=n?._meta?.["mcp.mesh"]?.tags??g?.tags??[],E=n?._meta?.["mcp.mesh"]?.categories?.[0]??g?.categories?.[0]??"",A=n?.server?.icons?.[0]?.src??r?.server?.icons?.[0]?.src??"",q=n?._meta?.["mcp.mesh"]?.tools??g?.tools??[],z=n?.is_public??r?.is_public??!1,[O,B]=T.useState(1),[Q,te]=T.useState(I),[se,re]=T.useState(f),[ie,ae]=T.useState(w),[oe,pe]=T.useState(S),[ue,C]=T.useState(P),[K,V]=T.useState(N),[ce,fe]=T.useState(R),[we,Ce]=T.useState(v),[J,_e]=T.useState(R?"content":"link"),[xe,ke]=T.useState($),[ee,ge]=T.useState(D),[Re,ye]=T.useState(M),[Me,Ee]=T.useState(E),[Se,ze]=T.useState(A),[Ne,Fe]=T.useState(q),[Be,Xe]=T.useState(z),[L,de]=T.useState({}),Te=!!(a&&i),De=()=>{B(1),te(I),re(f),ae(w),pe(S),C(P),V(N),fe(R),Ce(v),_e(R?"content":"link"),ke($),ge(D),ye(M),Ee(E),ze(A),Fe(q),Xe(z),de({}),k(),Ge.current="",Pe.current&&(clearTimeout(Pe.current),Pe.current=null)},st=async U=>{if(!U)return;const Y=y?n?.id:`${se}/${Q}`.toLowerCase(),Le=mt(Y||"temp"),Ye=U.name.split(".").pop()||"png",He=`registry/${u.id}/${Le}/icon.${Ye}`,dt=await x(U,He);dt?(ze(dt),de(We=>({...We,imageUrl:void 0}))):de(We=>({...We,imageUrl:"Failed to upload image. Please try again."}))},Pe=T.useRef(null),Ge=T.useRef(""),nt=T.useRef(ee);nt.current=ee;const ct=U=>{!U&&Pe.current&&(clearTimeout(Pe.current),Pe.current=null),e(U),U||De()},rt=async()=>{const U=pt(xe);if(!U)return;Ge.current=U;const Y=await b(U,nt.current);Y&&Fe(Y)},it=U=>{Pe.current&&clearTimeout(Pe.current);const Y=pt(U);!Y||Y===Ge.current||U.includes(".")&&(Pe.current=setTimeout(async()=>{Ge.current=Y;const Le=await b(Y,nt.current);Le&&Fe(Le)},800))},Ke=()=>Te?{llmConnectionId:a,modelId:i}:null,Ve=()=>({name:Q.trim(),provider:se.trim(),url:pt(xe),owner:ue.trim(),repositoryUrl:K.trim(),description:ie.trim(),shortDescription:oe.trim(),tags:Re,categories:Me?[Me]:[],availableTags:[...xs,...o],availableCategories:[...Bs,...l],tools:Ne}),lt=async()=>{const U=Ke();if(!U)return;const Y=await h({...U,type:"description",context:Ve()});Y.result&&ae(Y.result.slice(0,1500))},at=async()=>{const U=Ke();if(!U)return;const Y=await h({...U,type:"short_description",context:Ve()});Y.result&&pe(Y.result.slice(0,160))},W=async()=>{const U=Ke();if(!U)return;const Y=await h({...U,type:"tags",context:Ve()});Y.items?.length&&ye(Tt(Y.items))},Ie=async()=>{const U=Ke();if(!U)return;const Y=await h({...U,type:"categories",context:Ve()});Y.items?.[0]&&Ee(ot(Y.items[0]))},xt=async()=>{const U=Ke();if(!U)return;const Y=await h({...U,type:"readme",context:Ve()});Y.result&&(fe(Y.result.slice(0,5e4)),_e("content"))},rs=U=>{const Y={};if(U===1){const Le=mt(se),Ye=mt(Q),He=`${Le}/${Ye}`;Q.trim()||(Y.title="Name is required."),y||(Le?Ye?_r.test(He)||(Y.provider="Use lowercase letters/numbers and separators '/' or '-'."):Y.title="Name must contain valid characters.":Y.provider="Provider is required.");const dt=pt(xe),We=ee.trim().toLowerCase();if(We!=="stdio"&&dt)try{const gt=new URL(dt);["http:","https:"].includes(gt.protocol)||(Y.remoteUrl="Remote URL must be http(s).")}catch{Y.remoteUrl="Remote URL is invalid."}if(We&&!Cr.has(We)&&(Y.remoteType="Remote type must be: http, sse or stdio."),Se.trim()&&!Se.trim().startsWith("data:image/"))try{const Vt=new URL(Se.trim());["http:","https:"].includes(Vt.protocol)||(Y.imageUrl="Image URL must be http(s).")}catch{Y.imageUrl="Image URL is invalid."}}if(U===2&&(ie.length>1500&&(Y.description="Description must be 1500 characters or less."),oe.trim().length>160&&(Y.shortDescription="Short description must be 160 characters or less.")),U===3){const Le=we.trim();if(Le)try{const He=new URL(Le);["http:","https:"].includes(He.protocol)||(Y.readmeUrl="README URL must be http(s).")}catch{Y.readmeUrl="README URL is invalid."}ce.trim().length>5e4&&(Y.readme="README must be 50 000 characters or less.");const Ye=K.trim();if(Ye)try{const He=new URL(Ye);["http:","https:"].includes(He.protocol)||(Y.repositoryUrl="Repository URL must be http(s).")}catch{Y.repositoryUrl="Repository URL is invalid."}}return de(Y),Object.values(Y).every(Le=>Le===void 0)},Hs=()=>{rs(O)&&O<3&&B(O+1)},Ws=()=>{O>1&&B(O-1)},Js=async()=>{if(!rs(3))return;const U=Q.trim(),Y=mt(se),Le=mt(U),Ye=`${Y}/${Le}`,He=pt(xe),dt=ee.trim().toLowerCase(),We=Se.trim(),gt=K.trim(),Vt=oe.trim(),tn=ce.trim(),sn=we.trim(),nn=Tt(Re),rn=Me?[ot(Me)]:[],ln=n?n.server?.name??n.id:"",an=(y?ln:Ye).trim(),Yt=ie.trim(),on=ue.trim(),is={title:U,description:Yt.length>0?Yt:null,is_public:Be,_meta:{"mcp.mesh":{tags:nn,categories:rn,short_description:Vt||null,owner:on||null,readme:tn||null,readme_url:sn||null,...Ne.length>0?{tools:Ne}:{}}},server:{name:an,title:U,description:Yt||void 0,icons:We?[{src:We}]:[],repository:gt?{url:gt}:void 0,remotes:He?[{type:dt||"http",url:He}]:[]}};if(y&&n){await m({id:n.id,data:is}),e(!1);return}await m({id:Ye,...is}),e(!1),De()},Zs=s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"row-span-2 grid gap-3 content-start",children:[s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(le,{htmlFor:"registry-item-provider",children:"Provider"}),s.jsx(je,{id:"registry-item-provider",className:"h-9 text-sm",placeholder:"acme",value:se,onChange:U=>re(U.target.value),disabled:y}),!y&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Item ID:"," ",s.jsx("span",{className:"font-mono",children:`${mt(se)||"provider"}/${mt(Q)||"name"}`})]}),L.provider&&s.jsx("p",{className:"text-xs text-destructive",children:L.provider})]}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(le,{htmlFor:"registry-item-title",children:"Name"}),s.jsx(je,{id:"registry-item-title",className:"h-9 text-sm",placeholder:"Internal MCP",value:Q,onChange:U=>te(U.target.value)}),L.title&&s.jsx("p",{className:"text-xs text-destructive",children:L.title})]})]}),s.jsx("div",{className:"row-span-2 content-start",children:s.jsx(Us,{value:Se,onChange:U=>{ze(U),de(Y=>({...Y,imageUrl:void 0}))},onFileUpload:st,error:L.imageUrl,isUploading:p})}),s.jsxs("div",{className:"col-span-2 grid gap-1.5",children:[s.jsx(le,{htmlFor:"registry-remote-url",children:"Remote URL"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"flex-1 flex items-center rounded-xl border border-input px-3",children:[s.jsx("span",{className:"text-xs font-semibold text-muted-foreground mr-1",children:"https://"}),s.jsx("input",{id:"registry-remote-url",className:"flex-1 h-9 bg-transparent outline-none text-sm",placeholder:"example.com/mcp",value:xe,onChange:U=>{const Y=hs(U.target.value);ke(Y),it(Y)}})]}),s.jsxs(_s,{value:ee,onValueChange:ge,children:[s.jsx(ks,{id:"registry-remote-type",className:"w-[90px] h-9 shrink-0",children:s.jsx(Ss,{placeholder:"Type"})}),s.jsxs(Rs,{children:[s.jsx(Et,{value:"http",children:"http"}),s.jsx(Et,{value:"sse",children:"sse"}),s.jsx(Et,{value:"stdio",children:"stdio"})]})]})]}),L.remoteUrl&&s.jsx("p",{className:"text-xs text-destructive",children:L.remoteUrl}),L.remoteType&&s.jsx("p",{className:"text-xs text-destructive",children:L.remoteType})]}),xe.trim()&&s.jsxs("div",{className:"col-span-2 space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(F,{type:"button",variant:"outline",size:"sm",className:ne(ht,"gap-1.5"),onClick:rt,disabled:j==="loading",children:[j==="loading"?s.jsx(ut,{size:12,className:"animate-spin"}):s.jsx(es,{size:12}),j==="loading"?"Discovering tools...":Ne.length>0?"Re-discover tools":"Discover tools from URL"]}),Ne.length>0&&j!=="loading"&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[Ne.length," tool",Ne.length!==1?"s":""," loaded"]})]}),j==="success"&&Ne.length>0&&s.jsxs("div",{className:"rounded-lg border border-green-500/20 bg-green-50 dark:bg-green-950/20 px-3 py-2 space-y-1.5",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-green-600 dark:text-green-400",children:[s.jsx(ft,{size:14,className:"shrink-0"}),s.jsxs("span",{className:"font-medium",children:[Ne.length," tool",Ne.length!==1?"s":""," discovered"]})]}),s.jsxs("div",{className:"flex flex-wrap gap-1",children:[Ne.slice(0,8).map(U=>s.jsx(G,{variant:"secondary",className:"text-[10px] px-1.5 py-0 font-mono",children:U.name},U.name)),Ne.length>8&&s.jsxs("span",{className:"text-[10px] text-muted-foreground self-center",children:["+",Ne.length-8," more"]})]}),s.jsx("p",{className:"text-[10px] text-muted-foreground",children:"These tools will enrich AI-generated descriptions, tags and categories in the next step."})]}),j==="auth_required"&&_&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-950/20 border border-amber-500/20 rounded-lg px-3 py-2",children:[s.jsx(vt,{size:14,className:"shrink-0"}),s.jsx("span",{children:"This server requires authentication. The connection is valid but tools cannot be listed without credentials."})]}),j==="error"&&_&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-destructive bg-destructive/10 rounded-lg px-3 py-2",children:[s.jsx(vt,{size:14,className:"shrink-0"}),s.jsx("span",{children:_})]})]})]}),Xs=s.jsxs("div",{className:"grid gap-3",children:[s.jsxs("div",{className:"grid gap-1.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(le,{htmlFor:"registry-item-short-description",children:"Short Description"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-xs text-muted-foreground",children:[oe.length,"/160"]}),Te&&s.jsx(F,{type:"button",variant:"outline",size:"sm",className:ht,disabled:d==="short_description",onClick:at,children:d==="short_description"?"Generating...":"AI Generate"})]})]}),s.jsx(je,{id:"registry-item-short-description",className:"h-9 text-sm",placeholder:"Short summary for the store card",value:oe,maxLength:160,onChange:U=>pe(U.target.value)}),L.shortDescription&&s.jsx("p",{className:"text-xs text-destructive",children:L.shortDescription})]}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(le,{htmlFor:"registry-item-description",children:"Description"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-xs text-muted-foreground",children:[ie.length,"/1500"]}),Te&&s.jsx(F,{type:"button",variant:"outline",size:"sm",className:ht,disabled:d==="description",onClick:lt,children:d==="description"?"Generating...":"AI Generate"})]})]}),s.jsx(Gt,{id:"registry-item-description",className:"text-sm max-h-28 overflow-y-auto resize-none",placeholder:"Brief description of this MCP server",rows:2,value:ie,onChange:U=>ae(U.target.value)}),L.description&&s.jsx("p",{className:"text-xs text-destructive",children:L.description})]}),s.jsx("div",{className:"border-t border-border"}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"grid content-start gap-2",children:[s.jsx(Mr,{id:"registry-category",value:Me,availableOptions:l,onChange:Ee}),Te&&s.jsx(F,{type:"button",variant:"outline",size:"sm",className:ne(ht,"justify-self-start"),disabled:d==="categories",onClick:Ie,children:d==="categories"?"Suggesting...":"AI Suggest"})]}),s.jsxs("div",{className:"grid content-start gap-2",children:[s.jsx(Rr,{id:"registry-tags",label:"Tags",values:Re,availableOptions:[...xs,...o],placeholder:"Type and press Enter or comma",onChange:ye}),Te&&s.jsx(F,{type:"button",variant:"outline",size:"sm",className:ne(ht,"justify-self-start"),disabled:d==="tags",onClick:W,children:d==="tags"?"Suggesting...":"AI Suggest"})]})]}),s.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-border px-4 py-3",children:[s.jsxs("div",{className:"grid gap-0.5",children:[s.jsx(le,{htmlFor:"registry-is-public",className:"text-sm",children:"Public"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Make this MCP visible in the public store URL."})]}),s.jsx(bt,{id:"registry-is-public",checked:Be,onCheckedChange:Xe})]})]}),en=s.jsxs("div",{className:"grid gap-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(le,{htmlFor:"registry-item-owner",children:"Owner (optional)"}),s.jsx(je,{id:"registry-item-owner",className:"h-9 text-sm",placeholder:"Team, company, or responsible person",value:ue,onChange:U=>C(U.target.value)})]}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(le,{htmlFor:"registry-item-repository-url",children:"Repository URL (optional)"}),s.jsx(je,{id:"registry-item-repository-url",className:"h-9 text-sm",placeholder:"https://github.com/org/repo",value:K,onChange:U=>V(U.target.value)}),L.repositoryUrl&&s.jsx("p",{className:"text-xs text-destructive",children:L.repositoryUrl})]})]}),s.jsxs("div",{className:"rounded-xl border border-border p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(le,{children:"README"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[ce.length,"/50000"]})]}),s.jsx("div",{className:"inline-flex rounded-lg border border-border p-0.5",children:(Te?["link","content","generate"]:["link","content"]).map(U=>s.jsx("button",{type:"button",className:ne("px-2.5 py-1 text-xs rounded-md",J===U?"bg-primary text-primary-foreground":"text-muted-foreground"),onClick:()=>_e(U),children:U==="link"?"Link":U==="content"?"Content":"Generate"},U))}),J==="link"&&s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(je,{className:"h-9 text-sm",placeholder:"https://raw.githubusercontent.com/org/repo/main/README.md",value:we,onChange:U=>Ce(U.target.value)}),L.readmeUrl&&s.jsx("p",{className:"text-xs text-destructive",children:L.readmeUrl})]}),J==="content"&&s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(Gt,{className:"text-sm max-h-48 overflow-y-auto resize-none",placeholder:`# README
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-B57CuSVv.js";import{c as s}from"./constants-DamjJgLK.js";function m(t){if(!t)return"";const r=t.find(n=>n.name==="COLLECTION_REGISTRY_APP_LIST");if(r)return r.name;const e=t.find(n=>n.name==="REGISTRY_ITEM_LIST");if(e)return e.name;const i=t.find(n=>n.name.startsWith("COLLECTION_REGISTRY_APP_")&&n.name.endsWith("_LIST"));return i?i.name:""}function o(t){if(!t)return"";const r=t.find(n=>n.name==="COLLECTION_REGISTRY_APP_FILTERS");if(r)return r.name;const e=t.find(n=>n.name==="REGISTRY_ITEM_FILTERS");if(e)return e.name;const i=t.find(n=>n.name.startsWith("COLLECTION_REGISTRY_APP_")&&n.name.endsWith("_FILTERS"));return i?i.name:""}function I(t,r){if(!t)return"";const e=t.find(f=>f.name===`COLLECTION_REGISTRY_APP${r}`);if(e)return e.name;const i={_GET:"REGISTRY_ITEM_GET",_VERSIONS:"REGISTRY_ITEM_VERSIONS",_SEARCH:"REGISTRY_ITEM_SEARCH"},n=t.find(f=>f.name===i[r]);if(n)return n.name;const a=t.find(f=>f.name.startsWith("COLLECTION_REGISTRY_APP_")&&f.name.endsWith(r));return a?a.name:""}function R(t){if(!t)return[];const r=[];for(const e of t){let i=[];if(Array.isArray(e))i=e;else if(typeof e=="object"&&e!==null){const n=Object.keys(e).find(a=>Array.isArray(e[a]));n&&(i=e[n])}r.push(...i)}return r}const c={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function E(t){return t?c[t]??t.toUpperCase():null}function _(t){return t?t.match(/schemas\/([\d-]+)/)?.[1]??null:null}function S(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const r=Object.keys(t).find(e=>Array.isArray(t[e]));if(r)return t[r]}return[]}async function d(t,r,e,i){const n=await s({connectionId:t,orgId:r});try{const a=await n.callTool({name:e,arguments:i});return a.structuredContent??a}finally{await n.close().catch(console.error)}}export{R as a,o as b,d as c,I as d,S as e,m as f,E as g,_ as h};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as B,c as M,j as s,c0 as oe,v as K,n as Te,B as he,c1 as Be,t as fe,u as Ue,a as qe,b as Ge,c2 as Ve}from"./index-D-htvwK7.js";import{c as He}from"./binder-DlLVJxi6.js";import{u as Ne}from"./useQuery-D9zfpIOd.js";import{b as Ke}from"./use-connection-CIMDlS0p.js";import{a as We,u as Qe,h as Ze}from"./constants-P4PVvchD.js";import{u as xe,P as Je}from"./topbar-portal-jOMGe5hi.js";import{i as ce}from"./Loading01-f9s2h1wv.js";import{t as Ye}from"./Settings01-CO9ZR5u9.js";import{i as Xe}from"./Check-DhJrraz0.js";import{t as Pe}from"./ChevronDown-DF3whIkz.js";import{i as ve}from"./AlertCircle-M_vDM06X.js";import{i as _e}from"./ArrowLeft-uXw4hDrl.js";import{n as de}from"./CheckDone01-t8ZCK-7w.js";import{s as Me}from"./Clock-BtVgm0vZ.js";import{a as et}from"./Copy01-DdgoiM5k.js";import{n as Ee}from"./Inbox01-CGne0tMp.js";import{i as tt}from"./CheckCircle-CHWgGReR.js";import{i as st}from"./InfoCircle-C7xGlw8n.js";import{i as lt}from"./XCircle-YMmdzMOW.js";import{u as Ie}from"./useMutation-D9A8H6Gw.js";import{T as se,b as ne,c as le,a as je,d as be,e as ye}from"./table-Bn8GUsEe.js";import{M as nt}from"./markdown-7_Q9oy6X.js";import{n as it}from"./ArrowDown-C0AHT6Se.js";import{i as ot}from"./ArrowUp-D3L33LOK.js";import{i as rt}from"./CheckVerified02-BkcCiKst.js";import{i as Ce}from"./ChevronRight-TdWXpEIC.js";import{i as at}from"./File02-BgWATqR8.js";import{s as ct}from"./Hash02-CcdmiUse.js";import{B as dt}from"./badge-KDRqEGRi.js";import{b as mt,c as ut,d as ft,a as xt,C as pt}from"./card-D-rpkLYG.js";import{c as Se,d as me,a as $e,b as we,S as ke}from"./select-CrOlaxCO.js";import"./use-collections-S_4aLkkK.js";import"./index-DMRPqDGw.js";const Le=({size:t=24,color:e="currentColor",...l})=>B.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},B.createElement("path",{d:"M12 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"}));Le.displayName="Columns02";const Ae=({size:t=24,color:e="currentColor",...l})=>B.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},B.createElement("path",{d:"M5 12h14"}));Ae.displayName="Minus";const pe=({size:t=24,color:e="currentColor",...l})=>B.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},B.createElement("path",{d:"M3 9h18M3 15h18M7.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"}));pe.displayName="Rows03";const re={reportsList:(t,e,l)=>["reports","list",t,{category:e,status:l}],report:(t,e)=>["reports","detail",t,e],pluginConfig:(t,e)=>["project-plugin-config",t,e]};function ht(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(oe,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No report source connected"}),s.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an MCP server that provides reports to view automated insights, performance audits, security scans, and more."})]}),t[0]=e):e=t[0],e}function gt(t){const e=M.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:a}=t,[i,r]=B.useState(!1),o=B.useRef(null);let d;if(e[0]!==l||e[1]!==n){let m;e[3]!==n?(m=C=>C.id===n,e[3]=n,e[4]=m):m=e[4],d=l.find(m),e[0]=l,e[1]=n,e[2]=d}else d=e[2];const c=d;let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=m=>{o.current?.contains(m.relatedTarget)||r(!1)},e[5]=u):u=e[5];const f=u;if(l.length===1){let m;e[6]!==c?(m=c?.icon?s.jsx("img",{src:c.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),e[6]=c,e[7]=m):m=e[7];const C=c?.title||"Reports";let _;e[8]!==C?(_=s.jsx("span",{children:C}),e[8]=C,e[9]=_):_=e[9];let S;return e[10]!==m||e[11]!==_?(S=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[m,_]}),e[10]=m,e[11]=_,e[12]=S):S=e[12],S}let p;e[13]!==i?(p=()=>r(!i),e[13]=i,e[14]=p):p=e[14];let x;e[15]!==c?(x=c?.icon?s.jsx("img",{src:c.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),e[15]=c,e[16]=x):x=e[16];const h=c?.title||"Select source";let g;e[17]!==h?(g=s.jsx("span",{children:h}),e[17]=h,e[18]=g):g=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Pe,{size:14}),e[19]=b):b=e[19];let N;e[20]!==p||e[21]!==x||e[22]!==g?(N=s.jsxs("button",{type:"button",onClick:p,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[x,g,b]}),e[20]=p,e[21]=x,e[22]=g,e[23]=N):N=e[23];let y;e[24]!==l||e[25]!==i||e[26]!==a||e[27]!==n?(y=i&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(m=>s.jsxs("button",{type:"button",onClick:()=>{a(m.id),r(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[m.icon?s.jsx("img",{src:m.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:m.title}),m.id===n&&s.jsx(Xe,{size:14,className:"text-primary"})]},m.id))}),e[24]=l,e[25]=i,e[26]=a,e[27]=n,e[28]=y):y=e[28];let v;return e[29]!==N||e[30]!==y?(v=s.jsxs("div",{className:"relative",ref:o,onBlur:f,children:[N,y]}),e[29]=N,e[30]=y,e[31]=v):v=e[31],v}function jt(t){const e=M.c(2);let l;return e[0]!==t?(l=s.jsx(gt,{...t}),e[0]=t,e[1]=l):l=e[1],l}const ue={passing:{label:"Passing",color:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",icon:tt},warning:{label:"Warning",color:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",icon:ve},failing:{label:"Failing",color:"bg-red-500/15 text-red-700 dark:text-red-400 border-red-500/25",icon:lt},info:{label:"Info",color:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",icon:st}};function De(t){const e=M.c(10),{status:l,size:n}=t,a=n===void 0?"default":n,i=ue[l]??ue.info,r=i.icon,o=a==="sm",d=o?"px-2 py-0.5":"px-2.5 py-1";let c;e[0]!==i.color||e[1]!==d?(c=K("inline-flex items-center gap-1 rounded-full border text-xs font-medium",d,i.color),e[0]=i.color,e[1]=d,e[2]=c):c=e[2];const u=o?12:14;let f;e[3]!==r||e[4]!==u?(f=s.jsx(r,{size:u}),e[3]=r,e[4]=u,e[5]=f):f=e[5];let p;return e[6]!==i.label||e[7]!==c||e[8]!==f?(p=s.jsxs("span",{className:c,children:[f,i.label]}),e[6]=i.label,e[7]=c,e[8]=f,e[9]=p):p=e[9],p}function ze(t){const e=M.c(11),{connectionId:l,toolCaller:n}=xe();let a;e[0]!==l||e[1]!==t?.category||e[2]!==t?.status?(a=re.reportsList(l,t?.category,t?.status),e[0]=l,e[1]=t?.category,e[2]=t?.status,e[3]=a):a=e[3];let i;e[4]!==t?.category||e[5]!==t?.status||e[6]!==n?(i=async()=>await n("REPORTS_LIST",{category:t?.category,status:t?.status}),e[4]=t?.category,e[5]=t?.status,e[6]=n,e[7]=i):i=e[7];let r;return e[8]!==a||e[9]!==i?(r={queryKey:a,queryFn:i,staleTime:6e4},e[8]=a,e[9]=i,e[10]=r):r=e[10],Ne(r)}function bt(t){const e=M.c(10),{connectionId:l,toolCaller:n}=xe();let a;e[0]!==l||e[1]!==t?(a=re.report(l,t),e[0]=l,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==n?(i=async()=>await n("REPORTS_GET",{id:t}),e[3]=t,e[4]=n,e[5]=i):i=e[5];const r=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==r?(o={queryKey:a,queryFn:i,enabled:r,staleTime:6e4},e[6]=a,e[7]=i,e[8]=r,e[9]=o):o=e[9],Ne(o)}const yt={passing:"bg-emerald-500",warning:"bg-amber-500",failing:"bg-red-500",info:"bg-blue-500"},Re=["#A595FF","#FFC116","#DE3A6E"];function ae(t){const e=M.c(7),{icon:l,title:n}=t;let a;e[0]!==l?(a=s.jsx(l,{size:16,className:"opacity-75 shrink-0 text-foreground"}),e[0]=l,e[1]=a):a=e[1];let i;e[2]!==n?(i=s.jsx("span",{className:"text-base text-foreground opacity-75",children:n}),e[2]=n,e[3]=i):i=e[3];let r;return e[4]!==a||e[5]!==i?(r=s.jsxs("div",{className:"flex gap-2 items-center",children:[a,i]}),e[4]=a,e[5]=i,e[6]=r):r=e[6],r}function Nt(t){const e=M.c(2),{content:l}=t;let n;return e[0]!==l?(n=s.jsx(nt,{children:l}),e[0]=l,e[1]=n):n=e[1],n}function vt(t){const e=M.c(15),{metric:l}=t;let n;e[0]!==l.unit?(n=l.unit&&s.jsx("span",{className:"text-base text-muted-foreground ml-1",children:l.unit}),e[0]=l.unit,e[1]=n):n=e[1];let a;e[2]!==l.value||e[3]!==n?(a=s.jsxs("div",{className:"text-2xl leading-8 text-foreground font-normal tabular-nums",children:[l.value,n]}),e[2]=l.value,e[3]=n,e[4]=a):a=e[4];let i;e[5]!==l.status?(i=l.status&&s.jsx("span",{className:K("inline-block size-2 rounded-full shrink-0",yt[l.status])}),e[5]=l.status,e[6]=i):i=e[6];let r;e[7]!==l.label?(r=s.jsx("span",{className:"text-sm text-foreground",children:l.label}),e[7]=l.label,e[8]=r):r=e[8];let o;e[9]!==i||e[10]!==r?(o=s.jsxs("div",{className:"flex gap-1.5 items-center",children:[i,r]}),e[9]=i,e[10]=r,e[11]=o):o=e[11];let d;return e[12]!==a||e[13]!==o?(d=s.jsxs("div",{className:"flex flex-col gap-3 items-start justify-end border border-border rounded-lg p-5 flex-1",children:[a,o]}),e[12]=a,e[13]=o,e[14]=d):d=e[14],d}function Oe(t){const e=M.c(12),{title:l,items:n,stacked:a}=t,i=a===void 0?!1:a;let r;e[0]!==l?(r=l&&s.jsx(ae,{icon:pe,title:l}),e[0]=l,e[1]=r):r=e[1];const o=i?"flex-col items-stretch":"items-stretch";let d;e[2]!==o?(d=K("flex gap-4",o),e[2]=o,e[3]=d):d=e[3];let c;e[4]!==n?(c=n.map(_t),e[4]=n,e[5]=c):c=e[5];let u;e[6]!==d||e[7]!==c?(u=s.jsx("div",{className:d,children:c}),e[6]=d,e[7]=c,e[8]=u):u=e[8];let f;return e[9]!==r||e[10]!==u?(f=s.jsxs("div",{className:"space-y-4",children:[r,u]}),e[9]=r,e[10]=u,e[11]=f):f=e[11],f}function _t(t,e){return s.jsx(vt,{metric:t},`${t.label}-${e}`)}function Ct(t){const e=M.c(16),{title:l,columns:n,rows:a}=t;let i;e[0]!==l?(i=l&&s.jsx(ae,{icon:pe,title:l}),e[0]=l,e[1]=i):i=e[1];let r;e[2]!==n?(r=n.map(wt),e[2]=n,e[3]=r):r=e[3];let o;e[4]!==r?(o=s.jsx(je,{children:s.jsx(ne,{children:r})}),e[4]=r,e[5]=o):o=e[5];let d;e[6]!==a?(d=a.map(St),e[6]=a,e[7]=d):d=e[7];let c;e[8]!==d?(c=s.jsx(be,{children:d}),e[8]=d,e[9]=c):c=e[9];let u;e[10]!==o||e[11]!==c?(u=s.jsx("div",{className:"rounded-lg border overflow-hidden",children:s.jsxs(ye,{children:[o,c]})}),e[10]=o,e[11]=c,e[12]=u):u=e[12];let f;return e[13]!==i||e[14]!==u?(f=s.jsxs("div",{className:"space-y-4",children:[i,u]}),e[13]=i,e[14]=u,e[15]=f):f=e[15],f}function St(t,e){return s.jsx(ne,{children:t.map($t)},e)}function $t(t,e){return s.jsx(le,{className:"text-sm",children:t??s.jsx("span",{className:"text-muted-foreground",children:"—"})},e)}function wt(t){return s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:t},t)}function Fe(t){const e=M.c(11),{title:l,items:n}=t;let a;e[0]!==l?(a=l&&s.jsx(ae,{icon:rt,title:l}),e[0]=l,e[1]=a):a=e[1];let i;if(e[2]!==n){let d;e[4]!==n.length?(d=(c,u)=>s.jsxs("div",{className:"flex gap-4 items-stretch",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center w-4 shrink-0",children:[s.jsx("div",{className:"h-full w-px bg-border"}),s.jsx("div",{className:"w-2 h-4 rounded-full flex",style:{backgroundColor:Re[u%Re.length]}}),s.jsx("div",{className:K("h-full w-px bg-border",u===n.length-1&&"invisible")})]}),s.jsxs("div",{className:"flex flex-col gap-2 items-start py-3 pb-4 min-w-0",children:[s.jsx("span",{className:"text-sm font-medium text-foreground leading-none",children:c.label}),c.description&&s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:c.description})]})]},`${c.label}-${u}`),e[4]=n.length,e[5]=d):d=e[5],i=n.map(d),e[2]=n,e[3]=i}else i=e[3];let r;e[6]!==i?(r=s.jsx("div",{className:"flex flex-col",children:i}),e[6]=i,e[7]=r):r=e[7];let o;return e[8]!==a||e[9]!==r?(o=s.jsxs("div",{className:"space-y-4",children:[a,r]}),e[8]=a,e[9]=r,e[10]=o):o=e[10],o}function kt(t){const e=M.c(3),{content:l}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ae,{icon:at,title:"Notas"}),e[0]=n):n=e[0];let a;return e[1]!==l?(a=s.jsxs("div",{className:"space-y-4",children:[n,s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:l})]}),e[1]=l,e[2]=a):a=e[2],a}function zt(t){const e=M.c(11),{delta:l}=t;if(l===0){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("span",{className:"inline-flex items-center justify-center",children:s.jsx(Ae,{size:16,className:"text-muted-foreground"})}),e[0]=c):c=e[0],c}const n=l>0,a=n?"text-emerald-600":"text-destructive";let i;e[1]!==a?(i=K("inline-flex items-center gap-0.5 text-sm font-medium",a),e[1]=a,e[2]=i):i=e[2];let r;e[3]!==n?(r=n?s.jsx(ot,{size:16}):s.jsx(it,{size:16}),e[3]=n,e[4]=r):r=e[4];let o;e[5]!==l?(o=Math.abs(l),e[5]=l,e[6]=o):o=e[6];let d;return e[7]!==i||e[8]!==r||e[9]!==o?(d=s.jsxs("span",{className:i,children:[r,o]}),e[7]=i,e[8]=r,e[9]=o,e[10]=d):d=e[10],d}function Rt(t){if(t.length===0)return[];const e=[...t];for(let l=e.length-1;l>0;l--){const n=Math.max(0,Math.min(e.length-1,l+(l%3===0?-2:l%2===0?1:-1)));[e[l],e[n]]=[e[n],e[l]]}return e.map((l,n)=>({...l,position:n+1,delta:0,reference_position:void 0}))}function ge(t){const e=M.c(14),{rows:l,label:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={},e[0]=a):a=e[0];const[i,r]=B.useState(a);let o;e[1]!==n?(o=n&&s.jsx("span",{className:"text-xs font-mono uppercase text-muted-foreground opacity-60 tracking-wide px-1",children:n}),e[1]=n,e[2]=o):o=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(je,{className:"sticky top-0 bg-background z-10",children:s.jsxs(ne,{children:[s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground w-[60px]",children:"#"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground w-[60px]",children:"DELTA"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"PRODUTO"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"SCORE"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"GRADE"}),s.jsx(se,{className:"w-10"})]})}),e[3]=d):d=e[3];let c;if(e[4]!==i||e[5]!==l){let p;e[7]!==i?(p=(x,h)=>{const g=i[h]??!1,b=x.note&&typeof x.note=="object"?x.note:null,N=typeof x.note=="string"?!!x.note:b!==null&&Object.keys(b).length>0,y=x.reference_position!==void 0?x.reference_position-x.position:x.delta??0;return s.jsxs(B.Fragment,{children:[s.jsxs(ne,{children:[s.jsx(le,{children:s.jsxs("div",{className:"flex items-center gap-1 opacity-50",children:[s.jsx(ct,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground tabular-nums",children:x.position})]})}),s.jsx(le,{children:s.jsx(zt,{delta:y})}),s.jsx(le,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[x.image&&s.jsx("img",{src:x.image,alt:"",className:"h-12 w-8 object-cover rounded-sm shrink-0 bg-muted"}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:x.label})]})}),x.values.map(Mt),s.jsx(le,{children:N?s.jsx("button",{type:"button",onClick:()=>r(v=>({...v,[h]:!v[h]})),className:"flex items-center justify-center size-6 text-muted-foreground hover:text-foreground transition-colors",children:g?s.jsx(Pe,{size:16}):s.jsx(Ce,{size:16})}):s.jsx(Ce,{size:16,className:"text-muted-foreground opacity-30"})})]}),N&&g&&s.jsx(ne,{className:"bg-muted/25",children:s.jsx(le,{colSpan:6,children:typeof x.note=="string"?s.jsxs("div",{className:"pl-8 pb-2 flex flex-col gap-1.5",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase opacity-50 tracking-wide",children:"MUDANÇA"}),s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:x.note})]}):s.jsx("div",{className:"py-2 px-4",children:s.jsxs(ye,{children:[s.jsx(je,{children:s.jsx(ne,{children:Object.keys(b??{}).map(Pt)})}),s.jsx(be,{children:s.jsx(ne,{children:Object.values(b??{}).map(Tt)})})]})})})},`note-${h}`)]},h)},e[7]=i,e[8]=p):p=e[8],c=l.map(p),e[4]=i,e[5]=l,e[6]=c}else c=e[6];let u;e[9]!==c?(u=s.jsx("div",{className:"border border-border rounded-lg overflow-auto max-h-[520px]",children:s.jsxs(ye,{children:[d,s.jsx(be,{children:c})]})}),e[9]=c,e[10]=u):u=e[10];let f;return e[11]!==o||e[12]!==u?(f=s.jsxs("div",{className:"flex flex-col gap-2 min-w-0 flex-1",children:[o,u]}),e[11]=o,e[12]=u,e[13]=f):f=e[13],f}function Tt(t,e){return s.jsx(le,{className:"text-sm tabular-nums",children:t??"—"},e)}function Pt(t){return s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:t},t)}function Mt(t,e){const n=e===1&&typeof t=="string"&&t.endsWith("%")?`${parseFloat(t)-10}%`:t;return s.jsx(le,{className:"text-sm tabular-nums",children:n},e)}function Et(t){const e=M.c(20),{title:l,rows:n}=t,[a,i]=B.useState(!1);let r;e[0]!==n?(r=Rt(n),e[0]=n,e[1]=r):r=e[1];const o=r;let d;e[2]!==l?(d=l&&s.jsx(ae,{icon:pe,title:l}),e[2]=l,e[3]=d):d=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>i(It),e[4]=c):c=e[4];const u=a?"bg-primary text-primary-foreground border-primary":"bg-transparent text-muted-foreground border-border hover:text-foreground hover:border-foreground/30";let f;e[5]!==u?(f=K("inline-flex items-center gap-1.5 text-xs font-medium px-2.5 py-1.5 rounded-md border transition-colors",u),e[5]=u,e[6]=f):f=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Le,{size:14}),e[7]=p):p=e[7];let x;e[8]!==f?(x=s.jsxs("button",{type:"button",onClick:c,className:f,children:[p,"Comparar ordenação anterior"]}),e[8]=f,e[9]=x):x=e[9];let h;e[10]!==d||e[11]!==x?(h=s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d,x]}),e[10]=d,e[11]=x,e[12]=h):h=e[12];let g;e[13]!==o||e[14]!==n||e[15]!==a?(g=a?s.jsxs("div",{className:"flex gap-4 items-start",children:[s.jsx(ge,{rows:n,label:"Ordenação Proposta"}),s.jsx(ge,{rows:o,label:"Ordenação Atual"})]}):s.jsx(ge,{rows:n}),e[13]=o,e[14]=n,e[15]=a,e[16]=g):g=e[16];let b;return e[17]!==h||e[18]!==g?(b=s.jsxs("div",{className:"space-y-4",children:[h,g]}),e[17]=h,e[18]=g,e[19]=b):b=e[19],b}function It(t){return!t}function Lt(t){const e=M.c(17),{section:l}=t;switch(l.type){case"markdown":{let n;return e[0]!==l.content?(n=s.jsx(Nt,{content:l.content}),e[0]=l.content,e[1]=n):n=e[1],n}case"metrics":{let n;return e[2]!==l.items||e[3]!==l.title?(n=s.jsx(Oe,{title:l.title,items:l.items}),e[2]=l.items,e[3]=l.title,e[4]=n):n=e[4],n}case"table":{let n;return e[5]!==l.columns||e[6]!==l.rows||e[7]!==l.title?(n=s.jsx(Ct,{title:l.title,columns:l.columns,rows:l.rows}),e[5]=l.columns,e[6]=l.rows,e[7]=l.title,e[8]=n):n=e[8],n}case"criteria":{let n;return e[9]!==l.items||e[10]!==l.title?(n=s.jsx(Fe,{title:l.title,items:l.items}),e[9]=l.items,e[10]=l.title,e[11]=n):n=e[11],n}case"note":{let n;return e[12]!==l.content?(n=s.jsx(kt,{content:l.content}),e[12]=l.content,e[13]=n):n=e[13],n}case"ranked-list":{let n;return e[14]!==l.rows||e[15]!==l.title?(n=s.jsx(Et,{title:l.title,rows:l.rows}),e[14]=l.rows,e[15]=l.title,e[16]=n):n=e[16],n}default:return null}}function At(t){return new Date(t).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function Dt(t){const e=[];e.push(`# ${t.title}`),e.push(""),e.push(`> ${t.summary}`),e.push("");const l=[`**Status:** ${t.status}`,`**Category:** ${t.category}`];t.source&&l.push(`**Source:** ${t.source}`),l.push(`**Updated:** ${t.updatedAt}`),t.tags?.length&&l.push(`**Tags:** ${t.tags.join(", ")}`),e.push(l.join(`
|
|
1
|
+
import{r as B,c as M,j as s,c1 as oe,v as K,n as Te,B as he,c2 as Be,t as fe,u as Ue,a as qe,b as Ge,c3 as Ve}from"./index-B57CuSVv.js";import{c as He}from"./binder-BgtZdYDd.js";import{u as Ne}from"./useQuery-C9IzXvrv.js";import{b as Ke}from"./use-connection-CsQi-w6W.js";import{a as We,u as Qe,h as Ze}from"./constants-DamjJgLK.js";import{u as xe,P as Je}from"./topbar-portal-BB1Hwfr5.js";import{i as ce}from"./Loading01-C3DKwOFI.js";import{t as Ye}from"./Settings01-3u2Bow8z.js";import{i as Xe}from"./Check-BYEmwnWo.js";import{t as Pe}from"./ChevronDown-CMnFLAn0.js";import{i as ve}from"./AlertCircle-DxE1CFMy.js";import{i as _e}from"./ArrowLeft-Cj3rlVid.js";import{n as de}from"./CheckDone01-92MVMFwa.js";import{s as Me}from"./Clock-DMiog_Cv.js";import{a as et}from"./Copy01-D1aG80p5.js";import{n as Ee}from"./Inbox01-50IITj70.js";import{i as tt}from"./CheckCircle-pyP6FuBr.js";import{i as st}from"./InfoCircle-aQM6BbNx.js";import{i as lt}from"./XCircle-Cw9JLXtH.js";import{u as Ie}from"./useMutation-CCGHUnSx.js";import{T as se,b as ne,c as le,a as je,d as be,e as ye}from"./table-CZYoHyke.js";import{M as nt}from"./markdown-DvqaxoJ5.js";import{n as it}from"./ArrowDown-D1jGbXdS.js";import{i as ot}from"./ArrowUp-BlFtnyf3.js";import{i as rt}from"./CheckVerified02-JCyhk2MV.js";import{i as Ce}from"./ChevronRight-BLexx0Qt.js";import{i as at}from"./File02-pVr1U-OF.js";import{s as ct}from"./Hash02-DzGoDYhz.js";import{B as dt}from"./badge-B3PuW_EW.js";import{b as mt,c as ut,d as ft,a as xt,C as pt}from"./card-mroijQho.js";import{c as Se,d as me,a as $e,b as we,S as ke}from"./select-DCJCMvYp.js";import"./use-collections-CyaEugDP.js";import"./index-Bes18yjv.js";const Le=({size:t=24,color:e="currentColor",...l})=>B.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},B.createElement("path",{d:"M12 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"}));Le.displayName="Columns02";const Ae=({size:t=24,color:e="currentColor",...l})=>B.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},B.createElement("path",{d:"M5 12h14"}));Ae.displayName="Minus";const pe=({size:t=24,color:e="currentColor",...l})=>B.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},B.createElement("path",{d:"M3 9h18M3 15h18M7.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"}));pe.displayName="Rows03";const re={reportsList:(t,e,l)=>["reports","list",t,{category:e,status:l}],report:(t,e)=>["reports","detail",t,e],pluginConfig:(t,e)=>["project-plugin-config",t,e]};function ht(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(oe,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No report source connected"}),s.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an MCP server that provides reports to view automated insights, performance audits, security scans, and more."})]}),t[0]=e):e=t[0],e}function gt(t){const e=M.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:a}=t,[i,r]=B.useState(!1),o=B.useRef(null);let d;if(e[0]!==l||e[1]!==n){let m;e[3]!==n?(m=C=>C.id===n,e[3]=n,e[4]=m):m=e[4],d=l.find(m),e[0]=l,e[1]=n,e[2]=d}else d=e[2];const c=d;let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=m=>{o.current?.contains(m.relatedTarget)||r(!1)},e[5]=u):u=e[5];const f=u;if(l.length===1){let m;e[6]!==c?(m=c?.icon?s.jsx("img",{src:c.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),e[6]=c,e[7]=m):m=e[7];const C=c?.title||"Reports";let _;e[8]!==C?(_=s.jsx("span",{children:C}),e[8]=C,e[9]=_):_=e[9];let S;return e[10]!==m||e[11]!==_?(S=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[m,_]}),e[10]=m,e[11]=_,e[12]=S):S=e[12],S}let p;e[13]!==i?(p=()=>r(!i),e[13]=i,e[14]=p):p=e[14];let x;e[15]!==c?(x=c?.icon?s.jsx("img",{src:c.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),e[15]=c,e[16]=x):x=e[16];const h=c?.title||"Select source";let g;e[17]!==h?(g=s.jsx("span",{children:h}),e[17]=h,e[18]=g):g=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Pe,{size:14}),e[19]=b):b=e[19];let N;e[20]!==p||e[21]!==x||e[22]!==g?(N=s.jsxs("button",{type:"button",onClick:p,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[x,g,b]}),e[20]=p,e[21]=x,e[22]=g,e[23]=N):N=e[23];let y;e[24]!==l||e[25]!==i||e[26]!==a||e[27]!==n?(y=i&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(m=>s.jsxs("button",{type:"button",onClick:()=>{a(m.id),r(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[m.icon?s.jsx("img",{src:m.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:m.title}),m.id===n&&s.jsx(Xe,{size:14,className:"text-primary"})]},m.id))}),e[24]=l,e[25]=i,e[26]=a,e[27]=n,e[28]=y):y=e[28];let v;return e[29]!==N||e[30]!==y?(v=s.jsxs("div",{className:"relative",ref:o,onBlur:f,children:[N,y]}),e[29]=N,e[30]=y,e[31]=v):v=e[31],v}function jt(t){const e=M.c(2);let l;return e[0]!==t?(l=s.jsx(gt,{...t}),e[0]=t,e[1]=l):l=e[1],l}const ue={passing:{label:"Passing",color:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",icon:tt},warning:{label:"Warning",color:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",icon:ve},failing:{label:"Failing",color:"bg-red-500/15 text-red-700 dark:text-red-400 border-red-500/25",icon:lt},info:{label:"Info",color:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",icon:st}};function De(t){const e=M.c(10),{status:l,size:n}=t,a=n===void 0?"default":n,i=ue[l]??ue.info,r=i.icon,o=a==="sm",d=o?"px-2 py-0.5":"px-2.5 py-1";let c;e[0]!==i.color||e[1]!==d?(c=K("inline-flex items-center gap-1 rounded-full border text-xs font-medium",d,i.color),e[0]=i.color,e[1]=d,e[2]=c):c=e[2];const u=o?12:14;let f;e[3]!==r||e[4]!==u?(f=s.jsx(r,{size:u}),e[3]=r,e[4]=u,e[5]=f):f=e[5];let p;return e[6]!==i.label||e[7]!==c||e[8]!==f?(p=s.jsxs("span",{className:c,children:[f,i.label]}),e[6]=i.label,e[7]=c,e[8]=f,e[9]=p):p=e[9],p}function ze(t){const e=M.c(11),{connectionId:l,toolCaller:n}=xe();let a;e[0]!==l||e[1]!==t?.category||e[2]!==t?.status?(a=re.reportsList(l,t?.category,t?.status),e[0]=l,e[1]=t?.category,e[2]=t?.status,e[3]=a):a=e[3];let i;e[4]!==t?.category||e[5]!==t?.status||e[6]!==n?(i=async()=>await n("REPORTS_LIST",{category:t?.category,status:t?.status}),e[4]=t?.category,e[5]=t?.status,e[6]=n,e[7]=i):i=e[7];let r;return e[8]!==a||e[9]!==i?(r={queryKey:a,queryFn:i,staleTime:6e4},e[8]=a,e[9]=i,e[10]=r):r=e[10],Ne(r)}function bt(t){const e=M.c(10),{connectionId:l,toolCaller:n}=xe();let a;e[0]!==l||e[1]!==t?(a=re.report(l,t),e[0]=l,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==n?(i=async()=>await n("REPORTS_GET",{id:t}),e[3]=t,e[4]=n,e[5]=i):i=e[5];const r=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==r?(o={queryKey:a,queryFn:i,enabled:r,staleTime:6e4},e[6]=a,e[7]=i,e[8]=r,e[9]=o):o=e[9],Ne(o)}const yt={passing:"bg-emerald-500",warning:"bg-amber-500",failing:"bg-red-500",info:"bg-blue-500"},Re=["#A595FF","#FFC116","#DE3A6E"];function ae(t){const e=M.c(7),{icon:l,title:n}=t;let a;e[0]!==l?(a=s.jsx(l,{size:16,className:"opacity-75 shrink-0 text-foreground"}),e[0]=l,e[1]=a):a=e[1];let i;e[2]!==n?(i=s.jsx("span",{className:"text-base text-foreground opacity-75",children:n}),e[2]=n,e[3]=i):i=e[3];let r;return e[4]!==a||e[5]!==i?(r=s.jsxs("div",{className:"flex gap-2 items-center",children:[a,i]}),e[4]=a,e[5]=i,e[6]=r):r=e[6],r}function Nt(t){const e=M.c(2),{content:l}=t;let n;return e[0]!==l?(n=s.jsx(nt,{children:l}),e[0]=l,e[1]=n):n=e[1],n}function vt(t){const e=M.c(15),{metric:l}=t;let n;e[0]!==l.unit?(n=l.unit&&s.jsx("span",{className:"text-base text-muted-foreground ml-1",children:l.unit}),e[0]=l.unit,e[1]=n):n=e[1];let a;e[2]!==l.value||e[3]!==n?(a=s.jsxs("div",{className:"text-2xl leading-8 text-foreground font-normal tabular-nums",children:[l.value,n]}),e[2]=l.value,e[3]=n,e[4]=a):a=e[4];let i;e[5]!==l.status?(i=l.status&&s.jsx("span",{className:K("inline-block size-2 rounded-full shrink-0",yt[l.status])}),e[5]=l.status,e[6]=i):i=e[6];let r;e[7]!==l.label?(r=s.jsx("span",{className:"text-sm text-foreground",children:l.label}),e[7]=l.label,e[8]=r):r=e[8];let o;e[9]!==i||e[10]!==r?(o=s.jsxs("div",{className:"flex gap-1.5 items-center",children:[i,r]}),e[9]=i,e[10]=r,e[11]=o):o=e[11];let d;return e[12]!==a||e[13]!==o?(d=s.jsxs("div",{className:"flex flex-col gap-3 items-start justify-end border border-border rounded-lg p-5 flex-1",children:[a,o]}),e[12]=a,e[13]=o,e[14]=d):d=e[14],d}function Oe(t){const e=M.c(12),{title:l,items:n,stacked:a}=t,i=a===void 0?!1:a;let r;e[0]!==l?(r=l&&s.jsx(ae,{icon:pe,title:l}),e[0]=l,e[1]=r):r=e[1];const o=i?"flex-col items-stretch":"items-stretch";let d;e[2]!==o?(d=K("flex gap-4",o),e[2]=o,e[3]=d):d=e[3];let c;e[4]!==n?(c=n.map(_t),e[4]=n,e[5]=c):c=e[5];let u;e[6]!==d||e[7]!==c?(u=s.jsx("div",{className:d,children:c}),e[6]=d,e[7]=c,e[8]=u):u=e[8];let f;return e[9]!==r||e[10]!==u?(f=s.jsxs("div",{className:"space-y-4",children:[r,u]}),e[9]=r,e[10]=u,e[11]=f):f=e[11],f}function _t(t,e){return s.jsx(vt,{metric:t},`${t.label}-${e}`)}function Ct(t){const e=M.c(16),{title:l,columns:n,rows:a}=t;let i;e[0]!==l?(i=l&&s.jsx(ae,{icon:pe,title:l}),e[0]=l,e[1]=i):i=e[1];let r;e[2]!==n?(r=n.map(wt),e[2]=n,e[3]=r):r=e[3];let o;e[4]!==r?(o=s.jsx(je,{children:s.jsx(ne,{children:r})}),e[4]=r,e[5]=o):o=e[5];let d;e[6]!==a?(d=a.map(St),e[6]=a,e[7]=d):d=e[7];let c;e[8]!==d?(c=s.jsx(be,{children:d}),e[8]=d,e[9]=c):c=e[9];let u;e[10]!==o||e[11]!==c?(u=s.jsx("div",{className:"rounded-lg border overflow-hidden",children:s.jsxs(ye,{children:[o,c]})}),e[10]=o,e[11]=c,e[12]=u):u=e[12];let f;return e[13]!==i||e[14]!==u?(f=s.jsxs("div",{className:"space-y-4",children:[i,u]}),e[13]=i,e[14]=u,e[15]=f):f=e[15],f}function St(t,e){return s.jsx(ne,{children:t.map($t)},e)}function $t(t,e){return s.jsx(le,{className:"text-sm",children:t??s.jsx("span",{className:"text-muted-foreground",children:"—"})},e)}function wt(t){return s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:t},t)}function Fe(t){const e=M.c(11),{title:l,items:n}=t;let a;e[0]!==l?(a=l&&s.jsx(ae,{icon:rt,title:l}),e[0]=l,e[1]=a):a=e[1];let i;if(e[2]!==n){let d;e[4]!==n.length?(d=(c,u)=>s.jsxs("div",{className:"flex gap-4 items-stretch",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center w-4 shrink-0",children:[s.jsx("div",{className:"h-full w-px bg-border"}),s.jsx("div",{className:"w-2 h-4 rounded-full flex",style:{backgroundColor:Re[u%Re.length]}}),s.jsx("div",{className:K("h-full w-px bg-border",u===n.length-1&&"invisible")})]}),s.jsxs("div",{className:"flex flex-col gap-2 items-start py-3 pb-4 min-w-0",children:[s.jsx("span",{className:"text-sm font-medium text-foreground leading-none",children:c.label}),c.description&&s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:c.description})]})]},`${c.label}-${u}`),e[4]=n.length,e[5]=d):d=e[5],i=n.map(d),e[2]=n,e[3]=i}else i=e[3];let r;e[6]!==i?(r=s.jsx("div",{className:"flex flex-col",children:i}),e[6]=i,e[7]=r):r=e[7];let o;return e[8]!==a||e[9]!==r?(o=s.jsxs("div",{className:"space-y-4",children:[a,r]}),e[8]=a,e[9]=r,e[10]=o):o=e[10],o}function kt(t){const e=M.c(3),{content:l}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ae,{icon:at,title:"Notas"}),e[0]=n):n=e[0];let a;return e[1]!==l?(a=s.jsxs("div",{className:"space-y-4",children:[n,s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:l})]}),e[1]=l,e[2]=a):a=e[2],a}function zt(t){const e=M.c(11),{delta:l}=t;if(l===0){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("span",{className:"inline-flex items-center justify-center",children:s.jsx(Ae,{size:16,className:"text-muted-foreground"})}),e[0]=c):c=e[0],c}const n=l>0,a=n?"text-emerald-600":"text-destructive";let i;e[1]!==a?(i=K("inline-flex items-center gap-0.5 text-sm font-medium",a),e[1]=a,e[2]=i):i=e[2];let r;e[3]!==n?(r=n?s.jsx(ot,{size:16}):s.jsx(it,{size:16}),e[3]=n,e[4]=r):r=e[4];let o;e[5]!==l?(o=Math.abs(l),e[5]=l,e[6]=o):o=e[6];let d;return e[7]!==i||e[8]!==r||e[9]!==o?(d=s.jsxs("span",{className:i,children:[r,o]}),e[7]=i,e[8]=r,e[9]=o,e[10]=d):d=e[10],d}function Rt(t){if(t.length===0)return[];const e=[...t];for(let l=e.length-1;l>0;l--){const n=Math.max(0,Math.min(e.length-1,l+(l%3===0?-2:l%2===0?1:-1)));[e[l],e[n]]=[e[n],e[l]]}return e.map((l,n)=>({...l,position:n+1,delta:0,reference_position:void 0}))}function ge(t){const e=M.c(14),{rows:l,label:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={},e[0]=a):a=e[0];const[i,r]=B.useState(a);let o;e[1]!==n?(o=n&&s.jsx("span",{className:"text-xs font-mono uppercase text-muted-foreground opacity-60 tracking-wide px-1",children:n}),e[1]=n,e[2]=o):o=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(je,{className:"sticky top-0 bg-background z-10",children:s.jsxs(ne,{children:[s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground w-[60px]",children:"#"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground w-[60px]",children:"DELTA"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"PRODUTO"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"SCORE"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"GRADE"}),s.jsx(se,{className:"w-10"})]})}),e[3]=d):d=e[3];let c;if(e[4]!==i||e[5]!==l){let p;e[7]!==i?(p=(x,h)=>{const g=i[h]??!1,b=x.note&&typeof x.note=="object"?x.note:null,N=typeof x.note=="string"?!!x.note:b!==null&&Object.keys(b).length>0,y=x.reference_position!==void 0?x.reference_position-x.position:x.delta??0;return s.jsxs(B.Fragment,{children:[s.jsxs(ne,{children:[s.jsx(le,{children:s.jsxs("div",{className:"flex items-center gap-1 opacity-50",children:[s.jsx(ct,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground tabular-nums",children:x.position})]})}),s.jsx(le,{children:s.jsx(zt,{delta:y})}),s.jsx(le,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[x.image&&s.jsx("img",{src:x.image,alt:"",className:"h-12 w-8 object-cover rounded-sm shrink-0 bg-muted"}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:x.label})]})}),x.values.map(Mt),s.jsx(le,{children:N?s.jsx("button",{type:"button",onClick:()=>r(v=>({...v,[h]:!v[h]})),className:"flex items-center justify-center size-6 text-muted-foreground hover:text-foreground transition-colors",children:g?s.jsx(Pe,{size:16}):s.jsx(Ce,{size:16})}):s.jsx(Ce,{size:16,className:"text-muted-foreground opacity-30"})})]}),N&&g&&s.jsx(ne,{className:"bg-muted/25",children:s.jsx(le,{colSpan:6,children:typeof x.note=="string"?s.jsxs("div",{className:"pl-8 pb-2 flex flex-col gap-1.5",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase opacity-50 tracking-wide",children:"MUDANÇA"}),s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:x.note})]}):s.jsx("div",{className:"py-2 px-4",children:s.jsxs(ye,{children:[s.jsx(je,{children:s.jsx(ne,{children:Object.keys(b??{}).map(Pt)})}),s.jsx(be,{children:s.jsx(ne,{children:Object.values(b??{}).map(Tt)})})]})})})},`note-${h}`)]},h)},e[7]=i,e[8]=p):p=e[8],c=l.map(p),e[4]=i,e[5]=l,e[6]=c}else c=e[6];let u;e[9]!==c?(u=s.jsx("div",{className:"border border-border rounded-lg overflow-auto max-h-[520px]",children:s.jsxs(ye,{children:[d,s.jsx(be,{children:c})]})}),e[9]=c,e[10]=u):u=e[10];let f;return e[11]!==o||e[12]!==u?(f=s.jsxs("div",{className:"flex flex-col gap-2 min-w-0 flex-1",children:[o,u]}),e[11]=o,e[12]=u,e[13]=f):f=e[13],f}function Tt(t,e){return s.jsx(le,{className:"text-sm tabular-nums",children:t??"—"},e)}function Pt(t){return s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:t},t)}function Mt(t,e){const n=e===1&&typeof t=="string"&&t.endsWith("%")?`${parseFloat(t)-10}%`:t;return s.jsx(le,{className:"text-sm tabular-nums",children:n},e)}function Et(t){const e=M.c(20),{title:l,rows:n}=t,[a,i]=B.useState(!1);let r;e[0]!==n?(r=Rt(n),e[0]=n,e[1]=r):r=e[1];const o=r;let d;e[2]!==l?(d=l&&s.jsx(ae,{icon:pe,title:l}),e[2]=l,e[3]=d):d=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>i(It),e[4]=c):c=e[4];const u=a?"bg-primary text-primary-foreground border-primary":"bg-transparent text-muted-foreground border-border hover:text-foreground hover:border-foreground/30";let f;e[5]!==u?(f=K("inline-flex items-center gap-1.5 text-xs font-medium px-2.5 py-1.5 rounded-md border transition-colors",u),e[5]=u,e[6]=f):f=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Le,{size:14}),e[7]=p):p=e[7];let x;e[8]!==f?(x=s.jsxs("button",{type:"button",onClick:c,className:f,children:[p,"Comparar ordenação anterior"]}),e[8]=f,e[9]=x):x=e[9];let h;e[10]!==d||e[11]!==x?(h=s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d,x]}),e[10]=d,e[11]=x,e[12]=h):h=e[12];let g;e[13]!==o||e[14]!==n||e[15]!==a?(g=a?s.jsxs("div",{className:"flex gap-4 items-start",children:[s.jsx(ge,{rows:n,label:"Ordenação Proposta"}),s.jsx(ge,{rows:o,label:"Ordenação Atual"})]}):s.jsx(ge,{rows:n}),e[13]=o,e[14]=n,e[15]=a,e[16]=g):g=e[16];let b;return e[17]!==h||e[18]!==g?(b=s.jsxs("div",{className:"space-y-4",children:[h,g]}),e[17]=h,e[18]=g,e[19]=b):b=e[19],b}function It(t){return!t}function Lt(t){const e=M.c(17),{section:l}=t;switch(l.type){case"markdown":{let n;return e[0]!==l.content?(n=s.jsx(Nt,{content:l.content}),e[0]=l.content,e[1]=n):n=e[1],n}case"metrics":{let n;return e[2]!==l.items||e[3]!==l.title?(n=s.jsx(Oe,{title:l.title,items:l.items}),e[2]=l.items,e[3]=l.title,e[4]=n):n=e[4],n}case"table":{let n;return e[5]!==l.columns||e[6]!==l.rows||e[7]!==l.title?(n=s.jsx(Ct,{title:l.title,columns:l.columns,rows:l.rows}),e[5]=l.columns,e[6]=l.rows,e[7]=l.title,e[8]=n):n=e[8],n}case"criteria":{let n;return e[9]!==l.items||e[10]!==l.title?(n=s.jsx(Fe,{title:l.title,items:l.items}),e[9]=l.items,e[10]=l.title,e[11]=n):n=e[11],n}case"note":{let n;return e[12]!==l.content?(n=s.jsx(kt,{content:l.content}),e[12]=l.content,e[13]=n):n=e[13],n}case"ranked-list":{let n;return e[14]!==l.rows||e[15]!==l.title?(n=s.jsx(Et,{title:l.title,rows:l.rows}),e[14]=l.rows,e[15]=l.title,e[16]=n):n=e[16],n}default:return null}}function At(t){return new Date(t).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function Dt(t){const e=[];e.push(`# ${t.title}`),e.push(""),e.push(`> ${t.summary}`),e.push("");const l=[`**Status:** ${t.status}`,`**Category:** ${t.category}`];t.source&&l.push(`**Source:** ${t.source}`),l.push(`**Updated:** ${t.updatedAt}`),t.tags?.length&&l.push(`**Tags:** ${t.tags.join(", ")}`),e.push(l.join(`
|
|
2
2
|
`)),e.push("");for(const n of t.sections)switch(n.type){case"markdown":e.push(n.content),e.push("");break;case"metrics":{n.title&&(e.push(`## ${n.title}`),e.push(""));const a=["Metric","Value","Previous","Status"],i=n.items.some(r=>r.unit);e.push(`| ${a.join(" | ")} |`),e.push(`| ${a.map(()=>"---").join(" | ")} |`);for(const r of n.items){const o=r.unit==="%"&&typeof r.value=="number"?r.value-10:r.value,d=r.unit==="%"&&typeof r.previousValue=="number"?r.previousValue-10:r.previousValue,c=i&&r.unit?`${o} ${r.unit}`:`${o}`,u=d!=null?i&&r.unit?`${d} ${r.unit}`:`${d}`:"—",f=r.status??"—";e.push(`| ${r.label} | ${c} | ${u} | ${f} |`)}e.push("");break}case"table":{n.title&&(e.push(`## ${n.title}`),e.push("")),e.push(`| ${n.columns.join(" | ")} |`),e.push(`| ${n.columns.map(()=>"---").join(" | ")} |`);for(const a of n.rows)e.push(`| ${a.map(i=>i==null?"—":`${i}`).join(" | ")} |`);e.push("");break}case"criteria":{n.title&&(e.push(`## ${n.title}`),e.push(""));for(const a of n.items){const i=a.description?`: ${a.description}`:"";e.push(`- **${a.label}**${i}`)}e.push("");break}case"note":{e.push(`> ${n.content}`),e.push("");break}case"ranked-list":{n.title&&(e.push(`## ${n.title}`),e.push(""));const a=["#","Item"];e.push(`| ${a.join(" | ")} |`),e.push(`| ${a.map(()=>"---").join(" | ")} |`);for(const i of n.rows){const r=i.reference_position!==void 0?i.reference_position-i.position:i.delta??0,o=r!==0?` (${r>0?"+":""}${r})`:"",d=`${i.position}${o}`,c=i.values.map(u=>`${u}`).join(" | ");e.push(`| ${d} | ${i.label} | ${c} |`)}e.push("");break}}return e.join(`
|
|
3
3
|
`).trim()}function Ot(t){const e=M.c(86),{reportId:l,onBack:n}=t,{connectionId:a,toolCaller:i}=xe(),r=Te(),{data:o,isLoading:d,error:c}=bt(l),u=o?.lifecycleStatus==="dismissed";let f;e[0]!==u||e[1]!==l||e[2]!==i?(f=async()=>i("REPORTS_UPDATE_STATUS",{reportId:l,lifecycleStatus:u?"read":"dismissed"}),e[0]=u,e[1]=l,e[2]=i,e[3]=f):f=e[3];let p;e[4]!==a||e[5]!==u||e[6]!==n||e[7]!==r?(p=()=>{fe.success(u?"Report restored to inbox":"Report marked as done"),r.invalidateQueries({queryKey:re.reportsList(a)}),n()},e[4]=a,e[5]=u,e[6]=n,e[7]=r,e[8]=p):p=e[8];let x;e[9]!==f||e[10]!==p?(x={mutationFn:f,onSuccess:p,onError:Ut},e[9]=f,e[10]=p,e[11]=x):x=e[11];const h=Ie(x);if(d){let D;return e[12]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ce,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading report..."})]}),e[12]=D):D=e[12],D}if(c||!o){let D;e[13]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(ve,{size:48,className:"text-destructive mb-4"}),e[13]=D):D=e[13];const Q=c?"Error loading report":"Report not found";let q;e[14]!==Q?(q=s.jsx("h3",{className:"text-lg font-medium mb-2",children:Q}),e[14]=Q,e[15]=q):q=e[15];const Z=c?.message??"The requested report could not be found.";let X;e[16]!==Z?(X=s.jsx("p",{className:"text-muted-foreground text-center mb-4",children:Z}),e[16]=Z,e[17]=X):X=e[17];let ee;e[18]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(_e,{size:14,className:"mr-1"}),e[18]=ee):ee=e[18];let G;e[19]!==n?(G=s.jsxs(he,{variant:"outline",onClick:n,children:[ee,"Back to reports"]}),e[19]=n,e[20]=G):G=e[20];let J;return e[21]!==G||e[22]!==q||e[23]!==X?(J=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[D,q,X,G]}),e[21]=G,e[22]=q,e[23]=X,e[24]=J):J=e[24],J}let g;e[25]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(_e,{size:14}),e[25]=g):g=e[25];let b;e[26]!==n?(b=s.jsxs("button",{type:"button",onClick:n,className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[g,"Reports"]}),e[26]=n,e[27]=b):b=e[27];let N;e[28]!==o?(N=()=>{const D=Dt(o);navigator.clipboard.writeText(D).then(Bt)},e[28]=o,e[29]=N):N=e[29];let y;e[30]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(et,{size:14}),e[30]=y):y=e[30];let v;e[31]!==N?(v=s.jsxs(he,{variant:"outline",size:"sm",className:"gap-1.5",onClick:N,children:[y,"Copy as Markdown"]}),e[31]=N,e[32]=v):v=e[32];let m;e[33]!==h?(m=()=>h.mutate(),e[33]=h,e[34]=m):m=e[34];let C;e[35]!==u||e[36]!==h.isPending?(C=h.isPending?s.jsx(ce,{size:14,className:"animate-spin"}):u?s.jsx(Ee,{size:14}):s.jsx(de,{size:14}),e[35]=u,e[36]=h.isPending,e[37]=C):C=e[37];const _=u?"Move to inbox":"Mark as done";let S;e[38]!==h.isPending||e[39]!==C||e[40]!==_||e[41]!==m?(S=s.jsxs(he,{variant:"outline",size:"sm",className:"gap-1.5",onClick:m,disabled:h.isPending,children:[C,_]}),e[38]=h.isPending,e[39]=C,e[40]=_,e[41]=m,e[42]=S):S=e[42];let $;e[43]!==S||e[44]!==v?($=s.jsxs("div",{className:"flex items-center gap-2",children:[v,S]}),e[43]=S,e[44]=v,e[45]=$):$=e[45];let z;e[46]!==$||e[47]!==b?(z=s.jsxs("div",{className:"flex items-center justify-between",children:[b,$]}),e[46]=$,e[47]=b,e[48]=z):z=e[48];let w;e[49]!==o.title?(w=s.jsx("h1",{className:"text-xl font-semibold leading-tight",children:o.title}),e[49]=o.title,e[50]=w):w=e[50];let R;e[51]!==o.summary?(R=s.jsx("p",{className:"text-sm text-muted-foreground",children:o.summary}),e[51]=o.summary,e[52]=R):R=e[52];let E;e[53]!==w||e[54]!==R?(E=s.jsxs("div",{className:"space-y-1 min-w-0",children:[w,R]}),e[53]=w,e[54]=R,e[55]=E):E=e[55];let I;e[56]!==o.status?(I=s.jsx(De,{status:o.status}),e[56]=o.status,e[57]=I):I=e[57];let T;e[58]!==E||e[59]!==I?(T=s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[E,I]}),e[58]=E,e[59]=I,e[60]=T):T=e[60];let k;e[61]!==o.category?(k=s.jsx("span",{className:"capitalize",children:o.category}),e[61]=o.category,e[62]=k):k=e[62];let P;e[63]!==o.source?(P=o.source&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-border",children:"|"}),s.jsx("span",{children:o.source})]}),e[63]=o.source,e[64]=P):P=e[64];let L;e[65]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx("span",{className:"text-border",children:"|"}),e[65]=L):L=e[65];let O;e[66]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Me,{size:12}),e[66]=O):O=e[66];let A;e[67]!==o.updatedAt?(A=At(o.updatedAt),e[67]=o.updatedAt,e[68]=A):A=e[68];let j;e[69]!==A?(j=s.jsxs("span",{className:"inline-flex items-center gap-1",children:[O,A]}),e[69]=A,e[70]=j):j=e[70];let F;e[71]!==k||e[72]!==P||e[73]!==j?(F=s.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[k,P,L,j]}),e[71]=k,e[72]=P,e[73]=j,e[74]=F):F=e[74];let W;e[75]!==z||e[76]!==T||e[77]!==F?(W=s.jsxs("div",{className:"border-b border-border px-6 py-4 space-y-3",children:[z,T,F]}),e[75]=z,e[76]=T,e[77]=F,e[78]=W):W=e[78];let U;e[79]!==o.sections?(U=Be(o.sections??[]).map(Ft),e[79]=o.sections,e[80]=U):U=e[80];let V;e[81]!==U?(V=s.jsx("div",{className:"flex-1 px-6 py-6 space-y-8",children:U}),e[81]=U,e[82]=V):V=e[82];let Y;return e[83]!==W||e[84]!==V?(Y=s.jsxs("div",{className:"flex flex-col h-full overflow-y-auto pb-6",children:[W,V]}),e[83]=W,e[84]=V,e[85]=Y):Y=e[85],Y}function Ft(t){return t.type==="side-by-side"?s.jsxs("div",{className:"flex gap-6 items-start w-full",children:[s.jsx("div",{className:"w-full",children:s.jsx(Fe,{title:t.left.title,items:t.left.items})}),s.jsx("div",{className:"w-full",children:s.jsx(Oe,{title:t.right.title,items:t.right.items,stacked:!0})})]},`${t.leftIdx}-${t.rightIdx}`):s.jsx(Lt,{section:t.section},t.idx)}function Bt(){fe.success("Copied report as Markdown")}function Ut(t){fe.error(`Failed to update report: ${t.message}`)}function qt(t){const e=Date.now()-new Date(t).getTime(),l=Math.floor(e/6e4);if(l<1)return"just now";if(l<60)return`${l}m ago`;const n=Math.floor(l/60);if(n<24)return`${n}h ago`;const a=Math.floor(n/24);return a<30?`${a}d ago`:new Date(t).toLocaleDateString()}function Gt(t){const e=M.c(57),{report:l,isDoneTab:n,onSelect:a,onDismiss:i}=t,r=!l.lifecycleStatus||l.lifecycleStatus==="unread",o=n?"opacity-60":"hover:shadow-md";let d;e[0]!==o?(d=K("group relative cursor-pointer transition-shadow",o),e[0]=o,e[1]=d):d=e[1];let c;e[2]!==a||e[3]!==l.id?(c=()=>a(l.id),e[2]=a,e[3]=l.id,e[4]=c):c=e[4];let u;e[5]!==r?(u=r&&s.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 rounded-l-xl bg-primary"}),e[5]=r,e[6]=u):u=e[6];const f=r&&"font-bold";let p;e[7]!==f?(p=K("text-sm leading-snug line-clamp-2",f),e[7]=f,e[8]=p):p=e[8];let x;e[9]!==l.title||e[10]!==p?(x=s.jsx(mt,{className:p,children:l.title}),e[9]=l.title,e[10]=p,e[11]=x):x=e[11];let h;e[12]!==l.status?(h=s.jsx(De,{status:l.status,size:"sm"}),e[12]=l.status,e[13]=h):h=e[13];const g=n?"Restore to inbox":"Mark as done",b=n?"text-muted-foreground hover:text-foreground hover:bg-accent":"text-muted-foreground/0 group-hover:text-muted-foreground hover:!text-emerald-600 hover:bg-emerald-500/10";let N;e[14]!==b?(N=K("rounded-md p-1 transition-colors",b),e[14]=b,e[15]=N):N=e[15];let y;e[16]!==n||e[17]!==i||e[18]!==l.id?(y=L=>{L.stopPropagation(),i(l.id,!n)},e[16]=n,e[17]=i,e[18]=l.id,e[19]=y):y=e[19];let v;e[20]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(de,{size:14}),e[20]=v):v=e[20];let m;e[21]!==N||e[22]!==y||e[23]!==g?(m=s.jsx("button",{type:"button",title:g,className:N,onClick:y,children:v}),e[21]=N,e[22]=y,e[23]=g,e[24]=m):m=e[24];let C;e[25]!==m||e[26]!==h?(C=s.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[h,m]}),e[25]=m,e[26]=h,e[27]=C):C=e[27];let _;e[28]!==C||e[29]!==x?(_=s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[x,C]}),e[28]=C,e[29]=x,e[30]=_):_=e[30];let S;e[31]!==l.summary?(S=s.jsx(ut,{className:"mt-1 line-clamp-2 text-xs",children:l.summary}),e[31]=l.summary,e[32]=S):S=e[32];let $;e[33]!==_||e[34]!==S?($=s.jsxs(ft,{className:"pb-2 pt-5 px-5",children:[_,S]}),e[33]=_,e[34]=S,e[35]=$):$=e[35];let z;e[36]!==l.category?(z=s.jsx("span",{className:"inline-flex items-center gap-1 capitalize",children:l.category}),e[36]=l.category,e[37]=z):z=e[37];let w;e[38]!==l.source?(w=l.source&&s.jsx("span",{className:"inline-flex items-center gap-1 text-muted-foreground/70",children:l.source}),e[38]=l.source,e[39]=w):w=e[39];let R;e[40]!==z||e[41]!==w?(R=s.jsxs("div",{className:"flex items-center gap-3",children:[z,w]}),e[40]=z,e[41]=w,e[42]=R):R=e[42];let E;e[43]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(Me,{size:12}),e[43]=E):E=e[43];let I;e[44]!==l.updatedAt?(I=qt(l.updatedAt),e[44]=l.updatedAt,e[45]=I):I=e[45];let T;e[46]!==I?(T=s.jsx("div",{className:"flex items-center gap-3",children:s.jsxs("span",{className:"inline-flex items-center gap-1",children:[E,I]})}),e[46]=I,e[47]=T):T=e[47];let k;e[48]!==R||e[49]!==T?(k=s.jsx(xt,{className:"px-5 pb-5",children:s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[R,T]})}),e[48]=R,e[49]=T,e[50]=k):k=e[50];let P;return e[51]!==$||e[52]!==d||e[53]!==k||e[54]!==c||e[55]!==u?(P=s.jsxs(pt,{className:d,onClick:c,children:[u,$,k]}),e[51]=$,e[52]=d,e[53]=k,e[54]=c,e[55]=u,e[56]=P):P=e[56],P}function Vt(t){const e=M.c(24),{category:l,status:n,categories:a,onCategoryChange:i,onStatusChange:r}=t,o=l??"__all__";let d;e[0]!==i?(d=_=>i(_==="__all__"?void 0:_),e[0]=i,e[1]=d):d=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx($e,{size:"sm",children:s.jsx(we,{placeholder:"All categories"})}),e[2]=c):c=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(me,{value:"__all__",children:"All categories"}),e[3]=u):u=e[3];let f;e[4]!==a?(f=a.map(Kt),e[4]=a,e[5]=f):f=e[5];let p;e[6]!==f?(p=s.jsxs(Se,{children:[u,f]}),e[6]=f,e[7]=p):p=e[7];let x;e[8]!==o||e[9]!==d||e[10]!==p?(x=s.jsxs(ke,{value:o,onValueChange:d,children:[c,p]}),e[8]=o,e[9]=d,e[10]=p,e[11]=x):x=e[11];const h=n??"__all__";let g;e[12]!==r?(g=_=>r(_==="__all__"?void 0:_),e[12]=r,e[13]=g):g=e[13];let b;e[14]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx($e,{size:"sm",children:s.jsx(we,{placeholder:"All statuses"})}),e[14]=b):b=e[14];let N,y;e[15]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(me,{value:"__all__",children:"All statuses"}),y=Object.keys(ue),e[15]=N,e[16]=y):(N=e[15],y=e[16]);let v;e[17]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs(Se,{children:[N,y.map(Ht)]}),e[17]=v):v=e[17];let m;e[18]!==h||e[19]!==g?(m=s.jsxs(ke,{value:h,onValueChange:g,children:[b,v]}),e[18]=h,e[19]=g,e[20]=m):m=e[20];let C;return e[21]!==m||e[22]!==x?(C=s.jsxs("div",{className:"flex items-center gap-2",children:[x,m]}),e[21]=m,e[22]=x,e[23]=C):C=e[23],C}function Ht(t){return s.jsx(me,{value:t,children:ue[t].label},t)}function Kt(t){return s.jsx(me,{value:t,children:s.jsx("span",{className:"capitalize",children:t})},t)}function Wt(t){const e=M.c(51),{onSelectReport:l}=t,[n,a]=B.useState("inbox"),[i,r]=B.useState(),[o,d]=B.useState(),{connectionId:c,toolCaller:u}=xe(),f=Te();let p;e[0]!==i||e[1]!==o?(p={category:i,status:o},e[0]=i,e[1]=o,e[2]=p):p=e[2];const{data:x,isLoading:h,error:g}=ze(p),b=x?.reports??[],N=b.filter(Xt),y=b.filter(Yt),v=n==="inbox"?N:y,m=N.filter(Jt).length,{data:C}=ze();let _;e[3]!==C?.reports?(_=[...new Set((C?.reports??[]).map(Zt))].sort(),e[3]=C?.reports,e[4]=_):_=e[4];const S=_;let $;e[5]!==u?($=async H=>{const{reportId:te,lifecycleStatus:ie}=H;return u("REPORTS_UPDATE_STATUS",{reportId:te,lifecycleStatus:ie})},e[5]=u,e[6]=$):$=e[6];let z;e[7]!==c||e[8]!==f?(z=()=>{f.invalidateQueries({queryKey:re.reportsList(c)})},e[7]=c,e[8]=f,e[9]=z):z=e[9];let w;e[10]!==$||e[11]!==z?(w={mutationFn:$,onSuccess:z,onError:Qt},e[10]=$,e[11]=z,e[12]=w):w=e[12];const R=Ie(w);let E;e[13]!==R?(E=(H,te)=>{R.mutate({reportId:H,lifecycleStatus:te?"dismissed":"read"})},e[13]=R,e[14]=E):E=e[14];const I=E;if(g){let H,te;e[15]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(ve,{size:48,className:"text-destructive mb-4"}),te=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading reports"}),e[15]=H,e[16]=te):(H=e[15],te=e[16]);let ie;return e[17]!==g.message?(ie=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[H,te,s.jsx("p",{className:"text-muted-foreground text-center",children:g.message})]}),e[17]=g.message,e[18]=ie):ie=e[18],ie}const T="flex flex-col h-full";let k;e[19]===Symbol.for("react.memo_cache_sentinel")?(k=()=>a("inbox"),e[19]=k):k=e[19];const P=n==="inbox"?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50";let L;e[20]!==P?(L=K("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",P),e[20]=P,e[21]=L):L=e[21];let O;e[22]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Ee,{size:14}),e[22]=O):O=e[22];let A;e[23]!==h||e[24]!==m?(A=!h&&m>0&&s.jsx(dt,{variant:"default",className:"text-[10px] px-1.5 py-0 h-4",children:m}),e[23]=h,e[24]=m,e[25]=A):A=e[25];let j;e[26]!==L||e[27]!==A?(j=s.jsxs("button",{type:"button",onClick:k,className:L,children:[O,"Inbox",A]}),e[26]=L,e[27]=A,e[28]=j):j=e[28];let F;e[29]===Symbol.for("react.memo_cache_sentinel")?(F=()=>a("done"),e[29]=F):F=e[29];const W=n==="done"?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50";let U;e[30]!==W?(U=K("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",W),e[30]=W,e[31]=U):U=e[31];let V;e[32]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(de,{size:14}),e[32]=V):V=e[32];const Y=!h&&y.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:y.length});let D;e[33]!==U||e[34]!==Y?(D=s.jsxs("button",{type:"button",onClick:F,className:U,children:[V,"Done",Y]}),e[33]=U,e[34]=Y,e[35]=D):D=e[35];let Q;e[36]!==j||e[37]!==D?(Q=s.jsxs("div",{className:"flex items-center gap-1",children:[j,D]}),e[36]=j,e[37]=D,e[38]=Q):Q=e[38];let q;e[39]!==S||e[40]!==i||e[41]!==o?(q=s.jsx(Vt,{category:i,status:o,categories:S,onCategoryChange:r,onStatusChange:d}),e[39]=S,e[40]=i,e[41]=o,e[42]=q):q=e[42];let Z;e[43]!==Q||e[44]!==q?(Z=s.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-b border-border",children:[Q,q]}),e[43]=Q,e[44]=q,e[45]=Z):Z=e[45];const X="flex-1 overflow-y-auto p-6",ee=h?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ce,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading reports..."})]}):v.length===0?s.jsx("div",{className:"flex flex-col items-center justify-center h-full text-center",children:n==="done"?s.jsxs(s.Fragment,{children:[s.jsx(de,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No dismissed reports"}),s.jsx("p",{className:"text-muted-foreground max-w-sm",children:"Reports you mark as done will appear here."})]}):s.jsxs(s.Fragment,{children:[s.jsx(oe,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:i||o?"No reports match filters":"Inbox is empty"}),s.jsx("p",{className:"text-muted-foreground max-w-sm",children:i||o?"Try adjusting your filters.":"Reports will appear here once the connected MCP server provides them."})]})}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:v.map(H=>s.jsx(Gt,{report:H,isDoneTab:n==="done",onSelect:l,onDismiss:I},H.id))});let G;e[46]!==ee?(G=s.jsx("div",{className:X,children:ee}),e[46]=ee,e[47]=G):G=e[47];let J;return e[48]!==Z||e[49]!==G?(J=s.jsxs("div",{className:T,children:[Z,G]}),e[48]=Z,e[49]=G,e[50]=J):J=e[50],J}function Qt(t){fe.error(`Failed to update report: ${t.message}`)}function Zt(t){return t.category}function Jt(t){return!t.lifecycleStatus||t.lifecycleStatus==="unread"}function Yt(t){return t.lifecycleStatus==="dismissed"}function Xt(t){return t.lifecycleStatus!=="dismissed"}function es(t){return t?t.filter(e=>He(e,Ve)):[]}function Ls(){const t=M.c(58),{org:e,project:l}=Ue();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const a=qe(n),i=Ge(),r=Ke(),o=a.reportId??null;let d;t[1]!==i?(d=j=>{i({search:j?{reportId:j}:{},replace:!0})},t[1]=i,t[2]=d):d=t[2];const c=d;let u;t[3]!==e.id?(u={connectionId:We,orgId:e.id},t[3]=e.id,t[4]=u):u=t[4];const f=Qe(u);let p;t[5]!==l.id?(p=re.pluginConfig(l.id??"","reports"),t[5]=l.id,t[6]=p):p=t[6];let x;t[7]!==l.id||t[8]!==f?(x=async()=>{const j=await f.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:"reports"}});return j.structuredContent??j},t[7]=l.id,t[8]=f,t[9]=x):x=t[9];const h=!!l.id;let g;t[10]!==p||t[11]!==x||t[12]!==h?(g={queryKey:p,queryFn:x,enabled:h},t[10]=p,t[11]=x,t[12]=h,t[13]=g):g=t[13];const{data:b,isLoading:N}=Ne(g);let y,v;if(t[14]!==r||t[15]!==b?.config?.connectionId){v=es(r);const j=b?.config?.connectionId;y=j?v.find(F=>F.id===j):null,t[14]=r,t[15]=b?.config?.connectionId,t[16]=y,t[17]=v}else y=t[16],v=t[17];const m=y,C=m?.id;let _;t[18]!==e.id||t[19]!==C?(_={connectionId:C,orgId:e.id},t[18]=e.id,t[19]=C,t[20]=_):_=t[20];const S=Ze(_);let $;t[21]!==e.id||t[22]!==e.name||t[23]!==e.slug?($={id:e.id,slug:e.slug,name:e.name},t[21]=e.id,t[22]=e.name,t[23]=e.slug,t[24]=$):$=t[24];const z=$;if(N){let j;return t[25]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ce,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),t[25]=j):j=t[25],j}if(v.length===0){let j;return t[26]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ht,{}),t[26]=j):j=t[26],j}if(!m){let j;return t[27]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[s.jsx(Ye,{size:48,className:"text-muted-foreground mb-2"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]})}),t[27]=j):j=t[27],j}let w;t[28]!==m.app_id||t[29]!==m.app_name||t[30]!==m.description||t[31]!==m.icon||t[32]!==m.id||t[33]!==m.metadata||t[34]!==m.title||t[35]!==m.tools?(w={id:m.id,title:m.title,icon:m.icon,description:m.description,app_name:m.app_name,app_id:m.app_id,tools:m.tools,metadata:m.metadata},t[28]=m.app_id,t[29]=m.app_name,t[30]=m.description,t[31]=m.icon,t[32]=m.id,t[33]=m.metadata,t[34]=m.title,t[35]=m.tools,t[36]=w):w=t[36];let R;t[37]!==S?(R=(j,F)=>S?S.callTool({name:j,arguments:F}).then(ss):Promise.reject(new Error("MCP client is not available")),t[37]=S,t[38]=R):R=t[38];const E=R;let I;t[39]!==m.id||t[40]!==z||t[41]!==w||t[42]!==E?(I={connectionId:m.id,connection:w,toolCaller:E,org:z,session:null},t[39]=m.id,t[40]=z,t[41]=w,t[42]=E,t[43]=I):I=t[43];const T=I;let k;t[44]!==T.connection?(k=[T.connection],t[44]=T.connection,t[45]=k):k=t[45];let P;t[46]!==m.id||t[47]!==k?(P=s.jsx("div",{className:"flex items-center px-6 py-3 border-b border-border",children:s.jsx(jt,{connections:k,selectedConnectionId:m.id,onConnectionChange:ts})}),t[46]=m.id,t[47]=k,t[48]=P):P=t[48];let L;t[49]!==o||t[50]!==c?(L=s.jsx("div",{className:"flex-1 overflow-hidden",children:o?s.jsx(Ot,{reportId:o,onBack:()=>c(null)}):s.jsx(Wt,{onSelectReport:c})}),t[49]=o,t[50]=c,t[51]=L):L=t[51];let O;t[52]!==P||t[53]!==L?(O=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[P,L]}),t[52]=P,t[53]=L,t[54]=O):O=t[54];let A;return t[55]!==T||t[56]!==O?(A=s.jsx(Je,{value:T,children:O}),t[55]=T,t[56]=O,t[57]=A):A=t[57],A}function ts(){}function ss(t){return t.structuredContent??t}export{Ls as default};
|