decocms 3.36.2 → 3.36.4
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-Bdl8L7il.js → AlertCircle-DU4Czymb.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-C4gNBzMY.js → ArrowUpRight-jvt9_jPs.js} +1 -1
- package/dist/client/assets/{Check-Cb8huOHH.js → Check-CFZ7jofS.js} +1 -1
- package/dist/client/assets/{CheckCircle-CGJnw6dP.js → CheckCircle-B7_GaGqy.js} +1 -1
- package/dist/client/assets/{ChevronDown-D_ybfzhh.js → ChevronDown-CMnvnfNH.js} +1 -1
- package/dist/client/assets/{ChevronLeft-CBi5hL_n.js → ChevronLeft-BLmY09V7.js} +1 -1
- package/dist/client/assets/{ChevronRight-D0iMeTJ5.js → ChevronRight-DtVYtVbK.js} +1 -1
- package/dist/client/assets/{ChevronUp-BXLaNqVW.js → ChevronUp-BYxSfj4f.js} +1 -1
- package/dist/client/assets/{Container-BGdfxKsK.js → Container-CQcCiGBy.js} +1 -1
- package/dist/client/assets/{DotsVertical-BhoFPdMN.js → DotsVertical-7ebFkKLD.js} +1 -1
- package/dist/client/assets/{Eye-DcL-kKgm.js → Eye-CYtfD-C-.js} +1 -1
- package/dist/client/assets/{FilterLines-DSwseOu_.js → FilterLines-BtiGzXwl.js} +1 -1
- package/dist/client/assets/{Globe01-BX4SSb6A.js → Globe01-bYDzICLJ.js} +1 -1
- package/dist/client/assets/{HardDrive-DcbBi9w_.js → HardDrive-gxQ66xi3.js} +1 -1
- package/dist/client/assets/{Key01-R_z_EgAZ.js → Key01-CDcV65YU.js} +1 -1
- package/dist/client/assets/{LayoutLeft-hGFocSnW.js → LayoutLeft-Cy-bGbAH.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DQiI5oxv.js → LinkExternal01-BDXPmxri.js} +1 -1
- package/dist/client/assets/{Monitor01-CRf7BSF8.js → Monitor01-6PVrucyX.js} +1 -1
- package/dist/client/assets/{Palette-EMfX7hNs.js → Palette-8PqtgYqw.js} +1 -1
- package/dist/client/assets/{Play-mcRrv0lp.js → Play-B0CTz7-g.js} +1 -1
- package/dist/client/assets/{Plus-_ThoLvvV.js → Plus-DW_pro4F.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-CyAHVf6q.js → RefreshCcw01-B9XxpyTk.js} +1 -1
- package/dist/client/assets/{SearchMd-D6F8AHrW.js → SearchMd-BnZZ5mEU.js} +1 -1
- package/dist/client/assets/{Settings02-B100KruV.js → Settings02-BzBPnOVl.js} +1 -1
- package/dist/client/assets/{Shield01-DxJYzxVh.js → Shield01-CUegYioy.js} +1 -1
- package/dist/client/assets/{Star01-DgOBkoy7.js → Star01-CjQzvxTy.js} +1 -1
- package/dist/client/assets/{Stars01-CF50N3iu.js → Stars01-BBldOY4r.js} +1 -1
- package/dist/client/assets/{Stars02-AWskXgtc.js → Stars02-COgJsT25.js} +1 -1
- package/dist/client/assets/{Sun-Ddl5HYpL.js → Sun-BFeAvEQf.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DHHfKBMD.js → SwitchHorizontal01-BQBOH6Au.js} +1 -1
- package/dist/client/assets/{Tool01-BLdHAOru.js → Tool01-BKl-GVq3.js} +1 -1
- package/dist/client/assets/{Trash01-4Tg-x6Q1.js → Trash01-BfygLm6s.js} +1 -1
- package/dist/client/assets/{Upload01-CBpPl05N.js → Upload01-ClElEXYw.js} +1 -1
- package/dist/client/assets/{User01-CChZgMNn.js → User01-Bi6i4zOy.js} +1 -1
- package/dist/client/assets/{Users01-CxX1e6cq.js → Users01-BXIkeJej.js} +1 -1
- package/dist/client/assets/{Users03-DE6tDcyz.js → Users03-DH-6SNzV.js} +1 -1
- package/dist/client/assets/{X-BRH2Y8Wq.js → X-BUzk9ZuQ.js} +1 -1
- package/dist/client/assets/{XCircle-CShXLucc.js → XCircle-8_cOsjUY.js} +1 -1
- package/dist/client/assets/{XClose-BFJ573RS.js → XClose-CCKAliKU.js} +1 -1
- package/dist/client/assets/{Zap-ZgVQTmT-.js → Zap-DMSK7ZyR.js} +1 -1
- package/dist/client/assets/{ZapSquare-Cz0n89qc.js → ZapSquare-Dj9sWt3u.js} +1 -1
- package/dist/client/assets/{ZoomOut-CqeB-Ycx.js → ZoomOut-DfX9NmNO.js} +1 -1
- package/dist/client/assets/{access-gate-qCShaDhO.js → access-gate-DuwCoW9u.js} +1 -1
- package/dist/client/assets/{accordion-QuD2RrzW.js → accordion-x86xWE4B.js} +1 -1
- package/dist/client/assets/{add-section-modal-Xr54wDg5.js → add-section-modal-CtMZ_X5l.js} +1 -1
- package/dist/client/assets/{agent-capabilities-CFJ9p-mV.js → agent-capabilities-C3MTl0Im.js} +1 -1
- package/dist/client/assets/{agent-icon-rbRaklR8.js → agent-icon-CV7VKepg.js} +1 -1
- package/dist/client/assets/{agents-list-Dcl00RIN.js → agents-list-BT8i9CxI.js} +1 -1
- package/dist/client/assets/{ai-providers-B3fmOzya.js → ai-providers-CAzPDdFJ.js} +1 -1
- package/dist/client/assets/{alert-NPCB1uGq.js → alert-Bi903p4n.js} +1 -1
- package/dist/client/assets/{alert-dialog-DU_hTH_e.js → alert-dialog-CjyXYSQZ.js} +1 -1
- package/dist/client/assets/app-editor-CCjHHUIp.js +1 -0
- package/dist/client/assets/{auth-DOEa4Xg-.js → auth-StjmYjna.js} +1 -1
- package/dist/client/assets/{auth-catchall-C9GzLyRU.js → auth-catchall-D86Q5OiL.js} +1 -1
- package/dist/client/assets/{auth-split-layout-D-gXvj1z.js → auth-split-layout-BqxtOd31.js} +1 -1
- package/dist/client/assets/{automation-list-row-BmMbzVcz.js → automation-list-row-ZsMhYjFo.js} +1 -1
- package/dist/client/assets/{automation-runs-CHOhgiKg.js → automation-runs-CAE5s4jH.js} +1 -1
- package/dist/client/assets/{automations-vinGS7sH.js → automations-DzhdRc4f.js} +1 -1
- package/dist/client/assets/{avatar-BqZJEvBP.js → avatar-ItW7yKah.js} +1 -1
- package/dist/client/assets/{badge-B2khBz0-.js → badge-Bw9vN6fg.js} +1 -1
- package/dist/client/assets/{brand-context-B_nK7LrX.js → brand-context-BCx3pSLc.js} +1 -1
- package/dist/client/assets/{buckets-B0he9ykT.js → buckets-C-Dq8Vrb.js} +1 -1
- package/dist/client/assets/{calendar-DTQK53My.js → calendar-D0RqU72a.js} +1 -1
- package/dist/client/assets/{capability-load-error-ErUeqyMr.js → capability-load-error-B4z1cdIN.js} +1 -1
- package/dist/client/assets/{card-C0ZJxFoq.js → card-B0-N4bpb.js} +1 -1
- package/dist/client/assets/{chat-context-D-8AD0J7.js → chat-context-BG_brbim.js} +1 -1
- package/dist/client/assets/{checkbox-DxApZ9yh.js → checkbox-BjUgAWJu.js} +1 -1
- package/dist/client/assets/{cli-auth-success-D_1gXhC0.js → cli-auth-success-Cb5-OjdP.js} +1 -1
- package/dist/client/assets/{collection-detail-7xb9CmFQ.js → collection-detail-DONQnGGW.js} +1 -1
- package/dist/client/assets/{collection-display-button-BAzLR9Of.js → collection-display-button-BpdgmXkn.js} +1 -1
- package/dist/client/assets/{collection-search-DTKnEcQS.js → collection-search-BEvxyUp1.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-injrdYM-.js → collection-table-wrapper-CeQ3Kj1L.js} +1 -1
- package/dist/client/assets/{collection-tabs-BDWQ17XJ.js → collection-tabs-DM_bzUmO.js} +1 -1
- package/dist/client/assets/{collections-DFjqouMx.js → collections-DGui_rw4.js} +1 -1
- package/dist/client/assets/{command-DYklD3Up.js → command-CSF0stL5.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-C4HCeyrm.js → connect-desktop-dialog-BHttcPxA.js} +1 -1
- package/dist/client/assets/{connection-card-BjkWUX4T.js → connection-card-DNd6JwtE.js} +1 -1
- package/dist/client/assets/{connection-detail-S0rM47Fu.js → connection-detail-DBBp6dEO.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DTy5Iwrw.js → connection-form-helpers-C-CDw2oQ.js} +1 -1
- package/dist/client/assets/{connections-C9XIC_5l.js → connections-BUntGfpQ.js} +1 -1
- package/dist/client/assets/{decopilot-D05Xyy-k.js → decopilot-kQEGsQqO.js} +1 -1
- package/dist/client/assets/decopilot-sse-pool-yovdq4PK.js +1 -0
- package/dist/client/assets/{dialog-B2mbqsst.js → dialog-FBdtBd0W.js} +1 -1
- package/dist/client/assets/{domain-settings-BGmkBDeq.js → domain-settings-DmSveh8r.js} +1 -1
- package/dist/client/assets/{drawer-iJV16qgy.js → drawer-CSp117Rg.js} +1 -1
- package/dist/client/assets/{dropdown-menu-D2SV-kWF.js → dropdown-menu-BUlN28jb.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-BI5KEXy_.js → dynamic-plugin-layout-BxmZPwUZ.js} +1 -1
- package/dist/client/assets/{empty-state-BvWByj-2.js → empty-state-ByuwXjRC.js} +1 -1
- package/dist/client/assets/{empty-state-C_DVBzcU.js → empty-state-DZZ4TCiB.js} +1 -1
- package/dist/client/assets/{extract-connection-data-bssph-WQ.js → extract-connection-data-D9Xe4stq.js} +1 -1
- package/dist/client/assets/{features-iKNVVztW.js → features-DV5J5-hq.js} +1 -1
- package/dist/client/assets/{file-explorer-jTZzWDYA.js → file-explorer-CkhSBrMW.js} +1 -1
- package/dist/client/assets/{file-type-icon-C6U2veNU.js → file-type-icon-BAmjNPBc.js} +1 -1
- package/dist/client/assets/{files-BMloqr5Z.js → files-6d_tX66b.js} +1 -1
- package/dist/client/assets/{form-CU3vQdRi.js → form-BKRU3_f0.js} +1 -1
- package/dist/client/assets/{general-BgdjTbWO.js → general-Co2ymhtz.js} +1 -1
- package/dist/client/assets/{generate-id-yj5Hc06j.js → generate-id-CKNg3Kb_.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Bp_Rai-x.js → github-repo-picker-BXMy0hpf.js} +1 -1
- package/dist/client/assets/{header-tab-button-D3vC9cXp.js → header-tab-button-CRRaGYWH.js} +1 -1
- package/dist/client/assets/{hover-card-BUcaRmlM.js → hover-card-dEUH7y9z.js} +1 -1
- package/dist/client/assets/{image-field-FQeZHP_K.js → image-field-CgZHn_on.js} +1 -1
- package/dist/client/assets/{index-B3hxsYs6.js → index-B6pSigm3.js} +1 -1
- package/dist/client/assets/{index-RSpfYKVW.js → index-C8c4nZI1.js} +1 -1
- package/dist/client/assets/{index-xWbPmICt.js → index-CEk0yA7A.js} +26 -26
- package/dist/client/assets/{index-C1Lwsift.js → index-CTVMK9LC.js} +1 -1
- package/dist/client/assets/{index-TaHJgDzY.js → index-C_iXtMNn.js} +1 -1
- package/dist/client/assets/{index-B0th8sGF.js → index-CiklrCzm.js} +1 -1
- package/dist/client/assets/{index-CeYNxCgl.js → index-Ckn2ukzq.js} +1 -1
- package/dist/client/assets/{index-C7sErToY.js → index-CsGon0kW.js} +1 -1
- package/dist/client/assets/{index-BZhcIh0y.js → index-CwjMi0Lt.js} +1 -1
- package/dist/client/assets/{index-DusmqmHr.js → index-D5VHt2uj.js} +1 -1
- package/dist/client/assets/{index-3ttoiVWU.js → index-DEUVODq9.js} +3 -3
- package/dist/client/assets/{index-COSo4xcs.js → index-DGguhABr.js} +1 -1
- package/dist/client/assets/{index-DyEqkA0D.js → index-DpgH-puy.js} +1 -1
- package/dist/client/assets/{index-CZzfDV_a.js → index-DwVG2P9Q.js} +1 -1
- package/dist/client/assets/{index-redirect-B3cJS778.js → index-redirect-FjuWd7yb.js} +1 -1
- package/dist/client/assets/{index--7JSPThb.js → index-wos7zFLb.js} +1 -1
- package/dist/client/assets/{input-DVih3Sjm.js → input-CkGEzOB_.js} +1 -1
- package/dist/client/assets/{integration-icon-BRZNp1S0.js → integration-icon-D3LrOIav.js} +1 -1
- package/dist/client/assets/{label-C0uUNmvX.js → label-CxhkSBar.js} +1 -1
- package/dist/client/assets/{layout-BP4_ZWgl.js → layout-Bt0QDLtr.js} +1 -1
- package/dist/client/assets/{login-rd7n3mUN.js → login-IwWNwbY4.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BQWbsE1s.js → mcp-oauth-ClRecFEf.js} +1 -1
- package/dist/client/assets/{members-D60AKUfH.js → members-s0QyCnyJ.js} +1 -1
- package/dist/client/assets/{monaco-editor-D-Xn_h_i.js → monaco-editor-CiwloXdm.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DIUkTh7Z.js → monitoring-stats-row-TXNzfIxp.js} +1 -1
- package/dist/client/assets/{oauth-callback-CN_Q3L8-.js → oauth-callback-DlXFbr-f.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CXBvt-3U.js → oauth-callback-ai-provider-p8gLjM7e.js} +1 -1
- package/dist/client/assets/{onboarding-4vgLSBnB.js → onboarding-8moQC7Cm.js} +1 -1
- package/dist/client/assets/{org-install-BAfI3ABO.js → org-install-C_oKg9PC.js} +1 -1
- package/dist/client/assets/{org-layout-BX9VaywI.js → org-layout-B8BfjaU4.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-CPX7c1_z.js → org-plugin-layout-DdUf_5AW.js} +1 -1
- package/dist/client/assets/{page-seo-form-BQBXyb0O.js → page-seo-form-B-I81VJI.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BTkQDLYa.js +1 -0
- package/dist/client/assets/{pair-vWhfM9EW.js → pair-BGqqCdXk.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-e0Wbrqvl.js → plugin-empty-state-DoGTEgJq.js} +1 -1
- package/dist/client/assets/{plugin-header-wAvZu5-j.js → plugin-header-DkXNWjlz.js} +1 -1
- package/dist/client/assets/{plugin-layout-BYUyfvt2.js → plugin-layout-Dp7j6oj5.js} +1 -1
- package/dist/client/assets/{popover-CydIugVg.js → popover-D6gDvvex.js} +1 -1
- package/dist/client/assets/{post-editor--xRkfN-u.js → post-editor-HrWJufNf.js} +1 -1
- package/dist/client/assets/{primitives-D1vGUoIn.js → primitives-BSpEXmPv.js} +1 -1
- package/dist/client/assets/{profile-L6NxK-ky.js → profile-DOJoyq1_.js} +1 -1
- package/dist/client/assets/project-app-view-DfsCN7aU.js +1 -0
- package/dist/client/assets/record-editor-5_5cQlbY.js +1 -0
- package/dist/client/assets/registry-BjxgsC2E.js +2 -0
- package/dist/client/assets/{registry-layout-lkoxfdjb.js → registry-layout-_dcZP0XL.js} +1 -1
- package/dist/client/assets/{require-capability-ctj3w0Hy.js → require-capability-CqCUzyTW.js} +1 -1
- package/dist/client/assets/{required-auth-layout-1KnSml1h.js → required-auth-layout-9YYeY0t9.js} +1 -1
- package/dist/client/assets/{reset-password-Cncp0vG1.js → reset-password-BECGeSUl.js} +1 -1
- package/dist/client/assets/{resizable-DUax5XQL.js → resizable-DV0pCXfQ.js} +1 -1
- package/dist/client/assets/{roles-CX88Wo-B.js → roles-D14mg7KI.js} +1 -1
- package/dist/client/assets/save-referenced-block-0RMjuyn4.js +1 -0
- package/dist/client/assets/{save-status-CilJNEDS.js → save-status-DfBuYJH7.js} +1 -1
- package/dist/client/assets/schema-form-CKIpZkBj.js +1 -0
- package/dist/client/assets/{scroll-area-G2D-rhCe.js → scroll-area-CHs0jTz4.js} +1 -1
- package/dist/client/assets/{search-input-DZtcJZGI.js → search-input-DLDVTOcp.js} +1 -1
- package/dist/client/assets/{secrets-B-dXGiHw.js → secrets-B1ZULRnd.js} +1 -1
- package/dist/client/assets/{sections-editor-Bh4-voaV.js → sections-editor-0pqboVrH.js} +1 -1
- package/dist/client/assets/{select-C8qI9qzJ.js → select-Dyn5eJ76.js} +1 -1
- package/dist/client/assets/{select-model-CJrkcp8L.js → select-model-BNZKyxON.js} +1 -1
- package/dist/client/assets/{seo-editor-CTlhny9b.js → seo-editor-7yhk21tn.js} +1 -1
- package/dist/client/assets/{settings-layout-CpbacBmZ.js → settings-layout-CCjX3a3N.js} +1 -1
- package/dist/client/assets/{settings-section-7sN_1nHI.js → settings-section-BsU7NnTR.js} +1 -1
- package/dist/client/assets/{sheet-B6uVK7Gd.js → sheet-C2l8o7Li.js} +1 -1
- package/dist/client/assets/{shell-controls-BrMNTCJc.js → shell-controls-Da9F6Uwi.js} +1 -1
- package/dist/client/assets/{shell-layout-B0RfVT3C.js → shell-layout-D-knukkt.js} +1 -1
- package/dist/client/assets/{shell-route-loading-BdonEPNR.js → shell-route-loading-BQnWeFBU.js} +1 -1
- package/dist/client/assets/{sidebar-CeOOq5ye.js → sidebar-DMarnfZA.js} +1 -1
- package/dist/client/assets/{skeleton-vEwazeas.js → skeleton-CBG5UooE.js} +1 -1
- package/dist/client/assets/{sortable.esm-CH8RPvw-.js → sortable.esm-B6mcz4jC.js} +1 -1
- package/dist/client/assets/{spinner-2N-kj7x0.js → spinner-CZkJwfre.js} +1 -1
- package/dist/client/assets/{sso-Wq5ejlq_.js → sso-DlGhVe9T.js} +1 -1
- package/dist/client/assets/{store-CvprJD_R.js → store-3PV6elmz.js} +1 -1
- package/dist/client/assets/store-registry-JGeWcmph.js +2 -0
- package/dist/client/assets/{studio-tools-C7SlPTsZ.js → studio-tools-DnIG9YV2.js} +1 -1
- package/dist/client/assets/{switch-DDUT3a8C.js → switch-DZavAgGZ.js} +1 -1
- package/dist/client/assets/{tab-id-rjh-jKlB.js → tab-id-BxH9ETDC.js} +1 -1
- package/dist/client/assets/{table-CXgtsUd4.js → table-C6yf7crt.js} +1 -1
- package/dist/client/assets/{tabs-DkUWsc-a.js → tabs-Kstg5esT.js} +1 -1
- package/dist/client/assets/{task-status-DczQDaYF.js → task-status-Z_8flBXc.js} +1 -1
- package/dist/client/assets/{textarea-RmWXPTvx.js → textarea-D_FY-WF9.js} +1 -1
- package/dist/client/assets/{toggle-group-CBraKNJ7.js → toggle-group-TV66K5Bs.js} +1 -1
- package/dist/client/assets/{toolbar-CE9gJtYo.js → toolbar-CCbum7s0.js} +1 -1
- package/dist/client/assets/{tools-list-yuhbQkhw.js → tools-list-De2JTKaU.js} +1 -1
- package/dist/client/assets/{tooltip-FBNw4nVO.js → tooltip-CnO8IxhJ.js} +1 -1
- package/dist/client/assets/{types-n2YDSxA4.js → types-yqsHoQS8.js} +1 -1
- package/dist/client/assets/{use-ai-providers-suUCAMGx.js → use-ai-providers-D41Ncdap.js} +1 -1
- package/dist/client/assets/{use-automations-F8sxpovP.js → use-automations-Cjo8cUaV.js} +1 -1
- package/dist/client/assets/{use-capability-CVFP3WhT.js → use-capability-km64e2ng.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DervAiLh.js → use-clock-tick-C5MmRZ_O.js} +1 -1
- package/dist/client/assets/{use-collections-BENY1kCP.js → use-collections-Boao6GlT.js} +1 -1
- package/dist/client/assets/{use-connection-DYg5H00C.js → use-connection-D0BF0adZ.js} +1 -1
- package/dist/client/assets/{use-copy-CeVxNpud.js → use-copy-94yZW0qP.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-izJw-zXR.js → use-create-virtual-mcp-qtUnoDxA.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DSCKWvQF.js → use-debounced-autosave-Dj71wv9y.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DP7dz4xf.js → use-delete-connection-C5suM6o1.js} +1 -1
- package/dist/client/assets/{use-file-configs-B9X5drJT.js → use-file-configs-CwuLM8jQ.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll--_mmqYnT.js → use-infinite-scroll-WoD-e-vZ.js} +1 -1
- package/dist/client/assets/{use-list-state-DsyTKO23.js → use-list-state-D--hQu1j.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CLwLq9Vl.js → use-mcp-client-DnHVNKKy.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-B267X-_C.js → use-mcp-prompts-B7lJiQ-b.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-D4ZIO9iv.js → use-mcp-tools-Dduxk9LO.js} +1 -1
- package/dist/client/assets/{use-members-CPWF2UIp.js → use-members-YdskzoCL.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-B002vpC6.js → use-navigate-to-agent-VVlSVZf7.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-bsfac5xt.js → use-org-auth-client-5GIyjJUc.js} +1 -1
- package/dist/client/assets/{use-org-sso-C1kwoIRD.js → use-org-sso-DQRRc4kX.js} +1 -1
- package/dist/client/assets/{use-organization-roles-_DPpq5Wg.js → use-organization-roles-BJhlkkyb.js} +1 -1
- package/dist/client/assets/{use-organization-settings-25l1s_BF.js → use-organization-settings-BRHmZDz1.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CMrhWNW5.js → use-registry-connections-bQBnbYjF.js} +1 -1
- package/dist/client/assets/{use-secrets-B00xpt4M.js → use-secrets-BYUtrbRD.js} +1 -1
- package/dist/client/assets/{use-status-sounds-C7cE6rna.js → use-status-sounds-Biot_m4f.js} +1 -1
- package/dist/client/assets/{use-view-mode-BrzlZey1.js → use-view-mode-B-vBbI_P.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BgfAZ5Jr.js → use-virtual-mcp-kNQ4Vk7l.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DG9NlZam.js +1 -0
- package/dist/client/assets/{useRouterState-CcHttnTA.js → useRouterState-Clwac4xr.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D1V_0Wrc.js +1 -0
- package/dist/client/assets/{user-D2mv81pj.js → user-D2dH1j5H.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-dEyORvRn.js → view-mode-toggle-BVJSd33i.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-ymdzZonG.js → watch-sse-pool-D12zGFzz.js} +1 -1
- package/dist/client/assets/{workflow-BhoGGrwE.js → workflow-B3YzgEYC.js} +1 -1
- package/dist/client/assets/workflow-detail-CXTSi8aj.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/app-editor-vPhjMJAN.js +0 -1
- package/dist/client/assets/decopilot-sse-pool-Bs8CtAgZ.js +0 -1
- package/dist/client/assets/page-seo-sheet-DoMYq7bJ.js +0 -1
- package/dist/client/assets/project-app-view-BZMnBtvK.js +0 -1
- package/dist/client/assets/record-editor-DV9l-O7a.js +0 -1
- package/dist/client/assets/registry-HfyP6hgN.js +0 -2
- package/dist/client/assets/save-referenced-block-BCkoUa1r.js +0 -1
- package/dist/client/assets/schema-form-36ITxJTs.js +0 -1
- package/dist/client/assets/store-registry-BzpUZbWs.js +0 -2
- package/dist/client/assets/useInfiniteQuery-mF7h7Kib.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D6t37oXN.js +0 -1
- package/dist/client/assets/workflow-detail-y0Js5k1o.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as S,c as w,j as r,r as T,bk as A,bq as H,B as P}from"./index-3ttoiVWU.js";import{i as R}from"./LayoutLeft-hGFocSnW.js";import{u as V,c as D,a as B,T as E,b as k}from"./tooltip-FBNw4nVO.js";import{b as W,d as q,S as G,c as L,a as F}from"./sheet-B6uVK7Gd.js";const J="15rem",K="18rem",Q="4.5rem",z=T.createContext(null);function O(){const l=T.useContext(z);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function se(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(z.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function ie(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function le(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(q,{className:"sr-only",children:[r.jsx(G,{children:"Sidebar"}),r.jsx(L,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(F,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function re(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(E,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(B,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(k,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function ne(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function xe(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(E,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(B,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(k,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{ne as S,ie as a,se as b,me as c,xe as d,ue as e,pe as f,be as g,ce as h,fe as i,le as j,oe as k,de as l,re as m,O as u};
|
|
1
|
+
import{e as S,c as w,j as r,r as T,bk as A,bq as H,B as P}from"./index-DEUVODq9.js";import{i as R}from"./LayoutLeft-Cy-bGbAH.js";import{u as V,c as D,a as B,T as E,b as k}from"./tooltip-CnO8IxhJ.js";import{b as W,d as q,S as G,c as L,a as F}from"./sheet-C2l8o7Li.js";const J="15rem",K="18rem",Q="4.5rem",z=T.createContext(null);function O(){const l=T.useContext(z);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function se(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(z.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function ie(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function le(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(q,{className:"sr-only",children:[r.jsx(G,{children:"Sidebar"}),r.jsx(L,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(F,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function re(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(E,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(B,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(k,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function ne(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function xe(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(E,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(B,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(k,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{ne as S,ie as a,se as b,me as c,xe as d,ue as e,pe as f,be as g,ce as h,fe as i,le as j,oe as k,de as l,re as m,O as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n,c,j as i}from"./index-
|
|
1
|
+
import{e as n,c,j as i}from"./index-DEUVODq9.js";function m(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{m as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as Ft,b as Tn,u as mr,G as vr,H as br,j as i,B as He,n as Le,r as u,F as xr,f as yr,l as At,t as Q,K as ht,e as wr,o as Cr,L as Sr,c as Dr,m as Rr,b2 as B,aR as ft}from"./index-3ttoiVWU.js";import{g as jr}from"./connection-slug-eyAPH6o3.js";import{u as _n,a as On,g as Nr,C as Yt}from"./connection-card-BjkWUX4T.js";import{C as Ir}from"./collection-search-DTKnEcQS.js";import{C as Ar}from"./collection-tabs-BDWQ17XJ.js";import{g as Er}from"./generate-id-yj5Hc06j.js";import{D as Mn,a as Pn,b as Ln,c as Fn,e as kr,d as Tr}from"./dialog-B2mbqsst.js";import{b as _r,a as Or,c as Mr,D as Pr,d as Lr,e as Fr,f as zr}from"./drawer-iJV16qgy.js";import{u as Br,b as Ht,T as Wt,a as qt}from"./tooltip-FBNw4nVO.js";import{F as De,b as Re,c as je,d as Ne,f as Ie,a as hn}from"./form-CU3vQdRi.js";import{I as Ye}from"./input-DVih3Sjm.js";import{d as $r,S as Vr,a as Xr,b as Kr,c as ut}from"./select-C8qI9qzJ.js";import{T as Ur}from"./textarea-RmWXPTvx.js";import{b as zn}from"./use-connection-DYg5H00C.js";import{n as Et}from"./Container-BGdfxKsK.js";import{s as Gt}from"./Star01-DgOBkoy7.js";import{S as Yr}from"./agent-icon-rbRaklR8.js";import{s as Hr}from"./XClose-BFJ573RS.js";import{c as Wr,i as Dt,a as pn,E as qr,p as Gr,b as Jr,d as Qr}from"./connection-form-helpers-DTy5Iwrw.js";import{u as gn}from"./use-infinite-scroll--_mmqYnT.js";import{u as Zr}from"./useSuspenseInfiniteQuery-D6t37oXN.js";import{a as eo,u as to}from"./use-mcp-client-CLwLq9Vl.js";import{i as Jt,a as Qt}from"./mcp-oauth-BQWbsE1s.js";import{g as no,e as ro,a as oo}from"./extract-connection-data-bssph-WQ.js";import{B as Rt}from"./badge-B2khBz0-.js";import{c as Zt}from"./XCircle-CShXLucc.js";import{i as mn}from"./Check-Cb8huOHH.js";import{s as so}from"./Plus-_ThoLvvV.js";import{u as io}from"./studio-tools-C7SlPTsZ.js";import{u as ao}from"./use-ai-providers-suUCAMGx.js";function co({open:t,onOpenChange:e,onCreated:n}){const{org:r}=Ft(),{data:o}=Tn.useSession(),{stdioEnabled:s}=mr(),a=Br(),c=zn(),l=_n(),h=On(l,"").items,d=vr({resolver:br(Wr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=d.watch("ui_type"),b=d.watch("connection_url"),N=d.watch("npx_package"),x=Dt({uiType:g,connectionUrl:b??"",npxPackage:N??""})??pn({uiType:g,connectionUrl:b??"",registryItems:h}),v=m=>{const p=m.trim();if(!p)return;const y=!!d.formState.dirtyFields.title,T=!!d.formState.dirtyFields.description,I=!!d.formState.dirtyFields.env_vars,S=O=>{if(O&&(!y&&!d.getValues("title").trim()&&O.title&&d.setValue("title",O.title,{shouldDirty:!1}),!T&&!(d.getValues("description")??"").trim()&&O.description&&d.setValue("description",O.description,{shouldDirty:!1}),!I&&O.envVarKeys?.length)){const U=d.getValues("env_vars")??[],$=new Set(U.map(V=>V.key)),P=O.envVarKeys.filter(V=>!$.has(V));P.length>0&&d.setValue("env_vars",[...U,...P.map(V=>({key:V,value:""}))],{shouldDirty:!0})}},A=Gr(p);if(A&&s){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",A.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),S(Dt({uiType:"NPX",npxPackage:A.packageName}));return}if(p.startsWith("http://")||p.startsWith("https://")){const O=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";d.setValue("ui_type",O,{shouldDirty:!0}),d.setValue("connection_url",p,{shouldDirty:!0}),S(Dt({uiType:O,connectionUrl:p})??pn({uiType:O,connectionUrl:p,registryItems:h}));return}g==="NPX"&&S(Dt({uiType:"NPX",npxPackage:p}))},R=m=>{m||d.reset(),e(m)},w=async m=>{let p,y=null,T=null,I=null;m.ui_type==="NPX"?(p="STDIO",y="",I=Jr(m.npx_package||"",m.env_vars||[])):m.ui_type==="STDIO"?(p="STDIO",y="",I=Qr(m.stdio_command||"",m.stdio_args||"",m.stdio_cwd,m.env_vars||[])):(p=m.ui_type,y=m.connection_url||"",T=m.connection_token||null);const S=Er("conn");try{await c.create.mutateAsync({id:S,title:m.title,description:m.description||null,connection_type:p,connection_url:y,connection_token:T,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:m.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),n?.(S)}catch{Le.error("Failed to create connection")}},C="Create Connection",j="Create a custom connection in your organization. Fill in the details below.",k=d.formState.isSubmitting?"Saving...":"Create Connection",E=i.jsxs("div",{className:"grid gap-4",children:[i.jsx(De,{control:d.control,name:"ui_type",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Type *"}),i.jsxs($r,{value:m.value,onValueChange:m.onChange,children:[i.jsx(Ne,{children:i.jsx(Vr,{children:i.jsx(Xr,{})})}),i.jsxs(Kr,{children:[i.jsx(ut,{value:"HTTP",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Gt,{className:"w-4 h-4"}),"HTTP"]})}),i.jsx(ut,{value:"SSE",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Gt,{className:"w-4 h-4"}),"SSE"]})}),i.jsx(ut,{value:"Websocket",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Gt,{className:"w-4 h-4"}),"Websocket"]})}),s&&i.jsxs(i.Fragment,{children:[i.jsx(ut,{value:"NPX",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Et,{className:"w-4 h-4"}),"NPX Package"]})}),i.jsx(ut,{value:"STDIO",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yr,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),i.jsx(Ie,{})]})}),g==="NPX"&&i.jsx(De,{control:d.control,name:"npx_package",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"NPM Package *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"@perplexity-ai/mcp-server",...m,value:m.value??"",onPaste:p=>{const y=p.clipboardData.getData("text");y&&(p.preventDefault(),d.setValue("npx_package",y.trim(),{shouldDirty:!0}),v(y))},onBlur:p=>{v(p.target.value),m.onBlur()}})}),i.jsx(Ie,{})]})}),g==="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[i.jsx(De,{control:d.control,name:"stdio_command",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Command *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"node, bun, python...",...m,value:m.value??""})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"stdio_args",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Arguments"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"arg1 arg2 --flag value",...m,value:m.value??""})}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"stdio_cwd",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Working Directory"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"/path/to/project (optional)",...m,value:m.value??""})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),i.jsx(Ie,{})]})})]}),(g==="NPX"||g==="STDIO")&&i.jsx(De,{control:d.control,name:"env_vars",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Environment Variables"}),i.jsx(Ne,{children:i.jsx(qr,{value:m.value??[],onChange:m.onChange})}),i.jsx(Ie,{})]})}),g!=="NPX"&&g!=="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsx(De,{control:d.control,name:"connection_url",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"URL *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"https://example.com/mcp",...m,value:m.value??"",onPaste:p=>{const y=p.clipboardData.getData("text");y&&(p.preventDefault(),d.setValue("connection_url",y.trim(),{shouldDirty:!0}),v(y))},onBlur:p=>{v(p.target.value),m.onBlur()}})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"connection_token",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:x?.token?.label??"Token (optional)"}),i.jsx(Ne,{children:i.jsx(Ye,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...m,value:m.value??""})}),x?.token?.helperText&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&i.jsxs(i.Fragment,{children:[" ","·"," ",i.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"})]})]}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"title",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Name *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"My Connection",...m})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"description",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Description"}),i.jsx(Ne,{children:i.jsx(Ur,{placeholder:"A brief description of this connection",rows:3,...m,value:m.value??""})}),i.jsx(Ie,{})]})})]});return a?i.jsx(_r,{open:t,onOpenChange:R,children:i.jsxs(Or,{className:"max-h-[90vh]",children:[i.jsx(Mr,{className:"pb-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 text-left",children:[i.jsx(Pr,{children:C}),i.jsx(Lr,{className:"mt-1",children:j})]}),i.jsx(Fr,{asChild:!0,children:i.jsx(He,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:i.jsx(Hr,{size:16})})})]})}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(w),children:[i.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:E}),i.jsx(zr,{children:i.jsx(He,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:k})})]})})]})}):i.jsx(Mn,{open:t,onOpenChange:R,children:i.jsxs(Pn,{className:"sm:max-w-[525px]",children:[i.jsxs(Ln,{children:[i.jsx(Fn,{children:C}),i.jsx(kr,{children:j})]}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(w),children:[i.jsx("div",{className:"py-4",children:E}),i.jsxs(Tr,{children:[i.jsx(He,{type:"button",variant:"outline",onClick:()=>R(!1),children:"Cancel"}),i.jsx(He,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:k})]})]})})]})})}function lo(t){const e=wr.c(73),{mode:n,agentId:r,addedConnectionIds:o,onAdd:s,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:h,onBrowseNavigate:d,defaultTab:g}=t,b=n===void 0?"add":n,N=g===void 0?"connected":g,{org:x}=Ft(),v=u.useDeferredValue(f),R=f!==v,w=v.trim().toLowerCase();let C;e[0]!==N?(C=D=>D??N,e[0]=N,e[1]=C):C=e[1];const[j,k]=Cr(Sr.connectionsTab(x.slug)+(N==="all"?":home-modal":":agent-modal"),C);let E;e[2]!==j||e[3]!==k?(E=D=>{D!==j&&Q("connections_dialog_tab_changed",{to_tab:D}),k(D)},e[2]=j,e[3]=k,e[4]=E):E=e[4];const m=E;let p;e[5]!==x.id||e[6]!==x.slug?(p={connectionId:eo,orgId:x.id,orgSlug:x.slug},e[5]=x.id,e[6]=x.slug,e[7]=p):p=e[7];const y=to(p);let T,I,S;if(e[8]!==y||e[9]!==v||e[10]!==x.id){S=v?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:v.trim()},{field:["description"],operator:"contains",value:v.trim()}]}:void 0;const D={...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},L=JSON.stringify(D);I=Zr,T=ht.collectionListInfinite(y,x.id,"","CONNECTIONS",L),e[8]=y,e[9]=v,e[10]=x.id,e[11]=T,e[12]=I,e[13]=S}else T=e[11],I=e[12],S=e[13];let A;e[14]!==y||e[15]!==S?(A=async D=>{const{pageParam:L}=D,de=L===void 0?0:L;return(await y.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:de}})).structuredContent},e[14]=y,e[15]=S,e[16]=A):A=e[16];let O;e[17]!==T||e[18]!==A?(O={queryKey:T,queryFn:A,initialPageParam:0,getNextPageParam:mo,staleTime:3e4},e[17]=T,e[18]=A,e[19]=O):O=e[19];const{data:U,fetchNextPage:$,hasNextPage:P,isFetchingNextPage:V}=I(O),re=U?.pages.flatMap(go)??[],xe=Nr(re),qe=new Set(re.filter(po).map(ho)),X=_n(),H=On(X,v),he=gn(H.loadMore,H.hasMore,H.isLoadingMore),Ae=gn($,P??!1,V),F=j==="all"||!!w,Ue=F?H.items.filter(D=>{const L=no(D);if(L&&qe.has(L))return!1;if(!w)return!0;const de=D._meta?.["mcp.mesh"];return[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,de?.friendly_name,de?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(w)}):[],ee=Ue.filter(fo),q=Ue.filter(uo);let M;e[20]!==o?(M=D=>D.some(L=>o.has(L.id)),e[20]=o,e[21]=M):M=e[21];const Ee=M;let G;e[22]!==o||e[23]!==r||e[24]!==l||e[25]!==Ee||e[26]!==b||e[27]!==s||e[28]!==d||e[29]!==a?(G=(D,L,de,ze,me)=>{const Ze=Ee(me),Be=me.find(z=>!o.has(z.id)),ne=me[0];if(b==="browse"){const z=jr(ne);return i.jsx(Yt,{connection:{title:L,icon:de,description:me.length>1?`${me.length} instances`:ze??void 0},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs(Rt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(mn,{size:11})," Connected"]}),onClick:()=>{Q("connection_browse_clicked",{app_name:ne.app_name??null,connection_id:ne.id,instances_count:me.length}),d?.(z)}},D)}return i.jsx(Yt,{connection:{title:L,icon:de,description:ze},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&i.jsxs(Rt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(mn,{size:11})," Added"]}),i.jsx(He,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:z=>{z.stopPropagation(),Be?(Q("connection_add_clicked",{action:"use_existing",app_name:ne.app_name??null,connection_id:Be.id}),r&&Q("agent_connection_attached",{agent_id:r,connection_id:Be.id,app_name:ne.app_name??null,mode:"existing"}),s(Be.id)):(Q("connection_add_clicked",{action:"clone",app_name:ne.app_name??null,base_connection_id:ne.id}),a(ne))},children:"Add"})]})},D)},e[22]=o,e[23]=r,e[24]=l,e[25]=Ee,e[26]=b,e[27]=s,e[28]=d,e[29]=a,e[30]=G):G=e[30];const pe=G;let te;e[31]!==l||e[32]!==b||e[33]!==c?(te=D=>{const L=D._meta?.["mcp.mesh"],de=L?.friendlyName||L?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",ze=D.server?.description||D.description||null,me=D.server?.icons?.[0]?.src||oo(D.server?.repository)||null,Ze=L?.official===!0,Be=L?.verified===!0,ne=L?.owner==="deco";return i.jsx(Yt,{connection:{title:de,description:ze,icon:me},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[ne&&i.jsxs(Ht,{children:[i.jsx(Wt,{asChild:!0,children:i.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:i.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),i.jsx(qt,{children:"Built and maintained by Deco"})]}),!ne&&Ze&&i.jsxs(Ht,{children:[i.jsx(Wt,{asChild:!0,children:i.jsx(Rt,{variant:"outline",size:"icon",children:i.jsx(Zt,{})})}),i.jsx(qt,{children:"Built and maintained by the official vendor"})]}),!ne&&!Ze&&Be&&i.jsxs(Ht,{children:[i.jsx(Wt,{asChild:!0,children:i.jsx(Rt,{variant:"outline",size:"icon",children:i.jsx(Zt,{})})}),i.jsx(qt,{children:"Verified by the Deco team"})]}),i.jsx(He,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:z=>{z.stopPropagation(),Q("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:L?.friendlyName||D.server?.name||D.name||null}),c(D)},children:l===D.id?i.jsx(At,{size:14,className:"animate-spin"}):b==="browse"?"Connect":"Add"})]})},`catalog-${D.id}`)},e[31]=l,e[32]=b,e[33]=c,e[34]=te):te=e[34];const ke=te,ye=!w&&i.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[i.jsx(Ar,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:j,onTabChange:D=>m(D)}),i.jsxs(He,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{Q("connections_dialog_custom_clicked"),h()},children:[i.jsx(so,{size:12}),"Custom Connection"]})]}),Ge=R&&"opacity-50 pointer-events-none";let Te;e[35]!==Ge?(Te=Dr("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[35]=Ge,e[36]=Te):Te=e[36];const st="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let oe;e[37]!==pe?(oe=D=>{if(D.type==="group")return pe(D.key,D.title,D.icon,null,D.connections);const L=D.connection;return pe(L.id,L.title,L.icon,L.description??null,[L])},e[37]=pe,e[38]=oe):oe=e[38];const Fe=xe.map(oe);let ge;e[39]!==Ae?(ge=i.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=ge):ge=e[40];let _e;e[41]!==V?(_e=V&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(At,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=V,e[42]=_e):_e=e[42];const Je=F&&ee.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx(Zt,{size:13,className:"text-muted-foreground shrink-0"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=F&&ee.map(ke),at=F&&q.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),we=F&&q.map(ke);let se;e[43]!==he||e[44]!==X||e[45]!==F?(se=F&&X.length>0&&i.jsx("div",{ref:he,className:"col-span-full h-1"}),e[43]=he,e[44]=X,e[45]=F,e[46]=se):se=e[46];let le;e[47]!==H.isLoadingMore||e[48]!==F?(le=F&&H.isLoadingMore&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(At,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=H.isLoadingMore,e[48]=F,e[49]=le):le=e[49];let Oe;e[50]!==Fe||e[51]!==ge||e[52]!==_e||e[53]!==Je||e[54]!==it||e[55]!==at||e[56]!==we||e[57]!==se||e[58]!==le?(Oe=i.jsxs("div",{className:st,children:[Fe,ge,_e,Je,it,at,we,se,le]}),e[50]=Fe,e[51]=ge,e[52]=_e,e[53]=Je,e[54]=it,e[55]=at,e[56]=we,e[57]=se,e[58]=le,e[59]=Oe):Oe=e[59];let J;e[60]!==j||e[61]!==xe.length||e[62]!==q||e[63]!==f||e[64]!==ee?(J=xe.length===0&&ee.length===0&&q.length===0&&i.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?`No connections match "${f}"`:j==="connected"?"No connections yet":"No connections available"}),e[60]=j,e[61]=xe.length,e[62]=q,e[63]=f,e[64]=ee,e[65]=J):J=e[65];let Me;e[66]!==Te||e[67]!==Oe||e[68]!==J?(Me=i.jsxs("div",{className:Te,children:[Oe,J]}),e[66]=Te,e[67]=Oe,e[68]=J,e[69]=Me):Me=e[69];let Qe;return e[70]!==ye||e[71]!==Me?(Qe=i.jsxs(i.Fragment,{children:[ye,Me]}),e[70]=ye,e[71]=Me,e[72]=Qe):Qe=e[72],Qe}function uo(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function fo(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function ho(t){return t.app_name}function po(t){return t.app_name}function go(t){return t?.items??[]}function mo(t,e){if(t?.hasMore)return e.reduce(vo,0)}function vo(t,e){return t+(e?.items?.length??0)}function Pi({open:t,onOpenChange:e,defaultTab:n,initialSearch:r="",...o}){const s=o.mode??"add",a="agentId"in o?o.agentId:void 0,c="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,l="onAdd"in o&&o.onAdd?o.onAdd:p=>{},f=(p,y,T)=>{a&&Q("agent_connection_attached",{agent_id:a,connection_id:p,app_name:y,mode:T})},[h,d]=u.useState(null),[g,b]=u.useState(r),[N,x]=u.useState(!1),{org:v}=Ft(),{data:R}=Tn.useSession(),w=zn(),C=xr(),j=yr(),k=p=>{e(!1),j({to:"/$org/settings/connections/$appSlug",params:{org:v.slug,appSlug:p}})},E=async p=>{d(p.app_name??p.id);try{const T=`${p.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,S=(await w.create.mutateAsync({title:T,description:p.description??null,connection_type:p.connection_type,connection_url:p.connection_url??null,connection_token:null,icon:p.icon??null,app_name:p.app_name??null,app_id:p.app_id??null,connection_headers:p.connection_headers??null})).id,A=new URL(`/api/${v.slug}/mcp/${S}`,window.location.origin),O=await Jt({url:A.href,token:null,orgId:v.id});if(O.supportsOAuth&&!O.isAuthenticated){const{token:U,tokenInfo:$,error:P}=await Qt({connectionId:S,orgSlug:v.slug,scope:"offline_access"});if(P||!U){Q("connection_oauth_failed",{connection_id:S,flow:"clone",error:P??"no_token"}),Le.error(`Authentication failed: ${P??"no token received"}`),await w.delete.mutateAsync(S);return}if(Q("connection_oauth_succeeded",{connection_id:S,flow:"clone"}),$)try{(await fetch(`/api/${v.slug}/connections/${S}/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})})).ok?await w.update.mutateAsync({id:S,data:{}}):await w.update.mutateAsync({id:S,data:{connection_token:U}})}catch{await w.update.mutateAsync({id:S,data:{connection_token:U}})}else await w.update.mutateAsync({id:S,data:{connection_token:U}});await C.invalidateQueries({queryKey:ht.isMCPAuthenticated(A.href,null)})}f(S,p.app_name??null,"clone"),l(S)}catch(y){console.error("Failed to add connection:",y),Le.error("Failed to add connection")}finally{d(null)}},m=async p=>{if(!(!v||!R?.user?.id)){d(p.id);try{const y=ro(p,v.id,R.user.id,{remoteIndex:0}),T=y.connection_type==="STDIO",I=!!y.connection_url,S=T&&y.connection_headers&&typeof y.connection_headers=="object"&&"command"in y.connection_headers;if(!I&&!S){Le.error("This MCP Server cannot be connected: no connection method available"),d(null);return}const{id:A}=await w.create.mutateAsync(y),O=new URL(`/api/${v.slug}/mcp/${A}`,window.location.origin),U=await Jt({url:O.href,token:null,orgId:v.id});if(U.supportsOAuth&&!U.isAuthenticated){const{token:$,tokenInfo:P,error:V}=await Qt({connectionId:A,orgSlug:v.slug,scope:"offline_access"});if(V||!$){Q("connection_oauth_failed",{connection_id:A,flow:"connect_new",error:V??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${V??"no token received"})`}),f(A,y.app_name??null,"new"),l(A);return}if(Q("connection_oauth_succeeded",{connection_id:A,flow:"connect_new"}),P)try{(await fetch(`/api/${v.slug}/connections/${A}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:P.accessToken,refreshToken:P.refreshToken,expiresIn:P.expiresIn,scope:P.scope,clientId:P.clientId,clientSecret:P.clientSecret,tokenEndpoint:P.tokenEndpoint})})).ok?await w.update.mutateAsync({id:A,data:{}}):await w.update.mutateAsync({id:A,data:{connection_token:$}})}catch{await w.update.mutateAsync({id:A,data:{connection_token:$}})}else await w.update.mutateAsync({id:A,data:{connection_token:$}});await C.invalidateQueries({queryKey:ht.isMCPAuthenticated(O.href,null)}),Le.success("Connected and authenticated")}else Le.success("Connected");f(A,y.app_name??null,"new"),l(A)}catch(y){console.error("Failed to connect:",y),Le.error("Failed to connect")}finally{d(null)}}};return i.jsxs(Mn,{open:t,onOpenChange:e,children:[i.jsxs(Pn,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[i.jsx(Ln,{className:"px-6 pt-5 pb-0 shrink-0",children:i.jsx(Fn,{className:"text-base font-semibold",children:s==="browse"?"Connections":"Add Connection"})}),i.jsx("div",{className:"pt-3 shrink-0",children:i.jsx(Ir,{value:g,onChange:b,placeholder:"Search connections..."})}),i.jsx(u.Suspense,{fallback:i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsx(At,{size:24,className:"animate-spin text-muted-foreground"})}),children:i.jsx(lo,{mode:s,agentId:a,addedConnectionIds:c,onAdd:l,onCloneAndAdd:E,onConnectAndAdd:m,connectingItemId:h,search:g,onCreateConnection:()=>x(!0),onBrowseNavigate:k,defaultTab:n})})]}),i.jsx(co,{open:N,onOpenChange:x,onCreated:async p=>{x(!1);const y=new URL(`/api/${v.slug}/mcp/${p}`,window.location.origin),T=await Jt({url:y.href,token:null,orgId:v.id});if(T.supportsOAuth&&!T.isAuthenticated){const{token:I,tokenInfo:S,error:A}=await Qt({connectionId:p,orgSlug:v.slug,scope:"offline_access"});if(A||!I){Q("connection_oauth_failed",{connection_id:p,flow:"custom_create",error:A??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${A??"no token received"})`}),f(p,null,"custom"),l(p),e(!1);return}if(Q("connection_oauth_succeeded",{connection_id:p,flow:"custom_create"}),S)try{(await fetch(`/api/${v.slug}/connections/${p}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:S.accessToken,refreshToken:S.refreshToken,expiresIn:S.expiresIn,scope:S.scope,clientId:S.clientId,clientSecret:S.clientSecret,tokenEndpoint:S.tokenEndpoint})})).ok?await w.update.mutateAsync({id:p,data:{}}):await w.update.mutateAsync({id:p,data:{connection_token:I}})}catch{await w.update.mutateAsync({id:p,data:{connection_token:I}})}else await w.update.mutateAsync({id:p,data:{connection_token:I}});await C.invalidateQueries({queryKey:ht.isMCPAuthenticated(y.href,null)})}f(p,null,"custom"),l(p),e(!1)}})]})}const vn=new Map;function Li(){const{org:t}=Ft(),e=io(),n=ao(),r=n.find(v=>v.providerId==="deco"),{data:o,isLoading:s,refetch:a,isFetching:c}=Rr({queryKey:ht.aiProviderCredits(t.id,"deco"),enabled:!!r,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=o?.balanceCents??null,f=l!=null?l/100:null,h=u.useRef(new Map);if(l!=null){const v=vn.get(t.id);h.current.get(t.id)&&v!=null&&l>v&&Q("credits_topped_up_detected",{organization_id:t.id,delta_cents:l-v,previous_balance_cents:v,new_balance_cents:l}),vn.set(t.id,l),h.current.set(t.id,!0)}const d=!!r,g=l!=null&&l>0,b=l!=null&&l===0,N=l!=null&&l===200,x=n.length>0&&n.every(v=>v.providerId==="deco");return{hasDecoKey:d,decoKeyId:r?.id??null,balanceCents:l,balanceDollars:f,hasCredits:g,isZeroBalance:b,isInitialFreeCredit:N,hasOnlyDecoProvider:x,isLoading:s,isFetching:c,refetch:a}}function Fi(t){const e=t?.metadata?.githubRepo;return e?e.connectionId?t?.connections?.some(r=>r.connection_id===e.connectionId)?e:null:e:null}function bo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const zt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nt(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function cn(t){return"nodeType"in t}function Z(t){var e,n;return t?nt(t)?t:cn(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function ln(t){const{Document:e}=Z(t);return t instanceof e}function yt(t){return nt(t)?!1:t instanceof Z(t).HTMLElement}function Bn(t){return t instanceof Z(t).SVGElement}function rt(t){return t?nt(t)?t.document:cn(t)?ln(t)?t:yt(t)||Bn(t)?t.ownerDocument:document:document:document}const ve=zt?u.useLayoutEffect:u.useEffect;function Bt(t){const e=u.useRef(t);return ve(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function xo(){const t=u.useRef(null),e=u.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=u.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function vt(t,e){e===void 0&&(e=[t]);const n=u.useRef(t);return ve(()=>{n.current!==t&&(n.current=t)},e),n}function wt(t,e){const n=u.useRef();return u.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Tt(t){const e=Bt(t),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&e?.(o,n.current),n.current=o},[]);return[n,r]}function _t(t){const e=u.useRef();return u.useEffect(()=>{e.current=t},[t]),e.current}let en={};function Ct(t,e){return u.useMemo(()=>{if(e)return e;const n=en[t]==null?0:en[t]+1;return en[t]=n,t+"-"+n},[t,e])}function $n(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const c=Object.entries(a);for(const[l,f]of c){const h=s[l];h!=null&&(s[l]=h+t*f)}return s},{...e})}}const tt=$n(1),bt=$n(-1);function yo(t){return"clientX"in t&&"clientY"in t}function $t(t){if(!t)return!1;const{KeyboardEvent:e}=Z(t.target);return e&&t instanceof e}function wo(t){if(!t)return!1;const{TouchEvent:e}=Z(t.target);return e&&t instanceof e}function Ot(t){if(wo(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return yo(t)?{x:t.clientX,y:t.clientY}:null}const We=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[We.Translate.toString(t),We.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),bn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Co(t){return t.matches(bn)?t:t.querySelector(bn)}const So={display:"none"};function Do(t){let{id:e,value:n}=t;return B.createElement("div",{id:e,style:So},n)}function Ro(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return B.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function jo(){const[t,e]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const Vn=u.createContext(null);function No(t){const e=u.useContext(Vn);u.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Io(){const[t]=u.useState(()=>new Set),e=u.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[u.useCallback(r=>{let{type:o,event:s}=r;t.forEach(a=>{var c;return(c=a[o])==null?void 0:c.call(a,s)})},[t]),e]}const Ao={draggable:`
|
|
1
|
+
import{p as Ft,b as Tn,u as mr,G as vr,H as br,j as i,B as He,n as Le,r as u,F as xr,f as yr,l as At,t as Q,K as ht,e as wr,o as Cr,L as Sr,c as Dr,m as Rr,b2 as B,aR as ft}from"./index-DEUVODq9.js";import{g as jr}from"./connection-slug-eyAPH6o3.js";import{u as _n,a as On,g as Nr,C as Yt}from"./connection-card-DNd6JwtE.js";import{C as Ir}from"./collection-search-BEvxyUp1.js";import{C as Ar}from"./collection-tabs-DM_bzUmO.js";import{g as Er}from"./generate-id-CKNg3Kb_.js";import{D as Mn,a as Pn,b as Ln,c as Fn,e as kr,d as Tr}from"./dialog-FBdtBd0W.js";import{b as _r,a as Or,c as Mr,D as Pr,d as Lr,e as Fr,f as zr}from"./drawer-CSp117Rg.js";import{u as Br,b as Ht,T as Wt,a as qt}from"./tooltip-CnO8IxhJ.js";import{F as De,b as Re,c as je,d as Ne,f as Ie,a as hn}from"./form-BKRU3_f0.js";import{I as Ye}from"./input-CkGEzOB_.js";import{d as $r,S as Vr,a as Xr,b as Kr,c as ut}from"./select-Dyn5eJ76.js";import{T as Ur}from"./textarea-D_FY-WF9.js";import{b as zn}from"./use-connection-D0BF0adZ.js";import{n as Et}from"./Container-CQcCiGBy.js";import{s as Gt}from"./Star01-CjQzvxTy.js";import{S as Yr}from"./agent-icon-CV7VKepg.js";import{s as Hr}from"./XClose-CCKAliKU.js";import{c as Wr,i as Dt,a as pn,E as qr,p as Gr,b as Jr,d as Qr}from"./connection-form-helpers-C-CDw2oQ.js";import{u as gn}from"./use-infinite-scroll-WoD-e-vZ.js";import{u as Zr}from"./useSuspenseInfiniteQuery-D1V_0Wrc.js";import{a as eo,u as to}from"./use-mcp-client-DnHVNKKy.js";import{i as Jt,a as Qt}from"./mcp-oauth-ClRecFEf.js";import{g as no,e as ro,a as oo}from"./extract-connection-data-D9Xe4stq.js";import{B as Rt}from"./badge-Bw9vN6fg.js";import{c as Zt}from"./XCircle-8_cOsjUY.js";import{i as mn}from"./Check-CFZ7jofS.js";import{s as so}from"./Plus-DW_pro4F.js";import{u as io}from"./studio-tools-DnIG9YV2.js";import{u as ao}from"./use-ai-providers-D41Ncdap.js";function co({open:t,onOpenChange:e,onCreated:n}){const{org:r}=Ft(),{data:o}=Tn.useSession(),{stdioEnabled:s}=mr(),a=Br(),c=zn(),l=_n(),h=On(l,"").items,d=vr({resolver:br(Wr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=d.watch("ui_type"),b=d.watch("connection_url"),N=d.watch("npx_package"),x=Dt({uiType:g,connectionUrl:b??"",npxPackage:N??""})??pn({uiType:g,connectionUrl:b??"",registryItems:h}),v=m=>{const p=m.trim();if(!p)return;const y=!!d.formState.dirtyFields.title,T=!!d.formState.dirtyFields.description,I=!!d.formState.dirtyFields.env_vars,S=O=>{if(O&&(!y&&!d.getValues("title").trim()&&O.title&&d.setValue("title",O.title,{shouldDirty:!1}),!T&&!(d.getValues("description")??"").trim()&&O.description&&d.setValue("description",O.description,{shouldDirty:!1}),!I&&O.envVarKeys?.length)){const U=d.getValues("env_vars")??[],$=new Set(U.map(V=>V.key)),P=O.envVarKeys.filter(V=>!$.has(V));P.length>0&&d.setValue("env_vars",[...U,...P.map(V=>({key:V,value:""}))],{shouldDirty:!0})}},A=Gr(p);if(A&&s){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",A.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),S(Dt({uiType:"NPX",npxPackage:A.packageName}));return}if(p.startsWith("http://")||p.startsWith("https://")){const O=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";d.setValue("ui_type",O,{shouldDirty:!0}),d.setValue("connection_url",p,{shouldDirty:!0}),S(Dt({uiType:O,connectionUrl:p})??pn({uiType:O,connectionUrl:p,registryItems:h}));return}g==="NPX"&&S(Dt({uiType:"NPX",npxPackage:p}))},R=m=>{m||d.reset(),e(m)},w=async m=>{let p,y=null,T=null,I=null;m.ui_type==="NPX"?(p="STDIO",y="",I=Jr(m.npx_package||"",m.env_vars||[])):m.ui_type==="STDIO"?(p="STDIO",y="",I=Qr(m.stdio_command||"",m.stdio_args||"",m.stdio_cwd,m.env_vars||[])):(p=m.ui_type,y=m.connection_url||"",T=m.connection_token||null);const S=Er("conn");try{await c.create.mutateAsync({id:S,title:m.title,description:m.description||null,connection_type:p,connection_url:y,connection_token:T,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:m.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),n?.(S)}catch{Le.error("Failed to create connection")}},C="Create Connection",j="Create a custom connection in your organization. Fill in the details below.",k=d.formState.isSubmitting?"Saving...":"Create Connection",E=i.jsxs("div",{className:"grid gap-4",children:[i.jsx(De,{control:d.control,name:"ui_type",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Type *"}),i.jsxs($r,{value:m.value,onValueChange:m.onChange,children:[i.jsx(Ne,{children:i.jsx(Vr,{children:i.jsx(Xr,{})})}),i.jsxs(Kr,{children:[i.jsx(ut,{value:"HTTP",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Gt,{className:"w-4 h-4"}),"HTTP"]})}),i.jsx(ut,{value:"SSE",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Gt,{className:"w-4 h-4"}),"SSE"]})}),i.jsx(ut,{value:"Websocket",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Gt,{className:"w-4 h-4"}),"Websocket"]})}),s&&i.jsxs(i.Fragment,{children:[i.jsx(ut,{value:"NPX",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Et,{className:"w-4 h-4"}),"NPX Package"]})}),i.jsx(ut,{value:"STDIO",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Yr,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),i.jsx(Ie,{})]})}),g==="NPX"&&i.jsx(De,{control:d.control,name:"npx_package",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"NPM Package *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"@perplexity-ai/mcp-server",...m,value:m.value??"",onPaste:p=>{const y=p.clipboardData.getData("text");y&&(p.preventDefault(),d.setValue("npx_package",y.trim(),{shouldDirty:!0}),v(y))},onBlur:p=>{v(p.target.value),m.onBlur()}})}),i.jsx(Ie,{})]})}),g==="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[i.jsx(De,{control:d.control,name:"stdio_command",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Command *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"node, bun, python...",...m,value:m.value??""})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"stdio_args",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Arguments"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"arg1 arg2 --flag value",...m,value:m.value??""})}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"stdio_cwd",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Working Directory"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"/path/to/project (optional)",...m,value:m.value??""})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),i.jsx(Ie,{})]})})]}),(g==="NPX"||g==="STDIO")&&i.jsx(De,{control:d.control,name:"env_vars",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Environment Variables"}),i.jsx(Ne,{children:i.jsx(qr,{value:m.value??[],onChange:m.onChange})}),i.jsx(Ie,{})]})}),g!=="NPX"&&g!=="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsx(De,{control:d.control,name:"connection_url",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"URL *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"https://example.com/mcp",...m,value:m.value??"",onPaste:p=>{const y=p.clipboardData.getData("text");y&&(p.preventDefault(),d.setValue("connection_url",y.trim(),{shouldDirty:!0}),v(y))},onBlur:p=>{v(p.target.value),m.onBlur()}})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"connection_token",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:x?.token?.label??"Token (optional)"}),i.jsx(Ne,{children:i.jsx(Ye,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...m,value:m.value??""})}),x?.token?.helperText&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&i.jsxs(i.Fragment,{children:[" ","·"," ",i.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"})]})]}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"title",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Name *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"My Connection",...m})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"description",render:({field:m})=>i.jsxs(Re,{children:[i.jsx(je,{children:"Description"}),i.jsx(Ne,{children:i.jsx(Ur,{placeholder:"A brief description of this connection",rows:3,...m,value:m.value??""})}),i.jsx(Ie,{})]})})]});return a?i.jsx(_r,{open:t,onOpenChange:R,children:i.jsxs(Or,{className:"max-h-[90vh]",children:[i.jsx(Mr,{className:"pb-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 text-left",children:[i.jsx(Pr,{children:C}),i.jsx(Lr,{className:"mt-1",children:j})]}),i.jsx(Fr,{asChild:!0,children:i.jsx(He,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:i.jsx(Hr,{size:16})})})]})}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(w),children:[i.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:E}),i.jsx(zr,{children:i.jsx(He,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:k})})]})})]})}):i.jsx(Mn,{open:t,onOpenChange:R,children:i.jsxs(Pn,{className:"sm:max-w-[525px]",children:[i.jsxs(Ln,{children:[i.jsx(Fn,{children:C}),i.jsx(kr,{children:j})]}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(w),children:[i.jsx("div",{className:"py-4",children:E}),i.jsxs(Tr,{children:[i.jsx(He,{type:"button",variant:"outline",onClick:()=>R(!1),children:"Cancel"}),i.jsx(He,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:k})]})]})})]})})}function lo(t){const e=wr.c(73),{mode:n,agentId:r,addedConnectionIds:o,onAdd:s,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:h,onBrowseNavigate:d,defaultTab:g}=t,b=n===void 0?"add":n,N=g===void 0?"connected":g,{org:x}=Ft(),v=u.useDeferredValue(f),R=f!==v,w=v.trim().toLowerCase();let C;e[0]!==N?(C=D=>D??N,e[0]=N,e[1]=C):C=e[1];const[j,k]=Cr(Sr.connectionsTab(x.slug)+(N==="all"?":home-modal":":agent-modal"),C);let E;e[2]!==j||e[3]!==k?(E=D=>{D!==j&&Q("connections_dialog_tab_changed",{to_tab:D}),k(D)},e[2]=j,e[3]=k,e[4]=E):E=e[4];const m=E;let p;e[5]!==x.id||e[6]!==x.slug?(p={connectionId:eo,orgId:x.id,orgSlug:x.slug},e[5]=x.id,e[6]=x.slug,e[7]=p):p=e[7];const y=to(p);let T,I,S;if(e[8]!==y||e[9]!==v||e[10]!==x.id){S=v?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:v.trim()},{field:["description"],operator:"contains",value:v.trim()}]}:void 0;const D={...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},L=JSON.stringify(D);I=Zr,T=ht.collectionListInfinite(y,x.id,"","CONNECTIONS",L),e[8]=y,e[9]=v,e[10]=x.id,e[11]=T,e[12]=I,e[13]=S}else T=e[11],I=e[12],S=e[13];let A;e[14]!==y||e[15]!==S?(A=async D=>{const{pageParam:L}=D,de=L===void 0?0:L;return(await y.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:de}})).structuredContent},e[14]=y,e[15]=S,e[16]=A):A=e[16];let O;e[17]!==T||e[18]!==A?(O={queryKey:T,queryFn:A,initialPageParam:0,getNextPageParam:mo,staleTime:3e4},e[17]=T,e[18]=A,e[19]=O):O=e[19];const{data:U,fetchNextPage:$,hasNextPage:P,isFetchingNextPage:V}=I(O),re=U?.pages.flatMap(go)??[],xe=Nr(re),qe=new Set(re.filter(po).map(ho)),X=_n(),H=On(X,v),he=gn(H.loadMore,H.hasMore,H.isLoadingMore),Ae=gn($,P??!1,V),F=j==="all"||!!w,Ue=F?H.items.filter(D=>{const L=no(D);if(L&&qe.has(L))return!1;if(!w)return!0;const de=D._meta?.["mcp.mesh"];return[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,de?.friendly_name,de?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(w)}):[],ee=Ue.filter(fo),q=Ue.filter(uo);let M;e[20]!==o?(M=D=>D.some(L=>o.has(L.id)),e[20]=o,e[21]=M):M=e[21];const Ee=M;let G;e[22]!==o||e[23]!==r||e[24]!==l||e[25]!==Ee||e[26]!==b||e[27]!==s||e[28]!==d||e[29]!==a?(G=(D,L,de,ze,me)=>{const Ze=Ee(me),Be=me.find(z=>!o.has(z.id)),ne=me[0];if(b==="browse"){const z=jr(ne);return i.jsx(Yt,{connection:{title:L,icon:de,description:me.length>1?`${me.length} instances`:ze??void 0},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs(Rt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(mn,{size:11})," Connected"]}),onClick:()=>{Q("connection_browse_clicked",{app_name:ne.app_name??null,connection_id:ne.id,instances_count:me.length}),d?.(z)}},D)}return i.jsx(Yt,{connection:{title:L,icon:de,description:ze},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&i.jsxs(Rt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(mn,{size:11})," Added"]}),i.jsx(He,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:z=>{z.stopPropagation(),Be?(Q("connection_add_clicked",{action:"use_existing",app_name:ne.app_name??null,connection_id:Be.id}),r&&Q("agent_connection_attached",{agent_id:r,connection_id:Be.id,app_name:ne.app_name??null,mode:"existing"}),s(Be.id)):(Q("connection_add_clicked",{action:"clone",app_name:ne.app_name??null,base_connection_id:ne.id}),a(ne))},children:"Add"})]})},D)},e[22]=o,e[23]=r,e[24]=l,e[25]=Ee,e[26]=b,e[27]=s,e[28]=d,e[29]=a,e[30]=G):G=e[30];const pe=G;let te;e[31]!==l||e[32]!==b||e[33]!==c?(te=D=>{const L=D._meta?.["mcp.mesh"],de=L?.friendlyName||L?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",ze=D.server?.description||D.description||null,me=D.server?.icons?.[0]?.src||oo(D.server?.repository)||null,Ze=L?.official===!0,Be=L?.verified===!0,ne=L?.owner==="deco";return i.jsx(Yt,{connection:{title:de,description:ze,icon:me},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[ne&&i.jsxs(Ht,{children:[i.jsx(Wt,{asChild:!0,children:i.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:i.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),i.jsx(qt,{children:"Built and maintained by Deco"})]}),!ne&&Ze&&i.jsxs(Ht,{children:[i.jsx(Wt,{asChild:!0,children:i.jsx(Rt,{variant:"outline",size:"icon",children:i.jsx(Zt,{})})}),i.jsx(qt,{children:"Built and maintained by the official vendor"})]}),!ne&&!Ze&&Be&&i.jsxs(Ht,{children:[i.jsx(Wt,{asChild:!0,children:i.jsx(Rt,{variant:"outline",size:"icon",children:i.jsx(Zt,{})})}),i.jsx(qt,{children:"Verified by the Deco team"})]}),i.jsx(He,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:z=>{z.stopPropagation(),Q("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:L?.friendlyName||D.server?.name||D.name||null}),c(D)},children:l===D.id?i.jsx(At,{size:14,className:"animate-spin"}):b==="browse"?"Connect":"Add"})]})},`catalog-${D.id}`)},e[31]=l,e[32]=b,e[33]=c,e[34]=te):te=e[34];const ke=te,ye=!w&&i.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[i.jsx(Ar,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:j,onTabChange:D=>m(D)}),i.jsxs(He,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{Q("connections_dialog_custom_clicked"),h()},children:[i.jsx(so,{size:12}),"Custom Connection"]})]}),Ge=R&&"opacity-50 pointer-events-none";let Te;e[35]!==Ge?(Te=Dr("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[35]=Ge,e[36]=Te):Te=e[36];const st="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let oe;e[37]!==pe?(oe=D=>{if(D.type==="group")return pe(D.key,D.title,D.icon,null,D.connections);const L=D.connection;return pe(L.id,L.title,L.icon,L.description??null,[L])},e[37]=pe,e[38]=oe):oe=e[38];const Fe=xe.map(oe);let ge;e[39]!==Ae?(ge=i.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=ge):ge=e[40];let _e;e[41]!==V?(_e=V&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(At,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=V,e[42]=_e):_e=e[42];const Je=F&&ee.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx(Zt,{size:13,className:"text-muted-foreground shrink-0"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=F&&ee.map(ke),at=F&&q.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),we=F&&q.map(ke);let se;e[43]!==he||e[44]!==X||e[45]!==F?(se=F&&X.length>0&&i.jsx("div",{ref:he,className:"col-span-full h-1"}),e[43]=he,e[44]=X,e[45]=F,e[46]=se):se=e[46];let le;e[47]!==H.isLoadingMore||e[48]!==F?(le=F&&H.isLoadingMore&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(At,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=H.isLoadingMore,e[48]=F,e[49]=le):le=e[49];let Oe;e[50]!==Fe||e[51]!==ge||e[52]!==_e||e[53]!==Je||e[54]!==it||e[55]!==at||e[56]!==we||e[57]!==se||e[58]!==le?(Oe=i.jsxs("div",{className:st,children:[Fe,ge,_e,Je,it,at,we,se,le]}),e[50]=Fe,e[51]=ge,e[52]=_e,e[53]=Je,e[54]=it,e[55]=at,e[56]=we,e[57]=se,e[58]=le,e[59]=Oe):Oe=e[59];let J;e[60]!==j||e[61]!==xe.length||e[62]!==q||e[63]!==f||e[64]!==ee?(J=xe.length===0&&ee.length===0&&q.length===0&&i.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?`No connections match "${f}"`:j==="connected"?"No connections yet":"No connections available"}),e[60]=j,e[61]=xe.length,e[62]=q,e[63]=f,e[64]=ee,e[65]=J):J=e[65];let Me;e[66]!==Te||e[67]!==Oe||e[68]!==J?(Me=i.jsxs("div",{className:Te,children:[Oe,J]}),e[66]=Te,e[67]=Oe,e[68]=J,e[69]=Me):Me=e[69];let Qe;return e[70]!==ye||e[71]!==Me?(Qe=i.jsxs(i.Fragment,{children:[ye,Me]}),e[70]=ye,e[71]=Me,e[72]=Qe):Qe=e[72],Qe}function uo(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function fo(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function ho(t){return t.app_name}function po(t){return t.app_name}function go(t){return t?.items??[]}function mo(t,e){if(t?.hasMore)return e.reduce(vo,0)}function vo(t,e){return t+(e?.items?.length??0)}function Pi({open:t,onOpenChange:e,defaultTab:n,initialSearch:r="",...o}){const s=o.mode??"add",a="agentId"in o?o.agentId:void 0,c="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,l="onAdd"in o&&o.onAdd?o.onAdd:p=>{},f=(p,y,T)=>{a&&Q("agent_connection_attached",{agent_id:a,connection_id:p,app_name:y,mode:T})},[h,d]=u.useState(null),[g,b]=u.useState(r),[N,x]=u.useState(!1),{org:v}=Ft(),{data:R}=Tn.useSession(),w=zn(),C=xr(),j=yr(),k=p=>{e(!1),j({to:"/$org/settings/connections/$appSlug",params:{org:v.slug,appSlug:p}})},E=async p=>{d(p.app_name??p.id);try{const T=`${p.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,S=(await w.create.mutateAsync({title:T,description:p.description??null,connection_type:p.connection_type,connection_url:p.connection_url??null,connection_token:null,icon:p.icon??null,app_name:p.app_name??null,app_id:p.app_id??null,connection_headers:p.connection_headers??null})).id,A=new URL(`/api/${v.slug}/mcp/${S}`,window.location.origin),O=await Jt({url:A.href,token:null,orgId:v.id});if(O.supportsOAuth&&!O.isAuthenticated){const{token:U,tokenInfo:$,error:P}=await Qt({connectionId:S,orgSlug:v.slug,scope:"offline_access"});if(P||!U){Q("connection_oauth_failed",{connection_id:S,flow:"clone",error:P??"no_token"}),Le.error(`Authentication failed: ${P??"no token received"}`),await w.delete.mutateAsync(S);return}if(Q("connection_oauth_succeeded",{connection_id:S,flow:"clone"}),$)try{(await fetch(`/api/${v.slug}/connections/${S}/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})})).ok?await w.update.mutateAsync({id:S,data:{}}):await w.update.mutateAsync({id:S,data:{connection_token:U}})}catch{await w.update.mutateAsync({id:S,data:{connection_token:U}})}else await w.update.mutateAsync({id:S,data:{connection_token:U}});await C.invalidateQueries({queryKey:ht.isMCPAuthenticated(A.href,null)})}f(S,p.app_name??null,"clone"),l(S)}catch(y){console.error("Failed to add connection:",y),Le.error("Failed to add connection")}finally{d(null)}},m=async p=>{if(!(!v||!R?.user?.id)){d(p.id);try{const y=ro(p,v.id,R.user.id,{remoteIndex:0}),T=y.connection_type==="STDIO",I=!!y.connection_url,S=T&&y.connection_headers&&typeof y.connection_headers=="object"&&"command"in y.connection_headers;if(!I&&!S){Le.error("This MCP Server cannot be connected: no connection method available"),d(null);return}const{id:A}=await w.create.mutateAsync(y),O=new URL(`/api/${v.slug}/mcp/${A}`,window.location.origin),U=await Jt({url:O.href,token:null,orgId:v.id});if(U.supportsOAuth&&!U.isAuthenticated){const{token:$,tokenInfo:P,error:V}=await Qt({connectionId:A,orgSlug:v.slug,scope:"offline_access"});if(V||!$){Q("connection_oauth_failed",{connection_id:A,flow:"connect_new",error:V??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${V??"no token received"})`}),f(A,y.app_name??null,"new"),l(A);return}if(Q("connection_oauth_succeeded",{connection_id:A,flow:"connect_new"}),P)try{(await fetch(`/api/${v.slug}/connections/${A}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:P.accessToken,refreshToken:P.refreshToken,expiresIn:P.expiresIn,scope:P.scope,clientId:P.clientId,clientSecret:P.clientSecret,tokenEndpoint:P.tokenEndpoint})})).ok?await w.update.mutateAsync({id:A,data:{}}):await w.update.mutateAsync({id:A,data:{connection_token:$}})}catch{await w.update.mutateAsync({id:A,data:{connection_token:$}})}else await w.update.mutateAsync({id:A,data:{connection_token:$}});await C.invalidateQueries({queryKey:ht.isMCPAuthenticated(O.href,null)}),Le.success("Connected and authenticated")}else Le.success("Connected");f(A,y.app_name??null,"new"),l(A)}catch(y){console.error("Failed to connect:",y),Le.error("Failed to connect")}finally{d(null)}}};return i.jsxs(Mn,{open:t,onOpenChange:e,children:[i.jsxs(Pn,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[i.jsx(Ln,{className:"px-6 pt-5 pb-0 shrink-0",children:i.jsx(Fn,{className:"text-base font-semibold",children:s==="browse"?"Connections":"Add Connection"})}),i.jsx("div",{className:"pt-3 shrink-0",children:i.jsx(Ir,{value:g,onChange:b,placeholder:"Search connections..."})}),i.jsx(u.Suspense,{fallback:i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsx(At,{size:24,className:"animate-spin text-muted-foreground"})}),children:i.jsx(lo,{mode:s,agentId:a,addedConnectionIds:c,onAdd:l,onCloneAndAdd:E,onConnectAndAdd:m,connectingItemId:h,search:g,onCreateConnection:()=>x(!0),onBrowseNavigate:k,defaultTab:n})})]}),i.jsx(co,{open:N,onOpenChange:x,onCreated:async p=>{x(!1);const y=new URL(`/api/${v.slug}/mcp/${p}`,window.location.origin),T=await Jt({url:y.href,token:null,orgId:v.id});if(T.supportsOAuth&&!T.isAuthenticated){const{token:I,tokenInfo:S,error:A}=await Qt({connectionId:p,orgSlug:v.slug,scope:"offline_access"});if(A||!I){Q("connection_oauth_failed",{connection_id:p,flow:"custom_create",error:A??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${A??"no token received"})`}),f(p,null,"custom"),l(p),e(!1);return}if(Q("connection_oauth_succeeded",{connection_id:p,flow:"custom_create"}),S)try{(await fetch(`/api/${v.slug}/connections/${p}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:S.accessToken,refreshToken:S.refreshToken,expiresIn:S.expiresIn,scope:S.scope,clientId:S.clientId,clientSecret:S.clientSecret,tokenEndpoint:S.tokenEndpoint})})).ok?await w.update.mutateAsync({id:p,data:{}}):await w.update.mutateAsync({id:p,data:{connection_token:I}})}catch{await w.update.mutateAsync({id:p,data:{connection_token:I}})}else await w.update.mutateAsync({id:p,data:{connection_token:I}});await C.invalidateQueries({queryKey:ht.isMCPAuthenticated(y.href,null)})}f(p,null,"custom"),l(p),e(!1)}})]})}const vn=new Map;function Li(){const{org:t}=Ft(),e=io(),n=ao(),r=n.find(v=>v.providerId==="deco"),{data:o,isLoading:s,refetch:a,isFetching:c}=Rr({queryKey:ht.aiProviderCredits(t.id,"deco"),enabled:!!r,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=o?.balanceCents??null,f=l!=null?l/100:null,h=u.useRef(new Map);if(l!=null){const v=vn.get(t.id);h.current.get(t.id)&&v!=null&&l>v&&Q("credits_topped_up_detected",{organization_id:t.id,delta_cents:l-v,previous_balance_cents:v,new_balance_cents:l}),vn.set(t.id,l),h.current.set(t.id,!0)}const d=!!r,g=l!=null&&l>0,b=l!=null&&l===0,N=l!=null&&l===200,x=n.length>0&&n.every(v=>v.providerId==="deco");return{hasDecoKey:d,decoKeyId:r?.id??null,balanceCents:l,balanceDollars:f,hasCredits:g,isZeroBalance:b,isInitialFreeCredit:N,hasOnlyDecoProvider:x,isLoading:s,isFetching:c,refetch:a}}function Fi(t){const e=t?.metadata?.githubRepo;return e?e.connectionId?t?.connections?.some(r=>r.connection_id===e.connectionId)?e:null:e:null}function bo(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const zt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nt(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function cn(t){return"nodeType"in t}function Z(t){var e,n;return t?nt(t)?t:cn(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function ln(t){const{Document:e}=Z(t);return t instanceof e}function yt(t){return nt(t)?!1:t instanceof Z(t).HTMLElement}function Bn(t){return t instanceof Z(t).SVGElement}function rt(t){return t?nt(t)?t.document:cn(t)?ln(t)?t:yt(t)||Bn(t)?t.ownerDocument:document:document:document}const ve=zt?u.useLayoutEffect:u.useEffect;function Bt(t){const e=u.useRef(t);return ve(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function xo(){const t=u.useRef(null),e=u.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=u.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function vt(t,e){e===void 0&&(e=[t]);const n=u.useRef(t);return ve(()=>{n.current!==t&&(n.current=t)},e),n}function wt(t,e){const n=u.useRef();return u.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Tt(t){const e=Bt(t),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&e?.(o,n.current),n.current=o},[]);return[n,r]}function _t(t){const e=u.useRef();return u.useEffect(()=>{e.current=t},[t]),e.current}let en={};function Ct(t,e){return u.useMemo(()=>{if(e)return e;const n=en[t]==null?0:en[t]+1;return en[t]=n,t+"-"+n},[t,e])}function $n(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const c=Object.entries(a);for(const[l,f]of c){const h=s[l];h!=null&&(s[l]=h+t*f)}return s},{...e})}}const tt=$n(1),bt=$n(-1);function yo(t){return"clientX"in t&&"clientY"in t}function $t(t){if(!t)return!1;const{KeyboardEvent:e}=Z(t.target);return e&&t instanceof e}function wo(t){if(!t)return!1;const{TouchEvent:e}=Z(t.target);return e&&t instanceof e}function Ot(t){if(wo(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return yo(t)?{x:t.clientX,y:t.clientY}:null}const We=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[We.Translate.toString(t),We.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),bn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Co(t){return t.matches(bn)?t:t.querySelector(bn)}const So={display:"none"};function Do(t){let{id:e,value:n}=t;return B.createElement("div",{id:e,style:So},n)}function Ro(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return B.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function jo(){const[t,e]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const Vn=u.createContext(null);function No(t){const e=u.useContext(Vn);u.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Io(){const[t]=u.useState(()=>new Set),e=u.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[u.useCallback(r=>{let{type:o,event:s}=r;t.forEach(a=>{var c;return(c=a[o])==null?void 0:c.call(a,s)})},[t]),e]}const Ao={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as C,c as d,bq as u,j as l}from"./index-
|
|
1
|
+
import{e as C,c as d,bq as u,j as l}from"./index-DEUVODq9.js";const m=u("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=d(m({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let a,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=l.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=a,e[4]=i):(a=e[3],i=e[4]);let s;e[5]!==t?(s=l.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=l.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as D,r as v,j as e,B as p,t as S,n as c,e as N}from"./index-
|
|
1
|
+
import{p as D,r as v,j as e,B as p,t as S,n as c,e as N}from"./index-DEUVODq9.js";import{D as k}from"./domain-settings-DmSveh8r.js";import{P as f}from"./index-CiklrCzm.js";import{I as l}from"./input-CkGEzOB_.js";import{S as z}from"./switch-DZavAgGZ.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-DQRRc4kX.js";import{c as F,S as y,a as C,b as r,d as O}from"./settings-section-BsU7NnTR.js";import{s as L}from"./Trash01-BfygLm6s.js";import{R as q}from"./require-capability-CqCUzyTW.js";import"./studio-tools-DnIG9YV2.js";import"./sidebar-DMarnfZA.js";import"./LayoutLeft-Cy-bGbAH.js";import"./tooltip-CnO8IxhJ.js";import"./sheet-C2l8o7Li.js";import"./X-BUzk9ZuQ.js";import"./card-B0-N4bpb.js";import"./ArrowUpRight-jvt9_jPs.js";import"./use-capability-km64e2ng.js";import"./access-gate-DuwCoW9u.js";import"./capability-load-error-B4z1cdIN.js";function B(){const{org:t}=D(),{data:a,isLoading:E}=P(t.id,t.slug),x=R(t.id,t.slug),h=A(t.id,t.slug),j=T(t.id,t.slug),[s,d]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=v.useState(!1),u=a?.configured&&a.config,o=a?.config,I=()=>{o&&d({issuer:o.issuer,clientId:o.clientId,clientSecret:"",discoveryEndpoint:o.discoveryEndpoint??"",domain:o.domain,scopes:o.scopes.join(" ")}),g(!0)},b=async()=>{if(!s.issuer||!s.clientId||!s.domain){c.error("Issuer, Client ID, and Domain are required");return}if(!u&&!s.clientSecret){c.error("Client Secret is required for initial setup");return}try{await x.mutateAsync({issuer:s.issuer,clientId:s.clientId,clientSecret:s.clientSecret,discoveryEndpoint:s.discoveryEndpoint||void 0,scopes:s.scopes.split(/\s+/).filter(Boolean),domain:s.domain,enforced:o?.enforced??!1}),S(u?"sso_config_updated":"sso_configured",{organization_id:t.id,email_domain:s.domain}),c.success("SSO configuration saved"),g(!1)}catch(i){c.error(i instanceof Error?i.message:"Failed to save SSO config")}},w=async()=>{if(confirm("Are you sure you want to remove SSO configuration?"))try{await h.mutateAsync(),S("sso_config_removed",{organization_id:t.id}),c.success("SSO configuration removed"),g(!1)}catch{c.error("Failed to remove SSO config")}},_=async i=>{try{await j.mutateAsync(i),S("sso_enforcement_toggled",{organization_id:t.id,enforced:i}),c.success(i?"SSO enforcement enabled":"SSO enforcement disabled")}catch{c.error("Failed to toggle SSO enforcement")}};return e.jsx(f,{children:e.jsx(f.Content,{children:e.jsx(f.Body,{children:e.jsxs(F,{children:[e.jsx(f.Title,{children:"Security"}),e.jsx(k,{}),E?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs(e.Fragment,{children:[u&&!m&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Provider",action:e.jsx("span",{className:"font-medium",children:o.issuer})}),e.jsx(r,{title:"Client ID",action:e.jsx("span",{className:"font-mono text-xs",children:o.clientId})}),e.jsx(r,{title:"Domain",action:e.jsx("span",{className:"font-medium",children:o.domain})}),e.jsx(r,{title:"Scopes",action:e.jsx("span",{className:"font-mono text-xs",children:o.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(r,{title:"Enforce SSO",description:"Require all members to authenticate via SSO",action:e.jsx(z,{checked:o.enforced,onCheckedChange:_,disabled:j.isPending})}),e.jsxs(O,{children:[e.jsxs(p,{variant:"ghost",size:"sm",onClick:w,disabled:h.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(L,{size:14}),"Remove"]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${t.slug}/sso/authorize`,"_blank")},children:"Test SSO"}),e.jsx(p,{variant:"outline",size:"sm",onClick:I,children:"Edit configuration"})]})]})}),(!u||m)&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Issuer URL",description:"The OIDC issuer URL of your identity provider.",action:e.jsx(l,{id:"sso-issuer",placeholder:"https://login.microsoftonline.com/{tenant}/v2.0",value:s.issuer,onChange:i=>d(n=>({...n,issuer:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client ID",action:e.jsx(l,{id:"sso-client-id",placeholder:"your-client-id",value:s.clientId,onChange:i=>d(n=>({...n,clientId:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client Secret",description:m&&u?"Leave empty to keep current":void 0,action:e.jsx(l,{id:"sso-client-secret",type:"password",placeholder:"your-client-secret",value:s.clientSecret,onChange:i=>d(n=>({...n,clientSecret:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Email Domain",description:"The email domain this SSO provider covers.",action:e.jsx(l,{id:"sso-domain",placeholder:"company.com",value:s.domain,onChange:i=>d(n=>({...n,domain:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Scopes",action:e.jsx(l,{id:"sso-scopes",placeholder:"openid email profile",value:s.scopes,onChange:i=>d(n=>({...n,scopes:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Discovery Endpoint",description:"Optional — auto-detected from issuer if omitted.",action:e.jsx(l,{id:"sso-discovery",placeholder:"Auto-detected from issuer",value:s.discoveryEndpoint,onChange:i=>d(n=>({...n,discoveryEndpoint:i.target.value})),className:"w-[280px]"})}),e.jsxs(O,{children:[m&&e.jsx(p,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(p,{onClick:b,disabled:x.isPending,size:"sm",children:x.isPending?"Saving...":m?"Update":"Configure SSO"})]})]})})]})]})})})})}function ae(){const t=N.c(1);let a;return t[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(q,{capability:"org:manage",area:"security",children:e.jsx(B,{})}),t[0]=a):a=t[0],a}export{ae as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as D,j as s,E as le,r as K,p as ae,F as ce,f as de,g as me,B as Y,t as te,K as fe,a as ge,n as ie}from"./index-3ttoiVWU.js";import{i as ue}from"./AlertCircle-Bdl8L7il.js";import{i as pe}from"./ChevronRight-D0iMeTJ5.js";import{s as xe}from"./Plus-_ThoLvvV.js";import{s as he}from"./Trash01-4Tg-x6Q1.js";import{I as X}from"./input-DVih3Sjm.js";import{S as oe}from"./switch-DDUT3a8C.js";import{S as ye}from"./skeleton-vEwazeas.js";import{A as ne}from"./avatar-BqZJEvBP.js";import{P as je,a as Ce,b as Se}from"./popover-CydIugVg.js";import{b as re}from"./use-connection-DYg5H00C.js";import{W as Z}from"./use-mcp-client-CLwLq9Vl.js";import{P as G}from"./index-B0th8sGF.js";import{u as ve}from"./use-registry-connections-CMrhWNW5.js";import{g as _e,h as be}from"./use-organization-settings-25l1s_BF.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-7sN_1nHI.js";import{R as Re}from"./require-capability-ctj3w0Hy.js";import"./User01-CChZgMNn.js";import"./use-collections-BENY1kCP.js";import"./auth-DOEa4Xg-.js";import"./sidebar-CeOOq5ye.js";import"./LayoutLeft-hGFocSnW.js";import"./tooltip-FBNw4nVO.js";import"./sheet-B6uVK7Gd.js";import"./X-BRH2Y8Wq.js";import"./card-C0ZJxFoq.js";import"./ArrowUpRight-C4gNBzMY.js";import"./use-capability-CVFP3WhT.js";import"./access-gate-qCShaDhO.js";import"./capability-load-error-ErUeqyMr.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,S]=K.useState(""),[x,v]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>S(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>v(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:S}=t,x=de();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={from:"/shell/$org"},e[0]=v):v=e[0];const{org:h}=me(v);let f;e[1]!==r||e[2]!==S||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{S?x({to:S,params:{org:h}}):j(!r)},e[1]=r,e[2]=S,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(Se,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==S?(p=S&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=S,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=ve(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,S]=K.useState(!1);let x,v,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let U;t[20]!==n||t[21]!==r?(U=async i=>{S(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=U):U=t[22];const H=U,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>S(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>S(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let F;t[34]!==z||t[35]!==E?(F=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=F):F=t[36];let q;t[37]!==W||t[38]!==P||t[39]!==l?(q=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=q):q=t[40];const V=A.map(q);let $;t[41]!==F||t[42]!==V?($=s.jsxs(Q,{children:[F,V]}),t[41]=F,t[42]=V,t[43]=$):$=t[43],t[44]!==$||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,$]}),t[44]=$,t[45]=M,t[46]=T,t[47]=c):c=t[47],v=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=v,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],v=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==v||t[52]!==f||t[53]!==d?(g=s.jsx(v,{title:f,children:d}),t[51]=v,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:Fe,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function Fe(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function ft(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{ft as default};
|
|
1
|
+
import{e as D,j as s,E as le,r as K,p as ae,F as ce,f as de,g as me,B as Y,t as te,K as fe,a as ge,n as ie}from"./index-DEUVODq9.js";import{i as ue}from"./AlertCircle-DU4Czymb.js";import{i as pe}from"./ChevronRight-DtVYtVbK.js";import{s as xe}from"./Plus-DW_pro4F.js";import{s as he}from"./Trash01-BfygLm6s.js";import{I as X}from"./input-CkGEzOB_.js";import{S as oe}from"./switch-DZavAgGZ.js";import{S as ye}from"./skeleton-CBG5UooE.js";import{A as ne}from"./avatar-ItW7yKah.js";import{P as je,a as Ce,b as Se}from"./popover-D6gDvvex.js";import{b as re}from"./use-connection-D0BF0adZ.js";import{W as Z}from"./use-mcp-client-DnHVNKKy.js";import{P as G}from"./index-CiklrCzm.js";import{u as ve}from"./use-registry-connections-bQBnbYjF.js";import{g as _e,h as be}from"./use-organization-settings-BRHmZDz1.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-BsU7NnTR.js";import{R as Re}from"./require-capability-CqCUzyTW.js";import"./User01-Bi6i4zOy.js";import"./use-collections-Boao6GlT.js";import"./auth-StjmYjna.js";import"./sidebar-DMarnfZA.js";import"./LayoutLeft-Cy-bGbAH.js";import"./tooltip-CnO8IxhJ.js";import"./sheet-C2l8o7Li.js";import"./X-BUzk9ZuQ.js";import"./card-B0-N4bpb.js";import"./ArrowUpRight-jvt9_jPs.js";import"./use-capability-km64e2ng.js";import"./access-gate-DuwCoW9u.js";import"./capability-load-error-B4z1cdIN.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,S]=K.useState(""),[x,v]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>S(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>v(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:S}=t,x=de();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={from:"/shell/$org"},e[0]=v):v=e[0];const{org:h}=me(v);let f;e[1]!==r||e[2]!==S||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{S?x({to:S,params:{org:h}}):j(!r)},e[1]=r,e[2]=S,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(Se,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==S?(p=S&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=S,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=ve(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,S]=K.useState(!1);let x,v,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let U;t[20]!==n||t[21]!==r?(U=async i=>{S(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=U):U=t[22];const H=U,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>S(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>S(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let F;t[34]!==z||t[35]!==E?(F=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=F):F=t[36];let q;t[37]!==W||t[38]!==P||t[39]!==l?(q=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=q):q=t[40];const V=A.map(q);let $;t[41]!==F||t[42]!==V?($=s.jsxs(Q,{children:[F,V]}),t[41]=F,t[42]=V,t[43]=$):$=t[43],t[44]!==$||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,$]}),t[44]=$,t[45]=M,t[46]=T,t[47]=c):c=t[47],v=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=v,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],v=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==v||t[52]!==f||t[53]!==d?(g=s.jsx(v,{title:f,children:d}),t[51]=v,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:Fe,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function Fe(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function ft(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{ft as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-_dcZP0XL.js","assets/index-DEUVODq9.js","assets/index-DfYyH4IW.css","assets/XCircle-8_cOsjUY.js","assets/CheckCircle-B7_GaGqy.js","assets/Container-CQcCiGBy.js","assets/Settings02-BzBPnOVl.js","assets/use-mcp-client-DnHVNKKy.js","assets/auth-StjmYjna.js","assets/useInfiniteQuery-DG9NlZam.js","assets/use-infinite-scroll-WoD-e-vZ.js","assets/studio-tools-DnIG9YV2.js","assets/badge-Bw9vN6fg.js","assets/input-CkGEzOB_.js","assets/dropdown-menu-BUlN28jb.js","assets/Check-CFZ7jofS.js","assets/ChevronRight-DtVYtVbK.js","assets/DotsVertical-7ebFkKLD.js","assets/table-C6yf7crt.js","assets/toggle-group-TV66K5Bs.js","assets/use-view-mode-B-vBbI_P.js","assets/tooltip-CnO8IxhJ.js","assets/FilterLines-BtiGzXwl.js","assets/Globe01-bYDzICLJ.js","assets/SearchMd-BnZZ5mEU.js","assets/dialog-FBdtBd0W.js","assets/X-BUzk9ZuQ.js","assets/AlertCircle-DU4Czymb.js","assets/Upload01-ClElEXYw.js","assets/alert-dialog-CjyXYSQZ.js","assets/card-B0-N4bpb.js","assets/Trash01-BfygLm6s.js","assets/label-CxhkSBar.js","assets/select-Dyn5eJ76.js","assets/ChevronDown-CMnvnfNH.js","assets/ChevronUp-BYxSfj4f.js","assets/switch-DZavAgGZ.js","assets/textarea-D_FY-WF9.js","assets/RefreshCcw01-B9XxpyTk.js","assets/checkbox-BjUgAWJu.js","assets/Eye-CYtfD-C-.js","assets/LinkExternal01-BDXPmxri.js","assets/use-copy-94yZW0qP.js","assets/Key01-CDcV65YU.js","assets/Plus-DW_pro4F.js","assets/mcp-oauth-ClRecFEf.js","assets/Play-B0CTz7-g.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{e as m,f as n,g as c,j as t,l as f,r as l,_ as p}from"./index-DEUVODq9.js";import{R as u}from"./require-capability-CqCUzyTW.js";import"./use-capability-km64e2ng.js";import"./access-gate-DuwCoW9u.js";import"./capability-load-error-B4z1cdIN.js";const g=l.lazy(()=>p(()=>import("./registry-layout-_dcZP0XL.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as i,p as c}from"./index-
|
|
1
|
+
import{e as i,p as c}from"./index-DEUVODq9.js";class l extends Error{constructor(r,s){super(r),this.status=s,this.name="StudioToolError"}status}async function u(o,r,s){const t=await fetch(`/api/${encodeURIComponent(o)}/tools/${encodeURIComponent(r)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s??{})});if(!t.ok){let e=`${r} failed (${t.status})`;try{const n=await t.json();n?.error&&(e=n.error)}catch{}throw new l(e,t.status)}return await t.json()}function p(){const o=i.c(5),{org:r}=c(),s=r.slug;let t;o[0]!==s?(t=(n,a)=>u(s,n,a),o[0]=s,o[1]=t):t=o[1];let e;return o[2]!==s||o[3]!==t?(e={orgSlug:s,call:t},o[2]=s,o[3]=t,o[4]=e):e=o[4],e}export{p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as i,a4 as C,bu as y,be as T,a5 as I,bv as M,bw as H,ad as z,e as A,c as g}from"./index-
|
|
1
|
+
import{r as c,j as i,a4 as C,bu as y,be as T,a5 as I,bv as M,bw as H,ad as z,e as A,c as g}from"./index-DEUVODq9.js";var m="Switch",[U]=z(m),[q,L]=U(m),E=c.forwardRef((r,e)=>{const{__scopeSwitch:t,name:a,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=r,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(r.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:a,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((r,e)=>{const{__scopeSwitch:t,...a}=r,s=L(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:r,control:e,checked:t,bubbles:a=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:a});h.call(l,t),l.dispatchEvent(v)}},[u,t,a]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(r){return r?"checked":"unchecked"}var $=E,D=R;function W(r){const e=A.c(9);let t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==a||e[7]!==s?(o=i.jsx($,{"data-slot":"switch",className:s,...a,children:n}),e[6]=a,e[7]=s,e[8]=o):o=e[8],o}export{W as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{L as Et,cn as It,co as Tt,bS as M,R as c,cp as ie,cq as Je,cr as wt,cs as At,Q as Ot,aH as O,aG as F,aE as ae,P as _,bm as m,b7 as j,ct as Mt,cu as E,aF as Ct,n as ge,r as U,e as Ee,p as Rt,j as Nt}from"./index-
|
|
1
|
+
import{L as Et,cn as It,co as Tt,bS as M,R as c,cp as ie,cq as Je,cr as wt,cs as At,Q as Ot,aH as O,aG as F,aE as ae,P as _,bm as m,b7 as j,ct as Mt,cu as E,aF as Ct,n as ge,r as U,e as Ee,p as Rt,j as Nt}from"./index-DEUVODq9.js";import{a as Pt,u as xt}from"./use-mcp-client-DnHVNKKy.js";import{e as Dt,D as Lt}from"./watch-sse-pool-D12zGFzz.js";import{d as kt}from"./decopilot-sse-pool-yovdq4PK.js";var ee;(function(t){t.assertEqual=n=>{};function e(n){}t.assertIs=e;function a(n){throw new Error}t.assertNever=a,t.arrayToEnum=n=>{const o={};for(const i of n)o[i]=i;return o},t.getValidEnumValues=n=>{const o=t.objectKeys(n).filter(s=>typeof n[n[s]]!="number"),i={};for(const s of o)i[s]=n[s];return t.objectValues(i)},t.objectValues=n=>t.objectKeys(n).map(function(o){return n[o]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const o=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&o.push(i);return o},t.find=(n,o)=>{for(const i of n)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,o=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(n,o)=>typeof o=="bigint"?o.toString():o})(ee||(ee={}));var Me;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Me||(Me={}));ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);ee.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class le extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},r={_errors:[]},n=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let s=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(a(i))):s[u]=s[u]||{_errors:[]},s=s[u],p++}}};return n(this),r}static assert(e){if(!(e instanceof le))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const n of this.issues)if(n.path.length>0){const o=n.path[0];a[o]=a[o]||[],a[o].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}le.create=t=>new le(t);var Ce;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Ce||(Ce={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));const jt=1e4,Qr="true";function de(t,e){return Et.chatAutosend(t,e)}function Zt(t){return t==="pending"||t==="sending"}function $t(t){if(!t)return null;let e;try{e=JSON.parse(t)}catch{return null}return!e||typeof e!="object"||typeof e.createdAt!="number"||typeof e.message!="object"||!Zt(e.status)?null:e}function Kr(t,e,a,r,n=Date.now()){const o={message:r,createdAt:n,status:"pending"};return t.setItem(de(e,a),JSON.stringify(o)),o}function Ut(t,e,a){const r=de(e,a),n=$t(t.getItem(r));return n||(t.removeItem(r),null)}function en(t,e,a,r=Date.now()){const n=de(e,a),o=Ut(t,e,a);return!o||o.status!=="pending"?null:r-o.createdAt>=jt?(t.removeItem(n),null):(t.setItem(n,JSON.stringify({...o,status:"sending"})),{message:o.message,createdAt:o.createdAt})}function tn(t,e,a){t.removeItem(de(e,a))}var We="vercel.ai.error",Ft=Symbol.for(We),Re,Ne,D=class Ye extends(Ne=Error,Re=Ft,Ne){constructor({name:e,message:a,cause:r}){super(a),this[Re]=!0,this.name=e,this.cause=r}static isInstance(e){return Ye.hasMarker(e,We)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function qe(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ge="AI_InvalidArgumentError",He=`vercel.ai.error.${Ge}`,Bt=Symbol.for(He),Pe,xe,Vt=class extends(xe=D,Pe=Bt,xe){constructor({message:t,cause:e,argument:a}){super({name:Ge,message:t,cause:e}),this[Pe]=!0,this.argument=a}static isInstance(t){return D.hasMarker(t,He)}},Xe="AI_JSONParseError",Qe=`vercel.ai.error.${Xe}`,zt=Symbol.for(Qe),De,Le,ke=class extends(Le=D,De=zt,Le){constructor({text:t,cause:e}){super({name:Xe,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${qe(e)}`,cause:e}),this[De]=!0,this.text=t}static isInstance(t){return D.hasMarker(t,Qe)}},Ke="AI_TypeValidationError",et=`vercel.ai.error.${Ke}`,Jt=Symbol.for(et),je,Ze,Y=class ve extends(Ze=D,je=Jt,Ze){constructor({value:e,cause:a,context:r}){let n="Type validation failed";if(r?.field&&(n+=` for ${r.field}`),r?.entityName||r?.entityId){n+=" (";const o=[];r.entityName&&o.push(r.entityName),r.entityId&&o.push(`id: "${r.entityId}"`),n+=o.join(", "),n+=")"}super({name:Ke,message:`${n}: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${qe(a)}`,cause:a}),this[je]=!0,this.value=e,this.context=r}static isInstance(e){return D.hasMarker(e,et)}static wrap({value:e,cause:a,context:r}){var n,o,i;return ve.isInstance(a)&&a.value===e&&((n=a.context)==null?void 0:n.field)===r?.field&&((o=a.context)==null?void 0:o.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},re=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const n=()=>{const o=a.length,i=new Array(e);for(let s=0;s<e;s++)i[s]=a[Math.random()*o|0];return i.join("")};if(t==null)return n;if(a.includes(r))throw new Vt({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${n()}`};re();var Wt=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Yt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function $e(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Wt.test(t)===!1&&Yt.test(t)===!1?e:qt(e)}function qt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const n in r){const o=r[n];o&&typeof o=="object"&&e.push(o)}}}return t}function Gt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return $e(t)}try{return $e(t)}finally{Error.stackTraceLimit=e}}function Ie(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=$(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map($):$(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map($)),t.allOf!=null&&(t.allOf=t.allOf.map($)),t.oneOf!=null&&(t.oneOf=t.oneOf.map($));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=$(e[a]);return t}function $(t){return typeof t=="boolean"?t:Ie(t)}var Ht=Symbol("Let zodToJsonSchema decide on which parser to use"),Ue={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Xt=t=>typeof t=="string"?{...Ue,name:t}:{...Ue,...t};function C(){return{}}function Qt(t,e){var a,r,n;const o={type:"array"};return(a=t.type)!=null&&a._def&&((n=(r=t.type)==null?void 0:r._def)==null?void 0:n.typeName)!==h.ZodAny&&(o.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(o.minItems=t.minLength.value),t.maxLength&&(o.maxItems=t.maxLength.value),t.exactLength&&(o.minItems=t.exactLength.value,o.maxItems=t.exactLength.value),o}function Kt(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function ea(){return{type:"boolean"}}function tt(t,e){return b(t.type._def,e)}var ta=(t,e)=>b(t.innerType._def,e);function at(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((n,o)=>at(t,e,n))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return aa(t)}}var aa=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function ra(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function na(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):C()}function sa(t){return{type:"string",enum:Array.from(t.values)}}var oa=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function ia(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(n=>!!n),r=[];return a.forEach(n=>{if(oa(n))r.push(...n.allOf);else{let o=n;if("additionalProperties"in n&&n.additionalProperties===!1){const{additionalProperties:i,...s}=n;o=s}r.push(o)}}),r.length?{allOf:r}:void 0}function la(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var fe=void 0,R={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(fe===void 0&&(fe=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),fe),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function rt(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":N(a,"email",r.message,e);break;case"format:idn-email":N(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,R.email,r.message,e);break}break;case"url":N(a,"uri",r.message,e);break;case"uuid":N(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,R.cuid,r.message,e);break;case"cuid2":A(a,R.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${me(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${me(r.value,e)}$`),r.message,e);break;case"datetime":N(a,"date-time",r.message,e);break;case"date":N(a,"date",r.message,e);break;case"time":N(a,"time",r.message,e);break;case"duration":N(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(me(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&N(a,"ipv4",r.message,e),r.version!=="v4"&&N(a,"ipv6",r.message,e);break}case"base64url":A(a,R.base64url,r.message,e);break;case"jwt":A(a,R.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,R.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,R.ipv6Cidr,r.message,e);break}case"emoji":A(a,R.emoji(),r.message,e);break;case"ulid":{A(a,R.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{N(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,R.base64,r.message,e);break}}break}case"nanoid":A(a,R.nanoid,r.message,e)}return a}function me(t,e){return e.patternStrategy==="escape"?da(t):t}var ua=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function da(t){let e="";for(let a=0;a<t.length;a++)ua.has(t[a])||(e+="\\"),e+=t[a];return e}function N(t,e,a,r){var n;t.format||(n=t.anyOf)!=null&&n.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var n;t.pattern||(n=t.allOf)!=null&&n.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Fe(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Fe(e,r)}function Fe(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},n=r.i?t.source.toLowerCase():t.source;let o="",i=!1,s=!1,p=!1;for(let u=0;u<n.length;u++){if(i){o+=n[u],i=!1;continue}if(r.i){if(s){if(n[u].match(/[a-z]/)){p?(o+=n[u],o+=`${n[u-2]}-${n[u]}`.toUpperCase(),p=!1):n[u+1]==="-"&&((a=n[u+2])!=null&&a.match(/[a-z]/))?(o+=n[u],p=!0):o+=`${n[u]}${n[u].toUpperCase()}`;continue}}else if(n[u].match(/[a-z]/)){o+=`[${n[u]}${n[u].toUpperCase()}]`;continue}}if(r.m){if(n[u]==="^"){o+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(n[u]==="$"){o+=`($|(?=[\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c,c as i,j as r}from"./index-
|
|
1
|
+
import{e as c,c as i,j as r}from"./index-DEUVODq9.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{x as T,p as a,b,d as c,f as d,m as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f,j as d,bb as k,a4 as p,a5 as h,bc as y,ad as M,bd as P,be as S,bf as F,bg as V,bh as D,e as g,c as x}from"./index-
|
|
1
|
+
import{r as f,j as d,bb as k,a4 as p,a5 as h,bc as y,ad as M,bd as P,be as S,bf as F,bg as V,bh as D,e as g,c as x}from"./index-DEUVODq9.js";var m="Tabs",[G]=M(m,[y]),w=y(),[L,T]=G(m),C=f.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...v}=n,u=P(i),[c,b]=S({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:F(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...v,ref:e})})});C.displayName=m;var N="TabsList",j=f.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=T(N,a),o=w(a);return d.jsx(V,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});j.displayName=N;var I="TabsTrigger",_=f.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=T(I,a),i=w(a),l=E(o.baseId,t),v=$(o.baseId,t),u=t===o.value;return d.jsx(k,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":v,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:h(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:h(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:h(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var R="TabsContent",A=f.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=T(R,a),l=E(i.baseId,t),v=$(i.baseId,t),u=t===i.value,c=f.useRef(u);return f.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(D,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:v,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var z=C,K=j,B=_,q=A;function O(n){const e=g.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=x("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function J(n){const e=g.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=x(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Q(n){const e=g.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=x(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(B,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function U(n){const e=g.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=x("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(q,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{Q as T,J as a,U as b,O as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as o}from"./AlertCircle-
|
|
1
|
+
import{i as o}from"./AlertCircle-DU4Czymb.js";import{i as t}from"./CheckCircle-B7_GaGqy.js";import{a as r}from"./DotsVertical-7ebFkKLD.js";import{ac as a}from"./agent-icon-CV7VKepg.js";import{l}from"./index-DEUVODq9.js";import{i as n}from"./XCircle-8_cOsjUY.js";const i={requires_action:{label:"Needs review",verb:"Waiting for your review",icon:o,iconClassName:"text-orange-500",labelColor:"text-orange-600 dark:text-orange-400"},failed:{label:"Failed",verb:"Something went wrong",icon:n,iconClassName:"text-red-500",labelColor:"text-red-600 dark:text-red-400"},expired:{label:"Timed out",verb:"Stopped responding",icon:a,iconClassName:"text-amber-500",labelColor:"text-amber-600 dark:text-amber-400"},in_progress:{label:"Running",verb:"Agent is working",icon:l,iconClassName:"text-blue-500",labelColor:"text-blue-600 dark:text-blue-400"},completed:{label:"Done",verb:"Completed",icon:t,iconClassName:"text-muted-foreground/50",labelColor:"text-muted-foreground"}},m={label:"Unknown",verb:"Unknown status",icon:r,iconClassName:"text-muted-foreground",labelColor:"text-muted-foreground"};function x(e){return i[e??"completed"]??m}export{i as S,x as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as o,c as l,j as n}from"./index-
|
|
1
|
+
import{e as o,c as l,j as n}from"./index-DEUVODq9.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,be as b,j as c,a4 as m,a5 as k,b2 as p,bb as M,bc as T,bd as S,bg as A,ad as F,bq as $,e as P,c as C}from"./index-
|
|
1
|
+
import{r as x,be as b,j as c,a4 as m,a5 as k,b2 as p,bb as M,bc as T,bd as S,bg as A,ad as F,bq as $,e as P,c as C}from"./index-DEUVODq9.js";var j="Toggle",_=x.forwardRef((a,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...r}=a,[t,o]=b({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...r,ref:e,onClick:k(a.onClick,()=>{a.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),h=p.forwardRef((a,e)=>{const{type:l,...s}=a;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});h.displayName=v;var[z,y]=w(v),D=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:a.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...r,ref:e})})}),B=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(V=>V!==u)),[o]);return c.jsx(z,{scope:a.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...r,ref:e})})});h.displayName=v;var[O,q]=w(v),R=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:r,dir:t,loop:o=!0,...i}=a,d=I(l),u=S(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:r,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((a,e)=>{const l=y(f,a.__scopeToggleGroup),s=q(f,a.__scopeToggleGroup),n=I(a.__scopeToggleGroup),r=l.value.includes(a.value),t=s.disabled||a.disabled,o={...a,pressed:r,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:r,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});N.displayName=f;var G=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,value:s,...n}=a,r=y(f,l),t={role:"radio","aria-checked":a.pressed,"aria-pressed":void 0},o=r.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?r.onItemActivate(s):r.onItemDeactivate(s)}})}),H=h,L=N;const U=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),E=x.createContext({size:"default",variant:"default"});function K(a){const e=P.c(20);let l,s,n,r,t;e[0]!==a?({className:s,variant:t,size:r,children:l,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==r||e[9]!==t?(i={variant:t,size:r},e[8]=r,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(E.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==r||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(H,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:o,...n,children:d}),e[14]=n,e[15]=r,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function Q(a){const e=P.c(18);let l,s,n,r,t;e[0]!==a?({className:s,children:l,variant:t,size:r,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);const o=x.useContext(E),i=o.variant||t,d=o.size||r;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==r||e[10]!==t?(u=C(U({variant:o.variant||t,size:o.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=r,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(L,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{K as T,Q as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c,c as E,j as l,r as d,g as S,aR as T,I as $,T as y,W as N}from"./index-
|
|
1
|
+
import{e as c,c as E,j as l,r as d,g as S,aR as T,I as $,T as y,W as N}from"./index-DEUVODq9.js";import{n as w}from"./ChevronLeft-BLmY09V7.js";import{i as C}from"./ChevronRight-DtVYtVbK.js";function j(t){const e=c.c(14);let o,s,n,r,a;e[0]!==t?({active:o,className:s,ref:r,type:a,...n}=t,e[0]=t,e[1]=o,e[2]=s,e[3]=n,e[4]=r,e[5]=a):(o=e[1],s=e[2],n=e[3],r=e[4],a=e[5]);const f=a===void 0?"button":a,h=o?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let u;e[6]!==s||e[7]!==h?(u=E("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md transition-colors","max-md:[&_svg]:size-5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",h,s),e[6]=s,e[7]=h,e[8]=u):u=e[8];let g;return e[9]!==n||e[10]!==r||e[11]!==u||e[12]!==f?(g=l.jsx("button",{ref:r,type:f,className:u,...n}),e[9]=n,e[10]=r,e[11]=u,e[12]=f,e[13]=g):g=e[13],g}const p=d.createContext(null);function m(){const t=d.use(p);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function k(t){const e=c.c(8),{children:o}=t,[s,n]=d.useState(null),[r,a]=d.useState(null),[f,h]=d.useState(null),[u,g]=d.useState(null);let b;e[0]!==f||e[1]!==u||e[2]!==r||e[3]!==s?(b={togglesEl:s,setTogglesEl:n,tabsEl:r,setTabsEl:a,centerEl:f,setCenterEl:h,rightEl:u,setRightEl:g},e[0]=f,e[1]=u,e[2]=r,e[3]=s,e[4]=b):b=e[4];let x;return e[5]!==o||e[6]!==b?(x=l.jsx(p,{value:b,children:o}),e[5]=o,e[6]=b,e[7]=x):x=e[7],x}function i(t){const e=c.c(2),{children:o}=t;let s;return e[0]!==o?(s=l.jsx(k,{children:l.jsx("div",{className:"flex flex-col h-full min-h-0",children:o})}),e[0]=o,e[1]=s):s=e[1],s}function L(t){const e=c.c(2),{children:o}=t;let s;return e[0]!==o?(s=l.jsx("div",{className:"app-titlebar wco-drag shrink-0 grid grid-cols-3 items-center pl-1 pr-2 pt-0.25 h-12 bg-sidebar",children:o}),e[0]=o,e[1]=s):s=e[1],s}function _(t){const e=c.c(2),{children:o}=t;let s;return e[0]!==o?(s=l.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:o}),e[0]=o,e[1]=s):s=e[1],s}function R(t){const e=c.c(2),{children:o}=t;let s;return e[0]!==o?(s=l.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:o}),e[0]=o,e[1]=s):s=e[1],s}function z(){const t=c.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx(j,{onClick:G,"aria-label":"Go back",title:"Go back",children:l.jsx(w,{size:16})}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=l.jsxs(l.Fragment,{children:[e,l.jsx(j,{onClick:P,"aria-label":"Go forward",title:"Go forward",children:l.jsx(C,{size:16})})]}),t[1]=o):o=t[1],o}function P(){return window.history.forward()}function G(){return window.history.back()}function I(){const t=c.c(7),o=y().logo??N,s=typeof o=="string"?o:o.light,n=typeof o=="string"?o:o.dark;let r;t[0]!==s?(r=l.jsx("img",{src:s,alt:"Logo",className:"size-6 object-contain dark:hidden"}),t[0]=s,t[1]=r):r=t[1];let a;t[2]!==n?(a=l.jsx("img",{src:n,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),t[2]=n,t[3]=a):a=t[3];let f;return t[4]!==r||t[5]!==a?(f=l.jsxs("span",{className:"wco-hide flex items-center shrink-0 px-2",children:[r,a]}),t[4]=r,t[5]=a,t[6]=f):f=t[6],f}function v(){const t=c.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx(d.Suspense,{fallback:l.jsx("span",{className:"wco-hide shrink-0 size-6 mx-2"}),children:l.jsx(I,{})}),t[0]=e):e=t[0],e}function B(){const t=c.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:o}=S(e);let s;t[1]!==o?(s={org:o},t[1]=o,t[2]=s):s=t[2];let n;t[3]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(v,{}),t[3]=n):n=t[3];let r;return t[4]!==s?(r=l.jsx($,{to:"/$org",params:s,"aria-label":"Back to home",title:"Back to home",className:"wco-no-drag flex items-center shrink-0 cursor-pointer pl-1",children:n}),t[4]=s,t[5]=r):r=t[5],r}function D(){const t=c.c(2),{setCenterEl:e}=m();let o;return t[0]!==e?(o=l.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=o):o=t[1],o}function F(t){const e=c.c(3),{children:o}=t,{centerEl:s}=m();if(!s)return null;let n;return e[0]!==s||e[1]!==o?(n=T.createPortal(o,s),e[0]=s,e[1]=o,e[2]=n):n=e[2],n}function H(){const t=c.c(2),{setTabsEl:e}=m();let o;return t[0]!==e?(o=l.jsx("div",{ref:e,className:"shrink-0 flex items-center"}),t[0]=e,t[1]=o):o=t[1],o}function O(t){const e=c.c(3),{children:o}=t,{tabsEl:s}=m();if(!s)return null;let n;return e[0]!==o||e[1]!==s?(n=T.createPortal(o,s),e[0]=o,e[1]=s,e[2]=n):n=e[2],n}function A(){const t=c.c(2),{setTogglesEl:e}=m();let o;return t[0]!==e?(o=l.jsx("div",{ref:e,className:"contents"}),t[0]=e,t[1]=o):o=t[1],o}function U(t){const e=c.c(3),{children:o}=t,{togglesEl:s}=m();if(!s)return null;let n;return e[0]!==o||e[1]!==s?(n=T.createPortal(o,s),e[0]=o,e[1]=s,e[2]=n):n=e[2],n}function W(){const t=c.c(2),{setRightEl:e}=m();let o;return t[0]!==e?(o=l.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=o):o=t[1],o}function q(t){const e=c.c(3),{children:o}=t,{rightEl:s}=m();if(!s)return null;let n;return e[0]!==o||e[1]!==s?(n=T.createPortal(o,s),e[0]=o,e[1]=s,e[2]=n):n=e[2],n}i.Provider=k;i.Header=L;i.LeftColumn=_;i.RightColumn=R;i.Nav=z;i.Logo=v;i.LogoLink=B;i.CenterSlot=D;i.Center=F;i.TabsSlot=H;i.Tabs=O;i.TogglesSlot=A;i.Toggles=U;i.RightSlot=W;i.Right=q;export{j as T,i as a};
|