decocms 4.564.0 → 4.565.0
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-CQ8p4KFs.js → AlertCircle-BUZy3sYx.js} +1 -1
- package/dist/client/assets/{AreaChart-BG9b7IWq.js → AreaChart-D0-n_ugf.js} +1 -1
- package/dist/client/assets/{ArrowLeft-jRoq4RpN.js → ArrowLeft-DDsFHkTp.js} +1 -1
- package/dist/client/assets/{ArrowUp-WAaoRlHa.js → ArrowUp-DWQcbDQV.js} +1 -1
- package/dist/client/assets/{CartesianChart-CGjmrhMJ.js → CartesianChart-BOuUkFJ5.js} +1 -1
- package/dist/client/assets/{CategoricalChart-hyHkOxr8.js → CategoricalChart-EDrHq-65.js} +1 -1
- package/dist/client/assets/{CheckCircle-Buet-eH6.js → CheckCircle-DIJUPKEz.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DCDJ0sdb.js → ChevronSelectorVertical-CTH779Lx.js} +1 -1
- package/dist/client/assets/{ChevronUp-BTGxI7Zs.js → ChevronUp-DKpA0SQs.js} +1 -1
- package/dist/client/assets/{CreditCard01-CnLItLU2.js → CreditCard01-Br5lPOuR.js} +1 -1
- package/dist/client/assets/{Globe04-DMe5HSmJ.js → Globe04-B5etP6wn.js} +1 -1
- package/dist/client/assets/{Key01-Dxtn8NGa.js → Key01-DK9zv-Op.js} +1 -1
- package/dist/client/assets/{LinkBroken01-CqkORUqT.js → LinkBroken01-BH9f0tfg.js} +1 -1
- package/dist/client/assets/{Minus-D2T9DyMG.js → Minus-ccD5p3q-.js} +1 -1
- package/dist/client/assets/{Monitor01-D-9i_0yJ.js → Monitor01-Dzr2ls8R.js} +1 -1
- package/dist/client/assets/{Play-P7egrfAg.js → Play-Btzw93Bx.js} +1 -1
- package/dist/client/assets/{Plus-DsyYMAU8.js → Plus-CgQrQuUH.js} +1 -1
- package/dist/client/assets/{ReferenceLine-i4QcKbhg.js → ReferenceLine-CtRADngO.js} +1 -1
- package/dist/client/assets/{SearchMd-CW5cmPaz.js → SearchMd-CxCEqQoC.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-CajIv2w8.js → ShoppingBag01-DZhdG6kl.js} +1 -1
- package/dist/client/assets/{Sun-BZ5I37JT.js → Sun-BCBzha1f.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DqmEmDR5.js → SwitchHorizontal01-COrh-gwe.js} +1 -1
- package/dist/client/assets/{Tool01-CSZn_Wh0.js → Tool01-PTUwz10y.js} +1 -1
- package/dist/client/assets/{Tooltip-BueNEHzC.js → Tooltip-B-Z7AH1O.js} +1 -1
- package/dist/client/assets/{Trash01-DDMIP9jc.js → Trash01-CSeiUIoJ.js} +1 -1
- package/dist/client/assets/{Upload01-DT2jBuxA.js → Upload01-XfsfpdVT.js} +1 -1
- package/dist/client/assets/{UserSquare-DKikapRU.js → UserSquare-CBsLM8SI.js} +1 -1
- package/dist/client/assets/{Users01-NB4c6tGb.js → Users01-BprztEKc.js} +1 -1
- package/dist/client/assets/{XClose-DpL893eV.js → XClose-DdH4UADI.js} +1 -1
- package/dist/client/assets/{Zap-DOqlsWJQ.js → Zap-OzyQY3vd.js} +1 -1
- package/dist/client/assets/{access-gate-OrPI42qE.js → access-gate-CKMy1mbR.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-C4a3y2Tw.js → add-connection-dialog-AHjZRtfP.js} +1 -1
- package/dist/client/assets/agent-app-FxZxWAqv.js +1 -0
- package/dist/client/assets/{agent-assets-B6JReGpa.js → agent-assets-BLu431Wu.js} +1 -1
- package/dist/client/assets/{agent-automation-CUEwumhB.js → agent-automation-Bej00D4m.js} +1 -1
- package/dist/client/assets/{agent-automations-CUEa-MdA.js → agent-automations-DjiOoY8H.js} +1 -1
- package/dist/client/assets/{agent-calendar-B-kfsJeA.js → agent-calendar-B97lQHdV.js} +1 -1
- package/dist/client/assets/{agent-capabilities-CmoLwTEk.js → agent-capabilities-BFL3-oro.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-DCF_9i75.js → agent-connect-sources-QxyEtOWi.js} +1 -1
- package/dist/client/assets/agent-deck-CUDUDwqI.js +1 -0
- package/dist/client/assets/{agent-e2e-Me1Y__d1.js → agent-e2e-fCfzW_FQ.js} +1 -1
- package/dist/client/assets/agent-experiments-D-5JyF8e.js +1 -0
- package/dist/client/assets/{agent-file-C2urOOFa.js → agent-file-DgQgKujU.js} +1 -1
- package/dist/client/assets/{agent-hosting-bDpflwDy.js → agent-hosting-BPsqj3Yn.js} +1 -1
- package/dist/client/assets/{agent-icon-TjMVTO6h.js → agent-icon-j6t5huQo.js} +1 -1
- package/dist/client/assets/agent-library-file-B5PZVECD.js +1 -0
- package/dist/client/assets/agent-library-vOMTA0EO.js +1 -0
- package/dist/client/assets/agent-overview-DvJE04ag.js +1 -0
- package/dist/client/assets/{agent-releases-iFoEZYLj.js → agent-releases-B1im8uWG.js} +1 -1
- package/dist/client/assets/agent-settings-DZtfb5db.js +1 -0
- package/dist/client/assets/{agent-site-editor-Bk0gdWbE.js → agent-site-editor-CWbn-ALi.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-B_Y2MLg6.js +2 -0
- package/dist/client/assets/agent-site-editor-content-DQQE1ka2.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-CDYg5AAV.js +1 -0
- package/dist/client/assets/agent-view-BE6ELT_z.js +1 -0
- package/dist/client/assets/{agent-view-guard-CgD2SRHj.js → agent-view-guard-Aay8xve-.js} +1 -1
- package/dist/client/assets/{ai-providers-DP_LPW_J.js → ai-providers-qcfEE-3u.js} +1 -1
- package/dist/client/assets/{alert-DOoQbEiz.js → alert-KmUmMQhB.js} +1 -1
- package/dist/client/assets/{analytics-sections-BnrB72yH.js → analytics-sections-DDjPUZlX.js} +1 -1
- package/dist/client/assets/api-keys-BjAlc6Pz.js +1 -0
- package/dist/client/assets/{api-keys-Cz-pcuKo.js → api-keys-DalsboNs.js} +1 -1
- package/dist/client/assets/{app-editor-BtQvbROq.js → app-editor-CGEsTkX5.js} +1 -1
- package/dist/client/assets/{asset-utils-D0vrhEGW.js → asset-utils-DurtmtJB.js} +1 -1
- package/dist/client/assets/{auth-Bo7mZ0XZ.js → auth-DKMucRNN.js} +1 -1
- package/dist/client/assets/{auth-catchall-DpoQiWR3.js → auth-catchall-CkPAI3Uh.js} +1 -1
- package/dist/client/assets/{auth-entry-BjPguG1n.js → auth-entry-A7VyhJjR.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DZpBIwlD.js → auth-split-layout-LoT4Xun1.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-ntvNyemj.js → authenticate-and-persist-oauth-9jPFumIX.js} +1 -1
- package/dist/client/assets/{automation-list-row-BEFQKTX1.js → automation-list-row-Cu3GEMCa.js} +1 -1
- package/dist/client/assets/{automation-runs-DzWprxEK.js → automation-runs-CpmB4Tc_.js} +1 -1
- package/dist/client/assets/{automations-Bxf0CCXl.js → automations-CKgKaXHz.js} +1 -1
- package/dist/client/assets/{autosend-U0ehaXsA.js → autosend-Ct94XjGX.js} +1 -1
- package/dist/client/assets/{badge-Dfaw3WBB.js → badge-CiHbBWYb.js} +1 -1
- package/dist/client/assets/{block-document-6dm-00hY.js → block-document-BxukMqsM.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-B_sPksUi.js → blocks-preview-workspace-context-XqFh3zcs.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-eGTb5mvz.js → blocks-tab-states-DQ2uW3vb.js} +1 -1
- package/dist/client/assets/{blog-schema-Dsmv2ihg.js → blog-schema-D9NweiCR.js} +1 -1
- package/dist/client/assets/{buckets-C23i5gyQ.js → buckets-CRNcXCo2.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BCaQdWBF.js → build-improve-prompt-doc-d8Z2ZnPa.js} +1 -1
- package/dist/client/assets/{calendar-CmUvBlY1.js → calendar-DaAEMIpU.js} +1 -1
- package/dist/client/assets/{capability-load-error-8rnJwJni.js → capability-load-error-f8fuLXFE.js} +1 -1
- package/dist/client/assets/{category-editor-Cf4WXU9v.js → category-editor-DVmCZ-bz.js} +1 -1
- package/dist/client/assets/{chart-C0imxM4a.js → chart-CzeYnulq.js} +1 -1
- package/dist/client/assets/{chat-context-BBpIuXC7.js → chat-context-DrlDLCTg.js} +1 -1
- package/dist/client/assets/{chat-draft-CGuyKppk.js → chat-draft-DutF2IY0.js} +1 -1
- package/dist/client/assets/{checkbox-CTu0WRp7.js → checkbox-C4q-ggo1.js} +1 -1
- package/dist/client/assets/{choose-editor-BG1SjT1d.js → choose-editor-CNjh4gU1.js} +1 -1
- package/dist/client/assets/{cli-auth-success-C7trLL5C.js → cli-auth-success-Dt-NZyXk.js} +1 -1
- package/dist/client/assets/{client-icons-DQougokE.js → client-icons-ChrUnL8R.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-B30HFRSW.js → cms-settings-editor-D6y5_SVS.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-BphiU1zo.js → cms-store-drafts-4RdP5PWT.js} +1 -1
- package/dist/client/assets/{collapsible-Ddfj_16s.js → collapsible-p2X_LZ_q.js} +1 -1
- package/dist/client/assets/{collection-detail-Cm2aKNHg.js → collection-detail-Cc7LC1R5.js} +1 -1
- package/dist/client/assets/{collection-display-button-9rq6-Wdl.js → collection-display-button-5bNL2B-r.js} +1 -1
- package/dist/client/assets/{collection-search-BnR15-7O.js → collection-search-Rq9aAmdK.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-yg2kkMXP.js → collection-table-wrapper-Dfgu36rj.js} +1 -1
- package/dist/client/assets/{collection-tabs-BC3eX7CT.js → collection-tabs-CdN1mEqK.js} +1 -1
- package/dist/client/assets/{combobox-BWpli-Xr.js → combobox-B_k816xS.js} +1 -1
- package/dist/client/assets/{command-DF3tcytL.js → command-D9i8Wmtq.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-C8SHo1sU.js → companion-mcps-section-_xwSRr1Z.js} +1 -1
- package/dist/client/assets/{config-CiEg0__n.js → config-gHvF9zN4.js} +1 -1
- package/dist/client/assets/{connect-BGwBZ_Ka.js → connect-B7DHTQSC.js} +1 -1
- package/dist/client/assets/{connect-layout-DbCgCtqS.js → connect-layout-CSBXeiVm.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-qP8ktZhS.js → connect-source-dialog-Cq5kJyv3.js} +1 -1
- package/dist/client/assets/{connection-Dqu9RsNH.js → connection-BXJ_FY41.js} +1 -1
- package/dist/client/assets/{connection-card-BwHX3nOo.js → connection-card-CdQGf9Gr.js} +1 -1
- package/dist/client/assets/{connection-detail-DKP8tp8_.js → connection-detail-h3Xef5BT.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BGJcgEzh.js → connection-form-helpers-CAbFPCRq.js} +1 -1
- package/dist/client/assets/{connection-slug-taekJBaK.js → connection-slug-DlGEGmx-.js} +1 -1
- package/dist/client/assets/{connections-cWHNOk6t.js → connections-knVBH_SV.js} +1 -1
- package/dist/client/assets/{content-tab-BLJmurLN.js → content-tab-Bgt3yfFJ.js} +3 -3
- package/dist/client/assets/{context-XrwEqwYe.js → context-CzjjsOy1.js} +1 -1
- package/dist/client/assets/{context-menu-gp9FU1Mh.js → context-menu-I7seXZR-.js} +1 -1
- package/dist/client/assets/{context-shell-DlBNmZfR.js → context-shell-W-FDFEuo.js} +3 -3
- package/dist/client/assets/{core.esm-CTO4JGte.js → core.esm-B2YwU_IP.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-F-su-nyA.js → create-organization-dialog-DTsC6N0a.js} +1 -1
- package/dist/client/assets/{device-hint-tzTpy1A9.js → device-hint-DScofASI.js} +1 -1
- package/dist/client/assets/{discover-CkXTTHib.js → discover-D5YLb2mr.js} +1 -1
- package/dist/client/assets/{domain-settings-Dfq6uTsb.js → domain-settings-Bvue8cd_.js} +1 -1
- package/dist/client/assets/{drawer-BgyRTjxD.js → drawer-rcd6q2GW.js} +1 -1
- package/dist/client/assets/{editor-CyZCJa0L.js → editor-DKXiN5wq.js} +1 -1
- package/dist/client/assets/{editor-classes-D0UJsX59.js → editor-classes-CEDZ4HqC.js} +1 -1
- package/dist/client/assets/{empty-state-Dx-vBzke.js → empty-state-DjHc7-hg.js} +1 -1
- package/dist/client/assets/{empty-state-qO8fmVkF.js → empty-state-vqQ3KE7u.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-BsONYetS.js → experiments-tab-choice-Dh8ppYAz.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CI_UJ-ru.js → extract-connection-data-C5kjoBvz.js} +1 -1
- package/dist/client/assets/{feature-gate-0S4LDUGl.js → feature-gate-C23cezIt.js} +1 -1
- package/dist/client/assets/{feature-paywall-DbRigt-8.js → feature-paywall-DjcqAfOJ.js} +1 -1
- package/dist/client/assets/{feedback-DpZ51nw_.js → feedback-drIplfYL.js} +1 -1
- package/dist/client/assets/{file-explorer-Is8X98eh.js → file-explorer-DBLkEKms.js} +1 -1
- package/dist/client/assets/{file-preview-DA7tD6qn.js → file-preview-CVMBd1Aq.js} +1 -1
- package/dist/client/assets/{file-share-button-DNqRplIB.js → file-share-button-vL9eIvKg.js} +1 -1
- package/dist/client/assets/{file-type-icon-DrIF_ach.js → file-type-icon-CCFDVXm1.js} +1 -1
- package/dist/client/assets/{folder-icon-CE9rKFgu.js → folder-icon-CppdX2mp.js} +1 -1
- package/dist/client/assets/{form-BmoTeXbP.js → form-C4sadtDB.js} +1 -1
- package/dist/client/assets/{general-Ds6mKAD-.js → general-BuV3Nce0.js} +1 -1
- package/dist/client/assets/{github-icon-Cfkkw3me.js → github-icon-BEtyiUak.js} +1 -1
- package/dist/client/assets/{home-gn6ueFSP.js → home-D03v7B7M.js} +1 -1
- package/dist/client/assets/{home-overview-Bk4OGXI-.js → home-overview-B5N2uzQG.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-liA8Ue5e.js → hosted-reconcile-CTo69L2B.js} +1 -1
- package/dist/client/assets/{icon-button-Cpw9GkVM.js → icon-button-D7BqTj7e.js} +1 -1
- package/dist/client/assets/{index-DLDJ3DHb.js → index-B6dL3l3v.js} +1 -1
- package/dist/client/assets/{index-cgovyYsQ.js → index-B9QAGcIi.js} +3 -3
- package/dist/client/assets/{index-BhO2XRBo.js → index-Bcs1Jn6T.js} +1 -1
- package/dist/client/assets/{index-Ckdck5oP.js → index-Bg3B7UHn.js} +1 -1
- package/dist/client/assets/{index-DtPyNOkW.js → index-BnjrBR8E.js} +1 -1
- package/dist/client/assets/{index-CpV2sqUd.js → index-BreUqgwa.js} +1 -1
- package/dist/client/assets/{index-C90BaQbH.js → index-CdkyKdQE.js} +1 -1
- package/dist/client/assets/{index-B7P1i0U8.js → index-D16zKa27.js} +1 -1
- package/dist/client/assets/{index-CtB8Tw63.js → index-D1l3fAOF.js} +1 -1
- package/dist/client/assets/{index-CU6Pikl7.js → index-DL44u3pr.js} +1 -1
- package/dist/client/assets/{index-DUKj5t3l.js → index-DRJopDNa.js} +1 -1
- package/dist/client/assets/{index-DId4rr-A.js → index-DZP2U0sA.js} +1 -1
- package/dist/client/assets/{index-3pV4g77m.js → index-DkFHTWdU.js} +1 -1
- package/dist/client/assets/{index-Cst8xARc.js → index-HhJUJvXL.js} +1 -1
- package/dist/client/assets/{index-BFqtpAvr.js → index-SfqoOQYU.js} +1 -1
- package/dist/client/assets/{index-B5Rq0Q_b.js → index-WPlNd6HG.js} +1 -1
- package/dist/client/assets/{index-redirect-pAjv5SXQ.js → index-redirect-PIpqWCO6.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-D_MIEAF-.js → infiniteQueryObserver-C-hgR5Ng.js} +1 -1
- package/dist/client/assets/{infra-billing-DRZUvwh3.js → infra-billing-zV8SMnqa.js} +1 -1
- package/dist/client/assets/{input-Dm8Dm-Qz.js → input-DAJXuUGX.js} +1 -1
- package/dist/client/assets/{input-DuP90nBH.js → input-E3sOauPj.js} +3 -3
- package/dist/client/assets/{integration-icon-bQl-nSH8.js → integration-icon-gO2PpMmm.js} +1 -1
- package/dist/client/assets/{jira-icon-DBFOj94A.js → jira-icon-Bly7_EHi.js} +1 -1
- package/dist/client/assets/{label-BJpZpGc0.js → label-vS6r_XGb.js} +1 -1
- package/dist/client/assets/{layout-7S8BP6VQ.js → layout-ClXd0E_v.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DR8nRly5.js → legacy-agents-deep-D_m5HUln.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-Dth5bVh1.js → legacy-main-redirect-Bhp1P1b4.js} +1 -1
- package/dist/client/assets/library-Db4s-ko5.js +1 -0
- package/dist/client/assets/{library-tab-BL_lF-ft.js → library-tab-BL-Getqj.js} +1 -1
- package/dist/client/assets/{login-DjUNKygv.js → login-f4lgwVY7.js} +1 -1
- package/dist/client/assets/{markdown-mKHkB6FI.js → markdown-DpeGUbAj.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DjL0niPw.js → mcp-app-renderer-DjD3bMOq.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C7DXVMTi.js → mcp-oauth-Cy5aE8WI.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BIp0LO3E.js → mcp-oauth-Dtv3HdvF.js} +1 -1
- package/dist/client/assets/{members-CtRzSe07.js → members-Cl92bXBM.js} +1 -1
- package/dist/client/assets/{memory-CRxleuoc.js → memory-BL_joWCg.js} +1 -1
- package/dist/client/assets/{mock-board-DnsUfCSW.js → mock-board-B7XWzCAY.js} +3 -3
- package/dist/client/assets/{monaco-editor-CuW8q0yx.js → monaco-editor-CMN1nj-z.js} +1 -1
- package/dist/client/assets/{monitoring-9MjXgbIo.js → monitoring-CivJic7t.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BcsNTX2l.js → monitoring-stats-row-CFPCZIJ6.js} +1 -1
- package/dist/client/assets/{multi-select-D9xyRxxq.js → multi-select-CRqAQYHR.js} +1 -1
- package/dist/client/assets/{mustache-8etVpD7L.js → mustache-BVc9oNvd.js} +1 -1
- package/dist/client/assets/{named-rule-view-CTR1XvI8.js → named-rule-view-BxYaeyPw.js} +1 -1
- package/dist/client/assets/{new-project-dialog-CG2L3MM-.js → new-project-dialog-D5pTs5sE.js} +1 -1
- package/dist/client/assets/{oauth-callback-BbuovBw_.js → oauth-callback-BS9cs2pQ.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DHqdJcsI.js → oauth-callback-ai-provider-BfIz-ivq.js} +1 -1
- package/dist/client/assets/{oauth-consent-DweBwUQF.js → oauth-consent-BP08bdO4.js} +1 -1
- package/dist/client/assets/{onboarding-DrVndD7e.js → onboarding-Bl5ZkXNE.js} +1 -1
- package/dist/client/assets/{openai-conversation-yopZy_vm.js → openai-conversation-DoQkXI6l.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-DacJkxjX.js → optimistic-project-sidebar-views-tS3PmAgd.js} +1 -1
- package/dist/client/assets/{order-monitor-day-CKYfInMA.js → order-monitor-day-Bv5hfoVb.js} +1 -1
- package/dist/client/assets/{organization-choice-Fbcae3dn.js → organization-choice-amaY9pb3.js} +1 -1
- package/dist/client/assets/{orgs-DDZTEU_k.js → orgs-CJA8kvjG.js} +1 -1
- package/dist/client/assets/{own-accounts-section-C1y0YP6A.js → own-accounts-section-BLd-7Js0.js} +1 -1
- package/dist/client/assets/{pair-C5AjfCSI.js → pair-DHqTslhV.js} +1 -1
- package/dist/client/assets/{parse-sections-Cu97Vu_M.js → parse-sections-BVMpX2K7.js} +3 -3
- package/dist/client/assets/{plan-BohW26kq.js → plan-hbgIq9zB.js} +1 -1
- package/dist/client/assets/{plan-ladder-BaPcuCG0.js → plan-ladder-B5cE0jWA.js} +1 -1
- package/dist/client/assets/{plan-usage-card-YdOsJ_ZX.js → plan-usage-card-Dj0pO4XV.js} +1 -1
- package/dist/client/assets/{popover-ns8sHJq5.js → popover-C-jO615q.js} +1 -1
- package/dist/client/assets/{post-calendar-DXzGaukN.js → post-calendar-CIL9XfgC.js} +1 -1
- package/dist/client/assets/{post-editor-DR58AVSj.js → post-editor-BMQwNp8x.js} +1 -1
- package/dist/client/assets/{preview-content-VCoMFFk-.js → preview-content-BukNzknx.js} +1 -1
- package/dist/client/assets/{preview-dialog-Dhde6lFg.js → preview-dialog-D5U4zv2O.js} +1 -1
- package/dist/client/assets/{preview-panel-BL4zck9B.js → preview-panel-BL_lgpiC.js} +1 -1
- package/dist/client/assets/{preview-tab-Dw3ViDnI.js → preview-tab-DcqwQItc.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-DtlAip15.js → product-picker-dialog-B92R7jys.js} +1 -1
- package/dist/client/assets/{profile-CX0TYtL2.js → profile-LNbZJ_ux.js} +1 -1
- package/dist/client/assets/{project-app-view-DbconS9D.js → project-app-view-R18k-SGv.js} +1 -1
- package/dist/client/assets/{project-apps-DCer9_HY.js → project-apps-DysK_I9D.js} +1 -1
- package/dist/client/assets/{project-icon-BTrwq8bi.js → project-icon-BwRso9pR.js} +1 -1
- package/dist/client/assets/{project-index-DwUzdWkU.js → project-index-9_5MRu0H.js} +1 -1
- package/dist/client/assets/project-reports-DpEsKYcB.js +1 -0
- package/dist/client/assets/{project-sidebar-views-vqZZbL1p.js → project-sidebar-views-DqUhr5Jd.js} +1 -1
- package/dist/client/assets/project-tasks-CaCrY53V.js +1 -0
- package/dist/client/assets/{projects-DRZyZAme.js → projects-Cm09eTvv.js} +1 -1
- package/dist/client/assets/{projects-empty-state-TY4kUtt4.js → projects-empty-state-DcAgqv_c.js} +1 -1
- package/dist/client/assets/{prompts-kv226h0M.js → prompts-BCijiEsh.js} +1 -1
- package/dist/client/assets/record-editor-CPuAtXe_.js +1 -0
- package/dist/client/assets/{redirect-editor-B3601TC3.js → redirect-editor-CSzQk1jy.js} +1 -1
- package/dist/client/assets/reports-DDzW56I0.js +1 -0
- package/dist/client/assets/{reports-C7qj5Hfb.js → reports-DXAJ0INx.js} +1 -1
- package/dist/client/assets/{reports-onboarding-DW_hGBmK.js → reports-onboarding-FFEfe47C.js} +1 -1
- package/dist/client/assets/{reports-tab-fjcRNutW.js → reports-tab-D34JJuD5.js} +2 -2
- package/dist/client/assets/repositories-BF8FKyyH.js +1 -0
- package/dist/client/assets/{repositories-C9ox4SEq.js → repositories-CX1gcCIy.js} +1 -1
- package/dist/client/assets/{repository-binding-CoBbz5GR.js → repository-binding-DQBwqIdh.js} +1 -1
- package/dist/client/assets/{repository-picker-_0XvcaQZ.js → repository-picker-D28IiEA1.js} +1 -1
- package/dist/client/assets/{require-capability-BEaEpCmo.js → require-capability-lC-cq-4i.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CtQpY9CE.js → required-auth-layout-B1n-jO0G.js} +1 -1
- package/dist/client/assets/{reset-password-DMO2Wfnx.js → reset-password-BRead2qa.js} +1 -1
- package/dist/client/assets/{resizable-D1KNHtt_.js → resizable-CgUywIR3.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DnI4GUKU.js → resolve-tab-icon-3yBFBtck.js} +1 -1
- package/dist/client/assets/{review-settings-qBiQynjA.js → review-settings-bxD9xR2o.js} +1 -1
- package/dist/client/assets/{role-color-m3ekTafX.js → role-color-hEm79GE-.js} +1 -1
- package/dist/client/assets/{roles-Dlv8qi0F.js → roles-Cyf3_30G.js} +1 -1
- package/dist/client/assets/route-B0ZIQ0Ma.js +1 -0
- package/dist/client/assets/{route-DBjrARiw.js → route-Dr8TlTpE.js} +1 -1
- package/dist/client/assets/{route-BwO9p6WQ.js → route-Vc2fvKzt.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-6GAWc6Uh.js → sandbox-lifecycle-context-C-cikADe.js} +1 -1
- package/dist/client/assets/{schema-D09C1K2b.js → schema-BmoGjDOl.js} +1 -1
- package/dist/client/assets/{schema-BAc2zoda.js → schema-xK_YLRyW.js} +1 -1
- package/dist/client/assets/{scroll-area-DhC9My5l.js → scroll-area-_tOH3ur-.js} +1 -1
- package/dist/client/assets/{search-input-CaK4kync.js → search-input-_nT4LD9W.js} +1 -1
- package/dist/client/assets/{search-toggle-DPRPz4f9.js → search-toggle-Bt0RBV_T.js} +1 -1
- package/dist/client/assets/{secret-picker-KlL9XTXY.js → secret-picker-BEMjze77.js} +1 -1
- package/dist/client/assets/{secrets-BRi5VdUF.js → secrets-C4pvpPFF.js} +1 -1
- package/dist/client/assets/{section-array-field--v0XzXwk.js → section-array-field-BhmZf33V.js} +1 -1
- package/dist/client/assets/{sections-editor-BpvyJAUh.js → sections-editor-BahV49vR.js} +1 -1
- package/dist/client/assets/{sections-Dm0haO3S.js → sections-oyFdwcdt.js} +1 -1
- package/dist/client/assets/{select-eZpStU_o.js → select-Ck5SAjc0.js} +1 -1
- package/dist/client/assets/{select-model-BfBifSzm.js → select-model-TlM3kGOM.js} +1 -1
- package/dist/client/assets/{seo-editor-PC4JhIxf.js → seo-editor-DbYSgwgg.js} +1 -1
- package/dist/client/assets/{separator-DTEg-0rT.js → separator-nr4yw_w3.js} +1 -1
- package/dist/client/assets/settings-tab-C574GkDL.js +1 -0
- package/dist/client/assets/{sheet-DWPcPfVu.js → sheet-Ck3eYK8j.js} +1 -1
- package/dist/client/assets/{shell-layout-C_vTrOFi.js → shell-layout-0PvdYI4e.js} +1 -1
- package/dist/client/assets/{site-draft-actions-BHxYhtRx.js → site-draft-actions-D8RlcpAy.js} +1 -1
- package/dist/client/assets/{site-draft-view-B62lda-n.js → site-draft-view--bKEMpRl.js} +1 -1
- package/dist/client/assets/site-editor-DliU2BL4.js +1 -0
- package/dist/client/assets/{site-editor-toast-DtZvuCiL.js → site-editor-toast-1xU8PLbH.js} +1 -1
- package/dist/client/assets/{skills-xTHKZ-fS.js → skills-rfB5-VI0.js} +1 -1
- package/dist/client/assets/{slider-Ciu4_ug0.js → slider-8IGhnWwI.js} +1 -1
- package/dist/client/assets/{sortable.esm-BpQuZ2Ss.js → sortable.esm-C3omzTs2.js} +1 -1
- package/dist/client/assets/{sso-BBNnGqrM.js → sso-CvsmzOVo.js} +1 -1
- package/dist/client/assets/{suggestion-C3ZKXBdN.js → suggestion-BnWZuYZ4.js} +1 -1
- package/dist/client/assets/{switch-BMZWxSSe.js → switch-CrMzty1r.js} +1 -1
- package/dist/client/assets/{synced-repos-CvcyOOTD.js → synced-repos-EvtkBI_e.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-C7CENxYE.js → tab-icon-glyph-BZwIIvKt.js} +1 -1
- package/dist/client/assets/{table-BXlZF1sj.js → table-B-PaUoV-.js} +1 -1
- package/dist/client/assets/{tabs-CTACUnuC.js → tabs-DsvRYtth.js} +1 -1
- package/dist/client/assets/{task-board-AmZMoSDj.js → task-board-DUjYvB64.js} +1 -1
- package/dist/client/assets/{task-route-DZtDO9ed.js → task-route-BMEJVpqc.js} +1 -1
- package/dist/client/assets/{task-status-CHJ2KIGX.js → task-status-DUJ4klbA.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-oNMzSYdF.js → taskboard-analytics-C4m8rGz-.js} +1 -1
- package/dist/client/assets/{tasks-CbVjJ3WE.js → tasks-CNMR5vbO.js} +1 -1
- package/dist/client/assets/tasks-ClrYvNJS.js +1 -0
- package/dist/client/assets/{textarea-eeqMJnUq.js → textarea-B-d79s_Z.js} +1 -1
- package/dist/client/assets/{thread-analytics-D2UkVv7U.js → thread-analytics-DbW-orFR.js} +1 -1
- package/dist/client/assets/{thread-intent-B59SA_sa.js → thread-intent-nPaIrh5T.js} +1 -1
- package/dist/client/assets/{thread-route-Dpw37tsP.js → thread-route-C-fZMEzK.js} +1 -1
- package/dist/client/assets/{thread-route-DT3i-QGQ.js → thread-route-D6FVJ5Pt.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-DfCWtsKP.js → thread-sheet-body-4kfwGVLF.js} +1 -1
- package/dist/client/assets/{time-range-picker-Cd1A1wA5.js → time-range-picker-D3lhDkd6.js} +1 -1
- package/dist/client/assets/{toggle-group-C6Pg2YNy.js → toggle-group-DDLjSUGx.js} +1 -1
- package/dist/client/assets/{tool-namespace-DbWzvuWO.js → tool-namespace-C_xQ9mqM.js} +1 -1
- package/dist/client/assets/{tool-set-selector-CCOfv97s.js → tool-set-selector-DEXMYXsv.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Cy2z0B4C.js → toolbar-icon-button-CWL_p98D.js} +1 -1
- package/dist/client/assets/{tooltip-Bg4P3YaG.js → tooltip-oILxW0vz.js} +1 -1
- package/dist/client/assets/{tooltipContext-DNapU3M5.js → tooltipContext-C_nJIpn-.js} +1 -1
- package/dist/client/assets/{track-BAapDq3b.js → track-BWVeZkDF.js} +1 -1
- package/dist/client/assets/{types-BrSjQREm.js → types-CsgacF3E.js} +1 -1
- package/dist/client/assets/{url-slug-DyPxKD3g.js → url-slug-FKQbDq1Y.js} +1 -1
- package/dist/client/assets/{usage-stats-Di2DK9Gv.js → usage-stats-ckY7bir_.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Bz3SR-CO.js → use-ai-providers-Bt6-bPMi.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-BXKIXuir.js → use-apply-named-rule-CB2USRZm.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-Lm_VhfAp.js +1 -0
- package/dist/client/assets/{use-automations-BU5c4wvD.js → use-automations-DqqmzjNf.js} +1 -1
- package/dist/client/assets/{use-autosave-CkIhfcE5.js → use-autosave-Ci8EUR3c.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-CEe6lCIY.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-DvftxykM.js → use-chat-layout-state-DEw-Z4XH.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-B3qNhOq8.js → use-cms-publish-actions-B6_zhSLP.js} +1 -1
- package/dist/client/assets/{use-connect-companion-3Wux1jMd.js → use-connect-companion-CJ1V6Cc9.js} +1 -1
- package/dist/client/assets/{use-connection-IiFidBLV.js → use-connection-MZkJifu9.js} +1 -1
- package/dist/client/assets/{use-content-sync-BrMwpVNk.js → use-content-sync-xsHAgdwR.js} +1 -1
- package/dist/client/assets/{use-copy-D49VwPhf.js → use-copy-CmgIzYEc.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DKLPMzYi.js → use-date-fns-locale-CiK-kZT2.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CcnJ6SAY.js → use-debounced-autosave-k0uhxHTu.js} +1 -1
- package/dist/client/assets/{use-debounced-value-nhqnKklo.js → use-debounced-value-4HPN6F1v.js} +1 -1
- package/dist/client/assets/{use-deco-credits-NgUo324z.js → use-deco-credits-B4lu3fXJ.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-mew6sG2k.js → use-decopilot-events-CSMeMZFB.js} +1 -1
- package/dist/client/assets/{use-delete-connection-D-oKvtiI.js → use-delete-connection-CV7YpSZq.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CHn3xyJc.js → use-deployment-admin-DrbwQcfz.js} +1 -1
- package/dist/client/assets/{use-entitlements-C6In-vfl.js → use-entitlements-CwMPeVRh.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CIz-3ef3.js → use-fast-preview-draft-url-HR2Mguzw.js} +1 -1
- package/dist/client/assets/{use-file-configs-CwAhp36j.js → use-file-configs-CtHitp6a.js} +1 -1
- package/dist/client/assets/{use-id-selection-mULmZ-Hz.js → use-id-selection-5eeHtHC2.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-CHAfyO1k.js → use-inbox-feed-e0rtwoRI.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-fmrdKwVH.js → use-infinite-scroll-JJ1sRtN8.js} +1 -1
- package/dist/client/assets/{use-join-requests-D9VYGJJu.js → use-join-requests-D4Y8yFTh.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-3c9VwMgJ.js → use-main-panel-tabs-CSsS4ygl.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CK0IBQOj.js → use-mcp-auth-status-CLh3EI2o.js} +1 -1
- package/dist/client/assets/{use-mcp-client-B3mZDGvG.js → use-mcp-client-DMMY7p2F.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DnVJp_BL.js → use-mcp-prompts-Cnaz613K.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Dn8Dy7zb.js → use-mcp-tools-DUwKta2N.js} +1 -1
- package/dist/client/assets/{use-mobile-dJL_Pm5y.js → use-mobile-CxVTRfmL.js} +1 -1
- package/dist/client/assets/{use-move-blocks-R4zS1l6g.js → use-move-blocks-DodzNqQA.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CYu1HJsb.js → use-navigate-to-agent-brFKQesH.js} +1 -1
- package/dist/client/assets/{use-org-fs-C83fBFK-.js → use-org-fs-CCuveubU.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CVhh3XbC.js → use-org-repo-syncs-BCYcL58l.js} +1 -1
- package/dist/client/assets/{use-org-sso-BVcty70n.js → use-org-sso-B4FQ0C98.js} +1 -1
- package/dist/client/assets/{use-organization-settings-D9LYxkkn.js → use-organization-settings-DH5kZG2b.js} +1 -1
- package/dist/client/assets/{use-project-scope-Y6vAoZoW.js → use-project-scope-uO0SKwDI.js} +1 -1
- package/dist/client/assets/{use-recent-apps-ZWyNF1BM.js → use-recent-apps-BJNw5gWP.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CGaxGYkR.js → use-reports-diagnostic-kYFSO4R9.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-BFiAvETH.js → use-sandbox-events-AvaA9vQX.js} +1 -1
- package/dist/client/assets/{use-secrets-DLxKCtNq.js → use-secrets-DCu-T9As.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CNXXBKYv.js → use-section-preview-base-BLb3OKQi.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-SAa7Vnq8.js → use-sidebar-collapsed-dPXmQ4W-.js} +1 -1
- package/dist/client/assets/{use-tags-Dns9fjGu.js → use-tags-C11lA6hi.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-D75AC0iX.js → use-task-board-analytics-CY_2ndKg.js} +1 -1
- package/dist/client/assets/{use-task-board-events-Dv2JYyOG.js → use-task-board-events-DpeC1l86.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-DoH7p5yB.js → use-task-board-item-prs-DDZyRhcP.js} +1 -1
- package/dist/client/assets/{use-task-board-items-CqIbwb7-.js → use-task-board-items-tAyw3uLv.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-ptkIJi--.js → use-task-board-prompts-O9x7Uh9U.js} +1 -1
- package/dist/client/assets/{use-task-metadata-D4qj8QP6.js → use-task-metadata-C23PzQfJ.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-Btu23rT9.js → use-thread-outputs-DiaGC7Y7.js} +1 -1
- package/dist/client/assets/{use-voice-input-Bo9Hi7-O.js → use-voice-input-BY0JjW9k.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BmW6K-t7.js +1 -0
- package/dist/client/assets/{useQueries-Blq1gg86.js → useQueries-CaG99_C7.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CxbSfeDW.js +1 -0
- package/dist/client/assets/{users-CXxP5GbR.js → users-ClNnYbzC.js} +1 -1
- package/dist/client/assets/{utils-D_vHWhJR.js → utils-BmmitFKg.js} +1 -1
- package/dist/client/assets/{variant-calendar-B-mtMhAk.js → variant-calendar-C5TS_GsH.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-hYkKBfSm.js → variant-matcher-override-CJZktUQX.js} +1 -1
- package/dist/client/assets/{view-header-DrakbT1r.js → view-header-YmnNJKSa.js} +1 -1
- package/dist/client/assets/{virtual-mcp-wPX8BO9V.js → virtual-mcp-CLe7zCk-.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-0ZXuPLm-.js → watch-sse-pool-DXHpGpdE.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +24 -23
- package/dist/server/server.js +687 -687
- package/package.json +1 -1
- package/dist/client/assets/agent-app-ClOnnzDV.js +0 -1
- package/dist/client/assets/agent-deck-V4MMZHZM.js +0 -1
- package/dist/client/assets/agent-experiments-DH_tqVqH.js +0 -1
- package/dist/client/assets/agent-library-Co57cOat.js +0 -1
- package/dist/client/assets/agent-library-file-C_ffGwfX.js +0 -1
- package/dist/client/assets/agent-overview-D_ilxAiM.js +0 -1
- package/dist/client/assets/agent-settings-Fpuz9R9B.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CZax6TM0.js +0 -2
- package/dist/client/assets/agent-site-editor-content-BaWyOpGo.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-BwBm5AOl.js +0 -1
- package/dist/client/assets/agent-view-y52sDry1.js +0 -1
- package/dist/client/assets/api-keys-eCL0fGKt.js +0 -1
- package/dist/client/assets/library-DgHRYlXy.js +0 -1
- package/dist/client/assets/project-reports-BDw7SW7K.js +0 -1
- package/dist/client/assets/project-tasks-BrIInxOE.js +0 -1
- package/dist/client/assets/record-editor-Cybz45vp.js +0 -1
- package/dist/client/assets/reports-9BRnMytv.js +0 -1
- package/dist/client/assets/repositories-CSX3h8Qf.js +0 -1
- package/dist/client/assets/route-C9j-dl8S.js +0 -1
- package/dist/client/assets/settings-tab-BiP5If_9.js +0 -1
- package/dist/client/assets/site-editor-D-_GHa40.js +0 -1
- package/dist/client/assets/tasks-haJ5q1d6.js +0 -1
- package/dist/client/assets/use-ask-in-chat-BF9v_lE6.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-BSsXx46E.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BhHoWMFB.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DJxixS4t.js +0 -1
package/dist/client/assets/{own-accounts-section-C1y0YP6A.js → own-accounts-section-BLd-7Js0.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,b as B,j as s,I as ce,am as Ie,X as we,B as Q,Z as Te,_ as De,ak as G,i as le,K as O,b3 as Ae,Y as H,a8 as ke,J as Ue,bB as Ee,m as Oe,a5 as oe,a as je,q as re,e as z,t as R,r as M,au as Se,x as Re,w as qe,h as Fe,v as $e,D as Be,aE as Le,aD as ze,y as Me,aF as Qe,aG as me,aI as He,aH as Ge,aJ as Ve,aK as We,bj as Ye,aL as Je,aM as Xe,aN as Ze,l as et,g2 as tt,gN as st}from"./index-cgovyYsQ.js";import{s as it}from"./Plus-DsyYMAU8.js";import{f as nt,g as lt,e as ot}from"./use-ai-providers-Bz3SR-CO.js";import{P as xe}from"./ai-providers-logos-DD3qZ33J.js";import{B as fe}from"./badge-Dfaw3WBB.js";import{i as rt}from"./AlertCircle-CQ8p4KFs.js";import{T as pe,a as ge,c as he}from"./tooltip-Bg4P3YaG.js";import{S as at}from"./switch-BMZWxSSe.js";import{G as ct}from"./github-icon-Cfkkw3me.js";import{i as dt,s as ut,c as mt}from"./Tool01-CSZn_Wh0.js";import{s as ft}from"./Trash01-DDMIP9jc.js";import{u as pt,f as gt}from"./use-date-fns-locale-DKLPMzYi.js";import{g as Ce}from"./openai-compatible-presets-BKGfVqEx.js";function de(t){const e=$.c(32),{icon:i,title:l,status:o,meta:r,summary:p,action:m,children:c}=t,g=B();let a;e[0]!==i?(a=s.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted/60",children:i}),e[0]=i,e[1]=a):a=e[1];let n;e[2]!==l?(n=s.jsx("span",{className:"truncate text-sm font-medium",children:l}),e[2]=l,e[3]=n):n=e[3];let u;e[4]!==o||e[5]!==g?(u=o==="linked"&&s.jsx(fe,{variant:"success",size:"sm",children:g("settings.ownAccounts.linked")}),e[4]=o,e[5]=g,e[6]=u):u=e[6];let f;e[7]!==o||e[8]!==g?(f=o==="expired"&&s.jsx(fe,{variant:"warning",size:"sm",children:g("settings.ownAccounts.expired")}),e[7]=o,e[8]=g,e[9]=f):f=e[9];let d;e[10]!==n||e[11]!==u||e[12]!==f?(d=s.jsxs("div",{className:"flex items-center gap-2",children:[n,u,f]}),e[10]=n,e[11]=u,e[12]=f,e[13]=d):d=e[13];let h;e[14]!==r?(h=r&&s.jsx("span",{className:"truncate text-meta",children:r}),e[14]=r,e[15]=h):h=e[15];let x;e[16]!==d||e[17]!==h?(x=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[d,h]}),e[16]=d,e[17]=h,e[18]=x):x=e[18];let b;e[19]!==p?(b=p&&s.jsx("div",{className:"order-last basis-full pl-11 sm:order-none sm:basis-auto sm:pl-0",children:p}),e[19]=p,e[20]=b):b=e[20];let C;e[21]!==m?(C=s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:m}),e[21]=m,e[22]=C):C=e[22];let y;e[23]!==a||e[24]!==x||e[25]!==b||e[26]!==C?(y=s.jsxs("div",{className:"flex min-h-16 flex-wrap items-center gap-x-3 gap-y-2 px-4 py-3",children:[a,x,b,C]}),e[23]=a,e[24]=x,e[25]=b,e[26]=C,e[27]=y):y=e[27];let j;return e[28]!==c||e[29]!==y||e[30]!==l?(j=s.jsxs("div",{role:"group","aria-label":l,children:[y,c]}),e[28]=c,e[29]=y,e[30]=l,e[31]=j):j=e[31],j}function be(t){const e=$.c(7),{src:i,alt:l}=t;if(!i){let r;e[0]!==l?(r=l.charAt(0),e[0]=l,e[1]=r):r=e[1];let p;return e[2]!==r?(p=s.jsx("span",{className:"text-sm font-medium",children:r}),e[2]=r,e[3]=p):p=e[3],p}let o;return e[4]!==l||e[5]!==i?(o=s.jsx("img",{src:i,alt:l,className:"size-5 object-contain"}),e[4]=l,e[5]=i,e[6]=o):o=e[6],o}function ue(t){const e=$.c(10),{children:i}=t,l=B();let o;e[0]!==l?(o=l("settings.ownAccounts.more"),e[0]=l,e[1]=o):o=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ie,{size:16}),e[2]=r):r=e[2];let p;e[3]!==o?(p=s.jsx(we,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"icon-sm","aria-label":o,className:"text-muted-foreground hover:text-foreground",children:r})}),e[3]=o,e[4]=p):p=e[4];let m;e[5]!==i?(m=s.jsx(Te,{align:"end",children:i}),e[5]=i,e[6]=m):m=e[6];let c;return e[7]!==p||e[8]!==m?(c=s.jsxs(De,{children:[p,m]}),e[7]=p,e[8]=m,e[9]=c):c=e[9],c}function ye(t){const e=$.c(23),{hint:i,submitLabel:l,pending:o,value:r,onChange:p,onSubmit:m,inputProps:c}=t;let g;e[0]!==m?(g=b=>{b.preventDefault(),m()},e[0]=m,e[1]=g):g=e[1];let a;e[2]!==i?(a=s.jsx("p",{className:"text-meta",children:i}),e[2]=i,e[3]=a):a=e[3];let n;e[4]!==p?(n=b=>p(b.target.value),e[4]=p,e[5]=n):n=e[5];let u;e[6]!==c||e[7]!==n||e[8]!==r?(u=s.jsx(ce,{type:"password",autoFocus:!0,...c,value:r,onChange:n}),e[6]=c,e[7]=n,e[8]=r,e[9]=u):u=e[9];let f;e[10]!==o||e[11]!==r?(f=r.trim().length===0||o,e[10]=o,e[11]=r,e[12]=f):f=e[12];let d;e[13]!==l||e[14]!==f?(d=s.jsx(Q,{type:"submit",disabled:f,children:l}),e[13]=l,e[14]=f,e[15]=d):d=e[15];let h;e[16]!==u||e[17]!==d?(h=s.jsxs("div",{className:"flex items-center gap-2",children:[u,d]}),e[16]=u,e[17]=d,e[18]=h):h=e[18];let x;return e[19]!==g||e[20]!==a||e[21]!==h?(x=s.jsxs("form",{className:"flex flex-col gap-2 px-4 pb-4 pl-15",onSubmit:g,children:[a,h]}),e[19]=g,e[20]=a,e[21]=h,e[22]=x):x=e[22],x}const ht={codex:"https://chatgpt.com/codex/settings/usage",claude:"https://claude.ai/settings/usage"};function ve(t,e){return t.id==="seven_day_sonnet"?"Sonnet":t.id==="seven_day_opus"?"Opus":t.id.startsWith("code_review_")?e("settings.subscriptionUsage.codeReview"):t.windowSeconds&&t.windowSeconds%86400===0?`${t.windowSeconds/86400}d`:t.windowSeconds?`${Math.round(t.windowSeconds/3600*10)/10}h`:t.id==="secondary"?e("settings.subscriptionUsage.secondary"):e("settings.subscriptionUsage.primary")}function xt(t){return t>=100?"bg-destructive":t>=90?"bg-warning":"bg-foreground/70"}function _e(t){const e=$.c(12),{provider:i,orgId:l,userId:o,linkedAt:r,enabled:p}=t,m=G();let c;e[0]!==r||e[1]!==l||e[2]!==i||e[3]!==o?(c=O.subscriptionUsageSnapshot(l,o,i,r),e[0]=r,e[1]=l,e[2]=i,e[3]=o,e[4]=c):c=e[4];let g;e[5]!==i||e[6]!==m?(g=()=>m.call("SUBSCRIPTION_USAGE_GET",{provider:i}),e[5]=i,e[6]=m,e[7]=g):g=e[7];const a=p&&!!o;let n;return e[8]!==c||e[9]!==g||e[10]!==a?(n={queryKey:c,queryFn:g,enabled:a,staleTime:6e4,retry:!1,refetchOnWindowFocus:!1},e[8]=c,e[9]=g,e[10]=a,e[11]=n):n=e[11],le(n)}function Pe(t){const e=$.c(30),{query:i}=t,l=B(),[o]=Ue(),r=i.data;if(i.isPending){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Ee,{className:"h-4 w-32"}),e[0]=a):a=e[0],a}if(i.isError||r?.status!=="available"){const a=r?.reason;let n;e[1]!==a||e[2]!==l||e[3]!==r?.status?(n=a==="permission"?l("settings.subscriptionUsage.permission"):a==="authorization"?l("settings.subscriptionUsage.authorization"):a==="rate_limited"?l("settings.subscriptionUsage.rateLimited"):r?.status==="disconnected"?l("settings.subscriptionUsage.disconnected"):l("settings.subscriptionUsage.unavailable"),e[1]=a,e[2]=l,e[3]=r?.status,e[4]=n):n=e[4];const u=n;let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(rt,{size:12}),e[5]=f):f=e[5];let d;e[6]!==l?(d=l("settings.subscriptionUsage.unavailableShort"),e[6]=l,e[7]=d):d=e[7];let h;e[8]!==d?(h=s.jsx(pe,{asChild:!0,children:s.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-meta",children:[f,d]})}),e[8]=d,e[9]=h):h=e[9];let x;e[10]!==u?(x=s.jsx(ge,{className:"max-w-64",children:u}),e[10]=u,e[11]=x):x=e[11];let b;return e[12]!==h||e[13]!==x?(b=s.jsxs(he,{children:[h,x]}),e[12]=h,e[13]=x,e[14]=b):b=e[14],b}if(r.limitReached){let a;e[15]!==l?(a=l("settings.subscriptionUsage.limitReached"),e[15]=l,e[16]=a):a=e[16];let n;return e[17]!==a?(n=s.jsx(fe,{variant:"destructive",size:"sm",children:a}),e[17]=a,e[18]=n):n=e[18],n}let p;e[19]!==o?(p=a=>new Intl.DateTimeFormat(o.language,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(a)),e[19]=o,e[20]=p):p=e[20];const m=p;let c;if(e[21]!==m||e[22]!==l||e[23]!==r.windows){let a;e[25]!==m||e[26]!==l?(a=n=>{const u=Math.round(n.usedPercent);return s.jsxs(he,{children:[s.jsx(pe,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-meta",children:ve(n,l)}),s.jsx("div",{role:"progressbar","aria-label":ve(n,l),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u,className:"h-1.5 w-14 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{style:{width:`${Math.min(100,u)}%`},className:Oe("h-full rounded-full",xt(u))})}),s.jsxs("span",{className:"w-8 text-right text-meta text-foreground",children:[u,"%"]})]})}),n.resetAt&&s.jsx(ge,{children:l("settings.subscriptionUsage.resets",{date:m(n.resetAt)})})]},n.id)},e[25]=m,e[26]=l,e[27]=a):a=e[27],c=r.windows.slice(0,2).map(a),e[21]=m,e[22]=l,e[23]=r.windows,e[24]=c}else c=e[24];let g;return e[28]!==c?(g=s.jsx("div",{className:"flex shrink-0 items-center gap-4",children:c}),e[28]=c,e[29]=g):g=e[29],g}function Ne(t){const e=$.c(18),{provider:i,query:l}=t,o=B(),r=l.isFetching;let p;e[0]!==l?(p=()=>{l.refetch()},e[0]=l,e[1]=p):p=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ae,{}),e[2]=m):m=e[2];let c;e[3]!==o?(c=o("settings.subscriptionUsage.refresh"),e[3]=o,e[4]=c):c=e[4];let g;e[5]!==l.isFetching||e[6]!==p||e[7]!==c?(g=s.jsxs(H,{disabled:r,onSelect:p,children:[m,c]}),e[5]=l.isFetching,e[6]=p,e[7]=c,e[8]=g):g=e[8];const a=ht[i];let n;e[9]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ke,{}),e[9]=n):n=e[9];let u;e[10]!==o?(u=o("settings.subscriptionUsage.openProvider"),e[10]=o,e[11]=u):u=e[11];let f;e[12]!==a||e[13]!==u?(f=s.jsx(H,{asChild:!0,children:s.jsxs("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:[n,u]})}),e[12]=a,e[13]=u,e[14]=f):f=e[14];let d;return e[15]!==g||e[16]!==f?(d=s.jsxs(s.Fragment,{children:[g,f]}),e[15]=g,e[16]=f,e[17]=d):d=e[17],d}function bt(){const t=$.c(38),e=B(),{org:i}=oe(),{data:l}=je.useSession(),o=l?.user.id??"",r=G(),p=re();let m;t[0]!==i.id||t[1]!==o?(m=O.claudeSubscription(i.id,o),t[0]=i.id,t[1]=o,t[2]=m):m=t[2];let c;t[3]!==r?(c=()=>r.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=c):c=t[4];const g=!!o;let a;t[5]!==m||t[6]!==c||t[7]!==g?(a={queryKey:m,queryFn:c,enabled:g},t[5]=m,t[6]=c,t[7]=g,t[8]=a):a=t[8];const n=le(a);let u;t[9]!==i.id||t[10]!==p||t[11]!==o?(u=async()=>{await p.cancelQueries({queryKey:O.subscriptionUsage(i.id,o,"claude")}),p.removeQueries({queryKey:O.subscriptionUsage(i.id,o,"claude")}),await p.invalidateQueries({queryKey:O.claudeSubscription(i.id,o)})},t[9]=i.id,t[10]=p,t[11]=o,t[12]=u):u=t[12];const f=u;let d;t[13]!==r?(d=N=>r.call("CLAUDE_SUBSCRIPTION_CONNECT",{token:N}),t[13]=r,t[14]=d):d=t[14];let h;t[15]!==f||t[16]!==e?(h=async()=>{await f(),R.success(e("settings.claudeSubscription.connected"))},t[15]=f,t[16]=e,t[17]=h):h=t[17];let x;t[18]!==d||t[19]!==h?(x={mutationFn:d,onSuccess:h,onError:vt},t[18]=d,t[19]=h,t[20]=x):x=t[20];const b=z(x);let C;t[21]!==r?(C=()=>r.call("CLAUDE_SUBSCRIPTION_DISCONNECT",{}),t[21]=r,t[22]=C):C=t[22];let y;t[23]!==f||t[24]!==e?(y=async()=>{await f(),R.success(e("settings.claudeSubscription.disconnected"))},t[23]=f,t[24]=e,t[25]=y):y=t[25];let j;t[26]!==C||t[27]!==y?(j={mutationFn:C,onSuccess:y,onError:yt},t[26]=C,t[27]=y,t[28]=j):j=t[28];const v=z(j),S=n.data?.connected===!0,_=!S&&!!n.data?.linkedAt,K=n.data?.linkedAt??null;let P;return t[29]!==b||t[30]!==S||t[31]!==v||t[32]!==_||t[33]!==i.id||t[34]!==n||t[35]!==K||t[36]!==o?(P={orgId:i.id,userId:o,status:n,connected:S,expired:_,linkedAt:K,connect:b,disconnect:v},t[29]=b,t[30]=S,t[31]=v,t[32]=_,t[33]=i.id,t[34]=n,t[35]=K,t[36]=o,t[37]=P):P=t[37],P}function yt(t){return R.error(t.message)}function vt(t){return R.error(t.message)}function jt(){const t=$.c(33),e=B(),[i,l]=M.useState(""),[o,r]=M.useState(!1),{orgId:p,userId:m,connected:c,expired:g,linkedAt:a,connect:n,disconnect:u}=bt();let f;t[0]!==c||t[1]!==a||t[2]!==p||t[3]!==m?(f={provider:"claude",orgId:p,userId:m,linkedAt:a,enabled:c},t[0]=c,t[1]=a,t[2]=p,t[3]=m,t[4]=f):f=t[4];const d=_e(f);let h;t[5]!==e?(h=e("settings.claudeSubscription.title"),t[5]=e,t[6]=h):h=t[6];let x;t[7]!==h?(x=s.jsx(be,{src:xe["claude-code"],alt:h}),t[7]=h,t[8]=x):x=t[8];let b;t[9]!==e?(b=e("settings.claudeSubscription.title"),t[9]=e,t[10]=b):b=t[10];const C=c?"linked":g?"expired":null;let y;t[11]!==c||t[12]!==d?(y=c?s.jsx(Pe,{query:d}):null,t[11]=c,t[12]=d,t[13]=y):y=t[13];let j;t[14]!==c||t[15]!==u||t[16]!==o||t[17]!==e||t[18]!==d?(j=c?s.jsxs(ue,{children:[s.jsx(Ne,{provider:"claude",query:d}),s.jsx(Se,{}),s.jsx(H,{variant:"destructive",disabled:u.isPending,onSelect:()=>u.mutate(),children:e("settings.claudeSubscription.disconnect")})]}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{r(St),l("")},children:e(o?"settings.ownAccounts.cancel":"settings.claudeSubscription.connect")}),t[14]=c,t[15]=u,t[16]=o,t[17]=e,t[18]=d,t[19]=j):j=t[19];let v;t[20]!==n||t[21]!==c||t[22]!==o||t[23]!==e||t[24]!==i?(v=!c&&o&&s.jsx(ye,{hint:s.jsxs(s.Fragment,{children:[e("settings.claudeSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"claude setup-token"})]}),submitLabel:e("settings.claudeSubscription.connect"),pending:n.isPending,value:i,onChange:l,onSubmit:()=>n.mutate(i,{onSuccess:()=>{l(""),r(!1)}}),inputProps:{placeholder:e("settings.claudeSubscription.tokenPlaceholder"),"aria-label":e("settings.claudeSubscription.tokenPlaceholder")}}),t[20]=n,t[21]=c,t[22]=o,t[23]=e,t[24]=i,t[25]=v):v=t[25];let S;return t[26]!==x||t[27]!==b||t[28]!==C||t[29]!==y||t[30]!==j||t[31]!==v?(S=s.jsx(de,{icon:x,title:b,status:C,summary:y,action:j,children:v}),t[26]=x,t[27]=b,t[28]=C,t[29]=y,t[30]=j,t[31]=v,t[32]=S):S=t[32],S}function St(t){return!t}function Ct(){const t=$.c(63),e=B(),{org:i}=oe(),{data:l}=je.useSession(),o=l?.user.id??"",r=G(),p=re(),[m,c]=M.useState(""),[g,a]=M.useState(!1);let n;t[0]!==i.id||t[1]!==o?(n=O.codexSubscription(i.id,o),t[0]=i.id,t[1]=o,t[2]=n):n=t[2];let u;t[3]!==r?(u=()=>r.call("CODEX_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=u):u=t[4];const f=!!o;let d;t[5]!==n||t[6]!==u||t[7]!==f?(d={queryKey:n,queryFn:u,enabled:f},t[5]=n,t[6]=u,t[7]=f,t[8]=d):d=t[8];const h=le(d);let x;t[9]!==i.id||t[10]!==p||t[11]!==o?(x=async()=>{await p.cancelQueries({queryKey:O.subscriptionUsage(i.id,o,"codex")}),p.removeQueries({queryKey:O.subscriptionUsage(i.id,o,"codex")}),await p.invalidateQueries({queryKey:O.codexSubscription(i.id,o)})},t[9]=i.id,t[10]=p,t[11]=o,t[12]=x):x=t[12];const b=x;let C;t[13]!==r||t[14]!==m?(C=()=>r.call("CODEX_SUBSCRIPTION_CONNECT",{authJson:m}),t[13]=r,t[14]=m,t[15]=C):C=t[15];let y;t[16]!==b||t[17]!==e?(y=async()=>{c(""),a(!1),await b(),R.success(e("settings.codexSubscription.connected"))},t[16]=b,t[17]=e,t[18]=y):y=t[18];let j;t[19]!==C||t[20]!==y?(j={mutationFn:C,onSuccess:y,onError:Nt},t[19]=C,t[20]=y,t[21]=j):j=t[21];const v=z(j);let S;t[22]!==r?(S=()=>r.call("CODEX_SUBSCRIPTION_DISCONNECT",{}),t[22]=r,t[23]=S):S=t[23];let _;t[24]!==b||t[25]!==e?(_=async()=>{await b(),R.success(e("settings.codexSubscription.disconnected"))},t[24]=b,t[25]=e,t[26]=_):_=t[26];let K;t[27]!==S||t[28]!==_?(K={mutationFn:S,onSuccess:_,onError:Pt},t[27]=S,t[28]=_,t[29]=K):K=t[29];const P=z(K),N=h.data?.connected===!0,D=h.data?.linkedAt??null;let q;t[30]!==N||t[31]!==i.id||t[32]!==D||t[33]!==o?(q={provider:"codex",orgId:i.id,userId:o,linkedAt:D,enabled:N},t[30]=N,t[31]=i.id,t[32]=D,t[33]=o,t[34]=q):q=t[34];const A=_e(q);let F;t[35]!==e?(F=e("settings.codexSubscription.title"),t[35]=e,t[36]=F):F=t[36];let I;t[37]!==F?(I=s.jsx(be,{src:xe.codex,alt:F}),t[37]=F,t[38]=I):I=t[38];let w;t[39]!==e?(w=e("settings.codexSubscription.title"),t[39]=e,t[40]=w):w=t[40];const U=N?"linked":null;let T;t[41]!==N||t[42]!==A?(T=N?s.jsx(Pe,{query:A}):null,t[41]=N,t[42]=A,t[43]=T):T=t[43];let k;t[44]!==N||t[45]!==P||t[46]!==g||t[47]!==e||t[48]!==A?(k=N?s.jsxs(ue,{children:[s.jsx(Ne,{provider:"codex",query:A}),s.jsx(Se,{}),s.jsx(H,{variant:"destructive",disabled:P.isPending,onSelect:()=>P.mutate(),children:e("settings.codexSubscription.disconnect")})]}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{a(_t),c("")},children:e(g?"settings.ownAccounts.cancel":"settings.codexSubscription.connect")}),t[44]=N,t[45]=P,t[46]=g,t[47]=e,t[48]=A,t[49]=k):k=t[49];let E;t[50]!==v||t[51]!==N||t[52]!==g||t[53]!==e||t[54]!==m?(E=!N&&g&&s.jsx(ye,{hint:s.jsxs(s.Fragment,{children:[e("settings.codexSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5",children:`codex login -c cli_auth_credentials_store='"file"'`})]}),submitLabel:e("settings.codexSubscription.connect"),pending:v.isPending,value:m,onChange:c,onSubmit:()=>v.mutate(),inputProps:{autoComplete:"off",maxLength:131072,placeholder:e("settings.codexSubscription.tokenPlaceholder"),"aria-label":e("settings.codexSubscription.tokenPlaceholder")}}),t[50]=v,t[51]=N,t[52]=g,t[53]=e,t[54]=m,t[55]=E):E=t[55];let L;return t[56]!==I||t[57]!==w||t[58]!==U||t[59]!==T||t[60]!==k||t[61]!==E?(L=s.jsx(de,{icon:I,title:w,status:U,summary:T,action:k,children:E}),t[56]=I,t[57]=w,t[58]=U,t[59]=T,t[60]=k,t[61]=E,t[62]=L):L=t[62],L}function _t(t){return!t}function Pt(t){return R.error(t.message)}function Nt(t){return R.error(t.message)}const Kt="https://github.com/settings/personal-access-tokens/new";function It(){const t=$.c(61),e=B(),{org:i}=oe(),l=G(),o=re(),[r,p]=M.useState(""),[m,c]=M.useState(!1);let g;t[0]!==i.id?(g=O.githubCopilot(i.id),t[0]=i.id,t[1]=g):g=t[1];let a;t[2]!==l?(a=()=>l.call("GITHUB_COPILOT_STATUS",{}),t[2]=l,t[3]=a):a=t[3];let n;t[4]!==g||t[5]!==a?(n={queryKey:g,queryFn:a},t[4]=g,t[5]=a,t[6]=n):n=t[6];const u=le(n);let f;t[7]!==i.id||t[8]!==o?(f=()=>o.invalidateQueries({queryKey:O.githubCopilot(i.id)}),t[7]=i.id,t[8]=o,t[9]=f):f=t[9];const d=f;let h;t[10]!==l||t[11]!==r?(h=()=>l.call("GITHUB_COPILOT_CONNECT",{token:r}),t[10]=l,t[11]=r,t[12]=h):h=t[12];let x;t[13]!==d||t[14]!==e?(x=async()=>{p(""),c(!1),await d(),R.success(e("settings.githubCopilot.connected"))},t[13]=d,t[14]=e,t[15]=x):x=t[15];let b;t[16]!==h||t[17]!==x?(b={mutationFn:h,onSuccess:x,onError:At},t[16]=h,t[17]=x,t[18]=b):b=t[18];const C=z(b);let y;t[19]!==l?(y=()=>l.call("GITHUB_COPILOT_DISCONNECT",{}),t[19]=l,t[20]=y):y=t[20];let j;t[21]!==d||t[22]!==e?(j=async()=>{await d(),R.success(e("settings.githubCopilot.disconnected"))},t[21]=d,t[22]=e,t[23]=j):j=t[23];let v;t[24]!==y||t[25]!==j?(v={mutationFn:y,onSuccess:j,onError:Dt},t[24]=y,t[25]=j,t[26]=v):v=t[26];const S=z(v);let _;t[27]!==l?(_=E=>l.call("GITHUB_COPILOT_SHARE",{shared:E}),t[27]=l,t[28]=_):_=t[28];let K;t[29]!==d||t[30]!==_?(K={mutationFn:_,onSuccess:d,onError:Tt},t[29]=d,t[30]=_,t[31]=K):K=t[31];const P=z(K),N=u.data?.connected===!0,D=u.data?.orgShare??null;let q;t[32]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(ct,{size:18,className:"text-foreground"}),t[32]=q):q=t[32];let A;t[33]!==e?(A=e("settings.githubCopilot.title"),t[33]=e,t[34]=A):A=t[34];const F=N?"linked":null;let I;t[35]!==D||t[36]!==e?(I=D&&!D.sharedByMe?e("settings.githubCopilot.sharedBy",{name:D.sharedBy.name??""}):null,t[35]=D,t[36]=e,t[37]=I):I=t[37];let w;t[38]!==N||t[39]!==D?.sharedByMe||t[40]!==P||t[41]!==e?(w=N?s.jsxs(he,{children:[s.jsx(pe,{asChild:!0,children:s.jsxs("label",{className:"flex shrink-0 cursor-pointer items-center gap-2 text-meta",children:[e("settings.githubCopilot.shareTitle"),s.jsx(at,{checked:D?.sharedByMe===!0,disabled:P.isPending,onCheckedChange:E=>P.mutate(E)})]})}),s.jsx(ge,{className:"max-w-64",children:e("settings.githubCopilot.shareDescription")})]}):null,t[38]=N,t[39]=D?.sharedByMe,t[40]=P,t[41]=e,t[42]=w):w=t[42];let U;t[43]!==N||t[44]!==S||t[45]!==m||t[46]!==e?(U=N?s.jsx(ue,{children:s.jsx(H,{variant:"destructive",disabled:S.isPending,onSelect:()=>S.mutate(),children:e("settings.githubCopilot.disconnect")})}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{c(wt),p("")},children:e(m?"settings.ownAccounts.cancel":"settings.githubCopilot.connect")}),t[43]=N,t[44]=S,t[45]=m,t[46]=e,t[47]=U):U=t[47];let T;t[48]!==C||t[49]!==N||t[50]!==m||t[51]!==e||t[52]!==r?(T=!N&&m&&s.jsx(ye,{hint:s.jsx("a",{className:"underline hover:text-foreground",href:Kt,target:"_blank",rel:"noreferrer",children:e("settings.githubCopilot.howTo")}),submitLabel:e("settings.githubCopilot.connect"),pending:C.isPending,value:r,onChange:p,onSubmit:()=>C.mutate(),inputProps:{placeholder:e("settings.githubCopilot.tokenPlaceholder"),"aria-label":e("settings.githubCopilot.tokenPlaceholder")}}),t[48]=C,t[49]=N,t[50]=m,t[51]=e,t[52]=r,t[53]=T):T=t[53];let k;return t[54]!==A||t[55]!==F||t[56]!==I||t[57]!==w||t[58]!==U||t[59]!==T?(k=s.jsx(de,{icon:q,title:A,status:F,meta:I,summary:w,action:U,children:T}),t[54]=A,t[55]=F,t[56]=I,t[57]=w,t[58]=U,t[59]=T,t[60]=k):k=t[60],k}function wt(t){return!t}function Tt(t){return R.error(t.message)}function Dt(t){return R.error(t.message)}function At(t){return R.error(t.message)}const kt=t=>Qe({label:me().min(1,t("settings.editProviderDialog.labelRequired")).max(100),apiKey:me().optional(),baseUrl:me().optional()});function Ut({isOpenAICompatible:t,baseUrl:e,currentBaseUrl:i,apiKey:l}){return t&&!!e&&e!==i&&!l}function Et({providerKey:t,provider:e,preset:i,maskedKey:l,currentLabel:o,currentBaseUrl:r,onCancel:p,onSuccess:m}){const{org:c}=oe(),g=G(),a=re(),n=B(),[u,f]=M.useState(!1),d=e.id==="openai-compatible",h=e.supportedMethods.includes("api-key"),x=kt(n),{register:b,handleSubmit:C,watch:y,setError:j,formState:{errors:v}}=Le({resolver:ze(x),defaultValues:{label:o,apiKey:"",baseUrl:r??""}}),S=y("apiKey")??"",{mutate:_,isPending:K}=z({mutationFn:async P=>{let N;P.apiKey&&(d?N=JSON.stringify({baseUrl:P.baseUrl||r||"",apiKey:P.apiKey}):N=P.apiKey),await g.call("AI_PROVIDER_KEY_UPDATE",{keyId:t.id,label:P.label,...N!==void 0?{apiKey:N}:{}})},onSuccess:()=>{a.invalidateQueries({queryKey:O.aiProviderKeys(c.id)}),a.invalidateQueries({queryKey:O.aiProviders(c.id)}),R.success(n("settings.editProviderDialog.providerUpdated")),m()},onError:P=>R.error(n("settings.editProviderDialog.failedToUpdate",{error:P.message}))});return s.jsxs("form",{onSubmit:C(P=>{if(Ut({isOpenAICompatible:d,baseUrl:P.baseUrl,currentBaseUrl:r,apiKey:P.apiKey})){j("apiKey",{message:n("settings.editProviderDialog.apiKeyRequiredForBaseUrlChange")});return}_(P)}),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:n("settings.editProviderDialog.label")}),s.jsx(ce,{placeholder:n("settings.editProviderDialog.labelPlaceholder"),...b("label"),size:"sm"}),v.label&&s.jsx("p",{className:"text-xs text-destructive",children:v.label.message})]}),d&&!i?.defaultBaseUrl&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n("settings.editProviderDialog.baseUrl")}),s.jsx(ce,{type:"url",placeholder:i?.baseUrlPlaceholder??n("settings.editProviderDialog.baseUrlPlaceholder"),...b("baseUrl"),size:"sm"})]}),h&&s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:[n("settings.editProviderDialog.apiKey")," ",s.jsxs("span",{className:"text-muted-foreground/60",children:["(",n("settings.editProviderDialog.leaveBlankHint"),")"]})]}),s.jsxs("div",{className:"relative",children:[s.jsx(ce,{type:u&&S?"text":"password",placeholder:l,...b("apiKey"),size:"sm",className:"ph-no-capture pr-8"}),S&&s.jsx("button",{type:"button",onClick:()=>f(!u),"aria-label":n(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(dt,{size:14}):s.jsx(ut,{size:14})})]}),v.apiKey&&s.jsx("p",{className:"text-xs text-destructive",children:v.apiKey.message})]}),i?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:i.helpText}),s.jsxs(Me,{children:[s.jsx(Q,{type:"button",variant:"ghost",size:"sm",onClick:p,disabled:K,children:n("settings.editProviderDialog.cancel")}),s.jsx(Q,{type:"submit",size:"sm",disabled:K,children:n(K?"settings.editProviderDialog.saving":"settings.editProviderDialog.save")})]})]})}function Ot(t){const e=$.c(31),{providerKey:i,provider:l,open:o,onOpenChange:r}=t,p=B(),m=G(),c=l.id==="openai-compatible"&&i.presetId?Ce(i.presetId):void 0,g=c?.name??l.name;let a;e[0]!==i.id?(a=O.aiProviderKeyPreview(i.id),e[0]=i.id,e[1]=a):a=e[1];let n;e[2]!==i.id||e[3]!==m?(n=()=>m.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),e[2]=i.id,e[3]=m,e[4]=n):n=e[4];let u;e[5]!==o||e[6]!==a||e[7]!==n?(u={queryKey:a,queryFn:n,enabled:o,staleTime:0},e[5]=o,e[6]=a,e[7]=n,e[8]=u):u=e[8];const{data:f,isLoading:d}=le(u),h=Be,x=$e,b="sm:max-w-md",C=qe,y=Re,j=p("settings.editProviderDialog.editTitle",{name:g});let v;e[9]!==y||e[10]!==j?(v=s.jsx(y,{children:j}),e[9]=y,e[10]=j,e[11]=v):v=e[11];let S;e[12]!==C||e[13]!==v?(S=s.jsx(C,{children:v}),e[12]=C,e[13]=v,e[14]=S):S=e[14];let _;e[15]!==d||e[16]!==r||e[17]!==c||e[18]!==f||e[19]!==l||e[20]!==i?(_=d||!f?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Fe,{})}):s.jsx(Et,{providerKey:i,provider:l,preset:c,maskedKey:f.maskedKey,currentLabel:f.label,currentBaseUrl:f.baseUrl,onCancel:()=>r(!1),onSuccess:()=>r(!1)}),e[15]=d,e[16]=r,e[17]=c,e[18]=f,e[19]=l,e[20]=i,e[21]=_):_=e[21];let K;e[22]!==x||e[23]!==S||e[24]!==_?(K=s.jsxs(x,{className:b,children:[S,_]}),e[22]=x,e[23]=S,e[24]=_,e[25]=K):K=e[25];let P;return e[26]!==h||e[27]!==r||e[28]!==o||e[29]!==K?(P=s.jsx(h,{open:o,onOpenChange:r,children:K}),e[26]=h,e[27]=r,e[28]=o,e[29]=K,e[30]=P):P=e[30],P}function Rt(t){const e=$.c(86),{providerKey:i,provider:l}=t,{org:o}=oe(),r=G(),p=re(),[m,c]=M.useState(!1),[g,a]=M.useState(!1),n=B(),u=pt(),f=l?.id==="openai-compatible";let d;e[0]!==f||e[1]!==i.presetId?(d=f&&i.presetId?Ce(i.presetId):void 0,e[0]=f,e[1]=i.presetId,e[2]=d):d=e[2];const h=d;let x;e[3]!==f||e[4]!==h||e[5]!==l?.name||e[6]!==i.providerId||e[7]!==n?(x=h?h.name:f?n("settings.aiProviders.customOpenAiCompatible"):l?.name??(i.providerId==="claude-code"?n("settings.providerKeyRow.claudeCode"):i.providerId==="codex"?n("settings.providerKeyRow.codex"):i.providerId),e[3]=f,e[4]=h,e[5]=l?.name,e[6]=i.providerId,e[7]=n,e[8]=x):x=e[8];const b=x,C=h?.logo??l?.logo??xe[i.providerId];let y;e:{if(f){y=i.label;break e}let ne;e[9]!==u||e[10]!==i.createdAt||e[11]!==i.label||e[12]!==n?(ne=n("settings.providerKeyRow.addedTimeAgo",{label:i.label,time:gt(new Date(i.createdAt),{locale:u})}),e[9]=u,e[10]=i.createdAt,e[11]=i.label,e[12]=n,e[13]=ne):ne=e[13],y=ne}const j=y;let v;e[14]!==i.id||e[15]!==r?(v=async()=>{await r.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},e[14]=i.id,e[15]=r,e[16]=v):v=e[16];let S;e[17]!==o||e[18]!==i.id||e[19]!==p||e[20]!==n?(S=()=>{p.invalidateQueries({queryKey:O.aiProviderKeys(o.id)}),p.invalidateQueries({queryKey:O.aiProviders(o.id)}),p.invalidateQueries({queryKey:O.aiProviderModels(o.id,i.id)}),R.success(n("settings.providerKeyRow.keyDeleted")),c(!1)},e[17]=o,e[18]=i.id,e[19]=p,e[20]=n,e[21]=S):S=e[21];let _;e[22]!==n?(_=ne=>R.error(n("settings.providerKeyRow.failedToDeleteKey",{error:ne.message})),e[22]=n,e[23]=_):_=e[23];let K;e[24]!==v||e[25]!==S||e[26]!==_?(K={mutationFn:v,onSuccess:S,onError:_},e[24]=v,e[25]=S,e[26]=_,e[27]=K):K=e[27];const{mutate:P,isPending:N}=z(K);let D;e[28]!==b||e[29]!==C?(D=s.jsx(be,{src:C,alt:b}),e[28]=b,e[29]=C,e[30]=D):D=e[30];let q;e[31]!==l||e[32]!==n?(q=l?s.jsxs(H,{onSelect:()=>a(!0),children:[s.jsx(mt,{}),n("settings.providerKeyRow.edit")]}):null,e[31]=l,e[32]=n,e[33]=q):q=e[33];let A,F;e[34]===Symbol.for("react.memo_cache_sentinel")?(A=()=>c(!0),F=s.jsx(ft,{}),e[34]=A,e[35]=F):(A=e[34],F=e[35]);let I;e[36]!==n?(I=n("settings.providerKeyRow.delete"),e[36]=n,e[37]=I):I=e[37];let w;e[38]!==N||e[39]!==I?(w=s.jsxs(H,{variant:"destructive",disabled:N,onSelect:A,children:[F,I]}),e[38]=N,e[39]=I,e[40]=w):w=e[40];let U;e[41]!==w||e[42]!==q?(U=s.jsxs(ue,{children:[q,w]}),e[41]=w,e[42]=q,e[43]=U):U=e[43];let T;e[44]!==j||e[45]!==b||e[46]!==U||e[47]!==D?(T=s.jsx(de,{icon:D,title:b,meta:j,action:U}),e[44]=j,e[45]=b,e[46]=U,e[47]=D,e[48]=T):T=e[48];let k;e[49]!==g||e[50]!==l||e[51]!==i?(k=l?s.jsx(Ot,{providerKey:i,provider:l,open:g,onOpenChange:a}):null,e[49]=g,e[50]=l,e[51]=i,e[52]=k):k=e[52];let E;e[53]!==n?(E=n("settings.providerKeyRow.deleteApiKey"),e[53]=n,e[54]=E):E=e[54];let L;e[55]!==E?(L=s.jsx(Ge,{children:E}),e[55]=E,e[56]=L):L=e[56];let V;e[57]!==i.label?(V=s.jsxs(He,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:i.label}),"."]}),e[57]=i.label,e[58]=V):V=e[58];let W;e[59]!==L||e[60]!==V?(W=s.jsxs(Ve,{children:[L,V]}),e[59]=L,e[60]=V,e[61]=W):W=e[61];let Y;e[62]!==n?(Y=n("settings.providerKeyRow.cancel"),e[62]=n,e[63]=Y):Y=e[63];let J;e[64]!==Y?(J=s.jsx(We,{children:Y}),e[64]=Y,e[65]=J):J=e[65];let X;e[66]!==P?(X=()=>P(),e[66]=P,e[67]=X):X=e[67];let Z;e[68]!==n?(Z=n("settings.providerKeyRow.delete"),e[68]=n,e[69]=Z):Z=e[69];let ee;e[70]!==X||e[71]!==Z?(ee=s.jsx(Ye,{onClick:X,variant:"destructive",children:Z}),e[70]=X,e[71]=Z,e[72]=ee):ee=e[72];let te;e[73]!==J||e[74]!==ee?(te=s.jsxs(Je,{children:[J,ee]}),e[73]=J,e[74]=ee,e[75]=te):te=e[75];let se;e[76]!==W||e[77]!==te?(se=s.jsxs(Xe,{children:[W,te]}),e[76]=W,e[77]=te,e[78]=se):se=e[78];let ie;e[79]!==m||e[80]!==se?(ie=s.jsx(Ze,{open:m,onOpenChange:c,children:se}),e[79]=m,e[80]=se,e[81]=ie):ie=e[81];let ae;return e[82]!==T||e[83]!==k||e[84]!==ie?(ae=s.jsxs(s.Fragment,{children:[T,k,ie]}),e[82]=T,e[83]=k,e[84]=ie,e[85]=ae):ae=e[85],ae}function es(t){const e=t.filter(i=>nt(i.providerId));return{hasHostedProvider:e.length>0,hasDeco:e.some(i=>i.providerId==="deco")}}function qt(t,e){return t.filter(i=>i.providerId!=="deco").map(i=>({key:i,provider:e.find(l=>l.id===i.providerId)??null}))}const Ke="own-accounts";function ts(t){const e=$.c(29),{onAddKey:i}=t,l=B(),o=lt(),r=ot(),p=qt(o,r?.providers??[]);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={select:$t},e[0]=m):m=e[0];const c=et(m),g=Ke;let a;e[1]!==c?(a=K=>{K&&c&&K.scrollIntoView({block:"start"})},e[1]=c,e[2]=a):a=e[2];const n=st;let u;e[3]!==l?(u=l("settings.ownAccounts.title"),e[3]=l,e[4]=u):u=e[4];const f=tt;let d,h,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(jt,{}),h=s.jsx(Ct,{}),x=s.jsx(It,{}),e[5]=d,e[6]=h,e[7]=x):(d=e[5],h=e[6],x=e[7]);const b=p.map(Ft);let C;e[8]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("span",{className:"flex size-8 items-center justify-center rounded-lg border border-dashed border-border",children:s.jsx(it,{size:16})}),e[8]=C):C=e[8];let y;e[9]!==l?(y=l("settings.ownAccounts.addApiKey"),e[9]=l,e[10]=y):y=e[10];let j;e[11]!==i||e[12]!==y?(j=s.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center gap-3 px-4 py-3 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",children:[C,y]}),e[11]=i,e[12]=y,e[13]=j):j=e[13];let v;e[14]!==f||e[15]!==j||e[16]!==d||e[17]!==h||e[18]!==x||e[19]!==b?(v=s.jsxs(f,{children:[d,h,x,b,j]}),e[14]=f,e[15]=j,e[16]=d,e[17]=h,e[18]=x,e[19]=b,e[20]=v):v=e[20];let S;e[21]!==n||e[22]!==v||e[23]!==u?(S=s.jsx(n,{title:u,children:v}),e[21]=n,e[22]=v,e[23]=u,e[24]=S):S=e[24];let _;return e[25]!==S||e[26]!==g||e[27]!==a?(_=s.jsx("div",{id:g,ref:a,children:S}),e[25]=S,e[26]=g,e[27]=a,e[28]=_):_=e[28],_}function Ft(t){const{key:e,provider:i}=t;return s.jsx(Rt,{providerKey:e,provider:i},e.id)}function $t(t){return t.location.hash===Ke}export{Ke as O,ts as a,es as g,bt as u};
|
|
1
|
+
import{c as $,b as B,j as s,I as ce,am as Ie,X as we,B as Q,Z as Te,_ as De,ak as G,i as le,K as O,b3 as Ae,Y as H,a8 as ke,J as Ue,bB as Ee,m as Oe,a5 as oe,a as je,q as re,e as z,t as R,r as M,au as Se,x as Re,w as qe,h as Fe,v as $e,D as Be,aE as Le,aD as ze,y as Me,aF as Qe,aG as me,aI as He,aH as Ge,aJ as Ve,aK as We,bj as Ye,aL as Je,aM as Xe,aN as Ze,l as et,g2 as tt,gN as st}from"./index-B9QAGcIi.js";import{s as it}from"./Plus-CgQrQuUH.js";import{f as nt,g as lt,e as ot}from"./use-ai-providers-Bt6-bPMi.js";import{P as xe}from"./ai-providers-logos-DD3qZ33J.js";import{B as fe}from"./badge-CiHbBWYb.js";import{i as rt}from"./AlertCircle-BUZy3sYx.js";import{T as pe,a as ge,c as he}from"./tooltip-oILxW0vz.js";import{S as at}from"./switch-CrMzty1r.js";import{G as ct}from"./github-icon-BEtyiUak.js";import{i as dt,s as ut,c as mt}from"./Tool01-PTUwz10y.js";import{s as ft}from"./Trash01-CSeiUIoJ.js";import{u as pt,f as gt}from"./use-date-fns-locale-CiK-kZT2.js";import{g as Ce}from"./openai-compatible-presets-BKGfVqEx.js";function de(t){const e=$.c(32),{icon:i,title:l,status:o,meta:r,summary:p,action:m,children:c}=t,g=B();let a;e[0]!==i?(a=s.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted/60",children:i}),e[0]=i,e[1]=a):a=e[1];let n;e[2]!==l?(n=s.jsx("span",{className:"truncate text-sm font-medium",children:l}),e[2]=l,e[3]=n):n=e[3];let u;e[4]!==o||e[5]!==g?(u=o==="linked"&&s.jsx(fe,{variant:"success",size:"sm",children:g("settings.ownAccounts.linked")}),e[4]=o,e[5]=g,e[6]=u):u=e[6];let f;e[7]!==o||e[8]!==g?(f=o==="expired"&&s.jsx(fe,{variant:"warning",size:"sm",children:g("settings.ownAccounts.expired")}),e[7]=o,e[8]=g,e[9]=f):f=e[9];let d;e[10]!==n||e[11]!==u||e[12]!==f?(d=s.jsxs("div",{className:"flex items-center gap-2",children:[n,u,f]}),e[10]=n,e[11]=u,e[12]=f,e[13]=d):d=e[13];let h;e[14]!==r?(h=r&&s.jsx("span",{className:"truncate text-meta",children:r}),e[14]=r,e[15]=h):h=e[15];let x;e[16]!==d||e[17]!==h?(x=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[d,h]}),e[16]=d,e[17]=h,e[18]=x):x=e[18];let b;e[19]!==p?(b=p&&s.jsx("div",{className:"order-last basis-full pl-11 sm:order-none sm:basis-auto sm:pl-0",children:p}),e[19]=p,e[20]=b):b=e[20];let C;e[21]!==m?(C=s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:m}),e[21]=m,e[22]=C):C=e[22];let y;e[23]!==a||e[24]!==x||e[25]!==b||e[26]!==C?(y=s.jsxs("div",{className:"flex min-h-16 flex-wrap items-center gap-x-3 gap-y-2 px-4 py-3",children:[a,x,b,C]}),e[23]=a,e[24]=x,e[25]=b,e[26]=C,e[27]=y):y=e[27];let j;return e[28]!==c||e[29]!==y||e[30]!==l?(j=s.jsxs("div",{role:"group","aria-label":l,children:[y,c]}),e[28]=c,e[29]=y,e[30]=l,e[31]=j):j=e[31],j}function be(t){const e=$.c(7),{src:i,alt:l}=t;if(!i){let r;e[0]!==l?(r=l.charAt(0),e[0]=l,e[1]=r):r=e[1];let p;return e[2]!==r?(p=s.jsx("span",{className:"text-sm font-medium",children:r}),e[2]=r,e[3]=p):p=e[3],p}let o;return e[4]!==l||e[5]!==i?(o=s.jsx("img",{src:i,alt:l,className:"size-5 object-contain"}),e[4]=l,e[5]=i,e[6]=o):o=e[6],o}function ue(t){const e=$.c(10),{children:i}=t,l=B();let o;e[0]!==l?(o=l("settings.ownAccounts.more"),e[0]=l,e[1]=o):o=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ie,{size:16}),e[2]=r):r=e[2];let p;e[3]!==o?(p=s.jsx(we,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"icon-sm","aria-label":o,className:"text-muted-foreground hover:text-foreground",children:r})}),e[3]=o,e[4]=p):p=e[4];let m;e[5]!==i?(m=s.jsx(Te,{align:"end",children:i}),e[5]=i,e[6]=m):m=e[6];let c;return e[7]!==p||e[8]!==m?(c=s.jsxs(De,{children:[p,m]}),e[7]=p,e[8]=m,e[9]=c):c=e[9],c}function ye(t){const e=$.c(23),{hint:i,submitLabel:l,pending:o,value:r,onChange:p,onSubmit:m,inputProps:c}=t;let g;e[0]!==m?(g=b=>{b.preventDefault(),m()},e[0]=m,e[1]=g):g=e[1];let a;e[2]!==i?(a=s.jsx("p",{className:"text-meta",children:i}),e[2]=i,e[3]=a):a=e[3];let n;e[4]!==p?(n=b=>p(b.target.value),e[4]=p,e[5]=n):n=e[5];let u;e[6]!==c||e[7]!==n||e[8]!==r?(u=s.jsx(ce,{type:"password",autoFocus:!0,...c,value:r,onChange:n}),e[6]=c,e[7]=n,e[8]=r,e[9]=u):u=e[9];let f;e[10]!==o||e[11]!==r?(f=r.trim().length===0||o,e[10]=o,e[11]=r,e[12]=f):f=e[12];let d;e[13]!==l||e[14]!==f?(d=s.jsx(Q,{type:"submit",disabled:f,children:l}),e[13]=l,e[14]=f,e[15]=d):d=e[15];let h;e[16]!==u||e[17]!==d?(h=s.jsxs("div",{className:"flex items-center gap-2",children:[u,d]}),e[16]=u,e[17]=d,e[18]=h):h=e[18];let x;return e[19]!==g||e[20]!==a||e[21]!==h?(x=s.jsxs("form",{className:"flex flex-col gap-2 px-4 pb-4 pl-15",onSubmit:g,children:[a,h]}),e[19]=g,e[20]=a,e[21]=h,e[22]=x):x=e[22],x}const ht={codex:"https://chatgpt.com/codex/settings/usage",claude:"https://claude.ai/settings/usage"};function ve(t,e){return t.id==="seven_day_sonnet"?"Sonnet":t.id==="seven_day_opus"?"Opus":t.id.startsWith("code_review_")?e("settings.subscriptionUsage.codeReview"):t.windowSeconds&&t.windowSeconds%86400===0?`${t.windowSeconds/86400}d`:t.windowSeconds?`${Math.round(t.windowSeconds/3600*10)/10}h`:t.id==="secondary"?e("settings.subscriptionUsage.secondary"):e("settings.subscriptionUsage.primary")}function xt(t){return t>=100?"bg-destructive":t>=90?"bg-warning":"bg-foreground/70"}function _e(t){const e=$.c(12),{provider:i,orgId:l,userId:o,linkedAt:r,enabled:p}=t,m=G();let c;e[0]!==r||e[1]!==l||e[2]!==i||e[3]!==o?(c=O.subscriptionUsageSnapshot(l,o,i,r),e[0]=r,e[1]=l,e[2]=i,e[3]=o,e[4]=c):c=e[4];let g;e[5]!==i||e[6]!==m?(g=()=>m.call("SUBSCRIPTION_USAGE_GET",{provider:i}),e[5]=i,e[6]=m,e[7]=g):g=e[7];const a=p&&!!o;let n;return e[8]!==c||e[9]!==g||e[10]!==a?(n={queryKey:c,queryFn:g,enabled:a,staleTime:6e4,retry:!1,refetchOnWindowFocus:!1},e[8]=c,e[9]=g,e[10]=a,e[11]=n):n=e[11],le(n)}function Pe(t){const e=$.c(30),{query:i}=t,l=B(),[o]=Ue(),r=i.data;if(i.isPending){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Ee,{className:"h-4 w-32"}),e[0]=a):a=e[0],a}if(i.isError||r?.status!=="available"){const a=r?.reason;let n;e[1]!==a||e[2]!==l||e[3]!==r?.status?(n=a==="permission"?l("settings.subscriptionUsage.permission"):a==="authorization"?l("settings.subscriptionUsage.authorization"):a==="rate_limited"?l("settings.subscriptionUsage.rateLimited"):r?.status==="disconnected"?l("settings.subscriptionUsage.disconnected"):l("settings.subscriptionUsage.unavailable"),e[1]=a,e[2]=l,e[3]=r?.status,e[4]=n):n=e[4];const u=n;let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(rt,{size:12}),e[5]=f):f=e[5];let d;e[6]!==l?(d=l("settings.subscriptionUsage.unavailableShort"),e[6]=l,e[7]=d):d=e[7];let h;e[8]!==d?(h=s.jsx(pe,{asChild:!0,children:s.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-meta",children:[f,d]})}),e[8]=d,e[9]=h):h=e[9];let x;e[10]!==u?(x=s.jsx(ge,{className:"max-w-64",children:u}),e[10]=u,e[11]=x):x=e[11];let b;return e[12]!==h||e[13]!==x?(b=s.jsxs(he,{children:[h,x]}),e[12]=h,e[13]=x,e[14]=b):b=e[14],b}if(r.limitReached){let a;e[15]!==l?(a=l("settings.subscriptionUsage.limitReached"),e[15]=l,e[16]=a):a=e[16];let n;return e[17]!==a?(n=s.jsx(fe,{variant:"destructive",size:"sm",children:a}),e[17]=a,e[18]=n):n=e[18],n}let p;e[19]!==o?(p=a=>new Intl.DateTimeFormat(o.language,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(a)),e[19]=o,e[20]=p):p=e[20];const m=p;let c;if(e[21]!==m||e[22]!==l||e[23]!==r.windows){let a;e[25]!==m||e[26]!==l?(a=n=>{const u=Math.round(n.usedPercent);return s.jsxs(he,{children:[s.jsx(pe,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-meta",children:ve(n,l)}),s.jsx("div",{role:"progressbar","aria-label":ve(n,l),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u,className:"h-1.5 w-14 overflow-hidden rounded-full bg-muted",children:s.jsx("div",{style:{width:`${Math.min(100,u)}%`},className:Oe("h-full rounded-full",xt(u))})}),s.jsxs("span",{className:"w-8 text-right text-meta text-foreground",children:[u,"%"]})]})}),n.resetAt&&s.jsx(ge,{children:l("settings.subscriptionUsage.resets",{date:m(n.resetAt)})})]},n.id)},e[25]=m,e[26]=l,e[27]=a):a=e[27],c=r.windows.slice(0,2).map(a),e[21]=m,e[22]=l,e[23]=r.windows,e[24]=c}else c=e[24];let g;return e[28]!==c?(g=s.jsx("div",{className:"flex shrink-0 items-center gap-4",children:c}),e[28]=c,e[29]=g):g=e[29],g}function Ne(t){const e=$.c(18),{provider:i,query:l}=t,o=B(),r=l.isFetching;let p;e[0]!==l?(p=()=>{l.refetch()},e[0]=l,e[1]=p):p=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ae,{}),e[2]=m):m=e[2];let c;e[3]!==o?(c=o("settings.subscriptionUsage.refresh"),e[3]=o,e[4]=c):c=e[4];let g;e[5]!==l.isFetching||e[6]!==p||e[7]!==c?(g=s.jsxs(H,{disabled:r,onSelect:p,children:[m,c]}),e[5]=l.isFetching,e[6]=p,e[7]=c,e[8]=g):g=e[8];const a=ht[i];let n;e[9]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ke,{}),e[9]=n):n=e[9];let u;e[10]!==o?(u=o("settings.subscriptionUsage.openProvider"),e[10]=o,e[11]=u):u=e[11];let f;e[12]!==a||e[13]!==u?(f=s.jsx(H,{asChild:!0,children:s.jsxs("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:[n,u]})}),e[12]=a,e[13]=u,e[14]=f):f=e[14];let d;return e[15]!==g||e[16]!==f?(d=s.jsxs(s.Fragment,{children:[g,f]}),e[15]=g,e[16]=f,e[17]=d):d=e[17],d}function bt(){const t=$.c(38),e=B(),{org:i}=oe(),{data:l}=je.useSession(),o=l?.user.id??"",r=G(),p=re();let m;t[0]!==i.id||t[1]!==o?(m=O.claudeSubscription(i.id,o),t[0]=i.id,t[1]=o,t[2]=m):m=t[2];let c;t[3]!==r?(c=()=>r.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=c):c=t[4];const g=!!o;let a;t[5]!==m||t[6]!==c||t[7]!==g?(a={queryKey:m,queryFn:c,enabled:g},t[5]=m,t[6]=c,t[7]=g,t[8]=a):a=t[8];const n=le(a);let u;t[9]!==i.id||t[10]!==p||t[11]!==o?(u=async()=>{await p.cancelQueries({queryKey:O.subscriptionUsage(i.id,o,"claude")}),p.removeQueries({queryKey:O.subscriptionUsage(i.id,o,"claude")}),await p.invalidateQueries({queryKey:O.claudeSubscription(i.id,o)})},t[9]=i.id,t[10]=p,t[11]=o,t[12]=u):u=t[12];const f=u;let d;t[13]!==r?(d=N=>r.call("CLAUDE_SUBSCRIPTION_CONNECT",{token:N}),t[13]=r,t[14]=d):d=t[14];let h;t[15]!==f||t[16]!==e?(h=async()=>{await f(),R.success(e("settings.claudeSubscription.connected"))},t[15]=f,t[16]=e,t[17]=h):h=t[17];let x;t[18]!==d||t[19]!==h?(x={mutationFn:d,onSuccess:h,onError:vt},t[18]=d,t[19]=h,t[20]=x):x=t[20];const b=z(x);let C;t[21]!==r?(C=()=>r.call("CLAUDE_SUBSCRIPTION_DISCONNECT",{}),t[21]=r,t[22]=C):C=t[22];let y;t[23]!==f||t[24]!==e?(y=async()=>{await f(),R.success(e("settings.claudeSubscription.disconnected"))},t[23]=f,t[24]=e,t[25]=y):y=t[25];let j;t[26]!==C||t[27]!==y?(j={mutationFn:C,onSuccess:y,onError:yt},t[26]=C,t[27]=y,t[28]=j):j=t[28];const v=z(j),S=n.data?.connected===!0,_=!S&&!!n.data?.linkedAt,K=n.data?.linkedAt??null;let P;return t[29]!==b||t[30]!==S||t[31]!==v||t[32]!==_||t[33]!==i.id||t[34]!==n||t[35]!==K||t[36]!==o?(P={orgId:i.id,userId:o,status:n,connected:S,expired:_,linkedAt:K,connect:b,disconnect:v},t[29]=b,t[30]=S,t[31]=v,t[32]=_,t[33]=i.id,t[34]=n,t[35]=K,t[36]=o,t[37]=P):P=t[37],P}function yt(t){return R.error(t.message)}function vt(t){return R.error(t.message)}function jt(){const t=$.c(33),e=B(),[i,l]=M.useState(""),[o,r]=M.useState(!1),{orgId:p,userId:m,connected:c,expired:g,linkedAt:a,connect:n,disconnect:u}=bt();let f;t[0]!==c||t[1]!==a||t[2]!==p||t[3]!==m?(f={provider:"claude",orgId:p,userId:m,linkedAt:a,enabled:c},t[0]=c,t[1]=a,t[2]=p,t[3]=m,t[4]=f):f=t[4];const d=_e(f);let h;t[5]!==e?(h=e("settings.claudeSubscription.title"),t[5]=e,t[6]=h):h=t[6];let x;t[7]!==h?(x=s.jsx(be,{src:xe["claude-code"],alt:h}),t[7]=h,t[8]=x):x=t[8];let b;t[9]!==e?(b=e("settings.claudeSubscription.title"),t[9]=e,t[10]=b):b=t[10];const C=c?"linked":g?"expired":null;let y;t[11]!==c||t[12]!==d?(y=c?s.jsx(Pe,{query:d}):null,t[11]=c,t[12]=d,t[13]=y):y=t[13];let j;t[14]!==c||t[15]!==u||t[16]!==o||t[17]!==e||t[18]!==d?(j=c?s.jsxs(ue,{children:[s.jsx(Ne,{provider:"claude",query:d}),s.jsx(Se,{}),s.jsx(H,{variant:"destructive",disabled:u.isPending,onSelect:()=>u.mutate(),children:e("settings.claudeSubscription.disconnect")})]}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{r(St),l("")},children:e(o?"settings.ownAccounts.cancel":"settings.claudeSubscription.connect")}),t[14]=c,t[15]=u,t[16]=o,t[17]=e,t[18]=d,t[19]=j):j=t[19];let v;t[20]!==n||t[21]!==c||t[22]!==o||t[23]!==e||t[24]!==i?(v=!c&&o&&s.jsx(ye,{hint:s.jsxs(s.Fragment,{children:[e("settings.claudeSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"claude setup-token"})]}),submitLabel:e("settings.claudeSubscription.connect"),pending:n.isPending,value:i,onChange:l,onSubmit:()=>n.mutate(i,{onSuccess:()=>{l(""),r(!1)}}),inputProps:{placeholder:e("settings.claudeSubscription.tokenPlaceholder"),"aria-label":e("settings.claudeSubscription.tokenPlaceholder")}}),t[20]=n,t[21]=c,t[22]=o,t[23]=e,t[24]=i,t[25]=v):v=t[25];let S;return t[26]!==x||t[27]!==b||t[28]!==C||t[29]!==y||t[30]!==j||t[31]!==v?(S=s.jsx(de,{icon:x,title:b,status:C,summary:y,action:j,children:v}),t[26]=x,t[27]=b,t[28]=C,t[29]=y,t[30]=j,t[31]=v,t[32]=S):S=t[32],S}function St(t){return!t}function Ct(){const t=$.c(63),e=B(),{org:i}=oe(),{data:l}=je.useSession(),o=l?.user.id??"",r=G(),p=re(),[m,c]=M.useState(""),[g,a]=M.useState(!1);let n;t[0]!==i.id||t[1]!==o?(n=O.codexSubscription(i.id,o),t[0]=i.id,t[1]=o,t[2]=n):n=t[2];let u;t[3]!==r?(u=()=>r.call("CODEX_SUBSCRIPTION_STATUS",{}),t[3]=r,t[4]=u):u=t[4];const f=!!o;let d;t[5]!==n||t[6]!==u||t[7]!==f?(d={queryKey:n,queryFn:u,enabled:f},t[5]=n,t[6]=u,t[7]=f,t[8]=d):d=t[8];const h=le(d);let x;t[9]!==i.id||t[10]!==p||t[11]!==o?(x=async()=>{await p.cancelQueries({queryKey:O.subscriptionUsage(i.id,o,"codex")}),p.removeQueries({queryKey:O.subscriptionUsage(i.id,o,"codex")}),await p.invalidateQueries({queryKey:O.codexSubscription(i.id,o)})},t[9]=i.id,t[10]=p,t[11]=o,t[12]=x):x=t[12];const b=x;let C;t[13]!==r||t[14]!==m?(C=()=>r.call("CODEX_SUBSCRIPTION_CONNECT",{authJson:m}),t[13]=r,t[14]=m,t[15]=C):C=t[15];let y;t[16]!==b||t[17]!==e?(y=async()=>{c(""),a(!1),await b(),R.success(e("settings.codexSubscription.connected"))},t[16]=b,t[17]=e,t[18]=y):y=t[18];let j;t[19]!==C||t[20]!==y?(j={mutationFn:C,onSuccess:y,onError:Nt},t[19]=C,t[20]=y,t[21]=j):j=t[21];const v=z(j);let S;t[22]!==r?(S=()=>r.call("CODEX_SUBSCRIPTION_DISCONNECT",{}),t[22]=r,t[23]=S):S=t[23];let _;t[24]!==b||t[25]!==e?(_=async()=>{await b(),R.success(e("settings.codexSubscription.disconnected"))},t[24]=b,t[25]=e,t[26]=_):_=t[26];let K;t[27]!==S||t[28]!==_?(K={mutationFn:S,onSuccess:_,onError:Pt},t[27]=S,t[28]=_,t[29]=K):K=t[29];const P=z(K),N=h.data?.connected===!0,D=h.data?.linkedAt??null;let q;t[30]!==N||t[31]!==i.id||t[32]!==D||t[33]!==o?(q={provider:"codex",orgId:i.id,userId:o,linkedAt:D,enabled:N},t[30]=N,t[31]=i.id,t[32]=D,t[33]=o,t[34]=q):q=t[34];const A=_e(q);let F;t[35]!==e?(F=e("settings.codexSubscription.title"),t[35]=e,t[36]=F):F=t[36];let I;t[37]!==F?(I=s.jsx(be,{src:xe.codex,alt:F}),t[37]=F,t[38]=I):I=t[38];let w;t[39]!==e?(w=e("settings.codexSubscription.title"),t[39]=e,t[40]=w):w=t[40];const U=N?"linked":null;let T;t[41]!==N||t[42]!==A?(T=N?s.jsx(Pe,{query:A}):null,t[41]=N,t[42]=A,t[43]=T):T=t[43];let k;t[44]!==N||t[45]!==P||t[46]!==g||t[47]!==e||t[48]!==A?(k=N?s.jsxs(ue,{children:[s.jsx(Ne,{provider:"codex",query:A}),s.jsx(Se,{}),s.jsx(H,{variant:"destructive",disabled:P.isPending,onSelect:()=>P.mutate(),children:e("settings.codexSubscription.disconnect")})]}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{a(_t),c("")},children:e(g?"settings.ownAccounts.cancel":"settings.codexSubscription.connect")}),t[44]=N,t[45]=P,t[46]=g,t[47]=e,t[48]=A,t[49]=k):k=t[49];let E;t[50]!==v||t[51]!==N||t[52]!==g||t[53]!==e||t[54]!==m?(E=!N&&g&&s.jsx(ye,{hint:s.jsxs(s.Fragment,{children:[e("settings.codexSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5",children:`codex login -c cli_auth_credentials_store='"file"'`})]}),submitLabel:e("settings.codexSubscription.connect"),pending:v.isPending,value:m,onChange:c,onSubmit:()=>v.mutate(),inputProps:{autoComplete:"off",maxLength:131072,placeholder:e("settings.codexSubscription.tokenPlaceholder"),"aria-label":e("settings.codexSubscription.tokenPlaceholder")}}),t[50]=v,t[51]=N,t[52]=g,t[53]=e,t[54]=m,t[55]=E):E=t[55];let L;return t[56]!==I||t[57]!==w||t[58]!==U||t[59]!==T||t[60]!==k||t[61]!==E?(L=s.jsx(de,{icon:I,title:w,status:U,summary:T,action:k,children:E}),t[56]=I,t[57]=w,t[58]=U,t[59]=T,t[60]=k,t[61]=E,t[62]=L):L=t[62],L}function _t(t){return!t}function Pt(t){return R.error(t.message)}function Nt(t){return R.error(t.message)}const Kt="https://github.com/settings/personal-access-tokens/new";function It(){const t=$.c(61),e=B(),{org:i}=oe(),l=G(),o=re(),[r,p]=M.useState(""),[m,c]=M.useState(!1);let g;t[0]!==i.id?(g=O.githubCopilot(i.id),t[0]=i.id,t[1]=g):g=t[1];let a;t[2]!==l?(a=()=>l.call("GITHUB_COPILOT_STATUS",{}),t[2]=l,t[3]=a):a=t[3];let n;t[4]!==g||t[5]!==a?(n={queryKey:g,queryFn:a},t[4]=g,t[5]=a,t[6]=n):n=t[6];const u=le(n);let f;t[7]!==i.id||t[8]!==o?(f=()=>o.invalidateQueries({queryKey:O.githubCopilot(i.id)}),t[7]=i.id,t[8]=o,t[9]=f):f=t[9];const d=f;let h;t[10]!==l||t[11]!==r?(h=()=>l.call("GITHUB_COPILOT_CONNECT",{token:r}),t[10]=l,t[11]=r,t[12]=h):h=t[12];let x;t[13]!==d||t[14]!==e?(x=async()=>{p(""),c(!1),await d(),R.success(e("settings.githubCopilot.connected"))},t[13]=d,t[14]=e,t[15]=x):x=t[15];let b;t[16]!==h||t[17]!==x?(b={mutationFn:h,onSuccess:x,onError:At},t[16]=h,t[17]=x,t[18]=b):b=t[18];const C=z(b);let y;t[19]!==l?(y=()=>l.call("GITHUB_COPILOT_DISCONNECT",{}),t[19]=l,t[20]=y):y=t[20];let j;t[21]!==d||t[22]!==e?(j=async()=>{await d(),R.success(e("settings.githubCopilot.disconnected"))},t[21]=d,t[22]=e,t[23]=j):j=t[23];let v;t[24]!==y||t[25]!==j?(v={mutationFn:y,onSuccess:j,onError:Dt},t[24]=y,t[25]=j,t[26]=v):v=t[26];const S=z(v);let _;t[27]!==l?(_=E=>l.call("GITHUB_COPILOT_SHARE",{shared:E}),t[27]=l,t[28]=_):_=t[28];let K;t[29]!==d||t[30]!==_?(K={mutationFn:_,onSuccess:d,onError:Tt},t[29]=d,t[30]=_,t[31]=K):K=t[31];const P=z(K),N=u.data?.connected===!0,D=u.data?.orgShare??null;let q;t[32]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(ct,{size:18,className:"text-foreground"}),t[32]=q):q=t[32];let A;t[33]!==e?(A=e("settings.githubCopilot.title"),t[33]=e,t[34]=A):A=t[34];const F=N?"linked":null;let I;t[35]!==D||t[36]!==e?(I=D&&!D.sharedByMe?e("settings.githubCopilot.sharedBy",{name:D.sharedBy.name??""}):null,t[35]=D,t[36]=e,t[37]=I):I=t[37];let w;t[38]!==N||t[39]!==D?.sharedByMe||t[40]!==P||t[41]!==e?(w=N?s.jsxs(he,{children:[s.jsx(pe,{asChild:!0,children:s.jsxs("label",{className:"flex shrink-0 cursor-pointer items-center gap-2 text-meta",children:[e("settings.githubCopilot.shareTitle"),s.jsx(at,{checked:D?.sharedByMe===!0,disabled:P.isPending,onCheckedChange:E=>P.mutate(E)})]})}),s.jsx(ge,{className:"max-w-64",children:e("settings.githubCopilot.shareDescription")})]}):null,t[38]=N,t[39]=D?.sharedByMe,t[40]=P,t[41]=e,t[42]=w):w=t[42];let U;t[43]!==N||t[44]!==S||t[45]!==m||t[46]!==e?(U=N?s.jsx(ue,{children:s.jsx(H,{variant:"destructive",disabled:S.isPending,onSelect:()=>S.mutate(),children:e("settings.githubCopilot.disconnect")})}):s.jsx(Q,{variant:"outline",size:"sm",onClick:()=>{c(wt),p("")},children:e(m?"settings.ownAccounts.cancel":"settings.githubCopilot.connect")}),t[43]=N,t[44]=S,t[45]=m,t[46]=e,t[47]=U):U=t[47];let T;t[48]!==C||t[49]!==N||t[50]!==m||t[51]!==e||t[52]!==r?(T=!N&&m&&s.jsx(ye,{hint:s.jsx("a",{className:"underline hover:text-foreground",href:Kt,target:"_blank",rel:"noreferrer",children:e("settings.githubCopilot.howTo")}),submitLabel:e("settings.githubCopilot.connect"),pending:C.isPending,value:r,onChange:p,onSubmit:()=>C.mutate(),inputProps:{placeholder:e("settings.githubCopilot.tokenPlaceholder"),"aria-label":e("settings.githubCopilot.tokenPlaceholder")}}),t[48]=C,t[49]=N,t[50]=m,t[51]=e,t[52]=r,t[53]=T):T=t[53];let k;return t[54]!==A||t[55]!==F||t[56]!==I||t[57]!==w||t[58]!==U||t[59]!==T?(k=s.jsx(de,{icon:q,title:A,status:F,meta:I,summary:w,action:U,children:T}),t[54]=A,t[55]=F,t[56]=I,t[57]=w,t[58]=U,t[59]=T,t[60]=k):k=t[60],k}function wt(t){return!t}function Tt(t){return R.error(t.message)}function Dt(t){return R.error(t.message)}function At(t){return R.error(t.message)}const kt=t=>Qe({label:me().min(1,t("settings.editProviderDialog.labelRequired")).max(100),apiKey:me().optional(),baseUrl:me().optional()});function Ut({isOpenAICompatible:t,baseUrl:e,currentBaseUrl:i,apiKey:l}){return t&&!!e&&e!==i&&!l}function Et({providerKey:t,provider:e,preset:i,maskedKey:l,currentLabel:o,currentBaseUrl:r,onCancel:p,onSuccess:m}){const{org:c}=oe(),g=G(),a=re(),n=B(),[u,f]=M.useState(!1),d=e.id==="openai-compatible",h=e.supportedMethods.includes("api-key"),x=kt(n),{register:b,handleSubmit:C,watch:y,setError:j,formState:{errors:v}}=Le({resolver:ze(x),defaultValues:{label:o,apiKey:"",baseUrl:r??""}}),S=y("apiKey")??"",{mutate:_,isPending:K}=z({mutationFn:async P=>{let N;P.apiKey&&(d?N=JSON.stringify({baseUrl:P.baseUrl||r||"",apiKey:P.apiKey}):N=P.apiKey),await g.call("AI_PROVIDER_KEY_UPDATE",{keyId:t.id,label:P.label,...N!==void 0?{apiKey:N}:{}})},onSuccess:()=>{a.invalidateQueries({queryKey:O.aiProviderKeys(c.id)}),a.invalidateQueries({queryKey:O.aiProviders(c.id)}),R.success(n("settings.editProviderDialog.providerUpdated")),m()},onError:P=>R.error(n("settings.editProviderDialog.failedToUpdate",{error:P.message}))});return s.jsxs("form",{onSubmit:C(P=>{if(Ut({isOpenAICompatible:d,baseUrl:P.baseUrl,currentBaseUrl:r,apiKey:P.apiKey})){j("apiKey",{message:n("settings.editProviderDialog.apiKeyRequiredForBaseUrlChange")});return}_(P)}),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:n("settings.editProviderDialog.label")}),s.jsx(ce,{placeholder:n("settings.editProviderDialog.labelPlaceholder"),...b("label"),size:"sm"}),v.label&&s.jsx("p",{className:"text-xs text-destructive",children:v.label.message})]}),d&&!i?.defaultBaseUrl&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:n("settings.editProviderDialog.baseUrl")}),s.jsx(ce,{type:"url",placeholder:i?.baseUrlPlaceholder??n("settings.editProviderDialog.baseUrlPlaceholder"),...b("baseUrl"),size:"sm"})]}),h&&s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:[n("settings.editProviderDialog.apiKey")," ",s.jsxs("span",{className:"text-muted-foreground/60",children:["(",n("settings.editProviderDialog.leaveBlankHint"),")"]})]}),s.jsxs("div",{className:"relative",children:[s.jsx(ce,{type:u&&S?"text":"password",placeholder:l,...b("apiKey"),size:"sm",className:"ph-no-capture pr-8"}),S&&s.jsx("button",{type:"button",onClick:()=>f(!u),"aria-label":n(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(dt,{size:14}):s.jsx(ut,{size:14})})]}),v.apiKey&&s.jsx("p",{className:"text-xs text-destructive",children:v.apiKey.message})]}),i?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:i.helpText}),s.jsxs(Me,{children:[s.jsx(Q,{type:"button",variant:"ghost",size:"sm",onClick:p,disabled:K,children:n("settings.editProviderDialog.cancel")}),s.jsx(Q,{type:"submit",size:"sm",disabled:K,children:n(K?"settings.editProviderDialog.saving":"settings.editProviderDialog.save")})]})]})}function Ot(t){const e=$.c(31),{providerKey:i,provider:l,open:o,onOpenChange:r}=t,p=B(),m=G(),c=l.id==="openai-compatible"&&i.presetId?Ce(i.presetId):void 0,g=c?.name??l.name;let a;e[0]!==i.id?(a=O.aiProviderKeyPreview(i.id),e[0]=i.id,e[1]=a):a=e[1];let n;e[2]!==i.id||e[3]!==m?(n=()=>m.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),e[2]=i.id,e[3]=m,e[4]=n):n=e[4];let u;e[5]!==o||e[6]!==a||e[7]!==n?(u={queryKey:a,queryFn:n,enabled:o,staleTime:0},e[5]=o,e[6]=a,e[7]=n,e[8]=u):u=e[8];const{data:f,isLoading:d}=le(u),h=Be,x=$e,b="sm:max-w-md",C=qe,y=Re,j=p("settings.editProviderDialog.editTitle",{name:g});let v;e[9]!==y||e[10]!==j?(v=s.jsx(y,{children:j}),e[9]=y,e[10]=j,e[11]=v):v=e[11];let S;e[12]!==C||e[13]!==v?(S=s.jsx(C,{children:v}),e[12]=C,e[13]=v,e[14]=S):S=e[14];let _;e[15]!==d||e[16]!==r||e[17]!==c||e[18]!==f||e[19]!==l||e[20]!==i?(_=d||!f?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Fe,{})}):s.jsx(Et,{providerKey:i,provider:l,preset:c,maskedKey:f.maskedKey,currentLabel:f.label,currentBaseUrl:f.baseUrl,onCancel:()=>r(!1),onSuccess:()=>r(!1)}),e[15]=d,e[16]=r,e[17]=c,e[18]=f,e[19]=l,e[20]=i,e[21]=_):_=e[21];let K;e[22]!==x||e[23]!==S||e[24]!==_?(K=s.jsxs(x,{className:b,children:[S,_]}),e[22]=x,e[23]=S,e[24]=_,e[25]=K):K=e[25];let P;return e[26]!==h||e[27]!==r||e[28]!==o||e[29]!==K?(P=s.jsx(h,{open:o,onOpenChange:r,children:K}),e[26]=h,e[27]=r,e[28]=o,e[29]=K,e[30]=P):P=e[30],P}function Rt(t){const e=$.c(86),{providerKey:i,provider:l}=t,{org:o}=oe(),r=G(),p=re(),[m,c]=M.useState(!1),[g,a]=M.useState(!1),n=B(),u=pt(),f=l?.id==="openai-compatible";let d;e[0]!==f||e[1]!==i.presetId?(d=f&&i.presetId?Ce(i.presetId):void 0,e[0]=f,e[1]=i.presetId,e[2]=d):d=e[2];const h=d;let x;e[3]!==f||e[4]!==h||e[5]!==l?.name||e[6]!==i.providerId||e[7]!==n?(x=h?h.name:f?n("settings.aiProviders.customOpenAiCompatible"):l?.name??(i.providerId==="claude-code"?n("settings.providerKeyRow.claudeCode"):i.providerId==="codex"?n("settings.providerKeyRow.codex"):i.providerId),e[3]=f,e[4]=h,e[5]=l?.name,e[6]=i.providerId,e[7]=n,e[8]=x):x=e[8];const b=x,C=h?.logo??l?.logo??xe[i.providerId];let y;e:{if(f){y=i.label;break e}let ne;e[9]!==u||e[10]!==i.createdAt||e[11]!==i.label||e[12]!==n?(ne=n("settings.providerKeyRow.addedTimeAgo",{label:i.label,time:gt(new Date(i.createdAt),{locale:u})}),e[9]=u,e[10]=i.createdAt,e[11]=i.label,e[12]=n,e[13]=ne):ne=e[13],y=ne}const j=y;let v;e[14]!==i.id||e[15]!==r?(v=async()=>{await r.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},e[14]=i.id,e[15]=r,e[16]=v):v=e[16];let S;e[17]!==o||e[18]!==i.id||e[19]!==p||e[20]!==n?(S=()=>{p.invalidateQueries({queryKey:O.aiProviderKeys(o.id)}),p.invalidateQueries({queryKey:O.aiProviders(o.id)}),p.invalidateQueries({queryKey:O.aiProviderModels(o.id,i.id)}),R.success(n("settings.providerKeyRow.keyDeleted")),c(!1)},e[17]=o,e[18]=i.id,e[19]=p,e[20]=n,e[21]=S):S=e[21];let _;e[22]!==n?(_=ne=>R.error(n("settings.providerKeyRow.failedToDeleteKey",{error:ne.message})),e[22]=n,e[23]=_):_=e[23];let K;e[24]!==v||e[25]!==S||e[26]!==_?(K={mutationFn:v,onSuccess:S,onError:_},e[24]=v,e[25]=S,e[26]=_,e[27]=K):K=e[27];const{mutate:P,isPending:N}=z(K);let D;e[28]!==b||e[29]!==C?(D=s.jsx(be,{src:C,alt:b}),e[28]=b,e[29]=C,e[30]=D):D=e[30];let q;e[31]!==l||e[32]!==n?(q=l?s.jsxs(H,{onSelect:()=>a(!0),children:[s.jsx(mt,{}),n("settings.providerKeyRow.edit")]}):null,e[31]=l,e[32]=n,e[33]=q):q=e[33];let A,F;e[34]===Symbol.for("react.memo_cache_sentinel")?(A=()=>c(!0),F=s.jsx(ft,{}),e[34]=A,e[35]=F):(A=e[34],F=e[35]);let I;e[36]!==n?(I=n("settings.providerKeyRow.delete"),e[36]=n,e[37]=I):I=e[37];let w;e[38]!==N||e[39]!==I?(w=s.jsxs(H,{variant:"destructive",disabled:N,onSelect:A,children:[F,I]}),e[38]=N,e[39]=I,e[40]=w):w=e[40];let U;e[41]!==w||e[42]!==q?(U=s.jsxs(ue,{children:[q,w]}),e[41]=w,e[42]=q,e[43]=U):U=e[43];let T;e[44]!==j||e[45]!==b||e[46]!==U||e[47]!==D?(T=s.jsx(de,{icon:D,title:b,meta:j,action:U}),e[44]=j,e[45]=b,e[46]=U,e[47]=D,e[48]=T):T=e[48];let k;e[49]!==g||e[50]!==l||e[51]!==i?(k=l?s.jsx(Ot,{providerKey:i,provider:l,open:g,onOpenChange:a}):null,e[49]=g,e[50]=l,e[51]=i,e[52]=k):k=e[52];let E;e[53]!==n?(E=n("settings.providerKeyRow.deleteApiKey"),e[53]=n,e[54]=E):E=e[54];let L;e[55]!==E?(L=s.jsx(Ge,{children:E}),e[55]=E,e[56]=L):L=e[56];let V;e[57]!==i.label?(V=s.jsxs(He,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:i.label}),"."]}),e[57]=i.label,e[58]=V):V=e[58];let W;e[59]!==L||e[60]!==V?(W=s.jsxs(Ve,{children:[L,V]}),e[59]=L,e[60]=V,e[61]=W):W=e[61];let Y;e[62]!==n?(Y=n("settings.providerKeyRow.cancel"),e[62]=n,e[63]=Y):Y=e[63];let J;e[64]!==Y?(J=s.jsx(We,{children:Y}),e[64]=Y,e[65]=J):J=e[65];let X;e[66]!==P?(X=()=>P(),e[66]=P,e[67]=X):X=e[67];let Z;e[68]!==n?(Z=n("settings.providerKeyRow.delete"),e[68]=n,e[69]=Z):Z=e[69];let ee;e[70]!==X||e[71]!==Z?(ee=s.jsx(Ye,{onClick:X,variant:"destructive",children:Z}),e[70]=X,e[71]=Z,e[72]=ee):ee=e[72];let te;e[73]!==J||e[74]!==ee?(te=s.jsxs(Je,{children:[J,ee]}),e[73]=J,e[74]=ee,e[75]=te):te=e[75];let se;e[76]!==W||e[77]!==te?(se=s.jsxs(Xe,{children:[W,te]}),e[76]=W,e[77]=te,e[78]=se):se=e[78];let ie;e[79]!==m||e[80]!==se?(ie=s.jsx(Ze,{open:m,onOpenChange:c,children:se}),e[79]=m,e[80]=se,e[81]=ie):ie=e[81];let ae;return e[82]!==T||e[83]!==k||e[84]!==ie?(ae=s.jsxs(s.Fragment,{children:[T,k,ie]}),e[82]=T,e[83]=k,e[84]=ie,e[85]=ae):ae=e[85],ae}function es(t){const e=t.filter(i=>nt(i.providerId));return{hasHostedProvider:e.length>0,hasDeco:e.some(i=>i.providerId==="deco")}}function qt(t,e){return t.filter(i=>i.providerId!=="deco").map(i=>({key:i,provider:e.find(l=>l.id===i.providerId)??null}))}const Ke="own-accounts";function ts(t){const e=$.c(29),{onAddKey:i}=t,l=B(),o=lt(),r=ot(),p=qt(o,r?.providers??[]);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={select:$t},e[0]=m):m=e[0];const c=et(m),g=Ke;let a;e[1]!==c?(a=K=>{K&&c&&K.scrollIntoView({block:"start"})},e[1]=c,e[2]=a):a=e[2];const n=st;let u;e[3]!==l?(u=l("settings.ownAccounts.title"),e[3]=l,e[4]=u):u=e[4];const f=tt;let d,h,x;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(jt,{}),h=s.jsx(Ct,{}),x=s.jsx(It,{}),e[5]=d,e[6]=h,e[7]=x):(d=e[5],h=e[6],x=e[7]);const b=p.map(Ft);let C;e[8]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("span",{className:"flex size-8 items-center justify-center rounded-lg border border-dashed border-border",children:s.jsx(it,{size:16})}),e[8]=C):C=e[8];let y;e[9]!==l?(y=l("settings.ownAccounts.addApiKey"),e[9]=l,e[10]=y):y=e[10];let j;e[11]!==i||e[12]!==y?(j=s.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center gap-3 px-4 py-3 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",children:[C,y]}),e[11]=i,e[12]=y,e[13]=j):j=e[13];let v;e[14]!==f||e[15]!==j||e[16]!==d||e[17]!==h||e[18]!==x||e[19]!==b?(v=s.jsxs(f,{children:[d,h,x,b,j]}),e[14]=f,e[15]=j,e[16]=d,e[17]=h,e[18]=x,e[19]=b,e[20]=v):v=e[20];let S;e[21]!==n||e[22]!==v||e[23]!==u?(S=s.jsx(n,{title:u,children:v}),e[21]=n,e[22]=v,e[23]=u,e[24]=S):S=e[24];let _;return e[25]!==S||e[26]!==g||e[27]!==a?(_=s.jsx("div",{id:g,ref:a,children:S}),e[25]=S,e[26]=g,e[27]=a,e[28]=_):_=e[28],_}function Ft(t){const{key:e,provider:i}=t;return s.jsx(Rt,{providerKey:e,provider:i},e.id)}function $t(t){return t.location.hash===Ke}export{Ke as O,ts as a,es as g,bt as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as M,r as z,j as l,fT as be,b as H,as as Ze,m as G,bx as ct,fU as He,fV as et,a5 as me,q as Yt,ak as Zt,e as es,K as xe,t as ze,i as ut,ai as ts,R as ss,h as ns,B as ye,b3 as dt,ah as as,aF as ls,fW as os,fX as ft,a8 as rs,F as is,C as qe,d as We,fY as tt,eN as cs,fZ as us}from"./index-cgovyYsQ.js";import{e as ds,aM as fs,j as ms,aD as ps,T as gs,a as st,at as xs,m as hs,a3 as bs,aN as ys,aO as mt,aP as js,aC as Fe,aQ as vs,aR as Ss,aS as pt,A as gt,aT as de,aU as ke,g as Ns,b as ks,aV as ws,I as _s}from"./agent-icon-TjMVTO6h.js";import{t as Ce,e as Ts,c as Cs,s as Is,b as we}from"./Tool01-CSZn_Wh0.js";import{i as xt}from"./LinkBroken01-CqkORUqT.js";import{b as $s,C as Ms,a as As}from"./collapsible-Ddfj_16s.js";import{u as Ps}from"./use-copy-D49VwPhf.js";import{d as ht,i as Ls,e as Ie,c as Es,P as Rs,u as zs,f as Fs,F as Ds,s as Os,b as Bs,h as Us}from"./usage-stats-Di2DK9Gv.js";import{m as Hs,u as qs,n as Ws,o as Gs}from"./thread-intent-B59SA_sa.js";import{f as je,y as Vs,u as ve,z as Ks,b as Js,B as bt,E as Qs,F as $e,G as Xs,H as Ys}from"./chat-context-BBpIuXC7.js";import{b as Ge,a as Zs,d as en}from"./shell-layout-C_vTrOFi.js";import{c as tn}from"./content-blocks-o63cs2vh.js";import{M as sn}from"./mcp-app-renderer-DjL0niPw.js";import{g as yt}from"./types-BrSjQREm.js";import{o as nn}from"./omit-server-managed-metadata-L5IhjRZB.js";import{T as jt,a as vt,c as St}from"./tooltip-Bg4P3YaG.js";import{c as an,u as ln,a as on}from"./use-mcp-client-B3mZDGvG.js";import{a as Nt,g as kt,s as wt}from"./tool-namespace-DbWzvuWO.js";import{t as rn,g as pe,u as Ve}from"./utils-CVEq3hMx.js";import{i as _t}from"./AlertCircle-CQ8p4KFs.js";import{s as cn}from"./XClose-DpL893eV.js";import{n as De}from"./ShoppingBag01-CajIv2w8.js";import{i as un}from"./SearchMd-CW5cmPaz.js";import{a as Ke}from"./autosend-U0ehaXsA.js";import{b as Tt}from"./use-entitlements-C6In-vfl.js";import{I as dn,M as Ct}from"./markdown-mKHkB6FI.js";import{c as fn,S as mn,a as pn,b as gn}from"./sheet-DWPcPfVu.js";import{I as Se}from"./integration-icon-bQl-nSH8.js";import{a as It}from"./use-connection-IiFidBLV.js";import{u as $t}from"./use-navigate-to-agent-CYu1HJsb.js";import{s as xn}from"./UserSquare-DKikapRU.js";import{g as hn}from"./use-mcp-prompts-DnVJp_BL.js";import{t as bn}from"./ChevronUp-BTGxI7Zs.js";import{i as yn}from"./Monitor01-D-9i_0yJ.js";import{a as jn}from"./use-thread-outputs-Btu23rT9.js";import{F as vn}from"./file-type-icon-DrIF_ach.js";const Mt=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Sn(){const s=M.c(5),[e]=z.useState(Nn);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let n;s[1]!==e?(n=Mt.map((o,c)=>{const{delay:i}=o;return l.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[c],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},c)}),s[1]=e,s[2]=n):n=s[2];let a;return s[3]!==n?(a=l.jsx("div",{className:"grid",style:t,children:n}),s[3]=n,s[4]=a):a=s[4],a}function Nn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Mt.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}const kn={damping:.7,stiffness:.05,mass:1.25},wn=70,_n=1e3/60,Tn=350;let Me=!1;globalThis.document?.addEventListener("mousedown",()=>{Me=!0});globalThis.document?.addEventListener("mouseup",()=>{Me=!1});globalThis.document?.addEventListener("click",()=>{Me=!1});const Cn=(s={})=>{const[e,t]=z.useState(!1),[n,a]=z.useState(s.initial!==!1),[o,c]=z.useState(!1),i=z.useRef(null);i.current=s;const u=z.useCallback(()=>{if(!Me)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(h.current)||h.current?.contains(k.commonAncestorContainer)},[]),r=z.useCallback(b=>{d.isAtBottom=b,a(b)},[]),f=z.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=z.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return h.current?.scrollTop??0},set scrollTop(k){if(h.current){const{scrollBehavior:j}=getComputedStyle(h.current);j!=="auto"&&(h.current.style.scrollBehavior="auto"),h.current.scrollTop=k,d.ignoreScrollToTop=h.current.scrollTop,j!=="auto"&&(h.current.style.scrollBehavior=j)}},get targetScrollTop(){return!h.current||!y.current?0:h.current.scrollHeight-1-h.current.clientHeight},get calculatedTargetScrollTop(){if(!h.current||!y.current)return 0;const{targetScrollTop:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:h.current,contentElement:y.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=wn}}},[]),m=z.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||r(!0);const k=Date.now()+(Number(b.wait)||0),j=Le(i.current,b.animation),{ignoreEscapes:w=!1}=b;let S,N=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=k+(b.duration??0);const v=async()=>{const _=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:T}=d,A=performance.now(),P=(A-(d.lastTick??A))/_n;if(d.animation||(d.animation={behavior:j,promise:_,ignoreEscapes:w}),d.animation.behavior===j&&(d.lastTick=A),u()||k>Date.now())return v();if(T<Math.min(N,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,v();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*P,d.scrollTop+=d.accumulated,d.scrollTop!==T&&(d.accumulated=0)}return v()}return S>Date.now()?(N=d.calculatedTargetScrollTop,v()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?m({animation:Le(i.current,i.current.resize),ignoreEscapes:w,duration:Math.max(0,S-Date.now())||void 0}):d.isAtBottom)});return _.then(T=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),T))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:v()},[r,u,d]),p=z.useCallback(()=>{f(!0),r(!1)},[f,r]),g=z.useCallback(({target:b})=>{if(b!==h.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:w=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(w=j),c(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(u()){f(!0),r(!1);return}const S=k>w,N=k<w;if(d.animation?.ignoreEscapes){d.scrollTop=w;return}N&&(f(!0),r(!1)),S&&f(!1),!d.escapedFromLock&&d.isNearBottom&&r(!0)},1)},[f,r,u,d]),x=z.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===h.current&&k<0&&h.current.scrollHeight>h.current.clientHeight&&!d.animation?.ignoreEscapes&&(f(!0),r(!1))},[f,r,d]),h=nt(b=>{h.current?.removeEventListener("scroll",g),h.current?.removeEventListener("wheel",x),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",x,{passive:!0})},[]),y=nt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:w}=j.contentRect,S=w-(k??w);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),c(d.isNearBottom),S>=0){const N=Le(i.current,k?i.current.resize:i.current.initial);m({animation:N,wait:!0,preserveScrollPosition:!0,duration:N==="instant"?void 0:Tn})}else d.isNearBottom&&(f(!1),r(!0));k=w,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:h,scrollToBottom:m,stopScroll:p,isAtBottom:n||o,isNearBottom:o,escapedFromLock:e,state:d}};function nt(s,e){const t=z.useCallback(n=>(t.current=n,s(n)),e);return t}const Pe=new Map;function Le(...s){const e={...kn};let t=!1;for(const a of s){if(a==="instant"){t=!0;continue}typeof a=="object"&&(t=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const n=JSON.stringify(e);return Pe.has(n)||Pe.set(n,Object.freeze(e)),t?"instant":Pe.get(n)}function Y({icon:s,title:e,usage:t,summary:n,state:a,detail:o,detailVariant:c="code",forceOpen:i,variant:u="default",trailing:r,iconDestructive:f,alwaysChevron:d,defaultOpen:m,children:p}){const g=H(),[x,h]=z.useState(m??!1),{handleCopy:y,copied:b}=Ps(),k=a==="loading",j=a==="error",S=!!(o&&o.trim())||!!p,N=u==="subtask",v=(i??!1)||x,_=Cn({initial:k?"instant":!1}),T=l.jsxs($s,{open:v,onOpenChange:i?void 0:h,className:"min-w-0",children:[l.jsxs(Ms,{disabled:!S,className:G("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",S&&"[@media(hover:hover)]:hover:bg-accent",!S&&"cursor-default"),"aria-disabled":!S,children:[l.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?l.jsx(Ze,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:G("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",f?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",S&&(v?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),S&&l.jsx("div",{className:G("absolute inset-0 flex items-center justify-center transition-opacity duration-150",v?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:l.jsx(Ze,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")})})]})}),l.jsx("span",{className:G("shrink-0 text-sm font-normal",j?"text-warning/80":"text-foreground",k&&"shimmer"),children:e}),n?l.jsx("span",{className:"min-w-0 flex-1 truncate",children:l.jsx("span",{className:"text-xs text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l.jsx("span",{className:G(k&&"shimmer"),children:n})})}):l.jsx("div",{className:"flex-1"}),r&&l.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:r}),l.jsx(ht,{usage:t})]}),S&&l.jsx(As,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(c==="prose"?l.jsx("div",{className:"mt-1 mb-1",children:l.jsx("div",{ref:_.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:l.jsx("p",{ref:_.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:o})})}):l.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:l.jsx("div",{ref:_.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:l.jsxs("div",{ref:_.contentRef,className:"flex items-start justify-between gap-2",children:[l.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:l.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:o})}),l.jsx("button",{type:"button",onClick:()=>y(o),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?l.jsx(ct,{className:"size-3.5"}):l.jsx(ds,{className:"size-3.5"})})]})})}))})]});return N?l.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:T}):T}function fe(s){const e=M.c(4),{latency:t}=s;if(t==null||t<=0)return null;let n;e[0]!==t?(n=be(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=l.jsx("span",{className:"text-2xs font-mono tabular-nums text-muted-foreground",children:n}),e[2]=n,e[3]=a):a=e[3],a}const At=4;function Pt(s){const e=M.c(8),{count:t,noun:n,onClick:a}=s,o=H();let c;e[0]!==t||e[1]!==n||e[2]!==o?(c=o("common.seeAll",{count:t,noun:n}),e[0]=t,e[1]=n,e[2]=o,e[3]=c):c=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(xt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let u;return e[5]!==a||e[6]!==c?(u=l.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground cursor-pointer",children:[c,i]}),e[5]=a,e[6]=c,e[7]=u):u=e[7],u}function Lt(s){const e=M.c(12),{message:t,className:n}=s,a=t.created_at??t.metadata?.created_at??null;let o,c,i,u;if(e[0]!==n||e[1]!==a){u=Symbol.for("react.early_return_sentinel");e:{const f=He(a);if(f===null){u=null;break e}const d=new Date(f);o=d.toLocaleString(),e[6]!==n?(c=G("text-2xs text-muted-foreground/60 select-none",n),e[6]=n,e[7]=c):c=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=n,e[1]=a,e[2]=o,e[3]=c,e[4]=i,e[5]=u}else o=e[2],c=e[3],i=e[4],u=e[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;let r;return e[8]!==o||e[9]!==c||e[10]!==i?(r=l.jsx("span",{title:o,className:c,children:i}),e[8]=o,e[9]=c,e[10]=i,e[11]=r):r=e[11],r}function Oe(s){const e=M.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>et(t,Date.now()),e[0]=t,e[1]=n):n=e[1];const[a,o]=z.useState(n);let c,i;e[2]!==t?(c=()=>{const d=setInterval(()=>o(et(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=c,e[4]=i):(c=e[3],i=e[4]),z.useEffect(c,i);const u=a/1e3;let r;e[5]!==u?(r=be(u),e[5]=u,e[6]=r):r=e[6];let f;return e[7]!==r?(f=l.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:r}),e[7]=r,e[8]=f):f=e[8],f}function In(s){return{planning:{icon:l.jsx(ms,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:l.jsx(Ce,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const $n=1200;function Be(s){const e=M.c(8),{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:i,trailing:u}=s,r=i===void 0?"prose":i;let f;return e[0]!==o||e[1]!==r||e[2]!==t||e[3]!==c||e[4]!==a||e[5]!==n||e[6]!==u?(f=l.jsx(Y,{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:r,trailing:u}),e[0]=o,e[1]=r,e[2]=t,e[3]=c,e[4]=a,e[5]=n,e[6]=u,e[7]=f):f=e[7],f}function Mn(s){const e=M.c(22),{startedAt:t}=s,n=H(),a=je()?.runStatusStage??null,[o,c]=z.useState("planning");let i,u;if(e[0]!==a?(i=()=>{if(a!==null)return;const x=setTimeout(()=>{c("thinking")},$n);return()=>{clearTimeout(x)}},u=[a],e[0]=a,e[1]=i,e[2]=u):(i=e[1],u=e[2]),z.useEffect(i,u),a!==null){let x;e[3]!==a||e[4]!==n?(x=Hs(n,a),e[3]=a,e[4]=n,e[5]=x):x=e[5];const h=x;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(Ce,{className:"size-4"}),e[6]=y):y=e[6];const b=`${h.label}...`;let k;e[7]!==t?(k=t!==null&&l.jsx(Oe,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==h.detail||e[10]!==b||e[11]!==k?(j=l.jsx(Be,{icon:y,title:b,summary:h.detail,state:"loading",trailing:k}),e[9]=h.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let r;e[13]!==n?(r=In(n),e[13]=n,e[14]=r):r=e[14];const d=r[o],m=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&l.jsx(Oe,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==m||e[20]!==p?(g=l.jsx(Be,{icon:d.icon,title:m,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=m,e[20]=p,e[21]=g):g=e[21],g}function An(s){const e=M.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(Sn,{}),e[0]=n):n=e[0];let a;return e[1]!==t?(a=l.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[n,l.jsx(Oe,{since:t})]}),e[1]=t,e[2]=a):a=e[2],a}const Pn=2e4;function Ln(s){const e=M.c(9),{startedAt:t}=s,n=H(),a=Ge(1e3),o=je(),i=(t!==null?a-t:0)>=Pn;let u;e[0]!==t?(u=l.jsx(Mn,{startedAt:t}),e[0]=t,e[1]=u):u=e[1];let r;e[2]!==i||e[3]!==o||e[4]!==n?(r=i&&o?.stop&&l.jsxs("div",{className:"flex items-center gap-2 pb-1 text-sm text-muted-foreground/60",children:[l.jsx("span",{children:n("chat.thinkingIndicator.takingLonger")}),l.jsx("button",{type:"button",onClick:()=>o.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:n("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=o,e[4]=n,e[5]=r):r=e[5];let f;return e[6]!==u||e[7]!==r?(f=l.jsxs("div",{className:"flex flex-col gap-0.5",children:[u,r]}),e[6]=u,e[7]=r,e[8]=f):f=e[8],f}function En(s){const e=M.c(24),{duration:t,parts:n,isStreaming:a}=s,o=H();let c;e[0]!==n?(c=n.every(Fn),e[0]=n,e[1]=c):c=e[1];const i=c;let u;e[2]!==t||e[3]!==o?(u=t&&t/1e3>1?o("chat.thinkingIndicator.thoughtFor",{duration:be(t/1e3)}):o("chat.thinkingIndicator.thought"),e[2]=t,e[3]=o,e[4]=u):u=e[4];const r=u;let f;if(e[5]!==i||e[6]!==a||e[7]!==n){const k=n.map(zn).join(`
|
|
1
|
+
import{c as M,r as z,j as l,fT as be,b as H,as as Ze,m as G,bx as ct,fU as He,fV as et,a5 as me,q as Yt,ak as Zt,e as es,K as xe,t as ze,i as ut,ai as ts,R as ss,h as ns,B as ye,b3 as dt,ah as as,aF as ls,fW as os,fX as ft,a8 as rs,F as is,C as qe,d as We,fY as tt,eN as cs,fZ as us}from"./index-B9QAGcIi.js";import{e as ds,aM as fs,j as ms,aD as ps,T as gs,a as st,at as xs,m as hs,a3 as bs,aN as ys,aO as mt,aP as js,aC as Fe,aQ as vs,aR as Ss,aS as pt,A as gt,aT as de,aU as ke,g as Ns,b as ks,aV as ws,I as _s}from"./agent-icon-j6t5huQo.js";import{t as Ce,e as Ts,c as Cs,s as Is,b as we}from"./Tool01-PTUwz10y.js";import{i as xt}from"./LinkBroken01-BH9f0tfg.js";import{b as $s,C as Ms,a as As}from"./collapsible-p2X_LZ_q.js";import{u as Ps}from"./use-copy-CmgIzYEc.js";import{d as ht,i as Ls,e as Ie,c as Es,P as Rs,u as zs,f as Fs,F as Ds,s as Os,b as Bs,h as Us}from"./usage-stats-ckY7bir_.js";import{m as Hs,u as qs,n as Ws,o as Gs}from"./thread-intent-nPaIrh5T.js";import{f as je,y as Vs,u as ve,z as Ks,b as Js,B as bt,E as Qs,F as $e,G as Xs,H as Ys}from"./chat-context-DrlDLCTg.js";import{b as Ge,a as Zs,d as en}from"./shell-layout-0PvdYI4e.js";import{c as tn}from"./content-blocks-o63cs2vh.js";import{M as sn}from"./mcp-app-renderer-DjD3bMOq.js";import{g as yt}from"./types-CsgacF3E.js";import{o as nn}from"./omit-server-managed-metadata-L5IhjRZB.js";import{T as jt,a as vt,c as St}from"./tooltip-oILxW0vz.js";import{c as an,u as ln,a as on}from"./use-mcp-client-DMMY7p2F.js";import{a as Nt,g as kt,s as wt}from"./tool-namespace-C_xQ9mqM.js";import{t as rn,g as pe,u as Ve}from"./utils-CVEq3hMx.js";import{i as _t}from"./AlertCircle-BUZy3sYx.js";import{s as cn}from"./XClose-DdH4UADI.js";import{n as De}from"./ShoppingBag01-DZhdG6kl.js";import{i as un}from"./SearchMd-CxCEqQoC.js";import{a as Ke}from"./autosend-Ct94XjGX.js";import{b as Tt}from"./use-entitlements-CwMPeVRh.js";import{I as dn,M as Ct}from"./markdown-DpeGUbAj.js";import{c as fn,S as mn,a as pn,b as gn}from"./sheet-Ck3eYK8j.js";import{I as Se}from"./integration-icon-gO2PpMmm.js";import{a as It}from"./use-connection-MZkJifu9.js";import{u as $t}from"./use-navigate-to-agent-brFKQesH.js";import{s as xn}from"./UserSquare-CBsLM8SI.js";import{g as hn}from"./use-mcp-prompts-Cnaz613K.js";import{t as bn}from"./ChevronUp-DKpA0SQs.js";import{i as yn}from"./Monitor01-Dzr2ls8R.js";import{a as jn}from"./use-thread-outputs-DiaGC7Y7.js";import{F as vn}from"./file-type-icon-CCFDVXm1.js";const Mt=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Sn(){const s=M.c(5),[e]=z.useState(Nn);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let n;s[1]!==e?(n=Mt.map((o,c)=>{const{delay:i}=o;return l.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[c],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},c)}),s[1]=e,s[2]=n):n=s[2];let a;return s[3]!==n?(a=l.jsx("div",{className:"grid",style:t,children:n}),s[3]=n,s[4]=a):a=s[4],a}function Nn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Mt.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}const kn={damping:.7,stiffness:.05,mass:1.25},wn=70,_n=1e3/60,Tn=350;let Me=!1;globalThis.document?.addEventListener("mousedown",()=>{Me=!0});globalThis.document?.addEventListener("mouseup",()=>{Me=!1});globalThis.document?.addEventListener("click",()=>{Me=!1});const Cn=(s={})=>{const[e,t]=z.useState(!1),[n,a]=z.useState(s.initial!==!1),[o,c]=z.useState(!1),i=z.useRef(null);i.current=s;const u=z.useCallback(()=>{if(!Me)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(h.current)||h.current?.contains(k.commonAncestorContainer)},[]),r=z.useCallback(b=>{d.isAtBottom=b,a(b)},[]),f=z.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=z.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return h.current?.scrollTop??0},set scrollTop(k){if(h.current){const{scrollBehavior:j}=getComputedStyle(h.current);j!=="auto"&&(h.current.style.scrollBehavior="auto"),h.current.scrollTop=k,d.ignoreScrollToTop=h.current.scrollTop,j!=="auto"&&(h.current.style.scrollBehavior=j)}},get targetScrollTop(){return!h.current||!y.current?0:h.current.scrollHeight-1-h.current.clientHeight},get calculatedTargetScrollTop(){if(!h.current||!y.current)return 0;const{targetScrollTop:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:h.current,contentElement:y.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=wn}}},[]),m=z.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||r(!0);const k=Date.now()+(Number(b.wait)||0),j=Le(i.current,b.animation),{ignoreEscapes:w=!1}=b;let S,N=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=k+(b.duration??0);const v=async()=>{const _=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:T}=d,A=performance.now(),P=(A-(d.lastTick??A))/_n;if(d.animation||(d.animation={behavior:j,promise:_,ignoreEscapes:w}),d.animation.behavior===j&&(d.lastTick=A),u()||k>Date.now())return v();if(T<Math.min(N,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,v();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*P,d.scrollTop+=d.accumulated,d.scrollTop!==T&&(d.accumulated=0)}return v()}return S>Date.now()?(N=d.calculatedTargetScrollTop,v()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?m({animation:Le(i.current,i.current.resize),ignoreEscapes:w,duration:Math.max(0,S-Date.now())||void 0}):d.isAtBottom)});return _.then(T=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),T))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:v()},[r,u,d]),p=z.useCallback(()=>{f(!0),r(!1)},[f,r]),g=z.useCallback(({target:b})=>{if(b!==h.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:w=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(w=j),c(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(u()){f(!0),r(!1);return}const S=k>w,N=k<w;if(d.animation?.ignoreEscapes){d.scrollTop=w;return}N&&(f(!0),r(!1)),S&&f(!1),!d.escapedFromLock&&d.isNearBottom&&r(!0)},1)},[f,r,u,d]),x=z.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===h.current&&k<0&&h.current.scrollHeight>h.current.clientHeight&&!d.animation?.ignoreEscapes&&(f(!0),r(!1))},[f,r,d]),h=nt(b=>{h.current?.removeEventListener("scroll",g),h.current?.removeEventListener("wheel",x),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",x,{passive:!0})},[]),y=nt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:w}=j.contentRect,S=w-(k??w);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),c(d.isNearBottom),S>=0){const N=Le(i.current,k?i.current.resize:i.current.initial);m({animation:N,wait:!0,preserveScrollPosition:!0,duration:N==="instant"?void 0:Tn})}else d.isNearBottom&&(f(!1),r(!0));k=w,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:h,scrollToBottom:m,stopScroll:p,isAtBottom:n||o,isNearBottom:o,escapedFromLock:e,state:d}};function nt(s,e){const t=z.useCallback(n=>(t.current=n,s(n)),e);return t}const Pe=new Map;function Le(...s){const e={...kn};let t=!1;for(const a of s){if(a==="instant"){t=!0;continue}typeof a=="object"&&(t=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const n=JSON.stringify(e);return Pe.has(n)||Pe.set(n,Object.freeze(e)),t?"instant":Pe.get(n)}function Y({icon:s,title:e,usage:t,summary:n,state:a,detail:o,detailVariant:c="code",forceOpen:i,variant:u="default",trailing:r,iconDestructive:f,alwaysChevron:d,defaultOpen:m,children:p}){const g=H(),[x,h]=z.useState(m??!1),{handleCopy:y,copied:b}=Ps(),k=a==="loading",j=a==="error",S=!!(o&&o.trim())||!!p,N=u==="subtask",v=(i??!1)||x,_=Cn({initial:k?"instant":!1}),T=l.jsxs($s,{open:v,onOpenChange:i?void 0:h,className:"min-w-0",children:[l.jsxs(Ms,{disabled:!S,className:G("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",S&&"[@media(hover:hover)]:hover:bg-accent",!S&&"cursor-default"),"aria-disabled":!S,children:[l.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?l.jsx(Ze,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:G("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",f?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",S&&(v?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),S&&l.jsx("div",{className:G("absolute inset-0 flex items-center justify-center transition-opacity duration-150",v?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:l.jsx(Ze,{className:G("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")})})]})}),l.jsx("span",{className:G("shrink-0 text-sm font-normal",j?"text-warning/80":"text-foreground",k&&"shimmer"),children:e}),n?l.jsx("span",{className:"min-w-0 flex-1 truncate",children:l.jsx("span",{className:"text-xs text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:l.jsx("span",{className:G(k&&"shimmer"),children:n})})}):l.jsx("div",{className:"flex-1"}),r&&l.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:r}),l.jsx(ht,{usage:t})]}),S&&l.jsx(As,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(c==="prose"?l.jsx("div",{className:"mt-1 mb-1",children:l.jsx("div",{ref:_.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:l.jsx("p",{ref:_.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:o})})}):l.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:l.jsx("div",{ref:_.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:l.jsxs("div",{ref:_.contentRef,className:"flex items-start justify-between gap-2",children:[l.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:l.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:o})}),l.jsx("button",{type:"button",onClick:()=>y(o),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?l.jsx(ct,{className:"size-3.5"}):l.jsx(ds,{className:"size-3.5"})})]})})}))})]});return N?l.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:T}):T}function fe(s){const e=M.c(4),{latency:t}=s;if(t==null||t<=0)return null;let n;e[0]!==t?(n=be(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=l.jsx("span",{className:"text-2xs font-mono tabular-nums text-muted-foreground",children:n}),e[2]=n,e[3]=a):a=e[3],a}const At=4;function Pt(s){const e=M.c(8),{count:t,noun:n,onClick:a}=s,o=H();let c;e[0]!==t||e[1]!==n||e[2]!==o?(c=o("common.seeAll",{count:t,noun:n}),e[0]=t,e[1]=n,e[2]=o,e[3]=c):c=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(xt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let u;return e[5]!==a||e[6]!==c?(u=l.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground cursor-pointer",children:[c,i]}),e[5]=a,e[6]=c,e[7]=u):u=e[7],u}function Lt(s){const e=M.c(12),{message:t,className:n}=s,a=t.created_at??t.metadata?.created_at??null;let o,c,i,u;if(e[0]!==n||e[1]!==a){u=Symbol.for("react.early_return_sentinel");e:{const f=He(a);if(f===null){u=null;break e}const d=new Date(f);o=d.toLocaleString(),e[6]!==n?(c=G("text-2xs text-muted-foreground/60 select-none",n),e[6]=n,e[7]=c):c=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=n,e[1]=a,e[2]=o,e[3]=c,e[4]=i,e[5]=u}else o=e[2],c=e[3],i=e[4],u=e[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;let r;return e[8]!==o||e[9]!==c||e[10]!==i?(r=l.jsx("span",{title:o,className:c,children:i}),e[8]=o,e[9]=c,e[10]=i,e[11]=r):r=e[11],r}function Oe(s){const e=M.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>et(t,Date.now()),e[0]=t,e[1]=n):n=e[1];const[a,o]=z.useState(n);let c,i;e[2]!==t?(c=()=>{const d=setInterval(()=>o(et(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=c,e[4]=i):(c=e[3],i=e[4]),z.useEffect(c,i);const u=a/1e3;let r;e[5]!==u?(r=be(u),e[5]=u,e[6]=r):r=e[6];let f;return e[7]!==r?(f=l.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:r}),e[7]=r,e[8]=f):f=e[8],f}function In(s){return{planning:{icon:l.jsx(ms,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:l.jsx(Ce,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const $n=1200;function Be(s){const e=M.c(8),{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:i,trailing:u}=s,r=i===void 0?"prose":i;let f;return e[0]!==o||e[1]!==r||e[2]!==t||e[3]!==c||e[4]!==a||e[5]!==n||e[6]!==u?(f=l.jsx(Y,{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:r,trailing:u}),e[0]=o,e[1]=r,e[2]=t,e[3]=c,e[4]=a,e[5]=n,e[6]=u,e[7]=f):f=e[7],f}function Mn(s){const e=M.c(22),{startedAt:t}=s,n=H(),a=je()?.runStatusStage??null,[o,c]=z.useState("planning");let i,u;if(e[0]!==a?(i=()=>{if(a!==null)return;const x=setTimeout(()=>{c("thinking")},$n);return()=>{clearTimeout(x)}},u=[a],e[0]=a,e[1]=i,e[2]=u):(i=e[1],u=e[2]),z.useEffect(i,u),a!==null){let x;e[3]!==a||e[4]!==n?(x=Hs(n,a),e[3]=a,e[4]=n,e[5]=x):x=e[5];const h=x;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(Ce,{className:"size-4"}),e[6]=y):y=e[6];const b=`${h.label}...`;let k;e[7]!==t?(k=t!==null&&l.jsx(Oe,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==h.detail||e[10]!==b||e[11]!==k?(j=l.jsx(Be,{icon:y,title:b,summary:h.detail,state:"loading",trailing:k}),e[9]=h.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let r;e[13]!==n?(r=In(n),e[13]=n,e[14]=r):r=e[14];const d=r[o],m=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&l.jsx(Oe,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==m||e[20]!==p?(g=l.jsx(Be,{icon:d.icon,title:m,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=m,e[20]=p,e[21]=g):g=e[21],g}function An(s){const e=M.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(Sn,{}),e[0]=n):n=e[0];let a;return e[1]!==t?(a=l.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[n,l.jsx(Oe,{since:t})]}),e[1]=t,e[2]=a):a=e[2],a}const Pn=2e4;function Ln(s){const e=M.c(9),{startedAt:t}=s,n=H(),a=Ge(1e3),o=je(),i=(t!==null?a-t:0)>=Pn;let u;e[0]!==t?(u=l.jsx(Mn,{startedAt:t}),e[0]=t,e[1]=u):u=e[1];let r;e[2]!==i||e[3]!==o||e[4]!==n?(r=i&&o?.stop&&l.jsxs("div",{className:"flex items-center gap-2 pb-1 text-sm text-muted-foreground/60",children:[l.jsx("span",{children:n("chat.thinkingIndicator.takingLonger")}),l.jsx("button",{type:"button",onClick:()=>o.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:n("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=o,e[4]=n,e[5]=r):r=e[5];let f;return e[6]!==u||e[7]!==r?(f=l.jsxs("div",{className:"flex flex-col gap-0.5",children:[u,r]}),e[6]=u,e[7]=r,e[8]=f):f=e[8],f}function En(s){const e=M.c(24),{duration:t,parts:n,isStreaming:a}=s,o=H();let c;e[0]!==n?(c=n.every(Fn),e[0]=n,e[1]=c):c=e[1];const i=c;let u;e[2]!==t||e[3]!==o?(u=t&&t/1e3>1?o("chat.thinkingIndicator.thoughtFor",{duration:be(t/1e3)}):o("chat.thinkingIndicator.thought"),e[2]=t,e[3]=o,e[4]=u):u=e[4];const r=u;let f;if(e[5]!==i||e[6]!==a||e[7]!==n){const k=n.map(zn).join(`
|
|
2
2
|
`).trim().split(`
|
|
3
3
|
`).filter(Boolean),j=a?k[k.length-1]??"":k[0]??"";f=!i&&j?j.length>100?j.slice(0,100)+"…":j:void 0,e[5]=i,e[6]=a,e[7]=n,e[8]=f}else f=e[8];const d=f;let m;if(e[9]!==i||e[10]!==n){const b=n.map(Rn).join(`
|
|
4
4
|
|