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 ge,b as me,j as o,v as Ae,t as le,B as ne,F as De,o as Ie,a as Le,r as X,n as Te,K as de,e as Ee,p as V,G as Fe,m as ke}from"./index-DTCr2n-a.js";import{a as re,b as ye,D as ue,c as pe}from"./dropdown-menu-Dhjx8BUz.js";import{a as Ge}from"./Users03-a8f_wZmP.js";import{G as we,b as Me,a as Pe}from"./github-repo-picker-B0itW_sn.js";import{u as Oe,b as ze,c as Be}from"./use-virtual-mcp-BbdjNQ1e.js";import{P as ce}from"./index-mAaX9S9j.js";import{a as Ue}from"./DotsVertical-B9Mg1LjT.js";import{A as Re,f as fe,a_ as $e}from"./agent-icon-vjhOL9u6.js";import{a as He}from"./Settings02-zoYBf2Q9.js";import{s as Ve}from"./Trash01-C4UDDTjr.js";import{p as Ke,f as he}from"./pt-BR-CLy76QW2.js";import{c as Se}from"./use-navigate-to-agent-CX93JJ-W.js";import{f as qe,i as Qe}from"./use-organization-settings-kcm-WdX5.js";import{u as _e}from"./use-capability-U_kO9pjO.js";import{C as Je}from"./card-IdHCmi8B.js";import{E as Ye}from"./empty-state-BHXPcV6D.js";import{u as We}from"./use-create-virtual-mcp-B5mSvVFn.js";import{u as Xe}from"./use-connection-D7--TeDa.js";import{u as xe}from"./use-mcp-client-DFoPNyXR.js";import{S as Ze}from"./constants-BSYv1IkQ.js";import{p as et,a as je}from"./deco-site-production-url-BjY4ZYd-.js";import{g as tt,f as ot,b as st,G as it,p as nt}from"./provision-repo-scoped-github-connection-CMPWtdMv.js";import{e as rt,d as lt,a as at,b as ct,c as mt}from"./dialog-B0pGkX2q.js";import{i as dt}from"./ArrowLeft-D0sSJGyh.js";import{C as ut}from"./collection-search-BQLruUQ4.js";import{c as pt,d as gt,b as ft,f as ht,g as xt,e as jt,a as Ct,A as bt}from"./alert-dialog-BBUALe3i.js";import{S as Dt}from"./search-input-DsWKOK9t.js";import{s as Ce}from"./Plus-Cf4b1bNp.js";import"./Check-ErA_74IV.js";import"./ChevronRight-Cf-ty0tK.js";import"./use-debounced-value-UZPGD-zb.js";import"./authenticate-and-persist-oauth-CB658Lpc.js";import"./mcp-oauth-_naDcGdv.js";import"./auth-CS2cT5wl.js";import"./LinkExternal01-lwDudDKU.js";import"./LockUnlocked01-ChTbbG9p.js";import"./use-mcp-tools-ByMlhxuh.js";import"./extract-connection-data-DyM1tiNg.js";import"./metadata-dUsYcpuu.js";import"./sidebar-Z1Ar8Iq1.js";import"./LayoutLeft-BKrrf1xY.js";import"./use-mobile-DxjazlC8.js";import"./X-IBBjQPfk.js";import"./tooltip-Dt_WUeQs.js";import"./AlertCircle-DYa65h7M.js";import"./Tool01-BjJidQ3c.js";import"./ArrowUp-DaPuMC6J.js";import"./Tool02-Bs7nBBx_.js";import"./XCircle-3TmYYaVT.js";import"./ArrowUpRight-Dv9QvAW5.js";import"./TrendUp01-BQO_JaWi.js";import"./ZapSquare-8U0SgWLp.js";import"./CheckCircle-CiRCtOI3.js";import"./ChevronDown-Dgga4a4Q.js";import"./ChevronSelectorVertical-BS9Eaphx.js";import"./ChevronUp-DOEAI0tE.js";import"./Stars02-D7QMgn6_.js";import"./UserSquare-1p4hY8NI.js";import"./Copy01-C8DEngph.js";import"./CreditCard01-LLnESWWX.js";import"./Download01-CKTo0VS3.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"./LogOut01-VHtvJ8Vp.js";import"./Monitor01-DA25Iq0R.js";import"./Sun-CH0lCvO4.js";import"./Palette-yngNVQ4n.js";import"./Play-CsQhzYUI.js";import"./SearchLg-CIhGyLjl.js";import"./SearchMd-B1dsuEY7.js";import"./Shield01-EKP5VJCL.js";import"./Stars01-BgC1nyVS.js";import"./Upload01-k3Mh0fZU.js";import"./User01-m6vclzYC.js";import"./Users01-CWeSTta9.js";import"./XClose-BO1_8YHD.js";import"./Zap-BUA1_Jut.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./hooks-BasSX9U3.js";import"./decopilot-sse-pool-BbcmZgTF.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./studio-tools-BBCHIrbu.js";function be(t){const e=ge.c(28),{onCreateFromScratch:i,onImportGitHub:n,onImportDeco:r,isCreating:f,align:c,side:G,showBetaBadge:x}=t,M=c===void 0?"end":c,d=me();let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(Ge,{size:14}),e[0]=T):T=e[0];let m;e[1]!==d?(m=d("common.createAgentDropdown.createFromScratch"),e[1]=d,e[2]=m):m=e[2];let D;e[3]!==f||e[4]!==i||e[5]!==m?(D=o.jsxs(re,{disabled:f,onClick:i,children:[T,m]}),e[3]=f,e[4]=i,e[5]=m,e[6]=D):D=e[6];let j;e[7]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(we,{className:"size-3.5"}),e[7]=j):j=e[7];let y;e[8]!==d?(y=d("common.createAgentDropdown.importFromGitHub"),e[8]=d,e[9]=y):y=e[9];let a;e[10]!==x?(a=x&&o.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"}),e[10]=x,e[11]=a):a=e[11];let l;e[12]!==n||e[13]!==y||e[14]!==a?(l=o.jsxs(re,{onClick:n,children:[j,y,a]}),e[12]=n,e[13]=y,e[14]=a,e[15]=l):l=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),e[16]=h):h=e[16];let C;e[17]!==d?(C=d("common.createAgentDropdown.importFromDeco"),e[17]=d,e[18]=C):C=e[18];let w;e[19]!==r||e[20]!==C?(w=o.jsxs(re,{onClick:r,children:[h,C]}),e[19]=r,e[20]=C,e[21]=w):w=e[21];let u;return e[22]!==M||e[23]!==G||e[24]!==w||e[25]!==D||e[26]!==l?(u=o.jsxs(ye,{side:G,align:M,className:"w-48",children:[D,l,w]}),e[22]=M,e[23]=G,e[24]=w,e[25]=D,e[26]=l,e[27]=u):u=e[27],u}function yt(t){const e=ge.c(65),{project:i,lastUsedAt:n,onDeleteClick:r}=t,f=Se(),c=me(),[G]=Ae(),x=G.language==="pt-BR"?Ke:void 0,{mainAgentId:M}=qe(),d=Qe(),{granted:T}=_e("org:manage"),m=M===i.id;let D;e[0]!==m||e[1]!==i.id||e[2]!==i.title||e[3]!==d||e[4]!==c?(D=()=>{const I=m?null:i.id;d.mutate(I,{onSuccess:()=>le.success(m?c("home.projectCard.mainAgentUnset",{title:i.title}):c("home.projectCard.mainAgentSet",{title:i.title})),onError:()=>le.error(c("home.projectCard.mainAgentError"))})},e[0]=m,e[1]=i.id,e[2]=i.title,e[3]=d,e[4]=c,e[5]=D):D=e[5];const j=D;let y;e[6]!==f||e[7]!==i.id?(y=()=>f(i.id),e[6]=f,e[7]=i.id,e[8]=y):y=e[8];let a;e[9]!==i.title||e[10]!==y?(a=o.jsx("button",{type:"button",onClick:y,className:"absolute inset-0 z-0","aria-label":i.title}),e[9]=i.title,e[10]=y,e[11]=a):a=e[11];let l;e[12]!==i.icon||e[13]!==i.title?(l=o.jsx(Re,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),e[12]=i.icon,e[13]=i.title,e[14]=l):l=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(ue,{asChild:!0,children:o.jsx(ne,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:o.jsx(Ue,{size:20})})}),e[15]=h):h=e[15];let C;e[16]!==f||e[17]!==i.id?(C=()=>f(i.id,{search:{main:"settings"}}),e[16]=f,e[17]=i.id,e[18]=C):C=e[18];let w;e[19]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(He,{size:16}),e[19]=w):w=e[19];let u;e[20]!==C?(u=o.jsxs(re,{onClick:C,children:[w,"Settings"]}),e[20]=C,e[21]=u):u=e[21];let O;e[22]!==T||e[23]!==m||e[24]!==c||e[25]!==j?(O=T&&o.jsxs(re,{onClick:I=>{I.stopPropagation(),j()},children:[o.jsx(fe,{size:16}),c(m?"home.projectCard.unsetMainAgent":"home.projectCard.setAsMainAgent")]}),e[22]=T,e[23]=m,e[24]=c,e[25]=j,e[26]=O):O=e[26];let E;e[27]!==r?(E=r&&o.jsxs(re,{variant:"destructive",onClick:I=>{I.stopPropagation(),r(I)},children:[o.jsx(Ve,{size:16}),"Delete"]}),e[27]=r,e[28]=E):E=e[28];let z;e[29]!==E||e[30]!==u||e[31]!==O?(z=o.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:o.jsxs(pe,{children:[h,o.jsxs(ye,{align:"end",children:[u,O,E]})]})}),e[29]=E,e[30]=u,e[31]=O,e[32]=z):z=e[32];let S;e[33]!==z||e[34]!==l?(S=o.jsxs("div",{className:"flex items-start justify-between",children:[l,z]}),e[33]=z,e[34]=l,e[35]=S):S=e[35];let v;e[36]!==i.title?(v=o.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[36]=i.title,e[37]=v):v=e[37];let N;e[38]!==m||e[39]!==c?(N=m&&o.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground",children:[o.jsx(fe,{size:12}),c("home.projectCard.mainAgentBadge")]}),e[38]=m,e[39]=c,e[40]=N):N=e[40];let P;e[41]!==v||e[42]!==N?(P=o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[v,N]}),e[41]=v,e[42]=N,e[43]=P):P=e[43];const F=i.description||"No description";let s;e[44]!==F?(s=o.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:F}),e[44]=F,e[45]=s):s=e[45];let p;e[46]!==P||e[47]!==s?(p=o.jsxs("div",{className:"flex flex-col gap-1",children:[P,s]}),e[46]=P,e[47]=s,e[48]=p):p=e[48];let g;e[49]!==S||e[50]!==p?(g=o.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[S,p]}),e[49]=S,e[50]=p,e[51]=g):g=e[51];let b;e[52]!==n||e[53]!==x||e[54]!==i.updated_at||e[55]!==c?(b=n?c("home.projectCard.lastUsed",{time:he(new Date(n),{addSuffix:!0,locale:x})}):c("home.projectCard.updated",{time:he(new Date(i.updated_at),{addSuffix:!0,locale:x})}),e[52]=n,e[53]=x,e[54]=i.updated_at,e[55]=c,e[56]=b):b=e[56];let _;e[57]!==b?(_=o.jsx("div",{className:"border-t border-border mt-auto",children:o.jsx("div",{className:"h-10 flex items-center px-4.5",children:o.jsx("p",{className:"text-xs text-muted-foreground",children:b})})}),e[57]=b,e[58]=_):_=e[58];let A;e[59]!==g||e[60]!==_?(A=o.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[g,_]}),e[59]=g,e[60]=_,e[61]=A):A=e[61];let k;return e[62]!==A||e[63]!==a?(k=o.jsxs(Je,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[a,A]}),e[62]=A,e[63]=a,e[64]=k):k=e[64],k}const wt="deco-sites";function St(t){if(!t||typeof t!="object")return null;const e=t.github;if(!e||typeof e!="object")return null;const i=e.owner,n=e.repo;return typeof i!="string"||typeof n!="string"||i.length===0||n.length===0?null:{owner:i,repo:n}}function _t(t,e){const i=e?St(e):null,n=i?.owner??wt,r=i?.repo??t;return{owner:n,name:r,url:`https://github.com/${n}/${r}`}}function vt(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function ve(t,e,i){const n=await fetch(t,e),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error??`${i} (${n.status})`);return r}function Nt(t){return ve(`/api/${t}/deco-sites`,void 0,"Failed to load sites")}function At({open:t,onOpenChange:e,onBack:i}){const n=me(),{org:r}=De(),f=Se(),c=Ie(),{data:G}=Le.useSession(),[x,M]=X.useState(null),[d,T]=X.useState(null),[m,D]=X.useState(""),j=xe({connectionId:Ze,orgId:r.id,orgSlug:r.slug}),y=Xe({slug:"mcp-github"}),a=tt(y),l=Me({enabled:t&&a.length===0}),h=a.length===1?a[0]??null:d,C=a.length>1&&!h,w=xe({connectionId:h?.id??"",orgId:r.id,orgSlug:r.slug}),u=t&&a.length===0&&(l.status==="installing"||l.status==="authenticating"||l.status==="idle"),{data:O,isLoading:E,error:z}=Te({queryKey:de.decoSites(G?.user?.email),queryFn:()=>Nt(r.slug),enabled:t&&!!G?.user?.email,staleTime:6e4,retry:!1}),S=O?.sites??[],v=s=>{s||(M(null),T(null),D("")),e(s)},N=S.filter(s=>s.name.toLowerCase().includes(m.toLowerCase())||(s.domains?.[0]?.domain?.toLowerCase().includes(m.toLowerCase())??!1)),P=!x||N.some(s=>s.name===x),F=Ee({mutationFn:async s=>{if(!h)throw new Error(n("common.importFromDecoDialog.githubNotConnected"));V("deco_site_import_started",{site_name:s});const{installations:p}=await ot(B=>j.callTool(B),h.id),g=S.find(B=>B.name===s);if(!g)throw new Error(n("common.importFromDecoDialog.siteNoLongerAvailable"));const b=_t(s,g.metadata),_=st(p,b.owner);if(!_)throw new Error(n("common.importFromDecoDialog.installGithubApp",{owner:b.owner,installUrl:it}));let A=null,k=null,I=null;const J=async()=>{I&&await j.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:I}}).catch(()=>{}),k&&await j.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:k,force:!0}}).catch(()=>{}),A&&await j.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:A,force:!0}}).catch(()=>{})};try{const B=await ve(`/api/${r.slug}/deco-sites/connection`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:s})},n("common.importFromDecoDialog.failedToCreateConnection")),R=B.connId;if(!R)throw new Error(n("common.importFromDecoDialog.noConnectionId"));A=R;const{childConnectionId:$,reused:Y}=await nt({orgSlug:r.slug,sourceConnection:h,installationId:_.installationId,owner:b.owner,repo:b.name,githubCallTool:H=>w.callTool(H),selfCallTool:H=>j.callTool(H)});k=Y?null:$;const K=B.icon??null,Z=vt(s),W=s.toLowerCase(),q=et(je(g.domains)),Q=await j.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s,description:"Imported from deco.cx",pinned:!1,icon:K??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],siteSlug:W,previewServerUrl:q,productionUrl:q,githubRepo:{owner:b.owner,name:b.name,url:b.url,installationId:_.installationId,connectionId:$},ui:{banner:null,bannerColor:"#22C55E",icon:K,themeColor:"#22C55E",slug:Z,pinnedViews:[{connectionId:R,toolName:"get_monitor_data",label:"Monitor",icon:null}],layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:R},{connection_id:$}]}}}),U=Q.structuredContent??Q;if(!U.item?.id)throw new Error(n("common.importFromDecoDialog.failedToCreateAgent"));return I=U.item.id,{slug:Z,virtualMcpId:U.item.id,connId:R,item:U.item}}catch(B){throw await J(),B}},onSuccess:({slug:s,virtualMcpId:p,item:g})=>{V("deco_site_import_succeeded",{site_name:g.title,virtual_mcp_id:p,slug:s}),c.setQueryData(de.collectionItem(j,r.id,"","VIRTUAL_MCP",p),{item:g}),c.invalidateQueries({predicate:b=>{const _=b.queryKey;return _[1]===r.id&&_[3]==="collection"&&_[4]==="VIRTUAL_MCP"}}),c.invalidateQueries({queryKey:de.projects(r.id)}),le.success(n("common.importFromDecoDialog.importSuccess",{slug:s})),v(!1),localStorage.setItem(Fe.sidebarOpen(),JSON.stringify(!1)),f(p)},onError:s=>{V("deco_site_import_failed",{error:s instanceof Error?s.message:"Unknown error"}),le.error(n("common.importFromDecoDialog.importFailed",{error:(s instanceof Error?s.message:n("common.importFromDecoDialog.unknownError"))??""}))}});return o.jsx(rt,{open:t,onOpenChange:v,children:o.jsxs(lt,{className:"sm:max-w-[900px] p-0 gap-0 overflow-hidden",children:[o.jsx(at,{className:"sr-only",children:o.jsx(ct,{children:n("common.importFromDecoDialog.title")})}),o.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[i&&o.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":n("common.importFromDecoDialog.goBack"),children:o.jsx(dt,{size:18})}),o.jsx("span",{className:"text-sm font-medium text-foreground",children:n("common.importFromDecoDialog.title")})]}),o.jsx("div",{children:o.jsx(ut,{value:m,onChange:D,placeholder:n("common.importFromDecoDialog.searchPlaceholder"),onKeyDown:s=>{s.key==="Escape"&&D("")}})}),o.jsxs("div",{className:"pb-0 min-h-[300px]",children:[l.status==="error"&&o.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 h-48 px-8 text-center",children:[o.jsx("p",{className:"text-sm text-destructive",children:l.error??n("common.importFromDecoDialog.failedToConnectGithub")}),o.jsx(ne,{variant:"outline",size:"sm",onClick:l.retry,children:n("common.importFromDecoDialog.retryGithubSetup")})]}),u&&l.status!=="error"&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:n("common.importFromDecoDialog.settingUpGithub")}),C&&!u&&l.status!=="error"&&o.jsxs("div",{className:"flex flex-col py-2",children:[o.jsx("div",{className:"px-8 py-2",children:o.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:n("common.importFromDecoDialog.selectGithubConnection")})}),a.map(s=>o.jsxs("button",{type:"button",onClick:()=>T(s),className:"flex items-center gap-3 px-8 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?o.jsx("img",{src:s.icon,alt:s.title,className:"size-7 rounded-full shrink-0"}):o.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:o.jsx(we,{className:"size-3.5 text-muted-foreground"})}),o.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}),E&&!u&&l.status!=="error"&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:n("common.importFromDecoDialog.loadingSites")}),!E&&!u&&!C&&l.status!=="error"&&!z&&S.length===0&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:n("common.importFromDecoDialog.noSitesFound")}),!E&&!u&&!C&&l.status!=="error"&&S.length>0&&o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[N.length===0&&o.jsx("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:n("common.importFromDecoDialog.noSitesMatch",{search:m})}),N.map(s=>{const p=je(s.domains),g=x===s.name;return o.jsxs("button",{type:"button",onClick:()=>M(s.name),className:ke("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",g?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[o.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:s.thumb_url?o.jsx("img",{src:s.thumb_url,alt:s.name,className:"w-full h-full object-cover",loading:"lazy"}):o.jsx("div",{className:"w-full h-full bg-muted"})}),o.jsxs("div",{className:"px-4 py-3",children:[o.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.name}),p&&o.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:p})]})]},s.name)})]})]}),o.jsxs(mt,{className:"px-8 py-5 border-t border-border",children:[o.jsx(ne,{variant:"outline",onClick:()=>v(!1),disabled:F.isPending,children:n("common.importFromDecoDialog.cancel")}),o.jsx(ne,{disabled:!x||!P||F.isPending||E||u||C||!h||l.status==="error",onClick:()=>x&&F.mutate(x),children:F.isPending?n("common.importFromDecoDialog.importing"):n("common.importFromDecoDialog.import")})]})]})})}function ps(){const t=ge.c(77),e=me(),{org:i}=De(),n=Oe(),r=ze(),[f,c]=X.useState("");let G;t[0]===Symbol.for("react.memo_cache_sentinel")?(G={navigateOnCreate:!0},t[0]=G):G=t[0];const{createVirtualMCP:x,isCreating:M}=We(G),[d,T]=X.useState(null),[m,D]=X.useState(!1),[j,y]=X.useState(!1),{granted:a}=_e("agents:manage"),l=f.toLowerCase(),h=n.filter(L=>L.id!==i.id&&(L.title.toLowerCase().includes(l)||L.description?.toLowerCase().includes(l))),{data:C}=Be(h.map(It));let w;t[1]!==r||t[2]!==d||t[3]!==e?(w=async()=>{if(!d)return;const{id:L,title:Ne}=d;T(null);try{await r.delete.mutateAsync(L),V("agent_deleted",{agent_id:L,source:"agents_list"}),le.success(e("routes.agentsList.deletedAgent",{title:Ne}))}catch{}},t[1]=r,t[2]=d,t[3]=e,t[4]=w):w=t[4];const u=w,O=ce,E=ce,z=ce;let S;t[5]!==e?(S=e("routes.agentsList.title"),t[5]=e,t[6]=S):S=t[6];let v;t[7]!==S?(v=o.jsx(ce.Title,{children:S}),t[7]=S,t[8]=v):v=t[8];let N;t[9]!==e?(N=e("routes.agentsList.searchPlaceholder"),t[9]=e,t[10]=N):N=t[10];let P;t[11]===Symbol.for("react.memo_cache_sentinel")?(P=L=>{L.key==="Escape"&&(c(""),L.target.blur())},t[11]=P):P=t[11];let F;t[12]!==f||t[13]!==N?(F=o.jsx(Dt,{value:f,onChange:c,placeholder:N,className:"w-full md:w-[375px]",onKeyDown:P}),t[12]=f,t[13]=N,t[14]=F):F=t[14];let s;t[15]!==a||t[16]!==x||t[17]!==M||t[18]!==e?(s=a&&o.jsxs(pe,{children:[o.jsx(ue,{asChild:!0,children:o.jsxs(ne,{size:"sm",children:[o.jsx(Ce,{size:14}),e("routes.agentsList.createAgent")]})}),o.jsx(be,{onCreateFromScratch:()=>{V("agent_create_clicked",{source:"agents_list",method:"scratch"}),x()},onImportGitHub:()=>{V("agent_create_clicked",{source:"agents_list",method:"github"}),y(!0)},onImportDeco:()=>{V("agent_create_clicked",{source:"agents_list",method:"deco"}),D(!0)},isCreating:M,align:"end"})]}),t[15]=a,t[16]=x,t[17]=M,t[18]=e,t[19]=s):s=t[19];let p;t[20]!==F||t[21]!==s?(p=o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[F,s]}),t[20]=F,t[21]=s,t[22]=p):p=t[22];let g;t[23]!==p||t[24]!==v?(g=o.jsxs("div",{className:"flex flex-col gap-6",children:[v,p]}),t[23]=p,t[24]=v,t[25]=g):g=t[25];const b=h.length===0&&o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(Ye,{image:o.jsx($e,{size:48,className:"text-muted-foreground"}),title:e(f?"routes.agentsList.noAgentsFound":"routes.agentsList.noAgentsYet"),description:f?e("routes.agentsList.noAgentsMatchSearch",{search:f}):e(a?"routes.agentsList.createAgentToGetStarted":"routes.agentsList.askAdminToCreate"),actions:!f&&a&&o.jsxs(pe,{children:[o.jsx(ue,{asChild:!0,children:o.jsxs(ne,{size:"sm",children:[o.jsx(Ce,{size:14}),e("routes.agentsList.createAgent")]})}),o.jsx(be,{onCreateFromScratch:()=>{V("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),x()},onImportGitHub:()=>{V("agent_create_clicked",{source:"agents_list_empty",method:"github"}),y(!0)},onImportDeco:()=>{V("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),D(!0)},isCreating:M,align:"center",showBetaBadge:!0})]})})}),_=h.length>0&&o.jsxs("div",{className:"mt-6 @container",children:[o.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:e("routes.agentsList.agentsHeading")}),o.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:h.map(L=>o.jsx(yt,{project:L,lastUsedAt:C?.get(L.id)?.last_used_at,onDeleteClick:a?()=>T({id:L.id,title:L.title}):void 0},L.id))})]});let A;t[26]!==g||t[27]!==b||t[28]!==_||t[29]!==z.Body?(A=o.jsxs(z.Body,{children:[g,b,_]}),t[26]=g,t[27]=b,t[28]=_,t[29]=z.Body,t[30]=A):A=t[30];let k;t[31]!==A||t[32]!==E.Content?(k=o.jsx(E.Content,{children:A}),t[31]=A,t[32]=E.Content,t[33]=k):k=t[33];let I;t[34]!==j?(I=o.jsx(Pe,{open:j,onOpenChange:y}),t[34]=j,t[35]=I):I=t[35];let J;t[36]!==m?(J=o.jsx(At,{open:m,onOpenChange:D}),t[36]=m,t[37]=J):J=t[37];const B=!!d;let R;t[38]===Symbol.for("react.memo_cache_sentinel")?(R=L=>!L&&T(null),t[38]=R):R=t[38];let $;t[39]!==e?($=e("routes.agentsList.deleteAgentTitle"),t[39]=e,t[40]=$):$=t[40];let Y;t[41]!==$?(Y=o.jsx(pt,{children:$}),t[41]=$,t[42]=Y):Y=t[42];let K;t[43]!==e?(K=e("routes.agentsList.deleteAgentDescription"),t[43]=e,t[44]=K):K=t[44];const Z=d?.title;let W;t[45]!==Z?(W=o.jsx("span",{className:"font-medium text-foreground",children:Z}),t[45]=Z,t[46]=W):W=t[46];let q;t[47]!==K||t[48]!==W?(q=o.jsxs(gt,{children:[K," ",W,"."]}),t[47]=K,t[48]=W,t[49]=q):q=t[49];let Q;t[50]!==Y||t[51]!==q?(Q=o.jsxs(ft,{children:[Y,q]}),t[50]=Y,t[51]=q,t[52]=Q):Q=t[52];let U;t[53]!==e?(U=e("routes.agentsList.cancelButton"),t[53]=e,t[54]=U):U=t[54];let H;t[55]!==U?(H=o.jsx(ht,{children:U}),t[55]=U,t[56]=H):H=t[56];let ee;t[57]!==e?(ee=e("routes.agentsList.deleteButton"),t[57]=e,t[58]=ee):ee=t[58];let te;t[59]!==u||t[60]!==ee?(te=o.jsx(xt,{onClick:u,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:ee}),t[59]=u,t[60]=ee,t[61]=te):te=t[61];let oe;t[62]!==H||t[63]!==te?(oe=o.jsxs(jt,{children:[H,te]}),t[62]=H,t[63]=te,t[64]=oe):oe=t[64];let se;t[65]!==Q||t[66]!==oe?(se=o.jsxs(Ct,{children:[Q,oe]}),t[65]=Q,t[66]=oe,t[67]=se):se=t[67];let ie;t[68]!==B||t[69]!==se?(ie=o.jsx(bt,{open:B,onOpenChange:R,children:se}),t[68]=B,t[69]=se,t[70]=ie):ie=t[70];let ae;return t[71]!==O||t[72]!==k||t[73]!==I||t[74]!==J||t[75]!==ie?(ae=o.jsxs(O,{children:[k,I,J,ie]}),t[71]=O,t[72]=k,t[73]=I,t[74]=J,t[75]=ie,t[76]=ae):ae=t[76],ae}function It(t){return t.id}export{ps as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as Q,b as se,a0 as Ye,$ as We,r as G,j as s,a3 as xt,t as ee,at as Ze,cv as Xe,cw as ht,m as Ie,F as ye,K as J,n as De,B as X,k as Fe,o as Ne,e as re,v as Je,p as Ue,X as vt,Z as we,E as bt}from"./index-DTCr2n-a.js";import{i as yt}from"./AlertCircle-DYa65h7M.js";import{P as Ae}from"./index-mAaX9S9j.js";import{S as Se}from"./skeleton-BvZK-LJN.js";import{b as Te,a as be,S as Re,c as jt}from"./settings-section-BS9eoASN.js";import{S as St}from"./settings-subnav-D-pYtn7v.js";import{u as et,b as Pe,i as Nt,c as _t,p as Ct,d as Me,e as Pt,f as tt}from"./use-ai-providers-DwZngUHl.js";import{i as It}from"./CheckCircle-CiRCtOI3.js";import{c as kt,S as Dt,k as Kt}from"./use-organization-settings-kcm-WdX5.js";import{c as wt,u as Be,d as st,P as At,C as ze}from"./select-model-Dqz5FPx4.js";import{u as Et}from"./use-debounced-autosave-BDvfPMkV.js";import{i as He}from"./CreditCard01-LLnESWWX.js";import{B as Ee}from"./badge-BR2WgVsV.js";import{u as le}from"./studio-tools-BBCHIrbu.js";import{u as Tt}from"./use-capability-U_kO9pjO.js";import{I as je}from"./input-7l72-E74.js";import{a as Le,T as Rt}from"./toggle-group-Do3gb8uy.js";import{c as it,d as lt,b as rt,f as nt,g as ot,e as at,a as ct,A as dt}from"./alert-dialog-BBUALe3i.js";import{s as Mt}from"./Plus-Cf4b1bNp.js";import{p as Ot,f as $t}from"./pt-BR-CLy76QW2.js";import{b as Ft}from"./Tool01-BjJidQ3c.js";import{s as Ut}from"./Trash01-C4UDDTjr.js";import{A as Bt}from"./avatar-md-XNPuR.js";import{P as zt}from"./ai-providers-logos-DD3qZ33J.js";import{i as Ht}from"./Settings02-zoYBf2Q9.js";import{s as Lt}from"./Eye-C-IIbq0b.js";import{b as qt,a as Vt,d as Qt,e as Gt,c as Yt}from"./dialog-B0pGkX2q.js";import{S as Wt}from"./spinner-glqojFDA.js";import{R as Zt}from"./require-capability-BganaMDA.js";import"./sidebar-Z1Ar8Iq1.js";import"./LayoutLeft-BKrrf1xY.js";import"./use-mobile-DxjazlC8.js";import"./X-IBBjQPfk.js";import"./tooltip-Dt_WUeQs.js";import"./card-IdHCmi8B.js";import"./ArrowUpRight-Dv9QvAW5.js";import"./useRouterState-B0WmwZ8z.js";import"./use-settings-tabs-qdqtthwY.js";import"./constants-BSYv1IkQ.js";import"./drawer-9chetton.js";import"./chat-context-Df1gS1sI.js";import"./tab-id-CYxMrTRp.js";import"./Check-ErA_74IV.js";import"./Copy01-C8DEngph.js";import"./Download01-CKTo0VS3.js";import"./hooks-BasSX9U3.js";import"./use-mcp-client-DFoPNyXR.js";import"./auth-CS2cT5wl.js";import"./decopilot-sse-pool-BbcmZgTF.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-BbdjNQ1e.js";import"./use-decopilot-events-8dmobXlE.js";import"./checkbox-CNnFytxt.js";import"./select-BRuvjhJw.js";import"./ChevronDown-Dgga4a4Q.js";import"./ChevronUp-DOEAI0tE.js";import"./ArrowLeft-D0sSJGyh.js";import"./ChevronSelectorVertical-BS9Eaphx.js";import"./Key01-Du0R52Fs.js";import"./SearchMd-B1dsuEY7.js";import"./Monitor01-DA25Iq0R.js";import"./ChevronRight-Cf-ty0tK.js";import"./Stars01-BgC1nyVS.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./User01-m6vclzYC.js";import"./access-gate-D3zAqPzH.js";import"./capability-load-error-BornUXv-.js";const Xt=e=>e.capabilities?.includes("image")===!0,Jt=e=>Nt(e),es=e=>_t(e),ts=[{key:"fast",filter:void 0},{key:"smart",filter:void 0},{key:"thinking",filter:void 0},{key:"image",filter:Xt},{key:"web_search",filter:Jt},{key:"deep_research",filter:es}];function ss(e){const t=Q.c(30),{slot:i,onSlotChange:r,filterModels:n,defaultKeyId:a}=e,c=et(),l=c.some(b=>b.id===i?.keyId)?i?.keyId:null,[d,h]=G.useState(l??a);let C,o;t[0]!==l?(C=()=>{l&&h(l)},o=[l],t[0]=l,t[1]=C,t[2]=o):(C=t[1],o=t[2]),G.useEffect(C,o);let u;t[3]!==c||t[4]!==a||t[5]!==d?(u=c.some(b=>b.id===d)?d:a,t[3]=c,t[4]=a,t[5]=d,t[6]=u):u=t[6];const f=u;let p;t[7]!==f||t[8]!==c?(p=f?c.find(b=>b.id===f):null,t[7]=f,t[8]=c,t[9]=p):p=t[9];const y=p,{models:j,isLoading:P}=Pe(n?f??void 0:void 0),x=n?P||j.some(n):!0;let _;t[10]!==i||t[11]!==y?.providerId||t[12]!==l?(_=i&&l?{modelId:i.modelId,title:i.title??i.modelId,keyId:i.keyId,providerId:y?.providerId??"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,t[10]=i,t[11]=y?.providerId,t[12]=l,t[13]=_):_=t[13];const k=_,g=se();if(n&&!x){let b;t[14]!==g?(b=g("settings.simpleModeSection.notAvailableWithCurrentProvider"),t[14]=g,t[15]=b):b=t[15];let D;return t[16]!==b?(D=s.jsx("p",{className:"text-xs text-muted-foreground italic",children:b}),t[16]=b,t[17]=D):D=t[17],D}let v;t[18]!==g?(v=g("settings.simpleModeSection.pickModel"),t[18]=g,t[19]=v):v=t[19];let S;t[20]===Symbol.for("react.memo_cache_sentinel")?(S=b=>h(b),t[20]=S):S=t[20];let m;t[21]!==f||t[22]!==r?(m=b=>{const D=b.keyId??f??"";h(D),r({keyId:D,modelId:b.modelId,title:b.title})},t[21]=f,t[22]=r,t[23]=m):m=t[23];let N;return t[24]!==f||t[25]!==n||t[26]!==k||t[27]!==v||t[28]!==m?(N=s.jsx(wt,{variant:"bordered",placeholder:v,model:k,credentialId:f,filterModels:n,onCredentialChange:S,onModelChange:m}),t[24]=f,t[25]=n,t[26]=k,t[27]=v,t[28]=m,t[29]=N):N=t[29],N}function is(e){const t=Q.c(10),{isPending:i,showSaved:r}=e,n=se();if(i){let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Ze,{size:12,className:"animate-spin"}),t[0]=a):a=t[0];let c;t[1]!==n?(c=n("settings.simpleModeSection.saving"),t[1]=n,t[2]=c):c=t[2];let l;return t[3]!==c?(l=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[a,c]}),t[3]=c,t[4]=l):l=t[4],l}if(r){let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(It,{size:12}),t[5]=a):a=t[5];let c;t[6]!==n?(c=n("settings.simpleModeSection.saved"),t[6]=n,t[7]=c):c=t[7];let l;return t[8]!==c?(l=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[a,c]}),t[8]=c,t[9]=l):l=t[9],l}return null}function ls(){const e=Q.c(58),t=se(),i=et(),r=kt(),n=i.length>0;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=Ye(Dt),e[0]=a):a=e[0];let c;e[1]!==r?(c={resolver:a,values:r,mode:"onChange"},e[1]=r,e[2]=c):c=e[2];const l=We(c),{mutate:d,isPending:h,isSuccess:C}=Kt(),o=l.formState.isDirty;let u;e[3]!==l||e[4]!==r||e[5]!==t||e[6]!==d?(u={delayMs:250,save:async()=>{const I=l.getValues();d(I,{onSuccess:()=>l.reset(I,{keepValues:!0}),onError:E=>{l.reset(r),ee.error(t("settings.simpleModeSection.failedToSave",{error:E.message}))}})}},e[3]=l,e[4]=r,e[5]=t,e[6]=d,e[7]=u):u=e[7];const{schedule:f}=Et(u),p=i[0],y=i[1],j=i[2],{models:P}=Pe(p?.id),{models:x}=Pe(y?.id),{models:_}=Pe(j?.id);let k,g;e[8]!==l||e[9]!==n?(k=()=>{n||l.reset({tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}})},g=[n,l],e[8]=l,e[9]=n,e[10]=k,e[11]=g):(k=e[10],g=e[11]),G.useEffect(k,g);let v;e[12]!==i||e[13]!==l||e[14]!==p||e[15]!==y||e[16]!==j||e[17]!==P||e[18]!==x||e[19]!==_?(v=()=>{const I=l.getValues(),E=new Set(i.map(rs)),O={};p?.id&&(O[p.id]=P),y?.id&&(O[y.id]=x),j?.id&&(O[j.id]=_);const R=Y=>Y!=null&&!E.has(Y.keyId),K={fast:R(I.tiers.fast)?null:I.tiers.fast,smart:R(I.tiers.smart)?null:I.tiers.smart,thinking:R(I.tiers.thinking)?null:I.tiers.thinking,image:R(I.tiers.image)?null:I.tiers.image,web_search:R(I.tiers.web_search)?null:I.tiers.web_search,deep_research:R(I.tiers.deep_research)?null:I.tiers.deep_research},W=!K.fast||!K.smart||!K.thinking||!K.image||!K.web_search||!K.deep_research,Z=K.fast===I.tiers.fast&&K.smart===I.tiers.smart&&K.thinking===I.tiers.thinking&&K.image===I.tiers.image&&K.web_search===I.tiers.web_search&&K.deep_research===I.tiers.deep_research;if(!W&&Z)return;const V=Ct(i,O);l.reset({tiers:{fast:K.fast??V.chat.fast,smart:K.smart??V.chat.smart,thinking:K.thinking??V.chat.thinking,image:K.image??V.image,web_search:K.web_search??V.webSearch,deep_research:K.deep_research??V.deepResearch}},{keepDirty:!0})},e[12]=i,e[13]=l,e[14]=p,e[15]=y,e[16]=j,e[17]=P,e[18]=x,e[19]=_,e[20]=v):v=e[20];const S=p?.id,m=y?.id,N=j?.id;let b;e[21]!==i||e[22]!==l||e[23]!==P||e[24]!==x||e[25]!==_||e[26]!==S||e[27]!==m||e[28]!==N?(b=[l,i,P,x,_,S,m,N],e[21]=i,e[22]=l,e[23]=P,e[24]=x,e[25]=_,e[26]=S,e[27]=m,e[28]=N,e[29]=b):b=e[29],G.useEffect(v,b);let D;e[30]!==t?(D=I=>({fast:t("settings.simpleModeSection.tierFast"),smart:t("settings.simpleModeSection.tierSmart"),thinking:t("settings.simpleModeSection.tierThinking"),image:t("settings.simpleModeSection.tierImage"),web_search:t("settings.simpleModeSection.tierWebSearch"),deep_research:t("settings.simpleModeSection.tierDeepResearch")})[I]||I,e[30]=t,e[31]=D):D=e[31];const w=D;let A;e[32]!==t?(A=I=>({fast:t("settings.simpleModeSection.tierFastDesc"),smart:t("settings.simpleModeSection.tierSmartDesc"),thinking:t("settings.simpleModeSection.tierThinkingDesc"),image:t("settings.simpleModeSection.tierImageDesc"),web_search:t("settings.simpleModeSection.tierWebSearchDesc"),deep_research:t("settings.simpleModeSection.tierDeepResearchDesc")})[I]||"",e[32]=t,e[33]=A):A=e[33];const M=A;let T;e[34]!==t?(T=t("settings.simpleModeSection.defaultModels"),e[34]=t,e[35]=T):T=e[35];let $;e[36]!==t?($=t("settings.simpleModeSection.modelsPowerDescription"),e[36]=t,e[37]=$):$=e[37];let H;e[38]!==$?(H=s.jsx("p",{className:"text-sm text-muted-foreground",children:$}),e[38]=$,e[39]=H):H=e[39];const q=C&&!o;let F;e[40]!==h||e[41]!==q?(F=s.jsx(is,{isPending:h,showSaved:q}),e[40]=h,e[41]=q,e[42]=F):F=e[42];let U;e[43]!==H||e[44]!==F?(U=s.jsxs("div",{className:"flex items-center justify-between -mt-2 mb-2",children:[H,F]}),e[43]=H,e[44]=F,e[45]=U):U=e[45];let B;e[46]!==i[0]?.id||e[47]!==l.control||e[48]!==M||e[49]!==w||e[50]!==f?(B=ts.map(I=>s.jsx(xt,{control:l.control,name:`tiers.${I.key}`,render:E=>{const{field:O}=E;return s.jsx(Te,{title:w(I.key),description:M(I.key),action:s.jsx(ss,{slot:O.value,defaultKeyId:i[0]?.id??null,filterModels:I.filter,onSlotChange:R=>{O.onChange(R),f()}})})}},I.key)),e[46]=i[0]?.id,e[47]=l.control,e[48]=M,e[49]=w,e[50]=f,e[51]=B):B=e[51];let z;e[52]!==B?(z=s.jsx(be,{children:B}),e[52]=B,e[53]=z):z=e[53];let L;return e[54]!==T||e[55]!==U||e[56]!==z?(L=s.jsxs(Re,{title:T,headerClassName:"pl-0",children:[U,z]}),e[54]=T,e[55]=U,e[56]=z,e[57]=L):L=e[57],L}function rs(e){return e.id}var Oe="Progress",$e=100,[ns]=ht(Oe),[os,as]=ns(Oe),mt=G.forwardRef((e,t)=>{const{__scopeProgress:i,value:r=null,max:n,getValueLabel:a=cs,...c}=e;(n||n===0)&&!qe(n)&&console.error(ds(`${n}`,"Progress"));const l=qe(n)?n:$e;r!==null&&!Ve(r,l)&&console.error(ms(`${r}`,"Progress"));const d=Ve(r,l)?r:null,h=ke(d)?a(d,l):void 0;return s.jsx(os,{scope:i,value:d,max:l,children:s.jsx(Xe.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":ke(d)?d:void 0,"aria-valuetext":h,role:"progressbar","data-state":pt(d,l),"data-value":d??void 0,"data-max":l,...c,ref:t})})});mt.displayName=Oe;var ut="ProgressIndicator",ft=G.forwardRef((e,t)=>{const{__scopeProgress:i,...r}=e,n=as(ut,i);return s.jsx(Xe.div,{"data-state":pt(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...r,ref:t})});ft.displayName=ut;function cs(e,t){return`${Math.round(e/t*100)}%`}function pt(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function ke(e){return typeof e=="number"}function qe(e){return ke(e)&&!isNaN(e)&&e>0}function Ve(e,t){return ke(e)&&!isNaN(e)&&e<=t&&e>=0}function ds(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${$e}\`.`}function ms(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
2
|
-
- a positive number
|
|
3
|
-
- less than the value passed to \`max\` (or ${$e} if no \`max\` prop is set)
|
|
4
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
5
|
-
|
|
6
|
-
Defaulting to \`null\`.`}var us=mt,fs=ft;function ps(e){const t=Q.c(12);let i,r,n;t[0]!==e?({className:i,value:n,...r}=e,t[0]=e,t[1]=i,t[2]=r,t[3]=n):(i=t[1],r=t[2],n=t[3]);let a;t[4]!==i?(a=Ie("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",i),t[4]=i,t[5]=a):a=t[5];const c=`translateX(-${100-(n||0)}%)`;let l;t[6]!==c?(l=s.jsx(fs,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:c}}),t[6]=c,t[7]=l):l=t[7];let d;return t[8]!==r||t[9]!==a||t[10]!==l?(d=s.jsx(us,{"data-slot":"progress",className:a,...r,children:l}),t[8]=r,t[9]=a,t[10]=l,t[11]=d):d=t[11],d}const gs=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",year:"numeric"});function xs(e){const t=Q.c(12),{billingStatus:i,subscribed:r,t:n}=e;if(r&&i==="past_due"){let l;t[0]!==n?(l=n("settings.billing.statusPastDue"),t[0]=n,t[1]=l):l=t[1];let d;return t[2]!==l?(d=s.jsx(Ee,{variant:"warning",children:l}),t[2]=l,t[3]=d):d=t[3],d}if(r){let l;t[4]!==n?(l=n("settings.billing.statusActive"),t[4]=n,t[5]=l):l=t[5];let d;return t[6]!==l?(d=s.jsx(Ee,{variant:"success",children:l}),t[6]=l,t[7]=d):d=t[7],d}let a;t[8]!==n?(a=n("settings.billing.statusTrial"),t[8]=n,t[9]=a):a=t[9];let c;return t[10]!==a?(c=s.jsx(Ee,{variant:"secondary",children:a}),t[10]=a,t[11]=c):c=t[11],c}function hs(){const e=Q.c(78),t=se(),{org:i}=ye(),r=le(),n=Be("ORGANIZATION_BILLING_CHECKOUT_START","settings.billing.checkoutError"),a=Be("ORGANIZATION_BILLING_PORTAL","settings.billing.portalError");let c;e[0]!==i.id?(c=J.organizationTaskQuota(i.id),e[0]=i.id,e[1]=c):c=e[1];let l;e[2]!==r?(l=()=>r.call("ORGANIZATION_TASK_QUOTA_GET",{}),e[2]=r,e[3]=l):l=e[3];let d;e[4]!==c||e[5]!==l?(d={queryKey:c,queryFn:l},e[4]=c,e[5]=l,e[6]=d):d=e[6];const{data:h,isLoading:C}=De(d);if(C){let E;return e[7]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(be,{children:s.jsxs("div",{className:"flex flex-col gap-3 px-4 py-4",children:[s.jsx(Se,{className:"h-4 w-40"}),s.jsx(Se,{className:"h-2 w-full"})]})}),e[7]=E):E=e[7],E}if(!h||!h.enforced){let E;e[8]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(He,{size:16}),e[8]=E):E=e[8];let O;e[9]!==t?(O=t("settings.billing.autoTasksTitle"),e[9]=t,e[10]=O):O=e[10];let R;e[11]!==t?(R=t("settings.billing.unlimitedDescription"),e[11]=t,e[12]=R):R=e[12];let K;return e[13]!==O||e[14]!==R?(K=s.jsx(be,{children:s.jsx(Te,{icon:E,title:O,description:R})}),e[13]=O,e[14]=R,e[15]=K):K=e[15],K}const{billingStatus:o,subscribed:u,hasBillingAccount:f,used:p,limit:y}=h,j=y>0?Math.min(100,p/y*100):0,P=p>=y;let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"size-9 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:s.jsx(He,{size:16})}),e[16]=x):x=e[16];let _;e[17]!==t?(_=t("settings.billing.autoTasksTitle"),e[17]=t,e[18]=_):_=e[18];let k;e[19]!==_?(k=s.jsx("span",{className:"text-sm font-medium text-foreground",children:_}),e[19]=_,e[20]=k):k=e[20];let g;e[21]!==o||e[22]!==u||e[23]!==t?(g=s.jsx(xs,{billingStatus:o,subscribed:u,t}),e[21]=o,e[22]=u,e[23]=t,e[24]=g):g=e[24];let v;e[25]!==k||e[26]!==g?(v=s.jsxs("div",{className:"flex items-center gap-2",children:[k,g]}),e[25]=k,e[26]=g,e[27]=v):v=e[27];let S;e[28]!==u||e[29]!==t?(S=t(u?"settings.billing.autoTasksDescriptionSubscribed":"settings.billing.autoTasksDescriptionTrial"),e[28]=u,e[29]=t,e[30]=S):S=e[30];let m;e[31]!==S?(m=s.jsx("p",{className:"text-xs text-muted-foreground",children:S}),e[31]=S,e[32]=m):m=e[32];let N;e[33]!==v||e[34]!==m?(N=s.jsxs("div",{className:"flex items-center gap-3",children:[x,s.jsxs("div",{className:"flex flex-col gap-1",children:[v,m]})]}),e[33]=v,e[34]=m,e[35]=N):N=e[35];let b;e[36]!==f||e[37]!==a||e[38]!==t?(b=f&&s.jsxs(X,{variant:"outline",size:"sm",disabled:a.isPending,onClick:()=>a.mutate(),children:[a.isPending&&s.jsx(Fe,{size:14,className:"animate-spin"}),t("settings.billing.manageButton")]}),e[36]=f,e[37]=a,e[38]=t,e[39]=b):b=e[39];let D;e[40]!==n||e[41]!==u||e[42]!==t?(D=!u&&s.jsxs(X,{size:"sm",disabled:n.isPending,onClick:()=>n.mutate(),children:[n.isPending&&s.jsx(Fe,{size:14,className:"animate-spin"}),t("settings.billing.subscribeButton")]}),e[40]=n,e[41]=u,e[42]=t,e[43]=D):D=e[43];let w;e[44]!==b||e[45]!==D?(w=s.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[b,D]}),e[44]=b,e[45]=D,e[46]=w):w=e[46];let A;e[47]!==N||e[48]!==w?(A=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[N,w]}),e[47]=N,e[48]=w,e[49]=A):A=e[49];const M=P?"text-warning":"text-foreground";let T;e[50]!==M?(T=Ie("text-2xl font-semibold tabular-nums tracking-tight",M),e[50]=M,e[51]=T):T=e[51];let $;e[52]!==y?($=s.jsxs("span",{className:"text-sm font-normal text-muted-foreground",children:[" ","/ ",y]}),e[52]=y,e[53]=$):$=e[53];let H;e[54]!==T||e[55]!==$||e[56]!==p?(H=s.jsxs("span",{className:T,children:[p,$]}),e[54]=T,e[55]=$,e[56]=p,e[57]=H):H=e[57];let q;e[58]!==h.currentPeriodEnd||e[59]!==u||e[60]!==t?(q=u&&h.currentPeriodEnd&&s.jsx("span",{className:"text-xs text-muted-foreground",children:t("settings.billing.renewsOn",{date:gs.format(new Date(h.currentPeriodEnd))})}),e[58]=h.currentPeriodEnd,e[59]=u,e[60]=t,e[61]=q):q=e[61];let F;e[62]!==H||e[63]!==q?(F=s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[H,q]}),e[62]=H,e[63]=q,e[64]=F):F=e[64];let U;e[65]!==t?(U=t("settings.billing.runsUsedLabel"),e[65]=t,e[66]=U):U=e[66];let B;e[67]!==U?(B=s.jsx("p",{className:"text-xs text-muted-foreground",children:U}),e[67]=U,e[68]=B):B=e[68];let z;e[69]!==j?(z=s.jsx(ps,{value:j,className:"h-1.5"}),e[69]=j,e[70]=z):z=e[70];let L;e[71]!==F||e[72]!==B||e[73]!==z?(L=s.jsxs("div",{className:"flex flex-col gap-2.5 pt-4 border-t border-border/60",children:[F,B,z]}),e[71]=F,e[72]=B,e[73]=z,e[74]=L):L=e[74];let I;return e[75]!==A||e[76]!==L?(I=s.jsx(be,{children:s.jsxs("div",{className:"flex flex-col gap-5 px-5 py-5",children:[A,L]})}),e[75]=A,e[76]=L,e[77]=I):I=e[77],I}function Qe(){const e=Q.c(1),{granted:t}=Tt("members:manage");if(!t)return null;let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(hs,{}),e[0]=i):i=e[0],i}const vs={usd:[10,20,100],brl:[50,100,500]};function bs(){const e=Q.c(30),t=se(),i=le(),[r]=Je(),[n,a]=G.useState(!1);let c;e[0]!==t?(c=m=>{ee.error(t("settings.decoCreditsHero.topUpFailed",{message:m.message}))},e[0]=t,e[1]=c):c=e[1];const{mutate:l,isPending:d}=re({mutationFn:async m=>{const{url:N}=await i.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:m,currency:f});return N},onSuccess:ys,onError:c}),[h,C]=G.useState(""),[o,u]=G.useState(r.language==="pt-BR"?"brl":"usd"),f=o,p=parseFloat(h),y=!isNaN(p)&&p>=1,j=f==="brl"?"R$":"$";let P;e[2]!==u?(P=m=>{m&&u(m)},e[2]=u,e[3]=P):P=e[3];let x,_;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Le,{value:"usd",className:"px-3.5 text-sm",children:"USD"}),_=s.jsx(Le,{value:"brl",className:"px-3.5 text-sm",children:"BRL"}),e[4]=x,e[5]=_):(x=e[4],_=e[5]);let k;e[6]!==f||e[7]!==P?(k=s.jsxs(Rt,{type:"single",variant:"outline",size:"default",value:f,onValueChange:P,children:[x,_]}),e[6]=f,e[7]=P,e[8]=k):k=e[8];let g;e[9]!==f||e[10]!==j||e[11]!==n||e[12]!==d||e[13]!==t||e[14]!==l?(g=!n&&s.jsxs(s.Fragment,{children:[vs[f].map(m=>s.jsxs(X,{variant:"outline",className:"h-10 px-4 text-sm font-medium tabular-nums",disabled:d,onClick:()=>l(m*100),children:[j,m]},m)),s.jsx(X,{variant:"ghost",className:"h-10 px-4 text-sm text-muted-foreground",onClick:()=>a(!0),disabled:d,children:t("settings.decoCreditsHero.custom")})]}),e[9]=f,e[10]=j,e[11]=n,e[12]=d,e[13]=t,e[14]=l,e[15]=g):g=e[15];let v;e[16]!==j||e[17]!==h||e[18]!==p||e[19]!==n||e[20]!==y||e[21]!==d||e[22]!==C||e[23]!==t||e[24]!==l?(v=n&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:j}),s.jsx(je,{type:"number",min:"1",step:"1",placeholder:t("settings.decoCreditsHero.amountPlaceholder"),value:h,onChange:m=>C(m.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),s.jsx(X,{className:"h-10",disabled:!y||d,onClick:()=>l(Math.round(p*100)),children:d?"...":t("settings.decoCreditsHero.add")}),s.jsx(X,{variant:"ghost",className:"h-10 text-sm text-muted-foreground",onClick:()=>{a(!1),C("")},children:t("settings.decoCreditsHero.cancel")})]}),e[16]=j,e[17]=h,e[18]=p,e[19]=n,e[20]=y,e[21]=d,e[22]=C,e[23]=t,e[24]=l,e[25]=v):v=e[25];let S;return e[26]!==k||e[27]!==g||e[28]!==v?(S=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[k,g,v]})}),e[26]=k,e[27]=g,e[28]=v,e[29]=S):S=e[29],S}function ys(e){e&&window.open(e,"_blank","noopener,noreferrer")}function js(e){return e<=0?"text-destructive":e<=1?"text-warning":"text-foreground"}function Ss(){const e=Q.c(121),t=se(),{org:i}=ye(),r=le(),n=Ne(),a=Me();let c;e[0]!==a?(c=a.find(Ns),e[0]=a,e[1]=c):c=e[1];const l=c,[d,h]=G.useState(!1);let C;e[2]!==l||e[3]!==r?(C=async()=>{l&&await r.call("AI_PROVIDER_KEY_DELETE",{keyId:l.id})},e[2]=l,e[3]=r,e[4]=C):C=e[4];let o;e[5]!==i.id||e[6]!==n||e[7]!==t?(o=()=>{n.invalidateQueries({queryKey:J.aiProviderKeys(i.id)}),n.invalidateQueries({queryKey:J.aiProviders(i.id)}),ee.success(t("settings.decoCreditsHero.disconnectSuccess")),h(!1)},e[5]=i.id,e[6]=n,e[7]=t,e[8]=o):o=e[8];let u;e[9]!==t?(u=gt=>{ee.error(t("settings.decoCreditsHero.disconnectError",{message:gt.message}))},e[9]=t,e[10]=u):u=e[10];let f;e[11]!==C||e[12]!==o||e[13]!==u?(f={mutationFn:C,onSuccess:o,onError:u},e[11]=C,e[12]=o,e[13]=u,e[14]=f):f=e[14];const{mutate:p,isPending:y}=re(f);let j;e[15]!==i.id?(j=J.aiProviderCredits(i.id,"deco"),e[15]=i.id,e[16]=j):j=e[16];const P=!!l;let x;e[17]!==r?(x=async()=>{try{return await r.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},e[17]=r,e[18]=x):x=e[18];let _;e[19]!==j||e[20]!==P||e[21]!==x?(_={queryKey:j,enabled:P,staleTime:6e4,queryFn:x},e[19]=j,e[20]=P,e[21]=x,e[22]=_):_=e[22];const{data:k,isLoading:g,refetch:v,isFetching:S}=De(_);if(!l)return null;const m=k?.balanceCents!=null?k.balanceCents/100:null;let N;e[23]!==m?(N=m!=null?`$${m.toFixed(2)}`:"—",e[23]=m,e[24]=N):N=e[24];const b=N;let D;e[25]!==t?(D=t("settings.decoCreditsHero.title"),e[25]=t,e[26]=D):D=e[26];let w;e[27]!==t?(w=t("settings.decoCreditsHero.decoAiGatewayAlt"),e[27]=t,e[28]=w):w=e[28];let A;e[29]!==w?(A=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:w,className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),e[29]=w,e[30]=A):A=e[30];let M;e[31]!==t?(M=t("settings.decoCreditsHero.accessModels"),e[31]=t,e[32]=M):M=e[32];let T;e[33]!==M?(T=s.jsx("div",{children:s.jsx("p",{className:"text-xs text-muted-foreground",children:M})}),e[33]=M,e[34]=T):T=e[34];let $;e[35]!==A||e[36]!==T?($=s.jsxs("div",{className:"flex items-center gap-3",children:[A,T]}),e[35]=A,e[36]=T,e[37]=$):$=e[37];let H;e[38]===Symbol.for("react.memo_cache_sentinel")?(H=()=>h(!0),e[38]=H):H=e[38];let q;e[39]!==t?(q=t("settings.decoCreditsHero.disconnect"),e[39]=t,e[40]=q):q=e[40];let F;e[41]!==y||e[42]!==q?(F=s.jsx(X,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground hover:text-destructive",onClick:H,disabled:y,children:q}),e[41]=y,e[42]=q,e[43]=F):F=e[43];let U;e[44]!==$||e[45]!==F?(U=s.jsxs("div",{className:"flex items-center justify-between",children:[$,F]}),e[44]=$,e[45]=F,e[46]=U):U=e[46];let B;e[47]!==t?(B=t("settings.decoCreditsHero.disconnectTitle"),e[47]=t,e[48]=B):B=e[48];let z;e[49]!==B?(z=s.jsx(it,{children:B}),e[49]=B,e[50]=z):z=e[50];let L;e[51]!==t?(L=t("settings.decoCreditsHero.disconnectDescription"),e[51]=t,e[52]=L):L=e[52];let I;e[53]!==L?(I=s.jsx(lt,{children:L}),e[53]=L,e[54]=I):I=e[54];let E;e[55]!==z||e[56]!==I?(E=s.jsxs(rt,{children:[z,I]}),e[55]=z,e[56]=I,e[57]=E):E=e[57];let O;e[58]!==t?(O=t("settings.decoCreditsHero.cancelButton"),e[58]=t,e[59]=O):O=e[59];let R;e[60]!==O?(R=s.jsx(nt,{children:O}),e[60]=O,e[61]=R):R=e[61];let K;e[62]!==p?(K=()=>p(),e[62]=p,e[63]=K):K=e[63];let W;e[64]!==t?(W=t("settings.decoCreditsHero.disconnectButton"),e[64]=t,e[65]=W):W=e[65];let Z;e[66]!==K||e[67]!==W?(Z=s.jsx(ot,{onClick:K,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:W}),e[66]=K,e[67]=W,e[68]=Z):Z=e[68];let V;e[69]!==R||e[70]!==Z?(V=s.jsxs(at,{children:[R,Z]}),e[69]=R,e[70]=Z,e[71]=V):V=e[71];let Y;e[72]!==E||e[73]!==V?(Y=s.jsxs(ct,{children:[E,V]}),e[72]=E,e[73]=V,e[74]=Y):Y=e[74];let ie;e[75]!==d||e[76]!==Y?(ie=s.jsx(dt,{open:d,onOpenChange:h,children:Y}),e[75]=d,e[76]=Y,e[77]=ie):ie=e[77];let te;e[78]!==m||e[79]!==b||e[80]!==S||e[81]!==g?(te=g||S?s.jsx(Se,{className:"h-9 w-24"}):s.jsx("span",{className:Ie("text-3xl font-semibold tabular-nums tracking-tight",m!=null&&js(m)),children:b}),e[78]=m,e[79]=b,e[80]=S,e[81]=g,e[82]=te):te=e[82];let ne;e[83]!==v?(ne=()=>v(),e[83]=v,e[84]=ne):ne=e[84];let oe;e[85]!==t?(oe=t("settings.decoCreditsHero.refreshBalance"),e[85]=t,e[86]=oe):oe=e[86];const Ke=S&&"animate-spin";let ae;e[87]!==Ke?(ae=Ie(Ke),e[87]=Ke,e[88]=ae):ae=e[88];let ce;e[89]!==ae?(ce=s.jsx(Ze,{size:14,className:ae}),e[89]=ae,e[90]=ce):ce=e[90];let de;e[91]!==S||e[92]!==ne||e[93]!==oe||e[94]!==ce?(de=s.jsx("button",{type:"button",onClick:ne,disabled:S,className:"text-muted-foreground hover:text-foreground disabled:opacity-50 transition-colors p-1 rounded-md hover:bg-muted/50","aria-label":oe,children:ce}),e[91]=S,e[92]=ne,e[93]=oe,e[94]=ce,e[95]=de):de=e[95];let me;e[96]!==te||e[97]!==de?(me=s.jsxs("div",{className:"flex items-baseline gap-2",children:[te,de]}),e[96]=te,e[97]=de,e[98]=me):me=e[98];let ue;e[99]!==t?(ue=t("settings.decoCreditsHero.availableBalance"),e[99]=t,e[100]=ue):ue=e[100];let fe;e[101]!==ue?(fe=s.jsx("p",{className:"text-xs text-muted-foreground",children:ue}),e[101]=ue,e[102]=fe):fe=e[102];let pe;e[103]!==me||e[104]!==fe?(pe=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[me,fe]}),e[103]=me,e[104]=fe,e[105]=pe):pe=e[105];let ge;e[106]!==t?(ge=t("settings.decoCreditsHero.addCredits"),e[106]=t,e[107]=ge):ge=e[107];let xe;e[108]!==ge?(xe=s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:ge}),e[108]=ge,e[109]=xe):xe=e[109];let _e;e[110]===Symbol.for("react.memo_cache_sentinel")?(_e=s.jsx(bs,{}),e[110]=_e):_e=e[110];let he;e[111]!==xe?(he=s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[xe,_e]}),e[111]=xe,e[112]=he):he=e[112];let ve;e[113]!==U||e[114]!==ie||e[115]!==pe||e[116]!==he?(ve=s.jsx(be,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[U,ie,pe,he]})}),e[113]=U,e[114]=ie,e[115]=pe,e[116]=he,e[117]=ve):ve=e[117];let Ce;return e[118]!==D||e[119]!==ve?(Ce=s.jsx(Re,{title:D,children:ve}),e[118]=D,e[119]=ve,e[120]=Ce):Ce=e[120],Ce}function Ns(e){return e.providerId==="deco"}function _s(){const e=Q.c(12),{org:t}=ye(),i=le(),r=Ne(),n=se();let a;e[0]!==i?(a=async()=>{await i.call("AI_PROVIDER_PROVISION_KEY",{providerId:"deco"})},e[0]=i,e[1]=a):a=e[1];let c;e[2]!==t||e[3]!==r||e[4]!==n?(c=()=>{Ue("ai_provider_provision_succeeded",{provider_id:"deco"}),r.invalidateQueries({queryKey:J.aiProviderKeys(t.id)}),r.invalidateQueries({queryKey:J.aiProviders(t.id)}),ee.success(n("settings.aiProviders.decoConnectSuccess"))},e[2]=t,e[3]=r,e[4]=n,e[5]=c):c=e[5];let l;e[6]!==n?(l=h=>{Ue("ai_provider_provision_failed",{provider_id:"deco",error:h.message}),ee.error(n("settings.aiProviders.decoConnectError",{error:h.message}))},e[6]=n,e[7]=l):l=e[7];let d;return e[8]!==a||e[9]!==c||e[10]!==l?(d={mutationFn:a,onSuccess:c,onError:l},e[8]=a,e[9]=c,e[10]=l,e[11]=d):d=e[11],re(d)}function Cs(){const e=Q.c(37),t=se(),{mutate:i,isPending:r}=_s();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=["radial-gradient(ellipse 50% 150% at -15% 50%, rgba(165,149,255,0.14) 0%, transparent 60%)","radial-gradient(ellipse 50% 150% at 115% 50%, rgba(208,236,26,0.11) 0%, transparent 60%)"],e[0]=n):n=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:n.join(", ")}}),e[1]=a):a=e[1];let c;e[2]!==t?(c=t("settings.decoNudgeCard.decoAiGateway"),e[2]=t,e[3]=c):c=e[3];let l;e[4]!==c?(l=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:c,className:"size-12 shrink-0 rounded-xl object-contain dark:bg-white dark:p-1"}),e[4]=c,e[5]=l):l=e[5];let d;e[6]!==t?(d=t("settings.decoNudgeCard.decoAiGateway"),e[6]=t,e[7]=d):d=e[7];let h;e[8]!==d?(h=s.jsx("p",{className:"text-base font-semibold",children:d}),e[8]=d,e[9]=h):h=e[9];let C;e[10]!==t?(C=t("settings.decoNudgeCard.recommended"),e[10]=t,e[11]=C):C=e[11];let o;e[12]!==C?(o=s.jsx("span",{className:"rounded-full border border-border/60 bg-background/60 px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:C}),e[12]=C,e[13]=o):o=e[13];let u;e[14]!==h||e[15]!==o?(u=s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[h,o]}),e[14]=h,e[15]=o,e[16]=u):u=e[16];let f;e[17]!==t?(f=t("settings.decoNudgeCard.description"),e[17]=t,e[18]=f):f=e[18];let p;e[19]!==f?(p=s.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[19]=f,e[20]=p):p=e[20];let y;e[21]!==p||e[22]!==u?(y=s.jsxs("div",{className:"flex-1 min-w-0",children:[u,p]}),e[21]=p,e[22]=u,e[23]=y):y=e[23];let j;e[24]!==i?(j=()=>i(),e[24]=i,e[25]=j):j=e[25];let P;e[26]!==r||e[27]!==t?(P=t(r?"settings.decoNudgeCard.connecting":"settings.decoNudgeCard.connectDeco"),e[26]=r,e[27]=t,e[28]=P):P=e[28];let x;e[29]!==r||e[30]!==j||e[31]!==P?(x=s.jsx(X,{variant:"outline",disabled:r,onClick:j,children:P}),e[29]=r,e[30]=j,e[31]=P,e[32]=x):x=e[32];let _;return e[33]!==y||e[34]!==x||e[35]!==l?(_=s.jsxs("div",{className:"relative rounded-xl border border-border overflow-hidden",children:[a,s.jsxs("div",{className:"relative flex items-center gap-5 px-6 py-5",children:[l,y,x]})]}),e[33]=y,e[34]=x,e[35]=l,e[36]=_):_=e[36],_}const Ps=e=>vt({label:we().min(1,e("settings.editProviderDialog.labelRequired")).max(100),apiKey:we().optional(),baseUrl:we().optional()});function Is({isOpenAICompatible:e,baseUrl:t,currentBaseUrl:i,apiKey:r}){return e&&!!t&&t!==i&&!r}function ks({providerKey:e,provider:t,preset:i,maskedKey:r,currentLabel:n,currentBaseUrl:a,onCancel:c,onSuccess:l}){const{org:d}=ye(),h=le(),C=Ne(),o=se(),[u,f]=G.useState(!1),p=t.id==="openai-compatible",y=t.supportedMethods.includes("api-key"),j=Ps(o),{register:P,handleSubmit:x,watch:_,setError:k,formState:{errors:g}}=We({resolver:Ye(j),defaultValues:{label:n,apiKey:"",baseUrl:a??""}}),v=_("apiKey")??"",{mutate:S,isPending:m}=re({mutationFn:async N=>{let b;N.apiKey&&(p?b=JSON.stringify({baseUrl:N.baseUrl||a||"",apiKey:N.apiKey}):b=N.apiKey),await h.call("AI_PROVIDER_KEY_UPDATE",{keyId:e.id,label:N.label,...b!==void 0?{apiKey:b}:{}})},onSuccess:()=>{C.invalidateQueries({queryKey:J.aiProviderKeys(d.id)}),C.invalidateQueries({queryKey:J.aiProviders(d.id)}),ee.success(o("settings.editProviderDialog.providerUpdated")),l()},onError:N=>ee.error(o("settings.editProviderDialog.failedToUpdate",{error:N.message}))});return s.jsxs("form",{onSubmit:x(N=>{if(Is({isOpenAICompatible:p,baseUrl:N.baseUrl,currentBaseUrl:a,apiKey:N.apiKey})){k("apiKey",{message:o("settings.editProviderDialog.apiKeyRequiredForBaseUrlChange")});return}S(N)}),className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:o("settings.editProviderDialog.label")}),s.jsx(je,{placeholder:o("settings.editProviderDialog.labelPlaceholder"),...P("label"),className:"h-8 text-sm"}),g.label&&s.jsx("p",{className:"text-xs text-destructive",children:g.label.message})]}),p&&!i?.defaultBaseUrl&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:o("settings.editProviderDialog.baseUrl")}),s.jsx(je,{type:"url",placeholder:i?.baseUrlPlaceholder??o("settings.editProviderDialog.baseUrlPlaceholder"),...P("baseUrl"),className:"h-8 text-sm"})]}),y&&s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:[o("settings.editProviderDialog.apiKey")," ",s.jsxs("span",{className:"text-muted-foreground/60",children:["(",o("settings.editProviderDialog.leaveBlankHint"),")"]})]}),s.jsxs("div",{className:"relative",children:[s.jsx(je,{type:u&&v?"text":"password",placeholder:r,...P("apiKey"),className:"ph-no-capture h-8 text-sm pr-8"}),v&&s.jsx("button",{type:"button",onClick:()=>f(!u),"aria-label":o(u?"settings.editProviderDialog.hideApiKey":"settings.editProviderDialog.showApiKey"),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:u?s.jsx(Ht,{size:14}):s.jsx(Lt,{size:14})})]}),g.apiKey&&s.jsx("p",{className:"text-xs text-destructive",children:g.apiKey.message})]}),i?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:i.helpText}),s.jsxs(Yt,{children:[s.jsx(X,{type:"button",variant:"ghost",size:"sm",onClick:c,disabled:m,children:o("settings.editProviderDialog.cancel")}),s.jsx(X,{type:"submit",size:"sm",disabled:m,children:o(m?"settings.editProviderDialog.saving":"settings.editProviderDialog.save")})]})]})}function Ds(e){const t=Q.c(31),{providerKey:i,provider:r,open:n,onOpenChange:a}=e,c=se(),l=le(),d=r.id==="openai-compatible"&&i.presetId?st(i.presetId):void 0,h=d?.name??r.name;let C;t[0]!==i.id?(C=J.aiProviderKeyPreview(i.id),t[0]=i.id,t[1]=C):C=t[1];let o;t[2]!==i.id||t[3]!==l?(o=()=>l.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),t[2]=i.id,t[3]=l,t[4]=o):o=t[4];let u;t[5]!==n||t[6]!==C||t[7]!==o?(u={queryKey:C,queryFn:o,enabled:n,staleTime:0},t[5]=n,t[6]=C,t[7]=o,t[8]=u):u=t[8];const{data:f,isLoading:p}=De(u),y=Gt,j=Qt,P="sm:max-w-md",x=Vt,_=qt,k=c("settings.editProviderDialog.editTitle",{name:h});let g;t[9]!==_||t[10]!==k?(g=s.jsx(_,{children:k}),t[9]=_,t[10]=k,t[11]=g):g=t[11];let v;t[12]!==x||t[13]!==g?(v=s.jsx(x,{children:g}),t[12]=x,t[13]=g,t[14]=v):v=t[14];let S;t[15]!==p||t[16]!==a||t[17]!==d||t[18]!==f||t[19]!==r||t[20]!==i?(S=p||!f?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Wt,{})}):s.jsx(ks,{providerKey:i,provider:r,preset:d,maskedKey:f.maskedKey,currentLabel:f.label,currentBaseUrl:f.baseUrl,onCancel:()=>a(!1),onSuccess:()=>a(!1)}),t[15]=p,t[16]=a,t[17]=d,t[18]=f,t[19]=r,t[20]=i,t[21]=S):S=t[21];let m;t[22]!==j||t[23]!==v||t[24]!==S?(m=s.jsxs(j,{className:P,children:[v,S]}),t[22]=j,t[23]=v,t[24]=S,t[25]=m):m=t[25];let N;return t[26]!==y||t[27]!==a||t[28]!==n||t[29]!==m?(N=s.jsx(y,{open:n,onOpenChange:a,children:m}),t[26]=y,t[27]=a,t[28]=n,t[29]=m,t[30]=N):N=t[30],N}function Ks(e){const t=Q.c(86),{providerKey:i,provider:r}=e,{org:n}=ye(),a=le(),c=Ne(),[l,d]=G.useState(!1),[h,C]=G.useState(!1),o=se(),[u]=Je(),f=u.language==="pt-BR"?Ot:void 0,p=r?.id==="openai-compatible";let y;t[0]!==p||t[1]!==i.presetId?(y=p&&i.presetId?st(i.presetId):void 0,t[0]=p,t[1]=i.presetId,t[2]=y):y=t[2];const j=y;let P;t[3]!==p||t[4]!==j||t[5]!==r?.name||t[6]!==i.providerId||t[7]!==o?(P=j?j.name:p?o("settings.aiProviders.customOpenAiCompatible"):r?.name??(i.providerId==="claude-code"?o("settings.providerKeyRow.claudeCode"):i.providerId==="codex"?o("settings.providerKeyRow.codex"):i.providerId),t[3]=p,t[4]=j,t[5]=r?.name,t[6]=i.providerId,t[7]=o,t[8]=P):P=t[8];const x=P,_=j?.logo??r?.logo??zt[i.providerId];let k;e:{if(p){k=i.label;break e}let te;t[9]!==f||t[10]!==i.createdAt||t[11]!==i.label||t[12]!==o?(te=o("settings.providerKeyRow.addedTimeAgo",{label:i.label,time:$t(new Date(i.createdAt),{locale:f})}),t[9]=f,t[10]=i.createdAt,t[11]=i.label,t[12]=o,t[13]=te):te=t[13],k=te}const g=k;let v;t[14]!==i.id||t[15]!==a?(v=async()=>{await a.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},t[14]=i.id,t[15]=a,t[16]=v):v=t[16];let S;t[17]!==n||t[18]!==i.id||t[19]!==c||t[20]!==o?(S=()=>{c.invalidateQueries({queryKey:J.aiProviderKeys(n.id)}),c.invalidateQueries({queryKey:J.aiProviders(n.id)}),c.invalidateQueries({queryKey:J.aiProviderModels(n.id,i.id)}),ee.success(o("settings.providerKeyRow.keyDeleted")),d(!1)},t[17]=n,t[18]=i.id,t[19]=c,t[20]=o,t[21]=S):S=t[21];let m;t[22]!==o?(m=te=>ee.error(o("settings.providerKeyRow.failedToDeleteKey",{error:te.message})),t[22]=o,t[23]=m):m=t[23];let N;t[24]!==v||t[25]!==S||t[26]!==m?(N={mutationFn:v,onSuccess:S,onError:m},t[24]=v,t[25]=S,t[26]=m,t[27]=N):N=t[27];const{mutate:b,isPending:D}=re(N);let w;t[28]!==x||t[29]!==_?(w=_?s.jsx("img",{src:_,alt:x,className:"size-8 rounded-md object-contain dark:bg-white dark:p-0.5"}):s.jsx(Bt,{fallback:x.charAt(0),className:"size-8 bg-primary/10 text-primary"}),t[28]=x,t[29]=_,t[30]=w):w=t[30];let A;t[31]!==r||t[32]!==o?(A=r?s.jsx(X,{variant:"ghost",size:"icon","aria-label":o("settings.providerKeyRow.editProviderKey"),className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:()=>C(!0),children:s.jsx(Ft,{size:14})}):null,t[31]=r,t[32]=o,t[33]=A):A=t[33];let M;t[34]!==o?(M=o("settings.providerKeyRow.deleteProviderKey"),t[34]=o,t[35]=M):M=t[35];let T,$;t[36]===Symbol.for("react.memo_cache_sentinel")?(T=()=>d(!0),$=s.jsx(Ut,{size:14}),t[36]=T,t[37]=$):(T=t[36],$=t[37]);let H;t[38]!==D||t[39]!==M?(H=s.jsx(X,{variant:"ghost",size:"icon","aria-label":M,className:"h-7 w-7 text-muted-foreground hover:text-destructive",disabled:D,onClick:T,children:$}),t[38]=D,t[39]=M,t[40]=H):H=t[40];let q;t[41]!==H||t[42]!==A?(q=s.jsxs("div",{className:"flex items-center gap-0.5",children:[A,H]}),t[41]=H,t[42]=A,t[43]=q):q=t[43];let F;t[44]!==g||t[45]!==x||t[46]!==q||t[47]!==w?(F=s.jsx(Te,{icon:w,title:x,description:g,action:q}),t[44]=g,t[45]=x,t[46]=q,t[47]=w,t[48]=F):F=t[48];let U;t[49]!==h||t[50]!==r||t[51]!==i?(U=r?s.jsx(Ds,{providerKey:i,provider:r,open:h,onOpenChange:C}):null,t[49]=h,t[50]=r,t[51]=i,t[52]=U):U=t[52];let B;t[53]!==o?(B=o("settings.providerKeyRow.deleteApiKey"),t[53]=o,t[54]=B):B=t[54];let z;t[55]!==B?(z=s.jsx(it,{children:B}),t[55]=B,t[56]=z):z=t[56];let L;t[57]!==i.label?(L=s.jsxs(lt,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:i.label}),"."]}),t[57]=i.label,t[58]=L):L=t[58];let I;t[59]!==z||t[60]!==L?(I=s.jsxs(rt,{children:[z,L]}),t[59]=z,t[60]=L,t[61]=I):I=t[61];let E;t[62]!==o?(E=o("settings.providerKeyRow.cancel"),t[62]=o,t[63]=E):E=t[63];let O;t[64]!==E?(O=s.jsx(nt,{children:E}),t[64]=E,t[65]=O):O=t[65];let R;t[66]!==b?(R=()=>b(),t[66]=b,t[67]=R):R=t[67];let K;t[68]!==o?(K=o("settings.providerKeyRow.delete"),t[68]=o,t[69]=K):K=t[69];let W;t[70]!==R||t[71]!==K?(W=s.jsx(ot,{onClick:R,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:K}),t[70]=R,t[71]=K,t[72]=W):W=t[72];let Z;t[73]!==O||t[74]!==W?(Z=s.jsxs(at,{children:[O,W]}),t[73]=O,t[74]=W,t[75]=Z):Z=t[75];let V;t[76]!==I||t[77]!==Z?(V=s.jsxs(ct,{children:[I,Z]}),t[76]=I,t[77]=Z,t[78]=V):V=t[78];let Y;t[79]!==l||t[80]!==V?(Y=s.jsx(dt,{open:l,onOpenChange:d,children:V}),t[79]=l,t[80]=V,t[81]=Y):Y=t[81];let ie;return t[82]!==F||t[83]!==U||t[84]!==Y?(ie=s.jsxs(s.Fragment,{children:[F,U,Y]}),t[82]=F,t[83]=U,t[84]=Y,t[85]=ie):ie=t[85],ie}function ws(e){const t=e.filter(i=>Pt(i.providerId));return{hasInventory:e.length>0,hasHostedProvider:t.length>0,hasDeco:t.some(i=>i.providerId==="deco")}}function As(e,t){return e.filter(i=>i.providerId!=="deco").map(i=>({key:i,provider:t.find(r=>r.id===i.providerId)??null}))}function Ge(e){const t=Q.c(13),{onConnectClick:i}=e,r=se(),n=Me(),a=tt();let c;if(t[0]!==a?.providers||t[1]!==n||t[2]!==i||t[3]!==r){const l=a?.providers??[],d=As(n,l);let h;t[5]!==r?(h=r("settings.connectedProvidersSection.sectionTitle"),t[5]=r,t[6]=h):h=t[6];let C;t[7]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Mt,{size:14}),t[7]=C):C=t[7];let o;t[8]!==r?(o=r("settings.connectedProvidersSection.connectButton"),t[8]=r,t[9]=o):o=t[9];let u;t[10]!==i||t[11]!==o?(u=s.jsxs(X,{size:"sm",onClick:i,children:[C,o]}),t[10]=i,t[11]=o,t[12]=u):u=t[12],c=s.jsx(Re,{title:h,headerClassName:"px-0",actions:u,children:d.length===0?s.jsx("p",{className:"text-sm text-muted-foreground px-1",children:r("settings.connectedProvidersSection.emptyState")}):s.jsx(be,{children:d.map(Es)})}),t[0]=a?.providers,t[1]=n,t[2]=i,t[3]=r,t[4]=c}else c=t[4];return c}function Es(e){const{key:t,provider:i}=e;return s.jsx(Ks,{providerKey:t,provider:i},t.id)}function Ts(){const e=Q.c(55),t=se(),{org:i}=ye(),r=le(),n=Ne(),[a,c]=G.useState("");let l;e[0]!==i.id?(l=J.claudeSubscription(i.id),e[0]=i.id,e[1]=l):l=e[1];let d;e[2]!==r?(d=()=>r.call("CLAUDE_SUBSCRIPTION_STATUS",{}),e[2]=r,e[3]=d):d=e[3];let h;e[4]!==l||e[5]!==d?(h={queryKey:l,queryFn:d},e[4]=l,e[5]=d,e[6]=h):h=e[6];const C=De(h);let o;e[7]!==i.id||e[8]!==n?(o=()=>n.invalidateQueries({queryKey:J.claudeSubscription(i.id)}),e[7]=i.id,e[8]=n,e[9]=o):o=e[9];const u=o;let f;e[10]!==r||e[11]!==a?(f=()=>r.call("CLAUDE_SUBSCRIPTION_CONNECT",{token:a}),e[10]=r,e[11]=a,e[12]=f):f=e[12];let p;e[13]!==u||e[14]!==t?(p=async()=>{c(""),await u(),ee.success(t("settings.claudeSubscription.connected"))},e[13]=u,e[14]=t,e[15]=p):p=e[15];let y;e[16]!==f||e[17]!==p?(y={mutationFn:f,onSuccess:p,onError:Ms},e[16]=f,e[17]=p,e[18]=y):y=e[18];const j=re(y);let P;e[19]!==r?(P=()=>r.call("CLAUDE_SUBSCRIPTION_DISCONNECT",{}),e[19]=r,e[20]=P):P=e[20];let x;e[21]!==u||e[22]!==t?(x=async()=>{await u(),ee.success(t("settings.claudeSubscription.disconnected"))},e[21]=u,e[22]=t,e[23]=x):x=e[23];let _;e[24]!==P||e[25]!==x?(_={mutationFn:P,onSuccess:x,onError:Rs},e[24]=P,e[25]=x,e[26]=_):_=e[26];const k=re(_),g=C.data?.connected===!0,v=!g&&!!C.data?.linkedAt;let S;e[27]!==t?(S=t("settings.claudeSubscription.title"),e[27]=t,e[28]=S):S=e[28];let m;e[29]!==S?(m=s.jsx("p",{className:"text-base font-semibold",children:S}),e[29]=S,e[30]=m):m=e[30];let N;e[31]!==g||e[32]!==v||e[33]!==t?(N=t(g?"settings.claudeSubscription.active":v?"settings.claudeSubscription.expired":"settings.claudeSubscription.description"),e[31]=g,e[32]=v,e[33]=t,e[34]=N):N=e[34];let b;e[35]!==N?(b=s.jsx("p",{className:"text-sm text-muted-foreground",children:N}),e[35]=N,e[36]=b):b=e[36];let D;e[37]!==m||e[38]!==b?(D=s.jsxs("div",{className:"flex-1 min-w-0",children:[m,b]}),e[37]=m,e[38]=b,e[39]=D):D=e[39];let w;e[40]!==g||e[41]!==k||e[42]!==t?(w=g?s.jsx(X,{variant:"outline",disabled:k.isPending,onClick:()=>k.mutate(),children:t("settings.claudeSubscription.disconnect")}):null,e[40]=g,e[41]=k,e[42]=t,e[43]=w):w=e[43];let A;e[44]!==D||e[45]!==w?(A=s.jsxs("div",{className:"flex items-center gap-4",children:[D,w]}),e[44]=D,e[45]=w,e[46]=A):A=e[46];let M;e[47]!==j||e[48]!==g||e[49]!==t||e[50]!==a?(M=g?null:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsxs("p",{className:"text-sm text-muted-foreground",children:[t("settings.claudeSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:"claude setup-token"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(je,{type:"password",value:a,onChange:$=>c($.target.value),placeholder:t("settings.claudeSubscription.tokenPlaceholder")}),s.jsx(X,{disabled:a.trim().length===0||j.isPending,onClick:()=>j.mutate(),children:t("settings.claudeSubscription.connect")})]})]}),e[47]=j,e[48]=g,e[49]=t,e[50]=a,e[51]=M):M=e[51];let T;return e[52]!==A||e[53]!==M?(T=s.jsxs("div",{className:"rounded-xl border border-border px-6 py-5 flex flex-col gap-4",children:[A,M]}),e[52]=A,e[53]=M,e[54]=T):T=e[54],T}function Rs(e){return ee.error(e.message)}function Ms(e){return ee.error(e.message)}function Os(e){const t=Q.c(3),{error:i}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(yt,{size:16}),t[0]=r):r=t[0];let n;return t[1]!==i.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[r,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load AI providers: ",i.message]})]}),t[1]=i.message,t[2]=n):n=t[2],n}function $s(){const e=Q.c(29),t=Me();let i;e[0]!==t?(i=ws(t),e[0]=t,e[1]=i):i=e[1];const{hasInventory:r,hasHostedProvider:n,hasDeco:a}=i,[c,l]=G.useState(!1),[d,h]=G.useState(null),C=tt();let o;e[2]!==C?.providers?(o=C?.providers??[],e[2]=C?.providers,e[3]=o):o=e[3];const u=o;if(!n){let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Qe,{}),e[4]=k):k=e[4];let g;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=()=>l(!0),e[5]=g):g=e[5];let v;e[6]!==u?(v=s.jsx(At,{providers:u,onSelect:h,onShowAll:g}),e[6]=u,e[7]=v):v=e[7];const S=d!==null||c;let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=A=>{A||(h(null),l(!1))},e[8]=m):m=e[8];const N=d??void 0;let b;e[9]!==S||e[10]!==N?(b=s.jsx(ze,{open:S,onOpenChange:m,initialProvider:N}),e[9]=S,e[10]=N,e[11]=b):b=e[11];let D;e[12]!==r?(D=r?s.jsx(Ge,{onConnectClick:()=>l(!0)}):null,e[12]=r,e[13]=D):D=e[13];let w;return e[14]!==v||e[15]!==b||e[16]!==D?(w=s.jsxs(s.Fragment,{children:[k,v,b,D]}),e[14]=v,e[15]=b,e[16]=D,e[17]=w):w=e[17],w}let f;e[18]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Qe,{}),e[18]=f):f=e[18];let p;e[19]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(G.Suspense,{fallback:s.jsx(Se,{className:"h-16 w-full"}),children:s.jsx(ls,{})}),e[19]=p):p=e[19];let y;e[20]!==a?(y=a?s.jsx(Ss,{}):s.jsx(Cs,{}),e[20]=a,e[21]=y):y=e[21];let j;e[22]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ts,{}),e[22]=j):j=e[22];let P;e[23]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(Ge,{onConnectClick:()=>l(!0)}),e[23]=P):P=e[23];let x;e[24]!==c?(x=s.jsx(ze,{open:c,onOpenChange:l}),e[24]=c,e[25]=x):x=e[25];let _;return e[26]!==y||e[27]!==x?(_=s.jsxs(s.Fragment,{children:[f,p,y,j,P,x]}),e[26]=y,e[27]=x,e[28]=_):_=e[28],_}function Fs(){const e=Q.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(St,{group:"billing"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ae,{children:s.jsx(Ae.Content,{children:s.jsx(Ae.Body,{children:s.jsxs(jt,{children:[t,s.jsx(bt,{fallback:Us,children:s.jsx(G.Suspense,{fallback:s.jsx(Se,{className:"h-64 w-full"}),children:s.jsx($s,{})})})]})})})}),e[1]=i):i=e[1],i}function Us(e){const{error:t}=e;return s.jsx(Os,{error:t??new Error("Failed to load AI providers")})}function sl(){const e=Q.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Zt,{capability:"ai-providers:manage",area:"AI providers",children:s.jsx(Fs,{})}),e[0]=t):t=e[0],t}export{sl as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as S,j as t,E as ie,r as F,b as B,B as N,t as R}from"./index-DTCr2n-a.js";import{i as le}from"./AlertCircle-DYa65h7M.js";import{a as ne}from"./Copy01-C8DEngph.js";import{i as M}from"./Key01-Du0R52Fs.js";import{s as Q}from"./Plus-Cf4b1bNp.js";import{s as re}from"./Trash01-C4UDDTjr.js";import{A as ae,a as oe,b as ce,c as me,d as de,e as fe,f as pe,g as ue}from"./alert-dialog-BBUALe3i.js";import{b as U,h as V,a as W,c as X,d as Y,e as Z}from"./dialog-B0pGkX2q.js";import{I as ee}from"./input-7l72-E74.js";import{L as xe}from"./label-Di7XD03t.js";import{S as ge}from"./skeleton-BvZK-LJN.js";import{P as q}from"./index-mAaX9S9j.js";import{c as ye}from"./settings-section-BS9eoASN.js";import{a as he,b as je,u as be}from"./use-api-keys-DrlFtOsW.js";import{S as Ke}from"./settings-subnav-D-pYtn7v.js";import{R as Ce}from"./require-capability-BganaMDA.js";import"./X-IBBjQPfk.js";import"./sidebar-Z1Ar8Iq1.js";import"./LayoutLeft-BKrrf1xY.js";import"./use-mobile-DxjazlC8.js";import"./tooltip-Dt_WUeQs.js";import"./card-IdHCmi8B.js";import"./ArrowUpRight-Dv9QvAW5.js";import"./use-mcp-client-DFoPNyXR.js";import"./constants-BSYv1IkQ.js";import"./auth-CS2cT5wl.js";import"./useRouterState-B0WmwZ8z.js";import"./use-settings-tabs-qdqtthwY.js";import"./use-capability-U_kO9pjO.js";import"./studio-tools-BBCHIrbu.js";import"./access-gate-D3zAqPzH.js";import"./capability-load-error-BornUXv-.js";function De(c){const e=S.c(6),{error:o}=c,a=B();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(le,{size:16}),e[0]=i):i=e[0];let s;e[1]!==o.message||e[2]!==a?(s=a("settings.apiKeys.failedToLoadError",{error:o.message}),e[1]=o.message,e[2]=a,e[3]=s):s=e[3];let l;return e[4]!==s?(l=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[i,t.jsx("span",{className:"text-sm font-medium",children:s})]}),e[4]=s,e[5]=l):l=e[5],l}function Ae(c){const e=S.c(20),{apiKey:o,onDelete:a}=c,i=B();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:t.jsx(M,{size:16,className:"text-muted-foreground"})}),e[0]=s):s=e[0];let l;e[1]!==o.name?(l=t.jsx("span",{className:"font-medium text-sm truncate block",children:o.name}),e[1]=o.name,e[2]=l):l=e[2];let m;e[3]!==o.createdAt||e[4]!==i?(m=i("settings.apiKeys.createdAt",{date:new Date(o.createdAt).toLocaleDateString()}),e[3]=o.createdAt,e[4]=i,e[5]=m):m=e[5];let n;e[6]!==m?(n=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:m}),e[6]=m,e[7]=n):n=e[7];let d;e[8]!==l||e[9]!==n?(d=t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[s,t.jsxs("div",{className:"min-w-0",children:[l,n]})]}),e[8]=l,e[9]=n,e[10]=d):d=e[10];let r;e[11]!==i?(r=i("settings.apiKeys.deleteKey"),e[11]=i,e[12]=r):r=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(re,{size:14}),e[13]=f):f=e[13];let u;e[14]!==a||e[15]!==r?(u=t.jsx(N,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-destructive shrink-0",onClick:a,"aria-label":r,children:f}),e[14]=a,e[15]=r,e[16]=u):u=e[16];let p;return e[17]!==d||e[18]!==u?(p=t.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[d,u]}),e[17]=d,e[18]=u,e[19]=p):p=e[19],p}function Ne(c){const e=S.c(21),{onCreate:o}=c,a=B();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(M,{size:20,className:"text-muted-foreground"})}),e[0]=i):i=e[0];let s;e[1]!==a?(s=a("settings.apiKeys.emptyTitle"),e[1]=a,e[2]=s):s=e[2];let l;e[3]!==s?(l=t.jsx("p",{className:"font-medium text-sm",children:s}),e[3]=s,e[4]=l):l=e[4];let m;e[5]!==a?(m=a("settings.apiKeys.emptyDescription"),e[5]=a,e[6]=m):m=e[6];let n;e[7]!==m?(n=t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:m}),e[7]=m,e[8]=n):n=e[8];let d;e[9]!==l||e[10]!==n?(d=t.jsxs("div",{children:[l,n]}),e[9]=l,e[10]=n,e[11]=d):d=e[11];let r;e[12]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Q,{size:14}),e[12]=r):r=e[12];let f;e[13]!==a?(f=a("settings.apiKeys.newKey"),e[13]=a,e[14]=f):f=e[14];let u;e[15]!==o||e[16]!==f?(u=t.jsxs(N,{onClick:o,size:"sm",className:"mt-2",children:[r,f]}),e[15]=o,e[16]=f,e[17]=u):u=e[17];let p;return e[18]!==d||e[19]!==u?(p=t.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[i,d,u]}),e[18]=d,e[19]=u,e[20]=p):p=e[20],p}function G(c){const e=S.c(40),{createdKey:o,onClose:a}=c,i=B(),s=o!==null;let l;e[0]!==a?(l=A=>!A&&a(),e[0]=a,e[1]=l):l=e[1];let m;e[2]!==i?(m=i("settings.apiKeys.createdTitle"),e[2]=i,e[3]=m):m=e[3];let n;e[4]!==m?(n=t.jsx(U,{children:m}),e[4]=m,e[5]=n):n=e[5];let d;e[6]!==i?(d=i("settings.apiKeys.createdDescription"),e[6]=i,e[7]=d):d=e[7];let r;e[8]!==d?(r=t.jsx(V,{children:d}),e[8]=d,e[9]=r):r=e[9];let f;e[10]!==n||e[11]!==r?(f=t.jsxs(W,{children:[n,r]}),e[10]=n,e[11]=r,e[12]=f):f=e[12];const u=o?.key??"";let p;e[13]!==u?(p=t.jsx(ee,{readOnly:!0,value:u,className:"font-mono text-xs"}),e[13]=u,e[14]=p):p=e[14];let x;e[15]!==o||e[16]!==i?(x=()=>{o&&(navigator.clipboard?.writeText(o.key),R.success(i("settings.apiKeys.copied")))},e[15]=o,e[16]=i,e[17]=x):x=e[17];let g;e[18]!==i?(g=i("settings.apiKeys.copyKey"),e[18]=i,e[19]=g):g=e[19];let K;e[20]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(ne,{size:14}),e[20]=K):K=e[20];let y;e[21]!==x||e[22]!==g?(y=t.jsx(N,{type:"button",variant:"outline",size:"icon",onClick:x,"aria-label":g,children:K}),e[21]=x,e[22]=g,e[23]=y):y=e[23];let h;e[24]!==y||e[25]!==p?(h=t.jsxs("div",{className:"flex items-center gap-2",children:[p,y]}),e[24]=y,e[25]=p,e[26]=h):h=e[26];let j;e[27]!==i?(j=i("settings.apiKeys.done"),e[27]=i,e[28]=j):j=e[28];let b;e[29]!==a||e[30]!==j?(b=t.jsx(X,{children:t.jsx(N,{onClick:a,children:j})}),e[29]=a,e[30]=j,e[31]=b):b=e[31];let C;e[32]!==h||e[33]!==b||e[34]!==f?(C=t.jsxs(Y,{className:"sm:max-w-lg",children:[f,h,b]}),e[32]=h,e[33]=b,e[34]=f,e[35]=C):C=e[35];let D;return e[36]!==s||e[37]!==C||e[38]!==l?(D=t.jsx(Z,{open:s,onOpenChange:l,children:C}),e[36]=s,e[37]=C,e[38]=l,e[39]=D):D=e[39],D}function J(c){const e=S.c(64),{open:o,onOpenChange:a,onCreated:i}=c,s=B(),[l,m]=F.useState(""),n=be();let d;e[0]!==a?(d=function(){m(""),a(!1)},e[0]=a,e[1]=d):d=e[1];const r=d;let f;e[2]!==n||e[3]!==r||e[4]!==l||e[5]!==i||e[6]!==s?(f=async function(se){if(se.preventDefault(),!!l.trim())try{const I=await n.mutateAsync({name:l.trim()});r(),i(I)}catch(I){const H=I;R.error(H instanceof Error?H.message:s("settings.apiKeys.failedToCreateKey"))}},e[2]=n,e[3]=r,e[4]=l,e[5]=i,e[6]=s,e[7]=f):f=e[7];const u=f;let p;e[8]!==r||e[9]!==a?(p=$=>{$?a($):r()},e[8]=r,e[9]=a,e[10]=p):p=e[10];let x;e[11]!==s?(x=s("settings.apiKeys.newKeyTitle"),e[11]=s,e[12]=x):x=e[12];let g;e[13]!==x?(g=t.jsx(U,{children:x}),e[13]=x,e[14]=g):g=e[14];let K;e[15]!==s?(K=s("settings.apiKeys.newKeyDescription"),e[15]=s,e[16]=K):K=e[16];let y;e[17]!==K?(y=t.jsx(V,{children:K}),e[17]=K,e[18]=y):y=e[18];let h;e[19]!==g||e[20]!==y?(h=t.jsxs(W,{children:[g,y]}),e[19]=g,e[20]=y,e[21]=h):h=e[21];let j;e[22]!==s?(j=s("settings.apiKeys.nameLabel"),e[22]=s,e[23]=j):j=e[23];let b;e[24]!==j?(b=t.jsx(xe,{htmlFor:"api-key-name",children:j}),e[24]=j,e[25]=b):b=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=$=>m($.target.value),e[26]=C):C=e[26];let D;e[27]!==s?(D=s("settings.apiKeys.namePlaceholder"),e[27]=s,e[28]=D):D=e[28];let A;e[29]!==l||e[30]!==D?(A=t.jsx(ee,{id:"api-key-name",value:l,onChange:C,placeholder:D,autoComplete:"off",required:!0}),e[29]=l,e[30]=D,e[31]=A):A=e[31];let v;e[32]!==b||e[33]!==A?(v=t.jsxs("div",{className:"space-y-1.5",children:[b,A]}),e[32]=b,e[33]=A,e[34]=v):v=e[34];const te=n.isPending;let k;e[35]!==s?(k=s("settings.apiKeys.cancelButton"),e[35]=s,e[36]=k):k=e[36];let _;e[37]!==n.isPending||e[38]!==r||e[39]!==k?(_=t.jsx(N,{type:"button",variant:"outline",onClick:r,disabled:te,children:k}),e[37]=n.isPending,e[38]=r,e[39]=k,e[40]=_):_=e[40];let w;e[41]!==n.isPending||e[42]!==l?(w=n.isPending||!l.trim(),e[41]=n.isPending,e[42]=l,e[43]=w):w=e[43];let P;e[44]!==n.isPending||e[45]!==s?(P=n.isPending?s("settings.apiKeys.creatingButton"):s("settings.apiKeys.createButton"),e[44]=n.isPending,e[45]=s,e[46]=P):P=e[46];let z;e[47]!==w||e[48]!==P?(z=t.jsx(N,{type:"submit",disabled:w,children:P}),e[47]=w,e[48]=P,e[49]=z):z=e[49];let E;e[50]!==_||e[51]!==z?(E=t.jsxs(X,{children:[_,z]}),e[50]=_,e[51]=z,e[52]=E):E=e[52];let T;e[53]!==u||e[54]!==v||e[55]!==E?(T=t.jsxs("form",{onSubmit:u,className:"space-y-4",children:[v,E]}),e[53]=u,e[54]=v,e[55]=E,e[56]=T):T=e[56];let O;e[57]!==T||e[58]!==h?(O=t.jsxs(Y,{className:"sm:max-w-lg",children:[h,T]}),e[57]=T,e[58]=h,e[59]=O):O=e[59];let L;return e[60]!==o||e[61]!==O||e[62]!==p?(L=t.jsx(Z,{open:o,onOpenChange:p,children:O}),e[60]=o,e[61]=O,e[62]=p,e[63]=L):L=e[63],L}function Se(){const c=B(),{data:e=[]}=he(),o=je(),[a,i]=F.useState(!1),[s,l]=F.useState(null),[m,n]=F.useState(null);async function d(){if(m)try{await o.mutateAsync(m.id),R.success(c("settings.apiKeys.keyDeleted",{name:m.name}))}catch(r){R.error(r instanceof Error?r.message:c("settings.apiKeys.failedToDeleteKey"))}finally{n(null)}}return e.length===0?t.jsxs(t.Fragment,{children:[t.jsx(Ne,{onCreate:()=>i(!0)}),t.jsx(J,{open:a,onOpenChange:i,onCreated:l}),t.jsx(G,{createdKey:s,onClose:()=>l(null)})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("p",{className:"text-sm text-muted-foreground",children:c(e.length===1?"settings.apiKeys.keysCountSingular":"settings.apiKeys.keysCountPlural",{count:e.length})}),t.jsxs(N,{onClick:()=>i(!0),size:"sm",children:[t.jsx(Q,{size:14}),c("settings.apiKeys.newKey")]})]}),t.jsx("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:t.jsx("div",{children:e.map(r=>t.jsx(Ae,{apiKey:r,onDelete:()=>n(r)},r.id))})}),t.jsx(J,{open:a,onOpenChange:i,onCreated:l}),t.jsx(G,{createdKey:s,onClose:()=>l(null)}),t.jsx(ae,{open:m!==null,onOpenChange:r=>{r||n(null)},children:t.jsxs(oe,{children:[t.jsxs(ce,{children:[t.jsx(me,{children:c("settings.apiKeys.deleteTitle",{name:m?.name??""})}),t.jsx(de,{children:c("settings.apiKeys.deleteDescription")})]}),t.jsxs(fe,{children:[t.jsx(pe,{children:c("settings.apiKeys.cancelButton")}),t.jsx(ue,{onClick:d,children:c("settings.apiKeys.deleteKey")})]})]})})]})}function ve(){const c=S.c(2);let e;c[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ke,{group:"connect"}),c[0]=e):e=c[0];let o;return c[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(q,{children:t.jsx(q.Content,{children:t.jsx(q.Body,{children:t.jsxs(ye,{children:[e,t.jsx(ie,{fallback:ke,children:t.jsx(F.Suspense,{fallback:t.jsx(ge,{className:"h-32 w-full"}),children:t.jsx(Se,{})})})]})})})}),c[1]=o):o=c[1],o}function ke(c){const{error:e}=c;return t.jsx(De,{error:e??new Error("Failed to load API keys")})}function at(){const c=S.c(1);let e;return c[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ce,{capability:"api-keys:manage",area:"api-keys",children:t.jsx(ve,{})}),c[0]=e):e=c[0],e}export{at as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as Bt,b as kt,r as A,j as o,m as jt,k as _t,t as xt}from"./index-DTCr2n-a.js";import{i as wt}from"./ChevronRight-Cf-ty0tK.js";import{B as At}from"./automation-runs-C7VPpqIt.js";import{u as Et,A as Nt}from"./use-section-preview-base-CYcMtPj5.js";import{A as Rt,B as Ct,C as Kt,D as Tt,F as Ft,G as Pt,H as $t,S as Ut,I as Ot,J as zt}from"./index-BnYSClvU.js";import"./select-BRuvjhJw.js";import"./tooltip-Dt_WUeQs.js";import"./Check-ErA_74IV.js";import"./ChevronDown-Dgga4a4Q.js";import"./ChevronUp-DOEAI0tE.js";import"./agent-icon-vjhOL9u6.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"./ChevronSelectorVertical-BS9Eaphx.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"./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"./label-Di7XD03t.js";import"./input-7l72-E74.js";import"./file-type-icon-jL53noJP.js";import"./drawer-9chetton.js";import"./collection-search-BQLruUQ4.js";import"./deco-site-production-url-BjY4ZYd-.js";import"./tabs-DeNiwmVV.js";import"./toggle-group-Do3gb8uy.js";import"./use-commerce-diagnostic-DL4B4X1w.js";import"./popover-CfGL7saO.js";import"./self-tool-result-mEKHKLZ8.js";import"./alert-dialog-BBUALe3i.js";import"./extract-connection-data-DyM1tiNg.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-UZPGD-zb.js";import"./authenticate-and-persist-oauth-CB658Lpc.js";import"./mcp-oauth-_naDcGdv.js";import"./track-C3SQxOl4.js";import"./toolbar-DEkBOfzd.js";import"./skeleton-BvZK-LJN.js";import"./github-repo-picker-B0itW_sn.js";import"./use-mcp-tools-ByMlhxuh.js";import"./agent-capabilities-C4tLW0Za.js";import"./connection-card-2s-BDhzN.js";import"./use-registry-connections-BvzfOtMr.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-DkNj8yms.js";import"./connection-form-helpers-BahPv0zc.js";import"./collection-tabs-Dfa_vQOq.js";import"./badge-BR2WgVsV.js";import"./command-CXX8Roxa.js";import"./index-CJWr9N0v.js";import"./select-model-Dqz5FPx4.js";import"./checkbox-CNnFytxt.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BS9eoASN.js";import"./cards-B5pz2XNy.js";import"./dropdown-menu-Dhjx8BUz.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BWK3t0nt.js";import"./use-capability-U_kO9pjO.js";import"./use-file-configs-CgH1G4FU.js";import"./pt-BR-CLy76QW2.js";import"./switch-BAlslK2J.js";import"./use-debounced-autosave-BDvfPMkV.js";import"./index-mAaX9S9j.js";import"./search-input-DsWKOK9t.js";import"./index-DBsyf30G.js";import"./use-secrets-CAbcEA8g.js";import"./AreaChart-Z7000aGF.js";import"./use-tags-Bcd_6z1e.js";import"./get-initials-D-f_fDFw.js";import"./automation-list-row-DqAvOKpL.js";import"./use-org-repo-syncs-CugnYvLM.js";function It(n,t){const m=(n.title||n.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),i=/^[A-Za-z]/.test(m)&&m.length>0?m:"Section",s=Rt(t,i);return{blockKey:s,data:{__resolveType:n.resolveType,name:s}}}function Lr(n){const t=Bt.c(78),{orgSlug:m,virtualMcpId:i,branch:s,blockKey:p,block:x,meta:a,decofile:l,title:ht,excludeFields:H,schemaPending:nt,previewBaseUrl:lt}=n,M=nt===void 0?!1:nt,Z=lt===void 0?null:lt,c=kt();let N;t[0]!==Z||t[1]!==i?(N={virtualMcpId:i,sandboxUrl:Z},t[0]=Z,t[1]=i,t[2]=N):N=t[2];const h=Et(N),v=typeof x?.__resolveType=="string"?x.__resolveType:"";let R;t[3]!==H||t[4]!==a||t[5]!==v?(R=Ct(v,a,H),t[3]=H,t[4]=a,t[5]=v,t[6]=R):R=t[6];const b=R;let C;t[7]!==b?(C=!!b&&Object.keys(b.properties??{}).length>0,t[7]=b,t[8]=C):C=t[8];const G=C,ct=ht??(x?Kt(p,x,a):p);let K;t[9]!==s||t[10]!==m||t[11]!==i?(K={orgSlug:m,virtualMcpId:i,branch:s},t[9]=s,t[10]=m,t[11]=i,t[12]=K):K=t[12];const{save:S,flush:J,isPending:Q}=Tt(K);let T;t[13]!==s||t[14]!==m||t[15]!==i?(T={orgSlug:m,virtualMcpId:i,branch:s},t[13]=s,t[14]=m,t[15]=i,t[16]=T):T=t[16];const W=Ft(T);let F;t[17]!==S?(F=Ot((e,r)=>S(e,r)),t[17]=S,t[18]=F):F=t[18];const X=F,[bt,vt]=A.useState(p),[Y,dt]=A.useState(null),[tt,ut]=A.useState(0);let P;t[19]===Symbol.for("react.memo_cache_sentinel")?(P=[],t[19]=P):P=t[19];const[g,ft]=A.useState(P),[et,d]=A.useState(!1),$=A.useRef(null);bt!==p&&(vt(p),dt(null),ut(Vt),ft([]));let U;t[20]!==x?(U=x??{},t[20]=x,t[21]=U):U=t[21];const ot=U;let y;t[22]!==Y?(y=Y??{},t[22]=Y,t[23]=y):y=t[23];let O;t[24]!==ot||t[25]!==y?(O={...ot,...y},t[24]=ot,t[25]=y,t[26]=O):O=t[26];const rt=O;let z;t[27]!==p||t[28]!==v||t[29]!==S?(z=e=>{const r=e;dt(r),S(p,{...r,__resolveType:v})},t[27]=p,t[28]=v,t[29]=S,t[30]=z):z=t[30];const it=z;let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=e=>{ft(e)},t[31]=I):I=t[31];const E=I;let L;t[32]!==l||t[33]!==J||t[34]!==W||t[35]!==c?(L=async(e,r)=>{try{const{blockKey:u,data:f}=It(e,l);await W.mutateAsync({blockKey:u,data:f}),xt.success(c("sandbox.appEditor.createdSection",{name:u})),r({__resolveType:u}),J()}catch(u){const f=u,yt=f instanceof Error?f.message:c("sandbox.appEditor.failedAddSection");throw xt.error(yt),f}},t[32]=l,t[33]=J,t[34]=W,t[35]=c,t[36]=L):L=t[36];const B=L;let V;t[37]!==d?(V=e=>{$.current=e.append,d(!0)},t[37]=d,t[38]=V):V=t[38];const mt=V;let q;t[39]!==B||t[40]!==d?(q=async e=>{const r=$.current;if(r)try{await B(e,u=>{r(u),d(!1),$.current=null})}catch{}},t[39]=B,t[40]=d,t[41]=q):q=t[41];const st=q,pt=g.length>0?[ct,...g]:[],St="flex h-full flex-col",gt="flex h-12 shrink-0 items-center justify-between border-b px-6",at=pt.length>0?o.jsx("nav",{"aria-label":c("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:pt.map((e,r)=>{const u=r===pt.length-1,f=Pt(e);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[r>0&&o.jsx(wt,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>{E(r===0?[]:$t(g,r)),ut(Lt)},title:f,className:jt("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",u?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:f})]},`${f}-${r}`)})}):o.jsx("span",{className:"text-sm font-medium",children:ct});let k;t[42]!==Q?(k=o.jsx(zt,{isPending:Q,isError:!1}),t[42]=Q,t[43]=k):k=t[43];let j;t[44]!==at||t[45]!==k?(j=o.jsxs("div",{className:gt,children:[at,k]}),t[44]=at,t[45]=k,t[46]=j):j=t[46];let _;t[47]!==p||t[48]!==s||t[49]!==g||t[50]!==l||t[51]!==rt||t[52]!==tt||t[53]!==B||t[54]!==E||t[55]!==it||t[56]!==mt||t[57]!==G||t[58]!==a||t[59]!==m||t[60]!==X||t[61]!==b||t[62]!==M||t[63]!==h||t[64]!==c||t[65]!==i?(_=o.jsx(At,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-6 py-6",children:o.jsx("div",{className:"mx-auto max-w-xl",children:G?o.jsx(Ut,{schema:b,value:rt,onChange:it,basePath:"",breadcrumbPath:g,onBreadcrumbChange:E,decofile:l,meta:a,onSaveReferencedBlock:X,previewBaseUrl:h,onAddSectionItem:B,onRequestAddSection:mt,sandbox:{orgSlug:m,virtualMcpId:i,branch:s}},`${p}:${tt}`):M?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(_t,{size:16,className:"animate-spin"}),c("sandbox.appEditor.loadingSchema")]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:c("sandbox.appEditor.noEditableSchema")})})})}),t[47]=p,t[48]=s,t[49]=g,t[50]=l,t[51]=rt,t[52]=tt,t[53]=B,t[54]=E,t[55]=it,t[56]=mt,t[57]=G,t[58]=a,t[59]=m,t[60]=X,t[61]=b,t[62]=M,t[63]=h,t[64]=c,t[65]=i,t[66]=_):_=t[66];let w;t[67]!==et||t[68]!==l||t[69]!==st||t[70]!==a||t[71]!==h||t[72]!==d?(w=h&&o.jsx(Nt,{open:et,onOpenChange:e=>{d(e),e||($.current=null)},meta:a,decofile:l,previewBaseUrl:h,onSelect:e=>{st(e)}}),t[67]=et,t[68]=l,t[69]=st,t[70]=a,t[71]=h,t[72]=d,t[73]=w):w=t[73];let D;return t[74]!==j||t[75]!==_||t[76]!==w?(D=o.jsxs("div",{className:St,children:[j,_,w]}),t[74]=j,t[75]=_,t[76]=w,t[77]=D):D=t[77],D}function Lt(n){return n+1}function Vt(n){return n+1}export{Lr as AppEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as B,j as o,b as D,F as M,d as $,r as q,B as F,p as R}from"./index-DTCr2n-a.js";import{s as V}from"./Plus-Cf4b1bNp.js";import{i as S}from"./Zap-BUA1_Jut.js";import{S as G}from"./search-input-DsWKOK9t.js";import{P as d}from"./index-mAaX9S9j.js";import{E as T}from"./empty-state-BHXPcV6D.js";import{c as H}from"./use-automations-BqX_0zG2.js";import{c as J}from"./use-navigate-to-agent-CX93JJ-W.js";import{A as K}from"./automation-list-row-DqAvOKpL.js";import{l as O}from"./constants-BSYv1IkQ.js";import{u as Q}from"./use-virtual-mcp-BbdjNQ1e.js";import{R as U}from"./require-capability-BganaMDA.js";import"./SearchMd-B1dsuEY7.js";import"./sidebar-Z1Ar8Iq1.js";import"./LayoutLeft-BKrrf1xY.js";import"./use-mobile-DxjazlC8.js";import"./X-IBBjQPfk.js";import"./tooltip-Dt_WUeQs.js";import"./use-mcp-client-DFoPNyXR.js";import"./auth-CS2cT5wl.js";import"./studio-tools-BBCHIrbu.js";import"./hooks-BasSX9U3.js";import"./decopilot-sse-pool-BbcmZgTF.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./alert-dialog-BBUALe3i.js";import"./dropdown-menu-Dhjx8BUz.js";import"./Check-ErA_74IV.js";import"./ChevronRight-Cf-ty0tK.js";import"./DotsVertical-B9Mg1LjT.js";import"./Stars02-D7QMgn6_.js";import"./Trash01-C4UDDTjr.js";import"./agent-icon-vjhOL9u6.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"./ChevronDown-Dgga4a4Q.js";import"./ChevronSelectorVertical-BS9Eaphx.js";import"./ChevronUp-DOEAI0tE.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"./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"./SearchLg-CIhGyLjl.js";import"./Shield01-EKP5VJCL.js";import"./Stars01-BgC1nyVS.js";import"./Upload01-k3Mh0fZU.js";import"./User01-m6vclzYC.js";import"./Users01-CWeSTta9.js";import"./XClose-BO1_8YHD.js";import"./use-capability-U_kO9pjO.js";import"./access-gate-D3zAqPzH.js";import"./capability-load-error-BornUXv-.js";function W(){const t=B.c(20),i=D(),{org:l}=M(),{data:C}=H(void 0),g=C===void 0?[]:C,k=Q(),P=J(),f=$(),[x,E]=q.useState(""),h=x.toLowerCase(),A=new Map(k.map(X)),b=g.filter(e=>{if(!h||e.name.toLowerCase().includes(h))return!0;if(e.virtual_mcp_id){const p=A.get(e.virtual_mcp_id);if(p&&p.title.toLowerCase().includes(h))return!0}return!1}),z=(e,p)=>{const N=p&&A.has(p)?p:O(l.id);R("automations_list_row_clicked",{automation_id:e,agent_id:N,source:"settings_automations"}),P(N,{search:{main:"automation:"+e}})};let c;t[0]!==f||t[1]!==l.slug?(c=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/agents",params:{org:l.slug}})},t[0]=f,t[1]=l.slug,t[2]=c):c=t[2];const L=c,j=d,v=d,w=d;let r;t[3]!==i?(r=i("settings.automations.pageTitle"),t[3]=i,t[4]=r):r=t[4];let s;t[5]!==r?(s=o.jsx(d.Title,{children:r}),t[5]=r,t[6]=s):s=t[6];const _=g.length>0&&o.jsx(G,{value:x,onChange:E,placeholder:i("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let m;t[7]!==s||t[8]!==_?(m=o.jsxs("div",{className:"flex flex-col gap-6",children:[s,_]}),t[7]=s,t[8]=_,t[9]=m):m=t[9];const y=g.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:i("settings.automations.emptyTitle"),description:i("settings.automations.emptyDescription"),actions:o.jsxs(F,{size:"sm",onClick:L,children:[o.jsx(V,{size:14}),i("settings.automations.browseAgentsButton")]})})}):b.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:i("settings.automations.noResultsTitle"),description:i("settings.automations.noResultsDescription",{search:x})})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:b.map(e=>o.jsx(K,{automation:e,showAgent:!0,onClick:()=>z(e.id,e.virtual_mcp_id)},e.id))});let n;t[10]!==w.Body||t[11]!==m||t[12]!==y?(n=o.jsxs(w.Body,{children:[m,y]}),t[10]=w.Body,t[11]=m,t[12]=y,t[13]=n):n=t[13];let a;t[14]!==v.Content||t[15]!==n?(a=o.jsx(v.Content,{children:n}),t[14]=v.Content,t[15]=n,t[16]=a):a=t[16];let u;return t[17]!==j||t[18]!==a?(u=o.jsx(j,{children:a}),t[17]=j,t[18]=a,t[19]=u):u=t[19],u}function X(t){return[t.id,t]}function yo(){const t=B.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(U,{capability:"automations:manage",area:"automations",children:o.jsx(W,{})}),t[0]=i):i=t[0],i}export{yo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as F,b as T,j as t,E as W,r as C,B as L,t as E}from"./index-DTCr2n-a.js";import{i as X}from"./AlertCircle-DYa65h7M.js";import{i as I}from"./HardDrive-Bxx1_cqg.js";import{s as V}from"./Plus-Cf4b1bNp.js";import{s as Y}from"./Trash01-C4UDDTjr.js";import{g as Z,c as ee,d as te,b as se,f as ie,e as le,a as ne,A as re}from"./alert-dialog-BBUALe3i.js";import{e as ce,d as ae,a as oe,b as de,h as ue,c as me}from"./dialog-B0pGkX2q.js";import{I as P}from"./input-7l72-E74.js";import{L as B}from"./label-Di7XD03t.js";import{S as fe,a as ge,b as xe,c as pe,d as q}from"./select-BRuvjhJw.js";import{S as he}from"./switch-BAlslK2J.js";import{S as be}from"./skeleton-BvZK-LJN.js";import{T as je}from"./textarea-DkNj8yms.js";import{P as $}from"./index-mAaX9S9j.js";import{c as ke}from"./settings-section-BS9eoASN.js";import{a as ye,b as ve,c as Se}from"./use-file-configs-CgH1G4FU.js";import{S as Ce}from"./settings-subnav-D-pYtn7v.js";import{R as Ne}from"./require-capability-BganaMDA.js";import"./X-IBBjQPfk.js";import"./tooltip-Dt_WUeQs.js";import"./Check-ErA_74IV.js";import"./ChevronDown-Dgga4a4Q.js";import"./ChevronUp-DOEAI0tE.js";import"./sidebar-Z1Ar8Iq1.js";import"./LayoutLeft-BKrrf1xY.js";import"./use-mobile-DxjazlC8.js";import"./card-IdHCmi8B.js";import"./ArrowUpRight-Dv9QvAW5.js";import"./studio-tools-BBCHIrbu.js";import"./useRouterState-B0WmwZ8z.js";import"./use-settings-tabs-qdqtthwY.js";import"./use-capability-U_kO9pjO.js";import"./access-gate-D3zAqPzH.js";import"./capability-load-error-BornUXv-.js";function Be(i,e){if(!(i instanceof Error))return e;const s=i.message.match(/\[\s*\{[\s\S]*\}\s*\]/);if(s)try{const l=JSON.parse(s[0])[0];if(l?.message){const n=l.path?.join(".");return n?`${n}: ${l.message}`:l.message}}catch{}return i.message||e}function Pe(i){const e=F.c(6),{error:s}=i,r=T();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(X,{size:16}),e[0]=l):l=e[0];let n;e[1]!==s.message||e[2]!==r?(n=r("settings.buckets.failedToLoadConfigs",{error:s.message}),e[1]=s.message,e[2]=r,e[3]=n):n=e[3];let c;return e[4]!==n?(c=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[l,t.jsx("span",{className:"text-sm font-medium",children:n})]}),e[4]=n,e[5]=c):c=e[5],c}function De(i){const e=F.c(51),{config:s,onDelete:r}=i,l=T();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:t.jsx(I,{size:16,className:"text-muted-foreground"})}),e[0]=n):n=e[0];let c;e[1]!==s.name?(c=t.jsx("span",{className:"font-medium text-sm truncate",children:s.name}),e[1]=s.name,e[2]=c):c=e[2];let a;e[3]!==s.credentialType||e[4]!==l?(a=s.credentialType==="sts-session"?t.jsx("span",{className:"text-[10px] uppercase tracking-wide font-medium px-1.5 py-0.5 rounded bg-muted text-muted-foreground shrink-0",children:"STS"}):s.credentialType==="managed"?t.jsx("span",{className:"text-[10px] uppercase tracking-wide font-medium px-1.5 py-0.5 rounded bg-muted text-muted-foreground shrink-0",children:l("settings.buckets.managed")}):null,e[3]=s.credentialType,e[4]=l,e[5]=a):a=e[5];let m;e[6]!==s.bucket||e[7]!==s.region?(m=t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:[s.bucket," · ",s.region]}),e[6]=s.bucket,e[7]=s.region,e[8]=m):m=e[8];let o;e[9]!==c||e[10]!==a||e[11]!==m?(o=t.jsxs("div",{className:"flex items-center gap-2",children:[c,a,m]}),e[9]=c,e[10]=a,e[11]=m,e[12]=o):o=e[12];let g;e[13]!==s.description?(g=s.description?t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:s.description}):null,e[13]=s.description,e[14]=g):g=e[14];let d;e[15]!==s.endpoint||e[16]!==s.forcePathStyle||e[17]!==l?(d=s.endpoint?t.jsxs("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:[s.endpoint,s.forcePathStyle?` (${l("settings.buckets.pathStyle")})`:""]}):null,e[15]=s.endpoint,e[16]=s.forcePathStyle,e[17]=l,e[18]=d):d=e[18];let f;e[19]!==s.prefix||e[20]!==l?(f=s.prefix?t.jsx("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:l("settings.buckets.prefix",{prefix:s.prefix})}):null,e[19]=s.prefix,e[20]=l,e[21]=f):f=e[21];let u;e[22]!==s.publicUrlBase||e[23]!==l?(u=s.publicUrlBase?t.jsx("p",{className:"text-xs text-muted-foreground/80 mt-0.5 truncate font-mono",children:l("settings.buckets.public",{url:s.publicUrlBase})}):null,e[22]=s.publicUrlBase,e[23]=l,e[24]=u):u=e[24];let b;e[25]!==o||e[26]!==g||e[27]!==d||e[28]!==f||e[29]!==u?(b=t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[n,t.jsxs("div",{className:"min-w-0",children:[o,g,d,f,u]})]}),e[25]=o,e[26]=g,e[27]=d,e[28]=f,e[29]=u,e[30]=b):b=e[30];let j;e[31]!==s.createdAt?(j=new Date(s.createdAt).toLocaleDateString(),e[31]=s.createdAt,e[32]=j):j=e[32];let S;e[33]!==j?(S=t.jsx("span",{className:"text-xs text-muted-foreground",children:j}),e[33]=j,e[34]=S):S=e[34];let v;e[35]!==s||e[36]!==r?(v=()=>r(s),e[35]=s,e[36]=r,e[37]=v):v=e[37];let k;e[38]!==s.name||e[39]!==l?(k=l("settings.buckets.deleteButton",{name:s.name}),e[38]=s.name,e[39]=l,e[40]=k):k=e[40];let y;e[41]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(Y,{size:14}),e[41]=y):y=e[41];let x;e[42]!==v||e[43]!==k?(x=t.jsx(L,{variant:"ghost",size:"sm",onClick:v,"aria-label":k,children:y}),e[42]=v,e[43]=k,e[44]=x):x=e[44];let p;e[45]!==S||e[46]!==x?(p=t.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[S,x]}),e[45]=S,e[46]=x,e[47]=p):p=e[47];let N;return e[48]!==b||e[49]!==p?(N=t.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[b,p]}),e[48]=b,e[49]=p,e[50]=N):N=e[50],N}function Fe(i){const e=F.c(21),{onCreate:s}=i,r=T();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(I,{size:20,className:"text-muted-foreground"})}),e[0]=l):l=e[0];let n;e[1]!==r?(n=r("settings.buckets.noBucketsConfigured"),e[1]=r,e[2]=n):n=e[2];let c;e[3]!==n?(c=t.jsx("p",{className:"font-medium text-sm",children:n}),e[3]=n,e[4]=c):c=e[4];let a;e[5]!==r?(a=r("settings.buckets.emptyStateDescription"),e[5]=r,e[6]=a):a=e[6];let m;e[7]!==a?(m=t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:a}),e[7]=a,e[8]=m):m=e[8];let o;e[9]!==c||e[10]!==m?(o=t.jsxs("div",{children:[c,m]}),e[9]=c,e[10]=m,e[11]=o):o=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(V,{size:14}),e[12]=g):g=e[12];let d;e[13]!==r?(d=r("settings.buckets.addBucket"),e[13]=r,e[14]=d):d=e[14];let f;e[15]!==s||e[16]!==d?(f=t.jsxs(L,{onClick:s,size:"sm",className:"mt-2",children:[g,d]}),e[15]=s,e[16]=d,e[17]=f):f=e[17];let u;return e[18]!==o||e[19]!==f?(u=t.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[l,o,f]}),e[18]=o,e[19]=f,e[20]=u):u=e[20],u}function O({open:i,onOpenChange:e}){const s=T(),[r,l]=C.useState(""),[n,c]=C.useState(""),[a,m]=C.useState(""),[o,g]=C.useState(""),[d,f]=C.useState(""),[u,b]=C.useState(!1),[j,S]=C.useState(""),[v,k]=C.useState(""),[y,x]=C.useState("static"),[p,N]=C.useState(""),[D,w]=C.useState(""),[_,A]=C.useState(""),[K,z]=C.useState(""),U=ve();function H(){l(""),c(""),m(""),g(""),f(""),b(!1),S(""),k(""),x("static"),N(""),w(""),A(""),z("")}const R=y==="sts-session"?!!(_.trim()&&K.trim()):!!(p&&D);async function J(h){if(h.preventDefault(),!r.trim()||!a.trim()||!o.trim()||!R)return;const M=y==="sts-session"?{credentialType:"sts-session",refreshUrl:_.trim(),apiKey:K.trim()}:{credentialType:"static",accessKeyId:p,secretAccessKey:D};try{await U.mutateAsync({name:r.trim(),description:n.trim()||void 0,bucket:a.trim(),region:o.trim(),endpoint:d.trim()||void 0,forcePathStyle:u,prefix:j.trim()||void 0,publicUrlBase:v.trim()||void 0,...M}),E.success(s("settings.buckets.bucketAdded",{name:r.trim()})),H(),e(!1)}catch(Q){E.error(Be(Q,s("settings.buckets.failedToAddBucket")))}}const G=U.isPending||!r.trim()||!a.trim()||!o.trim()||!R;return t.jsx(ce,{open:i,onOpenChange:e,children:t.jsxs(ae,{className:"sm:max-w-lg max-h-[90vh] overflow-y-auto",children:[t.jsxs(oe,{children:[t.jsx(de,{children:s("settings.buckets.addS3Bucket")}),t.jsx(ue,{children:s("settings.buckets.credentialsEncryptedDescription")})]}),t.jsxs("form",{onSubmit:J,className:"space-y-4",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-name",children:s("settings.buckets.nameLabel")}),t.jsx(P,{id:"file-config-name",value:r,onChange:h=>l(h.target.value),placeholder:s("settings.buckets.namePlaceholder"),autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.nameHelperText")})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-bucket",children:s("settings.buckets.bucketLabel")}),t.jsx(P,{id:"file-config-bucket",value:a,onChange:h=>m(h.target.value),placeholder:s("settings.buckets.bucketPlaceholder"),autoComplete:"off",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-region",children:s("settings.buckets.regionLabel")}),t.jsx(P,{id:"file-config-region",value:o,onChange:h=>g(h.target.value),placeholder:s("settings.buckets.regionPlaceholder"),autoComplete:"off",required:!0})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-endpoint",children:s("settings.buckets.endpointLabel")}),t.jsx(P,{id:"file-config-endpoint",type:"url",value:d,onChange:h=>f(h.target.value),placeholder:s("settings.buckets.endpointPlaceholder"),autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.endpointHelperText")})]}),t.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border/60 p-3",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx(B,{htmlFor:"file-config-path-style",className:"text-sm",children:s("settings.buckets.forcePathStyleLabel")}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:s("settings.buckets.forcePathStyleHelperText")})]}),t.jsx(he,{id:"file-config-path-style",checked:u,onCheckedChange:b})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-prefix",children:s("settings.buckets.prefixLabel")}),t.jsx(P,{id:"file-config-prefix",value:j,onChange:h=>S(h.target.value),placeholder:s("settings.buckets.prefixPlaceholder"),autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.prefixHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-public-url-base",children:s("settings.buckets.publicUrlBaseLabel")}),t.jsx(P,{id:"file-config-public-url-base",type:"url",value:v,onChange:h=>k(h.target.value),placeholder:s("settings.buckets.publicUrlBasePlaceholder"),autoComplete:"off"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.publicUrlBaseHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-credential-type",children:s("settings.buckets.credentialsLabel")}),t.jsxs(fe,{value:y,onValueChange:h=>x(h),children:[t.jsx(ge,{id:"file-config-credential-type",className:"w-full",children:t.jsx(xe,{})}),t.jsxs(pe,{children:[t.jsx(q,{value:"static",children:s("settings.buckets.staticKeyOption")}),t.jsx(q,{value:"sts-session",children:s("settings.buckets.temporarySessionOption")})]})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s(y==="sts-session"?"settings.buckets.stsSessionHelperText":"settings.buckets.staticKeyHelperText")})]}),y==="static"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-access-key",children:s("settings.buckets.accessKeyIdLabel")}),t.jsx(P,{id:"file-config-access-key",value:p,onChange:h=>N(h.target.value),autoComplete:"off",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-secret-key",children:s("settings.buckets.secretAccessKeyLabel")}),t.jsx(P,{id:"file-config-secret-key",type:"password",value:D,onChange:h=>w(h.target.value),autoComplete:"new-password",required:!0})]})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-refresh-url",children:s("settings.buckets.refreshUrlLabel")}),t.jsx(P,{id:"file-config-refresh-url",type:"url",value:_,onChange:h=>A(h.target.value),placeholder:s("settings.buckets.refreshUrlPlaceholder"),autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.refreshUrlHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-api-key",children:s("settings.buckets.apiKeyLabel")}),t.jsx(P,{id:"file-config-api-key",type:"password",value:K,onChange:h=>z(h.target.value),autoComplete:"new-password",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("settings.buckets.apiKeyHelperText")})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(B,{htmlFor:"file-config-description",children:s("settings.buckets.descriptionLabel")}),t.jsx(je,{id:"file-config-description",value:n,onChange:h=>c(h.target.value),rows:2,placeholder:s("settings.buckets.descriptionPlaceholder")})]}),t.jsxs(me,{children:[t.jsx(L,{type:"button",variant:"outline",onClick:()=>{H(),e(!1)},disabled:U.isPending,children:s("settings.buckets.cancelButton")}),t.jsx(L,{type:"submit",disabled:G,children:U.isPending?s("settings.buckets.addingButton"):s("settings.buckets.addBucketButton")})]})]})]})})}function Te(i){const e=F.c(41),{config:s,onClose:r}=i,l=T(),n=Se();let c;e[0]!==s||e[1]!==n||e[2]!==r||e[3]!==l?(c=async function(){if(s)try{await n.mutateAsync(s.id),E.success(l("settings.buckets.bucketRemoved",{name:s.name})),r()}catch(_){const A=_;E.error(A instanceof Error?A.message:l("settings.buckets.failedToRemoveBucket"))}},e[0]=s,e[1]=n,e[2]=r,e[3]=l,e[4]=c):c=e[4];const a=c,m=s!==null;let o;e[5]!==r?(o=w=>!w&&r(),e[5]=r,e[6]=o):o=e[6];let g;e[7]!==l?(g=l("settings.buckets.removeBucketTitle"),e[7]=l,e[8]=g):g=e[8];let d;e[9]!==g?(d=t.jsx(ee,{children:g}),e[9]=g,e[10]=d):d=e[10];const f=s?.name??"";let u;e[11]!==l||e[12]!==f?(u=l("settings.buckets.removeBucketDescription",{name:f}),e[11]=l,e[12]=f,e[13]=u):u=e[13];let b;e[14]!==u?(b=t.jsx(te,{children:u}),e[14]=u,e[15]=b):b=e[15];let j;e[16]!==d||e[17]!==b?(j=t.jsxs(se,{children:[d,b]}),e[16]=d,e[17]=b,e[18]=j):j=e[18];const S=n.isPending;let v;e[19]!==l?(v=l("settings.buckets.cancelButton"),e[19]=l,e[20]=v):v=e[20];let k;e[21]!==n.isPending||e[22]!==v?(k=t.jsx(ie,{disabled:S,children:v}),e[21]=n.isPending,e[22]=v,e[23]=k):k=e[23];let y;e[24]!==n.isPending||e[25]!==l?(y=n.isPending?l("settings.buckets.removingButton"):l("settings.buckets.removeButton"),e[24]=n.isPending,e[25]=l,e[26]=y):y=e[26];let x;e[27]!==n.isPending||e[28]!==a||e[29]!==y?(x=t.jsx(Z,{onClick:a,disabled:n.isPending,children:y}),e[27]=n.isPending,e[28]=a,e[29]=y,e[30]=x):x=e[30];let p;e[31]!==k||e[32]!==x?(p=t.jsxs(le,{children:[k,x]}),e[31]=k,e[32]=x,e[33]=p):p=e[33];let N;e[34]!==p||e[35]!==j?(N=t.jsxs(ne,{children:[j,p]}),e[34]=p,e[35]=j,e[36]=N):N=e[36];let D;return e[37]!==N||e[38]!==m||e[39]!==o?(D=t.jsx(re,{open:m,onOpenChange:o,children:N}),e[37]=N,e[38]=m,e[39]=o,e[40]=D):D=e[40],D}function we(){const i=F.c(32),e=T(),s=ye(),[r,l]=C.useState(!1),[n,c]=C.useState(null);if(s.length===0){let x;i[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Fe,{onCreate:()=>l(!0)}),i[0]=x):x=i[0];let p;return i[1]!==r?(p=t.jsxs(t.Fragment,{children:[x,t.jsx(O,{open:r,onOpenChange:l})]}),i[1]=r,i[2]=p):p=i[2],p}let a;i[3]!==s.length||i[4]!==e?(a=e("settings.buckets.bucketsConfigured",{count:s.length}),i[3]=s.length,i[4]=e,i[5]=a):a=i[5];let m;i[6]!==a?(m=t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),i[6]=a,i[7]=m):m=i[7];let o;i[8]===Symbol.for("react.memo_cache_sentinel")?(o=()=>l(!0),i[8]=o):o=i[8];let g;i[9]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(V,{size:14}),i[9]=g):g=i[9];let d;i[10]!==e?(d=e("settings.buckets.addBucket"),i[10]=e,i[11]=d):d=i[11];let f;i[12]!==d?(f=t.jsxs(L,{onClick:o,size:"sm",children:[g,d]}),i[12]=d,i[13]=f):f=i[13];let u;i[14]!==m||i[15]!==f?(u=t.jsxs("div",{className:"flex items-center justify-between",children:[m,f]}),i[14]=m,i[15]=f,i[16]=u):u=i[16];let b;if(i[17]!==s){let x;i[19]===Symbol.for("react.memo_cache_sentinel")?(x=p=>t.jsx(De,{config:p,onDelete:c},p.id),i[19]=x):x=i[19],b=s.map(x),i[17]=s,i[18]=b}else b=i[18];let j;i[20]!==b?(j=t.jsx("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:t.jsx("div",{children:b})}),i[20]=b,i[21]=j):j=i[21];let S;i[22]!==r?(S=t.jsx(O,{open:r,onOpenChange:l}),i[22]=r,i[23]=S):S=i[23];let v;i[24]===Symbol.for("react.memo_cache_sentinel")?(v=()=>c(null),i[24]=v):v=i[24];let k;i[25]!==n?(k=t.jsx(Te,{config:n,onClose:v}),i[25]=n,i[26]=k):k=i[26];let y;return i[27]!==k||i[28]!==u||i[29]!==j||i[30]!==S?(y=t.jsxs(t.Fragment,{children:[u,j,S,k]}),i[27]=k,i[28]=u,i[29]=j,i[30]=S,i[31]=y):y=i[31],y}function _e(){const i=F.c(6),e=T();let s;i[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(Ce,{group:"storage"}),i[0]=s):s=i[0];let r;i[1]!==e?(r=c=>{const{error:a}=c;return t.jsx(Pe,{error:a??new Error(e("settings.buckets.failedToLoadConfigsFallback"))})},i[1]=e,i[2]=r):r=i[2];let l;i[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(C.Suspense,{fallback:t.jsx(be,{className:"h-32 w-full"}),children:t.jsx(we,{})}),i[3]=l):l=i[3];let n;return i[4]!==r?(n=t.jsx($,{children:t.jsx($.Content,{children:t.jsx($.Body,{children:t.jsxs(ke,{children:[s,t.jsx(W,{fallback:r,children:l})]})})})}),i[4]=r,i[5]=n):n=i[5],n}function ft(){const i=F.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ne,{capability:"file-configs:manage",area:"files",children:t.jsx(_e,{})}),i[0]=e):e=i[0],e}export{ft as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as he,b as je,r as de,j as t,k as ye,B as ne}from"./index-DTCr2n-a.js";import{B as ue}from"./agent-icon-vjhOL9u6.js";import{i as Ne}from"./X-IBBjQPfk.js";import{L as ce}from"./label-Di7XD03t.js";import{an as xe,ao as ke}from"./index-BnYSClvU.js";import{S as Ce,a as Pe,b as Se,c as ve,d as _e}from"./select-BRuvjhJw.js";import{T as Te,a as we,c as Be}from"./tooltip-Dt_WUeQs.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"./ChevronRight-Cf-ty0tK.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"./Zap-BUA1_Jut.js";import"./chat-context-Df1gS1sI.js";import"./tab-id-CYxMrTRp.js";import"./dialog-B0pGkX2q.js";import"./hooks-BasSX9U3.js";import"./use-mcp-client-DFoPNyXR.js";import"./constants-BSYv1IkQ.js";import"./auth-CS2cT5wl.js";import"./decopilot-sse-pool-BbcmZgTF.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-BbdjNQ1e.js";import"./use-ai-providers-DwZngUHl.js";import"./studio-tools-BBCHIrbu.js";import"./use-decopilot-events-8dmobXlE.js";import"./use-organization-settings-kcm-WdX5.js";import"./automation-runs-C7VPpqIt.js";import"./useInfiniteQuery-CMi-ILZI.js";import"./use-infinite-scroll-Dzm35RNS.js";import"./use-connection-D7--TeDa.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"./useSuspenseInfiniteQuery-Cw5NEgMj.js";import"./avatar-md-XNPuR.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BGwAE5Xe.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";import"./drawer-9chetton.js";import"./collection-search-BQLruUQ4.js";import"./deco-site-production-url-BjY4ZYd-.js";import"./tabs-DeNiwmVV.js";import"./toggle-group-Do3gb8uy.js";import"./use-commerce-diagnostic-DL4B4X1w.js";import"./popover-CfGL7saO.js";import"./self-tool-result-mEKHKLZ8.js";import"./alert-dialog-BBUALe3i.js";import"./extract-connection-data-DyM1tiNg.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-UZPGD-zb.js";import"./authenticate-and-persist-oauth-CB658Lpc.js";import"./mcp-oauth-_naDcGdv.js";import"./track-C3SQxOl4.js";import"./toolbar-DEkBOfzd.js";import"./skeleton-BvZK-LJN.js";import"./github-repo-picker-B0itW_sn.js";import"./use-mcp-tools-ByMlhxuh.js";import"./agent-capabilities-C4tLW0Za.js";import"./connection-card-2s-BDhzN.js";import"./use-registry-connections-BvzfOtMr.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-DkNj8yms.js";import"./connection-form-helpers-BahPv0zc.js";import"./collection-tabs-Dfa_vQOq.js";import"./badge-BR2WgVsV.js";import"./command-CXX8Roxa.js";import"./index-CJWr9N0v.js";import"./select-model-Dqz5FPx4.js";import"./checkbox-CNnFytxt.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BS9eoASN.js";import"./cards-B5pz2XNy.js";import"./dropdown-menu-Dhjx8BUz.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BWK3t0nt.js";import"./use-capability-U_kO9pjO.js";import"./use-file-configs-CgH1G4FU.js";import"./pt-BR-CLy76QW2.js";import"./switch-BAlslK2J.js";import"./use-debounced-autosave-BDvfPMkV.js";import"./index-mAaX9S9j.js";import"./search-input-DsWKOK9t.js";import"./index-DBsyf30G.js";import"./use-secrets-CAbcEA8g.js";import"./AreaChart-Z7000aGF.js";import"./use-tags-Bcd_6z1e.js";import"./get-initials-D-f_fDFw.js";import"./automation-list-row-DqAvOKpL.js";import"./use-org-repo-syncs-CugnYvLM.js";function Bi(i){const e=he.c(121),{posts:X,categories:l,initialSlug:se,isPending:r,onApply:le,onClose:p}=i,o=je(),[m,fe]=de.useState(se&&l.some(a=>a.slug===se)?se:l[0]?.slug??""),[n,ge]=de.useState("add");let Y;if(e[0]!==l||e[1]!==m){let a;e[3]!==m?(a=be=>be.slug===m,e[3]=m,e[4]=a):a=e[4],Y=l.find(a),e[0]=l,e[1]=m,e[2]=Y}else Y=e[2];const c=Y,s=X.length,me=String(s);let d;e[5]!==o||e[6]!==me?(d=o("sandbox.bulkCategoryPanel.selectedCount",{count:me}),e[5]=o,e[6]=me,e[7]=d):d=e[7];let x;e[8]!==d?(x=t.jsx("span",{className:"truncate text-sm font-medium",children:d}),e[8]=d,e[9]=x):x=e[9];let u;e[10]!==o?(u=o("sandbox.bulkCategoryPanel.exitSelection"),e[10]=o,e[11]=u):u=e[11];let Z;e[12]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx(Ne,{size:14}),e[12]=Z):Z=e[12];let f;e[13]!==r||e[14]!==p||e[15]!==u?(f=t.jsx(Te,{asChild:!0,children:t.jsx(ne,{type:"button",variant:"ghost",size:"icon",disabled:r,onClick:p,"aria-label":u,children:Z})}),e[13]=r,e[14]=p,e[15]=u,e[16]=f):f=e[16];let g;e[17]!==o?(g=o("sandbox.bulkCategoryPanel.exitSelection"),e[17]=o,e[18]=g):g=e[18];let b;e[19]!==g?(b=t.jsx(we,{side:"bottom",children:g}),e[19]=g,e[20]=b):b=e[20];let h;e[21]!==f||e[22]!==b?(h=t.jsxs(Be,{children:[f,b]}),e[21]=f,e[22]=b,e[23]=h):h=e[23];let j;e[24]!==h||e[25]!==x?(j=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[x,h]}),e[24]=h,e[25]=x,e[26]=j):j=e[26];let y;e[27]!==o?(y=o("sandbox.bulkCategoryPanel.title"),e[27]=o,e[28]=y):y=e[28];let N;e[29]!==y?(N=t.jsx("h2",{className:"text-2xl font-bold text-foreground",children:y}),e[29]=y,e[30]=N):N=e[30];let k;e[31]!==s||e[32]!==o?(k=s===0?o("sandbox.bulkCategoryPanel.descriptionEmpty"):o("sandbox.bulkCategoryPanel.descriptionWithCount",{count:String(s)}),e[31]=s,e[32]=o,e[33]=k):k=e[33];let C;e[34]!==k?(C=t.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:k}),e[34]=k,e[35]=C):C=e[35];let P;e[36]!==o?(P=o("sandbox.bulkCategoryPanel.categoryLabel"),e[36]=o,e[37]=P):P=e[37];let S;e[38]!==P?(S=t.jsx(ce,{children:P}),e[38]=P,e[39]=S):S=e[39];let v;e[40]!==l||e[41]!==m||e[42]!==o?(v=l.length===0?t.jsx("p",{className:"text-sm text-muted-foreground",children:o("sandbox.bulkCategoryPanel.noCategoriesMessage")}):t.jsxs(Ce,{value:m,onValueChange:fe,children:[t.jsx(Pe,{className:"w-full",children:t.jsx(Se,{placeholder:o("sandbox.bulkCategoryPanel.selectCategoryPlaceholder")})}),t.jsx(ve,{children:l.map(ze)})]}),e[40]=l,e[41]=m,e[42]=o,e[43]=v):v=e[43];let _;e[44]!==S||e[45]!==v?(_=t.jsxs("div",{className:"space-y-2",children:[S,v]}),e[44]=S,e[45]=v,e[46]=_):_=e[46];let ee;e[47]===Symbol.for("react.memo_cache_sentinel")?(ee=a=>ge(a),e[47]=ee):ee=e[47];let te;e[48]===Symbol.for("react.memo_cache_sentinel")?(te=t.jsx(xe,{value:"add",id:"cat-mode-add",className:"mt-0.5"}),e[48]=te):te=e[48];let T;e[49]!==o?(T=o("sandbox.bulkCategoryPanel.modeAddTitle"),e[49]=o,e[50]=T):T=e[50];let w;e[51]!==T?(w=t.jsx("span",{className:"block text-sm font-medium",children:T}),e[51]=T,e[52]=w):w=e[52];let B;e[53]!==o?(B=o("sandbox.bulkCategoryPanel.modeAddDescription"),e[53]=o,e[54]=B):B=e[54];let R;e[55]!==B?(R=t.jsx("span",{className:"block text-xs text-muted-foreground",children:B}),e[55]=B,e[56]=R):R=e[56];let z;e[57]!==w||e[58]!==R?(z=t.jsxs(ce,{htmlFor:"cat-mode-add",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3",children:[te,t.jsxs("span",{className:"space-y-0.5",children:[w,R]})]}),e[57]=w,e[58]=R,e[59]=z):z=e[59];let oe;e[60]===Symbol.for("react.memo_cache_sentinel")?(oe=t.jsx(xe,{value:"replace",id:"cat-mode-replace",className:"mt-0.5"}),e[60]=oe):oe=e[60];let E;e[61]!==o?(E=o("sandbox.bulkCategoryPanel.modeReplaceTitle"),e[61]=o,e[62]=E):E=e[62];let L;e[63]!==E?(L=t.jsx("span",{className:"block text-sm font-medium",children:E}),e[63]=E,e[64]=L):L=e[64];let A;e[65]!==o?(A=o("sandbox.bulkCategoryPanel.modeReplaceDescription"),e[65]=o,e[66]=A):A=e[66];let F;e[67]!==A?(F=t.jsx("span",{className:"block text-xs text-muted-foreground",children:A}),e[67]=A,e[68]=F):F=e[68];let M;e[69]!==L||e[70]!==F?(M=t.jsxs(ce,{htmlFor:"cat-mode-replace",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3",children:[oe,t.jsxs("span",{className:"space-y-0.5",children:[L,F]})]}),e[69]=L,e[70]=F,e[71]=M):M=e[71];let V;e[72]!==n||e[73]!==z||e[74]!==M?(V=t.jsxs(ke,{value:n,onValueChange:ee,className:"gap-2",children:[z,M]}),e[72]=n,e[73]=z,e[74]=M,e[75]=V):V=e[75];let $;e[76]!==o?($=o("sandbox.bulkCategoryPanel.cancelButton"),e[76]=o,e[77]=$):$=e[77];let D;e[78]!==r||e[79]!==p||e[80]!==$?(D=t.jsx(ne,{type:"button",variant:"outline",onClick:p,disabled:r,children:$}),e[78]=r,e[79]=p,e[80]=$,e[81]=D):D=e[81];const ae=!c||r||s===0;let G;e[82]!==n||e[83]!==le||e[84]!==c?(G=()=>c&&le(n,{name:c.name,slug:c.slug}),e[82]=n,e[83]=le,e[84]=c,e[85]=G):G=e[85];let I;e[86]!==r||e[87]!==o?(I=r?t.jsxs(t.Fragment,{children:[t.jsx(ye,{size:14,className:"animate-spin"}),o("sandbox.bulkCategoryPanel.updatingButton")]}):o("sandbox.bulkCategoryPanel.applyButton"),e[86]=r,e[87]=o,e[88]=I):I=e[88];let W;e[89]!==ae||e[90]!==G||e[91]!==I?(W=t.jsx(ne,{type:"button",disabled:ae,onClick:G,children:I}),e[89]=ae,e[90]=G,e[91]=I,e[92]=W):W=e[92];let q;e[93]!==D||e[94]!==W?(q=t.jsxs("div",{className:"flex justify-end gap-2",children:[D,W]}),e[93]=D,e[94]=W,e[95]=q):q=e[95];let H;e[96]!==_||e[97]!==V||e[98]!==q?(H=t.jsxs("div",{className:"mt-6 space-y-4",children:[_,V,q]}),e[96]=_,e[97]=V,e[98]=q,e[99]=H):H=e[99];let ie;e[100]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ue,{size:16,className:"shrink-0 text-muted-foreground"}),e[100]=ie):ie=e[100];const pe=String(s);let J;e[101]!==o||e[102]!==pe?(J=o("sandbox.bulkCategoryPanel.selectedPostsLabel",{count:pe}),e[101]=o,e[102]=pe,e[103]=J):J=e[103];let K;e[104]!==J?(K=t.jsxs("div",{className:"flex items-center gap-2 px-4 py-3",children:[ie,t.jsx("span",{className:"text-sm",children:J})]}),e[104]=J,e[105]=K):K=e[105];let O;e[106]!==s||e[107]!==X||e[108]!==o?(O=s===0?t.jsx("p",{className:"border-t bg-background px-4 py-3 text-sm text-muted-foreground",children:o("sandbox.bulkCategoryPanel.noPostsSelectedMessage")}):t.jsx("ul",{className:"divide-y border-t bg-background",children:X.map(Re)}),e[106]=s,e[107]=X,e[108]=o,e[109]=O):O=e[109];let Q;e[110]!==K||e[111]!==O?(Q=t.jsxs("div",{className:"mt-8 overflow-hidden rounded-lg border bg-muted/30",children:[K,O]}),e[110]=K,e[111]=O,e[112]=Q):Q=e[112];let U;e[113]!==N||e[114]!==C||e[115]!==H||e[116]!==Q?(U=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-2xl px-8 py-8",children:[N,C,H,Q]})}),e[113]=N,e[114]=C,e[115]=H,e[116]=Q,e[117]=U):U=e[117];let re;return e[118]!==j||e[119]!==U?(re=t.jsxs("div",{className:"flex h-full flex-col",children:[j,U]}),e[118]=j,e[119]=U,e[120]=re):re=e[120],re}function Re(i){return t.jsxs("li",{className:"flex items-center gap-2.5 px-4 py-2.5",children:[t.jsx(ue,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:i.title}),i.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:i.slug})]})]},i.key)}function ze(i){return t.jsx(_e,{value:i.slug,children:t.jsx("span",{className:"truncate",children:i.name})},i.slug)}export{Bi as BulkCategoryPanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as l,m as n,j as c}from"./index-DTCr2n-a.js";function i(a){const e=l.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==s||e[6]!==r?(o=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=o):o=e[7],o}function f(a){const e=l.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as G,r as k,m as Q,j as t,b as X,B as I,k as Z,t as W}from"./index-DTCr2n-a.js";import{i as _}from"./XCircle-3TmYYaVT.js";import{b1 as K,B as U}from"./agent-icon-vjhOL9u6.js";import{n as tt}from"./LinkExternal01-lwDudDKU.js";import{A as ot,a as et,b as rt,c as it,d as st,e as at,f as nt,g as mt}from"./alert-dialog-BBUALe3i.js";import{I as H}from"./input-7l72-E74.js";import{L as J}from"./label-Di7XD03t.js";import{F as lt,R as pt,T as ct,al as dt,J as ut,V as A,Y as gt,am as xt,W as ft}from"./index-BnYSClvU.js";import{c as ht,B as yt,a as bt}from"./block-document-yl-Al_kf.js";import{u as jt}from"./use-autosave-P4ije4un.js";import{t as vt}from"./ChevronDown-Dgga4a4Q.js";import{af as Et,ag as Nt,ae as Ct}from"./automation-runs-C7VPpqIt.js";import{s as j,E as St}from"./primitives-DIc8lbRG.js";import"./AlertCircle-DYa65h7M.js";import"./Tool01-BjJidQ3c.js";import"./ArrowUp-DaPuMC6J.js";import"./ArrowLeft-D0sSJGyh.js";import"./Tool02-Bs7nBBx_.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"./ChevronRight-Cf-ty0tK.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"./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"./chat-context-Df1gS1sI.js";import"./tab-id-CYxMrTRp.js";import"./dialog-B0pGkX2q.js";import"./hooks-BasSX9U3.js";import"./use-mcp-client-DFoPNyXR.js";import"./constants-BSYv1IkQ.js";import"./auth-CS2cT5wl.js";import"./decopilot-sse-pool-BbcmZgTF.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-BbdjNQ1e.js";import"./use-ai-providers-DwZngUHl.js";import"./studio-tools-BBCHIrbu.js";import"./use-decopilot-events-8dmobXlE.js";import"./use-organization-settings-kcm-WdX5.js";import"./spinner-glqojFDA.js";import"./tooltip-Dt_WUeQs.js";import"./drawer-9chetton.js";import"./collection-search-BQLruUQ4.js";import"./use-mobile-DxjazlC8.js";import"./chart-Dw43HBj2.js";import"./index-ZiQvvnOE.js";import"./shell-layout-B7KEX529.js";import"./avatar-md-XNPuR.js";import"./required-auth-layout-DgjkQLI6.js";import"./use-org-sso-CHwTj_pK.js";import"./deco-site-production-url-BjY4ZYd-.js";import"./form-Cb2ftegM.js";import"./select-BRuvjhJw.js";import"./tabs-DeNiwmVV.js";import"./toggle-group-Do3gb8uy.js";import"./use-commerce-diagnostic-DL4B4X1w.js";import"./sidebar-Z1Ar8Iq1.js";import"./popover-CfGL7saO.js";import"./self-tool-result-mEKHKLZ8.js";import"./integration-icon-9hdQMmio.js";import"./extract-connection-data-DyM1tiNg.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-UZPGD-zb.js";import"./authenticate-and-persist-oauth-CB658Lpc.js";import"./mcp-oauth-_naDcGdv.js";import"./track-C3SQxOl4.js";import"./toolbar-DEkBOfzd.js";import"./skeleton-BvZK-LJN.js";import"./github-repo-picker-B0itW_sn.js";import"./use-connection-D7--TeDa.js";import"./use-mcp-tools-ByMlhxuh.js";import"./use-navigate-to-agent-CX93JJ-W.js";import"./reusable-new-chat-CouMjkYR.js";import"./agent-capabilities-C4tLW0Za.js";import"./connection-card-2s-BDhzN.js";import"./use-registry-connections-BvzfOtMr.js";import"./useInfiniteQuery-CMi-ILZI.js";import"./use-infinite-scroll-Dzm35RNS.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-IdHCmi8B.js";import"./textarea-DkNj8yms.js";import"./connection-form-helpers-BahPv0zc.js";import"./collection-tabs-Dfa_vQOq.js";import"./badge-BR2WgVsV.js";import"./useSuspenseInfiniteQuery-Cw5NEgMj.js";import"./command-CXX8Roxa.js";import"./index-CJWr9N0v.js";import"./use-clock-tick-yZZNkqhy.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./select-model-Dqz5FPx4.js";import"./checkbox-CNnFytxt.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BS9eoASN.js";import"./cards-B5pz2XNy.js";import"./dropdown-menu-Dhjx8BUz.js";import"./file-type-icon-jL53noJP.js";import"./question-004-sINsf4GQ.js";import"./use-members-DpAa0K8W.js";import"./use-org-auth-client-CiGZ-xlx.js";import"./use-status-sounds-BWK3t0nt.js";import"./empty-state-BHXPcV6D.js";import"./types-Dh-L4V2P.js";import"./use-capability-U_kO9pjO.js";import"./use-file-configs-CgH1G4FU.js";import"./monaco-editor-DgD9evL7.js";import"./pt-BR-CLy76QW2.js";import"./switch-BAlslK2J.js";import"./use-debounced-autosave-BDvfPMkV.js";import"./index-mAaX9S9j.js";import"./search-input-DsWKOK9t.js";import"./index-DBsyf30G.js";import"./use-secrets-CAbcEA8g.js";import"./AreaChart-Z7000aGF.js";import"./use-copy-BGwAE5Xe.js";import"./use-tags-Bcd_6z1e.js";import"./get-initials-D-f_fDFw.js";import"./use-automations-BqX_0zG2.js";import"./automation-list-row-DqAvOKpL.js";import"./use-org-repo-syncs-CugnYvLM.js";import"./table-_DZMZF7n.js";function wt(y){const o=G.c(18),{icon:u,title:n,defaultOpen:v,children:g}=y,P=v===void 0?!1:v,[x,D]=k.useState(P);let m;o[0]!==u?(m=t.jsx(u,{size:15}),o[0]=u,o[1]=m):m=o[1];let r;o[2]!==n?(r=t.jsx("span",{className:"flex-1 text-left",children:n}),o[2]=n,o[3]=r):r=o[3];const a=x&&"rotate-180";let l;o[4]!==a?(l=Q("transition-transform",a),o[4]=a,o[5]=l):l=o[5];let p;o[6]!==l?(p=t.jsx(vt,{size:15,className:l}),o[6]=l,o[7]=p):p=o[7];let i;o[8]!==m||o[9]!==r||o[10]!==p?(i=t.jsx(Et,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[m,r,p]})}),o[8]=m,o[9]=r,o[10]=p,o[11]=i):i=o[11];let c;o[12]!==g?(c=t.jsx(Nt,{className:"px-2 pt-4",children:g}),o[12]=g,o[13]=c):c=o[13];let f;return o[14]!==x||o[15]!==i||o[16]!==c?(f=t.jsxs(Ct,{open:x,onOpenChange:D,className:"mt-4",children:[i,c]}),o[14]=x,o[15]=i,o[16]=c,o[17]=f):f=o[17],f}function kr({orgSlug:y,virtualMcpId:o,branch:u,blockKey:n,block:v,decofile:g,meta:P,onManagePosts:x,onOpenPost:D,previewBaseUrl:m}){const r=X(),a=lt({orgSlug:y,virtualMcpId:o,branch:u}),l=pt({orgSlug:y,virtualMcpId:o,branch:u}),p=ct(v,"categories"),[i,c,f]=jt(p,e=>{a.mutate({blockKey:n,data:A(n,"categories",e)})}),E=(e,w)=>c({...i,[e]:w}),T=ht({decofile:g,category:i,previewBaseUrl:m,draftPointer:l}),s=j(i.slug),[B,b]=k.useState(s),[d,N]=k.useState(null),[C,z]=k.useState(!1),F=s?dt(g).filter(e=>e.categorySlugs.includes(s)):[],S=F.length,M=e=>E("slug",e),V=async(e,w)=>{const q=j(i.name);z(!0);try{let h=0;for(const{key:O,payload:L}of gt(g,"posts")){const $=xt(L,e,{name:q,slug:w});$!==L&&(await a.mutateAsync({blockKey:O,data:A(O,"posts",ft($))}),h+=1)}const R={...i,slug:w};await a.mutateAsync({blockKey:n,data:A(n,"categories",R)}),f(R),W.success(h>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),N(null)}catch(h){b(e),N(null),W.error(h instanceof Error?h.message:r("sandbox.categoryEditor.renameFailed"))}finally{z(!1)}},Y=()=>{const e=B.trim();if(e===s){B!==e&&b(e);return}if(!e){b(s);return}if(S===0){M(e);return}N({oldSlug:s,newSlug:e,count:S})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:j(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(ut,{isPending:a.isPending,isError:a.isError}),T&&t.jsxs(I,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(T,"_blank","noopener,noreferrer"),children:[t.jsx(tt,{size:14}),r("sandbox.categoryEditor.seeCategoryPreview")]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(St,{value:j(i.name),onChange:e=>E("name",e),placeholder:r("sandbox.categoryEditor.categoryNamePlaceholder"),className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(J,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(H,{id:"category-slug",value:B,onChange:e=>b(e.target.value),onBlur:Y,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(J,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(H,{id:"category-description",value:j(i.description),onChange:e=>E("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(wt,{icon:K,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(yt,{value:bt(i.sections),onChange:e=>E("sections",e),meta:P,sandboxRef:{orgSlug:y,virtualMcpId:o,branch:u},emptyMessage:r("sandbox.categoryEditor.noContentEmpty")})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(U,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(S)})})]}),t.jsxs(I,{type:"button",variant:"outline",size:"sm",disabled:!s,title:r(s?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>x(s),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(_,{size:14})]})]}),S>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:F.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>D(e.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(U,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:e.title||r("sandbox.categoryEditor.untitledPost")}),e.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.slug})]})]})},e.key))})]})]})})]}),t.jsx(ot,{open:!!d,onOpenChange:e=>{e||C||(b(s),N(null))},children:t.jsxs(et,{children:[t.jsxs(rt,{children:[t.jsx(it,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(st,{children:d?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:d.oldSlug,newSlug:d.newSlug,count:String(d.count)}):null})]}),t.jsxs(at,{children:[t.jsx(nt,{disabled:C,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(mt,{onClick:e=>{e.preventDefault(),d&&V(d.oldSlug,d.newSlug)},disabled:C,children:C?t.jsxs(t.Fragment,{children:[t.jsx(Z,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{kr as CategoryEditor};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import{X as S,Y as C,a2 as ee,Z as i,_ as he,a1 as Ie,aO as Ce,cy as It,bk as qe,b8 as dt,c as le,J as ut,u as He,o as Be,F as te,K as pe,t as ue,I as ge,G as ye,d as pt,f as Mt,r as v,n as Tt,e as Ct,j as Me,b as De,a as At,v as Pt,a6 as _t,p as Rt}from"./index-DTCr2n-a.js";import{e as Et,t as Dt,A as ht,u as $t,v as Ut,q as Ot,w as Lt}from"./tab-id-CYxMrTRp.js";import{S as Nt,s as Ft,c as qt,f as jt,i as Vt,a as Ht}from"./hooks-BasSX9U3.js";import{u as Bt}from"./use-is-desktop-app-BNujXJc_.js";import{u as Kt}from"./use-mcp-client-DFoPNyXR.js";import{a as Qt,S as Wt}from"./constants-BSYv1IkQ.js";import{a as Gt}from"./use-virtual-mcp-BbdjNQ1e.js";import{u as mt,p as zt,b as xe,i as Xt,c as Zt}from"./use-ai-providers-DwZngUHl.js";import{u as Yt}from"./use-decopilot-events-8dmobXlE.js";import{u as Jt,c as en}from"./studio-tools-BBCHIrbu.js";import{c as tn}from"./use-organization-settings-kcm-WdX5.js";const we=S({connection_id:i().describe("Connection ID"),selected_tools:C(i()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:C(i()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:C(i()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),ft=we.extend({selected_tools:we.shape.selected_tools.optional(),selected_resources:we.shape.selected_resources.optional(),selected_prompts:we.shape.selected_prompts.optional()}),nn=S({connectionId:i(),toolName:i(),label:i(),icon:i().nullable().optional()}),sn=S({id:i().describe("Stable id; used as React key and ?tab= value"),title:i().describe("Tab label"),icon:i().optional().describe("Optional lucide icon name"),view:S({type:qe("ext-app"),appId:i(),args:Ie(i(),dt()).optional()})}),on=S({defaultMainView:S({type:i(),id:i().optional(),toolName:i().optional()}).nullable().optional(),chatDefaultOpen:ee().nullable().optional(),cmsDefaultOpen:ee().nullable().optional(),tabs:C(sn).optional()}),ot=S({tileId:i().optional(),connectionId:i().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:i().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:i().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:Ie(i(),dt()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:Ce().int().positive().optional(),maxHeight:Ce().int().positive().optional()}),Ke=S({banner:i().nullable().optional(),bannerColor:i().nullable().optional(),icon:i().nullable().optional(),themeColor:i().nullable().optional(),pinnedViews:C(nn).nullable().optional(),layout:on.nullable().optional(),homeTile:ot.nullable().optional(),homeTiles:C(ot).nullable().optional(),homePrompts:C(i()).nullable().optional()});function bs(t){const e=t?.homeTiles;if(Array.isArray(e)&&e.length>0)return e;const n=t?.homeTile;return n?[n]:[]}const an=/^[A-Za-z_][A-Za-z0-9_]*$/,at=i().min(1).regex(an,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),rn=It("kind",[S({key:at,kind:qe("literal"),value:i()}),S({key:at,kind:qe("secret"),secretId:i().min(1)})]),ln=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/,cn=S({host:i().min(1).regex(ln).describe("Submodule host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:i().min(1).describe("Vault secret id holding the PAT used to fetch this host.")}),Qe=S({selected:i().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:i().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:i().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:C(rn).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config."),submoduleCredentials:C(cn).nullable().optional().describe("Git submodule credentials injected on every SANDBOX_START. Each entry maps a host to a vault secret (PAT) that Studio resolves before posting /_sandbox/config; the daemon uses it to authenticate `git submodule update` for submodules on that host.")}),We=S({url:i().describe("GitHub repository URL"),owner:i().describe("Repository owner"),name:i().describe("Repository name"),installationId:Ce().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:i().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials.")}),dn=he(["agent-sandbox","user-desktop"]),un=he(["agent-sandbox","user-desktop","cluster"]);function Ge(t){return t==="cluster"?"agent-sandbox":t}const bt={sandboxHandle:i().describe("Provider-specific handle"),previewUrl:i().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:i().nullable().optional().describe("Daemon's public URL — what cluster→daemon RPCs target. Equal to previewUrl for user-desktop; null/absent for the agent-sandbox provider (routes through hosted ingress)."),sandboxProviderKind:dn.optional(),createdAt:Ce().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:S({packageManager:i().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:i().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:i().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},gt=S(bt),pn=S({...bt,sandboxProviderKind:un.optional()});function hn(t){const e=pn.parse(t);return gt.parse({...e,sandboxProviderKind:e.sandboxProviderKind?Ge(e.sandboxProviderKind):void 0})}function gs(t){if(!t||typeof t!="object"||Array.isArray(t))return{};const e=t,n={};for(const[s,o]of Object.entries(e)){if(!o||typeof o!="object"||s!=="cluster"&&s!=="agent-sandbox"&&s!=="user-desktop")continue;const a=Ge(s);try{if(s==="cluster"&&n[a])continue;n[a]=hn(o)}catch{}}return n}const ze=Ie(i().describe("userId"),Ie(i().describe("branch"),Ie(i().describe("sandboxProviderKind"),gt))),mn=S({id:i().describe("Stable identifier for this knowledge file"),name:i().describe("File name shown in the UI"),kind:he(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:i().describe("Org filesystem (Library) volume the file lives in"),path:i().describe("Path within the volume"),url:i().describe("Same-origin URL to read the file (display/download)"),contentType:i().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:Ce().nullable().optional().describe("File size in bytes"),addedAt:i().describe("ISO timestamp when the file was attached")}),Xe=C(mn).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),fn=he(["smart","code-review","open"]),Ze=fn.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),Ye=ee().nullable().optional().describe("Enable Fast Preview (sandbox-less): render the draft instantly on the preview server's own page via a ?__draft pointer, with reads/writes served by the decofile API against GitHub. Requires previewServerUrl (or legacy productionUrl) to be set to take effect."),Je=i().nullable().optional().describe("Preview server URL — the deployment the CMS preview renders against (often the live site, e.g. https://acme.com). Painted in the preview iframe, and the render target for Fast Preview drafts. Supersedes the legacy productionUrl key."),ys=S({id:i().describe("Unique identifier"),title:i().describe("Human-readable name"),description:i().nullable().describe("Description"),icon:i().nullable().describe("Icon URL"),created_at:i().describe("Creation timestamp"),updated_at:i().describe("Last update timestamp"),created_by:i().describe("User ID who created this item"),updated_by:i().optional().describe("User ID who last updated this item"),organization_id:i().describe("Organization ID this item belongs to"),status:he(["active","inactive"]).describe("Current status"),pinned:ee().describe("Whether this space is pinned to the sidebar"),metadata:S({instructions:i().nullable().describe("Instructions also used as system prompt"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:Ke.nullable().optional().describe("UI customization settings"),githubRepo:We.nullable().optional().describe("Linked GitHub repository"),runtime:Qe.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:ze.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Xe,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:Ze,previewServerUrl:Je,productionUrl:i().nullable().optional().describe("Legacy key for previewServerUrl — still read as a fallback. New writes use previewServerUrl."),fieldDescriptionTooltips:ee().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:Ye}).loose().describe("Metadata"),connections:C(we).describe("Connections with their selected tools, resources, and prompts")}),yt=S({title:i().min(1).max(120).describe("Short label shown on the chip"),description:i().max(280).optional().describe("One-line subtitle shown under the title"),text:i().min(1).describe("The message sent to the agent when the prompt is clicked")});S({title:i().min(1).max(255).describe("Name for the virtual MCP"),description:i().nullable().optional().describe("Optional description"),icon:i().nullish().describe("Optional icon URL"),status:he(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:ee().optional().default(!1).describe("Pin to sidebar"),metadata:S({instructions:i().nullable().optional().describe("MCP server instructions"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:Ke.nullable().optional().describe("UI customization settings"),githubRepo:We.nullable().optional().describe("Linked GitHub repository"),runtime:Qe.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:ze.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Xe,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:Ze,previewServerUrl:Je,productionUrl:i().nullable().optional().describe("Legacy key for previewServerUrl — still read as a fallback. New writes use previewServerUrl."),fieldDescriptionTooltips:ee().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:Ye}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:C(ft).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:C(yt).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});S({title:i().min(1).max(255).optional().describe("New name"),description:i().nullable().optional().describe("New description (null to clear)"),icon:i().nullish().describe("New icon URL"),status:he(["active","inactive"]).optional().describe("New status"),pinned:ee().optional().describe("Pin/unpin from sidebar"),metadata:S({instructions:i().nullable().optional().describe("MCP server instructions"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:Ke.nullable().optional().describe("UI customization settings"),githubRepo:We.nullable().optional().describe("Linked GitHub repository"),runtime:Qe.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:ze.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Xe,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:Ze,previewServerUrl:Je,productionUrl:i().nullable().optional().describe("Legacy key for previewServerUrl — still read as a fallback. New writes use previewServerUrl."),fieldDescriptionTooltips:ee().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:Ye}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:C(ft).optional().describe("New connections (replaces existing)"),prompts:C(yt).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});function bn(t,e=[]){return t==="stop"?"completed":t==="tool-calls"?e.some(s=>s.type==="tool-user_ask"&&s.state==="input-available"||s.state==="approval-requested")?"requires_action":"completed":"failed"}const je={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"},"opencode-desktop":{harness:"opencode",sandbox:"user-desktop"}};function gn(t,e){if(!t)return null;const n=e?Ge(e):null;if(t==="decopilot"&&(n===null||n==="user-desktop"))return"decopilot";for(const[s,o]of Object.entries(je))if(o.harness===t&&o.sandbox===n)return s;return null}function yn({pendingOption:t,lockedHarness:e}){return e==="claude-code"?"claude-code-desktop":e==="codex"?"codex-desktop":e==="opencode"?"opencode-desktop":t==="claude-code-desktop"||t==="codex-desktop"||t==="opencode-desktop"?t:null}function vn(t){return t.thread?.harness_id!=null?{}:{harnessId:"decopilot",sandboxProviderKind:"agent-sandbox",branch:t.globals.branch??null}}const Sn="home",kn=new Set(["output","upload","public","home"]),xn=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function vs(t){return kn.has(t)||!xn.test(t)?"home":t}function wn(t){const e=t?t.split("/").filter(Boolean):[],n=e[0]==="public",s=n?e[1]??null:null,o=n?s?`public-${s}`:null:e[0]??null,a=(n?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:o,dirPath:a,isPublic:n,publicSet:s,readOnly:n,isHomeRoot:o===Sn&&a===""}}function Ss(t){return t==="public"?"skills":t}function ks(t,e){return t.isPublic&&t.publicSet?`public/${t.publicSet}/${e}`:t.volume?`${t.volume}/${e}`:e}const it="public-";function vt(t){return t.startsWith(it)?t.slice(it.length):null}function xs(t,e){const n=vt(t);return n?`public/${n}/${e}`:`${t}/${e}`}function In(t){const e=t.lastIndexOf("/");return e===-1?t:t.slice(e+1)}function Mn(t){const{volume:e,dirPath:n}=wn(t);if(!e)return null;let s;if(e==="home")s="org/home";else if(e==="outputs")s="org/.outputs";else if(e==="uploads")s="org/.uploads";else{const o=vt(e);s=o?`org/public/${o}`:`org/${e}`}return n?`${s}/${n}`:s}function Tn(t){const e=le.c(21);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=n):n=e[0];const s=ut(n);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[1]=o):o=e[1];const a=He(o);let l;e[2]!==a.brand||e[3]!==a.main||e[4]!==a.preview||e[5]!==a.skill?(l=(typeof a.main=="string"?Et(a.main)?.path:void 0)??a.preview??a.skill??a.brand??null,e[2]=a.brand,e[3]=a.main,e[4]=a.preview,e[5]=a.skill,e[6]=l):l=e[6];const c=l;let h;if(e[7]!==s?.params.appSlug||e[8]!==s?.params.collectionName||e[9]!==s?.params.itemId||e[10]!==c||e[11]!==t){if(h=[],t&&h.push(`### Selected Agent
|
|
2
|
-
- ID: ${t}`),c){let f;e[13]!==c?(f=Mn(c),e[13]=c,e[14]=f):f=e[14];const k=f;let M;e[15]!==c?(M=In(c),e[15]=c,e[16]=M):M=e[16],h.push(`### Currently Open File
|
|
3
|
-
The user has this file open in the Library and is most likely referring to it:
|
|
4
|
-
- Name: ${M}
|
|
5
|
-
- Library path: ${c}${k?`
|
|
6
|
-
- Read/edit it with your file tools at: \`${k}\``:""}
|
|
7
|
-
|
|
8
|
-
When a request is ambiguous about which file or resource it targets (e.g. "change the h1", "fix this", "what's in this file", "update the title"), assume it means this file unless the user clearly indicates otherwise.`)}let m;e[17]!==s?.params.appSlug||e[18]!==s?.params.collectionName||e[19]!==s?.params.itemId?(m=[],s?.params.appSlug&&m.push(`- Connection ID: ${s?.params.appSlug}`),s?.params.collectionName&&m.push(`- Collection: ${s?.params.collectionName}`),s?.params.itemId&&m.push(`- Item ID: ${s?.params.itemId}`),e[17]=s?.params.appSlug,e[18]=s?.params.collectionName,e[19]=s?.params.itemId,e[20]=m):m=e[20],m.length>0&&h.push(`### Current Resource
|
|
9
|
-
The user is viewing the following resource:
|
|
10
|
-
${m.join(`
|
|
11
|
-
`)}
|
|
12
|
-
|
|
13
|
-
Help the user understand and work with this resource.`),e[7]=s?.params.appSlug,e[8]=s?.params.collectionName,e[9]=s?.params.itemId,e[10]=c,e[11]=t,e[12]=h}else h=e[12];return h.join(`
|
|
14
|
-
|
|
15
|
-
`)}function Cn(){const t=le.c(5),e=Be(),{org:n}=te();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},t[0]=s):s=t[0];const o=ut(s);let a;return t[1]!==o?.params||t[2]!==n||t[3]!==e?(a=l=>{const h=l.toolCall.toolName.match(/^COLLECTION_([A-Z_]+)_(CREATE|UPDATE|DELETE)$/);if(!h||!h[1])return;const m=h[1],f=o?.params.appSlug;if(!f)return;e.invalidateQueries({queryKey:pe.collection(n.slug,f,m)});const k=m.toLowerCase().replace(/_/g," ");ue.success(`${k} updated`)},t[1]=o?.params,t[2]=n,t[3]=e,t[4]=a):a=t[4],a}function An(){const t=le.c(4),{org:e,project:n}=te(),s=`${e.id}/${n.id}`;let o;t[0]!==s?(o=ye.taskLastViewed(s),t[0]=s,t[1]=o):o=t[1];const[,a]=ge(o,Pn);let l;return t[2]!==a?(l={markTaskRead:h=>{a(m=>({...m,[h]:new Date().toISOString()}))}},t[2]=a,t[3]=l):l=t[3],l}function Pn(t){return t??{}}function St(){const t=pt(),{org:e}=te(),n=He({strict:!1}),s=Mt({strict:!1}),o=n.virtualmcpid??Qt(e.id).id,a=(h,m)=>{t({to:"/$org/$taskId",params:{org:e.slug,taskId:h},search:f=>{const k={},M=m?.virtualMcpId??f.virtualmcpid;M&&(k.virtualmcpid=M);const p=f.main;return p&&typeof p=="string"&&!Dt(p)&&(k.main=p),(f.sidepanel==="chat"||f.sidepanel===0)&&(k.sidepanel=f.sidepanel),m?.autosend&&(k.autosend=ht),k}})},l=v.useRef(crypto.randomUUID()),c=s.taskId??l.current;return{virtualMcpId:o,taskId:c,navigateToTask:a}}function _n(t,e){const{mimeType:n,data:s}=t;if(n.startsWith("text/"))try{const o=new TextDecoder().decode(Uint8Array.from(atob(s),a=>a.charCodeAt(0)));return[{type:"text",text:`${e}
|
|
16
|
-
${o}`}]}catch(o){console.error("Failed to decode text file:",o)}return[{type:"file",url:`data:${n};base64,${s}`,filename:e,mediaType:n}]}function rt(t,e){const n=[];for(const s of t)!s||typeof s!="object"||("text"in s&&s.text?n.push({type:"text",text:`[${e}]
|
|
17
|
-
${s.text}`}):"blob"in s&&s.blob&&s.mimeType&&n.push({type:"file",url:`data:${s.mimeType};base64,${s.blob}`,filename:String(s.uri),mediaType:String(s.mimeType)}));return n}function Rn(t,e){const n=(t.files??[]).filter(l=>l.content?.trim()),s=t.omittedPaths??[];if(n.length===0&&s.length===0)return[];const o=n.map(l=>`<skill-file path="${l.relPath}">
|
|
18
|
-
${l.content.trim()}
|
|
19
|
-
</skill-file>`).join(`
|
|
20
|
-
|
|
21
|
-
`),a=s.length>0?`
|
|
22
|
-
|
|
23
|
-
Other files in \`${t.sandboxPath}/\`: ${s.join(", ")}`:"";return[{type:"text",text:`[${e}]
|
|
24
|
-
${o}${a}`}]}function En(t,e){const n=[];for(const s of t){if(s.role!=="user"||!s.content)continue;const o=Array.isArray(s.content)?s.content:[s.content];for(const a of o)switch(a.type){case"text":{const l=a.text?.trim();if(!l)continue;n.push({type:"text",text:`[${e}]
|
|
25
|
-
${l}`});break}case"image":case"audio":{if(!a.data||!a.mimeType)continue;n.push({type:"file",url:`data:${a.mimeType};base64,${a.data}`,mediaType:a.mimeType});break}case"resource":{const l=a.resource;if(!l||!l.mimeType)continue;l&&("text"in l&&l.text?n.push({type:"text",text:`[${e}]
|
|
26
|
-
${l.text}`}):"blob"in l&&l.blob&&l.mimeType&&n.push({type:"file",url:`data:${l.mimeType};base64,${l.blob}`,filename:String(l.uri),mediaType:String(l.mimeType)}));break}}}return n}function kt(t){if(!t)return[];const e=[];let n="";const s=o=>{if(o){if(o.type==="text"&&"text"in o&&typeof o.text=="string")n+=o.text;else if(o.type==="mention"&&o.attrs){const a=o.attrs.char??"/",l=`${a}${o.attrs.name}`;if(o.attrs.kind==="task"){const c=o.attrs.metadata,h=c?.title??o.attrs.name??"",m=c?.context?.trim()||[h,c?.description?.trim()].filter(Boolean).join(`
|
|
27
|
-
|
|
28
|
-
`);m&&e.push({type:"text",text:m});return}if(n+=l,a==="@"){const c=o.attrs.metadata;c&&typeof c=="object"&&!Array.isArray(c)&&"agentId"in c?e.push({type:"text",text:`[DELEGATE TO AGENT: ${c.title??o.attrs.name} (agent_id: ${c.agentId})]
|
|
29
|
-
Use the subtask tool to delegate this task to the agent above. Include the full relevant context from this conversation in the prompt field — the subagent has no conversation history.`}):Array.isArray(c)&&e.push(...rt(c,l))}else if(o.attrs.kind==="skill"){const c=o.attrs.metadata;c&&!Array.isArray(c)&&Array.isArray(c.files)&&e.push(...Rn(c,l))}else{const c=o.attrs.metadata||o.attrs.prompts||[];Array.isArray(c)&&c.length>0&&typeof c[0]=="object"&&c[0]!==null&&"role"in c[0]?e.push(...En(c,l)):Array.isArray(c)&&e.push(...rt(c,l))}}else if(o.type==="file"&&o.attrs){const a=o.attrs,l=`[file:://${encodeURIComponent(a.name)}]`;n+=l,e.push(..._n(a,l))}if("content"in o&&Array.isArray(o.content))for(const a of o.content)s(a)}};return s(t),n.trim()&&e.unshift({type:"text",text:n.trim()}),e}function ws(t){const e=kt(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function Is(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function Dn(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function Ms(t){return t.filter(e=>e.status==="queued").sort((e,n)=>e.enqueuedAt-n.enqueuedAt)}function $n(t,e){return t.some(n=>n.messageId===e.messageId)?t:[...t,e]}function Un(t,e){return t.filter(n=>n.messageId!==e)}const re=new Map,On=200;function Ln(t){if(re.size<On||re.has(t))return;const e=re.keys().next().value;if(e!==void 0){re.delete(e),$e.delete(e);for(const n of ve.keys())n.startsWith(`${e}:`)&&ve.delete(n)}}const $e=new Set;function Nn(t){$e.add(t)}function Fn(t){return $e.has(t)}function qn(t){$e.delete(t)}function Ae(t){const e=re.get(t);if(e)return re.delete(t),re.set(t,e),e;Ln(t);const n=new Nt([]);return re.set(t,n),n}function xt(t,e){Ae(t).update(n=>$n(n,e))}function Ve(t,e){Ae(t).update(n=>Un(n,e))}function jn(t,e){Ae(t).set(e)}const ve=new Map;function Vn(t,e){ve.set(`${t}:${e.id}`,e)}function Hn(t,e){const n=`${t}:${e}`,s=ve.get(n);return ve.delete(n),s}function lt(t,e){ve.delete(`${t}:${e}`)}async function ie(t,e){try{const n=await fetch(`/api/${encodeURIComponent(t)}/decopilot/queue/${encodeURIComponent(e)}`,{credentials:"include"});if(!n.ok)return;const s=await n.json();jn(e,s.items??[])}catch{}}function Ts(t){const e=le.c(2);let n;e[0]!==t?(n=Ae(t),e[0]=t,e[1]=n):n=e[1];const s=n;return v.useSyncExternalStore(s.subscribe,s.get,s.get)}function Bn(){const{org:t}=te();return{enqueue:xt,refresh:e=>ie(t.slug,e),cancel:async(e,n)=>{const s=`thread-run:${e}:${n}`;Ve(e,n);try{const o=await fetch(`/api/${encodeURIComponent(t.slug)}/decopilot/queue/${encodeURIComponent(e)}/cancel/${encodeURIComponent(s)}`,{method:"POST",credentials:"include"});if(!o.ok&&o.status!==404)throw new Error(`Cancel failed: ${o.status}`);return!0}catch(o){return ue.error(o instanceof Error?o.message:"Failed to cancel"),!1}finally{await ie(t.slug,e)}}}}function Ee(t,e){return t.find(n=>n!=null&&e.has(n.keyId))??null}function Kn(t,e,n){const s=o=>Ee([o],n);return{tiers:{fast:Ee([e.tiers.fast,t.tiers.fast],n),smart:Ee([e.tiers.smart,t.tiers.smart],n),thinking:Ee([e.tiers.thinking,t.tiers.thinking],n),image:s(t.tiers.image),web_search:s(t.tiers.web_search),deep_research:s(t.tiers.deep_research)}}}const Te={tiers:{}};function Qn(){const t=le.c(7),{org:e}=te();let n;t[0]!==e.id?(n=pe.userModelPreferences(e.id),t[0]=e.id,t[1]=n):n=t[1];let s;t[2]!==e.slug?(s=async()=>{const a=await en(e.slug,"USER_MODEL_PREFERENCES_GET",{});return a?.tiers?a:Te},t[2]=e.slug,t[3]=s):s=t[3];let o;return t[4]!==n||t[5]!==s?(o={queryKey:n,queryFn:s,staleTime:6e4},t[4]=n,t[5]=s,t[6]=o):o=t[6],Tt(o)}function Wn(){return Qn().data??Te}function Cs(){const t=le.c(19),{org:e}=te(),n=Jt(),s=Be();let o;t[0]!==e.id?(o=pe.userModelPreferences(e.id),t[0]=e.id,t[1]=o):o=t[1];const a=o;let l;t[2]!==a||t[3]!==s||t[4]!==n?(l=async M=>{const p=s.getQueryData(a)??Te;return await n.call("USER_MODEL_PREFERENCES_UPDATE",p)??p},t[2]=a,t[3]=s,t[4]=n,t[5]=l):l=t[5];let c,h,m,f;t[6]!==a||t[7]!==s?(c=M=>{const{tier:p,slot:A}=M,q=s.getQueryData(a),j=q??Te;return s.setQueryData(a,{tiers:{...j.tiers,[p]:A}}),{prev:q}},h=(M,p,A)=>{s.setQueryData(a,A?.prev??Te)},m=M=>{s.setQueryData(a,M)},f=()=>{s.isMutating({mutationKey:a})===1&&s.invalidateQueries({queryKey:a})},t[6]=a,t[7]=s,t[8]=c,t[9]=h,t[10]=m,t[11]=f):(c=t[8],h=t[9],m=t[10],f=t[11]);let k;return t[12]!==a||t[13]!==l||t[14]!==c||t[15]!==h||t[16]!==m||t[17]!==f?(k={mutationKey:a,mutationFn:l,onMutate:c,onError:h,onSuccess:m,onSettled:f},t[12]=a,t[13]=l,t[14]=c,t[15]=h,t[16]=m,t[17]=f,t[18]=k):k=t[18],Ct(k)}function Gn(){const t=le.c(4),e=tn(),n=Wn(),s=mt();let o;return t[0]!==s||t[1]!==e||t[2]!==n?(o=Kn(e,n,new Set(s.map(zn))),t[0]=s,t[1]=e,t[2]=n,t[3]=o):o=t[3],o}function zn(t){return t.id}function de(t,e,n,s){if(!t)return null;const o=e.find(l=>l.id===t.keyId);if(!o)return null;const a=n.find(l=>l.modelId===t.modelId);return a?{...a,keyId:t.keyId}:{modelId:t.modelId,title:s??t.modelId,keyId:t.keyId,providerId:o.providerId,description:null,logo:null,capabilities:[],limits:null,costs:null}}function Xn(t){return t==="fast"||t==="smart"||t==="thinking"?t:"smart"}function Zn(t,e,n,s){if(!n||s.length===0)return null;const o=e.find(h=>h.id===n);if(!o)return null;const a=zt([o],{[n]:s}),l=t==="fast"?a.chat.fast:t==="thinking"?a.chat.thinking:a.chat.smart;if(!l)return null;const c=s.find(h=>h.modelId===l.modelId);return c?{...c,keyId:n}:null}const ct=new Set,ae=new Set;function be(t){return v.useSyncExternalStore(t.subscribe,t.get,t.get)}function Yn(t){return t.kind==="loading"?"ready":t.kind}const Jn=1e4,es=10,et=v.createContext(null),tt=v.createContext(null),nt=v.createContext(null),wt=v.createContext(null);function ts({children:t}){const{locator:e}=te(),{virtualMcpId:n}=St(),[s,o]=ge(ye.chatSelectedImageModel(e),null),[a,l]=ge(ye.chatSelectedWebSearchModel(e),null),[c,h]=ge(ye.chatSelectedDeepResearchModel(e),null),[m,f]=v.useState(null),[k,M]=v.useState("default"),p=Gn(),[A,q]=ge(ye.chatSimpleModeTier(e),null),j=Xn(A),x=mt(),T=p.tiers[j],V=x.some(r=>r.id===T?.keyId)?T?.keyId:void 0,W=m&&x.some(r=>r.id===m)?m:V??x[0]?.id??null,{models:H,isLoading:P}=xe(W??void 0),{models:z}=xe(V),L=x.some(r=>r.id===p.tiers.image?.keyId)?p.tiers.image?.keyId:void 0,{models:ne}=xe(L),B=x.some(r=>r.id===p.tiers.web_search?.keyId)?p.tiers.web_search?.keyId:void 0,{models:K}=xe(B),se=x.some(r=>r.id===p.tiers.deep_research?.keyId)?p.tiers.deep_research?.keyId:void 0,{models:Q}=xe(se),G=de(T,x,z,T?.title)??Zn(j,x,W,H),oe=P,X=H.filter(r=>r.capabilities?.includes("image")),b=de(s,x,X),D=de(p.tiers.image,x,ne,p.tiers.image?.title)??b??X[0]??null,N=H.filter(Xt),_=de(a,x,N),R=N.find(r=>r.modelId==="perplexity/sonar")??N[0]??null,Z=de(p.tiers.web_search,x,K,p.tiers.web_search?.title)??_??R,Y=H.filter(Zt),F=de(c,x,Y),Se=Y.find(r=>r.modelId==="perplexity/deep-research")??Y.find(r=>r.asyncResearch===!0)??Y[0]??null,Ue=de(p.tiers.deep_research,x,Q,p.tiers.deep_research?.title)??F??Se,Le=Gt(n)??{id:n,title:"",description:null,icon:null},[Pe,ke]=v.useState({}),_e=(r,g)=>{const O=[];for(const I of g.content??[])I.type==="text"&&I.text?.trim()&&O.push(I.text.trim());const E=O.join(`
|
|
30
|
-
`);if(!E){ce(r);return}new TextEncoder().encode(E).length>Jn||ke(I=>Object.keys(I).length>=es&&!(r in I)?I:{...I,[r]:E})},ce=r=>{ke(g=>{const{[r]:O,...E}=g;return E})},[Ne,Fe]=ge(ye.chatLastAgentOption(e),r=>r&&r in je?r:null),J=os(),st=J?.isThreadLocked&&J.lockedHarness!=null?gn(J.lockedHarness,J.lockedSandbox):null;yn({pendingOption:Ne,lockedHarness:J?.isThreadLocked?J.lockedHarness:null});const me=J?.isThreadLocked?st:"decopilot",Re=me?je[me]:null,d=Re?.harness??null,u=Re?.sandbox??null,[$,U]=v.useState(void 0),y=v.useRef($);y.current=$;const w={selectedModel:G,setModel:()=>{},credentialId:W,setCredentialId:f,allModelsConnections:x,isModelsLoading:oe,selectedVirtualMcp:Le,imageModel:D,setImageModel:r=>{o(r?.keyId?{keyId:r.keyId,modelId:r.modelId}:null)},webSearchModel:Z,setWebSearchModel:r=>{l(r?.keyId?{keyId:r.keyId,modelId:r.modelId}:null)},deepResearchModel:Ue,setDeepResearchModel:r=>{h(r?.keyId?{keyId:r.keyId,modelId:r.modelId}:null)},chatMode:k,setChatMode:M,appContexts:Pe,setAppContext:_e,clearAppContext:ce,tiptapDoc:$,setTiptapDoc:U,tiptapDocRef:y,resetInteraction:()=>{},simpleModeTier:j,setSimpleModeTier:r=>q(r),pendingAgentOption:me,setPendingAgentOption:Fe,pendingHarnessId:d,pendingSandboxProviderKind:u};return Me.jsx(nt.Provider,{value:w,children:t})}function As(t){const e=le.c(41),{virtualMcpId:n,task:s,children:o}=t,{locator:a}=te(),{data:l}=At.useSession(),c=l?.user??null,{taskId:h,virtualMcpId:m,navigateToTask:f}=St(),[k]=Pt(),{markTaskRead:M}=An(),p=Ht(),A=h,q=m,j=Tn(q);let x;e[0]!==M||e[1]!==f?(x=(_,R)=>{M(_),f(_,{virtualMcpId:R?.virtualMcpId,autosend:R?.autosend})},e[0]=M,e[1]=f,e[2]=x):x=e[2];const T=x,V=A&&s?.id===A?s:null,W=V?.harness_id??null,H=V?.sandbox_provider_kind??null,P=V?.branch??null,z=W!=null,L=P;let ne;e[3]!==L||e[4]!==T||e[5]!==p||e[6]!==n?(ne=_=>{const R=crypto.randomUUID(),Z=_?.branch??L;return p.create({id:R,virtual_mcp_id:n,...Z?{branch:Z}:{},..._?.runtime?{runtime:_.runtime}:{}}).then(()=>T(R)).catch(()=>{T(R)}),R},e[3]=L,e[4]=T,e[5]=p,e[6]=n,e[7]=ne):ne=e[7];const B=ne;let K;e[8]!==L||e[9]!==a||e[10]!==T||e[11]!==p||e[12]!==n?(K=_=>{const R=crypto.randomUUID(),Z=_.virtualMcpId??n,Y=Z===n?L:null;Lt(sessionStorage,a,R,_.message),p.create({id:R,virtual_mcp_id:Z,...Y?{branch:Y}:{}}).then(()=>T(R,{virtualMcpId:_.virtualMcpId,autosend:!0})).catch(()=>{T(R,{virtualMcpId:_.virtualMcpId,autosend:!0})})},e[8]=L,e[9]=a,e[10]=T,e[11]=p,e[12]=n,e[13]=K):K=e[13];const se=K;let Q;e[14]!==A||e[15]!==p?(Q=_=>{A&&p.setBranch(A,_)},e[14]=A,e[15]=p,e[16]=Q):Q=e[16];let G;e[17]!==V||e[18]!==B||e[19]!==se||e[20]!==L||e[21]!==A||e[22]!==q||e[23]!==z||e[24]!==P||e[25]!==W||e[26]!==H||e[27]!==T||e[28]!==Q?(G={virtualMcpId:q,taskId:A,openTask:T,createTask:B,createTaskWithMessage:se,activeTask:V,isThreadLocked:z,lockedHarness:W,lockedSandbox:H,lockedBranch:P,currentBranch:L,setCurrentTaskBranch:Q},e[17]=V,e[18]=B,e[19]=se,e[20]=L,e[21]=A,e[22]=q,e[23]=z,e[24]=P,e[25]=W,e[26]=H,e[27]=T,e[28]=Q,e[29]=G):G=e[29];const oe=G;let X;e[30]!==j||e[31]!==k||e[32]!==f||e[33]!==c?(X={user:c,contextPrompt:j,preferences:k,rawNavigateToTask:f},e[30]=j,e[31]=k,e[32]=f,e[33]=c,e[34]=X):X=e[34];const b=X;let D;e[35]!==o||e[36]!==b?(D=Me.jsx(ts,{children:Me.jsx(wt.Provider,{value:b,children:o})}),e[35]=o,e[36]=b,e[37]=D):D=e[37];let N;return e[38]!==D||e[39]!==oe?(N=Me.jsx(tt.Provider,{value:oe,children:D}),e[38]=D,e[39]=oe,e[40]=N):N=e[40],N}function Ps({taskId:t,children:e}){const n=De(),s=Bt(),{virtualMcpId:o,activeTask:a,currentBranch:l}=ns(),c=Ft({isDesktopApp:s,harnessId:a?.harness_id,sandboxProviderKind:a?.sandbox_provider_kind}),h=n("chat.input.codingAgentRequiresDesktop");t&&!ct.has(t)&&(ct.add(t),Rt("chat_opened",{thread_id:t}));const{imageModel:m,webSearchModel:f,deepResearchModel:k,chatMode:M,setChatMode:p,appContexts:A,setTiptapDoc:q,simpleModeTier:j}=ss(),x=v.useContext(wt);if(!x)throw new Error(n("chat.chatContext.activeTaskProviderMissingContext"));const{user:T,contextPrompt:V,preferences:W,rawNavigateToTask:H}=x,{org:P,locator:z}=te(),L=Bn(),[ne,B]=v.useState(null),K=()=>{B(new Error(h))},se=Cn(),Q=Be(),G=qt(),oe=pt(),X=Kt({connectionId:Wt,orgId:P.id,orgSlug:P.slug}),b=jt(P.slug,t,{client:X,batch:Vt(a?.harness_id)});v.use(b.ready);const D=be(b.messages),N=be(b.status),_=be(b.finishReason),R=be(b.runStatusStage),Z=be(b.hasMoreOlder),Y=be(b.isFetchingOlder),F=v.useRef({onToolCall:se,queryClient:Q,rawNavigateToTask:H,taskId:t,manager:G,navigate:oe,orgId:P.id,orgSlug:P.slug});F.current={onToolCall:se,queryClient:Q,rawNavigateToTask:H,taskId:t,manager:G,navigate:oe,orgId:P.id,orgSlug:P.slug},Yt({orgSlug:P.slug,taskId:t,onTaskStatus:d=>{const u=F.current,$=d.data.message_id;if(d.data.status==="in_progress"&&$){Ve(u.taskId,$);const U=Hn(u.taskId,$);U&&b.applyLocalMessage(U),ie(u.orgSlug,u.taskId)}Fn(u.taskId)&&(async()=>(await ie(u.orgSlug,u.taskId),await b.reconcileFromServer()&&Ae(u.taskId).get().length===0&&qn(u.taskId)))()}}),v.useEffect(()=>{const d={onData:y=>{if(y.type==="data-thread-title"){const w=y.data;if(!w?.title)return;const r=F.current;if(!r.taskId)return;r.manager.patchThread({id:r.taskId,title:w.title,updated_at:new Date().toISOString()});return}if(y.type==="data-deck-updated"){const w=y.data;if(!w?.path)return;const r=w.path,g=F.current;g.queryClient.invalidateQueries({queryKey:pe.orgFsStat(g.orgId,"home",r)}),g.queryClient.invalidateQueries({queryKey:pe.orgFsRecent(g.orgId)}),g.navigate({to:".",search:O=>({...O,main:Ot(r)}),replace:!0});return}if(y.type==="data-open-preview"){const w=y.data,r=F.current,g=r.taskId;if(g){const O=r.manager.threads.get().find(E=>E.id===g);r.manager.patchThread({id:g,...w?.branch?{branch:w.branch}:{},...w?.sandboxProviderKind?{sandbox_provider_kind:w.sandboxProviderKind}:{},metadata:{...O?.metadata??{},...w?.githubRepo?{githubRepo:w.githubRepo}:{},...w?.sandboxMap?{sandboxMap:w.sandboxMap}:{}}})}r.navigate({to:".",search:O=>({...O,main:"preview"}),replace:!0});return}},onFinish:(y,w,r)=>{const g=F.current;g.taskId&&ie(g.orgSlug,g.taskId),g.taskId&&g.manager.patchThread({id:g.taskId,status:bn(r,y.parts),updated_at:new Date().toISOString()});const O=y.parts?.some(I=>{const fe=I;return(fe.type==="tool-share_with_user"||fe.type==="tool-bash"||fe.type==="tool-write")&&fe.state==="output-available"});if(g.taskId&&O){const I=pe.threadOutputs(g.taskId);for(const fe of[0,1500,3e3,6e3,12e3,25e3])setTimeout(()=>{g.queryClient.invalidateQueries({queryKey:I})},fe)}g.queryClient.invalidateQueries({queryKey:pe.homeNextActions(g.orgSlug)});const E=y.metadata?.thread_id;E&&E!==g.taskId&&g.rawNavigateToTask(E)},onError:y=>{B(y),console.error("[chat] Error",y)},onToolCall:y=>F.current.onToolCall(y)};b.observer=d,ie(F.current.orgSlug,F.current.taskId);const u=y=>y==="submitted"||y==="streaming";let $=u(b.status.get().kind);const U=b.status.subscribe(()=>{const y=u(b.status.get().kind);if(y===$)return;$=y;const w=F.current;ie(w.orgSlug,w.taskId)});return()=>{b.observer===d&&(b.observer=null),U()}},[b]);const Se=N.kind==="submitted"||N.kind==="streaming",Ue=D.length===0,Oe=D.at(-1),Le=!Se&&Oe?.role==="assistant"&&Oe.parts.some(d=>"state"in d&&d.state==="approval-requested"),Pe=a,ke=(Pe?.status==="in_progress"||Pe?.status==="expired")&&N.kind==="ready"&&D.length>0;async function _e(d){const u=t,$=o;if(c)return K(),ae.delete(u),!1;const U=Object.entries(A),y=U.length>0?U.map(([E,I])=>`### App Context: ${E}
|
|
31
|
-
${I}`).join(`
|
|
32
|
-
|
|
33
|
-
`):"",w=[V,y].filter(Boolean).join(`
|
|
34
|
-
|
|
35
|
-
`);let r=M;r==="gen-image"&&!m&&(r="default"),r==="web-search"&&!f&&(r="default"),r==="deep-research"&&!k&&(r="default"),(r==="web-search"||r==="deep-research")&&p("default");const g=vn({thread:a?{harness_id:a.harness_id??null,sandbox_provider_kind:a.sandbox_provider_kind??null,branch:a.branch??null}:null,globals:{branch:l}});a?.harness_id||G.patchThread({id:u,harness_id:g.harnessId??"decopilot",updated_at:new Date().toISOString()});const O={tier:j,mode:r,toolApprovalLevel:W.toolApprovalLevel??_t(),system:w||void 0,agent:{id:$},thread_id:u,...g};try{if(Se||ke){let E=!0;try{Vn(u,d),await b.enqueue(d,O),xt(u,{workflowId:`thread-run:${u}:${d.id}`,messageId:d.id,text:Dn(d.parts),hasAttachments:d.parts.some(I=>I.type==="file"),status:"queued",enqueuedAt:Date.now(),optimistic:!0}),Nn(u)}catch(I){E=!1,lt(u,d.id),Ve(u,d.id),B(I instanceof Error?I:new Error(String(I))),ue.error(I instanceof Error?I.message:n("chat.chatContext.failedToQueueMessage"))}return ie(P.slug,u),E}return await b.submit({kind:"message",message:d},O),!0}finally{ae.delete(u)}}async function ce(d){const u=d.parts??kt(d.tiptapDoc);if(u.length===0||ae.has(t))return;ae.add(t),B(null),q(void 0);const $={tiptapDoc:d.tiptapDoc,created_at:new Date().toISOString(),user:{avatar:T?.image??void 0,name:T?.name??"you"}},U={id:crypto.randomUUID(),role:"user",parts:u,metadata:$};await _e(U)}async function Ne(d,u){if(c)return K(),!1;if(ae.has(t))return ue.info(n("chat.chatContext.stillSendingPreviousMessage")),!1;if(ae.add(t),!await L.cancel(t,d))return ae.delete(t),ue.error(n("chat.chatContext.couldNotRemoveOriginalMessage")),!1;lt(t,d),b.removeLocalMessage(d);const U={id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:u}],metadata:{created_at:new Date().toISOString(),user:{avatar:T?.image??void 0,name:T?.name??"you"}}};try{return await _e(U)}catch(y){return ue.error(y instanceof Error?y.message:n("chat.chatContext.failedToSendEditedMessage")),!1}}const Fe=async()=>{b.stop();try{const d=await fetch(`/api/${P.slug}/decopilot/cancel/${t}`,{method:"POST",credentials:"include"});if(d.status===404)return;if(!d.ok){const u=await d.json().catch(()=>({}));throw new Error(u.message??n("chat.chatContext.cancelFailedStatus",{status:d.status}))}}catch(d){const u=d instanceof Error?d.message:n("chat.chatContext.failedToCancel");ue.error(u),console.error("[chat] cancelRun",d)}},J=d=>d&&typeof d=="object"&&"type"in d?ce({tiptapDoc:d}):ce(d),me=He({strict:!1}).autosend===ht;v.useEffect(()=>{if(!me||D.length>0||c)return;const d=$t(sessionStorage,z,t);d&&ce(d.message).then(()=>{Ut(sessionStorage,z,t)})},[me,D.length,c,z,t,ce]);const Re={messages:D,status:Yn(N),sendMessage:J,editQueuedMessage:Ne,stop:()=>{if(c){K();return}Fe()},submit:async(d,u)=>{if(c){K();return}await b.submit(d,u)},removeLocalMessage:d=>b.removeLocalMessage(d),isSendInFlight:()=>ae.has(t),error:ne,clearError:()=>B(null),finishReason:_,runStatusStage:R,clearFinishReason:()=>b.finishReason.set(null),isStreaming:Se,isChatEmpty:Ue,isWaitingForApprovals:Le??!1,isRunInProgress:ke,hasMoreOlder:Z,isFetchingOlder:Y,fetchOlderMessages:b.fetchOlderMessages.bind(b)};return Me.jsx(et.Provider,{value:Re,children:e})}function _s(){const t=De(),e=v.useContext(et);if(!e)throw new Error(t("chat.chatContext.useChatStreamMissingContext"));return e}function Rs(){return v.useContext(et)}function ns(){const t=De(),e=v.useContext(tt);if(!e)throw new Error(t("chat.chatContext.useChatTaskMissingContext"));return e}function ss(){const t=De(),e=v.useContext(nt);if(!e)throw new Error(t("chat.chatContext.useChatPrefsMissingContext"));return e}function Es(){return v.useContext(nt)}function os(){return v.useContext(tt)}export{Ps as A,St as B,ts as C,Es as D,an as E,Sn as H,ln as S,ys as V,_s as a,os as b,ns as c,Ts as d,Bn as e,lt as f,Ee as g,Qn as h,Cs as i,Gn as j,Rs as k,As as l,Is as m,bs as n,kt as o,gs as p,wn as q,In as r,Ms as s,ws as t,ss as u,Ss as v,vs as w,ks as x,vt as y,xs as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as y,j as s,u as K,b as S,d as N,B as v,r as I,N as k,n as w,K as R,k as C}from"./index-DTCr2n-a.js";import{A as T}from"./agent-icon-vjhOL9u6.js";import{R as F}from"./required-auth-layout-DgjkQLI6.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"./ChevronRight-Cf-ty0tK.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";async function _(t){const e=new URLSearchParams({site:t}),l=await fetch(`/api/_editor-resolve?${e.toString()}`,{headers:{Accept:"application/json"}});if(!l.ok){const r=new Error(`editor-resolve HTTP ${l.status}`);throw r.status=l.status,r}return await l.json()}function $(t){const e=t?.status;return typeof e=="number"&&e>=400&&e<500}function A(t){return{...t.pageId?{contentPageId:t.pageId}:{},...t.path?{contentPath:t.path}:{},...t.pathTemplate?{contentPathTemplate:t.pathTemplate}:{}}}function b(t){const e=y.c(2),{children:l}=t;let r;return e[0]!==l?(r=s.jsx("div",{className:"flex min-h-screen w-full items-center justify-center bg-background p-6",children:s.jsx("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:l})}),e[0]=l,e[1]=r):r=e[1],r}function P(){const t=y.c(5),e=S();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(C,{size:24,className:"animate-spin text-muted-foreground"}),t[0]=l):l=t[0];let r;t[1]!==e?(r=e("chooseEditor.resolving"),t[1]=e,t[2]=r):r=t[2];let i;return t[3]!==r?(i=s.jsxs(b,{children:[l,s.jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),t[3]=r,t[4]=i):i=t[4],i}function E(t){const e=y.c(29),{titleKey:l,descriptionKey:r,onRetry:i}=t,n=S(),p=N();let c;e[0]!==n||e[1]!==l?(c=n(l),e[0]=n,e[1]=l,e[2]=c):c=e[2];let m;e[3]!==c?(m=s.jsx("h1",{className:"text-lg font-medium text-foreground",children:c}),e[3]=c,e[4]=m):m=e[4];let f;e[5]!==r||e[6]!==n?(f=n(r),e[5]=r,e[6]=n,e[7]=f):f=e[7];let d;e[8]!==f?(d=s.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[8]=f,e[9]=d):d=e[9];let a;e[10]!==m||e[11]!==d?(a=s.jsxs("div",{className:"flex flex-col gap-2",children:[m,d]}),e[10]=m,e[11]=d,e[12]=a):a=e[12];let u;e[13]!==i||e[14]!==n?(u=i?s.jsx(v,{variant:"outline",onClick:i,children:n("chooseEditor.retry")}):null,e[13]=i,e[14]=n,e[15]=u):u=e[15];let o;e[16]!==p?(o=()=>p({to:"/"}),e[16]=p,e[17]=o):o=e[17];let g;e[18]!==n?(g=n("chooseEditor.backToStudio"),e[18]=n,e[19]=g):g=e[19];let j;e[20]!==o||e[21]!==g?(j=s.jsx(v,{onClick:o,children:g}),e[20]=o,e[21]=g,e[22]=j):j=e[22];let x;e[23]!==u||e[24]!==j?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[u,j]}),e[23]=u,e[24]=j,e[25]=x):x=e[25];let h;return e[26]!==x||e[27]!==a?(h=s.jsxs(b,{children:[a,x]}),e[26]=x,e[27]=a,e[28]=h):h=e[28],h}function U(t){const e=y.c(9),{orgSlug:l,projectId:r,pageSearch:i}=t,[n]=I.useState(q);let p;e[0]!==l||e[1]!==n?(p={org:l,taskId:n},e[0]=l,e[1]=n,e[2]=p):p=e[2];let c;e[3]!==i||e[4]!==r?(c={virtualmcpid:r,main:"content",...i},e[3]=i,e[4]=r,e[5]=c):c=e[5];let m;return e[6]!==p||e[7]!==c?(m=s.jsx(k,{to:"/$org/$taskId",params:p,search:c,replace:!0}),e[6]=p,e[7]=c,e[8]=m):m=e[8],m}function q(){return crypto.randomUUID()}function D(t){const e=y.c(26),{matches:l,pageSearch:r}=t,i=S(),n=N();let p;e[0]!==n||e[1]!==r?(p=x=>{n({to:"/$org/$taskId",params:{org:x.orgSlug,taskId:crypto.randomUUID()},search:{virtualmcpid:x.project.id,main:"content",...r}})},e[0]=n,e[1]=r,e[2]=p):p=e[2];const c=p;let m;e[3]!==i?(m=i("chooseEditor.chooser.title"),e[3]=i,e[4]=m):m=e[4];let f;e[5]!==m?(f=s.jsx("h1",{className:"text-lg font-medium text-foreground",children:m}),e[5]=m,e[6]=f):f=e[6];let d;e[7]!==i?(d=i("chooseEditor.chooser.subtitle"),e[7]=i,e[8]=d):d=e[8];let a;e[9]!==d?(a=s.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[9]=d,e[10]=a):a=e[10];let u;e[11]!==f||e[12]!==a?(u=s.jsxs("div",{className:"flex flex-col gap-2",children:[f,a]}),e[11]=f,e[12]=a,e[13]=u):u=e[13];let o;if(e[14]!==l||e[15]!==c||e[16]!==i){let x;e[18]!==c||e[19]!==i?(x=h=>s.jsxs("button",{type:"button",onClick:()=>c(h),"aria-label":i("chooseEditor.chooser.openAriaLabel",{title:h.project.title,org:h.orgName}),className:"flex w-full items-center gap-3 rounded-lg border border-border bg-card p-3 text-left transition-colors hover:bg-accent",children:[s.jsx(T,{icon:h.project.icon,name:h.project.title,size:"sm"}),s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:h.project.title}),s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:h.orgName})]})]},`${h.orgSlug}/${h.project.id}`),e[18]=c,e[19]=i,e[20]=x):x=e[20],o=l.map(x),e[14]=l,e[15]=c,e[16]=i,e[17]=o}else o=e[17];let g;e[21]!==o?(g=s.jsx("div",{className:"flex w-full flex-col gap-2",children:o}),e[21]=o,e[22]=g):g=e[22];let j;return e[23]!==u||e[24]!==g?(j=s.jsxs(b,{children:[u,g]}),e[23]=u,e[24]=g,e[25]=j):j=e[25],j}function L(){const t=y.c(24);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/choose-editor"},t[0]=e):e=t[0];const l=K(e);let r,i,n,p;t[1]!==l?(i=l.site?.trim()??"",r=A(l),p=w,n=R.editorResolve(i),t[1]=l,t[2]=r,t[3]=i,t[4]=n,t[5]=p):(r=t[2],i=t[3],n=t[4],p=t[5]);let c;t[6]!==i?(c=()=>_(i),t[6]=i,t[7]=c):c=t[7];const m=i.length>0;let f;t[8]!==n||t[9]!==c||t[10]!==m?(f={queryKey:n,queryFn:c,enabled:m,staleTime:1/0,retry:z},t[8]=n,t[9]=c,t[10]=m,t[11]=f):f=t[11];const d=p(f);if(!i){let o;return t[12]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}),t[12]=o):o=t[12],o}if(d.isError){let o;return t[13]!==d?(o=$(d.error)?s.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}):s.jsx(E,{titleKey:"chooseEditor.error.title",descriptionKey:"chooseEditor.error.description",onRetry:()=>d.refetch()}),t[13]=d,t[14]=o):o=t[14],o}if(!d.data){let o;return t[15]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(P,{}),t[15]=o):o=t[15],o}const{matches:a}=d.data;if(a.length===0){let o;return t[16]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}),t[16]=o):o=t[16],o}if(a.length===1&&a[0]){let o;return t[17]!==a[0].orgSlug||t[18]!==a[0].project.id||t[19]!==r?(o=s.jsx(U,{orgSlug:a[0].orgSlug,projectId:a[0].project.id,pageSearch:r}),t[17]=a[0].orgSlug,t[18]=a[0].project.id,t[19]=r,t[20]=o):o=t[20],o}let u;return t[21]!==a||t[22]!==r?(u=s.jsx(D,{matches:a,pageSearch:r}),t[21]=a,t[22]=r,t[23]=u):u=t[23],u}function z(t,e){return!$(e)&&t<2}function Be(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(F,{children:s.jsx(L,{})}),t[0]=e):e=t[0],e}export{Be as default};
|