decocms 3.84.0 → 3.84.2
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-D7JULgSW.js → AlertCircle-W6j8H01c.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BoNegK2J.js → ArrowUpRight-CZSTSF18.js} +1 -1
- package/dist/client/assets/{CheckCircle-CubOqkhM.js → CheckCircle-CpqmJQQj.js} +1 -1
- package/dist/client/assets/{ChevronDown-bvcGltsD.js → ChevronDown-BkIuna_N.js} +1 -1
- package/dist/client/assets/{ChevronLeft-CwoAKT1V.js → ChevronLeft-B4YPm5Tt.js} +1 -1
- package/dist/client/assets/{ChevronRight-JjxX5FP7.js → ChevronRight-B06KXNz0.js} +1 -1
- package/dist/client/assets/{ChevronUp-BHC7PPdP.js → ChevronUp-zqx6ltUB.js} +1 -1
- package/dist/client/assets/{DotsVertical-lhkCwVyZ.js → DotsVertical-CnakMMTn.js} +1 -1
- package/dist/client/assets/{Eye-DDlQv8dT.js → Eye-Bu6T1cA0.js} +1 -1
- package/dist/client/assets/{FilterLines-5NaQCp3e.js → FilterLines-Ckvl4OhL.js} +1 -1
- package/dist/client/assets/{Globe01-DPxNkWN3.js → Globe01-BonH0jIg.js} +1 -1
- package/dist/client/assets/{Globe04-CfOFRbjm.js → Globe04-by7Koucw.js} +1 -1
- package/dist/client/assets/{HardDrive-Cc6TayZG.js → HardDrive-i-7mfT2M.js} +1 -1
- package/dist/client/assets/{Key01-BnvBI-54.js → Key01-CSj8veNe.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BqPxwhfG.js → LayoutLeft-DmgR4QKJ.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Cuz2KimH.js → LinkExternal01-CwjMdvmW.js} +1 -1
- package/dist/client/assets/{Monitor01-Bg2cIqWO.js → Monitor01-CwV0BvWh.js} +1 -1
- package/dist/client/assets/{Palette-DqDQ3lBi.js → Palette-DDt_6p48.js} +1 -1
- package/dist/client/assets/{Play-DJY7X3Ac.js → Play-DkjtpYqH.js} +1 -1
- package/dist/client/assets/{Plus-BPXRSHah.js → Plus-Ce8glufj.js} +1 -1
- package/dist/client/assets/{SearchMd-BzO607jf.js → SearchMd-BT20-sda.js} +1 -1
- package/dist/client/assets/{Settings02-B7JvRibZ.js → Settings02-BPKyn9lz.js} +1 -1
- package/dist/client/assets/{Shield01-CpKySeSn.js → Shield01-CouVDS_l.js} +1 -1
- package/dist/client/assets/{Star01-Ctay-f61.js → Star01-DKVn-D_o.js} +1 -1
- package/dist/client/assets/{Stars01-BvSyxIB7.js → Stars01-BZYGWgaC.js} +1 -1
- package/dist/client/assets/{Stars02-0cy3Iac4.js → Stars02-DbeWjR8E.js} +1 -1
- package/dist/client/assets/{Sun-VAruoT-r.js → Sun-J6HGala1.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B1Fi_gZm.js → SwitchHorizontal01-rjvNMlJx.js} +1 -1
- package/dist/client/assets/{Tool01-BMBmO996.js → Tool01-DthaYcRg.js} +1 -1
- package/dist/client/assets/{Trash01-bpIqJEin.js → Trash01-DHwSI6yL.js} +1 -1
- package/dist/client/assets/{Upload01-DRwUypcB.js → Upload01-ClFoMfKj.js} +1 -1
- package/dist/client/assets/{User01-CNb4uOQF.js → User01-D736U4CX.js} +1 -1
- package/dist/client/assets/{Users01-Dznayvgx.js → Users01-Cl5hK_oE.js} +1 -1
- package/dist/client/assets/{Users03-3hrg8IdJ.js → Users03-CNrhCl5t.js} +1 -1
- package/dist/client/assets/{X-BmLEy_4s.js → X-BZrTCz0a.js} +1 -1
- package/dist/client/assets/{XCircle-lg1atJo8.js → XCircle-D--nsAyg.js} +1 -1
- package/dist/client/assets/{XClose-DgeTXvEe.js → XClose-C-_BT2hv.js} +1 -1
- package/dist/client/assets/{Zap-yzjfF5fD.js → Zap-C46ZuAed.js} +1 -1
- package/dist/client/assets/{ZapSquare-CB80bsBy.js → ZapSquare-9ESQMXmQ.js} +1 -1
- package/dist/client/assets/{ZoomOut-Da8en56C.js → ZoomOut-vLQBm0K1.js} +1 -1
- package/dist/client/assets/{access-gate-BK8VNoXv.js → access-gate-BmtH13PE.js} +1 -1
- package/dist/client/assets/{add-section-modal-CIpKj9LO.js → add-section-modal-B23NOl4c.js} +1 -1
- package/dist/client/assets/{agent-icon-_F0cs0c2.js → agent-icon-ysNW4XR3.js} +1 -1
- package/dist/client/assets/agents-list-DwLDYdu-.js +1 -0
- package/dist/client/assets/ai-providers-CsiXZOzc.js +1 -0
- package/dist/client/assets/{alert-Dj9lc9TR.js → alert-Gt3FhBIl.js} +1 -1
- package/dist/client/assets/{alert-dialog-DlpOAGY3.js → alert-dialog-CnUqNj3j.js} +1 -1
- package/dist/client/assets/app-editor-DMV0TdR1.js +1 -0
- package/dist/client/assets/{auth-CX0V_g3E.js → auth-DK93vS8p.js} +1 -1
- package/dist/client/assets/{auth-catchall-Czx8XBA8.js → auth-catchall-nyWRyl5X.js} +1 -1
- package/dist/client/assets/{auth-entry-BlZh1m7O.js → auth-entry-BUS40DT5.js} +1 -1
- package/dist/client/assets/{auth-split-layout-D8DmmoYv.js → auth-split-layout-BhYYz27o.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Bb4qQGZD.js → authenticate-and-persist-oauth-C0aUigFl.js} +1 -1
- package/dist/client/assets/{automation-list-row-DikFLwfj.js → automation-list-row-SpQ0tnhR.js} +1 -1
- package/dist/client/assets/{automation-runs-z2Y1nDjt.js → automation-runs-CfMBDfe-.js} +1 -1
- package/dist/client/assets/automations-BzeXna8f.js +1 -0
- package/dist/client/assets/{avatar-DMMu0sLX.js → avatar-huYQCC56.js} +1 -1
- package/dist/client/assets/{badge-BIOaHIWt.js → badge-BZJsCOGK.js} +1 -1
- package/dist/client/assets/{block-document-xN8KRLYP.js → block-document-B6Eq8Frs.js} +1 -1
- package/dist/client/assets/brand-context-BPLyelUD.js +1 -0
- package/dist/client/assets/buckets-CM0Bz_-J.js +1 -0
- package/dist/client/assets/{capability-load-error-DRTuvJDl.js → capability-load-error-zdtgwIKk.js} +1 -1
- package/dist/client/assets/{card-CwFHuYuT.js → card-C_fehaiI.js} +1 -1
- package/dist/client/assets/category-editor-CJ6yX4lJ.js +1 -0
- package/dist/client/assets/{chat-context-dU2BBYFR.js → chat-context-DTOIbgGQ.js} +1 -1
- package/dist/client/assets/{checkbox-Cbr8t7kQ.js → checkbox-DnLV6Rmu.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CVzhF-RY.js → cli-auth-success-DPR1hSD0.js} +1 -1
- package/dist/client/assets/collection-detail-Cim85wT-.js +1 -0
- package/dist/client/assets/{collection-display-button-CTjP_ikN.js → collection-display-button-rZhSqMZx.js} +1 -1
- package/dist/client/assets/{collection-search-DUL6ybNZ.js → collection-search-Dg7QZEAU.js} +1 -1
- package/dist/client/assets/{collection-tabs-D6_rF5iF.js → collection-tabs-Y0IGnWks.js} +1 -1
- package/dist/client/assets/{command-BDSPStF6.js → command-Mfe2Oxwx.js} +1 -1
- package/dist/client/assets/commerce-onboarding-DaSLJRf_.js +1 -0
- package/dist/client/assets/{connect-desktop-dialog-CN-ahIvP.js → connect-desktop-dialog-Bbb_JMLy.js} +1 -1
- package/dist/client/assets/{connection-card-Cshe8IMI.js → connection-card-C13JH9Uu.js} +1 -1
- package/dist/client/assets/connection-detail-CctMbfAW.js +1 -0
- package/dist/client/assets/{connection-form-helpers-DNsEuVwo.js → connection-form-helpers-BGeEr2Wd.js} +1 -1
- package/dist/client/assets/connections-BvYpKMlP.js +1 -0
- package/dist/client/assets/{context-menu-BgxmhhXb.js → context-menu-CFceWO3J.js} +1 -1
- package/dist/client/assets/{decopilot-CM0ZbqCj.js → decopilot-BnK3OJqu.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DStYMiox.js → decopilot-sse-pool-DmMr9kDP.js} +1 -1
- package/dist/client/assets/{dialog-YEMhf2fI.js → dialog-CsirvbzA.js} +1 -1
- package/dist/client/assets/{domain-settings-Dp98eSJW.js → domain-settings-CxaEIq74.js} +1 -1
- package/dist/client/assets/{drawer-CbS8-Awm.js → drawer-CSBs93NV.js} +1 -1
- package/dist/client/assets/{dropdown-menu-B5yyPfJy.js → dropdown-menu-BzKQoihe.js} +1 -1
- package/dist/client/assets/{empty-state-BBWaUmc0.js → empty-state-BR0VX0WK.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DW6_hSwc.js → extract-connection-data-DQW44nI6.js} +1 -1
- package/dist/client/assets/file-explorer-Cpu1hkCX.js +2 -0
- package/dist/client/assets/{file-type-icon-CRFnZTrI.js → file-type-icon-i5WMuvux.js} +1 -1
- package/dist/client/assets/{files-BwRx28HU.js → files-kP6nL4Ar.js} +1 -1
- package/dist/client/assets/{form-uOBsFqj5.js → form-l-monXIg.js} +1 -1
- package/dist/client/assets/general-DsuHD_C8.js +1 -0
- package/dist/client/assets/{github-repo-picker-CQzVJw3M.js → github-repo-picker-PliDVstk.js} +1 -1
- package/dist/client/assets/{hooks-Bsl1fBrR.js → hooks-C_4SWVhQ.js} +1 -1
- package/dist/client/assets/{import-from-deco-dialog-CMi4FLQI.js → import-from-deco-dialog-lunP-1iA.js} +1 -1
- package/dist/client/assets/{index-DwYMCCVI.js → index-AuDyOR_l.js} +1 -1
- package/dist/client/assets/index-BiNHmVvt.js +1 -0
- package/dist/client/assets/{index-_O-v3DMq.js → index-BwAdqdD1.js} +1 -1
- package/dist/client/assets/{index-DQbPuQyy.js → index-CKMrk_Wj.js} +1 -1
- package/dist/client/assets/{index-BbZOuhzX.js → index-CsTeQeDG.js} +1 -1
- package/dist/client/assets/{index-Bnzp0u27.js → index-CuYE42R8.js} +1 -1
- package/dist/client/assets/{index-Cl2voHhm.js → index-CyuLHyxd.js} +1 -1
- package/dist/client/assets/{index-CLUU6mBc.js → index-D-Zmah9i.js} +2 -2
- package/dist/client/assets/{index-Cczp3zRq.js → index-DXKg1FOG.js} +7 -7
- package/dist/client/assets/index-DnowKw0y.js +1 -0
- package/dist/client/assets/{index-CysG6elH.js → index-DvAiMz4l.js} +2 -2
- package/dist/client/assets/{index-CEhY-HWu.js → index-NjOyHlNQ.js} +1 -1
- package/dist/client/assets/{index-Da7zBgP3.js → index-Pat3pJAq.js} +4 -4
- package/dist/client/assets/{index-BVGtxGJp.js → index-k6rfQcrz.js} +1 -1
- package/dist/client/assets/{index-redirect-D9E-kRrz.js → index-redirect-DgeRdlIs.js} +1 -1
- package/dist/client/assets/{input-JrKcP8_P.js → input-Bmgjwfqa.js} +1 -1
- package/dist/client/assets/{integration-icon-BefRgu4d.js → integration-icon-D96bHHLQ.js} +1 -1
- package/dist/client/assets/{label-DamWvDSp.js → label-2loPtYA2.js} +1 -1
- package/dist/client/assets/{login-CsrgI9dD.js → login-Cg1Bcrl3.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DggY1DlO.js → mcp-oauth-BJ20JRuX.js} +1 -1
- package/dist/client/assets/{members-DkmZZg6p.js → members-DnMehg4W.js} +2 -2
- package/dist/client/assets/{monaco-editor-D7lo6yjy.js → monaco-editor-BR3HQipt.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-B-0pMNdb.js → monitoring-stats-row-BG9ozr5G.js} +1 -1
- package/dist/client/assets/{oauth-callback-BdNMG3d8.js → oauth-callback-CzQGuv_J.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DRiOpOG0.js → oauth-callback-ai-provider-BOmB1YoX.js} +1 -1
- package/dist/client/assets/{onboarding-DpiL92Sf.js → onboarding-BdyoLRHB.js} +1 -1
- package/dist/client/assets/{org-install-BmVHa_cl.js → org-install-teVL7yA7.js} +1 -1
- package/dist/client/assets/{org-layout-D5M_L5al.js → org-layout-b5QfqYH-.js} +1 -1
- package/dist/client/assets/{organization-choice-CCRYa54g.js → organization-choice-BRL6qHcF.js} +1 -1
- package/dist/client/assets/{page-seo-form-C28dqfPj.js → page-seo-form-B4s6uf9y.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CUGGM6uP.js +1 -0
- package/dist/client/assets/{popover-BWJVGvw4.js → popover-hX7BP56v.js} +1 -1
- package/dist/client/assets/post-editor-CDf8xtN4.js +1 -0
- package/dist/client/assets/{preview-dialog-EpRi5xxw.js → preview-dialog-CKmwsLcm.js} +1 -1
- package/dist/client/assets/{primitives-BMQA8oJA.js → primitives-C__c5N9k.js} +1 -1
- package/dist/client/assets/profile-DfpVqWcb.js +1 -0
- package/dist/client/assets/project-app-view-BMvrgSd7.js +1 -0
- package/dist/client/assets/record-editor-DDtHcMLc.js +1 -0
- package/dist/client/assets/registry-Cv26vnnl.js +2 -0
- package/dist/client/assets/{registry-layout-DrMxvc62.js → registry-layout-BJfkIBEg.js} +2 -2
- package/dist/client/assets/{require-capability-DQB_sHm-.js → require-capability-ZPgb4VzJ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CEA-lcqq.js → required-auth-layout-DcfPO8NY.js} +1 -1
- package/dist/client/assets/{reset-password-CAhEe0y_.js → reset-password-Bql8KNKZ.js} +1 -1
- package/dist/client/assets/roles-C0H77ep0.js +1 -0
- package/dist/client/assets/{save-status-ByqPY8sQ.js → save-status-CgcBkaA1.js} +1 -1
- package/dist/client/assets/{scroll-area-CDnhflx8.js → scroll-area-BOxtAecg.js} +1 -1
- package/dist/client/assets/{search-input-E5lbuSaQ.js → search-input-CSsG1WWu.js} +1 -1
- package/dist/client/assets/secrets-DE5NR_Qm.js +1 -0
- package/dist/client/assets/sections-editor-CX5GvsNV.js +2 -0
- package/dist/client/assets/select-Db6_lt9v.js +1 -0
- package/dist/client/assets/{select-model-D6u-jQT1.js → select-model-ByS9ATv_.js} +1 -1
- package/dist/client/assets/seo-editor-Crw2Qnmh.js +1 -0
- package/dist/client/assets/settings-layout-DDqL_VOP.js +1 -0
- package/dist/client/assets/{settings-section-CMKiU6m1.js → settings-section-t8sGp_fl.js} +1 -1
- package/dist/client/assets/{sheet-B0e56Uwi.js → sheet-B8bWDiH8.js} +1 -1
- package/dist/client/assets/{shell-controls-iDS_YYSh.js → shell-controls-Ctmv5J1D.js} +1 -1
- package/dist/client/assets/{shell-layout-DCRByz-Z.js → shell-layout-BfoUO_4d.js} +1 -1
- package/dist/client/assets/{shell-route-loading-CnU2JL57.js → shell-route-loading-CQesruOS.js} +1 -1
- package/dist/client/assets/{sidebar-muO-r9NM.js → sidebar-BV39sx2h.js} +1 -1
- package/dist/client/assets/{skeleton-D_Y0mVys.js → skeleton-zxfXmYH5.js} +1 -1
- package/dist/client/assets/{sortable.esm-DZfVcKsT.js → sortable.esm-C5FMmjf1.js} +1 -1
- package/dist/client/assets/sso-BuXh3sXC.js +1 -0
- package/dist/client/assets/store-Di_QFZpT.js +1 -0
- package/dist/client/assets/store-registry-CSY3xXq9.js +2 -0
- package/dist/client/assets/{studio-tools-Cxzj-LYh.js → studio-tools-CHs_rGSt.js} +1 -1
- package/dist/client/assets/{switch-DPUXI2pE.js → switch-DPrQb-8A.js} +1 -1
- package/dist/client/assets/{table-D7DRjfAO.js → table-7uXopK9g.js} +1 -1
- package/dist/client/assets/{tabs-CTiHAHkO.js → tabs-tj-mDk3G.js} +1 -1
- package/dist/client/assets/{task-status-CzPGYn0R.js → task-status-Bddx2ns0.js} +1 -1
- package/dist/client/assets/{textarea-rSIhk1As.js → textarea-Deq7M1bS.js} +1 -1
- package/dist/client/assets/{toggle-group-D0HpOa1A.js → toggle-group-DxOLsLVl.js} +1 -1
- package/dist/client/assets/{toolbar-CWstIAgU.js → toolbar-Dh-mBE0g.js} +1 -1
- package/dist/client/assets/tooltip-B5ZRtiWb.js +1 -0
- package/dist/client/assets/{types-DiVU1HF6.js → types-CCU1Qb1L.js} +1 -1
- package/dist/client/assets/{use-ai-providers-UVcAibrU.js → use-ai-providers-B-JdXq2R.js} +1 -1
- package/dist/client/assets/{use-automations-DyhWqZVe.js → use-automations-DcJ9X_Bn.js} +1 -1
- package/dist/client/assets/{use-capability-Dkucj2kh.js → use-capability-QYduHUWr.js} +1 -1
- package/dist/client/assets/{use-clock-tick-C8csRlSk.js → use-clock-tick-DjkJEP58.js} +1 -1
- package/dist/client/assets/{use-collections-Ce8iOx08.js → use-collections-CtF7H9Ec.js} +1 -1
- package/dist/client/assets/{use-connection-MqRKkZiS.js → use-connection-OMHbx8Fv.js} +1 -1
- package/dist/client/assets/{use-copy-BXiwiMZD.js → use-copy-CquNDC0j.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-EFJS-btq.js → use-create-virtual-mcp-BzfJqNI1.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-UYvEWk6q.js → use-debounced-autosave-CuwKz_M_.js} +1 -1
- package/dist/client/assets/{use-delete-connection-tf7cUWDI.js → use-delete-connection-D3Cw_l0k.js} +1 -1
- package/dist/client/assets/{use-file-configs-Caz1V2y2.js → use-file-configs-BzD_V3dx.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-D-1sc3vv.js → use-infinite-scroll-CcoPxc_B.js} +1 -1
- package/dist/client/assets/{use-join-requests-jqRgPged.js → use-join-requests-BJazSzky.js} +1 -1
- package/dist/client/assets/{use-mcp-client-QbDw5Kxr.js → use-mcp-client-D5s-JZx9.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CJoxcvaa.js → use-mcp-prompts-DOIkquNc.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CwE0F1Fa.js → use-mcp-tools-y5FOo2na.js} +1 -1
- package/dist/client/assets/{use-members-DqOAFyvD.js → use-members-C6JtLoz3.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CHwphTrt.js → use-navigate-to-agent-Cf9Ptpjb.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Cw-eW4eJ.js → use-org-auth-client-BIUXpGUn.js} +1 -1
- package/dist/client/assets/{use-org-sso-DYW-70GB.js → use-org-sso-D7NdIA39.js} +1 -1
- package/dist/client/assets/{use-organization-roles-C929xbIg.js → use-organization-roles-m-GWZOmG.js} +1 -1
- package/dist/client/assets/{use-organization-settings-B7zELDxl.js → use-organization-settings-D4FIVwU9.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DSvlh2CW.js → use-registry-connections-BLPbAhR8.js} +1 -1
- package/dist/client/assets/{use-secrets-BGVjiXmA.js → use-secrets-m1q_icrm.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Bwl21Nte.js → use-status-sounds-CQVeaXb2.js} +1 -1
- package/dist/client/assets/{use-view-mode-DeBJ3OlV.js → use-view-mode-Bp7cldRg.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-D3YjjDr2.js → use-virtual-mcp-SQ-AGFry.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Bj9MLRnT.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-jXW8iBKH.js +1 -0
- package/dist/client/assets/variant-calendar-D8iInPbR.js +1 -0
- package/dist/client/assets/{view-mode-toggle-BMm_SU4X.js → view-mode-toggle-C2-bvq7i.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +380 -380
- package/dist/server/server.js +246 -246
- package/package.json +1 -1
- package/dist/client/assets/agents-list-DjjL_a90.js +0 -1
- package/dist/client/assets/ai-providers-CljQzJuo.js +0 -1
- package/dist/client/assets/app-editor-DTsz2SiG.js +0 -1
- package/dist/client/assets/automations-h6AjBdGl.js +0 -1
- package/dist/client/assets/brand-context-B2j85pK0.js +0 -1
- package/dist/client/assets/buckets-OAl0L0y1.js +0 -1
- package/dist/client/assets/category-editor-DrrOt_5R.js +0 -1
- package/dist/client/assets/collection-detail-B3A3YP9y.js +0 -1
- package/dist/client/assets/commerce-onboarding-DtQQW42S.js +0 -1
- package/dist/client/assets/connection-detail-BxVpiSkZ.js +0 -1
- package/dist/client/assets/connections-B6wVut4v.js +0 -1
- package/dist/client/assets/file-explorer-B-BDqfr8.js +0 -2
- package/dist/client/assets/general-C-as289_.js +0 -1
- package/dist/client/assets/index-B5iWctwe.js +0 -1
- package/dist/client/assets/index-CCgrVLOE.js +0 -1
- package/dist/client/assets/index-iwyGvJw3.js +0 -1
- package/dist/client/assets/page-seo-sheet-C6YR_NxM.js +0 -1
- package/dist/client/assets/post-editor-BRqcUmQd.js +0 -1
- package/dist/client/assets/profile-Dk2P6dGP.js +0 -1
- package/dist/client/assets/project-app-view-TZf9g1ss.js +0 -1
- package/dist/client/assets/record-editor-ChJ6RVXx.js +0 -1
- package/dist/client/assets/registry-HmZZwFRK.js +0 -2
- package/dist/client/assets/roles-DSDcdczA.js +0 -1
- package/dist/client/assets/secrets-HQJKo8ct.js +0 -1
- package/dist/client/assets/sections-editor-LwvHy6hA.js +0 -2
- package/dist/client/assets/select-BRu_aocD.js +0 -1
- package/dist/client/assets/seo-editor-uydyhvcD.js +0 -1
- package/dist/client/assets/settings-layout-K84_EKqf.js +0 -1
- package/dist/client/assets/sso-GaI62zkx.js +0 -1
- package/dist/client/assets/store-ek5K_sQV.js +0 -1
- package/dist/client/assets/store-registry-2fFie2P8.js +0 -2
- package/dist/client/assets/tooltip-B7dbgru1.js +0 -1
- package/dist/client/assets/useInfiniteQuery-W7QqfcbQ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-f7kozjC6.js +0 -1
- package/dist/client/assets/variant-calendar-C5R5bfKc.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as I,r as O,l as ve,j as s,B as Y,i as Ce,K as U,k as oe,m as Ue,a as Ne,u as Ae,b as Ie,n as $e,d as Te,o as Ee,Q as De,E as Me,p as Se,L as Ke}from"./index-Pat3pJAq.js";import{A as qe}from"./auth-entry-BUS40DT5.js";import{A}from"./auth-split-layout-BhYYz27o.js";import{O as _e}from"./organization-choice-BRL6qHcF.js";import{f as He}from"./tab-id-BptcWVWa.js";import{I as Fe}from"./input-Bmgjwfqa.js";import{u as be,W as Re,S as Oe,g as Be,C as Qe}from"./use-mcp-client-D5s-JZx9.js";import{i as we}from"./XCircle-D--nsAyg.js";import{I as We}from"./integration-icon-D96bHHLQ.js";import{i as ke}from"./CheckCircle-CpqmJQQj.js";import{g as Ge,c as Ye,e as Ve}from"./extract-connection-data-DQW44nI6.js";import{a as Ze}from"./authenticate-and-persist-oauth-C0aUigFl.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-huYQCC56.js";import"./User01-D736U4CX.js";import"./auth-DK93vS8p.js";import"./agent-icon-ysNW4XR3.js";import"./AlertCircle-W6j8H01c.js";import"./Tool01-DthaYcRg.js";import"./SwitchHorizontal01-rjvNMlJx.js";import"./Settings02-BPKyn9lz.js";import"./ArrowUpRight-CZSTSF18.js";import"./ZapSquare-9ESQMXmQ.js";import"./Users03-CNrhCl5t.js";import"./ChevronUp-zqx6ltUB.js";import"./ChevronDown-BkIuna_N.js";import"./ChevronLeft-B4YPm5Tt.js";import"./ChevronRight-B06KXNz0.js";import"./DotsVertical-CnakMMTn.js";import"./Stars02-DbeWjR8E.js";import"./Eye-Bu6T1cA0.js";import"./ZoomOut-vLQBm0K1.js";import"./Globe01-BonH0jIg.js";import"./FilterLines-Ckvl4OhL.js";import"./Star01-DKVn-D_o.js";import"./Globe04-by7Koucw.js";import"./HardDrive-i-7mfT2M.js";import"./Key01-CSj8veNe.js";import"./LayoutLeft-DmgR4QKJ.js";import"./LinkExternal01-CwjMdvmW.js";import"./Monitor01-CwV0BvWh.js";import"./Sun-J6HGala1.js";import"./Palette-DDt_6p48.js";import"./Play-DkjtpYqH.js";import"./Plus-Ce8glufj.js";import"./SearchMd-BT20-sda.js";import"./Shield01-CouVDS_l.js";import"./Stars01-BZYGWgaC.js";import"./Trash01-DHwSI6yL.js";import"./Upload01-ClFoMfKj.js";import"./Users01-Cl5hK_oE.js";import"./XClose-C-_BT2hv.js";import"./X-BZrTCz0a.js";import"./Zap-C46ZuAed.js";import"./mcp-oauth-BJ20JRuX.js";const Je=/^[a-zA-Z][a-zA-Z\d+.-]*:/,Xe=/^[a-zA-Z][a-zA-Z\d+.-]*:\/\//,et=/^[^\s/:?#]+\.[^\s/:?#]+:\d+(?:[/?#]|$)/,tt=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function he(i){const e=i.trim();if(!e)return{ok:!1,error:"Enter a website URL."};const t=Je.test(e),n=Xe.test(e),o=et.test(e);if(t&&!n&&!o)return{ok:!1,error:"Use an HTTP or HTTPS website URL."};const c=n?e:`https://${e}`;let l;try{l=new URL(c)}catch{return{ok:!1,error:"Enter a valid website URL."}}if(l.protocol!=="http:"&&l.protocol!=="https:")return{ok:!1,error:"Use an HTTP or HTTPS website URL."};const r=l.hostname.split(".");return r.length<2||r.some(d=>!d||!tt.test(d))?{ok:!1,error:"Enter a valid website URL."}:(l.protocol="https:",{ok:!0,value:l.origin})}function xe(i){const e=I.c(14),{children:t,className:n,wrapperClassName:o}=i,[c,l]=O.useState(!0);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=x=>{if(!x)return;const y=()=>{const a=x.scrollHeight-x.scrollTop-x.clientHeight<8;l(a)};y(),x.addEventListener("scroll",y,{passive:!0});const C=new ResizeObserver(y);C.observe(x);for(const a of Array.from(x.children))C.observe(a);return()=>{x.removeEventListener("scroll",y),C.disconnect()}},e[0]=r):r=e[0];const d=r;let m;e[1]!==o?(m=ve("relative",o),e[1]=o,e[2]=m):m=e[2];let g;e[3]!==t||e[4]!==n?(g=s.jsx("div",{ref:d,className:n,children:t}),e[3]=t,e[4]=n,e[5]=g):g=e[5];const u=c?"opacity-0":"opacity-100";let p;e[6]!==u?(p=ve("pointer-events-none absolute inset-x-0 -bottom-px h-[213px]","bg-gradient-to-t from-sidebar from-[6px] to-transparent","backdrop-blur-[2px] [mask-image:linear-gradient(to_top,black_6px,transparent)]","transition-opacity duration-200",u),e[6]=u,e[7]=p):p=e[7];let h;e[8]!==p?(h=s.jsx("div",{"aria-hidden":!0,className:p}),e[8]=p,e[9]=h):h=e[9];let f;return e[10]!==m||e[11]!==g||e[12]!==h?(f=s.jsxs("div",{className:m,children:[g,h]}),e[10]=m,e[11]=g,e[12]=h,e[13]=f):f=e[13],f}function nt(){const i=I.c(3);let e;i[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"size-12 shrink-0 animate-pulse rounded-lg bg-muted/60"}),s.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-muted/60"}),s.jsx("div",{className:"ml-auto h-8 w-20 animate-pulse rounded-lg bg-muted/60"})]}),i[0]=e):e=i[0];let t;i[1]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("div",{className:"p-1",children:s.jsx("div",{className:"h-5 w-40 animate-pulse rounded bg-muted/60"})}),i[1]=t):t=i[1];let n;return i[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"flex flex-col gap-2 rounded-2xl border border-border bg-card p-4",children:[e,s.jsxs("div",{className:"flex flex-col gap-1 px-1 py-2",children:[t,s.jsx("div",{className:"p-1",children:s.jsx("div",{className:"h-5 w-56 animate-pulse rounded bg-muted/60"})})]})]}),i[2]=n):n=i[2],n}function ye(i){const e=I.c(3),{children:t}=i;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ke,{size:14,className:"shrink-0 text-blue-500"}),e[0]=n):n=e[0];let o;return e[1]!==t?(o=s.jsxs("div",{className:"flex items-center gap-2 p-1",children:[n,s.jsx("p",{className:"text-sm text-foreground",children:t})]}),e[1]=t,e[2]=o):o=e[2],o}function st(i){const e=I.c(33),{card:t,connecting:n,disabled:o,onConnect:c}=i;let l;e[0]!==t.icon||e[1]!==t.title?(l=s.jsx(We,{icon:t.icon,name:t.title,size:"md",fit:"contain",className:"p-2"}),e[0]=t.icon,e[1]=t.title,e[2]=l):l=e[2];let r;e[3]!==t.title?(r=s.jsx("p",{className:"flex-1 text-sm text-foreground",children:t.title}),e[3]=t.title,e[4]=r):r=e[4];let d;e[5]!==t.satisfied||e[6]!==t.title||e[7]!==n||e[8]!==o||e[9]!==c?(d=t.satisfied?s.jsxs("div",{className:"flex h-8 items-center gap-2 px-3 text-sm text-muted-foreground",children:[s.jsx(ke,{size:16})," Connected"]}):s.jsx(Y,{type:"button",variant:"outline",size:"sm",disabled:o||n,onClick:c,"aria-label":`Connect ${t.title}`,children:n?s.jsx(Ce,{size:16,className:"animate-spin"}):"Connect"}),e[5]=t.satisfied,e[6]=t.title,e[7]=n,e[8]=o,e[9]=c,e[10]=d):d=e[10];let m;e[11]!==l||e[12]!==r||e[13]!==d?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[l,r,d]}),e[11]=l,e[12]=r,e[13]=d,e[14]=m):m=e[14];let g;e[15]!==t.checks?(g=t.checks!==null&&s.jsxs(ye,{children:["+ ",t.checks," checks"]}),e[15]=t.checks,e[16]=g):g=e[16];let u;e[17]!==t.headline?(u=t.headline&&s.jsx(ye,{children:t.headline}),e[17]=t.headline,e[18]=u):u=e[18];let p;e[19]!==t.bullets?(p=t.bullets.map(it),e[19]=t.bullets,e[20]=p):p=e[20];let h;e[21]!==t.candidateConnectionId||e[22]!==t.satisfied||e[23]!==t.title?(h=!t.satisfied&&t.candidateConnectionId&&s.jsxs("p",{className:"px-1 text-xs text-muted-foreground",children:["Using your existing ",t.title]}),e[21]=t.candidateConnectionId,e[22]=t.satisfied,e[23]=t.title,e[24]=h):h=e[24];let f;e[25]!==g||e[26]!==u||e[27]!==p||e[28]!==h?(f=s.jsxs("div",{className:"flex flex-col gap-1 px-1 py-2",children:[g,u,p,h]}),e[25]=g,e[26]=u,e[27]=p,e[28]=h,e[29]=f):f=e[29];let x;return e[30]!==m||e[31]!==f?(x=s.jsxs("div",{className:"flex flex-col gap-2 rounded-2xl border border-border bg-card p-4",children:[m,f]}),e[30]=m,e[31]=f,e[32]=x):x=e[32],x}function it(i){return s.jsx(ye,{children:i},i)}const je={vtex:{registryAppId:"deco/vtex",checks:49,headline:"Out-of-stock, thin PDPs & attribute gaps across every SKU"},"google-analytics":{registryAppId:"deco/google-analytics",checks:49,headline:"Where revenue leaks between product view and checkout"},"google-search-console":{registryAppId:"deco/google-search-console",checks:49,headline:"Search visibility & indexing gaps across your catalog"}};function ot(i){const e=i.properties;if(!e)return[];const t=[];for(const[n,o]of Object.entries(e)){const r=o?.properties?.__type?.const;typeof r=="string"&&r.length>0&&t.push({fieldKey:n,bindingType:r})}return t}function rt(i,e){const t=[];if(i.length&&t.push({field:["id"],operator:"in",value:i}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function D(i){const e=i;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??i}function lt(i,e,t,n){return{...i??{},[e]:{__type:t,value:n}}}function at(i,e,t){const n=i.filter(o=>o.app_name===e||!!t&&o.app_id===t);return n.length===0?null:(n.sort((o,c)=>{const l=r=>r.status==="active"?0:1;return l(o)!==l(c)?l(o)-l(c):(c.updated_at??"").localeCompare(o.updated_at??"")}),n[0].id)}function ct(i){return i.server?.icons?.[0]?.src??Ge(i.server?.repository)??null}function dt(i,e){const t=i._meta?.["mcp.mesh"];return t?.friendlyName||t?.friendly_name||i.title||i.server?.title||i.server?.name||e}function mt(i){const e=[];for(const t of i.requirements){const n=i.curated[t.bindingType],o=n?i.itemsById[n.registryAppId]:i.itemsByName[t.bindingType];if(!o)continue;const l=!!i.configurationState?.[t.fieldKey]?.value;e.push({fieldKey:t.fieldKey,bindingType:t.bindingType,registryItem:o,title:dt(o,t.bindingType),icon:ct(o),headline:n?.headline??o._meta?.["mcp.mesh"]?.short_description??null,checks:n?.checks??null,bullets:n?.bullets??[],satisfied:l,candidateConnectionId:l?null:at(i.connections,t.bindingType,n?.registryAppId)})}return e}function ut(i){const e=I.c(25),{selfClient:t,org:n,cdConnectionId:o}=i;let c;e[0]!==o||e[1]!==n.id||e[2]!==n.slug?(c={connectionId:o,orgId:n.id,orgSlug:n.slug},e[0]=o,e[1]=n.id,e[2]=n.slug,e[3]=c):c=e[3];const l=be(c);let r;e[4]!==o||e[5]!==n.id?(r=U.commerceDiscoveryCompanionSchema(n.id,o),e[4]=o,e[5]=n.id,e[6]=r):r=e[6];let d;e[7]!==l?(d=async()=>{const v=await l.callTool({name:"MCP_CONFIGURATION",arguments:{}});return D(v)},e[7]=l,e[8]=d):d=e[8];let m;e[9]!==r||e[10]!==d?(m={queryKey:r,queryFn:d},e[9]=r,e[10]=d,e[11]=m):m=e[11];const g=oe(m),u=ot(g.data?.stateSchema??{properties:{}}),p=u.map(xt),h=u.map(ht).filter(gt),f=u.filter(pt).map(ft),x=[...h,...f].sort().join(",");let y;e[12]!==o||e[13]!==n.id?(y=U.commerceDiscoveryConnection(n.id,o),e[12]=o,e[13]=n.id,e[14]=y):y=e[14];let C;e[15]!==o||e[16]!==t?(C=async()=>{const v=await t.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:o}});return D(v)},e[15]=o,e[16]=t,e[17]=C):C=e[17];let a;e[18]!==y||e[19]!==C?(a={queryKey:y,queryFn:C},e[18]=y,e[19]=C,e[20]=a):a=e[20];const b=oe(a),j=oe({queryKey:U.commerceDiscoveryCompanionConnections(n.id),enabled:u.length>0,queryFn:async()=>{const v=await t.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{operator:"or",conditions:[{field:["app_name"],operator:"in",value:p},{field:["app_id"],operator:"in",value:h}]},limit:1e3}});return D(v)}}),_=oe({queryKey:U.commerceDiscoveryCompanionRegistry(n.id,x),enabled:u.length>0,queryFn:async()=>{const v=rt(h,f),M=await Ye(Re.REGISTRY(n.id),n.id,n.slug,"COLLECTION_REGISTRY_APP_LIST",{...v?{where:v}:{},limit:1e3});return D(M)}}),E={},T={};for(const v of _.data?.items??[])E[v.id]=v,v.server?.name&&(T[v.server.name]=v);const R=mt({requirements:u,itemsById:E,itemsByName:T,connections:j.data?.items??[],configurationState:b.data?.item?.configuration_state??null,curated:je}),N=g.isPending||b.isPending||u.length>0&&(j.isPending||_.isPending),P=g.error??b.error??j.error??_.error??null;let z;return e[21]!==R||e[22]!==P||e[23]!==N?(z={cards:R,isLoading:N,error:P},e[21]=R,e[22]=P,e[23]=N,e[24]=z):z=e[24],z}function ft(i){return i.bindingType}function pt(i){return!je[i.bindingType]}function gt(i){return!!i}function ht(i){return je[i.bindingType]?.registryAppId}function xt(i){return i.bindingType}function yt({selfClient:i,org:e,userId:t,cdConnectionId:n}){const o=Ue(),[c,l]=O.useState(null),[r,d]=O.useState(null),m=async(u,p)=>{const h=await i.callTool({name:"COLLECTION_CONNECTIONS_UPDATE",arguments:{id:u,data:p}});return D(h)};async function g(u){l(u.fieldKey),d(null);try{let p=u.candidateConnectionId;if(!p){const a=Ve(u.registryItem,e.id,t,{remoteIndex:0}),b=a.connection_type==="STDIO",j=!!a.connection_url,_=b&&a.connection_headers&&typeof a.connection_headers=="object"&&"command"in a.connection_headers;if(!j&&!_){d(`${u.title} cannot be connected: no connection method available`);return}const E=await i.callTool({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:a}});p=D(E).item.id}const h=p,f=await Ze({connectionId:h,orgId:e.id,orgSlug:e.slug,persistFallback:a=>m(h,{connection_token:a}).then(()=>{})});if(!f.ok){d(`Couldn't sign in to ${u.title}: ${f.error}`);return}const x=await i.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:n}}),y=D(x).item?.configuration_state??null,C=lt(y,u.fieldKey,u.bindingType,h);await m(n,{configuration_state:C}),await o.invalidateQueries({queryKey:U.commerceDiscoveryConnection(e.id,n)}),await o.invalidateQueries({queryKey:U.commerceDiscoveryCompanionConnections(e.id)})}catch(p){d(p instanceof Error?p.message:String(p))}finally{l(null)}}return{connect:g,connectingFieldKey:c,error:r}}function Ct(i){const e=I.c(30),{org:t,cdConnectionId:n,reportDisabled:o,onOpenReport:c}=i,{data:l}=Ne.useSession(),r=l?.user?.id??"";let d;e[0]!==t.id||e[1]!==t.slug?(d={connectionId:Oe,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=d):d=e[2];const m=be(d);let g;e[3]!==n||e[4]!==t||e[5]!==m?(g={selfClient:m,org:t,cdConnectionId:n},e[3]=n,e[4]=t,e[5]=m,e[6]=g):g=e[6];const{cards:u,isLoading:p,error:h}=ut(g);let f;e[7]!==n||e[8]!==t||e[9]!==m||e[10]!==r?(f={selfClient:m,org:t,userId:r,cdConnectionId:n},e[7]=n,e[8]=t,e[9]=m,e[10]=r,e[11]=f):f=e[11];const{connect:x,connectingFieldKey:y,error:C}=yt(f);let a;e[12]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(we,{size:16}),e[12]=a):a=e[12];let b;e[13]!==c||e[14]!==o?(b=s.jsxs(Y,{type:"button",size:"xl",className:"w-full",onClick:c,disabled:o,children:["See full report",a]}),e[13]=c,e[14]=o,e[15]=b):b=e[15];const j=b;if(!p&&!h&&u.length===0){let N;return e[16]!==j?(N=s.jsx("div",{className:"flex min-h-0 flex-1 flex-col justify-end gap-10 md:grid md:flex-none",children:j}),e[16]=j,e[17]=N):N=e[17],N}const _=y!==null;let E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx("p",{className:"text-2xl font-medium text-foreground",children:"Unlock your full diagnostic"}),s.jsx("p",{className:"text-base text-muted-foreground",children:"Connect your tools to unlock 100+ checks across your funnel."})]}),e[18]=E):E=e[18];let T;e[19]!==_||e[20]!==u||e[21]!==x||e[22]!==C||e[23]!==y||e[24]!==h||e[25]!==p?(T=h?s.jsxs("div",{role:"alert",className:"rounded-2xl border border-border bg-card p-4",children:[s.jsx("p",{className:"text-sm text-foreground",children:"Couldn't load companion integrations."}),s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Reload the page to try again."})]}):p?s.jsx("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[0,1,2].map(bt)}):s.jsx(xe,{wrapperClassName:"flex min-h-0 flex-1 flex-col md:block",className:"-mx-1 min-h-0 flex-1 overflow-y-auto px-1 md:max-h-[45vh] md:flex-none",children:s.jsxs("div",{className:"grid gap-4",children:[C&&s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:C}),u.map(N=>s.jsx(st,{card:N,connecting:y===N.fieldKey,disabled:_&&y!==N.fieldKey,onConnect:()=>{x(N)}},N.fieldKey))]})}),e[19]=_,e[20]=u,e[21]=x,e[22]=C,e[23]=y,e[24]=h,e[25]=p,e[26]=T):T=e[26];let R;return e[27]!==j||e[28]!==T?(R=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:flex-none",children:[E,T,j]}),e[27]=j,e[28]=T,e[29]=R):R=e[29],R}function bt(i){return s.jsx(nt,{},i)}function ze(i){const e=I.c(10),{host:t}=i,n=`https://www.google.com/s2/favicons?domain=${t}&sz=128`;let o,c,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-7 w-7 dark:hidden"}),c=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-7 w-7 hidden dark:block"}),l=s.jsx("div",{className:"h-6 w-px rotate-12 bg-border","aria-hidden":"true"}),e[0]=o,e[1]=c,e[2]=l):(o=e[0],c=e[1],l=e[2]);let r;e[3]!==n?(r=s.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-white",children:s.jsx("img",{src:n,alt:"",className:"h-5 w-5",loading:"lazy"})}),e[3]=n,e[4]=r):r=e[4];let d;e[5]!==t?(d=s.jsx("span",{className:"text-lg font-medium text-foreground",children:t}),e[5]=t,e[6]=d):d=e[6];let m;return e[7]!==r||e[8]!==d?(m=s.jsxs("div",{className:"flex items-center gap-3",children:[o,c,l,r,d]}),e[7]=r,e[8]=d,e[9]=m):m=e[9],m}function Pn(){const i=I.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(vt,{}),i[0]=e):e=i[0],e}const Le=O.createContext(null),Pe=()=>O.useContext(Le);function jt(i){if(!i)return null;const e=he(i);return e.ok?new URL(e.value).hostname:null}function vt(){const i=I.c(9);let e;i[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/commerce-onboarding"},i[0]=e):e=i[0];const t=Ae(e),{org:n,siteUrl:o}=t;let c;i[1]!==o?(c=jt(o),i[1]=o,i[2]=c):c=i[2];const l=c;let r;i[3]!==n||i[4]!==o?(r=s.jsx(St,{requestedOrgSlug:n,siteUrl:o}),i[3]=n,i[4]=o,i[5]=r):r=i[5];let d;return i[6]!==l||i[7]!==r?(d=s.jsx(Le.Provider,{value:l,children:r}),i[6]=l,i[7]=r,i[8]=d):d=i[8],d}function St(i){const e=I.c(8),{requestedOrgSlug:t,siteUrl:n}=i,{data:o,isPending:c}=Ne.useSession(),l=Pe();if(c){let d;return e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(A,{children:s.jsx(V,{label:"Preparing commerce onboarding..."})}),e[0]=d):d=e[0],d}if(!o){const d=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let m;e[1]!==l?(m=l?s.jsx(ze,{host:l}):void 0,e[1]=l,e[2]=m):m=e[2];let g;return e[3]!==m?(g=s.jsx(A,{children:s.jsx(qe,{callbackUrl:d,allowAutoLogin:!1,title:"Unlock your full diagnostic",subtitle:null,brand:m})}),e[3]=m,e[4]=g):g=e[4],g}let r;return e[5]!==t||e[6]!==n?(r=s.jsx(_t,{requestedOrgSlug:t,siteUrl:n}),e[5]=t,e[6]=n,e[7]=r):r=e[7],r}function _t(i){const e=I.c(40),{requestedOrgSlug:t,siteUrl:n}=i,o=Ie(),c=$e(),[l,r]=O.useState(null),[d,m]=O.useState(null),g=c.data?.map(It)??[];let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={mutationFn:Nt,retry:!1,onSuccess:a=>{m(a)}},e[0]=u):u=e[0];const p=Te(u);if(c.isPending){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(A,{children:s.jsx(V,{label:"Preparing commerce onboarding..."})}),e[1]=a):a=e[1],a}if(c.error){let a;return e[2]!==c?(a=s.jsx(le,{title:"We could not load your organizations",description:"Retry to continue commerce setup from this page.",actionLabel:"Retry",onRetry:()=>c.refetch()}),e[2]=c,e[3]=a):a=e[3],a}const h=t?g.find(a=>a.slug===t):null;if(h){let a;return e[4]!==h||e[5]!==n?(a=s.jsx(re,{org:h,initialSiteUrl:n}),e[4]=h,e[5]=n,e[6]=a):a=e[6],a}if(t){let a;return e[7]!==c?(a=s.jsx(le,{title:"Organization not found",description:"We could not find that organization for your account.",actionLabel:"Retry",onRetry:()=>c.refetch()}),e[7]=c,e[8]=a):a=e[8],a}if(l){let a;return e[9]!==l||e[10]!==n?(a=s.jsx(re,{org:l,initialSiteUrl:n}),e[9]=l,e[10]=n,e[11]=a):a=e[11],a}if(g.length===1&&g[0]){let a;return e[12]!==g[0]||e[13]!==n?(a=s.jsx(re,{org:g[0],initialSiteUrl:n}),e[12]=g[0],e[13]=n,e[14]=a):a=e[14],a}if(g.length>1){let a;e[15]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx($,{title:"Choose an organization",description:"Select where commerce diagnostics should continue."}),e[15]=a):a=e[15];let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=_=>r(_),e[16]=b):b=e[16];let j;return e[17]!==g?(j=s.jsx(A,{children:s.jsxs("div",{className:"grid gap-10",children:[a,s.jsx(xe,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:s.jsx(_e,{organizations:g,selectLabel:"Continue",onSelected:b})})]})}),e[17]=g,e[18]=j):j=e[18],j}if(!d){let a;e[19]!==p?(a=()=>{p.reset(),p.mutate()},e[19]=p,e[20]=a):a=e[20];let b;return e[21]!==p||e[22]!==a?(b=s.jsx(Tt,{mutation:p,onRetry:a}),e[21]=p,e[22]=a,e[23]=b):b=e[23],b}const f=d;if(f?.success&&(f.status==="created"||f.status==="joined"||f.status==="already_has_organization")&&f.organization){let a;return e[24]!==f.organization||e[25]!==n?(a=s.jsx(re,{org:f.organization,initialSiteUrl:n}),e[24]=f.organization,e[25]=n,e[26]=a):a=e[26],a}if(f?.status==="ambiguous"&&f.organizations&&f.organizations.length>0){let a;e[27]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx($,{title:"Choose an organization",description:"Your email can access more than one organization. Choose where commerce setup should continue."}),e[27]=a):a=e[27];const b=f.domain??void 0;let j;e[28]!==o||e[29]!==n?(j=(E,T)=>{Ee(),r({...E,slug:T}),o({to:"/commerce-onboarding",search:{org:T,siteUrl:n}})},e[28]=o,e[29]=n,e[30]=j):j=e[30];let _;return e[31]!==f.organizations||e[32]!==b||e[33]!==j?(_=s.jsx(A,{children:s.jsxs("div",{className:"grid gap-10",children:[a,s.jsx(xe,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:s.jsx(_e,{organizations:f.organizations,domain:b,onJoined:j})})]})}),e[31]=f.organizations,e[32]=b,e[33]=j,e[34]=_):_=e[34],_}const x=f?.error??"We could not determine a commerce organization for this account.";let y;e[35]!==p?(y=()=>{m(null),p.reset()},e[35]=p,e[36]=y):y=e[36];let C;return e[37]!==x||e[38]!==y?(C=s.jsx(le,{title:"Commerce onboarding needs support",description:x,actionLabel:"Try again",onRetry:y}),e[37]=x,e[38]=y,e[39]=C):C=e[39],C}async function Nt(){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&&Ee(),e}function It(i){return{id:i.id,name:i.name,slug:i.slug,logo:i.logo??null}}function Tt(i){const e=I.c(7),{mutation:t,onRetry:n}=i,o=O.useRef(!1);let c;e[0]!==t?(c=m=>{!m||o.current||(o.current=!0,t.mutate())},e[0]=t,e[1]=c):c=e[1];const l=c;if(t.error){let m;return e[2]!==n?(m=s.jsx(le,{title:"Commerce onboarding is unavailable",description:"We could not prepare an organization for commerce setup. Retry from this page or contact support.",actionLabel:"Retry",onRetry:n}),e[2]=n,e[3]=m):m=e[3],m}let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(V,{label:"Preparing your commerce workspace..."}),e[4]=r):r=e[4];let d;return e[5]!==l?(d=s.jsx(A,{children:s.jsx("div",{ref:l,children:r})}),e[5]=l,e[6]=d):d=e[6],d}function $(i){const e=I.c(8),{title:t,description:n}=i,o=Pe();let c;e[0]!==o?(c=o?s.jsx(ze,{host:o}):s.jsxs("div",{children:[s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=o,e[1]=c):c=e[1];let l;e[2]!==n||e[3]!==t?(l=(t||n)&&s.jsxs("div",{className:"space-y-2",children:[t&&s.jsx("h1",{className:"text-2xl font-medium leading-8",children:t}),n&&s.jsx("p",{className:"text-base text-muted-foreground leading-6",children:n})]}),e[2]=n,e[3]=t,e[4]=l):l=e[4];let r;return e[5]!==c||e[6]!==l?(r=s.jsxs("div",{className:"grid gap-10",children:[c,l]}),e[5]=c,e[6]=l,e[7]=r):r=e[7],r}function V(i){const e=I.c(3),{label:t}=i;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Ce,{size:14,className:"animate-spin text-muted-foreground"}),e[0]=n):n=e[0];let o;return e[1]!==t?(o=s.jsxs("div",{className:"flex items-center gap-2 py-4",role:"status","aria-live":"polite",children:[n,s.jsx("span",{className:"text-sm text-muted-foreground",children:t})]}),e[1]=t,e[2]=o):o=e[2],o}function le(i){const e=I.c(9),{title:t,description:n,actionLabel:o,onRetry:c}=i;let l;e[0]!==n||e[1]!==t?(l=s.jsx($,{title:t,description:n}),e[0]=n,e[1]=t,e[2]=l):l=e[2];let r;e[3]!==o||e[4]!==c?(r=s.jsx(Y,{type:"button",size:"xl",className:"w-full",onClick:c,children:o}),e[3]=o,e[4]=c,e[5]=r):r=e[5];let d;return e[6]!==l||e[7]!==r?(d=s.jsx(A,{children:s.jsxs("div",{className:"grid gap-10",children:[l,r]})}),e[6]=l,e[7]=r,e[8]=d):d=e[8],d}function Et(i){return i.content?.find(e=>e.text)?.text??"Commerce Discovery setup failed."}function pe(i){const e=i;if(e.isError)throw new Error(Et(e));return e.structuredContent??i}function re(i){const e=I.c(3),{org:t,initialSiteUrl:n}=i;let o;return e[0]!==n||e[1]!==t?(o=s.jsx(A,{children:s.jsx(De,{children:c=>{const{reset:l}=c;return s.jsx(Me,{fallback:r=>{const{error:d,resetError:m}=r;return s.jsx(Rt,{orgName:t.name,message:d instanceof Error?d.message:"We could not check Commerce Discovery setup.",onRetry:()=>{l(),m()}})},children:s.jsx(O.Suspense,{fallback:s.jsx(V,{label:"Connecting workspace..."}),children:s.jsx(Ot,{org:t,initialSiteUrl:n},`${t.id}:${n??""}`)})})}})}),e[0]=n,e[1]=t,e[2]=o):o=e[2],o}function Rt(i){const e=I.c(10),{orgName:t,message:n,onRetry:o}=i,c=`Commerce setup will continue for ${t}.`;let l;e[0]!==c?(l=s.jsx($,{title:"Commerce diagnostics",description:c}),e[0]=c,e[1]=l):l=e[1];let r;e[2]!==n?(r=s.jsx(ae,{message:n}),e[2]=n,e[3]=r):r=e[3];let d;e[4]!==o?(d=s.jsx(Y,{type:"button",size:"xl",className:"w-full",onClick:o,children:"Retry"}),e[4]=o,e[5]=d):d=e[5];let m;return e[6]!==l||e[7]!==r||e[8]!==d?(m=s.jsxs("div",{className:"grid gap-10",children:[l,r,d]}),e[6]=l,e[7]=r,e[8]=d,e[9]=m):m=e[9],m}function Ot(i){const e=I.c(83),{org:t,initialSiteUrl:n}=i,o=Ie();let c;e[0]!==t.id||e[1]!==t.slug?(c={connectionId:Oe,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=c):c=e[2];const l=be(c),[r,d]=O.useState(n??""),[m,g]=O.useState(null),[u,p]=O.useState(null),h=O.useRef(!1),f=Re.COMMERCE_DISCOVERY(t.id),x=Be(t.id),y=U.commerceDiscoveryConnection(t.id,f);let C;e[3]!==f||e[4]!==l?(C=async()=>{const S=await l.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:f}});return pe(S)},e[3]=f,e[4]=l,e[5]=C):C=e[5];let a;e[6]!==y||e[7]!==C?(a={queryKey:y,queryFn:C,retry:!1},e[6]=y,e[7]=C,e[8]=a):a=e[8];const b=Se(a),j=U.commerceDiscoveryVirtualMcp(t.id,x);let _;e[9]!==l||e[10]!==x?(_=async()=>{const S=await l.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:x}});return pe(S)},e[9]=l,e[10]=x,e[11]=_):_=e[11];let E;e[12]!==j||e[13]!==_?(E={queryKey:j,queryFn:_,retry:!1},e[12]=j,e[13]=_,e[14]=E):E=e[14];const T=Se(E);let R;e[15]!==l?(R=async S=>{const k=await l.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:S}});return pe(k)},e[15]=l,e[16]=R):R=e[16];let N;e[17]!==b||e[18]!==T?(N=S=>{g(S),p(null),b.refetch(),T.refetch()},e[17]=b,e[18]=T,e[19]=N):N=e[19];let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=S=>{p(S instanceof Error?S.message:"Commerce Discovery setup failed.")},e[20]=P):P=e[20];let z;e[21]!==R||e[22]!==N?(z={mutationFn:R,retry:!1,onSuccess:N,onError:P},e[21]=R,e[22]=N,e[23]=z):z=e[23];const v=Te(z),M=!!b.data.item&&!!T.data.item;let Z;e[24]!==v?(Z=S=>{const k=he(S);if(!k.ok){p(k.error);return}p(null),v.mutate(k.value)},e[24]=v,e[25]=Z):Z=e[25];const K=Z;let J;e[26]!==n||e[27]!==K||e[28]!==M?(J=S=>{!S||h.current||M||!n||(h.current=!0,K(n))},e[26]=n,e[27]=K,e[28]=M,e[29]=J):J=e[29];const ce=J;let X;e[30]!==K||e[31]!==r?(X=S=>{S.preventDefault(),K(r)},e[30]=K,e[31]=r,e[32]=X):X=e[32];const L=X;let ee;e[33]!==f||e[34]!==m?.reportApp||e[35]!==x?(ee=m?.reportApp??{connectionId:f,virtualMcpId:x,toolName:Qe},e[33]=f,e[34]=m?.reportApp,e[35]=x,e[36]=ee):ee=e[36];const w=ee;let te;e[37]!==o||e[38]!==t.slug||e[39]!==w.connectionId||e[40]!==w.toolName||e[41]!==w.virtualMcpId?(te=()=>{localStorage.setItem(Ke.sidebarOpen(),JSON.stringify(!1)),o({to:"/$org/$taskId",params:{org:t.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:w.virtualMcpId,main:He(w.connectionId,w.toolName),chat:0}})},e[37]=o,e[38]=t.slug,e[39]=w.connectionId,e[40]=w.toolName,e[41]=w.virtualMcpId,e[42]=te):te=e[42];const de=te;if(M){let S;return e[43]!==de||e[44]!==t||e[45]!==w?(S=s.jsx(wt,{org:t,reportApp:w,onOpenReport:de}),e[43]=de,e[44]=t,e[45]=w,e[46]=S):S=e[46],S}if(n){let S;e[47]!==n?(S=he(n),e[47]=n,e[48]=S):S=e[48];const k=S;if(!k.ok){const fe=`Commerce setup will continue for ${t.name}.`;let Q;e[49]!==fe?(Q=s.jsx($,{title:"Commerce diagnostics",description:fe}),e[49]=fe,e[50]=Q):Q=e[50];let W;e[51]!==k.error?(W=s.jsx(ae,{message:k.error}),e[51]=k.error,e[52]=W):W=e[52];let G;e[53]!==L||e[54]!==u||e[55]!==v.isPending||e[56]!==r?(G=s.jsx(ge,{siteUrl:r,error:u,isSubmitting:v.isPending,onSiteUrlChange:d,onSubmit:L}),e[53]=L,e[54]=u,e[55]=v.isPending,e[56]=r,e[57]=G):G=e[57];let ie;return e[58]!==Q||e[59]!==W||e[60]!==G?(ie=s.jsxs("div",{className:"grid gap-10",children:[Q,W,G]}),e[58]=Q,e[59]=W,e[60]=G,e[61]=ie):ie=e[61],ie}const ue=`Commerce Discovery is being prepared for ${k.value}.`;let F;e[62]!==ue?(F=s.jsx($,{title:"Commerce diagnostics",description:ue}),e[62]=ue,e[63]=F):F=e[63];let B;e[64]!==L||e[65]!==u||e[66]!==v||e[67]!==r?(B=u?s.jsxs(s.Fragment,{children:[s.jsx(ae,{message:u}),s.jsx(ge,{siteUrl:r,error:null,isSubmitting:v.isPending,onSiteUrlChange:d,onSubmit:L})]}):s.jsx(V,{label:"Setting up Commerce Discovery..."}),e[64]=L,e[65]=u,e[66]=v,e[67]=r,e[68]=B):B=e[68];let se;return e[69]!==F||e[70]!==B||e[71]!==ce?(se=s.jsxs("div",{ref:ce,className:"grid gap-10",children:[F,B]}),e[69]=F,e[70]=B,e[71]=ce,e[72]=se):se=e[72],se}const me=`Commerce setup will continue for ${t.name}.`;let q;e[73]!==me?(q=s.jsx($,{title:"Commerce diagnostics",description:me}),e[73]=me,e[74]=q):q=e[74];let H;e[75]!==L||e[76]!==u||e[77]!==v.isPending||e[78]!==r?(H=s.jsx(ge,{siteUrl:r,error:u,isSubmitting:v.isPending,onSiteUrlChange:d,onSubmit:L}),e[75]=L,e[76]=u,e[77]=v.isPending,e[78]=r,e[79]=H):H=e[79];let ne;return e[80]!==q||e[81]!==H?(ne=s.jsxs("div",{className:"grid gap-10",children:[q,H]}),e[80]=q,e[81]=H,e[82]=ne):ne=e[82],ne}function ge(i){const e=I.c(22),{siteUrl:t,error:n,isSubmitting:o,onSiteUrlChange:c,onSubmit:l}=i;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:"Website URL"}),e[0]=r):r=e[0];let d;e[1]!==c?(d=y=>c(y.target.value),e[1]=c,e[2]=d):d=e[2];const m=!!n;let g;e[3]!==o||e[4]!==t||e[5]!==d||e[6]!==m?(g=s.jsx(Fe,{id:"commerce-site-url",type:"text",inputMode:"url",value:t,onChange:d,placeholder:"https://example.com","aria-invalid":m,disabled:o}),e[3]=o,e[4]=t,e[5]=d,e[6]=m,e[7]=g):g=e[7];let u;e[8]!==n?(u=n?s.jsx(ae,{message:n}):null,e[8]=n,e[9]=u):u=e[9];let p;e[10]!==g||e[11]!==u?(p=s.jsxs("div",{className:"grid gap-2",children:[r,g,u]}),e[10]=g,e[11]=u,e[12]=p):p=e[12];let h;e[13]!==o?(h=o?s.jsxs(s.Fragment,{children:[s.jsx(Ce,{size:14,className:"animate-spin"}),"Setting up"]}):s.jsxs(s.Fragment,{children:["Continue",s.jsx(we,{size:16})]}),e[13]=o,e[14]=h):h=e[14];let f;e[15]!==o||e[16]!==h?(f=s.jsx(Y,{type:"submit",size:"xl",className:"w-full",disabled:o,children:h}),e[15]=o,e[16]=h,e[17]=f):f=e[17];let x;return e[18]!==l||e[19]!==p||e[20]!==f?(x=s.jsxs("form",{className:"grid gap-4",onSubmit:l,children:[p,f]}),e[18]=l,e[19]=p,e[20]=f,e[21]=x):x=e[21],x}function wt(i){const e=I.c(6),{org:t,reportApp:n,onOpenReport:o}=i;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx($,{}),e[0]=c):c=e[0];const l=!n.virtualMcpId;let r;return e[1]!==o||e[2]!==t||e[3]!==n.connectionId||e[4]!==l?(r=s.jsxs("div",{className:"flex h-[calc(100dvh-3rem)] flex-col gap-10 md:grid md:h-auto",children:[c,s.jsx(Ct,{org:t,cdConnectionId:n.connectionId,reportDisabled:l,onOpenReport:o})]}),e[1]=o,e[2]=t,e[3]=n.connectionId,e[4]=l,e[5]=r):r=e[5],r}function ae(i){const e=I.c(2),{message:t}=i;let n;return e[0]!==t?(n=s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:t}),e[0]=t,e[1]=n):n=e[1],n}export{Pn as default};
|
package/dist/client/assets/{connect-desktop-dialog-CN-ahIvP.js → connect-desktop-dialog-Bbb_JMLy.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,w as N,K as k,k as z,j as s,r as M,B as T,l as v}from"./index-
|
|
1
|
+
import{c as b,w as N,K as k,k as z,j as s,r as M,B as T,l as v}from"./index-Pat3pJAq.js";import{a as I,b as S,D,c as E,d as R}from"./dialog-CsirvbzA.js";import{S as _}from"./chat-context-DTOIbgGQ.js";import{i as $}from"./ChevronUp-zqx6ltUB.js";import{a as A}from"./Eye-Bu6T1cA0.js";import{u as B}from"./studio-tools-CHs_rGSt.js";const L={online:!1,capabilities:[],ready:!1};function F(){const i=b.c(7),{org:e}=N(),l=B();let o;i[0]!==e.id?(o=k.currentLink(e.id),i[0]=e.id,i[1]=o):o=i[1];let t;i[2]!==l?(t=async()=>{const f=await l.call("LINK_CURRENT_GET",{});return f?{...f,ready:!0}:{...L,ready:!0}},i[2]=l,i[3]=t):t=i[3];let n;i[4]!==o||i[5]!==t?(n={queryKey:o,queryFn:t,staleTime:4e3,refetchInterval:5e3,refetchOnWindowFocus:!0},i[4]=o,i[5]=t,i[6]=n):n=i[6];const{data:p}=z(n);return p??L}function K(i){const e=b.c(3),{size:l}=i,o=l===void 0?16:l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.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]=t):t=e[0];let n;return e[1]!==o?(n=s.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:t}),e[1]=o,e[2]=n):n=e[2],n}function O(i){const e=b.c(3),{size:l}=i,o=l===void 0?16:l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.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]=t):t=e[0];let n;return e[1]!==o?(n=s.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:t}),e[1]=o,e[2]=n):n=e[2],n}const y="bunx decocms@latest link",w=[{capability:"claude-code",label:"Claude Code",description:"Runs through the Claude Code CLI",icon:s.jsx(K,{size:18})},{capability:"codex",label:"Codex",description:"Runs through the Codex CLI",icon:s.jsx(O,{size:18})}];function Q(i){return w.filter(e=>i.includes(e.capability)).map(e=>e.label)}function U(i){const e=b.c(21),{open:l,onOpenChange:o}=i,t=F(),[n,p]=M.useState(!1),f=t.hostname??t.machineId??"Your desktop",j=t.online?`Connected to ${f}`:"Connect your desktop";let a;e[0]!==j?(a=s.jsx(I,{children:j}),e[0]=j,e[1]=a):a=e[1];const C=t.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 r;e[2]!==C?(r=s.jsx(S,{children:C}),e[2]=C,e[3]=r):r=e[3];let c;e[4]!==a||e[5]!==r?(c=s.jsxs(D,{children:[a,r]}),e[4]=a,e[5]=r,e[6]=c):c=e[6];let d;e[7]!==n||e[8]!==t.online?(d=!t.online&&s.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[s.jsx("span",{className:"flex-1",children:y}),s.jsx(T,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(y),p(!0),setTimeout(()=>p(!1),1500)},children:n?s.jsx($,{size:14}):s.jsx(A,{size:14})})]}),e[7]=n,e[8]=t.online,e[9]=d):d=e[9];let u;e[10]!==t.capabilities||e[11]!==t.online?(u=t.online?s.jsx("div",{className:"flex flex-col gap-3 text-sm",children:s.jsx("div",{className:"flex flex-col gap-2",children:w.map(x=>{const g=t.capabilities.includes(x.capability);return s.jsxs("div",{className:v("flex items-center gap-3 rounded-md border px-3 py-2",g?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[s.jsx("div",{className:v("flex size-6 items-center justify-center",g?"text-foreground":"text-muted-foreground"),children:x.icon}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"font-medium",children:x.label}),s.jsx("p",{className:"text-xs text-muted-foreground",children:g?x.description:"Not detected"})]}),s.jsx("span",{className:v("size-2 rounded-full",g?"bg-success":"bg-muted-foreground/30")})]},x.capability)})})}):s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(_,{size:"sm"}),"Waiting for desktop…"]}),e[10]=t.capabilities,e[11]=t.online,e[12]=u):u=e[12];let m;e[13]!==c||e[14]!==d||e[15]!==u?(m=s.jsxs(E,{className:"sm:max-w-md",children:[c,d,u]}),e[13]=c,e[14]=d,e[15]=u,e[16]=m):m=e[16];let h;return e[17]!==o||e[18]!==l||e[19]!==m?(h=s.jsx(R,{open:l,onOpenChange:o,children:m}),e[17]=o,e[18]=l,e[19]=m,e[20]=h):h=e[20],h}export{U as C,K as a,O as b,F as u,Q as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as _}from"./connection-slug-eyAPH6o3.js";import{c as R,w as $,b0 as k,K as D,l as w,j as x}from"./index-
|
|
1
|
+
import{g as _}from"./connection-slug-eyAPH6o3.js";import{c as R,w as $,b0 as k,K as D,l as w,j as x}from"./index-Pat3pJAq.js";import{u as K}from"./use-registry-connections-BLPbAhR8.js";import{b as Q}from"./use-organization-settings-D4FIVwU9.js";import{S as E,e as F}from"./use-mcp-client-D5s-JZx9.js";import{u as H}from"./useInfiniteQuery-Bj9MLRnT.js";import{i as q,f as G}from"./extract-connection-data-DQW44nI6.js";import{C as U}from"./card-C_fehaiI.js";import{I as V}from"./integration-icon-D96bHHLQ.js";function ae(s){const e=new Map;for(const o of s){const l=_(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],u=new Set;for(const o of s){const l=_(o);if(u.has(l))continue;u.add(l);const r=e.get(l),m=r[0];r.length===1?t.push({type:"single",connection:m}):t.push({type:"group",key:l,icon:m.icon,title:m.app_name?m.title.replace(/\s*\(\d+\)\s*$/,""):m.title,connections:r})}return t}function ce(){const s=R.c(6),e=K(),t=Q(),u=$().project.enabledPlugins??[];let o;if(s[0]!==u||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),u.includes("private-registry")&&t(E)&&o.push({id:E,title:"Private Registry",icon:null}),s[0]=u,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 Y=24,S=3;function A(s){return s.id.includes("community-registry")}function z(s){const e=s?.trim();if(e)return{operator:"or",conditions:[{field:["title"],operator:"contains",value:e},{field:["description"],operator:"contains",value:e},{field:["name"],operator:"contains",value:e},{field:["server","title"],operator:"contains",value:e}]}}function T(s,e,t,u,o){const l=s.map(c=>c.id).sort().join(","),r=z(o),{data:m,fetchNextPage:d,hasNextPage:f,isFetchingNextPage:p,isLoading:b}=H({queryKey:D.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:c})=>{const n=c??{};return await Promise.all(s.map(async i=>{const y=n[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=q(i.id,e);let h;for(let v=0;v<S;v++){let C=null;try{C=await F({connectionId:i.id,orgId:e,orgSlug:t});const I={limit:Y};y&&(I.cursor=y),r&&(I.where=r);const P=await C.callTool({name:j,arguments:I}),N=P.structuredContent??P,M=N.nextCursor||N.cursor||void 0,L=G(N?[N]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:L,nextCursor:M}}catch(I){h=I}finally{await C?.close().catch(()=>{})}}return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${S} attempts:`,h),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}))},initialPageParam:{},getNextPageParam:c=>{const n={};let a=!1;for(const i of c)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,a=!0):n[i.registryId]="EXHAUSTED");return a?n:void 0},staleTime:3600*1e3,placeholderData:k,retry:!1,enabled:s.length>0}),g=[];if(m?.pages)for(const c of m.pages)for(const n of c)for(const a of n.items)g.push({...a,_sourceName:a._sourceName??n.registryTitle,_sourceIcon:a._sourceIcon??n.registryIcon,_registryId:a._registryId??n.registryId});return{items:g,hasMore:f??!1,isLoadingMore:p,isInitialLoading:b,fetchNextPage:()=>{f&&!p&&d()}}}function ue(s,e){const t=R.c(16),{org:u}=$();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 m=r,d=T(l,u.id,u.slug,!0,e),f=T(m,u.id,u.slug,!0,e);let p;if(t[4]!==f.items||t[5]!==d.items){const y=new Set;p=[];const j=[...d.items,...f.items];for(const h of j){const v=`${h._registryId}:${h.id}`;y.has(v)||(y.add(v),p.push(h))}t[4]=f.items,t[5]=d.items,t[6]=p}else p=t[6];const b=d.isInitialLoading||f.isInitialLoading,g=d.isLoadingMore||f.isLoadingMore,c=d.hasMore||f.hasMore;let n;t[7]!==f||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),f.hasMore&&f.fetchNextPage()},t[7]=f,t[8]=d,t[9]=n):n=t[9];const a=n;let i;return t[10]!==c||t[11]!==b||t[12]!==g||t[13]!==p||t[14]!==a?(i={items:p,hasMore:c,isLoadingMore:g,isInitialLoading:b,loadMore:a},t[10]=c,t[11]=b,t[12]=g,t[13]=p,t[14]=a,t[15]=i):i=t[15],i}function W(s){return A(s)}function Z(s){return!A(s)}function fe(s){const e=R.c(37),{connection:t,onClick:u,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:m,className:d,fallbackIcon:f}=s,p=l===void 0?!1:l,b=u&&"hover:bg-muted/50";let g;e[0]!==d||e[1]!==b?(g=w("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",b,d),e[0]=d,e[1]=b,e[2]=g):g=e[2];let c;e[3]!==t.icon||e[4]!==t.title||e[5]!==f?(c=x.jsx(V,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[3]=t.icon,e[4]=t.title,e[5]=f,e[6]=c):c=e[6];let n;e[7]!==o||e[8]!==p?(n=o&&x.jsx("div",{className:w("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:J,children:o}),e[7]=o,e[8]=p,e[9]=n):n=e[9];let a;e[10]!==n?(a=x.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=a):a=e[11];let i;e[12]!==c||e[13]!==a?(i=x.jsxs("div",{className:"flex items-start justify-between",children:[c,a]}),e[12]=c,e[13]=a,e[14]=i):i=e[14];let y;e[15]!==t.title?(y=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=y):y=e[16];const j=t.description||"No description";let h;e[17]!==j?(h=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=h):h=e[18];let v;e[19]!==h||e[20]!==y?(v=x.jsxs("div",{className:"flex flex-col gap-1",children:[y,h]}),e[19]=h,e[20]=y,e[21]=v):v=e[21];let C;e[22]!==r?(C=r&&x.jsx("div",{children:r}),e[22]=r,e[23]=C):C=e[23];let I;e[24]!==v||e[25]!==C||e[26]!==i?(I=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,v,C]}),e[24]=v,e[25]=C,e[26]=i,e[27]=I):I=e[27];let P;e[28]!==m?(P=m&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:B,children:m})}),e[28]=m,e[29]=P):P=e[29];let N;e[30]!==I||e[31]!==P?(N=x.jsxs("div",{className:"flex flex-col flex-1",children:[I,P]}),e[30]=I,e[31]=P,e[32]=N):N=e[32];let M;return e[33]!==u||e[34]!==N||e[35]!==g?(M=x.jsx(U,{className:g,onClick:u,children:N}),e[33]=u,e[34]=N,e[35]=g,e[36]=M):M=e[36],M}function B(s){return s.stopPropagation()}function J(s){return s.stopPropagation()}export{fe as C,ue as a,ae as g,ce as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as he,aE as Ie,b6 as Ae,C as le,aC as De,c as P,j as t,i as ge,B as V,r as q,l as je,w as J,p as $e,K as ne,b as Y,aa as ce,q as Pe,b7 as Oe,E as ze,e as Me,b8 as Ee,m as Ve,G as Ue,F as Fe,t as X,b9 as Re}from"./index-Pat3pJAq.js";import{a as Le}from"./extract-connection-data-DQW44nI6.js";import{E as ve}from"./empty-state-BR0VX0WK.js";import{E as Be,c as He,r as Ge,b as We,d as Xe}from"./connection-form-helpers-BGeEr2Wd.js";import{c as qe,S as Ke,V as Qe}from"./index-CKMrk_Wj.js";import{u as be,T as Je}from"./index-k6rfQcrz.js";import{u as Ye}from"./use-members-C6JtLoz3.js";import{A as Ze}from"./avatar-huYQCC56.js";import{a as Ne,b as ye,u as et}from"./use-connection-OMHbx8Fv.js";import{u as _e}from"./use-mcp-client-D5s-JZx9.js";import{a as tt}from"./use-mcp-tools-y5FOo2na.js";import{a as st}from"./use-mcp-prompts-DOIkquNc.js";import{i as nt,a as ot}from"./mcp-oauth-BJ20JRuX.js";import{I as oe}from"./integration-icon-D96bHHLQ.js";import{s as it}from"./Plus-Ce8glufj.js";import{z as at,C as rt,af as lt,a4 as ct}from"./agent-icon-ysNW4XR3.js";import{a as Ce,s as dt}from"./Settings02-BPKyn9lz.js";import{s as ae}from"./Trash01-DHwSI6yL.js";import{d as mt,c as ut,b as xt,S as pt,a as ft}from"./sheet-B8bWDiH8.js";import{F as L,b as B,c as H,d as E,f as G,e as ht,a as gt}from"./form-l-monXIg.js";import{I as W}from"./input-Bmgjwfqa.js";import{u as jt,D as vt}from"./use-delete-connection-D3Cw_l0k.js";import{c as bt,C as Nt,B as yt,a as _t,b as Ct,d as St,e as wt}from"./monitoring-stats-row-BG9ozr5G.js";import{u as kt}from"./studio-tools-CHs_rGSt.js";import{u as Tt}from"./use-virtual-mcp-SQ-AGFry.js";import{i as Se}from"./ChevronRight-B06KXNz0.js";import{a as we}from"./Users03-CNrhCl5t.js";import{T as ee,a as It,b as te,c as At}from"./tabs-tj-mDk3G.js";import{g as ke}from"./connection-slug-eyAPH6o3.js";import{n as Dt}from"./ZapSquare-9ESQMXmQ.js";import{c as $t}from"./Tool01-DthaYcRg.js";import{g as re,M as Pt}from"./types-CCU1Qb1L.js";import{C as Ot}from"./collection-search-Dg7QZEAU.js";import{C as zt}from"./card-C_fehaiI.js";import{B as Mt}from"./badge-BZJsCOGK.js";import{D as Et,a as Vt,b as Ut,c as de}from"./dropdown-menu-BzKQoihe.js";import{d as me,b as ue,c as xe,S as pe,a as R}from"./select-Db6_lt9v.js";import{i as Ft}from"./CheckCircle-CpqmJQQj.js";import{t as Rt}from"./ChevronDown-BkIuna_N.js";import{n as Lt}from"./XCircle-D--nsAyg.js";import{s as se}from"./Star01-DKVn-D_o.js";import{s as Bt}from"./XClose-C-_BT2hv.js";import"./index-AuDyOR_l.js";import"./sidebar-BV39sx2h.js";import"./LayoutLeft-DmgR4QKJ.js";import"./tooltip-B5ZRtiWb.js";import"./ZoomOut-vLQBm0K1.js";import"./Key01-CSj8veNe.js";import"./auth-DK93vS8p.js";import"./use-registry-connections-BLPbAhR8.js";import"./use-organization-settings-D4FIVwU9.js";import"./index-CuYE42R8.js";import"./index-NjOyHlNQ.js";import"./popover-hX7BP56v.js";import"./ChevronUp-zqx6ltUB.js";import"./SearchMd-BT20-sda.js";import"./use-create-virtual-mcp-BzfJqNI1.js";import"./use-navigate-to-agent-Cf9Ptpjb.js";import"./Eye-Bu6T1cA0.js";import"./use-org-auth-client-BIUXpGUn.js";import"./User01-D736U4CX.js";import"./use-collections-CtF7H9Ec.js";import"./AlertCircle-W6j8H01c.js";import"./SwitchHorizontal01-rjvNMlJx.js";import"./ArrowUpRight-CZSTSF18.js";import"./ChevronLeft-B4YPm5Tt.js";import"./DotsVertical-CnakMMTn.js";import"./Stars02-DbeWjR8E.js";import"./Globe01-BonH0jIg.js";import"./FilterLines-Ckvl4OhL.js";import"./Globe04-by7Koucw.js";import"./HardDrive-i-7mfT2M.js";import"./LinkExternal01-CwjMdvmW.js";import"./Monitor01-CwV0BvWh.js";import"./Sun-J6HGala1.js";import"./Palette-DDt_6p48.js";import"./Play-DkjtpYqH.js";import"./Shield01-CouVDS_l.js";import"./Stars01-BZYGWgaC.js";import"./Upload01-ClFoMfKj.js";import"./Users01-Cl5hK_oE.js";import"./X-BZrTCz0a.js";import"./Zap-C46ZuAed.js";import"./label-2loPtYA2.js";import"./alert-dialog-CnUqNj3j.js";const Ht=he({scopes:De(le()).describe("List of scopes available"),stateSchema:Ie(le(),Ae()).describe("JSON Schema (draft-07) defining the state structure")}),Gt=[{name:"MCP_CONFIGURATION",inputSchema:he({}),outputSchema:Ht}];function Wt(s){const e=P.c(46),{instance:n,onConfigure:a,onAuthenticate:r,onDelete:o,onToggleStatus:i}=s;let c;e[0]!==n.id?(c={connectionId:n.id},e[0]=n.id,e[1]=c):c=e[1];const l=be(c),x=!(n.connection_type==="VIRTUAL")&&l.supportsOAuth&&!l.isAuthenticated,p=n.status!=="active",d=x||p?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==d?(h=je("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",d),e[2]=d,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(oe,{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(V,{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]!==i?(T=p?t.jsxs(V,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>i(n,"active"),children:[t.jsx(at,{size:13}),"Enable"]}):t.jsx(V,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>i(n,"inactive"),title:"Disable",children:t.jsx(rt,{size:13})}),e[20]=n,e[21]=p,e[22]=i,e[23]=T):T=e[23];let S;e[24]!==n||e[25]!==a?(S=()=>a(n),e[24]=n,e[25]=a,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(V,{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(ae,{size:13}),e[33]=k):k=e[33];let C;e[34]!==_?(C=t.jsx(V,{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 Xt(s){const e=P.c(15),{instance:n,onConfigure:a}=s;let r;e[0]!==n.icon||e[1]!==n.title?(r=t.jsx(oe,{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 i;e[5]!==n||e[6]!==a?(i=()=>a(n),e[5]=n,e[6]=a,e[7]=i):i=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Ce,{size:13}),e[8]=c):c=e[8];let l;e[9]!==i?(l=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(V,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:i,title:"Configure",children:c})}),e[9]=i,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 qt(s){const e=P.c(27),{instances:n,onConfigure:a,onAuthenticate:r,onDelete:o,onToggleStatus:i,onAdd:c,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(it,{size:13}),e[2]=l,e[3]=p):p=e[3];let d;e[4]!==l||e[5]!==c||e[6]!==p?(d=t.jsxs(V,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:c,disabled:l,children:[p,"Add instance"]}),e[4]=l,e[5]=c,e[6]=p,e[7]=d):d=e[7];let h;e[8]!==x||e[9]!==d?(h=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[x,d]}),e[8]=x,e[9]=d,e[10]=h):h=e[10];let g;if(e[11]!==n||e[12]!==r||e[13]!==a||e[14]!==o||e[15]!==i){let j;e[17]!==r||e[18]!==a||e[19]!==o||e[20]!==i?(j=N=>t.jsx(q.Suspense,{fallback:t.jsx(Xt,{instance:N,onConfigure:a}),children:t.jsx(Wt,{instance:N,onConfigure:a,onAuthenticate:r,onDelete:o,onToggleStatus:i})},N.id),e[17]=r,e[18]=a,e[19]=o,e[20]=i,e[21]=j):j=e[21],g=n.map(j),e[11]=n,e[12]=r,e[13]=a,e[14]=o,e[15]=i,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}const Kt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function Qt(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 Jt={calls:{label:"Tool calls"},errors:{label:"Errors"}};function Yt(s){const e=P.c(1),{connectionId:n,orgId:a,timeframe:r}=s,o=kt(),i=Qt(r),{data:c}=$e({queryKey:ne.connectionActivity(n,r,a),queryFn:async()=>await o.call("MONITORING_LOGS_LIST",{startDate:i.startDate.toISOString(),endDate:i.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),l=bt(c?.logs??[],i),u=l.data,x=l.totalCalls>0;let p;return e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Tool calls"}),e[0]=p):p=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()}),p]}),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:Jt,className:"h-16 w-full",children:t.jsxs(yt,{data:u,barCategoryGap:"4%",children:[t.jsx(_t,{content:t.jsx(Ct,{labelFormatter:es}),cursor:{fill:"var(--muted)"}}),t.jsx(St,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:u.map(Zt)})]})}),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"})})]})}function Zt(s,e){return t.jsx(wt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function es(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function ts(){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 ss(s){const e=P.c(13),{connectionId:n}=s,[a,r]=q.useState("14d"),{org:o}=J();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Activity"})}),e[0]=i):i=e[0];let c;e[1]!==a?(c=Kt.map(d=>t.jsx("button",{type:"button",onClick:()=>r(d.value),className:je("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",a===d.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:d.label},d.value)),e[1]=a,e[2]=c):c=e[2];let l;e[3]!==c?(l=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[i,t.jsx("div",{className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:c})]}),e[3]=c,e[4]=l):l=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(ts,{}),e[5]=u):u=e[5];let x;e[6]!==n||e[7]!==o.id||e[8]!==a?(x=t.jsx(q.Suspense,{fallback:u,children:t.jsx(Yt,{connectionId:n,orgId:o.id,timeframe:a})}),e[6]=n,e[7]=o.id,e[8]=a,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 ns(s){const e=P.c(15),{virtualMcp:n,org:a}=s,r=Y();let o;e[0]!==r||e[1]!==a||e[2]!==n.id?(o=()=>{const p=crypto.randomUUID();r({to:"/$org/$taskId",params:{org:a,taskId:p},search:{virtualmcpid:n.id}})},e[0]=r,e[1]=a,e[2]=n.id,e[3]=o):o=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(we,{size:16}),e[4]=i):i=e[4];let c;e[5]!==n.icon||e[6]!==n.title?(c=t.jsx(oe,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:i}),e[5]=n.icon,e[6]=n.title,e[7]=c):c=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]!==c||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:[c,l,u]}),e[11]=o,e[12]=c,e[13]=l,e[14]=x):x=e[14],x}function os(s){const e=P.c(7),{virtualMcps:n,org:a}=s;let r;if(e[0]!==a||e[1]!==n){let i;e[3]!==a?(i=c=>t.jsx(ns,{virtualMcp:c,org:a},c.id),e[3]=a,e[4]=i):i=e[4],r=n.map(i),e[0]=a,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 is(s){const e=P.c(7),{connection:n}=s,{org:a}=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=Tt(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 c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=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]=c):c=e[3];let l;return e[4]!==a.slug||e[5]!==o?(l=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[c,t.jsx("div",{className:"px-5 py-4",children:t.jsx(os,{virtualMcps:o,org:a.slug})})]}),e[4]=a.slug,e[5]=o,e[6]=l):l=e[6],l}function as(s){const e=P.c(31),{tools:n,connectionId:a,org:r}=s,o=Y(),{org:i}=J();let c;e[0]!==a||e[1]!==i.id||e[2]!==i.slug?(c={connectionId:a,orgId:i.id,orgSlug:i.slug},e[0]=a,e[1]=i.id,e[2]=i.slug,e[3]=c):c=e[3];const l=_e(c),u=Ne(a);let x;e[4]!==u||e[5]!==a?(x=u?ke(u):a,e[4]=u,e[5]=a,e[6]=x):x=e[6];const p=x,[d,h]=q.useState("");let g,v,b,j;if(e[7]!==p||e[8]!==l||e[9]!==o||e[10]!==r||e[11]!==d||e[12]!==n){const S=(n??[]).filter(rs),y=d.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]!==d?(j=t.jsx(Ot,{value:d,onChange:h,placeholder:"Search apps...",onKeyDown:C}),e[22]=d,e[23]=j):j=e[23],g="flex-1 overflow-auto p-5",v=I.length===0?t.jsx(ve,{image:null,title:d?"No apps found":"No apps available",description:d?"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=re(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(Pt,{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(Je,{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]=d,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 rs(s){return!!re(s._meta)}function Te(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=i=>i.charAt(0).toUpperCase()+i.slice(1),a=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&&a.has(o)?[r.pop(),...r].join(" "):r.join(" ")}function ie(s){const e=P.c(2),{label:n}=s;let a;return e[0]!==n?(a=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]=a):a=e[1],a}function ls(s){const e=P.c(50),{tools:n,prompts:a,resources:r,connectionId:o,org:i}=s;let c;e[0]!==a?(c=a===void 0?[]:a,e[0]=a,e[1]=c):c=e[1];const l=c;let u;e[2]!==r?(u=r===void 0?[]:r,e[2]=r,e[3]=u):u=e[3];const x=u,p=Y(),d=Ne(o??"");let h;e[4]!==d||e[5]!==o?(h=d?ke(d):o,e[4]=d,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]!==i?(v=function(D){!o||!i||p({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:i,appSlug:g,collectionName:"tools",itemId:encodeURIComponent(D)}})},e[7]=g,e[8]=o,e[9]=p,e[10]=i,e[11]=v):v=e[11];const b=v;let j;e[12]!==o||e[13]!==i||e[14]!==n?(j=o&&i&&n.some(ms),e[12]=o,e[13]=i,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(ee,{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(ee,{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(ee,{value:"prompts",variant:"underline",children:"Prompts"}),_=t.jsx(ee,{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(It,{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($t,{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(te,{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]!==i||e[34]!==n?(w=N&&t.jsx(te,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(as,{tools:n,connectionId:o,org:i})}),e[31]=o,e[32]=N,e[33]=i,e[34]=n,e[35]=w):w=e[35];let z;e[36]!==l?(z=l.length>0?l.map(ds):t.jsx(ie,{label:"prompts"}),e[36]=l,e[37]=z):z=e[37];let O;e[38]!==z?(O=t.jsx(te,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:z})}),e[38]=z,e[39]=O):O=e[39];let A;e[40]!==x?(A=x.length>0?x.map(cs):t.jsx(ie,{label:"resources"}),e[40]=x,e[41]=A):A=e[41];let M;e[42]!==A?(M=t.jsx(te,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[42]=A,e[43]=M):M=e[43];let U;return e[44]!==k||e[45]!==f||e[46]!==w||e[47]!==O||e[48]!==M?(U=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(At,{defaultValue:"tools",variant:"underline",children:[k,f,w,O,M]})}),e[44]=k,e[45]=f,e[46]=w,e[47]=O,e[48]=M,e[49]=U):U=e[49],U}function cs(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(lt,{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 ds(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 ms(s){return re(s._meta)}function us(s){const e=P.c(13),{connection:n,displayTitle:a}=s,r=a??n.title;let o;e[0]!==n.icon||e[1]!==r?(o=t.jsx(oe,{icon:n.icon,name:r,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=r,e[2]=o):o=e[2];let i;e[3]!==r?(i=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]=i):i=e[4];let c;e[5]!==n.description?(c=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]=c):c=e[6];let l;e[7]!==i||e[8]!==c?(l=t.jsxs("div",{className:"flex-1 min-w-0",children:[i,c]}),e[7]=i,e[8]=c,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 xs({form:s,connection:e,hasOAuthToken:n,onReauthenticate:a,onRemoveOAuth:r}){const o=ce({control:s.control,name:"ui_type"}),i=ce({control:s.control,name:"connection_url"}),{stdioEnabled:c}=Pe(),l=(()=>{if(typeof i!="string"||!i)return!1;try{const d=new URL(i);return d.hostname==="api.githubcopilot.com"&&d.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),u=c||e.connection_type==="STDIO",x=e.connection_type==="VIRTUAL",p=x?Oe(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:d})=>t.jsxs(B,{className:"flex flex-col gap-3",children:[t.jsx(H,{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:d.value,onValueChange:d.onChange,children:[t.jsx(E,{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(se,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(xe,{})]})}),t.jsxs(pe,{children:[t.jsx(R,{value:"HTTP",children:"HTTP"}),t.jsx(R,{value:"SSE",children:"SSE"}),t.jsx(R,{value:"Websocket",children:"Websocket"}),u&&t.jsxs(t.Fragment,{children:[t.jsx(R,{value:"NPX",children:"NPX Package"}),t.jsx(R,{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(B,{className:"flex-1 min-w-0",children:t.jsx(E,{children:t.jsx(W,{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:d.value,onValueChange:d.onChange,children:[t.jsx(E,{children:t.jsx(ue,{className:"h-10",children:t.jsx(xe,{})})}),t.jsxs(pe,{children:[t.jsx(R,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(R,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(R,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"Websocket"]})}),u&&t.jsxs(t.Fragment,{children:[t.jsx(R,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Lt,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(R,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ct,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(G,{})]})}),o==="NPX"&&t.jsx(L,{control:s.control,name:"npx_package",render:({field:d})=>t.jsxs(B,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"NPM Package"}),t.jsx(E,{children:t.jsx(W,{placeholder:"@perplexity-ai/mcp-server",...d,value:d.value||"",className:"h-10 rounded-lg"})}),t.jsx(G,{})]})}),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:d})=>t.jsxs(B,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"Command"}),t.jsx(E,{children:t.jsx(W,{placeholder:"node, bun, python...",...d,value:d.value||"",className:"h-10 rounded-lg"})}),t.jsx(G,{})]})}),t.jsx(L,{control:s.control,name:"stdio_args",render:({field:d})=>t.jsxs(B,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"Arguments"}),t.jsx(E,{children:t.jsx(W,{placeholder:"arg1 arg2 --flag value",...d,value:d.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated arguments"}),t.jsx(G,{})]})})]}),t.jsx(L,{control:s.control,name:"stdio_cwd",render:({field:d})=>t.jsxs(B,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"Working Directory"}),t.jsx(E,{children:t.jsx(W,{placeholder:"/path/to/project (optional)",...d,value:d.value||"",className:"h-10 rounded-lg"})}),t.jsx(G,{})]})})]}),(o==="NPX"||o==="STDIO")&&t.jsx(L,{control:s.control,name:"env_vars",render:({field:d})=>t.jsxs(B,{className:"flex flex-col gap-3",children:[t.jsx(H,{className:"text-xs text-muted-foreground font-medium",children:"Environment Variables"}),t.jsx(E,{children:t.jsx(Be,{value:d.value??[],onChange:d.onChange})}),t.jsx(G,{})]})}),o!=="NPX"&&o!=="STDIO"&&t.jsx(L,{control:s.control,name:"connection_token",render:({field:d})=>t.jsxs(B,{className:"flex flex-col gap-3",children:[t.jsx(H,{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(Et,{children:[t.jsx(Vt,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Mt,{variant:"success",className:"gap-1.5",children:[t.jsx(Ft,{size:12}),"Authenticated via OAuth",t.jsx(Rt,{size:12})]})})}),t.jsxs(Ut,{align:"start",children:[t.jsxs(de,{onClick:a,children:[t.jsx(dt,{size:16}),"Re-authenticate"]}),t.jsxs(de,{variant:"destructive",onClick:r,children:[t.jsx(ae,{size:16}),"Remove OAuth"]})]})]})}):e.connection_token&&d.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:()=>d.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(E,{children:t.jsx(W,{type:"password",placeholder:l?"Paste your GitHub PAT":"Enter access token...",...d,value:d.value||"",className:"h-10 rounded-lg"})}),l&&t.jsxs(ht,{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(G,{})]})})]})}function ps(s){return s.command==="npx"}function fs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function hs(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"&&Re(s.connection_headers)){const a=s.connection_headers,r=Ge(a.envVars);if(ps(a)){const i=fs(a);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:i,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:r}}const o=hs(a);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 gs(s){let e,n=null,a=null,r=null;return s.ui_type==="NPX"?(e="STDIO",n="",r=We(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",r=Xe(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",a=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...a&&{connection_token:a},...r&&{connection_headers:r},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function js({connection:s,connectionId:e,org:n,isUpdating:a,tools:r,prompts:o,resources:i,siblings:c}){const l=Y({from:"/$org/settings/connections/$appSlug"}),u=Ve(),x=ye(),{org:p}=J(),d=jt({onSuccess:()=>{c.length<=1&&l({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=q.useState(null),[v,b]=q.useState(!1),j=be({connectionId:e}),{data:N}=Ye(),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=qe(k,Gt),f=Ue({resolver:Fe(He),values:fe(h??s)}),w=f.formState.isDirty,z=async()=>{if(!await f.trigger())return;const D=f.getValues(),$=gs(D),F=h?.id??e;await x.update.mutateAsync({id:F,data:$}),f.reset(D)},O=()=>{f.reset(fe(h??s))},A=async m=>{const{token:D,tokenInfo:$,error:F}=await ot({connectionId:m,orgSlug:p.slug,scope:"offline_access"});if(F||!D){X.error(`Authentication failed: ${F}`);return}if($)try{const K=await fetch(`/api/${p.slug}/connections/${m}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:$.accessToken,refreshToken:$.refreshToken,expiresIn:$.expiresIn,scope:$.scope,clientId:$.clientId,clientSecret:$.clientSecret,tokenEndpoint:$.tokenEndpoint})});if(!K.ok)console.error("Failed to save OAuth token:",await K.text()),await x.update.mutateAsync({id:m,data:{connection_token:D}});else try{await x.update.mutateAsync({id:m,data:{}})}catch(Z){console.warn("Failed to refresh connection tools after OAuth:",Z)}}catch(K){console.error("Error saving OAuth token:",K),await x.update.mutateAsync({id:m,data:{connection_token:D}})}else await x.update.mutateAsync({id:m,data:{connection_token:D}});const Q=new URL(`/api/${p.slug}/mcp/${m}`,window.location.origin);await u.invalidateQueries({queryKey:ne.isMCPAuthenticated(Q.href,null)}),await u.invalidateQueries({queryKey:ne.mcpClientPrefix()}),X.success("Authentication successful")},M=()=>A(s.id),U=async()=>{try{const m=await fetch(`/api/${p.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!m.ok){const $=await m.text();X.error(`Failed to remove OAuth: ${$}`);return}const D=new URL(`/api/${p.slug}/mcp/${s.id}`,window.location.origin);await u.invalidateQueries({queryKey:ne.isMCPAuthenticated(D.href,null)}),X.success("OAuth removed. You can now re-authenticate with a different account.")}catch(m){console.error("Error removing OAuth token:",m),X.error("Failed to remove OAuth")}};return t.jsxs(t.Fragment,{children:[t.jsx(vt,{...d}),t.jsx(mt,{open:h!==null,onOpenChange:m=>{m||g(null)},children:t.jsxs(ut,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(xt,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(pt,{className:"text-base",children:h?.title??s.title}),t.jsx(ft,{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(Ze,{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(gt,{...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(B,{children:[t.jsx(H,{children:"Name"}),t.jsx(E,{children:t.jsx(W,{...m})}),t.jsx(G,{})]})}),t.jsx(L,{control:f.control,name:"description",render:({field:m})=>t.jsxs(B,{children:[t.jsx(H,{children:"Description"}),t.jsx(E,{children:t.jsx(W,{...m,value:m.value||""})}),t.jsx(G,{})]})})]}),t.jsx(xs,{form:f,connection:h??s,hasOAuthToken:j.hasOAuthToken,onReauthenticate:M,onRemoveOAuth:U}),t.jsx(Ke,{connection:h??s,form:f,hasMcpBinding:C,isMCPAuthenticated:_,supportsOAuth:j.supportsOAuth,isServerError:j.isServerError,onAuthenticate:M,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(V,{onClick:z,disabled:!w||a,className:"flex-1",children:a?"Saving…":"Save changes"}),w&&t.jsx(V,{variant:"outline",onClick:O,children:"Undo"}),t.jsxs(V,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const m=h??s;g(null),d.requestDelete(m)},children:[t.jsx(ae,{size:15}),"Delete"]})]})]},h?.id??s.id)]})}),t.jsx(Qe,{hideHeader:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(us,{connection:s,displayTitle:(()=>{const m=c[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(ss,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(qt,{instances:c,onConfigure:m=>g(m),onAuthenticate:m=>A(m.id),onDelete:m=>d.requestDelete(m),onToggleStatus:async(m,D)=>{try{await x.update.mutateAsync({id:m.id,data:{status:D}}),X.success(D==="active"?"Connection enabled":"Connection disabled")}catch{X.error("Failed to update connection")}},isAdding:v,onAdd:async()=>{b(!0);try{const m=c[0]??s,D=m.title.replace(/\s*\(\d+\)\s*$/,""),$=c.length+1,F=`${D} (${$})`,Q=Le("conn");await x.create.mutateAsync({id:Q,title:F,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 K=new URL(`/api/${p.slug}/mcp/${Q}`,window.location.origin),Z=await nt({url:K.href,token:null,orgId:p.id});Z.supportsOAuth&&!Z.isAuthenticated&&await A(Q)}finally{b(!1)}}}),t.jsx(is,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(ls,{tools:r,prompts:o,resources:i,connectionId:e,org:n})})]})})]})})]})}function vs(){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 a;s[1]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org/settings/connections/$appSlug"},s[1]=a):a=s[1];const{appSlug:r,org:o}=Me(a),{org:i}=J(),c=ye();let l;s[2]!==r?(l={slug:r},s[2]=r,s[3]=l):l=s[3];const u=et(l),x=u[0]??null,p=x?.id??"",d=p||null;let h;s[4]!==i.id||s[5]!==i.slug||s[6]!==d?(h={connectionId:d,orgId:i.id,orgSlug:i.slug},s[4]=i.id,s[5]=i.slug,s[6]=d,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}=tt(v);let j;if(s[10]!==x?.tools||s[11]!==p||s[12]!==u||s[13]!==b){const A=b?b.tools.map(Ss):(x?.tools??[]).map(Cs);e:{if(u.length<=1){j=A;break e}const M=new Set,U=[],m=ys;for(const D of u){const $=D.id===p?A:m(D.tools);for(const F of $)M.has(F.name)||(M.add(F.name),U.push(F))}j=U.length>0?U: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}=st(T);let y;s[17]!==g?(y={client:g},s[17]=g,s[18]=y):y=s[18];const{data:I}=Ee(y);let _;s[19]!==S?.prompts?(_=S?.prompts??[],s[19]=S?.prompts,s[20]=_):_=s[20];let k;s[21]!==_?(k=_.map(Ns),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(bs),s[25]=f,s[26]=w):w=s[26];const z=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(V,{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]!==c.update.isPending||s[31]!==N||s[32]!==x||s[33]!==p||s[34]!==o||s[35]!==C||s[36]!==z||s[37]!==u?(O=t.jsx(js,{org:o,connection:x,connectionId:p,isUpdating:c.update.isPending,tools:N,prompts:C,resources:z,siblings:u}),s[30]=c.update.isPending,s[31]=N,s[32]=x,s[33]=p,s[34]=o,s[35]=C,s[36]=z,s[37]=u,s[38]=O):O=s[38],O}function bs(s){return{name:s.name,description:s.description,uri:s.uri}}function Ns(s){return{name:s.name,description:s.description}}function ys(s){return(s??[]).map(_s)}function _s(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Cs(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ss(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function ws(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ze,{children:t.jsx(q.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(vs,{})})}),s[0]=e):e=s[0],e}function io(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ws,{}),s[0]=e):e=s[0],e}export{io as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as R,aE as z,b6 as A,C as a,aC as S,aD as I,c as L,j as u,B as j}from"./index-
|
|
1
|
+
import{z as R,aE as z,b6 as A,C as a,aC as S,aD as I,c as L,j as u,B as j}from"./index-Pat3pJAq.js";import{I as H}from"./input-Bmgjwfqa.js";import{s as W}from"./Plus-Ce8glufj.js";import{s as q}from"./Trash01-DHwSI6yL.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:I(["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:S(K).optional(),configuration_scopes:S(a()).nullable().optional(),configuration_state:z(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 N=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(j,{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]!==N?(f=u.jsxs(j,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:N,children:[T,"Add Environment Variable"]}),e[26]=N,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 V(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 C(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=C(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===C("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=C(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(s=>(s.server?.remotes??[]).some(m=>C(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=V(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=V(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 E,c as oe,j as t,E as Ye,i as ce,w as be,b as _e,u as Ze,a as Ne,q as et,v as tt,L as nt,G as st,F as ot,B as U,s as te,m as it,l as de,t as W,K as rt}from"./index-Pat3pJAq.js";import{a as lt,b as De,g as at,e as ct}from"./extract-connection-data-DQW44nI6.js";import{C as dt}from"./collection-display-button-rZhSqMZx.js";import{S as mt}from"./search-input-CSsG1WWu.js";import{C as ut}from"./collection-tabs-Y0IGnWks.js";import{u as pt,a as ke,g as ht,C as Ce}from"./connection-card-C13JH9Uu.js";import{E as gt}from"./empty-state-BR0VX0WK.js";import{I as xt}from"./integration-icon-D96bHHLQ.js";import{P as ue}from"./index-AuDyOR_l.js";import{u as ft,D as jt}from"./use-delete-connection-D3Cw_l0k.js";import{u as ye}from"./use-capability-QYduHUWr.js";import{u as yt}from"./use-infinite-scroll-CcoPxc_B.js";import{u as Ct}from"./use-view-mode-Bp7cldRg.js";import{g as he}from"./connection-slug-eyAPH6o3.js";import{c as Ae,d as we,b as Te,A as Ie,e as Pe,g as $e,a as Le,f as Oe}from"./alert-dialog-CnUqNj3j.js";import{C as Fe}from"./checkbox-DnLV6Rmu.js";import{d as Me,c as ze,D as Ve,a as Ee,b as Be,e as Ke}from"./dialog-CsirvbzA.js";import{D as vt,a as St,c as bt,b as _t,d as Nt,e as Dt,f as kt}from"./drawer-CSBs93NV.js";import{u as At}from"./tooltip-B5ZRtiWb.js";import{D as Ue,a as Re,b as He,c as re}from"./dropdown-menu-BzKQoihe.js";import{F as Q,b as J,c as Y,d as Z,f as ee,a as ve}from"./form-l-monXIg.js";import{I as ie}from"./input-Bmgjwfqa.js";import{d as wt,b as Tt,c as It,S as Pt,a as ae}from"./select-Db6_lt9v.js";import{T as $t}from"./textarea-Deq7M1bS.js";import{b as We,u as Lt}from"./use-connection-OMHbx8Fv.js";import{u as Ot}from"./use-virtual-mcp-SQ-AGFry.js";import{u as Ft}from"./studio-tools-CHs_rGSt.js";import{a4 as Mt,ae as zt,C as Vt,z as Et}from"./agent-icon-ysNW4XR3.js";import{n as ge}from"./XCircle-D--nsAyg.js";import{a as Xe}from"./DotsVertical-CnakMMTn.js";import{s as qe}from"./Eye-Bu6T1cA0.js";import{s as je}from"./Star01-DKVn-D_o.js";import{s as Ge}from"./Plus-Ce8glufj.js";import{s as Qe}from"./Trash01-DHwSI6yL.js";import{s as Je}from"./XClose-C-_BT2hv.js";import{i as pe,a as Se,E as Bt,c as Kt,p as Ut,b as Rt,d as Ht}from"./connection-form-helpers-BGeEr2Wd.js";import{a as Wt}from"./authenticate-and-persist-oauth-C0aUigFl.js";import"./use-mcp-client-D5s-JZx9.js";import"./auth-DK93vS8p.js";import"./SwitchHorizontal01-rjvNMlJx.js";import"./ChevronUp-zqx6ltUB.js";import"./view-mode-toggle-C2-bvq7i.js";import"./badge-BZJsCOGK.js";import"./SearchMd-BT20-sda.js";import"./use-registry-connections-BLPbAhR8.js";import"./use-organization-settings-D4FIVwU9.js";import"./useInfiniteQuery-Bj9MLRnT.js";import"./card-C_fehaiI.js";import"./sidebar-BV39sx2h.js";import"./LayoutLeft-DmgR4QKJ.js";import"./sheet-B8bWDiH8.js";import"./X-BZrTCz0a.js";import"./ChevronRight-B06KXNz0.js";import"./label-2loPtYA2.js";import"./ChevronDown-BkIuna_N.js";import"./use-collections-CtF7H9Ec.js";import"./AlertCircle-W6j8H01c.js";import"./Tool01-DthaYcRg.js";import"./Settings02-BPKyn9lz.js";import"./ArrowUpRight-CZSTSF18.js";import"./ZapSquare-9ESQMXmQ.js";import"./Users03-CNrhCl5t.js";import"./CheckCircle-CpqmJQQj.js";import"./ChevronLeft-B4YPm5Tt.js";import"./Stars02-DbeWjR8E.js";import"./ZoomOut-vLQBm0K1.js";import"./Globe01-BonH0jIg.js";import"./FilterLines-Ckvl4OhL.js";import"./Globe04-by7Koucw.js";import"./HardDrive-i-7mfT2M.js";import"./Key01-CSj8veNe.js";import"./LinkExternal01-CwjMdvmW.js";import"./Monitor01-CwV0BvWh.js";import"./Sun-J6HGala1.js";import"./Palette-DDt_6p48.js";import"./Play-DkjtpYqH.js";import"./Shield01-CouVDS_l.js";import"./Stars01-BZYGWgaC.js";import"./Upload01-ClFoMfKj.js";import"./User01-D736U4CX.js";import"./Users01-Cl5hK_oE.js";import"./Zap-C46ZuAed.js";import"./mcp-oauth-BJ20JRuX.js";function Xt(f){const e=`deco-filters-${f}`,[n,p]=E.useState(()=>{try{const o=globalThis.localStorage?.getItem(e);if(o)return JSON.parse(o)}catch(o){console.error("Failed to parse stored filters:",o)}return[]});return[n,o=>{p(o);try{globalThis.localStorage?.setItem(e,JSON.stringify(o))}catch(i){console.error("Failed to save filters:",i)}}]}function qt(f){const e=oe.c(7),[n,p]=E.useState(f),[l,o]=E.useState(f?"desc":null);let i;e[0]!==l||e[1]!==n?(i=j=>{n!==j?(p(j),o("asc")):l==="asc"?o("desc"):l==="desc"&&(p(void 0),o(null))},e[0]=l,e[1]=n,e[2]=i):i=e[2];const g=i;let h;return e[3]!==g||e[4]!==l||e[5]!==n?(h={sortKey:n,sortDirection:l,handleSort:g},e[3]=g,e[4]=l,e[5]=n,e[6]=h):h=e[6],h}function Gt(f){const e=oe.c(20),{namespace:n,resource:p,defaultSortKey:l,defaultViewMode:o}=f,i=l===void 0?"title":l,g=o===void 0?"table":o,[h,j]=E.useState(""),y=E.useDeferredValue(h),N=`${n}-${p}`,[b,a]=Xt(N),x=`mesh-${p}-filter-visible-${n}`;let m;e[0]!==x?(m=()=>globalThis.localStorage?.getItem(x)==="true",e[0]=x,e[1]=m):m=e[1];const[v,_]=E.useState(m);let D;e[2]!==x?(D=T=>{_(T),globalThis.localStorage?.setItem(x,String(T))},e[2]=x,e[3]=D):D=e[3];const L=D;let O;e[4]!==v||e[5]!==L?(O=()=>{L(!v)},e[4]=v,e[5]=L,e[6]=O):O=e[6];const s=O,[A,F]=Ct(`mesh-${p}-${n}`,g),{sortKey:M,sortDirection:w,handleSort:P}=qt(i),z=M;let C;return e[7]!==v||e[8]!==b||e[9]!==P||e[10]!==h||e[11]!==y||e[12]!==L||e[13]!==a||e[14]!==F||e[15]!==w||e[16]!==z||e[17]!==s||e[18]!==A?(C={search:h,searchTerm:y,setSearch:j,filters:b,setFilters:a,filterBarVisible:v,setFilterBarVisible:L,toggleFilterBar:s,viewMode:A,setViewMode:F,sortKey:z,sortDirection:w,handleSort:P},e[7]=v,e[8]=b,e[9]=P,e[10]=h,e[11]=y,e[12]=L,e[13]=a,e[14]=F,e[15]=w,e[16]=z,e[17]=s,e[18]=A,e[19]=C):C=e[19],C}function Qt(f){const e=oe.c(51),{group:n,onOpen:p,selectionMode:l,selectedIds:o,onToggleSelect:i}=f;let g;if(e[0]!==n.connections||e[1]!==o){let C;e[3]!==o?(C=T=>o.has(T.id),e[3]=o,e[4]=C):C=e[4],g=n.connections.every(C),e[0]=n.connections,e[1]=o,e[2]=g}else g=e[2];const h=g;let j;if(e[5]!==n.connections||e[6]!==o){let C;e[8]!==o?(C=T=>o.has(T.id),e[8]=o,e[9]=C):C=e[9],j=n.connections.some(C),e[5]=n.connections,e[6]=o,e[7]=j}else j=e[7];const y=j,N=`${n.connections.length} instances`;let b;e[10]!==n.icon||e[11]!==n.title||e[12]!==N?(b={title:n.title,icon:n.icon,description:N},e[10]=n.icon,e[11]=n.title,e[12]=N,e[13]=b):b=e[13];let a;e[14]!==h||e[15]!==n.connections||e[16]!==p||e[17]!==i||e[18]!==o||e[19]!==l?(a=()=>l?(()=>{for(const C of n.connections)h?o.has(C.id)&&i(C.id):o.has(C.id)||i(C.id)})():p(),e[14]=h,e[15]=n.connections,e[16]=p,e[17]=i,e[18]=o,e[19]=l,e[20]=a):a=e[20];const x=l&&h&&"ring-2 ring-primary",m=l&&y&&!h&&"ring-1 ring-primary/50";let v;e[21]!==x||e[22]!==m?(v=de(x,m),e[21]=x,e[22]=m,e[23]=v):v=e[23];let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(ge,{}),e[24]=_):_=e[24];let D;e[25]!==h||e[26]!==n.connections||e[27]!==i||e[28]!==o||e[29]!==l||e[30]!==y?(D=l?t.jsx(Fe,{checked:h?!0:y?"indeterminate":!1,onCheckedChange:()=>{for(const C of n.connections)h?o.has(C.id)&&i(C.id):o.has(C.id)||i(C.id)}}):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[25]=h,e[26]=n.connections,e[27]=i,e[28]=o,e[29]=l,e[30]=y,e[31]=D):D=e[31];const L=l?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100";let O;e[32]!==L?(O=de("overflow-hidden transition-all duration-150 ease-out",L),e[32]=L,e[33]=O):O=e[33];let s;e[34]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(Re,{asChild:!0,children:t.jsx(U,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Yt,children:t.jsx(Xe,{size:20})})}),e[34]=s):s=e[34];let A;e[35]!==p?(A=C=>{C.stopPropagation(),p()},e[35]=p,e[36]=A):A=e[36];let F;e[37]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(qe,{size:16}),e[37]=F):F=e[37];let M;e[38]!==A?(M=t.jsxs(Ue,{children:[s,t.jsx(He,{align:"end",onClick:Jt,children:t.jsxs(re,{onClick:A,children:[F,"Open"]})})]}),e[38]=A,e[39]=M):M=e[39];let w;e[40]!==O||e[41]!==M?(w=t.jsx("div",{className:O,children:M}),e[40]=O,e[41]=M,e[42]=w):w=e[42];let P;e[43]!==D||e[44]!==w?(P=t.jsxs("div",{className:"flex items-center gap-1",children:[D,w]}),e[43]=D,e[44]=w,e[45]=P):P=e[45];let z;return e[46]!==P||e[47]!==b||e[48]!==a||e[49]!==v?(z=t.jsx(t.Fragment,{children:t.jsx(Ce,{connection:b,onClick:a,className:v,fallbackIcon:_,headerActionsAlwaysVisible:!0,headerActions:P})}),e[46]=P,e[47]=b,e[48]=a,e[49]=v,e[50]=z):z=e[50],z}function Jt(f){return f.stopPropagation()}function Yt(f){return f.stopPropagation()}function Zt(f){const e=oe.c(23),{count:n,total:p,canManage:l,canManageAgents:o,onSelectAll:i,onDeselectAll:g,onDelete:h,onAddToAgent:j,onToggleStatus:y,onCancel:N}=f;if(n===0)return null;let b;e[0]!==n?(b=t.jsxs("div",{className:"text-xs text-muted-foreground pr-1 tabular-nums",children:[n," selected"]}),e[0]=n,e[1]=b):b=e[1];let a;e[2]!==n||e[3]!==g||e[4]!==i||e[5]!==p?(a=n<p?t.jsxs(U,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:i,children:["Select all (",p,")"]}):t.jsx(U,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:g,children:"Clear selection"}),e[2]=n,e[3]=g,e[4]=i,e[5]=p,e[6]=a):a=e[6];let x;e[7]!==o||e[8]!==j?(x=o&&t.jsxs(U,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:j,children:[t.jsx(Ge,{size:13}),"Add to Agent"]}),e[7]=o,e[8]=j,e[9]=x):x=e[9];let m;e[10]!==l||e[11]!==h||e[12]!==y?(m=l&&t.jsxs(t.Fragment,{children:[t.jsx(U,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>y("active"),children:"Enable"}),t.jsx(U,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>y("inactive"),children:"Disable"}),t.jsxs(U,{variant:"destructive",size:"sm",className:"h-7 text-xs px-2",onClick:h,children:[t.jsx(Qe,{size:13}),"Delete"]})]}),e[10]=l,e[11]=h,e[12]=y,e[13]=m):m=e[13];let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Je,{size:13}),e[14]=v):v=e[14];let _;e[15]!==N?(_=t.jsx(U,{variant:"ghost",size:"sm",className:"h-7 text-xs px-2",onClick:N,children:v}),e[15]=N,e[16]=_):_=e[16];let D;return e[17]!==b||e[18]!==a||e[19]!==x||e[20]!==m||e[21]!==_?(D=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:[b,a,x,m,_]})}),e[17]=b,e[18]=a,e[19]=x,e[20]=m,e[21]=_,e[22]=D):D=e[22],D}function en(f){const e=oe.c(25),{open:n,onOpenChange:p,agents:l,onConfirm:o}=f,[i,g]=E.useState(null);let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs(Ve,{children:[t.jsx(Ee,{children:"Add to Agent"}),t.jsx(Be,{children:"Select an agent to add the selected connections to."})]}),e[0]=h):h=e[0];let j;e[1]!==l||e[2]!==i?(j=l.length===0?t.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No agents found"}):l.map(D=>t.jsxs("button",{type:"button",onClick:()=>g(D.id),className:de("flex items-center gap-3 w-full rounded-md px-3 py-2 text-left transition-colors",i===D.id?"bg-primary/10 ring-1 ring-primary":"hover:bg-muted/50"),children:[t.jsx(xt,{icon:D.icon,name:D.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:D.title}),D.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:D.description})]})]},D.id)),e[1]=l,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 N;e[6]!==p?(N=t.jsx(U,{variant:"outline",onClick:()=>p(!1),children:"Cancel"}),e[6]=p,e[7]=N):N=e[7];const b=!i;let a;e[8]!==o||e[9]!==p||e[10]!==i?(a=()=>{i&&(o(i),p(!1),g(null))},e[8]=o,e[9]=p,e[10]=i,e[11]=a):a=e[11];let x;e[12]!==b||e[13]!==a?(x=t.jsx(U,{disabled:b,onClick:a,children:"Add"}),e[12]=b,e[13]=a,e[14]=x):x=e[14];let m;e[15]!==N||e[16]!==x?(m=t.jsxs(Ke,{children:[N,x]}),e[15]=N,e[16]=x,e[17]=m):m=e[17];let v;e[18]!==y||e[19]!==m?(v=t.jsxs(ze,{className:"sm:max-w-[400px]",children:[h,y,m]}),e[18]=y,e[19]=m,e[20]=v):v=e[20];let _;return e[21]!==p||e[22]!==n||e[23]!==v?(_=t.jsx(Me,{open:n,onOpenChange:p,children:v}),e[21]=p,e[22]=n,e[23]=v,e[24]=_):_=e[24],_}function tn(f){const e=oe.c(20),{open:n,onOpenChange:p,count:l,onConfirm:o}=f,i=l!==1?"s":"";let g;e[0]!==l||e[1]!==i?(g=t.jsxs(Ae,{children:["Delete ",l," connection",i,"?"]}),e[0]=l,e[1]=i,e[2]=g):g=e[2];const h=l!==1?"s":"";let j;e[3]!==h?(j=t.jsxs(we,{children:["This will permanently delete the selected connection",h,". This action cannot be undone."]}),e[3]=h,e[4]=j):j=e[4];let y;e[5]!==g||e[6]!==j?(y=t.jsxs(Te,{children:[g,j]}),e[5]=g,e[6]=j,e[7]=y):y=e[7];let N;e[8]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(Ie,{children:"Cancel"}),e[8]=N):N=e[8];const b=l!==1?"s":"";let a;e[9]!==l||e[10]!==o||e[11]!==b?(a=t.jsxs(Pe,{children:[N,t.jsxs($e,{onClick:o,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:["Delete ",l," connection",b]})]}),e[9]=l,e[10]=o,e[11]=b,e[12]=a):a=e[12];let x;e[13]!==y||e[14]!==a?(x=t.jsxs(Le,{children:[y,a]}),e[13]=y,e[14]=a,e[15]=x):x=e[15];let m;return e[16]!==p||e[17]!==n||e[18]!==x?(m=t.jsx(Oe,{open:n,onOpenChange:p,children:x}),e[16]=p,e[17]=n,e[18]=x,e[19]=m):m=e[19],m}function nn(f){return f._registryId?.includes("community-registry")===!0}function sn(f){const e=oe.c(58),{item:n,canManage:p,allConnections:l,connectedAppNames:o,connectingItemId:i,onNavigateConnected:g,onConnect:h}=f,[j,y]=E.useState(!1),[N,b]=E.useState(null);let a,x;e[0]!==o||e[1]!==n?(a=De(n)??"",x=o.has(a),e[0]=o,e[1]=n,e[2]=a,e[3]=x):(a=e[2],x=e[3]);const m=x,v=n._meta?.["mcp.mesh"],_=v?.friendlyName||v?.friendly_name||n.server?.title||n.title||n.server?.name||n.name||n.id||"",D=n.server?.description||n.description||null;let L;e[4]!==n.server?.icons?.[0]?.src||e[5]!==n.server?.repository?(L=n.server?.icons?.[0]?.src||at(n.server?.repository)||null,e[4]=n.server?.icons?.[0]?.src,e[5]=n.server?.repository,e[6]=L):L=e[6];const O=L;let s;if(e[7]!==l||e[8]!==a){let k;e[10]!==a?(k=se=>se.connection_type!=="VIRTUAL"&&se.app_name===a,e[10]=a,e[11]=k):k=e[11],s=l.filter(k),e[7]=l,e[8]=a,e[9]=s}else s=e[9];const A=s;let F;e[12]!==n?(F=nn(n),e[12]=n,e[13]=F):F=e[13];const M=F;let w,P;e[14]!==A||e[15]!==p||e[16]!==M||e[17]!==m||e[18]!==n||e[19]!==h||e[20]!==g?(w=()=>{if(m){const k=A[0];k&&g(k);return}p&&P()},P=()=>{M?(b("connect"),y(!0)):h(n)},e[14]=A,e[15]=p,e[16]=M,e[17]=m,e[18]=n,e[19]=h,e[20]=g,e[21]=w,e[22]=P):(w=e[21],P=e[22]);let z;e[23]!==n||e[24]!==h||e[25]!==N?(z=()=>{te("connections_community_warning_confirmed",{registry_item_id:n.id}),y(!1),N==="connect"&&h(n),b(null)},e[23]=n,e[24]=h,e[25]=N,e[26]=z):z=e[26];const C=z;let T;e[27]!==D||e[28]!==O||e[29]!==_?(T={title:_,description:D,icon:O},e[27]=D,e[28]=O,e[29]=_,e[30]=T):T=e[30];let G;e[31]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx(ge,{}),e[31]=G):G=e[31];let H;e[32]!==M||e[33]!==n._sourceIcon?(H=M&&n._sourceIcon&&t.jsx("img",{src:n._sourceIcon,alt:"Community",className:"size-4 rounded-sm object-contain"}),e[32]=M,e[33]=n._sourceIcon,e[34]=H):H=e[34];let X;e[35]!==p||e[36]!==i||e[37]!==P||e[38]!==m||e[39]!==n.id?(X=m?t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Connected"}):p&&t.jsx(U,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:i!==null,onClick:k=>{k.stopPropagation(),P()},children:i===n.id?t.jsx(ce,{size:14,className:"animate-spin"}):"Connect"}),e[35]=p,e[36]=i,e[37]=P,e[38]=m,e[39]=n.id,e[40]=X):X=e[40];let c;e[41]!==H||e[42]!==X?(c=t.jsxs("div",{className:"flex items-center gap-2",children:[H,X]}),e[41]=H,e[42]=X,e[43]=c):c=e[43];let S;e[44]!==w||e[45]!==c||e[46]!==T?(S=t.jsx(Ce,{connection:T,fallbackIcon:G,onClick:w,headerActionsAlwaysVisible:!0,headerActions:c}),e[44]=w,e[45]=c,e[46]=T,e[47]=S):S=e[47];let V;e[48]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsxs(Te,{children:[t.jsx(Ae,{children:"Community MCP Server"}),t.jsx(we,{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]=V):V=e[48];let R;e[49]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(Ie,{children:"Cancel"}),e[49]=R):R=e[49];let B;e[50]!==C?(B=t.jsxs(Le,{children:[V,t.jsxs(Pe,{children:[R,t.jsx($e,{onClick:C,children:"Continue"})]})]}),e[50]=C,e[51]=B):B=e[51];let u;e[52]!==j||e[53]!==B?(u=t.jsx(Oe,{open:j,onOpenChange:y,children:B}),e[52]=j,e[53]=B,e[54]=u):u=e[54];let $;return e[55]!==S||e[56]!==u?($=t.jsxs(t.Fragment,{children:[S,u]}),e[55]=S,e[56]=u,e[57]=$):$=e[57],$}function on({listState:f,activeTab:e,typeFilter:n,statusFilter:p,registryFilter:l,enabledRegistries:o}){const{org:i}=be(),g=it(),h=_e(),{data:j}=Ne.useSession(),y=We(),N=Lt(f),b=ft(),{granted:a}=ye("connections:manage"),{granted:x}=ye("agents:manage"),[m,v]=E.useState(new Set),_=m.size>0,[D,L]=E.useState(!1),[O,s]=E.useState(!1),[A,F]=E.useState(null),M=Ot(),w=N.filter(r=>!(n!=="ALL"&&r.connection_type!==n||p!=="ALL"&&r.status!==p)),P=ht(w),z=r=>{v(d=>{const K=new Set(d);return K.has(r)?K.delete(r):K.add(r),K})},C=()=>{v(new Set)},T=ke(o,f.searchTerm),G=T.items,H=yt(T.loadMore,T.hasMore,T.isLoadingMore),X=new Set(N.filter(r=>r.app_name).map(r=>r.app_name)),c=l==="ALL"||o.some(r=>r.id===l)?l:"ALL",S=f.search.length>0,V=e==="all"||S?G.filter(r=>{if(c!=="ALL"&&r._registryId!==c)return!1;if(S){const d=De(r);if(d&&X.has(d))return!1}return!0}):[],R=e==="connected"||S?P:[],B=async r=>{if(!(!i||!j?.user?.id)){te("connection_add_clicked",{action:"connect_new",registry_item_id:r.id,source:"connections_page"}),F(r.id);try{const d=ct(r,i.id,j.user.id,{remoteIndex:0}),K=d.connection_type==="STDIO",I=!!d.connection_url,q=K&&d.connection_headers&&typeof d.connection_headers=="object"&&"command"in d.connection_headers;if(!I&&!q){W.error("This MCP Server cannot be connected: no connection method available"),F(null);return}const{id:ne}=await y.create.mutateAsync(d),le=await Wt({connectionId:ne,orgId:i.id,orgSlug:i.slug,persistFallback:fe=>y.update.mutateAsync({id:ne,data:{connection_token:fe}}).then(()=>{})});if(le.ran&&!le.ok){te("connection_oauth_failed",{connection_id:ne,flow:"connections_page_connect",error:le.error??"no_token"}),W.error(`Authentication failed: ${le.error??"no token received"}`);return}if(le.ran){te("connection_oauth_succeeded",{connection_id:ne,flow:"connections_page_connect"});const fe=new URL(`/api/${i.slug}/mcp/${ne}`,window.location.origin);await g.invalidateQueries({queryKey:rt.isMCPAuthenticated(fe.href,null)}),$(),W.success("Authentication successful")}W.success("Connected successfully")}catch(d){W.error(`Failed to connect: ${d instanceof Error?d.message:String(d)}`)}finally{F(null)}}},u=Ft(),$=()=>{g.invalidateQueries({predicate:r=>{const d=r.queryKey;return d[1]===i.id&&d[3]==="collection"&&d[4]==="CONNECTIONS"}})},k=async()=>{L(!1);const r=[...m];te("connections_bulk_delete",{count:r.length});let d=0;for(const K of r)try{await u.call("COLLECTION_CONNECTIONS_DELETE",{id:K,force:!0}),d++}catch{}$(),W.success(`Deleted ${d} connection${d!==1?"s":""}`),C()},se=async(r,d)=>{try{await y.update.mutateAsync({id:r,data:{status:d}}),$(),W.success(d==="active"?"Connection enabled":"Connection disabled")}catch{W.error("Failed to update connection")}},xe=async r=>{const d=[...m];te("connections_bulk_status_toggled",{count:d.length,to_status:r});let K=0;for(const I of d)try{await y.update.mutateAsync({id:I,data:{status:r}}),K++}catch{}$(),W.success(`${r==="active"?"Enabled":"Disabled"} ${K} connection${K!==1?"s":""}`),C()},me=async r=>{const d=M.find(q=>q.id===r);if(!d)return;te("connections_bulk_add_to_agent",{agent_id:r,count:m.size});const K=new Set(d.connections.map(q=>q.connection_id)),I=[...m].filter(q=>!K.has(q)).map(q=>({connection_id:q,selected_tools:null,selected_resources:null,selected_prompts:null}));if(I.length===0){W.info("All selected connections are already in that agent");return}try{await u.call("COLLECTION_VIRTUAL_MCP_UPDATE",{id:r,data:{connections:[...d.connections,...I]}}),g.invalidateQueries({predicate:q=>{const ne=q.queryKey;return ne[1]===i.id&&ne[3]==="collection"&&ne[4]==="VIRTUAL_MCP"}}),W.success(`Added ${I.length} connection${I.length!==1?"s":""} to "${d.title}"`),C()}catch{W.error("Failed to add connections to agent")}};return t.jsxs(t.Fragment,{children:[t.jsx(jt,{...b}),t.jsx(tn,{open:D,onOpenChange:L,count:m.size,onConfirm:k}),t.jsx(en,{open:O,onOpenChange:s,agents:M,onConfirm:me}),T.isInitialLoading&&e==="all"?t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ce,{size:32,className:"animate-spin text-muted-foreground"})}):t.jsx("div",{children:(S?V.length===0&&w.length===0:e==="all"?V.length===0:w.length===0)?t.jsx(gt,{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}"`:a?"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:[R.map(r=>{if(r.type==="group")return t.jsx(Qt,{group:r,onOpen:()=>{h({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:r.key}})},selectionMode:_,selectedIds:m,onToggleSelect:z},r.key);const d=r.connection,K=m.has(d.id);return t.jsx(Ce,{connection:d,fallbackIcon:t.jsx(ge,{}),onClick:()=>_?z(d.id):h({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:he(d)}}),className:de(K&&"ring-2 ring-primary bg-primary/5"),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1",children:[_?t.jsx(Fe,{checked:K,onCheckedChange:()=>z(d.id),onClick:I=>I.stopPropagation()}):t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"Connected"}),t.jsx("div",{className:de("overflow-hidden transition-all duration-150 ease-out",_?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100"),children:t.jsxs(Ue,{children:[t.jsx(Re,{asChild:!0,children:t.jsx(U,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:I=>I.stopPropagation(),children:t.jsx(Xe,{size:20})})}),t.jsxs(He,{align:"end",onClick:I=>I.stopPropagation(),children:[t.jsxs(re,{onClick:I=>{I.stopPropagation(),h({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:he(d)}})},children:[t.jsx(qe,{size:16}),"Open"]}),(a||x)&&t.jsxs(re,{onClick:I=>{I.stopPropagation(),z(d.id)},children:[t.jsx(zt,{size:16}),"Select"]}),a&&(d.status==="active"?t.jsxs(re,{onClick:I=>{I.stopPropagation(),se(d.id,"inactive")},children:[t.jsx(Vt,{size:16}),"Disable"]}):t.jsxs(re,{onClick:I=>{I.stopPropagation(),se(d.id,"active")},children:[t.jsx(Et,{size:16}),"Enable"]})),a&&t.jsxs(re,{variant:"destructive",onClick:I=>{I.stopPropagation(),b.requestDelete(d)},children:[t.jsx(Qe,{size:16}),"Delete"]})]})]})})]})},d.id)}),V.map(r=>t.jsx(sn,{item:r,canManage:a,allConnections:N,connectedAppNames:X,connectingItemId:A,onNavigateConnected:d=>h({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:he(d)}}),onConnect:B},`catalog-${r._registryId}:${r.id}`)),(e==="all"||S)&&o.length>0&&t.jsx("div",{ref:H,className:"col-span-full h-4"}),(e==="all"||S)&&T.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(ce,{size:24,className:"animate-spin text-muted-foreground"})})]})}),_&&t.jsx(Zt,{count:m.size,total:w.length,canManage:a,canManageAgents:x,onSelectAll:()=>{v(new Set(w.map(r=>r.id)))},onDeselectAll:()=>v(new Set),onDelete:()=>L(!0),onAddToAgent:()=>s(!0),onToggleStatus:xe,onCancel:C})]})}function rn(){const{org:f}=be(),e=_e(),n=Ze({strict:!1}),{data:p}=Ne.useSession(),{stdioEnabled:l}=et(),o=At(),{granted:i}=ye("connections:manage"),g=Gt({namespace:f.slug,resource:"connections"}),h=We(),[j,y]=tt(nt.connectionsTab(f.slug),c=>n.tab==="all"||n.tab==="connected"?n.tab:c??"all"),[N,b]=E.useState("ALL"),[a,x]=E.useState("ALL"),[m,v]=E.useState("ALL"),_=pt(),L=ke(_,g.searchTerm).items,O=g.search!==g.searchTerm,s=st({resolver:ot(Kt),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),A=s.watch("ui_type"),F=s.watch("connection_url"),M=s.watch("npx_package"),w=pe({uiType:A,connectionUrl:F??"",npxPackage:M??""})??Se({uiType:A,connectionUrl:F??"",registryItems:L}),P=i&&n.action==="create",z=()=>{te("connections_custom_dialog_opened",{source:"connections_page"}),e({to:"/$org/settings/connections",params:{org:f.slug},search:{action:"create"}})},C=()=>{e({to:"/$org/settings/connections",params:{org:f.slug},search:{}})},T=async c=>{let S,V=null,R=null,B=null;c.ui_type==="NPX"?(S="STDIO",V="",B=Rt(c.npx_package||"",c.env_vars||[])):c.ui_type==="STDIO"?(S="STDIO",V="",B=Ht(c.stdio_command||"",c.stdio_args||"",c.stdio_cwd,c.env_vars||[])):(S=c.ui_type,V=c.connection_url||"",R=c.connection_token||null);const u=lt("conn");te("connection_custom_created",{connection_type:S,ui_type:c.ui_type}),await h.create.mutateAsync({id:u,title:c.title,description:c.description||null,connection_type:S,connection_url:V,connection_token:R,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:p?.user?.id||"system",organization_id:f.id,icon:c.icon??null,app_name:null,app_id:null,connection_headers:B,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),C(),s.reset(),e({to:"/$org/settings/connections/$appSlug",params:{org:f.slug,appSlug:he({app_name:null,connection_url:V,title:c.title,id:u})}})},G=c=>{c||(P&&C(),s.reset())},H=c=>{const S=c.trim();if(!S)return;const V=!!s.formState.dirtyFields.title,R=!!s.formState.dirtyFields.description,B=!!s.formState.dirtyFields.env_vars,u=k=>{if(k&&(!V&&!s.getValues("title").trim()&&k.title&&s.setValue("title",k.title,{shouldDirty:!1}),!R&&!(s.getValues("description")??"").trim()&&k.description&&s.setValue("description",k.description,{shouldDirty:!1}),!B&&k.envVarKeys?.length)){const se=s.getValues("env_vars")??[],xe=new Set(se.map(r=>r.key)),me=k.envVarKeys.filter(r=>!xe.has(r));me.length>0&&s.setValue("env_vars",[...se,...me.map(r=>({key:r,value:""}))],{shouldDirty:!0})}},$=Ut(S);if($&&l){s.setValue("ui_type","NPX",{shouldDirty:!0}),s.setValue("npx_package",$.packageName,{shouldDirty:!0}),s.setValue("connection_url","",{shouldDirty:!0}),s.setValue("connection_token",null,{shouldDirty:!0}),u(pe({uiType:"NPX",npxPackage:$.packageName}));return}if(S.startsWith("http://")||S.startsWith("https://")){const k=A==="HTTP"||A==="SSE"||A==="Websocket"?A:"HTTP";s.setValue("ui_type",k,{shouldDirty:!0}),s.setValue("connection_url",S,{shouldDirty:!0}),u(pe({uiType:k,connectionUrl:S})??Se({uiType:k,connectionUrl:S,registryItems:L}));return}A==="NPX"&&u(pe({uiType:"NPX",npxPackage:S}))},X=i?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(U,{variant:"outline",onClick:z,children:[t.jsx(Ge,{size:14,className:"sm:hidden"}),t.jsx("span",{className:"hidden sm:inline",children:"Custom Connection"})]})}):null;return t.jsx(t.Fragment,{children:t.jsxs(ue,{children:[(()=>{const c="Create Connection",S="Create a custom connection in your organization. Fill in the details below.",V=s.formState.isSubmitting?"Saving...":"Create Connection",R=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(Q,{control:s.control,name:"ui_type",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Type *"}),t.jsxs(wt,{value:u.value,onValueChange:u.onChange,children:[t.jsx(Z,{children:t.jsx(Tt,{children:t.jsx(It,{})})}),t.jsxs(Pt,{children:[t.jsx(ae,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(ae,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(ae,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),"Websocket"]})}),l&&t.jsxs(t.Fragment,{children:[t.jsx(ae,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ge,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(ae,{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,{})]})}),A==="NPX"&&t.jsx(Q,{control:s.control,name:"npx_package",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"NPM Package *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"@perplexity-ai/mcp-server",...u,value:u.value??"",onPaste:$=>{const k=$.clipboardData.getData("text");k&&($.preventDefault(),s.setValue("npx_package",k.trim(),{shouldDirty:!0}),H(k))},onBlur:$=>{H($.target.value),u.onBlur()}})}),t.jsx(ee,{})]})}),A==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(Q,{control:s.control,name:"stdio_command",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Command *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"node, bun, python...",...u,value:u.value??""})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:s.control,name:"stdio_args",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Arguments"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"arg1 arg2 --flag value",...u,value:u.value??""})}),t.jsx(ee,{})]})})]}),t.jsx(Q,{control:s.control,name:"stdio_cwd",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Working Directory"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"/path/to/project (optional)",...u,value:u.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),t.jsx(ee,{})]})})]}),(A==="NPX"||A==="STDIO")&&t.jsx(Q,{control:s.control,name:"env_vars",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Environment Variables"}),t.jsx(Z,{children:t.jsx(Bt,{value:u.value??[],onChange:u.onChange})}),t.jsx(ee,{})]})}),A!=="NPX"&&A!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(Q,{control:s.control,name:"connection_url",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"URL *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"https://example.com/mcp",...u,value:u.value??"",onPaste:$=>{const k=$.clipboardData.getData("text");k&&($.preventDefault(),s.setValue("connection_url",k.trim(),{shouldDirty:!0}),H(k))},onBlur:$=>{H($.target.value),u.onBlur()}})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:s.control,name:"connection_token",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:w?.token?.label??"Token (optional)"}),t.jsx(Z,{children:t.jsx(ie,{type:"password",placeholder:w?.token?.placeholder??"Bearer token or API key",...u,value:u.value??""})}),w?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[w.token.helperText,w.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:s.control,name:"title",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Name *"}),t.jsx(Z,{children:t.jsx(ie,{placeholder:"My Connection",...u})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:s.control,name:"description",render:({field:u})=>t.jsxs(J,{children:[t.jsx(Y,{children:"Description"}),t.jsx(Z,{children:t.jsx($t,{placeholder:"A brief description of this connection",rows:3,...u,value:u.value??""})}),t.jsx(ee,{})]})})]}),B=P;return o?t.jsx(vt,{open:B,onOpenChange:G,children:t.jsxs(St,{className:"max-h-[90vh]",children:[t.jsx(bt,{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(_t,{children:c}),t.jsx(Nt,{className:"mt-1",children:S})]}),t.jsx(Dt,{asChild:!0,children:t.jsx(U,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(Je,{size:16})})})]})}),t.jsx(ve,{...s,children:t.jsxs("form",{onSubmit:s.handleSubmit(T),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:R}),t.jsx(kt,{children:t.jsx(U,{type:"submit",disabled:s.formState.isSubmitting,className:"w-full",children:V})})]})})]})}):t.jsx(Me,{open:B,onOpenChange:G,children:t.jsxs(ze,{className:"sm:max-w-[525px]",children:[t.jsxs(Ve,{children:[t.jsx(Ee,{children:c}),t.jsx(Be,{children:S})]}),t.jsx(ve,{...s,children:t.jsxs("form",{onSubmit:s.handleSubmit(T),children:[t.jsx("div",{className:"py-4",children:R}),t.jsxs(Ke,{children:[t.jsx(U,{type:"button",variant:"outline",onClick:()=>G(!1),children:"Cancel"}),t.jsx(U,{type:"submit",disabled:s.formState.isSubmitting,className:"min-w-40",children:V})]})]})})]})})})(),t.jsx(ue.Content,{children:t.jsx(ue.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(ue.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(mt,{value:g.search,onChange:g.setSearch,placeholder:"Search for a connection",className:"w-full md:w-[375px]",onKeyDown:c=>{c.key==="Escape"&&(g.setSearch(""),c.target.blur())}}),t.jsx(dt,{sortKey:g.sortKey,sortDirection:g.sortDirection,onSort:g.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:N,onChange:c=>b(c||"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:a,onChange:c=>x(c||"ALL"),options:[{id:"ALL",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"},{id:"error",label:"Error"}]},..._.length>1?[{label:"Registry",value:m,onChange:c=>v(c||"ALL"),options:[{id:"ALL",label:"All registries"},..._.map(c=>({id:c.id,label:c.id.includes("community-registry")?"Community MCP Registry":c.title}))]}]:[]]})]}),X]}),t.jsx(ut,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:j,onTabChange:c=>{const S=c;S!==j&&te("connections_page_tab_changed",{to_tab:S}),y(S)}}),t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ce,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx("div",{style:{opacity:O?.5:1,transition:O?"opacity 0.2s 0.2s linear":"opacity 0s 0s linear",pointerEvents:O?"none":"auto"},children:t.jsx(on,{listState:g,activeTab:j,typeFilter:N,statusFilter:a,registryFilter:m,enabledRegistries:_})})})]})})})]})})}function Fs(){const f=oe.c(1);let e;return f[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ye,{children:t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ce,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(rn,{})})}),f[0]=e):e=f[0],e}export{Fs as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as a,dG as y,U as T,V as v,dH as O,dI as j,dJ as G,dK as $,bR as k,dL as U,dM as _,X as D,dN as L,dO as z,dP as B,dQ as X,dR as F,dS as H,dT as K,dU as V,dV as W,c as C,l as g}from"./index-
|
|
1
|
+
import{r as i,j as a,dG as y,U as T,V as v,dH as O,dI as j,dJ as G,dK as $,bR as k,dL as U,dM as _,X as D,dN as L,dO as z,dP as B,dQ as X,dR as F,dS as H,dT as K,dU as V,dV as W,c as C,l as g}from"./index-Pat3pJAq.js";var h="ContextMenu",[J]=D(h,[_]),u=_(),[Q,R]=J(h),N=n=>{const{__scopeContextMenu:e,children:o,onOpenChange:t,dir:r,modal:s=!0}=n,[d,c]=i.useState(!1),x=u(e),m=k(t),l=i.useCallback(f=>{c(f),m(f)},[m]);return a.jsx(Q,{scope:e,open:d,onOpenChange:l,modal:s,children:a.jsx(U,{...x,dir:r,open:d,onOpenChange:l,modal:s,children:o})})};N.displayName=h;var b="ContextMenuTrigger",P=i.forwardRef((n,e)=>{const{__scopeContextMenu:o,disabled:t=!1,...r}=n,s=R(b,o),d=u(o),c=i.useRef({x:0,y:0}),x=i.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),m=i.useRef(0),l=i.useCallback(()=>window.clearTimeout(m.current),[]),f=p=>{c.current={x:p.clientX,y:p.clientY},s.onOpenChange(!0)};return i.useEffect(()=>l,[l]),i.useEffect(()=>{t&&l()},[t,l]),a.jsxs(a.Fragment,{children:[a.jsx(y,{...d,virtualRef:x}),a.jsx(T.span,{"data-state":s.open?"open":"closed","data-disabled":t?"":void 0,...r,ref:e,style:{WebkitTouchCallout:"none",...n.style},onContextMenu:t?n.onContextMenu:v(n.onContextMenu,p=>{l(),f(p),p.preventDefault()}),onPointerDown:t?n.onPointerDown:v(n.onPointerDown,M(p=>{l(),m.current=window.setTimeout(()=>f(p),700)})),onPointerMove:t?n.onPointerMove:v(n.onPointerMove,M(l)),onPointerCancel:t?n.onPointerCancel:v(n.onPointerCancel,M(l)),onPointerUp:t?n.onPointerUp:v(n.onPointerUp,M(l))})]})});P.displayName=b;var Y="ContextMenuPortal",w=n=>{const{__scopeContextMenu:e,...o}=n,t=u(e);return a.jsx(G,{...t,...o})};w.displayName=Y;var I="ContextMenuContent",S=i.forwardRef((n,e)=>{const{__scopeContextMenu:o,...t}=n,r=R(I,o),s=u(o),d=i.useRef(!1);return a.jsx($,{...s,...t,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:c=>{n.onCloseAutoFocus?.(c),!c.defaultPrevented&&d.current&&c.preventDefault(),d.current=!1},onInteractOutside:c=>{n.onInteractOutside?.(c),!c.defaultPrevented&&!r.modal&&(d.current=!0)},style:{...n.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});S.displayName=I;var q="ContextMenuGroup",Z=i.forwardRef((n,e)=>{const{__scopeContextMenu:o,...t}=n,r=u(o);return a.jsx(L,{...r,...t,ref:e})});Z.displayName=q;var ee="ContextMenuLabel",te=i.forwardRef((n,e)=>{const{__scopeContextMenu:o,...t}=n,r=u(o);return a.jsx(z,{...r,...t,ref:e})});te.displayName=ee;var ne="ContextMenuItem",E=i.forwardRef((n,e)=>{const{__scopeContextMenu:o,...t}=n,r=u(o);return a.jsx(O,{...r,...t,ref:e})});E.displayName=ne;var oe="ContextMenuCheckboxItem",re=i.forwardRef((n,e)=>{const{__scopeContextMenu:o,...t}=n,r=u(o);return a.jsx(B,{...r,...t,ref:e})});re.displayName=oe;var ae="ContextMenuRadioGroup",se=i.forwardRef((n,e)=>{const{__scopeContextMenu:o,...t}=n,r=u(o);return a.jsx(X,{...r,...t,ref:e})});se.displayName=ae;var ie="ContextMenuRadioItem",ce=i.forwardRef((n,e)=>{const{__scopeContextMenu:o,...t}=n,r=u(o);return a.jsx(F,{...r,...t,ref:e})});ce.displayName=ie;var ue="ContextMenuItemIndicator",de=i.forwardRef((n,e)=>{const{__scopeContextMenu:o,...t}=n,r=u(o);return a.jsx(H,{...r,...t,ref:e})});de.displayName=ue;var le="ContextMenuSeparator",A=i.forwardRef((n,e)=>{const{__scopeContextMenu:o,...t}=n,r=u(o);return a.jsx(j,{...r,...t,ref:e})});A.displayName=le;var xe="ContextMenuArrow",pe=i.forwardRef((n,e)=>{const{__scopeContextMenu:o,...t}=n,r=u(o);return a.jsx(K,{...r,...t,ref:e})});pe.displayName=xe;var me="ContextMenuSubTrigger",fe=i.forwardRef((n,e)=>{const{__scopeContextMenu:o,...t}=n,r=u(o);return a.jsx(V,{...r,...t,ref:e})});fe.displayName=me;var ve="ContextMenuSubContent",Ce=i.forwardRef((n,e)=>{const{__scopeContextMenu:o,...t}=n,r=u(o);return a.jsx(W,{...r,...t,ref:e,style:{...n.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ce.displayName=ve;function M(n){return e=>e.pointerType!=="mouse"?n(e):void 0}var Me=N,ge=P,he=w,_e=S,Re=E,Ne=A;function Pe(n){const e=C.c(4);let o;e[0]!==n?({...o}=n,e[0]=n,e[1]=o):o=e[1];let t;return e[2]!==o?(t=a.jsx(Me,{"data-slot":"context-menu",...o}),e[2]=o,e[3]=t):t=e[3],t}function we(n){const e=C.c(4);let o;e[0]!==n?({...o}=n,e[0]=n,e[1]=o):o=e[1];let t;return e[2]!==o?(t=a.jsx(ge,{"data-slot":"context-menu-trigger",...o}),e[2]=o,e[3]=t):t=e[3],t}function Ie(n){const e=C.c(8);let o,t;e[0]!==n?({className:o,...t}=n,e[0]=n,e[1]=o,e[2]=t):(o=e[1],t=e[2]);let r;e[3]!==o?(r=g("bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",o),e[3]=o,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=a.jsx(he,{children:a.jsx(_e,{"data-slot":"context-menu-content",className:r,...t})}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}function Se(n){const e=C.c(12);let o,t,r,s;e[0]!==n?({className:o,inset:t,variant:s,...r}=n,e[0]=n,e[1]=o,e[2]=t,e[3]=r,e[4]=s):(o=e[1],t=e[2],r=e[3],s=e[4]);const d=s===void 0?"default":s;let c;e[5]!==o?(c=g("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_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]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=c):c=e[6];let x;return e[7]!==t||e[8]!==r||e[9]!==c||e[10]!==d?(x=a.jsx(Re,{"data-slot":"context-menu-item","data-inset":t,"data-variant":d,className:c,...r}),e[7]=t,e[8]=r,e[9]=c,e[10]=d,e[11]=x):x=e[11],x}function Ee(n){const e=C.c(8);let o,t;e[0]!==n?({className:o,...t}=n,e[0]=n,e[1]=o,e[2]=t):(o=e[1],t=e[2]);let r;e[3]!==o?(r=g("bg-border -mx-1 my-1 h-px",o),e[3]=o,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=a.jsx(Ne,{"data-slot":"context-menu-separator",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{Se as C,Ee as a,we as b,Ie as c,Pe as d};
|