decocms 4.92.3 → 4.94.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-B9GlbKHh.js → AlertCircle-C1QMMByE.js} +1 -1
- package/dist/client/assets/{AreaChart-DHN9bK0l.js → AreaChart-q7Xrveeh.js} +1 -1
- package/dist/client/assets/ArrowRight-CMDrgznR.js +1 -0
- package/dist/client/assets/{ArrowUp-DNZsq7Zt.js → ArrowUp-DH3o_6rV.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DZZygrAi.js → ArrowUpRight-ChAriHcE.js} +1 -1
- package/dist/client/assets/Check-CfdDVvTz.js +1 -0
- package/dist/client/assets/{CheckCircle-BEcdXH7-.js → CheckCircle-DLrShk9W.js} +1 -1
- package/dist/client/assets/{ChevronDown-BSRiDjXd.js → ChevronDown-BRbMyZ1B.js} +1 -1
- package/dist/client/assets/{ChevronRight-YmTewr_B.js → ChevronRight-Ck0jEpLN.js} +1 -1
- package/dist/client/assets/ChevronUp-BT9WG4FQ.js +1 -0
- package/dist/client/assets/{Copy01-BkGYkmm-.js → Copy01-Du_h2a2a.js} +1 -1
- package/dist/client/assets/{DotsVertical-BmTi7wpl.js → DotsVertical-DuorjQq1.js} +1 -1
- package/dist/client/assets/{Eye-B-ZfWIGj.js → Eye-IdG-7KTy.js} +1 -1
- package/dist/client/assets/{FilterLines-BwWG7tAk.js → FilterLines-VrXrRt9f.js} +1 -1
- package/dist/client/assets/{Globe01-D3vBqhI7.js → Globe01-FT_j78GO.js} +1 -1
- package/dist/client/assets/{Globe04-pvxBukgJ.js → Globe04-BktKmpI1.js} +1 -1
- package/dist/client/assets/{HardDrive-DutZPQFL.js → HardDrive-y6RDSyxS.js} +1 -1
- package/dist/client/assets/{Image01-PIeYnf-K.js → Image01-jwttKGpp.js} +1 -1
- package/dist/client/assets/{Key01-DhLD806C.js → Key01-CTHo646W.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BI-sXAac.js → LayoutLeft-DDdEDKm1.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DO3QnLus.js → LinkExternal01-Dw89NskH.js} +1 -1
- package/dist/client/assets/{Monitor01-BOILvS2u.js → Monitor01-D8aw2U1c.js} +1 -1
- package/dist/client/assets/{Package-DbEcG94t.js → Package-Bl4wI6gQ.js} +1 -1
- package/dist/client/assets/{Palette-CyZvWKmI.js → Palette-Bb5lq-lb.js} +1 -1
- package/dist/client/assets/{Play-B8fWmOst.js → Play-h_GYgW2i.js} +1 -1
- package/dist/client/assets/{Plus-2c1jULco.js → Plus-DW8HTiM4.js} +1 -1
- package/dist/client/assets/{SearchLg-XmvudKlH.js → SearchLg-CuxPI6CH.js} +1 -1
- package/dist/client/assets/{SearchMd-lwIiBODG.js → SearchMd-B_vHLGSV.js} +1 -1
- package/dist/client/assets/{Settings02-DMpqOK24.js → Settings02-DkDTX6wF.js} +1 -1
- package/dist/client/assets/{Shield01-gTFc9c17.js → Shield01-BTjWMfyt.js} +1 -1
- package/dist/client/assets/{Star01-DoUbKevt.js → Star01-IywRndO8.js} +1 -1
- package/dist/client/assets/{Stars01-CJsm_THn.js → Stars01-awBCSC7p.js} +1 -1
- package/dist/client/assets/{Stars02-B08FvcHQ.js → Stars02-CWszz6x7.js} +1 -1
- package/dist/client/assets/{Sun-nDXz4jeM.js → Sun-CKE25B6W.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Rgis0XWf.js → SwitchHorizontal01-mvedp9Fy.js} +1 -1
- package/dist/client/assets/{Tool01-BR3IBeV9.js → Tool01-CiB1AgGO.js} +1 -1
- package/dist/client/assets/{Tool02-B0-a0UMl.js → Tool02-DatlcCMD.js} +1 -1
- package/dist/client/assets/{Trash01-Ba6bCbNY.js → Trash01-BFrDxOoF.js} +1 -1
- package/dist/client/assets/{TrendUp01-CeRF_789.js → TrendUp01-CtjoH8ZL.js} +1 -1
- package/dist/client/assets/{Upload01-B14IruoN.js → Upload01-BbY627dR.js} +1 -1
- package/dist/client/assets/{User01-ByIE6k8L.js → User01-JYrKFpRC.js} +1 -1
- package/dist/client/assets/{Users01-BdldAr7H.js → Users01-C_vPeB-O.js} +1 -1
- package/dist/client/assets/{Users03-Bx4g7VTC.js → Users03-uSqerTaX.js} +1 -1
- package/dist/client/assets/{X-Dif5I5BD.js → X-BWhzmnUU.js} +1 -1
- package/dist/client/assets/XCircle-C1KpQxmr.js +1 -0
- package/dist/client/assets/{XClose-DomD4542.js → XClose-CVT1rN5P.js} +1 -1
- package/dist/client/assets/{Zap-CEUVQQOc.js → Zap-yAX2Kmmw.js} +1 -1
- package/dist/client/assets/{ZapSquare-EvC2T9CP.js → ZapSquare-BrF3B-Lj.js} +1 -1
- package/dist/client/assets/{ZoomOut-BprgOfkE.js → ZoomOut-HpkK_jz9.js} +1 -1
- package/dist/client/assets/{access-gate-NCJKEJqO.js → access-gate-DNuevEtG.js} +1 -1
- package/dist/client/assets/add-section-modal-WI9lCqFk.js +1 -0
- package/dist/client/assets/agent-icon-C6bqiv4x.js +1 -0
- package/dist/client/assets/agents-list-CE_MFd_Q.js +1 -0
- package/dist/client/assets/ai-providers-Mqj9mjNl.js +1 -0
- package/dist/client/assets/{alert-C_4AvGUo.js → alert-C26tfGUe.js} +1 -1
- package/dist/client/assets/{alert-dialog-DDtUbhoS.js → alert-dialog-BeSbCM7Y.js} +2 -2
- package/dist/client/assets/app-editor-YNDE1p_g.js +1 -0
- package/dist/client/assets/{auth-CsHQFHV_.js → auth-C9enaQvD.js} +1 -1
- package/dist/client/assets/{auth-catchall-_TQy6GDd.js → auth-catchall-v4deh7e8.js} +1 -1
- package/dist/client/assets/{auth-entry-_ePf9_J1.js → auth-entry-C5zoJOD9.js} +1 -1
- package/dist/client/assets/{auth-split-layout-D9UYTbxy.js → auth-split-layout-Fi3vrH81.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CEv4KtcH.js → authenticate-and-persist-oauth-pF30Ku2c.js} +1 -1
- package/dist/client/assets/{automation-list-row-CyDHI_uf.js → automation-list-row-CAdX-w7a.js} +1 -1
- package/dist/client/assets/{automation-runs-D8v8nlly.js → automation-runs-CA0Zbin0.js} +5 -5
- package/dist/client/assets/automations-B-DWN4QS.js +1 -0
- package/dist/client/assets/{autosend-BgYoPuWD.js → autosend-CxPf5RKw.js} +1 -1
- package/dist/client/assets/{avatar-BVdHZbMN.js → avatar-CMlDI2D-.js} +1 -1
- package/dist/client/assets/{badge-C_9mnuBd.js → badge-BIKuZNrQ.js} +1 -1
- package/dist/client/assets/{block-document-CcMdXbqY.js → block-document-BioV5ZZf.js} +1 -1
- package/dist/client/assets/{brand-context-B-nZCoNx.js → brand-context-BphHJ3m4.js} +1 -1
- package/dist/client/assets/buckets-DhtwEFa3.js +1 -0
- package/dist/client/assets/bulk-category-panel-ChriKUsA.js +1 -0
- package/dist/client/assets/{calendar-Bxkf6gvE.js → calendar-CcmR6PZG.js} +1 -1
- package/dist/client/assets/{capability-load-error-i6NCyxxk.js → capability-load-error-Bn3urkKl.js} +1 -1
- package/dist/client/assets/{card-C3gg1LtP.js → card-Dd8gUiG_.js} +1 -1
- package/dist/client/assets/category-editor-DI3VJHNG.js +1 -0
- package/dist/client/assets/{chat-context-DSveBxCg.js → chat-context-Bn6Q6CeX.js} +12 -12
- package/dist/client/assets/checkbox-D0oew71k.js +1 -0
- package/dist/client/assets/{cli-auth-success-Cc2B25iW.js → cli-auth-success-ejQ9leoQ.js} +1 -1
- package/dist/client/assets/collection-detail-BwkpwNjs.js +1 -0
- package/dist/client/assets/collection-display-button-C1K9dOzY.js +1 -0
- package/dist/client/assets/{collection-search-TcSAZpqK.js → collection-search-B_OixFPO.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-H4bzUKoO.js → collection-table-wrapper-CKE2AAdw.js} +1 -1
- package/dist/client/assets/{collection-tabs-CIRa_M2W.js → collection-tabs-BbylyFFO.js} +1 -1
- package/dist/client/assets/{command-3z1R7bvy.js → command-CBlINdWQ.js} +1 -1
- package/dist/client/assets/commerce-onboarding-DOHVN1dn.js +1 -0
- package/dist/client/assets/{companions-core-C68sN4Wc.js → companions-core-CBtA8C2P.js} +1 -1
- package/dist/client/assets/connect-B_w51Pf2.js +8 -0
- package/dist/client/assets/connect-desktop-dialog-CS8xcpUf.js +1 -0
- package/dist/client/assets/{connection-card-D_K36Swx.js → connection-card-DgbR5Mwx.js} +1 -1
- package/dist/client/assets/connection-detail-BOoPBRpC.js +1 -0
- package/dist/client/assets/{connection-form-helpers-DyOAEqE9.js → connection-form-helpers-DKOWpJ-1.js} +1 -1
- package/dist/client/assets/connections-C4oqxMQG.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-CEQrv8Fn.js → decopilot-sse-pool-D92X3fNc.js} +1 -1
- package/dist/client/assets/{dialog-DUqhzGiD.js → dialog-a73gSkG2.js} +1 -1
- package/dist/client/assets/{domain-settings-CRIqu0Bs.js → domain-settings-DkMlfYSa.js} +1 -1
- package/dist/client/assets/{drawer-DvhdIHph.js → drawer-BU_sOAKq.js} +1 -1
- package/dist/client/assets/dropdown-menu-QheVZMJA.js +1 -0
- package/dist/client/assets/{empty-state-BHuw6cM9.js → empty-state-CMGZe-XE.js} +1 -1
- package/dist/client/assets/{extract-connection-data-_NDoBHMa.js → extract-connection-data-DB1JAVkl.js} +1 -1
- package/dist/client/assets/file-explorer-BjIj9REP.js +2 -0
- package/dist/client/assets/{file-type-icon-BOCZKON3.js → file-type-icon-D7Qv-wcj.js} +1 -1
- package/dist/client/assets/{files-CelFf8dg.js → files-BSWFZOxo.js} +1 -1
- package/dist/client/assets/{form-C9InGmo4.js → form-hOrojcOx.js} +1 -1
- package/dist/client/assets/general-CNP1ZbZe.js +1 -0
- package/dist/client/assets/{github-repo-picker-Biy9UFu8.js → github-repo-picker-BlPGLfgP.js} +1 -1
- package/dist/client/assets/{hooks-DU-2h9eZ.js → hooks-Ck4NS0BB.js} +1 -1
- package/dist/client/assets/index-B5Jok_EG.js +1 -0
- package/dist/client/assets/index-B7jBuFkn.css +1 -0
- package/dist/client/assets/index-BK8i2815.js +1 -0
- package/dist/client/assets/{index-f6gbzJ8b.js → index-BPUUTwje.js} +1 -1
- package/dist/client/assets/{index-DBhNC4I_.js → index-BZIMlfJW.js} +1 -1
- package/dist/client/assets/{index-DnrPO2j2.js → index-Bm76WXPR.js} +1 -1
- package/dist/client/assets/{index-DmhdwAgP.js → index-CIFSbzEF.js} +14 -14
- package/dist/client/assets/{index-BOgwoJjn.js → index-CISUQ4JK.js} +1 -1
- package/dist/client/assets/{index-CbhDnqOu.js → index-CSvkeXqd.js} +1 -1
- package/dist/client/assets/{index-Du80fsxC.js → index-Cotl-Dca.js} +5 -5
- package/dist/client/assets/index-CufVwosA.js +8 -0
- package/dist/client/assets/{index-CO3868Cu.js → index-D1R93mn_.js} +1 -1
- package/dist/client/assets/{index-DivFugQC.js → index-DPgVKNjM.js} +1 -1
- package/dist/client/assets/{index-nNhZx5bw.js → index-QQfVHF6c.js} +14 -14
- package/dist/client/assets/{index-Cs6hIS7C.js → index-UORAMw49.js} +3 -3
- package/dist/client/assets/{index-redirect-hJFu02mm.js → index-redirect-B3FtJ7Sm.js} +1 -1
- package/dist/client/assets/{input-TkvVVsQL.js → input-COKCWjWn.js} +1 -1
- package/dist/client/assets/{integration-icon-CWb3OXTV.js → integration-icon-8ogu7iqA.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BA1mFY2X.js → invite-member-dialog-BSRSJdKr.js} +1 -1
- package/dist/client/assets/{label-CB2o7dZ2.js → label-BCtHDi1-.js} +1 -1
- package/dist/client/assets/{layout-CqMMMVMm.js → layout-D82AWRF8.js} +1 -1
- package/dist/client/assets/{login-B0EX352Z.js → login-CmLx6gdY.js} +1 -1
- package/dist/client/assets/{mcp-oauth-B5rKpHdd.js → mcp-oauth-C4qKLSfa.js} +1 -1
- package/dist/client/assets/members-CdsfSF6n.js +1 -0
- package/dist/client/assets/{monaco-editor-DfuNvLfy.js → monaco-editor-1CxGfHM9.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-B43TP1bq.js → monitoring-stats-row-CJ1mx9EI.js} +1 -1
- package/dist/client/assets/{multi-select-DhXl88EK.js → multi-select-vlgbaYWz.js} +1 -1
- package/dist/client/assets/{oauth-callback-CZ8I3e9V.js → oauth-callback-Dd9QqvGA.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BiKjtCpj.js → oauth-callback-ai-provider-LKEqTcag.js} +1 -1
- package/dist/client/assets/{onboarding-U4YqP9I9.js → onboarding-Nyzpe9OQ.js} +1 -1
- package/dist/client/assets/{org-install-BYDat95r.js → org-install-CAemO7c_.js} +1 -1
- package/dist/client/assets/{org-layout-CVqWtNQa.js → org-layout-CYeMTDG5.js} +1 -1
- package/dist/client/assets/{organization-choice-CkG6QFWH.js → organization-choice-Bzsmy-ch.js} +1 -1
- package/dist/client/assets/orgs-C7gQBiuA.js +1 -0
- package/dist/client/assets/{page-seo-form-8ToiuKnD.js → page-seo-form-DPU2cMFP.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Cxffc7Ri.js +1 -0
- package/dist/client/assets/{popover-DwV6WXHS.js → popover-MfTivQME.js} +1 -1
- package/dist/client/assets/post-editor-CzEfCRc6.js +1 -0
- package/dist/client/assets/{primitives-RdkZFzQM.js → primitives-CVKcZIrh.js} +1 -1
- package/dist/client/assets/profile-CZryQHJW.js +1 -0
- package/dist/client/assets/project-app-view-KvrG1kMx.js +1 -0
- package/dist/client/assets/record-editor-DXTrMUwZ.js +1 -0
- package/dist/client/assets/redirect-editor-Dk0CLnfu.js +1 -0
- package/dist/client/assets/{registry-layout-C2NoRJs0.js → registry-layout-t2McDRi7.js} +3 -3
- package/dist/client/assets/registry-tfN1hupx.js +2 -0
- package/dist/client/assets/{reports-J4B5GOoc.js → reports-C-ToD_ro.js} +2 -2
- package/dist/client/assets/{require-capability-DnfzULDW.js → require-capability-rAgzBn6-.js} +1 -1
- package/dist/client/assets/{required-auth-layout-ABsqitxw.js → required-auth-layout-KO0-1qXO.js} +1 -1
- package/dist/client/assets/{reset-password-CbrThkFS.js → reset-password-D1ZwK8Ps.js} +1 -1
- package/dist/client/assets/roles-B_p27MMh.js +1 -0
- package/dist/client/assets/{search-input-B-RkAjzQ.js → search-input-U68dcFxI.js} +1 -1
- package/dist/client/assets/secrets-Dw7rULfb.js +1 -0
- package/dist/client/assets/{sections-editor-BW9cZUKJ.js → sections-editor-BG6Wp1nc.js} +2 -2
- package/dist/client/assets/select-mGmKPAXK.js +1 -0
- package/dist/client/assets/{select-model-BAk08l-M.js → select-model-DTW46aHa.js} +1 -1
- package/dist/client/assets/self-tool-result-DYhJcSqy.js +1 -0
- package/dist/client/assets/seo-editor-BGid8G-R.js +1 -0
- package/dist/client/assets/settings-layout-BZgySvrP.js +1 -0
- package/dist/client/assets/{settings-section-CNVe03BK.js → settings-section-BrZlvNfy.js} +1 -1
- package/dist/client/assets/{shell-controls-5d4ZCRmi.js → shell-controls-nL7hKmbL.js} +1 -1
- package/dist/client/assets/{shell-layout-6KUu0MA6.js → shell-layout-wwtr-wuO.js} +1 -1
- package/dist/client/assets/{sidebar-DnKMI8jz.js → sidebar-BssgvH2v.js} +1 -1
- package/dist/client/assets/{skeleton-xDZ5Iwb8.js → skeleton-bahy-09d.js} +1 -1
- package/dist/client/assets/sso-lxqjliao.js +1 -0
- package/dist/client/assets/{store-BoCHTDSB.js → store-Cu8mkiNg.js} +1 -1
- package/dist/client/assets/store-registry-_FBAHxHd.js +2 -0
- package/dist/client/assets/{studio-tools-DIWsVaKg.js → studio-tools-DvzlcJzu.js} +1 -1
- package/dist/client/assets/{switch-DS9vYGS-.js → switch-ChtDpIb1.js} +1 -1
- package/dist/client/assets/{table-DnoPpUup.js → table-ClDYVeNV.js} +1 -1
- package/dist/client/assets/{tabs-2srR2H7A.js → tabs-Byd14nsc.js} +1 -1
- package/dist/client/assets/{textarea-DjtAtA2l.js → textarea-Duro92xh.js} +1 -1
- package/dist/client/assets/{toggle-group-DGvoaiio.js → toggle-group--i6PYyQg.js} +1 -1
- package/dist/client/assets/{toolbar-CvkbyWaX.js → toolbar-C7-EzPT_.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Cr-N30KB.js → toolbar-icon-button-VdYqoEpj.js} +1 -1
- package/dist/client/assets/{tooltip-cvFTpZ9W.js → tooltip-B6N5kQd7.js} +1 -1
- package/dist/client/assets/{use-ai-providers-ZLuBEaKb.js → use-ai-providers-kGXTar-o.js} +1 -1
- package/dist/client/assets/use-api-keys-DFJm_Sct.js +1 -0
- package/dist/client/assets/{use-automations-COcieFX-.js → use-automations-lLiWCOOl.js} +1 -1
- package/dist/client/assets/{use-autosave-C46oRXRb.js → use-autosave-BHdnAdy7.js} +1 -1
- package/dist/client/assets/{use-capability-3dRU8tE2.js → use-capability-n8ljqiDB.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BzcS25hV.js → use-clock-tick-CEJuEsd_.js} +1 -1
- package/dist/client/assets/{use-collections-DaXoNaLL.js → use-collections-B-IkeUFK.js} +1 -1
- package/dist/client/assets/{use-connection-DM1ROgj3.js → use-connection-DpPEk8aM.js} +1 -1
- package/dist/client/assets/{use-copy-DC217syR.js → use-copy-DkMO92nk.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Clu62lnk.js → use-create-virtual-mcp-DCIBpgEW.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DYog9M6N.js → use-debounced-autosave-bRNiU42w.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CSp0_yRg.js → use-debounced-value-DMJgrRLy.js} +1 -1
- package/dist/client/assets/use-deco-credits-CipyX0UT.js +1 -0
- package/dist/client/assets/{use-decopilot-events-CX_EuT5c.js → use-decopilot-events-BlazccAI.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CxGr7t4A.js → use-delete-connection-BvPMAZ_W.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-C6-1CBki.js → use-deployment-admin-CXmYBDRU.js} +1 -1
- package/dist/client/assets/{use-file-configs-DASxzk9O.js → use-file-configs-39QQNDS5.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-XidGSyic.js → use-infinite-scroll-DVSx3Rq1.js} +1 -1
- package/dist/client/assets/{use-join-requests-CjypbTMc.js → use-join-requests-DAnhRtlt.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BpAt0IbR.js → use-mcp-auth-status-BMkT9EZ9.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DseZ3Mea.js → use-mcp-client-CJ_CTOi-.js} +4 -4
- package/dist/client/assets/{use-mcp-tools-DJGNLf9H.js → use-mcp-tools-CS9HoteL.js} +1 -1
- package/dist/client/assets/{use-members-CncY3QG2.js → use-members-CgnYyzxD.js} +1 -1
- package/dist/client/assets/{use-mobile-D8w2xyip.js → use-mobile-48jgjwiy.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-YScxPu5L.js → use-navigate-to-agent-BuwUdTe3.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DjREcL_I.js → use-org-auth-client-C7loj_lF.js} +1 -1
- package/dist/client/assets/{use-org-sso-diAgeADE.js → use-org-sso-Bs00unXo.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BuFi-QNO.js → use-organization-roles-DZJy3wYG.js} +1 -1
- package/dist/client/assets/{use-organization-settings-bBY4klS6.js → use-organization-settings-lcyinZ9M.js} +1 -1
- package/dist/client/assets/{use-registry-app-Cy7ipz7c.js → use-registry-app-MQ7-Pl5L.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BZ0Z0jCg.js → use-registry-connections-By2otvi-.js} +1 -1
- package/dist/client/assets/{use-secrets-q_kPvC5B.js → use-secrets-BgDsFD4-.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DG0Zyz9B.js → use-status-sounds-Lt_bZnJO.js} +1 -1
- package/dist/client/assets/{use-t-BjZG1zRp.js → use-t-DfEf5oHx.js} +1 -1
- package/dist/client/assets/{use-view-mode-B02hzmMj.js → use-view-mode-DAFf8-q-.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-urYy02xb.js → use-virtual-mcp-GqxJcvwl.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-2fWwANBn.js +1 -0
- package/dist/client/assets/{useRouterState-C7tRHRC7.js → useRouterState-C7j1zaEX.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BFB3UBwe.js +1 -0
- package/dist/client/assets/{users-CZVOiXsq.js → users-WIzFyPzI.js} +1 -1
- package/dist/client/assets/variant-calendar-BmeiXwwQ.js +1 -0
- package/dist/client/assets/{view-mode-toggle-DziN7a9n.js → view-mode-toggle-zUY6pa7X.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +488 -488
- package/dist/server/server.js +313 -313
- package/package.json +1 -1
- package/dist/client/assets/ChevronUp-D5F6V6Tm.js +0 -1
- package/dist/client/assets/XCircle-C0OdV3N_.js +0 -1
- package/dist/client/assets/add-section-modal-DBjaDtzc.js +0 -1
- package/dist/client/assets/agent-icon-DicjSkHu.js +0 -1
- package/dist/client/assets/agents-list-Bt1R4ueI.js +0 -1
- package/dist/client/assets/ai-providers-TK1CCOpK.js +0 -1
- package/dist/client/assets/app-editor-ptKJtHHM.js +0 -1
- package/dist/client/assets/automations-BoSNNWPc.js +0 -1
- package/dist/client/assets/buckets-DcRE1RUQ.js +0 -1
- package/dist/client/assets/bulk-category-panel-BkJQrEio.js +0 -1
- package/dist/client/assets/category-editor-CaGAyBNX.js +0 -1
- package/dist/client/assets/checkbox-Ba2-hx8r.js +0 -1
- package/dist/client/assets/collection-detail-D9ZCPDhA.js +0 -1
- package/dist/client/assets/collection-display-button-D_kIgil2.js +0 -1
- package/dist/client/assets/commerce-onboarding-DbQ0hYyA.js +0 -1
- package/dist/client/assets/connect-desktop-dialog-DEEL81vf.js +0 -1
- package/dist/client/assets/connection-detail-CKGrDl_p.js +0 -1
- package/dist/client/assets/connections-BJO0R_-8.js +0 -1
- package/dist/client/assets/dropdown-menu-D5BTIZvH.js +0 -1
- package/dist/client/assets/file-explorer-CUr9mfMv.js +0 -2
- package/dist/client/assets/general-DlHL1tW3.js +0 -1
- package/dist/client/assets/index-629FAmzK.js +0 -1
- package/dist/client/assets/index-BQK4XWOD.js +0 -2
- package/dist/client/assets/index-Cb_X1LK0.js +0 -1
- package/dist/client/assets/index-oE__K1ye.css +0 -1
- package/dist/client/assets/members-Ds_Onv02.js +0 -1
- package/dist/client/assets/orgs-B4DrO8iC.js +0 -1
- package/dist/client/assets/page-seo-sheet-BTyypxho.js +0 -1
- package/dist/client/assets/post-editor-j9JAXwQN.js +0 -1
- package/dist/client/assets/profile-DwVJzm_R.js +0 -1
- package/dist/client/assets/project-app-view-e40sJb24.js +0 -1
- package/dist/client/assets/record-editor-BBPLTix7.js +0 -1
- package/dist/client/assets/redirect-editor-C8EDxpmx.js +0 -1
- package/dist/client/assets/registry-CFSvMZwJ.js +0 -2
- package/dist/client/assets/roles-BqueMkJJ.js +0 -1
- package/dist/client/assets/secrets-CEZOniOS.js +0 -1
- package/dist/client/assets/select-AzuoAc3H.js +0 -1
- package/dist/client/assets/self-tool-result-C94YNykg.js +0 -1
- package/dist/client/assets/seo-editor-CR8P7sfk.js +0 -1
- package/dist/client/assets/settings-layout-9yQD_m0n.js +0 -1
- package/dist/client/assets/sso-DNsZ7Hie.js +0 -1
- package/dist/client/assets/store-registry-WZUtBjlh.js +0 -2
- package/dist/client/assets/use-deco-credits-Bm6Hzrca.js +0 -1
- package/dist/client/assets/useInfiniteQuery-nK_JPgM8.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-_ObcRUnC.js +0 -1
- package/dist/client/assets/variant-calendar-DibyF3zD.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as s,l as C}from"./index-
|
|
1
|
+
import{c as k,j as s,l as C}from"./index-CIFSbzEF.js";import{e as S,d as R,a as T,T as H,b as L,c as z}from"./table-ClDYVeNV.js";import{i as D,n as E}from"./ArrowUp-DH3o_6rV.js";function I(y){const e=k.c(29),{columns:r,data:f,sortKey:x,sortDirection:u,onSort:i,onRowClick:n,rowClassName:c}=y;let p;e[0]!==u?(p=function(t,h){return s.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&u&&(u==="asc"?s.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):s.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=u,e[1]=p):p=e[1];const b=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=d):d=e[2];const a=d;let l;if(e[3]!==r||e[4]!==i||e[5]!==b||e[6]!==x){let o;e[8]!==r.length||e[9]!==i||e[10]!==b||e[11]!==x?(o=(t,h)=>{const N=x===t.id;return s.jsx(S,{className:C(a(h,r.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),onClick:t.sortable&&i?()=>i(t.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&b(t.id,N)]})},t.id)},e[8]=r.length,e[9]=i,e[10]=b,e[11]=x,e[12]=o):o=e[12],l=r.map(o),e[3]=r,e[4]=i,e[5]=b,e[6]=x,e[7]=l}else l=e[7];let g;e[13]!==l?(g=s.jsx(R,{className:"border-b-0",children:s.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:l})}),e[13]=l,e[14]=g):g=e[14];let j;if(e[15]!==r||e[16]!==f||e[17]!==n||e[18]!==c){let o;e[20]!==r||e[21]!==n||e[22]!==c?(o=(t,h)=>{const N=c?.(t);return s.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",n?"cursor-pointer":"",N),onClick:n?()=>n(t):void 0,children:r.map(m=>s.jsx(H,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:s.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(t):m.accessor?m.accessor(t):null})},m.id))},h)},e[20]=r,e[21]=n,e[22]=c,e[23]=o):o=e[23],j=f.map(o),e[15]=r,e[16]=f,e[17]=n,e[18]=c,e[19]=j}else j=e[19];let w;e[24]!==j?(w=s.jsx(L,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==g||e[27]!==w?(v=s.jsxs(z,{className:"w-full border-collapse",children:[g,w]}),e[26]=g,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(12),{columns:r,data:f,isLoading:x,sortKey:u,sortDirection:i,onSort:n,onRowClick:c,emptyState:p}=y;if(x===void 0?!1:x){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=a):a=e[0],a}if(f.length===0){let a;e[1]!==p?(a=p||s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=p,e[2]=a):a=e[2];let l;return e[3]!==a?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:a}),e[3]=a,e[4]=l):l=e[4],l}let d;return e[5]!==r||e[6]!==f||e[7]!==c||e[8]!==n||e[9]!==i||e[10]!==u?(d=s.jsx("div",{className:"flex-1",children:s.jsx(I,{columns:r,data:f,sortKey:u,sortDirection:i,onSort:n,onRowClick:c})}),e[5]=r,e[6]=f,e[7]=c,e[8]=n,e[9]=i,e[10]=u,e[11]=d):d=e[11],d}export{B as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,l as u,j as m}from"./index-
|
|
1
|
+
import{c as f,l as u,j as m}from"./index-CIFSbzEF.js";import{B as g}from"./badge-BIKuZNrQ.js";function h(x){const e=f.c(12),{tabs:c,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==c){let l;e[6]!==n||e[7]!==s?(l=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,l as i,j as n}from"./index-
|
|
1
|
+
import{c as d,l as i,j as n}from"./index-CIFSbzEF.js";import{_ as m}from"./index-D1R93mn_.js";import{e as k,a as N,h as j,D as w,d as y}from"./dialog-a73gSkG2.js";import{i as b}from"./SearchMd-B_vHLGSV.js";function C(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(w,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(y,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(b,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,B as f,S as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as E,j as n,u as Ie,o as De,p as se,r as M,a as Se,b as Fe,q as qe,d as Te,s as Le,Q as He,E as Ve,K as _e,v as Ue,B as je,N as Be}from"./index-CIFSbzEF.js";import{L as Ke,s as ve,S as Pe,a as Ne,b as Ce,c as be,i as Qe,n as pe,C as we,p as xe}from"./self-tool-result-DYhJcSqy.js";import{A as We}from"./auth-entry-C5zoJOD9.js";import{A as Ge}from"./auth-split-layout-Fi3vrH81.js";import{O as Re}from"./organization-choice-Bzsmy-ch.js";import{I as Ye}from"./input-COKCWjWn.js";import{S as Je,u as Xe,W as Ze,g as et,a as tt}from"./use-mcp-client-CJ_CTOi-.js";import{i as it}from"./ArrowRight-CMDrgznR.js";import"./integration-icon-8ogu7iqA.js";import"./Tool02-DatlcCMD.js";import"./agent-icon-C6bqiv4x.js";import"./AlertCircle-C1QMMByE.js";import"./Tool01-CiB1AgGO.js";import"./ArrowUp-DH3o_6rV.js";import"./Settings02-DkDTX6wF.js";import"./ArrowUpRight-ChAriHcE.js";import"./TrendUp01-CtjoH8ZL.js";import"./ZapSquare-BrF3B-Lj.js";import"./ZoomOut-HpkK_jz9.js";import"./Users03-uSqerTaX.js";import"./CheckCircle-DLrShk9W.js";import"./Check-CfdDVvTz.js";import"./ChevronDown-BRbMyZ1B.js";import"./ChevronRight-Ck0jEpLN.js";import"./ChevronUp-BT9WG4FQ.js";import"./DotsVertical-DuorjQq1.js";import"./Stars02-CWszz6x7.js";import"./Copy01-Du_h2a2a.js";import"./Globe01-FT_j78GO.js";import"./Eye-IdG-7KTy.js";import"./FilterLines-VrXrRt9f.js";import"./Star01-IywRndO8.js";import"./Globe04-BktKmpI1.js";import"./SwitchHorizontal01-mvedp9Fy.js";import"./HardDrive-y6RDSyxS.js";import"./Image01-jwttKGpp.js";import"./Key01-CTHo646W.js";import"./LayoutLeft-DDdEDKm1.js";import"./XCircle-C1KpQxmr.js";import"./LinkExternal01-Dw89NskH.js";import"./Monitor01-D8aw2U1c.js";import"./Sun-CKE25B6W.js";import"./Package-Bl4wI6gQ.js";import"./Palette-Bb5lq-lb.js";import"./Play-h_GYgW2i.js";import"./Plus-DW8HTiM4.js";import"./SearchLg-CuxPI6CH.js";import"./SearchMd-B_vHLGSV.js";import"./Shield01-BTjWMfyt.js";import"./Stars01-awBCSC7p.js";import"./Trash01-BFrDxOoF.js";import"./Upload01-BbY627dR.js";import"./User01-JYrKFpRC.js";import"./Users01-C_vPeB-O.js";import"./XClose-CVT1rN5P.js";import"./X-BWhzmnUU.js";import"./Zap-yAX2Kmmw.js";import"./dialog-a73gSkG2.js";import"./tooltip-B6N5kQd7.js";import"./companions-core-CBtA8C2P.js";import"./extract-connection-data-DB1JAVkl.js";import"./github-repo-scope-DjMZbiKa.js";import"./form-hOrojcOx.js";import"./label-BCtHDi1-.js";import"./use-debounced-value-DMJgrRLy.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./authenticate-and-persist-oauth-pF30Ku2c.js";import"./mcp-oauth-C4qKLSfa.js";import"./auth-C9enaQvD.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-CMlDI2D-.js";const nt={workspace:"Preparando seu workspace de commerce...",generic:"Preparando..."};function ot(l){return nt[l]}function ye(l){const e=E.c(4),{variant:i}=l;let t;e[0]!==i?(t=ot(i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:n.jsx(Ke,{label:t,className:"text-muted-foreground"})}),e[2]=t,e[3]=s):s=e[3],s}function Pi(){const l=E.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(st,{}),l[0]=e):e=l[0],e}const Me=M.createContext(null),$e=()=>M.useContext(Me);function R(l){const e=E.c(13);let i,t;e[0]!==l?({visual:t,...i}=l,e[0]=l,e[1]=i,e[2]=t):(i=e[1],t=e[2]);let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/commerce-onboarding"},e[3]=s):s=e[3];const c=Ie(s),{data:a}=Se.useSession(),o=a?.user?.email;let m;e[4]!==c.siteUrl||e[5]!==o?(m=Ce({siteUrl:c.siteUrl,email:o}),e[4]=c.siteUrl,e[5]=o,e[6]=m):m=e[6];const d=m;let u;e[7]!==d||e[8]!==t?(u=t??n.jsx(be,{href:d}),e[7]=d,e[8]=t,e[9]=u):u=e[9];let v;return e[10]!==i||e[11]!==u?(v=n.jsx(Ge,{...i,visual:u}),e[10]=i,e[11]=u,e[12]=v):v=e[12],v}const rt={signUpFailed:"Falha ao criar conta",signInFailed:"Falha ao entrar",authenticationFailed:"Falha na autenticação",resetEmailFailed:"Não foi possível enviar o e-mail de redefinição",otpSendFailed:"Não foi possível enviar o código",invalidCode:"Código inválido",invalidEmail:"E-mail inválido",invalidEmailOrPassword:"E-mail ou senha inválidos. Tente novamente.",accountExists:"Já existe uma conta com este e-mail. Tente entrar em vez de criar uma nova conta.",networkError:"Erro de rede. Verifique sua conexão e tente novamente.",tooManyAttempts:"Muitas tentativas. Aguarde um momento e tente novamente.",invalidOrExpiredCode:"Código inválido ou expirado. Tente novamente.",genericError:"Algo deu errado. Tente novamente.",resetPasswordTitle:"Redefinir sua senha",verificationCodeTitle:"Informe o código de verificação",welcomeTitle:"Bem-vindo à deco",resetPasswordSubtitle:"Enviaremos um link de redefinição",codeSentTo:l=>`Código enviado para ${l}`,defaultSubtitle:"Entre ou crie uma nova conta",resetEmailSent:"Verifique seu e-mail para redefinir a senha.",continueWith:l=>`Continuar com ${l}`,divider:"ou",emailLabel:"E-mail",emailPlaceholder:"Endereço de e-mail",sending:"Enviando...",sendCode:"Enviar código",verificationCodeLabel:"Código de verificação",enterCodePlaceholder:"Informe o código",verifying:"Verificando...",verify:"Verificar",useDifferentEmail:"Usar outro e-mail",sendResetLink:"Enviar link de redefinição",nameLabel:"Nome",namePlaceholder:"Seu nome",passwordLabel:"Senha",forgotPassword:"Esqueceu a senha?",creatingAccount:"Criando conta...",signingIn:"Entrando...",continue:"Continuar",backToSignIn:"Voltar para entrar",signInWithPassword:"Entrar com senha",alreadyHaveAccount:"Já tem uma conta? ",dontHaveAccount:"Não tem uma conta? ",signIn:"Entrar",signUp:"Criar conta",signInWithEmailCode:"Entrar com código por e-mail"};function Oe(l){switch(l){case"Enter a website URL.":return"Informe a URL de um site.";case"Use an HTTP or HTTPS website URL.":return"Use uma URL de site HTTP ou HTTPS.";case"Enter a valid website URL.":return"Informe uma URL de site válida.";default:return l}}let ze=!1;function st(){const l=Ie({from:"/commerce-onboarding"}),{org:e,siteUrl:i}=l,t=ve(i);return!ze&&De()&&(ze=!0,se("commerce_onboarding_viewed",{site_url:i,domain:t??void 0,...t?{$set:{last_scanned_domain:t}}:{}})),n.jsx(Me.Provider,{value:t,children:n.jsx(at,{requestedOrgSlug:e,siteUrl:i})})}function at(l){const e=E.c(8),{requestedOrgSlug:i,siteUrl:t}=l,{data:s,isPending:c}=Se.useSession(),a=$e();if(c){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(R,{children:n.jsx(ye,{variant:"generic"})}),e[0]=m):m=e[0],m}if(!s){const m=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let d;e[1]!==a?(d=a?n.jsx(Pe,{host:a}):void 0,e[1]=a,e[2]=d):d=e[2];let u;return e[3]!==d?(u=n.jsx(R,{children:n.jsx(We,{callbackUrl:m,allowAutoLogin:!1,title:"Desbloqueie seu diagnóstico completo",subtitle:null,brand:d,copy:rt})}),e[3]=d,e[4]=u):u=e[4],u}let o;return e[5]!==i||e[6]!==t?(o=n.jsx(lt,{requestedOrgSlug:i,siteUrl:t}),e[5]=i,e[6]=t,e[7]=o):o=e[7],o}function lt(l){const e=E.c(43),{requestedOrgSlug:i,siteUrl:t}=l,s=Fe(),c=qe(),[a,o]=M.useState(null),[m,d]=M.useState(null),u=c.data?.map(mt)??[];let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={mutationFn:ct,retry:!1,onSuccess:r=>{d(r)}},e[0]=v):v=e[0];const p=Te(v);if(c.isPending){let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(R,{children:n.jsx(ye,{variant:"workspace"})}),e[1]=r):r=e[1],r}if(c.error){let r;return e[2]!==c?(r=n.jsx(ae,{title:"Não foi possível carregar suas organizações",description:"Tente novamente para continuar a configuração de commerce nesta página.",actionLabel:"Tentar novamente",onRetry:()=>c.refetch()}),e[2]=c,e[3]=r):r=e[3],r}const j=i?u.find(r=>r.slug===i):null;if(j){let r;return e[4]!==j||e[5]!==t?(r=n.jsx(re,{org:j,initialSiteUrl:t}),e[4]=j,e[5]=t,e[6]=r):r=e[6],r}if(i){let r;return e[7]!==c?(r=n.jsx(ae,{title:"Organização não encontrada",description:"Não conseguimos encontrar essa organização na sua conta.",actionLabel:"Tentar novamente",onRetry:()=>c.refetch()}),e[7]=c,e[8]=r):r=e[8],r}if(a){let r;return e[9]!==a||e[10]!==t?(r=n.jsx(re,{org:a,initialSiteUrl:t}),e[9]=a,e[10]=t,e[11]=r):r=e[11],r}if(u.length===1&&u[0]){let r;return e[12]!==u[0]||e[13]!==t?(r=n.jsx(re,{org:u[0],initialSiteUrl:t}),e[12]=u[0],e[13]=t,e[14]=r):r=e[14],r}if(u.length>1){let r;e[15]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(k,{title:"Escolha uma organização",description:"Selecione onde o diagnóstico de commerce deve continuar."}),e[15]=r):r=e[15];let h;e[16]!==s||e[17]!==t?(h=O=>s({to:"/commerce-onboarding",search:{org:O.slug,siteUrl:t}}),e[16]=s,e[17]=t,e[18]=h):h=e[18];let C;return e[19]!==u||e[20]!==h?(C=n.jsx(R,{children:n.jsxs("div",{className:"grid gap-10",children:[r,n.jsx(Ne,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:n.jsx(Re,{organizations:u,selectLabel:"Continuar",onSelected:h})})]})}),e[19]=u,e[20]=h,e[21]=C):C=e[21],C}if(!m){let r;e[22]!==p?(r=()=>{p.reset(),p.mutate()},e[22]=p,e[23]=r):r=e[23];let h;return e[24]!==p||e[25]!==r?(h=n.jsx(dt,{mutation:p,onRetry:r}),e[24]=p,e[25]=r,e[26]=h):h=e[26],h}const g=m;if(g?.success&&(g.status==="created"||g.status==="joined"||g.status==="already_has_organization")&&g.organization){let r;return e[27]!==g.organization||e[28]!==t?(r=n.jsx(re,{org:g.organization,initialSiteUrl:t}),e[27]=g.organization,e[28]=t,e[29]=r):r=e[29],r}if(g?.status==="ambiguous"&&g.organizations&&g.organizations.length>0){let r;e[30]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(k,{title:"Escolha uma organização",description:"Seu e-mail pode acessar mais de uma organização. Escolha onde a configuração de commerce deve continuar."}),e[30]=r):r=e[30];const h=g.domain??void 0;let C;e[31]!==s||e[32]!==t?(C=($,P)=>{Le(),o({...$,slug:P}),s({to:"/commerce-onboarding",search:{org:P,siteUrl:t}})},e[31]=s,e[32]=t,e[33]=C):C=e[33];let O;return e[34]!==g.organizations||e[35]!==h||e[36]!==C?(O=n.jsx(R,{children:n.jsxs("div",{className:"grid gap-10",children:[r,n.jsx(Ne,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:n.jsx(Re,{organizations:g.organizations,domain:h,onJoined:C})})]})}),e[34]=g.organizations,e[35]=h,e[36]=C,e[37]=O):O=e[37],O}const S=g?.error??"Não conseguimos determinar uma organização de commerce para esta conta.";let _;e[38]!==p?(_=()=>{d(null),p.reset()},e[38]=p,e[39]=_):_=e[39];let I;return e[40]!==S||e[41]!==_?(I=n.jsx(ae,{title:"O onboarding de commerce precisa de suporte",description:S,actionLabel:"Tentar novamente",onRetry:_}),e[40]=S,e[41]=_,e[42]=I):I=e[42],I}async function ct(){const e=await(await fetch("/api/auth/custom/ensure-organization",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).json();return e.success&&(e.status==="created"||e.status==="joined"||e.status==="already_has_organization")&&e.organization&&Le(),e}function mt(l){return{id:l.id,name:l.name,slug:l.slug,logo:l.logo??null}}function dt(l){const e=E.c(7),{mutation:i,onRetry:t}=l,s=M.useRef(!1);let c;e[0]!==i?(c=d=>{!d||s.current||(s.current=!0,i.mutate())},e[0]=i,e[1]=c):c=e[1];const a=c;if(i.error){let d;return e[2]!==t?(d=n.jsx(ae,{title:"Onboarding de commerce indisponível",description:"Não foi possível preparar uma organização para a configuração de commerce. Tente novamente por esta página ou fale com o suporte.",actionLabel:"Tentar novamente",onRetry:t}),e[2]=t,e[3]=d):d=e[3],d}let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ye,{variant:"generic"}),e[4]=o):o=e[4];let m;return e[5]!==a?(m=n.jsx(R,{children:n.jsx("div",{ref:a,children:o})}),e[5]=a,e[6]=m):m=e[6],m}function k(l){const e=E.c(8),{title:i,description:t}=l,s=$e();let c;e[0]!==s?(c=s?n.jsx(Pe,{host:s}):n.jsxs("div",{children:[n.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),n.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=s,e[1]=c):c=e[1];let a;e[2]!==t||e[3]!==i?(a=(i||t)&&n.jsxs("div",{className:"space-y-2",children:[i&&n.jsx("h1",{className:"text-2xl font-medium leading-8",children:i}),t&&n.jsx("p",{className:"text-base text-muted-foreground leading-6",children:t})]}),e[2]=t,e[3]=i,e[4]=a):a=e[4];let o;return e[5]!==c||e[6]!==a?(o=n.jsxs("div",{className:"grid gap-10",children:[c,a]}),e[5]=c,e[6]=a,e[7]=o):o=e[7],o}function ae(l){const e=E.c(9),{title:i,description:t,actionLabel:s,onRetry:c}=l;let a;e[0]!==t||e[1]!==i?(a=n.jsx(k,{title:i,description:t}),e[0]=t,e[1]=i,e[2]=a):a=e[2];let o;e[3]!==s||e[4]!==c?(o=n.jsx(je,{type:"button",size:"xl",className:"w-full",onClick:c,children:s}),e[3]=s,e[4]=c,e[5]=o):o=e[5];let m;return e[6]!==a||e[7]!==o?(m=n.jsx(R,{children:n.jsxs("div",{className:"grid gap-10",children:[a,o]})}),e[6]=a,e[7]=o,e[8]=m):m=e[8],m}function re(l){const e=E.c(11),{org:i,initialSiteUrl:t}=l,{data:s}=Se.useSession(),c=s?.user?.email;let a;e[0]!==t||e[1]!==c?(a=Ce({siteUrl:t,email:c}),e[0]=t,e[1]=c,e[2]=a):a=e[2];const o=a;let m;e[3]!==o||e[4]!==i.id?(m=n.jsx(be,{href:o,orgId:i.id}),e[3]=o,e[4]=i.id,e[5]=m):m=e[5];const d=m;let u;return e[6]!==t||e[7]!==d||e[8]!==i||e[9]!==s?.user?.email?(u=n.jsx(He,{children:v=>{const{reset:p}=v;return n.jsx(Ve,{fallback:j=>{const{error:g,resetError:S}=j;return n.jsx(R,{visual:d,children:n.jsx(ut,{orgName:i.name,message:g instanceof Error?g.message:"Não foi possível verificar a configuração do Commerce Discovery.",onRetry:()=>{p(),S()}})})},children:n.jsx(M.Suspense,{fallback:n.jsx(ke,{visual:d}),children:n.jsx(ft,{org:i,initialSiteUrl:t,sessionEmail:s?.user?.email},`${i.id}:${t??""}`)})})}}),e[6]=t,e[7]=d,e[8]=i,e[9]=s?.user?.email,e[10]=u):u=e[10],u}function ke(l){const e=E.c(3),{visual:i}=l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[n.jsx(k,{}),n.jsx(we,{})]}),e[0]=t):t=e[0];let s;return e[1]!==i?(s=n.jsx(R,{align:"fill",visual:i,children:t}),e[1]=i,e[2]=s):s=e[2],s}function ut(l){const e=E.c(10),{orgName:i,message:t,onRetry:s}=l,c=`A configuração de commerce continuará em ${i}.`;let a;e[0]!==c?(a=n.jsx(k,{title:"Diagnóstico de commerce",description:c}),e[0]=c,e[1]=a):a=e[1];let o;e[2]!==t?(o=n.jsx(le,{message:t}),e[2]=t,e[3]=o):o=e[3];let m;e[4]!==s?(m=n.jsx(je,{type:"button",size:"xl",className:"w-full",onClick:s,children:"Tentar novamente"}),e[4]=s,e[5]=m):m=e[5];let d;return e[6]!==a||e[7]!==o||e[8]!==m?(d=n.jsxs("div",{className:"grid gap-10",children:[a,o,m]}),e[6]=a,e[7]=o,e[8]=m,e[9]=d):d=e[9],d}function ft(l){const e=E.c(109),{org:i,initialSiteUrl:t,sessionEmail:s}=l;let c;e[0]!==i.id||e[1]!==i.slug?(c={connectionId:Je,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=c):c=e[2];const a=Xe(c),[o,m]=M.useState(t??""),[d,u]=M.useState(null),v=M.useRef(!1),p=Ze.COMMERCE_DISCOVERY(i.id),j=et(i.id),g=_e.commerceDiscoveryConnection(i.id,p);let S;e[3]!==p||e[4]!==a?(S=async()=>{const f=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:p}});return xe(f)},e[3]=p,e[4]=a,e[5]=S):S=e[5];let _;e[6]!==g||e[7]!==S?(_={queryKey:g,queryFn:S,retry:!1},e[6]=g,e[7]=S,e[8]=_):_=e[8];const I=Ue(_),r=_e.commerceDiscoveryVirtualMcp(i.id,j);let h;e[9]!==a||e[10]!==j?(h=async()=>{const f=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:j}});return xe(f)},e[9]=a,e[10]=j,e[11]=h):h=e[11];let C;e[12]!==r||e[13]!==h?(C={queryKey:r,queryFn:h,retry:!1},e[12]=r,e[13]=h,e[14]=C):C=e[14];const O=Ue(C);let $;e[15]!==a?($=async f=>{const x=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:f}});return xe(x)},e[15]=a,e[16]=$):$=e[16];let P;e[17]!==I||e[18]!==i.id||e[19]!==O?(P=(f,x)=>{se("commerce_onboarding_setup_succeeded",{domain:ve(x)??void 0,organization_id:i.id}),u(null),I.refetch(),O.refetch()},e[17]=I,e[18]=i.id,e[19]=O,e[20]=P):P=e[20];let A;e[21]!==i.id?(A=(f,x)=>{se("commerce_onboarding_setup_failed",{domain:ve(x)??void 0,organization_id:i.id,error:f instanceof Error?f.message:String(f)}),u(f instanceof Error?f.message:"A configuração do Commerce Discovery falhou.")},e[21]=i.id,e[22]=A):A=e[22];let Q;e[23]!==A||e[24]!==$||e[25]!==P?(Q={mutationFn:$,retry:!1,onSuccess:P,onError:A},e[23]=A,e[24]=$,e[25]=P,e[26]=Q):Q=e[26];const b=Te(Q),Ae=!!I.data.item&&!!O.data.item,Ee=I.data.item,W=typeof Ee?.metadata?.siteUrl=="string"?Ee.metadata.siteUrl:void 0,ce=t||o||"";let G;e[27]!==W||e[28]!==ce?(G=Qe(ce,W),e[27]=W,e[28]=ce,e[29]=G):G=e[29];const Y=Ae&&G,J=t||o||W||"";let X;e[30]!==J||e[31]!==s?(X=Ce({siteUrl:J,email:s}),e[30]=J,e[31]=s,e[32]=X):X=e[32];const me=X;let Z;e[33]!==me||e[34]!==i.id?(Z=n.jsx(be,{href:me,orgId:i.id}),e[33]=me,e[34]=i.id,e[35]=Z):Z=e[35];const y=Z;let ee;e[36]!==b?(ee=f=>{const x=pe(f);if(!x.ok){u(Oe(x.error));return}u(null),b.mutate(x.value)},e[36]=b,e[37]=ee):ee=e[37];const D=ee;let te;e[38]!==t||e[39]!==D||e[40]!==Y?(te=f=>{!f||v.current||Y||!t||(v.current=!0,D(t))},e[38]=t,e[39]=D,e[40]=Y,e[41]=te):te=e[41];const de=te;let ie;e[42]!==i.id||e[43]!==D||e[44]!==o?(ie=f=>{f.preventDefault();const x=pe(o);x.ok&&se("commerce_onboarding_site_url_submitted",{domain:new URL(x.value).hostname,organization_id:i.id}),D(o)},e[42]=i.id,e[43]=D,e[44]=o,e[45]=ie):ie=e[45];const z=ie;if(Y){const f=i.slug;let x;e[46]===Symbol.for("react.memo_cache_sentinel")?(x=crypto.randomUUID(),e[46]=x):x=e[46];let T;e[47]!==i.slug?(T={org:f,taskId:x},e[47]=i.slug,e[48]=T):T=e[48];let U;e[49]!==i.id?(U=tt(i.id),e[49]=i.id,e[50]=U):U=e[50];const L=J||void 0;let N;e[51]!==U.id||e[52]!==L?(N={virtualmcpid:U.id,connect:"1",siteUrl:L},e[51]=U.id,e[52]=L,e[53]=N):N=e[53];let w;return e[54]!==T||e[55]!==N?(w=n.jsx(Be,{to:"/$org/$taskId",params:T,search:N,replace:!0}),e[54]=T,e[55]=N,e[56]=w):w=e[56],w}if(b.isPending){let f;return e[57]!==y?(f=n.jsx(ke,{visual:y}),e[57]=y,e[58]=f):f=e[58],f}if(t){let f,x;if(e[59]!==y||e[60]!==z||e[61]!==t||e[62]!==d||e[63]!==i.name||e[64]!==b.isPending||e[65]!==o){x=Symbol.for("react.early_return_sentinel");e:if(f=pe(t),!f.ok){const fe=`A configuração de commerce continuará em ${i.name}.`;let V;e[68]!==fe?(V=n.jsx(k,{title:"Diagnóstico de commerce",description:fe}),e[68]=fe,e[69]=V):V=e[69];const ge=n.jsx(le,{message:Oe(f.error)});let B;e[70]!==z||e[71]!==d||e[72]!==b.isPending||e[73]!==o?(B=n.jsx(he,{siteUrl:o,error:d,isSubmitting:b.isPending,onSiteUrlChange:m,onSubmit:z}),e[70]=z,e[71]=d,e[72]=b.isPending,e[73]=o,e[74]=B):B=e[74];let K;e[75]!==V||e[76]!==ge||e[77]!==B?(K=n.jsxs("div",{className:"grid gap-10",children:[V,ge,B]}),e[75]=V,e[76]=ge,e[77]=B,e[78]=K):K=e[78];let oe;e[79]!==y||e[80]!==K?(oe=n.jsx(R,{visual:y,children:K}),e[79]=y,e[80]=K,e[81]=oe):oe=e[81],x=oe;break e}e[59]=y,e[60]=z,e[61]=t,e[62]=d,e[63]=i.name,e[64]=b.isPending,e[65]=o,e[66]=f,e[67]=x}else f=e[66],x=e[67];if(x!==Symbol.for("react.early_return_sentinel"))return x;const T=`O Commerce Discovery está sendo preparado para ${f.value}.`;let U;e[82]!==T?(U=n.jsx(k,{title:"Diagnóstico de commerce",description:T}),e[82]=T,e[83]=U):U=e[83];let L;e[84]!==z||e[85]!==d||e[86]!==b.isPending||e[87]!==o?(L=d?n.jsxs(n.Fragment,{children:[n.jsx(le,{message:d}),n.jsx(he,{siteUrl:o,error:null,isSubmitting:b.isPending,onSiteUrlChange:m,onSubmit:z})]}):n.jsx(we,{}),e[84]=z,e[85]=d,e[86]=b.isPending,e[87]=o,e[88]=L):L=e[88];let N;e[89]!==U||e[90]!==L||e[91]!==de?(N=n.jsxs("div",{ref:de,className:"grid gap-10",children:[U,L]}),e[89]=U,e[90]=L,e[91]=de,e[92]=N):N=e[92];let w;return e[93]!==y||e[94]!==N?(w=n.jsx(R,{visual:y,children:N}),e[93]=y,e[94]=N,e[95]=w):w=e[95],w}const ue=`A configuração de commerce continuará em ${i.name}.`;let F;e[96]!==ue?(F=n.jsx(k,{title:"Diagnóstico de commerce",description:ue}),e[96]=ue,e[97]=F):F=e[97];let q;e[98]!==z||e[99]!==d||e[100]!==b.isPending||e[101]!==o?(q=n.jsx(he,{siteUrl:o,error:d,isSubmitting:b.isPending,onSiteUrlChange:m,onSubmit:z}),e[98]=z,e[99]=d,e[100]=b.isPending,e[101]=o,e[102]=q):q=e[102];let H;e[103]!==F||e[104]!==q?(H=n.jsxs("div",{className:"grid gap-10",children:[F,q]}),e[103]=F,e[104]=q,e[105]=H):H=e[105];let ne;return e[106]!==y||e[107]!==H?(ne=n.jsx(R,{visual:y,children:H}),e[106]=y,e[107]=H,e[108]=ne):ne=e[108],ne}function he(l){const e=E.c(20),{siteUrl:i,error:t,isSubmitting:s,onSiteUrlChange:c,onSubmit:a}=l;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:"URL do site"}),e[0]=o):o=e[0];let m;e[1]!==c?(m=_=>c(_.target.value),e[1]=c,e[2]=m):m=e[2];const d=!!t;let u;e[3]!==s||e[4]!==i||e[5]!==m||e[6]!==d?(u=n.jsx(Ye,{id:"commerce-site-url",type:"text",inputMode:"url",value:i,onChange:m,placeholder:"https://example.com","aria-invalid":d,disabled:s}),e[3]=s,e[4]=i,e[5]=m,e[6]=d,e[7]=u):u=e[7];let v;e[8]!==t?(v=t?n.jsx(le,{message:t}):null,e[8]=t,e[9]=v):v=e[9];let p;e[10]!==u||e[11]!==v?(p=n.jsxs("div",{className:"grid gap-2",children:[o,u,v]}),e[10]=u,e[11]=v,e[12]=p):p=e[12];let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(it,{size:16}),e[13]=j):j=e[13];let g;e[14]!==s?(g=n.jsxs(je,{type:"submit",size:"xl",className:"w-full",disabled:s,children:["Continuar",j]}),e[14]=s,e[15]=g):g=e[15];let S;return e[16]!==a||e[17]!==p||e[18]!==g?(S=n.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[p,g]}),e[16]=a,e[17]=p,e[18]=g,e[19]=S):S=e[19],S}function le(l){const e=E.c(2),{message:i}=l;let t;return e[0]!==i?(t=n.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:i}),e[0]=i,e[1]=t):t=e[1],t}export{Pi as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as m}from"./extract-connection-data-
|
|
1
|
+
import{b as m}from"./extract-connection-data-DB1JAVkl.js";import{a as g}from"./github-repo-scope-DjMZbiKa.js";function I(n){const e=n.properties;if(!e)return[];const t=[];for(const[r,i]of Object.entries(e)){const a=i?.properties?.__type?.const;typeof a=="string"&&a.length>0&&t.push({fieldKey:r,bindingType:a})}return t}const N=[{fieldKey:"vtex",bindingType:"vtex"},{fieldKey:"ga4",bindingType:"google-analytics"},{fieldKey:"gsc",bindingType:"google-search-console"},{fieldKey:"github",bindingType:"github"}];function S(n,e){const t=[];if(n.length&&t.push({field:["id"],operator:"in",value:n}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function w(n){const e=n;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??n}function R(n,e,t,r){return{...n??{},[e]:{__type:t,value:r}}}function p(n){return n==null?!1:typeof n=="string"?n.trim().length>0:typeof n=="number"||typeof n=="boolean"?!0:Array.isArray(n)?n.some(p):typeof n=="object"?Object.entries(n).some(([e,t])=>!e.startsWith("__")&&p(t)):!1}function h(n){const e={accountName:"Nome da conta",appKey:"App Key",appToken:"App Token",propertyId:"Propriedade",siteUrl:"Site"};return e[n]?e[n]:n.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function b(n){return p(n)?typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):JSON.stringify(n):null}function B(n){return n?Object.entries(n).flatMap(([e,t])=>{if(e.startsWith("__"))return[];const r=b(t);return r?[{key:e,label:h(e),value:r}]:[]}):[]}function O({autoOpenFieldKey:n,card:e}){return n===e.fieldKey&&e.satisfied&&!!e.linkedConnectionId}function _(n,e,t){const r=n.filter(i=>(i.app_name===e||!!t&&i.app_id===t)&&g(i)===null);return r.length===0?null:(r.sort((i,o)=>{const s=a=>a.status==="active"?0:1;return s(i)!==s(o)?s(i)-s(o):(o.updated_at??"").localeCompare(i.updated_at??"")}),r[0].id)}function C(n){return n.server?.icons?.[0]?.src??m(n.server?.repository)??null}function T(n,e){const t=n._meta?.["mcp.mesh"];return t?.friendlyName||t?.friendly_name||n.title||n.server?.title||n.server?.name||e}function E(n){const e=[],t=new Map(n.connections.map(r=>[r.id,r]));for(const r of n.requirements){const i=n.curated[r.bindingType],o=i?n.itemsById[i.registryAppId]:n.itemsByName[r.bindingType];if(!o)continue;const s=n.configurationState?.[r.fieldKey]?.value,a=s?t.get(s):void 0,u=s&&a?s:null,d=u?n.connectionReadiness?.[u]!==!1:!1,c=!!u&&d,l=c?void 0:n.saBindings?.[r.bindingType],f=c||!!l,y=c?"oauth":l?"sa":null;e.push({fieldKey:r.fieldKey,bindingType:r.bindingType,registryItem:o,title:T(o,r.bindingType),icon:C(o),headline:i?.headline??o._meta?.["mcp.mesh"]?.short_description??null,area:i?.area??null,bullets:i?.bullets??[],satisfied:f,candidateConnectionId:f?null:u||_(n.connections,r.bindingType,i?.registryAppId),linkedConnectionId:u,configurationState:a?.configuration_state??null,boundVia:y,boundResource:l?.resource??null})}return e}function U(n,e){if(!n)return null;const t=i=>{const o=i.startsWith("sc-domain:")?i.substring(10):(()=>{try{return new URL(i.startsWith("http")?i:`https://${i}`).hostname}catch{return null}})();return o===null?i:o.startsWith("www.")?o.substring(4):o},r=t(n);for(const i of e)if(t(i.siteUrl)===r)return i.siteUrl;return null}function W(n){return(n?.response?.accountSummaries??[]).map(r=>({account:r.account,options:(r.propertySummaries??[]).map(i=>({value:i.property,label:`${i.displayName} (${r.displayName})`}))}))}export{N as F,E as a,S as b,R as c,B as g,U as m,I as p,O as s,W as t,w as u};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{c as k,j as s,B as C,C as H,r as U,x as Y,t as K}from"./index-CIFSbzEF.js";import{A as J,b as V}from"./alert-C26tfGUe.js";import{C as X}from"./card-Dd8gUiG_.js";import{b as T,T as L,c as B,a as D}from"./tabs-Byd14nsc.js";import{u as O}from"./use-copy-DkMO92nk.js";import{i as I}from"./Check-CfdDVvTz.js";import{a as M}from"./Copy01-Du_h2a2a.js";import{i as q}from"./Key01-CTHo646W.js";import{n as Q}from"./LinkExternal01-Dw89NskH.js";import{s as Z}from"./Trash01-BFrDxOoF.js";import{P as A}from"./index-BZIMlfJW.js";import{c as ee}from"./settings-section-BrZlvNfy.js";import{a as te,m as se,u as re,b as ne,d as ie}from"./use-api-keys-DFJm_Sct.js";import"./sidebar-BssgvH2v.js";import"./LayoutLeft-DDdEDKm1.js";import"./use-mobile-48jgjwiy.js";import"./X-BWhzmnUU.js";import"./tooltip-B6N5kQd7.js";import"./ArrowUpRight-ChAriHcE.js";import"./use-mcp-client-CJ_CTOi-.js";import"./auth-C9enaQvD.js";function ae({client:e,mode:t,url:i,apiKey:a}){const o=a??"<paste-your-api-key>",l=te();if(e==="claude-code")return t==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${l} ${i}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${l} ${i} \\
|
|
2
|
+
--header "Authorization: Bearer ${o}"`};if(e==="cursor"){const n={url:i};return t==="api-key"&&(n.headers={Authorization:`Bearer ${o}`}),{language:"json",pathHint:"~/.cursor/mcp.json",code:JSON.stringify({mcpServers:{[l]:n}},null,2)}}if(e==="codex"){const n=[`[mcp_servers.${l}]`,`url = "${i}"`];return t==="api-key"&&n.push(`http_headers = { "Authorization" = "Bearer ${o}" }`),{language:"toml",pathHint:"~/.codex/config.toml",code:n.join(`
|
|
3
|
+
`)}}if(e==="claude-desktop"){const n={type:"http",url:i};return t==="api-key"&&(n.headers={Authorization:`Bearer ${o}`}),{language:"json",pathHint:"claude_desktop_config.json",code:JSON.stringify({mcpServers:{[l]:n}},null,2)}}return t==="oauth"?{language:"text",code:`${i}
|
|
4
|
+
|
|
5
|
+
# OAuth: clients that support MCP OAuth 2.1 will discover
|
|
6
|
+
# the auth flow via the WWW-Authenticate header on 401.`}:{language:"text",code:`${i}
|
|
7
|
+
|
|
8
|
+
Authorization: Bearer ${o}`}}function R(e){const t=k.c(23),{client:i,mode:a,url:o,apiKey:l}=e;let n;t[0]!==l||t[1]!==i||t[2]!==a||t[3]!==o?(n=ae({client:i,mode:a,url:o,apiKey:l}),t[0]=l,t[1]=i,t[2]=a,t[3]=o,t[4]=n):n=t[4];const c=n,{handleCopy:m,copied:f}=O(),d=c.pathHint??c.language;let r;t[5]!==d?(r=s.jsx("span",{className:"text-[11px] text-muted-foreground font-medium uppercase tracking-wider",children:d}),t[5]=d,t[6]=r):r=t[6];let u;t[7]!==m||t[8]!==c.code?(u=()=>m(c.code),t[7]=m,t[8]=c.code,t[9]=u):u=t[9];let x;t[10]!==f?(x=f?s.jsx(I,{size:14}):s.jsx(M,{size:14}),t[10]=f,t[11]=x):x=t[11];let p;t[12]!==u||t[13]!==x?(p=s.jsx(C,{variant:"ghost",size:"icon",className:"size-7 shrink-0",onClick:u,"aria-label":"Copy snippet",children:x}),t[12]=u,t[13]=x,t[14]=p):p=t[14];let h;t[15]!==r||t[16]!==p?(h=s.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-border",children:[r,p]}),t[15]=r,t[16]=p,t[17]=h):h=t[17];let g;t[18]!==c.code?(g=s.jsx("pre",{className:"p-3 text-xs overflow-x-auto font-mono",children:s.jsx("code",{children:c.code})}),t[18]=c.code,t[19]=g):g=t[19];let y;return t[20]!==h||t[21]!==g?(y=s.jsxs("div",{className:"relative rounded-md border border-border bg-muted/40",children:[h,g]}),t[20]=h,t[21]=g,t[22]=y):y=t[22],y}const z="Connect: ",E=[{id:"claude-code",label:"Claude Code"},{id:"cursor",label:"Cursor"},{id:"codex",label:"Codex"},{id:"claude-desktop",label:"Claude Desktop"},{id:"raw",label:"Raw URL"}];function W(e){return E.find(t=>t.id===e)?.label??e}function oe(){return typeof window>"u"?"unknown":window.location.hostname}function G(e){const t=k.c(8),{text:i}=e,{handleCopy:a,copied:o}=O();let l;t[0]!==a||t[1]!==i?(l=()=>a(i),t[0]=a,t[1]=i,t[2]=l):l=t[2];let n;t[3]!==o?(n=o?s.jsx(I,{size:14}):s.jsx(M,{size:14}),t[3]=o,t[4]=n):n=t[4];let c;return t[5]!==l||t[6]!==n?(c=s.jsx(C,{variant:"ghost",size:"icon",className:"size-7 shrink-0",onClick:l,"aria-label":"Copy",children:n}),t[5]=l,t[6]=n,t[7]=c):c=t[7],c}function le(e){const t=k.c(16),{client:i,url:a,newKey:o,onGenerate:l,isGenerating:n,onClearNewKey:c}=e;let m;t[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsxs(T,{children:[s.jsx(B,{value:"oauth",children:"OAuth"}),s.jsx(B,{value:"api-key",children:"API key"})]}),t[0]=m):m=t[0];let f;t[1]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Recommended for your laptop. Browser will open on first use to sign in — no token to manage."}),t[1]=f):f=t[1];let d;t[2]!==i||t[3]!==a?(d=s.jsxs(L,{value:"oauth",className:"mt-3 space-y-3",children:[f,s.jsx(R,{client:i,mode:"oauth",url:a})]}),t[2]=i,t[3]=a,t[4]=d):d=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("p",{className:"text-xs text-muted-foreground",children:"For CI, Conductor, or headless agents that can't open a browser."}),t[5]=r):r=t[5];let u;t[6]!==i||t[7]!==n||t[8]!==o||t[9]!==c||t[10]!==l||t[11]!==a?(u=s.jsxs(L,{value:"api-key",className:"mt-3 space-y-3",children:[r,o?s.jsxs(s.Fragment,{children:[s.jsxs(J,{variant:"warning",className:"text-xs",children:[s.jsx(Y,{}),s.jsx(V,{children:"Copy this snippet now — the key won't be shown again. You can revoke it later from the list below."})]}),s.jsx(R,{client:i,mode:"api-key",url:a,apiKey:o}),s.jsx(C,{variant:"ghost",size:"sm",onClick:c,className:"text-xs",children:"Done, hide key"})]}):s.jsxs(s.Fragment,{children:[s.jsx(R,{client:i,mode:"api-key",url:a}),s.jsxs(C,{size:"sm",onClick:l,disabled:n,className:"gap-1.5",children:[s.jsx(q,{size:14}),n?"Generating…":`Generate key for ${W(i)}`]})]})]}),t[6]=i,t[7]=n,t[8]=o,t[9]=c,t[10]=l,t[11]=a,t[12]=u):u=t[12];let x;return t[13]!==d||t[14]!==u?(x=s.jsxs(D,{defaultValue:"oauth",className:"mt-4",children:[m,d,u]}),t[13]=d,t[14]=u,t[15]=x):x=t[15],x}function ce(){const e=k.c(16),{data:t,isLoading:i,error:a}=ne(),o=ie();let l,n,c;if(e[0]!==t||e[1]!==o||e[2]!==a||e[3]!==i){c=Symbol.for("react.early_return_sentinel");e:{const f=t?.filter(ue)??[];if(i){let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading active keys…"}),e[7]=r):r=e[7],c=r;break e}if(a){let r;e[8]!==a.message?(r=s.jsxs("p",{className:"text-xs text-destructive",children:["Failed to load keys: ",a.message]}),e[8]=a.message,e[9]=r):r=e[9],c=r;break e}if(f.length===0){let r;e[10]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("p",{className:"text-xs text-muted-foreground",children:"No connect keys minted yet. Generate one from a client tab above for headless setups."}),e[10]=r):r=e[10],c=r;break e}l="divide-y divide-border rounded-md border border-border";let d;e[11]!==o?(d=r=>s.jsxs("li",{className:"flex items-center justify-between gap-3 px-3 py-2 text-xs",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("div",{className:"font-medium truncate",children:r.name.replace(z,"")}),s.jsxs("div",{className:"text-muted-foreground",children:["Created ",new Date(r.createdAt).toLocaleDateString()]})]}),s.jsxs(C,{variant:"ghost",size:"sm",onClick:()=>{confirm(`Revoke "${r.name}"? Any client still using this key will lose access.`)&&o.mutate(r.id,{onSuccess:me,onError:de})},disabled:o.isPending,className:"gap-1 text-destructive hover:text-destructive",children:[s.jsx(Z,{size:14}),"Revoke"]})]},r.id),e[11]=o,e[12]=d):d=e[12],n=f.map(d)}e[0]=t,e[1]=o,e[2]=a,e[3]=i,e[4]=l,e[5]=n,e[6]=c}else l=e[4],n=e[5],c=e[6];if(c!==Symbol.for("react.early_return_sentinel"))return c;let m;return e[13]!==l||e[14]!==n?(m=s.jsx("ul",{className:l,children:n}),e[13]=l,e[14]=n,e[15]=m):m=e[15],m}function de(e){return K.error(e.message)}function me(){return K.success("Key revoked")}function ue(e){return e.name.startsWith(z)}function xe(){const e=k.c(29),{org:t}=H();let i;e[0]!==t.slug?(i=se(t.slug),e[0]=t.slug,e[1]=i):i=e[1];const a=i,o=re();let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l={},e[2]=l):l=e[2];const[n,c]=U.useState(l);let m;e[3]!==o?(m=j=>{const P=`${z}${W(j)} on ${oe()}`;o.mutate({name:P,permissions:{"*":["*"]}},{onSuccess:$=>{c(F=>({...F,[j]:$.key})),K.success("Key created")},onError:pe})},e[3]=o,e[4]=m):m=e[4];const f=m,d=`${a}/.well-known/oauth-protected-resource`;let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(A.Title,{children:"Connect to clients"}),e[5]=r):r=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"size-9 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground shrink-0",children:s.jsx(Q,{size:18})}),e[6]=u):u=e[6];let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs("div",{className:"flex items-start gap-3",children:[u,s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:"Your org's unified MCP"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1 leading-snug",children:"Plug this URL into any MCP client to give that runtime every connection enabled in this org, governed by your Decopilot rules."})]})]}),e[7]=x):x=e[7];let p;e[8]!==a?(p=s.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border bg-muted/40 px-3 py-1.5",children:[s.jsx("code",{className:"text-xs flex-1 truncate",children:a}),s.jsx(G,{text:a})]}),e[8]=a,e[9]=p):p=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("summary",{className:"cursor-pointer hover:text-foreground",children:"Wiring a custom client?"}),e[10]=h):h=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("p",{children:"OAuth 2.1 Protected Resource Metadata is advertised on 401:"}),e[11]=g):g=e[11];let y;e[12]!==d?(y=s.jsxs("details",{className:"text-xs text-muted-foreground",children:[h,s.jsxs("div",{className:"mt-2 space-y-1",children:[g,s.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border bg-background px-2 py-1",children:[s.jsx("code",{className:"text-[11px] flex-1 truncate",children:d}),s.jsx(G,{text:d})]})]})]}),e[12]=d,e[13]=y):y=e[13];let b;e[14]!==p||e[15]!==y?(b=s.jsxs(X,{className:"p-5 gap-3",children:[x,p,y]}),e[14]=p,e[15]=y,e[16]=b):b=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(T,{variant:"underline",children:E.map(fe)}),e[17]=_):_=e[17];let v;e[18]!==o||e[19]!==f||e[20]!==n||e[21]!==a?(v=E.map(j=>s.jsx(L,{value:j.id,children:s.jsx(le,{client:j.id,url:a,newKey:n[j.id]??null,onGenerate:()=>f(j.id),isGenerating:o.isPending&&o.variables?.name?.startsWith(`${z}${j.label}`)===!0,onClearNewKey:()=>c(P=>{const $={...P};return delete $[j.id],$})})},j.id)),e[18]=o,e[19]=f,e[20]=n,e[21]=a,e[22]=v):v=e[22];let N;e[23]!==v?(N=s.jsxs(D,{defaultValue:"claude-code",variant:"underline",children:[_,v]}),e[23]=v,e[24]=N):N=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsxs("section",{className:"flex flex-col gap-3",children:[s.jsxs("div",{className:"px-4",children:[s.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:"Active keys"}),s.jsx("p",{className:"text-sm text-muted-foreground leading-snug mt-1",children:"Keys you've generated for headless clients. Revoke any time."})]}),s.jsx(ce,{})]}),e[25]=w):w=e[25];let S;return e[26]!==b||e[27]!==N?(S=s.jsx(A,{children:s.jsx(A.Content,{children:s.jsx(A.Body,{children:s.jsxs(ee,{children:[r,b,N,w]})})})}),e[26]=b,e[27]=N,e[28]=S):S=e[28],S}function fe(e){return s.jsx(B,{value:e.id,variant:"underline",children:e.label},e.id)}function pe(e){return K.error(e.message)}function Ge(){const e=k.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(xe,{}),e[0]=t):t=e[0],t}export{Ge as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as C,j as t,r as y,B as M,l as j}from"./index-CIFSbzEF.js";import{a as D,h as S,D as I,d as R,e as T}from"./dialog-a73gSkG2.js";import{u as _,S as A}from"./chat-context-Bn6Q6CeX.js";import{i as B}from"./Check-CfdDVvTz.js";import{a as E}from"./Copy01-Du_h2a2a.js";function N(n){const e=C.c(3),{size:l}=n,o=l===void 0?16:l;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=i):i=e[0];let s;return e[1]!==o?(s=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:i}),e[1]=o,e[2]=s):s=e[2],s}function w(n){const e=C.c(3),{size:l}=n,o=l===void 0?16:l;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=i):i=e[0];let s;return e[1]!==o?(s=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:i}),e[1]=o,e[2]=s):s=e[2],s}const $={"claude-code":{label:"Claude Code",Icon:N},codex:{label:"Codex",Icon:w}};function Y(n){return(n&&$[n])??null}const L="bunx decocms@latest link",k=[{capability:"claude-code",label:"Claude Code",description:"Runs through the Claude Code CLI",icon:t.jsx(N,{size:18})},{capability:"codex",label:"Codex",description:"Runs through the Codex CLI",icon:t.jsx(w,{size:18})}];function q(n){return k.filter(e=>n.includes(e.capability)).map(e=>e.label)}function F(n){const e=C.c(23),{open:l,onOpenChange:o}=n;let i;e[0]!==l?(i={fast:l},e[0]=l,e[1]=i):i=e[1];const s=_(i),[h,v]=y.useState(!1),z=s.hostname??s.machineId??"Your desktop",g=s.online?`Connected to ${z}`:"Connect your desktop";let a;e[2]!==g?(a=t.jsx(D,{children:g}),e[2]=g,e[3]=a):a=e[3];const b=s.online?"This machine provides the following local agents.":"Run this command in your desktop terminal. The dialog will close once your desktop is online.";let c;e[4]!==b?(c=t.jsx(S,{children:b}),e[4]=b,e[5]=c):c=e[5];let r;e[6]!==a||e[7]!==c?(r=t.jsxs(I,{children:[a,c]}),e[6]=a,e[7]=c,e[8]=r):r=e[8];let d;e[9]!==h||e[10]!==s.online?(d=!s.online&&t.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[t.jsx("span",{className:"flex-1",children:L}),t.jsx(M,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(L),v(!0),setTimeout(()=>v(!1),1500)},children:h?t.jsx(B,{size:14}):t.jsx(E,{size:14})})]}),e[9]=h,e[10]=s.online,e[11]=d):d=e[11];let m;e[12]!==s.capabilities||e[13]!==s.online?(m=s.online?t.jsx("div",{className:"flex flex-col gap-3 text-sm",children:t.jsx("div",{className:"flex flex-col gap-2",children:k.map(x=>{const f=s.capabilities.includes(x.capability);return t.jsxs("div",{className:j("flex items-center gap-3 rounded-md border px-3 py-2",f?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[t.jsx("div",{className:j("flex size-6 items-center justify-center",f?"text-foreground":"text-muted-foreground"),children:x.icon}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium",children:x.label}),t.jsx("p",{className:"text-xs text-muted-foreground",children:f?x.description:"Not detected"})]}),t.jsx("span",{className:j("size-2 rounded-full",f?"bg-success":"bg-muted-foreground/30")})]},x.capability)})})}):t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsx(A,{size:"sm"}),"Waiting for desktop…"]}),e[12]=s.capabilities,e[13]=s.online,e[14]=m):m=e[14];let u;e[15]!==r||e[16]!==d||e[17]!==m?(u=t.jsxs(R,{className:"sm:max-w-md",children:[r,d,m]}),e[15]=r,e[16]=d,e[17]=m,e[18]=u):u=e[18];let p;return e[19]!==o||e[20]!==l||e[21]!==u?(p=t.jsx(T,{open:l,onOpenChange:o,children:u}),e[19]=o,e[20]=l,e[21]=u,e[22]=p):p=e[22],p}export{F as C,N as a,w as b,Y as l,q as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,C as $,aY as L,K as k,l as w,j as I}from"./index-
|
|
1
|
+
import{c as M,C as $,aY as L,K as k,l as w,j as I}from"./index-CIFSbzEF.js";import{u as D}from"./use-registry-connections-By2otvi-.js";import{c as K}from"./use-organization-settings-lcyinZ9M.js";import{S as E,j as Q}from"./use-mcp-client-CJ_CTOi-.js";import{u as F}from"./useInfiniteQuery-2fWwANBn.js";import{i as H,f as Y}from"./extract-connection-data-DB1JAVkl.js";import{r as q,R as G}from"./retry-CErkP7V6.js";import{g as T}from"./connection-slug-eyAPH6o3.js";import{C as U}from"./card-Dd8gUiG_.js";import{I as V}from"./integration-icon-8ogu7iqA.js";function ue(){const s=M.c(6),e=D(),t=K(),a=$().project.enabledPlugins??[];let o;if(s[0]!==a||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=r=>t(r.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(X),a.includes("private-registry")&&t(E)&&o.push({id:E,title:"Private Registry",icon:null}),s[0]=a,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function X(s){return{id:s.id,title:s.title,icon:s.icon}}const z=24,_=3;function A(s){return s.id.includes("community-registry")}function B(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(a=>t.map(o=>({field:o,operator:"contains",value:a})))}}function S(s,e,t,a,o){const l=s.map(u=>u.id).sort().join(","),r=B(o),{data:p,fetchNextPage:d,hasNextPage:m,isFetchingNextPage:g,isLoading:C}=F({queryKey:k.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:u})=>{const n=u??{};return await Promise.all(s.map(async i=>{const h=n[i.id];if(h==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=H(i.id,e);try{return await q(async()=>{let f=null;try{f=await Q({connectionId:i.id,orgId:e,orgSlug:t});const x={limit:z};h&&(x.cursor=h),r&&(x.where=r);const N=await f.callTool({name:j,arguments:x}),v=N.structuredContent??N,P=v.nextCursor||v.cursor||void 0,b=Y(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:b,nextCursor:P}}finally{await f?.close().catch(()=>{})}},{maxAttempts:_,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(f){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${_} attempts:`,f instanceof G?f.cause:f),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:u=>{const n={};let c=!1;for(const i of u)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,c=!0):n[i.registryId]="EXHAUSTED");return c?n:void 0},staleTime:3600*1e3,placeholderData:L,retry:!1,enabled:s.length>0}),y=[];if(p?.pages)for(const u of p.pages)for(const n of u)for(const c of n.items)y.push({...c,_sourceName:c._sourceName??n.registryTitle,_sourceIcon:c._sourceIcon??n.registryIcon,_registryId:c._registryId??n.registryId});return{items:y,hasMore:m??!1,isLoadingMore:g,isInitialLoading:C,fetchNextPage:()=>{m&&!g&&d()}}}function fe(s,e){const t=M.c(16),{org:a}=$();let o;t[0]!==s?(o=s.filter(Z),t[0]=s,t[1]=o):o=t[1];const l=o;let r;t[2]!==s?(r=s.filter(W),t[2]=s,t[3]=r):r=t[3];const p=r,d=S(l,a.id,a.slug,!0,e),m=S(p,a.id,a.slug,!0,e);let g;if(t[4]!==m.items||t[5]!==d.items){const h=new Set;g=[];const j=[...d.items,...m.items];for(const f of j){const x=`${f._registryId}:${f.id}`;h.has(x)||(h.add(x),g.push(f))}t[4]=m.items,t[5]=d.items,t[6]=g}else g=t[6];const C=d.isInitialLoading||m.isInitialLoading,y=d.isLoadingMore||m.isLoadingMore,u=d.hasMore||m.hasMore;let n;t[7]!==m||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),m.hasMore&&m.fetchNextPage()},t[7]=m,t[8]=d,t[9]=n):n=t[9];const c=n;let i;return t[10]!==u||t[11]!==C||t[12]!==y||t[13]!==g||t[14]!==c?(i={items:g,hasMore:u,isLoadingMore:y,isInitialLoading:C,loadMore:c},t[10]=u,t[11]=C,t[12]=y,t[13]=g,t[14]=c,t[15]=i):i=t[15],i}function W(s){return A(s)}function Z(s){return!A(s)}function me(s){const e=new Map;for(const o of s){const l=T(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],a=new Set;for(const o of s){const l=T(o);if(a.has(l))continue;a.add(l);const r=e.get(l),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:l,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function de(s){const e=M.c(37),{connection:t,onClick:a,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:p,className:d,fallbackIcon:m}=s,g=l===void 0?!1:l,C=a&&"hover:bg-muted/50";let y;e[0]!==d||e[1]!==C?(y=w("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",C,d),e[0]=d,e[1]=C,e[2]=y):y=e[2];let u;e[3]!==t.icon||e[4]!==t.title||e[5]!==m?(u=I.jsx(V,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:m}),e[3]=t.icon,e[4]=t.title,e[5]=m,e[6]=u):u=e[6];let n;e[7]!==o||e[8]!==g?(n=o&&I.jsx("div",{className:w("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:O,children:o}),e[7]=o,e[8]=g,e[9]=n):n=e[9];let c;e[10]!==n?(c=I.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=c):c=e[11];let i;e[12]!==u||e[13]!==c?(i=I.jsxs("div",{className:"flex items-start justify-between",children:[u,c]}),e[12]=u,e[13]=c,e[14]=i):i=e[14];let h;e[15]!==t.title?(h=I.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=h):h=e[16];const j=t.description||"No description";let f;e[17]!==j?(f=I.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=f):f=e[18];let x;e[19]!==f||e[20]!==h?(x=I.jsxs("div",{className:"flex flex-col gap-1",children:[h,f]}),e[19]=f,e[20]=h,e[21]=x):x=e[21];let N;e[22]!==r?(N=r&&I.jsx("div",{children:r}),e[22]=r,e[23]=N):N=e[23];let v;e[24]!==x||e[25]!==N||e[26]!==i?(v=I.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,x,N]}),e[24]=x,e[25]=N,e[26]=i,e[27]=v):v=e[27];let P;e[28]!==p?(P=p&&I.jsx("div",{className:"border-t border-border mt-auto",children:I.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:J,children:p})}),e[28]=p,e[29]=P):P=e[29];let b;e[30]!==v||e[31]!==P?(b=I.jsxs("div",{className:"flex flex-col flex-1",children:[v,P]}),e[30]=v,e[31]=P,e[32]=b):b=e[32];let R;return e[33]!==a||e[34]!==b||e[35]!==y?(R=I.jsx(U,{className:y,onClick:a,children:b}),e[33]=a,e[34]=b,e[35]=y,e[36]=R):R=e[36],R}function J(s){return s.stopPropagation()}function O(s){return s.stopPropagation()}export{de as C,fe as a,me as g,ue as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as he,af as Ae,b3 as $e,I as le,ad as De,c as P,j as t,i as ge,B as U,r as K,l as je,C as J,v as Pe,K as se,b as Y,aI as ce,z as Oe,b4 as Me,E as ze,e as Ee,b5 as Ve,n as Ue,M as Re,J as Fe,t as G,b6 as Le}from"./index-CIFSbzEF.js";import{g as He}from"./extract-connection-data-DB1JAVkl.js";import{E as ve}from"./empty-state-CMGZe-XE.js";import{E as Be,c as We,r as Xe,b as qe,d as Ge}from"./connection-form-helpers-DKOWpJ-1.js";import{c as Ke,S as Qe,V as Je}from"./index-CSvkeXqd.js";import{u as be,T as Ye}from"./use-mcp-auth-status-BMkT9EZ9.js";import{a as Ze}from"./use-members-CgnYyzxD.js";import{A as et}from"./avatar-CMlDI2D-.js";import{a as Ne,b as ye,u as tt}from"./use-connection-DpPEk8aM.js";import{u as _e}from"./use-mcp-client-CJ_CTOi-.js";import{a as st}from"./use-mcp-tools-CS9HoteL.js";import{c as nt,C as ot,a as it,d as rt}from"./AreaChart-q7Xrveeh.js";import{i as at,a as lt}from"./mcp-oauth-C4qKLSfa.js";import{I as ne}from"./integration-icon-8ogu7iqA.js";import{s as ct}from"./Plus-DW8HTiM4.js";import{R as dt,S as mt,az as ut,b as xt}from"./agent-icon-C6bqiv4x.js";import{a as Ce,s as pt}from"./Settings02-DkDTX6wF.js";import{s as re}from"./Trash01-BFrDxOoF.js";import{q as ft,p as ht,o as gt,m as jt,n as vt}from"./sidebar-BssgvH2v.js";import{F as L,b as H,c as B,d as V,f as W,e as bt,a as Nt}from"./form-hOrojcOx.js";import{I as X}from"./input-COKCWjWn.js";import{u as yt,D as _t}from"./use-delete-connection-BvPMAZ_W.js";import{c as Ct,B as St,a as wt,C as kt}from"./monitoring-stats-row-CJ1mx9EI.js";import{u as Tt}from"./studio-tools-DvzlcJzu.js";import{u as It}from"./use-virtual-mcp-GqxJcvwl.js";import{i as Se}from"./ChevronRight-Ck0jEpLN.js";import{a as we}from"./Users03-uSqerTaX.js";import{c as Z,b as At,T as ee,a as $t}from"./tabs-Byd14nsc.js";import{g as ke}from"./connection-slug-eyAPH6o3.js";import{n as Dt}from"./ZapSquare-BrF3B-Lj.js";import{c as Pt}from"./Tool01-CiB1AgGO.js";import{g as ae,M as Ot}from"./index-BPUUTwje.js";import{C as Mt}from"./collection-search-B_OixFPO.js";import{C as zt}from"./card-Dd8gUiG_.js";import{B as Et}from"./badge-BIKuZNrQ.js";import{D as Vt,a as Ut,c as Rt,d as de}from"./dropdown-menu-QheVZMJA.js";import{S as me,a as ue,b as xe,c as pe,d as F}from"./select-mGmKPAXK.js";import{i as Ft}from"./CheckCircle-DLrShk9W.js";import{t as Lt}from"./ChevronDown-BRbMyZ1B.js";import{n as Ht}from"./Tool02-DatlcCMD.js";import{s as te}from"./Star01-IywRndO8.js";import{s as Bt}from"./XClose-CVT1rN5P.js";import"./index-BZIMlfJW.js";import"./ZoomOut-HpkK_jz9.js";import"./Key01-CTHo646W.js";import"./auth-C9enaQvD.js";import"./use-registry-connections-By2otvi-.js";import"./use-organization-settings-lcyinZ9M.js";import"./index-B5Jok_EG.js";import"./index-D1R93mn_.js";import"./popover-MfTivQME.js";import"./tooltip-B6N5kQd7.js";import"./Check-CfdDVvTz.js";import"./SearchMd-B_vHLGSV.js";import"./use-mobile-48jgjwiy.js";import"./use-create-virtual-mcp-DCIBpgEW.js";import"./use-navigate-to-agent-BuwUdTe3.js";import"./hooks-Ck4NS0BB.js";import"./decopilot-sse-pool-D92X3fNc.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Eye-IdG-7KTy.js";import"./use-org-auth-client-C7loj_lF.js";import"./User01-JYrKFpRC.js";import"./use-collections-B-IkeUFK.js";import"./AlertCircle-C1QMMByE.js";import"./ArrowUp-DH3o_6rV.js";import"./ArrowRight-CMDrgznR.js";import"./ArrowUpRight-ChAriHcE.js";import"./TrendUp01-CtjoH8ZL.js";import"./ChevronUp-BT9WG4FQ.js";import"./DotsVertical-DuorjQq1.js";import"./Stars02-CWszz6x7.js";import"./Copy01-Du_h2a2a.js";import"./Globe01-FT_j78GO.js";import"./FilterLines-VrXrRt9f.js";import"./Globe04-BktKmpI1.js";import"./SwitchHorizontal01-mvedp9Fy.js";import"./HardDrive-y6RDSyxS.js";import"./Image01-jwttKGpp.js";import"./LayoutLeft-DDdEDKm1.js";import"./XCircle-C1KpQxmr.js";import"./LinkExternal01-Dw89NskH.js";import"./Monitor01-D8aw2U1c.js";import"./Sun-CKE25B6W.js";import"./Package-Bl4wI6gQ.js";import"./Palette-Bb5lq-lb.js";import"./Play-h_GYgW2i.js";import"./SearchLg-CuxPI6CH.js";import"./Shield01-BTjWMfyt.js";import"./Stars01-awBCSC7p.js";import"./Upload01-BbY627dR.js";import"./Users01-C_vPeB-O.js";import"./X-BWhzmnUU.js";import"./Zap-yAX2Kmmw.js";import"./label-BCtHDi1-.js";import"./alert-dialog-BeSbCM7Y.js";const Wt=he({scopes:De(le()).describe("List of scopes available"),stateSchema:Ae(le(),$e()).describe("JSON Schema (draft-07) defining the state structure")}),Xt=[{name:"MCP_CONFIGURATION",inputSchema:he({}),outputSchema:Wt}];function qt(s){const e=P.c(46),{instance:n,onConfigure:i,onAuthenticate:r,onDelete:o,onToggleStatus:a}=s;let d;e[0]!==n.id?(d={connectionId:n.id},e[0]=n.id,e[1]=d):d=e[1];const l=be(d),x=!(n.connection_type==="VIRTUAL")&&l.supportsOAuth&&!l.isAuthenticated,p=n.status!=="active",c=x||p?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==c?(h=je("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",c),e[2]=c,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(ne,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let v;e[7]!==n.title?(v=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=v):v=e[8];let b;e[9]!==n.status||e[10]!==p||e[11]!==x?(b=x?t.jsx("span",{className:"text-xs text-destructive font-medium",children:"Needs authorization"}):p?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?"Disabled (error)":"Disabled"}):null,e[9]=n.status,e[10]=p,e[11]=x,e[12]=b):b=e[12];let j;e[13]!==v||e[14]!==b?(j=t.jsxs("div",{className:"flex-1 min-w-0",children:[v,b]}),e[13]=v,e[14]=b,e[15]=j):j=e[15];let N;e[16]!==n||e[17]!==x||e[18]!==r?(N=x&&t.jsx(U,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>r(n),children:"Authorize"}),e[16]=n,e[17]=x,e[18]=r,e[19]=N):N=e[19];let T;e[20]!==n||e[21]!==p||e[22]!==a?(T=p?t.jsxs(U,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>a(n,"active"),children:[t.jsx(dt,{size:13}),"Enable"]}):t.jsx(U,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>a(n,"inactive"),title:"Disable",children:t.jsx(mt,{size:13})}),e[20]=n,e[21]=p,e[22]=a,e[23]=T):T=e[23];let S;e[24]!==n||e[25]!==i?(S=()=>i(n),e[24]=n,e[25]=i,e[26]=S):S=e[26];let y;e[27]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(Ce,{size:13}),e[27]=y):y=e[27];let I;e[28]!==S?(I=t.jsx(U,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:S,title:"Configure",children:y}),e[28]=S,e[29]=I):I=e[29];let _;e[30]!==n||e[31]!==o?(_=()=>o(n),e[30]=n,e[31]=o,e[32]=_):_=e[32];let k;e[33]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(re,{size:13}),e[33]=k):k=e[33];let C;e[34]!==_?(C=t.jsx(U,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:_,title:"Delete",children:k}),e[34]=_,e[35]=C):C=e[35];let f;e[36]!==I||e[37]!==C||e[38]!==N||e[39]!==T?(f=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[N,T,I,C]}),e[36]=I,e[37]=C,e[38]=N,e[39]=T,e[40]=f):f=e[40];let w;return e[41]!==f||e[42]!==h||e[43]!==g||e[44]!==j?(w=t.jsxs("div",{className:h,children:[g,j,f]}),e[41]=f,e[42]=h,e[43]=g,e[44]=j,e[45]=w):w=e[45],w}function Gt(s){const e=P.c(15),{instance:n,onConfigure:i}=s;let r;e[0]!==n.icon||e[1]!==n.title?(r=t.jsx(ne,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=r):r=e[2];let o;e[3]!==n.title?(o=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=o):o=e[4];let a;e[5]!==n||e[6]!==i?(a=()=>i(n),e[5]=n,e[6]=i,e[7]=a):a=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Ce,{size:13}),e[8]=d):d=e[8];let l;e[9]!==a?(l=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(U,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a,title:"Configure",children:d})}),e[9]=a,e[10]=l):l=e[10];let u;return e[11]!==r||e[12]!==o||e[13]!==l?(u=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[r,o,l]}),e[11]=r,e[12]=o,e[13]=l,e[14]=u):u=e[14],u}function Kt(s){const e=P.c(27),{instances:n,onConfigure:i,onAuthenticate:r,onDelete:o,onToggleStatus:a,onAdd:d,isAdding:l}=s;if(n.length===0)return null;const u=n.length===1?"Instance":"Instances";let x;e[0]!==u?(x=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[0]=u,e[1]=x):x=e[1];let p;e[2]!==l?(p=l?t.jsx(ge,{size:13,className:"animate-spin"}):t.jsx(ct,{size:13}),e[2]=l,e[3]=p):p=e[3];let c;e[4]!==l||e[5]!==d||e[6]!==p?(c=t.jsxs(U,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:d,disabled:l,children:[p,"Add instance"]}),e[4]=l,e[5]=d,e[6]=p,e[7]=c):c=e[7];let h;e[8]!==x||e[9]!==c?(h=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[x,c]}),e[8]=x,e[9]=c,e[10]=h):h=e[10];let g;if(e[11]!==n||e[12]!==r||e[13]!==i||e[14]!==o||e[15]!==a){let j;e[17]!==r||e[18]!==i||e[19]!==o||e[20]!==a?(j=N=>t.jsx(K.Suspense,{fallback:t.jsx(Gt,{instance:N,onConfigure:i}),children:t.jsx(qt,{instance:N,onConfigure:i,onAuthenticate:r,onDelete:o,onToggleStatus:a})},N.id),e[17]=r,e[18]=i,e[19]=o,e[20]=a,e[21]=j):j=e[21],g=n.map(j),e[11]=n,e[12]=r,e[13]=i,e[14]=o,e[15]=a,e[16]=g}else g=e[16];let v;e[22]!==g?(v=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:g}),e[22]=g,e[23]=v):v=e[23];let b;return e[24]!==h||e[25]!==v?(b=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[h,v]}),e[24]=h,e[25]=v,e[26]=b):b=e[26],b}function Qt(s,e=3){const n=new Map;for(const i of s){if(!i.isError)continue;const r=(i.errorMessage??"").trim()||"Unknown error";n.set(r,(n.get(r)??0)+1)}return[...n.entries()].map(([i,r])=>({message:i,count:r})).sort((i,r)=>r.count-i.count).slice(0,e)}const Jt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function Yt(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const Zt={calls:{label:"Tool calls"},errors:{label:"Errors"}};function es(s){const e=P.c(1),{connectionId:n,orgId:i,timeframe:r}=s,o=Tt(),a=Yt(r),{data:d}=Pe({queryKey:se.connectionActivity(n,r,i),queryFn:async()=>await o.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),l=Ct(d?.logs??[],a),u=l.data,x=l.totalCalls>0,p=Qt(d?.logs??[]),c=l.totalCalls>0?Math.round(l.totalErrors/l.totalCalls*100):0;let h;return e[0]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Tool calls"}),e[0]=h):h=e[0],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:l.totalCalls.toLocaleString()}),h]}),l.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:l.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Errors"})]}),l.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(l.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Avg latency"})]})]}),x?t.jsxs("div",{children:[t.jsx(nt,{config:Zt,className:"h-16 w-full",children:t.jsxs(St,{data:u,barCategoryGap:"4%",children:[t.jsx(ot,{content:t.jsx(it,{labelFormatter:ns}),cursor:{fill:"var(--muted)"}}),t.jsx(wt,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:u.map(ss)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:u[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:u[u.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No activity in this period"})}),p.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:["Top errors",c>0?` · ${c}% of calls failed`:""]}),t.jsx("ul",{className:"space-y-1.5",children:p.map(ts)})]})]})}function ts(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function ss(s,e){return t.jsx(kt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function ns(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function os(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function is(s){const e=P.c(13),{connectionId:n}=s,[i,r]=K.useState("14d"),{org:o}=J();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Activity"})}),e[0]=a):a=e[0];let d;e[1]!==i?(d=Jt.map(c=>t.jsx("button",{type:"button",onClick:()=>r(c.value),className:je("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",i===c.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:c.label},c.value)),e[1]=i,e[2]=d):d=e[2];let l;e[3]!==d?(l=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[a,t.jsx("div",{className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:d})]}),e[3]=d,e[4]=l):l=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(os,{}),e[5]=u):u=e[5];let x;e[6]!==n||e[7]!==o.id||e[8]!==i?(x=t.jsx(K.Suspense,{fallback:u,children:t.jsx(es,{connectionId:n,orgId:o.id,timeframe:i})}),e[6]=n,e[7]=o.id,e[8]=i,e[9]=x):x=e[9];let p;return e[10]!==l||e[11]!==x?(p=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[l,x]}),e[10]=l,e[11]=x,e[12]=p):p=e[12],p}function rs(s){const e=P.c(15),{virtualMcp:n,org:i}=s,r=Y();let o;e[0]!==r||e[1]!==i||e[2]!==n.id?(o=()=>{const p=crypto.randomUUID();r({to:"/$org/$taskId",params:{org:i,taskId:p},search:{virtualmcpid:n.id}})},e[0]=r,e[1]=i,e[2]=n.id,e[3]=o):o=e[3];let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(we,{size:16}),e[4]=a):a=e[4];let d;e[5]!==n.icon||e[6]!==n.title?(d=t.jsx(ne,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:a}),e[5]=n.icon,e[6]=n.title,e[7]=d):d=e[7];let l;e[8]!==n.title?(l=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=l):l=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Se,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=u):u=e[10];let x;return e[11]!==o||e[12]!==d||e[13]!==l?(x=t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[d,l,u]}),e[11]=o,e[12]=d,e[13]=l,e[14]=x):x=e[14],x}function as(s){const e=P.c(7),{virtualMcps:n,org:i}=s;let r;if(e[0]!==i||e[1]!==n){let a;e[3]!==i?(a=d=>t.jsx(rs,{virtualMcp:d,org:i},d.id),e[3]=i,e[4]=a):a=e[4],r=n.map(a),e[0]=i,e[1]=n,e[2]=r}else r=e[2];let o;return e[5]!==r?(o=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:r})}),e[5]=r,e[6]=o):o=e[6],o}function ls(s){const e=P.c(7),{connection:n}=s,{org:i}=J();let r;e[0]!==n.id?(r={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=r):r=e[1];const o=It(r);if(!(o.length>0)){let u;return e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(t.Fragment,{}),e[2]=u):u=e[2],u}let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Used by agents"})}),e[3]=d):d=e[3];let l;return e[4]!==i.slug||e[5]!==o?(l=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,t.jsx("div",{className:"px-5 py-4",children:t.jsx(as,{virtualMcps:o,org:i.slug})})]}),e[4]=i.slug,e[5]=o,e[6]=l):l=e[6],l}function cs(s){const e=P.c(31),{tools:n,connectionId:i,org:r}=s,o=Y(),{org:a}=J();let d;e[0]!==i||e[1]!==a.id||e[2]!==a.slug?(d={connectionId:i,orgId:a.id,orgSlug:a.slug},e[0]=i,e[1]=a.id,e[2]=a.slug,e[3]=d):d=e[3];const l=_e(d),u=Ne(i);let x;e[4]!==u||e[5]!==i?(x=u?ke(u):i,e[4]=u,e[5]=i,e[6]=x):x=e[6];const p=x,[c,h]=K.useState("");let g,v,b,j;if(e[7]!==p||e[8]!==l||e[9]!==o||e[10]!==r||e[11]!==c||e[12]!==n){const S=(n??[]).filter(ds),y=c.toLowerCase().trim(),I=y?S.filter(f=>f.name.toLowerCase().includes(y)||f.description&&f.description.toLowerCase().includes(y)):S;let _;e[17]!==p||e[18]!==o||e[19]!==r?(_=f=>{o({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:p,collectionName:"tools",itemId:encodeURIComponent(f.name)}})},e[17]=p,e[18]=o,e[19]=r,e[20]=_):_=e[20];const k=_;b="flex flex-col h-full overflow-hidden";let C;e[21]===Symbol.for("react.memo_cache_sentinel")?(C=f=>{f.key==="Escape"&&(h(""),f.target.blur())},e[21]=C):C=e[21],e[22]!==c?(j=t.jsx(Mt,{value:c,onChange:h,placeholder:"Search apps...",onKeyDown:C}),e[22]=c,e[23]=j):j=e[23],g="flex-1 overflow-auto p-5",v=I.length===0?t.jsx(ve,{image:null,title:c?"No apps found":"No apps available",description:c?"Try adjusting your search terms":"This connection doesn't have any tools with interactive UIs yet."}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:I.map(f=>{const w=ae(f._meta);return t.jsxs(zt,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>k(f),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Ot,{resourceURI:w,toolInfo:{tool:f},displayMode:"inline",minHeight:200,maxHeight:200,client:l})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:f.name}),t.jsx(Ye,{annotations:f.annotations,_meta:f._meta})]}),f.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:f.description})]})]},f.name)})}),e[7]=p,e[8]=l,e[9]=o,e[10]=r,e[11]=c,e[12]=n,e[13]=g,e[14]=v,e[15]=b,e[16]=j}else g=e[13],v=e[14],b=e[15],j=e[16];let N;e[24]!==g||e[25]!==v?(N=t.jsx("div",{className:g,children:v}),e[24]=g,e[25]=v,e[26]=N):N=e[26];let T;return e[27]!==b||e[28]!==j||e[29]!==N?(T=t.jsxs("div",{className:b,children:[j,N]}),e[27]=b,e[28]=j,e[29]=N,e[30]=T):T=e[30],T}function ds(s){return!!ae(s._meta)}function Te(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=a=>a.charAt(0).toUpperCase()+a.slice(1),i=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),r=e.map(n),o=e[e.length-1];return r.length>=2&&o&&i.has(o)?[r.pop(),...r].join(" "):r.join(" ")}function ie(s){const e=P.c(2),{label:n}=s;let i;return e[0]!==n?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:["No ",n," available."]})}),e[0]=n,e[1]=i):i=e[1],i}function ms(s){const e=P.c(50),{tools:n,prompts:i,resources:r,connectionId:o,org:a}=s;let d;e[0]!==i?(d=i===void 0?[]:i,e[0]=i,e[1]=d):d=e[1];const l=d;let u;e[2]!==r?(u=r===void 0?[]:r,e[2]=r,e[3]=u):u=e[3];const x=u,p=Y(),c=Ne(o??"");let h;e[4]!==c||e[5]!==o?(h=c?ke(c):o,e[4]=c,e[5]=o,e[6]=h):h=e[6];const g=h;let v;e[7]!==g||e[8]!==o||e[9]!==p||e[10]!==a?(v=function($){!o||!a||p({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:a,appSlug:g,collectionName:"tools",itemId:encodeURIComponent($)}})},e[7]=g,e[8]=o,e[9]=p,e[10]=a,e[11]=v):v=e[11];const b=v;let j;e[12]!==o||e[13]!==a||e[14]!==n?(j=o&&a&&n.some(ps),e[12]=o,e[13]=a,e[14]=n,e[15]=j):j=e[15];const N=j;if(n.length+l.length+x.length===0){let m;return e[16]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:"Capabilities"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"No capabilities discovered yet. The connection may still be connecting."})]}),e[16]=m):m=e[16],m}let S;e[17]!==n.length?(S=t.jsxs(Z,{value:"tools",variant:"underline",children:["Tools (",n.length,")"]}),e[17]=n.length,e[18]=S):S=e[18];let y;e[19]!==N?(y=N&&t.jsx(Z,{value:"apps",variant:"underline",children:"UI"}),e[19]=N,e[20]=y):y=e[20];let I,_;e[21]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Z,{value:"prompts",variant:"underline",children:"Prompts"}),_=t.jsx(Z,{value:"resources",variant:"underline",children:"Resources"}),e[21]=I,e[22]=_):(I=e[21],_=e[22]);let k;e[23]!==S||e[24]!==y?(k=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(At,{variant:"underline",className:"gap-1",children:[S,y,I,_]})}),e[23]=S,e[24]=y,e[25]=k):k=e[25];let C;e[26]!==b||e[27]!==n?(C=n.length>0?n.map(m=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>b(m.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Pt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Te(m.name)}),m.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:m.description})]}),t.jsx(Se,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},m.name)):t.jsx(ie,{label:"tools"}),e[26]=b,e[27]=n,e[28]=C):C=e[28];let f;e[29]!==C?(f=t.jsx(ee,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:C})}),e[29]=C,e[30]=f):f=e[30];let w;e[31]!==o||e[32]!==N||e[33]!==a||e[34]!==n?(w=N&&t.jsx(ee,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(cs,{tools:n,connectionId:o,org:a})}),e[31]=o,e[32]=N,e[33]=a,e[34]=n,e[35]=w):w=e[35];let M;e[36]!==l?(M=l.length>0?l.map(xs):t.jsx(ie,{label:"prompts"}),e[36]=l,e[37]=M):M=e[37];let O;e[38]!==M?(O=t.jsx(ee,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:M})}),e[38]=M,e[39]=O):O=e[39];let A;e[40]!==x?(A=x.length>0?x.map(us):t.jsx(ie,{label:"resources"}),e[40]=x,e[41]=A):A=e[41];let z;e[42]!==A?(z=t.jsx(ee,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[42]=A,e[43]=z):z=e[43];let R;return e[44]!==k||e[45]!==f||e[46]!==w||e[47]!==O||e[48]!==z?(R=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs($t,{defaultValue:"tools",variant:"underline",children:[k,f,w,O,z]})}),e[44]=k,e[45]=f,e[46]=w,e[47]=O,e[48]=z,e[49]=R):R=e[49],R}function us(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(ut,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function xs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Dt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Te(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function ps(s){return ae(s._meta)}function fs(s){const e=P.c(13),{connection:n,displayTitle:i}=s,r=i??n.title;let o;e[0]!==n.icon||e[1]!==r?(o=t.jsx(ne,{icon:n.icon,name:r,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=r,e[2]=o):o=e[2];let a;e[3]!==r?(a=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:r})}),e[3]=r,e[4]=a):a=e[4];let d;e[5]!==n.description?(d=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=d):d=e[6];let l;e[7]!==a||e[8]!==d?(l=t.jsxs("div",{className:"flex-1 min-w-0",children:[a,d]}),e[7]=a,e[8]=d,e[9]=l):l=e[9];let u;return e[10]!==o||e[11]!==l?(u=t.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-5 md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0",children:[o,l]}),e[10]=o,e[11]=l,e[12]=u):u=e[12],u}function hs({form:s,connection:e,hasOAuthToken:n,onReauthenticate:i,onRemoveOAuth:r}){const o=ce({control:s.control,name:"ui_type"}),a=ce({control:s.control,name:"connection_url"}),{stdioEnabled:d}=Oe(),l=(()=>{if(typeof a!="string"||!a)return!1;try{const c=new URL(a);return c.hostname==="api.githubcopilot.com"&&c.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),u=d||e.connection_type==="STDIO",x=e.connection_type==="VIRTUAL",p=x?Me(e.connection_url):null;return x?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Type"}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(we,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:"Virtual MCP"})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"This connection references a Virtual MCP. Tools and resources are aggregated dynamically from the Virtual MCP's underlying connections."})]}),p&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Virtual MCP ID"}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:p})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(L,{control:s.control,name:"ui_type",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Connection"}),o!=="NPX"&&o!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(me,{value:c.value,onValueChange:c.onChange,children:[t.jsx(V,{children:t.jsxs(ue,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(te,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(xe,{})]})}),t.jsxs(pe,{children:[t.jsx(F,{value:"HTTP",children:"HTTP"}),t.jsx(F,{value:"SSE",children:"SSE"}),t.jsx(F,{value:"Websocket",children:"Websocket"}),u&&t.jsxs(t.Fragment,{children:[t.jsx(F,{value:"NPX",children:"NPX Package"}),t.jsx(F,{value:"STDIO",children:"Custom Command"})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(L,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(H,{className:"flex-1 min-w-0",children:t.jsx(V,{children:t.jsx(X,{placeholder:"https://example.com/mcp",...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(me,{value:c.value,onValueChange:c.onChange,children:[t.jsx(V,{children:t.jsx(ue,{className:"h-10",children:t.jsx(xe,{})})}),t.jsxs(pe,{children:[t.jsx(F,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(te,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(F,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(te,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(F,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(te,{className:"w-4 h-4"}),"Websocket"]})}),u&&t.jsxs(t.Fragment,{children:[t.jsx(F,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ht,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(F,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(xt,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(W,{})]})}),o==="NPX"&&t.jsx(L,{control:s.control,name:"npx_package",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"NPM Package"}),t.jsx(V,{children:t.jsx(X,{placeholder:"@perplexity-ai/mcp-server",...c,value:c.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),o==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(L,{control:s.control,name:"stdio_command",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Command"}),t.jsx(V,{children:t.jsx(X,{placeholder:"node, bun, python...",...c,value:c.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),t.jsx(L,{control:s.control,name:"stdio_args",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Arguments"}),t.jsx(V,{children:t.jsx(X,{placeholder:"arg1 arg2 --flag value",...c,value:c.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated arguments"}),t.jsx(W,{})]})})]}),t.jsx(L,{control:s.control,name:"stdio_cwd",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Working Directory"}),t.jsx(V,{children:t.jsx(X,{placeholder:"/path/to/project (optional)",...c,value:c.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})})]}),(o==="NPX"||o==="STDIO")&&t.jsx(L,{control:s.control,name:"env_vars",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Environment Variables"}),t.jsx(V,{children:t.jsx(Be,{value:c.value??[],onChange:c.onChange})}),t.jsx(W,{})]})}),o!=="NPX"&&o!=="STDIO"&&t.jsx(L,{control:s.control,name:"connection_token",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:l?"GitHub Personal Access Token":"Token"}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Vt,{children:[t.jsx(Ut,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Et,{variant:"success",className:"gap-1.5",children:[t.jsx(Ft,{size:12}),"Authenticated via OAuth",t.jsx(Lt,{size:12})]})})}),t.jsxs(Rt,{align:"start",children:[t.jsxs(de,{onClick:i,children:[t.jsx(pt,{size:16}),"Re-authenticate"]}),t.jsxs(de,{variant:"destructive",onClick:r,children:[t.jsx(re,{size:16}),"Remove OAuth"]})]})]})}):e.connection_token&&c.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>c.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:"Clear and replace token",children:t.jsx(Bt,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(V,{children:t.jsx(X,{type:"password",placeholder:l?"Paste your GitHub PAT":"Enter access token...",...c,value:c.value||"",className:"h-10 rounded-lg"})}),l&&t.jsxs(bt,{children:["Create a PAT at"," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(W,{})]})})]})}function gs(s){return s.command==="npx"}function js(s){return s.args?.find(e=>!e.startsWith("-"))??""}function vs(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function fe(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Le(s.connection_headers)){const i=s.connection_headers,r=Xe(i.envVars);if(gs(i)){const a=js(i);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:a,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:r}}const o=vs(i);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:o.command,stdio_args:o.args,stdio_cwd:o.cwd,env_vars:r}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function bs(s){let e,n=null,i=null,r=null;return s.ui_type==="NPX"?(e="STDIO",n="",r=qe(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",r=Ge(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",i=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...i&&{connection_token:i},...r&&{connection_headers:r},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function Ns({connection:s,connectionId:e,org:n,isUpdating:i,tools:r,prompts:o,resources:a,siblings:d}){const l=Y({from:"/$org/settings/connections/$appSlug"}),u=Ue(),x=ye(),{org:p}=J(),c=yt({onSuccess:()=>{d.length<=1&&l({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=K.useState(null),[v,b]=K.useState(!1),j=be({connectionId:e}),{data:N}=Ze(),T=N?.data?.members??[],S=h??s,y=T.find(m=>m.userId===S.created_by),_=s?.connection_type==="VIRTUAL"||j.isAuthenticated,k={...s,tools:r},C=Ke(k,Xt),f=Re({resolver:Fe(We),values:fe(h??s)}),w=f.formState.isDirty,M=async()=>{if(!await f.trigger())return;const $=f.getValues(),E=bs($),D=h?.id??e;await x.update.mutateAsync({id:D,data:E}),f.reset($)},O=()=>{f.reset(fe(h??s))},A=async m=>{const $=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:E,tokenInfo:D,error:Q}=await lt({connectionId:m,orgSlug:p.slug,...$?{scope:$}:{}});if(Q||!E){G.error(`Authentication failed: ${Q}`);return}if(D)try{const q=await fetch(`/api/${p.slug}/connections/${m}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:D.accessToken,refreshToken:D.refreshToken,expiresIn:D.expiresIn,scope:D.scope,clientId:D.clientId,clientSecret:D.clientSecret,tokenEndpoint:D.tokenEndpoint})});if(!q.ok)console.error("Failed to save OAuth token:",await q.text()),await x.update.mutateAsync({id:m,data:{connection_token:E}});else try{await x.update.mutateAsync({id:m,data:{}})}catch(Ie){console.warn("Failed to refresh connection tools after OAuth:",Ie)}}catch(q){console.error("Error saving OAuth token:",q),await x.update.mutateAsync({id:m,data:{connection_token:E}})}else await x.update.mutateAsync({id:m,data:{connection_token:E}});const oe=new URL(`/api/${p.slug}/mcp/${m}`,window.location.origin);await u.invalidateQueries({queryKey:se.isMCPAuthenticated(oe.href,null)}),await u.invalidateQueries({queryKey:se.mcpClientPrefix()}),G.success("Authentication successful")},z=()=>A(s.id),R=async()=>{try{const m=await fetch(`/api/${p.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!m.ok){const E=await m.text();G.error(`Failed to remove OAuth: ${E}`);return}const $=new URL(`/api/${p.slug}/mcp/${s.id}`,window.location.origin);await u.invalidateQueries({queryKey:se.isMCPAuthenticated($.href,null)}),G.success("OAuth removed. You can now re-authenticate with a different account.")}catch(m){console.error("Error removing OAuth token:",m),G.error("Failed to remove OAuth")}};return t.jsxs(t.Fragment,{children:[t.jsx(_t,{...c}),t.jsx(ft,{open:h!==null,onOpenChange:m=>{m||g(null)},children:t.jsxs(ht,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(gt,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(jt,{className:"text-base",children:h?.title??s.title}),t.jsx(vt,{className:"text-xs",children:"Update URL, authentication, and other settings"}),y&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Connected by"}),t.jsx(et,{url:y.user?.image??void 0,fallback:y.user?.name??y.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:y.user?.name||y.user?.email})]})]}),t.jsxs(Nt,{...f,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(L,{control:f.control,name:"title",render:({field:m})=>t.jsxs(H,{children:[t.jsx(B,{children:"Name"}),t.jsx(V,{children:t.jsx(X,{...m})}),t.jsx(W,{})]})}),t.jsx(L,{control:f.control,name:"description",render:({field:m})=>t.jsxs(H,{children:[t.jsx(B,{children:"Description"}),t.jsx(V,{children:t.jsx(X,{...m,value:m.value||""})}),t.jsx(W,{})]})})]}),t.jsx(hs,{form:f,connection:h??s,hasOAuthToken:j.hasOAuthToken,onReauthenticate:z,onRemoveOAuth:R}),t.jsx(Qe,{connection:h??s,form:f,hasMcpBinding:C,isMCPAuthenticated:_,supportsOAuth:j.supportsOAuth,isServerError:j.isServerError,onAuthenticate:z,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(U,{onClick:M,disabled:!w||i,className:"flex-1",children:i?"Saving…":"Save changes"}),w&&t.jsx(U,{variant:"outline",onClick:O,children:"Undo"}),t.jsxs(U,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const m=h??s;g(null),c.requestDelete(m)},children:[t.jsx(re,{size:15}),"Delete"]})]})]},h?.id??s.id)]})}),t.jsx(Je,{hideHeader:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(fs,{connection:s,displayTitle:(()=>{const m=d[0]??s;return m.app_name?m.title.replace(/\s*\(\d+\)\s*$/,""):m.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(is,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Kt,{instances:d,onConfigure:m=>g(m),onAuthenticate:m=>A(m.id),onDelete:m=>c.requestDelete(m),onToggleStatus:async(m,$)=>{try{await x.update.mutateAsync({id:m.id,data:{status:$}}),G.success($==="active"?"Connection enabled":"Connection disabled")}catch{G.error("Failed to update connection")}},isAdding:v,onAdd:async()=>{b(!0);try{const m=d[0]??s,$=m.title.replace(/\s*\(\d+\)\s*$/,""),E=d.length+1,D=`${$} (${E})`,Q=He("conn");await x.create.mutateAsync({id:Q,title:D,description:m.description??null,connection_type:m.connection_type,connection_url:m.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:m.created_by,organization_id:m.organization_id,icon:m.icon??null,app_name:m.app_name??null,app_id:m.app_id??null,connection_headers:m.connection_headers??null,oauth_config:null,configuration_state:m.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const oe=new URL(`/api/${p.slug}/mcp/${Q}`,window.location.origin),q=await at({url:oe.href,token:null,orgId:p.id});q.supportsOAuth&&!q.isAuthenticated&&await A(Q)}finally{b(!1)}}}),t.jsx(ls,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(ms,{tools:r,prompts:o,resources:a,connectionId:e,org:n})})]})})]})})]})}function ys(){const s=P.c(39);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/settings/connections/$appSlug"},s[0]=e):e=s[0];const n=Y(e);let i;s[1]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org/settings/connections/$appSlug"},s[1]=i):i=s[1];const{appSlug:r,org:o}=Ee(i),{org:a}=J(),d=ye();let l;s[2]!==r?(l={slug:r},s[2]=r,s[3]=l):l=s[3];const u=tt(l),x=u[0]??null,p=x?.id??"",c=p||null;let h;s[4]!==a.id||s[5]!==a.slug||s[6]!==c?(h={connectionId:c,orgId:a.id,orgSlug:a.slug},s[4]=a.id,s[5]=a.slug,s[6]=c,s[7]=h):h=s[7];const g=_e(h);let v;s[8]!==g?(v={client:g},s[8]=g,s[9]=v):v=s[9];const{data:b}=st(v);let j;if(s[10]!==x?.tools||s[11]!==p||s[12]!==u||s[13]!==b){const A=b?b.tools.map(Ts):(x?.tools??[]).map(ks);e:{if(u.length<=1){j=A;break e}const z=new Set,R=[],m=Ss;for(const $ of u){const E=$.id===p?A:m($.tools);for(const D of E)z.has(D.name)||(z.add(D.name),R.push(D))}j=R.length>0?R:A}s[10]=x?.tools,s[11]=p,s[12]=u,s[13]=b,s[14]=j}else j=s[14];const N=j;let T;s[15]!==g?(T={client:g},s[15]=g,s[16]=T):T=s[16];const{data:S}=rt(T);let y;s[17]!==g?(y={client:g},s[17]=g,s[18]=y):y=s[18];const{data:I}=Ve(y);let _;s[19]!==S?.prompts?(_=S?.prompts??[],s[19]=S?.prompts,s[20]=_):_=s[20];let k;s[21]!==_?(k=_.map(Cs),s[21]=_,s[22]=k):k=s[22];const C=k;let f;s[23]!==I?.resources?(f=I?.resources??[],s[23]=I?.resources,s[24]=f):f=s[24];let w;s[25]!==f?(w=f.map(_s),s[25]=f,s[26]=w):w=s[26];const M=w;if(!x){let A;return s[27]!==n||s[28]!==o?(A=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ve,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:t.jsx(U,{variant:"outline",onClick:()=>n({to:"/$org/settings/connections",params:{org:o}}),children:"Back to connections"})})}),s[27]=n,s[28]=o,s[29]=A):A=s[29],A}let O;return s[30]!==d.update.isPending||s[31]!==N||s[32]!==x||s[33]!==p||s[34]!==o||s[35]!==C||s[36]!==M||s[37]!==u?(O=t.jsx(Ns,{org:o,connection:x,connectionId:p,isUpdating:d.update.isPending,tools:N,prompts:C,resources:M,siblings:u}),s[30]=d.update.isPending,s[31]=N,s[32]=x,s[33]=p,s[34]=o,s[35]=C,s[36]=M,s[37]=u,s[38]=O):O=s[38],O}function _s(s){return{name:s.name,description:s.description,uri:s.uri}}function Cs(s){return{name:s.name,description:s.description}}function Ss(s){return(s??[]).map(ws)}function ws(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function ks(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ts(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Is(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ze,{children:t.jsx(K.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(ge,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(ys,{})})}),s[0]=e):e=s[0],e}function yo(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Is,{}),s[0]=e):e=s[0],e}export{yo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as R,af as V,b3 as A,I as a,ad as j,ae as z,c as L,j as u,B as C}from"./index-
|
|
1
|
+
import{H as R,af as V,b3 as A,I as a,ad as j,ae as z,c as L,j as u,B as C}from"./index-CIFSbzEF.js";import{I as H}from"./input-COKCWjWn.js";import{s as W}from"./Plus-DW8HTiM4.js";import{s as q}from"./Trash01-BFrDxOoF.js";const K=R({key:a().min(1,"Key is required"),value:a()}),M=R({title:a().min(1,"Name is required"),description:a().nullable().optional(),icon:a().nullable().optional(),ui_type:z(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:a().optional(),connection_token:a().nullable().optional(),npx_package:a().optional(),stdio_command:a().optional(),stdio_args:a().optional(),stdio_cwd:a().optional(),env_vars:j(K).optional(),configuration_scopes:j(a()).nullable().optional(),configuration_state:V(a(),A()).nullable().optional()}).refine(n=>n.ui_type==="NPX"?!!n.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(n=>n.ui_type==="STDIO"?!!n.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(n=>n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket"?!!n.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function $(n){const e=n.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(s=>e.includes(s))||["sk_","rk_","whsec_","pk_live","sk_live"].some(s=>e.startsWith(s))||["_key","_secret","_token","_password","_auth","_pat"].some(s=>e.endsWith(s)))}function X(n){const e=L.c(34),{value:t,onChange:r,keyPlaceholder:o,valuePlaceholder:s,className:v}=n,m=o===void 0?"VARIABLE_NAME":o,_=s===void 0?"value...":s;let b;e[0]!==r||e[1]!==t?(b=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=b):b=e[2];const S=b;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((p,i)=>i!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const g=x;let P;e[6]!==r||e[7]!==t?(P=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:p,value:c.value},r(i))},e[6]=r,e[7]=t,e[8]=P):P=e[8];const y=P;let w;e[9]!==r||e[10]!==t?(w=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:c.key,value:p},r(i))},e[9]=r,e[10]=t,e[11]=w):w=e[11];const k=w;let d;if(e[12]!==y||e[13]!==g||e[14]!==k||e[15]!==m||e[16]!==t||e[17]!==_){let l;e[19]!==y||e[20]!==g||e[21]!==k||e[22]!==m||e[23]!==_?(l=(p,i)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(H,{placeholder:m,value:p.key,onChange:c=>y(i,c.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),u.jsx(H,{type:$(p.key)?"password":"text",placeholder:_,value:p.value,onChange:c=>k(i,c.target.value),className:"h-10 rounded-lg flex-1"}),u.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>g(i),children:u.jsx(q,{size:16})})]},i),e[19]=y,e[20]=g,e[21]=k,e[22]=m,e[23]=_,e[24]=l):l=e[24],d=t.map(l),e[12]=y,e[13]=g,e[14]=k,e[15]=m,e[16]=t,e[17]=_,e[18]=d}else d=e[18];let T;e[25]===Symbol.for("react.memo_cache_sentinel")?(T=u.jsx(W,{size:16,className:"mr-1"}),e[25]=T):T=e[25];let f;e[26]!==S?(f=u.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:S,children:[T,"Add Environment Variable"]}),e[26]=S,e[27]=f):f=e[27];let h;e[28]!==d||e[29]!==f?(h=u.jsxs("div",{className:"flex flex-col gap-2",children:[d,f]}),e[28]=d,e[29]=f,e[30]=h):h=e[30];let E;return e[31]!==v||e[32]!==h?(E=u.jsx("div",{className:v,children:h}),e[31]=v,e[32]=h,e[33]=E):E=e[33],E}function I(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function D(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function N(n){const e=n.trim();if(!e)return"";try{const t=new URL(e),r=t.pathname.length>1?t.pathname.replace(/\/+$/,""):t.pathname;return`${t.origin}${r}`}catch{return e.replace(/\/+$/,"")}}function F(n){const e=n.trim().split(/\s+/).filter(Boolean);if(e.length<2)return null;const t=e[0]?.toLowerCase();if(t!=="npx"&&t!=="bunx")return null;const o=e.slice(1).find(s=>!s.startsWith("-"));return o?{packageName:o}:null}function Y(n){const{uiType:e}=n,t=N(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===N("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const r=(n.npxPackage??"").trim();return e==="NPX"&&r==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function J(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=N(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(s=>(s.server?.remotes??[]).some(m=>N(m.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",o=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:o}:null}function Q(n,e){const t={command:"npx",args:["-y",n]},r=I(e);return Object.keys(r).length>0&&(t.envVars=r),t}function Z(n,e,t,r){const o={command:n};e.trim()&&(o.args=e.trim().split(/\s+/)),t?.trim()&&(o.cwd=t.trim());const s=I(r);return Object.keys(s).length>0&&(o.envVars=s),o}export{X as E,J as a,Q as b,M as c,Z as d,Y as i,F as p,D as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as V,c as ne,j as t,B as K,i as ae,p as te,l as ge,E as Ge,C as be,b as _e,u as Qe,a as Ne,z as Je,G as Ye,D as Ze,M as et,J as tt,n as nt,t as U,K as st}from"./index-CIFSbzEF.js";import{a as De,b as ot,g as it,e as rt}from"./extract-connection-data-DB1JAVkl.js";import{C as lt}from"./collection-display-button-C1K9dOzY.js";import{S as ct}from"./search-input-U68dcFxI.js";import{C as at}from"./collection-tabs-BbylyFFO.js";import{C as Ce,u as dt,a as ke,g as mt}from"./connection-card-DgbR5Mwx.js";import{E as ut}from"./empty-state-CMGZe-XE.js";import{P as me}from"./index-BZIMlfJW.js";import{u as pt,D as gt}from"./use-delete-connection-BvPMAZ_W.js";import{u as ye}from"./use-capability-n8ljqiDB.js";import{u as ht}from"./use-infinite-scroll-DVSx3Rq1.js";import{u as xt}from"./use-view-mode-DAFf8-q-.js";import{g as pe}from"./connection-slug-eyAPH6o3.js";import{c as Ae,d as Te,b as we,A as Ie,e as Pe,g as $e,a as Oe,f as Le}from"./alert-dialog-BeSbCM7Y.js";import{n as he}from"./Tool02-DatlcCMD.js";import{D as Me,a as Fe,h as ze,c as Ve,d as Ee,e as Be}from"./dialog-a73gSkG2.js";import{D as ft,a as jt,c as yt,b as Ct,d as St,e as vt,f as bt}from"./drawer-BU_sOAKq.js";import{u as _t}from"./use-mobile-48jgjwiy.js";import{F as Q,b as J,c as Y,d as Z,f as ee,a as Se}from"./form-hOrojcOx.js";import{I as ie}from"./input-COKCWjWn.js";import{S as Nt,a as Dt,b as kt,c as At,d as ce}from"./select-mGmKPAXK.js";import{T as Tt}from"./textarea-Duro92xh.js";import{b as Ke,u as wt}from"./use-connection-DpPEk8aM.js";import{u as It}from"./use-virtual-mcp-GqxJcvwl.js";import{u as Pt}from"./studio-tools-DvzlcJzu.js";import{s as je}from"./Star01-IywRndO8.js";import{s as He}from"./Plus-DW8HTiM4.js";import{S as $t,R as Ot,ay as Lt,b as Mt}from"./agent-icon-C6bqiv4x.js";import{s as Re}from"./XClose-CVT1rN5P.js";import{i as ue,a as ve,E as Ft,c as zt,p as Vt,b as Et,d as Bt}from"./connection-form-helpers-DKOWpJ-1.js";import{a as Kt}from"./authenticate-and-persist-oauth-pF30Ku2c.js";import{I as Ht}from"./integration-icon-8ogu7iqA.js";import{C as Ue}from"./checkbox-D0oew71k.js";import{d as re,a as Rt,D as Ut,c as Wt}from"./dropdown-menu-QheVZMJA.js";import{i as Xt}from"./DotsVertical-DuorjQq1.js";import{s as We}from"./Eye-IdG-7KTy.js";import{s as Xe}from"./Trash01-BFrDxOoF.js";import"./use-mcp-client-CJ_CTOi-.js";import"./auth-C9enaQvD.js";import"./ArrowUp-DH3o_6rV.js";import"./Check-CfdDVvTz.js";import"./SwitchHorizontal01-mvedp9Fy.js";import"./tooltip-B6N5kQd7.js";import"./view-mode-toggle-zUY6pa7X.js";import"./badge-BIKuZNrQ.js";import"./SearchMd-B_vHLGSV.js";import"./use-registry-connections-By2otvi-.js";import"./use-organization-settings-lcyinZ9M.js";import"./useInfiniteQuery-2fWwANBn.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./card-Dd8gUiG_.js";import"./sidebar-BssgvH2v.js";import"./LayoutLeft-DDdEDKm1.js";import"./X-BWhzmnUU.js";import"./label-BCtHDi1-.js";import"./ChevronDown-BRbMyZ1B.js";import"./ChevronUp-BT9WG4FQ.js";import"./use-collections-B-IkeUFK.js";import"./AlertCircle-C1QMMByE.js";import"./Tool01-CiB1AgGO.js";import"./Settings02-DkDTX6wF.js";import"./ArrowRight-CMDrgznR.js";import"./ArrowUpRight-ChAriHcE.js";import"./TrendUp01-CtjoH8ZL.js";import"./ZapSquare-BrF3B-Lj.js";import"./ZoomOut-HpkK_jz9.js";import"./Users03-uSqerTaX.js";import"./CheckCircle-DLrShk9W.js";import"./ChevronRight-Ck0jEpLN.js";import"./Stars02-CWszz6x7.js";import"./Copy01-Du_h2a2a.js";import"./Globe01-FT_j78GO.js";import"./FilterLines-VrXrRt9f.js";import"./Globe04-BktKmpI1.js";import"./HardDrive-y6RDSyxS.js";import"./Image01-jwttKGpp.js";import"./Key01-CTHo646W.js";import"./XCircle-C1KpQxmr.js";import"./LinkExternal01-Dw89NskH.js";import"./Monitor01-D8aw2U1c.js";import"./Sun-CKE25B6W.js";import"./Package-Bl4wI6gQ.js";import"./Palette-Bb5lq-lb.js";import"./Play-h_GYgW2i.js";import"./SearchLg-CuxPI6CH.js";import"./Shield01-BTjWMfyt.js";import"./Stars01-awBCSC7p.js";import"./Upload01-BbY627dR.js";import"./User01-JYrKFpRC.js";import"./Users01-C_vPeB-O.js";import"./Zap-yAX2Kmmw.js";import"./mcp-oauth-C4qKLSfa.js";function qt(f){const e=`deco-filters-${f}`,[n,a]=V.useState(()=>{try{const s=globalThis.localStorage?.getItem(e);if(s)return JSON.parse(s)}catch(s){console.error("Failed to parse stored filters:",s)}return[]});return[n,s=>{a(s);try{globalThis.localStorage?.setItem(e,JSON.stringify(s))}catch(i){console.error("Failed to save filters:",i)}}]}function Gt(f){const e=ne.c(7),[n,a]=V.useState(f),[o,s]=V.useState(f?"desc":null);let i;e[0]!==o||e[1]!==n?(i=j=>{n!==j?(a(j),s("asc")):o==="asc"?s("desc"):o==="desc"&&(a(void 0),s(null))},e[0]=o,e[1]=n,e[2]=i):i=e[2];const l=i;let d;return e[3]!==l||e[4]!==o||e[5]!==n?(d={sortKey:n,sortDirection:o,handleSort:l},e[3]=l,e[4]=o,e[5]=n,e[6]=d):d=e[6],d}function Qt(f){const e=ne.c(20),{namespace:n,resource:a,defaultSortKey:o,defaultViewMode:s}=f,i=o===void 0?"title":o,l=s===void 0?"table":s,[d,j]=V.useState(""),y=V.useDeferredValue(d),C=`${n}-${a}`,[S,u]=qt(C),p=`mesh-${a}-filter-visible-${n}`;let c;e[0]!==p?(c=()=>globalThis.localStorage?.getItem(p)==="true",e[0]=p,e[1]=c):c=e[1];const[v,_]=V.useState(c);let b;e[2]!==p?(b=F=>{_(F),globalThis.localStorage?.setItem(p,String(F))},e[2]=p,e[3]=b):b=e[3];const w=b;let D;e[4]!==v||e[5]!==w?(D=()=>{w(!v)},e[4]=v,e[5]=w,e[6]=D):D=e[6];const r=D,[I,$]=xt(`mesh-${a}-${n}`,l),{sortKey:L,sortDirection:T,handleSort:O}=Gt(i),k=L;let M;return e[7]!==v||e[8]!==S||e[9]!==O||e[10]!==d||e[11]!==y||e[12]!==w||e[13]!==u||e[14]!==$||e[15]!==T||e[16]!==k||e[17]!==r||e[18]!==I?(M={search:d,searchTerm:y,setSearch:j,filters:S,setFilters:u,filterBarVisible:v,setFilterBarVisible:w,toggleFilterBar:r,viewMode:I,setViewMode:$,sortKey:k,sortDirection:T,handleSort:O},e[7]=v,e[8]=S,e[9]=O,e[10]=d,e[11]=y,e[12]=w,e[13]=u,e[14]=$,e[15]=T,e[16]=k,e[17]=r,e[18]=I,e[19]=M):M=e[19],M}function Jt(f){const e=ne.c(20),{open:n,onOpenChange:a,count:o,onConfirm:s}=f,i=o!==1?"s":"";let l;e[0]!==o||e[1]!==i?(l=t.jsxs(Ae,{children:["Delete ",o," connection",i,"?"]}),e[0]=o,e[1]=i,e[2]=l):l=e[2];const d=o!==1?"s":"";let j;e[3]!==d?(j=t.jsxs(Te,{children:["This will permanently delete the selected connection",d,". This action cannot be undone."]}),e[3]=d,e[4]=j):j=e[4];let y;e[5]!==l||e[6]!==j?(y=t.jsxs(we,{children:[l,j]}),e[5]=l,e[6]=j,e[7]=y):y=e[7];let C;e[8]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Ie,{children:"Cancel"}),e[8]=C):C=e[8];const S=o!==1?"s":"";let u;e[9]!==o||e[10]!==s||e[11]!==S?(u=t.jsxs(Pe,{children:[C,t.jsxs($e,{onClick:s,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:["Delete ",o," connection",S]})]}),e[9]=o,e[10]=s,e[11]=S,e[12]=u):u=e[12];let p;e[13]!==y||e[14]!==u?(p=t.jsxs(Oe,{children:[y,u]}),e[13]=y,e[14]=u,e[15]=p):p=e[15];let c;return e[16]!==a||e[17]!==n||e[18]!==p?(c=t.jsx(Le,{open:n,onOpenChange:a,children:p}),e[16]=a,e[17]=n,e[18]=p,e[19]=c):c=e[19],c}function Yt(f){return f._registryId?.includes("community-registry")===!0}function Zt(f){const e=ne.c(58),{item:n,canManage:a,allConnections:o,connectedAppNames:s,connectingItemId:i,onNavigateConnected:l,onConnect:d}=f,[j,y]=V.useState(!1),[C,S]=V.useState(null);let u,p;e[0]!==s||e[1]!==n?(u=De(n)??"",p=s.has(u),e[0]=s,e[1]=n,e[2]=u,e[3]=p):(u=e[2],p=e[3]);const c=p,v=n._meta?.["mcp.mesh"],_=v?.friendlyName||v?.friendly_name||n.server?.title||n.title||n.server?.name||n.name||n.id||"",b=n.server?.description||n.description||null;let w;e[4]!==n.server?.icons?.[0]?.src||e[5]!==n.server?.repository?(w=n.server?.icons?.[0]?.src||ot(n.server?.repository)||null,e[4]=n.server?.icons?.[0]?.src,e[5]=n.server?.repository,e[6]=w):w=e[6];const D=w;let r;if(e[7]!==o||e[8]!==u){let A;e[10]!==u?(A=oe=>oe.connection_type!=="VIRTUAL"&&oe.app_name===u,e[10]=u,e[11]=A):A=e[11],r=o.filter(A),e[7]=o,e[8]=u,e[9]=r}else r=e[9];const I=r;let $;e[12]!==n?($=Yt(n),e[12]=n,e[13]=$):$=e[13];const L=$;let T,O;e[14]!==I||e[15]!==a||e[16]!==L||e[17]!==c||e[18]!==n||e[19]!==d||e[20]!==l?(T=()=>{if(c){const A=I[0];A&&l(A);return}a&&O()},O=()=>{L?(S("connect"),y(!0)):d(n)},e[14]=I,e[15]=a,e[16]=L,e[17]=c,e[18]=n,e[19]=d,e[20]=l,e[21]=T,e[22]=O):(T=e[21],O=e[22]);let k;e[23]!==n||e[24]!==d||e[25]!==C?(k=()=>{te("connections_community_warning_confirmed",{registry_item_id:n.id}),y(!1),C==="connect"&&d(n),S(null)},e[23]=n,e[24]=d,e[25]=C,e[26]=k):k=e[26];const M=k;let F;e[27]!==b||e[28]!==D||e[29]!==_?(F={title:_,description:b,icon:D},e[27]=b,e[28]=D,e[29]=_,e[30]=F):F=e[30];let q;e[31]===Symbol.for("react.memo_cache_sentinel")?(q=t.jsx(he,{}),e[31]=q):q=e[31];let R;e[32]!==L||e[33]!==n._sourceIcon?(R=L&&n._sourceIcon&&t.jsx("img",{src:n._sourceIcon,alt:"Community",className:"size-4 rounded-sm object-contain"}),e[32]=L,e[33]=n._sourceIcon,e[34]=R):R=e[34];let W;e[35]!==a||e[36]!==i||e[37]!==O||e[38]!==c||e[39]!==n.id?(W=c?t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Connected"}):a&&t.jsx(K,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:i!==null,onClick:A=>{A.stopPropagation(),O()},children:i===n.id?t.jsx(ae,{size:14,className:"animate-spin"}):"Connect"}),e[35]=a,e[36]=i,e[37]=O,e[38]=c,e[39]=n.id,e[40]=W):W=e[40];let g;e[41]!==R||e[42]!==W?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[R,W]}),e[41]=R,e[42]=W,e[43]=g):g=e[43];let N;e[44]!==T||e[45]!==g||e[46]!==F?(N=t.jsx(Ce,{connection:F,fallbackIcon:q,onClick:T,headerActionsAlwaysVisible:!0,headerActions:g}),e[44]=T,e[45]=g,e[46]=F,e[47]=N):N=e[47];let z;e[48]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsxs(we,{children:[t.jsx(Ae,{children:"Community MCP Server"}),t.jsx(Te,{children:"This MCP server is from the Community MCP Registry and is not maintained or verified by Deco. Community servers may have varying levels of quality, security, and reliability. Proceed with caution and review the server details before connecting."})]}),e[48]=z):z=e[48];let H;e[49]===Symbol.for("react.memo_cache_sentinel")?(H=t.jsx(Ie,{children:"Cancel"}),e[49]=H):H=e[49];let E;e[50]!==M?(E=t.jsxs(Oe,{children:[z,t.jsxs(Pe,{children:[H,t.jsx($e,{onClick:M,children:"Continue"})]})]}),e[50]=M,e[51]=E):E=e[51];let h;e[52]!==j||e[53]!==E?(h=t.jsx(Le,{open:j,onOpenChange:y,children:E}),e[52]=j,e[53]=E,e[54]=h):h=e[54];let P;return e[55]!==N||e[56]!==h?(P=t.jsxs(t.Fragment,{children:[N,h]}),e[55]=N,e[56]=h,e[57]=P):P=e[57],P}function qe(f){const e=ne.c(8),{selectionMode:n,children:a}=f,o=n?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100";let s;e[0]!==o?(s=ge("overflow-hidden transition-all duration-150 ease-out",o),e[0]=o,e[1]=s):s=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Rt,{asChild:!0,children:t.jsx(K,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:tn,children:t.jsx(Xt,{size:20})})}),e[2]=i):i=e[2];let l;e[3]!==a?(l=t.jsxs(Ut,{children:[i,t.jsx(Wt,{align:"end",onClick:en,children:a})]}),e[3]=a,e[4]=l):l=e[4];let d;return e[5]!==s||e[6]!==l?(d=t.jsx("div",{className:s,children:l}),e[5]=s,e[6]=l,e[7]=d):d=e[7],d}function en(f){return f.stopPropagation()}function tn(f){return f.stopPropagation()}function nn(f){const e=ne.c(49),{group:n,onOpen:a,selectionMode:o,selectedIds:s,onToggleSelect:i}=f;let l;if(e[0]!==n.connections||e[1]!==s){let k;e[3]!==s?(k=M=>s.has(M.id),e[3]=s,e[4]=k):k=e[4],l=n.connections.every(k),e[0]=n.connections,e[1]=s,e[2]=l}else l=e[2];const d=l;let j;if(e[5]!==n.connections||e[6]!==s){let k;e[8]!==s?(k=M=>s.has(M.id),e[8]=s,e[9]=k):k=e[9],j=n.connections.some(k),e[5]=n.connections,e[6]=s,e[7]=j}else j=e[7];const y=j;let C;e[10]!==d||e[11]!==n.connections||e[12]!==i||e[13]!==s?(C=()=>{for(const k of n.connections)d?s.has(k.id)&&i(k.id):s.has(k.id)||i(k.id)},e[10]=d,e[11]=n.connections,e[12]=i,e[13]=s,e[14]=C):C=e[14];const S=C,u=`${n.connections.length} instances`;let p;e[15]!==n.icon||e[16]!==n.title||e[17]!==u?(p={title:n.title,icon:n.icon,description:u},e[15]=n.icon,e[16]=n.title,e[17]=u,e[18]=p):p=e[18];let c;e[19]!==a||e[20]!==o||e[21]!==S?(c=()=>o?S():a(),e[19]=a,e[20]=o,e[21]=S,e[22]=c):c=e[22];const v=o&&d&&"ring-2 ring-primary",_=o&&y&&!d&&"ring-1 ring-primary/50";let b;e[23]!==v||e[24]!==_?(b=ge(v,_),e[23]=v,e[24]=_,e[25]=b):b=e[25];let w;e[26]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(he,{}),e[26]=w):w=e[26];let D;e[27]!==d||e[28]!==n.connections.length||e[29]!==o||e[30]!==y||e[31]!==S?(D=o?t.jsx(Ue,{checked:d?!0:y?"indeterminate":!1,onCheckedChange:S}):t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Connected"}),t.jsxs("span",{className:"text-xs text-muted-foreground font-normal tabular-nums",children:["x",n.connections.length]})]}),e[27]=d,e[28]=n.connections.length,e[29]=o,e[30]=y,e[31]=S,e[32]=D):D=e[32];let r;e[33]!==a?(r=k=>{k.stopPropagation(),a()},e[33]=a,e[34]=r):r=e[34];let I;e[35]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(We,{size:16}),e[35]=I):I=e[35];let $;e[36]!==r?($=t.jsxs(re,{onClick:r,children:[I,"Open"]}),e[36]=r,e[37]=$):$=e[37];let L;e[38]!==o||e[39]!==$?(L=t.jsx(qe,{selectionMode:o,children:$}),e[38]=o,e[39]=$,e[40]=L):L=e[40];let T;e[41]!==D||e[42]!==L?(T=t.jsxs("div",{className:"flex items-center gap-1",children:[D,L]}),e[41]=D,e[42]=L,e[43]=T):T=e[43];let O;return e[44]!==T||e[45]!==p||e[46]!==c||e[47]!==b?(O=t.jsx(t.Fragment,{children:t.jsx(Ce,{connection:p,onClick:c,className:b,fallbackIcon:w,headerActionsAlwaysVisible:!0,headerActions:T})}),e[44]=T,e[45]=p,e[46]=c,e[47]=b,e[48]=O):O=e[48],O}function sn(f){const e=ne.c(29),{connection:n,isSelected:a,selectionMode:o,canManage:s,canManageAgents:i,onToggleSelect:l,onOpen:d,onToggleStatus:j,onDelete:y}=f;let C;e[0]!==a||e[1]!==l||e[2]!==o?(C=o?t.jsx(Ue,{checked:a,onCheckedChange:l,onClick:on}):t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Connected"}),e[0]=a,e[1]=l,e[2]=o,e[3]=C):C=e[3];let S;e[4]!==d?(S=D=>{D.stopPropagation(),d()},e[4]=d,e[5]=S):S=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(We,{size:16}),e[6]=u):u=e[6];let p;e[7]!==S?(p=t.jsxs(re,{onClick:S,children:[u,"Open"]}),e[7]=S,e[8]=p):p=e[8];let c;e[9]!==s||e[10]!==i||e[11]!==l?(c=(s||i)&&t.jsxs(re,{onClick:D=>{D.stopPropagation(),l()},children:[t.jsx(Lt,{size:16}),"Select"]}),e[9]=s,e[10]=i,e[11]=l,e[12]=c):c=e[12];let v;e[13]!==s||e[14]!==n||e[15]!==j?(v=s&&(n.status==="active"?t.jsxs(re,{onClick:D=>{D.stopPropagation(),j("inactive")},children:[t.jsx($t,{size:16}),"Disable"]}):t.jsxs(re,{onClick:D=>{D.stopPropagation(),j("active")},children:[t.jsx(Ot,{size:16}),"Enable"]})),e[13]=s,e[14]=n,e[15]=j,e[16]=v):v=e[16];let _;e[17]!==s||e[18]!==y?(_=s&&t.jsxs(re,{variant:"destructive",onClick:D=>{D.stopPropagation(),y()},children:[t.jsx(Xe,{size:16}),"Delete"]}),e[17]=s,e[18]=y,e[19]=_):_=e[19];let b;e[20]!==o||e[21]!==p||e[22]!==c||e[23]!==v||e[24]!==_?(b=t.jsxs(qe,{selectionMode:o,children:[p,c,v,_]}),e[20]=o,e[21]=p,e[22]=c,e[23]=v,e[24]=_,e[25]=b):b=e[25];let w;return e[26]!==C||e[27]!==b?(w=t.jsxs("div",{className:"flex items-center gap-1",children:[C,b]}),e[26]=C,e[27]=b,e[28]=w):w=e[28],w}function on(f){return f.stopPropagation()}function rn(f){const e=ne.c(23),{count:n,total:a,canManage:o,canManageAgents:s,onSelectAll:i,onDeselectAll:l,onDelete:d,onAddToAgent:j,onToggleStatus:y,onCancel:C}=f;if(n===0)return null;let S;e[0]!==n?(S=t.jsxs("div",{className:"text-xs text-muted-foreground pr-1 tabular-nums",children:[n," selected"]}),e[0]=n,e[1]=S):S=e[1];let u;e[2]!==n||e[3]!==l||e[4]!==i||e[5]!==a?(u=n<a?t.jsxs(K,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:i,children:["Select all (",a,")"]}):t.jsx(K,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:l,children:"Clear selection"}),e[2]=n,e[3]=l,e[4]=i,e[5]=a,e[6]=u):u=e[6];let p;e[7]!==s||e[8]!==j?(p=s&&t.jsxs(K,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:j,children:[t.jsx(He,{size:13}),"Add to Agent"]}),e[7]=s,e[8]=j,e[9]=p):p=e[9];let c;e[10]!==o||e[11]!==d||e[12]!==y?(c=o&&t.jsxs(t.Fragment,{children:[t.jsx(K,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>y("active"),children:"Enable"}),t.jsx(K,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>y("inactive"),children:"Disable"}),t.jsxs(K,{variant:"destructive",size:"sm",className:"h-7 text-xs px-2",onClick:d,children:[t.jsx(Xe,{size:13}),"Delete"]})]}),e[10]=o,e[11]=d,e[12]=y,e[13]=c):c=e[13];let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Re,{size:13}),e[14]=v):v=e[14];let _;e[15]!==C?(_=t.jsx(K,{variant:"ghost",size:"sm",className:"h-7 text-xs px-2",onClick:C,children:v}),e[15]=C,e[16]=_):_=e[16];let b;return e[17]!==S||e[18]!==u||e[19]!==p||e[20]!==c||e[21]!==_?(b=t.jsx("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2",children:t.jsxs("div",{className:"rounded-xl border border-border bg-background/95 shadow-lg backdrop-blur px-3 py-2 flex items-center gap-2",children:[S,u,p,c,_]})}),e[17]=S,e[18]=u,e[19]=p,e[20]=c,e[21]=_,e[22]=b):b=e[22],b}function ln(f){const e=ne.c(25),{open:n,onOpenChange:a,agents:o,onConfirm:s}=f,[i,l]=V.useState(null);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsxs(Me,{children:[t.jsx(Fe,{children:"Add to Agent"}),t.jsx(ze,{children:"Select an agent to add the selected connections to."})]}),e[0]=d):d=e[0];let j;e[1]!==o||e[2]!==i?(j=o.length===0?t.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No agents found"}):o.map(b=>t.jsxs("button",{type:"button",onClick:()=>l(b.id),className:ge("flex items-center gap-3 w-full rounded-md px-3 py-2 text-left transition-colors",i===b.id?"bg-primary/10 ring-1 ring-primary":"hover:bg-muted/50"),children:[t.jsx(Ht,{icon:b.icon,name:b.title,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:b.title}),b.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:b.description})]})]},b.id)),e[1]=o,e[2]=i,e[3]=j):j=e[3];let y;e[4]!==j?(y=t.jsx("div",{className:"max-h-60 overflow-auto py-2 space-y-1",children:j}),e[4]=j,e[5]=y):y=e[5];let C;e[6]!==a?(C=t.jsx(K,{variant:"outline",onClick:()=>a(!1),children:"Cancel"}),e[6]=a,e[7]=C):C=e[7];const S=!i;let u;e[8]!==s||e[9]!==a||e[10]!==i?(u=()=>{i&&(s(i),a(!1),l(null))},e[8]=s,e[9]=a,e[10]=i,e[11]=u):u=e[11];let p;e[12]!==S||e[13]!==u?(p=t.jsx(K,{disabled:S,onClick:u,children:"Add"}),e[12]=S,e[13]=u,e[14]=p):p=e[14];let c;e[15]!==C||e[16]!==p?(c=t.jsxs(Ve,{children:[C,p]}),e[15]=C,e[16]=p,e[17]=c):c=e[17];let v;e[18]!==y||e[19]!==c?(v=t.jsxs(Ee,{className:"sm:max-w-[400px]",children:[d,y,c]}),e[18]=y,e[19]=c,e[20]=v):v=e[20];let _;return e[21]!==a||e[22]!==n||e[23]!==v?(_=t.jsx(Be,{open:n,onOpenChange:a,children:v}),e[21]=a,e[22]=n,e[23]=v,e[24]=_):_=e[24],_}function cn({listState:f,activeTab:e,typeFilter:n,statusFilter:a,registryFilter:o,enabledRegistries:s}){const{org:i}=be(),l=nt(),d=_e(),{data:j}=Ne.useSession(),y=Ke(),C=wt(f),S=pt(),{granted:u}=ye("connections:manage"),{granted:p}=ye("agents:manage"),[c,v]=V.useState(new Set),_=c.size>0,[b,w]=V.useState(!1),[D,r]=V.useState(!1),[I,$]=V.useState(null),L=It(),T=C.filter(m=>!(n!=="ALL"&&m.connection_type!==n||a!=="ALL"&&m.status!==a)),O=mt(T),k=m=>{v(x=>{const B=new Set(x);return B.has(m)?B.delete(m):B.add(m),B})},M=()=>{v(new Set)},F=ke(s,f.searchTerm),q=F.items,R=ht(F.loadMore,F.hasMore,F.isLoadingMore),W=new Set(C.filter(m=>m.app_name).map(m=>m.app_name)),g=o==="ALL"||s.some(m=>m.id===o)?o:"ALL",N=f.search.length>0,z=e==="all"||N?q.filter(m=>{if(g!=="ALL"&&m._registryId!==g)return!1;if(N){const x=De(m);if(x&&W.has(x))return!1}return!0}):[],H=e==="connected"||N?O:[],E=async m=>{if(!(!i||!j?.user?.id)){te("connection_add_clicked",{action:"connect_new",registry_item_id:m.id,source:"connections_page"}),$(m.id);try{const x=rt(m,i.id,j.user.id,{remoteIndex:0}),B=x.connection_type==="STDIO",G=!!x.connection_url,X=B&&x.connection_headers&&typeof x.connection_headers=="object"&&"command"in x.connection_headers;if(!G&&!X){U.error("This MCP Server cannot be connected: no connection method available"),$(null);return}const{id:se}=await y.create.mutateAsync(x),le=await Kt({connectionId:se,orgId:i.id,orgSlug:i.slug,persistFallback:fe=>y.update.mutateAsync({id:se,data:{connection_token:fe}}).then(()=>{})});if(le.ran&&!le.ok){te("connection_oauth_failed",{connection_id:se,flow:"connections_page_connect",error:le.error??"no_token"}),U.error(`Authentication failed: ${le.error??"no token received"}`);return}if(le.ran){te("connection_oauth_succeeded",{connection_id:se,flow:"connections_page_connect"});const fe=new URL(`/api/${i.slug}/mcp/${se}`,window.location.origin);await l.invalidateQueries({queryKey:st.isMCPAuthenticated(fe.href,null)}),P(),U.success("Authentication successful")}U.success("Connected successfully")}catch(x){U.error(`Failed to connect: ${x instanceof Error?x.message:String(x)}`)}finally{$(null)}}},h=Pt(),P=()=>{l.invalidateQueries({predicate:m=>{const x=m.queryKey;return x[1]===i.id&&x[3]==="collection"&&x[4]==="CONNECTIONS"}})},A=async()=>{w(!1);const m=[...c];te("connections_bulk_delete",{count:m.length});let x=0;for(const B of m)try{await h.call("COLLECTION_CONNECTIONS_DELETE",{id:B,force:!0}),x++}catch{}P(),U.success(`Deleted ${x} connection${x!==1?"s":""}`),M()},oe=async(m,x)=>{try{await y.update.mutateAsync({id:m,data:{status:x}}),P(),U.success(x==="active"?"Connection enabled":"Connection disabled")}catch{U.error("Failed to update connection")}},xe=async m=>{const x=[...c];te("connections_bulk_status_toggled",{count:x.length,to_status:m});let B=0;for(const G of x)try{await y.update.mutateAsync({id:G,data:{status:m}}),B++}catch{}P(),U.success(`${m==="active"?"Enabled":"Disabled"} ${B} connection${B!==1?"s":""}`),M()},de=async m=>{const x=L.find(X=>X.id===m);if(!x)return;te("connections_bulk_add_to_agent",{agent_id:m,count:c.size});const B=new Set(x.connections.map(X=>X.connection_id)),G=[...c].filter(X=>!B.has(X)).map(X=>({connection_id:X,selected_tools:null,selected_resources:null,selected_prompts:null}));if(G.length===0){U.info("All selected connections are already in that agent");return}try{await h.call("COLLECTION_VIRTUAL_MCP_UPDATE",{id:m,data:{connections:[...x.connections,...G]}}),l.invalidateQueries({predicate:X=>{const se=X.queryKey;return se[1]===i.id&&se[3]==="collection"&&se[4]==="VIRTUAL_MCP"}}),U.success(`Added ${G.length} connection${G.length!==1?"s":""} to "${x.title}"`),M()}catch{U.error("Failed to add connections to agent")}};return t.jsxs(t.Fragment,{children:[t.jsx(gt,{...S}),t.jsx(Jt,{open:b,onOpenChange:w,count:c.size,onConfirm:A}),t.jsx(ln,{open:D,onOpenChange:r,agents:L,onConfirm:de}),F.isInitialLoading&&e==="all"?t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ae,{size:32,className:"animate-spin text-muted-foreground"})}):t.jsx("div",{children:(N?z.length===0&&T.length===0:e==="all"?z.length===0:T.length===0)?t.jsx(ut,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),title:"No Connections found",description:f.search?`No Connections match "${f.search}"`:u?"Create a connection to get started.":"Ask an organization admin to add one."}):t.jsxs("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:[H.map(m=>{if(m.type==="group")return t.jsx(nn,{group:m,onOpen:()=>{d({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:m.key}})},selectionMode:_,selectedIds:c,onToggleSelect:k},m.key);const x=m.connection,B=c.has(x.id);return t.jsx(Ce,{connection:x,fallbackIcon:t.jsx(he,{}),onClick:()=>_?k(x.id):d({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:pe(x)}}),className:ge(B&&"ring-2 ring-primary bg-primary/5"),headerActionsAlwaysVisible:!0,headerActions:t.jsx(sn,{connection:x,isSelected:B,selectionMode:_,canManage:u,canManageAgents:p,onToggleSelect:()=>k(x.id),onOpen:()=>d({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:pe(x)}}),onToggleStatus:G=>oe(x.id,G),onDelete:()=>S.requestDelete(x)})},x.id)}),z.map(m=>t.jsx(Zt,{item:m,canManage:u,allConnections:C,connectedAppNames:W,connectingItemId:I,onNavigateConnected:x=>d({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:pe(x)}}),onConnect:E},`catalog-${m._registryId}:${m.id}`)),(e==="all"||N)&&s.length>0&&t.jsx("div",{ref:R,className:"col-span-full h-4"}),(e==="all"||N)&&F.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(ae,{size:24,className:"animate-spin text-muted-foreground"})})]})}),_&&t.jsx(rn,{count:c.size,total:T.length,canManage:u,canManageAgents:p,onSelectAll:()=>{v(new Set(T.map(m=>m.id)))},onDeselectAll:()=>v(new Set),onDelete:()=>w(!0),onAddToAgent:()=>r(!0),onToggleStatus:xe,onCancel:M})]})}function an(){const{org:f}=be(),e=_e(),n=Qe({strict:!1}),{data:a}=Ne.useSession(),{stdioEnabled:o}=Je(),s=_t(),{granted:i}=ye("connections:manage"),l=Qt({namespace:f.slug,resource:"connections"}),d=Ke(),[j,y]=Ye(Ze.connectionsTab(f.slug),g=>n.tab==="all"||n.tab==="connected"?n.tab:g??"all"),[C,S]=V.useState("ALL"),[u,p]=V.useState("ALL"),[c,v]=V.useState("ALL"),_=dt(),w=ke(_,l.searchTerm).items,D=l.search!==l.searchTerm,r=et({resolver:tt(zt),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),I=r.watch("ui_type"),$=r.watch("connection_url"),L=r.watch("npx_package"),T=ue({uiType:I,connectionUrl:$??"",npxPackage:L??""})??ve({uiType:I,connectionUrl:$??"",registryItems:w}),O=i&&n.action==="create",k=()=>{te("connections_custom_dialog_opened",{source:"connections_page"}),e({to:"/$org/settings/connections",params:{org:f.slug},search:{action:"create"}})},M=()=>{e({to:"/$org/settings/connections",params:{org:f.slug},search:{}})},F=async g=>{let N,z=null,H=null,E=null;g.ui_type==="NPX"?(N="STDIO",z="",E=Et(g.npx_package||"",g.env_vars||[])):g.ui_type==="STDIO"?(N="STDIO",z="",E=Bt(g.stdio_command||"",g.stdio_args||"",g.stdio_cwd,g.env_vars||[])):(N=g.ui_type,z=g.connection_url||"",H=g.connection_token||null);const h=it("conn");te("connection_custom_created",{connection_type:N,ui_type:g.ui_type}),await d.create.mutateAsync({id:h,title:g.title,description:g.description||null,connection_type:N,connection_url:z,connection_token:H,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:a?.user?.id||"system",organization_id:f.id,icon:g.icon??null,app_name:null,app_id:null,connection_headers:E,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),M(),r.reset(),e({to:"/$org/settings/connections/$appSlug",params:{org:f.slug,appSlug:pe({app_name:null,connection_url:z,title:g.title,id:h})}})},q=g=>{g||(O&&M(),r.reset())},R=g=>{const N=g.trim();if(!N)return;const z=!!r.formState.dirtyFields.title,H=!!r.formState.dirtyFields.description,E=!!r.formState.dirtyFields.env_vars,h=A=>{if(A&&(!z&&!r.getValues("title").trim()&&A.title&&r.setValue("title",A.title,{shouldDirty:!1}),!H&&!(r.getValues("description")??"").trim()&&A.description&&r.setValue("description",A.description,{shouldDirty:!1}),!E&&A.envVarKeys?.length)){const oe=r.getValues("env_vars")??[],xe=new Set(oe.map(m=>m.key)),de=A.envVarKeys.filter(m=>!xe.has(m));de.length>0&&r.setValue("env_vars",[...oe,...de.map(m=>({key:m,value:""}))],{shouldDirty:!0})}},P=Vt(N);if(P&&o){r.setValue("ui_type","NPX",{shouldDirty:!0}),r.setValue("npx_package",P.packageName,{shouldDirty:!0}),r.setValue("connection_url","",{shouldDirty:!0}),r.setValue("connection_token",null,{shouldDirty:!0}),h(ue({uiType:"NPX",npxPackage:P.packageName}));return}if(N.startsWith("http://")||N.startsWith("https://")){const A=I==="HTTP"||I==="SSE"||I==="Websocket"?I:"HTTP";r.setValue("ui_type",A,{shouldDirty:!0}),r.setValue("connection_url",N,{shouldDirty:!0}),h(ue({uiType:A,connectionUrl:N})??ve({uiType:A,connectionUrl:N,registryItems:w}));return}I==="NPX"&&h(ue({uiType:"NPX",npxPackage:N}))},W=i?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(K,{variant:"outline",onClick:k,children:[t.jsx(He,{size:14,className:"sm:hidden"}),t.jsx("span",{className:"hidden sm:inline",children:"Custom Connection"})]})}):null;return t.jsx(t.Fragment,{children:t.jsxs(me,{children:[(()=>{const g="Create Connection",N="Create a custom connection in your organization. Fill in the details below.",z=r.formState.isSubmitting?"Saving...":"Create Connection",H=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(Q,{control:r.control,name:"ui_type",render:({field:h})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Type *"}),t.jsxs(Nt,{value:h.value,onValueChange:h.onChange,children:[t.jsx(Z,{children:t.jsx(Dt,{children:t.jsx(kt,{})})}),t.jsxs(At,{children:[t.jsx(ce,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(ce,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(ce,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"Websocket"]})}),o&&t.jsxs(t.Fragment,{children:[t.jsx(ce,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(he,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(ce,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Mt,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(ee,{})]})}),I==="NPX"&&t.jsx(Q,{control:r.control,name:"npx_package",render:({field:h})=>t.jsxs(J,{children:[t.jsx(Y,{children:"NPM Package *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"@perplexity-ai/mcp-server",...h,value:h.value??"",onPaste:P=>{const A=P.clipboardData.getData("text");A&&(P.preventDefault(),r.setValue("npx_package",A.trim(),{shouldDirty:!0}),R(A))},onBlur:P=>{R(P.target.value),h.onBlur()}})}),t.jsx(ee,{})]})}),I==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(Q,{control:r.control,name:"stdio_command",render:({field:h})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Command *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"node, bun, python...",...h,value:h.value??""})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:r.control,name:"stdio_args",render:({field:h})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Arguments"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"arg1 arg2 --flag value",...h,value:h.value??""})}),t.jsx(ee,{})]})})]}),t.jsx(Q,{control:r.control,name:"stdio_cwd",render:({field:h})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Working Directory"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"/path/to/project (optional)",...h,value:h.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),t.jsx(ee,{})]})})]}),(I==="NPX"||I==="STDIO")&&t.jsx(Q,{control:r.control,name:"env_vars",render:({field:h})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Environment Variables"}),t.jsx(Z,{children:t.jsx(Ft,{value:h.value??[],onChange:h.onChange})}),t.jsx(ee,{})]})}),I!=="NPX"&&I!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(Q,{control:r.control,name:"connection_url",render:({field:h})=>t.jsxs(J,{children:[t.jsx(Y,{children:"URL *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"https://example.com/mcp",...h,value:h.value??"",onPaste:P=>{const A=P.clipboardData.getData("text");A&&(P.preventDefault(),r.setValue("connection_url",A.trim(),{shouldDirty:!0}),R(A))},onBlur:P=>{R(P.target.value),h.onBlur()}})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:r.control,name:"connection_token",render:({field:h})=>t.jsxs(J,{children:[t.jsx(Y,{children:T?.token?.label??"Token (optional)"}),t.jsx(Z,{children:t.jsx(ie,{type:"password",placeholder:T?.token?.placeholder??"Bearer token or API key",...h,value:h.value??""})}),T?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[T.token.helperText,T.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),t.jsx(ee,{})]})})]}),t.jsx(Q,{control:r.control,name:"title",render:({field:h})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Name *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"My Connection",...h})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:r.control,name:"description",render:({field:h})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Description"}),t.jsx(Z,{children:t.jsx(Tt,{placeholder:"A brief description of this connection",rows:3,...h,value:h.value??""})}),t.jsx(ee,{})]})})]}),E=O;return s?t.jsx(ft,{open:E,onOpenChange:q,children:t.jsxs(jt,{className:"max-h-[90vh]",children:[t.jsx(yt,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(Ct,{children:g}),t.jsx(St,{className:"mt-1",children:N})]}),t.jsx(vt,{asChild:!0,children:t.jsx(K,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(Re,{size:16})})})]})}),t.jsx(Se,{...r,children:t.jsxs("form",{onSubmit:r.handleSubmit(F),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:H}),t.jsx(bt,{children:t.jsx(K,{type:"submit",disabled:r.formState.isSubmitting,className:"w-full",children:z})})]})})]})}):t.jsx(Be,{open:E,onOpenChange:q,children:t.jsxs(Ee,{className:"sm:max-w-[525px]",children:[t.jsxs(Me,{children:[t.jsx(Fe,{children:g}),t.jsx(ze,{children:N})]}),t.jsx(Se,{...r,children:t.jsxs("form",{onSubmit:r.handleSubmit(F),children:[t.jsx("div",{className:"py-4",children:H}),t.jsxs(Ve,{children:[t.jsx(K,{type:"button",variant:"outline",onClick:()=>q(!1),children:"Cancel"}),t.jsx(K,{type:"submit",disabled:r.formState.isSubmitting,className:"min-w-40",children:z})]})]})})]})})})(),t.jsx(me.Content,{children:t.jsx(me.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(me.Title,{children:"Connections"}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(ct,{value:l.search,onChange:l.setSearch,placeholder:"Search for a connection",className:"w-full md:w-[375px]",onKeyDown:g=>{g.key==="Escape"&&(l.setSearch(""),g.target.blur())}}),t.jsx(lt,{sortKey:l.sortKey,sortDirection:l.sortDirection,onSort:l.handleSort,sortOptions:[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"connection_type",label:"Type"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],filters:[{label:"Type",value:C,onChange:g=>S(g||"ALL"),options:[{id:"ALL",label:"All"},{id:"HTTP",label:"HTTP"},{id:"SSE",label:"SSE"},{id:"Websocket",label:"WebSocket"},{id:"STDIO",label:"STDIO"}]},{label:"Status",value:u,onChange:g=>p(g||"ALL"),options:[{id:"ALL",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"},{id:"error",label:"Error"}]},..._.length>1?[{label:"Registry",value:c,onChange:g=>v(g||"ALL"),options:[{id:"ALL",label:"All registries"},..._.map(g=>({id:g.id,label:g.id.includes("community-registry")?"Community MCP Registry":g.title}))]}]:[]]})]}),W]}),t.jsx(at,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:j,onTabChange:g=>{const N=g;N!==j&&te("connections_page_tab_changed",{to_tab:N}),y(N)}}),t.jsx(V.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ae,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx("div",{style:{opacity:D?.5:1,transition:D?"opacity 0.2s 0.2s linear":"opacity 0s 0s linear",pointerEvents:D?"none":"auto"},children:t.jsx(cn,{listState:l,activeTab:j,typeFilter:C,statusFilter:u,registryFilter:c,enabledRegistries:_})})})]})})})]})})}function Qs(){const f=ne.c(1);let e;return f[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ge,{children:t.jsx(V.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ae,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(an,{})})}),f[0]=e):e=f[0],e}export{Qs as default};
|
package/dist/client/assets/{decopilot-sse-pool-CEQrv8Fn.js → decopilot-sse-pool-D92X3fNc.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-CIFSbzEF.js";import{e as k}from"./backoff-CrEUbyZT.js";const v={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},h=Object.values(v),R="super-agent",S="task-board.item.updated",b="task-board.item.deleted",N=3e4,g=1e3;function O(n){const{buildUrl:d,eventTypes:u,name:a,crossTab:f=!1}=n,o=new Map,i=f&&typeof BroadcastChannel<"u"&&typeof navigator<"u"&&typeof navigator.locks<"u";if(i&&!a)throw new Error("createSSESubscription: `name` is required when crossTab");function l(e,t){e.bootDone=!0;for(const s of e.handlers)try{s(t)}catch{}}function p(e){for(const t of e.reconnectHandlers)try{t()}catch{}}function E(e){const t=new EventSource(d(e.key));e.es=t,t.onopen=()=>{e.reconnectAttempt=0,e.bootDone&&(p(e),e.channel?.postMessage({kind:"reconnect"})),e.bootDone=!0},t.onerror=()=>{e.es===t&&t.readyState===EventSource.CLOSED&&m(e)};const s=r=>{e.channel?.postMessage({kind:"event",type:r.type,data:r.data}),l(e,r)};for(const r of u)t.addEventListener(r,s)}function m(e){if(e.refCount<=0||e.reconnectTimer)return;const t=k(N,g,e.reconnectAttempt,2,0);e.reconnectAttempt++,e.reconnectTimer=setTimeout(()=>{e.reconnectTimer=null,!(e.refCount<=0||!e.isLeader)&&(e.es?.close(),E(e))},t)}function T(e){if(e.refCount<=0){e.releaseLeadership?.(),e.releaseLeadership=null;return}e.isLeader=!0,E(e)}function L(e){if(!i){T(e);return}e.lockAbort=new AbortController,navigator.locks.request(`sse-leader:${a}:${e.key}`,{signal:e.lockAbort.signal},()=>new Promise(t=>{e.releaseLeadership=t,T(e)})).catch(()=>{})}function w(e,t){t.kind==="event"?l(e,new MessageEvent(t.type,{data:t.data})):t.kind==="reconnect"&&p(e)}function D(e){const t=o.get(e);if(t)return t;const s={key:e,refCount:0,handlers:new Set,reconnectHandlers:new Set,bootDone:!1,es:null,isLeader:!1,reconnectAttempt:0,reconnectTimer:null,channel:null,lockAbort:null,releaseLeadership:null};if(o.set(e,s),i){const r=new BroadcastChannel(`sse:${a}:${e}`);r.onmessage=c=>w(s,c.data),s.channel=r}return L(s),s}function y(e){e.reconnectTimer&&(clearTimeout(e.reconnectTimer),e.reconnectTimer=null),e.es?.close(),e.es=null,e.releaseLeadership?.(),e.releaseLeadership=null,e.lockAbort?.abort(),e.lockAbort=null,e.channel?.close(),e.channel=null,o.delete(e.key)}return{subscribe(e,t,s){const r=D(e);r.refCount++,r.handlers.add(t),s&&r.reconnectHandlers.add(s);let c=!1;return()=>{c||(c=!0,r.handlers.delete(t),s&&r.reconnectHandlers.delete(s),r.refCount--,r.refCount<=0&&y(r))}}}}function A(n,d){const u=new Set(d);return{subscribe(a,f,o){const i=l=>{u.has(l.type)&&f(l)};return n.subscribe(a,i,o)}}}const _=[...h,S,b],M=_,P=_,C=O({name:"watch",buildUrl:n=>`/api/${encodeURIComponent(n)}/watch?types=${M.join(",")}`,eventTypes:P,crossTab:!0}),H=A(C,[...h]),U=A(C,[S,b]),V=H;export{v as D,R as S,b as T,V as d,U as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,j as i,cL as u,l as c,F as m,cK as x,cM as j,cN as N,cP as b,cY as D,cO as g}from"./index-
|
|
1
|
+
import{c as n,j as i,cL as u,l as c,F as m,cK as x,cM as j,cN as N,cP as b,cY as D,cO as g}from"./index-CIFSbzEF.js";import{i as h}from"./X-BWhzmnUU.js";function z(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(u,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(D,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(N,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function w(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(g,{"data-slot":"dialog-close",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(b,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(g,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function T(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(m,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function O(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function P(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(j,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{O as D,R as a,k as b,P as c,T as d,z as e,y as f,v as g,B as h,w as i};
|