decocms 4.248.2 → 4.248.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DYa65h7M.js → AlertCircle-BJLsdJJB.js} +1 -1
- package/dist/client/assets/{AreaChart-Z7000aGF.js → AreaChart-DPRb077p.js} +1 -1
- package/dist/client/assets/{ArrowLeft-D0sSJGyh.js → ArrowLeft-BpINHsGO.js} +1 -1
- package/dist/client/assets/{ArrowUp-DaPuMC6J.js → ArrowUp-BCnJIsa2.js} +1 -1
- package/dist/client/assets/{Check-ErA_74IV.js → Check-DYWCAvRe.js} +1 -1
- package/dist/client/assets/{CheckCircle-CiRCtOI3.js → CheckCircle-CZfdFD75.js} +1 -1
- package/dist/client/assets/{ChevronDown-Dgga4a4Q.js → ChevronDown-Dm7RFEzi.js} +1 -1
- package/dist/client/assets/{ChevronRight-Cf-ty0tK.js → ChevronRight-DfFDfMiT.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BS9Eaphx.js → ChevronSelectorVertical-BrPFZOd6.js} +1 -1
- package/dist/client/assets/{ChevronUp-DOEAI0tE.js → ChevronUp-YRlpUnbI.js} +1 -1
- package/dist/client/assets/{Copy01-C8DEngph.js → Copy01-B7kE9119.js} +1 -1
- package/dist/client/assets/{CreditCard01-LLnESWWX.js → CreditCard01-BBWGD6ln.js} +1 -1
- package/dist/client/assets/{DotsVertical-B9Mg1LjT.js → DotsVertical-Ds_DhNTo.js} +1 -1
- package/dist/client/assets/{Download01-CKTo0VS3.js → Download01-CtExxOFo.js} +1 -1
- package/dist/client/assets/{Eye-C-IIbq0b.js → Eye-Bkw_HSyr.js} +1 -1
- package/dist/client/assets/{FilterLines-BmuWDJhh.js → FilterLines-CdBZbJbR.js} +1 -1
- package/dist/client/assets/{Globe01-AGteY5p8.js → Globe01-CbzTjXVx.js} +1 -1
- package/dist/client/assets/{Globe04-B6IxAzhj.js → Globe04-5uq9vA8E.js} +1 -1
- package/dist/client/assets/{HardDrive-Bxx1_cqg.js → HardDrive-DLZzUCJy.js} +1 -1
- package/dist/client/assets/{Key01-Du0R52Fs.js → Key01-WP13V6P8.js} +1 -1
- package/dist/client/assets/{LinkExternal01-lwDudDKU.js → LinkExternal01-DWP8dcJA.js} +1 -1
- package/dist/client/assets/{LockUnlocked01-ChTbbG9p.js → LockUnlocked01-BsAWOf6A.js} +1 -1
- package/dist/client/assets/{LogOut01-VHtvJ8Vp.js → LogOut01-DUJGO4hF.js} +1 -1
- package/dist/client/assets/{Monitor01-DA25Iq0R.js → Monitor01-DZgvR7bI.js} +1 -1
- package/dist/client/assets/{Palette-yngNVQ4n.js → Palette-BRlImZFI.js} +1 -1
- package/dist/client/assets/{Play-CsQhzYUI.js → Play-xBrWdkON.js} +1 -1
- package/dist/client/assets/{Plus-Cf4b1bNp.js → Plus-DKhcQWfb.js} +1 -1
- package/dist/client/assets/{SearchLg-CIhGyLjl.js → SearchLg-BzZYCybQ.js} +1 -1
- package/dist/client/assets/{SearchMd-B1dsuEY7.js → SearchMd-C-eFE6qY.js} +1 -1
- package/dist/client/assets/{Settings02-zoYBf2Q9.js → Settings02-DsPup1VS.js} +1 -1
- package/dist/client/assets/{Share07-KO4nWaTW.js → Share07-_7OUHtSc.js} +1 -1
- package/dist/client/assets/{Shield01-EKP5VJCL.js → Shield01-BMGrPJL4.js} +1 -1
- package/dist/client/assets/{Stars01-BgC1nyVS.js → Stars01-DyPW1NZ3.js} +1 -1
- package/dist/client/assets/{Stars02-D7QMgn6_.js → Stars02-CsRg1_DW.js} +1 -1
- package/dist/client/assets/{Sun-CH0lCvO4.js → Sun-lLrEGeIB.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-ByrC3JZW.js → SwitchHorizontal01-Buwrdn2y.js} +1 -1
- package/dist/client/assets/{Tool01-BjJidQ3c.js → Tool01-Dg67-JKv.js} +1 -1
- package/dist/client/assets/{Tool02-Bs7nBBx_.js → Tool02-_e_W6rPa.js} +1 -1
- package/dist/client/assets/{Trash01-C4UDDTjr.js → Trash01-649gpHj9.js} +1 -1
- package/dist/client/assets/{TrendUp01-BQO_JaWi.js → TrendUp01-CSEGC0U8.js} +1 -1
- package/dist/client/assets/{Upload01-k3Mh0fZU.js → Upload01-DjDsiYUt.js} +1 -1
- package/dist/client/assets/{User01-m6vclzYC.js → User01-Dlgu2BER.js} +1 -1
- package/dist/client/assets/{UserSquare-1p4hY8NI.js → UserSquare-BS_e8Pjv.js} +1 -1
- package/dist/client/assets/{Users01-CWeSTta9.js → Users01-C7EqAQaR.js} +1 -1
- package/dist/client/assets/{Users03-a8f_wZmP.js → Users03-DvaTkZMF.js} +1 -1
- package/dist/client/assets/{XCircle-3TmYYaVT.js → XCircle-Cn5WdVId.js} +1 -1
- package/dist/client/assets/{XClose-BO1_8YHD.js → XClose-DyI1k_z6.js} +1 -1
- package/dist/client/assets/{YAxis-DrM-OWWa.js → YAxis-BOx2DF1X.js} +1 -1
- package/dist/client/assets/{Zap-BUA1_Jut.js → Zap-D44l2tlW.js} +1 -1
- package/dist/client/assets/{ZapSquare-8U0SgWLp.js → ZapSquare-DUHD_nc-.js} +1 -1
- package/dist/client/assets/{access-gate-D3zAqPzH.js → access-gate-D_1GlcS4.js} +1 -1
- package/dist/client/assets/agent-icon-BhfneAwy.js +1 -0
- package/dist/client/assets/agents-list-BUvHAwfb.js +1 -0
- package/dist/client/assets/ai-providers-lRapbKCn.js +6 -0
- package/dist/client/assets/{alert-DSZ984JY.js → alert-CuEsZrDf.js} +1 -1
- package/dist/client/assets/{alert-dialog-BBUALe3i.js → alert-dialog-fRZZzq2b.js} +2 -2
- package/dist/client/assets/api-keys-DOxIXB_j.js +1 -0
- package/dist/client/assets/app-editor-C_guf21J.js +1 -0
- package/dist/client/assets/{auth-CS2cT5wl.js → auth-CsyM6wOp.js} +1 -1
- package/dist/client/assets/{auth-catchall-Bs5rDKB8.js → auth-catchall-B-WhgvT0.js} +1 -1
- package/dist/client/assets/{auth-entry-B7mR5g8T.js → auth-entry-CQkyABOA.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CxqUA4_R.js → auth-split-layout-vT7dwNTB.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CB658Lpc.js → authenticate-and-persist-oauth-D5NQEgY8.js} +1 -1
- package/dist/client/assets/{automation-list-row-DqAvOKpL.js → automation-list-row-BDX5Zyot.js} +1 -1
- package/dist/client/assets/{automation-runs-C7VPpqIt.js → automation-runs-DTPprHYR.js} +16 -16
- package/dist/client/assets/automations-CkB3kyG0.js +1 -0
- package/dist/client/assets/{avatar-md-XNPuR.js → avatar-DeFAeBFl.js} +1 -1
- package/dist/client/assets/{badge-BR2WgVsV.js → badge-BNu531uc.js} +1 -1
- package/dist/client/assets/{block-document-yl-Al_kf.js → block-document-x1IV3qey.js} +1 -1
- package/dist/client/assets/buckets-J-wFqi2h.js +1 -0
- package/dist/client/assets/bulk-category-panel-CEdqKYSP.js +1 -0
- package/dist/client/assets/{capability-load-error-BornUXv-.js → capability-load-error-DUMl4Cfr.js} +1 -1
- package/dist/client/assets/{cards-B5pz2XNy.js → cards-CL2vc4-W.js} +1 -1
- package/dist/client/assets/category-editor-NdAWtsih.js +1 -0
- package/dist/client/assets/{chart-Dw43HBj2.js → chart-CArbD1Z5.js} +3 -3
- package/dist/client/assets/chat-context-C-y8N43p.js +35 -0
- package/dist/client/assets/{checkbox-CNnFytxt.js → checkbox-D3MLpBTA.js} +1 -1
- package/dist/client/assets/choose-editor-2qYKfGsR.js +1 -0
- package/dist/client/assets/{cli-auth-success-B37XVEcm.js → cli-auth-success-CDGc5a3I.js} +1 -1
- package/dist/client/assets/collection-detail-C2cTonBC.js +1 -0
- package/dist/client/assets/collection-display-button-jiE_9-7-.js +1 -0
- package/dist/client/assets/collection-search-CNrn5ZLG.js +1 -0
- package/dist/client/assets/{collection-table-wrapper-C12GS9C3.js → collection-table-wrapper-C4xZgp9x.js} +1 -1
- package/dist/client/assets/{collection-tabs-Dfa_vQOq.js → collection-tabs-Dg_azfZv.js} +1 -1
- package/dist/client/assets/{command-CXX8Roxa.js → command-BlvzBYcm.js} +1 -1
- package/dist/client/assets/commerce-onboarding-D0tGx8Lj.js +1 -0
- package/dist/client/assets/connect-D3748pCj.js +8 -0
- package/dist/client/assets/connection-CeBlIp_O.js +1 -0
- package/dist/client/assets/connection-card-B5D9qN3O.js +1 -0
- package/dist/client/assets/connection-detail-DuwCDpDs.js +1 -0
- package/dist/client/assets/connection-form-helpers-B3UcqYZu.js +1 -0
- package/dist/client/assets/connections-Dm3ee4Hu.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-BbcmZgTF.js → decopilot-sse-pool-DvpyeiPr.js} +1 -1
- package/dist/client/assets/dialog-CuqXnWbf.js +1 -0
- package/dist/client/assets/domain-settings-fQdlB2tF.js +1 -0
- package/dist/client/assets/{drawer-9chetton.js → drawer-Dw47OmQ9.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Dhjx8BUz.js → dropdown-menu-Cg8GO9Ey.js} +1 -1
- package/dist/client/assets/{empty-state-BHXPcV6D.js → empty-state-DgtjDyl7.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DyM1tiNg.js → extract-connection-data-CFDQblVE.js} +1 -1
- package/dist/client/assets/{file-explorer-CGdZE7j0.js → file-explorer-BKaBUpVr.js} +2 -2
- package/dist/client/assets/{file-type-icon-jL53noJP.js → file-type-icon-BfTCeyA7.js} +1 -1
- package/dist/client/assets/{form-Cb2ftegM.js → form-gSf7rSoB.js} +1 -1
- package/dist/client/assets/general-fQ-9F_8c.js +1 -0
- package/dist/client/assets/{github-repo-picker-B0itW_sn.js → github-repo-picker-DxNDjsxj.js} +1 -1
- package/dist/client/assets/{hooks-BasSX9U3.js → hooks-IJLcrm9m.js} +5 -5
- package/dist/client/assets/{index-CJWr9N0v.js → index-BXFmp3WW.js} +1 -1
- package/dist/client/assets/index-BoZK85Tz.js +1 -0
- package/dist/client/assets/index-C-W5dASy.js +235 -0
- package/dist/client/assets/{index-BnYSClvU.js → index-CTd9wjzr.js} +37 -37
- package/dist/client/assets/{index-BHhk6DR8.js → index-CZyJSpiW.js} +2 -2
- package/dist/client/assets/{index-ZiQvvnOE.js → index-DkaFt-ER.js} +1 -1
- package/dist/client/assets/index-E5NqaLsL.js +1 -0
- package/dist/client/assets/index-JZrhswCW.js +1 -0
- package/dist/client/assets/index-redirect-BARimKaN.js +1 -0
- package/dist/client/assets/{index-BGLk9CX0.js → index-rmUjTFsu.js} +2 -2
- package/dist/client/assets/infra-billing-CsjaugX6.js +1 -0
- package/dist/client/assets/{input-7l72-E74.js → input-BPzKKVIm.js} +1 -1
- package/dist/client/assets/{integration-icon-9hdQMmio.js → integration-icon-0pMS4e0x.js} +1 -1
- package/dist/client/assets/invite-member-dialog-DncQfqgo.js +1 -0
- package/dist/client/assets/{label-Di7XD03t.js → label-Cy4ljnv_.js} +1 -1
- package/dist/client/assets/layout-DH8wLQcr.js +1 -0
- package/dist/client/assets/{login-B01_8Sdh.js → login-CYjOmWQU.js} +1 -1
- package/dist/client/assets/{mcp-oauth-_naDcGdv.js → mcp-oauth-D5NqWvPJ.js} +1 -1
- package/dist/client/assets/members-2QPdx0w5.js +1 -0
- package/dist/client/assets/{monaco-editor-DgD9evL7.js → monaco-editor-SX25UZKO.js} +4 -4
- package/dist/client/assets/{monitoring-stats-row-B0BLM1my.js → monitoring-stats-row-DOzTz31T.js} +1 -1
- package/dist/client/assets/{multi-select-BLNYHoGy.js → multi-select-DQX6uGgz.js} +1 -1
- package/dist/client/assets/{oauth-callback-BqBCpIME.js → oauth-callback-Bl1uQrp-.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DA5Wl5SM.js → oauth-callback-ai-provider-D6vkHSiC.js} +1 -1
- package/dist/client/assets/{onboarding-px_II1bW.js → onboarding-DLUW7rwC.js} +1 -1
- package/dist/client/assets/{org-layout-DFED5zNf.js → org-layout-CHqCDI-6.js} +1 -1
- package/dist/client/assets/{organization-choice-IrwqMfm_.js → organization-choice-C665vOEP.js} +1 -1
- package/dist/client/assets/orgs-B8XetzAm.js +1 -0
- package/dist/client/assets/{page-seo-form-Cm5Qv5ak.js → page-seo-form-BqksEx3f.js} +1 -1
- package/dist/client/assets/{popover-CfGL7saO.js → popover-CKC_v_FI.js} +1 -1
- package/dist/client/assets/post-editor-D0V_cWUV.js +1 -0
- package/dist/client/assets/{primitives-DIc8lbRG.js → primitives-C4dJYS7T.js} +1 -1
- package/dist/client/assets/profile-CUktqNbW.js +1 -0
- package/dist/client/assets/project-app-view-DQXGeh0y.js +1 -0
- package/dist/client/assets/record-editor-D5yY3Dz9.js +1 -0
- package/dist/client/assets/redirect-editor-BEdHUyBe.js +1 -0
- package/dist/client/assets/registry-BWnBGVZj.js +2 -0
- package/dist/client/assets/{registry-layout-t9OiEUok.js → registry-layout-1Qslk_W6.js} +4 -4
- package/dist/client/assets/{reports-B-JkBTXv.js → reports-Bvrg-uin.js} +1 -1
- package/dist/client/assets/require-capability-DR7Mbbou.js +1 -0
- package/dist/client/assets/{required-auth-layout-DgjkQLI6.js → required-auth-layout-C7iO_f_Y.js} +1 -1
- package/dist/client/assets/{reset-password-C_dZ8Eqo.js → reset-password-D5H5T765.js} +1 -1
- package/dist/client/assets/roles-D4n1d-tX.js +1 -0
- package/dist/client/assets/{search-input-DsWKOK9t.js → search-input-vt9k7znl.js} +1 -1
- package/dist/client/assets/secrets-saGLdJQ9.js +1 -0
- package/dist/client/assets/{sections-editor-hTI5vt6I.js → sections-editor-dlfE05iX.js} +2 -2
- package/dist/client/assets/select-CX1EQjk0.js +1 -0
- package/dist/client/assets/{select-model-Dqz5FPx4.js → select-model-By0_2E97.js} +2 -2
- package/dist/client/assets/self-tool-result-wLzQezsb.js +1 -0
- package/dist/client/assets/seo-editor-BgJ2ySZq.js +1 -0
- package/dist/client/assets/settings-layout-_qKXk5vn.js +1 -0
- package/dist/client/assets/shell-controls-DUgcifyl.js +1 -0
- package/dist/client/assets/shell-layout-BGunSaDG.js +1 -0
- package/dist/client/assets/{spinner-glqojFDA.js → spinner-DQUJXeRb.js} +1 -1
- package/dist/client/assets/sso-DNeFyj4s.js +1 -0
- package/dist/client/assets/store-CLnACfV7.js +1 -0
- package/dist/client/assets/store-registry-CYcCjiAW.js +2 -0
- package/dist/client/assets/switch-080KuP0Z.js +1 -0
- package/dist/client/assets/synced-repos-CQQV9Zjv.js +1 -0
- package/dist/client/assets/{tab-id-CYxMrTRp.js → tab-id-BMHIgJVu.js} +1 -1
- package/dist/client/assets/{table-_DZMZF7n.js → table-DxRhe_5K.js} +1 -1
- package/dist/client/assets/tabs-Dt2F-lST.js +1 -0
- package/dist/client/assets/tasks-BaA9DyLn.js +1 -0
- package/dist/client/assets/textarea-C50htUTR.js +1 -0
- package/dist/client/assets/toggle-group-CT4Q_c7z.js +1 -0
- package/dist/client/assets/{toolbar-DEkBOfzd.js → toolbar-nEkAKWTR.js} +1 -1
- package/dist/client/assets/{track-C3SQxOl4.js → track-BifnyqN6.js} +1 -1
- package/dist/client/assets/{types-Dh-L4V2P.js → types-DZVMpxej.js} +4 -4
- package/dist/client/assets/use-ai-providers-Chs1tcQD.js +1 -0
- package/dist/client/assets/use-api-keys-Djf4Eh5p.js +1 -0
- package/dist/client/assets/use-automations-CmpL_Mom.js +1 -0
- package/dist/client/assets/{use-autosave-P4ije4un.js → use-autosave-D5h0ivOe.js} +1 -1
- package/dist/client/assets/{use-clock-tick-yZZNkqhy.js → use-clock-tick-Cad8pAZ9.js} +1 -1
- package/dist/client/assets/use-commerce-diagnostic-CRHEo45Z.js +1 -0
- package/dist/client/assets/use-connection-DzUFG_BF.js +1 -0
- package/dist/client/assets/{use-copy-BGwAE5Xe.js → use-copy-B43wL_o8.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-B5mSvVFn.js → use-create-virtual-mcp-CTvxs6s1.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BDvfPMkV.js → use-debounced-autosave-DSiZvyT9.js} +1 -1
- package/dist/client/assets/{use-debounced-value-UZPGD-zb.js → use-debounced-value-Dq1JGl41.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-8dmobXlE.js → use-decopilot-events-ka0F1PHR.js} +1 -1
- package/dist/client/assets/use-delete-connection-CySUkdqd.js +1 -0
- package/dist/client/assets/{use-deployment-admin-tOuWllrn.js → use-deployment-admin-BQBai7bt.js} +1 -1
- package/dist/client/assets/use-file-configs-B6WrrXgQ.js +1 -0
- package/dist/client/assets/{use-infinite-scroll-Dzm35RNS.js → use-infinite-scroll-4H8mlAbs.js} +1 -1
- package/dist/client/assets/use-join-requests-eJo_jJba.js +1 -0
- package/dist/client/assets/{use-mcp-client-DFoPNyXR.js → use-mcp-client-PMt78ucZ.js} +7 -7
- package/dist/client/assets/use-mcp-tools-BgEqxU0u.js +1 -0
- package/dist/client/assets/use-members-CzhU7i-s.js +1 -0
- package/dist/client/assets/{use-navigate-to-agent-CX93JJ-W.js → use-navigate-to-agent-DpqkGd8j.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CiGZ-xlx.js → use-org-auth-client-DCF2a5iN.js} +1 -1
- package/dist/client/assets/use-org-repo-syncs-t5rFG9d3.js +1 -0
- package/dist/client/assets/{use-org-sso-CHwTj_pK.js → use-org-sso-DmTf_LfQ.js} +1 -1
- package/dist/client/assets/{use-organization-roles-ChU_RgEA.js → use-organization-roles-7NQcUwh1.js} +1 -1
- package/dist/client/assets/use-organization-settings-BQYM8ne1.js +1 -0
- package/dist/client/assets/{use-registry-connections-BvzfOtMr.js → use-registry-connections-CrLBfd4m.js} +1 -1
- package/dist/client/assets/use-secrets-2hVFkyTr.js +1 -0
- package/dist/client/assets/{use-section-preview-base-CYcMtPj5.js → use-section-preview-base-CnPY0DDc.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BWK3t0nt.js → use-status-sounds-u8GHDfsk.js} +1 -1
- package/dist/client/assets/use-tags-C5qFTaG8.js +1 -0
- package/dist/client/assets/use-view-mode-DWyYPm90.js +1 -0
- package/dist/client/assets/{use-virtual-mcp-BbdjNQ1e.js → use-virtual-mcp-eZtpf4bS.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-UhiHP148.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-Cf9qli1T.js +1 -0
- package/dist/client/assets/users-j4gaj7Zx.js +1 -0
- package/dist/client/assets/variant-calendar-DvHJ9GeI.js +1 -0
- package/dist/client/assets/view-mode-toggle-DdFZltId.js +1 -0
- 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/ArrowUpRight-Dv9QvAW5.js +0 -1
- package/dist/client/assets/LayoutLeft-BKrrf1xY.js +0 -1
- package/dist/client/assets/X-IBBjQPfk.js +0 -1
- package/dist/client/assets/agent-icon-vjhOL9u6.js +0 -1
- package/dist/client/assets/agents-list-DJeAJ_3a.js +0 -1
- package/dist/client/assets/ai-providers-DmqZvdDR.js +0 -6
- package/dist/client/assets/api-keys-DEdlM0o6.js +0 -1
- package/dist/client/assets/app-editor-DGG6hIQW.js +0 -1
- package/dist/client/assets/automations-QJpsEj6l.js +0 -1
- package/dist/client/assets/buckets-D7AznYZl.js +0 -1
- package/dist/client/assets/bulk-category-panel-Aw08g8MP.js +0 -1
- package/dist/client/assets/card-IdHCmi8B.js +0 -1
- package/dist/client/assets/category-editor-BLU7MJ_a.js +0 -1
- package/dist/client/assets/chat-context-Df1gS1sI.js +0 -35
- package/dist/client/assets/choose-editor-BGNNx0rr.js +0 -1
- package/dist/client/assets/collection-detail-CdVhmMD8.js +0 -1
- package/dist/client/assets/collection-display-button-DpaZ3d0j.js +0 -1
- package/dist/client/assets/collection-search-BQLruUQ4.js +0 -1
- package/dist/client/assets/commerce-onboarding-BOD-_HLG.js +0 -1
- package/dist/client/assets/connect-VrBLOQz7.js +0 -8
- package/dist/client/assets/connection-D6NWrsFQ.js +0 -1
- package/dist/client/assets/connection-card-2s-BDhzN.js +0 -1
- package/dist/client/assets/connection-detail-rH7mQov2.js +0 -1
- package/dist/client/assets/connection-form-helpers-BahPv0zc.js +0 -1
- package/dist/client/assets/connections-X1ffPxSi.js +0 -1
- package/dist/client/assets/dialog-B0pGkX2q.js +0 -1
- package/dist/client/assets/domain-settings-CBmnQIJo.js +0 -1
- package/dist/client/assets/general-DdO_16ZO.js +0 -1
- package/dist/client/assets/index-BVEEZvKv.js +0 -1
- package/dist/client/assets/index-CkEYKazi.js +0 -1
- package/dist/client/assets/index-DBsyf30G.js +0 -1
- package/dist/client/assets/index-DTCr2n-a.js +0 -235
- package/dist/client/assets/index-mAaX9S9j.js +0 -1
- package/dist/client/assets/index-redirect-D24SfTyt.js +0 -1
- package/dist/client/assets/infra-billing-DCiyfS8M.js +0 -1
- package/dist/client/assets/invite-member-dialog-CEZXV_r9.js +0 -1
- package/dist/client/assets/layout-HxxUtI_4.js +0 -1
- package/dist/client/assets/members-C7m7k6Aj.js +0 -1
- package/dist/client/assets/orgs-Ba0nF6qS.js +0 -1
- package/dist/client/assets/post-editor-yBvya3yr.js +0 -1
- package/dist/client/assets/profile-ZEjk6oqp.js +0 -1
- package/dist/client/assets/project-app-view-Ba53vvVz.js +0 -1
- package/dist/client/assets/record-editor-B2rcuwQk.js +0 -1
- package/dist/client/assets/redirect-editor-C-iqitv1.js +0 -1
- package/dist/client/assets/registry-BShVgR7c.js +0 -2
- package/dist/client/assets/require-capability-BganaMDA.js +0 -1
- package/dist/client/assets/roles-CPT4_Zim.js +0 -1
- package/dist/client/assets/secrets-Cm0Tre0I.js +0 -1
- package/dist/client/assets/select-BRuvjhJw.js +0 -1
- package/dist/client/assets/self-tool-result-mEKHKLZ8.js +0 -1
- package/dist/client/assets/seo-editor-DaIHsMkg.js +0 -1
- package/dist/client/assets/settings-layout-Hxpekzl7.js +0 -1
- package/dist/client/assets/settings-section-BS9eoASN.js +0 -1
- package/dist/client/assets/settings-subnav-D-pYtn7v.js +0 -1
- package/dist/client/assets/shell-controls-BhWnmqdm.js +0 -1
- package/dist/client/assets/shell-layout-B7KEX529.js +0 -1
- package/dist/client/assets/sidebar-Z1Ar8Iq1.js +0 -1
- package/dist/client/assets/skeleton-BvZK-LJN.js +0 -1
- package/dist/client/assets/sso-CZzvOl_H.js +0 -1
- package/dist/client/assets/store-4VNI89Jx.js +0 -1
- package/dist/client/assets/store-registry-5DQx43Zm.js +0 -2
- package/dist/client/assets/studio-tools-BBCHIrbu.js +0 -1
- package/dist/client/assets/switch-BAlslK2J.js +0 -1
- package/dist/client/assets/synced-repos-BYuo6K5k.js +0 -1
- package/dist/client/assets/tabs-DeNiwmVV.js +0 -1
- package/dist/client/assets/tasks-BohHzFrx.js +0 -1
- package/dist/client/assets/textarea-DkNj8yms.js +0 -1
- package/dist/client/assets/toggle-group-Do3gb8uy.js +0 -1
- package/dist/client/assets/tooltip-Dt_WUeQs.js +0 -1
- package/dist/client/assets/use-ai-providers-DwZngUHl.js +0 -1
- package/dist/client/assets/use-api-keys-DrlFtOsW.js +0 -1
- package/dist/client/assets/use-automations-BqX_0zG2.js +0 -1
- package/dist/client/assets/use-capability-U_kO9pjO.js +0 -1
- package/dist/client/assets/use-commerce-diagnostic-DL4B4X1w.js +0 -1
- package/dist/client/assets/use-connection-D7--TeDa.js +0 -1
- package/dist/client/assets/use-delete-connection-CP8NWsvL.js +0 -1
- package/dist/client/assets/use-file-configs-CgH1G4FU.js +0 -1
- package/dist/client/assets/use-join-requests-CW8P-2hM.js +0 -1
- package/dist/client/assets/use-mcp-tools-ByMlhxuh.js +0 -1
- package/dist/client/assets/use-members-DpAa0K8W.js +0 -1
- package/dist/client/assets/use-mobile-DxjazlC8.js +0 -1
- package/dist/client/assets/use-org-repo-syncs-CugnYvLM.js +0 -1
- package/dist/client/assets/use-organization-settings-kcm-WdX5.js +0 -1
- package/dist/client/assets/use-secrets-CAbcEA8g.js +0 -1
- package/dist/client/assets/use-settings-tabs-qdqtthwY.js +0 -1
- package/dist/client/assets/use-tags-Bcd_6z1e.js +0 -1
- package/dist/client/assets/use-view-mode-cgBHRzHt.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CMi-ILZI.js +0 -1
- package/dist/client/assets/useRouterState-B0WmwZ8z.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Cw5NEgMj.js +0 -1
- package/dist/client/assets/users-CAr233Ns.js +0 -1
- package/dist/client/assets/variant-calendar--Tz37I5S.js +0 -1
- package/dist/client/assets/view-mode-toggle-ChvR0gk0.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as z,b as G,j as t,y as xn,B as ye,r as V,aT as vn,d as rt,s as bn,m as Q,a as Te,t as X,w as jn,k as Ve,p as K,F as le,f as at,u as lt,L as yn,D as Cn,$ as _n,a0 as wn,I as Ct,G as Nn,K as Ue,o as Sn,n as He,aQ as kn,av as In}from"./index-DTCr2n-a.js";import{i as Vt}from"./ChevronRight-Cf-ty0tK.js";import{i as Dn}from"./X-IBBjQPfk.js";import{aH as An,S as Tn,A as qe,e as Mn,s as gt,az as Pn,aI as On,aJ as Fn}from"./agent-icon-vjhOL9u6.js";import{t as _t}from"./ChevronDown-Dgga4a4Q.js";import{T as Me,a as Pe,c as Oe}from"./tooltip-Dt_WUeQs.js";import{u as Ut,d as qt,c as Kt}from"./sidebar-Z1Ar8Iq1.js";import{a as ct,i as zn,e as $n,S as Wt,W as Ln,C as Qt,g as Bn}from"./constants-BSYv1IkQ.js";import{u as En,a as wt}from"./use-virtual-mcp-BbdjNQ1e.js";import{a as Xe,b as Nt,P as St}from"./popover-CfGL7saO.js";import{i as st}from"./Check-ErA_74IV.js";import{s as Ke}from"./Plus-Cf4b1bNp.js";import{i as Xt}from"./SearchMd-B1dsuEY7.js";import{s as Yt}from"./XClose-BO1_8YHD.js";import{C as Rn,d as Pt}from"./self-tool-result-mEKHKLZ8.js";import{T as kt}from"./toolbar-DEkBOfzd.js";import{S as Gn}from"./skeleton-BvZK-LJN.js";import{D as Jt,a as Zt,b as en,c as Hn,g as Vn,e as Un,f as qn}from"./drawer-9chetton.js";import{u as tn}from"./use-mobile-DxjazlC8.js";import{a as Kn,G as Wn}from"./github-repo-picker-B0itW_sn.js";import{g as Qn,a as nn,u as dt,c as Xn}from"./hooks-BasSX9U3.js";import{u as Yn,g as Jn,a as Zn,b as es}from"./use-navigate-to-agent-CX93JJ-W.js";import{b as ts,a as sn,g as ns}from"./agent-capabilities-C4tLW0Za.js";import{u as ut,f as ss}from"./shell-layout-B7KEX529.js";import{f as os}from"./reusable-new-chat-CouMjkYR.js";import{C as is}from"./collection-search-BQLruUQ4.js";import{g as rs,a as as,b as ls,e as cs}from"./extract-connection-data-DyM1tiNg.js";import{u as on,a as rn,g as ds,C as ht}from"./connection-card-2s-BDhzN.js";import{e as It,d as Dt,a as At,b as Tt,h as an,c as us}from"./dialog-B0pGkX2q.js";import{d as pe,a as xe,e as ve,b as be,c as je,F as Ot}from"./form-Cb2ftegM.js";import{I as Le}from"./input-7l72-E74.js";import{S as fs,a as ms,b as gs,c as hs,d as Qe}from"./select-BRuvjhJw.js";import{T as ps}from"./textarea-DkNj8yms.js";import{b as ln}from"./use-connection-D7--TeDa.js";import{n as tt,i as pt}from"./Tool02-Bs7nBBx_.js";import{c as xs,i as Je,a as Ft,E as vs,p as bs,b as js,d as ys}from"./connection-form-helpers-BahPv0zc.js";import{a as xt}from"./authenticate-and-persist-oauth-CB658Lpc.js";import{g as Cs}from"./connection-slug-eyAPH6o3.js";import{C as _s}from"./collection-tabs-Dfa_vQOq.js";import{u as zt}from"./use-infinite-scroll-Dzm35RNS.js";import{B as Ze}from"./badge-BR2WgVsV.js";import{u as ws}from"./useSuspenseInfiniteQuery-Cw5NEgMj.js";import{u as Ns,m as $t}from"./use-mcp-client-DFoPNyXR.js";import{g as ot}from"./metadata-dUsYcpuu.js";import{u as ft}from"./studio-tools-BBCHIrbu.js";import{u as Ss}from"./use-ai-providers-DwZngUHl.js";import{i as ks}from"./FilterLines-BmuWDJhh.js";import{a as Is,T as Ds}from"./toggle-group-Do3gb8uy.js";import{d as As,a as Ts,c as Ms,b as Ps,C as Os,e as Fs}from"./command-CXX8Roxa.js";import{i as cn}from"./Zap-BUA1_Jut.js";import{c as zs,d as $s,b as Ls,f as Bs,g as Es,e as Rs,a as Gs,A as Hs}from"./alert-dialog-BBUALe3i.js";import{n as Vs}from"./Stars02-D7QMgn6_.js";import{g as Us,u as qs,S as Ks}from"./use-clock-tick-yZZNkqhy.js";import{a as Ws}from"./format-time-BnbuEtat.js";import{f as Qs}from"./tab-id-CYxMrTRp.js";const Xs="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function Ys(){const n=z.c(13),e=G();let s;n[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),n[0]=s):s=n[0];let i;n[1]!==e?(i=e("routes.commerceOnboarding.connectModal.quote"),n[1]=e,n[2]=i):i=n[2];let r;n[3]!==i?(r=t.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",i,"”"]}),n[3]=i,n[4]=r):r=n[4];let o;n[5]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("img",{src:Xs,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),n[5]=o):o=n[5];let a;n[6]!==e?(a=e("routes.commerceOnboarding.connectModal.quoteAuthor"),n[6]=e,n[7]=a):a=n[7];let l;n[8]!==a?(l=t.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[o,t.jsx("span",{className:"text-base font-medium",children:a})]}),n[8]=a,n[9]=l):l=n[9];let c;return n[10]!==r||n[11]!==l?(c=t.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[s,r,l]}),n[10]=r,n[11]=l,n[12]=c):c=n[12],c}function Js(){const n=z.c(19),e=G();let s;n[0]!==e?(s=e("routes.commerceOnboarding.connectModal.trustRevoke"),n[0]=e,n[1]=s):s=n[1];let i;n[2]!==s?(i={Icon:An,label:s},n[2]=s,n[3]=i):i=n[3];let r;n[4]!==e?(r=e("routes.commerceOnboarding.connectModal.trustEncrypted"),n[4]=e,n[5]=r):r=n[5];let o;n[6]!==r?(o={Icon:xn,label:r},n[6]=r,n[7]=o):o=n[7];let a;n[8]!==e?(a=e("routes.commerceOnboarding.connectModal.trustNeverSold"),n[8]=e,n[9]=a):a=n[9];let l;n[10]!==a?(l={Icon:Tn,label:a},n[10]=a,n[11]=l):l=n[11];let c;n[12]!==i||n[13]!==o||n[14]!==l?(c=[i,o,l],n[12]=i,n[13]=o,n[14]=l,n[15]=c):c=n[15];const d=c;let f;n[16]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"h-px w-full bg-white/15"}),n[16]=f):f=n[16];let m;return n[17]!==d?(m=t.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[f,t.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:d.map(Zs)})]}),n[17]=d,n[18]=m):m=n[18],m}function Zs(n){const{Icon:e,label:s}=n;return t.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[t.jsx(e,{className:"size-4 shrink-0 opacity-85"}),s]},s)}function wr(n){const e=z.c(22),{siteHost:s,footer:i,onClose:r,children:o}=n,a=G(),l=s?`https://www.google.com/s2/favicons?domain=${s}&sz=128`:null;let c;e[0]!==r||e[1]!==a?(c=r&&t.jsx("button",{type:"button",onClick:r,"aria-label":a("routes.commerceOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:t.jsx(Dn,{size:18})}),e[0]=r,e[1]=a,e[2]=c):c=e[2];let d,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),f=t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=d,e[4]=f):(d=e[3],f=e[4]);let m;e[5]!==l||e[6]!==s?(m=s&&t.jsxs(t.Fragment,{children:[t.jsx(Vt,{size:16,className:"shrink-0 text-foreground/25"}),l&&t.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:t.jsx("img",{src:l,alt:"",className:"size-full"})}),t.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:s})]}),e[5]=l,e[6]=s,e[7]=m):m=e[7];let u;e[8]!==m?(u=t.jsxs("div",{className:"flex items-center gap-2",children:[d,f,m]}),e[8]=m,e[9]=u):u=e[9];let p;e[10]!==i?(p=t.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:i}),e[10]=i,e[11]=p):p=e[11];let y;e[12]!==o||e[13]!==u||e[14]!==p?(y=t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[u,o,p]}),e[12]=o,e[13]=u,e[14]=p,e[15]=y):y=e[15];let x,g;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),g=t.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=x,e[17]=g):(x=e[16],g=e[17]);let h;e[18]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[x,g,t.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[t.jsx("div",{className:"flex-1"}),t.jsx(Ys,{}),t.jsx("div",{className:"flex-1"}),t.jsx(Js,{})]})]}),e[18]=h):h=e[18];let v;return e[19]!==c||e[20]!==y?(v=t.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[c,y,h]}),e[19]=c,e[20]=y,e[21]=v):v=e[21],v}function Nr(n){const e=z.c(5),{ready:s,pending:i,label:r,onClick:o,children:a}=n,l=i||!s,c=s&&!i?a:null;let d;return e[0]!==r||e[1]!==o||e[2]!==l||e[3]!==c?(d=t.jsxs(ye,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:o,disabled:l,children:[r,c]}),e[0]=r,e[1]=o,e[2]=l,e[3]=c,e[4]=d):d=e[4],d}function dn(){const n=V.useContext(vn),{data:e,refetch:s}=n.hooks.useListUserInvitations();return{invitations:(e??[]).filter(r=>r.status==="pending"&&new Date(r.expiresAt)>new Date),refetch:()=>s?.()}}function eo(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 Mt(n){const e=z.c(13),{org:s,size:i}=n,r=i===void 0?"sm":i,o=r==="xs"?"size-5":"size-6",a=r==="xs"?"text-[9px]":"text-xs";let l;e[0]!==o?(l=Q(o,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=o,e[1]=l):l=e[1];let c;e[2]!==s.logo||e[3]!==s.name?(c=s.logo?void 0:eo(s.name),e[2]=s.logo,e[3]=s.name,e[4]=c):c=e[4];let d;e[5]!==s.logo||e[6]!==s.name||e[7]!==a?(d=s.logo?t.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):t.jsx("span",{className:Q("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]=d):d=e[8];let f;return e[9]!==l||e[10]!==c||e[11]!==d?(f=t.jsx("div",{className:l,style:c,children:d}),e[9]=l,e[10]=c,e[11]=d,e[12]=f):f=e[12],f}function to({invitation:n,onChanged:e}){const s=G(),[i,r]=V.useState(!1),o=n.organizationName??s("header.orgSwitcher.unknownOrganization"),a=async()=>{r(!0);try{const d=await Te.organization.acceptInvitation({invitationId:n.id});if(d.error){X.error(d.error.message),r(!1);return}}catch{X.error(s("header.orgSwitcher.failedToAcceptInvitation")),r(!1);return}X.success(s("header.orgSwitcher.joined",{name:o})),jn();let c;try{c=(await Te.organization.getFullOrganization({query:{organizationId:n.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},l=async()=>{r(!0);try{const c=await Te.organization.rejectInvitation({invitationId:n.id});if(c.error){X.error(c.error.message),r(!1);return}X.success(s("header.orgSwitcher.invitationDeclined")),r(!1),e()}catch{X.error(s("header.orgSwitcher.failedToDeclineInvitation")),r(!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(Mt,{org:{name:o},size:"sm"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"truncate text-sm font-medium",children:o}),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(ye,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:a,disabled:i,children:s("header.orgSwitcher.accept")}),t.jsx(ye,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:l,disabled:i,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:o}),children:t.jsx(Yt,{size:14})})]})]})}function no(n){const e=z.c(32),{orgParam:s,onSelectOrg:i,onCreateOrg:r}=n,o=G(),{data:a}=bn(),{invitations:l,refetch:c}=dn();let d;e[0]!==s?(d=(P,D)=>P.slug===s?-1:D.slug===s?1:P.name.localeCompare(D.name),e[0]=s,e[1]=d):d=e[1];const f=[...a??[]].sort(d),[m,u]=V.useState(""),p=m.toLowerCase(),y=p?f.filter(P=>P.name.toLowerCase().includes(p)||P.slug.toLowerCase().includes(p)):f;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Xt,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=x):x=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=P=>u(P.target.value),e[3]=g):g=e[3];let h;e[4]!==m?(h=P=>P.key==="Escape"&&m&&u(""),e[4]=m,e[5]=h):h=e[5];let v;e[6]!==o?(v=o("header.orgSwitcher.searchOrganizations"),e[6]=o,e[7]=v):v=e[7];let j;e[8]!==m||e[9]!==h||e[10]!==v?(j=t.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:m,onChange:g,onKeyDown:h,placeholder:v,className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[8]=m,e[9]=h,e[10]=v,e[11]=j):j=e[11];let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Ke,{size:16}),e[12]=C):C=e[12];let w;e[13]!==r?(w=t.jsx("button",{type:"button",onClick:r,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:C}),e[13]=r,e[14]=w):w=e[14];let I;e[15]!==j||e[16]!==w?(I=t.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[x,j,w]}),e[15]=j,e[16]=w,e[17]=I):I=e[17];const M="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let b;e[18]!==l||e[19]!==m||e[20]!==c?(b=!m&&l.map(P=>t.jsx(to,{invitation:P,onChanged:c},P.id)),e[18]=l,e[19]=m,e[20]=c,e[21]=b):b=e[21];const N=y.length===0&&t.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:m?o("header.orgSwitcher.noOrganizationsMatch",{query:m}):o("header.orgSwitcher.noOrganizationsAvailable")});let A;e[22]!==i||e[23]!==s?(A=P=>t.jsxs("button",{type:"button",onClick:()=>i(P.slug),className:Q("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",P.slug===s?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[t.jsx(Mt,{org:P,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:P.name}),t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:P.slug})]}),P.slug===s&&t.jsx(st,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},P.id),e[22]=i,e[23]=s,e[24]=A):A=e[24];const S=y.map(A);let _;e[25]!==b||e[26]!==N||e[27]!==S?(_=t.jsxs("div",{className:M,children:[b,N,S]}),e[25]=b,e[26]=N,e[27]=S,e[28]=_):_=e[28];let T;return e[29]!==_||e[30]!==I?(T=t.jsxs(t.Fragment,{children:[I,_]}),e[29]=_,e[30]=I,e[31]=T):T=e[31],T}function so(n){const e=z.c(22),{trigger:s,orgParam:i,align:r,side:o}=n,a=r===void 0?"start":r,l=o===void 0?"bottom":o,c=rt(),[d,f]=V.useState(!1),[m,u]=V.useState(!1);let p;e[0]!==s?(p=t.jsx(Xe,{asChild:!0,children:s}),e[0]=s,e[1]=p):p=e[1];const y=String(d);let x;e[2]!==c?(x=I=>{f(!1),c({to:"/$org",params:{org:I}})},e[2]=c,e[3]=x):x=e[3];let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{f(!1),u(!0)},e[4]=g):g=e[4];let h;e[5]!==i||e[6]!==y||e[7]!==x?(h=t.jsx(no,{orgParam:i,onSelectOrg:x,onCreateOrg:g},y),e[5]=i,e[6]=y,e[7]=x,e[8]=h):h=e[8];let v;e[9]!==a||e[10]!==l||e[11]!==h?(v=t.jsx(Nt,{side:l,align:a,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:io,onCloseAutoFocus:oo,children:h}),e[9]=a,e[10]=l,e[11]=h,e[12]=v):v=e[12];let j;e[13]!==d||e[14]!==p||e[15]!==v?(j=t.jsxs(St,{open:d,onOpenChange:f,children:[p,v]}),e[13]=d,e[14]=p,e[15]=v,e[16]=j):j=e[16];let C;e[17]!==m?(C=t.jsx(Rn,{open:m,onOpenChange:u}),e[17]=m,e[18]=C):C=e[18];let w;return e[19]!==C||e[20]!==j?(w=t.jsxs(t.Fragment,{children:[j,C]}),e[19]=C,e[20]=j,e[21]=w):w=e[21],w}function oo(n){return n.preventDefault()}function io(n){n.preventDefault(),n.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function ro(n){const e=z.c(21),{value:s,onChange:i,placeholder:r,onKeyDown:o,className:a,isSearching:l,disabled:c}=n,d=r===void 0?"Search...":r;let f;e[0]!==a?(f=Q("shrink-0 w-full border-b border-border h-12",a),e[0]=a,e[1]=f):f=e[1];const m=c?"cursor-not-allowed opacity-50":"cursor-text";let u;e[2]!==m?(u=Q("flex items-center gap-2.5 h-12 px-4",m),e[2]=m,e[3]=u):u=e[3];let p;e[4]!==l?(p=l?t.jsx(Ve,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):t.jsx(Xt,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=l,e[5]=p):p=e[5];let y;e[6]!==i?(y=v=>i(v.target.value),e[6]=i,e[7]=y):y=e[7];let x;e[8]!==c||e[9]!==o||e[10]!==d||e[11]!==y||e[12]!==s?(x=t.jsx("input",{type:"text",value:s,onChange:y,onKeyDown:o,placeholder:d,disabled:c,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=c,e[9]=o,e[10]=d,e[11]=y,e[12]=s,e[13]=x):x=e[13];let g;e[14]!==u||e[15]!==p||e[16]!==x?(g=t.jsxs("label",{className:u,children:[p,x]}),e[14]=u,e[15]=p,e[16]=x,e[17]=g):g=e[17];let h;return e[18]!==f||e[19]!==g?(h=t.jsx("div",{className:f,children:g}),e[18]=f,e[19]=g,e[20]=h):h=e[20],h}function ao(n,e,s){if(!s)return null;const i=Qn(n,e);return i?i.threads.get().find(o=>o.id===s)?.branch??null:null}function lo(n){const e=z.c(6),{value:s,onChange:i}=n,r=G();let o;e[0]!==r?(o=r("sidebar.agentsSection.searchAgents"),e[0]=r,e[1]=o):o=e[1];let a;return e[2]!==i||e[3]!==o||e[4]!==s?(a=t.jsx(ro,{value:s,onChange:i,placeholder:o}),e[2]=i,e[3]=o,e[4]=s,e[5]=a):a=e[5],a}function co(){const n=z.c(4),e=G();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 uo(n){const e=z.c(10),{org:s,onClose:i}=n,r=G();let o;e[0]!==s.slug?(o={org:s.slug},e[0]=s.slug,e[1]=o):o=e[1];let a;e[2]!==i?(a=()=>i(),e[2]=i,e[3]=a):a=e[3];let l;e[4]!==r?(l=r("sidebar.agentsSection.seeAllAgents"),e[4]=r,e[5]=l):l=e[5];let c;return e[6]!==o||e[7]!==a||e[8]!==l?(c=t.jsx("div",{className:"border-t border-border px-3 py-2.5",children:t.jsx(yn,{to:"/$org/settings/agents",params:o,onClick:a,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:l})}),e[6]=o,e[7]=a,e[8]=l,e[9]=c):c=e[9],c}function fo(){const n=z.c(4),e=G();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(un,{children:s}),n[2]=s,n[3]=i):i=n[3],i}function mo(n){const e=z.c(11),{onImportFromGithub:s}=n,i=G();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Wn,{className:"size-3.5"}),e[0]=r):r=e[0];let o;e[1]!==i?(o=i("sidebar.agentsSection.import"),e[1]=i,e[2]=o):o=e[2];let a;e[3]!==s||e[4]!==o?(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:[r,o]}),e[3]=s,e[4]=o,e[5]=a):a=e[5];let l;e[6]!==i?(l=i("sidebar.agentsSection.codeAgents"),e[6]=i,e[7]=l):l=e[7];let c;return e[8]!==a||e[9]!==l?(c=t.jsx(un,{action:a,children:l}),e[8]=a,e[9]=l,e[10]=c):c=e[10],c}function go(n){const e=z.c(11),{setOpen:s,emptyCtaClass:i}=n,r=G();let o;e[0]!==r?(o=r("sidebar.agentsSection.browseAgents"),e[0]=r,e[1]=o):o=e[1];let a;e[2]!==i?(a=Q(i),e[2]=i,e[3]=a):a=e[3];let l;e[4]!==s?(l=()=>{K("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[4]=s,e[5]=l):l=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Ke,{className:"size-4"}),e[6]=c):c=e[6];let d;return e[7]!==o||e[8]!==a||e[9]!==l?(d=t.jsx(kt,{"aria-label":o,className:a,onClick:l,children:c}),e[7]=o,e[8]=a,e[9]=l,e[10]=d):d=e[10],d}function ho(n){const e=z.c(17),{setOpen:s,highlightEmpty:i,emptyCtaClass:r}=n,o=G();let a;e[0]!==i||e[1]!==o?(a=i?void 0:o("sidebar.agentsSection.browseAgents"),e[0]=i,e[1]=o,e[2]=a):a=e[2];let l;e[3]!==r?(l=Q(r),e[3]=r,e[4]=l):l=e[4];let c;e[5]!==s?(c=()=>{K("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[5]=s,e[6]=c):c=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Ke,{}),e[7]=d):d=e[7];let f;e[8]!==o?(f=o("sidebar.agentsSection.newAgent"),e[8]=o,e[9]=f):f=e[9];let m;e[10]!==f?(m=t.jsx("span",{children:f}),e[10]=f,e[11]=m):m=e[11];let u;return e[12]!==a||e[13]!==l||e[14]!==c||e[15]!==m?(u=t.jsx(qt,{children:t.jsxs(Kt,{tooltip:a,className:l,onClick:c,children:[d,m]})}),e[12]=a,e[13]=l,e[14]=c,e[15]=m,e[16]=u):u=e[16],u}function po(){const n=z.c(4),e=G();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(en,{className:"sr-only",children:s}),n[2]=s,n[3]=i):i=n[3],i}function xo(n){const e=z.c(8),{emptyCtaClass:s}=n,i=G();let r;e[0]!==i?(r=i("sidebar.agentsSection.browseAgents"),e[0]=i,e[1]=r):r=e[1];let o;e[2]!==s?(o=Q(s),e[2]=s,e[3]=o):o=e[3];let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Ke,{className:"size-4"}),e[4]=a):a=e[4];let l;return e[5]!==r||e[6]!==o?(l=t.jsx(kt,{"aria-label":r,className:o,children:a}),e[5]=r,e[6]=o,e[7]=l):l=e[7],l}function vo(n){const e=z.c(19),{wrapEmptyHint:s,highlightEmpty:i,emptyCtaClass:r}=n,o=G();let a;e[0]!==i||e[1]!==o?(a=i?void 0:o("sidebar.agentsSection.browseAgents"),e[0]=i,e[1]=o,e[2]=a):a=e[2];let l;e[3]!==r?(l=Q(r),e[3]=r,e[4]=l):l=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Ke,{}),e[5]=c):c=e[5];let d;e[6]!==o?(d=o("sidebar.agentsSection.newAgent"),e[6]=o,e[7]=d):d=e[7];let f;e[8]!==d?(f=t.jsx("span",{children:d}),e[8]=d,e[9]=f):f=e[9];let m;e[10]!==a||e[11]!==l||e[12]!==f?(m=t.jsx(Xe,{asChild:!0,children:t.jsxs(Kt,{tooltip:a,className:l,children:[c,f]})}),e[10]=a,e[11]=l,e[12]=f,e[13]=m):m=e[13];let u;e[14]!==m||e[15]!==s?(u=s(m),e[14]=m,e[15]=s,e[16]=u):u=e[16];let p;return e[17]!==u?(p=t.jsx(qt,{children:u}),e[17]=u,e[18]=p):p=e[18],p}function bo(n){const e=z.c(9),{children:s}=n,i=G();let r;e[0]!==s?(r=t.jsx(Me,{asChild:!0,children:s}),e[0]=s,e[1]=r):r=e[1];let o;e[2]!==i?(o=i("sidebar.agentsSection.selectAnExistingAgent"),e[2]=i,e[3]=o):o=e[3];let a;e[4]!==o?(a=t.jsx(Pe,{side:"right",sideOffset:8,children:o}),e[4]=o,e[5]=a):a=e[5];let l;return e[6]!==r||e[7]!==a?(l=t.jsxs(Oe,{defaultOpen:!0,delayDuration:0,children:[r,a]}),e[6]=r,e[7]=a,e[8]=l):l=e[8],l}function jo(n){const e=rt(),{create:s}=nn(),{locator:i}=le(),r=at({strict:!1}),o=lt({strict:!1});return async a=>{const l=crypto.randomUUID(),c=a===o.virtualmcpid?ao(n,i,r.taskId??""):null;try{await s({id:l,virtual_mcp_id:a,...c?{branch:c}:{}})}catch{}e({to:"/$org/$taskId",params:{org:n,taskId:l},search:{virtualmcpid:a}})}}function vt(n){const e=z.c(20),{agent:s,selected:i,onClick:r}=n,o=i?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let a;e[0]!==o?(a=Q("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",o),e[0]=o,e[1]=a):a=e[1];let l;e[2]!==s.icon||e[3]!==s.title?(l=t.jsx(qe,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[2]=s.icon,e[3]=s.title,e[4]=l):l=e[4];let c;e[5]!==s.title?(c=t.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),e[5]=s.title,e[6]=c):c=e[6];let d;e[7]!==s.description?(d=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[7]=s.description,e[8]=d):d=e[8];let f;e[9]!==c||e[10]!==d?(f=t.jsxs("div",{className:"flex-1 min-w-0",children:[c,d]}),e[9]=c,e[10]=d,e[11]=f):f=e[11];let m;e[12]!==i?(m=i&&t.jsx(st,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=i,e[13]=m):m=e[13];let u;return e[14]!==r||e[15]!==a||e[16]!==l||e[17]!==f||e[18]!==m?(u=t.jsxs("button",{type:"button",onClick:r,className:a,children:[l,f,m]}),e[14]=r,e[15]=a,e[16]=l,e[17]=f,e[18]=m,e[19]=u):u=e[19],u}function un(n){const e=z.c(5),{children:s,action:i}=n;let r;e[0]!==s?(r=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[0]=s,e[1]=r):r=e[1];let o;return e[2]!==i||e[3]!==r?(o=t.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[r,i]}),e[2]=i,e[3]=r,e[4]=o):o=e[4],o}function yo(n){const e=z.c(23),{onClose:s,onSelectAgent:i,selectedAgentId:r,onImportFromGithub:o}=n,[a,l]=V.useState(""),c=En(),d=c??[],{org:f}=le(),{data:m}=Te.useSession(),u=m?.user?.id??"anon",p=Jn(c),y=Zn(),x=jo(f.slug),g=ts(c),h=a.toLowerCase(),v=d.filter(No).filter(E=>!g.has(E.id)).filter(wo).filter(E=>!a||E.title.toLowerCase().includes(h)),j=v.filter(_o),C=v.filter(Co),w=ct(f.id),I=!a||w.title.toLowerCase().includes(h),M=!!(i&&I);let b;e[0]!==s||e[1]!==i?(b=()=>{i?.(null),s(),l("")},e[0]=s,e[1]=i,e[2]=b):b=e[2];const N=b,A=E=>{if(i){i(E.id),s(),l("");return}es({orgId:f.id,userId:u},E.id,p),y(),s(),l(""),x(E.id)},S="flex flex-col max-h-[min(640px,80dvh)]";let _;e[3]!==a?(_=t.jsx(lo,{value:a,onChange:l}),e[3]=a,e[4]=_):_=e[4];const T="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",P=i&&I&&w&&t.jsx(vt,{agent:w,selected:!r||r===w.id,onClick:N}),D=(j.length>0||!a)&&t.jsx(mo,{onImportFromGithub:o}),F=j.map(E=>t.jsx(vt,{agent:E,selected:i?r===E.id:void 0,onClick:()=>A(E)},E.id)),L=C.length>0&&t.jsx(fo,{}),O=C.map(E=>t.jsx(vt,{agent:E,selected:i?r===E.id:void 0,onClick:()=>A(E)},E.id));let $;e[5]!==M||e[6]!==a||e[7]!==v.length?($=v.length===0&&!M&&a&&t.jsx(co,{}),e[5]=M,e[6]=a,e[7]=v.length,e[8]=$):$=e[8];let U;e[9]!==$||e[10]!==P||e[11]!==D||e[12]!==F||e[13]!==L||e[14]!==O?(U=t.jsxs("div",{className:T,children:[P,D,F,L,O,$]}),e[9]=$,e[10]=P,e[11]=D,e[12]=F,e[13]=L,e[14]=O,e[15]=U):U=e[15];let R;e[16]!==s||e[17]!==f?(R=t.jsx(uo,{org:f,onClose:s}),e[16]=s,e[17]=f,e[18]=R):R=e[18];let q;return e[19]!==U||e[20]!==R||e[21]!==_?(q=t.jsxs("div",{className:S,children:[_,U,R]}),e[19]=U,e[20]=R,e[21]=_,e[22]=q):q=e[22],q}function Co(n){return!sn(n.metadata)}function _o(n){return sn(n.metadata)}function wo(n){return!$n(n.id)}function No(n){return!zn(n.id)}function So(n){const e=z.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:r,onSelectAgent:o,selectedAgentId:a,side:l,align:c}=s,d=i===void 0?!1:i,f=l===void 0?"right":l,m=c===void 0?"start":c,[u,p]=V.useState(!1),[y,x]=V.useState(!1),g=tn(),{setOpenMobile:h}=Ut(),v=Yn(),j=v?"border border-border":void 0;let C;e[2]!==v?(C=D=>v?t.jsx(bo,{children:D}):D,e[2]=v,e[3]=C):C=e[3];const w=C;let I;e[4]!==g||e[5]!==h?(I=()=>{p(!1),g&&h(!1)},e[4]=g,e[5]=h,e[6]=I):I=e[6];const M=I;let b;e[7]!==M?(b=()=>{M(),x(!0)},e[7]=M,e[8]=b):b=e[8];const N=b;let A;e[9]!==M||e[10]!==N||e[11]!==o||e[12]!==u||e[13]!==a?(A=u&&t.jsx(V.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(Gn,{className:"h-4 w-24"})}),children:t.jsx(yo,{onClose:M,onSelectAgent:o,selectedAgentId:a,onImportFromGithub:N})}),e[9]=M,e[10]=N,e[11]=o,e[12]=u,e[13]=a,e[14]=A):A=e[14];const S=A;let _;e[15]!==m||e[16]!==d||e[17]!==j||e[18]!==v||e[19]!==g||e[20]!==u||e[21]!==S||e[22]!==f||e[23]!==r||e[24]!==w?(_=g?t.jsxs(t.Fragment,{children:[r?t.jsx("button",{type:"button",onClick:()=>p(!0),className:"contents",children:r}):d?w(t.jsx(go,{setOpen:p,emptyCtaClass:j})):t.jsx(ho,{setOpen:p,highlightEmpty:v,emptyCtaClass:j}),t.jsx(Jt,{open:u,onOpenChange:p,direction:"bottom",children:t.jsxs(Zt,{className:"max-h-[85dvh] p-0",children:[t.jsx(po,{}),S]})})]}):t.jsxs(St,{open:u,onOpenChange:D=>{D&&!u&&K("agent_browser_opened",{surface:"desktop_popover"}),p(D)},children:[r?t.jsx(Xe,{asChild:!0,children:r}):d?w(t.jsx(Xe,{asChild:!0,children:t.jsx(xo,{emptyCtaClass:j})})):t.jsx(vo,{wrapEmptyHint:w,highlightEmpty:v,emptyCtaClass:j}),t.jsx(Nt,{className:"w-[380px] p-0 overflow-hidden",side:f,align:m,children:S})]}),e[15]=m,e[16]=d,e[17]=j,e[18]=v,e[19]=g,e[20]=u,e[21]=S,e[22]=f,e[23]=r,e[24]=w,e[25]=_):_=e[25];let T;e[26]!==y?(T=t.jsx(Kn,{open:y,onOpenChange:x,mode:"agent"}),e[26]=y,e[27]=T):T=e[27];let P;return e[28]!==T||e[29]!==_?(P=t.jsxs(t.Fragment,{children:[_,T]}),e[28]=T,e[29]=_,e[30]=P):P=e[30],P}const ko="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 Io(n){const e=z.c(29),{agentId:s,fallback:i,onOpenHome:r,onPick:o}=n,a=G(),l=wt(s)??i??null;let c,d,f,m,u;e[0]!==l?.title||e[1]!==r||e[2]!==a?(u=l?.title??a("header.shellBreadcrumb.superAgentDefaultName"),m="flex min-w-0 items-center gap-0",c="button",d=r,f=a("header.shellBreadcrumb.openAgentHome",{name:u}),e[0]=l?.title,e[1]=r,e[2]=a,e[3]=c,e[4]=d,e[5]=f,e[6]=m,e[7]=u):(c=e[3],d=e[4],f=e[5],m=e[6],u=e[7]);const p=l?.icon??null;let y;e[8]!==p||e[9]!==u?(y=t.jsx(qe,{icon:p,name:u,size:"xs"}),e[8]=p,e[9]=u,e[10]=y):y=e[10];let x;e[11]!==c||e[12]!==d||e[13]!==f||e[14]!==y?(x=t.jsx("button",{type:c,onClick:d,"aria-label":f,className:"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:y}),e[11]=c,e[12]=d,e[13]=f,e[14]=y,e[15]=x):x=e[15];let g;e[16]!==u?(g=t.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:u}),e[16]=u,e[17]=g):g=e[17];let h;e[18]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(_t,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[18]=h):h=e[18];let v;e[19]!==g?(v=t.jsxs("button",{type:"button",className:ko,children:[g,h]}),e[19]=g,e[20]=v):v=e[20];let j;e[21]!==s||e[22]!==o||e[23]!==v?(j=t.jsx(So,{side:"bottom",align:"start",selectedAgentId:s,onSelectAgent:o,trigger:v}),e[21]=s,e[22]=o,e[23]=v,e[24]=j):j=e[24];let C;return e[25]!==j||e[26]!==m||e[27]!==x?(C=t.jsxs("div",{className:m,children:[x,j]}),e[25]=j,e[26]=m,e[27]=x,e[28]=C):C=e[28],C}function Sr(n){const e=z.c(30);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{showName:i}=s,r=G(),{org:o}=le(),{state:a,isMobile:l}=Ut(),c=dn().invitations.length>0,d=a==="collapsed"||l;let f;e[2]!==c||e[3]!==o.name||e[4]!==r?(f=c?r("header.shellBreadcrumb.switchOrganizationPendingInvitation",{name:o.name}):r("header.shellBreadcrumb.switchOrganization",{name:o.name}),e[2]=c,e[3]=o.name,e[4]=r,e[5]=f):f=e[5];let m;e[6]!==o?(m=t.jsx(Mt,{org:o,size:"sm"}),e[6]=o,e[7]=m):m=e[7];let u;e[8]!==c||e[9]!==d?(u=c&&t.jsx("span",{className:Q("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[8]=c,e[9]=d,e[10]=u):u=e[10];let p;e[11]!==m||e[12]!==u?(p=t.jsxs("span",{className:"relative inline-flex",children:[m,u]}),e[11]=m,e[12]=u,e[13]=p):p=e[13];let y;e[14]!==o.name||e[15]!==i?(y=i&&t.jsx("span",{className:"truncate text-sm font-medium text-foreground max-w-[10rem]",children:o.name}),e[14]=o.name,e[15]=i,e[16]=y):y=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(_t,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[17]=x):x=e[17];let g;e[18]!==f||e[19]!==p||e[20]!==y?(g=t.jsx(Me,{asChild:!0,children:t.jsxs("button",{type:"button","aria-label":f,className:"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:[p,y,x]})}),e[18]=f,e[19]=p,e[20]=y,e[21]=g):g=e[21];let h;e[22]!==o.slug||e[23]!==g?(h=t.jsx(so,{orgParam:o.slug,trigger:g}),e[22]=o.slug,e[23]=g,e[24]=h):h=e[24];let v;e[25]!==o.name?(v=t.jsx(Pe,{side:"bottom",children:o.name}),e[25]=o.name,e[26]=v):v=e[26];let j;return e[27]!==v||e[28]!==h?(j=t.jsxs(Oe,{children:[h,v]}),e[27]=v,e[28]=h,e[29]=j):j=e[29],j}function kr(n){const e=z.c(22);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{onNavigate:i}=s,{org:r}=le();let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[2]=o):o=e[2];const a=at(o);let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},e[3]=l):l=e[3];const c=lt(l),{threads:d}=dt(),{data:f}=Te.useSession(),{setTaskId:m,createNewTask:u}=ut();let p;e[4]!==r.id?(p=ct(r.id),e[4]=r.id,e[5]=p):p=e[5];const y=p,x=y.id,g=a.taskId?c.virtualmcpid??x:x;let h;e[6]!==u||e[7]!==x||e[8]!==i||e[9]!==f?.user?.id||e[10]!==m||e[11]!==d?(h=M=>{const b=M??x,N=os(d,b,f?.user?.id);N?m(N.id,b):u(b),i?.()},e[6]=u,e[7]=x,e[8]=i,e[9]=f?.user?.id,e[10]=m,e[11]=d,e[12]=h):h=e[12];const v=h;let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[13]=j):j=e[13];const C=g===x?y:void 0;let w;e[14]!==g||e[15]!==v?(w=()=>v(g),e[14]=g,e[15]=v,e[16]=w):w=e[16];let I;return e[17]!==g||e[18]!==v||e[19]!==C||e[20]!==w?(I=t.jsx(V.Suspense,{fallback:j,children:t.jsx(Io,{agentId:g,fallback:C,onOpenHome:w,onPick:v})}),e[17]=g,e[18]=v,e[19]=C,e[20]=w,e[21]=I):I=e[21],I}function Ir(){const n=z.c(24),e=G(),{org:s}=le();let i;n[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},n[0]=i):i=n[0];const r=at(i);let o;n[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},n[1]=o):o=n[1];const a=lt(o),{threads:l}=dt(),{createNewTask:c}=ut();let d;n[2]!==s.id?(d=ct(s.id),n[2]=s.id,n[3]=d):d=n[3];const f=d.id,m=r.taskId?a.virtualmcpid??f:f;let u;n[4]!==r.taskId||n[5]!==l?(u=(r.taskId?l.find(I=>I.id===r.taskId)?.branch:null)??null,n[4]=r.taskId,n[5]=l,n[6]=u):u=n[6];const p=u;let y;n[7]!==m||n[8]!==c||n[9]!==p?(y=()=>{c(m,p)},n[7]=m,n[8]=c,n[9]=p,n[10]=y):y=n[10];const x=y;let g;n[11]!==e?(g=e("sidebar.taskGroupsList.newChat"),n[11]=e,n[12]=g):g=n[12];let h;n[13]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(Mn,{size:16}),n[13]=h):h=n[13];let v;n[14]!==x||n[15]!==g?(v=t.jsx(Me,{asChild:!0,children:t.jsx("button",{type:"button",onClick:x,"aria-label":g,className:"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:h})}),n[14]=x,n[15]=g,n[16]=v):v=n[16];let j;n[17]!==e?(j=e("sidebar.taskGroupsList.newChat"),n[17]=e,n[18]=j):j=n[18];let C;n[19]!==j?(C=t.jsx(Pe,{side:"bottom",children:j}),n[19]=j,n[20]=C):C=n[20];let w;return n[21]!==v||n[22]!==C?(w=t.jsxs(Oe,{children:[v,C]}),n[21]=v,n[22]=C,n[23]=w):w=n[23],w}function Do({open:n,onOpenChange:e,onCreated:s}){const i=G(),{org:r}=le(),{data:o}=Te.useSession(),{stdioEnabled:a}=Cn(),l=tn(),c=ln(),d=on(),m=rn(d,"").items,u=_n({resolver:wn(xs),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=u.watch("ui_type"),y=u.watch("connection_url"),x=u.watch("npx_package"),g=Je({uiType:p,connectionUrl:y??"",npxPackage:x??""})??Ft({uiType:p,connectionUrl:y??"",registryItems:m}),h=b=>{const N=b.trim();if(!N)return;const A=!!u.formState.dirtyFields.title,S=!!u.formState.dirtyFields.description,_=!!u.formState.dirtyFields.env_vars,T=D=>{if(D&&(!A&&!u.getValues("title").trim()&&D.title&&u.setValue("title",D.title,{shouldDirty:!1}),!S&&!(u.getValues("description")??"").trim()&&D.description&&u.setValue("description",D.description,{shouldDirty:!1}),!_&&D.envVarKeys?.length)){const F=u.getValues("env_vars")??[],L=new Set(F.map($=>$.key)),O=D.envVarKeys.filter($=>!L.has($));O.length>0&&u.setValue("env_vars",[...F,...O.map($=>({key:$,value:""}))],{shouldDirty:!0})}},P=bs(N);if(P&&a){u.setValue("ui_type","NPX",{shouldDirty:!0}),u.setValue("npx_package",P.packageName,{shouldDirty:!0}),u.setValue("connection_url","",{shouldDirty:!0}),u.setValue("connection_token",null,{shouldDirty:!0}),T(Je({uiType:"NPX",npxPackage:P.packageName}));return}if(N.startsWith("http://")||N.startsWith("https://")){const D=p==="HTTP"||p==="SSE"||p==="Websocket"?p:"HTTP";u.setValue("ui_type",D,{shouldDirty:!0}),u.setValue("connection_url",N,{shouldDirty:!0}),T(Je({uiType:D,connectionUrl:N})??Ft({uiType:D,connectionUrl:N,registryItems:m}));return}p==="NPX"&&T(Je({uiType:"NPX",npxPackage:N}))},v=b=>{b||u.reset(),e(b)},j=async b=>{let N,A=null,S=null,_=null;b.ui_type==="NPX"?(N="STDIO",A="",_=js(b.npx_package||"",b.env_vars||[])):b.ui_type==="STDIO"?(N="STDIO",A="",_=ys(b.stdio_command||"",b.stdio_args||"",b.stdio_cwd,b.env_vars||[])):(N=b.ui_type,A=b.connection_url||"",S=b.connection_token||null);const T=rs("conn");try{await c.create.mutateAsync({id:T,title:b.title,description:b.description||null,connection_type:N,connection_url:A,connection_token:S,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:b.icon??null,app_name:null,app_id:null,connection_headers:_,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),u.reset(),e(!1),s?.(T)}catch{X.error(i("connections.createConnectionDialog.failedToCreateConnection"))}},C=i("connections.createConnectionDialog.title"),w=i("connections.createConnectionDialog.description"),I=u.formState.isSubmitting?i("connections.createConnectionDialog.saving"):i("connections.createConnectionDialog.createButton"),M=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(pe,{control:u.control,name:"ui_type",render:({field:b})=>t.jsxs(xe,{children:[t.jsx(ve,{children:i("connections.createConnectionDialog.typeLabel")}),t.jsxs(fs,{value:b.value,onValueChange:b.onChange,children:[t.jsx(be,{children:t.jsx(ms,{children:t.jsx(gs,{})})}),t.jsxs(hs,{children:[t.jsx(Qe,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(gt,{className:"w-4 h-4"}),i("connections.createConnectionDialog.httpType")]})}),t.jsx(Qe,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(gt,{className:"w-4 h-4"}),i("connections.createConnectionDialog.sseType")]})}),t.jsx(Qe,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(gt,{className:"w-4 h-4"}),i("connections.createConnectionDialog.websocketType")]})}),a&&t.jsxs(t.Fragment,{children:[t.jsx(Qe,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(tt,{className:"w-4 h-4"}),i("connections.createConnectionDialog.npxPackageType")]})}),t.jsx(Qe,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Pn,{className:"w-4 h-4"}),i("connections.createConnectionDialog.customCommandType")]})})]})]})]}),t.jsx(je,{})]})}),p==="NPX"&&t.jsx(pe,{control:u.control,name:"npx_package",render:({field:b})=>t.jsxs(xe,{children:[t.jsx(ve,{children:i("connections.createConnectionDialog.npmPackageLabel")}),t.jsx(be,{children:t.jsx(Le,{placeholder:i("connections.createConnectionDialog.npmPackagePlaceholder"),...b,value:b.value??"",onPaste:N=>{const A=N.clipboardData.getData("text");A&&(N.preventDefault(),u.setValue("npx_package",A.trim(),{shouldDirty:!0}),h(A))},onBlur:N=>{h(N.target.value),b.onBlur()}})}),t.jsx(je,{})]})}),p==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(pe,{control:u.control,name:"stdio_command",render:({field:b})=>t.jsxs(xe,{children:[t.jsx(ve,{children:i("connections.createConnectionDialog.commandLabel")}),t.jsx(be,{children:t.jsx(Le,{placeholder:i("connections.createConnectionDialog.commandPlaceholder"),...b,value:b.value??""})}),t.jsx(je,{})]})}),t.jsx(pe,{control:u.control,name:"stdio_args",render:({field:b})=>t.jsxs(xe,{children:[t.jsx(ve,{children:i("connections.createConnectionDialog.argumentsLabel")}),t.jsx(be,{children:t.jsx(Le,{placeholder:i("connections.createConnectionDialog.argumentsPlaceholder"),...b,value:b.value??""})}),t.jsx(je,{})]})})]}),t.jsx(pe,{control:u.control,name:"stdio_cwd",render:({field:b})=>t.jsxs(xe,{children:[t.jsx(ve,{children:i("connections.createConnectionDialog.workingDirectoryLabel")}),t.jsx(be,{children:t.jsx(Le,{placeholder:i("connections.createConnectionDialog.workingDirectoryPlaceholder"),...b,value:b.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("connections.createConnectionDialog.workingDirectoryDescription")}),t.jsx(je,{})]})})]}),(p==="NPX"||p==="STDIO")&&t.jsx(pe,{control:u.control,name:"env_vars",render:({field:b})=>t.jsxs(xe,{children:[t.jsx(ve,{children:i("connections.createConnectionDialog.environmentVariablesLabel")}),t.jsx(be,{children:t.jsx(vs,{value:b.value??[],onChange:b.onChange})}),t.jsx(je,{})]})}),p!=="NPX"&&p!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(pe,{control:u.control,name:"connection_url",render:({field:b})=>t.jsxs(xe,{children:[t.jsx(ve,{children:i("connections.createConnectionDialog.urlLabel")}),t.jsx(be,{children:t.jsx(Le,{placeholder:i("connections.createConnectionDialog.urlPlaceholder"),...b,value:b.value??"",onPaste:N=>{const A=N.clipboardData.getData("text");A&&(N.preventDefault(),u.setValue("connection_url",A.trim(),{shouldDirty:!0}),h(A))},onBlur:N=>{h(N.target.value),b.onBlur()}})}),t.jsx(je,{})]})}),t.jsx(pe,{control:u.control,name:"connection_token",render:({field:b})=>t.jsxs(xe,{children:[t.jsx(ve,{children:g?.token?.label??i("connections.createConnectionDialog.tokenLabelDefault")}),t.jsx(be,{children:t.jsx(Le,{type:"password",placeholder:g?.token?.placeholder??i("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...b,value:b.value??""})}),g?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[g.token.helperText,g.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(je,{})]})})]}),t.jsx(pe,{control:u.control,name:"title",render:({field:b})=>t.jsxs(xe,{children:[t.jsx(ve,{children:i("connections.createConnectionDialog.nameLabel")}),t.jsx(be,{children:t.jsx(Le,{placeholder:i("connections.createConnectionDialog.namePlaceholder"),...b})}),t.jsx(je,{})]})}),t.jsx(pe,{control:u.control,name:"description",render:({field:b})=>t.jsxs(xe,{children:[t.jsx(ve,{children:i("connections.createConnectionDialog.descriptionLabel")}),t.jsx(be,{children:t.jsx(ps,{placeholder:i("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...b,value:b.value??""})}),t.jsx(je,{})]})})]});return l?t.jsx(Jt,{open:n,onOpenChange:v,children:t.jsxs(Zt,{className:"max-h-[90vh]",children:[t.jsx(Hn,{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(en,{children:C}),t.jsx(Vn,{className:"mt-1",children:w})]}),t.jsx(Un,{asChild:!0,children:t.jsx(ye,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(Yt,{size:16})})})]})}),t.jsx(Ot,{...u,children:t.jsxs("form",{onSubmit:u.handleSubmit(j),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:M}),t.jsx(qn,{children:t.jsx(ye,{type:"submit",disabled:u.formState.isSubmitting,className:"w-full",children:I})})]})})]})}):t.jsx(It,{open:n,onOpenChange:v,children:t.jsxs(Dt,{className:"sm:max-w-[525px]",children:[t.jsxs(At,{children:[t.jsx(Tt,{children:C}),t.jsx(an,{children:w})]}),t.jsx(Ot,{...u,children:t.jsxs("form",{onSubmit:u.handleSubmit(j),children:[t.jsx("div",{className:"py-4",children:M}),t.jsxs(us,{children:[t.jsx(ye,{type:"button",variant:"outline",onClick:()=>v(!1),children:i("connections.createConnectionDialog.cancelButton")}),t.jsx(ye,{type:"submit",disabled:u.formState.isSubmitting,className:"min-w-40",children:I})]})]})})]})})}function Ao(n){const e=z.c(72),{mode:s,agentId:i,addedConnectionIds:r,onAdd:o,onCloneAndAdd:a,onConnectAndAdd:l,connectingItemId:c,search:d,onCreateConnection:f,onBrowseNavigate:m,defaultTab:u}=n,p=s===void 0?"add":s,y=u===void 0?"connected":u,x=G(),{org:g}=le(),h=V.useDeferredValue(d),v=d!==h;let j;e[0]!==h?(j=h.trim().toLowerCase(),e[0]=h,e[1]=j):j=e[1];const C=j;let w;e[2]!==y?(w=k=>k??y,e[2]=y,e[3]=w):w=e[3];const[I,M]=Ct(Nn.connectionsTab(g.slug)+(y==="all"?":home-modal":":agent-modal"),w);let b;e[4]!==I||e[5]!==M?(b=k=>{k!==I&&K("connections_dialog_tab_changed",{to_tab:k}),M(k)},e[4]=I,e[5]=M,e[6]=b):b=e[6];const N=b;let A;e[7]!==g.id||e[8]!==g.slug?(A={connectionId:Wt,orgId:g.id,orgSlug:g.slug},e[7]=g.id,e[8]=g.slug,e[9]=A):A=e[9];const S=Ns(A),_=h?.trim().split(/\s+/).filter(Boolean)??[],T=_.length>0?{operator:"or",conditions:_.flatMap(Lo)}:void 0,P={...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},D=JSON.stringify(P),{data:F,fetchNextPage:L,hasNextPage:O,isFetchingNextPage:$}=ws({queryKey:Ue.collectionListInfinite(S,g.id,"","CONNECTIONS",D),queryFn:async k=>{const{pageParam:B}=k,Z=B===void 0?0:B;return(await S.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:Z}})).structuredContent},initialPageParam:0,getNextPageParam:zo,staleTime:3e4}),U=F?.pages.flatMap(Fo)??[],R=ds(U),q=new Set(U.filter(Oo).map(Po)),E=on(),Y=rn(E,h),ee=zt(Y.loadMore,Y.hasMore,Y.isLoadingMore),te=zt(L,O??!1,$),H=I==="all"||!!C,J=H?Y.items.filter(k=>{const B=as(k);if(B&&q.has(B))return!1;if(!C)return!0;const Z=ot(k._meta),ue=[k.title,k.description,k.name,k.server?.title,k.server?.description,k.server?.name,Z?.friendly_name,Z?.friendlyName].filter(Boolean).join(" ").toLowerCase();return _.some(he=>ue.includes(he.toLowerCase()))}):[],ne=J.filter(Mo),W=J.filter(To);let Ne;e[10]!==r?(Ne=k=>k.some(B=>r.has(B.id)),e[10]=r,e[11]=Ne):Ne=e[11];const Be=Ne;let Ce;e[12]!==r||e[13]!==i||e[14]!==c||e[15]!==Be||e[16]!==p||e[17]!==o||e[18]!==m||e[19]!==a||e[20]!==x?(Ce=(k,B,Z,ue,he)=>{const Ye=Be(he),Ge=he.find($e=>!r.has($e.id)),ce=he[0];if(p==="browse"){const $e=Cs(ce);return t.jsx(ht,{connection:{title:B,icon:Z,description:he.length>1?`${he.length} instances`:ue??void 0},fallbackIcon:t.jsx(tt,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs(Ze,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(st,{size:11})," ",x("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{K("connection_browse_clicked",{app_name:ce.app_name??null,connection_id:ce.id,instances_count:he.length}),m?.($e)}},k)}return t.jsx(ht,{connection:{title:B,icon:Z,description:ue},fallbackIcon:t.jsx(tt,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[Ye&&t.jsxs(Ze,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(st,{size:11})," ",x("virtualMcp.connectionDialogContent.added")]}),t.jsx(ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:$e=>{$e.stopPropagation(),Ge?(K("connection_add_clicked",{action:"use_existing",app_name:ce.app_name??null,connection_id:Ge.id}),i&&K("agent_connection_attached",{agent_id:i,connection_id:Ge.id,app_name:ce.app_name??null,mode:"existing"}),o(Ge.id)):(K("connection_add_clicked",{action:"clone",app_name:ce.app_name??null,base_connection_id:ce.id}),a(ce))},children:x("virtualMcp.connectionDialogContent.add")})]})},k)},e[12]=r,e[13]=i,e[14]=c,e[15]=Be,e[16]=p,e[17]=o,e[18]=m,e[19]=a,e[20]=x,e[21]=Ce):Ce=e[21];const Ee=Ce;let _e;e[22]!==c||e[23]!==p||e[24]!==l||e[25]!==x?(_e=k=>{const B=ot(k._meta),Z=B?.friendlyName||B?.friendly_name||k.server?.title||k.title||k.server?.name||k.name||k.id||"",ue=k.server?.description||k.description||null,he=k.server?.icons?.[0]?.src||ls(k.server?.repository)||null,Ye=B?.official===!0,Ge=B?.verified===!0,ce=B?.owner==="deco";return t.jsx(ht,{connection:{title:Z,description:ue,icon:he},fallbackIcon:t.jsx(tt,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[ce&&t.jsxs(Oe,{children:[t.jsx(Me,{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(Pe,{children:x("virtualMcp.connectionDialogContent.builtByDeco")})]}),!ce&&Ye&&t.jsxs(Oe,{children:[t.jsx(Me,{asChild:!0,children:t.jsx(Ze,{variant:"outline",size:"icon",children:t.jsx(pt,{})})}),t.jsx(Pe,{children:x("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!ce&&!Ye&&Ge&&t.jsxs(Oe,{children:[t.jsx(Me,{asChild:!0,children:t.jsx(Ze,{variant:"outline",size:"icon",children:t.jsx(pt,{})})}),t.jsx(Pe,{children:x("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),t.jsx(ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:$e=>{$e.stopPropagation(),K("connection_add_clicked",{action:"connect_new",registry_item_id:k.id,app_name:B?.friendlyName||k.server?.name||k.name||null}),l(k)},children:c===k.id?t.jsx(Ve,{size:14,className:"animate-spin"}):x(p==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${k.id}`)},e[22]=c,e[23]=p,e[24]=l,e[25]=x,e[26]=_e):_e=e[26];const We=_e;let se;e[27]!==I||e[28]!==N||e[29]!==f||e[30]!==C||e[31]!==x?(se=!C&&t.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[t.jsx(_s,{tabs:[{id:"all",label:x("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:x("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:I,onTabChange:k=>N(k)}),t.jsxs(ye,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{K("connections_dialog_custom_clicked"),f()},children:[t.jsx(Ke,{size:12}),x("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=I,e[28]=N,e[29]=f,e[30]=C,e[31]=x,e[32]=se):se=e[32];const Se=v&&"opacity-50 pointer-events-none";let oe;e[33]!==Se?(oe=Q("flex-1 overflow-auto p-5 transition-opacity duration-150",Se),e[33]=Se,e[34]=oe):oe=e[34];const Re="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ke;e[35]!==Ee?(ke=k=>{if(k.type==="group")return Ee(k.key,k.title,k.icon,null,k.connections);const B=k.connection;return Ee(B.id,B.title,B.icon,B.description??null,[B])},e[35]=Ee,e[36]=ke):ke=e[36];const Ie=R.map(ke);let fe;e[37]!==te?(fe=t.jsx("div",{ref:te,className:"col-span-full h-1"}),e[37]=te,e[38]=fe):fe=e[38];let de;e[39]!==$?(de=$&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(Ve,{size:24,className:"animate-spin text-muted-foreground"})}),e[39]=$,e[40]=de):de=e[40];const Fe=H&&ne.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx(pt,{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"})]}),De=H&&ne.map(We),ze=H&&W.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"})]}),Ae=H&&W.map(We);let me;e[41]!==ee||e[42]!==E||e[43]!==H?(me=H&&E.length>0&&t.jsx("div",{ref:ee,className:"col-span-full h-1"}),e[41]=ee,e[42]=E,e[43]=H,e[44]=me):me=e[44];let ie;e[45]!==Y.isLoadingMore||e[46]!==H?(ie=H&&Y.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(Ve,{size:24,className:"animate-spin text-muted-foreground"})}),e[45]=Y.isLoadingMore,e[46]=H,e[47]=ie):ie=e[47];let ge;e[48]!==Ie||e[49]!==fe||e[50]!==de||e[51]!==Fe||e[52]!==De||e[53]!==ze||e[54]!==Ae||e[55]!==me||e[56]!==ie?(ge=t.jsxs("div",{className:Re,children:[Ie,fe,de,Fe,De,ze,Ae,me,ie]}),e[48]=Ie,e[49]=fe,e[50]=de,e[51]=Fe,e[52]=De,e[53]=ze,e[54]=Ae,e[55]=me,e[56]=ie,e[57]=ge):ge=e[57];let re;e[58]!==I||e[59]!==R.length||e[60]!==W||e[61]!==d||e[62]!==x||e[63]!==ne?(re=R.length===0&&ne.length===0&&W.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:d?x("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:d}):x(I==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=I,e[59]=R.length,e[60]=W,e[61]=d,e[62]=x,e[63]=ne,e[64]=re):re=e[64];let ae;e[65]!==oe||e[66]!==ge||e[67]!==re?(ae=t.jsxs("div",{className:oe,children:[ge,re]}),e[65]=oe,e[66]=ge,e[67]=re,e[68]=ae):ae=e[68];let we;return e[69]!==se||e[70]!==ae?(we=t.jsxs(t.Fragment,{children:[se,ae]}),e[69]=se,e[70]=ae,e[71]=we):we=e[71],we}function To(n){return!n.verified&&!ot(n._meta)?.verified&&!n.meta?.verified}function Mo(n){return n.verified||ot(n._meta)?.verified||n.meta?.verified}function Po(n){return n.app_name}function Oo(n){return n.app_name}function Fo(n){return n?.items??[]}function zo(n,e){if(n?.hasMore)return e.reduce($o,0)}function $o(n,e){return n+(e?.items?.length??0)}function Lo(n){return[{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}function Dr({open:n,onOpenChange:e,defaultTab:s,initialSearch:i="",...r}){const o=G(),a=r.mode??"add",l="agentId"in r?r.agentId:void 0,c="addedConnectionIds"in r?r.addedConnectionIds??new Set:new Set,d="onAdd"in r&&r.onAdd?r.onAdd:S=>{},f=(S,_,T)=>{l&&K("agent_connection_attached",{agent_id:l,connection_id:S,app_name:_,mode:T})},[m,u]=V.useState(null),[p,y]=V.useState(i),[x,g]=V.useState(!1),{org:h}=le(),{data:v}=Te.useSession(),j=ln(),C=Sn(),w=rt(),I=S=>{e(!1),w({to:"/$org/settings/connections/$appSlug",params:{org:h.slug,appSlug:S}})},M=()=>{C.invalidateQueries({predicate:S=>{const _=S.queryKey;return _[1]===h.id&&_[3]==="collection"&&_[4]==="CONNECTIONS"}})},b=async(S,_)=>{K("connection_oauth_succeeded",{connection_id:S,flow:_});const T=new URL(`/api/${h.slug}/mcp/${S}`,window.location.origin);await C.invalidateQueries({queryKey:Ue.isMCPAuthenticated(T.href,null)}),M()},N=async S=>{u(S.app_name??S.id);try{const T=`${S.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,D=(await j.create.mutateAsync({title:T,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,F=await xt({connectionId:D,orgId:h.id,orgSlug:h.slug,persistFallback:L=>j.update.mutateAsync({id:D,data:{connection_token:L}}).then(()=>{})});if(F.ran&&!F.ok){K("connection_oauth_failed",{connection_id:D,flow:"clone",error:F.error??"no_token"}),X.error(o("virtualMcp.addConnectionDialog.authenticationFailedError",{error:F.error??"no token received"})),await j.delete.mutateAsync(D);return}F.ran&&await b(D,"clone"),f(D,S.app_name??null,"clone"),d(D)}catch(_){console.error("Failed to add connection:",_),X.error(o("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{u(null)}},A=async S=>{if(!(!h||!v?.user?.id)){u(S.id);try{const _=cs(S,h.id,v.user.id,{remoteIndex:0}),T=_.connection_type==="STDIO",P=!!_.connection_url,D=T&&_.connection_headers&&typeof _.connection_headers=="object"&&"command"in _.connection_headers;if(!P&&!D){X.error(o("virtualMcp.addConnectionDialog.mcpServerConnectionError")),u(null);return}const{id:F}=await j.create.mutateAsync(_),L=await xt({connectionId:F,orgId:h.id,orgSlug:h.slug,persistFallback:O=>j.update.mutateAsync({id:F,data:{connection_token:O}}).then(()=>{})});if(L.ran&&!L.ok){K("connection_oauth_failed",{connection_id:F,flow:"connect_new",error:L.error??"no_token"}),X.warning(o("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:o("virtualMcp.addConnectionDialog.signInFailedDescription",{error:L.error??"no token received"})}),f(F,_.app_name??null,"new"),d(F);return}L.ran?(await b(F,"connect_new"),X.success(o("virtualMcp.addConnectionDialog.connectedAuthenticated"))):X.success(o("virtualMcp.addConnectionDialog.connected")),f(F,_.app_name??null,"new"),d(F)}catch(_){console.error("Failed to connect:",_),X.error(o("virtualMcp.addConnectionDialog.failedToConnect"))}finally{u(null)}}};return t.jsxs(It,{open:n,onOpenChange:e,children:[t.jsxs(Dt,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[t.jsx(At,{className:"px-6 pt-5 pb-0 shrink-0",children:t.jsx(Tt,{className:"text-base font-semibold",children:o(a==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),t.jsx("div",{className:"pt-3 shrink-0",children:t.jsx(is,{value:p,onChange:y,placeholder:o("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),t.jsx(V.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ve,{size:24,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Ao,{mode:a,agentId:l,addedConnectionIds:c,onAdd:d,onCloneAndAdd:N,onConnectAndAdd:A,connectingItemId:m,search:p,onCreateConnection:()=>g(!0),onBrowseNavigate:I,defaultTab:s})})]}),t.jsx(Do,{open:x,onOpenChange:g,onCreated:async S=>{g(!1);const _=await xt({connectionId:S,orgId:h.id,orgSlug:h.slug,persistFallback:T=>j.update.mutateAsync({id:S,data:{connection_token:T}}).then(()=>{})});if(_.ran&&!_.ok){K("connection_oauth_failed",{connection_id:S,flow:"custom_create",error:_.error??"no_token"}),X.warning(o("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:o("virtualMcp.addConnectionDialog.signInFailedDescription",{error:_.error??"no token received"})}),f(S,null,"custom"),d(S),e(!1);return}_.ran&&await b(S,"custom_create"),f(S,null,"custom"),d(S),e(!1)}})]})}const Lt=new Map;function Ar(){const{org:n}=le(),e=ft(),s=Ss(),i=s.find(g=>g.providerId==="deco"),{data:r,isLoading:o,refetch:a,isFetching:l}=He({queryKey:Ue.aiProviderCredits(n.id,"deco"),enabled:!!i,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),c=r?.balanceCents??null,d=c!=null?c/100:null,f=V.useRef(new Map);if(c!=null){const g=Lt.get(n.id);f.current.get(n.id)&&g!=null&&c>g&&K("credits_topped_up_detected",{organization_id:n.id,delta_cents:c-g,previous_balance_cents:g,new_balance_cents:c}),Lt.set(n.id,c),f.current.set(n.id,!0)}const m=!!i,u=c!=null&&c>0,p=c!=null&&c===0,y=c!=null&&c===200,x=s.length>0&&s.every(g=>g.providerId==="deco");return{hasDecoKey:m,decoKeyId:i?.id??null,balanceCents:c,balanceDollars:d,hasCredits:u,isZeroBalance:p,isInitialFreeCredit:y,hasOnlyDecoProvider:x,isLoading:o,isFetching:l,refetch:a}}function bt(n){const e=z.c(13),{label:s,value:i,onChange:r,options:o}=n;let a;e[0]!==s?(a=t.jsx("span",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=a):a=e[1];let l;e[2]!==r?(l=m=>m&&r(m),e[2]=r,e[3]=l):l=e[3];let c;e[4]!==o?(c=o.map(Bo),e[4]=o,e[5]=c):c=e[5];let d;e[6]!==l||e[7]!==c||e[8]!==i?(d=t.jsx(Ds,{type:"single",size:"sm",value:i,onValueChange:l,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:c}),e[6]=l,e[7]=c,e[8]=i,e[9]=d):d=e[9];let f;return e[10]!==a||e[11]!==d?(f=t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[a,d]}),e[10]=a,e[11]=d,e[12]=f):f=e[12],f}function Bo(n){return t.jsxs(Is,{value:n.value,className:"h-6 gap-1.5 rounded-md border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[n.icon,n.label]},n.value)}function Tr(n){const e=z.c(91),{panel:s,className:i}=n,r=i===void 0?"md:size-[34px] rounded-lg":i,o=G();let a;e[0]!==o?(a=o("sidebar.taskGroupsList.filterChats"),e[0]=o,e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ks,{size:16}),e[2]=l):l=e[2];let c;e[3]!==s.filtersActive?(c=s.filtersActive&&t.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[3]=s.filtersActive,e[4]=c):c=e[4];let d;e[5]!==r||e[6]!==s.filtersActive||e[7]!==a||e[8]!==c?(d=t.jsx(Me,{asChild:!0,children:t.jsx(Xe,{asChild:!0,children:t.jsxs(kt,{"aria-label":a,active:s.filtersActive,className:r,children:[l,c]})})}),e[5]=r,e[6]=s.filtersActive,e[7]=a,e[8]=c,e[9]=d):d=e[9];let f;e[10]!==o?(f=o("sidebar.taskGroupsList.filterChats"),e[10]=o,e[11]=f):f=e[11];let m;e[12]!==f?(m=t.jsx(Pe,{side:"bottom",children:f}),e[12]=f,e[13]=m):m=e[13];let u;e[14]!==d||e[15]!==m?(u=t.jsxs(Oe,{children:[d,m]}),e[14]=d,e[15]=m,e[16]=u):u=e[16];let p;e[17]!==o?(p=o("sidebar.taskGroupsList.filterView"),e[17]=o,e[18]=p):p=e[18];const y=s.groupBy;let x;e[19]!==s?(x=W=>{K("tasks_panel_group_by_changed",{to_value:W}),s.setGroupBy(W)},e[19]=s,e[20]=x):x=e[20];let g;e[21]!==o?(g=o("sidebar.taskGroupsList.viewList"),e[21]=o,e[22]=g):g=e[22];let h;e[23]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(On,{size:13}),e[23]=h):h=e[23];let v;e[24]!==g?(v={value:"flat",label:g,icon:h},e[24]=g,e[25]=v):v=e[25];let j;e[26]!==o?(j=o("sidebar.taskGroupsList.viewStatus"),e[26]=o,e[27]=j):j=e[27];let C;e[28]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Fn,{size:13}),e[28]=C):C=e[28];let w;e[29]!==j?(w={value:"status",label:j,icon:C},e[29]=j,e[30]=w):w=e[30];let I;e[31]!==v||e[32]!==w?(I=[v,w],e[31]=v,e[32]=w,e[33]=I):I=e[33];let M;e[34]!==s.groupBy||e[35]!==x||e[36]!==I||e[37]!==p?(M=t.jsx(bt,{label:p,value:y,onChange:x,options:I}),e[34]=s.groupBy,e[35]=x,e[36]=I,e[37]=p,e[38]=M):M=e[38];let b;e[39]!==o?(b=o("sidebar.taskGroupsList.filterType"),e[39]=o,e[40]=b):b=e[40];const N=s.typeFilter;let A;e[41]!==s?(A=W=>{K("tasks_panel_filter_changed",{to_value:W}),s.setTypeFilter(W)},e[41]=s,e[42]=A):A=e[42];let S;e[43]!==o?(S=o("sidebar.taskGroupsList.typeAll"),e[43]=o,e[44]=S):S=e[44];let _;e[45]!==S?(_={value:"all",label:S},e[45]=S,e[46]=_):_=e[46];let T;e[47]!==o?(T=o("sidebar.taskGroupsList.typeChats"),e[47]=o,e[48]=T):T=e[48];let P;e[49]!==T?(P={value:"manual",label:T},e[49]=T,e[50]=P):P=e[50];let D;e[51]!==o?(D=o("sidebar.taskGroupsList.typeAuto"),e[51]=o,e[52]=D):D=e[52];let F;e[53]!==D?(F={value:"automation",label:D},e[53]=D,e[54]=F):F=e[54];let L;e[55]!==_||e[56]!==P||e[57]!==F?(L=[_,P,F],e[55]=_,e[56]=P,e[57]=F,e[58]=L):L=e[58];let O;e[59]!==s.typeFilter||e[60]!==b||e[61]!==A||e[62]!==L?(O=t.jsx(bt,{label:b,value:N,onChange:A,options:L}),e[59]=s.typeFilter,e[60]=b,e[61]=A,e[62]=L,e[63]=O):O=e[63];let $;e[64]!==o?($=o("sidebar.taskGroupsList.filterScope"),e[64]=o,e[65]=$):$=e[65];const U=s.showAll?"team":"mine";let R;e[66]!==s?(R=W=>s.setShowAll(W==="team"),e[66]=s,e[67]=R):R=e[67];let q;e[68]!==o?(q=o("sidebar.taskGroupsList.scopeMine"),e[68]=o,e[69]=q):q=e[69];let E;e[70]!==q?(E={value:"mine",label:q},e[70]=q,e[71]=E):E=e[71];let Y;e[72]!==o?(Y=o("sidebar.taskGroupsList.scopeTeam"),e[72]=o,e[73]=Y):Y=e[73];let ee;e[74]!==Y?(ee={value:"team",label:Y},e[74]=Y,e[75]=ee):ee=e[75];let te;e[76]!==E||e[77]!==ee?(te=[E,ee],e[76]=E,e[77]=ee,e[78]=te):te=e[78];let H;e[79]!==$||e[80]!==U||e[81]!==R||e[82]!==te?(H=t.jsx(bt,{label:$,value:U,onChange:R,options:te}),e[79]=$,e[80]=U,e[81]=R,e[82]=te,e[83]=H):H=e[83];let J;e[84]!==M||e[85]!==O||e[86]!==H?(J=t.jsxs(Nt,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[M,O,H]}),e[84]=M,e[85]=O,e[86]=H,e[87]=J):J=e[87];let ne;return e[88]!==J||e[89]!==u?(ne=t.jsxs(St,{children:[u,J]}),e[88]=J,e[89]=u,e[90]=ne):ne=e[90],ne}function Eo(n){const e=z.c(9),{virtualMcpId:s,size:i,showAutomationBadge:r}=n,o=i===void 0?"sm":i,a=G();let l;e[0]!==o||e[1]!==s?(l=s?t.jsx(Ro,{virtualMcpId:s,size:o}):t.jsx(qe,{icon:null,name:"?",size:o}),e[0]=o,e[1]=s,e[2]=l):l=e[2];let c;e[3]!==r||e[4]!==a?(c=r&&t.jsx("span",{"aria-label":a("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:t.jsx(cn,{size:10,className:"text-white"})}),e[3]=r,e[4]=a,e[5]=c):c=e[5];let d;return e[6]!==l||e[7]!==c?(d=t.jsxs("div",{className:"relative shrink-0",children:[l,c]}),e[6]=l,e[7]=c,e[8]=d):d=e[8],d}function Ro(n){const e=z.c(6),{virtualMcpId:s,size:i}=n,r=wt(s);if(!r){let l;return e[0]!==i?(l=t.jsx(qe,{icon:null,name:"?",size:i}),e[0]=i,e[1]=l):l=e[1],l}const o=r.icon??null;let a;return e[2]!==r.title||e[3]!==i||e[4]!==o?(a=t.jsx(qe,{icon:o,name:r.title,size:i}),e[2]=r.title,e[3]=i,e[4]=o,e[5]=a):a=e[5],a}function Go(n){const e=z.c(51),{open:s,onOpenChange:i}=n,[r,o]=V.useState(""),{org:a}=le(),{setTaskId:l}=ut(),c=ft(),d=G();let f,m,u;e[0]!==a.id||e[1]!==r?(u=r.trim(),m=He,f=Ue.globalSearch(a.id,u),e[0]=a.id,e[1]=r,e[2]=f,e[3]=m,e[4]=u):(f=e[2],m=e[3],u=e[4]);let p;e[5]!==c||e[6]!==u?(p=async()=>await c.call("GLOBAL_SEARCH",{query:u,limit:u?20:10}),e[5]=c,e[6]=u,e[7]=p):p=e[7];let y;e[8]!==s||e[9]!==f||e[10]!==p?(y={queryKey:f,enabled:s,queryFn:p,staleTime:1e4},e[8]=s,e[9]=f,e[10]=p,e[11]=y):y=e[11];const{data:x,isFetching:g}=m(y);let h;e[12]!==x?.items?(h=x?.items??[],e[12]=x?.items,e[13]=h):h=e[13];const v=h;let j;e[14]!==i?(j=O=>{O||o(""),i(O)},e[14]=i,e[15]=j):j=e[15];const C=j;let w;e[16]!==C||e[17]!==l?(w=O=>{C(!1),l(O.id,O.virtual_mcp_id??void 0)},e[16]=C,e[17]=l,e[18]=w):w=e[18];const I=w;let M;e[19]!==d?(M=d("tasksPanel.globalSearchDialog.title"),e[19]=d,e[20]=M):M=e[20];let b;e[21]!==M?(b=t.jsx(Tt,{children:M}),e[21]=M,e[22]=b):b=e[22];let N;e[23]!==d?(N=d("tasksPanel.globalSearchDialog.description"),e[23]=d,e[24]=N):N=e[24];let A;e[25]!==N?(A=t.jsx(an,{children:N}),e[25]=N,e[26]=A):A=e[26];let S;e[27]!==A||e[28]!==b?(S=t.jsxs(At,{className:"sr-only",children:[b,A]}),e[27]=A,e[28]=b,e[29]=S):S=e[29];let _;e[30]!==d?(_=d("tasksPanel.globalSearchDialog.placeholder"),e[30]=d,e[31]=_):_=e[31];let T;e[32]!==r||e[33]!==_?(T=t.jsx(Os,{value:r,onValueChange:o,placeholder:_}),e[32]=r,e[33]=_,e[34]=T):T=e[34];let P;e[35]!==I||e[36]!==g||e[37]!==v||e[38]!==d||e[39]!==u?(P=t.jsx(As,{children:g&&v.length===0?t.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:d("tasksPanel.globalSearchDialog.searching")}):v.length===0?t.jsx(Ts,{children:d("tasksPanel.globalSearchDialog.noResults")}):t.jsx(Ms,{heading:u?void 0:d("tasksPanel.globalSearchDialog.recent"),children:v.map(O=>O.type==="thread"?t.jsxs(Ps,{value:`thread:${O.id}:${O.title}`,onSelect:()=>I(O),className:"gap-2.5",children:[t.jsx(Eo,{virtualMcpId:O.virtual_mcp_id,size:"xs"}),t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("div",{className:"text-sm text-foreground truncate",children:O.title||d("tasksPanel.globalSearchDialog.untitledChat")})}),t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(O.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${O.id}`):null)})}),e[35]=I,e[36]=g,e[37]=v,e[38]=d,e[39]=u,e[40]=P):P=e[40];let D;e[41]!==T||e[42]!==P?(D=t.jsxs(Fs,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[T,P]}),e[41]=T,e[42]=P,e[43]=D):D=e[43];let F;e[44]!==S||e[45]!==D?(F=t.jsxs(Dt,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[S,D]}),e[44]=S,e[45]=D,e[46]=F):F=e[46];let L;return e[47]!==C||e[48]!==s||e[49]!==F?(L=t.jsx(It,{open:s,onOpenChange:C,children:F}),e[47]=C,e[48]=s,e[49]=F,e[50]=L):L=e[50],L}function Ho(n){const e=z.c(43),{branch:s,onOutcome:i}=n,r=G();let o;e[0]!==i?(o=M=>{M||i("cancel")},e[0]=i,e[1]=o):o=e[1];let a;e[2]!==r?(a=r("sidebar.archiveWorktreeDialog.title"),e[2]=r,e[3]=a):a=e[3];let l;e[4]!==a?(l=t.jsx(zs,{children:a}),e[4]=a,e[5]=l):l=e[5];let c;e[6]!==r?(c=r("sidebar.archiveWorktreeDialog.stopsAndDeletesBefore"),e[6]=r,e[7]=c):c=e[7];let d;e[8]!==s?(d=t.jsx("span",{className:"font-mono",children:s}),e[8]=s,e[9]=d):d=e[9];let f;e[10]!==r?(f=r("sidebar.archiveWorktreeDialog.stopsAndDeletesAfter"),e[10]=r,e[11]=f):f=e[11];let m;e[12]!==c||e[13]!==d||e[14]!==f?(m=t.jsxs($s,{children:[c," ",d," ",f]}),e[12]=c,e[13]=d,e[14]=f,e[15]=m):m=e[15];let u;e[16]!==l||e[17]!==m?(u=t.jsxs(Ls,{children:[l,m]}),e[16]=l,e[17]=m,e[18]=u):u=e[18];let p;e[19]!==i?(p=()=>i("cancel"),e[19]=i,e[20]=p):p=e[20];let y;e[21]!==r?(y=r("sidebar.archiveWorktreeDialog.cancel"),e[21]=r,e[22]=y):y=e[22];let x;e[23]!==y||e[24]!==p?(x=t.jsx(Bs,{onClick:p,children:y}),e[23]=y,e[24]=p,e[25]=x):x=e[25];let g;e[26]===Symbol.for("react.memo_cache_sentinel")?(g=Q(kn({variant:"destructive"})),e[26]=g):g=e[26];let h;e[27]!==i?(h=()=>i("confirm"),e[27]=i,e[28]=h):h=e[28];let v;e[29]!==r?(v=r("sidebar.archiveWorktreeDialog.confirm"),e[29]=r,e[30]=v):v=e[30];let j;e[31]!==h||e[32]!==v?(j=t.jsx(Es,{className:g,onClick:h,children:v}),e[31]=h,e[32]=v,e[33]=j):j=e[33];let C;e[34]!==x||e[35]!==j?(C=t.jsxs(Rs,{children:[x,j]}),e[34]=x,e[35]=j,e[36]=C):C=e[36];let w;e[37]!==C||e[38]!==u?(w=t.jsxs(Gs,{children:[u,C]}),e[37]=C,e[38]=u,e[39]=w):w=e[39];let I;return e[40]!==o||e[41]!==w?(I=t.jsx(Hs,{open:!0,onOpenChange:o,children:w}),e[40]=o,e[41]=w,e[42]=I):I=e[42],I}function Vo(n,e,s){if(!s)return;const i=n.findIndex(r=>r.id===e);if(i!==-1){for(let r=i+1;r<n.length;r++){const o=n[r];if(o?.created_by===s)return o}for(let r=i-1;r>=0;r--){const o=n[r];if(o?.created_by===s)return o}}}function Uo(n){return n==="ephemeral"||n.startsWith("thread:")}function fn(n){const e=z.c(45),{task:s,isActive:i,onClick:r,onArchive:o,showAutomationBadge:a,showAgentIcon:l,hideStatusIdle:c,indented:d}=n,f=G(),m=Us(s.status),u=m.icon,p=s.metadata?.kind==="tool_call_run",y=wt(p?void 0:s.virtual_mcp_id);let x;e[0]!==y?(x=ns(y),e[0]=y,e[1]=x):x=e[1];const g=x;qs(6e4);const h=a||!!s.trigger_id,v=s.id,j="button",C=0;let w;e[2]!==r?(w=R=>{R.target===R.currentTarget&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),r())},e[2]=r,e[3]=w):w=e[3];const I=d?"-ml-4 pl-6":"pl-[7px]",M=i?"bg-accent text-accent-foreground":"hover:bg-accent/60";let b;e[4]!==I||e[5]!==M?(b=Q("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",I,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",M),e[4]=I,e[5]=M,e[6]=b):b=e[6];let N;e[7]!==p||e[8]!==l||e[9]!==y?.icon||e[10]!==y?.title?(N=l&&!p&&t.jsx(qe,{icon:y?.icon??null,name:y?.title??"?",size:"2xs"}),e[7]=p,e[8]=l,e[9]=y?.icon,e[10]=y?.title,e[11]=N):N=e[11];let A;e[12]!==h||e[13]!==f?(A=h&&t.jsx(cn,{size:12,"aria-label":f("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-blue-500"}),e[12]=h,e[13]=f,e[14]=A):A=e[14];let S;e[15]!==f||e[16]!==s.title?(S=s.title||f("tasksPanel.taskRow.untitledTask"),e[15]=f,e[16]=s.title,e[17]=S):S=e[17];let _;e[18]!==S?(_=t.jsx("div",{className:"text-sm text-foreground truncate",children:S}),e[18]=S,e[19]=_):_=e[19];let T;e[20]!==A||e[21]!==_?(T=t.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[A,_]}),e[20]=A,e[21]=_,e[22]=T):T=e[22];let P;e[23]!==g||e[24]!==i||e[25]!==s.branch||e[26]!==s.updated_at?(P=s.updated_at&&t.jsxs("div",{className:Q("flex items-center gap-1 text-[11px] min-w-0",i?"text-accent-foreground/70":"text-muted-foreground/60"),children:[s.branch&&!Uo(s.branch)?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"truncate font-mono",children:s.branch}),t.jsx("span",{className:"shrink-0",children:"·"})]}):g?t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"truncate",children:[g.owner,"/",g.name]}),t.jsx("span",{className:"shrink-0",children:"·"})]}):null,t.jsx("span",{className:"shrink-0",children:Ws(new Date(s.updated_at))})]}),e[23]=g,e[24]=i,e[25]=s.branch,e[26]=s.updated_at,e[27]=P):P=e[27];let D;e[28]!==T||e[29]!==P?(D=t.jsxs("div",{className:"flex-1 min-w-0",children:[T,P]}),e[28]=T,e[29]=P,e[30]=D):D=e[30];const F="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",L=!c&&t.jsx("span",{className:Q("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",o&&"group-hover/row:opacity-0"),"aria-label":f("tasksPanel.taskRow.statusLabel",{status:m.label}),children:t.jsx(u,{size:14,className:Q(m.iconClassName,s.status==="in_progress"&&"animate-spin")})});let O;e[31]!==o||e[32]!==f?(O=o&&t.jsxs(Oe,{children:[t.jsx(Me,{asChild:!0,children:t.jsx("button",{type:"button","aria-label":f("tasksPanel.taskRow.archiveTask"),onClick:R=>{R.stopPropagation(),o()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-8 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:t.jsx(In,{size:14})})}),t.jsx(Pe,{side:"right",children:f("tasksPanel.taskRow.archive")})]}),e[31]=o,e[32]=f,e[33]=O):O=e[33];let $;e[34]!==L||e[35]!==O?($=t.jsxs("div",{className:F,children:[L,O]}),e[34]=L,e[35]=O,e[36]=$):$=e[36];let U;return e[37]!==r||e[38]!==D||e[39]!==$||e[40]!==w||e[41]!==b||e[42]!==N||e[43]!==s.id?(U=t.jsxs("div",{"data-task-id":v,role:j,tabIndex:C,onClick:r,onKeyDown:w,className:b,children:[N,D,$]}),e[37]=r,e[38]=D,e[39]=$,e[40]=w,e[41]=b,e[42]=N,e[43]=s.id,e[44]=U):U=e[44],U}const Bt=["requires_action","in_progress","failed","expired","completed"];function qo(n){const e=new Map(Bt.map(s=>[s,[]]));for(const s of n){const i=s.status??"completed";(e.get(i)??e.get("completed")).push(s)}return Bt.map(s=>({status:s,threads:e.get(s)}))}const Ko="sidebar.group.expanded.";function Wo(n,e){const s=z.c(3),[i,r]=Ct(`${Ko}${n}`,e);let o;return s[0]!==i||s[1]!==r?(o=[i,r],s[0]=i,s[1]=r,s[2]=o):o=s[2],o}function mn(n){const e=z.c(18),{onClick:s,isFetching:i,indented:r}=n,o=G();let a;e[0]!==o?(a=o("sidebar.showMoreButton.ariaLabel"),e[0]=o,e[1]=a):a=e[1];const l=r?"-ml-4 pl-6 pr-2":"px-2";let c;e[2]!==l?(c=Q("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",l,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=l,e[3]=c):c=e[3];let d;e[4]!==i?(d=i&&t.jsx(Ve,{size:14,className:"animate-spin"}),e[4]=i,e[5]=d):d=e[5];let f;e[6]!==i||e[7]!==o?(f=o(i?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=i,e[7]=o,e[8]=f):f=e[8];let m;e[9]!==f?(m=t.jsx("span",{children:f}),e[9]=f,e[10]=m):m=e[10];let u;return e[11]!==i||e[12]!==s||e[13]!==a||e[14]!==c||e[15]!==d||e[16]!==m?(u=t.jsxs("button",{type:"button","aria-label":a,onClick:s,disabled:i,className:c,children:[d,m]}),e[11]=i,e[12]=s,e[13]=a,e[14]=c,e[15]=d,e[16]=m,e[17]=u):u=e[17],u}function Qo(n,e,s,i){return[n,e,s,i.type,i.member,i.currentUserId??""].join("|")}function Xo(n){return n.member==="mine"&&!n.currentUserId}const gn=4;let nt=0;const yt=[];function Yo(){for(;nt<gn&&yt.length>0;){const n=yt.shift();n&&n()}}function hn(n){return new Promise((e,s)=>{const i=()=>{nt++,n().then(e,s).finally(()=>{nt--,Yo()})};nt<gn?i():yt.push(i)})}const mt=10;function Et(n,e,s,i,r){const o={hidden:!1};i.member==="mine"&&i.currentUserId&&(o.created_by=i.currentUserId),i.type==="automation"&&(o.has_trigger=!0),i.type==="manual"&&(o.has_trigger=!1);const a={where:o,limit:r,offset:s,orderBy:[{field:["updated_at"],direction:"desc"}]};return a.status=e,a}function Jo(n,e,s,i){let r=0;for(const o of n)pn(o,e,s,i)&&r++;return r}function jt(n,e,s,i){return Jo(n,e,s,i)}function Zo(n,e){return!!(n>=mt||n===0&&e)}function Rt(n,e){return n<e}function ei(n,e){return e===!1?!1:e===!0?!0:n}function pn(n,e,s,i){return!(n.hidden||(n.status??"completed")!==s||i.member==="mine"&&i.currentUserId&&n.created_by!==i.currentUserId||i.type==="automation"&&!n.trigger_id||i.type==="manual"&&n.trigger_id)}const it=new Map,et=new Map;function ti(n,e){return e?n>=mt?!0:null:!1}function Gt(n){return it.get(n)}function ni(n,e){it.set(n,e)}function si(n,e,s){const i=it.get(n);if(i!==void 0){s(i);return}let r=et.get(n);r||(r=hn(e).then(o=>(it.set(n,o),et.delete(n),o)).catch(()=>(et.delete(n),Promise.reject(new Error("group probe failed")))),et.set(n,r)),r.then(s,()=>s(!1))}function Ht(n){const e=n,s=Array.isArray(e.items)?e.items:[];return{items:s,hasMore:e.hasMore??s.length===mt,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function oi(n,e,s,i,r){let o=0;for(const a of n)e.has(a.id)||pn(a,s,i,r)&&o++;return o}function ii(n,e,s,i){const r=z.c(8),{org:o}=le(),a=Qo(o.id,n,e,s);let l;r[0]!==s?(l=Xo(s),r[0]=s,r[1]=l):l=r[1];const c=l,[d,f]=V.useState({isFetching:!1,isProbing:!1,identity:a,probeSubscribedIdentity:null,serverHasMore:null});d.identity!==a&&f({isFetching:!1,isProbing:!1,identity:a,probeSubscribedIdentity:null,serverHasMore:null});const m=Xn(),{threads:u,hasMore:p}=dt(),y=jt(u,n,e,s),x=Zo(y,p),g=ti(y,p),h=ft();if(d.identity===a&&d.serverHasMore===null){const M=g??Gt(a);M!==void 0&&f({isFetching:!1,isProbing:!1,identity:a,probeSubscribedIdentity:d.probeSubscribedIdentity,serverHasMore:M})}!c&&d.identity===a&&d.serverHasMore===null&&g===null&&Gt(a)===void 0&&d.probeSubscribedIdentity!==a&&(f(M=>M.identity===a?{...M,isProbing:!0,probeSubscribedIdentity:a}:M),si(a,async()=>{const M=Et(n,e,0,s,1),b=await h.call("COLLECTION_THREADS_LIST",M),{totalCount:N}=Ht(b),A=jt(m.threads.get(),n,e,s);return N===void 0?!1:Rt(A,N)},M=>{f(b=>b.identity!==a?b:{...b,isProbing:!1,serverHasMore:M})}));const j=async function(){if(d.isFetching||d.isProbing||c)return;const b=a;f(N=>N.identity===b?{...N,isFetching:!0}:N);try{const N=jt(u,n,e,s),A=Et(n,e,N,s,mt),S=await hn(()=>h.call("COLLECTION_THREADS_LIST",A)),{items:_,hasMore:T,totalCount:P}=Ht(S),D=new Set(u.map(ri)),F=oi(_,D,n,e,s),L=N;m.mergeThreads(_),f(O=>{if(O.identity!==b)return O;let $;return P!==void 0?$=Rt(L+F,P):$=_.length===0||F===0?!1:T,ni(b,$),{...O,isFetching:!1,serverHasMore:$}})}catch(N){const A=N,S=A instanceof Error?A.message:String(A);X.error(`Could not load more tasks: ${S}`),f(_=>_.identity===b?{..._,isFetching:!1}:_)}},C=d.isFetching||d.isProbing,w=!c&&!C&&ei(x,d.serverHasMore);let I;return r[2]!==C||r[3]!==j||r[4]!==w||r[5]!==d.isProbing||r[6]!==d.serverHasMore?(I={hasMore:w,isFetching:C,isProbing:d.isProbing,serverHasMore:d.serverHasMore,loadMore:j},r[2]=C,r[3]=j,r[4]=w,r[5]=d.isProbing,r[6]=d.serverHasMore,r[7]=I):I=r[7],I}function ri(n){return n.id}function ai(n){const e=z.c(20),{status:s,threads:i,activeTaskId:r,onSelectTask:o,onArchiveTask:a,canArchive:l,filters:c}=n,{isFetching:d,isProbing:f,loadMore:m,hasMore:u,serverHasMore:p}=ii("status",s,c),[y,x]=V.useState(!1);!y&&i.length===0&&p===!0&&!d&&!f&&(x(!0),queueMicrotask(()=>{m()}));let g;if(e[0]!==r||e[1]!==l||e[2]!==c||e[3]!==a||e[4]!==o||e[5]!==i){let j;e[7]!==r||e[8]!==l||e[9]!==c||e[10]!==a||e[11]!==o?(j=C=>t.jsx(fn,{task:C,isActive:r===C.id,onClick:()=>o(C),onArchive:l&&C.created_by===c.currentUserId?()=>a(C):void 0,showAutomationBadge:!!C.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},C.id),e[7]=r,e[8]=l,e[9]=c,e[10]=a,e[11]=o,e[12]=j):j=e[12],g=i.map(j),e[0]=r,e[1]=l,e[2]=c,e[3]=a,e[4]=o,e[5]=i,e[6]=g}else g=e[6];let h;e[13]!==u||e[14]!==d||e[15]!==m?(h=(u||d)&&t.jsx(mn,{onClick:()=>{m()},isFetching:d,indented:!0}),e[13]=u,e[14]=d,e[15]=m,e[16]=h):h=e[16];let v;return e[17]!==g||e[18]!==h?(v=t.jsxs(t.Fragment,{children:[g,h]}),e[17]=g,e[18]=h,e[19]=v):v=e[19],v}function li(n){const e=z.c(36),{status:s,threads:i,activeTaskId:r,onSelectTask:o,onArchiveTask:a,canArchive:l,filters:c}=n,d=Ks[s],f=d.icon,[m,u]=Wo(`status-${s}`,!1);let p;e[0]!==m||e[1]!==u?(p=function(){u(!m)},e[0]=m,e[1]=u,e[2]=p):p=e[2];const y=p;let x;e[3]!==y?(x=b=>{b.target===b.currentTarget&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),y())},e[3]=y,e[4]=x):x=e[4];let g;e[5]!==f||e[6]!==d.iconClassName?(g=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:t.jsx(f,{size:12,className:d.iconClassName})}),e[5]=f,e[6]=d.iconClassName,e[7]=g):g=e[7];let h;e[8]!==m?(h=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:m?t.jsx(_t,{size:14}):t.jsx(Vt,{size:14})}),e[8]=m,e[9]=h):h=e[9];let v;e[10]!==g||e[11]!==h?(v=t.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[g,h]}),e[10]=g,e[11]=h,e[12]=v):v=e[12];let j;e[13]!==d.label?(j=t.jsx("span",{className:"flex-1 truncate",children:d.label}),e[13]=d.label,e[14]=j):j=e[14];let C;e[15]!==i.length?(C=t.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:t.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:i.length})}),e[15]=i.length,e[16]=C):C=e[16];let w;e[17]!==m||e[18]!==y||e[19]!==x||e[20]!==v||e[21]!==j||e[22]!==C?(w=t.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":m,onClick:y,onKeyDown:x,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[v,j,C]}),e[17]=m,e[18]=y,e[19]=x,e[20]=v,e[21]=j,e[22]=C,e[23]=w):w=e[23];let I;e[24]!==r||e[25]!==l||e[26]!==m||e[27]!==c||e[28]!==a||e[29]!==o||e[30]!==s||e[31]!==i?(I=m&&t.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:t.jsx(ai,{status:s,threads:i,activeTaskId:r,onSelectTask:o,onArchiveTask:a,canArchive:l,filters:c})}),e[24]=r,e[25]=l,e[26]=m,e[27]=c,e[28]=a,e[29]=o,e[30]=s,e[31]=i,e[32]=I):I=e[32];let M;return e[33]!==w||e[34]!==I?(M=t.jsxs("div",{className:"flex flex-col gap-0.5",children:[w,I]}),e[33]=w,e[34]=I,e[35]=M):M=e[35],M}function ci(n){const e=z.c(38),{threads:s,groupBy:i,activeTaskId:r,onSelectTask:o,onArchiveTask:a,filters:l,hasMore:c,isFetchingMore:d,onLoadMore:f,filtersActive:m}=n;if(s.length===0&&!c&&!d){let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Vs,{className:"size-6 opacity-60"}),e[0]=g):g=e[0];const h=m?"No chats match your filters":"No chats yet";let v;return e[1]!==h?(v=t.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[g,t.jsx("p",{className:"text-sm",children:h})]}),e[1]=h,e[2]=v):v=e[2],v}const u=s.length>1||c;if(i==="status"){let g;if(e[3]!==r||e[4]!==u||e[5]!==l||e[6]!==a||e[7]!==o||e[8]!==s){let v;e[10]!==r||e[11]!==u||e[12]!==l||e[13]!==a||e[14]!==o?(v=j=>t.jsx(li,{status:j.status,threads:j.threads,activeTaskId:r,onSelectTask:o,onArchiveTask:a,canArchive:u,filters:l},j.status),e[10]=r,e[11]=u,e[12]=l,e[13]=a,e[14]=o,e[15]=v):v=e[15],g=qo(s).map(v),e[3]=r,e[4]=u,e[5]=l,e[6]=a,e[7]=o,e[8]=s,e[9]=g}else g=e[9];let h;return e[16]!==g?(h=t.jsx(t.Fragment,{children:g}),e[16]=g,e[17]=h):h=e[17],h}let p;if(e[18]!==r||e[19]!==u||e[20]!==l||e[21]!==a||e[22]!==o||e[23]!==s){let g;e[25]!==r||e[26]!==u||e[27]!==l||e[28]!==a||e[29]!==o?(g=h=>t.jsx(fn,{task:h,isActive:r===h.id,onClick:()=>o(h),onArchive:u&&h.created_by===l.currentUserId?()=>a(h):void 0,showAutomationBadge:!!h.trigger_id,showAgentIcon:!0},h.id),e[25]=r,e[26]=u,e[27]=l,e[28]=a,e[29]=o,e[30]=g):g=e[30],p=s.map(g),e[18]=r,e[19]=u,e[20]=l,e[21]=a,e[22]=o,e[23]=s,e[24]=p}else p=e[24];let y;e[31]!==c||e[32]!==d||e[33]!==f?(y=(c||d)&&t.jsx(mn,{onClick:f,isFetching:d}),e[31]=c,e[32]=d,e[33]=f,e[34]=y):y=e[34];let x;return e[35]!==p||e[36]!==y?(x=t.jsxs(t.Fragment,{children:[p,y]}),e[35]=p,e[36]=y,e[37]=x):x=e[37],x}function di(n,e){return null}function ui(n,e){return n.some(s=>s.id!==e.taskId&&!s.hidden&&s.branch===e.branch&&s.virtual_mcp_id===e.virtualMcpId)}const fi=["archive","reclaim-worktree"],mi=[];function gi(n){return n==="confirm"?fi:mi}function Mr(n){const e=z.c(11),{panel:s}=n;let i;return e[0]!==s.activeTaskId||e[1]!==s.archiveTask||e[2]!==s.filters||e[3]!==s.filtersActive||e[4]!==s.groupBy||e[5]!==s.hasMore||e[6]!==s.isFetchingMore||e[7]!==s.loadMore||e[8]!==s.selectTask||e[9]!==s.threads?(i=t.jsx(ci,{threads:s.threads,groupBy:s.groupBy,activeTaskId:s.activeTaskId,onSelectTask:s.selectTask,onArchiveTask:s.archiveTask,filters:s.filters,hasMore:s.hasMore,isFetchingMore:s.isFetchingMore,onLoadMore:s.loadMore,filtersActive:s.filtersActive}),e[0]=s.activeTaskId,e[1]=s.archiveTask,e[2]=s.filters,e[3]=s.filtersActive,e[4]=s.groupBy,e[5]=s.hasMore,e[6]=s.isFetchingMore,e[7]=s.loadMore,e[8]=s.selectTask,e[9]=s.threads,e[10]=i):i=e[10],i}function Pr(n){const e=z.c(82);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{onNavigate:i}=s,r=G(),{data:o}=Te.useSession(),a=o?.user?.id,{org:l}=le();let c;e[2]!==l.id?(c=ct(l.id),e[2]=l.id,e[3]=c):c=e[3];const d=c.id,{threads:f,hasMore:m,isFetchingMore:u,fetchNextPage:p}=dt(),y=f.filter(vi),{hide:x,setScope:g}=nn(),h=rt(),v=ft(),{setTaskId:j,createNewTask:C}=ut();let w;e[4]===Symbol.for("react.memo_cache_sentinel")?(w={strict:!1},e[4]=w):w=e[4];const I=at(w);let M;e[5]===Symbol.for("react.memo_cache_sentinel")?(M={strict:!1},e[5]=M):M=e[5];const b=lt(M),N=I.taskId??null;let A;e[6]!==N||e[7]!==f||e[8]!==b.virtualmcpid?(A=b.virtualmcpid??f.find(k=>k.id===N)?.virtual_mcp_id??null,e[6]=N,e[7]=f,e[8]=b.virtualmcpid,e[9]=A):A=e[9];const S=A;let _;e[10]!==i?(_=()=>{i?.()},e[10]=i,e[11]=_):_=e[11];const T=_,P=[...y].sort(xi),[D,F]=V.useState("all"),[L,O]=V.useState("flat"),[$,U]=Ct("sidebar-threads-scope-all",!1),[R,q]=V.useState(!1),[E,Y]=V.useState(!1);let ee;e[12]!==q?(ee=()=>{K("tasks_panel_search_opened"),Y(!0),q(!0)},e[12]=q,e[13]=ee):ee=e[13];const te=ee,[H,J]=V.useState(null),ne=a??null;let W;e[14]!==ne||e[15]!==D?(W={type:D,member:"mine",currentUserId:ne},e[14]=ne,e[15]=D,e[16]=W):W=e[16];const Ne=W,Be={};$||(Be.created_by="me"),g(Be);let Ce;e[17]!==a?(Ce=k=>a?k.filter(B=>B.created_by===a):[],e[17]=a,e[18]=Ce):Ce=e[18];const Ee=Ce;let _e;e[19]!==D?(_e=k=>D==="automation"?k.filter(pi):D==="manual"?k.filter(hi):k,e[19]=D,e[20]=_e):_e=e[20];const We=_e,se=We($?P:Ee(P));let Se;e[21]!==N||e[22]!==T||e[23]!==a||e[24]!==x||e[25]!==h||e[26]!==l.slug||e[27]!==j||e[28]!==se?(Se=k=>{const B=k.id===N,Z=x(k.id);if(ss(k.id),!B)return Z;const ue=Vo(se,k.id,a);return T(),ue?j(ue.id,ue.virtual_mcp_id):h({to:"/$org",params:{org:l.slug}}),Z},e[21]=N,e[22]=T,e[23]=a,e[24]=x,e[25]=h,e[26]=l.slug,e[27]=j,e[28]=se,e[29]=Se):Se=e[29];const oe=Se;let Re;e[30]!==v||e[31]!==r?(Re=async k=>{try{await v.call("SANDBOX_DELETE",{virtualMcpId:k.virtualMcpId,branch:k.branch,sandboxProviderKind:"user-desktop",removeWorktree:!0})}catch{X.error(r("sidebar.archiveWorktreeDialog.reclaimFailed",{branch:k.branch}))}},e[30]=v,e[31]=r,e[32]=Re):Re=e[32];const ke=Re;let Ie;e[33]!==f||e[34]!==oe||e[35]!==a||e[36]!==J?(Ie=k=>{if(a&&k.created_by&&k.created_by!==a)return;const B=di();if(!B||ui(f,B)){oe(k);return}J({task:k,target:B})},e[33]=f,e[34]=oe,e[35]=a,e[36]=J,e[37]=Ie):Ie=e[37];const fe=Ie;let de;e[38]!==oe||e[39]!==H||e[40]!==ke||e[41]!==J?(de=k=>{const B=H;B&&(J(null),(async()=>{for(const Z of gi(k))if(Z==="archive")try{await oe(B.task)}catch{return}else await ke(B.target)})())},e[38]=oe,e[39]=H,e[40]=ke,e[41]=J,e[42]=de):de=e[42];const Fe=de;let De;e[43]!==T||e[44]!==j?(De=k=>{T(),j(k.id,k.virtual_mcp_id)},e[43]=T,e[44]=j,e[45]=De):De=e[45];const ze=De;let Ae;e[46]!==S||e[47]!==N||e[48]!==f||e[49]!==T||e[50]!==C||e[51]!==d?(Ae=()=>{const k=S??d,B=f.find(Z=>Z.id===N)?.branch??null;K("sidebar_new_thread_clicked",{virtual_mcp_id:k}),T(),C(k,B)},e[46]=S,e[47]=N,e[48]=f,e[49]=T,e[50]=C,e[51]=d,e[52]=Ae):Ae=e[52];const me=Ae;let ie;e[53]!==p?(ie=()=>{p()},e[53]=p,e[54]=ie):ie=e[54];const ge=L!=="flat"||D!=="all"||$;let re;e[55]!==Fe||e[56]!==H?(re=H?t.jsx(Ho,{branch:H.target.branch,onOutcome:Fe}):null,e[55]=Fe,e[56]=H,e[57]=re):re=e[57];let ae;e[58]!==E||e[59]!==R||e[60]!==q?(ae=E?t.jsx(Go,{open:R,onOpenChange:q}):null,e[58]=E,e[59]=R,e[60]=q,e[61]=ae):ae=e[61];let we;return e[62]!==N||e[63]!==fe||e[64]!==Ne||e[65]!==L||e[66]!==m||e[67]!==u||e[68]!==me||e[69]!==te||e[70]!==ze||e[71]!==O||e[72]!==U||e[73]!==F||e[74]!==$||e[75]!==ie||e[76]!==ge||e[77]!==re||e[78]!==ae||e[79]!==D||e[80]!==se?(we={threads:se,activeTaskId:N,filters:Ne,hasMore:m,isFetchingMore:u,loadMore:ie,groupBy:L,setGroupBy:O,typeFilter:D,setTypeFilter:F,showAll:$,setShowAll:U,filtersActive:ge,selectTask:ze,archiveTask:fe,newThread:me,openSearch:te,reclaimDialog:re,searchDialog:ae},e[62]=N,e[63]=fe,e[64]=Ne,e[65]=L,e[66]=m,e[67]=u,e[68]=me,e[69]=te,e[70]=ze,e[71]=O,e[72]=U,e[73]=F,e[74]=$,e[75]=ie,e[76]=ge,e[77]=re,e[78]=ae,e[79]=D,e[80]=se,e[81]=we):we=e[81],we}function hi(n){return!n.trigger_id}function pi(n){return!!n.trigger_id}function xi(n,e){return(e.updated_at??"").localeCompare(n.updated_at??"")}function vi(n){return!n.hidden}function bi(n){return n?n.run_in_progress?"generating":n.scanned_at?"ready":"none":"none"}const ji=2e4;function yi(n){if(typeof n!="string"||!n)return null;try{return new URL(n).hostname||null}catch{return null}}function Or(){const n=z.c(17),{org:e}=le(),s=Ln.COMMERCE_DISCOVERY(e.id);let i;n[0]!==e.id||n[1]!==e.slug?(i=$t({connectionId:Wt,orgId:e.id,orgSlug:e.slug}),n[0]=e.id,n[1]=e.slug,n[2]=i):i=n[2];const{data:r}=He(i),a=He({queryKey:Ue.commerceDiscoveryConnection(e.id,s),enabled:!!r,retry:!1,staleTime:6e4,queryFn:async()=>{if(!r)throw new Error("selfClient not ready");const j=await r.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:s}});return Pt(j)}}).data?.item??null,{data:l}=He({...$t({connectionId:s,orgId:e.id,orgSlug:e.slug}),enabled:!!a}),c=Ue.commerceDiscoveryDiagnostic(e.id,s),d=!!l;let f;n[3]!==l?(f=async()=>{if(!l)throw new Error("cdClient not ready");const j=await l.callTool({name:Qt,arguments:{}});return Pt(j).diagnostic??null},n[3]=l,n[4]=f):f=n[4];let m;n[5]!==c||n[6]!==d||n[7]!==f?(m={queryKey:c,enabled:d,retry:1,refetchInterval:Ci,queryFn:f},n[5]=c,n[6]=d,n[7]=f,n[8]=m):m=n[8];const u=He(m),p=u.data??null,y=u.isSuccess,x=a?.metadata?.siteUrl;let g;n[9]!==x?(g=yi(x),n[9]=x,n[10]=g):g=n[10];const h=l??null;let v;return n[11]!==s||n[12]!==u.isSuccess||n[13]!==p||n[14]!==g||n[15]!==h?(v={diagnostic:p,isSuccess:y,host:g,connectionId:s,cdClient:h},n[11]=s,n[12]=u.isSuccess,n[13]=p,n[14]=g,n[15]=h,n[16]=v):v=n[16],v}function Ci(n){return n.state.status!=="error"&&bi(n.state.data)==="generating"?ji:!1}function Fr(n,e){return{to:"/$org/$taskId",params:{org:n.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:Bn(n.id),main:Qs(e,Qt)}}}export{kr as A,wr as C,Ir as N,Sr as O,Tr as T,Nr as a,Dr as b,Pr as c,so as d,Mt as e,Mr as f,Or as g,bi as h,Fr as i,Ar as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as f,F as C,bd as N,e3 as O,bc as S}from"./index-DTCr2n-a.js";import{u as I}from"./use-mcp-client-DFoPNyXR.js";import{S as m}from"./constants-BSYv1IkQ.js";function E(t){const o=f.c(20);let i;o[0]!==t?(i=t===void 0?{}:t,o[0]=t,o[1]=i):i=o[1];const n=i;let l,s,c,d;o[2]!==n?({binding:l,includeVirtual:c,slug:d,...s}=n,o[2]=n,o[3]=l,o[4]=s,o[5]=c,o[6]=d):(l=o[3],s=o[4],c=o[5],d=o[6]);let e;o[7]!==l||o[8]!==s.additionalToolArgs||o[9]!==c||o[10]!==d?(e={...s.additionalToolArgs},l!==void 0&&(e.binding=l),c!==void 0&&(e.include_virtual=c),d!==void 0&&(e.slug=d),o[7]=l,o[8]=s.additionalToolArgs,o[9]=c,o[10]=d,o[11]=e):e=o[11];let r;o[12]!==e?(r=Object.keys(e).length>0?e:void 0,o[12]=e,o[13]=r):r=o[13];let g;o[14]!==s||o[15]!==r?(g={...s,additionalToolArgs:r},o[14]=s,o[15]=r,o[16]=g):g=o[16];const p=g,{org:u}=C();let a;o[17]!==u.id||o[18]!==u.slug?(a={connectionId:m,orgId:u.id,orgSlug:u.slug},o[17]=u.id,o[18]=u.slug,o[19]=a):a=o[19];const A=I(a);return O(u.id,"CONNECTIONS",A,p)}function _(t){const o=f.c(3),{org:i}=C();let n;o[0]!==i.id||o[1]!==i.slug?(n={connectionId:m,orgId:i.id,orgSlug:i.slug},o[0]=i.id,o[1]=i.slug,o[2]=n):n=o[2];const l=I(n);return S(i.id,"CONNECTIONS",t,l)}function x(){const t=f.c(3),{org:o}=C();let i;t[0]!==o.id||t[1]!==o.slug?(i={connectionId:m,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=i):i=t[2];const n=I(i);return N(o.id,"CONNECTIONS",n)}export{_ as a,x as b,E as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as oe,b as le,j as n,F as se,o as ie,r as ce,t as Y,ba as re,bb as ae}from"./index-DTCr2n-a.js";import{c as z,d as G,b as V,f as X,g as Z,e as ee,a as te,A as ne}from"./alert-dialog-BBUALe3i.js";import{u as de}from"./studio-tools-BBCHIrbu.js";function ue(B){const e=oe.c(86),{deleteState:s,cancelDelete:a,confirmDelete:d,confirmForceDelete:c}=B,t=le(),w=s.mode==="deleting";let m;e[0]!==a?(m=W=>{W||a()},e[0]=a,e[1]=m):m=e[1];let u;e[2]!==t?(u=t("common.deleteConnectionDialogs.title"),e[2]=t,e[3]=u):u=e[3];let D;e[4]!==u?(D=n.jsx(z,{children:u}),e[4]=u,e[5]=D):D=e[5];let C;e[6]!==t?(C=t("common.deleteConnectionDialogs.description"),e[6]=t,e[7]=C):C=e[7];const H=s.mode==="deleting"&&s.connection.title;let o;e[8]!==H?(o=n.jsx("span",{className:"font-medium text-foreground",children:H}),e[8]=H,e[9]=o):o=e[9];let l;e[10]!==C||e[11]!==o?(l=n.jsxs(G,{children:[C," ",o,"."]}),e[10]=C,e[11]=o,e[12]=l):l=e[12];let i;e[13]!==D||e[14]!==l?(i=n.jsxs(V,{children:[D,l]}),e[13]=D,e[14]=l,e[15]=i):i=e[15];let f;e[16]!==t?(f=t("common.deleteConnectionDialogs.cancel"),e[16]=t,e[17]=f):f=e[17];let r;e[18]!==f?(r=n.jsx(X,{children:f}),e[18]=f,e[19]=r):r=e[19];let g;e[20]!==t?(g=t("common.deleteConnectionDialogs.delete"),e[20]=t,e[21]=g):g=e[21];let x;e[22]!==d||e[23]!==g?(x=n.jsx(Z,{onClick:d,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:g}),e[22]=d,e[23]=g,e[24]=x):x=e[24];let h;e[25]!==r||e[26]!==x?(h=n.jsxs(ee,{children:[r,x]}),e[25]=r,e[26]=x,e[27]=h):h=e[27];let j;e[28]!==h||e[29]!==i?(j=n.jsxs(te,{children:[i,h]}),e[28]=h,e[29]=i,e[30]=j):j=e[30];let p;e[31]!==w||e[32]!==j||e[33]!==m?(p=n.jsx(ne,{open:w,onOpenChange:m,children:j}),e[31]=w,e[32]=j,e[33]=m,e[34]=p):p=e[34];const J=s.mode==="force-deleting";let N;e[35]!==a?(N=W=>{W||a()},e[35]=a,e[36]=N):N=e[36];let E;e[37]!==t?(E=t("common.deleteConnectionDialogs.forceDeleteTitle"),e[37]=t,e[38]=E):E=e[38];let y;e[39]!==E?(y=n.jsx(z,{children:E}),e[39]=E,e[40]=y):y=e[40];let O;e[41]!==t?(O=t("common.deleteConnectionDialogs.forceDeleteDescription"),e[41]=t,e[42]=O):O=e[42];const M=s.mode==="force-deleting"&&s.connection.title;let v;e[43]!==M?(v=n.jsx("span",{className:"font-medium text-foreground",children:M}),e[43]=M,e[44]=v):v=e[44];let S;e[45]!==t?(S=t("common.deleteConnectionDialogs.isUsedByAgents"),e[45]=t,e[46]=S):S=e[46];const P=s.mode==="force-deleting"&&s.agentNames;let T;e[47]!==P?(T=n.jsx("span",{className:"font-medium text-foreground",children:P}),e[47]=P,e[48]=T):T=e[48];let A;e[49]!==O||e[50]!==v||e[51]!==S||e[52]!==T?(A=n.jsxs("p",{children:[O," ",v," ",S," ",T,"."]}),e[49]=O,e[50]=v,e[51]=S,e[52]=T,e[53]=A):A=e[53];let _;e[54]!==t?(_=t("common.deleteConnectionDialogs.forceDeleteWarning"),e[54]=t,e[55]=_):_=e[55];let b;e[56]!==_?(b=n.jsx("p",{className:"mt-2",children:_}),e[56]=_,e[57]=b):b=e[57];let F;e[58]!==A||e[59]!==b?(F=n.jsx(G,{asChild:!0,children:n.jsxs("div",{children:[A,b]})}),e[58]=A,e[59]=b,e[60]=F):F=e[60];let I;e[61]!==y||e[62]!==F?(I=n.jsxs(V,{children:[y,F]}),e[61]=y,e[62]=F,e[63]=I):I=e[63];let L;e[64]!==t?(L=t("common.deleteConnectionDialogs.cancel"),e[64]=t,e[65]=L):L=e[65];let R;e[66]!==L?(R=n.jsx(X,{children:L}),e[66]=L,e[67]=R):R=e[67];let q;e[68]!==t?(q=t("common.deleteConnectionDialogs.deleteAnyway"),e[68]=t,e[69]=q):q=e[69];let U;e[70]!==c||e[71]!==q?(U=n.jsx(Z,{onClick:c,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:q}),e[70]=c,e[71]=q,e[72]=U):U=e[72];let K;e[73]!==R||e[74]!==U?(K=n.jsxs(ee,{children:[R,U]}),e[73]=R,e[74]=U,e[75]=K):K=e[75];let $;e[76]!==I||e[77]!==K?($=n.jsxs(te,{children:[I,K]}),e[76]=I,e[77]=K,e[78]=$):$=e[78];let k;e[79]!==J||e[80]!==N||e[81]!==$?(k=n.jsx(ne,{open:J,onOpenChange:N,children:$}),e[79]=J,e[80]=N,e[81]=$,e[82]=k):k=e[82];let Q;return e[83]!==p||e[84]!==k?(Q=n.jsxs(n.Fragment,{children:[p,k]}),e[83]=p,e[84]=k,e[85]=Q):Q=e[85],Q}function De({onSuccess:B}={}){const{org:e}=se(),s=ie(),a=de(),[d,c]=ce.useState({mode:"idle"}),t=()=>{s.invalidateQueries({predicate:o=>{const l=o.queryKey;return l[1]===e.id&&l[3]==="collection"&&l[4]==="CONNECTIONS"}})},w=o=>{re(o),s.invalidateQueries({predicate:l=>l.queryKey[1]===ae&&l.queryKey[3]===o})},m=o=>{t(),w(o),Y.success("Connection deleted successfully"),c({mode:"idle"}),B?.()};return{deleteState:d,requestDelete:o=>{c({mode:"deleting",connection:o})},cancelDelete:()=>{c({mode:"idle"})},confirmDelete:async()=>{if(d.mode!=="deleting")return;const o=d.connection;c({mode:"idle"});try{await a.call("COLLECTION_CONNECTIONS_DELETE",{id:o.id}),m(o.id)}catch(l){const i=l instanceof Error?l.message:String(l),f=i.replace(/^Error:\s*/,"");try{const r=JSON.parse(f);if(r.code==="CONNECTION_IN_USE"&&r.agentNames){c({mode:"force-deleting",connection:o,agentNames:r.agentNames.map(g=>`"${g}"`).join(", ")});return}}catch{}Y.error(`Failed to delete connection: ${i}`)}},confirmForceDelete:async()=>{if(d.mode!=="force-deleting")return;const o=d.connection.id;c({mode:"idle"});try{await a.call("COLLECTION_CONNECTIONS_DELETE",{id:o,force:!0}),m(o)}catch(l){const i=l instanceof Error?l.message:String(l);Y.error(`Failed to delete connection: ${i}`)}}}}export{ue as D,De as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as u,F as c,K as r,n as d,x as y,o as C,e as F}from"./index-DTCr2n-a.js";import{u as f}from"./studio-tools-BBCHIrbu.js";function m(){const e=u.c(7),{org:n}=c(),o=f();let i;e[0]!==n.id?(i=r.fileConfigs(n.id),e[0]=n.id,e[1]=i):i=e[1];let t;e[2]!==o?(t=()=>o.call("FILE_CONFIG_LIST",{}),e[2]=o,e[3]=t):t=e[3];let s;e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6];const{data:l}=y(s);return l.configs}function I(){const e=u.c(7),{org:n}=c(),o=f();let i;e[0]!==n.id?(i=r.fileConfigs(n.id),e[0]=n.id,e[1]=i):i=e[1];let t;e[2]!==o?(t=()=>o.call("FILE_CONFIG_LIST",{}),e[2]=o,e[3]=t):t=e[3];let s;return e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6],d(s)}function q(){const e=u.c(8),{org:n}=c(),o=f(),i=C();let t;e[0]!==o?(t=a=>o.call("FILE_CONFIG_CREATE",{...a}),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==n||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:r.fileConfigs(n.id)})},e[2]=n,e[3]=i,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=l):l=e[7],F(l)}function _(){const e=u.c(8),{org:n}=c(),o=f(),i=C();let t;e[0]!==o?(t=a=>o.call("FILE_CONFIG_DELETE",{id:a}),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==n||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:r.fileConfigs(n.id)})},e[2]=n,e[3]=i,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=l):l=e[7],F(l)}export{m as a,q as b,_ as c,I as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as g,F as N,K as y,n as _,o as A,e as I,t as q}from"./index-DTCr2n-a.js";import{a as S}from"./use-capability-U_kO9pjO.js";import{u as O}from"./studio-tools-BBCHIrbu.js";function b(){const e=g.c(10),{org:r}=N(),u=O(),{capabilities:a,isPrivileged:c}=S(),d=c||!!a["members:manage"];let t;e[0]!==r.id?(t=y.organizationJoinRequests(r.id),e[0]=r.id,e[1]=t):t=e[1];let s;e[2]!==u?(s=()=>u.call("ORGANIZATION_JOIN_REQUEST_LIST",{}),e[2]=u,e[3]=s):s=e[3];const i=!!r.id&&d;let n;e[4]!==t||e[5]!==s||e[6]!==i?(n={queryKey:t,queryFn:s,enabled:i},e[4]=t,e[5]=s,e[6]=i,e[7]=n):n=e[7];const{data:l}=_(n);let o;return e[8]!==l?.requests?(o=l?.requests??[],e[8]=l?.requests,e[9]=o):o=e[9],o}function K(){const e=g.c(21),{org:r,locator:u}=N(),a=O(),c=A();let d;e[0]!==u||e[1]!==r||e[2]!==c?(d=()=>{c.invalidateQueries({queryKey:y.organizationJoinRequests(r.id)}),c.invalidateQueries({queryKey:y.members(u)})},e[0]=u,e[1]=r,e[2]=c,e[3]=d):d=e[3];const t=d;let s;e[4]!==a?(s=R=>a.call("ORGANIZATION_JOIN_REQUEST_APPROVE",{requestId:R}),e[4]=a,e[5]=s):s=e[5];let i;e[6]!==t?(i=()=>{t(),q.success("Request approved")},e[6]=t,e[7]=i):i=e[7];let n;e[8]!==s||e[9]!==i?(n={mutationFn:s,onSuccess:i,onError:v},e[8]=s,e[9]=i,e[10]=n):n=e[10];const l=I(n);let o;e[11]!==a?(o=R=>a.call("ORGANIZATION_JOIN_REQUEST_DENY",{requestId:R}),e[11]=a,e[12]=o):o=e[12];let f;e[13]!==t?(f=()=>{t(),q.success("Request denied")},e[13]=t,e[14]=f):f=e[14];let m;e[15]!==o||e[16]!==f?(m={mutationFn:o,onSuccess:f,onError:T},e[15]=o,e[16]=f,e[17]=m):m=e[17];const E=I(m);let p;return e[18]!==l||e[19]!==E?(p={approve:l,deny:E},e[18]=l,e[19]=E,e[20]=p):p=e[20],p}function T(e){return q.error(e instanceof Error?e.message:"Failed to deny")}function v(e){return q.error(e instanceof Error?e.message:"Failed to approve")}export{K as a,b as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as m,n as p,x as q,K as T}from"./index-DTCr2n-a.js";function C(r){const e=m.c(12);let t,o;e[0]!==r?({client:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let s;e[5]!==t?(s=async()=>await t.listTools(),e[5]=t,e[6]=s):s=e[6];const n=o.staleTime??3e4;let i;return e[7]!==o||e[8]!==l||e[9]!==s||e[10]!==n?(i={...o,queryKey:l,queryFn:s,staleTime:n,retry:!1},e[7]=o,e[8]=l,e[9]=s,e[10]=n,e[11]=i):i=e[11],q(i)}function K(r){const e=m.c(12);let t,o;e[0]!==r?({client:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let s;e[5]!==t?(s=async()=>await t.listTools(),e[5]=t,e[6]=s):s=e[6];const n=o.staleTime??3e4;let i;return e[7]!==o||e[8]!==l||e[9]!==s||e[10]!==n?(i={...o,queryKey:l,queryFn:s,staleTime:n,retry:!1},e[7]=o,e[8]=l,e[9]=s,e[10]=n,e[11]=i):i=e[11],p(i)}function O(r){const e=m.c(21);let t,o,l,s;e[0]!==r?({client:t,toolName:s,toolArguments:l,...o}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=l,e[4]=s):(t=e[1],o=e[2],l=e[3],s=e[4]);let n,i,u;if(e[5]!==t||e[6]!==o||e[7]!==l||e[8]!==s){const f=JSON.stringify(l??{});u=q,n=o,i=T.mcpToolCall(t,s,f),e[5]=t,e[6]=o,e[7]=l,e[8]=s,e[9]=n,e[10]=i,e[11]=u}else n=e[9],i=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==s?(a=async()=>await t.callTool({name:s,arguments:l}),e[12]=t,e[13]=l,e[14]=s,e[15]=a):a=e[15];const y=o.staleTime??3e4;let c;return e[16]!==n||e[17]!==i||e[18]!==a||e[19]!==y?(c={...n,queryKey:i,queryFn:a,staleTime:y,retry:!1},e[16]=n,e[17]=i,e[18]=a,e[19]=y,e[20]=c):c=e[20],u(c)}function w(r){const e=m.c(21);let t,o,l,s;e[0]!==r?({client:t,toolName:s,toolArguments:l,...o}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=l,e[4]=s):(t=e[1],o=e[2],l=e[3],s=e[4]);let n,i,u;if(e[5]!==t||e[6]!==o||e[7]!==l||e[8]!==s){const f=JSON.stringify(l??{});u=p,n=o,i=T.mcpToolCall(t,s,f),e[5]=t,e[6]=o,e[7]=l,e[8]=s,e[9]=n,e[10]=i,e[11]=u}else n=e[9],i=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==s?(a=async()=>await t.callTool({name:s,arguments:l}),e[12]=t,e[13]=l,e[14]=s,e[15]=a):a=e[15];const y=o.staleTime??3e4;let c;return e[16]!==n||e[17]!==i||e[18]!==a||e[19]!==y?(c={...n,queryKey:i,queryFn:a,staleTime:y,retry:!1},e[16]=n,e[17]=i,e[18]=a,e[19]=y,e[20]=c):c=e[20],u(c)}export{K as a,C as b,O as c,w as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c,F as m,x as b,n as M,K as f}from"./index-DTCr2n-a.js";import{u as y}from"./use-org-auth-client-CiGZ-xlx.js";const p=300*1e3;function d(){const t=c.c(7),{locator:e}=m(),o=y();let r;t[0]!==e?(r=f.members(e),t[0]=e,t[1]=r):r=t[1];let s;t[2]!==o?(s=()=>o.organization.listMembers(),t[2]=o,t[3]=s):s=t[3];let n;return t[4]!==r||t[5]!==s?(n={queryKey:r,queryFn:s},t[4]=r,t[5]=s,t[6]=n):n=t[6],b(n)}function q(t){const e=c.c(10);let o;e[0]!==t?(o=t===void 0?{}:t,e[0]=t,e[1]=o):o=e[1];const{enabled:r}=o,s=r===void 0?!0:r,{locator:n}=m(),a=y();let u;e[2]!==n?(u=f.members(n),e[2]=n,e[3]=u):u=e[3];let i;e[4]!==a?(i=()=>a.organization.listMembers(),e[4]=a,e[5]=i):i=e[5];let l;return e[6]!==s||e[7]!==u||e[8]!==i?(l={queryKey:u,queryFn:i,staleTime:p,enabled:s},e[6]=s,e[7]=u,e[8]=i,e[9]=l):l=e[9],M(l)}export{d as a,q as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as m,r}from"./index-DTCr2n-a.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as a,F as f,K as y,n as _,o as d,e as R}from"./index-DTCr2n-a.js";import{u as S}from"./studio-tools-BBCHIrbu.js";const m=5e3;function p(e){return(e??[]).some(n=>!n.lastSyncedAt&&!n.lastSyncError)}function g(){const e=a.c(7),{org:n}=f(),t=S();let i;e[0]!==n.id?(i=y.orgRepoSyncs(n.id),e[0]=n.id,e[1]=i):i=e[1];let s;e[2]!==t?(s=async()=>(await t.call("ORG_REPO_SYNC_LIST",{})).configs,e[2]=t,e[3]=s):s=e[3];let o;return e[4]!==i||e[5]!==s?(o={queryKey:i,staleTime:6e4,refetchInterval:E,queryFn:s},e[4]=i,e[5]=s,e[6]=o):o=e[6],_(o)}function E(e){return p(e.state.data)?m:!1}function q(){const e=a.c(2),n=g();let t;return e[0]!==n.data?(t=new Set((n.data??[]).map(O)),e[0]=n.data,e[1]=t):t=e[1],t}function O(e){return e.volume}function F(){const e=a.c(12),{org:n}=f(),t=S(),i=d();let s;e[0]!==n||e[1]!==i?(s=()=>i.invalidateQueries({queryKey:y.orgRepoSyncs(n.id)}),e[0]=n,e[1]=i,e[2]=s):s=e[2];const o=s;let c;e[3]!==t?(c=async u=>(await t.call("ORG_REPO_SYNC_CREATE",u)).config,e[3]=t,e[4]=c):c=e[4];let r;e[5]!==o||e[6]!==t?(r=u=>{t.call("ORG_REPO_SYNC_RUN",{id:u.id}).catch(C).then(o)},e[5]=o,e[6]=t,e[7]=r):r=e[7];let l;return e[8]!==o||e[9]!==c||e[10]!==r?(l={mutationFn:c,onSuccess:r,onSettled:o},e[8]=o,e[9]=c,e[10]=r,e[11]=l):l=e[11],R(l)}function C(){return null}function T(){const e=a.c(8),{org:n}=f(),t=S(),i=d();let s;e[0]!==t?(s=r=>t.call("ORG_REPO_SYNC_DELETE",{id:r}),e[0]=t,e[1]=s):s=e[1];let o;e[2]!==n||e[3]!==i?(o=()=>i.invalidateQueries({queryKey:y.orgRepoSyncs(n.id)}),e[2]=n,e[3]=i,e[4]=o):o=e[4];let c;return e[5]!==s||e[6]!==o?(c={mutationFn:s,onSettled:o},e[5]=s,e[6]=o,e[7]=c):c=e[7],R(c)}export{q as a,F as b,T as c,g as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{X as c,Z as r,Y as R,a1 as k,a2 as d,_ as C,b8 as E,c as u,F as A,n as O,K as y,o as x,e as G,r as Q}from"./index-DTCr2n-a.js";import{W as $}from"./constants-BSYv1IkQ.js";import{c as q,u as L}from"./studio-tools-BBCHIrbu.js";c({title:r(),url:r(),icon:r()});c({registries:k(r(),c({enabled:d()})).describe("Per-registry enabled/disabled state. Key is connection ID. Absent registries are treated as enabled."),blockedMcps:R(r()).describe("List of MCP app_name or app_id values to hide from the store.")});const g=c({keyId:r(),modelId:r(),title:r().optional()}).nullable();C(["fast","smart","thinking","image","web_search","deep_research"]);C(["fast","smart","thinking"]);const ae=c({tiers:c({fast:g,smart:g,thinking:g,image:g,web_search:g,deep_research:g})});c({tiers:c({fast:g.optional(),smart:g.optional(),thinking:g.optional()})});c({ids:R(r()).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});c({demo_mode:d().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),reports_only:d().optional().describe("Curated commerce (reports) look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),nav_v2:d().optional().describe("First-class navigation: the sidebar lists destinations (Reports, Library, Tasks) instead of chat threads, and the thread list moves into a menu at the top of the chat panel. Seeded on for newly created orgs (see NEW_ORG_DEFAULT_FLAGS) and defaults on for reports_only orgs; an explicit false wins over both."),qa_agent_enabled:d().optional().describe("Run the QA Agent on a task's pull request once it's In Review — it verifies the task actually solved the problem (exercises the feature, not just the diff)."),code_reviewer_enabled:d().optional().describe("Run the Code Reviewer on a task's pull request once it's In Review — it reviews the code using the repo's stack-appropriate review skills."),auto_merge:d().optional().describe("When every enabled reviewer (QA Agent / Code Reviewer) approves a task's pull request, merge it automatically instead of leaving the merge to a human. If the merge is blocked by a conflict with the base branch, hand the PR back to the Super Agent to resolve the conflict (check out the branch, merge the base, push) so it can then merge."),cheap_reviewer_model:d().optional().describe("Run the QA Agent and Code Reviewer on a cheaper model than the Super Agent. A review reads a diff and reaches a verdict; it does not need the model that wrote the code. Off by default — turning it on trades some review depth for cost."),auto_assign_report_tasks_to_super_agent:d().optional().describe("When a report import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned.")});const F=new Set(["qa_agent_enabled","code_reviewer_enabled"]);function U(e,t){const n=e?.[t];return F.has(t)?n!==!1:n===!0}c({id:r().describe("Brand context ID"),name:r().describe("Company name"),domain:r().describe("Company domain (e.g. example.com)"),overview:r().describe("Company overview / description"),logo:r().nullable().optional().describe("Logo URL"),favicon:r().nullable().optional().describe("Favicon URL"),ogImage:r().nullable().optional().describe("OG image URL"),fonts:c({heading:r().optional().describe("Font family for headings"),body:r().optional().describe("Font family for body text"),code:r().optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:c({primary:r().optional().describe("Primary brand color (hex)"),secondary:r().optional().describe("Secondary brand color (hex)"),accent:r().optional().describe("Accent / highlight color (hex)"),background:r().optional().describe("Background color (hex)"),foreground:r().optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:R(k(r(),E())).nullable().optional().describe("Brand images"),metadata:k(r(),E()).nullable().optional().describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:r().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:d().optional().describe("Whether this is the default brand for the organization")});const D={organizationId:"",sidebar_items:null,enabled_plugins:null,registry_config:null,simple_mode:null,default_home_agents:null,flags:null,main_agent_id:null},M={tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}};function N(e,t){return{queryKey:y.organizationSettings(t),queryFn:async()=>{try{return await q(e,"ORGANIZATION_SETTINGS_GET",{})}catch{return{...D,organizationId:t}}},staleTime:6e4}}function f(e){const t=u.c(6),{org:n}=A();let a;t[0]!==n.id||t[1]!==n.slug?(a=N(n.slug,n.id),t[0]=n.id,t[1]=n.slug,t[2]=a):a=t[2];const o=e;let s;return t[3]!==a||t[4]!==o?(s={...a,select:o},t[3]=a,t[4]=o,t[5]=s):s=t[5],O(s)}function oe(e,t){const n=u.c(3);let a;n[0]!==e||n[1]!==t?(a=N(t,e),n[0]=e,n[1]=t,n[2]=a):a=n[2];const{data:o}=O(a);return o??null}function p(){const e=u.c(9),{org:t}=A(),n=L(),a=x();let o;e[0]!==t||e[1]!==n?(o=async l=>{const m=await n.call("ORGANIZATION_SETTINGS_UPDATE",{organizationId:t.id,...l});if(!m)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return m},e[0]=t,e[1]=n,e[2]=o):o=e[2];let s;e[3]!==t||e[4]!==a?(s=l=>{a.setQueryData(y.organizationSettings(t.id),m=>({...m??D,...l}))},e[3]=t,e[4]=a,e[5]=s):s=e[5];let i;return e[6]!==o||e[7]!==s?(i={mutationFn:o,onSuccess:s},e[6]=o,e[7]=s,e[8]=i):i=e[8],G(i)}function W(e){return e?.tiers?{tiers:{fast:e.tiers.fast??null,smart:e.tiers.smart??null,thinking:e.tiers.thinking??null,image:e.tiers.image??null,web_search:e.tiers.web_search??null,deep_research:e.tiers.deep_research??null}}:M}function se(){const{data:e}=f(K);return e??M}function K(e){return W(e.simple_mode)}function ie(){const e=u.c(7),t=p();let n,a;e[0]!==t?(n=(s,i)=>t.mutate({simple_mode:s},i),a=(s,i)=>t.mutateAsync({simple_mode:s},i),e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let o;return e[3]!==t||e[4]!==n||e[5]!==a?(o={...t,mutate:n,mutateAsync:a},e[3]=t,e[4]=n,e[5]=a,e[6]=o):o=e[6],o}function re(){return j("reports_only")}function le(){const{data:e}=f(Y);return e??!1}function Y(e){return e.flags?.nav_v2??e.flags?.reports_only??!1}function j(e){const t=u.c(5);let n;t[0]!==e?(n=s=>U(s.flags,e),t[0]=e,t[1]=n):n=t[1];const{data:a}=f(n);let o;return t[2]!==a||t[3]!==e?(o=a??F.has(e),t[2]=a,t[3]=e,t[4]=o):o=t[4],o}function ce(){const e=u.c(7),t=p();let n,a;e[0]!==t?(n=(s,i,l)=>t.mutate({flags:{[s]:i}},l),a=(s,i,l)=>t.mutateAsync({flags:{[s]:i}},l),e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let o;return e[3]!==t||e[4]!==n||e[5]!==a?(o={...t,mutate:n,mutateAsync:a},e[3]=t,e[4]=n,e[5]=a,e[6]=o):o=e[6],o}function B(){const{data:e}=f(Z);return e??null}function Z(e){return e.registry_config}function ue(){const e=u.c(7),t=p();let n,a;e[0]!==t?(n=(s,i)=>t.mutate({registry_config:s},i),a=(s,i)=>t.mutateAsync({registry_config:s},i),e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let o;return e[3]!==t||e[4]!==n||e[5]!==a?(o={...t,mutate:n,mutateAsync:a},e[3]=t,e[4]=n,e[5]=a,e[6]=o):o=e[6],o}function de(){const{data:e}=f(H);return e??null}function H(e){return e.default_home_agents}function V(){const e=u.c(7),t=p();let n,a;e[0]!==t?(n=(s,i)=>t.mutate({default_home_agents:s},i),a=(s,i)=>t.mutateAsync({default_home_agents:s},i),e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let o;return e[3]!==t||e[4]!==n||e[5]!==a?(o={...t,mutate:n,mutateAsync:a},e[3]=t,e[4]=n,e[5]=a,e[6]=o):o=e[6],o}function me(){const e=u.c(14),{org:t}=A(),n=V(),a=x();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Promise.resolve(),e[0]=o):o=e[0];const s=Q.useRef(o);let i;e[1]!==t.id?(i=y.organizationSettings(t.id),e[1]=t.id,e[2]=i):i=e[2];const l=i;let m;e[3]!==l||e[4]!==a?(m=()=>a.getQueryData(l)?.default_home_agents?.ids??[],e[3]=l,e[4]=a,e[5]=m):m=e[5];const v=m;let _;e[6]!==l||e[7]!==t.slug||e[8]!==a||e[9]!==n?(_=P=>{const I=s.current.then(async()=>{const T=a.getQueryData(l),w=P(T?.default_home_agents?.ids??[]);if(w!==null){a.setQueryData(l,h=>h&&{...h,default_home_agents:{ids:w}});try{await n.mutateAsync({ids:w}),await a.refetchQueries({queryKey:y.homeNextActions(t.slug),type:"active"})}catch(h){const z=h;throw a.setQueryData(l,T),z}}});return s.current=I.catch(X),I},e[6]=l,e[7]=t.slug,e[8]=a,e[9]=n,e[10]=_):_=e[10];const S=_;let b;return e[11]!==S||e[12]!==v?(b={currentIds:v,apply:S},e[11]=S,e[12]=v,e[13]=b):b=e[13],b}function X(){}function ge(){const e=u.c(3),{data:t,isPending:n}=f(J),a=t??null;let o;return e[0]!==n||e[1]!==a?(o={mainAgentId:a,isPending:n},e[0]=n,e[1]=a,e[2]=o):o=e[2],o}function J(e){return e.main_agent_id??null}function fe(){const e=u.c(7),t=p();let n,a;e[0]!==t?(n=(s,i)=>t.mutate({main_agent_id:s},i),a=(s,i)=>t.mutateAsync({main_agent_id:s},i),e[0]=t,e[1]=n,e[2]=a):(n=e[1],a=e[2]);let o;return e[3]!==t||e[4]!==n||e[5]!==a?(o={...t,mutate:n,mutateAsync:a},e[3]=t,e[4]=n,e[5]=a,e[6]=o):o=e[6],o}function he(){const e=u.c(5),{org:t}=A(),n=B();let a;e[0]!==t.id?(a=$.REGISTRY(t.id),e[0]=t.id,e[1]=a):a=e[1];const o=a;let s;return e[2]!==o||e[3]!==n?(s=i=>{if(!n)return i===o;const l=n.registries[i];return l?l.enabled:i===o},e[2]=o,e[3]=n,e[4]=s):s=e[4],s}export{ae as S,re as a,le as b,se as c,de as d,me as e,ge as f,he as g,oe as h,fe as i,ce as j,ie as k,B as l,ue as m,j as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as r,F as a,K as c,x as y,o as d,e as S}from"./index-DTCr2n-a.js";import{u as l}from"./studio-tools-BBCHIrbu.js";function C(){const e=r.c(7),{org:i}=a(),u=l();let o;e[0]!==i.id?(o=c.secrets(i.id),e[0]=i.id,e[1]=o):o=e[1];let t;e[2]!==u?(t=async()=>await u.call("SECRET_LIST",{}),e[2]=u,e[3]=t):t=e[3];let s;e[4]!==o||e[5]!==t?(s={queryKey:o,staleTime:6e4,queryFn:t},e[4]=o,e[5]=t,e[6]=s):s=e[6];const{data:n}=y(s);return n.secrets}function p(){const e=r.c(8),{org:i}=a(),u=l(),o=d();let t;e[0]!==u?(t=async f=>await u.call("SECRET_CREATE",{...f}),e[0]=u,e[1]=t):t=e[1];let s;e[2]!==i||e[3]!==o?(s=()=>{o.invalidateQueries({queryKey:c.secrets(i.id)})},e[2]=i,e[3]=o,e[4]=s):s=e[4];let n;return e[5]!==t||e[6]!==s?(n={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=n):n=e[7],S(n)}export{p as a,C as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as f,F as d,K as p,n as k,b as S,e as q,t as I}from"./index-DTCr2n-a.js";import{a as v}from"./use-capability-U_kO9pjO.js";import{u as y}from"./studio-tools-BBCHIrbu.js";const K={connect:{key:"connect",titleKey:"settings.connectClients.pageTitle",tabs:[{key:"clients",labelKey:"settings.subnav.clients",to:"/$org/settings/connect"},{key:"api-keys",labelKey:"settings.nav.apiKeys",to:"/$org/settings/api-keys",requires:"api-keys:manage"}]},members:{key:"members",titleKey:"orgs.members.title",tabs:[{key:"members",labelKey:"orgs.members.title",to:"/$org/settings/members",requires:"members:manage"},{key:"roles",labelKey:"settings.roles.pageTitle",to:"/$org/settings/roles",privilegedOnly:!0}]},billing:{key:"billing",titleKey:"settings.nav.billing",tabs:[{key:"ai-providers",labelKey:"settings.nav.aiProviders",to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"infra",labelKey:"settings.subnav.infrastructure",to:"/$org/settings/infra-billing",requires:"members:manage",requiresOwnedSites:!0}]},storage:{key:"storage",titleKey:"settings.nav.storage",tabs:[{key:"buckets",labelKey:"settings.nav.buckets",to:"/$org/settings/buckets",requires:"file-configs:manage"},{key:"synced-repos",labelKey:"settings.nav.syncedRepos",to:"/$org/settings/synced-repos",requires:"file-configs:manage"}]}};function E(e){return K[e].tabs.map(s=>s.to)}function T(){const e=f.c(13),{org:s}=d(),t=y(),{capabilities:l,isPrivileged:a}=v(),n=a||!!l["members:manage"];let i;e[0]!==s.id?(i=p.infraBillingSites(s.id),e[0]=s.id,e[1]=i):i=e[1];const u=!!s.id&&n;let r;e[2]!==t?(r=()=>t.call("INFRA_BILLING_SITES_LIST",{}),e[2]=t,e[3]=r):r=e[3];let o;e[4]!==i||e[5]!==u||e[6]!==r?(o={queryKey:i,staleTime:3e5,enabled:u,queryFn:r},e[4]=i,e[5]=u,e[6]=r,e[7]=o):o=e[7];const{data:g,isLoading:b}=k(o);let c;e[8]!==g?.sites?(c=g?.sites.map(_)??[],e[8]=g?.sites,e[9]=c):c=e[9];let m;return e[10]!==b||e[11]!==c?(m={sites:c,isLoading:b},e[10]=b,e[11]=c,e[12]=m):m=e[12],m}function _(e){return e.slug}function R(){const e=f.c(7),s=y(),t=S();let l;e[0]!==s?(l=i=>s.call("INFRA_BILLING_PORTAL",{siteSlugs:i}),e[0]=s,e[1]=l):l=e[1];let a;e[2]!==t?(a=i=>I.error(t("settings.infraBilling.portalError",{message:i.message})),e[2]=t,e[3]=a):a=e[3];let n;return e[4]!==l||e[5]!==a?(n={mutationFn:l,onSuccess:$,onError:a},e[4]=l,e[5]=a,e[6]=n):n=e[6],q(n)}function $(e){const{url:s}=e;return window.open(s,"_blank","noopener,noreferrer")}function F(e,s){const t=f.c(14),{org:l}=d(),a=y();let n,i,u;t[0]!==l.id||t[1]!==s||t[2]!==e?(n=[...e].sort(),u=k,i=p.infraBilling(l.id,n.join(","),s),t[0]=l.id,t[1]=s,t[2]=e,t[3]=n,t[4]=i,t[5]=u):(n=t[3],i=t[4],u=t[5]);const r=n.length>0;let o;t[6]!==s||t[7]!==n||t[8]!==a?(o=()=>a.call("INFRA_BILLING_GET",{siteSlugs:n,period:s}),t[6]=s,t[7]=n,t[8]=a,t[9]=o):o=t[9];let g;return t[10]!==i||t[11]!==r||t[12]!==o?(g={queryKey:i,enabled:r,staleTime:6e4,queryFn:o},t[10]=i,t[11]=r,t[12]=o,t[13]=g):g=t[13],u(g)}function N(){const e=f.c(6),{capabilities:s,isPrivileged:t,loading:l,error:a}=v(),n=T().sites.length>0;let i;if(e[0]!==s||e[1]!==a||e[2]!==t||e[3]!==l||e[4]!==n){const u=r=>r.requiresOwnedSites&&!n?!1:l||a?!0:r.privilegedOnly?t:r.requires?t||s[r.requires]:!0;i=Object.fromEntries(Object.values(K).map(r=>[r.key,r.tabs.filter(u)])),e[0]=s,e[1]=a,e[2]=t,e[3]=l,e[4]=n,e[5]=i}else i=e[5];return i}export{K as S,T as a,F as b,R as c,E as g,N as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as u,F as f,n as E,o as g,e as T,K as l,t as m}from"./index-DTCr2n-a.js";import{u as y}from"./studio-tools-BBCHIrbu.js";function K(){const e=u.c(7),{locator:t}=f(),o=y();let n;e[0]!==t?(n=l.tags(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==o?(s=async()=>{const{tags:r}=await o.call("TAGS_LIST",{});return r},e[2]=o,e[3]=s):s=e[3];let a;return e[4]!==n||e[5]!==s?(a={queryKey:n,queryFn:s,staleTime:3e4},e[4]=n,e[5]=s,e[6]=a):a=e[6],E(a)}function C(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{tag:i}=await n.call("TAGS_CREATE",typeof c=="string"?{name:c}:c);return i},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:S},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function S(e){m.error(e instanceof Error?e.message:"Failed to create tag")}function M(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{await n.call("TAGS_DELETE",{tagId:c})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)}),t.invalidateQueries({queryKey:l.taskBoardItems(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:q},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function q(e){m.error(e instanceof Error?e.message:"Failed to delete tag")}function A(e){const t=u.c(10),{locator:o}=f(),n=y();let s;t[0]!==o||t[1]!==e?(s=l.memberTags(o,e),t[0]=o,t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e||t[4]!==n?(a=async()=>{const{tags:i}=await n.call("MEMBER_TAGS_GET",{memberId:e});return i},t[3]=e,t[4]=n,t[5]=a):a=t[5];const r=!!e;let c;return t[6]!==s||t[7]!==a||t[8]!==r?(c={queryKey:s,queryFn:a,staleTime:3e4,enabled:r},t[6]=s,t[7]=a,t[8]=r,t[9]=c):c=t[9],E(c)}function G(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{memberId:i,tagIds:d}=c;return await n.call("MEMBER_TAGS_SET",{memberId:i,tagIds:d})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=(c,i)=>{t.invalidateQueries({queryKey:l.memberTags(o,i.memberId)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:_},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function _(e){m.error(e instanceof Error?e.message:"Failed to update member tags")}export{C as a,M as b,A as c,G as d,K as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as p,r as f}from"./index-DTCr2n-a.js";import{u as w}from"./use-mobile-DxjazlC8.js";function S(m,M){const e=p.c(12),u=M===void 0?"cards":M,o=w(),b=f.useRef(o),s=m?`deco-view-mode-${m}`:"deco-view-mode";let i;e[0]!==u||e[1]!==s?(i=()=>{const r=globalThis.localStorage?.getItem(s);return r==="cards"||r==="table"?r:u},e[0]=u,e[1]=s,e[2]=i):i=e[2];const[t,g]=f.useState(i);let l;e[3]!==s?(l=r=>{g(r),globalThis.localStorage?.setItem(s,r)},e[3]=s,e[4]=l):l=e[4];const d=l;let c,a;e[5]!==o||e[6]!==t?(c=()=>{!b.current&&o&&t==="table"&&g("cards"),b.current=o},a=[o,t],e[5]=o,e[6]=t,e[7]=c,e[8]=a):(c=e[7],a=e[8]),f.useEffect(c,a);let n;return e[9]!==d||e[10]!==t?(n=[t,d],e[9]=d,e[10]=t,e[11]=n):n=e[11],n}export{S as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./use-infinite-scroll-Dzm35RNS.js";import{e7 as i}from"./index-DTCr2n-a.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bf as n,r as s,cQ as a,cR as i}from"./index-DTCr2n-a.js";function f(r){const c=n({warn:r?.router===void 0}),t=r?.router||c,u=s.useRef(void 0);return a(t.stores.__store,e=>{if(r?.select){if(r.structuralSharing??t.options.defaultStructuralSharing){const o=i(u.current,r.select(e));return u.current=o,o}return r.select(e)}return e})}export{f as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as s}from"./use-infinite-scroll-Dzm35RNS.js";import{e7 as u,b4 as n}from"./index-DTCr2n-a.js";function a(e,r){return u({...e,enabled:!0,suspense:!0,throwOnError:n},s,r)}export{a as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as V,b as q,r as z,a as O,n as Y,e as $,j as t,K as J,t as Q,B as W}from"./index-DTCr2n-a.js";import{P as I}from"./index-mAaX9S9j.js";import{C as G}from"./collection-table-wrapper-C12GS9C3.js";import{E as L}from"./empty-state-BHXPcV6D.js";import{S as H}from"./search-input-DsWKOK9t.js";import{A as X}from"./avatar-md-XNPuR.js";import{B as D}from"./badge-BR2WgVsV.js";import{u as Z}from"./use-debounced-value-UZPGD-zb.js";import{a as K}from"./admin-fetch-CCSvjTk1.js";import{f as ee}from"./format-time-BnbuEtat.js";import{g as se}from"./get-initials-D-f_fDFw.js";import"./sidebar-Z1Ar8Iq1.js";import"./LayoutLeft-BKrrf1xY.js";import"./use-mobile-DxjazlC8.js";import"./X-IBBjQPfk.js";import"./tooltip-Dt_WUeQs.js";import"./table-_DZMZF7n.js";import"./ArrowUp-DaPuMC6J.js";import"./SearchMd-B1dsuEY7.js";import"./User01-m6vclzYC.js";import"./differenceInSeconds-NQ4PDo0z.js";function be(){const e=V.c(58),s=q(),[a,M]=z.useState("");let N;e[0]!==a?(N=a.trim(),e[0]=a,e[1]=N):N=e[1];const r=Z(N,300),{data:R}=O.useSession(),P=R?.user?.id;let n;e[2]!==r?(n=J.deploymentAdminUsers(r),e[2]=r,e[3]=n):n=e[3];let l;e[4]!==r?(l=()=>{const i=new URLSearchParams({limit:"100"});return r&&i.set("searchValue",r),K(`/api/_admin/users?${i}`)},e[4]=r,e[5]=l):l=e[5];let y;e[6]!==n||e[7]!==l?(y={queryKey:n,queryFn:l},e[6]=n,e[7]=l,e[8]=y):y=e[8];const{data:k,isLoading:_,isError:A}=Y(y);let C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=ie,e[9]=C):C=e[9];let w;e[10]!==s?(w={mutationFn:re,onSuccess:C,onError:i=>{Q.error(i instanceof Error?i.message:s("admin.users.failedToImpersonate"))}},e[10]=s,e[11]=w):w=e[11];const E=$(w);let b;e[12]!==k?.users?(b=k?.users??[],e[12]=k?.users,e[13]=b):b=e[13];const B=b;let o;e[14]!==s?(o=s("admin.users.columnUser"),e[14]=s,e[15]=o):o=e[15];let m;e[16]!==s?(m=i=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(X,{url:i.image??void 0,fallback:se(i.name),shape:"circle",size:"sm"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.name||s("admin.users.unknown")}),t.jsx("div",{className:"text-sm text-muted-foreground truncate",children:i.email})]})]}),e[16]=s,e[17]=m):m=e[17];let d;e[18]!==o||e[19]!==m?(d={id:"user",header:o,render:m,cellClassName:"flex-1 min-w-0"},e[18]=o,e[19]=m,e[20]=d):d=e[20];let c;e[21]!==s?(c=s("admin.users.columnEmail"),e[21]=s,e[22]=c):c=e[22];let u;e[23]!==s?(u=i=>i.emailVerified?t.jsx(D,{variant:"outline",className:"text-success border-success/20",children:s("admin.users.verified")}):t.jsx(D,{variant:"outline",className:"text-muted-foreground",children:s("admin.users.unverified")}),e[23]=s,e[24]=u):u=e[24];let f;e[25]!==c||e[26]!==u?(f={id:"verified",header:c,render:u,cellClassName:"w-28 shrink-0"},e[25]=c,e[26]=u,e[27]=f):f=e[27];let p;e[28]!==s?(p=s("admin.users.columnCreated"),e[28]=s,e[29]=p):p=e[29];let h;e[30]!==p?(h={id:"created",header:p,render:te,cellClassName:"w-48 shrink-0"},e[30]=p,e[31]=h):h=e[31];let x;e[32]!==P||e[33]!==E||e[34]!==s?(x={id:"actions",header:"",render:i=>t.jsx(W,{variant:"outline",size:"sm",disabled:i.id===P||E.isPending,onClick:()=>E.mutate(i.id),children:s("admin.users.impersonate")}),cellClassName:"w-32 shrink-0"},e[32]=P,e[33]=E,e[34]=s,e[35]=x):x=e[35];let T;e[36]!==f||e[37]!==h||e[38]!==x||e[39]!==d?(T=[d,f,h,x],e[36]=f,e[37]=h,e[38]=x,e[39]=d,e[40]=T):T=e[40];const F=T;let j;e[41]!==s?(j=s("admin.users.searchPlaceholder"),e[41]=s,e[42]=j):j=e[42];let g;e[43]!==a||e[44]!==j?(g=t.jsx(H,{value:a,onChange:M,placeholder:j,className:"w-full md:w-[375px]"}),e[43]=a,e[44]=j,e[45]=g):g=e[45];let S;e[46]!==r||e[47]!==A||e[48]!==s?(S=A?t.jsx(L,{title:s("admin.users.failedToLoadTitle"),description:s("admin.users.failedToLoadDescription")}):t.jsx(L,{title:s("admin.users.noUsersFoundTitle"),description:r?s("admin.users.noUsersMatchSearch",{search:r}):s("admin.users.noUsersYet")}),e[46]=r,e[47]=A,e[48]=s,e[49]=S):S=e[49];let v;e[50]!==F||e[51]!==_||e[52]!==S||e[53]!==B?(v=t.jsx(G,{columns:F,data:B,isLoading:_,emptyState:S}),e[50]=F,e[51]=_,e[52]=S,e[53]=B,e[54]=v):v=e[54];let U;return e[55]!==g||e[56]!==v?(U=t.jsx(I,{children:t.jsx(I.Content,{children:t.jsx(I.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v]})})})}),e[55]=g,e[56]=v,e[57]=U):U=e[57],U}function te(e){return t.jsx("span",{className:"text-sm text-foreground",children:ee(e.createdAt)})}function ie(){window.location.href="/"}function re(e){return K("/api/_admin/impersonate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})})}export{be as default};
|
|
@@ -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-DTCr2n-a.js";import{w as vt,a7 as dt,aJ as yt}from"./agent-icon-vjhOL9u6.js";import{i as Tt}from"./ChevronRight-Cf-ty0tK.js";import{L as jt}from"./label-Di7XD03t.js";import{B as pt}from"./automation-runs-C7VPpqIt.js";import{S as wt}from"./switch-BAlslK2J.js";import{T as Nt,c as kt,a as Mt}from"./tooltip-Dt_WUeQs.js";import{V as _t}from"./view-mode-toggle-ChvR0gk0.js";import"./AlertCircle-DYa65h7M.js";import"./Tool01-BjJidQ3c.js";import"./ArrowUp-DaPuMC6J.js";import"./ArrowLeft-D0sSJGyh.js";import"./Tool02-Bs7nBBx_.js";import"./XCircle-3TmYYaVT.js";import"./ArrowUpRight-Dv9QvAW5.js";import"./TrendUp01-BQO_JaWi.js";import"./ZapSquare-8U0SgWLp.js";import"./Users03-a8f_wZmP.js";import"./CheckCircle-CiRCtOI3.js";import"./Check-ErA_74IV.js";import"./ChevronDown-Dgga4a4Q.js";import"./ChevronSelectorVertical-BS9Eaphx.js";import"./ChevronUp-DOEAI0tE.js";import"./DotsVertical-B9Mg1LjT.js";import"./Stars02-D7QMgn6_.js";import"./UserSquare-1p4hY8NI.js";import"./Copy01-C8DEngph.js";import"./CreditCard01-LLnESWWX.js";import"./Download01-CKTo0VS3.js";import"./Settings02-zoYBf2Q9.js";import"./Eye-C-IIbq0b.js";import"./FilterLines-BmuWDJhh.js";import"./Share07-KO4nWaTW.js";import"./Globe01-AGteY5p8.js";import"./Globe04-B6IxAzhj.js";import"./SwitchHorizontal01-ByrC3JZW.js";import"./HardDrive-Bxx1_cqg.js";import"./Key01-Du0R52Fs.js";import"./LayoutLeft-BKrrf1xY.js";import"./LinkExternal01-lwDudDKU.js";import"./LockUnlocked01-ChTbbG9p.js";import"./LogOut01-VHtvJ8Vp.js";import"./Monitor01-DA25Iq0R.js";import"./Sun-CH0lCvO4.js";import"./Palette-yngNVQ4n.js";import"./Play-CsQhzYUI.js";import"./Plus-Cf4b1bNp.js";import"./SearchLg-CIhGyLjl.js";import"./SearchMd-B1dsuEY7.js";import"./Shield01-EKP5VJCL.js";import"./Stars01-BgC1nyVS.js";import"./Trash01-C4UDDTjr.js";import"./Upload01-k3Mh0fZU.js";import"./User01-m6vclzYC.js";import"./Users01-CWeSTta9.js";import"./XClose-BO1_8YHD.js";import"./X-IBBjQPfk.js";import"./Zap-BUA1_Jut.js";import"./select-BRuvjhJw.js";import"./useInfiniteQuery-CMi-ILZI.js";import"./use-infinite-scroll-Dzm35RNS.js";import"./use-connection-D7--TeDa.js";import"./use-mcp-client-DFoPNyXR.js";import"./constants-BSYv1IkQ.js";import"./auth-CS2cT5wl.js";import"./use-virtual-mcp-BbdjNQ1e.js";import"./card-IdHCmi8B.js";import"./sidebar-Z1Ar8Iq1.js";import"./use-mobile-DxjazlC8.js";import"./table-_DZMZF7n.js";import"./empty-state-BHXPcV6D.js";import"./use-members-DpAa0K8W.js";import"./use-org-auth-client-CiGZ-xlx.js";import"./use-clock-tick-yZZNkqhy.js";import"./use-automations-BqX_0zG2.js";import"./studio-tools-BBCHIrbu.js";import"./useSuspenseInfiniteQuery-Cw5NEgMj.js";import"./avatar-md-XNPuR.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BGwAE5Xe.js";import"./dialog-B0pGkX2q.js";import"./tab-id-CYxMrTRp.js";import"./hooks-BasSX9U3.js";import"./decopilot-sse-pool-BbcmZgTF.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-Df1gS1sI.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-DwZngUHl.js";import"./use-decopilot-events-8dmobXlE.js";import"./use-organization-settings-kcm-WdX5.js";import"./monaco-editor-DgD9evL7.js";import"./spinner-glqojFDA.js";import"./types-Dh-L4V2P.js";import"./shell-layout-B7KEX529.js";import"./required-auth-layout-DgjkQLI6.js";import"./use-org-sso-CHwTj_pK.js";import"./integration-icon-9hdQMmio.js";import"./use-navigate-to-agent-CX93JJ-W.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-Dw43HBj2.js";import"./index-ZiQvvnOE.js";import"./form-Cb2ftegM.js";import"./input-7l72-E74.js";import"./file-type-icon-jL53noJP.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 Wt(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)+Wt(e)}function zt(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 Ut(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 Yt(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=Yt(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(Nt,{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 lr(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 N;t[14]!==r?(N=r("sandbox.variantCalendar.previous"),t[14]=r,t[15]=N):N=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]!==N?(k=s.jsx(nt,{variant:"ghost",size:"icon",className:"size-8",onClick:j,"aria-label":N,children:D}),t[17]=j,t[18]=N,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 w;t[31]!==A||t[32]!==_||t[33]!==T||t[34]!==k?(w=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]=w):w=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(wt,{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 W;t[45]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(yt,{}),t[45]=W):W=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:W,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 z;t[56]!==L||t[57]!==V?(z=s.jsxs("div",{className:"flex items-center gap-4",children:[L,V]}),t[56]=L,t[57]=V,t[58]=z):z=t[58];let U;t[59]!==w||t[60]!==z?(U=s.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[w,z]}),t[59]=w,t[60]=z,t[61]=U):U=t[61];let Y;t[62]!==x||t[63]!==a||t[64]!==d||t[65]!==l||t[66]!==u||t[67]!==i?(Y=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]=Y):Y=t[68];let q;return t[69]!==U||t[70]!==Y?(q=s.jsxs("div",{className:"flex h-full w-full flex-col",children:[U,Y]}),t[69]=U,t[70]=Y,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=zt(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=Ut(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(),N=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",N&&"bg-primary text-primary-foreground font-semibold"),children:p.getDate()})},y)}),b.map((p,y)=>{const T=ut(i,p.variant.blockKey),N=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:N,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 w=l.get(_.blockKey)??[];w.push(_),l.set(_.blockKey,w)}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=(_,w)=>G(o,w),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 N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${Q}, minmax(0, 1fr))`},t[7]=N):N=t[7];const D=x.map(ae);let k;t[8]!==D?(k=s.jsx("div",{className:"flex-1 grid",style:N,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[w,L]=_,H=ut(i,w),F=L[0]?.blockLabel??w;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,W)=>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})})()]})]},W))]},w)});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{lr as VariantCalendar};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as $,r as T,m as f,j as i}from"./index-DTCr2n-a.js";import{c as k,T as I,a as P}from"./tooltip-Dt_WUeQs.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function B(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:C,fullWidth:L,className:z}=E,_=C===void 0?"sm":C,b=L===void 0?!1:L;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const R=T.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=T.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),m=R.current[e];m&&S({left:m.offsetLeft,width:m.offsetWidth,opacity:1})},p=[s,o],t[2]=o,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),T.useEffect(g,p);const l=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-lg",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==l||t[9]!==b||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,m)=>{const j=i.jsxs("button",{ref:V=>{R.current[m]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label,className:f("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",b?"flex-1 h-12 px-4":e.label?f(l.buttonWithLabel,"px-3"):l.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",l.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=l,t[9]=b,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=b?"h-12":l.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{B as V};
|