@xopcai/xopc 0.0.390 → 0.0.391
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/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/src/plugin.js +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-DGMAYkw8.js → activity-store-DWQCDi8M.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-B4AsZzJR.js → agent-avatar-dicebear-CzS0TUv9.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DE910MyU.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-0SlvsYl7.js +1 -0
- package/dist/gateway/static/root/assets/agents-BZh28Qn1.js +77 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-DxdaiFWn.js → agents-admin-api-Bb3Kvz3X.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-DHRfLkYD.js → app-management-settings-panel-9A7JN5V5.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-DtKSapgb.js → appearance-settings-BPdLEo6L.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-B9kuRt_z.js → apps-page-Cz7LypV9.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-AgySTXp_.js → archive-plugin-DFnHPNie.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-D1o7ZtUW.js → automations-page-CnBLPVNh.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BBjS-sk-.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-A1AXOsO6.js → binary-plugins-BQC0Tzoi.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DUNLkLKF.js → block-editor-DSh5019z.js} +4 -4
- package/dist/gateway/static/root/assets/{browser-automation-inputs-BvUC6OiW.js → browser-automation-inputs-C5tIrIRL.js} +1 -1
- package/dist/gateway/static/root/assets/browser-automations-page-CFCMNfJN.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-C__tyPwu.js +3 -0
- package/dist/gateway/static/root/assets/{capabilities-D61uSJPy.js → capabilities-D6RJG4QY.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-BkCutK0V.js → capabilities-DGEmBQnF.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-B5AZa7ir.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-Dskz2_bh.js +8 -0
- package/dist/gateway/static/root/assets/{capability-header-actions-D9uGs4Pw.js → capability-header-actions-xzjWZVbg.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-xb7n8rwF.js → channels-DRse_dD3.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-Dgn09YDs.js → chat-terminal-dock-CQF0M4kE.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-C66P4ifT.js → computer-settings-page-ZfzCTS0N.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-Dp35XdYf.js → connector-service-page-CwAeWVLK.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-CanakKaj.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-CddHY982.js → date-picker-hmJlEAQZ.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-Ob6BZTqv.js → dependency-picker-Us_Juz6I.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-dmwCV-I4.js → desktop-pet-CvOTI4uw.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-B-TBkZAZ.js → desktop-pet-settings-DYg-Gb8t.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-B1FbZ8C1.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-6VZa4fT1.js → directory-picker-path-field-DZN9EDvM.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-C0_njMva.js → extension-debug-page-YIibp6Kk.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BeBLMFmW.js → extension-page-DkcGyb28.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-DWI0KAKT.js → extension-provider-B1PQGTtY.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-C_rJiSKo.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-CmYcOqhb.js → gateway-config-swr-Dv_A5FMu.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-Ci1Jst5g.js → gateway-realtime-DghCGfY_.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-CMJVSnvi.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-CjCWPHNJ.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-C-BG5M7H.js → gateway-startup-retry-CkTVSESs.js} +1 -1
- package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-CsA7lCVc.js → highlighted-body-KQOG7T2V-DV2wNqBn.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-fAYsd7kG.js +2 -0
- package/dist/gateway/static/root/assets/{image-generation-api-B_DqCwtV.js → image-generation-api-B98iXt6A.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-oAvAF9QS.js → imports-page-DoBCBN8G.js} +1 -1
- package/dist/gateway/static/root/assets/index-DFgXwLsv.js +260 -0
- package/dist/gateway/static/root/assets/index-a6ZvhclR.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings--MjYe-Pb.js → keyboard-shortcuts-settings-DXVu4lqV.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-B3fz6uRi.js +1 -0
- package/dist/gateway/static/root/assets/{local-apps-page-DOa7mxjB.js → local-apps-page-BC6xhmUh.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-DAtLkTPg.js → local-session-drafts-DFnZQu9A.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-DMy9W6IG.js → locale-store-BpK9AiDq.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-CSqSFDRU.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-C0TzuD3-.js → management-settings-gq5L0THs.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-wyOHdXEg.js → markdown-view-IsYTotu6.js} +18 -18
- package/dist/gateway/static/root/assets/{media-plugins-Pb2zr_-L.js → media-plugins-oSChWbcP.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-C_QKwqDN.js +1 -0
- package/dist/gateway/static/root/assets/{messages-O0BEUKnx.js → messages-CKTo_sIF.js} +2 -2
- package/dist/gateway/static/root/assets/{models-hub-cache-DdH1MODX.js → models-hub-cache-TjpL7hZ5.js} +1 -1
- package/dist/gateway/static/root/assets/note-detail-panel-CdpNXre-.js +5 -0
- package/dist/gateway/static/root/assets/{notes-api-CYt2pGsm.js → notes-api-CBb944yw.js} +1 -1
- package/dist/gateway/static/root/assets/notes-page-EGvGw8MN.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-3uj5EcQC.js → page-context-capture-button-CoWb7BYP.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-DYzbNTyN.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-hI13tPS1.js → product-open-page-CTyy7H7-.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-lT_in0-Q.js → product-preview-content-D4xqTaEy.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-DIVCw0QQ.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-B4L9VnBN.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-CgQrCqL6.js → registry-api-Dsa2LvRt.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-B8PvgLVz.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-D12qVKeC.js → runtime-tools-api-C2Uw89eY.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DOSPOfCU.js → runtime-tools-settings-panel-Bqnp3tyt.js} +1 -1
- package/dist/gateway/static/root/assets/scenes-page-D50g4GM2.js +2 -0
- package/dist/gateway/static/root/assets/{schema-form-CwOFgsyh.js → schema-form-h_RCNfiO.js} +1 -1
- package/dist/gateway/static/root/assets/{send-session-input-nH8Cw0US.js → send-session-input-DypbVTT7.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-B9HrwF-c.js → session-api-ga-SUOq_.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-aXqXuqDX.js → session-manager-C_OiKblh.js} +8 -8
- package/dist/gateway/static/root/assets/sessions-page-BsqDIbIr.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-D3zJAW4p.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-BN70wE6R.js → settings-page-DPCgrICd.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-CHzcVRi-.js → setup-status-panel-jjSYJpDd.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-B1TDyhPt.js → share-link-dialog-BGicglAS.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-Br-eAZaP.js → share-preview-page-BORe9rLB.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-Bl1ZBh5S.js → shares-api-Dbx3z6-1.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-C13FgfWk.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-ClUw3SRC.js → skill-api-Cq6O1DZK.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api--1BfIPzb.js → skill-reload-api-Cq7QDjMA.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page-BM1ShEjx.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-tWrqu7ai.js → system-settings-panel-BNCGFO1e.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-4VG82wcF.js +2 -0
- package/dist/gateway/static/root/assets/{task-expandable-content-D2t4ahzR.js → task-expandable-content-DAZGz5YC.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-BBLjE0fi.js → theme-store-Db7hDESt.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-5ATxQH5c.js → tracing-settings-page-C6p2Mu92.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-CF1Qh4wU.js → tunnel-api-Dw15EJp0.js} +1 -1
- package/dist/gateway/static/root/assets/usage-page-DDrIqgGe.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-tY3keIbm.js → use-autosave-DDjIdW4U.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-CXsocZjt.js → use-composer-attachments-DNl7O3Vb.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-CEsxnDnQ.js → use-file-preview-expanded-DMHehhwG.js} +2 -2
- package/dist/gateway/static/root/assets/user-model-page-CaS9dOIr.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-COTNLUU3.js → voice-api-key-field-ByAxHE4P.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-DrxBjSja.js → voice-config-api-Dl39b27p.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-transcribe-api-B47j0_xA.js → voice-transcribe-api-CVaU83Jc.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-PByMJrhV.js → work-discovery-overlay-BvVvPA1T.js} +1 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-BcFm9QcC.js +3 -0
- package/dist/gateway/static/root/assets/workflows-page-DMec_XZB.js +6 -0
- package/dist/gateway/static/root/assets/{workspace-api-Bmx1O449.js → workspace-api-BpfKsrtP.js} +2 -2
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-DVsAbvwP.js → xopc-cloud-account-card-CU5lzzE9.js} +1 -1
- package/dist/gateway/static/root/index.html +28 -36
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +4 -1
- package/dist/src/agent/context/execution-scope.js +1 -1
- package/dist/src/agent/embedded/execution-tool-policy.d.ts +2 -0
- package/dist/src/agent/embedded/execution-tool-policy.js +8 -3
- package/dist/src/agent/embedded/run-turn.js +2 -1
- package/dist/src/agent/embedded/session-runner.js +1 -1
- package/dist/src/agent/tools/factory.js +14 -12
- package/dist/src/agent/tools/personal-read-tool.js +4 -0
- package/dist/src/agent/tools/task-collaboration-tool.js +1 -1
- package/dist/src/channels/index.js +1 -1
- package/dist/src/channels/manager.js +1 -1
- package/dist/src/cli/commands/channels.js +1 -1
- package/dist/src/cli/commands/connectors.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/gateway/hono/lib/voice-settings-revisions.js +2 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +15 -0
- package/dist/src/gateway/service.js +9 -7
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/providers/setup/profiles.d.ts +2 -2
- package/dist/src/providers/setup/profiles.js +6 -22
- package/dist/src/storage/sqlite/migrations/256_task_main_update_retries.sql +21 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/tasks/task-collaboration-repository.d.ts +2 -0
- package/dist/src/tasks/task-collaboration-repository.js +7 -1
- package/dist/src/tasks/task-main-update-delivery.js +11 -4
- package/dist/src/tasks/task-main-update-input.js +2 -1
- package/dist/src/tasks/task-main-update-retry.d.ts +5 -0
- package/dist/src/tasks/task-main-update-retry.js +15 -0
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-9NUY1sO3.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-CNc6ntzP.js +0 -1
- package/dist/gateway/static/root/assets/agents-QNY9Vkrf.js +0 -77
- package/dist/gateway/static/root/assets/automations-workspace-BJenz0P1.js +0 -6
- package/dist/gateway/static/root/assets/bot-DjLkhyZL.js +0 -1
- package/dist/gateway/static/root/assets/browser-automations-page-Dq2LlVMh.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-BOZ-1g51.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-page-BDP6gzlv.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-D6PL3Mfl.js +0 -8
- package/dist/gateway/static/root/assets/circle-pause-CN9jYH2s.js +0 -1
- package/dist/gateway/static/root/assets/clock-3-DnrAnuyZ.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BHcRxYib.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-SWHwRgG3.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-BiLUwoKx.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BMUiUQMk.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-CzWT_v09.js +0 -1
- package/dist/gateway/static/root/assets/git-branch-Dh9uxTot.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BeXJfxsg.js +0 -2
- package/dist/gateway/static/root/assets/index-W9ls-0Yd.css +0 -1
- package/dist/gateway/static/root/assets/index-xTL-vb51.js +0 -260
- package/dist/gateway/static/root/assets/local-app-workbench-page-DL33dtd7.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-C-GbTYsM.js +0 -2
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-BxyGGa4D.js +0 -1
- package/dist/gateway/static/root/assets/message-square-fVE7Ghj1.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-BFpEqskQ.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-h-qqFJ6Z.js +0 -8
- package/dist/gateway/static/root/assets/pause-DuPxgSxk.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-BGyW6cdt.js +0 -1
- package/dist/gateway/static/root/assets/play-kxZvpBg8.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-Baj7fQ7N.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-D7DyQFU3.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-DU_d93Tm.js +0 -1
- package/dist/gateway/static/root/assets/scenes-page-swyUIF5A.js +0 -2
- package/dist/gateway/static/root/assets/sessions-page-CI_PJmlX.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DCVaeBLW.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-jgCC_E4Y.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-C9oRZSuL.js +0 -2
- package/dist/gateway/static/root/assets/sparkles-DHlfQFAF.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-BYRW7Rrr.js +0 -2
- package/dist/gateway/static/root/assets/usage-page-CuEHzXil.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-Dvt5TIZ6.js +0 -2
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-CSUkMo63.js +0 -3
- package/dist/gateway/static/root/assets/workflows-page-BUDvFo3R.js +0 -6
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{_ as i,d as a,p as o}from"./chunk-KS7C4IRE--EKdQGRF.js";import{t as s}from"./chevron-right-BweFrslA.js";import{t as c}from"./circle-alert-BEjgurr2.js";import{t as l}from"./circle-check-C23XjkUj.js";import{t as u}from"./clock-3-DnrAnuyZ.js";import{t as d}from"./external-link-DjqjBmc3.js";import{A as f,D as p,E as m,O as h,S as g,T as _,b as v,g as y,l as b,m as x,n as S,p as C,t as w,w as T,x as E}from"./use-composer-attachments-CXsocZjt.js";import{N as D}from"./markdown-view-wyOHdXEg.js";import{t as O}from"./plus-Q2yW6OE7.js";import{t as k}from"./settings-2-D-csvaET.js";import{t as A}from"./sparkles-DHlfQFAF.js";import{t as j}from"./x-B_N4OPjy.js";import{t as M}from"./messages-O0BEUKnx.js";import{t as N}from"./cn-0WouolD0.js";import{n as P}from"./locale-store-DMy9W6IG.js";import{a as ee,i as F,n as I,o as te,r as ne,s as L,t as R}from"./dist-BGTk37IG.js";import{s as z}from"./tasks-PuIUgF9L.js";import{t as B}from"./button-aIC072nz.js";import{a as V,i as H,o as U,s as W}from"./dist-C3DSFZCi.js";import{t as G}from"./skeleton-BI5TyibZ.js";import{n as re}from"./date-formatters-CUZAyDEg.js";import{Ca as ie,Fa as ae,Fn as oe,Gc as se,In as ce,Nn as le,Pn as ue,Ps as de,Si as fe,Ss as pe,Uc as K,ci as me,ls as q,r as he,sc as J,xo as ge}from"./index-xTL-vb51.js";import{n as _e}from"./tab-completion-input-D64VNmiA.js";import{n as Y,t as X}from"./task-expandable-content-D2t4ahzR.js";var Z=n(),Q=e(t(),1);function ve(e,t){let[n,r]=(0,Q.useState)(null),[i,a]=(0,Q.useState)(!0),[o,s]=(0,Q.useState)(null),c=(0,Q.useRef)(0),l=(0,Q.useCallback)(async()=>{let t=++c.current;s(null);try{let n=await v(e);t===c.current&&r(n)}catch(e){t===c.current&&s(e instanceof Error?e.message:String(e))}finally{t===c.current&&a(!1)}},[e]);return(0,Q.useEffect)(()=>(l(),()=>{c.current++}),[l,t]),(0,Q.useEffect)(()=>{let e,t=1/0,n=n=>{let r=Date.now()+n;r>=t||(window.clearTimeout(e),t=r,e=window.setTimeout(()=>{e=void 0,t=1/0,l()},n))},r=()=>n(100),i=()=>n(750),a=()=>{document.visibilityState===`visible`&&r()},o=[`task-changed-v2`,`task-updated`,`session-created`,`agent-run-started`,`agent-run-ended`,`automation-run-completed`,`workflow-run-updated`,`workflow-run-error`,`home-advisor-updated`,`gateway-realtime-connected`,`realtime-gap`,`focus`],s=[`session-updated`,`session-transcript-updated`];return o.forEach(e=>window.addEventListener(e,r)),s.forEach(e=>window.addEventListener(e,i)),document.addEventListener(`visibilitychange`,a),()=>{o.forEach(e=>window.removeEventListener(e,r)),s.forEach(e=>window.removeEventListener(e,i)),document.removeEventListener(`visibilitychange`,a),window.clearTimeout(e)}},[l]),{home:n,loading:i,loadError:o,setLoadError:s,load:l}}var $=r(),ye=12e3;function be(e){let t=(0,Z.c)(107),{variant:n,inputId:r,inputRef:i,intent:a,labels:o,attachments:s,isDragging:c,attachmentBusy:l,attachmentsFull:u,voice:d,chat:f,cancelAction:p,onIntentChange:m,onPickFiles:h,onRemoveAttachment:g,onPaste:_,onDragOver:v,onDragLeave:y,onDrop:b,onSubmit:x}=e,C=n===`inline`,w;t[0]!==s||t[1]!==a?(w=!!a.trim()||s.length>0,t[0]=s,t[1]=a,t[2]=w):w=t[2];let T=w,E=d.voiceActive&&d.phase!==`error`,D;t[3]!==x||t[4]!==d.voiceActive?(D=e=>{if(d.voiceActive){e.preventDefault();return}x(e)},t[3]=x,t[4]=d.voiceActive,t[5]=D):D=t[5];let O=C?`mx-auto mt-6 w-full overflow-hidden rounded-xl border border-edge bg-surface-base p-2 text-left shadow-surface transition-colors focus-within:border-accent focus-within:ring-2 focus-within:ring-accent/15 sm:mt-8`:`flex min-h-0 flex-1 flex-col`,k;t[6]===O?k=t[7]:(k=N(`relative`,O),t[6]=O,t[7]=k);let j;t[8]!==C||t[9]!==c||t[10]!==o.dropFiles?(j=c?(0,$.jsx)(`div`,{className:N(`pointer-events-none absolute inset-0 z-10 flex items-center justify-center bg-accent-soft/90 text-sm font-medium text-accent-fg backdrop-blur-[1px]`,C&&`rounded-2xl`),children:o.dropFiles}):null,t[8]=C,t[9]=c,t[10]=o.dropFiles,t[11]=j):j=t[11];let M=!C&&`flex min-h-0 flex-1 flex-col overflow-y-auto px-5 py-4`,P;t[12]===M?P=t[13]:(P=N(M),t[12]=M,t[13]=P);let ee=C?`sr-only`:`mb-2 shrink-0 text-sm font-medium text-fg`,F;t[14]!==r||t[15]!==o.intentLabel||t[16]!==ee?(F=(0,$.jsx)(`label`,{htmlFor:r,className:ee,children:o.intentLabel}),t[14]=r,t[15]=o.intentLabel,t[16]=ee,t[17]=F):F=t[17];let I;t[18]!==l||t[19]!==f||t[20]!==d.audioLevel||t[21]!==d.cancelVoiceInput||t[22]!==d.confirmVoiceInput||t[23]!==d.elapsedLabel||t[24]!==d.error||t[25]!==d.finalTranscript||t[26]!==d.partialTranscript||t[27]!==d.phase||t[28]!==d.recordedDictation||t[29]!==d.retryVoiceInput||t[30]!==d.settingsRequired||t[31]!==d.voiceActive?(I=d.voiceActive?(0,$.jsx)(oe,{phase:d.phase,elapsedLabel:d.elapsedLabel,recordedDictation:d.recordedDictation,audioLevel:d.audioLevel,partialTranscript:d.partialTranscript,finalTranscript:d.finalTranscript,error:d.error,settingsRequired:d.settingsRequired,disabled:l,chat:f,onCancel:d.cancelVoiceInput,onConfirm:d.confirmVoiceInput,onRetry:d.retryVoiceInput}):null,t[18]=l,t[19]=f,t[20]=d.audioLevel,t[21]=d.cancelVoiceInput,t[22]=d.confirmVoiceInput,t[23]=d.elapsedLabel,t[24]=d.error,t[25]=d.finalTranscript,t[26]=d.partialTranscript,t[27]=d.phase,t[28]=d.recordedDictation,t[29]=d.retryVoiceInput,t[30]=d.settingsRequired,t[31]=d.voiceActive,t[32]=I):I=t[32];let te=E&&`hidden`,ne=C?`min-h-24 bg-transparent px-3 py-2`:`min-h-32 flex-1 rounded-xl border border-edge bg-surface-base p-3 focus:border-accent focus:ring-2 focus:ring-accent/20`,L;t[33]!==te||t[34]!==ne?(L=N(`w-full resize-none text-sm font-normal leading-6 text-fg outline-none placeholder:text-fg-subtle`,te,ne),t[33]=te,t[34]=ne,t[35]=L):L=t[35];let R;t[36]===m?R=t[37]:(R=e=>m(e.target.value),t[36]=m,t[37]=R);let z=!C,V;t[38]!==r||t[39]!==i||t[40]!==a||t[41]!==o.intentPlaceholder||t[42]!==o.intentSuggestion||t[43]!==m||t[44]!==_||t[45]!==L||t[46]!==R||t[47]!==z?(V=(0,$.jsx)(_e,{ref:i,id:r,className:L,value:a,onChange:R,onPaste:_,suggestion:o.intentSuggestion,onAcceptSuggestion:m,onKeyDown:xe,placeholder:o.intentPlaceholder,maxLength:ye,autoFocus:z}),t[38]=r,t[39]=i,t[40]=a,t[41]=o.intentPlaceholder,t[42]=o.intentSuggestion,t[43]=m,t[44]=_,t[45]=L,t[46]=R,t[47]=z,t[48]=V):V=t[48];let H=C?`border-b-0 bg-transparent px-3 pb-2 pt-0`:`mt-3 border-b-0 bg-transparent px-0 pb-0`,U;t[49]!==s||t[50]!==g||t[51]!==H?(U=(0,$.jsx)(S,{attachments:s,topPadded:!1,onRemove:g,className:H}),t[49]=s,t[50]=g,t[51]=H,t[52]=U):U=t[52];let W;t[53]!==C||t[54]!==a.length||t[55]!==o.shortcut?(W=C?null:(0,$.jsxs)(`div`,{className:`mt-2 flex shrink-0 items-center justify-between gap-3 text-[11px] text-fg-subtle`,children:[(0,$.jsx)(`span`,{children:o.shortcut}),(0,$.jsxs)(`span`,{className:`tabular-nums`,children:[a.length.toLocaleString(),` / `,ye.toLocaleString()]})]}),t[53]=C,t[54]=a.length,t[55]=o.shortcut,t[56]=W):W=t[56];let G;t[57]!==I||t[58]!==V||t[59]!==U||t[60]!==W||t[61]!==P||t[62]!==F?(G=(0,$.jsxs)(`div`,{className:P,children:[F,I,V,U,W]}),t[57]=I,t[58]=V,t[59]=U,t[60]=W,t[61]=P,t[62]=F,t[63]=G):G=t[63];let re=C?`border-edge-subtle px-1 pt-2`:`border-edge px-5 py-4`,ie;t[64]===re?ie=t[65]:(ie=N(`flex shrink-0 items-center gap-2 border-t`,re),t[64]=re,t[65]=ie);let ae=!C&&`mr-auto`,se;t[66]===ae?se=t[67]:(se=N(`flex items-center gap-1`,ae),t[66]=ae,t[67]=se);let ce=l||u,le;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,$.jsx)(pe,{className:`size-4`,"aria-hidden":!0}),t[68]=le):le=t[68];let ue;t[69]!==o.attachTitle||t[70]!==h||t[71]!==ce?(ue=(0,$.jsx)(B,{type:`button`,variant:`ghost`,className:`size-9 rounded-lg p-0`,disabled:ce,title:o.attachTitle,"aria-label":o.attachTitle,onClick:h,children:le}),t[69]=o.attachTitle,t[70]=h,t[71]=ce,t[72]=ue):ue=t[72];let de;t[73]!==l||t[74]!==f||t[75]!==d.startVoiceInput||t[76]!==d.voiceActive?(de=d.voiceActive?null:(0,$.jsx)(me,{disabled:l,chat:f,onStart:d.startVoiceInput}),t[73]=l,t[74]=f,t[75]=d.startVoiceInput,t[76]=d.voiceActive,t[77]=de):de=t[77];let fe;t[78]!==se||t[79]!==ue||t[80]!==de?(fe=(0,$.jsxs)(`div`,{className:se,children:[ue,de]}),t[78]=se,t[79]=ue,t[80]=de,t[81]=fe):fe=t[81];let K;t[82]!==p||t[83]!==C||t[84]!==o.shortcut?(K=C?(0,$.jsx)(`span`,{className:`hidden text-[11px] text-fg-subtle sm:inline`,children:o.shortcut}):p,t[82]=p,t[83]=C,t[84]=o.shortcut,t[85]=K):K=t[85];let q=C?`ml-auto h-9 rounded-lg px-3.5 text-xs`:`min-w-32`,he=!T||l||d.voiceActive,J=C?`size-3.5`:`size-4`,ge;t[86]===J?ge=t[87]:(ge=(0,$.jsx)(A,{className:J,"aria-hidden":!0}),t[86]=J,t[87]=ge);let Y;t[88]!==o.submit||t[89]!==q||t[90]!==he||t[91]!==ge?(Y=(0,$.jsxs)(B,{type:`submit`,variant:`primary`,className:q,disabled:he,children:[ge,o.submit]}),t[88]=o.submit,t[89]=q,t[90]=he,t[91]=ge,t[92]=Y):Y=t[92];let X;t[93]!==ie||t[94]!==fe||t[95]!==K||t[96]!==Y?(X=(0,$.jsxs)(`div`,{className:ie,children:[fe,K,Y]}),t[93]=ie,t[94]=fe,t[95]=K,t[96]=Y,t[97]=X):X=t[97];let Q;return t[98]!==y||t[99]!==v||t[100]!==b||t[101]!==D||t[102]!==G||t[103]!==X||t[104]!==k||t[105]!==j?(Q=(0,$.jsxs)(`form`,{onSubmit:D,onDragOver:v,onDragLeave:y,onDrop:b,className:k,children:[j,G,X]}),t[98]=y,t[99]=v,t[100]=b,t[101]=D,t[102]=G,t[103]=X,t[104]=k,t[105]=j,t[106]=Q):Q=t[106],Q}function xe(e){e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())}function Se(e){let t=(0,Z.c)(4),{label:n,onClick:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(J,{className:`size-3.5`,"aria-hidden":!0}),t[0]=i):i=t[0];let a;return t[1]!==n||t[2]!==r?(a=(0,$.jsxs)(`button`,{type:`button`,className:`inline-flex min-h-9 items-center gap-1.5 rounded-lg px-2 text-xs font-medium text-fg-muted transition-colors duration-150 hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,onClick:r,children:[i,n]}),t[1]=n,t[2]=r,t[3]=a):a=t[3],a}function Ce(e){let t=(0,Z.c)(69),{opportunity:n,copy:r,onOpenHistory:i}=e,a,o,s,c,l,d;if(t[0]!==r.aiLabel||t[1]!==r.automationAction||t[2]!==r.automationHint||t[3]!==r.history||t[4]!==r.minutes||t[5]!==r.needsSetup||t[6]!==r.sceneAction||t[7]!==r.sceneHint||t[8]!==r.why||t[9]!==i||t[10]!==n.capabilities||t[11]!==n.continuation||t[12]!==n.estimatedMinutes||t[13]!==n.outcome||t[14]!==n.rationale||t[15]!==n.title){let e=n.capabilities.filter(Te),f;t[22]===r.aiLabel?f=t[23]:(f=(0,$.jsx)(`span`,{children:r.aiLabel}),t[22]=r.aiLabel,t[23]=f);let p;t[24]!==r.minutes||t[25]!==n.estimatedMinutes?(p=n.estimatedMinutes?(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,$.jsx)(u,{className:`size-3.5`,"aria-hidden":!0}),n.estimatedMinutes,` `,r.minutes]}):null,t[24]=r.minutes,t[25]=n.estimatedMinutes,t[26]=p):p=t[26];let m;t[27]!==f||t[28]!==p?(m=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-fg-subtle`,children:[f,p]}),t[27]=f,t[28]=p,t[29]=m):m=t[29];let h;t[30]!==r.history||t[31]!==i?(h=(0,$.jsx)(Se,{label:r.history,onClick:i}),t[30]=r.history,t[31]=i,t[32]=h):h=t[32],t[33]!==h||t[34]!==m?(a=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[m,h]}),t[33]=h,t[34]=m,t[35]=a):a=t[35],t[36]===n.title?o=t[37]:(o=(0,$.jsx)(`h3`,{className:`mt-3 text-xl font-semibold leading-7 tracking-tight text-fg`,children:n.title}),t[36]=n.title,t[37]=o),t[38]===n.outcome?s=t[39]:(s=(0,$.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-fg-muted`,children:n.outcome}),t[38]=n.outcome,t[39]=s);let g;t[40]===r.why?g=t[41]:(g=(0,$.jsxs)(`span`,{className:`font-medium text-fg`,children:[r.why,`:`]}),t[40]=r.why,t[41]=g),t[42]!==n.rationale||t[43]!==g?(c=(0,$.jsxs)(`p`,{className:`mt-4 text-sm leading-6 text-fg-muted`,children:[g,n.rationale]}),t[42]=n.rationale,t[43]=g,t[44]=c):c=t[44],t[45]!==r.automationAction||t[46]!==r.automationHint||t[47]!==r.sceneAction||t[48]!==r.sceneHint||t[49]!==n.continuation?(l=n.continuation?(0,$.jsxs)(`div`,{className:`mt-4 flex flex-col gap-3 rounded-xl border border-edge bg-surface-subtle p-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,$.jsx)(`p`,{className:`text-xs leading-5 text-fg-muted`,children:n.continuation.kind===`automation`?r.automationHint:r.sceneHint}),(0,$.jsx)(`a`,{href:`#${n.continuation.href}`,className:`inline-flex min-h-11 shrink-0 items-center rounded-lg px-3 text-xs font-medium text-accent hover:bg-accent-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:n.continuation.kind===`automation`?r.automationAction:r.sceneAction})]}):null,t[45]=r.automationAction,t[46]=r.automationHint,t[47]=r.sceneAction,t[48]=r.sceneHint,t[49]=n.continuation,t[50]=l):l=t[50],d=e.length>0?(0,$.jsx)(`div`,{className:`mt-4 flex flex-wrap gap-2`,"aria-label":r.needsSetup,children:e.map(e=>(0,$.jsxs)(`a`,{href:`#${e.recoveryPath??`/settings`}`,className:`rounded-full border border-accent/25 bg-accent-soft px-2.5 py-1 text-xs text-accent hover:border-accent/50`,children:[r.needsSetup,` · `,e.capability]},`${e.kind}:${e.capability}`))}):null,t[0]=r.aiLabel,t[1]=r.automationAction,t[2]=r.automationHint,t[3]=r.history,t[4]=r.minutes,t[5]=r.needsSetup,t[6]=r.sceneAction,t[7]=r.sceneHint,t[8]=r.why,t[9]=i,t[10]=n.capabilities,t[11]=n.continuation,t[12]=n.estimatedMinutes,t[13]=n.outcome,t[14]=n.rationale,t[15]=n.title,t[16]=a,t[17]=o,t[18]=s,t[19]=c,t[20]=l,t[21]=d}else a=t[16],o=t[17],s=t[18],c=t[19],l=t[20],d=t[21];let f;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(K,{className:`size-3.5 transition-transform group-open:rotate-180`,"aria-hidden":!0}),t[51]=f):f=t[51];let p;t[52]===r.evidence?p=t[53]:(p=(0,$.jsxs)(`summary`,{className:`flex min-h-9 cursor-pointer list-none items-center gap-1.5 text-xs font-medium text-fg-muted hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[r.evidence,f]}),t[52]=r.evidence,t[53]=p);let m;t[54]===n.evidence?m=t[55]:(m=n.evidence.map(we),t[54]=n.evidence,t[55]=m);let h;t[56]===m?h=t[57]:(h=(0,$.jsx)(`ul`,{className:`mt-2 space-y-2 border-l border-edge pl-3 text-xs leading-5 text-fg-muted`,children:m}),t[56]=m,t[57]=h);let g;t[58]!==h||t[59]!==p?(g=(0,$.jsxs)(`details`,{className:`mt-4 group`,children:[p,h]}),t[58]=h,t[59]=p,t[60]=g):g=t[60];let _;return t[61]!==a||t[62]!==g||t[63]!==o||t[64]!==s||t[65]!==c||t[66]!==l||t[67]!==d?(_=(0,$.jsxs)($.Fragment,{children:[a,o,s,c,l,d,g]}),t[61]=a,t[62]=g,t[63]=o,t[64]=s,t[65]=c,t[66]=l,t[67]=d,t[68]=_):_=t[68],_}function we(e){return(0,$.jsx)(`li`,{children:e.href?(0,$.jsx)(`a`,{href:`#${e.href}`,className:`hover:text-accent hover:underline`,children:e.observation}):e.observation},e.id)}function Te(e){return e.readiness!==`ready`}function Ee(e){let t=(0,Z.c)(130),{advisor:n,copy:r,busy:i,onRefresh:a,onAction:o,onFeedback:s,onClarification:c,onOpenHistory:u,preflight:d,receipt:f}=e,[p,m]=(0,Q.useState)(),h;t[0]!==n.alternatives||t[1]!==n.primary||t[2]!==n.state?(h=n.state===`ready`?[n.primary,...n.alternatives]:[],t[0]=n.alternatives,t[1]=n.primary,t[2]=n.state,t[3]=h):h=t[3];let g=h,_;t[4]!==g||t[5]!==p?(_=g.find(e=>e.id===p)??g[0],t[4]=g,t[5]=p,t[6]=_):_=t[6];let v=_,y;t[7]===g[0]?.id?y=t[8]:(y=()=>m(g[0]?.id),t[7]=g[0]?.id,t[8]=y);let b=g[0]?.id,x;if(t[9]!==n.state||t[10]!==b?(x=[n.state,b],t[9]=n.state,t[10]=b,t[11]=x):x=t[11],(0,Q.useEffect)(y,x),n.state===`disabled`)return null;if(f){let e;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(l,{className:`size-5 shrink-0 text-success`,"aria-hidden":!0}),t[12]=e):e=t[12];let n;t[13]===f.title?n=t[14]:(n=(0,$.jsx)(`p`,{className:`text-sm font-semibold text-fg`,children:f.title}),t[13]=f.title,t[14]=n);let i;t[15]===f.detail?i=t[16]:(i=(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:f.detail}),t[15]=f.detail,t[16]=i);let a;t[17]!==n||t[18]!==i?(a=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[n,i]}),t[17]=n,t[18]=i,t[19]=a):a=t[19];let o;t[20]!==r.history||t[21]!==u?(o=(0,$.jsx)(Se,{label:r.history,onClick:u}),t[20]=r.history,t[21]=u,t[22]=o):o=t[22];let s=`#${f.href}`,c;t[23]!==r.viewProgress||t[24]!==s?(c=(0,$.jsx)(B,{asChild:!0,variant:`secondary`,className:`min-h-10 text-xs`,children:(0,$.jsx)(`a`,{href:s,children:r.viewProgress})}),t[23]=r.viewProgress,t[24]=s,t[25]=c):c=t[25];let d;t[26]!==o||t[27]!==c?(d=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[o,c]}),t[26]=o,t[27]=c,t[28]=d):d=t[28];let p;return t[29]!==d||t[30]!==a?(p=(0,$.jsx)(`section`,{className:`mt-7 rounded-2xl border border-success/25 bg-success-soft px-5 py-4`,role:`status`,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center`,children:[e,a,d]})}),t[29]=d,t[30]=a,t[31]=p):p=t[31],p}if(n.state===`quiet`||n.state===`refreshing`)return null;if(n.state===`clarification`){let e;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(A,{className:`size-4`,"aria-hidden":!0}),t[32]=e):e=t[32];let i;t[33]===r.aiLabel?i=t[34]:(i=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-medium text-accent`,children:[e,r.aiLabel]}),t[33]=r.aiLabel,t[34]=i);let a;t[35]!==r.history||t[36]!==u?(a=(0,$.jsx)(Se,{label:r.history,onClick:u}),t[35]=r.history,t[36]=u,t[37]=a):a=t[37];let o;t[38]!==i||t[39]!==a?(o=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[i,a]}),t[38]=i,t[39]=a,t[40]=o):o=t[40];let s;t[41]===n.question.question?s=t[42]:(s=(0,$.jsx)(`h3`,{id:`home-advisor-question`,className:`mt-3 text-lg font-semibold text-fg`,children:n.question.question}),t[41]=n.question.question,t[42]=s);let l;if(t[43]!==n.question.options||t[44]!==n.question.question||t[45]!==c){let e;t[47]!==n.question.question||t[48]!==c?(e=e=>(0,$.jsx)(B,{type:`button`,variant:`secondary`,className:`min-h-11`,onClick:()=>c(n.question.question,e.label),children:e.label},e.id),t[47]=n.question.question,t[48]=c,t[49]=e):e=t[49],l=n.question.options.map(e),t[43]=n.question.options,t[44]=n.question.question,t[45]=c,t[46]=l}else l=t[46];let d;t[50]===l?d=t[51]:(d=(0,$.jsx)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:l}),t[50]=l,t[51]=d);let f;return t[52]!==s||t[53]!==d||t[54]!==o?(f=(0,$.jsxs)(`section`,{className:`mt-7 rounded-2xl border border-accent/25 bg-surface-base px-5 py-5`,"aria-labelledby":`home-advisor-question`,children:[o,s,d]}),t[52]=s,t[53]=d,t[54]=o,t[55]=f):f=t[55],f}if(!v)return null;let S=d?.opportunityId===v.id?d.value:void 0,C;t[56]!==n.stale||t[57]!==r.refreshing?(C=n.stale?(0,$.jsxs)(`p`,{className:`mb-3 inline-flex items-center gap-2 text-xs text-accent`,children:[(0,$.jsx)(q,{className:`size-3.5 animate-spin`,"aria-hidden":!0}),r.refreshing]}):null,t[56]=n.stale,t[57]=r.refreshing,t[58]=C):C=t[58];let w;t[59]!==r||t[60]!==u||t[61]!==v?(w=(0,$.jsx)(Ce,{opportunity:v,copy:r,onOpenHistory:u}),t[59]=r,t[60]=u,t[61]=v,t[62]=w):w=t[62];let T;t[63]!==i||t[64]!==r.configure||t[65]!==r.degradedStart||t[66]!==r.setupHint||t[67]!==r.setupTitle||t[68]!==o||t[69]!==v||t[70]!==S?(T=S?.state===`needs_setup`?(0,$.jsx)(`div`,{className:`mt-5 rounded-xl border border-accent/25 bg-accent-soft/40 p-4`,role:`alert`,"aria-live":`polite`,children:(0,$.jsxs)(`div`,{className:`flex gap-3`,children:[(0,$.jsx)(k,{className:`mt-0.5 size-4 shrink-0 text-accent`,"aria-hidden":!0}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`p`,{className:`text-sm font-semibold text-fg`,children:r.setupTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:r.setupHint}),(0,$.jsx)(`ul`,{className:`mt-2 space-y-1 text-xs leading-5 text-fg-muted`,children:S.blockers.map(De)}),(0,$.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[S.recoveryActions.map(e=>(0,$.jsxs)(`a`,{href:`#${e.href}`,className:`inline-flex min-h-11 items-center rounded-lg border border-accent/30 px-3 text-xs font-medium text-accent hover:bg-accent-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[r.configure,` · `,e.capability]},e.capability)),S.degradedAction?(0,$.jsx)(B,{type:`button`,variant:`secondary`,className:`min-h-11`,disabled:i,onClick:()=>o(v,`degraded_start`),children:r.degradedStart}):null]})]})]})}):null,t[63]=i,t[64]=r.configure,t[65]=r.degradedStart,t[66]=r.setupHint,t[67]=r.setupTitle,t[68]=o,t[69]=v,t[70]=S,t[71]=T):T=t[71];let E;t[72]!==i||t[73]!==r.start||t[74]!==o||t[75]!==v?(E=v.actions.canStart?(0,$.jsxs)(B,{type:`button`,variant:`primary`,className:`min-h-11`,disabled:i,onClick:()=>o(v,`start`),children:[(0,$.jsx)(A,{className:`size-4`,"aria-hidden":!0}),r.start]}):null,t[72]=i,t[73]=r.start,t[74]=o,t[75]=v,t[76]=E):E=t[76];let D;t[77]!==i||t[78]!==r.discuss||t[79]!==o||t[80]!==v?(D=v.actions.canDiscuss?(0,$.jsxs)(B,{type:`button`,variant:`secondary`,className:`min-h-11`,disabled:i,onClick:()=>o(v,`discuss`),children:[(0,$.jsx)(de,{className:`size-4`,"aria-hidden":!0}),r.discuss]}):null,t[77]=i,t[78]=r.discuss,t[79]=o,t[80]=v,t[81]=D):D=t[81];let O;t[82]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(q,{className:`size-4`,"aria-hidden":!0}),t[82]=O):O=t[82];let j;t[83]!==i||t[84]!==r.refresh||t[85]!==a?(j=(0,$.jsxs)(B,{type:`button`,variant:`ghost`,className:`min-h-11`,disabled:i,onClick:a,title:r.refresh,children:[O,r.refresh]}),t[83]=i,t[84]=r.refresh,t[85]=a,t[86]=j):j=t[86];let M;t[87]===r.feedback?M=t[88]:(M=(0,$.jsx)(`summary`,{className:`flex min-h-11 cursor-pointer list-none items-center rounded-lg px-3 text-xs text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:r.feedback}),t[87]=r.feedback,t[88]=M);let N;t[89]===r.alreadyDone?N=t[90]:(N=[`already_done`,r.alreadyDone],t[89]=r.alreadyDone,t[90]=N);let P;t[91]===r.irrelevant?P=t[92]:(P=[`irrelevant`,r.irrelevant],t[91]=r.irrelevant,t[92]=P);let ee;t[93]===r.later?ee=t[94]:(ee=[`too_early`,r.later],t[93]=r.later,t[94]=ee);let F;t[95]===r.sourceIncorrect?F=t[96]:(F=[`source_incorrect`,r.sourceIncorrect],t[95]=r.sourceIncorrect,t[96]=F);let I;t[97]===r.lessLikeThis?I=t[98]:(I=[`less_like_this`,r.lessLikeThis],t[97]=r.lessLikeThis,t[98]=I);let te;t[99]!==N||t[100]!==P||t[101]!==ee||t[102]!==F||t[103]!==I?(te=[N,P,ee,F,I],t[99]=N,t[100]=P,t[101]=ee,t[102]=F,t[103]=I,t[104]=te):te=t[104];let ne=te,L;t[105]!==s||t[106]!==v||t[107]!==ne?(L=(0,$.jsx)(`div`,{className:`absolute right-0 z-20 mt-1 w-44 rounded-xl border border-edge bg-surface-overlay p-1 shadow-float`,children:ne.map(e=>{let[t,n]=e;return(0,$.jsx)(`button`,{type:`button`,className:`min-h-10 w-full rounded-lg px-3 text-left text-sm text-fg-muted hover:bg-surface-hover hover:text-fg`,onClick:()=>s(v,t),children:n},t)})}),t[105]=s,t[106]=v,t[107]=ne,t[108]=L):L=t[108];let R;t[109]!==M||t[110]!==L?(R=(0,$.jsxs)(`details`,{className:`relative ml-auto`,children:[M,L]}),t[109]=M,t[110]=L,t[111]=R):R=t[111];let z;t[112]!==D||t[113]!==j||t[114]!==R||t[115]!==E?(z=(0,$.jsxs)(`div`,{className:`mt-5 flex flex-wrap items-center gap-2`,children:[E,D,j,R]}),t[112]=D,t[113]=j,t[114]=R,t[115]=E,t[116]=z):z=t[116];let V;t[117]!==z||t[118]!==C||t[119]!==w||t[120]!==T?(V=(0,$.jsxs)(`div`,{className:`px-5 py-5 sm:px-6`,children:[C,w,T,z]}),t[117]=z,t[118]=C,t[119]=w,t[120]=T,t[121]=V):V=t[121];let H;t[122]!==r.alternatives||t[123]!==g||t[124]!==v.id?(H=g.length>1?(0,$.jsxs)(`div`,{className:`border-t border-edge-subtle px-5 py-4 sm:px-6`,children:[(0,$.jsx)(`p`,{className:`text-xs font-medium text-fg-subtle`,children:r.alternatives}),(0,$.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:g.filter(e=>e.id!==v.id).map(e=>(0,$.jsx)(`button`,{type:`button`,className:`min-h-10 rounded-lg border border-edge px-3 text-left text-sm text-fg-muted hover:bg-surface-hover hover:text-fg`,onClick:()=>m(e.id),children:e.title},e.id))})]}):null,t[122]=r.alternatives,t[123]=g,t[124]=v.id,t[125]=H):H=t[125];let U;return t[126]!==r.aiLabel||t[127]!==V||t[128]!==H?(U=(0,$.jsxs)(`section`,{className:`mt-7 rounded-2xl border border-accent/25 bg-surface-base`,"aria-label":r.aiLabel,children:[V,H]}),t[126]=r.aiLabel,t[127]=V,t[128]=H,t[129]=U):U=t[129],U}function De(e){return(0,$.jsx)(`li`,{children:e.message},`${e.kind}:${e.capability}`)}var Oe=new Set([`started`,`discussing`,`completed`]);function ke(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(`div`,{className:`space-y-4`,"aria-busy":!0,children:[0,1,2].map(Ae)}),e[0]=t):t=e[0],t}function Ae(e){return(0,$.jsxs)(`div`,{className:`space-y-2 rounded-xl border border-edge-subtle p-4`,children:[(0,$.jsx)(G,{className:`h-4 w-24 rounded`}),(0,$.jsx)(G,{className:`h-5 w-4/5 rounded`}),(0,$.jsx)(G,{className:`h-4 w-3/5 rounded`})]},e)}function je(e){let t=(0,Z.c)(11),{open:n,refreshKey:r,onOpenChange:i,onReevaluate:a}=e,s=P(Ne),c=M(s).projectsPage.home,l=o(),[f,p]=(0,Q.useState)(`all`),m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m=[],t[0]=m):m=t[0];let[h,g]=(0,Q.useState)(m),[_,v]=(0,Q.useState)(!1),[y,b]=(0,Q.useState)(),x;t[1]===n?x=t[2]:(x=()=>{if(!n)return;let e=!0;return v(!0),b(void 0),E().then(t=>{e&&g(t.items)}).catch(t=>{e&&b(t instanceof Error?t.message:String(t))}).finally(()=>{e&&v(!1)}),()=>{e=!1}},t[1]=n,t[2]=x);let S;t[3]!==n||t[4]!==r?(S=[n,r],t[3]=n,t[4]=r,t[5]=S):S=t[5],(0,Q.useEffect)(x,S);let C=h.filter(e=>f===`all`||(f===`adopted`?Oe.has(e.status):!Oe.has(e.status))),w=new Intl.DateTimeFormat(s===`zh`?`zh-CN`:`en`,{dateStyle:`medium`}),T=new Intl.DateTimeFormat(s===`zh`?`zh-CN`:`en`,{dateStyle:`medium`,timeStyle:`short`}),O=new Map;for(let e of C){let t=w.format(new Date(e.updatedAt));O.set(t,[...O.get(t)??[],e])}let k=[...O.entries()],A=e=>e.feedbackKind===`already_done`?c.advisorHistoryStatusCompleted:e.feedbackKind===`irrelevant`?c.advisorHistoryStatusIrrelevant:e.feedbackKind===`source_incorrect`?c.advisorHistoryStatusSourceIncorrect:e.feedbackKind===`less_like_this`?c.advisorHistoryStatusLessLikeThis:{available:c.advisorHistoryStatusAvailable,started:c.advisorHistoryStatusStarted,discussing:c.advisorHistoryStatusDiscussing,completed:c.advisorHistoryStatusCompleted,snoozed:c.advisorHistoryStatusSnoozed,dismissed:c.advisorHistoryStatusDismissed,expired:c.advisorHistoryStatusExpired,superseded:c.advisorHistoryStatusSuperseded}[e.status],N=e=>{if(e.href){i(!1),l(D(`/`,e.href));return}e.status===`discussing`&&(i(!1),l(`/chat/new?${new URLSearchParams({draft:e.opportunity.actionPrompt}).toString()}`))},z;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsx)(ee,{className:`xopc-dialog-overlay fixed inset-0 z-[80] bg-scrim`}),t[6]=z):z=t[6];let V;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(J,{className:`mt-0.5 size-5 shrink-0 text-accent`,"aria-hidden":!0}),t[7]=V):V=t[7];let H;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,$.jsx)(j,{className:`size-4`,"aria-hidden":!0}),t[8]=H):H=t[8];let U=_?(0,$.jsx)(ke,{}):y?(0,$.jsxs)(`div`,{className:`rounded-xl border border-danger/25 bg-danger-soft p-4 text-sm text-danger`,children:[(0,$.jsx)(`p`,{children:c.advisorHistoryLoadFailed}),(0,$.jsx)(B,{type:`button`,variant:`ghost`,className:`mt-2`,onClick:()=>i(!1),children:c.advisorHistoryClose})]}):k.length===0?(0,$.jsxs)(`div`,{className:`py-16 text-center`,children:[(0,$.jsx)(J,{className:`mx-auto size-6 text-fg-subtle`,"aria-hidden":!0}),(0,$.jsx)(`p`,{className:`mt-3 text-sm font-medium text-fg`,children:c.advisorHistoryEmpty}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:c.advisorHistoryEmptyHint})]}):(0,$.jsx)(`div`,{className:`space-y-6`,children:k.map(e=>{let[t,n]=e;return(0,$.jsxs)(`section`,{"aria-label":t,children:[(0,$.jsx)(`h3`,{className:`mb-2 text-xs font-medium text-fg-subtle`,children:t}),(0,$.jsx)(`div`,{className:`space-y-2`,children:n.map(e=>{let t=!!e.href||e.status===`discussing`,n=[`snoozed`,`dismissed`,`expired`,`superseded`].includes(e.status);return(0,$.jsxs)(`article`,{className:`rounded-xl border border-edge-subtle bg-surface-base p-4`,children:[(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`p`,{className:`text-xs font-medium text-accent`,children:A(e)}),(0,$.jsx)(`h4`,{className:`mt-1.5 text-sm font-semibold leading-5 text-fg`,children:e.opportunity.title}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:e.opportunity.outcome})]}),(0,$.jsx)(`time`,{className:`shrink-0 text-[11px] text-fg-subtle`,dateTime:new Date(e.updatedAt).toISOString(),children:T.format(new Date(e.updatedAt))})]}),e.snoozedUntil?(0,$.jsxs)(`p`,{className:`mt-2 inline-flex items-center gap-1 text-xs text-fg-muted`,children:[(0,$.jsx)(u,{className:`size-3.5`,"aria-hidden":!0}),c.advisorHistoryReturnsAt,` `,T.format(new Date(e.snoozedUntil))]}):null,(0,$.jsxs)(`details`,{className:`group mt-3`,children:[(0,$.jsxs)(`summary`,{className:`flex min-h-8 cursor-pointer list-none items-center gap-1 text-xs font-medium text-fg-muted hover:text-fg`,children:[c.advisorHistoryEvidence,(0,$.jsx)(K,{className:`size-3.5 transition-transform duration-200 group-open:rotate-180 motion-reduce:transition-none`,"aria-hidden":!0})]}),(0,$.jsx)(`ul`,{className:`mt-2 space-y-1.5 border-l border-edge pl-3 text-xs leading-5 text-fg-muted`,children:e.opportunity.evidence.map(Me)})]}),t||n?(0,$.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[t?(0,$.jsxs)(B,{type:`button`,variant:`secondary`,className:`min-h-9 text-xs`,onClick:()=>N(e),children:[(0,$.jsx)(d,{className:`size-3.5`,"aria-hidden":!0}),e.status===`discussing`?c.advisorHistoryContinueDiscussion:c.advisorHistoryViewProgress]}):null,n?(0,$.jsxs)(B,{type:`button`,variant:`ghost`,className:`min-h-9 text-xs`,onClick:()=>{i(!1),a()},children:[(0,$.jsx)(q,{className:`size-3.5`,"aria-hidden":!0}),c.advisorHistoryReevaluate]}):null]}):null]},e.opportunity.id)})})]},t)})}),W;return t[9]===U?W=t[10]:(W=(0,$.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-5 py-4`,children:U}),t[9]=U,t[10]=W),(0,$.jsx)(R,{open:n,onOpenChange:i,children:(0,$.jsxs)(te,{children:[z,(0,$.jsxs)(ne,{className:`xopc-drawer-right fixed right-0 top-0 z-[90] flex size-full max-w-lg flex-col overflow-hidden border-l border-edge bg-surface-overlay shadow-popover outline-none`,"aria-describedby":`home-advisor-history-description`,children:[(0,$.jsxs)(`div`,{className:`flex shrink-0 items-start gap-3 border-b border-edge px-5 py-4`,children:[V,(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(L,{className:`text-base font-semibold text-fg`,children:c.advisorHistoryTitle}),(0,$.jsx)(F,{id:`home-advisor-history-description`,className:`mt-1 text-xs leading-5 text-fg-muted`,children:c.advisorHistoryDescription})]}),(0,$.jsx)(I,{asChild:!0,children:(0,$.jsx)(B,{type:`button`,variant:`ghost`,className:`-mr-2 size-9 shrink-0 p-0`,"aria-label":c.advisorHistoryClose,children:H})})]}),(0,$.jsx)(`div`,{className:`shrink-0 border-b border-edge-subtle px-5 py-3`,children:(0,$.jsx)(`div`,{className:`inline-flex rounded-lg bg-surface-inset p-1`,role:`group`,"aria-label":c.advisorHistoryFilterLabel,children:[[`all`,c.advisorHistoryFilterAll],[`adopted`,c.advisorHistoryFilterAdopted],[`other`,c.advisorHistoryFilterOther]].map(e=>{let[t,n]=e;return(0,$.jsx)(`button`,{type:`button`,className:`min-h-9 rounded-md px-3 text-xs font-medium transition-colors duration-150 ${f===t?`bg-surface-panel text-fg shadow-surface`:`text-fg-muted hover:text-fg`}`,"aria-pressed":f===t,onClick:()=>p(t),children:n},t)})})}),W]})]})})}function Me(e){return(0,$.jsx)(`li`,{children:e.observation},e.id)}function Ne(e){return e.language}function Pe(e,t){return e.replace(`{{count}}`,String(t))}function Fe(e,t){if(e.state===`disabled`)return null;if(e.state===`ready`){let n=1+e.alternatives.length;return{label:Pe(t.ready,n),detail:e.primary.title,tone:`accent`,refreshing:!!e.stale}}return e.state===`clarification`?{label:t.clarification,detail:e.question.question,tone:`accent`,refreshing:!1}:e.state===`refreshing`?{label:t.refreshing,detail:e.previous?.title??t.refreshingDetail,tone:`accent`,refreshing:!0}:e.reason===`generation_failed`?{label:t.generationFailed,detail:t.generationFailedDetail,tone:`danger`,refreshing:!1}:e.reason===`budget_exhausted`?{label:t.budgetExhausted,detail:t.budgetExhaustedDetail,tone:`warning`,refreshing:!1}:e.reason===`model_unavailable`?{label:t.modelUnavailable,detail:t.modelUnavailableDetail,tone:`warning`,refreshing:!1}:{label:t.idle,detail:t.idleDetail,tone:`neutral`,refreshing:!1}}var Ie={accent:`bg-accent`,danger:`bg-danger`,neutral:`bg-fg-subtle`,warning:`bg-warning`};function Le(e){let t=(0,Z.c)(50),{advisor:n,busy:r,copy:i,onOpenHistory:a,onRefresh:o}=e,[s,c]=(0,Q.useState)(!1),l;t[0]!==n||t[1]!==i?(l=Fe(n,i),t[0]=n,t[1]=i,t[2]=l):l=t[2];let u=l;if(!u)return null;let d=n.state!==`refreshing`,f=n.state===`ready`?i.findAnother:i.retry,p=`${i.label}:${u.label}`,m;t[3]===u.refreshing?m=t[4]:(m=u.refreshing?(0,$.jsx)(q,{className:`size-3.5 shrink-0 animate-spin motion-reduce:animate-none`,"aria-hidden":!0}):(0,$.jsx)(A,{className:`size-3.5 shrink-0`,"aria-hidden":!0}),t[3]=u.refreshing,t[4]=m);let h=Ie[u.tone],g;t[5]===h?g=t[6]:(g=N(`size-1.5 shrink-0 rounded-full`,h),t[5]=h,t[6]=g);let _;t[7]===g?_=t[8]:(_=(0,$.jsx)(`span`,{className:g,"aria-hidden":!0}),t[7]=g,t[8]=_);let v;t[9]!==i.label||t[10]!==u.label?(v=(0,$.jsxs)(`span`,{className:`truncate`,children:[i.label,` · `,u.label]}),t[9]=i.label,t[10]=u.label,t[11]=v):v=t[11];let y;t[12]!==p||t[13]!==m||t[14]!==_||t[15]!==v?(y=(0,$.jsx)(W,{asChild:!0,children:(0,$.jsxs)(B,{type:`button`,variant:`ghost`,className:`h-9 max-w-56 rounded-lg px-2.5`,"aria-label":p,children:[m,_,v]})}),t[12]=p,t[13]=m,t[14]=_,t[15]=v,t[16]=y):y=t[16];let b;t[17]===u.refreshing?b=t[18]:(b=(0,$.jsx)(`span`,{className:`mt-1 flex size-7 shrink-0 items-center justify-center rounded-lg bg-accent-soft text-accent`,children:u.refreshing?(0,$.jsx)(q,{className:`size-4 animate-spin motion-reduce:animate-none`,"aria-hidden":!0}):(0,$.jsx)(A,{className:`size-4`,"aria-hidden":!0})}),t[17]=u.refreshing,t[18]=b);let x;t[19]===u.label?x=t[20]:(x=(0,$.jsx)(`p`,{className:`font-semibold text-fg`,children:u.label}),t[19]=u.label,t[20]=x);let S;t[21]===u.detail?S=t[22]:(S=(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:u.detail}),t[21]=u.detail,t[22]=S);let C;t[23]!==x||t[24]!==S?(C=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[x,S]}),t[23]=x,t[24]=S,t[25]=C):C=t[25];let w;t[26]!==C||t[27]!==b?(w=(0,$.jsxs)(`div`,{className:`flex items-start gap-3`,children:[b,C]}),t[26]=C,t[27]=b,t[28]=w):w=t[28];let T;t[29]===a?T=t[30]:(T=()=>{c(!1),a()},t[29]=a,t[30]=T);let E;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(J,{className:`size-3.5`,"aria-hidden":!0}),t[31]=E):E=t[31];let D;t[32]!==i.history||t[33]!==T?(D=(0,$.jsxs)(B,{type:`button`,variant:`ghost`,className:`h-9 rounded-lg text-xs`,onClick:T,children:[E,i.history]}),t[32]=i.history,t[33]=T,t[34]=D):D=t[34];let O;t[35]!==r||t[36]!==d||t[37]!==o||t[38]!==f?(O=d?(0,$.jsxs)(B,{type:`button`,variant:`secondary`,className:`h-9 rounded-lg text-xs`,disabled:r,onClick:()=>{c(!1),o()},children:[(0,$.jsx)(q,{className:`size-3.5`,"aria-hidden":!0}),f]}):null,t[35]=r,t[36]=d,t[37]=o,t[38]=f,t[39]=O):O=t[39];let k;t[40]!==D||t[41]!==O?(k=(0,$.jsxs)(`div`,{className:`mt-4 flex items-center justify-end gap-1 border-t border-edge-subtle pt-3`,children:[D,O]}),t[40]=D,t[41]=O,t[42]=k):k=t[42];let j;t[43]!==w||t[44]!==k?(j=(0,$.jsx)(V,{children:(0,$.jsxs)(H,{side:`bottom`,align:`end`,sideOffset:6,className:`z-[70] w-[min(21rem,calc(100vw-1.5rem))] rounded-xl border border-edge bg-surface-panel p-4 text-sm text-fg shadow-popover outline-none`,onOpenAutoFocus:Re,children:[w,k]})}),t[43]=w,t[44]=k,t[45]=j):j=t[45];let M;return t[46]!==s||t[47]!==j||t[48]!==y?(M=(0,$.jsxs)(U,{open:s,onOpenChange:c,children:[y,j]}),t[46]=s,t[47]=j,t[48]=y,t[49]=M):M=t[49],M}function Re(e){return e.preventDefault()}function ze({taskId:e,language:t,onComplete:n}){let r=t===`zh`,[i,a]=(0,Q.useState)(),[o,s]=(0,Q.useState)(),[c,l]=(0,Q.useState)(!1),[u,d]=(0,Q.useState)(0);(0,Q.useEffect)(()=>{let t=!0;return s(void 0),a(void 0),g(e).then(e=>{t&&a(e)}).catch(e=>{t&&s(e instanceof Error?e.message:String(e))}),()=>{t=!1}},[e,u]);let f=i?Y(i):[],m=i?.task.phase===`review`&&i.allowedCommands.includes(`close`)&&i.waits.length===0&&f.length>0&&f.every(e=>e.status===`passed`);async function h(e,t=!1){if(!c){l(!0),s(void 0);try{a(await e()),t&&n()}catch(e){s(e instanceof Error?e.message:String(e))}finally{l(!1)}}}let _=i?.receipts[0];return(0,$.jsxs)(`section`,{className:`mt-4 space-y-4 rounded-xl border border-edge bg-surface-panel p-4`,"aria-label":r?`任务验收`:`Task review`,children:[o?(0,$.jsxs)(`div`,{role:`alert`,className:`flex items-center justify-between gap-3 text-sm text-danger`,children:[(0,$.jsx)(`span`,{children:o}),(0,$.jsx)(B,{variant:`ghost`,disabled:c,onClick:()=>d(e=>e+1),children:r?`刷新`:`Refresh`})]}):null,!i&&!o?(0,$.jsxs)(`div`,{className:`space-y-3`,"aria-busy":!0,children:[(0,$.jsx)(G,{className:`h-5 w-1/3`}),(0,$.jsx)(G,{className:`h-24 w-full`})]}):null,i?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:r?`执行结果`:`Result`}),_?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(X,{content:_.summary,contentKey:`home:${e}:result`,language:t,previewHeight:180}),_.remainingWork.length>0?(0,$.jsxs)(`p`,{className:`whitespace-pre-wrap text-sm text-fg-muted`,children:[r?`尚待完成:`:`Remaining work: `,_.remainingWork.join(`
|
|
2
|
-
`)]}):null,_.evidence.map((e,t)=>(0,$.jsxs)(`div`,{className:`text-sm text-fg-muted`,children:[e.uri&&/^https?:\/\//.test(e.uri)?(0,$.jsx)(`a`,{href:e.uri,target:`_blank`,rel:`noreferrer`,className:`text-accent-fg hover:underline`,children:e.title}):(0,$.jsx)(`span`,{children:e.title}),e.summary?(0,$.jsx)(`p`,{className:`mt-1 whitespace-pre-wrap break-words`,children:e.summary}):null]},t))]}):(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:r?`暂无执行结果,请查看任务详情。`:`No result yet. View the task details.`}),(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:r?`验收条件`:`Acceptance criteria`}),f.map((t,n)=>(0,$.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-2 border-t border-edge-subtle pt-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 text-sm text-fg`,children:[(0,$.jsx)(`p`,{className:`break-words`,children:t.text}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:r?{passed:`已通过`,failed:`未通过`,unverified:`待判定`}[t.status]:{passed:`Passed`,failed:`Failed`,unverified:`Not reviewed`}[t.status]})]}),i.task.phase!==`closed`&&i.task.contract?.acceptancePolicy!==`verified_auto`?(0,$.jsx)(`div`,{className:`flex gap-2`,children:[`passed`,`failed`].map(a=>(0,$.jsx)(B,{variant:`secondary`,disabled:c||t.status===a,onClick:()=>void h(()=>p(e,n,a,i.task.version,i.task.latestContractVersion)),children:r?a===`passed`?`确认通过`:`未通过`:a===`passed`?`Mark passed`:`Mark failed`},a))}):null]},n)),m?null:(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:r?`所有验收条件通过且任务无等待事项后,可完成验收。`:`Accept once all criteria pass and the task has no pending waits.`}),(0,$.jsx)(B,{variant:`primary`,disabled:c||!m,onClick:()=>void h(()=>y(e,{type:`close`,resolution:`done`},i.task.version),!0),children:r?`验收完成`:`Accept task`})]}):null]})}async function Be(e,t=`en`){let n=await g(e),r=n.runs.filter(e=>!e.parentRunId).sort((e,t)=>t.queuedAt-e.queuedAt)[0];if(!n.allowedCommands.includes(`start`)||r?.status!==`failed`)throw Error(t===`zh`?`任务状态已变化,暂时无法重试。请刷新并查看当前状态。`:`Task is no longer available for retry. Refresh and review its current state.`);await y(e,{type:`start`,executor:z.parse({...r.executorRef,kind:r.executorKind})},n.task.version)}function Ve(e,t){return e.replace(/\{\{(\w+)\}\}/g,(e,n)=>String(t[n]??``))}function He(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`div`,{className:`space-y-8`,"aria-busy":!0,children:[(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsx)(G,{className:`h-10 w-3/5 rounded-xl`}),(0,$.jsx)(G,{className:`h-5 w-4/5 rounded-lg`})]}),(0,$.jsx)(G,{className:`h-64 rounded-2xl`}),(0,$.jsx)(G,{className:`h-32 rounded-xl`})]}),e[0]=t):t=e[0],t}function Ue(e){let t=(0,Z.c)(50),{item:n,busy:r,recommendationLabel:a,dueLabel:o,failureLabel:s,locale:c,onAction:l,onComplete:u}=e,[d,f]=i(),p=n.primaryAction?.type===`task_review`?n.primaryAction:void 0,m;t[0]!==p||t[1]!==d?(m=p&&d.get(`reviewTask`)===p.taskId,t[0]=p,t[1]=d,t[2]=m):m=t[2];let h=!!m,g;t[3]!==p||t[4]!==d||t[5]!==f?(g=e=>{let t=new URLSearchParams(d);e&&p?t.set(`reviewTask`,p.taskId):t.delete(`reviewTask`),f(t)},t[3]=p,t[4]=d,t[5]=f,t[6]=g):g=t[6];let _=g,v;t[7]!==o||t[8]!==n.dueAt||t[9]!==c?(v=n.dueAt?`${o} ${re(new Date(n.dueAt),c)}`:null,t[7]=o,t[8]=n.dueAt,t[9]=c,t[10]=v):v=t[10];let y=v,b=n.kind===`failure`?s:y,x;t[11]===b?x=t[12]:(x=b?(0,$.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 text-xs font-medium text-warning`,children:[(0,$.jsx)(`span`,{className:`size-1.5 rounded-full bg-warning`,"aria-hidden":!0}),(0,$.jsx)(`span`,{children:b})]}):null,t[11]=b,t[12]=x);let S=!n.openAction,C;t[13]!==n.id||t[14]!==n.openAction||t[15]!==l?(C=()=>n.openAction&&l(n.openAction,n.id),t[13]=n.id,t[14]=n.openAction,t[15]=l,t[16]=C):C=t[16];let w;t[17]===n.title?w=t[18]:(w=(0,$.jsx)(`span`,{className:`block text-lg font-semibold leading-7 tracking-tight text-fg`,children:n.title}),t[17]=n.title,t[18]=w);let T;t[19]===n.summary?T=t[20]:(T=(0,$.jsx)(`span`,{className:`mt-1.5 block text-sm leading-6 text-fg-muted`,children:n.summary}),t[19]=n.summary,t[20]=T);let E;t[21]!==S||t[22]!==C||t[23]!==w||t[24]!==T?(E=(0,$.jsxs)(`button`,{type:`button`,className:`block w-full text-left outline-none focus-visible:rounded-md focus-visible:ring-2 focus-visible:ring-accent`,disabled:S,onClick:C,children:[w,T]}),t[21]=S,t[22]=C,t[23]=w,t[24]=T,t[25]=E):E=t[25];let D;t[26]!==n.recommendation||t[27]!==a?(D=n.recommendation?(0,$.jsxs)(`p`,{className:`mt-3 text-sm leading-6 text-fg-muted`,children:[(0,$.jsxs)(`span`,{className:`font-semibold text-fg`,children:[a,`:`]}),n.recommendation]}):null,t[26]=n.recommendation,t[27]=a,t[28]=D):D=t[28];let O;t[29]!==r||t[30]!==n.id||t[31]!==n.primaryAction||t[32]!==n.secondaryActions||t[33]!==l||t[34]!==p||t[35]!==h||t[36]!==_?(O=n.primaryAction||n.secondaryActions.length>0?(0,$.jsxs)(`div`,{className:`mt-5 flex flex-wrap gap-2`,children:[n.primaryAction?(0,$.jsx)(B,{type:`button`,variant:`primary`,className:`h-9 rounded-lg px-3.5 text-xs`,disabled:r,"aria-expanded":p?h:void 0,onClick:()=>p?_(!h):l(n.primaryAction,n.id),children:n.primaryAction.label}):null,n.secondaryActions.map(e=>(0,$.jsx)(B,{type:`button`,variant:`secondary`,className:`h-9 rounded-lg px-3.5 text-xs shadow-none`,disabled:r,onClick:()=>l(e,n.id),children:e.label},`${e.type}:${e.label}`))]}):null,t[29]=r,t[30]=n.id,t[31]=n.primaryAction,t[32]=n.secondaryActions,t[33]=l,t[34]=p,t[35]=h,t[36]=_,t[37]=O):O=t[37];let k;t[38]!==c||t[39]!==u||t[40]!==p||t[41]!==h||t[42]!==_?(k=h&&p?(0,$.jsx)(ze,{taskId:p.taskId,language:c,onComplete:()=>{_(!1),u()}}):null,t[38]=c,t[39]=u,t[40]=p,t[41]=h,t[42]=_,t[43]=k):k=t[43];let A;return t[44]!==D||t[45]!==O||t[46]!==k||t[47]!==x||t[48]!==E?(A=(0,$.jsxs)(`article`,{className:`px-5 py-5 sm:px-6 sm:py-6`,children:[x,E,D,O,k]}),t[44]=D,t[45]=O,t[46]=k,t[47]=x,t[48]=E,t[49]=A):A=t[49],A}function We(e){let t=(0,Z.c)(26),{item:n,onAction:r}=e,i;t[0]===n.kind?i=t[1]:(i=n.kind===`scheduled`?(0,$.jsx)(se,{className:`size-4`,"aria-hidden":!0}):(0,$.jsx)(`span`,{className:`size-1.5 rounded-full bg-success`,"aria-hidden":!0}),t[0]=n.kind,t[1]=i);let a=i,o=!n.openAction,c;t[2]!==n.id||t[3]!==n.openAction||t[4]!==r?(c=()=>n.openAction&&r(n.openAction,n.id),t[2]=n.id,t[3]=n.openAction,t[4]=r,t[5]=c):c=t[5];let l;t[6]===a?l=t[7]:(l=(0,$.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center text-fg-subtle`,children:a}),t[6]=a,t[7]=l);let u;t[8]===n.title?u=t[9]:(u=(0,$.jsx)(`span`,{className:`block truncate text-sm font-medium text-fg`,children:n.title}),t[8]=n.title,t[9]=u);let d;t[10]===n.summary?d=t[11]:(d=(0,$.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-fg-muted`,children:n.summary}),t[10]=n.summary,t[11]=d);let f;t[12]!==u||t[13]!==d?(f=(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[u,d]}),t[12]=u,t[13]=d,t[14]=f):f=t[14];let p;t[15]===n.statusLabel?p=t[16]:(p=n.statusLabel?(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-fg-subtle`,children:n.statusLabel}):null,t[15]=n.statusLabel,t[16]=p);let m;t[17]===n.openAction?m=t[18]:(m=n.openAction?(0,$.jsx)(s,{className:`size-4 shrink-0 text-fg-subtle`,"aria-hidden":!0}):null,t[17]=n.openAction,t[18]=m);let h;return t[19]!==o||t[20]!==c||t[21]!==l||t[22]!==f||t[23]!==p||t[24]!==m?(h=(0,$.jsxs)(`button`,{type:`button`,className:`flex min-h-16 w-full items-center gap-3 py-3 text-left outline-none hover:text-fg focus-visible:rounded-md focus-visible:ring-2 focus-visible:ring-accent`,disabled:o,onClick:c,children:[l,f,p,m]}),t[19]=o,t[20]=c,t[21]=l,t[22]=f,t[23]=p,t[24]=m,t[25]=h):h=t[25],h}function Ge(){let e=P(e=>e.language),t=M(e),n=t.projectsPage,r=ge(e),i=o(),s=a(),l=ie(e=>e.setPageHeader),u=ie(e=>e.clearPageHeader),{home:d,loading:p,loadError:g,setLoadError:v,load:y}=ve(e,s.key),[S,E]=(0,Q.useState)(!1),[k,A]=(0,Q.useState)(``),N=(0,Q.useRef)(!1),[z,V]=(0,Q.useState)(null),[H,U]=(0,Q.useState)(!1),[W,G]=(0,Q.useState)(),[re,oe]=(0,Q.useState)(!1),[se,de]=(0,Q.useState)(0),[pe,K]=(0,Q.useState)(),[me,q]=(0,Q.useState)(),[J,_e]=(0,Q.useState)(!1),Y=w({chat:t.chat}),X=(0,Q.useRef)(null),Z=ae({disabled:J,chat:t.chat,onTranscript:e=>{A(t=>ce(t,e)),window.setTimeout(()=>X.current?.focus(),0)}}),{phase:ye,voiceActive:xe,startVoiceInput:Se,cancelVoiceInput:Ce,confirmVoiceInput:we,retryVoiceInput:Te}=Z;(0,Q.useEffect)(()=>{if(!pe)return;let e=window.setTimeout(()=>K(void 0),8e3);return()=>window.clearTimeout(e)},[pe]);let De=(0,Q.useCallback)(async e=>{if(!(e.length===0||J)){_e(!0);try{await Y.processFiles(e)}finally{_e(!1)}}},[J,Y.processFiles]),Oe=(0,Q.useCallback)(async e=>{let t=fe(e.clipboardData);t.length!==0&&(e.preventDefault(),await De(t))},[De]),ke=(0,Q.useCallback)(e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`,Y.setIsDragging(!0))},[Y.setIsDragging]),Ae=(0,Q.useCallback)(e=>{let t=e.relatedTarget;(!(t instanceof Node)||!e.currentTarget.contains(t))&&Y.setIsDragging(!1)},[Y.setIsDragging]),Me=(0,Q.useCallback)(async e=>{e.preventDefault(),Y.setIsDragging(!1),await De(Array.from(e.dataTransfer.files))},[Y.setIsDragging,De]),Ne=(0,Q.useCallback)(e=>{e.preventDefault();let t=Y.wireAttachmentsPayload(),n=b(k,t.length>0?he(t):void 0,{projectScope:`none`});n&&(E(!1),A(``),Y.clearAttachments(),i(n))},[Y.clearAttachments,Y.wireAttachmentsPayload,k,i]),Pe=Y.attachments.length>=10,Fe={attachTitle:Pe?Ve(t.chat.maxAttachmentsReached,{max:10}):`${t.chat.attachFile} (${Y.attachments.length}/10)`,dropFiles:t.chat.dropFiles,intentLabel:r.intentLabel,intentPlaceholder:r.intentPlaceholder,intentSuggestion:r.intentSuggestion,shortcut:n.home.submitShortcut,submit:r.newWork},Ie=(0,Q.useMemo)(()=>({label:n.home.advisorStatusLabel,ready:n.home.advisorStatusReady,clarification:n.home.advisorStatusClarification,refreshing:n.home.advisorStatusRefreshing,refreshingDetail:n.home.advisorRefreshing,idle:n.home.advisorStatusIdle,idleDetail:n.home.advisorUnavailableTitle,generationFailed:n.home.advisorStatusGenerationFailed,budgetExhausted:n.home.advisorStatusBudgetExhausted,modelUnavailable:n.home.advisorStatusModelUnavailable,generationFailedDetail:n.home.advisorGenerationFailed,budgetExhaustedDetail:n.home.advisorBudgetExhausted,modelUnavailableDetail:n.home.advisorModelUnavailable,history:n.home.advisorHistory,retry:n.home.retry,findAnother:n.home.advisorRefresh}),[n.home]),Re=!!(d&&d.needsUser.length===0&&d.backgroundCount===0),ze=!!(d&&d.needsUser.length===0),Ge=ze||S;(0,Q.useEffect)(()=>{!Ge&&xe&&Ce()},[Ce,Ge,xe]),(0,Q.useEffect)(()=>{let e=e=>{let t=e.detail?.target;t&&t!==`chat`||!Ge||J||(e.preventDefault(),ye===`recording`?we():ye===`idle`?(X.current?.focus(),Se()):ye===`error`&&Te())},t=e=>{let t=e.detail?.target;t&&t!==`chat`||!Ge||!xe||(e.preventDefault(),Ce(),X.current?.focus())};return window.addEventListener(ue,e),window.addEventListener(le,t),()=>{window.removeEventListener(ue,e),window.removeEventListener(le,t)}},[J,Ce,Ge,we,Te,Se,xe,ye]);let Ke=(0,Q.useCallback)(e=>{e||Ce(),E(e)},[Ce]),qe=(0,Q.useCallback)((t,n)=>{if(t.type===`open`){i(D(`/`,t.href));return}t.type===`task_review`||N.current||(N.current=!0,V(n),v(null),(async()=>{try{t.type===`retry_task`?await Be(t.taskId,e):t.type===`connector_decision`?await _({kind:`connector_approval`,approvalId:t.approvalId},t.decision):t.type===`retry_run`?await m({kind:t.subjectKind,runId:t.runId}):t.type===`acknowledge_run`&&await C({kind:t.subjectKind,runId:t.runId}),await y()}catch(e){v(e instanceof Error?e.message:String(e))}finally{N.current=!1,V(null)}})())},[e,y,i]),Je=(0,Q.useCallback)(()=>{U(!0),G(void 0),q(void 0),v(null),T(e).then(()=>y()).catch(e=>v(e instanceof Error?e.message:String(e))).finally(()=>U(!1))},[e,y]),Ye=(0,Q.useCallback)((e,t)=>{U(!0),v(null),x(e,t).then(async t=>{if(t.outcome===`needs_setup`){q({opportunityId:e.id,value:t.preflight});return}if(q(void 0),de(e=>e+1),t.outcome===`task`){G({title:n.home.advisorStartedTitle,detail:Ve(n.home.advisorStartedDetail,{title:e.title}),href:D(`/`,t.href)}),await y();return}i(t.href)}).catch(e=>v(e instanceof Error?e.message:String(e))).finally(()=>U(!1))},[y,i,n.home.advisorStartedDetail,n.home.advisorStartedTitle]),Xe=(0,Q.useCallback)((e,t)=>{U(!0),G(void 0),q(void 0),v(null),h(e,{kind:t,snoozedUntil:t===`too_early`?Date.now()+4320*6e4:void 0}).then(({idempotencyKey:t})=>(K({opportunityId:e.id,idempotencyKey:t}),de(e=>e+1),y())).catch(e=>v(e instanceof Error?e.message:String(e))).finally(()=>U(!1))},[y]),Ze=(0,Q.useCallback)(()=>{if(!pe)return;let e=pe;K(void 0),U(!0),v(null),f(e.opportunityId,e.idempotencyKey).then(()=>(de(e=>e+1),y())).catch(t=>{K(e),v(t instanceof Error?t.message:String(t))}).finally(()=>U(!1))},[pe,y]),Qe=(0,Q.useCallback)((e,t)=>{i(`/chat/new?${new URLSearchParams({draft:`${e}\n\n${t}`}).toString()}`)},[i]),$e=(0,Q.useMemo)(()=>(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[d?(0,$.jsx)(Le,{advisor:d.advisor,busy:H,copy:Ie,onOpenHistory:()=>oe(!0),onRefresh:Je}):null,ze?null:(0,$.jsxs)(B,{type:`button`,variant:`primary`,className:`h-9 rounded-lg`,onClick:()=>E(!0),children:[(0,$.jsx)(O,{className:`size-4`,"aria-hidden":!0}),r.newWork]})]}),[H,Ie,r.newWork,d,Je,ze]);(0,Q.useLayoutEffect)(()=>(l({startExtra:null,main:(0,$.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:n.title}),end:$e}),()=>u()),[u,$e,l,n.title]);let et=d?.needsUser.length??0,tt=d?.backgroundCount??0,nt=et>0?Ve(n.home.attentionTitle,{count:et}):tt>0?n.home.clearTitle:n.home.idleTitle,rt=et>0?tt>0?Ve(n.home.attentionIntroWithBackground,{count:tt}):n.home.attentionIntro:tt>0?Ve(n.home.clearIntro,{count:tt}):n.home.idleIntro;return(0,$.jsxs)(`main`,{className:`mx-auto flex w-full max-w-[920px] flex-1 flex-col px-4 pb-8 pt-3 sm:px-6 lg:px-8 lg:pb-12 lg:pt-4`,children:[(0,$.jsx)(`input`,{ref:Y.fileInputRef,type:`file`,multiple:!0,className:`hidden`,onChange:e=>{let t=e.target.files;t&&De(Array.from(t)),e.target.value=``}}),(0,$.jsx)(R,{open:S,onOpenChange:Ke,children:(0,$.jsxs)(te,{children:[(0,$.jsx)(ee,{className:`xopc-dialog-overlay fixed inset-0 z-[80] bg-scrim backdrop-blur-[2px]`}),(0,$.jsxs)(ne,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[90] flex h-[min(31rem,calc(100dvh-1.5rem))] w-[min(36rem,calc(100vw-1.5rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay shadow-float focus:outline-none`,children:[(0,$.jsxs)(`div`,{className:`flex shrink-0 items-start gap-4 border-b border-edge px-5 py-4`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(L,{className:`text-base font-semibold text-fg`,children:r.dialogTitle}),(0,$.jsx)(F,{className:`mt-1 text-sm leading-5 text-fg-muted`,children:r.dialogDescription})]}),(0,$.jsx)(I,{asChild:!0,children:(0,$.jsx)(B,{type:`button`,variant:`ghost`,className:`-mr-2 -mt-1 size-8 shrink-0 rounded-lg p-0`,title:n.cancel,"aria-label":n.cancel,children:(0,$.jsx)(j,{className:`size-4`,"aria-hidden":!0})})})]}),(0,$.jsx)(be,{variant:`dialog`,inputId:`new-conversation-intent`,inputRef:X,intent:k,labels:{...Fe,submit:r.submit},attachments:Y.attachments,isDragging:Y.isDragging,attachmentBusy:J,attachmentsFull:Pe,voice:Z,chat:t.chat,cancelAction:(0,$.jsx)(I,{asChild:!0,children:(0,$.jsx)(B,{type:`button`,variant:`ghost`,children:n.cancel})}),onIntentChange:A,onPickFiles:()=>Y.fileInputRef.current?.click(),onRemoveAttachment:Y.removeAttachment,onPaste:e=>void Oe(e),onDragOver:ke,onDragLeave:Ae,onDrop:e=>void Me(e),onSubmit:Ne})]})]})}),(0,$.jsx)(je,{open:re,refreshKey:se,onOpenChange:oe,onReevaluate:Je}),g?(0,$.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-3 rounded-xl border border-danger/25 bg-danger-soft px-4 py-3 text-sm text-danger`,children:[(0,$.jsx)(`span`,{children:g}),(0,$.jsx)(B,{type:`button`,variant:`ghost`,className:`h-8 px-2`,onClick:()=>void y(),children:n.home.retry})]}):null,p?(0,$.jsx)(He,{}):d?(0,$.jsxs)(`div`,{className:Re?`mx-auto my-auto w-full max-w-[640px]`:`w-full`,children:[(0,$.jsxs)(`section`,{className:Re?`w-full text-center`:`max-w-3xl`,children:[(0,$.jsx)(`h2`,{className:`text-3xl font-semibold leading-tight tracking-[-0.035em] text-fg sm:text-4xl`,children:nt}),(0,$.jsx)(`p`,{className:Re?`mx-auto mt-3 max-w-xl text-sm leading-6 text-fg-muted sm:text-base sm:leading-7`:`mt-3 max-w-2xl text-sm leading-6 text-fg-muted sm:text-base sm:leading-7`,children:rt})]}),ze?(0,$.jsx)(be,{variant:`inline`,inputId:`home-conversation-intent`,inputRef:X,intent:k,labels:Fe,attachments:Y.attachments,isDragging:Y.isDragging,attachmentBusy:J,attachmentsFull:Pe,voice:Z,chat:t.chat,onIntentChange:A,onPickFiles:()=>Y.fileInputRef.current?.click(),onRemoveAttachment:Y.removeAttachment,onPaste:e=>void Oe(e),onDragOver:ke,onDragLeave:Ae,onDrop:e=>void Me(e),onSubmit:Ne}):null,(0,$.jsx)(Ee,{advisor:d.advisor,busy:H,copy:{aiLabel:n.home.advisorAiLabel,why:n.home.advisorWhy,evidence:n.home.advisorEvidence,needsSetup:n.home.advisorNeedsSetup,start:n.home.advisorStart,discuss:n.home.advisorDiscuss,refresh:n.home.advisorRefresh,refreshing:n.home.advisorRefreshing,history:n.home.advisorHistory,viewProgress:n.home.advisorViewProgress,alternatives:n.home.advisorAlternatives,feedback:n.home.advisorFeedback,alreadyDone:n.home.advisorAlreadyDone,irrelevant:n.home.advisorIrrelevant,later:n.home.advisorLater,lessLikeThis:n.home.advisorLessLikeThis,sourceIncorrect:n.home.advisorSourceIncorrect,minutes:n.home.advisorMinutes,setupTitle:n.home.advisorSetupTitle,setupHint:n.home.advisorSetupHint,configure:n.home.advisorConfigure,degradedStart:n.home.advisorDegradedStart,sceneHint:n.home.advisorSceneHint,sceneAction:n.home.advisorSceneAction,automationHint:n.home.advisorAutomationHint,automationAction:n.home.advisorAutomationAction},onRefresh:Je,onAction:Ye,onFeedback:Xe,onClarification:Qe,onOpenHistory:()=>oe(!0),preflight:me,receipt:W}),d.needsUser.length>0?(0,$.jsxs)(`section`,{className:`mt-10`,"aria-labelledby":`home-needs-user-title`,children:[(0,$.jsxs)(`div`,{className:`mb-3 flex items-center gap-2 px-1`,children:[(0,$.jsx)(c,{className:`size-4 text-warning`,"aria-hidden":!0}),(0,$.jsx)(`h2`,{id:`home-needs-user-title`,className:`text-sm font-semibold text-fg`,children:n.home.needsUserTitle})]}),(0,$.jsx)(`div`,{className:`divide-y divide-edge-subtle overflow-hidden rounded-2xl border border-edge-subtle bg-surface-base`,children:d.needsUser.map(t=>(0,$.jsx)(Ue,{item:t,busy:z!==null,recommendationLabel:n.home.recommendationLabel,dueLabel:n.home.dueLabel,failureLabel:r.runAttention,locale:e,onAction:qe,onComplete:()=>void y()},t.id))})]}):null,d.background.length>0?(0,$.jsxs)(`section`,{className:`mt-10`,"aria-labelledby":`home-background-title`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-1`,children:[(0,$.jsx)(`h2`,{id:`home-background-title`,className:`text-sm font-semibold text-fg`,children:n.home.backgroundTitle}),(0,$.jsx)(`span`,{className:`text-xs text-fg-subtle`,children:Ve(n.home.backgroundCount,{count:d.backgroundCount})})]}),(0,$.jsx)(`div`,{className:`mt-2 divide-y divide-edge-subtle border-y border-edge-subtle`,children:d.background.map(e=>(0,$.jsx)(We,{item:e,onAction:qe},e.id))})]}):null]}):null,pe?(0,$.jsxs)(`div`,{role:`status`,className:`fixed bottom-5 left-1/2 z-[100] flex -translate-x-1/2 items-center gap-4 rounded-lg border border-edge bg-surface-panel px-4 py-3 text-sm text-fg shadow-float`,children:[(0,$.jsx)(`span`,{children:n.home.advisorFeedbackSaved}),(0,$.jsx)(`button`,{type:`button`,className:`font-medium text-accent-fg hover:underline`,onClick:Ze,children:n.home.advisorUndo})]}):null]})}export{Ge as HomePage};
|