decocms 4.125.5 → 4.126.1
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-1e3-NcEA.js → AlertCircle-Cpl_iMHY.js} +1 -1
- package/dist/client/assets/{AreaChart-CB1-fSKl.js → AreaChart-BqFUuFcm.js} +1 -1
- package/dist/client/assets/{ArrowRight-B-wHAJWT.js → ArrowRight-NqG0gPh-.js} +1 -1
- package/dist/client/assets/{ArrowUp-DI1fyC1G.js → ArrowUp-DMJUikwr.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BWyzrLQV.js → ArrowUpRight-CtURRnV0.js} +1 -1
- package/dist/client/assets/{Check-LKA0FKR0.js → Check-dpauEaNI.js} +1 -1
- package/dist/client/assets/{CheckCircle-Dh-3VdHB.js → CheckCircle-zW46MQTo.js} +1 -1
- package/dist/client/assets/{ChevronDown-B3fDqERa.js → ChevronDown-BQLnN9E6.js} +1 -1
- package/dist/client/assets/{ChevronRight-Dkp8mDOd.js → ChevronRight-CyiD6-MW.js} +1 -1
- package/dist/client/assets/{ChevronUp-Cm7VcWLZ.js → ChevronUp-DQvrAigY.js} +1 -1
- package/dist/client/assets/{Copy01-uQh3Q5Fv.js → Copy01-DDeCwAgK.js} +1 -1
- package/dist/client/assets/{DotsVertical-DKanPfz6.js → DotsVertical-Bj4PS0aF.js} +1 -1
- package/dist/client/assets/{Eye-SCLKEZSh.js → Eye-Dfg-461O.js} +1 -1
- package/dist/client/assets/{FilterLines-13dE_TWB.js → FilterLines-CxHovx4d.js} +1 -1
- package/dist/client/assets/{HardDrive-DViLU95V.js → HardDrive-C67jRlzv.js} +1 -1
- package/dist/client/assets/{Key01-CgioJ7nW.js → Key01-D7-mKS4d.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Yz5NzG-w.js → LayoutLeft-Dnk9I__a.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Di_tOfr7.js → LinkExternal01-DtG8qR-V.js} +1 -1
- package/dist/client/assets/{LogOut01-r12Fp93g.js → LogOut01-Bv49wu0L.js} +1 -1
- package/dist/client/assets/{Monitor01-C_dYkXdo.js → Monitor01-DEsYEg9j.js} +1 -1
- package/dist/client/assets/Palette-3AyXb_ds.js +1 -0
- package/dist/client/assets/{Play-CVGtm9ao.js → Play-C5qDNLgC.js} +1 -1
- package/dist/client/assets/{Plus-CLG5QKCr.js → Plus-C7p4TBsq.js} +1 -1
- package/dist/client/assets/{SearchLg-CkXJjhdf.js → SearchLg-BP6dxoOu.js} +1 -1
- package/dist/client/assets/{SearchMd-DBj7HhoW.js → SearchMd-CFZ8th88.js} +1 -1
- package/dist/client/assets/{Settings02-BIGi-T7s.js → Settings02-BRYke4o3.js} +1 -1
- package/dist/client/assets/{Shield01-ksb0VZpA.js → Shield01-DObW8vGC.js} +1 -1
- package/dist/client/assets/{Star01-lWHLfmir.js → Star01-b06OrJx9.js} +1 -1
- package/dist/client/assets/{Stars01-B3jznQQ4.js → Stars01-CwezkrCj.js} +1 -1
- package/dist/client/assets/{Stars02-DpsxkqJO.js → Stars02-CV1WX5s1.js} +1 -1
- package/dist/client/assets/{Sun-tOsjvEis.js → Sun-BYgqmEv8.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Dw_LQc0f.js → SwitchHorizontal01-D9GLmxcG.js} +1 -1
- package/dist/client/assets/Tool01-CbNqThfz.js +1 -0
- package/dist/client/assets/Tool02-BK6vOVj2.js +1 -0
- package/dist/client/assets/{Trash01-CWIa_mDx.js → Trash01-CZfSiRn_.js} +1 -1
- package/dist/client/assets/{TrendUp01-CYCVS1zr.js → TrendUp01-CbzGmSk7.js} +1 -1
- package/dist/client/assets/{Upload01-CPD95nN4.js → Upload01-OvmEXaXy.js} +1 -1
- package/dist/client/assets/{User01-NxrNjn_h.js → User01-mA16LPDW.js} +1 -1
- package/dist/client/assets/{Users01-DvtVVxdG.js → Users01-D3kMDHBl.js} +1 -1
- package/dist/client/assets/{Users03-3lwc9liE.js → Users03-CMTgzssO.js} +1 -1
- package/dist/client/assets/{X-BYXAQs6v.js → X-Ds6dL0ec.js} +1 -1
- package/dist/client/assets/{XCircle-B3aYrCCW.js → XCircle-Bw2f1-oB.js} +1 -1
- package/dist/client/assets/{XClose-CW0R6bEe.js → XClose-CggKQboo.js} +1 -1
- package/dist/client/assets/{Zap-CrMVm5NK.js → Zap-cm7wIsil.js} +1 -1
- package/dist/client/assets/{ZapSquare-DGe1cTc7.js → ZapSquare-CULLx7Oa.js} +1 -1
- package/dist/client/assets/{access-gate-D11_1kHO.js → access-gate-B5Uu6KI_.js} +1 -1
- package/dist/client/assets/{add-section-modal-NM4MqPkB.js → add-section-modal-C0j8sHqV.js} +1 -1
- package/dist/client/assets/agent-icon-ZuDh9-Hb.js +1 -0
- package/dist/client/assets/agents-list-BwHTZnDL.js +1 -0
- package/dist/client/assets/ai-providers-CUGZxUFM.js +1 -0
- package/dist/client/assets/{alert-BdtEy3y8.js → alert-DktlcBN9.js} +1 -1
- package/dist/client/assets/{alert-dialog-DwnblylQ.js → alert-dialog-iJ0nuAo2.js} +2 -2
- package/dist/client/assets/app-editor-DKXC32M1.js +1 -0
- package/dist/client/assets/{auth-C4POVeVe.js → auth--O1w_iKV.js} +1 -1
- package/dist/client/assets/{auth-catchall-ZDYFC2A8.js → auth-catchall-C66NRByx.js} +1 -1
- package/dist/client/assets/{auth-entry-DoyULuRf.js → auth-entry-DKS3G1uz.js} +1 -1
- package/dist/client/assets/{auth-split-layout-C2XKKVOK.js → auth-split-layout-DcrydIAL.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-iHWUIj8u.js → authenticate-and-persist-oauth-BimYrVCh.js} +1 -1
- package/dist/client/assets/{automation-list-row-BDIVGPMe.js → automation-list-row-CB0Na4Io.js} +1 -1
- package/dist/client/assets/automation-runs-CjoeGDB3.js +180 -0
- package/dist/client/assets/automations-5W4kO3k8.js +1 -0
- package/dist/client/assets/{avatar-BQF1QGjq.js → avatar-BaVe5mnj.js} +1 -1
- package/dist/client/assets/{badge-BbmHyS30.js → badge-rSCRRNZZ.js} +1 -1
- package/dist/client/assets/{block-document-TZNj_QYY.js → block-document-BDVs9E35.js} +3 -3
- package/dist/client/assets/{brand-context-6vJcLMFN.js → brand-context-DXRoGovW.js} +1 -1
- package/dist/client/assets/{buckets-BhsiEut2.js → buckets-iue9Ud7d.js} +1 -1
- package/dist/client/assets/bulk-category-panel-DlUIZJ14.js +1 -0
- package/dist/client/assets/{calendar-DV0NS9xq.js → calendar-B4BM6mn9.js} +1 -1
- package/dist/client/assets/{capability-load-error-ObIFsfE9.js → capability-load-error-C19nQZEJ.js} +1 -1
- package/dist/client/assets/{card-DcA1Rwjs.js → card-CCT9DM3i.js} +1 -1
- package/dist/client/assets/category-editor-B0T-VrR6.js +1 -0
- package/dist/client/assets/chat-context-BBbr98oD.js +36 -0
- package/dist/client/assets/{checkbox-DsDzIgcJ.js → checkbox-Bq4_WPl3.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CHUsfOPQ.js → cli-auth-success-CNtuqj7e.js} +1 -1
- package/dist/client/assets/collection-detail-DQNU4HiQ.js +1 -0
- package/dist/client/assets/{collection-display-button-Bs1t2pp4.js → collection-display-button-BXR6o3H2.js} +1 -1
- package/dist/client/assets/{collection-search-zQnUIpxo.js → collection-search-BtCuCV16.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CXRyAsZ4.js → collection-table-wrapper-C_cazobp.js} +1 -1
- package/dist/client/assets/{collection-tabs-B-9Urj68.js → collection-tabs-0Qyek4_u.js} +1 -1
- package/dist/client/assets/{command-CaEk5uho.js → command-2wvo7x41.js} +1 -1
- package/dist/client/assets/commerce-onboarding-CL4fDsdf.js +1 -0
- package/dist/client/assets/{companions-core-Bua_v2zd.js → companions-core-D1MZ9B1U.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-CxqDr22T.js → connect-desktop-dialog-BuM5aUqF.js} +1 -1
- package/dist/client/assets/{connect-BNr7HDJf.js → connect-gUMrTotC.js} +1 -1
- package/dist/client/assets/{connection-DPLpTOu5.js → connection-B0_6E7Mv.js} +1 -1
- package/dist/client/assets/{connection-card-CfMynI7E.js → connection-card-CD-x-wIk.js} +1 -1
- package/dist/client/assets/connection-detail-BuJnU9wM.js +1 -0
- package/dist/client/assets/{connection-form-helpers-BABNaeU1.js → connection-form-helpers-bxVBlV5J.js} +1 -1
- package/dist/client/assets/connections-HgZRNGX4.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-C_GcVLtN.js → decopilot-sse-pool-zU_w0iZh.js} +1 -1
- package/dist/client/assets/{dialog-CzDwjrNV.js → dialog-C1Qgh1pV.js} +1 -1
- package/dist/client/assets/{domain-settings-B_R_4nb3.js → domain-settings-Dr8-E0BO.js} +1 -1
- package/dist/client/assets/{drawer-CSHRJeTj.js → drawer-C-awTSYf.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CSgtqrA3.js → dropdown-menu-DnVtnirM.js} +1 -1
- package/dist/client/assets/{empty-state-CwB9YNml.js → empty-state-t-xxj99b.js} +1 -1
- package/dist/client/assets/{extract-connection-data-ChU9AlhE.js → extract-connection-data-D2Q5eAdA.js} +1 -1
- package/dist/client/assets/file-explorer-YJoVbzpR.js +2 -0
- package/dist/client/assets/{form-CJlgALpE.js → form-Bcx3Dx5v.js} +1 -1
- package/dist/client/assets/{general-KzB4_6Wn.js → general-CTIKCAQW.js} +1 -1
- package/dist/client/assets/{github-repo-picker-DeAiQyIc.js → github-repo-picker-CfFhjmhR.js} +1 -1
- package/dist/client/assets/{hooks-CvwQxo-K.js → hooks-BRAlfwVg.js} +1 -1
- package/dist/client/assets/{index-D8ngUVkT.js → index-25tDLcHQ.js} +1 -1
- package/dist/client/assets/{index-CpW_ejWe.js → index-5tHCzznE.js} +1 -1
- package/dist/client/assets/index-75oUoREO.js +665 -0
- package/dist/client/assets/{index-CSZh49Ui.js → index-BFHC2rlf.js} +2 -2
- package/dist/client/assets/{index-DLEyNPFn.js → index-CRfJJjBr.js} +1 -1
- package/dist/client/assets/{index-DKhbAOZU.js → index-CTwgLDWF.js} +3 -3
- package/dist/client/assets/{index-DaeJeAuV.js → index-C_mT0QTy.js} +1 -1
- package/dist/client/assets/{index-Dk9RGAqb.js → index-D0GbPI_R.js} +31 -31
- package/dist/client/assets/index-DMXNbwjD.js +1 -0
- package/dist/client/assets/{index-BF9tZwJg.js → index-pNi6sXYH.js} +2 -2
- package/dist/client/assets/{index-Dm21RzCu.js → index-poTj2wxK.js} +1 -1
- package/dist/client/assets/{index-redirect-CiF0eU2o.js → index-redirect-D_UJBrMZ.js} +1 -1
- package/dist/client/assets/{input-C-gHIQip.js → input-Bb4p9_ik.js} +1 -1
- package/dist/client/assets/{integration-icon-DBUjxWMb.js → integration-icon-bG23TCVO.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-CaK4ahsW.js → invite-member-dialog-BSPugAve.js} +1 -1
- package/dist/client/assets/{label-D9aEMZqo.js → label-5xpx6MdG.js} +1 -1
- package/dist/client/assets/{layout-BrB2JTzM.js → layout-q_JOMITt.js} +1 -1
- package/dist/client/assets/{login-Lw37QqB4.js → login-DWFYfzVD.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Br5ozXBx.js → mcp-oauth-I-PLDGs0.js} +1 -1
- package/dist/client/assets/{members-CBNwHdHU.js → members-DAGQnraC.js} +1 -1
- package/dist/client/assets/monaco-editor-3ZmYAdL5.js +19 -0
- package/dist/client/assets/{monitoring-stats-row-B0nxijUM.js → monitoring-stats-row-D-FdpFBv.js} +1 -1
- package/dist/client/assets/{multi-select-DoaVr0FT.js → multi-select-CCg5PDqH.js} +1 -1
- package/dist/client/assets/{oauth-callback-BPUIN1-y.js → oauth-callback-D3gHvTLm.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DH8liZ11.js → oauth-callback-ai-provider-D0DSENaB.js} +1 -1
- package/dist/client/assets/onboarding-Bor5OprO.js +1 -0
- package/dist/client/assets/{org-install-DTLkzmIJ.js → org-install-B0gCH-Nk.js} +1 -1
- package/dist/client/assets/{org-layout-CFv53iXd.js → org-layout-BWKTyxWj.js} +1 -1
- package/dist/client/assets/{organization-choice-D1ddIq9q.js → organization-choice-DWfbtdFz.js} +1 -1
- package/dist/client/assets/{orgs-D8ijCQdC.js → orgs-BtRV84O-.js} +1 -1
- package/dist/client/assets/{page-seo-form-C7Dzevsc.js → page-seo-form-BFCjEKMU.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CgVitSBt.js +1 -0
- package/dist/client/assets/{popover-C2fPnPJt.js → popover-BqPUB_i2.js} +1 -1
- package/dist/client/assets/post-editor-MaKq00sv.js +1 -0
- package/dist/client/assets/{primitives-FVRYsTWJ.js → primitives-DtK7id8m.js} +1 -1
- package/dist/client/assets/{profile-gw5qYABl.js → profile-CN9LLarl.js} +1 -1
- package/dist/client/assets/project-app-view-D-9tjTDx.js +1 -0
- package/dist/client/assets/record-editor-DoN02fjB.js +1 -0
- package/dist/client/assets/redirect-editor-D5Na_rRm.js +1 -0
- package/dist/client/assets/registry-BA7wbNAk.js +2 -0
- package/dist/client/assets/{registry-layout-Bp5nCSQt.js → registry-layout-XctP0_TB.js} +4 -4
- package/dist/client/assets/{reports-jd3NPFMI.js → reports-BBeGN80e.js} +2 -2
- package/dist/client/assets/{require-capability-L7H5SRt9.js → require-capability-2rozIXBv.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BfZFGRtL.js → required-auth-layout-pINrUhAT.js} +1 -1
- package/dist/client/assets/{reset-password-HKWCKRZw.js → reset-password-sGF0Deja.js} +1 -1
- package/dist/client/assets/roles-CtVuRlNg.js +1 -0
- package/dist/client/assets/{search-input-BI1enB-b.js → search-input-DHMmvRu9.js} +1 -1
- package/dist/client/assets/{secrets-BfLNMBsl.js → secrets-Cek9nNDM.js} +1 -1
- package/dist/client/assets/sections-editor-KKjVHQIb.js +2 -0
- package/dist/client/assets/{select-Bd1WKGSJ.js → select-JTf4HMkB.js} +1 -1
- package/dist/client/assets/{select-model-BeSzDzZp.js → select-model-DeVAqDr8.js} +2 -2
- package/dist/client/assets/{self-tool-result-D85DyOHM.js → self-tool-result-JVOqtq7F.js} +1 -1
- package/dist/client/assets/seo-editor-BKn-yjw0.js +1 -0
- package/dist/client/assets/settings-layout-0HfTLbLa.js +1 -0
- package/dist/client/assets/{settings-section-Dh6zLap9.js → settings-section-Duse8CF5.js} +1 -1
- package/dist/client/assets/shell-controls-CjdX-cXs.js +1 -0
- package/dist/client/assets/shell-layout-BX_6t6Y4.js +1 -0
- package/dist/client/assets/{sidebar-DBzYJLC2.js → sidebar-JCplCzUs.js} +1 -1
- package/dist/client/assets/{skeleton-DoNQnm-q.js → skeleton-rG0lAer-.js} +1 -1
- package/dist/client/assets/{sso-TkJUyr_G.js → sso-DZif8bEF.js} +1 -1
- package/dist/client/assets/{store-DdPYyI-G.js → store-DSniQ8uA.js} +1 -1
- package/dist/client/assets/store-registry-7wOo-ziX.js +2 -0
- package/dist/client/assets/{studio-tools-CFgWeCBk.js → studio-tools-CVP_bYI3.js} +1 -1
- package/dist/client/assets/{switch-J9ypA9K4.js → switch-RfqMPlNx.js} +1 -1
- package/dist/client/assets/tab-id-6SxTM-85.js +1 -0
- package/dist/client/assets/{table-CIOCQP8H.js → table-CkAONPU-.js} +1 -1
- package/dist/client/assets/{tabs-BBm6nSot.js → tabs-C6CALd7M.js} +1 -1
- package/dist/client/assets/{textarea-CQzBh7SW.js → textarea-BDUOK9v4.js} +1 -1
- package/dist/client/assets/{toggle-group-DaeRkjf6.js → toggle-group-BJ3nTIOw.js} +1 -1
- package/dist/client/assets/toolbar-BbjlhC11.js +1 -0
- package/dist/client/assets/{tooltip-xp77jFs4.js → tooltip-CZxZ-Bns.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Bujq_lmM.js → use-ai-providers-RLFjMIPM.js} +1 -1
- package/dist/client/assets/{use-api-keys-CLc8cxOV.js → use-api-keys-Yfc55xX1.js} +1 -1
- package/dist/client/assets/{use-automations-m1Zli3xa.js → use-automations-DMIHt0qx.js} +1 -1
- package/dist/client/assets/{use-autosave-BT7goSxj.js → use-autosave-CTaJVuYe.js} +1 -1
- package/dist/client/assets/{use-capability-DHlRnvUE.js → use-capability-C9LPdJIR.js} +1 -1
- package/dist/client/assets/{use-clock-tick-jphDPs9A.js → use-clock-tick-CF0pPFJP.js} +1 -1
- package/dist/client/assets/{use-connection-BsS-3rZB.js → use-connection-D67Pe6aW.js} +1 -1
- package/dist/client/assets/{use-copy-DmTk3Ltj.js → use-copy-3pbdZZcV.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-C2sWKZ2h.js → use-create-virtual-mcp-DOgSWB_T.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-C7P_JRA0.js → use-debounced-autosave-B7CCzcf-.js} +1 -1
- package/dist/client/assets/{use-debounced-value-D9jV_d1U.js → use-debounced-value-DSrcUzF-.js} +1 -1
- package/dist/client/assets/use-deco-credits-BEDSGMQk.js +1 -0
- package/dist/client/assets/{use-decopilot-events-B3KnAJRh.js → use-decopilot-events-DqMtcih3.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DqznTHaH.js → use-delete-connection-CeKf58YN.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BFdTIDOz.js → use-deployment-admin-BAJ25R18.js} +1 -1
- package/dist/client/assets/{use-file-configs-D6Dg-9sN.js → use-file-configs-eEXpH4IT.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CbSN3uty.js → use-infinite-scroll-CUTwghko.js} +1 -1
- package/dist/client/assets/{use-join-requests-avqI9CYZ.js → use-join-requests-DSCKcWR6.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-UXgrVZIV.js → use-mcp-auth-status-GN_90IVc.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Bzvvd0Df.js → use-mcp-client-2qqsLKMv.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-IcUfyh43.js → use-mcp-tools-DYZgnU0f.js} +1 -1
- package/dist/client/assets/{use-members-Cf3JeQ7o.js → use-members-BBMl3rpc.js} +1 -1
- package/dist/client/assets/{use-mobile-DQ8jManM.js → use-mobile-orl9RI6e.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-D_vSOLwA.js → use-navigate-to-agent-BL6ciQ9Y.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-B1nrzsgv.js → use-org-auth-client-nWz-MFtZ.js} +1 -1
- package/dist/client/assets/{use-org-sso-w9j-Ok-z.js → use-org-sso-D-Dpc7wL.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DPbFWCpb.js → use-organization-roles-DuvB4P7M.js} +1 -1
- package/dist/client/assets/{use-organization-settings-zX_T-3XG.js → use-organization-settings-DcpRbwzw.js} +1 -1
- package/dist/client/assets/{use-registry-app-DdwkqhPA.js → use-registry-app-CLQNyM7N.js} +1 -1
- package/dist/client/assets/{use-registry-connections-C529xEPn.js → use-registry-connections-BgFdJfUy.js} +1 -1
- package/dist/client/assets/{use-secrets-CTWWthzy.js → use-secrets-DuyNYvJ7.js} +1 -1
- package/dist/client/assets/{use-status-sounds-D-dtBAQ9.js → use-status-sounds-CO1cS1Qf.js} +1 -1
- package/dist/client/assets/{use-view-mode-CQpQIlsB.js → use-view-mode-Ck3q6mF-.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BP-M67aZ.js → use-virtual-mcp-DYkiFIJC.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DwwDCJAw.js +1 -0
- package/dist/client/assets/{useQueries-b2s80Vy2.js → useQueries-DNJ2_DVv.js} +1 -1
- package/dist/client/assets/{useRouterState-BE3l9A_t.js → useRouterState-CSvDrQv7.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DOVA9lC8.js +1 -0
- package/dist/client/assets/{users-BPFw8x87.js → users-NNxyxZtX.js} +1 -1
- package/dist/client/assets/variant-calendar-BotkXpCr.js +1 -0
- package/dist/client/assets/{view-mode-toggle-Dn7I7z16.js → view-mode-toggle-B0C9EwSq.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/Globe01-CEh6-y49.js +0 -1
- package/dist/client/assets/Globe04-B4VpGXlx.js +0 -1
- package/dist/client/assets/Image01-CMEjSR3M.js +0 -1
- package/dist/client/assets/Package-R2sM0vCm.js +0 -1
- package/dist/client/assets/Palette-CsQxyyrG.js +0 -1
- package/dist/client/assets/Tool01-B0759esA.js +0 -1
- package/dist/client/assets/Tool02-DPXeBg9E.js +0 -1
- package/dist/client/assets/ZoomOut-B-F-8cp0.js +0 -1
- package/dist/client/assets/agent-icon-E6ioveGx.js +0 -1
- package/dist/client/assets/agents-list-Da5tnSPr.js +0 -1
- package/dist/client/assets/ai-providers-BWFFEYZL.js +0 -1
- package/dist/client/assets/app-editor-CdLxuu_H.js +0 -1
- package/dist/client/assets/automation-runs-CfKwQe7C.js +0 -87
- package/dist/client/assets/automations-BCQxf0NT.js +0 -1
- package/dist/client/assets/autosend-CMYVBxZV.js +0 -1
- package/dist/client/assets/bulk-category-panel-D5jThLH-.js +0 -1
- package/dist/client/assets/category-editor-Zpp2vnMR.js +0 -1
- package/dist/client/assets/chat-context-BF6sak7i.js +0 -36
- package/dist/client/assets/collection-detail-BNdX0SIB.js +0 -1
- package/dist/client/assets/commerce-onboarding-CiS9fZfY.js +0 -1
- package/dist/client/assets/connection-detail-B0e-9hXG.js +0 -1
- package/dist/client/assets/connections-Cy3k4Q8y.js +0 -1
- package/dist/client/assets/file-explorer-Brc8sEiI.js +0 -2
- package/dist/client/assets/file-type-icon-_JzjFo75.js +0 -94
- package/dist/client/assets/files-BVF6I-9K.js +0 -1
- package/dist/client/assets/index-CRECkoeT.js +0 -11
- package/dist/client/assets/index-CwhgWx3d.js +0 -492
- package/dist/client/assets/index-EFMlI3jy.js +0 -174
- package/dist/client/assets/index-LUmU4Q-i.js +0 -1
- package/dist/client/assets/location-BpLtHjTZ.js +0 -1
- package/dist/client/assets/monaco-editor-CIeX3g7j.js +0 -9
- package/dist/client/assets/onboarding-Dhh44q6X.js +0 -1
- package/dist/client/assets/page-seo-sheet-o_DqZuF2.js +0 -1
- package/dist/client/assets/post-editor-Bq8RGMDX.js +0 -1
- package/dist/client/assets/project-app-view-CKq51jV9.js +0 -1
- package/dist/client/assets/record-editor-aUwWcdAc.js +0 -1
- package/dist/client/assets/redirect-editor-CdIq7WyN.js +0 -1
- package/dist/client/assets/registry-CuS81odv.js +0 -2
- package/dist/client/assets/roles-BfuLXfWh.js +0 -1
- package/dist/client/assets/sections-editor-BEWC-c1n.js +0 -2
- package/dist/client/assets/seo-editor-Cr0IAZUG.js +0 -1
- package/dist/client/assets/settings-layout-nbprtkao.js +0 -1
- package/dist/client/assets/shell-controls-DmSPQaRT.js +0 -1
- package/dist/client/assets/shell-layout-DCFL_zE0.js +0 -1
- package/dist/client/assets/store-registry-B8K0dTh3.js +0 -2
- package/dist/client/assets/tab-id-BijBBRwE.js +0 -1
- package/dist/client/assets/toolbar-CoHzPWWi.js +0 -1
- package/dist/client/assets/toolbar-icon-button-BGQ8DzLo.js +0 -1
- package/dist/client/assets/use-deco-credits-BW-cf-qH.js +0 -1
- package/dist/client/assets/useInfiniteQuery-64uGdBMx.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DYsYorpe.js +0 -1
- package/dist/client/assets/variant-calendar-DNJKkwIK.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as Ut,X as qt,c as $,b as V,Y as gt,Z as pt,e as Xt,j as t,a as oe,B as ne,r as H,aH as Wt,d as Re,m as X,s as Qt,t as G,w as Yt,k as ke,p as R,F as ae,L as Jt,f as ht,u as xt,D as Zt,I as en,G as tn,K as ot,o as nn,n as sn}from"./index-Dk9RGAqb.js";import{t as jt}from"./ChevronDown-B3fDqERa.js";import{A as vt,k as on,c as an}from"./agent-icon-E6ioveGx.js";import{T as Ce,a as ye,c as Se}from"./tooltip-xp77jFs4.js";import{u as bt,d as Ct,c as yt}from"./sidebar-DBzYJLC2.js";import{a as it,i as rn,f as cn,S as ln,u as dn}from"./use-mcp-client-Bzvvd0Df.js";import{a as un,u as mn}from"./use-virtual-mcp-BP-M67aZ.js";import{a as Be,b as St,P as wt}from"./popover-C2fPnPJt.js";import{i as Ee}from"./Check-LKA0FKR0.js";import{s as we}from"./Plus-CLG5QKCr.js";import{i as _t}from"./SearchMd-DBj7HhoW.js";import{s as Nt}from"./XClose-CW0R6bEe.js";import{c as fn,d as gn,b as pn,f as hn,e as xn,a as jn,A as vn}from"./alert-dialog-DwnblylQ.js";import{F as Q,a as st,b as Y,c as J,d as Z,f as bn,e as ee}from"./form-CJlgALpE.js";import{I as ie}from"./input-C-gHIQip.js";import{S as Cn}from"./chat-context-BF6sak7i.js";import{T as Dt}from"./toolbar-icon-button-BGQ8DzLo.js";import{S as yn}from"./skeleton-DoNQnm-q.js";import{D as kt,a as At,b as It,c as Sn,d as wn,e as _n,f as Nn}from"./drawer-CSHRJeTj.js";import{u as Pt}from"./use-mobile-DQ8jManM.js";import{G as Dn}from"./use-registry-app-DdwkqhPA.js";import{G as kn}from"./github-repo-picker-DeAiQyIc.js";import{b as An,a as Tt}from"./hooks-CvwQxo-K.js";import{u as In,g as Pn,a as Tn,b as On}from"./use-navigate-to-agent-D_vSOLwA.js";import{u as Ot}from"./shell-layout-DCFL_zE0.js";import{f as zt}from"./reusable-new-chat-CouMjkYR.js";import{C as zn}from"./collection-search-zQnUIpxo.js";import{g as Mn,a as $n,b as Fn,e as Ln}from"./extract-connection-data-ChU9AlhE.js";import{u as Mt,a as $t,g as Bn,C as Je}from"./connection-card-CfMynI7E.js";import{e as Ft,d as Lt,a as Bt,b as Et,h as En,c as Vn}from"./dialog-CzDwjrNV.js";import{S as Rn,a as Hn,b as Gn,c as Kn,d as De}from"./select-Bd1WKGSJ.js";import{T as Un}from"./textarea-CQzBh7SW.js";import{b as Vt}from"./use-connection-BsS-3rZB.js";import{n as Le,i as Ze}from"./Tool02-DPXeBg9E.js";import{s as et}from"./Star01-lWHLfmir.js";import{c as qn,i as $e,a as dt,E as Xn,p as Wn,b as Qn,d as Yn}from"./connection-form-helpers-BABNaeU1.js";import{a as tt}from"./authenticate-and-persist-oauth-iHWUIj8u.js";import{g as Jn}from"./connection-slug-eyAPH6o3.js";import{C as Zn}from"./collection-tabs-B-9Urj68.js";import{u as ut}from"./use-infinite-scroll-CbSN3uty.js";import{B as Fe}from"./badge-BbmHyS30.js";import{u as es}from"./useSuspenseInfiniteQuery-DYsYorpe.js";import{g as Ve}from"./metadata-dUsYcpuu.js";import{u as ts}from"./studio-tools-CFgWeCBk.js";import{u as ns}from"./use-ai-providers-Bujq_lmM.js";function mt(n){return n.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ss=Ut({name:qt().min(2,"Organization name is required")});function os(n){const e=$.c(66),{open:s,onOpenChange:i}=n,o=V();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={resolver:gt(ss),defaultValues:{name:""}},e[0]=r):r=e[0];const a=pt(r);let c;e[1]!==o?(c=async E=>{const M=mt(E.name);if(!M)throw new Error(o("common.createOrganizationDialog.invalidSlug"));const U=await oe.organization.create({name:E.name,slug:M});if(U?.error)throw new Error(U.error.message||o("common.createOrganizationDialog.failedToCreate"));const K=U?.data?.slug??M;if(!K)throw new Error(o("common.createOrganizationDialog.failedToCreate"));return{orgSlug:K}},e[1]=o,e[2]=c):c=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=is,e[3]=d):d=e[3];let m;e[4]!==c?(m={mutationFn:c,onSuccess:d},e[4]=c,e[5]=m):m=e[5];const u=Xt(m);let g;e[6]!==u.error||e[7]!==o?(g=u.error instanceof Error?u.error.message:u.error?o("common.createOrganizationDialog.failedToCreateGeneric"):null,e[6]=u.error,e[7]=o,e[8]=g):g=e[8];const l=g;let p;e[9]!==o?(p=o("common.createOrganizationDialog.title"),e[9]=o,e[10]=p):p=e[10];let C;e[11]!==p?(C=t.jsx(fn,{children:p}),e[11]=p,e[12]=C):C=e[12];let x;e[13]!==o?(x=o("common.createOrganizationDialog.description"),e[13]=o,e[14]=x):x=e[14];let h;e[15]!==x?(h=t.jsx(gn,{children:x}),e[15]=x,e[16]=h):h=e[16];let j;e[17]!==C||e[18]!==h?(j=t.jsxs(pn,{children:[C,h]}),e[17]=C,e[18]=h,e[19]=j):j=e[19];let b;if(e[20]!==u||e[21]!==a){let E;e[23]!==u?(E=M=>u.mutateAsync(M),e[23]=u,e[24]=E):E=e[24],b=a.handleSubmit(E),e[20]=u,e[21]=a,e[22]=b}else b=e[22];let y;e[25]!==a.formState.isSubmitting||e[26]!==o?(y=E=>{const{field:M}=E;return t.jsxs(Y,{children:[t.jsx(J,{children:o("common.createOrganizationDialog.nameLabel")}),t.jsx(Z,{children:t.jsx(ie,{...M,placeholder:o("common.createOrganizationDialog.namePlaceholder"),disabled:a.formState.isSubmitting})}),t.jsx(bn,{children:o("common.createOrganizationDialog.nameDescription")}),M.value&&t.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[o("common.createOrganizationDialog.urlLabel")," ",t.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",mt(M.value)]})]}),t.jsx(ee,{})]})},e[25]=a.formState.isSubmitting,e[26]=o,e[27]=y):y=e[27];let w;e[28]!==a.control||e[29]!==y?(w=t.jsx(Q,{control:a.control,name:"name",render:y}),e[28]=a.control,e[29]=y,e[30]=w):w=e[30];let N;e[31]!==l?(N=l&&t.jsx("div",{className:"text-destructive text-sm mt-2",children:l}),e[31]=l,e[32]=N):N=e[32];const A=a.formState.isSubmitting;let O;e[33]!==u||e[34]!==a?(O=()=>{u.reset(),a.reset()},e[33]=u,e[34]=a,e[35]=O):O=e[35];let f;e[36]!==o?(f=o("common.createOrganizationDialog.cancel"),e[36]=o,e[37]=f):f=e[37];let _;e[38]!==a.formState.isSubmitting||e[39]!==O||e[40]!==f?(_=t.jsx(hn,{disabled:A,onClick:O,children:f}),e[38]=a.formState.isSubmitting,e[39]=O,e[40]=f,e[41]=_):_=e[41];const T=!a.formState.isValid||a.formState.isSubmitting;let S;e[42]!==a.formState.isSubmitting||e[43]!==o?(S=a.formState.isSubmitting?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Cn,{size:"xs"})," ",o("common.createOrganizationDialog.creating")]}):o("common.createOrganizationDialog.createButton"),e[42]=a.formState.isSubmitting,e[43]=o,e[44]=S):S=e[44];let v;e[45]!==T||e[46]!==S?(v=t.jsx(ne,{type:"submit",variant:"default",disabled:T,children:S}),e[45]=T,e[46]=S,e[47]=v):v=e[47];let P;e[48]!==_||e[49]!==v?(P=t.jsxs(xn,{children:[_,v]}),e[48]=_,e[49]=v,e[50]=P):P=e[50];let k;e[51]!==b||e[52]!==w||e[53]!==N||e[54]!==P?(k=t.jsxs("form",{className:"space-y-6",onSubmit:b,autoComplete:"off",children:[w,N,P]}),e[51]=b,e[52]=w,e[53]=N,e[54]=P,e[55]=k):k=e[55];let I;e[56]!==a||e[57]!==k?(I=t.jsx(st,{...a,children:k}),e[56]=a,e[57]=k,e[58]=I):I=e[58];let z;e[59]!==j||e[60]!==I?(z=t.jsxs(jn,{children:[j,I]}),e[59]=j,e[60]=I,e[61]=z):z=e[61];let B;return e[62]!==i||e[63]!==s||e[64]!==z?(B=t.jsx(vn,{open:s,onOpenChange:i,children:z}),e[62]=i,e[63]=s,e[64]=z,e[65]=B):B=e[65],B}function is(n){const{orgSlug:e}=n;window.location.href=`/${e}`}function Rt(){const n=H.useContext(Wt),{data:e,refetch:s}=n.hooks.useListUserInvitations();return{invitations:(e??[]).filter(o=>o.status==="pending"&&new Date(o.expiresAt)>new Date),refetch:()=>s?.()}}function as(n){let e=0;for(let i=0;i<n.length;i++)e=n.charCodeAt(i)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function at(n){const e=$.c(13),{org:s,size:i}=n,o=i===void 0?"sm":i,r=o==="xs"?"size-5":"size-6",a=o==="xs"?"text-[9px]":"text-xs";let c;e[0]!==r?(c=X(r,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=r,e[1]=c):c=e[1];let d;e[2]!==s.logo||e[3]!==s.name?(d=s.logo?void 0:as(s.name),e[2]=s.logo,e[3]=s.name,e[4]=d):d=e[4];let m;e[5]!==s.logo||e[6]!==s.name||e[7]!==a?(m=s.logo?t.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):t.jsx("span",{className:X("font-semibold leading-none",a),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=a,e[8]=m):m=e[8];let u;return e[9]!==c||e[10]!==d||e[11]!==m?(u=t.jsx("div",{className:c,style:d,children:m}),e[9]=c,e[10]=d,e[11]=m,e[12]=u):u=e[12],u}function rs({invitation:n,onChanged:e}){const s=V(),[i,o]=H.useState(!1),r=n.organizationName??s("header.orgSwitcher.unknownOrganization"),a=async()=>{o(!0);try{const m=await oe.organization.acceptInvitation({invitationId:n.id});if(m.error){G.error(m.error.message),o(!1);return}}catch{G.error(s("header.orgSwitcher.failedToAcceptInvitation")),o(!1);return}G.success(s("header.orgSwitcher.joined",{name:r})),Yt();let d;try{d=(await oe.organization.getFullOrganization({query:{organizationId:n.organizationId}}))?.data?.slug}catch{}window.location.href=d?`/${d}`:"/"},c=async()=>{o(!0);try{const d=await oe.organization.rejectInvitation({invitationId:n.id});if(d.error){G.error(d.error.message),o(!1);return}G.success(s("header.orgSwitcher.invitationDeclined")),o(!1),e()}catch{G.error(s("header.orgSwitcher.failedToDeclineInvitation")),o(!1)}};return t.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[t.jsx(at,{org:{name:r},size:"sm"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"truncate text-sm font-medium",children:r}),t.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[t.jsx(ne,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:a,disabled:i,children:s("header.orgSwitcher.accept")}),t.jsx(ne,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:c,disabled:i,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:r}),children:t.jsx(Nt,{size:14})})]})]})}function cs(n){const e=$.c(32),{orgParam:s,onSelectOrg:i,onCreateOrg:o}=n,r=V(),{data:a}=Qt(),{invitations:c,refetch:d}=Rt();let m;e[0]!==s?(m=(k,I)=>k.slug===s?-1:I.slug===s?1:k.name.localeCompare(I.name),e[0]=s,e[1]=m):m=e[1];const u=[...a??[]].sort(m),[g,l]=H.useState(""),p=g.toLowerCase(),C=p?u.filter(k=>k.name.toLowerCase().includes(p)||k.slug.toLowerCase().includes(p)):u;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(_t,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=x):x=e[2];let h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h=k=>l(k.target.value),e[3]=h):h=e[3];let j;e[4]!==g?(j=k=>k.key==="Escape"&&g&&l(""),e[4]=g,e[5]=j):j=e[5];let b;e[6]!==r?(b=r("header.orgSwitcher.searchOrganizations"),e[6]=r,e[7]=b):b=e[7];let y;e[8]!==g||e[9]!==j||e[10]!==b?(y=t.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:g,onChange:h,onKeyDown:j,placeholder:b,className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[8]=g,e[9]=j,e[10]=b,e[11]=y):y=e[11];let w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(we,{size:16}),e[12]=w):w=e[12];let N;e[13]!==o?(N=t.jsx("button",{type:"button",onClick:o,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:w}),e[13]=o,e[14]=N):N=e[14];let A;e[15]!==y||e[16]!==N?(A=t.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[x,y,N]}),e[15]=y,e[16]=N,e[17]=A):A=e[17];const O="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let f;e[18]!==c||e[19]!==g||e[20]!==d?(f=!g&&c.map(k=>t.jsx(rs,{invitation:k,onChanged:d},k.id)),e[18]=c,e[19]=g,e[20]=d,e[21]=f):f=e[21];const _=C.length===0&&t.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:g?r("header.orgSwitcher.noOrganizationsMatch",{query:g}):r("header.orgSwitcher.noOrganizationsAvailable")});let T;e[22]!==i||e[23]!==s?(T=k=>t.jsxs("button",{type:"button",onClick:()=>i(k.slug),className:X("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",k.slug===s?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[t.jsx(at,{org:k,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:k.name}),t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:k.slug})]}),k.slug===s&&t.jsx(Ee,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},k.id),e[22]=i,e[23]=s,e[24]=T):T=e[24];const S=C.map(T);let v;e[25]!==f||e[26]!==_||e[27]!==S?(v=t.jsxs("div",{className:O,children:[f,_,S]}),e[25]=f,e[26]=_,e[27]=S,e[28]=v):v=e[28];let P;return e[29]!==v||e[30]!==A?(P=t.jsxs(t.Fragment,{children:[A,v]}),e[29]=v,e[30]=A,e[31]=P):P=e[31],P}function ls(n){const e=$.c(22),{trigger:s,orgParam:i,align:o,side:r}=n,a=o===void 0?"start":o,c=r===void 0?"bottom":r,d=Re(),[m,u]=H.useState(!1),[g,l]=H.useState(!1);let p;e[0]!==s?(p=t.jsx(Be,{asChild:!0,children:s}),e[0]=s,e[1]=p):p=e[1];const C=String(m);let x;e[2]!==d?(x=A=>{u(!1),d({to:"/$org",params:{org:A}})},e[2]=d,e[3]=x):x=e[3];let h;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{u(!1),l(!0)},e[4]=h):h=e[4];let j;e[5]!==i||e[6]!==C||e[7]!==x?(j=t.jsx(cs,{orgParam:i,onSelectOrg:x,onCreateOrg:h},C),e[5]=i,e[6]=C,e[7]=x,e[8]=j):j=e[8];let b;e[9]!==a||e[10]!==c||e[11]!==j?(b=t.jsx(St,{side:c,align:a,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:us,onCloseAutoFocus:ds,children:j}),e[9]=a,e[10]=c,e[11]=j,e[12]=b):b=e[12];let y;e[13]!==m||e[14]!==p||e[15]!==b?(y=t.jsxs(wt,{open:m,onOpenChange:u,children:[p,b]}),e[13]=m,e[14]=p,e[15]=b,e[16]=y):y=e[16];let w;e[17]!==g?(w=t.jsx(os,{open:g,onOpenChange:l}),e[17]=g,e[18]=w):w=e[18];let N;return e[19]!==w||e[20]!==y?(N=t.jsxs(t.Fragment,{children:[y,w]}),e[19]=w,e[20]=y,e[21]=N):N=e[21],N}function ds(n){return n.preventDefault()}function us(n){n.preventDefault(),n.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function ms(n){const e=$.c(21),{value:s,onChange:i,placeholder:o,onKeyDown:r,className:a,isSearching:c,disabled:d}=n,m=o===void 0?"Search...":o;let u;e[0]!==a?(u=X("shrink-0 w-full border-b border-border h-12",a),e[0]=a,e[1]=u):u=e[1];const g=d?"cursor-not-allowed opacity-50":"cursor-text";let l;e[2]!==g?(l=X("flex items-center gap-2.5 h-12 px-4",g),e[2]=g,e[3]=l):l=e[3];let p;e[4]!==c?(p=c?t.jsx(ke,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):t.jsx(_t,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=c,e[5]=p):p=e[5];let C;e[6]!==i?(C=b=>i(b.target.value),e[6]=i,e[7]=C):C=e[7];let x;e[8]!==d||e[9]!==r||e[10]!==m||e[11]!==C||e[12]!==s?(x=t.jsx("input",{type:"text",value:s,onChange:C,onKeyDown:r,placeholder:m,disabled:d,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=d,e[9]=r,e[10]=m,e[11]=C,e[12]=s,e[13]=x):x=e[13];let h;e[14]!==l||e[15]!==p||e[16]!==x?(h=t.jsxs("label",{className:l,children:[p,x]}),e[14]=l,e[15]=p,e[16]=x,e[17]=h):h=e[17];let j;return e[18]!==u||e[19]!==h?(j=t.jsx("div",{className:u,children:h}),e[18]=u,e[19]=h,e[20]=j):j=e[20],j}function rt(n){const e=n?.metadata?.githubRepo;if(!e?.url)return{status:"none"};const s=e.connectionId;return!!s&&!!n?.connections?.some(r=>r.connection_id===s)?{status:"attached",repo:e,connectionId:s}:!!s||e.installationId!=null?{status:"detached",repo:e}:{status:"public-clone",repo:e}}function $o(n){const e=rt(n);return e.status==="attached"||e.status==="public-clone"?e.repo:null}function Ht(n){if(typeof n!="object"||n===null)return!1;const s=n.githubRepo?.url;return typeof s=="string"&&s.length>0}function Fo(n){return rt(n).status==="attached"}function Lo(n){const e=rt(n).status;return e==="attached"||e==="detached"}function fs(n){const e=new Set;for(const s of n??[]){const i=s.metadata?.liveAgentId;typeof i=="string"&&i&&e.add(s.id)}return e}function Bo(n,e){if(!n)return null;const s=n.metadata?.liveAgentId;if(typeof s=="string"&&s)return{mode:"dev",targetId:s};const i=(e??[]).find(o=>o.metadata?.liveAgentId===n.id);return i?{mode:"live",targetId:i.id}:null}function gs(n){const e=$.c(6),{value:s,onChange:i}=n,o=V();let r;e[0]!==o?(r=o("sidebar.agentsSection.searchAgents"),e[0]=o,e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==r||e[4]!==s?(a=t.jsx(ms,{value:s,onChange:i,placeholder:r}),e[2]=i,e[3]=r,e[4]=s,e[5]=a):a=e[5],a}function ps(){const n=$.c(4),e=V();let s;n[0]!==e?(s=e("sidebar.agentsSection.noAgentsFound"),n[0]=e,n[1]=s):s=n[1];let i;return n[2]!==s?(i=t.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:s}),n[2]=s,n[3]=i):i=n[3],i}function hs(n){const e=$.c(10),{org:s,onClose:i}=n,o=V();let r;e[0]!==s.slug?(r={org:s.slug},e[0]=s.slug,e[1]=r):r=e[1];let a;e[2]!==i?(a=()=>i(),e[2]=i,e[3]=a):a=e[3];let c;e[4]!==o?(c=o("sidebar.agentsSection.seeAllAgents"),e[4]=o,e[5]=c):c=e[5];let d;return e[6]!==r||e[7]!==a||e[8]!==c?(d=t.jsx("div",{className:"border-t border-border px-3 py-2.5",children:t.jsx(Jt,{to:"/$org/settings/agents",params:r,onClick:a,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:c})}),e[6]=r,e[7]=a,e[8]=c,e[9]=d):d=e[9],d}function xs(){const n=$.c(4),e=V();let s;n[0]!==e?(s=e("sidebar.agentsSection.agents"),n[0]=e,n[1]=s):s=n[1];let i;return n[2]!==s?(i=t.jsx(Gt,{children:s}),n[2]=s,n[3]=i):i=n[3],i}function js(n){const e=$.c(11),{onImportFromGithub:s}=n,i=V();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Dn,{className:"size-3.5"}),e[0]=o):o=e[0];let r;e[1]!==i?(r=i("sidebar.agentsSection.import"),e[1]=i,e[2]=r):r=e[2];let a;e[3]!==s||e[4]!==r?(a=t.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[o,r]}),e[3]=s,e[4]=r,e[5]=a):a=e[5];let c;e[6]!==i?(c=i("sidebar.agentsSection.codeAgents"),e[6]=i,e[7]=c):c=e[7];let d;return e[8]!==a||e[9]!==c?(d=t.jsx(Gt,{action:a,children:c}),e[8]=a,e[9]=c,e[10]=d):d=e[10],d}function vs(n){const e=$.c(11),{setOpen:s,emptyCtaClass:i}=n,o=V();let r;e[0]!==o?(r=o("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=r):r=e[1];let a;e[2]!==i?(a=X(i),e[2]=i,e[3]=a):a=e[3];let c;e[4]!==s?(c=()=>{R("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[4]=s,e[5]=c):c=e[5];let d;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(we,{className:"size-4"}),e[6]=d):d=e[6];let m;return e[7]!==r||e[8]!==a||e[9]!==c?(m=t.jsx(Dt,{"aria-label":r,className:a,onClick:c,children:d}),e[7]=r,e[8]=a,e[9]=c,e[10]=m):m=e[10],m}function bs(n){const e=$.c(17),{setOpen:s,highlightEmpty:i,emptyCtaClass:o}=n,r=V();let a;e[0]!==i||e[1]!==r?(a=i?void 0:r("sidebar.agentsSection.browseAgents"),e[0]=i,e[1]=r,e[2]=a):a=e[2];let c;e[3]!==o?(c=X(o),e[3]=o,e[4]=c):c=e[4];let d;e[5]!==s?(d=()=>{R("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[5]=s,e[6]=d):d=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(we,{}),e[7]=m):m=e[7];let u;e[8]!==r?(u=r("sidebar.agentsSection.newAgent"),e[8]=r,e[9]=u):u=e[9];let g;e[10]!==u?(g=t.jsx("span",{children:u}),e[10]=u,e[11]=g):g=e[11];let l;return e[12]!==a||e[13]!==c||e[14]!==d||e[15]!==g?(l=t.jsx(Ct,{children:t.jsxs(yt,{tooltip:a,className:c,onClick:d,children:[m,g]})}),e[12]=a,e[13]=c,e[14]=d,e[15]=g,e[16]=l):l=e[16],l}function Cs(){const n=$.c(4),e=V();let s;n[0]!==e?(s=e("sidebar.agentsSection.browseAgents"),n[0]=e,n[1]=s):s=n[1];let i;return n[2]!==s?(i=t.jsx(It,{className:"sr-only",children:s}),n[2]=s,n[3]=i):i=n[3],i}function ys(n){const e=$.c(8),{emptyCtaClass:s}=n,i=V();let o;e[0]!==i?(o=i("sidebar.agentsSection.browseAgents"),e[0]=i,e[1]=o):o=e[1];let r;e[2]!==s?(r=X(s),e[2]=s,e[3]=r):r=e[3];let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(we,{className:"size-4"}),e[4]=a):a=e[4];let c;return e[5]!==o||e[6]!==r?(c=t.jsx(Dt,{"aria-label":o,className:r,children:a}),e[5]=o,e[6]=r,e[7]=c):c=e[7],c}function Ss(n){const e=$.c(19),{wrapEmptyHint:s,highlightEmpty:i,emptyCtaClass:o}=n,r=V();let a;e[0]!==i||e[1]!==r?(a=i?void 0:r("sidebar.agentsSection.browseAgents"),e[0]=i,e[1]=r,e[2]=a):a=e[2];let c;e[3]!==o?(c=X(o),e[3]=o,e[4]=c):c=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(we,{}),e[5]=d):d=e[5];let m;e[6]!==r?(m=r("sidebar.agentsSection.newAgent"),e[6]=r,e[7]=m):m=e[7];let u;e[8]!==m?(u=t.jsx("span",{children:m}),e[8]=m,e[9]=u):u=e[9];let g;e[10]!==a||e[11]!==c||e[12]!==u?(g=t.jsx(Be,{asChild:!0,children:t.jsxs(yt,{tooltip:a,className:c,children:[d,u]})}),e[10]=a,e[11]=c,e[12]=u,e[13]=g):g=e[13];let l;e[14]!==g||e[15]!==s?(l=s(g),e[14]=g,e[15]=s,e[16]=l):l=e[16];let p;return e[17]!==l?(p=t.jsx(Ct,{children:l}),e[17]=l,e[18]=p):p=e[18],p}function ws(n){const e=$.c(9),{children:s}=n,i=V();let o;e[0]!==s?(o=t.jsx(Ce,{asChild:!0,children:s}),e[0]=s,e[1]=o):o=e[1];let r;e[2]!==i?(r=i("sidebar.agentsSection.selectAnExistingAgent"),e[2]=i,e[3]=r):r=e[3];let a;e[4]!==r?(a=t.jsx(ye,{side:"right",sideOffset:8,children:r}),e[4]=r,e[5]=a):a=e[5];let c;return e[6]!==o||e[7]!==a?(c=t.jsxs(Se,{defaultOpen:!0,delayDuration:0,children:[o,a]}),e[6]=o,e[7]=a,e[8]=c):c=e[8],c}function _s(n){const e=$.c(4),s=Re(),{create:i}=An();let o;return e[0]!==i||e[1]!==s||e[2]!==n?(o=async r=>{const a=crypto.randomUUID();try{await i({id:a,virtual_mcp_id:r})}catch{}s({to:"/$org/$taskId",params:{org:n,taskId:a},search:{virtualmcpid:r}})},e[0]=i,e[1]=s,e[2]=n,e[3]=o):o=e[3],o}function nt(n){const e=$.c(20),{agent:s,selected:i,onClick:o}=n,r=i?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let a;e[0]!==r?(a=X("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",r),e[0]=r,e[1]=a):a=e[1];let c;e[2]!==s.icon||e[3]!==s.title?(c=t.jsx(vt,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[2]=s.icon,e[3]=s.title,e[4]=c):c=e[4];let d;e[5]!==s.title?(d=t.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),e[5]=s.title,e[6]=d):d=e[6];let m;e[7]!==s.description?(m=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[7]=s.description,e[8]=m):m=e[8];let u;e[9]!==d||e[10]!==m?(u=t.jsxs("div",{className:"flex-1 min-w-0",children:[d,m]}),e[9]=d,e[10]=m,e[11]=u):u=e[11];let g;e[12]!==i?(g=i&&t.jsx(Ee,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=i,e[13]=g):g=e[13];let l;return e[14]!==o||e[15]!==a||e[16]!==c||e[17]!==u||e[18]!==g?(l=t.jsxs("button",{type:"button",onClick:o,className:a,children:[c,u,g]}),e[14]=o,e[15]=a,e[16]=c,e[17]=u,e[18]=g,e[19]=l):l=e[19],l}function Gt(n){const e=$.c(5),{children:s,action:i}=n;let o;e[0]!==s?(o=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[0]=s,e[1]=o):o=e[1];let r;return e[2]!==i||e[3]!==o?(r=t.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[o,i]}),e[2]=i,e[3]=o,e[4]=r):r=e[4],r}function Ns(n){const e=$.c(23),{onClose:s,onSelectAgent:i,selectedAgentId:o,onImportFromGithub:r}=n,[a,c]=H.useState(""),d=un(),m=d??[],{org:u}=ae(),{data:g}=oe.useSession(),l=g?.user?.id??"anon",p=Pn(d),C=Tn(),x=_s(u.slug),h=fs(d),j=a.toLowerCase(),b=m.filter(Is).filter(L=>!h.has(L.id)).filter(As).filter(L=>!a||L.title.toLowerCase().includes(j)),y=b.filter(ks),w=b.filter(Ds),N=it(u.id),A=!a||N.title.toLowerCase().includes(j),O=!!(i&&A);let f;e[0]!==s||e[1]!==i?(f=()=>{i?.(null),s(),c("")},e[0]=s,e[1]=i,e[2]=f):f=e[2];const _=f,T=L=>{if(i){i(L.id),s(),c("");return}On({orgId:u.id,userId:l},L.id,p),C(),s(),c(""),x(L.id)},S="flex flex-col max-h-[min(640px,80dvh)]";let v;e[3]!==a?(v=t.jsx(gs,{value:a,onChange:c}),e[3]=a,e[4]=v):v=e[4];const P="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",k=i&&A&&N&&t.jsx(nt,{agent:N,selected:!o||o===N.id,onClick:_}),I=(y.length>0||!a)&&t.jsx(js,{onImportFromGithub:r}),z=y.map(L=>t.jsx(nt,{agent:L,selected:i?o===L.id:void 0,onClick:()=>T(L)},L.id)),B=w.length>0&&t.jsx(xs,{}),E=w.map(L=>t.jsx(nt,{agent:L,selected:i?o===L.id:void 0,onClick:()=>T(L)},L.id));let M;e[5]!==O||e[6]!==a||e[7]!==b.length?(M=b.length===0&&!O&&a&&t.jsx(ps,{}),e[5]=O,e[6]=a,e[7]=b.length,e[8]=M):M=e[8];let U;e[9]!==M||e[10]!==k||e[11]!==I||e[12]!==z||e[13]!==B||e[14]!==E?(U=t.jsxs("div",{className:P,children:[k,I,z,B,E,M]}),e[9]=M,e[10]=k,e[11]=I,e[12]=z,e[13]=B,e[14]=E,e[15]=U):U=e[15];let K;e[16]!==s||e[17]!==u?(K=t.jsx(hs,{org:u,onClose:s}),e[16]=s,e[17]=u,e[18]=K):K=e[18];let de;return e[19]!==U||e[20]!==K||e[21]!==v?(de=t.jsxs("div",{className:S,children:[v,U,K]}),e[19]=U,e[20]=K,e[21]=v,e[22]=de):de=e[22],de}function Ds(n){return!Ht(n.metadata)}function ks(n){return Ht(n.metadata)}function As(n){return!cn(n.id)}function Is(n){return!rn(n.id)}function Ps(n){const e=$.c(31);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{compact:i,trigger:o,onSelectAgent:r,selectedAgentId:a,side:c,align:d}=s,m=i===void 0?!1:i,u=c===void 0?"right":c,g=d===void 0?"start":d,[l,p]=H.useState(!1),[C,x]=H.useState(!1),h=Pt(),{setOpenMobile:j}=bt(),b=In(),y=b?"border border-border":void 0;let w;e[2]!==b?(w=I=>b?t.jsx(ws,{children:I}):I,e[2]=b,e[3]=w):w=e[3];const N=w;let A;e[4]!==h||e[5]!==j?(A=()=>{p(!1),h&&j(!1)},e[4]=h,e[5]=j,e[6]=A):A=e[6];const O=A;let f;e[7]!==O?(f=()=>{O(),x(!0)},e[7]=O,e[8]=f):f=e[8];const _=f;let T;e[9]!==O||e[10]!==_||e[11]!==r||e[12]!==l||e[13]!==a?(T=l&&t.jsx(H.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(yn,{className:"h-4 w-24"})}),children:t.jsx(Ns,{onClose:O,onSelectAgent:r,selectedAgentId:a,onImportFromGithub:_})}),e[9]=O,e[10]=_,e[11]=r,e[12]=l,e[13]=a,e[14]=T):T=e[14];const S=T;let v;e[15]!==g||e[16]!==m||e[17]!==y||e[18]!==b||e[19]!==h||e[20]!==l||e[21]!==S||e[22]!==u||e[23]!==o||e[24]!==N?(v=h?t.jsxs(t.Fragment,{children:[o?t.jsx("button",{type:"button",onClick:()=>p(!0),className:"contents",children:o}):m?N(t.jsx(vs,{setOpen:p,emptyCtaClass:y})):t.jsx(bs,{setOpen:p,highlightEmpty:b,emptyCtaClass:y}),t.jsx(kt,{open:l,onOpenChange:p,direction:"bottom",children:t.jsxs(At,{className:"max-h-[85dvh] p-0",children:[t.jsx(Cs,{}),S]})})]}):t.jsxs(wt,{open:l,onOpenChange:I=>{I&&!l&&R("agent_browser_opened",{surface:"desktop_popover"}),p(I)},children:[o?t.jsx(Be,{asChild:!0,children:o}):m?N(t.jsx(Be,{asChild:!0,children:t.jsx(ys,{emptyCtaClass:y})})):t.jsx(Ss,{wrapEmptyHint:N,highlightEmpty:b,emptyCtaClass:y}),t.jsx(St,{className:"w-[380px] p-0 overflow-hidden",side:u,align:g,children:S})]}),e[15]=g,e[16]=m,e[17]=y,e[18]=b,e[19]=h,e[20]=l,e[21]=S,e[22]=u,e[23]=o,e[24]=N,e[25]=v):v=e[25];let P;e[26]!==C?(P=t.jsx(kn,{open:C,onOpenChange:x,mode:"agent"}),e[26]=C,e[27]=P):P=e[27];let k;return e[28]!==P||e[29]!==v?(k=t.jsxs(t.Fragment,{children:[v,P]}),e[28]=P,e[29]=v,e[30]=k):k=e[30],k}const Ts="wco-no-drag inline-flex items-center gap-1.5 min-w-0 rounded-md pl-1 pr-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function Os(n){const e=$.c(19),{agentId:s,fallback:i,onOpenHome:o,onPick:r}=n,a=mn(s)??i??null,c=a?.title??"Super Agent",d=`Open ${c} home`,m=a?.icon??null;let u;e[0]!==m||e[1]!==c?(u=t.jsx(vt,{icon:m,name:c,size:"xs"}),e[0]=m,e[1]=c,e[2]=u):u=e[2];let g;e[3]!==o||e[4]!==d||e[5]!==u?(g=t.jsx("button",{type:"button",onClick:o,"aria-label":d,className:"wco-no-drag flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:u}),e[3]=o,e[4]=d,e[5]=u,e[6]=g):g=e[6];let l;e[7]!==c?(l=t.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:c}),e[7]=c,e[8]=l):l=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(jt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[9]=p):p=e[9];let C;e[10]!==l?(C=t.jsxs("button",{type:"button",className:Ts,children:[l,p]}),e[10]=l,e[11]=C):C=e[11];let x;e[12]!==s||e[13]!==r||e[14]!==C?(x=t.jsx(Ps,{side:"bottom",align:"start",selectedAgentId:s,onSelectAgent:r,trigger:C}),e[12]=s,e[13]=r,e[14]=C,e[15]=x):x=e[15];let h;return e[16]!==g||e[17]!==x?(h=t.jsxs("div",{className:"flex min-w-0 items-center gap-0",children:[g,x]}),e[16]=g,e[17]=x,e[18]=h):h=e[18],h}function Eo(n){const e=$.c(26);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{showName:i}=s,{org:o}=ae(),{state:r,isMobile:a}=bt(),c=Rt().invitations.length>0,d=r==="collapsed"||a,m=c?`${o.name} — switch organization (pending invitation)`:`${o.name} — switch organization`;let u;e[2]!==o?(u=t.jsx(at,{org:o,size:"sm"}),e[2]=o,e[3]=u):u=e[3];let g;e[4]!==c||e[5]!==d?(g=c&&t.jsx("span",{className:X("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",d?"-top-1":"top-1/2 -translate-y-1/2")}),e[4]=c,e[5]=d,e[6]=g):g=e[6];let l;e[7]!==u||e[8]!==g?(l=t.jsxs("span",{className:"relative inline-flex",children:[u,g]}),e[7]=u,e[8]=g,e[9]=l):l=e[9];let p;e[10]!==o.name||e[11]!==i?(p=i&&t.jsx("span",{className:"truncate text-sm font-medium text-foreground max-w-[10rem]",children:o.name}),e[10]=o.name,e[11]=i,e[12]=p):p=e[12];let C;e[13]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(jt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[13]=C):C=e[13];let x;e[14]!==m||e[15]!==l||e[16]!==p?(x=t.jsx(Ce,{asChild:!0,children:t.jsxs("button",{type:"button","aria-label":m,className:"wco-no-drag flex items-center gap-1.5 shrink-0 rounded-lg pl-[5px] pr-1.5 py-1.5 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[l,p,C]})}),e[14]=m,e[15]=l,e[16]=p,e[17]=x):x=e[17];let h;e[18]!==o.slug||e[19]!==x?(h=t.jsx(ls,{orgParam:o.slug,trigger:x}),e[18]=o.slug,e[19]=x,e[20]=h):h=e[20];let j;e[21]!==o.name?(j=t.jsx(ye,{side:"bottom",children:o.name}),e[21]=o.name,e[22]=j):j=e[22];let b;return e[23]!==j||e[24]!==h?(b=t.jsxs(Se,{children:[h,j]}),e[23]=j,e[24]=h,e[25]=b):b=e[25],b}function Vo(n){const e=$.c(24);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{onNavigate:i}=s,{org:o}=ae(),r=Re();let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[2]=a):a=e[2];const c=ht(a);let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},e[3]=d):d=e[3];const m=xt(d),{threads:u}=Tt(),{data:g}=oe.useSession(),{setTaskId:l,createNewTask:p}=Ot();let C;e[4]!==o.id?(C=it(o.id),e[4]=o.id,e[5]=C):C=e[5];const x=C,h=x.id,j=c.taskId?m.virtualmcpid??h:h;let b;e[6]!==p||e[7]!==h||e[8]!==r||e[9]!==i||e[10]!==o.slug||e[11]!==g?.user?.id||e[12]!==l||e[13]!==u?(b=f=>{if(!f||f===h){r({to:"/$org",params:{org:o.slug}}),i?.();return}const _=zt(u,f,g?.user?.id);_?l(_.id,f):p(f),i?.()},e[6]=p,e[7]=h,e[8]=r,e[9]=i,e[10]=o.slug,e[11]=g?.user?.id,e[12]=l,e[13]=u,e[14]=b):b=e[14];const y=b;let w;e[15]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[15]=w):w=e[15];const N=j===h?x:void 0;let A;e[16]!==j||e[17]!==y?(A=()=>y(j),e[16]=j,e[17]=y,e[18]=A):A=e[18];let O;return e[19]!==j||e[20]!==y||e[21]!==N||e[22]!==A?(O=t.jsx(H.Suspense,{fallback:w,children:t.jsx(Os,{agentId:j,fallback:N,onOpenHome:A,onPick:y})}),e[19]=j,e[20]=y,e[21]=N,e[22]=A,e[23]=O):O=e[23],O}function Ro(){const n=$.c(23),e=V(),{org:s}=ae();let i;n[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},n[0]=i):i=n[0];const o=ht(i);let r;n[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},n[1]=r):r=n[1];const a=xt(r),{threads:c}=Tt(),{data:d}=oe.useSession(),{setTaskId:m,createNewTask:u}=Ot();let g;n[2]!==s.id?(g=it(s.id),n[2]=s.id,n[3]=g):g=n[3];const l=g.id,p=o.taskId?a.virtualmcpid??l:l;let C;n[4]!==p||n[5]!==u||n[6]!==d?.user?.id||n[7]!==m||n[8]!==c?(C=()=>{const A=zt(c,p,d?.user?.id);A?m(A.id,p):u(p)},n[4]=p,n[5]=u,n[6]=d?.user?.id,n[7]=m,n[8]=c,n[9]=C):C=n[9];const x=C;let h;n[10]!==e?(h=e("sidebar.taskGroupsList.newChat"),n[10]=e,n[11]=h):h=n[11];let j;n[12]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(on,{size:16}),n[12]=j):j=n[12];let b;n[13]!==x||n[14]!==h?(b=t.jsx(Ce,{asChild:!0,children:t.jsx("button",{type:"button",onClick:x,"aria-label":h,className:"wco-no-drag flex shrink-0 items-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:j})}),n[13]=x,n[14]=h,n[15]=b):b=n[15];let y;n[16]!==e?(y=e("sidebar.taskGroupsList.newChat"),n[16]=e,n[17]=y):y=n[17];let w;n[18]!==y?(w=t.jsx(ye,{side:"bottom",children:y}),n[18]=y,n[19]=w):w=n[19];let N;return n[20]!==b||n[21]!==w?(N=t.jsxs(Se,{children:[b,w]}),n[20]=b,n[21]=w,n[22]=N):N=n[22],N}function zs({open:n,onOpenChange:e,onCreated:s}){const i=V(),{org:o}=ae(),{data:r}=oe.useSession(),{stdioEnabled:a}=Zt(),c=Pt(),d=Vt(),m=Mt(),g=$t(m,"").items,l=pt({resolver:gt(qn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),p=l.watch("ui_type"),C=l.watch("connection_url"),x=l.watch("npx_package"),h=$e({uiType:p,connectionUrl:C??"",npxPackage:x??""})??dt({uiType:p,connectionUrl:C??"",registryItems:g}),j=f=>{const _=f.trim();if(!_)return;const T=!!l.formState.dirtyFields.title,S=!!l.formState.dirtyFields.description,v=!!l.formState.dirtyFields.env_vars,P=I=>{if(I&&(!T&&!l.getValues("title").trim()&&I.title&&l.setValue("title",I.title,{shouldDirty:!1}),!S&&!(l.getValues("description")??"").trim()&&I.description&&l.setValue("description",I.description,{shouldDirty:!1}),!v&&I.envVarKeys?.length)){const z=l.getValues("env_vars")??[],B=new Set(z.map(M=>M.key)),E=I.envVarKeys.filter(M=>!B.has(M));E.length>0&&l.setValue("env_vars",[...z,...E.map(M=>({key:M,value:""}))],{shouldDirty:!0})}},k=Wn(_);if(k&&a){l.setValue("ui_type","NPX",{shouldDirty:!0}),l.setValue("npx_package",k.packageName,{shouldDirty:!0}),l.setValue("connection_url","",{shouldDirty:!0}),l.setValue("connection_token",null,{shouldDirty:!0}),P($e({uiType:"NPX",npxPackage:k.packageName}));return}if(_.startsWith("http://")||_.startsWith("https://")){const I=p==="HTTP"||p==="SSE"||p==="Websocket"?p:"HTTP";l.setValue("ui_type",I,{shouldDirty:!0}),l.setValue("connection_url",_,{shouldDirty:!0}),P($e({uiType:I,connectionUrl:_})??dt({uiType:I,connectionUrl:_,registryItems:g}));return}p==="NPX"&&P($e({uiType:"NPX",npxPackage:_}))},b=f=>{f||l.reset(),e(f)},y=async f=>{let _,T=null,S=null,v=null;f.ui_type==="NPX"?(_="STDIO",T="",v=Qn(f.npx_package||"",f.env_vars||[])):f.ui_type==="STDIO"?(_="STDIO",T="",v=Yn(f.stdio_command||"",f.stdio_args||"",f.stdio_cwd,f.env_vars||[])):(_=f.ui_type,T=f.connection_url||"",S=f.connection_token||null);const P=Mn("conn");try{await d.create.mutateAsync({id:P,title:f.title,description:f.description||null,connection_type:_,connection_url:T,connection_token:S,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:r?.user?.id||"system",organization_id:o.id,icon:f.icon??null,app_name:null,app_id:null,connection_headers:v,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),l.reset(),e(!1),s?.(P)}catch{G.error(i("connections.createConnectionDialog.failedToCreateConnection"))}},w=i("connections.createConnectionDialog.title"),N=i("connections.createConnectionDialog.description"),A=l.formState.isSubmitting?i("connections.createConnectionDialog.saving"):i("connections.createConnectionDialog.createButton"),O=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(Q,{control:l.control,name:"ui_type",render:({field:f})=>t.jsxs(Y,{children:[t.jsx(J,{children:i("connections.createConnectionDialog.typeLabel")}),t.jsxs(Rn,{value:f.value,onValueChange:f.onChange,children:[t.jsx(Z,{children:t.jsx(Hn,{children:t.jsx(Gn,{})})}),t.jsxs(Kn,{children:[t.jsx(De,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(et,{className:"w-4 h-4"}),i("connections.createConnectionDialog.httpType")]})}),t.jsx(De,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(et,{className:"w-4 h-4"}),i("connections.createConnectionDialog.sseType")]})}),t.jsx(De,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(et,{className:"w-4 h-4"}),i("connections.createConnectionDialog.websocketType")]})}),a&&t.jsxs(t.Fragment,{children:[t.jsx(De,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Le,{className:"w-4 h-4"}),i("connections.createConnectionDialog.npxPackageType")]})}),t.jsx(De,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(an,{className:"w-4 h-4"}),i("connections.createConnectionDialog.customCommandType")]})})]})]})]}),t.jsx(ee,{})]})}),p==="NPX"&&t.jsx(Q,{control:l.control,name:"npx_package",render:({field:f})=>t.jsxs(Y,{children:[t.jsx(J,{children:i("connections.createConnectionDialog.npmPackageLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:i("connections.createConnectionDialog.npmPackagePlaceholder"),...f,value:f.value??"",onPaste:_=>{const T=_.clipboardData.getData("text");T&&(_.preventDefault(),l.setValue("npx_package",T.trim(),{shouldDirty:!0}),j(T))},onBlur:_=>{j(_.target.value),f.onBlur()}})}),t.jsx(ee,{})]})}),p==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(Q,{control:l.control,name:"stdio_command",render:({field:f})=>t.jsxs(Y,{children:[t.jsx(J,{children:i("connections.createConnectionDialog.commandLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:i("connections.createConnectionDialog.commandPlaceholder"),...f,value:f.value??""})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:l.control,name:"stdio_args",render:({field:f})=>t.jsxs(Y,{children:[t.jsx(J,{children:i("connections.createConnectionDialog.argumentsLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:i("connections.createConnectionDialog.argumentsPlaceholder"),...f,value:f.value??""})}),t.jsx(ee,{})]})})]}),t.jsx(Q,{control:l.control,name:"stdio_cwd",render:({field:f})=>t.jsxs(Y,{children:[t.jsx(J,{children:i("connections.createConnectionDialog.workingDirectoryLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:i("connections.createConnectionDialog.workingDirectoryPlaceholder"),...f,value:f.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("connections.createConnectionDialog.workingDirectoryDescription")}),t.jsx(ee,{})]})})]}),(p==="NPX"||p==="STDIO")&&t.jsx(Q,{control:l.control,name:"env_vars",render:({field:f})=>t.jsxs(Y,{children:[t.jsx(J,{children:i("connections.createConnectionDialog.environmentVariablesLabel")}),t.jsx(Z,{children:t.jsx(Xn,{value:f.value??[],onChange:f.onChange})}),t.jsx(ee,{})]})}),p!=="NPX"&&p!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(Q,{control:l.control,name:"connection_url",render:({field:f})=>t.jsxs(Y,{children:[t.jsx(J,{children:i("connections.createConnectionDialog.urlLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:i("connections.createConnectionDialog.urlPlaceholder"),...f,value:f.value??"",onPaste:_=>{const T=_.clipboardData.getData("text");T&&(_.preventDefault(),l.setValue("connection_url",T.trim(),{shouldDirty:!0}),j(T))},onBlur:_=>{j(_.target.value),f.onBlur()}})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:l.control,name:"connection_token",render:({field:f})=>t.jsxs(Y,{children:[t.jsx(J,{children:h?.token?.label??i("connections.createConnectionDialog.tokenLabelDefault")}),t.jsx(Z,{children:t.jsx(ie,{type:"password",placeholder:h?.token?.placeholder??i("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...f,value:f.value??""})}),h?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[h.token.helperText,h.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:i("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),t.jsx(ee,{})]})})]}),t.jsx(Q,{control:l.control,name:"title",render:({field:f})=>t.jsxs(Y,{children:[t.jsx(J,{children:i("connections.createConnectionDialog.nameLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:i("connections.createConnectionDialog.namePlaceholder"),...f})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:l.control,name:"description",render:({field:f})=>t.jsxs(Y,{children:[t.jsx(J,{children:i("connections.createConnectionDialog.descriptionLabel")}),t.jsx(Z,{children:t.jsx(Un,{placeholder:i("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...f,value:f.value??""})}),t.jsx(ee,{})]})})]});return c?t.jsx(kt,{open:n,onOpenChange:b,children:t.jsxs(At,{className:"max-h-[90vh]",children:[t.jsx(Sn,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(It,{children:w}),t.jsx(wn,{className:"mt-1",children:N})]}),t.jsx(_n,{asChild:!0,children:t.jsx(ne,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(Nt,{size:16})})})]})}),t.jsx(st,{...l,children:t.jsxs("form",{onSubmit:l.handleSubmit(y),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:O}),t.jsx(Nn,{children:t.jsx(ne,{type:"submit",disabled:l.formState.isSubmitting,className:"w-full",children:A})})]})})]})}):t.jsx(Ft,{open:n,onOpenChange:b,children:t.jsxs(Lt,{className:"sm:max-w-[525px]",children:[t.jsxs(Bt,{children:[t.jsx(Et,{children:w}),t.jsx(En,{children:N})]}),t.jsx(st,{...l,children:t.jsxs("form",{onSubmit:l.handleSubmit(y),children:[t.jsx("div",{className:"py-4",children:O}),t.jsxs(Vn,{children:[t.jsx(ne,{type:"button",variant:"outline",onClick:()=>b(!1),children:i("connections.createConnectionDialog.cancelButton")}),t.jsx(ne,{type:"submit",disabled:l.formState.isSubmitting,className:"min-w-40",children:A})]})]})})]})})}function Ms(n){const e=$.c(72),{mode:s,agentId:i,addedConnectionIds:o,onAdd:r,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:d,search:m,onCreateConnection:u,onBrowseNavigate:g,defaultTab:l}=n,p=s===void 0?"add":s,C=l===void 0?"connected":l,x=V(),{org:h}=ae(),j=H.useDeferredValue(m),b=m!==j;let y;e[0]!==j?(y=j.trim().toLowerCase(),e[0]=j,e[1]=y):y=e[1];const w=y;let N;e[2]!==C?(N=D=>D??C,e[2]=C,e[3]=N):N=e[3];const[A,O]=en(tn.connectionsTab(h.slug)+(C==="all"?":home-modal":":agent-modal"),N);let f;e[4]!==A||e[5]!==O?(f=D=>{D!==A&&R("connections_dialog_tab_changed",{to_tab:D}),O(D)},e[4]=A,e[5]=O,e[6]=f):f=e[6];const _=f;let T;e[7]!==h.id||e[8]!==h.slug?(T={connectionId:ln,orgId:h.id,orgSlug:h.slug},e[7]=h.id,e[8]=h.slug,e[9]=T):T=e[9];const S=dn(T),v=j?.trim().split(/\s+/).filter(Boolean)??[],P=v.length>0?{operator:"or",conditions:v.flatMap(Hs)}:void 0,k={...P&&{where:P},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},I=JSON.stringify(k),{data:z,fetchNextPage:B,hasNextPage:E,isFetchingNextPage:M}=es({queryKey:ot.collectionListInfinite(S,h.id,"","CONNECTIONS",I),queryFn:async D=>{const{pageParam:F}=D,se=F===void 0?0:F;return(await S.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...P&&{where:P},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:se}})).structuredContent},initialPageParam:0,getNextPageParam:Vs,staleTime:3e4}),U=z?.pages.flatMap(Es)??[],K=Bn(U),de=new Set(U.filter(Bs).map(Ls)),L=Mt(),re=$t(L,j),He=ut(re.loadMore,re.hasMore,re.isLoadingMore),Ge=ut(B,E??!1,M),W=A==="all"||!!w,ct=W?re.items.filter(D=>{const F=$n(D);if(F&&de.has(F))return!1;if(!w)return!0;const se=Ve(D._meta),ce=[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,se?.friendly_name,se?.friendlyName].filter(Boolean).join(" ").toLowerCase();return v.some(te=>ce.includes(te.toLowerCase()))}):[],_e=ct.filter(Fs),Ne=ct.filter($s);let Ae;e[10]!==o?(Ae=D=>D.some(F=>o.has(F.id)),e[10]=o,e[11]=Ae):Ae=e[11];const Ke=Ae;let Ie;e[12]!==o||e[13]!==i||e[14]!==d||e[15]!==Ke||e[16]!==p||e[17]!==r||e[18]!==g||e[19]!==a||e[20]!==x?(Ie=(D,F,se,ce,te)=>{const Me=Ke(te),be=te.find(le=>!o.has(le.id)),q=te[0];if(p==="browse"){const le=Jn(q);return t.jsx(Je,{connection:{title:F,icon:se,description:te.length>1?`${te.length} instances`:ce??void 0},fallbackIcon:t.jsx(Le,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs(Fe,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ee,{size:11})," ",x("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{R("connection_browse_clicked",{app_name:q.app_name??null,connection_id:q.id,instances_count:te.length}),g?.(le)}},D)}return t.jsx(Je,{connection:{title:F,icon:se,description:ce},fallbackIcon:t.jsx(Le,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[Me&&t.jsxs(Fe,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ee,{size:11})," ",x("virtualMcp.connectionDialogContent.added")]}),t.jsx(ne,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:d!==null,onClick:le=>{le.stopPropagation(),be?(R("connection_add_clicked",{action:"use_existing",app_name:q.app_name??null,connection_id:be.id}),i&&R("agent_connection_attached",{agent_id:i,connection_id:be.id,app_name:q.app_name??null,mode:"existing"}),r(be.id)):(R("connection_add_clicked",{action:"clone",app_name:q.app_name??null,base_connection_id:q.id}),a(q))},children:x("virtualMcp.connectionDialogContent.add")})]})},D)},e[12]=o,e[13]=i,e[14]=d,e[15]=Ke,e[16]=p,e[17]=r,e[18]=g,e[19]=a,e[20]=x,e[21]=Ie):Ie=e[21];const Pe=Ie;let Te;e[22]!==d||e[23]!==p||e[24]!==c||e[25]!==x?(Te=D=>{const F=Ve(D._meta),se=F?.friendlyName||F?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",ce=D.server?.description||D.description||null,te=D.server?.icons?.[0]?.src||Fn(D.server?.repository)||null,Me=F?.official===!0,be=F?.verified===!0,q=F?.owner==="deco";return t.jsx(Je,{connection:{title:se,description:ce,icon:te},fallbackIcon:t.jsx(Le,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[q&&t.jsxs(Se,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:t.jsx("img",{src:"/logos/deco logo.svg",alt:x("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),t.jsx(ye,{children:x("virtualMcp.connectionDialogContent.builtByDeco")})]}),!q&&Me&&t.jsxs(Se,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(Fe,{variant:"outline",size:"icon",children:t.jsx(Ze,{})})}),t.jsx(ye,{children:x("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!q&&!Me&&be&&t.jsxs(Se,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(Fe,{variant:"outline",size:"icon",children:t.jsx(Ze,{})})}),t.jsx(ye,{children:x("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),t.jsx(ne,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:d!==null,onClick:le=>{le.stopPropagation(),R("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:F?.friendlyName||D.server?.name||D.name||null}),c(D)},children:d===D.id?t.jsx(ke,{size:14,className:"animate-spin"}):x(p==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${D.id}`)},e[22]=d,e[23]=p,e[24]=c,e[25]=x,e[26]=Te):Te=e[26];const lt=Te;let ue;e[27]!==A||e[28]!==_||e[29]!==u||e[30]!==w||e[31]!==x?(ue=!w&&t.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[t.jsx(Zn,{tabs:[{id:"all",label:x("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:x("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:A,onTabChange:D=>_(D)}),t.jsxs(ne,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{R("connections_dialog_custom_clicked"),u()},children:[t.jsx(we,{size:12}),x("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=A,e[28]=_,e[29]=u,e[30]=w,e[31]=x,e[32]=ue):ue=e[32];const Ue=b&&"opacity-50 pointer-events-none";let me;e[33]!==Ue?(me=X("flex-1 overflow-auto p-5 transition-opacity duration-150",Ue),e[33]=Ue,e[34]=me):me=e[34];const Kt="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Oe;e[35]!==Pe?(Oe=D=>{if(D.type==="group")return Pe(D.key,D.title,D.icon,null,D.connections);const F=D.connection;return Pe(F.id,F.title,F.icon,F.description??null,[F])},e[35]=Pe,e[36]=Oe):Oe=e[36];const qe=K.map(Oe);let fe;e[37]!==Ge?(fe=t.jsx("div",{ref:Ge,className:"col-span-full h-1"}),e[37]=Ge,e[38]=fe):fe=e[38];let ge;e[39]!==M?(ge=M&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),e[39]=M,e[40]=ge):ge=e[40];const Xe=W&&_e.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx(Ze,{size:13,className:"text-muted-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:x("virtualMcp.connectionDialogContent.sectionVerified")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),We=W&&_e.map(lt),Qe=W&&Ne.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:x("virtualMcp.connectionDialogContent.sectionAllConnections")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),Ye=W&&Ne.map(lt);let pe;e[41]!==He||e[42]!==L||e[43]!==W?(pe=W&&L.length>0&&t.jsx("div",{ref:He,className:"col-span-full h-1"}),e[41]=He,e[42]=L,e[43]=W,e[44]=pe):pe=e[44];let he;e[45]!==re.isLoadingMore||e[46]!==W?(he=W&&re.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),e[45]=re.isLoadingMore,e[46]=W,e[47]=he):he=e[47];let xe;e[48]!==qe||e[49]!==fe||e[50]!==ge||e[51]!==Xe||e[52]!==We||e[53]!==Qe||e[54]!==Ye||e[55]!==pe||e[56]!==he?(xe=t.jsxs("div",{className:Kt,children:[qe,fe,ge,Xe,We,Qe,Ye,pe,he]}),e[48]=qe,e[49]=fe,e[50]=ge,e[51]=Xe,e[52]=We,e[53]=Qe,e[54]=Ye,e[55]=pe,e[56]=he,e[57]=xe):xe=e[57];let je;e[58]!==A||e[59]!==K.length||e[60]!==Ne||e[61]!==m||e[62]!==x||e[63]!==_e?(je=K.length===0&&_e.length===0&&Ne.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:m?x("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:m}):x(A==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=A,e[59]=K.length,e[60]=Ne,e[61]=m,e[62]=x,e[63]=_e,e[64]=je):je=e[64];let ve;e[65]!==me||e[66]!==xe||e[67]!==je?(ve=t.jsxs("div",{className:me,children:[xe,je]}),e[65]=me,e[66]=xe,e[67]=je,e[68]=ve):ve=e[68];let ze;return e[69]!==ue||e[70]!==ve?(ze=t.jsxs(t.Fragment,{children:[ue,ve]}),e[69]=ue,e[70]=ve,e[71]=ze):ze=e[71],ze}function $s(n){return!n.verified&&!Ve(n._meta)?.verified&&!n.meta?.verified}function Fs(n){return n.verified||Ve(n._meta)?.verified||n.meta?.verified}function Ls(n){return n.app_name}function Bs(n){return n.app_name}function Es(n){return n?.items??[]}function Vs(n,e){if(n?.hasMore)return e.reduce(Rs,0)}function Rs(n,e){return n+(e?.items?.length??0)}function Hs(n){return[{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}function Ho({open:n,onOpenChange:e,defaultTab:s,initialSearch:i="",...o}){const r=V(),a=o.mode??"add",c="agentId"in o?o.agentId:void 0,d="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,m="onAdd"in o&&o.onAdd?o.onAdd:S=>{},u=(S,v,P)=>{c&&R("agent_connection_attached",{agent_id:c,connection_id:S,app_name:v,mode:P})},[g,l]=H.useState(null),[p,C]=H.useState(i),[x,h]=H.useState(!1),{org:j}=ae(),{data:b}=oe.useSession(),y=Vt(),w=nn(),N=Re(),A=S=>{e(!1),N({to:"/$org/settings/connections/$appSlug",params:{org:j.slug,appSlug:S}})},O=()=>{w.invalidateQueries({predicate:S=>{const v=S.queryKey;return v[1]===j.id&&v[3]==="collection"&&v[4]==="CONNECTIONS"}})},f=async(S,v)=>{R("connection_oauth_succeeded",{connection_id:S,flow:v});const P=new URL(`/api/${j.slug}/mcp/${S}`,window.location.origin);await w.invalidateQueries({queryKey:ot.isMCPAuthenticated(P.href,null)}),O()},_=async S=>{l(S.app_name??S.id);try{const P=`${S.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,I=(await y.create.mutateAsync({title:P,description:S.description??null,connection_type:S.connection_type,connection_url:S.connection_url??null,connection_token:null,icon:S.icon??null,app_name:S.app_name??null,app_id:S.app_id??null,connection_headers:S.connection_headers??null})).id,z=await tt({connectionId:I,orgId:j.id,orgSlug:j.slug,persistFallback:B=>y.update.mutateAsync({id:I,data:{connection_token:B}}).then(()=>{})});if(z.ran&&!z.ok){R("connection_oauth_failed",{connection_id:I,flow:"clone",error:z.error??"no_token"}),G.error(r("virtualMcp.addConnectionDialog.authenticationFailedError",{error:z.error??"no token received"})),await y.delete.mutateAsync(I);return}z.ran&&await f(I,"clone"),u(I,S.app_name??null,"clone"),m(I)}catch(v){console.error("Failed to add connection:",v),G.error(r("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{l(null)}},T=async S=>{if(!(!j||!b?.user?.id)){l(S.id);try{const v=Ln(S,j.id,b.user.id,{remoteIndex:0}),P=v.connection_type==="STDIO",k=!!v.connection_url,I=P&&v.connection_headers&&typeof v.connection_headers=="object"&&"command"in v.connection_headers;if(!k&&!I){G.error(r("virtualMcp.addConnectionDialog.mcpServerConnectionError")),l(null);return}const{id:z}=await y.create.mutateAsync(v),B=await tt({connectionId:z,orgId:j.id,orgSlug:j.slug,persistFallback:E=>y.update.mutateAsync({id:z,data:{connection_token:E}}).then(()=>{})});if(B.ran&&!B.ok){R("connection_oauth_failed",{connection_id:z,flow:"connect_new",error:B.error??"no_token"}),G.warning(r("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:r("virtualMcp.addConnectionDialog.signInFailedDescription",{error:B.error??"no token received"})}),u(z,v.app_name??null,"new"),m(z);return}B.ran?(await f(z,"connect_new"),G.success(r("virtualMcp.addConnectionDialog.connectedAuthenticated"))):G.success(r("virtualMcp.addConnectionDialog.connected")),u(z,v.app_name??null,"new"),m(z)}catch(v){console.error("Failed to connect:",v),G.error(r("virtualMcp.addConnectionDialog.failedToConnect"))}finally{l(null)}}};return t.jsxs(Ft,{open:n,onOpenChange:e,children:[t.jsxs(Lt,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[t.jsx(Bt,{className:"px-6 pt-5 pb-0 shrink-0",children:t.jsx(Et,{className:"text-base font-semibold",children:r(a==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),t.jsx("div",{className:"pt-3 shrink-0",children:t.jsx(zn,{value:p,onChange:C,placeholder:r("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),t.jsx(H.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Ms,{mode:a,agentId:c,addedConnectionIds:d,onAdd:m,onCloneAndAdd:_,onConnectAndAdd:T,connectingItemId:g,search:p,onCreateConnection:()=>h(!0),onBrowseNavigate:A,defaultTab:s})})]}),t.jsx(zs,{open:x,onOpenChange:h,onCreated:async S=>{h(!1);const v=await tt({connectionId:S,orgId:j.id,orgSlug:j.slug,persistFallback:P=>y.update.mutateAsync({id:S,data:{connection_token:P}}).then(()=>{})});if(v.ran&&!v.ok){R("connection_oauth_failed",{connection_id:S,flow:"custom_create",error:v.error??"no_token"}),G.warning(r("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:r("virtualMcp.addConnectionDialog.signInFailedDescription",{error:v.error??"no token received"})}),u(S,null,"custom"),m(S),e(!1);return}v.ran&&await f(S,"custom_create"),u(S,null,"custom"),m(S),e(!1)}})]})}const ft=new Map;function Go(){const{org:n}=ae(),e=ts(),s=ns(),i=s.find(h=>h.providerId==="deco"),{data:o,isLoading:r,refetch:a,isFetching:c}=sn({queryKey:ot.aiProviderCredits(n.id,"deco"),enabled:!!i,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),d=o?.balanceCents??null,m=d!=null?d/100:null,u=H.useRef(new Map);if(d!=null){const h=ft.get(n.id);u.current.get(n.id)&&h!=null&&d>h&&R("credits_topped_up_detected",{organization_id:n.id,delta_cents:d-h,previous_balance_cents:h,new_balance_cents:d}),ft.set(n.id,d),u.current.set(n.id,!0)}const g=!!i,l=d!=null&&d>0,p=d!=null&&d===0,C=d!=null&&d===200,x=s.length>0&&s.every(h=>h.providerId==="deco");return{hasDecoKey:g,decoKeyId:i?.id??null,balanceCents:d,balanceDollars:m,hasCredits:l,isZeroBalance:p,isInitialFreeCredit:C,hasOnlyDecoProvider:x,isLoading:r,isFetching:c,refetch:a}}export{Vo as A,Ro as N,Eo as O,Ho as a,ls as b,at as c,fs as d,Fo as e,Ht as f,$o as g,Bo as h,Lo as i,rt as r,Go as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./use-infinite-scroll-CbSN3uty.js";import{dW as i}from"./index-Dk9RGAqb.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as s}from"./use-infinite-scroll-CbSN3uty.js";import{dW as u,V as n}from"./index-Dk9RGAqb.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as K,b as tt,r as et,j as s,m as ot,B as nt}from"./index-Dk9RGAqb.js";import{z as vt,Y as dt,h as yt}from"./agent-icon-E6ioveGx.js";import{i as Tt}from"./ChevronRight-Dkp8mDOd.js";import{L as jt}from"./label-D9aEMZqo.js";import{m as pt}from"./automation-runs-CfKwQe7C.js";import{S as Nt}from"./switch-J9ypA9K4.js";import{T as wt,c as kt,a as Mt}from"./tooltip-xp77jFs4.js";import{V as _t}from"./view-mode-toggle-Dn7I7z16.js";import"./AlertCircle-1e3-NcEA.js";import"./Tool01-B0759esA.js";import"./ArrowUp-DI1fyC1G.js";import"./Settings02-BIGi-T7s.js";import"./Tool02-DPXeBg9E.js";import"./ArrowRight-B-wHAJWT.js";import"./ArrowUpRight-BWyzrLQV.js";import"./TrendUp01-CYCVS1zr.js";import"./ZapSquare-DGe1cTc7.js";import"./ZoomOut-B-F-8cp0.js";import"./Users03-3lwc9liE.js";import"./CheckCircle-Dh-3VdHB.js";import"./Check-LKA0FKR0.js";import"./ChevronDown-B3fDqERa.js";import"./ChevronUp-Cm7VcWLZ.js";import"./DotsVertical-DKanPfz6.js";import"./Stars02-DpsxkqJO.js";import"./Copy01-uQh3Q5Fv.js";import"./Globe01-CEh6-y49.js";import"./Eye-SCLKEZSh.js";import"./FilterLines-13dE_TWB.js";import"./Star01-lWHLfmir.js";import"./Globe04-B4VpGXlx.js";import"./SwitchHorizontal01-Dw_LQc0f.js";import"./HardDrive-DViLU95V.js";import"./Image01-CMEjSR3M.js";import"./Key01-CgioJ7nW.js";import"./LayoutLeft-Yz5NzG-w.js";import"./XCircle-B3aYrCCW.js";import"./LinkExternal01-Di_tOfr7.js";import"./LogOut01-r12Fp93g.js";import"./Monitor01-C_dYkXdo.js";import"./Sun-tOsjvEis.js";import"./Package-R2sM0vCm.js";import"./Palette-CsQxyyrG.js";import"./Play-CVGtm9ao.js";import"./Plus-CLG5QKCr.js";import"./SearchLg-CkXJjhdf.js";import"./SearchMd-DBj7HhoW.js";import"./Shield01-ksb0VZpA.js";import"./Stars01-B3jznQQ4.js";import"./Trash01-CWIa_mDx.js";import"./Upload01-CPD95nN4.js";import"./User01-NxrNjn_h.js";import"./Users01-DvtVVxdG.js";import"./XClose-CW0R6bEe.js";import"./X-BYXAQs6v.js";import"./Zap-CrMVm5NK.js";import"./select-Bd1WKGSJ.js";import"./useInfiniteQuery-64uGdBMx.js";import"./use-infinite-scroll-CbSN3uty.js";import"./use-connection-BsS-3rZB.js";import"./use-mcp-client-Bzvvd0Df.js";import"./auth-C4POVeVe.js";import"./use-virtual-mcp-BP-M67aZ.js";import"./card-DcA1Rwjs.js";import"./sidebar-DBzYJLC2.js";import"./use-mobile-DQ8jManM.js";import"./table-CIOCQP8H.js";import"./empty-state-CwB9YNml.js";import"./use-members-Cf3JeQ7o.js";import"./use-org-auth-client-B1nrzsgv.js";import"./use-clock-tick-jphDPs9A.js";import"./use-automations-m1Zli3xa.js";import"./studio-tools-CFgWeCBk.js";import"./useSuspenseInfiniteQuery-DYsYorpe.js";import"./avatar-BQF1QGjq.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DmTk3Ltj.js";import"./file-type-icon-_JzjFo75.js";import"./dialog-CzDwjrNV.js";import"./tab-id-BijBBRwE.js";import"./hooks-CvwQxo-K.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-C_GcVLtN.js";import"./chat-context-BF6sak7i.js";import"./autosend-CMYVBxZV.js";import"./use-ai-providers-Bujq_lmM.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-B3KnAJRh.js";import"./use-organization-settings-zX_T-3XG.js";import"./monaco-editor-CIeX3g7j.js";import"./index-CRECkoeT.js";import"./index-DaeJeAuV.js";import"./calendar-DV0NS9xq.js";import"./shell-layout-DCFL_zE0.js";import"./required-auth-layout-BfZFGRtL.js";import"./use-org-sso-w9j-Ok-z.js";import"./integration-icon-DBUjxWMb.js";import"./use-navigate-to-agent-D_vSOLwA.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-CB1-fSKl.js";import"./form-CJlgALpE.js";import"./input-C-gHIQip.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Dt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:n}=e,r=typeof t=="string",i=typeof n=="string";if(!r&&!i)return null;const o=r?new Date(t):Ct,a=i?new Date(n):Dt;return Number.isNaN(o.getTime())||Number.isNaN(a.getTime())||r&&i&&a.getTime()<=o.getTime()?null:{start:o,end:a,openStart:!r,openEnd:!i}}function ft(e,t){if(!e||typeof e!="object")return;const n=e.__resolveType;if(typeof n=="string"){if(Et.has(n)){const r=Rt(e);r&&t.push(r);return}if(St.has(n)){const r=e.matchers;if(Array.isArray(r))for(const i of r)ft(i,t)}}}function Ot(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const n=e.variants;return Array.isArray(n)}function It(e){if(typeof e=="string"){const m=e.trim();if(m.length===0)return null;try{const c=new URL(m).pathname.split("/").filter(Boolean),d=c[c.length-1];if(d)return decodeURIComponent(d)}catch{}return m.length>80?`${m.slice(0,77)}…`:m}if(!e||typeof e!="object")return null;const t=e,n=t.config,i=t.desktop?.media,o=[t.title,t.name,t.label,t.alt,n?.title,n?.name,n?.typeAlert?.message,i?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const m of o)if(typeof m=="string"&&m.trim().length>0)return m.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];typeof r=="number"?t.length>0?t[t.length-1]+=`[${r}]`:t.push(`[${r}]`):t.push(r)}return t.join(" · ")}function X(e,t,n,r,i){if(Ot(e)){const o=e.variants,a=e.__resolveType,m=$t.test(a)?"":Pt(r);o.forEach((l,c)=>{if(!l||typeof l!="object")return;const d=l,f=[];if(ft(d.rule,f),f.length===0)return;const x=It(d.value)??(m||n);for(const h of f)i.push({blockKey:t,blockLabel:n,innerPath:m,variantIndex:c,start:h.start,end:h.end,openStart:h.openStart,openEnd:h.openEnd,label:x,flagResolveType:a})});for(let l=0;l<o.length;l++){const c=o[l];c&&typeof c=="object"&&X(c.value,t,n,[...r,"variants",l,"value"],i)}return}if(Array.isArray(e)){for(let o=0;o<e.length;o++)X(e[o],t,n,[...r,o],i);return}if(e&&typeof e=="object")for(const[o,a]of Object.entries(e))o!=="__resolveType"&&X(a,t,n,[...r,o],i)}function Ft(e){if(!e)return[];const t=[];for(const[n,r]of Object.entries(e))X(r,n,Lt(n),[],t);return t.sort((n,r)=>n.start.getTime()-r.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),n=new Map;return t.forEach((r,i)=>{const o=i*137.508%360;n.set(r,{bg:`oklch(0.62 0.14 ${o})`,text:"white",border:`oklch(0.50 0.14 ${o})`})}),n}const Ht={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function ut(e,t){return e.get(t)??Ht}const Bt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ht=["January","February","March","April","May","June","July","August","September","October","November","December"],gt=1440*60*1e3;function B(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function xt(e){return new Date(e.getFullYear(),e.getMonth(),1)}function G(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function Z(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function st(e,t){return Math.round((B(e).getTime()-B(t).getTime())/gt)}function zt(e){const t=(e.getTime()-B(e).getTime())/gt;return Math.min(Math.max(t,0),1)}function it(e,t){return st(e,t)+zt(e)}function Wt(e){const t=Z(e,-e.getDay()),n=[];for(let r=0;r<6;r++){const i=[];for(let o=0;o<7;o++)i.push(Z(t,r*7+o));n.push(i)}for(;n.length>0&&n[n.length-1].every(r=>r.getMonth()!==e.getMonth());)n.pop();return n}function Yt(e,t){const n=B(e[0]),r=Z(n,7),i=n.getTime(),o=r.getTime(),a=[];for(const c of t){const d=B(c.start),f=B(c.end);if(f.getTime()<n.getTime()||d.getTime()>=r.getTime())continue;const u=d.getTime()<n.getTime()?n:d,x=f.getTime()>=r.getTime()?Z(r,-1):f,h=st(u,n),g=st(x,u)+1;if(g<=0)continue;const b=Math.max(c.start.getTime(),i),j=Math.min(c.end.getTime(),o),v=it(new Date(b),n),p=Math.max(it(new Date(j),n)-v,0);p<=0||a.push({variant:c,startCol:h,span:g,leftUnits:v,widthUnits:p})}a.sort((c,d)=>c.startCol-d.startCol||d.span-c.span||c.variant.blockKey.localeCompare(d.variant.blockKey));const m=[],l=[];for(const c of a){let d=m.findIndex(f=>f<=c.startCol);d===-1&&(d=m.length,m.push(0)),m[d]=c.startCol+c.span,l.push({...c,lane:d})}return l}const at=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Ut(e,t){const n=e.openStart?t("sandbox.variantCalendar.always"):at.format(e.start),r=e.openEnd?t("sandbox.variantCalendar.ongoing"):at.format(e.end);return`${n} → ${r}`}function Gt(e){const t=K.c(18),{variant:n}=e,r=tt();let i;t[0]!==n.blockLabel?(i=s.jsx("div",{className:"font-semibold",children:n.blockLabel}),t[0]=n.blockLabel,t[1]=i):i=t[1];let o;t[2]!==n.innerPath?(o=n.innerPath&&s.jsx("div",{className:"text-muted-foreground",children:n.innerPath}),t[2]=n.innerPath,t[3]=o):o=t[3];let a;t[4]!==n.blockLabel||t[5]!==n.innerPath||t[6]!==n.label?(a=n.label!==n.blockLabel&&n.label!==n.innerPath&&s.jsx("div",{className:"text-muted-foreground",children:n.label}),t[4]=n.blockLabel,t[5]=n.innerPath,t[6]=n.label,t[7]=a):a=t[7];let m;t[8]!==r||t[9]!==n?(m=Ut(n,r),t[8]=r,t[9]=n,t[10]=m):m=t[10];let l;t[11]!==m?(l=s.jsx("div",{className:"mt-1",children:m}),t[11]=m,t[12]=l):l=t[12];let c;return t[13]!==i||t[14]!==o||t[15]!==a||t[16]!==l?(c=s.jsx(Mt,{children:s.jsxs("div",{className:"text-xs",children:[i,o,a,l]})}),t[13]=i,t[14]=o,t[15]=a,t[16]=l,t[17]=c):c=t[17],c}const lt=16;function Kt(e,t){const n=e?"transparent":"#000 0",r=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${n}, #000 ${lt}px, #000 calc(100% - ${lt}px), ${r})`}function bt(e){const t=K.c(26),{variant:n,color:r,style:i,children:o,fadeStart:a,fadeEnd:m}=e,l=a===void 0?!1:a,c=m===void 0?!1:m;let d;t[0]!==c||t[1]!==l?(d=Kt(l,c),t[0]=c,t[1]=l,t[2]=d):d=t[2];const f=d;let u;t[3]!==l?(u=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=u):u=t[4];let x;t[5]!==c?(x=c&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=c,t[6]=x):x=t[6];let h;t[7]!==f?(h=f&&{maskImage:f,WebkitMaskImage:f},t[7]=f,t[8]=h):h=t[8];let g;t[9]!==r.bg||t[10]!==r.text||t[11]!==i||t[12]!==u||t[13]!==x||t[14]!==h?(g={background:r.bg,color:r.text,borderRadius:4,...u,...x,...h,...i},t[9]=r.bg,t[10]=r.text,t[11]=i,t[12]=u,t[13]=x,t[14]=h,t[15]=g):g=t[15];let b;t[16]!==o?(b=s.jsx("span",{className:"truncate",children:o}),t[16]=o,t[17]=b):b=t[17];let j;t[18]!==g||t[19]!==b?(j=s.jsx(wt,{asChild:!0,children:s.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:g,children:b})}),t[18]=g,t[19]=b,t[20]=j):j=t[20];let v;t[21]!==n?(v=s.jsx(Gt,{variant:n}),t[21]=n,t[22]=v):v=t[22];let p;return t[23]!==v||t[24]!==j?(p=s.jsxs(kt,{children:[j,v]}),t[23]=v,t[24]=j,t[25]=p):p=t[25],p}function ir(e){const t=K.c(72),{decofile:n}=e,r=tt(),[i,o]=et.useState("calendar"),[a,m]=et.useState(Xt),[l,c]=et.useState(!1);let d,f,u;if(t[0]!==n||t[1]!==l){const P=Ft(n);d=P.filter(Qt).length,u=l?P:P.filter(qt),f=Vt(u.map(Jt)),t[0]=n,t[1]=l,t[2]=d,t[3]=f,t[4]=u}else d=t[2],f=t[3],u=t[4];const x=f;let h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=()=>m(xt(new Date)),t[5]=h):h=t[5];const g=h;let b;t[6]!==i?(b=()=>m(P=>i==="calendar"?G(P,-1):G(P,-3)),t[6]=i,t[7]=b):b=t[7];const j=b;let v;t[8]!==i?(v=()=>m(P=>i==="calendar"?G(P,1):G(P,3)),t[8]=i,t[9]=v):v=t[9];const p=v;let y;t[10]!==r?(y=r("sandbox.variantCalendar.today"),t[10]=r,t[11]=y):y=t[11];let T;t[12]!==y?(T=s.jsx(nt,{variant:"outline",size:"sm",onClick:g,children:y}),t[12]=y,t[13]=T):T=t[13];let w;t[14]!==r?(w=r("sandbox.variantCalendar.previous"),t[14]=r,t[15]=w):w=t[15];let D;t[16]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(vt,{size:16}),t[16]=D):D=t[16];let k;t[17]!==j||t[18]!==w?(k=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:j,"aria-label":w,children:D}),t[17]=j,t[18]=w,t[19]=k):k=t[19];let M;t[20]!==r?(M=r("sandbox.variantCalendar.next"),t[20]=r,t[21]=M):M=t[21];let S;t[22]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Tt,{size:16}),t[22]=S):S=t[22];let A;t[23]!==p||t[24]!==M?(A=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:p,"aria-label":M,children:S}),t[23]=p,t[24]=M,t[25]=A):A=t[25];const $=ht[a.getMonth()];let C;t[26]!==a?(C=a.getFullYear(),t[26]=a,t[27]=C):C=t[27];let _;t[28]!==$||t[29]!==C?(_=s.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[$," ",C]}),t[28]=$,t[29]=C,t[30]=_):_=t[30];let N;t[31]!==A||t[32]!==_||t[33]!==T||t[34]!==k?(N=s.jsxs("div",{className:"flex items-center gap-2",children:[T,k,A,_]}),t[31]=A,t[32]=_,t[33]=T,t[34]=k,t[35]=N):N=t[35];let L;t[36]!==d||t[37]!==l||t[38]!==r?(L=d>0&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Nt,{id:"show-ongoing",checked:l,onCheckedChange:c}),s.jsx(jt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:r("sandbox.variantCalendar.showOngoing",{count:d})})]}),t[36]=d,t[37]=l,t[38]=r,t[39]=L):L=t[39];let H;t[40]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(dt,{}),t[40]=H):H=t[40];let F;t[41]!==r?(F=r("sandbox.variantCalendar.calendarMode"),t[41]=r,t[42]=F):F=t[42];let E;t[43]!==F?(E={value:"calendar",icon:H,label:F},t[43]=F,t[44]=E):E=t[44];let z;t[45]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(yt,{}),t[45]=z):z=t[45];let R;t[46]!==r?(R=r("sandbox.variantCalendar.timelineMode"),t[46]=r,t[47]=R):R=t[47];let O;t[48]!==R?(O={value:"timeline",icon:z,label:R},t[48]=R,t[49]=O):O=t[49];let I;t[50]!==E||t[51]!==O?(I=[E,O],t[50]=E,t[51]=O,t[52]=I):I=t[52];let V;t[53]!==I||t[54]!==i?(V=s.jsx(_t,{value:i,onValueChange:o,options:I}),t[53]=I,t[54]=i,t[55]=V):V=t[55];let W;t[56]!==L||t[57]!==V?(W=s.jsxs("div",{className:"flex items-center gap-4",children:[L,V]}),t[56]=L,t[57]=V,t[58]=W):W=t[58];let Y;t[59]!==N||t[60]!==W?(Y=s.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[N,W]}),t[59]=N,t[60]=W,t[61]=Y):Y=t[61];let U;t[62]!==x||t[63]!==a||t[64]!==d||t[65]!==l||t[66]!==u||t[67]!==i?(U=u.length===0?s.jsx(Zt,{hiddenOngoing:l?0:d}):i==="calendar"?s.jsx(ee,{monthStart:a,variants:u,colorMap:x}):s.jsx(oe,{monthStart:a,variants:u,colorMap:x}),t[62]=x,t[63]=a,t[64]=d,t[65]=l,t[66]=u,t[67]=i,t[68]=U):U=t[68];let q;return t[69]!==Y||t[70]!==U?(q=s.jsxs("div",{className:"flex h-full w-full flex-col",children:[Y,U]}),t[69]=Y,t[70]=U,t[71]=q):q=t[71],q}function Jt(e){return e.blockKey}function qt(e){return!e.openEnd}function Qt(e){return e.openEnd}function Xt(){return xt(new Date)}function Zt(e){const t=K.c(4),{hiddenOngoing:n}=e,r=n===void 0?0:n,i=tt();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(dt,{size:24,className:"text-muted-foreground/60"}),t[0]=o):o=t[0];let a;return t[1]!==r||t[2]!==i?(a=s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[o,r>0?s.jsxs(s.Fragment,{children:[s.jsx("div",{children:i("sandbox.variantCalendar.noDatedVariants")}),s.jsx("div",{className:"text-xs text-muted-foreground/80",children:i("sandbox.variantCalendar.hiddenOngoingVariants",{count:r})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{children:i("sandbox.variantCalendar.noScheduledVariants")}),s.jsx("div",{className:"text-xs text-muted-foreground/80",children:i("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=r,t[2]=i,t[3]=a):a=t[3],a}const rt=20,ct=2,mt=28,te=6;function ee(e){const t=K.c(17),{monthStart:n,variants:r,colorMap:i}=e;let o,a,m,l,c;if(t[0]!==i||t[1]!==n||t[2]!==r){const u=Wt(n),x=B(new Date);o=pt,c="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:Bt.map(re)}),t[8]=m):m=t[8],l=u.map((h,g)=>{const b=Yt(h,r),j=b.reduce(ne,0),v=mt+j*(rt+ct)+8;return s.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:v},children:[h.map((p,y)=>{const T=p.getMonth()===n.getMonth(),w=p.getTime()===x.getTime();return s.jsx("div",{className:ot("border-r last:border-r-0 px-2 pt-1.5 text-xs",T?"bg-background":"bg-muted/30 text-muted-foreground"),children:s.jsx("span",{className:ot("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",w&&"bg-primary text-primary-foreground font-semibold"),children:p.getDate()})},y)}),b.map((p,y)=>{const T=ut(i,p.variant.blockKey),w=mt+p.lane*(rt+ct),D=p.leftUnits/7*100,k=p.widthUnits/7*100,M=p.variant.openStart&&g===0,S=p.variant.openEnd&&g===u.length-1;return s.jsxs(bt,{variant:p.variant,color:T,fadeStart:M,fadeEnd:S,style:{top:w,left:`calc(${D}% + 2px)`,width:`calc(${k}% - 4px)`,minWidth:te,height:rt},children:[p.variant.blockLabel,p.variant.label!==p.variant.blockLabel&&s.jsxs("span",{className:"opacity-70",children:[" · ",p.variant.label]})]},`${g}-${y}`)})]},g)}),t[0]=i,t[1]=n,t[2]=r,t[3]=o,t[4]=a,t[5]=m,t[6]=l,t[7]=c}else o=t[3],a=t[4],m=t[5],l=t[6],c=t[7];let d;t[9]!==a||t[10]!==m||t[11]!==l?(d=s.jsxs("div",{className:a,children:[m,l]}),t[9]=a,t[10]=m,t[11]=l,t[12]=d):d=t[12];let f;return t[13]!==o||t[14]!==c||t[15]!==d?(f=s.jsx(o,{className:c,children:d}),t[13]=o,t[14]=c,t[15]=d,t[16]=f):f=t[16],f}function ne(e,t){return Math.max(e,t.lane+1)}function re(e){return s.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const Q=4,se=32,J=240;function oe(e){const t=K.c(23),{monthStart:n,variants:r,colorMap:i}=e,o=n,a=G(n,Q),m=new Date,l=new Map;for(const _ of r){const N=l.get(_.blockKey)??[];N.push(_),l.set(_.blockKey,N)}const c=Array.from(l.entries()).sort(le),d=a.getTime()-o.getTime(),f=_=>(Math.max(o.getTime(),Math.min(a.getTime(),_.getTime()))-o.getTime())/d*100;let u;t[0]!==o?(u=(_,N)=>G(o,N),t[0]=o,t[1]=u):u=t[1];const x=Array.from({length:Q},u),h=m.getTime()>=o.getTime()&&m.getTime()<=a.getTime()?f(m):null,g=tt(),b=pt,j="flex-1 min-h-0",v="min-w-[900px] relative";let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p={width:J},t[2]=p):p=t[2];let y;t[3]!==g?(y=g("sandbox.variantCalendar.variantBlock"),t[3]=g,t[4]=y):y=t[4];let T;t[5]!==y?(T=s.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:p,children:y}),t[5]=y,t[6]=T):T=t[6];let w;t[7]===Symbol.for("react.memo_cache_sentinel")?(w={gridTemplateColumns:`repeat(${Q}, minmax(0, 1fr))`},t[7]=w):w=t[7];const D=x.map(ae);let k;t[8]!==D?(k=s.jsx("div",{className:"flex-1 grid",style:w,children:D}),t[8]=D,t[9]=k):k=t[9];let M;t[10]!==T||t[11]!==k?(M=s.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[T,k]}),t[10]=T,t[11]=k,t[12]=M):M=t[12];let S;t[13]!==g||t[14]!==h?(S=h!==null&&s.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${J}px + (100% - ${J}px) * ${h} / 100)`},children:s.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:g("sandbox.variantCalendar.todayLabel")})}),t[13]=g,t[14]=h,t[15]=S):S=t[15];const A=c.map(_=>{const[N,L]=_,H=ut(i,N),F=L[0]?.blockLabel??N;return s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:s.jsx("div",{className:"px-3 truncate",style:{width:J},children:F})}),L.map((E,z)=>s.jsxs("div",{className:"flex border-b items-center",style:{height:se},children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:J},children:[s.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:H.bg}}),s.jsx("span",{className:"truncate text-foreground/80",children:E.label})]}),s.jsxs("div",{className:"relative flex-1 h-full",children:[s.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${Q}, minmax(0, 1fr))`},children:x.map(ie)}),(()=>{const R=Math.max(E.start.getTime(),o.getTime()),O=Math.min(E.end.getTime(),a.getTime());if(O<=R)return null;const I=f(new Date(R)),V=f(new Date(O))-I;return s.jsx(bt,{variant:E,color:H,fadeStart:E.openStart,fadeEnd:E.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${I}%`,width:`calc(${V}% - 2px)`,height:22},children:E.label})})()]})]},z))]},N)});let $;t[16]!==M||t[17]!==S||t[18]!==A?($=s.jsxs("div",{className:v,children:[M,S,A]}),t[16]=M,t[17]=S,t[18]=A,t[19]=$):$=t[19];let C;return t[20]!==b||t[21]!==$?(C=s.jsx(b,{className:j,children:$}),t[20]=b,t[21]=$,t[22]=C):C=t[22],C}function ie(e,t){return s.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function ae(e,t){return s.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ht[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function le(e,t){return e[0].localeCompare(t[0])}export{ir as VariantCalendar};
|