decocms 3.67.1 → 3.67.3
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-Bcs4ZJts.js → AlertCircle-Bpe2_GvV.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-C1CmKA-W.js → ArrowUpRight-YrfJ1CbZ.js} +1 -1
- package/dist/client/assets/{CheckCircle-NBs9mJJ4.js → CheckCircle-CYtqo8mv.js} +1 -1
- package/dist/client/assets/{ChevronDown-CB4peYs0.js → ChevronDown-Cs8E6-3E.js} +1 -1
- package/dist/client/assets/{ChevronLeft-C-SwjtZc.js → ChevronLeft-B-gfvsw1.js} +1 -1
- package/dist/client/assets/{ChevronRight-B7p7bln0.js → ChevronRight-zYXs_-Se.js} +1 -1
- package/dist/client/assets/{ChevronUp-BbfE3yB8.js → ChevronUp-ZNXmTuIH.js} +1 -1
- package/dist/client/assets/{DotsVertical-s7eYfnG9.js → DotsVertical-BX13G9P1.js} +1 -1
- package/dist/client/assets/{Eye-B59sjizN.js → Eye-C5YGQqBB.js} +1 -1
- package/dist/client/assets/{FilterLines-DFnounSd.js → FilterLines-Ct0vyoCk.js} +1 -1
- package/dist/client/assets/{Globe01-_VA2prGq.js → Globe01-DqoZJREO.js} +1 -1
- package/dist/client/assets/{Globe04-Ykxz2KTI.js → Globe04-aor3r_Wp.js} +1 -1
- package/dist/client/assets/{HardDrive-DGWkSOSl.js → HardDrive-C39-XuLX.js} +1 -1
- package/dist/client/assets/{Key01-YfZd4iHD.js → Key01-C9VOqBor.js} +1 -1
- package/dist/client/assets/{LayoutLeft-ChL75YN3.js → LayoutLeft-Bc24ivgh.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CqlezO8X.js → LinkExternal01-bw0rYexk.js} +1 -1
- package/dist/client/assets/{Monitor01-DNERT9UR.js → Monitor01-BBKDcKw2.js} +1 -1
- package/dist/client/assets/{Palette-DOCcLVTT.js → Palette-Dee1B_K4.js} +1 -1
- package/dist/client/assets/{Play-C2-VkI_V.js → Play-BYATnDqe.js} +1 -1
- package/dist/client/assets/{Plus-e6KMT-fd.js → Plus-DP7MBDcr.js} +1 -1
- package/dist/client/assets/{SearchMd-6Rm3juzC.js → SearchMd-BNtCiaDl.js} +1 -1
- package/dist/client/assets/{Settings02-4_kTYwNB.js → Settings02-BhiFsU64.js} +1 -1
- package/dist/client/assets/{Shield01-7NgAsL6r.js → Shield01-zcrbIoQW.js} +1 -1
- package/dist/client/assets/{Star01-D84hxUua.js → Star01-Bi13YWhS.js} +1 -1
- package/dist/client/assets/{Stars01-Q0MRbwZg.js → Stars01-Cm43N5JK.js} +1 -1
- package/dist/client/assets/{Stars02-CDvW39v3.js → Stars02-ilw9rARd.js} +1 -1
- package/dist/client/assets/{Sun-C8O8iJFf.js → Sun-BI8gfoic.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BP8RDJZD.js → SwitchHorizontal01-BkhFVCHL.js} +1 -1
- package/dist/client/assets/{Tool01-Cj-WHckJ.js → Tool01-Ri8IcVVN.js} +1 -1
- package/dist/client/assets/{Trash01-DEEHtHJB.js → Trash01-DgUXWGZr.js} +1 -1
- package/dist/client/assets/{Upload01-7x6vb5eo.js → Upload01-CRl35fVk.js} +1 -1
- package/dist/client/assets/{User01-BHZCzfzC.js → User01-B13x_3hK.js} +1 -1
- package/dist/client/assets/{Users01-VNVKPm4Z.js → Users01-TRM2A3CY.js} +1 -1
- package/dist/client/assets/{Users03-Cpp3P22x.js → Users03-c3H4VKdl.js} +1 -1
- package/dist/client/assets/{X-DFkR0lIx.js → X-DUzDqibI.js} +1 -1
- package/dist/client/assets/{XCircle-B9CIgcB_.js → XCircle-CiWHFuXX.js} +1 -1
- package/dist/client/assets/{XClose-f03MZVzw.js → XClose-Bod7oMvA.js} +1 -1
- package/dist/client/assets/{Zap-CE6AArAl.js → Zap-DEQh6kKf.js} +1 -1
- package/dist/client/assets/{ZapSquare-DVylwLGY.js → ZapSquare-BA2pOs85.js} +1 -1
- package/dist/client/assets/{ZoomOut-Fcq2_xS1.js → ZoomOut-D6k5Mdn4.js} +1 -1
- package/dist/client/assets/{access-gate-C7ykcpbh.js → access-gate-DHQsgThb.js} +1 -1
- package/dist/client/assets/{add-section-modal-CfQMrmps.js → add-section-modal-D5rQ4e_n.js} +1 -1
- package/dist/client/assets/{agent-icon-D47XsAXV.js → agent-icon-BvSYE4X0.js} +1 -1
- package/dist/client/assets/{agents-list-CzWjmi5O.js → agents-list-BADo6gze.js} +1 -1
- package/dist/client/assets/{ai-providers-BqFG4UXh.js → ai-providers-D-btg_ej.js} +1 -1
- package/dist/client/assets/{alert-BqIPo5hn.js → alert-Ck8w_HMj.js} +1 -1
- package/dist/client/assets/{alert-dialog-D-Sjt4zw.js → alert-dialog-Iz7Pne8q.js} +1 -1
- package/dist/client/assets/app-editor-DtqVQrAv.js +1 -0
- package/dist/client/assets/{auth-BGLZ_tJI.js → auth-JrxMRfm7.js} +1 -1
- package/dist/client/assets/{auth-catchall-BIopLPv9.js → auth-catchall-2ybrzco_.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DUiZ1N0F.js → auth-split-layout-C4SnTzaq.js} +1 -1
- package/dist/client/assets/{automation-list-row-urG00D8w.js → automation-list-row-Cjs43Sd-.js} +1 -1
- package/dist/client/assets/{automation-runs-BfD_wu-L.js → automation-runs-CggowR0J.js} +1 -1
- package/dist/client/assets/{automations-mWkkUXHs.js → automations-USamT7J9.js} +1 -1
- package/dist/client/assets/{avatar-C4E9MI8n.js → avatar-yh81kVts.js} +1 -1
- package/dist/client/assets/{badge-CjCSdZj8.js → badge-F_XnDxyE.js} +1 -1
- package/dist/client/assets/{block-document-BmIwhlU9.js → block-document-y2Lktyst.js} +1 -1
- package/dist/client/assets/{brand-context-DsT-Z-fv.js → brand-context-DqzmhXuN.js} +1 -1
- package/dist/client/assets/{buckets-Cx8a45Xk.js → buckets-De0LJJ-I.js} +1 -1
- package/dist/client/assets/{calendar--1VVpZhc.js → calendar-DV7Tk4AZ.js} +1 -1
- package/dist/client/assets/{capability-load-error-B9vsTyfE.js → capability-load-error-D8DXeudL.js} +1 -1
- package/dist/client/assets/{card-oQX63y-E.js → card-bh08sj3I.js} +1 -1
- package/dist/client/assets/category-editor-Cmo_7k3K.js +1 -0
- package/dist/client/assets/{chat-context-n3t2OfCi.js → chat-context-CsxEe8Dk.js} +7 -7
- package/dist/client/assets/{checkbox-DdVVihqX.js → checkbox-xjeH3Wpr.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BJu8bAAT.js → cli-auth-success-DPUOH3tk.js} +1 -1
- package/dist/client/assets/{collection-detail-Cv-e9gPY.js → collection-detail-B-VkwAVH.js} +1 -1
- package/dist/client/assets/{collection-display-button--8NNGhnw.js → collection-display-button-WtV7BkCy.js} +1 -1
- package/dist/client/assets/{collection-search-DO7wE0mP.js → collection-search-t7pP-iq8.js} +1 -1
- package/dist/client/assets/{collection-tabs-DhDxx6sq.js → collection-tabs-DhaKOcMD.js} +1 -1
- package/dist/client/assets/{command-BFFlrsrU.js → command-tbfb-2AV.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-CggXwZnH.js → connect-desktop-dialog-OG8wSu5b.js} +1 -1
- package/dist/client/assets/{connection-card-D_b8fIIQ.js → connection-card-tc4mvPkM.js} +1 -1
- package/dist/client/assets/{connection-detail-DXzmmEmJ.js → connection-detail-C8sRVuZE.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-RthdfFu6.js → connection-form-helpers-C7CackfK.js} +1 -1
- package/dist/client/assets/{connections-BOLavYF6.js → connections-CL79BWSD.js} +1 -1
- package/dist/client/assets/{context-menu-D_aEuHi4.js → context-menu-CGXH567I.js} +1 -1
- package/dist/client/assets/{decopilot-NAbM21a_.js → decopilot-C_VwkpOk.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-C1hZxd4M.js → decopilot-sse-pool-CK5VnB1V.js} +1 -1
- package/dist/client/assets/{dialog-C_yQGChm.js → dialog-B5Fc7PcC.js} +1 -1
- package/dist/client/assets/{domain-settings-B8F0VB-5.js → domain-settings-B9C8VQl7.js} +1 -1
- package/dist/client/assets/{drawer-DJd04tRF.js → drawer-f0G1u50l.js} +1 -1
- package/dist/client/assets/{dropdown-menu-vXzkIomG.js → dropdown-menu-Bo5hgXOF.js} +1 -1
- package/dist/client/assets/{empty-state-CPh1IsmH.js → empty-state-Dd2C1L1E.js} +1 -1
- package/dist/client/assets/{extract-connection-data-9p25rgPJ.js → extract-connection-data-_MOrxDBF.js} +1 -1
- package/dist/client/assets/{file-explorer-9G5ZNq0Y.js → file-explorer-DzxDZgb_.js} +1 -1
- package/dist/client/assets/{file-type-icon-HX98bJsu.js → file-type-icon-2rgm4864.js} +1 -1
- package/dist/client/assets/{files-CmdigimG.js → files-BamfXXFn.js} +1 -1
- package/dist/client/assets/{form-DlZUNg9J.js → form-DEWRKuCN.js} +1 -1
- package/dist/client/assets/{general-Ds3oysl_.js → general-DUftEYdq.js} +1 -1
- package/dist/client/assets/{github-repo-picker-oP81xbjw.js → github-repo-picker-DaaFmqbw.js} +1 -1
- package/dist/client/assets/{hooks-CHNEDsWu.js → hooks-BEP8IXge.js} +1 -1
- package/dist/client/assets/{image-field-Bu8fhX1k.js → image-field-D0-sBCXR.js} +1 -1
- package/dist/client/assets/{import-from-deco-dialog-CiePOoxU.js → import-from-deco-dialog-DPg95H7-.js} +1 -1
- package/dist/client/assets/{index-Dvpa1BKQ.js → index-BWm_HFUi.js} +1 -1
- package/dist/client/assets/{index-BQhT4yFe.js → index-C4kX7-WK.js} +17 -17
- package/dist/client/assets/{index-48rNhsjU.js → index-CkYx9UrU.js} +1 -1
- package/dist/client/assets/{index-BWoGwRc1.js → index-Cp09uk5T.js} +1 -1
- package/dist/client/assets/{index-CHNWdgKU.js → index-CrdcZU1p.js} +1 -1
- package/dist/client/assets/{index-DqiOfDAS.js → index-D7sCHzTD.js} +1 -1
- package/dist/client/assets/{index-BsiRtfX3.js → index-DK5BMExb.js} +1 -1
- package/dist/client/assets/{index-qyoObaEj.js → index-DT_lqibQ.js} +1 -1
- package/dist/client/assets/{index-C8wOUMqP.js → index-DdencN2D.js} +1 -1
- package/dist/client/assets/{index-8IfxKlHb.js → index-DgiSaeSc.js} +26 -26
- package/dist/client/assets/{index-njupOWlD.js → index-DtdRCqfT.js} +3 -3
- package/dist/client/assets/{index-CBRPygtA.js → index-DxFKESA7.js} +1 -1
- package/dist/client/assets/{index-kmvgK3w7.js → index-qCsR4teM.js} +1 -1
- package/dist/client/assets/{index-redirect-D-Auqrlw.js → index-redirect-DlGjs7wZ.js} +1 -1
- package/dist/client/assets/{index-CEyiDPjU.js → index-u1p_bf-7.js} +1 -1
- package/dist/client/assets/{input-Dt3JGrCV.js → input-C6eDTm2J.js} +1 -1
- package/dist/client/assets/{integration-icon-BJJxQwPt.js → integration-icon-DZ_y4SYI.js} +1 -1
- package/dist/client/assets/{label-Cj2zPhvd.js → label-CApOnzUS.js} +1 -1
- package/dist/client/assets/{login-CTJWBfc2.js → login-B1SVfmeu.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C-Wg4QUn.js → mcp-oauth-topkfZ98.js} +1 -1
- package/dist/client/assets/{members-DN16Fles.js → members-CjQxJ_RX.js} +1 -1
- package/dist/client/assets/{monaco-editor-DGKQUILW.js → monaco-editor-C74LbgZn.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-nIUJFVyD.js → monitoring-stats-row-QiX1Poqq.js} +1 -1
- package/dist/client/assets/{oauth-callback-ROAW_HMF.js → oauth-callback-CMtN5crm.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-dyLxpBXB.js → oauth-callback-ai-provider-B5jMOJVh.js} +1 -1
- package/dist/client/assets/{onboarding-BEbE4yAB.js → onboarding-CZ-kOd50.js} +1 -1
- package/dist/client/assets/{org-install-DrnfsVod.js → org-install-CYVEJ06f.js} +1 -1
- package/dist/client/assets/{org-layout-DAqvrpGc.js → org-layout-CuGLO-yG.js} +1 -1
- package/dist/client/assets/{page-seo-form-7wajuIDI.js → page-seo-form-hHpEj2sm.js} +1 -1
- package/dist/client/assets/page-seo-sheet-C2xGdGSj.js +1 -0
- package/dist/client/assets/{popover-CuLT9Al4.js → popover-BZPKY_pJ.js} +1 -1
- package/dist/client/assets/{post-editor-B3M1tu4L.js → post-editor-bFo5aSK6.js} +1 -1
- package/dist/client/assets/{preview-dialog-QpVAtBx1.js → preview-dialog-B2V7Iomt.js} +1 -1
- package/dist/client/assets/{primitives-D032gMPZ.js → primitives-DN8h3bGA.js} +1 -1
- package/dist/client/assets/{profile-SitxGUhH.js → profile-C3YkJZkf.js} +1 -1
- package/dist/client/assets/{project-app-view-Bvse1kjJ.js → project-app-view-BpK-h-Rb.js} +1 -1
- package/dist/client/assets/record-editor-DqBdXh9_.js +1 -0
- package/dist/client/assets/registry-BZgs9SVc.js +2 -0
- package/dist/client/assets/{registry-layout-BqlwHN-C.js → registry-layout-nx59aaeW.js} +1 -1
- package/dist/client/assets/{require-capability-CIOvOgjm.js → require-capability-B4oR0b-_.js} +1 -1
- package/dist/client/assets/{required-auth-layout-oYImnr2T.js → required-auth-layout-BIvWfoYl.js} +1 -1
- package/dist/client/assets/{reset-password-0kE9hSSy.js → reset-password-DuG163Lb.js} +1 -1
- package/dist/client/assets/{roles-CRx5UkRc.js → roles-XTwVX6TJ.js} +1 -1
- package/dist/client/assets/save-referenced-block-rvEy7Ire.js +1 -0
- package/dist/client/assets/{save-status-C7AcekuY.js → save-status-DWSE0Ahw.js} +1 -1
- package/dist/client/assets/{schema-form-BpUJO2K7.js → schema-form-V0y_iwdn.js} +1 -1
- package/dist/client/assets/{scroll-area-B3gq7k1a.js → scroll-area-Bdcg37bX.js} +1 -1
- package/dist/client/assets/{search-input-DXcysX1i.js → search-input-DWwtSn3X.js} +1 -1
- package/dist/client/assets/{secrets-BKuLk-XF.js → secrets-DIUX8x6L.js} +1 -1
- package/dist/client/assets/{sections-editor-BKlf8SU1.js → sections-editor-tuEhCOpO.js} +2 -2
- package/dist/client/assets/{select-vN6ZEdZD.js → select-DViAZ6BX.js} +1 -1
- package/dist/client/assets/{select-model-C4IdsJ5G.js → select-model-Bd9U_6pO.js} +1 -1
- package/dist/client/assets/{seo-editor-BK_jtjut.js → seo-editor-RooODx8v.js} +1 -1
- package/dist/client/assets/{settings-layout-By0um08_.js → settings-layout-CiyDJqF4.js} +1 -1
- package/dist/client/assets/{settings-section-CctgYcvP.js → settings-section-BjMM3sOA.js} +1 -1
- package/dist/client/assets/{sheet-CG9uS_tU.js → sheet-CLn7Ee-B.js} +1 -1
- package/dist/client/assets/{shell-controls-DEm-JDFT.js → shell-controls-DIyWXZMt.js} +1 -1
- package/dist/client/assets/{shell-layout-B00hJJPK.js → shell-layout-Cpd3fKJB.js} +1 -1
- package/dist/client/assets/{shell-route-loading-DwvTQhKP.js → shell-route-loading-Qu4W7RwV.js} +1 -1
- package/dist/client/assets/{sidebar-BSg48YKH.js → sidebar-BvAh8pRK.js} +1 -1
- package/dist/client/assets/{skeleton-D6GeYWkr.js → skeleton-CQ4hZKKg.js} +1 -1
- package/dist/client/assets/{sortable.esm-DdwuT7gv.js → sortable.esm-CRDKOVWU.js} +1 -1
- package/dist/client/assets/{sso-BJnc18Eu.js → sso-Be-I4LqT.js} +1 -1
- package/dist/client/assets/{store-BrnVJKmG.js → store-CgjTP1S6.js} +1 -1
- package/dist/client/assets/store-registry-ToY5BNiI.js +2 -0
- package/dist/client/assets/{studio-tools-CfwwtESL.js → studio-tools-C3pW43RI.js} +1 -1
- package/dist/client/assets/{switch-CCK9R0g6.js → switch-BwuEbygk.js} +1 -1
- package/dist/client/assets/{table-TWbc_FPa.js → table-KwGxLknv.js} +1 -1
- package/dist/client/assets/{tabs-VUQX_ges.js → tabs-CWXbqK3H.js} +1 -1
- package/dist/client/assets/{task-status-DpRNyf52.js → task-status-CdiSaFNW.js} +1 -1
- package/dist/client/assets/{textarea-pnJIDfEJ.js → textarea-CgeTFjY8.js} +1 -1
- package/dist/client/assets/{toggle-group-BM7h26Iv.js → toggle-group-DnKFPpga.js} +1 -1
- package/dist/client/assets/{toolbar-zzrIKRrK.js → toolbar-BUvdNtWO.js} +1 -1
- package/dist/client/assets/{tooltip-DrgeSAR1.js → tooltip-D9vE3hJi.js} +1 -1
- package/dist/client/assets/{types-0Phw1DOr.js → types-HcUrhwzw.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CyNupL0N.js → use-ai-providers-BwFwpBOt.js} +1 -1
- package/dist/client/assets/{use-automations-BSIQaqso.js → use-automations-BSPuoSfS.js} +1 -1
- package/dist/client/assets/{use-capability-D73staMV.js → use-capability-BPH95vck.js} +1 -1
- package/dist/client/assets/{use-clock-tick-C5n1bB91.js → use-clock-tick-BVJBWlDM.js} +1 -1
- package/dist/client/assets/{use-collections-_rPERky0.js → use-collections-CtQI9edu.js} +1 -1
- package/dist/client/assets/{use-connection-D1PTTcrk.js → use-connection-B-GnOxIe.js} +1 -1
- package/dist/client/assets/{use-copy-BA07fkLK.js → use-copy-DkTFPjAl.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CVii9bMt.js → use-create-virtual-mcp-BpdjItaW.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-COcPl9ji.js → use-debounced-autosave-DmyGwJEl.js} +1 -1
- package/dist/client/assets/{use-deco-credits-ClmizeS_.js → use-deco-credits-CM5FdDx1.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CttpRXlz.js → use-delete-connection-B7j002Rl.js} +1 -1
- package/dist/client/assets/{use-file-configs-DhDLfB8K.js → use-file-configs-BlRU7DjQ.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Crz1IMEy.js → use-infinite-scroll-tVsKkDwZ.js} +1 -1
- package/dist/client/assets/{use-join-requests-zKenj77u.js → use-join-requests-qOpXvple.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CcPf2rer.js → use-mcp-client-00dhsiuh.js} +2 -2
- package/dist/client/assets/{use-mcp-prompts-DjuH2YgA.js → use-mcp-prompts-CPpnRCz9.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Bbr4-LA7.js → use-mcp-tools-CelPls9H.js} +1 -1
- package/dist/client/assets/{use-members-ByA0cThl.js → use-members-D4qUur-D.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-C5IHcegl.js → use-navigate-to-agent-CjuQTsVF.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Dnjkkyan.js → use-org-auth-client-B6_dXOCB.js} +1 -1
- package/dist/client/assets/{use-org-sso-DTnlBDGI.js → use-org-sso-DzARfVqe.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BY___VHy.js → use-organization-roles-C1ZE7DRi.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BrsCJZxy.js → use-organization-settings-BwlURqPC.js} +1 -1
- package/dist/client/assets/{use-registry-connections-P9Cne2Tp.js → use-registry-connections-CnhucvHw.js} +1 -1
- package/dist/client/assets/{use-secrets-CYXNOruy.js → use-secrets-CZrigvCX.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Da0qRuRe.js → use-status-sounds-cSQbPNIy.js} +1 -1
- package/dist/client/assets/{use-view-mode-6W7le_f3.js → use-view-mode-BqCV5fdk.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-B6rbVge1.js → use-virtual-mcp-BDx6BF9u.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-3nAveyVa.js +1 -0
- package/dist/client/assets/{useRouterState-VNMXaR8R.js → useRouterState-DeeIf3re.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DYDXgR3L.js +1 -0
- package/dist/client/assets/{view-mode-toggle-Cy2cIBtF.js → view-mode-toggle-BA0E_UOT.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1334 -29715
- package/dist/server/server.js +332 -344
- package/package.json +1 -1
- package/dist/client/assets/app-editor-DCnwUXjl.js +0 -1
- package/dist/client/assets/category-editor-DDyZhQz8.js +0 -1
- package/dist/client/assets/page-seo-sheet-ldDUGWpW.js +0 -1
- package/dist/client/assets/record-editor-yX60NkAk.js +0 -1
- package/dist/client/assets/registry-C61GDjjF.js +0 -2
- package/dist/client/assets/save-referenced-block-1kLoZQqS.js +0 -1
- package/dist/client/assets/store-registry-CYYc_Dys.js +0 -2
- package/dist/client/assets/useInfiniteQuery-D0sGnnv8.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BYEeqfr3.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as le,r as K,f as yt,p as Be,j as t,B as Z,n as Se,c as de,K as it,m as wt,
|
|
1
|
+
import{e as le,r as K,f as yt,p as Be,j as t,B as Z,n as Se,c as de,K as it,m as wt,a6 as rs,d as ls,t as xt,a1 as os}from"./index-DtdRCqfT.js";import{S as as}from"./search-input-DWwtSn3X.js";import{P as De}from"./index-DK5BMExb.js";import{E as St}from"./empty-state-Dd2C1L1E.js";import{R as ns}from"./require-capability-B4oR0b-_.js";import{J as Tt,S as is}from"./scroll-area-Bdcg37bX.js";import{u as vt}from"./use-connection-B-GnOxIe.js";import{g as Pt}from"./connection-slug-eyAPH6o3.js";import{B as rt}from"./badge-F_XnDxyE.js";import{P as ct,a as dt,b as mt}from"./popover-BZPKY_pJ.js";import{b as Ze,T as et,a as tt}from"./tooltip-D9vE3hJi.js";import{i as ft,n as cs}from"./ChevronUp-ZNXmTuIH.js";import{a as Xe}from"./Eye-C5YGQqBB.js";import{n as Mt}from"./Globe01-DqoZJREO.js";import{i as At}from"./FilterLines-Ct0vyoCk.js";import{i as ds}from"./Key01-C9VOqBor.js";import{i as ms}from"./Play-BYATnDqe.js";import{ab as us,ac as xs,M as fs}from"./agent-icon-BvSYE4X0.js";import{M as _t}from"./monaco-editor-C74LbgZn.js";import{u as ps}from"./use-members-D4qUur-D.js";import{S as hs,u as gs,W as js}from"./use-mcp-client-00dhsiuh.js";import{u as vs}from"./use-virtual-mcp-BDx6BF9u.js";import{n as Qe}from"./XCircle-CiWHFuXX.js";import{c as Ns}from"./SwitchHorizontal01-BkhFVCHL.js";import{s as bs}from"./Plus-DP7MBDcr.js";import{s as ys}from"./Trash01-DgUXWGZr.js";import{I as Ge}from"./input-C6eDTm2J.js";import{g as ws,b as Dt,f as st,a as Vt,c as pt,d as Ss,e as Lt,h as Ut,A as Is,T as Cs,i as ks,M as ht}from"./automation-runs-CggowR0J.js";import{b as lt,c as ot,S as at,a as $e,d as nt}from"./select-DViAZ6BX.js";import{t as Kt}from"./ChevronDown-Cs8E6-3E.js";import{s as Ts}from"./Stars02-ilw9rARd.js";import{C as Ms}from"./calendar-DV7Tk4AZ.js";import{T as _s}from"./textarea-CgeTFjY8.js";import{C as qt}from"./collection-tabs-DhaKOcMD.js";import{S as Ds}from"./switch-BwuEbygk.js";import{L as Ls}from"./label-CApOnzUS.js";import{I as qe}from"./integration-icon-DZ_y4SYI.js";import{A as Bt}from"./avatar-yh81kVts.js";import{A as Fs,a as Rs,b as $s}from"./alert-Ck8w_HMj.js";import{C as Ht}from"./card-bh08sj3I.js";import{K as Me}from"./monitoring-stats-row-QiX1Poqq.js";import{u as Jt}from"./studio-tools-C3pW43RI.js";import{u as zs}from"./useSuspenseInfiniteQuery-DYDXgR3L.js";import{b as Os,S as Es,c as Ps,d as As}from"./sheet-CLn7Ee-B.js";import{T as Fe,a as ut,b as Gt,c as Qt,d as Wt,e as ae}from"./table-KwGxLknv.js";import{u as Vs}from"./use-infinite-scroll-tVsKkDwZ.js";import{c as Us,b as Ks}from"./use-automations-BSPuoSfS.js";import"./SearchMd-BNtCiaDl.js";import"./sidebar-BvAh8pRK.js";import"./LayoutLeft-Bc24ivgh.js";import"./use-capability-BPH95vck.js";import"./access-gate-DHQsgThb.js";import"./capability-load-error-D8DXeudL.js";import"./Stars01-Cm43N5JK.js";import"./ChevronRight-zYXs_-Se.js";import"./use-clock-tick-BVJBWlDM.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DkTFPjAl.js";import"./file-type-icon-2rgm4864.js";import"./dialog-B5Fc7PcC.js";import"./X-DUzDqibI.js";import"./ZoomOut-D6k5Mdn4.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-HcUrhwzw.js";import"./chat-context-CsxEe8Dk.js";import"./hooks-BEP8IXge.js";import"./decopilot-sse-pool-CK5VnB1V.js";import"./use-ai-providers-BwFwpBOt.js";import"./use-organization-settings-BwlURqPC.js";import"./AlertCircle-Bpe2_GvV.js";import"./Star01-Bi13YWhS.js";import"./XClose-Bod7oMvA.js";import"./ZapSquare-BA2pOs85.js";import"./Tool01-Ri8IcVVN.js";import"./Monitor01-BBKDcKw2.js";import"./Upload01-CRl35fVk.js";import"./shell-layout-Cpd3fKJB.js";import"./Users03-c3H4VKdl.js";import"./CheckCircle-CYtqo8mv.js";import"./Zap-DEQh6kKf.js";import"./required-auth-layout-BIvWfoYl.js";import"./useRouterState-DeeIf3re.js";import"./use-org-sso-DzARfVqe.js";import"./LinkExternal01-bw0rYexk.js";import"./ArrowUpRight-YrfJ1CbZ.js";import"./Palette-Dee1B_K4.js";import"./use-navigate-to-agent-CjuQTsVF.js";import"./use-mcp-prompts-CPpnRCz9.js";import"./form-DEWRKuCN.js";import"./use-collections-CtQI9edu.js";import"./Settings02-BhiFsU64.js";import"./ChevronLeft-B-gfvsw1.js";import"./DotsVertical-BX13G9P1.js";import"./Globe04-aor3r_Wp.js";import"./HardDrive-C39-XuLX.js";import"./Sun-BI8gfoic.js";import"./Shield01-zcrbIoQW.js";import"./User01-B13x_3hK.js";import"./Users01-TRM2A3CY.js";import"./index-qCsR4teM.js";import"./use-org-auth-client-B6_dXOCB.js";import"./auth-JrxMRfm7.js";import"./useInfiniteQuery-3nAveyVa.js";import"./task-status-CdiSaFNW.js";import"./checkbox-xjeH3Wpr.js";import"./command-tbfb-2AV.js";import"./index-DdencN2D.js";import"./index-BWm_HFUi.js";const Nt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Re(s){return s.filter(e=>e.key.trim()).map(e=>{const r=encodeURIComponent(e.key.trim()),l=encodeURIComponent(e.value||"");return`${r}:${e.operator}:${l}`}).join(",")}function qs(s){return s?s.split(",").map(e=>{const[r,l,...a]=e.split(":");return{key:decodeURIComponent(r||""),operator:l||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ye(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
|
|
2
2
|
`)}function Ft(s){return s.trim()?s.split(`
|
|
3
3
|
`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[r,...l]=e.split("=");return{key:r||"",operator:"eq",value:l.join("=")}}if(e.includes("~")){const[r,...l]=e.split("~");return{key:r||"",operator:"contains",value:l.join("~")}}if(e.includes("@")){const[r,...l]=e.split("@");return{key:r||"",operator:"in",value:l.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Bs(s){const e={},r={},l=[],a={};for(const o of s)if(o.key.trim())switch(o.operator){case"eq":o.value&&(e[o.key]=o.value);break;case"contains":o.value&&(r[o.key]=`%${o.value}%`);break;case"exists":l.push(o.key);break;case"in":o.value&&(a[o.key]=o.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(r).length>0?r:void 0,propertyKeys:l.length>0?l:void 0,propertyInValues:Object.keys(a).length>0?a:void 0}}function Rt(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};if(typeof s._decocms_truncated=="string")return{content:s._decocms_truncated,isTruncated:!0,originalSize:s._decocms_truncated.length};const e=JSON.stringify(s,null,2),r=e.length;return r<=Nt.maxJsonRenderSize?{content:e,isTruncated:!1,originalSize:r}:{content:e.slice(0,Nt.maxJsonRenderSize)+`
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as a,
|
|
1
|
+
import{r as a,af as R}from"./index-DtdRCqfT.js";function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function me(e){if(Array.isArray(e))return e}function be(e,t,r){return(t=Se(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,c,s=[],f=!0,p=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(f=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);f=!0);}catch(j){p=!0,o=j}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(p)throw o}}return s}}function we(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ne(Object(r),!0).forEach(function(n){be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oe(e,t){if(e==null)return{};var r,n,o=je(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function je(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Me(e,t){return me(e)||ye(e,t)||Ee(e,t)||we()}function Pe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Se(e){var t=Pe(e,"string");return typeof t=="symbol"?t:t+""}function Ee(e,t){if(e){if(typeof e=="string")return re(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?re(e,t):void 0}}function Re(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ie(Object(r),!0).forEach(function(n){Re(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ie(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function A(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function F(e){return{}.toString.call(e).includes("Object")}function Te(e){return!Object.keys(e).length}function D(e){return typeof e=="function"}function Ce(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Le(e,t){return F(t)||P("changeType"),Object.keys(t).some(function(r){return!Ce(e,r)})&&P("changeField"),t}function Ae(e){D(e)||P("selectorType")}function $e(e){D(e)||F(e)||P("handlerType"),F(e)&&Object.values(e).some(function(t){return!D(t)})&&P("handlersType")}function De(e){e||P("initialIsRequired"),F(e)||P("initialType"),Te(e)&&P("initialContent")}function Ve(e,t){throw new Error(e[t]||e.default)}var xe={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},P=A(Ve)(xe),q={changes:Le,selector:Ae,handler:$e,initial:De};function Ne(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};q.initial(e),q.handler(t);var r={current:e},n=A(Fe)(r,t),o=A(ze)(r),i=A(q.changes)(e),c=A(qe)(r);function s(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(j){return j};return q.selector(p),p(r.current)}function f(p){Ie(n,o,i,c)(p)}return[s,f]}function qe(e,t){return D(t)?t(e.current):t}function ze(e,t){return e.current=ae(ae({},e.current),t),t}function Fe(e,t,r){return D(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var Ue={create:Ne},He={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function We(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function Be(e){return{}.toString.call(e).includes("Object")}function Ke(e){return e||ue("configIsRequired"),Be(e)||ue("configType"),e.urls?(Ge(),{paths:{vs:e.urls.monacoBase}}):e}function Ge(){console.warn(ce.deprecation)}function Ye(e,t){throw new Error(e[t]||e.default)}var ce={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
3
3
|
You are using deprecated way of configuration.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c,g as p,j as s,l as u,N as a}from"./index-
|
|
1
|
+
import{e as c,g as p,j as s,l as u,N as a}from"./index-DtdRCqfT.js";import{a as x}from"./use-capability-BPH95vck.js";import{C as j}from"./capability-load-error-D8DXeudL.js";function v(){const t=c.c(21);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:f,error:g}=x();if(f){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:s.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),t[1]=e):e=t[1],e}if(g){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{v as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as S,r as U,j as t,m as Y,B as _,K as B,c as ee,p as Pe,F as Je,n as W,f as et,d as tt,a1 as Te,
|
|
1
|
+
import{e as S,r as U,j as t,m as Y,B as _,K as B,c as ee,p as Pe,F as Je,n as W,f as et,d as tt,a1 as Te,ac as Tt}from"./index-DtdRCqfT.js";import{i as zt}from"./ChevronRight-zYXs_-Se.js";import{s as st}from"./Eye-C5YGQqBB.js";import{n as Ft,i as nt}from"./Globe01-DqoZJREO.js";import{a as lt,d as Pt,e as Ot,i as Et}from"./ZoomOut-D6k5Mdn4.js";import{a as pe}from"./Palette-Dee1B_K4.js";import{s as At}from"./Plus-DP7MBDcr.js";import{t as Mt}from"./Stars01-Cm43N5JK.js";import{i as xe}from"./Upload01-CRl35fVk.js";import{i as Oe}from"./Zap-DEQh6kKf.js";import{u as it}from"./tooltip-D9vE3hJi.js";import{f as Ut,a as Bt,b as Lt,c as _t,d as Rt,e as qt,A as It,g as Kt}from"./alert-dialog-Iz7Pne8q.js";import{c as Ee,d as Ae,a as Me,f as rt,D as Ht,b as Vt,e as Gt}from"./dialog-B5Fc7PcC.js";import{I as Ue}from"./input-C6eDTm2J.js";import{S as K}from"./skeleton-CQ4hZKKg.js";import{F as ie,d as at,M as ot}from"./file-type-icon-2rgm4864.js";import{a as Qt}from"./toolbar-BUvdNtWO.js";import{q as Be,r as A,a as be,s as Wt,u as Fe,t as Le,f as Yt,L as Xt,n as Zt,o as Jt,m as es,R as Ve,p as ts,S as ss,b as ns,v as ct,w as le,x as ls}from"./preview-dialog-B2V7Iomt.js";import{a as ve}from"./DotsVertical-BX13G9P1.js";import{i as is}from"./Key01-C9VOqBor.js";import{s as je}from"./Trash01-DgUXWGZr.js";import{a as ye,c as te,b as we,D as ke}from"./dropdown-menu-Bo5hgXOF.js";import{T as rs}from"./textarea-CgeTFjY8.js";import{t as as}from"./ChevronDown-Cs8E6-3E.js";import{n as os}from"./ChevronUp-ZNXmTuIH.js";import{i as ge}from"./X-DUzDqibI.js";import"./tab-id-BptcWVWa.js";import"./ChevronLeft-B-gfvsw1.js";import"./LinkExternal01-bw0rYexk.js";import"./XClose-Bod7oMvA.js";import"./index-qCsR4teM.js";import"./LayoutLeft-Bc24ivgh.js";import"./popover-BZPKY_pJ.js";const cs=new Set(["output","upload","public","home"]),ds=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function fs(s){return cs.has(s)||!ds.test(s)?"home":s}function us(s){const e=S.c(33);let n,i,l;e[0]!==s?({glyph:n,readOnly:l,...i}=s,e[0]=s,e[1]=n,e[2]=i,e[3]=l):(n=e[1],i=e[2],l=e[3]);const r=U.useId(),a=`${r}-back`,c=`${r}-front`,o=`url(#${a})`;let d;e[4]!==o?(d=t.jsx("path",{d:"M2.53738 2.55C1.13602 2.55 0 3.68602 0 5.08738V11.535H31.931V7.65326C31.931 6.23616 30.7822 5.08738 29.3651 5.08738H14.7681L13.8775 5.02542C13.3886 4.99141 12.9197 4.81809 12.5261 4.52596L10.7726 3.22419C10.1828 2.78638 9.46784 2.55 8.73334 2.55H2.53738Z",fill:o}),e[4]=o,e[5]=d):d=e[5];const u=`url(#${c})`;let f;e[6]!==u?(f=t.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:u}),e[6]=u,e[7]=f):f=e[7];let m,h,x;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),h=t.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:"#84CDFB"}),x=t.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:"#84CDFB"}),e[8]=m,e[9]=h,e[10]=x):(m=e[8],h=e[9],x=e[10]);let v;e[11]!==n?(v=n&&t.jsx(n,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:"#014AC9",opacity:.55}}),e[11]=n,e[12]=v):v=e[12];let j;e[13]!==l?(j=l&&t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),t.jsx(st,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),e[13]=l,e[14]=j):j=e[14];let y,k;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("stop",{offset:"0.3",stopColor:"#4D87DF"}),k=t.jsx("stop",{offset:"1",stopColor:"#296FE8"}),e[15]=y,e[16]=k):(y=e[15],k=e[16]);let N;e[17]!==a?(N=t.jsxs("linearGradient",{id:a,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[y,k]}),e[17]=a,e[18]=N):N=e[18];let g,C;e[19]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("stop",{stopColor:"#72B6FA"}),C=t.jsx("stop",{offset:"1",stopColor:"#5BB1EF"}),e[19]=g,e[20]=C):(g=e[19],C=e[20]);let D;e[21]!==c?(D=t.jsxs("radialGradient",{id:c,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[g,C]}),e[21]=c,e[22]=D):D=e[22];let F;e[23]!==N||e[24]!==D?(F=t.jsxs("defs",{children:[N,D]}),e[23]=N,e[24]=D,e[25]=F):F=e[25];let $;return e[26]!==i||e[27]!==F||e[28]!==d||e[29]!==f||e[30]!==v||e[31]!==j?($=t.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...i,children:[d,f,m,h,x,v,j,F]}),e[26]=i,e[27]=F,e[28]=d,e[29]=f,e[30]=v,e[31]=j,e[32]=$):$=e[32],$}function ms(s,e,n){return e?"color":n?"font":/^--brand-(text|fw|leading|tracking)/i.test(s)?"type":/^--brand-space/i.test(s)?"space":/^--brand-radius/i.test(s)?"radius":/^--brand-shadow/i.test(s)?"shadow":/^--brand-(duration|delay|ease)/i.test(s)?"motion":"other"}const hs=/^(rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)\(/i,ps=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,xs=["svg","png","jpg","jpeg","webp","avif","gif"];function gs(s){return s.split(".").pop()?.toLowerCase()??""}function bs(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vs(s){const e=s.trim();return ps.test(e)||hs.test(e)}function js(s){const e=s.trim(),n=e.match(/^#([0-9a-f]{3})$/i);return n?.[1]?`#${[...n[1]].map(i=>i+i).join("")}`:e}function dt(s){const e=[],n=new Map,i=/(--brand-[\w-]+)\s*:\s*([^;]+);/g;let l;for(;(l=i.exec(s))!==null;){const r=l[1],a=l[2].trim();n.has(r)||e.push(r),n.set(r,a)}return e.map(r=>{const a=n.get(r),c=vs(a),o=/^--brand-font/i.test(r);return{name:r,value:a,isColor:c,isFont:o,kind:ms(r,c,o)}})}const Ge=["primary","secondary","accent","neutral","success","warning","error","info","bg","fg","border","ring"];function ys(s){return s.match(/^--brand-([a-z]+)/i)?.[1]?.toLowerCase()??s}function ws(s){const e=[],n=new Map;for(const l of s){if(l.kind!=="color")continue;const r=ys(l.name);n.has(r)||(e.push(r),n.set(r,[])),n.get(r).push(l)}return e.map(l=>{const r=n.get(l);return{family:l,tokens:r,isRamp:r.filter(a=>/-\d+$/.test(a.name)).length>=5}}).sort((l,r)=>{const a=Ge.indexOf(l.family),c=Ge.indexOf(r.family);return a===-1&&c===-1?0:a===-1?1:c===-1?-1:a-c})}function ks(s,e,n){const i=new RegExp(`(${bs(e)}\\s*:\\s*)[^;]+(;)`);if(i.test(s))return s.replace(i,(a,c,o)=>`${c}${n}${o}`);const l=s.search(/:root\s*\{/);if(l!==-1){const a=s.indexOf("{",l)+1;return`${s.slice(0,a)}
|
|
2
2
|
${e}: ${n};${s.slice(a)}`}const r=s.length>0&&!s.endsWith(`
|
|
3
3
|
`)?`
|
|
4
4
|
`:"";return`${s}${r}:root {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as s,c as a,j as d}from"./index-
|
|
1
|
+
import{e as s,c as a,j as d}from"./index-DtdRCqfT.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-background dark:bg-input/30 px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as A,j as h,r as z,c as _}from"./index-
|
|
1
|
+
import{e as A,j as h,r as z,c as _}from"./index-DtdRCqfT.js";import{n as L}from"./XCircle-CiWHFuXX.js";import{A as k}from"./agent-icon-BvSYE4X0.js";const C={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},Z={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},y={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},M={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function q(E){const e=A.c(12),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w;if(t?.startsWith("icon://")||t?.includes("#agentcolor=")){const r=M[n];let l;return e[0]!==o||e[1]!==t||e[2]!==s||e[3]!==r?(l=h.jsx(k,{icon:t,name:s,size:r,className:o}),e[0]=o,e[1]=t,e[2]=s,e[3]=r,e[4]=l):l=e[4],l}const g=t??"no-icon";let i;return e[5]!==o||e[6]!==c||e[7]!==t||e[8]!==s||e[9]!==n||e[10]!==g?(i=h.jsx(R,{icon:t,name:s,size:n,className:o,fallbackIcon:c},g),e[5]=o,e[6]=c,e[7]=t,e[8]=s,e[9]=n,e[10]=g,e[11]=i):i=e[11],i}function R(E){const e=A.c(24),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w,[g,i]=z.useState(!1),r=!!t&&g,l=C[n],b=Z[n];let a;e[0]!==o||e[1]!==l||e[2]!==b?(a=_("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,b,o),e[0]=o,e[1]=l,e[2]=b,e[3]=a):a=e[3];const p=t||void 0,N=!r&&"hidden";let m;e[4]!==N?(m=_("h-full w-full object-cover",N),e[4]=N,e[5]=m):m=e[5];let I,S;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=()=>i(!1),S=()=>i(!0),e[6]=I,e[7]=S):(I=e[6],S=e[7]);let d;e[8]!==s||e[9]!==p||e[10]!==m?(d=h.jsx("img",{src:p,alt:s,className:m,onError:I,onLoad:S}),e[8]=s,e[9]=p,e[10]=m,e[11]=d):d=e[11];const v=r&&"hidden";let f;e[12]!==v?(f=_("h-full w-full flex items-center justify-center bg-muted/20",v),e[12]=v,e[13]=f):f=e[13];let x;e[14]!==c||e[15]!==n?(x=c??h.jsx(L,{size:y[n],className:"text-muted-foreground"}),e[14]=c,e[15]=n,e[16]=x):x=e[16];let u;e[17]!==f||e[18]!==x?(u=h.jsx("div",{className:f,children:x}),e[17]=f,e[18]=x,e[19]=u):u=e[19];let j;return e[20]!==d||e[21]!==u||e[22]!==a?(j=h.jsxs("div",{className:a,children:[d,u]}),e[20]=d,e[21]=u,e[22]=a,e[23]=j):j=e[23],j}export{q as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n,c as r,j as i,bF as p}from"./index-
|
|
1
|
+
import{e as n,c as r,j as i,bF as p}from"./index-DtdRCqfT.js";function c(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{c as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as X,r as m,a as z,t as P,b,j as e,c as B,B as Q,d as ie,S as W,N as oe,e as le}from"./index-njupOWlD.js";import{I}from"./input-Dt3JGrCV.js";import{A as de}from"./auth-split-layout-DUiZ1N0F.js";function ce({redirectUrl:s,callbackUrl:n="/"}){const{emailAndPassword:d,resetPassword:u,emailOtp:i,socialProviders:l}=X(),[r,j]=m.useState(""),[y,D]=m.useState(""),[w,C]=m.useState(""),[A,O]=m.useState(""),[f,L]=m.useState(!1),[F,N]=m.useState(()=>i.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[c,S]=m.useState(""),[$,Y]=m.useState(!1),h=F==="signUp",p=F==="forgotPassword",x=F==="emailOtp",R=z({mutationFn:async({email:t,password:a,name:q})=>{try{if(h){const g=await b.signUp.email({email:t,password:a,name:q||""});if(g.error)throw new Error(g.error.message||"Sign up failed");return g}else{const g=await b.signIn.email({email:t,password:a});if(g.error)throw new Error(g.error.message||"Sign in failed");return g}}catch(g){throw g instanceof Error?g:new Error("Authentication failed")}},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??n},onError:t=>{P(h?"user_signup_failed":"user_signin_failed",{error:t instanceof Error?t.message:String(t)})}}),U=z({mutationFn:async({email:t})=>{const a=await b.requestPasswordReset({email:t,redirectTo:"/reset-password"});if(a.error)throw new Error(a.error.message||"Failed to send reset email");return a},onSuccess:()=>{P("password_reset_requested"),Y(!0)},onError:t=>{P("password_reset_request_failed",{error:t instanceof Error?t.message:String(t)})}}),E=z({mutationFn:async({email:t})=>{const a=await b.emailOtp.sendVerificationOtp({email:t,type:"sign-in"});if(a.error)throw new Error(a.error.message||"Failed to send code");return a},onSuccess:()=>{P("email_otp_sent"),L(!0)},onError:t=>{P("email_otp_send_failed",{error:t instanceof Error?t.message:String(t)})}}),_=z({mutationFn:async({email:t,otp:a})=>{const q=await b.signIn.emailOtp({email:t,otp:a});if(q.error)throw new Error(q.error.message||"Invalid code");return q},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??n},onError:t=>{P("email_otp_verify_failed",{error:t instanceof Error?t.message:String(t)})}}),T=t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),V=()=>{r.trim()&&!T(r)&&S("Invalid email address")},Z=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}R.mutate({email:r,password:y,name:w})},ee=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}U.mutate({email:r})},te=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}E.mutate({email:r})},se=t=>{t.preventDefault(),_.mutate({email:r,otp:A})},k=t=>a=>{t(a.target.value),G&&R.reset(),H&&U.reset(),J&&(E.reset(),_.reset()),t===j&&c&&S("")},M=t=>{N(t),C(""),O(""),L(!1),S(""),Y(!1),R.reset(),U.reset(),E.reset(),_.reset()},o=R.isPending||U.isPending||E.isPending||_.isPending,G=R.error,H=U.error,J=E.error||_.error,v=h?r.trim()&&y.trim()&&w.trim():p?r.trim():x?f?A.trim():r.trim():r.trim()&&y.trim(),ne=t=>{if(!t)return null;const a=t.message.toLowerCase();return a.includes("unauthorized")||a.includes("401")?"Invalid email or password. Please try again.":a.includes("already exists")||a.includes("409")?"An account with this email already exists. Try signing in instead.":a.includes("network")||a.includes("fetch")?"Network error. Please check your connection and try again.":a.includes("rate limit")||a.includes("429")?"Too many attempts. Please wait a moment and try again.":a.includes("invalid")&&a.includes("otp")?"Invalid or expired code. Please try again.":t.message||"An error occurred. Please try again."},K=G||H||J,re=p?"Reset your password":x&&f?"Enter verification code":"Welcome to deco",ae=p?"We'll send you a reset link":x&&f?`Code sent to ${r}`:"Sign in or create a new account";return e.jsxs("div",{className:"w-full grid gap-10",children:[e.jsxs("div",{children:[e.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),e.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-medium leading-8",children:re}),e.jsx("p",{className:"text-base text-muted-foreground leading-6",children:ae})]}),K&&e.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:ne(K)}),$&&e.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Check your email for a password reset link."}),!p&&!(x&&f)&&l.enabled&&e.jsx("div",{className:"grid gap-2",children:l.providers.map(t=>e.jsxs("button",{type:"button",disabled:o,onClick:()=>{b.signIn.social({provider:t.name,callbackURL:s??n})},className:"flex h-12 w-full items-center justify-center gap-3 rounded-xl bg-background dark:bg-input/30 px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 disabled:opacity-50 disabled:pointer-events-none",children:[t.icon&&e.jsx("img",{src:t.icon,alt:"",className:B("h-5 w-5",t.name==="github"&&"dark:invert"),"aria-hidden":"true"}),"Continue with"," ",t.name.charAt(0).toUpperCase()+t.name.slice(1)]},t.name))}),!p&&!(x&&f)&&l.enabled&&(d.enabled||i.enabled)&&e.jsxs("div",{className:"flex items-center gap-2.5 -my-4",children:[e.jsx("div",{className:"h-px flex-1 bg-border"}),e.jsx("span",{className:"text-base text-muted-foreground",children:"or"}),e.jsx("div",{className:"h-px flex-1 bg-border"})]}),x&&i.enabled&&e.jsx(e.Fragment,{children:f?e.jsxs("form",{onSubmit:se,className:"grid gap-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:"Verification code"}),e.jsx(I,{type:"text",placeholder:"Enter code",value:A,onChange:k(O),required:!0,disabled:o,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),e.jsx("button",{type:"submit",disabled:o||!v,className:"flex h-12 w-full items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:opacity-50 disabled:pointer-events-none",children:o?"Verifying...":"Verify"}),e.jsx("button",{type:"button",onClick:()=>{L(!1),O(""),E.reset(),_.reset()},disabled:o,className:"mt-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Use a different email"})]}):e.jsxs("form",{onSubmit:te,className:"grid gap-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:"Email"}),e.jsx(I,{type:"email",placeholder:"Email address",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive",children:c})]}),e.jsx("button",{type:"submit",disabled:o||!v,className:"flex h-12 w-full items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:opacity-50 disabled:pointer-events-none",children:o?"Sending...":"Send code"})]})}),p&&d.enabled&&!$&&e.jsxs("form",{onSubmit:ee,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(Q,{type:"submit",disabled:o||!v,className:"w-full font-semibold",size:"xl",children:o?"Sending...":"Send reset link"})]}),!p&&!x&&d.enabled&&e.jsxs("form",{onSubmit:Z,className:"grid gap-5",children:[h&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Name"}),e.jsx(I,{type:"text",placeholder:"Your name",value:w,onChange:k(C),required:!0,disabled:o,className:"h-11 rounded-lg"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Password"}),!h&&u.enabled&&e.jsx("button",{type:"button",onClick:()=>M("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Forgot password?"})]}),e.jsx(I,{type:"password",placeholder:"••••••••",value:y,onChange:k(D),required:!0,disabled:o,className:"h-11 rounded-lg"})]}),e.jsx("div",{className:B("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",v?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsx("div",{className:B("p-1",!v&&"pointer-events-none"),children:e.jsx(Q,{type:"submit",disabled:o||!v,className:B("w-full font-semibold"),size:"xl","aria-hidden":!v,children:o?h?"Creating account...":"Signing in...":"Continue"})})})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:p?e.jsx("button",{type:"button",onClick:()=>M("signIn"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Back to sign in"}):x&&d.enabled?e.jsx("button",{type:"button",onClick:()=>M("signIn"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Sign in with password instead"}):!x&&d.enabled?e.jsxs(e.Fragment,{children:[h?"Already have an account? ":"Don't have an account? ",e.jsx("button",{type:"button",onClick:()=>M(h?"signIn":"signUp"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:h?"Sign in":"Sign up"}),i.enabled&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"mx-2",children:"·"}),e.jsx("button",{type:"button",onClick:()=>M("emailOtp"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Sign in with email code"})]})]}):null})]})}function ue({redirectTo:s}){const[n,d]=m.useState(null);return m.useEffect(()=>{let u=!1;return(async()=>{try{let i;for(let l=0;l<5&&(i=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"}),!(i.ok||i.status<500));l++)await new Promise(r=>setTimeout(r,Math.min(1e3*2**l,1e4)));if(!i?.ok){const l=await i?.json().catch(()=>({}));throw new Error(l?.error||"Auto-login failed")}if(!u){const l=s.startsWith("/")&&!s.startsWith("//")?s:"/";window.location.href=l}}catch(i){u||d(i instanceof Error?i.message:"Auto-login failed")}})(),()=>{u=!0}},[s]),n?e.jsx("div",{className:"flex min-h-screen items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-destructive mb-2",children:["Auto-login failed: ",n]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Try restarting the server."})]})}):e.jsx(W,{})}function me(s){if(!s.client_id||s.response_type!=="code")return null;const n=new URLSearchParams;return s.client_id&&n.set("client_id",s.client_id),s.redirect_uri&&n.set("redirect_uri",s.redirect_uri),s.response_type&&n.set("response_type",s.response_type),s.state&&n.set("state",s.state),s.scope&&n.set("scope",s.scope),s.code_challenge&&n.set("code_challenge",s.code_challenge),s.code_challenge_method&&n.set("code_challenge_method",s.code_challenge_method),`/api/auth/mcp/authorize?${n.toString()}`}function ge(s){const n=le.c(5),{callbackURL:d,providerId:u}=s;let i,l;n[0]!==d||n[1]!==u?(i=()=>{(async()=>await b.signIn.sso({providerId:u,callbackURL:d}))()},l=[u,d],n[0]=d,n[1]=u,n[2]=i,n[3]=l):(i=n[2],l=n[3]),m.useEffect(i,l);let r;return n[4]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(W,{}),n[4]=r):r=n[4],r}function pe(){const s=b.useSession(),n=ie({from:"/login"}),{next:d="/",client_id:u,redirect_uri:i,response_type:l,state:r,scope:j,code_challenge:y,code_challenge_method:D}=n,w=d.startsWith("/")&&!d.startsWith("//")?d:"/",{sso:C,emailAndPassword:A,magicLink:O,emailOtp:f,socialProviders:L,localMode:F}=X(),N=me({client_id:u,redirect_uri:i,response_type:l,state:r,scope:j,code_challenge:y,code_challenge_method:D}),c=N||w;return s.data?N?(window.location.href=N,e.jsx(W,{})):e.jsx(oe,{to:w}):F?e.jsx(ue,{redirectTo:c}):C.enabled?e.jsx(ge,{callbackURL:c,providerId:C.providerId}):A.enabled||O.enabled||f.enabled||L.enabled?e.jsx(de,{children:e.jsx(ce,{redirectUrl:N,callbackUrl:w})}):e.jsx("div",{children:"No login options available"})}export{pe as default};
|
|
1
|
+
import{u as X,r as m,a as z,t as P,b,j as e,c as B,B as Q,d as ie,S as W,N as oe,e as le}from"./index-DtdRCqfT.js";import{I}from"./input-C6eDTm2J.js";import{A as de}from"./auth-split-layout-C4SnTzaq.js";function ce({redirectUrl:s,callbackUrl:n="/"}){const{emailAndPassword:d,resetPassword:u,emailOtp:i,socialProviders:l}=X(),[r,j]=m.useState(""),[y,D]=m.useState(""),[w,C]=m.useState(""),[A,O]=m.useState(""),[f,L]=m.useState(!1),[F,N]=m.useState(()=>i.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[c,S]=m.useState(""),[$,Y]=m.useState(!1),h=F==="signUp",p=F==="forgotPassword",x=F==="emailOtp",R=z({mutationFn:async({email:t,password:a,name:q})=>{try{if(h){const g=await b.signUp.email({email:t,password:a,name:q||""});if(g.error)throw new Error(g.error.message||"Sign up failed");return g}else{const g=await b.signIn.email({email:t,password:a});if(g.error)throw new Error(g.error.message||"Sign in failed");return g}}catch(g){throw g instanceof Error?g:new Error("Authentication failed")}},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??n},onError:t=>{P(h?"user_signup_failed":"user_signin_failed",{error:t instanceof Error?t.message:String(t)})}}),U=z({mutationFn:async({email:t})=>{const a=await b.requestPasswordReset({email:t,redirectTo:"/reset-password"});if(a.error)throw new Error(a.error.message||"Failed to send reset email");return a},onSuccess:()=>{P("password_reset_requested"),Y(!0)},onError:t=>{P("password_reset_request_failed",{error:t instanceof Error?t.message:String(t)})}}),E=z({mutationFn:async({email:t})=>{const a=await b.emailOtp.sendVerificationOtp({email:t,type:"sign-in"});if(a.error)throw new Error(a.error.message||"Failed to send code");return a},onSuccess:()=>{P("email_otp_sent"),L(!0)},onError:t=>{P("email_otp_send_failed",{error:t instanceof Error?t.message:String(t)})}}),_=z({mutationFn:async({email:t,otp:a})=>{const q=await b.signIn.emailOtp({email:t,otp:a});if(q.error)throw new Error(q.error.message||"Invalid code");return q},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??n},onError:t=>{P("email_otp_verify_failed",{error:t instanceof Error?t.message:String(t)})}}),T=t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),V=()=>{r.trim()&&!T(r)&&S("Invalid email address")},Z=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}R.mutate({email:r,password:y,name:w})},ee=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}U.mutate({email:r})},te=t=>{if(t.preventDefault(),!T(r)){S("Invalid email address");return}E.mutate({email:r})},se=t=>{t.preventDefault(),_.mutate({email:r,otp:A})},k=t=>a=>{t(a.target.value),G&&R.reset(),H&&U.reset(),J&&(E.reset(),_.reset()),t===j&&c&&S("")},M=t=>{N(t),C(""),O(""),L(!1),S(""),Y(!1),R.reset(),U.reset(),E.reset(),_.reset()},o=R.isPending||U.isPending||E.isPending||_.isPending,G=R.error,H=U.error,J=E.error||_.error,v=h?r.trim()&&y.trim()&&w.trim():p?r.trim():x?f?A.trim():r.trim():r.trim()&&y.trim(),ne=t=>{if(!t)return null;const a=t.message.toLowerCase();return a.includes("unauthorized")||a.includes("401")?"Invalid email or password. Please try again.":a.includes("already exists")||a.includes("409")?"An account with this email already exists. Try signing in instead.":a.includes("network")||a.includes("fetch")?"Network error. Please check your connection and try again.":a.includes("rate limit")||a.includes("429")?"Too many attempts. Please wait a moment and try again.":a.includes("invalid")&&a.includes("otp")?"Invalid or expired code. Please try again.":t.message||"An error occurred. Please try again."},K=G||H||J,re=p?"Reset your password":x&&f?"Enter verification code":"Welcome to deco",ae=p?"We'll send you a reset link":x&&f?`Code sent to ${r}`:"Sign in or create a new account";return e.jsxs("div",{className:"w-full grid gap-10",children:[e.jsxs("div",{children:[e.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),e.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-medium leading-8",children:re}),e.jsx("p",{className:"text-base text-muted-foreground leading-6",children:ae})]}),K&&e.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:ne(K)}),$&&e.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Check your email for a password reset link."}),!p&&!(x&&f)&&l.enabled&&e.jsx("div",{className:"grid gap-2",children:l.providers.map(t=>e.jsxs("button",{type:"button",disabled:o,onClick:()=>{b.signIn.social({provider:t.name,callbackURL:s??n})},className:"flex h-12 w-full items-center justify-center gap-3 rounded-xl bg-background dark:bg-input/30 px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 disabled:opacity-50 disabled:pointer-events-none",children:[t.icon&&e.jsx("img",{src:t.icon,alt:"",className:B("h-5 w-5",t.name==="github"&&"dark:invert"),"aria-hidden":"true"}),"Continue with"," ",t.name.charAt(0).toUpperCase()+t.name.slice(1)]},t.name))}),!p&&!(x&&f)&&l.enabled&&(d.enabled||i.enabled)&&e.jsxs("div",{className:"flex items-center gap-2.5 -my-4",children:[e.jsx("div",{className:"h-px flex-1 bg-border"}),e.jsx("span",{className:"text-base text-muted-foreground",children:"or"}),e.jsx("div",{className:"h-px flex-1 bg-border"})]}),x&&i.enabled&&e.jsx(e.Fragment,{children:f?e.jsxs("form",{onSubmit:se,className:"grid gap-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:"Verification code"}),e.jsx(I,{type:"text",placeholder:"Enter code",value:A,onChange:k(O),required:!0,disabled:o,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),e.jsx("button",{type:"submit",disabled:o||!v,className:"flex h-12 w-full items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:opacity-50 disabled:pointer-events-none",children:o?"Verifying...":"Verify"}),e.jsx("button",{type:"button",onClick:()=>{L(!1),O(""),E.reset(),_.reset()},disabled:o,className:"mt-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Use a different email"})]}):e.jsxs("form",{onSubmit:te,className:"grid gap-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-foreground",children:"Email"}),e.jsx(I,{type:"email",placeholder:"Email address",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive",children:c})]}),e.jsx("button",{type:"submit",disabled:o||!v,className:"flex h-12 w-full items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:opacity-50 disabled:pointer-events-none",children:o?"Sending...":"Send code"})]})}),p&&d.enabled&&!$&&e.jsxs("form",{onSubmit:ee,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(Q,{type:"submit",disabled:o||!v,className:"w-full font-semibold",size:"xl",children:o?"Sending...":"Send reset link"})]}),!p&&!x&&d.enabled&&e.jsxs("form",{onSubmit:Z,className:"grid gap-5",children:[h&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Name"}),e.jsx(I,{type:"text",placeholder:"Your name",value:w,onChange:k(C),required:!0,disabled:o,className:"h-11 rounded-lg"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:r,onChange:k(j),onBlur:V,required:!0,disabled:o,"aria-invalid":!!c,className:"h-11 rounded-lg"}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Password"}),!h&&u.enabled&&e.jsx("button",{type:"button",onClick:()=>M("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Forgot password?"})]}),e.jsx(I,{type:"password",placeholder:"••••••••",value:y,onChange:k(D),required:!0,disabled:o,className:"h-11 rounded-lg"})]}),e.jsx("div",{className:B("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",v?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsx("div",{className:B("p-1",!v&&"pointer-events-none"),children:e.jsx(Q,{type:"submit",disabled:o||!v,className:B("w-full font-semibold"),size:"xl","aria-hidden":!v,children:o?h?"Creating account...":"Signing in...":"Continue"})})})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:p?e.jsx("button",{type:"button",onClick:()=>M("signIn"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Back to sign in"}):x&&d.enabled?e.jsx("button",{type:"button",onClick:()=>M("signIn"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Sign in with password instead"}):!x&&d.enabled?e.jsxs(e.Fragment,{children:[h?"Already have an account? ":"Don't have an account? ",e.jsx("button",{type:"button",onClick:()=>M(h?"signIn":"signUp"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:h?"Sign in":"Sign up"}),i.enabled&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"mx-2",children:"·"}),e.jsx("button",{type:"button",onClick:()=>M("emailOtp"),disabled:o,className:"font-medium text-[#8CAA25] hover:underline disabled:opacity-50",children:"Sign in with email code"})]})]}):null})]})}function ue({redirectTo:s}){const[n,d]=m.useState(null);return m.useEffect(()=>{let u=!1;return(async()=>{try{let i;for(let l=0;l<5&&(i=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"}),!(i.ok||i.status<500));l++)await new Promise(r=>setTimeout(r,Math.min(1e3*2**l,1e4)));if(!i?.ok){const l=await i?.json().catch(()=>({}));throw new Error(l?.error||"Auto-login failed")}if(!u){const l=s.startsWith("/")&&!s.startsWith("//")?s:"/";window.location.href=l}}catch(i){u||d(i instanceof Error?i.message:"Auto-login failed")}})(),()=>{u=!0}},[s]),n?e.jsx("div",{className:"flex min-h-screen items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-destructive mb-2",children:["Auto-login failed: ",n]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Try restarting the server."})]})}):e.jsx(W,{})}function me(s){if(!s.client_id||s.response_type!=="code")return null;const n=new URLSearchParams;return s.client_id&&n.set("client_id",s.client_id),s.redirect_uri&&n.set("redirect_uri",s.redirect_uri),s.response_type&&n.set("response_type",s.response_type),s.state&&n.set("state",s.state),s.scope&&n.set("scope",s.scope),s.code_challenge&&n.set("code_challenge",s.code_challenge),s.code_challenge_method&&n.set("code_challenge_method",s.code_challenge_method),`/api/auth/mcp/authorize?${n.toString()}`}function ge(s){const n=le.c(5),{callbackURL:d,providerId:u}=s;let i,l;n[0]!==d||n[1]!==u?(i=()=>{(async()=>await b.signIn.sso({providerId:u,callbackURL:d}))()},l=[u,d],n[0]=d,n[1]=u,n[2]=i,n[3]=l):(i=n[2],l=n[3]),m.useEffect(i,l);let r;return n[4]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(W,{}),n[4]=r):r=n[4],r}function pe(){const s=b.useSession(),n=ie({from:"/login"}),{next:d="/",client_id:u,redirect_uri:i,response_type:l,state:r,scope:j,code_challenge:y,code_challenge_method:D}=n,w=d.startsWith("/")&&!d.startsWith("//")?d:"/",{sso:C,emailAndPassword:A,magicLink:O,emailOtp:f,socialProviders:L,localMode:F}=X(),N=me({client_id:u,redirect_uri:i,response_type:l,state:r,scope:j,code_challenge:y,code_challenge_method:D}),c=N||w;return s.data?N?(window.location.href=N,e.jsx(W,{})):e.jsx(oe,{to:w}):F?e.jsx(ue,{redirectTo:c}):C.enabled?e.jsx(ge,{callbackURL:c,providerId:C.providerId}):A.enabled||O.enabled||f.enabled||L.enabled?e.jsx(de,{children:e.jsx(ce,{redirectUrl:N,callbackUrl:w})}):e.jsx("div",{children:"No login options available"})}export{pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as x,b as N,c as z,a as D}from"./auth-
|
|
1
|
+
import{d as x,b as N,c as z,a as D}from"./auth-JrxMRfm7.js";function E(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString(16)}function H(){return window.location.origin}function C(){try{const t=window.location.hostname;return t==="localhost"||t.endsWith(".localhost")||t==="127.0.0.1"||t==="::1"}catch{return!1}}const M=new Map,R="mcp:oauth:callback:";class W{serverUrl;_clientMetadata;_redirectUrl;_windowMode;_state=null;_codeVerifier=null;_clientInfo=null;_tokens=null;constructor(e){this.serverUrl=e.serverUrl,this._redirectUrl=e.callbackUrl??`${H()}/oauth/callback`,this._windowMode=e.windowMode??"popup";const n=e.scope?Array.isArray(e.scope)?e.scope.join(" "):e.scope:void 0;this._clientMetadata={redirect_uris:[this._redirectUrl],token_endpoint_auth_method:"none",grant_types:["authorization_code","refresh_token"],response_types:["code"],client_name:e.clientName??"@decocms/mesh MCP client",...n&&{scope:n}},M.set(E(this.serverUrl),this)}get redirectUrl(){return this._redirectUrl}get clientMetadata(){return this._clientMetadata}state(){return this._state||(this._state=crypto.randomUUID()),this._state}getStoredState(){return this._state}clientInformation(){return this._clientInfo??void 0}saveClientInformation(e){this._clientInfo=e}tokens(){return this._tokens??void 0}saveTokens(e){this._tokens=e}redirectToAuthorization(e){if(this._windowMode==="tab"){if(!window.open(e.toString(),"_blank"))throw new Error("Tab was blocked")}else{const o=window.screenX+(window.outerWidth-600)/2,s=window.screenY+(window.outerHeight-700)/2;if(!window.open(e.toString(),"mcp-oauth",`width=600,height=700,left=${o},top=${s},popup=yes`)&&!window.open(e.toString(),"_blank"))throw new Error("Popup was blocked")}}saveCodeVerifier(e){this._codeVerifier=e}codeVerifier(){if(!this._codeVerifier)throw new Error("Code verifier not found");return this._codeVerifier}invalidateCredentials(){this._clientInfo=null,this._tokens=null,this._codeVerifier=null,this._state=null}getServerUrl(){return this.serverUrl}cleanup(){M.delete(E(this.serverUrl))}}async function G(t){const e=t.meshUrl??window.location.origin,n=t.orgSlug?`/api/${encodeURIComponent(t.orgSlug)}/mcp/${t.connectionId}`:`/mcp/${t.connectionId}`,r=new URL(n,e),o=new W({serverUrl:r.href,clientName:t.clientName,clientUri:t.clientUri,callbackUrl:t.callbackUrl,scope:t.scope,windowMode:t.windowMode}),s={fn:null};try{const i=new Promise((l,d)=>{const k=t.timeout||12e4;let b,p=!1;const L=o.state(),A=`${R}${L}`,h=()=>{window.removeEventListener("message",v),window.removeEventListener("storage",O),clearTimeout(b);try{localStorage.removeItem(A)}catch{}};s.fn=u=>{p||(p=!0,h(),d(u))};const U=async u=>{if(p)return;if(p=!0,!u.success){h(),d(new Error(u.error||"OAuth authentication failed"));return}const{code:m,state:$}=u;if(!m){h(),d(new Error("Missing authorization code"));return}if(o.getStoredState()!==$){h(),d(new Error("OAuth state mismatch - possible CSRF attack"));return}try{const T=(await x(r))?.authorization_servers?.[0]||r,S=await N(T),g=o.clientInformation();if(!g){h(),d(new Error("Client information not found"));return}const P=o.codeVerifier(),V=await z(T,{metadata:S,clientInformation:g,authorizationCode:m,codeVerifier:P,redirectUri:o.redirectUrl,resource:new URL(r)});h(),l({tokens:V,clientId:g.client_id??null,clientSecret:"client_secret"in g?g.client_secret:null,tokenEndpoint:S?.token_endpoint??null,userinfoEndpoint:S?.userinfo_endpoint??null})}catch(I){h(),d(I)}},v=async u=>{!C()&&u.origin!==window.location.origin||u.data?.type==="mcp:oauth:callback"&&await U(u.data)},O=async u=>{if(!(u.key!==A||!u.newValue))try{const m=JSON.parse(u.newValue);await U(m)}catch{}};window.addEventListener("message",v),window.addEventListener("storage",O),b=setTimeout(()=>{p||(p=!0,h(),d(new Error("OAuth authentication timeout")))},k)});if(i.catch(()=>{}),await D(o,{serverUrl:r})==="REDIRECT"){const l=await i,d=l.tokens;return{token:l.tokens.access_token,tokenInfo:{accessToken:l.tokens.access_token,refreshToken:l.tokens.refresh_token??null,expiresIn:l.tokens.expires_in??null,scope:l.tokens.scope??null,clientId:l.clientId,clientSecret:l.clientSecret,tokenEndpoint:l.tokenEndpoint,userinfoEndpoint:l.userinfoEndpoint,idToken:typeof d.id_token=="string"?d.id_token:null},error:null}}const a=o.tokens(),w=o.clientInformation(),f=a;return{token:a?.access_token||null,tokenInfo:a?{accessToken:a.access_token,refreshToken:a.refresh_token??null,expiresIn:a.expires_in??null,scope:a.scope??null,clientId:w?.client_id??null,clientSecret:w&&"client_secret"in w?w.client_secret:null,tokenEndpoint:null,userinfoEndpoint:null,idToken:f&&typeof f.id_token=="string"?f.id_token:null}:null,error:null}}catch(i){return s.fn&&s.fn(i instanceof Error?i:new Error(String(i))),{token:null,tokenInfo:null,error:i instanceof Error?i.message:String(i)}}finally{o.cleanup()}}function y(t,e){if(window.opener&&!window.opener.closed){const n=C()?"*":window.location.origin;return window.opener.postMessage(t,n),!0}if(e)try{const n=`${R}${e}`;return localStorage.setItem(n,JSON.stringify(t)),!0}catch{}return!1}async function X(){const t=new URLSearchParams(window.location.search),e=t.get("code");let n=t.get("state");const r=t.get("error"),o=t.get("error_description");let s=n;if(n)try{const c=atob(n),a=JSON.parse(c);a.clientState&&(s=a.clientState)}catch{}if(r){const c=o||r;return y({type:"mcp:oauth:callback",success:!1,error:c},s),{success:!1,error:c}}if(!e||!n){const c="Missing code or state parameter";return y({type:"mcp:oauth:callback",success:!1,error:c},s),{success:!1,error:c}}return n=s||n,y({type:"mcp:oauth:callback",success:!0,code:e,state:n},n)?{success:!0}:{success:!1,error:"Parent window not available"}}function _(){if(typeof window<"u"&&window.location?.origin)return window.location.origin}function j(t){try{const e=_(),n=e?new URL(t,e):new URL(t),r=n.pathname.match(/^\/api\/[^/]+\/mcp\/([^/]+)/);return r?r[1]??null:n.pathname.match(/^\/mcp\/([^/]+)/)?.[1]??null}catch{return null}}function J(t){try{const e=_();return(e?new URL(t,e):new URL(t)).pathname.match(/^\/api\/([^/]+)\/mcp\//)?.[1]??null}catch{return null}}async function K(t,e,n){try{const r=`/api/${encodeURIComponent(e)}/connections/${t}/oauth-token/status`,o=n?new URL(r,n).href:r,s=_(),i=!n||new URL(n).origin===s,c=await fetch(o,{credentials:i?"include":"omit"});return c.ok?{hasToken:(await c.json()).hasToken===!0}:{hasToken:!1}}catch{return{hasToken:!1}}}async function q({url:t,token:e,orgId:n,meshUrl:r}){try{const o=new Headers;o.set("Content-Type","application/json"),o.set("Accept","application/json, text/event-stream");const s=await fetch(t,{method:"POST",headers:o,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"@decocms/mesh MCP client",version:"1.0.0"}}})}),i=j(t),c=J(t),a=_(),w=r??(a?new URL(t,a).origin:new URL(t).origin);if(s.ok)return{isAuthenticated:!0,supportsOAuth:!1,hasOAuthToken:(i&&c?await K(i,c,w):{hasToken:!1}).hasToken};let f;try{const k=await s.json();f=k.error||k.message}catch{}return s.status>=500?{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:f||`HTTP ${s.status}`,isServerError:!0}:{isAuthenticated:!1,supportsOAuth:!!s.headers.get("WWW-Authenticate"),hasOAuthToken:!1,error:f||`HTTP ${s.status}`}}catch(o){return console.error("[isConnectionAuthenticated] Error:",o),{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:o.message}}}export{G as a,X as h,q as i};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{v as $t,r as ce,p as he,F as ke,b as Dt,x as kt,a as xe,t as ue,n as G,K as ie,j as s,B as fe,e as J,
|
|
1
|
+
import{v as $t,r as ce,p as he,F as ke,b as Dt,x as kt,a as xe,t as ue,n as G,K as ie,j as s,B as fe,e as J,a5 as Ft,m as Tt,c as $e,l as Xe,a1 as Ot}from"./index-DtdRCqfT.js";import{C as Lt}from"./collection-display-button-WtV7BkCy.js";import{S as qt}from"./search-input-DWwtSn3X.js";import{P as _e}from"./index-DK5BMExb.js";import{u as It,C as Bt}from"./use-organization-roles-C1ZE7DRi.js";import{E as We}from"./empty-state-Dd2C1L1E.js";import{d as Kt,i as Vt,c as Qt,D as Ut,a as Gt,e as Jt}from"./dialog-B5Fc7PcC.js";import{a as Ht,F as rt,b as ct,c as Wt,d as mt,f as dt}from"./form-DEWRKuCN.js";import{d as et,b as tt,c as st,S as nt,a as it}from"./select-DViAZ6BX.js";import{T as Yt}from"./textarea-CgeTFjY8.js";import{u as lt}from"./use-org-auth-client-B6_dXOCB.js";import{b as Zt,S as Xt,a as es}from"./settings-section-BjMM3sOA.js";import{a as ts,u as ss}from"./use-join-requests-qOpXvple.js";import{A as De}from"./avatar-yh81kVts.js";import{u as ns}from"./use-members-D4qUur-D.js";import{u as Fe}from"./studio-tools-C3pW43RI.js";import{T as is,a as as,c as ls,b as os}from"./tooltip-D9vE3hJi.js";import{a as ut,e as ft,g as ht,b as pt,c as gt,d as xt,A as bt,f as jt}from"./alert-dialog-Iz7Pne8q.js";import{B as Ue}from"./badge-F_XnDxyE.js";import{C as vt}from"./card-bh08sj3I.js";import{D as At,a as Pt,b as Mt,d as rs,e as cs,f as ms,c as at,g as ds}from"./dropdown-menu-Bo5hgXOF.js";import{a as Et}from"./DotsVertical-BX13G9P1.js";import{i as us}from"./Key01-C9VOqBor.js";import{i as fs}from"./Shield01-zcrbIoQW.js";import{a as hs}from"./SwitchHorizontal01-BkhFVCHL.js";import{s as ps}from"./Trash01-DgUXWGZr.js";import{s as _t}from"./XClose-Bod7oMvA.js";import{C as Ct}from"./checkbox-xjeH3Wpr.js";import{e as Ye,a as Ze,f as yt,C as gs,c as xs,d as bs,b as js}from"./command-tbfb-2AV.js";import{b as vs,P as Cs,a as ys}from"./popover-BZPKY_pJ.js";import{t as Ss}from"./ChevronDown-Cs8E6-3E.js";import{s as ws}from"./Plus-DP7MBDcr.js";import{R as Ns}from"./require-capability-B4oR0b-_.js";import"./ChevronUp-ZNXmTuIH.js";import"./view-mode-toggle-BA0E_UOT.js";import"./SearchMd-BNtCiaDl.js";import"./sidebar-BvAh8pRK.js";import"./LayoutLeft-Bc24ivgh.js";import"./sheet-CLn7Ee-B.js";import"./X-DUzDqibI.js";import"./table-KwGxLknv.js";import"./label-CApOnzUS.js";import"./ArrowUpRight-YrfJ1CbZ.js";import"./use-capability-BPH95vck.js";import"./User01-B13x_3hK.js";import"./ChevronRight-zYXs_-Se.js";import"./index-DdencN2D.js";import"./access-gate-DHQsgThb.js";import"./capability-load-error-D8DXeudL.js";const Ts=$t().email("Invalid email address");function Is(t){if(!t.trim())return[];const e=t.split(/[,;\n]/).map(n=>n.trim().toLowerCase()).filter(n=>n.length>0);return Array.from(new Set(e))}function As({trigger:t}){const[e,n]=ce.useState(!1),{locator:l}=he(),i=lt(),a=ke(),{data:r}=Dt.useSession(),o=r?.user?.email,{roles:g,isLoading:x}=It(),j=g.filter(m=>m.role!=="owner"),p=kt({mode:"onChange",defaultValues:{emailsText:"",role:"user"}}),b=p.watch("emailsText"),P=p.watch("role"),v=Is(b).filter(m=>{const c=Ts.safeParse(m).success,f=!o||m!==o.toLowerCase();return c&&f}),N=xe({mutationFn:async({emails:m,role:c})=>{if(!c)throw new Error("Please select a role");const f=await Promise.allSettled(m.map(async w=>{const A=await i.organization.inviteMember({email:w,role:c});if(A.error)throw new Error(A.error.message);return A.data})),I=f.filter(w=>w.status==="rejected");if(I.length>0)throw new Error(`Failed to invite ${I.length} member${I.length>1?"s":""}`);return f},onSuccess:(m,{emails:c,role:f})=>{ue("member_invited",{count:c.length,role:f}),a.invalidateQueries({queryKey:ie.members(l)}),a.invalidateQueries({queryKey:ie.invitations(l)}),G.success(c.length===1?"Member invited successfully!":`${c.length} members invited successfully!`),p.reset({emailsText:"",role:"user"}),n(!1)},onError:(m,{emails:c,role:f})=>{ue("member_invite_failed",{count:c.length,role:f,error:m instanceof Error?m.message:String(m)}),G.error(m instanceof Error?m.message:"Failed to invite members")}}),y=m=>{if(v.length===0){G.error("Please enter at least one valid email address");return}if(!m.role){G.error("Please select a role");return}N.mutate({emails:v,role:m.role})},$=v.length>0&&!!P;return s.jsxs(Kt,{open:e,onOpenChange:n,children:[s.jsx(Vt,{asChild:!0,children:t}),s.jsxs(Qt,{className:"sm:max-w-lg",children:[s.jsx(Ut,{children:s.jsx(Gt,{children:"Invite members"})}),s.jsx(Ht,{...p,children:s.jsxs("form",{onSubmit:p.handleSubmit(y),className:"space-y-4",children:[s.jsx(rt,{control:p.control,name:"emailsText",render:({field:m})=>s.jsxs(ct,{children:[s.jsx(Wt,{children:"Email addresses"}),s.jsx(mt,{children:s.jsx(Yt,{...m,disabled:N.isPending,placeholder:`Enter email addresses separated by commas or new lines
|
|
2
2
|
e.g. user1@example.com, user2@example.com
|
|
3
3
|
or one per line`,className:"min-h-[120px] resize-none"})}),s.jsx(dt,{})]})}),s.jsx(rt,{control:p.control,name:"role",render:({field:m})=>s.jsxs(ct,{children:[s.jsx(mt,{children:s.jsxs(et,{value:m.value,onValueChange:m.onChange,disabled:N.isPending||x,children:[s.jsx(tt,{className:"w-full",children:s.jsx(st,{placeholder:"Select a role"})}),s.jsx(nt,{children:j.map(c=>{const f=[];return c.isBuiltin||(c.allowsAllStaticPermissions?f.push("Full org access"):c.staticPermissionCount&&c.staticPermissionCount>0&&f.push(`${c.staticPermissionCount} org perm${c.staticPermissionCount!==1?"s":""}`),c.allowsAllConnections?f.push("All connections"):c.connectionCount&&c.connectionCount>0&&f.push(`${c.connectionCount} connection${c.connectionCount!==1?"s":""}`),(c.connectionCount!==0||c.allowsAllConnections)&&(c.allowsAllTools?f.push("all tools"):c.toolCount&&c.toolCount>0&&f.push(`${c.toolCount} tool${c.toolCount!==1?"s":""}`))),s.jsx(it,{value:c.role,children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{children:c.label}),!c.isBuiltin&&f.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:f.join(", ")})]})},c.role)})})]})}),s.jsx(dt,{})]})}),s.jsxs(Jt,{children:[s.jsx(fe,{variant:"outline",onClick:()=>{p.reset({emailsText:"",role:"user"}),n(!1)},type:"button",disabled:N.isPending,children:"Cancel"}),s.jsx(fe,{type:"submit",disabled:N.isPending||!$,children:N.isPending?"Inviting...":`Invite ${v.length||0} Member${v.length!==1?"s":""}`})]})]})})]})]})}function Ps(){const t=J.c(9),e=ts(),{approve:n,deny:l}=ss();if(e.length===0)return null;let i;if(t[0]!==n||t[1]!==l||t[2]!==e){let r;t[4]!==n||t[5]!==l?(r=o=>s.jsx(Zt,{icon:s.jsx(De,{url:o.user?.image??void 0,fallback:(o.user?.name??o.user?.email??"?").charAt(0).toUpperCase(),shape:"circle",size:"sm"}),title:o.user?.name??o.user?.email??o.userId,description:o.user?.email,action:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(fe,{size:"sm",variant:"outline",onClick:()=>l.mutate(o.id),disabled:l.isPending||n.isPending,children:"Deny"}),s.jsx(fe,{size:"sm",onClick:()=>n.mutate(o.id),disabled:n.isPending||l.isPending,children:"Approve"})]})},o.id),t[4]=n,t[5]=l,t[6]=r):r=t[6],i=e.map(r),t[0]=n,t[1]=l,t[2]=e,t[3]=i}else i=t[3];let a;return t[7]!==i?(a=s.jsx(Xt,{title:"Join requests",description:"People who requested to join via a domain in approval mode.",children:s.jsx(es,{children:i})}),t[7]=i,t[8]=a):a=t[8],a}function Ms(){const t=J.c(7),{locator:e}=he(),n=Fe();let l;t[0]!==e?(l=ie.invitations(e),t[0]=e,t[1]=l):l=t[1];let i;t[2]!==n?(i=async()=>(await n.call("ORGANIZATION_GET",{}))?.invitations??[],t[2]=n,t[3]=i):i=t[3];let a;return t[4]!==l||t[5]!==i?(a={queryKey:l,queryFn:i},t[4]=l,t[5]=i,t[6]=a):a=t[6],Ft(a)}function Es(){const t=J.c(10),{locator:e}=he(),n=lt(),l=ke();let i;t[0]!==n?(i=async x=>{const j=await n.organization.cancelInvitation({invitationId:x});if(j?.error)throw new Error(j.error.message);return j.data},t[0]=n,t[1]=i):i=t[1];let a;t[2]!==e||t[3]!==l?(a=()=>{l.invalidateQueries({queryKey:ie.invitations(e)}),G.success("Invitation cancelled")},t[2]=e,t[3]=l,t[4]=a):a=t[4];let r;t[5]!==i||t[6]!==a?(r={mutationFn:i,onSuccess:a,onError:_s},t[5]=i,t[6]=a,t[7]=r):r=t[7];const o=xe(r);let g;return t[8]!==o?(g={cancel:o},t[8]=o,t[9]=g):g=t[9],g}function _s(t){G.error(t instanceof Error?t.message:"Failed to cancel invitation")}function Rs(){const t=J.c(7),{locator:e}=he(),n=Fe();let l;t[0]!==e?(l=ie.tags(e),t[0]=e,t[1]=l):l=t[1];let i;t[2]!==n?(i=async()=>{const{tags:r}=await n.call("TAGS_LIST",{});return r},t[2]=n,t[3]=i):i=t[3];let a;return t[4]!==l||t[5]!==i?(a={queryKey:l,queryFn:i,staleTime:3e4},t[4]=l,t[5]=i,t[6]=a):a=t[6],Tt(a)}function zs(){const t=J.c(8),e=ke(),{locator:n}=he(),l=Fe();let i;t[0]!==l?(i=async o=>{const{tag:g}=await l.call("TAGS_CREATE",{name:o});return g},t[0]=l,t[1]=i):i=t[1];let a;t[2]!==n||t[3]!==e?(a=()=>{e.invalidateQueries({queryKey:ie.tags(n)})},t[2]=n,t[3]=e,t[4]=a):a=t[4];let r;return t[5]!==i||t[6]!==a?(r={mutationFn:i,onSuccess:a,onError:$s},t[5]=i,t[6]=a,t[7]=r):r=t[7],xe(r)}function $s(t){G.error(t instanceof Error?t.message:"Failed to create tag")}function Ds(t){const e=J.c(10),{locator:n}=he(),l=Fe();let i;e[0]!==n||e[1]!==t?(i=ie.memberTags(n,t),e[0]=n,e[1]=t,e[2]=i):i=e[2];let a;e[3]!==t||e[4]!==l?(a=async()=>{const{tags:g}=await l.call("MEMBER_TAGS_GET",{memberId:t});return g},e[3]=t,e[4]=l,e[5]=a):a=e[5];const r=!!t;let o;return e[6]!==i||e[7]!==a||e[8]!==r?(o={queryKey:i,queryFn:a,staleTime:3e4,enabled:r},e[6]=i,e[7]=a,e[8]=r,e[9]=o):o=e[9],Tt(o)}function ks(){const t=J.c(8),e=ke(),{locator:n}=he(),l=Fe();let i;t[0]!==l?(i=async o=>{const{memberId:g,tagIds:x}=o;return await l.call("MEMBER_TAGS_SET",{memberId:g,tagIds:x})},t[0]=l,t[1]=i):i=t[1];let a;t[2]!==n||t[3]!==e?(a=(o,g)=>{e.invalidateQueries({queryKey:ie.memberTags(n,g.memberId)})},t[2]=n,t[3]=e,t[4]=a):a=t[4];let r;return t[5]!==i||t[6]!==a?(r={mutationFn:i,onSuccess:a,onError:Fs},t[5]=i,t[6]=a,t[7]=r):r=t[7],xe(r)}function Fs(t){G.error(t instanceof Error?t.message:"Failed to update member tags")}function Rt(t){const e=J.c(44),{memberId:n,className:l,disabled:i,placeholder:a,maxDisplay:r}=t,o=i===void 0?!1:i,g=a===void 0?"Add tags...":a,x=r===void 0?2:r,[j,p]=ce.useState(!1),[b,P]=ce.useState(""),{data:R,isLoading:v}=Rs(),N=R===void 0?[]:R,{data:y,isLoading:$}=Ds(n),m=y===void 0?[]:y,c=zs(),f=ks(),I=v||$,w=m.map(Ls);let A;e[0]!==b?(A=S=>S.name.toLowerCase().includes(b.toLowerCase()),e[0]=b,e[1]=A):A=e[1];const z=N.filter(A);let T;e[2]!==b?(T=S=>S.name.toLowerCase()===b.toLowerCase(),e[2]=b,e[3]=T):T=e[3];const K=N.find(T),M=b.trim()&&!K,k=async S=>{const ge=w.includes(S.id)?w.filter(ve=>ve!==S.id):[...w,S.id];await f.mutateAsync({memberId:n,tagIds:ge})},E=async()=>{if(!b.trim())return;const S=await c.mutateAsync(b.trim());await f.mutateAsync({memberId:n,tagIds:[...w,S.id]}),P("")},d=async S=>{const ne=w.filter(ge=>ge!==S);await f.mutateAsync({memberId:n,tagIds:ne})},C=c.isPending||f.isPending,L=Cs;let D;e[4]!==j?(D=()=>p(!j),e[4]=j,e[5]=D):D=e[5];let F;e[6]!==l?(F=$e("h-auto min-h-8 px-2 py-1 justify-start font-normal","hover:bg-accent/50",l),e[6]=l,e[7]=F):F=e[7];const V=o||I,O=I?s.jsx(Xe,{size:14,className:"animate-spin text-muted-foreground"}):m.length>0?s.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[m.slice(0,x).map(Os),m.length>x&&s.jsxs(Ue,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:["+",m.length-x]})]}):s.jsx("span",{className:"text-muted-foreground text-xs",children:g});let Q;e[8]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(Ss,{size:14,className:"ml-1 shrink-0 opacity-50"}),e[8]=Q):Q=e[8];let q;e[9]!==V||e[10]!==O||e[11]!==D||e[12]!==F?(q=s.jsx(ys,{asChild:!0,children:s.jsxs(fe,{variant:"ghost",size:"sm",onClick:D,className:F,disabled:V,children:[O,Q]})}),e[9]=V,e[10]=O,e[11]=D,e[12]=F,e[13]=q):q=e[13];const U=vs,H="w-56 p-0",W="start";let Y;e[14]===Symbol.for("react.memo_cache_sentinel")?(Y=()=>p(!1),e[14]=Y):Y=e[14];const ae=bs,be=!1;let Z;e[15]!==b?(Z=s.jsx(js,{placeholder:"Search or create...",value:b,onValueChange:P,className:"h-9"}),e[15]=b,e[16]=Z):Z=e[16];const le=xs,me=m.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(Ye,{heading:"Selected",children:m.map(S=>s.jsx(Ze,{onSelect:()=>k(S),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ct,{checked:!0,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:S.name})]}),s.jsx("button",{onClick:ne=>{ne.stopPropagation(),d(S.id)},className:"opacity-50 hover:opacity-100",disabled:C,children:s.jsx(_t,{size:14})})]})},S.id))}),s.jsx(yt,{})]}),Re=Ye,je="Available",ze=z.length===0&&!M&&s.jsx(gs,{children:"No tags found."}),pe=z.filter(S=>!w.includes(S.id)).map(S=>s.jsx(Ze,{onSelect:()=>k(S),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ct,{checked:!1,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:S.name})]})},S.id));let oe;e[17]!==Re||e[18]!==ze||e[19]!==pe?(oe=s.jsxs(Re,{heading:je,children:[ze,pe]}),e[17]=Re,e[18]=ze,e[19]=pe,e[20]=oe):oe=e[20];let re;e[21]!==E||e[22]!==C||e[23]!==b||e[24]!==M?(re=M&&s.jsxs(s.Fragment,{children:[s.jsx(yt,{}),s.jsx(Ye,{children:s.jsx(Ze,{onSelect:E,className:"cursor-pointer",disabled:C,children:s.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[C?s.jsx(Xe,{size:14,className:"animate-spin"}):s.jsx(ws,{size:14}),s.jsxs("span",{children:['Create "',b.trim(),'"']})]})})})]}),e[21]=E,e[22]=C,e[23]=b,e[24]=M,e[25]=re):re=e[25];let X;e[26]!==le||e[27]!==me||e[28]!==oe||e[29]!==re?(X=s.jsxs(le,{children:[me,oe,re]}),e[26]=le,e[27]=me,e[28]=oe,e[29]=re,e[30]=X):X=e[30];let ee;e[31]!==ae||e[32]!==Z||e[33]!==X?(ee=s.jsxs(ae,{shouldFilter:be,children:[Z,X]}),e[31]=ae,e[32]=Z,e[33]=X,e[34]=ee):ee=e[34];let te;e[35]!==U||e[36]!==Y||e[37]!==ee?(te=s.jsx(U,{className:H,align:W,onEscapeKeyDown:Y,children:ee}),e[35]=U,e[36]=Y,e[37]=ee,e[38]=te):te=e[38];let se;return e[39]!==L||e[40]!==j||e[41]!==q||e[42]!==te?(se=s.jsxs(L,{open:j,onOpenChange:p,children:[q,te]}),e[39]=L,e[40]=j,e[41]=q,e[42]=te,e[43]=se):se=e[43],se}function Os(t){return s.jsx(Ue,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:t.name},t.id)}function Ls(t){return t.id}const St=["bg-neutral-400","bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500","bg-slate-500"],qs={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function Qe(t){return t?t.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2):"?"}function Bs(t){const e=new Map;for(const[n,l]of Object.entries(qs))e.set(n,l);for(let n=0;n<t.length;n++){const l=t[n];l&&!e.has(l.role)&&e.set(l.role,St[n%St.length]??"bg-neutral-400")}return e}function Ks(t){return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function Ve(t){const e=J.c(79),{role:n,memberId:l,isOwner:i,roleColorMap:a,selectableRoles:r,onRoleChange:o,size:g,className:x}=t,j=g===void 0?"xs":g;let p,b,P,R,v,N,y,$,m,c,f;if(e[0]!==x||e[1]!==i||e[2]!==l||e[3]!==o||e[4]!==n||e[5]!==a||e[6]!==r||e[7]!==j){f=Symbol.for("react.early_return_sentinel");e:{const E=a.get(n)??"bg-neutral-400";if(i){let d;e[19]!==l||e[20]!==o?(d=H=>o(l,H),e[19]=l,e[20]=o,e[21]=d):d=e[21];let C;e[22]!==n?(C=s.jsx("span",{className:"capitalize truncate",children:n}),e[22]=n,e[23]=C):C=e[23];const L=s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("div",{className:$e("size-2 rounded-full shrink-0",E)}),C]});let D;e[24]!==L?(D=s.jsx(st,{children:L}),e[24]=L,e[25]=D):D=e[25];let F;e[26]!==x||e[27]!==j||e[28]!==D?(F=s.jsx(tt,{size:j,className:x,children:D}),e[26]=x,e[27]=j,e[28]=D,e[29]=F):F=e[29];let V;if(e[30]!==a||e[31]!==r){let H;e[33]!==a?(H=W=>{const Y=a.get(W.role)??"bg-neutral-400";return s.jsx(it,{value:W.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:$e("size-3 rounded-full",Y)}),s.jsx("span",{className:"capitalize",children:W.label})]})},W.role)},e[33]=a,e[34]=H):H=e[34],V=r.map(H),e[30]=a,e[31]=r,e[32]=V}else V=e[32];let O;e[35]!==V?(O=s.jsx(nt,{children:V}),e[35]=V,e[36]=O):O=e[36];let Q;e[37]!==i||e[38]!==n||e[39]!==d||e[40]!==F||e[41]!==O?(Q=s.jsx(is,{asChild:!0,children:s.jsx("div",{className:"w-fit",children:s.jsxs(et,{value:n,onValueChange:d,disabled:i,children:[F,O]})})}),e[37]=i,e[38]=n,e[39]=d,e[40]=F,e[41]=O,e[42]=Q):Q=e[42];let q;e[43]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(as,{children:s.jsx("p",{children:"The owner role cannot be changed"})}),e[43]=q):q=e[43];let U;e[44]!==Q?(U=s.jsx(ls,{children:s.jsxs(os,{children:[Q,q]})}),e[44]=Q,e[45]=U):U=e[45],f=U;break e}P=et,$=n,e[46]!==l||e[47]!==o?(m=d=>o(l,d),e[46]=l,e[47]=o,e[48]=m):m=e[48],c=i,b=tt,N=j,y=x,p=st,v="flex items-center gap-2 min-w-0",R=$e("size-2 rounded-full shrink-0",E)}e[0]=x,e[1]=i,e[2]=l,e[3]=o,e[4]=n,e[5]=a,e[6]=r,e[7]=j,e[8]=p,e[9]=b,e[10]=P,e[11]=R,e[12]=v,e[13]=N,e[14]=y,e[15]=$,e[16]=m,e[17]=c,e[18]=f}else p=e[8],b=e[9],P=e[10],R=e[11],v=e[12],N=e[13],y=e[14],$=e[15],m=e[16],c=e[17],f=e[18];if(f!==Symbol.for("react.early_return_sentinel"))return f;let I;e[49]!==R?(I=s.jsx("div",{className:R}),e[49]=R,e[50]=I):I=e[50];let w;e[51]!==n?(w=s.jsx("span",{className:"capitalize truncate",children:n}),e[51]=n,e[52]=w):w=e[52];let A;e[53]!==I||e[54]!==w||e[55]!==v?(A=s.jsxs("div",{className:v,children:[I,w]}),e[53]=I,e[54]=w,e[55]=v,e[56]=A):A=e[56];let z;e[57]!==p||e[58]!==A?(z=s.jsx(p,{children:A}),e[57]=p,e[58]=A,e[59]=z):z=e[59];let T;e[60]!==b||e[61]!==z||e[62]!==N||e[63]!==y?(T=s.jsx(b,{size:N,className:y,children:z}),e[60]=b,e[61]=z,e[62]=N,e[63]=y,e[64]=T):T=e[64];let K;if(e[65]!==a||e[66]!==r){let E;e[68]!==a?(E=d=>{const C=a.get(d.role)??"bg-neutral-400";return s.jsx(it,{value:d.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:$e("size-3 rounded-full",C)}),s.jsx("span",{className:"capitalize",children:d.label})]})},d.role)},e[68]=a,e[69]=E):E=e[69],K=r.map(E),e[65]=a,e[66]=r,e[67]=K}else K=e[67];let M;e[70]!==K?(M=s.jsx(nt,{children:K}),e[70]=K,e[71]=M):M=e[71];let k;return e[72]!==P||e[73]!==T||e[74]!==M||e[75]!==$||e[76]!==m||e[77]!==c?(k=s.jsxs(P,{value:$,onValueChange:m,disabled:c,children:[T,M]}),e[72]=P,e[73]=T,e[74]=M,e[75]=$,e[76]=m,e[77]=c,e[78]=k):k=e[78],k}function wt(t){const e=J.c(51),{member:n,roles:l,onChangeRole:i,onRemove:a,isUpdating:r}=t,o=r===void 0?!1:r,g=n.role==="owner";let x,j,p,b,P,R,v,N,y;if(e[0]!==g||e[1]!==o||e[2]!==n.id||e[3]!==n.role||e[4]!==i||e[5]!==l){let T;e[15]!==n.role?(T=d=>d.role!==n.role&&d.role!=="owner",e[15]=n.role,e[16]=T):T=e[16];const K=l.filter(T);b=At;let M;e[17]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(Et,{size:20}),e[17]=M):M=e[17],e[18]!==g?(y=s.jsx(Pt,{asChild:!0,children:s.jsx(fe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:g,onClick:Qs,children:M})}),e[18]=g,e[19]=y):y=e[19],p=Mt,v="end",N=Vs,j=rs;let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(hs,{size:16}),e[20]=k):k=e[20],e[21]!==o?(R=s.jsxs(cs,{disabled:o,children:[k,"Change Role"]}),e[21]=o,e[22]=R):R=e[22],x=ms;let E;e[23]!==o||e[24]!==n.id||e[25]!==i?(E=d=>{const C=[];return d.isBuiltin||(d.allowsAllStaticPermissions?C.push("Full org access"):d.staticPermissionCount&&d.staticPermissionCount>0&&C.push(`${d.staticPermissionCount} org perm${d.staticPermissionCount!==1?"s":""}`),d.allowsAllConnections?C.push("All connections"):d.connectionCount&&d.connectionCount>0&&C.push(`${d.connectionCount} connection${d.connectionCount!==1?"s":""}`),(d.connectionCount!==0||d.allowsAllConnections)&&(d.allowsAllTools?C.push("all tools"):d.toolCount&&d.toolCount>0&&C.push(`${d.toolCount} tool${d.toolCount!==1?"s":""}`))),s.jsxs(at,{onClick:L=>{L.stopPropagation(),i(n.id,d.role)},disabled:o,children:[d.isBuiltin?s.jsx(fs,{size:16}):s.jsx(us,{size:16}),s.jsxs("span",{className:"flex flex-col",children:[s.jsx("span",{children:d.label}),!d.isBuiltin&&C.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:C.join(", ")})]})]},d.role)},e[23]=o,e[24]=n.id,e[25]=i,e[26]=E):E=e[26],P=K.map(E),e[0]=g,e[1]=o,e[2]=n.id,e[3]=n.role,e[4]=i,e[5]=l,e[6]=x,e[7]=j,e[8]=p,e[9]=b,e[10]=P,e[11]=R,e[12]=v,e[13]=N,e[14]=y}else x=e[6],j=e[7],p=e[8],b=e[9],P=e[10],R=e[11],v=e[12],N=e[13],y=e[14];let $;e[27]!==x||e[28]!==P?($=s.jsx(x,{children:P}),e[27]=x,e[28]=P,e[29]=$):$=e[29];let m;e[30]!==j||e[31]!==R||e[32]!==$?(m=s.jsxs(j,{children:[R,$]}),e[30]=j,e[31]=R,e[32]=$,e[33]=m):m=e[33];let c;e[34]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ds,{}),e[34]=c):c=e[34];let f;e[35]!==n.id||e[36]!==a?(f=T=>{T.stopPropagation(),a(n.id)},e[35]=n.id,e[36]=a,e[37]=f):f=e[37];let I;e[38]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(ps,{size:16}),e[38]=I):I=e[38];let w;e[39]!==f?(w=s.jsxs(at,{variant:"destructive",onClick:f,children:[I,"Remove Member"]}),e[39]=f,e[40]=w):w=e[40];let A;e[41]!==p||e[42]!==w||e[43]!==v||e[44]!==N||e[45]!==m?(A=s.jsxs(p,{align:v,onClick:N,children:[m,c,w]}),e[41]=p,e[42]=w,e[43]=v,e[44]=N,e[45]=m,e[46]=A):A=e[46];let z;return e[47]!==b||e[48]!==A||e[49]!==y?(z=s.jsxs(b,{children:[y,A]}),e[47]=b,e[48]=A,e[49]=y,e[50]=z):z=e[50],z}function Vs(t){return t.stopPropagation()}function Qs(t){return t.stopPropagation()}function Nt(t){const e=J.c(8),{invitationId:n,onCancel:l,isCancelling:i}=t,a=i===void 0?!1:i;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Pt,{asChild:!0,children:s.jsx(fe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Gs,children:s.jsx(Et,{size:20})})}),e[0]=r):r=e[0];let o;e[1]!==n||e[2]!==l?(o=j=>{j.stopPropagation(),l(n)},e[1]=n,e[2]=l,e[3]=o):o=e[3];let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(_t,{size:16}),e[4]=g):g=e[4];let x;return e[5]!==a||e[6]!==o?(x=s.jsxs(At,{children:[r,s.jsx(Mt,{align:"end",onClick:Us,children:s.jsxs(at,{variant:"destructive",onClick:o,disabled:a,children:[g,"Cancel Invitation"]})})]}),e[5]=a,e[6]=o,e[7]=x):x=e[7],x}function Us(t){return t.stopPropagation()}function Gs(t){return t.stopPropagation()}function Js(){const t=J.c(103),{data:e}=ns(),{data:n}=Ms(),l=Es(),i=ke(),{locator:a}=he(),r=lt(),[o,g]=ce.useState(null),[x,j]=ce.useState(null),[p,b]=ce.useState(""),[P,R]=ce.useState("table"),[v,N]=ce.useState("member"),[y,$]=ce.useState("asc"),m=e?.data?.members;let c;t[0]!==v?(c=u=>{v===u?$(ln):(N(u),$("asc"))},t[0]=v,t[1]=c):c=t[1];const f=c;let I=m??[],w=n??[];if(p){const u=p.toLowerCase();I=I.filter(h=>h.user?.name?.toLowerCase().includes(u)||h.user?.email?.toLowerCase().includes(u)||h.role?.toLowerCase().includes(u)),w=w.filter(h=>h.email?.toLowerCase().includes(u)||h.role?.toLowerCase().includes(u))}if(v&&y){let u;t[2]!==y||t[3]!==v?(u=(h,_)=>{let B,de;e:switch(v){case"member":{B=h.user?.name||"",de=_.user?.name||"";break e}case"role":{B=h.role||"",de=_.role||"";break e}case"joined":{B=h.createdAt?typeof h.createdAt=="string"?h.createdAt:h.createdAt.toISOString():"",de=_.createdAt?typeof _.createdAt=="string"?_.createdAt:_.createdAt.toISOString():"";break e}default:return 0}return y==="asc"?B.localeCompare(de):de.localeCompare(B)},t[2]=y,t[3]=v,t[4]=u):u=t[4],I=[...I].sort(u)}const A=I;let z;t[5]!==r?(z=async u=>{const h=await r.organization.removeMember({memberIdOrEmail:u});if(h?.error)throw new Error(h.error.message)},t[5]=r,t[6]=z):z=t[6];let T;t[7]!==a||t[8]!==i?(T=()=>{ue("member_removed"),i.invalidateQueries({queryKey:ie.members(a)}),G.success("Member has been removed from the organization"),g(null)},t[7]=a,t[8]=i,t[9]=T):T=t[9];let K;t[10]!==z||t[11]!==T?(K={mutationFn:z,onSuccess:T,onError:an},t[10]=z,t[11]=T,t[12]=K):K=t[12];const M=xe(K);let k;t[13]!==r?(k=async u=>{const{memberId:h,role:_}=u,B=await r.organization.updateMemberRole({memberId:h,role:[_]});if(B?.error)throw new Error(B.error.message)},t[13]=r,t[14]=k):k=t[14];let E;t[15]!==a||t[16]!==i?(E=(u,h)=>{ue("member_role_updated",{new_role:h.role}),i.invalidateQueries({queryKey:ie.members(a)}),G.success("Member's role has been updated")},t[15]=a,t[16]=i,t[17]=E):E=t[17];let d;t[18]!==k||t[19]!==E?(d={mutationFn:k,onSuccess:E,onError:nn},t[18]=k,t[19]=E,t[20]=d):d=t[20];const C=xe(d);let L;t[21]!==r?(L=async u=>{const{invitationId:h,role:_,email:B}=u,de=await r.organization.cancelInvitation({invitationId:h});if(de?.error)throw new Error(de.error.message);const ot=await r.organization.inviteMember({email:B,role:_});if(ot?.error)throw new Error(ot.error.message)},t[21]=r,t[22]=L):L=t[22];let D;t[23]!==a||t[24]!==i?(D=(u,h)=>{ue("invitation_role_updated",{new_role:h.role}),i.invalidateQueries({queryKey:ie.invitations(a)}),G.success("Invitation role has been updated")},t[23]=a,t[24]=i,t[25]=D):D=t[25];let F;t[26]!==L||t[27]!==D?(F={mutationFn:L,onSuccess:D,onError:sn},t[26]=L,t[27]=D,t[28]=F):F=t[28];const V=xe(F),{roles:O,customRoles:Q}=It();let q;t[29]!==Q?(q=Bs(Q),t[29]=Q,t[30]=q):q=t[30];const U=q;let H;t[31]!==O?(H=O.filter(tn),t[31]=O,t[32]=H):H=t[32];const W=H;let Y;t[33]===Symbol.for("react.memo_cache_sentinel")?(Y={id:"member",header:"Member",render:en,cellClassName:"flex-1 min-w-0",sortable:!0},t[33]=Y):Y=t[33];let ae;t[34]!==U||t[35]!==W||t[36]!==V||t[37]!==C?(ae={id:"role",header:"Role",render:u=>u.type==="member"?s.jsx(Ve,{role:u.data.role,memberId:u.data.id,isOwner:u.data.role==="owner",roleColorMap:U,selectableRoles:W,onRoleChange:(h,_)=>C.mutate({memberId:h,role:_}),className:"w-36"}):s.jsx(Ve,{role:u.data.role,memberId:u.data.id,isOwner:!1,roleColorMap:U,selectableRoles:W,onRoleChange:(h,_)=>V.mutate({invitationId:h,role:_,email:u.data.email}),className:"w-36"}),cellClassName:"w-36 shrink-0",sortable:!0},t[34]=U,t[35]=W,t[36]=V,t[37]=C,t[38]=ae):ae=t[38];let be,Z;t[39]===Symbol.for("react.memo_cache_sentinel")?(be={id:"tags",header:"Tags",render:Xs,cellClassName:"w-40 shrink-0"},Z={id:"joined",header:"Joined",render:Zs,cellClassName:"w-48 shrink-0",sortable:!0},t[39]=be,t[40]=Z):(be=t[39],Z=t[40]);let le;t[41]!==l.cancel.isPending||t[42]!==O||t[43]!==C?(le={id:"actions",header:"",render:u=>u.type==="member"?s.jsx(wt,{member:u.data,roles:O,onChangeRole:(h,_)=>C.mutate({memberId:h,role:_}),onRemove:g,isUpdating:C.isPending}):s.jsx(Nt,{invitationId:u.data.id,onCancel:j,isCancelling:l.cancel.isPending}),cellClassName:"w-12 shrink-0"},t[41]=l.cancel.isPending,t[42]=O,t[43]=C,t[44]=le):le=t[44];let me;t[45]!==ae||t[46]!==le?(me=[Y,ae,be,Z,le],t[45]=ae,t[46]=le,t[47]=me):me=t[47];const Re=me;let je;t[48]===Symbol.for("react.memo_cache_sentinel")?(je=s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(As,{trigger:s.jsx(fe,{children:"Invite Member"})})}),t[48]=je):je=t[48];const ze=je,pe=[...A.map(Ys),...w.filter(Ws).map(Hs)],oe=_e,re=!!x;let X;t[49]===Symbol.for("react.memo_cache_sentinel")?(X=()=>j(null),t[49]=X):X=t[49];let ee;t[50]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsxs(pt,{children:[s.jsx(gt,{children:"Cancel Invitation"}),s.jsx(xt,{children:"Are you sure you want to cancel this invitation? The invitee will no longer be able to join the organization with this invitation."})]}),t[50]=ee):ee=t[50];let te;t[51]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx(bt,{children:"Keep Invitation"}),t[51]=te):te=t[51];let se;t[52]!==l.cancel||t[53]!==x?(se=()=>{x&&(l.cancel.mutate(x),j(null))},t[52]=l.cancel,t[53]=x,t[54]=se):se=t[54];let S;t[55]!==l.cancel.isPending||t[56]!==se?(S=s.jsxs(ut,{children:[ee,s.jsxs(ft,{children:[te,s.jsx(ht,{onClick:se,disabled:l.cancel.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Cancel Invitation"})]})]}),t[55]=l.cancel.isPending,t[56]=se,t[57]=S):S=t[57];let ne;t[58]!==re||t[59]!==S?(ne=s.jsx(jt,{open:re,onOpenChange:X,children:S}),t[58]=re,t[59]=S,t[60]=ne):ne=t[60];const ge=!!o;let ve;t[61]===Symbol.for("react.memo_cache_sentinel")?(ve=()=>g(null),t[61]=ve):ve=t[61];let Oe;t[62]===Symbol.for("react.memo_cache_sentinel")?(Oe=s.jsxs(pt,{children:[s.jsx(gt,{children:"Remove Member"}),s.jsx(xt,{children:"Are you sure you want to remove this member from the organization? This action cannot be undone."})]}),t[62]=Oe):Oe=t[62];let Le;t[63]===Symbol.for("react.memo_cache_sentinel")?(Le=s.jsx(bt,{children:"Cancel"}),t[63]=Le):Le=t[63];let Ce;t[64]!==o||t[65]!==M?(Ce=()=>o&&M.mutate(o),t[64]=o,t[65]=M,t[66]=Ce):Ce=t[66];let ye;t[67]!==M.isPending||t[68]!==Ce?(ye=s.jsxs(ut,{children:[Oe,s.jsxs(ft,{children:[Le,s.jsx(ht,{onClick:Ce,disabled:M.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]}),t[67]=M.isPending,t[68]=Ce,t[69]=ye):ye=t[69];let Se;t[70]!==ge||t[71]!==ye?(Se=s.jsx(jt,{open:ge,onOpenChange:ve,children:ye}),t[70]=ge,t[71]=ye,t[72]=Se):Se=t[72];const Ge=_e,Je=_e,zt="flex flex-col gap-6";let we,Ne;t[73]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(Ps,{}),Ne=s.jsx(_e.Title,{children:"Members"}),t[73]=we,t[74]=Ne):(we=t[73],Ne=t[74]);let qe;t[75]===Symbol.for("react.memo_cache_sentinel")?(qe=u=>{u.key==="Escape"&&(b(""),u.target.blur())},t[75]=qe):qe=t[75];let Te;t[76]!==p?(Te=s.jsx(qt,{value:p,onChange:b,placeholder:"Search members...",className:"w-full md:w-[375px]",onKeyDown:qe}),t[76]=p,t[77]=Te):Te=t[77];let Be;t[78]===Symbol.for("react.memo_cache_sentinel")?(Be=[{id:"member",label:"Name"},{id:"role",label:"Role"},{id:"joined",label:"Joined"}],t[78]=Be):Be=t[78];let Ie;t[79]!==f||t[80]!==y||t[81]!==v||t[82]!==P?(Ie=s.jsx(Lt,{viewMode:P,onViewModeChange:R,sortKey:v,sortDirection:y,onSort:f,sortOptions:Be}),t[79]=f,t[80]=y,t[81]=v,t[82]=P,t[83]=Ie):Ie=t[83];let Ae;t[84]!==Te||t[85]!==Ie?(Ae=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[Te,Ie]}),ze]}),t[84]=Te,t[85]=Ie,t[86]=Ae):Ae=t[86];const He=P==="cards"?s.jsx("div",{children:pe.length===0?s.jsx(We,{title:"No members found",description:p?`No members match "${p}"`:"Invite members to get started."}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:pe.map(u=>{if(u.type==="invitation")return s.jsxs(vt,{className:"transition-colors relative opacity-75",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(Nt,{invitationId:u.data.id,onCancel:j,isCancelling:l.cancel.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(De,{fallback:Qe(u.data.email),shape:"circle",size:"lg",className:"shrink-0"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:u.data.email}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Ue,{variant:"outline",className:"w-fit text-amber-600 border-amber-400",children:"Pending"})}),s.jsx(Ve,{role:u.data.role,memberId:u.data.id,isOwner:!1,roleColorMap:U,selectableRoles:W,onRoleChange:(_,B)=>V.mutate({invitationId:_,role:B,email:u.data.email}),className:"w-fit"})]})]})]},`inv-${u.data.id}`);const h=u.data;return s.jsxs(vt,{className:"transition-colors relative",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(wt,{member:h,roles:O,onChangeRole:(_,B)=>C.mutate({memberId:_,role:B}),onRemove:g,isUpdating:C.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(De,{url:h.user?.image??void 0,fallback:Qe(h.user?.name),shape:"circle",size:"lg",className:"shrink-0"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:h.user?.name||"Unknown"}),s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:h.user?.email}),s.jsx(Ve,{role:h.role,memberId:h.id,isOwner:h.role==="owner",roleColorMap:U,selectableRoles:W,onRoleChange:(_,B)=>C.mutate({memberId:_,role:B}),className:"w-fit"}),s.jsx(Rt,{memberId:h.id,maxDisplay:3})]})]})]},h.id)})})}):s.jsx(Bt,{columns:Re,data:pe,isLoading:!1,sortKey:v,sortDirection:y,onSort:f,emptyState:p?s.jsx(We,{title:"No members found",description:`No members match "${p}"`}):s.jsx(We,{title:"No members found",description:"Invite members to get started."})});let Pe;t[87]!==we||t[88]!==Ne||t[89]!==Ae||t[90]!==He?(Pe=s.jsxs("div",{className:zt,children:[we,Ne,Ae,He]}),t[87]=we,t[88]=Ne,t[89]=Ae,t[90]=He,t[91]=Pe):Pe=t[91];let Me;t[92]!==Je.Body||t[93]!==Pe?(Me=s.jsx(Je.Body,{children:Pe}),t[92]=Je.Body,t[93]=Pe,t[94]=Me):Me=t[94];let Ee;t[95]!==Ge.Content||t[96]!==Me?(Ee=s.jsx(Ge.Content,{children:Me}),t[95]=Ge.Content,t[96]=Me,t[97]=Ee):Ee=t[97];let Ke;return t[98]!==oe||t[99]!==ne||t[100]!==Se||t[101]!==Ee?(Ke=s.jsxs(oe,{children:[ne,Se,Ee]}),t[98]=oe,t[99]=ne,t[100]=Se,t[101]=Ee,t[102]=Ke):Ke=t[102],Ke}function Hs(t){return{type:"invitation",data:t}}function Ws(t){return t.status==="pending"}function Ys(t){return{type:"member",data:t}}function Zs(t){return t.type==="member"?s.jsx("span",{className:"text-sm text-foreground",children:t.data.createdAt?Ks(t.data.createdAt):"N/A"}):s.jsx(Ue,{variant:"outline",children:"Pending"})}function Xs(t){return t.type==="member"?s.jsx(Rt,{memberId:t.data.id,maxDisplay:2}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"-"})}function en(t){return t.type==="member"?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(De,{url:t.data.user?.image??void 0,fallback:Qe(t.data.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.data.user?.name||"Unknown"}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.data.user?.email})]})]}):s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(De,{fallback:Qe(t.data.email),shape:"circle",size:"sm"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.data.email}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:"Invitation sent"})]})]})}function tn(t){return t.role!=="owner"}function sn(t,e){ue("invitation_role_update_failed",{new_role:e.role,error:t instanceof Error?t.message:String(t)}),G.error(t instanceof Error?t.message:"Failed to update invitation role")}function nn(t,e){ue("member_role_update_failed",{new_role:e.role,error:t instanceof Error?t.message:String(t)}),G.error(t instanceof Error?t.message:"Failed to update role")}function an(t){ue("member_remove_failed",{error:t instanceof Error?t.message:String(t)}),G.error(t instanceof Error?t.message:"Failed to remove member")}function ln(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function on(){const t=J.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(_e,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:"Failed to load members"})})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Ot,{fallback:e,children:s.jsx(ce.Suspense,{fallback:s.jsx(_e,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Xe,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Js,{})})}),t[1]=n):n=t[1],n}function ni(){const t=J.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ns,{capability:"members:manage",area:"members",children:s.jsx(on,{})}),t[0]=e):e=t[0],e}export{ni as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as L,j as f,r as p,ak as O}from"./index-
|
|
1
|
+
import{e as L,j as f,r as p,ak as O}from"./index-DtdRCqfT.js";import{l as I,F as $}from"./index-qCsR4teM.js";import{S as N}from"./chat-context-CsxEe8Dk.js";async function K(e){const t=e.getModel();if(!t)throw new Error("[Monaco] No model found in editor");const n=t.getValue(),i=n.replace(/export default (async )?function/,"export default $1function __default")+`
|
|
2
2
|
type __ExpandRecursively<T> = T extends (...args: infer A) => infer R
|
|
3
3
|
? (...args: __ExpandRecursively<A>) => __ExpandRecursively<R>
|
|
4
4
|
: T extends object
|